/*! For license information please see cn.js.LICENSE.txt */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?exports.videolist=t(require("react"),require("react-dom")):e.videolist=t(e.React,e.ReactDOM)}(self,(function(e,t){return(()=>{var n={6679:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Avatar:()=>xe,Button:()=>Oe,Carousel:()=>Ie,Cell:()=>Le,Checkbox:()=>Ke,Collapse:()=>ot,ContextProvider:()=>ye,DatePicker:()=>Qt,Dialog:()=>sn,Dropdown:()=>un,DropdownMenu:()=>vn,Image:()=>_n,ImagePreview:()=>dr,Input:()=>mr,LoadMore:()=>yr,Loading:()=>wr,LvideoList:()=>kr,Masking:()=>_r,NavBar:()=>Ar,NoticeBar:()=>Pr,Picker:()=>Mr,PickerView:()=>Nr,Popover:()=>Xr,Popup:()=>Jr,Portal:()=>qr,PullRefresh:()=>oo,Radio:()=>uo,ShowMonitor:()=>Tn,Slider:()=>wo,Sticky:()=>xo,SwipeLoad:()=>ko,Switch:()=>_o,Tabs:()=>Po,Tag:()=>Bo,Textarea:()=>Ho,Toast:()=>qo,Transition:()=>Qo,UserList:()=>fi,VideoFeed:()=>ff,VideoList:()=>wf});var r={};function o(){return o=Object.assign||function(e){for(var t=1;tJi,AFTER_DEFINITION_CHANGE:()=>fa,AUTOPLAY_PREVENTED:()=>ta,AUTOPLAY_STARTED:()=>ea,BEFORE_DEFINITION_CHANGE:()=>ua,BUFFER_CHANGE:()=>qi,CANPLAY:()=>Li,CANPLAY_THROUGH:()=>Bi,COMPLETE:()=>na,CSS_FULLSCREEN_CHANGE:()=>sa,DEFINITION_CHANGE:()=>ca,DESTROY:()=>oa,DURATION_CHANGE:()=>Fi,EMPTIED:()=>Wi,ENDED:()=>Ii,ERROR:()=>Pi,FULLSCREEN_CHANGE:()=>aa,LOADED_DATA:()=>zi,LOAD_START:()=>Gi,MINI_STATE_CHANGE:()=>la,PAUSE:()=>Ri,PIP_CHANGE:()=>va,PLAY:()=>Si,PLAYER_BLUR:()=>Ki,PLAYER_FOCUS:()=>Qi,PLAYING:()=>Ai,PROGRESS:()=>Vi,RATE_CHANGE:()=>Ui,READY:()=>Zi,REPLAY:()=>ra,RETRY:()=>ha,SEEKED:()=>Ni,SEEKING:()=>Mi,SEI_PARSED:()=>da,STALLED:()=>Xi,SUSPEND:()=>Yi,TIME_UPDATE:()=>ji,URL_CHANGE:()=>ia,URL_NULL:()=>$i,VIDEO_RESIZE:()=>pa,VOLUME_CHANGE:()=>Hi,WAITING:()=>Di});var i=n(359),a=n.n(i),s=Object.prototype.toString;function l(e){return"[object Array]"===s.call(e)}function c(e){return"[object Object]"===s.call(e)}function u(e){return"[object String]"===s.call(e)}function f(){for(var e=[],t=0;t=0&&e<=1&&n>=0&&n<=1))throw new Error("bezier x values must be in [0, 1] range");if(e===t&&n===r)return b;for(var o=h?new Float32Array(11):new Array(11),i=0;i<11;++i)o[i]=g(i*d,e,n);return function(i){return 0===i||1===i?i:g(function(t){for(var r=0,i=1;10!==i&&o[i]<=t;++i)r+=d;--i;var a=r+(t-o[i])/(o[i+1]-o[i])*d,s=y(a,e,n);return s>=.001?function(e,t,n,r){for(var o=0;o<4;++o){var i=y(t,n,r);if(0===i)return t;t-=(g(t,n,r)-e)/i}return t}(t,a,e,n):0===s?a:function(e,t,n,r,o){var i,a,s=0;do{(i=g(a=t+(n-t)/2,r,o)-e)>0?n=a:t=a}while(Math.abs(i)>1e-7&&++s<10);return a}(t,r,r+d,e,n)}(i),t,r)}}function C(e){e.cancelable&&e.preventDefault()}var x=function(e,t){if(!e||!t)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(e===n)return!0;n=n.parentNode}return!1};function E(e){try{return requestAnimationFrame(e)}catch(t){return setTimeout(e,17)}}function k(e,t,n,r,o,i){void 0===r&&(r=300),void 0===o&&(o=[.34,.69,.1,1]),void 0===i&&(i="to");var a=Math.max(0,"by"===i?e+t:t),s=Date.now(),l=function(){var t=(Date.now()-s)/r;if(t>1)n(a);else{var i=e+(a-e)*w.apply(void 0,o)(t);n(i),E(l)}};E(l)}function T(e){for(var t="absolute"===e.style.position,n=["scroll","auto"],r=e;r;){if(!r.parentNode)return e.ownerDocument||document.documentElement;var o=window.getComputedStyle(r),i=o.position,a=o.overflowX||"",s=o.overflowY||"";if("static"===i&&t)r=r.parentNode;else{if(n.indexOf(s)>-1||n.indexOf(a)>-1)return r;r=r.parentNode}}return e.ownerDocument||document.documentElement}function _(e){var t,n,r;return e instanceof HTMLElement?(r=(t=e.getBoundingClientRect()||{height:0,top:0}).height,n=t.top):(n=0,r=0),{height:r,top:n}}function O(e,t){var n=document.querySelector("#"+e)||document.createElement("div");n.id=e;var r=t&&t()?t():document.body;return r.appendChild(n),{child:n,container:r}}function S(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function A(e){var t=e?e():void 0;return"string"==typeof t?document.querySelector(t):t}function I(e){var t=e?e():window;return t===document.body?window:t}function R(e,t){var n=t?t():window;return n?n===window||n===document?document.documentElement[e]||document.body[e]:n===document.body?document.body[e]||document.documentElement[e]:n[e]:0}function P(e){if(!e)return{isGlobal:!1,scrollEle:e,containerRect:{top:0,left:0,bottom:0,right:0}};var t=e===window?document.documentElement:e,n=t===document.documentElement||t===document.body,r=n?{top:0,left:0,bottom:window.innerHeight,right:window.innerWidth}:t.getBoundingClientRect();return{isGlobal:n,scrollEle:t,containerRect:r}}var M={};function N(e){var t=M[e];t&&(document.documentElement.removeChild(t),delete M[e])}function j(e,t){N(e);var n=document.createElement("style");n.innerHTML=t,document.documentElement.appendChild(n),M[e]=n}function D(e,t){j(e,"@keyframes "+e+" "+t+"\n@-webkit-keyframes "+e+" "+t)}function L(e,t){var n=e;return Object.keys(t).forEach((function(e){n[e]=t[e]})),n}var B={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function F(){try{var e=navigator.userAgent,t=e.indexOf("Android")>-1||e.indexOf("Linux")>-1,n=e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)||e.indexOf("Mac OS X")>-1;return t||n?t?"android":"ios":"pc"}catch(e){return""}}function H(e,t,n){(n=n||{}).childrenKeyName=n.childrenKeyName||"children";var r=e||[],o=[],i=0;do{var a=r.filter((function(e){return t(e,i)}))[0];if(!a)break;o.push(a),r=a[n.childrenKeyName]||[],i+=1}while(r.length>0);return o}function z(e){setTimeout(e,20)}function U(e,t){return t?e/(t[0]*e+t[1]):e/(.013312*e+1.636345)}function V(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var G={prefixCls:"arco",system:"",useDarkMode:!1,isDarkMode:!1},W=(0,i.createContext)(G);function X(e){var t=e.children,n=e.useDarkMode,r=e.isDarkMode,s=e.theme,l=V(e,["children","useDarkMode","isDarkMode","theme"]),c=(0,i.useState)(),u=c[0],f=c[1],d=(0,i.useCallback)((function(e){return f(e.matches)}),[]);return(0,i.useEffect)((function(){var e=window.matchMedia("(prefers-color-scheme: dark)");if(n){var t=e.matches;f(t),"function"==typeof e.addEventListener?e.addEventListener("change",d):"function"==typeof e.addListener&&e.addListener(d)}return function(){n&&("function"==typeof e.removeEventListener?e.removeEventListener("change",d):"function"==typeof e.removeListener&&e.removeListener(d))}}),[n]),(0,i.useEffect)((function(){var e;if(s)return"arcoCustomTheme",(e=s)&&Object.keys(e).length&&j("arcoCustomTheme",":root {"+Object.keys(e).map((function(t){return"--"+t+": "+e[t]+";"})).join("\n")+"}"),function(){N("arcoCustomTheme")}}),[s]),a().createElement(W.Provider,{value:o({},G,l,{isDarkMode:void 0===r?u:r,useDarkMode:n})},t)}var Y=W.Consumer;function J(e,t,n){void 0===t&&(t=[]),void 0===n&&(n=!0),(0,i.useEffect)((function(){return n?(window.addEventListener("resize",e),window.addEventListener("orientationchange",e),function(){window.removeEventListener("resize",e),window.removeEventListener("orientationchange",e)}):function(){}}),[].concat(t,[n]))}function q(e){var t=(0,i.useState)(e),n=t[0],r=t[1],o=(0,i.useRef)(!1),a=(0,i.useCallback)((function(e){o.current||r(e)}),[]);return(0,i.useEffect)((function(){return function(){o.current=!0}}),[]),[n,a]}function Q(e){var t=(0,i.useState)(e),n=t[0],r=t[1],o=(0,i.useRef)(n);return(0,i.useEffect)((function(){o.current=n}),[n]),[n,o,r]}function K(e,t){void 0===t&&(t=[]);var n=(0,i.useRef)(!0);(0,i.useEffect)((function(){if(!n.current)return e();n.current=!1}),t)}function Z(){var e=(0,i.useContext)(W).system,t=(0,i.useState)((function(){return e||F()})),n=t[0],r=t[1];return(0,i.useEffect)((function(){r(e||F())}),[e]),n}function $(e){var t=(0,i.useState)(0),n=t[0],r=t[1],o=(0,i.useState)(0),a=o[0],s=o[1];function l(){r(window.innerWidth),s(window.innerHeight)}return J(l,[],e),(0,i.useEffect)((function(){l()}),[]),{windowWidth:n,windowHeight:a}}function ee(e,t,n,r,o){void 0===r&&(r="top");var a=(0,i.useRef)([]),s=(0,i.useRef)({dom:null,inScrollIndexes:[]}),l=(0,i.useRef)(0),c=(0,i.useRef)(0),u=(0,i.useCallback)((function(e){c.current=e.touches&&e.touches[0]?e.touches[0].clientX:0,l.current=e.touches&&e.touches[0]?e.touches[0].clientY:0;var t=n?n():null;if(t){var o=Array.isArray(t)?t:[t];a.current=o.reduce((function(e,t){return[].concat(e,t&&"hidden"!==window.getComputedStyle(t).overflow?[{ele:t,maxScrollX:"left"===r||"right"===r?t.scrollHeight-t.clientHeight:t.scrollWidth-t.clientWidth,maxScrollY:"left"===r||"right"===r?t.scrollWidth-t.clientWidth:t.scrollHeight-t.clientHeight}]:[])}),[])}else a.current=[];s.current={dom:null,inScrollIndexes:[]}}),[n,r]),f=(0,i.useCallback)((function(e){function t(e){var t=e.ele,n=e.maxScrollX,o=e.maxScrollY;switch(r){case"left":return o-t.scrollLeft;case"right":return t.scrollLeft;case"bottom":return n-t.scrollTop;default:return t.scrollTop}}function n(e){var t=e.ele,n=e.maxScrollX,o=e.maxScrollY;switch(r){case"left":return t.scrollTop;case"right":return n-t.scrollTop;case"bottom":return o-t.scrollLeft;default:return t.scrollLeft}}var i=e.changedTouches&&e.changedTouches[0]?e.changedTouches[0].clientX:0,u=e.changedTouches&&e.changedTouches[0]?e.changedTouches[0].clientY:0,f=a.current,d=e.target,h=s.current,p=h.dom,v=h.inScrollIndexes,m=p===d?v:function(e,t){for(var n=[],r=0;rb?"y":"x";if(f.length&&m.length){for(var x=[],E=0;E0&&w>b&&0===T||g>0&&b>w&&0===_||y<0&&w>b&&T+1>=k.maxScrollY||g<0&&b>w&&_+1>=k.maxScrollX?x.push(!0):x.push(!1)}x.indexOf(!1)<0&&(o&&o(e,C),e.cancelable&&e.preventDefault())}else o&&o(e,C),e.cancelable&&e.preventDefault()}),[r,o]);(0,i.useEffect)((function(){return e?(t&&(t.addEventListener("touchstart",u),t.addEventListener("touchmove",f,{passive:!1})),function(){t&&(t.removeEventListener("touchstart",u),t.removeEventListener("touchmove",f))}):function(){}}),[e,t,u,f])}var te=function(e,t,n,r){void 0===r&&(r={capture:!0}),(0,i.useEffect)((function(){if(e)return n&&e.addEventListener(t,n,r),function(){n&&e.removeEventListener(t,n,r)}}),[n])},ne=0,re="";function oe(e,t,n){var r=(0,i.useCallback)((function(){ne||(re=void 0!==n?n:document.body.style.overflow),ne+=1,document.body.style.overflow="hidden"}),[]),o=(0,i.useCallback)((function(){var e=ne-1;ne=e,e||(document.body.style.overflow=re)}),[]);(0,i.useEffect)((function(){return t?(e&&r(),function(){e&&o()}):function(){}}),[e])}function ie(e){var t=/(transform|transition|animation)/i;return Object.keys(e).reduce((function(n,r){var i,a,s=t.test(r)?((i={})["Webkit"+r.replace(/^(.)/,(function(e,t){return t.toUpperCase()}))]=e[r],i):{};return o({},n,((a={})[r]=e[r],a),s)}),{})}var ae=function(e,t){return void 0===e?t:e},se=(0,i.forwardRef)((function(e,t){var n=e.style,r=e.className,s=void 0===r?"":r,l=e.color,c=e.type,u=void 0===c?"dot":c,d=e.list,h=e.duration,p=void 0===h?1e3:h,v=e.svgKey,m=void 0===v?"":v,g=e.radius,y=void 0===g?9:g,b=e.stroke,w=void 0===b?2:b,C=e.filleted,x=void 0===C||C,E=(0,i.useState)([]),k=E[0],T=E[1],_=(0,i.useRef)(-1),O=Math.PI*y,S=.5*w+y,A=2*y+w,I=(0,i.useRef)(null);return(0,i.useImperativeHandle)(t,(function(){return{dom:I.current}})),(0,i.useEffect)((function(){if("dot"===u&&k.length){var e=p/k.length;_.current=setInterval((function(){var e=[].concat(k),t=e.pop();t&&e.unshift(t),T(e)}),e)}return function(){_.current>=0&&clearInterval(_.current)}}),[u,k,p]),(0,i.useEffect)((function(){var e;if(d&&d.length)e=d;else switch(u){case"spin":e=[1,.1,.2286,.3572,.4858,.6144,.743,.8716];break;case"dot":e=[.2,.6,1];break;default:e=[]}T(e)}),[d,u]),a().createElement(Y,null,(function(e){var t,r=e.prefixCls;return a().createElement("div",{className:f(r+"-loading all-border-box",u,s),style:(t=-1!==["circle","arc"].indexOf(u)?{width:A,height:A}:{},ie(o({animationDuration:p+"ms"},t,n||{}))),ref:I},function(){switch(u){case"spin":return e=k.length,k.map((function(t,n){return a().createElement("span",{key:n,className:"spin-cell",style:ie({opacity:t,transform:"rotate("+n/e+"turn)",width:w})},a().createElement("span",{className:"spin-cell-inner bg-color-with-config",style:o({backgroundColor:l},x?{borderRadius:w}:{})}))}));case"dot":return k.map((function(e,t){return a().createElement("span",{key:t,className:f("dot-cell","bg-color-with-config",{filleted:x}),style:{opacity:e,backgroundColor:l}})}));case"circle":return a().createElement("svg",{viewBox:"0 0 "+A+" "+A},a().createElement("defs",null,a().createElement("linearGradient",{id:"grad1-"+m,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},a().createElement("stop",{offset:"0%",className:"loading-circle-middle stop-color-with-config",style:{stopColor:l}}),a().createElement("stop",{offset:"100%",className:"loading-circle-start stop-color-with-config",style:{stopColor:l}})),a().createElement("linearGradient",{id:"grad2-"+m,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},a().createElement("stop",{offset:"0%",className:"loading-circle-middle stop-color-with-config",style:{stopColor:l}}),a().createElement("stop",{offset:"100%",className:"loading-circle-end stop-color-with-config",style:{stopColor:l}}))),a().createElement("circle",{cx:S,cy:S,r:y,stroke:"url(#grad1-"+m+")",strokeWidth:w,strokeDasharray:O,strokeDashoffset:O,fill:"none"}),a().createElement("circle",{cx:S,cy:S,r:y,stroke:"url(#grad2-"+m+")",strokeWidth:w,strokeDasharray:O,fill:"none"}),x?a().createElement("circle",{cx:2*S-w/2,cy:S,r:w/2,className:"loading-circle-filleted fill-color-with-config",style:{fill:l}}):null);case"arc":return a().createElement("svg",{viewBox:"0 0 "+A+" "+A},a().createElement("circle",{className:"arc-bg",cx:S,cy:S,r:y,strokeWidth:w,fill:"none"}),a().createElement("circle",o({className:"arc-line stroke-color-with-config",cx:S,cy:S,r:y,style:{stroke:l},strokeWidth:w,strokeDashoffset:.5*O,strokeDasharray:.5*O+" "+1.5*O,fill:"none"},x?{strokeLinecap:"round"}:{})));default:return null}var e}())}))}));const le=se;var ce=(0,i.forwardRef)((function(e,t){var n=Z(),r=$(),s=r.windowWidth,l=r.windowHeight,c=q("init"),u=c[0],d=c[1],h=q(""),p=h[0],v=h[1],m=(0,i.useRef)(null),g=(0,i.useRef)(null),y=(0,i.useRef)(null),b=(0,i.useRef)(0),w=e.style,C=e.className,x=e.status,E=void 0===x?"init":x,k=e.src,T=e.width,_=e.height,O=e.alt,S=void 0===O?"":O,A=e.fit,I=void 0===A?"cover":A,R=e.position,P=void 0===R?"center":R,M=e.radius,N=e.bordered,j=e.loadingArea,D=e.errorArea,L=e.showLoading,B=e.showError,F=e.animateDuration,H=void 0===F?200:F,U=e.retryTime,V=void 0===U?0:U,G=e.forceHttps,W=e.boxWidth,X=void 0===W?0:W,J=e.boxHeight,Q=void 0===J?0:J,K=e.topOverlap,ee=e.bottomOverlap,te=e.showImage,ne=void 0===te||te,re=e.staticLabel,oe=e.onChange,ae=e.onClick,se=e.onLoad,ce=e.onError,ue=e.onAutoRetry,fe=Boolean(I.indexOf("preview")>=0),de=X||s,he=Q||l,pe=(0,i.useMemo)((function(){var e,t={};return M&&(t.borderRadius="number"!=typeof(e=M)&&isNaN(Number(e))?e:e+"px"),fe||(t.objectFit=I,t.objectPosition=P),{alt:S,src:G?k.replace("http://","https://"):k,className:"image-content"+(N?" bordered":"")+" "+n,style:t}}),[S,N,I,G,fe,P,M,k,n]);function ve(){ye(!0)}function me(e){d(e),oe&&oe(e)}function ge(e){var t=m.current;t&&(t.children&&t.children.length?t.replaceChild(e,t.children[0]):t.appendChild(e))}function ye(e){if(ne&&!re){me("loading");var t=new Image;t.className=pe.className,Object.keys(pe.style).forEach((function(e){t.style[e]=pe.style[e]})),t.onload=function(e){g.current=t,me("loaded");var n=t.width,r=void 0===n?0:n,o=t.height,i="";if(fe){var a=r/(void 0===o?0:o),s=de/he;"preview-y"===I?as?(t.style.width=he*a+"px",t.style.height=he+"px",i="preview-overflow-x"):i="preview-fit-contain-x")}i&&t.classList.add(i),v(i?i+"-container":""),ge(t),se&&se(e,t)},t.onerror=function(t){e||b.current>=V?(me("error"),ge(document.createElement("div")),ce&&ce(t)):(b.current+=1,ue&&ue(t),ye())},z((function(){t.src=pe.src,t.alt=pe.alt}))}}return(0,i.useImperativeHandle)(t,(function(){return{dom:y.current,image:g.current,retry:ve}})),(0,i.useEffect)((function(){b.current=0,ye()}),[pe,T,_,ne,re]),a().createElement(Y,null,(function(e){var t=e.prefixCls;return a().createElement("div",{className:f(t+"-image all-border-box",{preview:fe},n,p,C),style:o({},fe?o({width:de,height:he},"preview-x"===I?{overflowX:"auto"}:{overflowY:"auto"}):{width:Number(T)||T,height:Number(_)||_},w||{}),ref:y},null!==ee?a().createElement("div",{className:"image-content image-bottom-overlap",style:{borderRadius:M}},ee||a().createElement("div",{className:"image-placeholder"})):null,a().createElement("div",{className:f("image-container",u,{animate:Boolean(H),"static-label":re}),style:ie({transitionDuration:H+"ms"}),onClick:ae,ref:m},re?a().createElement("img",pe):void 0),!L||"loading"!==E&&"loading"!==u?null:a().createElement("div",{className:"image-content image-loading-container",style:{borderRadius:M}},j||a().createElement("div",{className:"image-loading"},a().createElement(le,{type:"circle",className:"loading-icon",radius:8.5,stroke:3}))),!B||"error"!==E&&"error"!==u?null:a().createElement("div",{className:"image-content image-error-container",onClick:function(e){e.stopPropagation(),ve()},style:{borderRadius:M}},D||a().createElement("div",{className:"image-retry-load"},"重试")),K?a().createElement("div",{className:"image-content image-top-overlap",style:{borderRadius:M}},K):null)}))}));const ue=ce;function fe(e){var t=e.className,n=void 0===t?"":t,r=e.useCurrentColor,o=void 0===r||r,i=e.style;return a().createElement(Y,null,(function(e){var t=e.prefixCls;return a().createElement("svg",{className:t+"-icon "+t+"-icon-user-fill "+n,width:"1em",height:"1em",style:i,viewBox:"0 0 20 20",fill:o?"currentColor":"#000000",xmlns:"http://www.w3.org/2000/svg"},a().createElement("path",{d:"M12.5 10.833c2.301 0 5 1.786 5 5v2.5c0 .46-.373.834-.833.834H3.333a.833.833 0 01-.833-.834v-2.5c0-3.211 2.699-5 5-5h5zM10 1.25a4.167 4.167 0 110 8.333 4.167 4.167 0 010-8.333z",fill:o?"currentColor":"#000000"}))}))}var de=a().createContext({isGroup:!1,shape:"circle",size:"small"});const he=(0,i.forwardRef)((function(e,t){var n=e.style,r=void 0===n?{}:n,s=e.className,l=void 0===s?"":s,c=e.shape,u=void 0===c?"circle":c,d=e.size,h=void 0===d?"medium":d,p=e.zIndexOrder,v=void 0===p?"desc":p,m=e.children,g=(0,i.useContext)(W).prefixCls,y=a().Children.toArray(m),b=y.length,w=(0,i.useRef)(null);return(0,i.useImperativeHandle)(t,(function(){return{dom:w.current}})),a().createElement("div",{ref:w,style:r,className:f(l,g+"-avatar-group","group-"+h)},a().createElement(de.Provider,{value:{isGroup:!0,shape:u,size:h}},y.map((function(e,t){var n=(e||{}).props,r=o({zIndex:"asc"===v?t+1:b-t},n.style);return a().cloneElement(e,o({},n,{style:r}))}))))}));var pe;const ve=L((pe=ce,(0,i.forwardRef)((function(e,t){var n,r=(0,i.useContext)(W).prefixCls,s=(0,i.useContext)(de),l=s.shape,c=s.size,u=s.isGroup,d=e.shape,h=void 0===d?e.shape||(u?l:"circle"):d,p=e.size,v=void 0===p?e.size||(u?c:"small"):p,m=e.src,g=e.decoration,y=void 0===g?null:g,b=e.textAvatar,w=void 0===b?"":b,C=e.avatarStyle,x=void 0===C?{}:C,E=e.autoFixFontSize,k=void 0===E||E,T=e.autoFixFontOffset,_=void 0===T?2:T,O=e.avatarName,S=void 0===O?"":O,A=e.avatarDesc,I=void 0===A?"":A,R=e.children,P=void 0===R?null:R,M=e.renderInfo,N=void 0===M?null:M,j=e.className,D=void 0===j?"":j,L=e.style,B=void 0===L?{}:L,F=e.imageProps,H=void 0===F?{}:F,z=e.defaultOverLap,U=void 0===z?a().createElement(fe,{className:r+"-avatar-default"}):z,V=e.onClickDecoration,G=void 0===V?function(){}:V,X=e.onClick,Y=void 0===X?function(){}:X,J=(0,i.useRef)(null),q=(0,i.useRef)(null),Q=(0,i.useRef)(null),K=(0,i.useState)(1),Z=K[0],$=K[1];(0,i.useImperativeHandle)(t,(function(){return{dom:J.current}}));var ee=!P&&void 0!==m,te=!P&&!ee&&w,ne=!P&&!ee&&!te;return(0,i.useEffect)((function(){!function(){var e,t;if(te&&k&&q&&Q){var n=((null==(e=q.current)?void 0:e.getBoundingClientRect())||{}).width,r=void 0===n?0:n,o=((null==(t=Q.current)?void 0:t.getBoundingClientRect())||{}).width,i=void 0===o?0:o;if(0!==r&&0!==i){var a=r-2*_;i>a&&$(Z*(a/i))}}}()}),[w]),a().createElement("div",{ref:J,style:B,className:f(r+"-avatar-wrapper",D,v,h,{"with-info":Boolean(S)}),onClick:Y},a().createElement("div",{className:f(r+"-avatar",v,h,(n={},n[r+"-text-avatar"]=te,n[r+"-image-avatar"]=ee,n["default-overlap"]=ne,n)),style:x,ref:q},P,ne&&U,ee&&m&&a().createElement(pe,o({className:r+"-avatar-img",src:m},H)),te&&a().createElement("span",{className:r+"-avatar-text",ref:Q,style:{transform:"scale("+Z+")"}},w),y&&a().createElement("div",{className:r+"-avatar-decoration",onClick:G},y)),N,!N&&S&&a().createElement("div",{className:f(r+"-avatar-info")},a().createElement("div",{className:f(r+"-avatar-name")},S),I&&a().createElement("div",{className:f(r+"-avatar-desc")},I)))}))),{Group:he});var me={prefixCls:"xigua"},ge=(0,i.createContext)(me);function ye(e){var t=e.children,n=V(e,["children"]);return a().createElement(ge.Provider,{value:n},t)}var be=ge.Consumer,we=function(e){return a().createElement(be,null,(function(t){return a().createElement(X,o({},me,t),e.children)}))};const Ce=(0,i.forwardRef)((function(e,t){var n=(0,i.useRef)(null);return(0,i.useImperativeHandle)(t,(function(){return n.current})),a().createElement(we,null,a().createElement(ve.Group,o({},e,{ref:n})))})),xe=L((0,i.forwardRef)((function(e,t){var n=(0,i.useRef)(null);return(0,i.useImperativeHandle)(t,(function(){return n.current})),a().createElement(we,null,a().createElement(ve,o({},e,{ref:n})))})),{Group:Ce});var Ee=function(e){return e?"string"==typeof e?{normal:e,active:e,disabled:e}:e:null},ke=function(e){return e&&("string"==typeof e?e:Object.values(e).join("-"))},Te=(0,i.forwardRef)((function(e,t){var n=(0,i.useState)(!1),r=n[0],s=n[1],l=Z(),c=e.type,u=void 0===c?"primary":c,d=e.size,h=void 0===d?"large":d,p=e.inline,v=void 0!==p&&p,m=e.loading,g=void 0!==m&&m,y=e.disabled,b=void 0!==y&&y,w=e.shape,C=void 0===w?"semi":w,x=e.halfBorder,E=void 0!==x&&x,k=e.icon,T=e.showTextWhenLoading,_=void 0===T||T,O=e.needActive,S=void 0===O||O,A=e.style,I=void 0===A?{}:A,R=e.color,P=e.bgColor,M=e.borderColor,N=e.className,j=void 0===N?"":N,D=e.children,L=void 0===D?null:D,B=e.loadingIcon,F=e.onClick,H=void 0===F?function(){}:F,z=e.onClickDisabled,U=void 0===z?function(){}:z,V=(0,i.useRef)(null);(0,i.useImperativeHandle)(t,(function(){return{dom:V.current}}));var G=function(e){var t=e.color,n=e.bgColor,r=e.borderColor,o=e.isActive,a=e.disabled,s={active:o,disabled:a},l=["active","disabled"],c=(0,i.useMemo)((function(){var e=[t,n,r].map(Ee),o=e[0],i=e[1];return{color:o,borderColor:e[2],background:i}}),[t,n,r].map(ke));return{customColorStyle:(0,i.useMemo)((function(){var e={};return Object.entries(c).forEach((function(t){var n=t[0],r=t[1];if(r){var o=r.normal;l.forEach((function(e){s[e]&&r[e]&&(o=r[e])})),e[n]=o}})),e}),[c,o,a]),customColorClass:(0,i.useMemo)((function(){return c.borderColor?["has-custom-border"]:[]}),[ke(r)])}}({color:R,bgColor:P,borderColor:M,isActive:r,disabled:b}),W=G.customColorClass,X=G.customColorStyle,J=function(){!S||b||g||s(!0)},q=function(){s(!1)};return a().createElement(Y,null,(function(e){var t=e.prefixCls;return a().createElement("button",{type:"button",ref:V,style:o({},X,I),className:f.apply(void 0,[t+"-button",j,"type-"+u,"size-"+h,"is-"+C,l,{inline:v,disabled:b,loading:g,active:r,"half-border":E}].concat(W)),onTouchStart:J,onTouchEnd:q,onTouchCancel:q,onMouseDown:J,onMouseUp:q,onClick:b?U:H},a().createElement("div",{className:"btn-icon"},k,g&&(void 0===B?a().createElement(le,{svgKey:u,className:"loading-icon",radius:6,type:"circle"}):B)),(!g||g&&_)&&L?a().createElement("div",{className:f("btn-text",{"has-icon":g||k})},L):null)}))}));const _e=Te,Oe=(0,i.forwardRef)((function(e,t){var n=(0,i.useRef)(null);return(0,i.useImperativeHandle)(t,(function(){return n.current})),a().createElement(we,null,a().createElement(_e,o({},e,{ref:n})))}));var Se=(0,i.forwardRef)((function(e,t){var n=e.className,r=e.style,s=e.children,l=e.list,c=void 0===l?[]:l,u=e.animateDuration,d=void 0===u?500:u,h=e.animateDurationSlide,p=void 0===h?300:h,v=e.loop,m=void 0===v||v,g=e.autoPlay,y=void 0===g||g,b=e.swipeable,w=void 0===b||b,C=e.stayDuration,x=void 0===C?4e3:C,E=e.boxWidth,k=e.boxHeight,T=e.baseBoxWidth,_=e.baseBoxHeight,O=e.width,S=void 0===O?0:O,A=e.height,I=e.initialIndex,R=void 0===I?0:I,P=e.renderIndicator,M=e.indicatorPos,N=void 0===M?"center":M,j=e.indicatorVerticalPos,D=void 0===j?"left":j,L=e.indicatorOutside,B=e.showIndicator,F=void 0===B||B,H=e.hideSingleIndicator,U=void 0===H||H,V=e.indicatorClass,G=void 0===V?"":V,W=e.indicatorInverse,X=e.spaceBetween,q=void 0===X?0:X,$=e.offsetBetween,ee=void 0===$?0:$,te=e.currentIndex,ne=e.autoHeight,re=void 0!==ne&&ne,oe=e.percentToChange,ae=void 0===oe?.3:oe,se=e.distanceToChange,le=void 0===se?10:se,ce=e.speedToChange,ue=void 0===ce?200:ce,fe=e.vertical,de=e.lazyloadCount,he=e.inactiveScale,pe=void 0===he?1:he,ve=e.stopPropagation,me=void 0===ve||ve,ge=e.fakeItem,ye=void 0!==ge&&ge,be=e.onChange,we=e.onAfterChange,Ce=e.onTouchStart,xe=e.onTouchMove,Ee=e.onTouchEnd,ke=e.onTransitionStart,Te=e.onTransitionEnd,_e=e.stopTouchThreshold,Oe=void 0===_e?0:_e,Se=e.onTouchStopped,Ae=(0,i.useRef)(null),Ie=(0,i.useRef)(null),Re=(0,i.useRef)(null),Pe=(0,i.useRef)([]),Me=(0,i.useRef)(null),Ne=(0,i.useRef)(-1),je=(0,i.useRef)(0),De=(0,i.useRef)(!1),Le=(0,i.useState)(T||0),Be=Le[0],Fe=Le[1],He=(0,i.useState)(_||0),ze=He[0],Ue=He[1],Ve=(0,i.useState)(0),Ge=Ve[0],We=Ve[1],Xe=(0,i.useRef)(0),Ye=(0,i.useRef)(0),Je=(0,i.useRef)(null),qe=(0,i.useRef)(!1),Qe=(0,i.useState)("auto"),Ke=Qe[0],Ze=Qe[1],$e=Q(!1),et=$e[0],tt=$e[1],nt=$e[2],rt=Q(0),ot=rt[0],it=rt[1],at=rt[2],st=(0,i.useState)(!0),lt=st[0],ct=st[1],ut=Q(void 0!==te?te:R),ft=ut[0],dt=ut[1],ht=ut[2],pt=Q([]),vt=pt[0],mt=pt[1],gt=pt[2],yt=Q("left"),bt=yt[0],wt=yt[1],Ct=yt[2],xt=(0,i.useRef)(""),Et=(0,i.useRef)(-1),kt=function(){var e=[],t=!1;if(c&&c.length){var n=c;2===c.length&&ye&&(t=!0,n=c.concat(c)),e=n.map((function(e,t){return a().createElement(a().Fragment,null,a().createElement("img",{key:t,className:"carousel-item-img needsclick",src:e.src,alt:"",onClick:e.onClick}),e.text?a().createElement("div",{className:"carousel-item-text"},e.text):null)}))}else s&&"[object Array]"===Object.prototype.toString.call(s)?2===(e=s).length&&ye&&(t=!0,e=[].concat(e,e)):e=s?[s]:[];return{allChildren:e,fakeTwoChildren:t}}(),Tt=kt.allChildren,_t=kt.fakeTwoChildren,Ot=Tt.length,St=_t?2:Ot,At=(0,i.useMemo)((function(){for(var e=[],t=0;t0||Rt>0)&&!ye,Dt=en(ft),Lt=tn(lt),Bt=lt?"auto":"slide",Ft=void 0!==te,Ht=w&&!Ft&&Nt>0,zt=E||T,Ut=k||_,Vt=jt||!y||Ft||Nt<=0,Gt=(0,i.useMemo)((function(){return Math.max(0,Math.min(pe,1))}),[pe]),Wt=(0,i.useState)([]),Xt=Wt[0],Yt=Wt[1],Jt=Z(),qt=(0,i.useCallback)((function(e){Ct((function(t){return xt.current=t,e}))}),[]),Qt=(0,i.useRef)(on);(0,i.useEffect)((function(){Qt.current=on}),[on]);var Kt=(0,i.useCallback)((function(e){if(!(Ce&&Ce(e,St,en(dt.current))||tt.current)){De.current=!0,ln();var t=e.touches[0];Xe.current=t.clientX||0,Ye.current=t.clientY||0,Je.current=null,qe.current=!1,nt(!1),je.current=(new Date).getTime()}}),[St,Ce]),Zt=(0,i.useCallback)((function(e){!qe.current&&Math.abs(e)>Oe&&(qe.current=!0,Se&&Se(e>=0?-1:1))}),[Oe,Se]),$t=(0,i.useCallback)((function(e){if(!xe||!xe(e,St,en(dt.current)))if(me&&e.stopPropagation(),De.current&&!tt.current){var t=e.changedTouches[0],n=Math.max(0,t.clientX||0),r=t.clientY||0,o=n-Xe.current,i=r-Ye.current,a=Math.abs(o),s=Math.abs(i),l=fe?i:o;if(Ot<2)Zt(l);else{if(null===Je.current&&(Je.current=fe?s=0?"right":"left"),jt&&(0===dt.current&&l>0||dt.current===Ot-1&&l<0))return Zt(l),void at(0);var c=Nt;at(l>0?Math.min(c,l):Math.max(-1*c,l))}}else e.cancelable&&e.preventDefault()}),[St,jt,fe,Nt,me,xe,Zt]);function en(e){var t=-1===e?Ot-1:e===Ot?0:e;return _t?t%2:t}function tn(e){return e?d:p}function nn(e,t){rn(e,!0,t)}function rn(e,t,n){void 0===t&&(t=!0);var r=en(dt.current),o=e!==r?en(e):-1;t?qt("left"):e===dt.current?qt(it.current>0?"right":"left"):qt(""),nt(!0),ct(t),at(0),ht(e),je.current=0,ke&&ke(),setTimeout((function(){nt(!1),z((function(){var t;qt((t=dt.current)===Ot-1?"left":0===t?"right":"");var n=mt.current.slice(),i=!1;-1===e&&Ne.current>=0?(n[Ne.current]=0,i=!0,ht(Ot-1)):e===Ot&&Ne.current>=0&&(n[Ne.current]=0,i=!0,ht(0)),i&>(n),ct(!0),Te&&Te(),o>=0&&we&&we(o,r),z((function(){on()}))}))}),n?0:tn(t)),t&&qt("")}function on(){ln(),Vt||(Me.current=setTimeout((function(){rn(dt.current+1)}),x))}function an(){Ie.current&&(Fe(Ie.current.offsetWidth),Ue(Ie.current.offsetHeight)),function(){if(Re.current&&re&&!fe){var e=(Pe.current[en(dt.current)]||{}).offsetHeight||"auto";Ze(e)}}()}function sn(){an(),on()}function ln(){Me.current&&(clearTimeout(Me.current),Me.current=null)}function cn(){if(!jt){var e=dt.current,t=mt.current.slice(),n=Math.max(0,Nt);Tt.forEach((function(r,o){0===e&&"right"===wt.current&&o===Ot-1?(Ne.current=o,t[o]=-1*Ot*n):e===Ot-1&&"left"===wt.current&&0===o?(Ne.current=o,t[o]=Ot*n):e>=0&&er&&o>le||Math.abs(n)>ue;rn(ot>0&&i?ft-1:ot<0&&i?ft+1:ft,!1)}}function fn(){return{transitionProperty:et?"transform":"none",transitionDuration:et?Lt+"ms":"0ms"}}function dn(){var e=ie(fn()),t=Nt*Ot,n=ft*Nt*-1+ot+It,r=Nt>0?It:0,i=-1*t+(fe?ze:Be)-Rt,a=jt?Math.min(r,Math.max(i,n))-(Ot>1&&ft===Ot-1?q:0):n,s=Nt>0?a+"px":"-"+100*ft+"%";if(fe)return o({},e,ie({transform:"translateY("+s+") translateZ(0)"}),{width:"100%"});var l=ie({transform:"translateX("+s+") translateZ(0)"});return o({width:Math.max(0,t)||"auto",height:A},e,l)}function hn(e,t){var n=ft-e,r=n>0?1:-1,o=1-Gt,i=0;return Math.abs(n)>1?i=(r*(Math.abs(n)-1)-t)*o:(-1===n&&t>0||1===n&&t<0)&&(i=-1*t*o),"translate"+(fe?"Y":"X")+"("+100*i+"%)"}function pn(e){var t=.5,n=e-ft;0===n?t="right"===bt||""===bt&&"left"===xt.current?0:1:n<=-1?t=1:n>=1&&(t=0);var r=100*t+"%";return fe?"center "+r:r+" center"}function vn(e){var t=fn(),n=function(e){var t=e;return vt[t]>0?t=Ot:vt[t]<0&&(t=-1),t}(e),r=ot/Nt||0,i=function(e,t){var n=Gt;return e===ft-1&&"right"===bt||e===ft+1&&"left"===bt?n+(1-n)*Math.abs(t):e===ft?1-(1-n)*Math.abs(t):n}(n,r);return ie(o({},t,{transform:hn(n,r)+" scale("+i+")",transformOrigin:pn(n)}))}function mn(e,t){var n,r,i=q+It,a=fe?Ut:"100%",s=fe?"height":"width",l=fe?"paddingTop":"paddingLeft",c=fe?"paddingBottom":"paddingRight",u=fe?"translateY":"translateX",f=t?{}:{transform:u+"("+(vt[e]||0)+"px)"},d=Nt>0?((n={})[s]=Nt-q,n[l]=q,n.boxSizing="content-box",n):((r={})[s]=a,r[l]=i,r[c]=i,r.boxSizing="border-box",r.transform=u+"("+(e===ft?0:(e>ft?-1:1)*(i+It))+"px)",r),h=t?function(e){var t,n,r,i=fe?"bottom":"right",a=fe?"top":"left",s=fe?"Y":"X";return o(((t={position:"absolute"})[fe?"left":"top"]=0,t),e>=0?((n={})[a]=Nt>0?"100%":100*Ot+"%",n.transform="translate"+s+"("+100*(e-Ot)+"%)",n):((r={})[i]="100%",r.transform="translate"+s+"("+100*(e+1)+"%)",r))}(e):{};return t&&Nt<0&&delete h.transform,ie(o({},f,d,h))}function gn(e,t,n){return 1===Gt?e:a().createElement("div",{className:n+"-item-inner",style:vn(t)},e)}function yn(e){var t,i=e.prefixCls+"-carousel",s=Ge&&!Vt&&"ios"===Jt;return a().createElement(a().Fragment,null,s?a().createElement("div",{className:f(i+"-wrap",n),style:{height:Ge}}):null,a().createElement("div",{className:f(i+"-wrap",n),ref:Ae,style:s?{display:"none"}:{}},a().createElement("div",{className:i,onTouchEnd:un,onTouchCancel:un,ref:Ie,style:fe?o({height:Ut},r||{}):o({width:zt},Ke&&"auto"!==Ke?{height:Ke}:{},r||{})},a().createElement("div",{className:f(i+"-inner "+Bt,{vertical:fe}),style:dn(),ref:Re},Tt.map((function(e,t){var n=void 0===de||t>=ft-de&&t<=ft+de;return a().createElement("div",{key:t,className:f(i+"-item carousel-item",{vertical:fe}),style:mn(t),ref:function(e){Pe.current[t]=e}},n||vt[t]?gn(e,t,i):null)})),function(e){return Xt.map((function(t){return function(e,t,n){if(!ye||void 0===t)return null;var r="left"===n?t-Ot:t+Ot;return a().createElement("div",{key:""+t+r,className:f(e+"-item carousel-item fake-"+n,{vertical:fe}),style:mn(r,!0)},gn(Tt[t],r,e))}(e,t.index,t.side)}))}(i))),F&&(Ot>1||!U)?a().createElement("div",{className:f(i+"-indicator pos-"+N,(t={},t["vertical ver-pos-"+D]=fe,t),{inverse:void 0===W?L:W},{outside:L})},P?P(Dt,St,Et.current):At.map((function(e,t){return a().createElement("i",{key:t,className:"indicator "+G+" "+(t===Dt?"active":"")})}))):null))}return(0,i.useImperativeHandle)(t,(function(){return{dom:Ae.current,wrap:Ie.current,items:Pe.current,updateData:sn,changeIndex:nn}}),[sn,nn]),J(sn,[sn]),(0,i.useEffect)((function(){var e=function(){var e;"visible"===document.visibilityState?(We(0),Qt.current()):(ln(),We((null==(e=Ae.current)?void 0:e.offsetHeight)||0))};return document.addEventListener("visibilitychange",e),function(){document.removeEventListener("visibilitychange",e)}}),[]),(0,i.useEffect)((function(){le>0&&le<1&&console.warn("[Carousel Props Warning] The value of the prop `distanceToChange` is too small("+le+"). Do you meant to use the prop `percentToChange`?")}),[le]),(0,i.useEffect)((function(){fe&&!k&&console.warn("[Carousel Rendering Warning] When the prop `vertical` is specified and the prop `boxHeight` is not specified, you need to set a fixed `height` style for the outermost element.")}),[fe,k]),(0,i.useEffect)((function(){return Ie.current&&Ht&&(Ie.current.addEventListener("touchstart",Kt),Ie.current.addEventListener("touchmove",$t)),function(){Ie.current&&Ht&&(Ie.current.removeEventListener("touchstart",Kt),Ie.current.removeEventListener("touchmove",$t))}}),[Kt,$t,Ht]),(0,i.useEffect)((function(){return sn(),function(){ln()}}),[zt,Ut,Pt,Mt]),K((function(){void 0!==te&&rn(te)}),[te]),(0,i.useEffect)((function(){dt.current>=Tt.length?rn(Tt.length-1,!0,!0):dt.current<0&&rn(0,!0,!0)}),[Tt.length]),(0,i.useEffect)((function(){lt&&et?setTimeout((function(){cn()}),100):cn()}),[ft,bt,Nt,Ot]),(0,i.useEffect)((function(){z((function(){an()}))}),[Dt,re,Tt]),K((function(){"function"==typeof be&&be(Dt)}),[Dt]),(0,i.useEffect)((function(){return function(){Et.current=Dt}}),[Dt]),(0,i.useEffect)((function(){ye&&!et&&function(){var e=Xt.slice();if(Nt<=0)return 0===ft&&(e[0]={index:Ot-1,side:"left"}),ft===Ot-1&&(e[2]={index:0,side:"right"}),void Yt(e);(1===ft&&"right"===bt||0===ft&&"right"!==bt)&&(e[0]={index:Ot-1,side:"left"}),(0===ft&&"right"===bt||-1===ft)&&(e[1]={index:Ot-2,side:"left"}),(ft===Ot-2&&"left"===bt||ft===Ot-1&&"left"!==bt)&&(e[2]={index:0,side:"right"}),(ft===Ot-1&&"left"===bt||ft===Ot)&&(e[3]={index:1,side:"right"}),Yt(e)}()}),[et,ft,bt,Ot,Nt]),a().createElement(Y,null,yn)}));const Ae=Se,Ie=(0,i.forwardRef)((function(e,t){var n=(0,i.useRef)(null);return(0,i.useImperativeHandle)(t,(function(){return n.current})),a().createElement(we,null,a().createElement(Ae,o({},e,{ref:n})))}));var Re=a().createContext({isFromGroup:!1});function Pe(){return a().createElement("svg",{viewBox:"0 0 8 14",fill:"none",className:"arrow-icon-svg"},a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.594858 1.24219C0.399596 1.43745 0.399596 1.75403 0.594859 1.94929L5.59905 6.95348L0.636039 11.9165C0.440776 12.1118 0.440776 12.4283 0.636038 12.6236L0.989592 12.9771C1.18485 13.1724 1.50144 13.1724 1.6967 12.9771L7.35355 7.3203C7.5296 7.14425 7.54692 6.86959 7.40553 6.67413C7.38216 6.62774 7.35111 6.58423 7.31237 6.54549L1.65552 0.888634C1.46026 0.693372 1.14367 0.693372 0.948411 0.888634L0.594858 1.24219Z"}))}var Me=(0,i.forwardRef)((function(e,t){var n=e.className,r=void 0===n?"":n,o=e.style,s=e.icon,l=e.label,c=e.desc,u=e.text,d=e.children,h=e.showArrow,p=e.arrow,v=e.prepend,m=e.append,g=e.bordered,y=void 0===g||g,b=e.onClick,w=(0,i.useRef)(null);return(0,i.useImperativeHandle)(t,(function(){return{dom:w.current}})),a().createElement(Y,null,(function(e){var t=e.prefixCls;return a().createElement(Re.Consumer,null,(function(e){var n=e.isFromGroup;return a().createElement("div",{className:f(t+"-cell","all-border-box",{"without-group":!n},{bordered:y},r),style:o,ref:w,onClick:function(e){return b&&b(e)}},v,a().createElement("div",{className:f(t+"-cell-inner",{"has-desc":c})},s?a().createElement("div",{className:"cell-label-icon"},s):null,l||c?a().createElement("div",{className:"cell-label"},a().createElement("div",{className:"cell-title"},l),c?a().createElement("div",{className:"cell-desc"},c):null):null,a().createElement("div",{className:"cell-content "+(l||c?"has-label":"")},u?a().createElement("div",{className:"cell-text"},u):null,d),h?a().createElement("div",{className:"cell-arrow-icon"},p||a().createElement(Pe,null)):null),m)}))}))})),Ne=function(e){return(0,i.forwardRef)((function(t,n){var r=t.className,s=void 0===r?"":r,l=t.style,c=t.header,u=t.footer,d=t.bordered,h=void 0===d||d,p=t.options,v=t.children,m=t.onClick,g=(0,i.useRef)(null);function y(e){m&&m(e)}return(0,i.useImperativeHandle)(n,(function(){return{dom:g.current}})),a().createElement(Y,null,(function(t){var n=t.prefixCls;return a().createElement("div",{className:f(n+"-cell-group","all-border-box",s),ref:g,onClick:y,style:l},c?a().createElement("div",{className:"cell-group-header"},c):null,a().createElement("div",{className:f("cell-group-body",{bordered:h})},a().createElement(Re.Provider,{value:{isFromGroup:!0}},v,p&&p.map((function(t,n){return a().createElement(e,o({key:n},t))})))),u?a().createElement("div",{className:"cell-group-footer"},u):null)}))}))}(Me);const je=L(Me,{Group:Ne}),De=(0,i.forwardRef)((function(e,t){var n=(0,i.useRef)(null);return(0,i.useImperativeHandle)(t,(function(){return n.current})),a().createElement(we,null,a().createElement(je.Group,o({},e,{ref:n})))})),Le=L((0,i.forwardRef)((function(e,t){var n=(0,i.useRef)(null);return(0,i.useImperativeHandle)(t,(function(){return n.current})),a().createElement(we,null,a().createElement(je,o({},e,{ref:n})))})),{Group:De});var Be,Fe=a().createContext({isGroup:!1,shape:"circle",layout:"inline",disabled:!1,value:[],onChange:function(){}});function He(e){var t=e.className,n=void 0===t?"":t,r=e.useCurrentColor,o=void 0===r||r,i=e.style;return a().createElement(Y,null,(function(e){var t=e.prefixCls;return a().createElement("svg",{className:t+"-icon "+t+"-icon-circle-unchecked "+n,width:"1em",height:"1em",style:i,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},a().createElement("path",{d:"M10 19c-5 0-9-4-9-9s4-9 9-9 9 4 9 9-4 9-9 9zm0-17c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8z",fill:o?"currentColor":"#000000"}))}))}function ze(e){var t=e.className,n=void 0===t?"":t,r=e.useCurrentColor,o=void 0===r||r,i=e.style;return a().createElement(Y,null,(function(e){var t=e.prefixCls;return a().createElement("svg",{className:t+"-icon "+t+"-icon-circle-checked "+n,width:"1em",height:"1em",style:i,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},a().createElement("path",{d:"M10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm4.9 6.3L10 13.2s0 .1-.1.1l-.6.7c-.1.1-.2.1-.3.2-.1 0-.3 0-.4-.1l-.6-.7-.1-.1-2.8-2.4c-.2-.2-.2-.5-.1-.7l.6-.7c.2-.2.5-.2.7-.1l2.5 2.1L13.5 6c.2-.2.5-.2.7-.1l.7.6c.1.3.2.6 0 .8z",fillRule:"evenodd",clipRule:"evenodd",fill:o?"currentColor":"#000000"}))}))}function Ue(e){var t=e.className,n=void 0===t?"":t,r=e.useCurrentColor,o=void 0===r||r,i=e.style;return a().createElement(Y,null,(function(e){var t=e.prefixCls;return a().createElement("svg",{className:t+"-icon "+t+"-icon-circle-disabled "+n,width:"1em",height:"1em",style:i,viewBox:"0 0 20 20",fill:o?"currentColor":"#F7F8FA",xmlns:"http://www.w3.org/2000/svg"},a().createElement("path",{d:"M18.375 10a8.375 8.375 0 11-16.75 0 8.375 8.375 0 0116.75 0z",stroke:"#E5E6EB",strokeWidth:"1.25"}))}))}function Ve(e){var t=e.className,n=void 0===t?"":t,r=e.useCurrentColor,o=void 0===r||r,i=e.style;return a().createElement(Y,null,(function(e){var t=e.prefixCls;return a().createElement("svg",{className:t+"-icon "+t+"-icon-square-checked "+n,width:"1em",height:"1em",style:i,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},a().createElement("path",{d:"M16 2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-1.1 5.3L10 13.2s0 .1-.1.1l-.6.7c-.1.1-.2.1-.3.2-.1 0-.3 0-.4-.1l-.6-.7-.1-.1-2.8-2.4c-.2-.2-.2-.5-.1-.7l.6-.7c.2-.2.5-.2.7-.1l2.5 2.1L13.5 6c.2-.2.5-.2.7-.1l.7.6c.1.3.2.6 0 .8z",fill:o?"currentColor":"#000000"}))}))}function Ge(e){var t=e.className,n=void 0===t?"":t,r=e.useCurrentColor,o=void 0===r||r,i=e.style;return a().createElement(Y,null,(function(e){var t=e.prefixCls;return a().createElement("svg",{className:t+"-icon "+t+"-icon-square-unchecked "+n,width:"1em",height:"1em",style:i,fill:o?"currentColor":"#000000",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},a().createElement("path",{d:"M15.6 18H4.4C3.1 18 2 16.9 2 15.6V4.4C2 3.1 3.1 2 4.4 2h11.2C16.9 2 18 3.1 18 4.4v11.2c0 1.3-1.1 2.4-2.4 2.4zM4.4 3C3.6 3 3 3.6 3 4.4v11.2c0 .8.6 1.4 1.4 1.4h11.2c.8 0 1.4-.6 1.4-1.4V4.4c0-.8-.6-1.4-1.4-1.4H4.4z"}))}))}function We(e){var t=e.className,n=void 0===t?"":t,r=e.useCurrentColor,o=void 0===r||r,i=e.style;return a().createElement(Y,null,(function(e){var t=e.prefixCls;return a().createElement("svg",{className:t+"-icon "+t+"-icon-square-disabled "+n,width:"1em",height:"1em",style:i,viewBox:"0 0 20 20",fill:o?"currentColor":"#F7F8FA"},a().createElement("path",{stroke:"#E5E6EB",d:"M15.6 2.5H4.4c-1 0-1.9.8-1.9 1.9v11.2c0 1 .8 1.9 1.9 1.9h11.2c1 0 1.9-.8 1.9-1.9V4.4c0-1.1-.8-1.9-1.9-1.9z"}))}))}!function(e){e.NORMAL="normal",e.DISABLED="disabled",e.ACTIVE="active",e.ACTIVE_DISABLED="activeDisabled"}(Be||(Be={}));var Xe=function(e,t){var n=(0,i.useContext)(t),r=n.disabled,a=n.shape,s=n.layout,l=n.icons,c=n.value,u=n.onChange;return n.isGroup?o({disabled:r,shape:a,layout:s,icons:l},e,{checked:c.indexOf(e.value)>-1,onChange:function(t,n,r){u(t,n,r),e.onChange&&e.onChange(t,n,r)}}):e},Ye=(0,i.forwardRef)((function(e,t){var n=Xe(e,Fe),r=n.style,o=void 0===r?{}:r,s=n.className,l=void 0===s?"":s,c=n.children,u=void 0===c?null:c,d=n.label,h=void 0===d?"":d,p=n.layout,v=void 0===p?"inline":p,m=n.value,g=n.defaultCheck,y=void 0!==g&&g,b=n.disabled,w=void 0!==b&&b,C=n.shape,x=void 0===C?"circle":C,E=n.icons,k=n.isRadio,T=void 0!==k&&k,_=n.checked,O=n.onChange,S=void 0===O?function(){}:O,A=(0,i.useState)(void 0===_?y:_),I=A[0],R=A[1],P=(0,i.useState)(T?"radio":"checkbox")[0],M=(0,i.useRef)(null);(0,i.useImperativeHandle)(t,(function(){return{dom:M.current}})),(0,i.useEffect)((function(){void 0!==_&&R(Boolean(_))}),[_]);var N=function(){var e,t=I?w?Be.ACTIVE_DISABLED:Be.ACTIVE:w?Be.DISABLED:Be.NORMAL;return(e=E&&void 0!==E[t]?E[t]:null===E?null:function(e,t){return{circle:{normal:a().createElement(He,null),active:a().createElement(ze,null),disabled:a().createElement(Ue,null),activeDisabled:a().createElement(ze,null)},square:{normal:a().createElement(Ge,null),active:a().createElement(Ve,null),disabled:a().createElement(We,null),activeDisabled:a().createElement(Ve,null)},justify:{normal:a().createElement(He,null),active:a().createElement(ze,null),disabled:a().createElement(Ue,null),activeDisabled:a().createElement(ze,null)}}[e][t]}("justify"===v?"justify":x,t))?a().createElement("div",{className:f(P+"-icon",{disabled:w,checked:I})},e):null},j=function(e){w||T&&I||(S(!I,m,e),void 0===_&&R(!I))};return a().createElement(Y,null,(function(e){var t=e.prefixCls;return a().createElement("div",{ref:M,style:o,className:f(l,t+"-"+P,"shape-"+x,{disabled:w},v),onClick:j},"justify"!==v&&N(),a().createElement("div",{className:P+"-text"},u||h||m),"justify"===v&&N())}))})),Je=function(e){return(0,i.forwardRef)((function(t,n){var r=t.style,s=void 0===r?{}:r,l=t.className,c=void 0===l?"":l,u=t.defaultValue,d=void 0===u?[]:u,h=t.disabled,p=void 0!==h&&h,v=t.shape,m=void 0===v?"circle":v,g=t.options,y=t.icons,b=t.onChange,w=void 0===b?function(){}:b,C=t.value,x=t.children,E=void 0===x?null:x,k=t.layout,T=void 0===k?"inline":k,_=t.min,O=void 0===_?0:_,S=t.max,A=void 0===S?0:S,I=(0,i.useState)(C||d),R=I[0],P=I[1],M=(0,i.useRef)(null);(0,i.useImperativeHandle)(n,(function(){return{dom:M.current}})),(0,i.useEffect)((function(){C&&P(C)}),[C]);var N=function(e,t){if(!(!e&&R.length<=O||A&&e&&R.length>=A)){var n=e?[].concat(R,[t]):R.filter((function(e){return e!==t}));w(n),void 0===C&&P(n)}};return a().createElement(Y,null,(function(t){var n=t.prefixCls;return a().createElement("div",{ref:M,style:s,className:f(c,n+"-checkbox-group")},a().createElement(Fe.Provider,{value:{isGroup:!0,shape:m,layout:T,disabled:p,icons:y,value:R,onChange:N}},E,!E&&g&&g.map((function(t){return a().createElement(e,o({key:t.value},t))}))))}))}))}(Ye);const qe=L(Ye,{Group:Je}),Qe=(0,i.forwardRef)((function(e,t){var n=(0,i.useRef)(null);return(0,i.useImperativeHandle)(t,(function(){return n.current})),a().createElement(we,null,a().createElement(qe.Group,o({},e,{ref:n})))})),Ke=L((0,i.forwardRef)((function(e,t){var n=(0,i.useRef)(null);return(0,i.useImperativeHandle)(t,(function(){return n.current})),a().createElement(we,null,a().createElement(qe,o({},e,{ref:n})))})),{Group:Qe});function Ze(e){var t=e.className,n=void 0===t?"":t,r=e.useCurrentColor,o=void 0===r||r,i=e.style;return a().createElement(Y,null,(function(e){var t=e.prefixCls;return a().createElement("svg",{className:t+"-icon "+t+"-icon-arrow-down "+n,width:"1em",height:"1em",style:i,viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},a().createElement("path",{fill:o?"currentColor":"#000000",d:"M512 676.864l346.944-346.965a21.333 21.333 0 0130.187 0l30.165 30.186a21.333 21.333 0 010 30.166L542.166 767.36a42.667 42.667 0 01-60.331 0L104.704 390.25a21.333 21.333 0 010-30.165l30.165-30.186a21.333 21.333 0 0130.187 0L512 676.864z"}))}))}var $e=a().createContext({isGroup:!1,value:[],onCollapse:function(){}}),et=(0,i.forwardRef)((function(e,t){var n=e.header,r=void 0===n?"":n,o=e.icon,s=e.hideIcon,l=void 0!==s&&s,c=e.disabled,u=void 0!==c&&c,d=e.content,h=void 0===d?null:d,p=e.defaultActive,v=void 0!==p&&p,m=e.value,g=void 0===m?"":m,y=e.active,b=e.animationTimeout,w=e.animationFunction,C=e.className,x=void 0===C?"":C,E=e.style,k=void 0===E?{}:E,T=(0,i.useState)(v),_=T[0],O=T[1],S=Q(void 0===y?_:y),A=S[0],I=S[1],R=S[2],P=(0,i.useRef)(),M=(0,i.useRef)(null),N=(0,i.useRef)(null),j=function(e,t){var n=!1;return e.isGroup?(void 0!==y&&(n=y),e.value&&(n=e.value.includes(t))):n=A,n};return(0,i.useEffect)((function(){R(void 0===y?_:y)}),[y,_]),(0,i.useImperativeHandle)(t,(function(){return{dom:N.current,head:M.current}})),a().createElement(Y,null,(function(t){var n=t.prefixCls;return a().createElement($e.Consumer,null,(function(t){return a().createElement("div",{className:f(n+"-collapse-item",x,{disabled:u||t.disabled}),style:k,ref:N},a().createElement("div",{className:f(n+"-collapse-header"),ref:M,onClick:function(){return function(t,n){u||(e.onCollapse&&e.onCollapse(n),t.isGroup?t.onCollapse(g):O(!I.current))}(t,g)}},r,!l&&a().createElement("div",{className:f(n+"-collapse-icon")},o||a().createElement(Ze,{className:n+"-collapse-icon-arrow",style:{transform:"rotate("+(j(t,g)?"180deg":"0deg")+")"}}))),a().createElement("div",{className:f(n+"-collapse-content"),style:{height:j(t,g)?P.current+"px":0,transitionDuration:void 0!==b?b+"ms":void 0,transitionTimingFunction:w}},a().createElement("div",{className:f(n+"-collapse-content-container"),ref:function(e){var t,n;return P.current=null!=(t=null==e||null==(n=e.getBoundingClientRect())?void 0:n.height)?t:0}},h)))}))}))})),tt=function(e){return(0,i.forwardRef)((function(t,n){var r=t.items,s=void 0===r?[]:r,l=t.className,c=void 0===l?"":l,u=t.style,d=void 0===u?{}:u,h=t.defaultActiveItems,p=void 0===h?[]:h,v=t.useAccordion,m=void 0!==v&&v,g=t.disabled,y=void 0!==g&&g,b=t.children,w=(0,i.useState)([]),C=w[0],x=w[1],E=(0,i.useState)([]),k=E[0],T=E[1],_=(0,i.useState)([]),O=_[0],S=_[1],A=(0,i.useRef)(null),I=function(e){var t=e;return s.map((function(e){return t.indexOf(e.value)>-1}))},R=function(e){if(!y){if(t.onCollapse&&t.onCollapse(e),void 0!==t.activeItems)return x(I(t.activeItems)),void S(t.activeItems);if(b){var n=O.includes(e);S(n?O.filter((function(t){return t!==e})):m?[e]:[].concat(O,[e]))}else{var r=s.findIndex((function(t){return t.value===e}));if(r<0||s[r].disabled)return;var o=C.map((function(e,t){return t===r?!e:!m&&e}));x(o)}}};return(0,i.useEffect)((function(){x(I(p)),S(p)}),[]),(0,i.useEffect)((function(){T(void 0===t.activeItems?C:I(t.activeItems)),b&&t.activeItems&&S(t.activeItems)}),[t.activeItems,C]),(0,i.useImperativeHandle)(n,(function(){return{dom:A.current}})),a().createElement(Y,null,(function(t){var n=t.prefixCls;return a().createElement("div",{className:f(n+"-collapse-group",c),style:d,ref:A},a().createElement($e.Provider,{value:{isGroup:!0,onCollapse:R,disabled:y,value:b?O:void 0}},b||a().createElement(a().Fragment,null,s.map((function(t,n){var r=o({active:k[n],disabled:y||t.disabled,defaultActive:I(p)[n]},t);return a().createElement(e,o({key:t.value},r))})))))}))}))}(et);const nt=L(et,{Group:tt}),rt=(0,i.forwardRef)((function(e,t){var n=(0,i.useRef)(null);return(0,i.useImperativeHandle)(t,(function(){return n.current})),a().createElement(we,null,a().createElement(nt.Group,o({},e,{ref:n})))})),ot=L((0,i.forwardRef)((function(e,t){var n=(0,i.useRef)(null);return(0,i.useImperativeHandle)(t,(function(){return n.current})),a().createElement(we,null,a().createElement(nt,o({},e,{ref:n})))})),{Group:rt});var it=n(4318),at=n.n(it);function st(e){var t=(0,i.useState)(),n=t[0],r=t[1],o=e.children,a=e.getContainer;return(0,i.useEffect)((function(){r(a?a():document.body)}),[a]),n?at().createPortal(o,n):null}function lt(e,t){return lt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},lt(e,t)}function ct(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,lt(e,t)}function ut(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}n(5697);const ft=a().createContext(null);var dt="unmounted",ht="exited",pt="entering",vt="entered",mt="exiting",gt=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o=ht,r.appearStatus=pt):o=vt:o=t.unmountOnExit||t.mountOnEnter?dt:ht,r.state={status:o},r.nextCallback=null,r}ct(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===dt?{status:ht}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==pt&&n!==vt&&(t=pt):n!==pt&&n!==vt||(t=mt)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===pt?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===ht&&this.setState({status:dt})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[at().findDOMNode(this),r],i=o[0],a=o[1],s=this.getTimeouts(),l=r?s.appear:s.enter;e||n?(this.props.onEnter(i,a),this.safeSetState({status:pt},(function(){t.props.onEntering(i,a),t.onTransitionEnd(l,(function(){t.safeSetState({status:vt},(function(){t.props.onEntered(i,a)}))}))}))):this.safeSetState({status:vt},(function(){t.props.onEntered(i)}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:at().findDOMNode(this);t?(this.props.onExit(r),this.safeSetState({status:mt},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:ht},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:ht},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:at().findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=o[0],a=o[1];this.props.addEndListener(i,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===dt)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,V(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return a().createElement(ft.Provider,{value:null},"function"==typeof n?n(e,r):a().cloneElement(a().Children.only(n),r))},t}(a().Component);function yt(){}gt.contextType=ft,gt.propTypes={},gt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:yt,onEntering:yt,onEntered:yt,onExit:yt,onExiting:yt,onExited:yt},gt.UNMOUNTED=dt,gt.EXITED=ht,gt.ENTERING=pt,gt.ENTERED=vt,gt.EXITING=mt;const bt=gt;var wt=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"==typeof n.className?n.className=ut(n.className,r):n.setAttribute("class",ut(n.className&&n.className.baseVal||"",r)));var n,r}))},Ct=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o=0&&clearTimeout(K.current);var e,t=Z.current;t&&($.current=!0),t||o||M||fe("pre-mount"),o?(le(!0),z((function(){var e;ie(!0),e=function(){$.current=!1,fe(""),t&&g()},window.setTimeout(e,Math.max(de(_,"enter"),de(S,"enter")))}))):(ie(!1),K.current=(e=function(){$.current=!1,le(!1),t&&v(te.current||void 0),te.current=""},window.setTimeout(e,Math.max(de(_,"exit"),de(S,"exit"))))),Z.current=!0}),[o]),a().createElement(Y,null,pe)}));function Ot(e){return{open:Tt(e)}}const St=L(_t,Ot(_t));var At=(0,i.forwardRef)((function(e,t){var n=e.children,r=e.maskClass,s=e.contentClass,l=e.contentTransitionType,c=e.className,u=e.direction,d=void 0===u?"bottom":u,h=e.needBottomOffset,p=void 0!==h&&h,v=e.translateZ,m=void 0===v||v,g=e.maskTransitionTimeout,y=void 0===g?{enter:450,exit:240}:g,b=e.contentTransitionTimeout,w=void 0===b?{enter:450,exit:240}:b,C=V(e,["children","maskClass","contentClass","contentTransitionType","className","direction","needBottomOffset","translateZ","maskTransitionTimeout","contentTransitionTimeout"]),x=(0,i.useRef)(null);function E(e){var t=e.prefixCls+"-popup";return a().createElement(St,o({className:f(t,c),ref:x,maskClass:f(t+"-mask",{translateZ:m},r),contentTransitionType:l||"slide-from-"+d,contentClass:f(t+"-content",d,{"need-bottom-offset":p},{translateZ:m},s),maskTransitionTimeout:y,contentTransitionTimeout:w},C),n)}return(0,i.useImperativeHandle)(t,(function(){return x.current})),a().createElement(Y,null,E)}));function It(e){return{open:(t=e,Tt(t,"ARCO_POPUP"))};var t}const Rt=L(At,It(At));function Pt(e){var t,n=e.prefixCls,r=e.onValueChange,o=e.onPickerChange,i=e.children,s=e.itemHeight;function l(){var t=e.children,n=e.selectedValue,r=e.data;return n&&n.length?n:r?r.map((function(e){return e[0]&&e[0].value})):t?a().Children.map(t,(function(e){var t=a().Children.toArray(e.children||e.props.children);return t&&t[0]&&t[0].props.value})):[]}function c(e,t,n){var r=l().concat();r[e]=t,n&&n(r,e)}return a().createElement("div",{className:n+"-multi",style:{lineHeight:s+"px"}},(t=l(),a().Children.map(i,(function(e,n){return a().cloneElement(e,{onScrollChange:function(e){return function(e,t){c(t,e,o)}(e,n)},onValueChange:function(e){return function(e,t){c(t,e,r)}(e,n)},selectedValue:t[n]})}))))}function Mt(e){var t=e.prefixCls,n=e.style,r=e.data,s=e.clickable,l=e.itemHeight,c=e.wrapperHeight,u=e.selectedValue,d=e.onValueChange,h=e.disabled,p=e.hideEmptyCols,v=e.rows,m=void 0===v?5:v,g=q(""),y=g[0],b=g[1],w=(0,i.useState)(""),C=w[0],x=w[1],E=q(0),k=E[0],T=E[1],_=q(u),O=_[0],S=_[1],A=Q(0),I=A[0],R=A[1],P=A[2],M=(0,i.useRef)(0),N=(0,i.useRef)(0),j=(0,i.useRef)(0),D=(0,i.useRef)(0),L=(0,i.useRef)(!1),B=(0,i.useRef)(null),F=Math.max(m%2==0?m+1:m,3),H=(0,i.useMemo)((function(){return ie(o({transform:"translate3d(0px, "+(I||0)+"px, 0px)"},y?{transitionDuration:y}:{},{transitionTimingFunction:C,paddingBottom:(F-1)/2*l+"px",paddingTop:(F-1)/2*l+"px"}))}),[y,I,C,l,F]);function z(e){if(k!==e){T(e);var t=r[e]&&r[e].value;t!==O&&(S(t),d&&d(t))}}function U(e,t,n){void 0===t&&(t=0),void 0===n&&(n=function(){}),function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=function(){}),b(t?t+"ms":""),P(e),j.current&&clearTimeout(j.current),j.current=window.setTimeout((function(){b(""),n()}),t)}(-1*e*l,t,n)}function V(e,t){void 0===t&&(t=0),U(e,t,(function(){z(e)}))}var G=(0,i.useCallback)((function(e){if(!h){var t=e.touches[0].screenY;N.current=Number(new Date),L.current=!0,D.current=t,M.current=R.current}}),[h]),W=(0,i.useCallback)((function(e){if(!h&&L.current){e.cancelable&&e.preventDefault();var t=M.current,n=e.touches[0].screenY-D.current,o=t+n,i=-1*(r.length-1)*l;P(t>=0&&n>0||t<=i&&n<0?t+n/4:o)}}),[r.length,h,l]);function X(){var e=M.current;if(I!==e){L.current=!1;var t,n=Number(new Date),o=(r.length+F-1)*l,i=n-N.current,a=Math.abs(I-e);if(i<300&&a>30){var s=function(e,t,n,r,o){var i,a="noBounce",s=c/6,l=e-t,u=e+2*Math.abs(l)/n/.003*(l<0?-1:1);return u300?"strongBounce":"weekBounce",u=Math.max(r-s,r-i/5)):u>0&&(a=(i=u-0)>300?"strongBounce":"weekBounce",u=Math.min(0+s,0+i/5)),{destination:u,duration:{noBounce:2500,weekBounce:800,strongBounce:400}[a],bezier:{noBounce:"cubic-bezier(.17, .89, .45, 1)",weekBounce:"cubic-bezier(.25, .46, .45, .94)",strongBounce:"cubic-bezier(.25, .46, .45, .94)"}[a]}}(I,e,i,c-o),u=Math.max(0,Math.min(r.length-1,Math.round(-1*s.destination/l)));x(s.bezier),U(u,s.duration,(function(){z(u)}))}else t=r.length-1,V(Math.max(0,Math.min(t,Math.round(-1*I/l))),200)}}return(0,i.useEffect)((function(){return B.current&&(B.current.addEventListener("touchstart",G),B.current.addEventListener("touchmove",W)),function(){B.current&&(B.current.removeEventListener("touchstart",G),B.current.removeEventListener("touchmove",W))}}),[G,W]),(0,i.useLayoutEffect)((function(){if("selectedValue"in e){var t=r.findIndex((function(e){return e.value===u}));T(t),t>=0&&V(t)}}),[u,l,r]),!p||r&&r.length?a().createElement("div",{className:t+"-column"},a().createElement("div",{className:t+"-column-item-wrap",style:H,ref:B,onTouchEnd:X,onTouchCancel:X},r.map((function(e,r){var o,i=Math.abs(r-k);return a().createElement("div",{key:r+"_"+e.value,className:f(t+"-column-item",(o={selected:r===k},o["selected-neighbor-"+i]=i&&i<=Math.floor(F/2),o)),style:n,onClick:function(){s&&!h&&V(r,200)}},e.label)})))):null}function Nt(e){var t=e.prefixCls,n=e.itemStyle,r=e.cols,o=e.data,s=e.disabled,l=e.clickable,c=e.itemHeight,u=e.wrapperHeight,f=e.rows,d=e.hideEmptyCols,h=e.onPickerChange,p=void 0===h?function(){}:h,v=e.onValueChange,m=void 0===v?function(){}:v,g=e.selectedValue,y=void 0===g?[]:g,b=(0,i.useMemo)((function(){return function(){var e=H(o,(function(e,t){return e.value===y[t]})).map((function(e){return e.children})),t=r-e.length;if(t>0)for(var n=0;n=y})},m?m():h.map((function(e,t){return a().createElement("div",{key:t,className:f("dialog-footer-button",e.className,"system-"+n,{disabled:e.disabled}),onClick:function(t){return function(e,t){if(e.preventDefault(),e.stopPropagation(),!t.disabled){var n=t.onClick?t.onClick(e):null;n&&"boolean"!=typeof n?n&&n.then&&n.then((function(t){return!t&&l(e)})):!n&&l(e)}}(t,e)}},e.content)}))):null,M?a().createElement("span",null,M):null))}return(0,i.useImperativeHandle)(t,(function(){var e,t;return{dom:(null==(e=j.current)?void 0:e.dom)||null,mask:(null==(t=j.current)?void 0:t.mask)||null,content:D.current}}),[l]),a().createElement(Y,null,L)}));function rn(e){return{alert:(t=e,kt(t,$t,Kt)),confirm:en(e),open:tn(e)};var t}const on=L(nn,rn(nn));var an=(0,i.forwardRef)((function(e,t){var n=(0,i.useRef)(null);return(0,i.useImperativeHandle)(t,(function(){return n.current})),a().createElement(we,null,a().createElement(on,o({},e,{ref:n})))}));const sn=L(an,rn(an));function ln(e){var t=e.className,n=void 0===t?"":t,r=e.useCurrentColor,o=void 0===r||r,i=e.style;return a().createElement(Y,null,(function(e){var t=e.prefixCls;return a().createElement("svg",{className:t+"-icon "+t+"-icon-check "+n,width:"1em",height:"1em",style:i,viewBox:"0 0 20 20",fill:o?"currentColor":"#000000",xmlns:"http://www.w3.org/2000/svg"},a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.702 4.47a.5.5 0 00-.705.06L8.33 13.596 3.82 9.724a.5.5 0 00-.705.054l-.652.758a.5.5 0 00.054.706L7.361 15.4a.5.5 0 00.054.053l.526.445.22.188a.5.5 0 00.722-.047l8.641-10.218a.5.5 0 00-.059-.705l-.763-.645z",fill:o?"currentColor":"#000000"}))}))}const cn=(0,i.forwardRef)((function(e,t){var n=(0,i.useRef)(null),r=e.className,s=void 0===r?"":r,l=e.style,c=void 0===l?{}:l,u=e.options,d=void 0===u?[]:u,h=e.showDropdown,p=void 0!==h&&h,v=e.showMask,m=void 0===v||v,g=e.direction,y=void 0===g?"down":g,b=e.selectedValue,w=e.height,C=e.maxHeight,x=void 0===C?500:C,E=e.touchToClose,k=void 0===E||E,T=e.onOptionChange,_=void 0===T?function(){}:T,O=e.onOptionClick,S=void 0===O?function(){}:O,A=e.onCancel,I=e.getAnchorElement,R=e.isStopTouchEl,P=e.getStopTouchElements,M=e.getScrollContainer,N=void 0===M?function(){return be.current}:M,j=e.clickOtherToClose,D=void 0===j||j,L=e.dropdownAnimationTimeout,B=void 0===L?300:L,F=e.dropdownAnimationFunction,H=void 0===F?"cubic-bezier(0.32, 0.96, 0.6, 1)":F,z=e.maskAnimationTimeout,U=void 0===z?500:z,V=e.maskAnimationFunction,G=void 0===V?"cubic-bezier(0.32, 0.96, 0.6, 1)":V,W=e.mountOnEnter,X=void 0===W||W,J=e.unmountOnExit,q=void 0===J||J,Q=e.preventBodyScroll,K=void 0===Q||Q,Z=e.initialBodyOverflow,te=$(),ne=te.windowHeight,re=te.windowWidth,ae=(0,i.useState)({top:"",bottom:""}),se=ae[0],le=ae[1],ce=(0,i.useState)(0),ue=ce[0],fe=ce[1],de=(0,i.useState)(void 0===b?ue:b),he=de[0],pe=de[1],ve=(0,i.useState)("down"===y),me=ve[0],ge=ve[1],ye=(0,i.useRef)(0),be=(0,i.useRef)(null),we=(0,i.useRef)(null),Ce=(0,i.useRef)(null),xe=(0,i.useState)(0),Ee=xe[0],ke=xe[1],Te=function(e){var t;if(R)return R(e);for(var n=e,r=P?P():[null==(t=Ce.current)?void 0:t.parentElement],o=0;oa;c?(ye.current=l,le({top:a+"px",bottom:""})):(ye.current=ne-s,le({top:"",bottom:s+"px"})),ge(c)}}),[Ce,Ee,e.top,e.bottom,Boolean(I),y,ne]);var _e=(0,i.useCallback)((function(e){var t=be.current;if(e&&t){var n=e.target;t.contains(n)||Te(n)||A(),e.stopPropagation()}}),[Te,A]);return(0,i.useEffect)((function(){var e=p&&D,t=k?"touchstart":"click";return e&&document.addEventListener(t,_e),function(){e&&document.removeEventListener(t,_e)}}),[p,D,_e]),(0,i.useEffect)((function(){if(void 0!==w)ke(w);else{if(!we.current)return;ke(p?we.current.getBoundingClientRect().height:0)}}),[p,d.length,w]),(0,i.useImperativeHandle)(t,(function(){return{dom:n.current}})),a().createElement(Y,null,(function(t){var r=t.prefixCls;return a().createElement("div",{ref:Ce},(0,it.createPortal)(a().createElement(xt,{in:p,timeout:Math.max(B,U),onEnter:function(e){e.style.visibility="visible"},onExited:function(e){e.style.visibility="hidden"},mountOnEnter:X,unmountOnExit:q},a().createElement("div",{className:f(r+"-dropdown all-border-box",s,{"drop-up":!me}),ref:n,style:o({height:ye.current+"px",maxWidth:re+"px"},c,se)},a().createElement("div",{className:f(r+"-dropdown-options"),ref:be,style:ie({transform:Ee?"":me?"translateY(-100%)":"translateY(100%)",transition:"transform "+B+"ms "+H,overflow:Ee>x||w?"auto":"hidden",maxHeight:x+"px"})},a().createElement("div",{className:f(r+"-dropdown-options-container"),ref:we},e.children||d.map((function(e){return a().createElement("div",{className:f(r+"-dropdown-options-item",{disabled:e.disabled,selected:e.value===he}),key:e.value,onClick:function(t){return function(e,t){if(!t.disabled){var n=he;S(t.value,t);var r=void 0===b?t.value:b;fe(r),r!==n&&_(r,t),e.stopPropagation()}}(t,e)}},e.label,a().createElement(ln,{className:r+"-dropdown-options-item-icon"}))})),e.extraNode)),m&&a().createElement("div",{className:f(r+"-dropdown-mask",{"is-show":Ee}),style:{transition:"opacity "+U+"ms "+G}}))),document.body))}))})),un=(0,i.forwardRef)((function(e,t){var n=(0,i.useRef)(null);return(0,i.useImperativeHandle)(t,(function(){return n.current})),a().createElement(we,null,a().createElement(cn,o({},e,{ref:n})))}));function fn(e){return"string"==typeof e[0]}var dn=function(e,t){var n=[],r=[];if(t&&r.splice.apply(r,[0,0].concat(t)),fn(e))n.push(e.map((function(e,t){return{label:e,value:t,disabled:!1}}))),0===r.length&&r.push(n[0][0].value);else if(function(e){return"object"==typeof e[0]&&!l(e[0])}(e)){for(var i=e,a=0,s=function(){n.push(i.map((function(e){return o({},e,{disabled:e.disabled||!1})})));var e=void 0,t=r[a],s=i.findIndex((function(e){return e.value===t}));s>-1?e=i[s].children:(e=i[0].children,r[a]=i[0].value),a++,i=e};i;)s();if(n.length-1)return!0;n=n.parentNode}return!1}(e)||(null==t?void 0:t(e))||!1};return(0,i.useEffect)((function(){void 0!==e.showDropdown&&L(e.showDropdown)}),[e.showDropdown]),(0,i.useEffect)((function(){void 0!==e.selectIndex&&H(e.selectIndex)}),[e.selectIndex]),(0,i.useEffect)((function(){e.onSelectChange&&e.onSelectChange(F)}),[F]),(0,i.useImperativeHandle)(t,(function(){return{dom:V.current}})),a().createElement(Y,null,(function(t){var n,i=t.prefixCls;return a().createElement("div",{ref:V,className:f(i+"-dropdown-menu all-border-box "+(D?"show":""),r),style:l},a().createElement("div",{className:f(i+"-select"),ref:U},q.map((function(e,t){var n=v[t]||"";return a().createElement("div",{className:f(i+"-select-item",{"is-disabled":h[t],"is-selected":D&&F===t}),key:t,"data-idx":t,onClick:function(){var e;h[e=t]||(Number(e)===F?Q(!D,e):(H(e),D||Q(!0,e)),x&&x(e))}},n.length>0&&a().createElement("span",{className:f(i+"-select-item-tip")},n),a().createElement("div",{className:f(i+"-select-item-label")},a().createElement("div",{className:f(i+"-select-item-label-text")},e.label),b||a().createElement(hn,{className:f(i+"-select-item-icon",{"is-show":D&&F===t})})))})),a().createElement(cn,o({options:X[F]||[],showDropdown:D,selectedValue:J[F],top:(null==R?void 0:R.top)||(null==(n=G())?void 0:n.getBoundingClientRect().bottom),onOptionClick:function(t,n){return function(t,n){k(t,n,F);var r=[].concat(J);if(r[F]=t,!fn(u)){var o=r.length;r.splice(F+1,o-F-1)}N(void 0===y?r:y),C&&L(e.showDropdown||!1)}(t,n)},onOptionChange:function(e,t){return _(e,t,F)},onCancel:z},R||{},{isStopTouchEl:K}),I)))}))})),vn=(0,i.forwardRef)((function(e,t){var n=(0,i.useRef)(null);return(0,i.useImperativeHandle)(t,(function(){return n.current})),a().createElement(we,null,a().createElement(pn,o({},e,{ref:n})))}));var mn,gn=n(3096),yn=n.n(gn),bn="data-show-listened",wn=[],Cn={},xn={},En="function"==typeof IntersectionObserver;const kn=(0,i.forwardRef)((function(e,t){var n=e.className,r=e.style,o=e.getScrollContainer,s=e.throttle,l=void 0===s?300:s,c=e.listenResize,u=void 0===c||c,d=e.listenScroll,h=void 0===d||d,p=e.overflow,v=void 0!==p&&p,m=e.offset,g=void 0===m?0:m,y=e.threshold,b=void 0===y?0:y,w=e.once,C=void 0!==w&&w,x=e.children,E=void 0===x?null:x,k=e.disabled,O=void 0!==k&&k,S=e.onVisibleChange,A=(0,i.useRef)(null),I=(0,i.useRef)(null),R=(0,i.useRef)(null),P=(0,i.useRef)(!1),M=(0,i.useRef)(null),N=(0,i.useRef)(null),j=(0,i.useRef)(-1),D=(0,i.useRef)(Boolean(E));function L(e){var t=e.node,n=e.overflow,r=e.once,o=e.onVisibleChange,i=e.isVisible;if(t instanceof HTMLElement){var a=T(t),s=n&&-1===[t.ownerDocument,document,document.documentElement].indexOf(a)?function(e,t){var n=e.node,r=e.offset,o=e.threshold,i=_(t),a=i.top,s=i.height,l=window.innerHeight||document.documentElement.clientHeight,c=Math.max(a,0),u=Math.min(l,a+s)-c,f=_(n),d=f.top,h=f.height,p=d-c,v=Array.isArray(r)?r:[r,r],m=h*o;return p-v[1]+m<=u&&p+h+v[0]>=0+m}(e,a):function(e){var t=e.node,n=e.offset,r=e.threshold;if(!(t instanceof HTMLElement))return!1;if(!(t.offsetWidth||t.offsetHeight||t.getClientRects().length))return!1;var o=_(t),i=o.top,a=o.height,s=window.innerHeight||document.documentElement.clientHeight,l=a*r,c=Array.isArray(n)?n:[n,n];return i-c[1]+l<=s&&i+a+c[0]>=0+l}(e);s!==i.current&&F()&&o(s,t);var l=j.current;xn[l]||(xn[l]=[]),s&&!i.current&&r&&xn[l].push(e),i.current=s}}(0,i.useImperativeHandle)(t,(function(){return{dom:A.current}}));var B=(0,i.useCallback)((function(){var e=j.current,t=Cn[e]||[];t.forEach((function(e){return L(e)})),Cn[e]=t.filter((function(t){return-1===xn[e].indexOf(t)})),xn[e]=[]}),[]);function F(){return D.current&&A.current&&A.current.children.length}function H(e){var t,n=e[0].isIntersecting;n!==P.current&&F()&&S(n,A.current),n&&!P.current&&C&&A.current&&(null==(t=N.current)||t.unobserve(A.current)),P.current=n}return(0,i.useEffect)((function(){En?N.current&&A.current&&(O?N.current.unobserve(A.current):N.current.observe(A.current)):-1!==j.current&&M.current&&(O?-1!==Cn[j.current].findIndex((function(e){return e.node===A.current}))&&Cn[j.current].splice(0,1):Cn[j.current].push(M.current))}),[O]),(0,i.useEffect)((function(){D.current=Boolean(E)}),[E]),(0,i.useEffect)((function(){if(I.current=o?o():window,I.current){var e=wn.indexOf(I.current);-1===e?(wn.push(I.current),j.current=wn.length-1):j.current=e;var t=j.current;if(En){if(A.current){R.current=T(A.current);var n=R.current,r=-1===[A.current.ownerDocument,document,document.documentElement].indexOf(n),i=v?r?n:null:I.current===window?null:I.current,a=Array.isArray(g)?(g[0]||0)+"px 0px "+(g[1]||0)+"px":g+"px";N.current=new IntersectionObserver(H,{root:i,rootMargin:a,threshold:b}),!O&&N.current.observe(A.current)}}else{if(mn=B,l&&(mn=yn()(mn,l)),v){if(A.current){R.current=T(A.current);var s=R.current;if(s&&s instanceof HTMLElement&&"function"==typeof s.getAttribute){var c=1+Number(s.getAttribute(bn));Cn[t]||(Cn[t]=[]),1===c&&s.addEventListener("scroll",mn),s.setAttribute(bn,String(c))}}}else(!Cn[t]||0===Cn[t].length||Cn[t]&&Cn[t].every((function(e){return e.overflow})))&&(Cn[t]||(Cn[t]=[]),h&&I.current.addEventListener("scroll",mn),u&&I.current.addEventListener("resize",mn));M.current={node:A.current,isVisible:P,overflow:v,once:C,offset:g,threshold:b,onVisibleChange:S},!O&&Cn[t].push(M.current),z((function(){!O&&L(M.current)}))}}}),[]),(0,i.useEffect)((function(){return function(){if(En){var e;A.current&&(null==(e=N.current)||e.unobserve(A.current))}else{if(v){var t=R.current;if(t&&t instanceof HTMLElement&&"function"==typeof t.getAttribute){var n=Number(t.getAttribute(bn)||0)-1;0===n?t.removeEventListener("scroll",mn):t.setAttribute(bn,String(n))}}var r=j.current,o=Cn[r],i=o.indexOf(M.current);-1!==i&&o.splice(i,1),0===o.length&&(delete Cn[r],I.current&&(I.current.removeEventListener("scroll",mn),I.current.removeEventListener("resize",mn)))}}}),[]),a().createElement(Y,null,(function(e){var t=e.prefixCls;return a().createElement("div",{className:f(t+"-show-monitor",n),style:r,ref:A},E)}))})),Tn=(0,i.forwardRef)((function(e,t){var n=(0,i.useRef)(null);return(0,i.useImperativeHandle)(t,(function(){return n.current})),a().createElement(we,null,a().createElement(kn,o({},e,{ref:n})))})),_n=(0,i.forwardRef)((function(e,t){var n=(0,i.useRef)(null),r=(0,i.useState)(!e.lazyload&&e.showImage),s=r[0],l=r[1];(0,i.useImperativeHandle)(t,(function(){return n.current}));var c=(0,i.useCallback)((function(t){e.lazyload&&t&&l(!0)}),[e.lazyload]);return a().createElement(we,null,a().createElement(Tn,{once:!0,listenResize:!1,offset:e.offset||300,onVisibleChange:c},a().createElement(ue,o({},e,{showImage:s,ref:n}))))}));function On(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sn(){return Sn=Object.assign||function(e){for(var t=1;t=n.x.length?[t,n.x]:[n.x,t];return new e(r[0].map((function(e,t){return e+(void 0!==r[1][t]?r[1][t]:r[1][0])})))})),On(this,"operatorSub",(function(t){var r=(t=jn(t)).length>n.x.length?[t,n.x]:[n.x,t];return new e(r[0].map((function(e,t){return e-(void 0!==r[1][t]?r[1][t]:r[1][0])})))})),On(this,"operatorMul",(function(t){var r=(t=jn(t)).length>n.x.length?[t,n.x]:[n.x,t];return new e(r[0].map((function(e,t){return e*(void 0!==r[1][t]?r[1][t]:r[1][0])})))})),On(this,"operatorDiv",(function(t){var r=(t=jn(t)).length>n.x.length?[t,n.x]:[n.x,t];return new e(r[0].map((function(e,t){return e/(void 0!==r[1][t]?r[1][t]:r[1][0])})))})),this.x=jn(t)||[]}var t=e.prototype;return t.get=function(e){return this.x[e]},t.v=function(){return[].concat(this.x)},t.size=function(){return this.x.length},t.valueOf=function(){return this.x.valueOf()},t.toString=function(){return this.x.toString()},t.mul=function(e){if((e=this.convert(e)).length!==this.x.length)throw new Error("Can not process vector inner-product, input vector dim "+e.length+" don't match resource vector dim "+this.x.length);var t=0;return this.x.forEach((function(n,r){return t+=n+e[r]})),t},e}();function Ln(e,t){return"number"==typeof e?{R:e,I:0}:e.isComplex?e:{R:t,I:0}}var Bn=function(){function e(t,n){var r=this;void 0===n&&(n=0),On(this,"operatorAdd",(function(t){return t=Ln(t,0),new e(r.R+t.R,r.I+t.I)})),On(this,"operatorSub",(function(t){return t=Ln(t,0),new e(r.R-t.R,r.I-t.I)})),On(this,"operatorMul",(function(t){return t=Ln(t,1),new e(r.R*t.R-r.I*t.I,r.I*t.R+r.R*t.I)})),On(this,"operatorDiv",(function(t){t=Ln(t,1);var n=Math.pow(t.R,2)+Math.pow(t.I,2);return new e((r.R*t.R+r.I*t.I)/n,(r.I*t.R-r.R*t.I)/n)})),On(this,"operatorPow",(function(t){var n=r.z();if(0===n)return new e(0);var o=Math.acos(r.R/n)*t;return new e((n=Math.pow(n,t))*Math.cos(o),n*Math.sin(o))})),"number"==typeof t?(this.R=Number(t),this.I=Number(n)):t.isComplex&&(this.R=t.r(),this.I=t.i()),this.isComplex=!0}var t=e.prototype;return t.valueOf=function(){return this.R.valueOf()},t.toString=function(){return this.R.toFixed(3)+"+"+this.I.toFixed(3)+"i"},t.isNaN=function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){return isNaN(this.R)||isNaN(this.I)})),t.isReal=function(){return 0===this.I&&!this.isNaN()},t.inRangeR=function(e,t){return this.R<=t&&this.R>=e},t.inRangeI=function(e,t){return this.I<=t&&this.I>=e},t.setR=function(e){this.R=Number(e)},t.setI=function(e){this.I=Number(e)},t.r=function(){return this.R},t.i=function(){return this.I},t.z=function(){return Math.sqrt(Math.pow(this.R,2)+Math.pow(this.I,2))},t.theta=function(){var e=this.z();return Math.acos(this.R/e)},e}(),Fn=function(e,t){return e.operatorAdd?e.operatorAdd(t):e+t},Hn=function(e,t){return e.operatorSub?e.operatorSub(t):e-t},zn=function(e,t){return e.operatorMul?e.operatorMul(t):e*t},Un=function(e,t){return e.operatorDiv?e.operatorDiv(t):e/t},Vn=function(e,t){return e.operatorPow?e.operatorPow(t):Math.pow(e,t)},Gn=function(e,t){return e.operatorLessEqual?e.operatorLessEqual(t):t.operatorGreaterEqual?t.operatorGreaterEqual(e):e.operatorGreater?!e.operatorGreater(t):e<=t};function Wn(e){return e>=0?Math.sqrt(e):new Bn(0,Math.sqrt(-e))}var Xn=Math.sqrt(3),Yn=Math.pow(2,1/3),Jn=Wn(-1),qn=new Bn(0).operatorSub(Jn);function Qn(e,t,n,r){if(void 0===r&&(r=!0),t===n&&0===t)return Math.pow(e,Un(1,3));var o=function(e,t,n){var r=-3*t+3*n-1,o=-(2*t-n)/r,i=-9*Math.pow(t,2)+9*n*t+9*t-9*Math.pow(n,2),a=3*r,s=Yn*a,l=54*Math.pow(t,3)-243*e*Math.pow(t,2)-81*n*Math.pow(t,2)+162*Math.pow(t,2)-81*Math.pow(n,2)*t-162*e*t+486*e*n*t-81*n*t+54*Math.pow(n,3)-243*e*Math.pow(n,2)-27*e+162*e*n;return[4*Math.pow(i,3)+Math.pow(l,2),l,o,i,a,s]}(e,t,n),i=o[0],a=o[1],s=o[2],l=o[3],c=o[4],u=o[5],f=Vn(new Bn(Fn(Wn(i),a)),Un(1,3)),d=Fn(Hn(Un(f,u),Un(new Bn(zn(Yn,l)),zn(f,c))),s),h=[];return Gn(i,1e-12)?([d,Fn(Fn(Un(zn(Hn(zn(Jn,Xn),1),f),zn(2,u)),Un(zn(Fn(zn(Jn,Xn),1),l),zn(zn(f,u),Yn))),s),Fn(Fn(Un(zn(Hn(zn(qn,Xn),1),f),zn(2,u)),Un(zn(Fn(zn(qn,Xn),1),l),zn(zn(f,u),Yn))),s)].forEach((function(e){e.inRangeR(0,1)&&h.push(e.r())})),h.sort()):h.push(d.r()),r?h[0]:h}var Kn=function(e,t){return e.operatorAdd?e.operatorAdd(t):e+t},Zn=function(e,t){return e.operatorSub?e.operatorSub(t):e-t},$n=function(e,t){return e.operatorMul?e.operatorMul(t):e*t},er=function(e,t){return e.operatorDiv?e.operatorDiv(t):e/t};function tr(e,t,n){void 0===n&&(n="x");var r=e[0],o=e[1],i=e[2],a=e[3],s="x"===n?Qn(t,r,i):"y"===n?Qn(t,o,a):t,l=function(e,t){return Kn($n(Zn(t,e),s),e)},c=new Dn([0,0]),u=new Dn([r,o]),f=new Dn([i,a]),d=new Dn([1,1]),h=l(c,u),p=l(u,f),v=l(f,d),m=l(h,p),g=l(p,v),y=l(m,g),b=[h,m].map((function(e){return er(e,Kn(y,1e-9))})),w=b[0],C=b[1],x=[g,v].map((function(e){return er(Zn(e,y),Kn(Zn(d,y),1e-9))})),E=x[0],k=x[1];return[[].concat(w.v(),C.v()),[].concat(E.v(),k.v())]}function nr(e,t,n){return 3*e*n*Math.pow(1-n,2)+3*t*(1-n)*Math.pow(n,2)+Math.pow(n,3)}function rr(e,t,n){void 0===n&&(n="x");var r=e[0],o=e[1],i=e[2],a=e[3],s=0===t?0:1===t?1:"x"===n?Qn(t,r,i):"y"===n?Qn(t,o,a):t;return["x"===n?t:nr(r,i,s),"y"===n?t:nr(o,a,s)]}function or(e){return window.requestAnimationFrame?window.requestAnimationFrame(e):setTimeout(e,An)}function ir(e){return window.requestAnimationFrame?window.cancelAnimationFrame(e):clearTimeout(e,An)}var ar=function(){function e(e){var t=this;void 0===e&&(e={}),On(this,"setBounce",(function(e){!isNaN(e)&&(t.bouncing=Number(e))})),On(this,"setDamp",(function(e){void 0===e&&(e=0),!isNaN(e)&&(t.damp=Number(e))})),On(this,"setTransform",(function(e,n){if(void 0===e&&(e={}),void 0===n&&(n={}),t.fixedX&&e.translateX&&delete e.translateX,t.fixedY&&e.translateY&&delete e.translateY,n.merge){["translateX","translateY","scale"].forEach((function(n){void 0!==e[n]&&(t.transform[n]=parseFloat(e[n]))}));var r=e.transformOrigin;r instanceof Array&&2===r.length&&(t.transform.transformOrigin=r.map((function(e){return parseFloat(e)})))}else t.transform=Sn({},e);return n.silent||t.update(),t})),On(this,"on",(function(e,n){if(n&&"function"==typeof n){var r="on"+e[0].toUpperCase()+e.slice(1);t[r]?t[r]="onTransform"===r?function(){return n(Sn({},t.transform),{complete:!t.busy(),dirty:t.dirty()})}:n:console.warn("[Transform]Unsupport event:",e)}return t})),On(this,"restore",(function(e){if(!e){var n=t.transform;or((function(){t.onRestore(n)}))}t.dragMode===In?t.zoomTo(1,{fitEdge:!0}):t.setTransform({},{merge:!1,silent:e})})),On(this,"getTransform",(function(e){switch(e){case"css":return t.toCSS();case"style":return t.toStyle();default:return Sn({},t.transform)}})),On(this,"dirty",(function(){var e=t.transform,n=e.translateX,r=void 0===n?0:n,o=e.translateY,i=void 0===o?0:o,a=e.scale;return 0!==r||0!==i||1!==(void 0===a?1:a)})),On(this,"busy",(function(){return!t.disableContentTouch||t.cancelSwipe||t.animating})),On(this,"isTapStop",(function(){return t.isTapStopped})),On(this,"apply",(function(){if(t.dom){var e=t.toCSS();t.dom.style.transform=e.transform||"",t.dom.style.webkitTransform=e.transform||"",t.dom.style.transformOrigin=e.transformOrigin||"center center",t.dom.style.webkitTransformOrigin=e.transformOrigin||"center center"}t.onTransform(),t.timer=0})),On(this,"update",(function(){ir(t.timer),t.timer=or(t.apply),t.lastTransform=Sn({},t.transform)})),On(this,"cancel",(function(){ir(t.timer),t.transform=Sn({},t.lastTransform)})),On(this,"toTop",(function(){var e=t.transform.scale,n=void 0===e?1:e,r=t._remainToEdge(1,1)[1];return Math.round(Math.abs(r/n))})),On(this,"toBottom",(function(){var e=t.transform.scale,n=void 0===e?1:e,r=t._remainToEdge(1,-1)[1];return Math.round(Math.abs(r/n))})),On(this,"toLeft",(function(){var e=t.transform.scale,n=void 0===e?1:e,r=t._remainToEdge(1,1)[0];return Math.round(Math.abs(r/n))})),On(this,"toRight",(function(){var e=t.transform.scale,n=void 0===e?1:e,r=t._remainToEdge(-1,1)[0];return Math.round(Math.abs(r/n))})),On(this,"getOriginXY",(function(e){var n=e[0],r=e[1],o=t._getTransformedBounding(),i=o.left,a=o.top,s=t.transform.scale,l=void 0===s?1:s;return[(n-i)/l,(r-a)/l]})),On(this,"setScreenCenter",(function(e,n,r){var o=t.getOriginXY([e,n]),i=o[0],a=o[1];return t.setCenter(i,a,r)})),On(this,"setCenter",(function(e,n,r){var o=t.transform,i=t.fixedX,a=t.fixedY,s=t.boundingRect,l=t.viewport,c=o.translateX,u=void 0===c?0:c,f=o.translateY,d=void 0===f?0:f,h=o.scale,p=void 0===h?1:h,v=o.transformOrigin,m=s||l,g=m.top,y=m.bottom,b=m.left,w=m.right;if(v||(v=[(w-b)/2,(y-g)/2]),!i){var C=e-v[0];e=v[0]+C,o.translateX=u+C*(p-1)/p,v[0]=e}if(!a){var x=n-v[1];n=v[1]+x,o.translateY=d+x*(p-1)/p,v[1]=n}o.transformOrigin=v,r&&t.update()})),On(this,"zoomToScreenCenter",(function(e,n,r){void 0===r&&(r={});var o=n[0],i=n[1];t.setScreenCenter(o,i,!0),or((function(){return or((function(){t.zoomTo(e,Sn({fitEdge:!0},r))}))}))})),On(this,"zoomToCenter",(function(e,n,r){void 0===r&&(r={});var o=n[0],i=n[1];t.setCenter(o,i,!0),or((function(){return or((function(){t.zoomTo(e,Sn({fitEdge:!0},r))}))}))})),On(this,"zoomTo",(function(e,n){void 0===n&&(n={});var r=n,o=r.transition,i=void 0===o?"all":o,a=r.easingFunc,s=void 0===a?"ease-out":a,l=r.duration,c=void 0===l?0:l,u=r.silent,f=void 0===u||u,d=r.fitEdge,h=void 0!==d&&d,p=r.callback,v=t.maxScale,m=void 0===v?1:v,g=t.minScale,y=void 0===g?1:g,b=t.transform,w=b.scale,C=void 0===w?1:w,x=b.translateX,E=void 0===x?0:x,k=b.translateY,T=void 0===k?0:k,_=Math.max(Math.min(e,m),y),O=_/C;t.transform.scale=_,t.transform.translateX=E/O,t.transform.translateY=T/O,h&&t.fit(!1),t.dom&&c?(t.dom.style.transition=i+" "+c+"ms "+s,t.animating=!0,setTimeout((function(){t.dom.style.transition="",t.animating=!1,!f&&t.onZoomEnd(null,_),"function"==typeof p&&p(_)}),c)):"function"==typeof p&&p(_),t.update()})),On(this,"zoom",(function(e,n){void 0===e&&(e=1),void 0===n&&(n={});var r=t.transform.scale,o=void 0===r?1:r;t.zoomTo(o*e,n)})),On(this,"drag",(function(e,n,r,o,i){var a=t.transform,s=t.interActBound,l=t.fixedX,c=t.fixedY,u=t.bounceRateX,f=t.bounceRateY,d=a.translateX,h=void 0===d?0:d,p=a.translateY,v=void 0===p?0:p,m=a.scale,g=void 0===m?1:m;l&&(e=0),c&&(n=0);var y=t._remainToEdge(e,n,s),b=y[0],w=y[1],C=(b+e)*e>0,x=(w+n)*n>0,E=0,k=0,T=Math.abs(e)>Math.abs(n),_=T&&C||!T&&x;e&&(E=o?e:t._getDragV(e,b,C,r?u:0),t.transform.translateX=h+E/g),n&&(k=i?n:t._getDragV(n,w,x,r?f:0),t.transform.translateY=v+k/g);var O=[l?0:-b,c?0:-w];if(t.update(),t.interActBound){var S=s.left,A=s.right,I=s.top,R=s.bottom;t.interActBound={left:S+E,right:A+E,top:I+k,bottom:R+k}}return{toEdge:_,remain:O}})),On(this,"fit",(function(e,n,r){void 0===e&&(e=!0);var o=!1,i=t.transform,a=i.translateX,s=void 0===a?0:a,l=i.translateY,c=void 0===l?0:l,u=i.scale,f=void 0===u?1:u,d=t._outOfEdge(),h=d.outX,p=d.outY,v=d.outLeft,m=d.outRight,g=d.outTop,y=d.outBottom;return!n&&h&&(m&&(t.transform.translateX=s+m/f),v&&(t.transform.translateX=s+v/f),o=!0),!r&&p&&(y&&(t.transform.translateY=c+y/f),g&&(t.transform.translateY=c+g/f),o=!0),o&&e&&t.bounce(),t.update(),o})),On(this,"fitX",(function(e){return void 0===e&&(e=!0),t.fit(e,!1,!0)})),On(this,"fitY",(function(e){return void 0===e&&(e=!0),t.fit(e,!0,!1)})),On(this,"swipe",(function(e){if(t.damp){var n=Nn(e);if(isNaN(n))return;t.cancelSwipe&&t.cancelSwipe();var r=0,o=Math.ceil(n/t.damp),i=t.transform,a=i.translateX,s=void 0===a?0:a,l=i.translateY,c=void 0===l?0:l,u=i.scale,f=void 0===u?1:u,d=[].concat(t.cubic.scroll),h=[].concat(t.cubic.bounce);if(t.dom){var p=850,v=[null,d],m=0,g=0,y=0,b=[[0,[s*f,c*f]]],w=function(){m=0,t.cancelSwipe()},C=e[0]*o/2,x=e[1]*o/2,E=t.bounceRateX,k=t.bounceRateY,T=t._outOfEdge(),_=T.outX,O=T.outY,S=t.drag(C,x,!1,E,k).remain,A=t._outOfEdge(),I=A.outX,R=A.outY;(I||R)&&(v[1]=h);var P=.33*window.innerWidth,M=.33*window.innerHeight;if(t.swipeMode===Pn){t.cancel();var N=t._setSwipeBounceByAnimation(x,S[1],R,O,k,p,v[1],M),j=t._setSwipeBounceByAnimation(C,S[0],I,_,E,p,v[1],P),D=j.length>1,L=N.length>1;[j,N].forEach((function(e,t){return e.forEach((function(e){e[1]+=b[0][1][t];for(var n=0;n0?t.fitX(!1):(v[1]=[].concat(h),g=t._setSwipeBounce(C,S[0],E,e,"x",P))),R&&(O&&x*S[1]>0?t.fitY(!1):(v[1]=[].concat(h),y=t._setSwipeBounce(x,S[1],k,e,"y",M)))})),t.cancelSwipe=function(){r&&ir(r),m&&(g&&clearTimeout(g),y&&clearTimeout(y),clearTimeout(m),t._syncDom(),(g||y)&&t.fit(!1)),t.dom.style.transition="",t.cancelSwipe=null,t.onSwipeEnd(t.transform)}}else{var H=e[0]/o,z=e[1]/o;r=or((function e(){var n=(o-.5)*H,i=(o-.5)*z;t.drag(n,i),(o-=1)>0?(r=or(e),t.cancelSwipe=function(){r&&ir(r),t.cancelSwipe=null,t.onSwipeEnd(t.transform)}):(r=0,t.cancelSwipe())}))}}})),On(this,"bounce",(function(){var e=t.bouncing;e&&t.dom&&(t.dom.style.transition="all "+e+"ms cubic-bezier(.14, 1, .34, 1)",t.animating=!0,setTimeout((function(){t.animating=!1,t.dom.style.transition=""}),e))})),On(this,"touchStart",(function(e){if(t.disableContentTouch=!0,t.active&&!t.animating)if(t.scaling=!1,t.dragging=!1,t.cancelSwipe?(t.cancelSwipe(),t.isTapStopped=!0):t.dirty()||(t.useDomBoundary&&t.setBoundary(t.dom.getBoundingClientRect()),t.onSchedule()),e.touches.length>1){var n=t.transform.scale,r=void 0===n?1:n;t.disableContentTouch=!1;var o=t.getOriginXY([(e.touches[1].clientX+e.touches[0].clientX)/2,(e.touches[1].clientY+e.touches[0].clientY)/2]),i=o[0],a=o[1];t.pinchStartCenter=[i,a],t.setCenter(i,a),t.pinchStartLen=Nn([e.touches[1].clientX-e.touches[0].clientX,e.touches[1].clientY-e.touches[0].clientY]),t.scaling=!0,t.onZoomStart(e,r,t.pinchStartCenter)}else if(t.dragMode===In||t.dragMode===Rn&&t.dirty()){t.disableContentTouch=!1,t.dragStartTime=+new Date,t.lastDragStartTime=0;var s=e.touches&&e.touches[0]?e.touches[0].clientX:0,l=e.touches&&e.touches[0]?e.touches[0].clientY:0;t.dragStartV=[s,l],t.lastDragStartV=[],t.dragX=s,t.dragY=l}})),On(this,"touchMove",(function(e){if(!t.disableContentTouch){var n=e.changedTouches,r=void 0===n?[]:n;if(t.scaling){if(e.touches.length>1){var o=Nn([e.touches[1].clientX-e.touches[0].clientX,e.touches[1].clientY-e.touches[0].clientY]);t.zoom(o/t.pinchStartLen),t.pinchStartLen=o}}else{var i=r[0]?r[0].clientX:0,a=r[0]?r[0].clientY:0,s=i-t.dragX,l=a-t.dragY,c=t.drag(s,l,t.dragging).toEdge;t.dragX=i,t.dragY=a;var u=+new Date;u>t.dragStartTime+100&&(t.lastDragStartV=t.dragStartV,t.lastDragStartTime=t.dragStartTime,t.dragStartTime=u,t.dragStartV=[i,a]),t.dragging||(t.dragging=!0,c?t.disableContentTouch=!0:(t.onDragStart(e),t.interActBound=t._getTransformedBounding(!0)))}t.preventScroll&&e.preventDefault()}})),On(this,"touchEnd",(function(e){if(!t.disableContentTouch&&0===e.touches.length){var n=t.transform.scale,r=void 0===n?1:n;if(t.scaling)t.onZoomEnd(e,r,t.pinchStartCenter),r<1?t.restore():t.fit();else if(t.dragging){var o=+new Date-t.dragStartTime,i=t.dragStartV;o<50&&t.lastDragStartTime&&(o=+new Date-t.lastDragStartTime,i=t.lastDragStartV);var a=[e.changedTouches&&e.changedTouches[0]?e.changedTouches[0].clientX:0,e.changedTouches&&e.changedTouches[0]?e.changedTouches[0].clientY:0],s=[An*(a[0]-i[0])/o,An*(a[1]-i[1])/o];t.onDragEnd(e),Nn(s)>t.motionThreshold?t.swipe(s):t.fit()}or((function(){t.disableContentTouch=!0,t.pinchStartLen=0,t.interActBound=null,t.isTapStopped=!1}))}})),On(this,"_outOfEdge",(function(){var e=t._getTransformedBounding(),n=e.left,r=e.right,o=e.top,i=e.bottom,a=t.edges,s=a.left-n,l=a.right-r,c=a.top-o,u=a.bottom-i,f=s<0?s:0,d=l>0?l:0,h=c<0?c:0,p=u>0?u:0;return{outX:!(!f&&!d),outY:!(!h&&!p),outLeft:f,outRight:d,outTop:h,outBottom:p}})),On(this,"_remainToEdge",(function(e,n,r){var o=[0,0],i=t.edges,a=r||t._getTransformedBounding(),s=a.left,l=a.right,c=a.top,u=a.bottom,f=e>0?i.left:i.right,d=n>0?i.top:i.bottom,h=e>0?s:l,p=n>0?c:u;return o[0]=h-f,o[1]=p-d,o})),On(this,"_computeEdge",(function(){var e=t.viewport,n=e.left,r=e.right,o=e.top,i=e.bottom;if(t.boundingRect){var a=t.boundingRect,s=a.left,l=a.right,c=a.top,u=a.bottom;t.edges={left:Math.max(s,n),top:Math.max(c,o),right:Math.min(l,r),bottom:Math.min(u,i)}}else t.edges=Sn({},t.viewport)})),this.dom=null,this.useDomBoundary=!1,this.viewport={left:0,right:window.innerWidth,top:0,bottom:window.innerHeight},this.boundingRect=null,this.maxScale=2,this.minScale=.5,this.fixedX=!1,this.fixedY=!1,this.active=!0,this.preventScroll=!0,this.dragMode=Rn,this.swipeMode=Pn,this.transformMode=Mn,this.cubic={scroll:[.33,1,.66,1],bounce:[.17,1,.17,1]},this.transform={},this.onZoomStart=function(){},this.onZoomEnd=function(){},this.onDragStart=function(){},this.onDragEnd=function(){},this.onSwipeEnd=function(){},this.onTransform=function(){},this.onRestore=function(){},this.onSchedule=function(){},this.bouncing=300,this.bounceRateX=0,this.bounceRateY=0,this.damp=2,this.motionThreshold=10,this.config(e),this.disableContentTouch=!0,this.scaling=!1,this.pinchStartCenter=[],this.pinchStartLen=0,this.dragging=!1,this.dragX=0,this.dragY=0,this.dragStartTime=0,this.dragStartV=[0,0],this.edges={},this.timer=0,this.animating=!1,this.cancelSwipe=null,this.isTapStopped=!1,this.interActBound=null,this._computeEdge(),this.lastTransform={},this.animationStyleDom=null}var t=e.prototype;return t.enable=function(){return this.active=!0,this},t.disable=function(){return this.active=!1,this},t.config=function(e){void 0===e&&(e={});var t=e,n=t.viewport,r=t.dom,o=t.useDomBoundary,i=t.maxScale,a=t.minScale,s=t.fixedX,l=t.fixedY,c=t.bounceRateX,u=t.bounceRateY,f=t.active,d=t.preventScroll,h=t.transform,p=t.damp,v=t.dragMode,m=t.swipeMode,g=t.cubic,y=t.transformMode,b=t.motionThreshold,w=t.bounce,C=t.onZoomStart,x=t.onZoomEnd,E=t.onDragStart,k=t.onDragEnd,T=t.onSwipeEnd,_=t.onTransform,O=t.onRestore,S=t.onSchedule;return n&&this.setViewport(n),r&&this.setDom(r,o),i&&this.setMaxScale(i),a&&this.setMinScale(a),v&&this.setDragMode(v),m&&this.setSwipeMode(m),y&&this.setTransformMode(y),g&&this.setCubic(g),void 0!==b&&this.setMotionThreshold(b),void 0!==c&&this.setBounceRateX(c),void 0!==u&&this.setBounceRateY(u),void 0!==s&&this.setFixedX(s),void 0!==l&&this.setFixedY(l),void 0!==f&&(this.active=Boolean(f)),void 0!==d&&(this.preventScroll=Boolean(d)),h&&this.setTransform(h),void 0!==p&&this.setDamp(p),void 0!==w&&this.setBounce(w),this.on("transform",_).on("restore",O).on("schedule",S).on("zoomStart",C).on("zoomEnd",x).on("dragStart",E).on("dragEnd",k).on("swipeEnd",T),this},t.setDom=function(e,t){var n=this;return void 0===t&&(t=!0),e&&(this.useDomBoundary=t,this.dom!==e&&(this.removeDom(),this.dom=e,e.addEventListener("touchstart",this.touchStart),e.addEventListener("touchmove",this.touchMove),e.addEventListener("touchend",this.touchEnd),e.addEventListener("touchcancel",this.touchEnd),e.style.willChange="transform",e.style.transition="",e.style.transform="",e.style.webkitTransform="",e.style.transformOrigin="",e.style.webkitTransformOrigin="",this.transform={},this.lastTransform={},t&&or((function(){n.boundingRect||n.setBoundary(e.getBoundingClientRect())})))),this},t.setBoundary=function(e,t){void 0===t&&(t=!1);var n=t?this._getRawBounding(e):e,r=n.left,o=n.right,i=n.top,a=n.bottom;return this.boundingRect=Sn({},this.boundingRect||this.viewport,{left:r,right:o,top:i,bottom:a}),this._computeEdge(),this},t.removeDom=function(){return this.dom&&(this.dom.removeEventListener("touchstart",this.touchStart),this.dom.removeEventListener("touchmove",this.touchMove),this.dom.removeEventListener("touchend",this.touchEnd),this.dom.removeEventListener("touchcancel",this.touchEnd)),this},t.setMaxScale=function(e){return isNaN(e)||(this.maxScale=Math.max(Number(e),1)),this},t.setMinScale=function(e){return isNaN(e)||(this.minScale=Math.min(Number(e),1)),this},t.setMotionThreshold=function(e){return isNaN(e)||(this.motionThreshold=e),this},t.setCubic=function(e){for(var t in void 0===e&&(e={}),e)e[t]instanceof Array&&4===e[t].length&&(this.cubic[t]=e[t].map((function(e){return isNaN(Number(e))?Number(e):0})));return this},t.setDragMode=function(e){this.dragMode=e},t.setSwipeMode=function(e){this.swipeMode=e},t.setTransformMode=function(e){this.transformMode=e},t.setBounceRateX=function(e){return isNaN(e)||(this.bounceRateX=Math.min(Number(e),1)),this},t.setBounceRateY=function(e){return isNaN(e)||(this.bounceRateY=Math.min(Number(e),1)),this},t.setViewport=function(e){var t=this;void 0===e&&(e={});var n=!1;return["left","right","top","bottom"].forEach((function(r){var o=Number(e[r]);isNaN(o)||(t.viewport[r]=o,n=!0)})),n&&this._computeEdge(),this},t.setFixedX=function(e){if(this.fixedX=!!e,e){var t=this.transform.transformOrigin;if(t){var n=this.boundingRect||this.viewport,r=n.left,o=n.right;t[0]=(o-r)/2}this.setTransform({translateX:0},{merge:!0})}return this},t.setFixedY=function(e){if(this.fixedY=!!e,e){var t=this.transform.transformOrigin;if(t){var n=this.boundingRect||this.viewport,r=n.top,o=n.bottom;t[1]=(o-r)/2}this.setTransform({translateY:0},{merge:!0})}return this},t.toStyle=function(){var e=this.toCSS(),t=e.transform,n=e.transformOrigin,r="";return t&&(r+="transform: "+t),n&&(r+="transform-origin: "+n),r},t.toCSS=function(e){var t="",n="center";if(e||this.dirty()){var r=e||this.transform;if(this.transformMode===Mn){var o=this.transform.scale,i=void 0===o?1:o;["translateX","translateY"].forEach((function(e){void 0!==r[e]&&(t+=e+"("+r[e]*i+"px)")})),t+="scale("+i+")"}else if("scale-first"===this.transformMode)["scale","translateX","translateY"].forEach((function(e,n){var o=n?"px":"";void 0!==r[e]&&(t+=e+"("+r[e]+o+")")}));else{var a=r.scale,s=void 0===a?1:a,l=r.translateX,c=void 0===l?0:l,u=r.translateY;t="matrix("+s+", 0, 0, "+s+", "+c*s+", "+(void 0===u?0:u)*s+")"}}return this.transform.transformOrigin&&(n=this.transform.transformOrigin.map((function(e){return Math.round(e)+"px"})).join(" ")),{transform:t,transformOrigin:n}},t._getTransformedBounding=function(){var e=this.boundingRect,t=this.viewport,n=this.transform,r=e||t,o=r.left,i=r.top,a=r.right,s=r.bottom,l=n.scale,c=void 0===l?1:l,u=n.transformOrigin,f=void 0===u?[(a-o)/2,(s-i)/2]:u,d=n.translateX,h=void 0===d?0:d,p=n.translateY,v=void 0===p?0:p,m=f[0],g=f[1],y=(h-m)*c+m,b=(v-g)*c+g;return{left:o+y,right:o+y+(a-o)*c,top:i+b,bottom:i+b+(s-i)*c}},t._getRawBounding=function(e){var t=this.transform,n=e.left,r=e.top,o=e.right,i=e.bottom,a=t.scale,s=void 0===a?1:a,l=t.transformOrigin,c=void 0===l?[(o-n)/2,(i-r)/2]:l,u=t.translateX,f=void 0===u?0:u,d=t.translateY,h=void 0===d?0:d,p=c[0],v=c[1],m=(f-p)*s+p,g=(h-v)*s+v;return{left:n-m,right:n-m+(o-n)/s,top:r-g,bottom:r-g+(i-r)/s}},t._getDragV=function(e,t,n,r){var o=0,i=0;if(n)if(r){var a=t*e>0;o=a?e*r:(t+e)*r,i=a?o:-t+o}else i=-t;else i=e;return i},t._setSwipeBounceByAnimation=function(e,t,n,r,o,i,a,s){void 0===s&&(s=1/0);var l=[],c=e*t<0;if(n)if(r&&!c)l.push([i,t]);else{var u=c?e*o:(e-t)*o;Math.abs(u)>s&&(u*=Math.abs(s/u));var f=u+(c?0:t),d=rr(a,f/e,"y")[0],h=Math.floor(i*d);d>.1||l.push([h,f]),l.push([i,t])}else e=Math.min(Math.abs(e),Math.abs(t))*Math.abs(e)/e,l.push([i,e]);return l},t._setSwipeBounce=function(e,t,n,r,o,i){var a=this;void 0===o&&(o="x"),void 0===i&&(i=1/0);var s=e*t<0,l=s?e*n:(e-t)*n;Math.abs(l)>i&&(l*=Math.abs(i/l));var c=(l+(s?0:t))/e,u=0;return r((function(e,t){var n=rr(t[1],c,"y"),i=Math.max(Math.floor(n[0]*e/An),2)*An,s=e-i;u=setTimeout((function(){r((function(e,t){var n=1-s/e,r=0,i=function(){"x"===o?a.fitX(!1):"y"===o&&a.fitY(!1),a.dom&&(a.dom.style.transition="transform "+(s-r)+"ms cubic-bezier("+t[1].map((function(e){return e.toFixed(3)})).join(",")+")")};return n>0?(t=tr(t[1],n,"x"),i()):(n=An/e,r=An,t=tr(t[1],n,"x"),or(i)),{cubicBezier:t,swipeSpan:s}}))}),i)})),u},t._syncDom=function(){if(this.dom){var e=window.getComputedStyle(this.dom).getPropertyValue("transform").split(")")[0].split(", ").map((function(e){return parseFloat(e)})),t=e[3],n=void 0===t?1:t,r=e[4],o=void 0===r?0:r,i=e[5],a=void 0===i?0:i;this.setTransform({scale:n,translateX:Math.round(o)/n,translateY:Math.round(a)/n},{merge:!0})}},t._appendStyle=function(e){if(this.animationStyleDom){var t=this.animationStyleDom.firstChild;t&&this.animationStyleDom.removeChild(t)}else{var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");n.appendChild(r),r.type="text/css",this.animationStyleDom=r}this.animationStyleDom.styleSheet?this.animationStyleDom.styleSheet.cssText=e:this.animationStyleDom.appendChild(document.createTextNode(e))},t._appendAnimation=function(e,t,n){for(var r=this,o="__transformable_key_"+parseInt(1e16*(.5+.5*Math.random())).toString(16),i=[],a=0;a=0&&pWe&&s.height>Xe?(r&&r.length&&a.setCenter.apply(a,r),a.setFixedX(!1),a.setFixedY(!1)):s.height<=Xe?a.fixedY||(a.setFixedY(!0),a.bounce()):s.width<=We&&(a.fixedX||(a.setFixedX(!0),a.bounce()))}},minScale:Qe(e),maxScale:Ke(e)}),function(e){var t=he.current[e],n=null==t?void 0:t.dom;if((null==n?void 0:n.parentElement)&&(null==t?void 0:t.image)){var r=t.image.getBoundingClientRect(),o=n.parentElement.getBoundingClientRect();ve.current[e]&&ve.current[e].setBoundary({left:Math.min(r.left,o.left),right:Math.max(r.right,o.right),top:Math.min(r.top,o.top),bottom:Math.max(r.bottom,o.bottom)},!0)}}(e))}function qe(e){return Boolean(e&&!e.classList.contains("preview-fit-contain-y"))}function Qe(e){var t=void 0===e?Te.current:e,n=be.current[t];return n?D?D(n,t):.7:1}function Ke(e){var t=void 0===e?Te.current:e,n=be.current[t];if(!n)return 1;if(L)return L(n,t);var r=n.naturalWidth;return r>n.naturalHeight?r/We*5:Math.max(5,r/We)}function Ze(e){var t,n=void 0===e?Te.current:e;return null==(t=ve.current[n])||null==t.busy?void 0:t.busy()}function $e(){var e=ve.current[Te.current],t=null==e||null==e.toLeft?void 0:e.toLeft(),n=null==e||null==e.toRight?void 0:e.toRight();return{side:!t||!n,left:!t,right:!n}}function et(e){if(ne&&ne(e,Te.current))return!0;var t,n=e.touches;return we.current=e.touches&&e.touches[0]?e.touches[0].clientX:0,xe.current=!1,Ee.current=!1,1===n.length?(Se.current||(ke.current=!0),ge.current=window.setTimeout((function(){ke.current&&(ke.current=!1,xe.current=!0,q&&q(Te.current,be.current[Te.current],e))}),300)):ke.current=!1,(null==(t=ve.current[Te.current])||null==t.isTapStop?void 0:t.isTapStop())&&(xe.current=!0),Ze()?(Ce.current=$e().side,!Ce.current):void 0}function tt(e){if(xe.current=!0,ke.current=!1,ge.current&&clearTimeout(ge.current),re&&re(e,Te.current))return!0;var t=(e.changedTouches[0].clientX||0)-we.current;if(Ze()){var n=$e();return!Ce.current||!(n.left&&t>0||n.right&&t<0)}}function nt(e){if(oe&&oe(e,Te.current))return!0;var t,n=j&&_e.current>=((null==(t=ve.current[Te.current])||null==t.dirty?void 0:t.dirty())?6:3);return _e.current=0,ke.current=!1,ge.current&&clearTimeout(ge.current),n?(it(e),!0):!(!Ze()||$e().side)||void 0}function rt(e){xe.current||(me.current=window.setTimeout((function(){Ee.current||X&&X(Te.current,e)||it(e)}),300))}function ot(e){Ee.current=!0,me.current&&(clearTimeout(me.current),me.current=null);var t=Te.current;J&&J(t,e);var n=ve.current[t];if(n){var r=function(e){var t=Te.current,n=be.current[t];if(!n)return 1;var r=Ke(t);if(B)return B(e,r,n,t);var o=n.naturalWidth,i=n.naturalHeight,a=o>i?o/We*Xe/i:1,s=2;a>=2&&(s=Math.min(r,a));var l=Number(e.toFixed(3)),c=Number(s.toFixed(3));return l>=1&&l0),j=N[0],D=N[1],L=j?"transparent":"",B=(0,i.useState)({}),F=B[0],H=B[1];(0,i.useImperativeHandle)(t,(function(){return{navBar:M.current,dom:M.current}})),(0,i.useEffect)((function(){null==p||p(!j)}),[j]);var z=function(){!function(e){if(D(e<=A),P){var t=P(e);H(t)}}(R("scrollTop",O)||0)};function U(e){l&&l(e)}function V(e){d&&d(e)}return(0,i.useEffect)((function(){var e=A||P,t=I(O);return e&&t&&t.addEventListener("scroll",z,!1),function(){e&&t&&t.removeEventListener("scroll",z,!1)}}),[A,P,O]),a().createElement(Y,null,(function(e){var t,r,i=e.prefixCls;return a().createElement("div",{ref:M,className:f(y,i+"-nav-bar",(t={},t[i+"-nav-bar-fixed"]=x,t[i+"-nav-bar-float"]=!w,t[i+"-nav-bar-hide"]=j,t)),style:o({paddingTop:x&&_?_+"px":""},v||{},L?{background:L}:{})},a().createElement("div",{className:f(g,i+"-nav-bar-wrapper",(r={},r[i+"-nav-bar-wrapper-fixed"]=x,r[i+"-nav-bar-wrapper-border"]=k,r)),style:o({paddingTop:_?_+"px":""},F)},a().createElement("div",{className:i+"-nav-bar-inner all-border-box"},u?a().createElement("div",{className:i+"-nav-bar-left",onClick:U},u):null,n||a().createElement("div",{className:i+"-nav-bar-title"},a().createElement("div",{className:i+"-nav-bar-title-text"},s)),h?a().createElement("div",{className:i+"-nav-bar-right",onClick:V},h):null)))}))})),Ar=(0,i.forwardRef)((function(e,t){var n=(0,i.useRef)(null);return(0,i.useImperativeHandle)(t,(function(){return n.current})),a().createElement(we,null,a().createElement(Sr,o({},e,{ref:n})))}));function Ir(e){var t=e.className,n=void 0===t?"":t,r=e.useCurrentColor,o=void 0===r||r,i=e.style;return a().createElement(Y,null,(function(e){var t=e.prefixCls;return a().createElement("svg",{className:t+"-icon "+t+"-icon-close "+n,width:"1em",height:"1em",style:i,viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},a().createElement("path",{fill:o?"currentColor":"#000000",d:"M509.568 447.083L796.16 160.469a21.333 21.333 0 0130.165 0l30.166 30.166a21.333 21.333 0 010 30.186L569.899 507.435l286.613 286.592a21.333 21.333 0 010 30.165l-30.165 30.165a21.333 21.333 0 01-30.166 0L509.568 567.765 222.933 854.38a21.333 21.333 0 01-30.186 0l-30.166-30.166a21.333 21.333 0 010-30.165l286.614-286.613L162.603 220.8a21.333 21.333 0 010-30.187l30.165-30.165a21.333 21.333 0 0130.187 0l286.613 286.613z"}))}))}const Rr=(0,i.forwardRef)((function(e,t){var n=e.className,r=void 0===n?"":n,o=e.style,s=e.children,l=e.leftContent,c=e.rightContent,u=e.marquee,d=void 0===u?"overflow":u,h=e.closeable,p=void 0===h||h,v=e.closeIcon,m=void 0===v?a().createElement(Ir,null):v,g=e.wrapable,y=void 0===g||g,b=e.speed,w=void 0===b?50:b,C=e.delay,x=void 0===C?1e3:C,E=e.autoSetGradientStyle,k=void 0===E||E,T=e.onClick,_=e.onClose,O=(0,i.useRef)(null),A=(0,i.useRef)(null),I=(0,i.useRef)(null),R=(0,i.useRef)(null),P=(0,i.useState)(!1),M=P[0],N=P[1],j=(0,i.useMemo)((function(){var e=[];return"none"===d&&y||e.push("no-wrap"),"none"===d&&e.push(y?"wrapable":"ellipsis"),e}),[d,y]),D=(0,i.useMemo)((function(){if(!k)return{};var e,t=(null==o?void 0:o.backgroundColor)||(null==o?void 0:o.background),n=(e=String(t)||"")?B[e]?B[e]+"00":/^#[A-Fa-f0-9]{6}$/.test(e)?e+"00":/^rgb\(.*?\)$/.test(e)?e.replace(/rgb\((.*?)\)/,"rgba($1, 0)"):"":"";return n?{background:"linear-gradient(to right, "+t+", "+n+")"}:{}}),[o]);function L(){O.current&&S(O.current)}function F(e){e.stopPropagation(),null==_||_(e),L()}function H(){z((function(){setTimeout((function(){!function(){if(A.current&&I.current){var e=I.current,t="always"===d,n=A.current.offsetWidth,r=I.current.offsetWidth;if("overflow"===d&&n0){var b=g+h;i.left=Number(i.left)+b,i.arrowLeft+=b,i.adjustOffset=b}if(a-t.right0){var k=-(x+c);i.left=Number(i.left)+k,i.arrowLeft-=k,i.adjustOffset=k}if(E>0){var T=E+h;i.left=Number(i.left)+T,i.arrowLeft-=T,i.adjustOffset=T}}else if(-1!==A.indexOf("Left")){var _=Number(n.width)-t.width-(a-t.right);if(_>0){var O=-(_+c);i.left=Number(i.left)+O,i.arrowLeft-=O,i.adjustOffset=O}t.leftwindow.innerHeight&&(i.top=-(u+Number(i.height)),i.bottom=null,U("top"))}if("global"===y){var R=r.current;if(!R)return i;var N=R.getBoundingClientRect(),j=N.top,D=N.left,L=N.bottom;if(null!==i.left&&(i.left=i.left+D),null!==i.top&&(i.top=i.top+j),null!==i.bottom){var B=window.innerHeight||document.documentElement.clientHeight;i.bottom=B-(L-i.bottom)}}return i}({childRect:e,config:t}),i=n.adjustOffset,a=V(n,["adjustOffset"]),s=function(e,t){var n=e.arrowLeft,r=e.width||0,o=e.height||0,i=m/2,a=I.current.indexOf("top")>-1?i+o+"px":"-"+i+"px";return{x:I.current.indexOf("Left")>-1?n+i+"px":I.current.indexOf("Right")>-1?r-(n+i)+"px":r/2-t+"px",y:a}}(a,i);O(s),E(a)}(0,i.useEffect)((function(){R(s)}),[s]);var j=function(e){var t=e.popoverWidth,n=e.popoverHeight,r=e.childRect;N(r,{left:-(t-r.width-d),width:t,top:-(u+n),height:n,bottom:null,arrowLeft:0})},D=function(e){var t=e.popoverWidth,n=e.popoverHeight,r=e.childRect;N(r,{left:-(t-r.width)/2,width:t,top:-(u+n),height:n,bottom:null,arrowLeft:0})},L=function(e){var t=e.popoverWidth,n=e.popoverHeight;N(e.childRect,{left:-d,width:t,top:-(u+n),height:n,bottom:null,arrowLeft:0})},B=function(e){var t=e.popoverWidth,n=e.popoverHeight,r=e.childRect;N(r,{left:-(t-r.width-d),width:t,bottom:-(u+n),height:n,top:null,arrowLeft:0})},F=function(e){var t=e.popoverWidth,n=e.popoverHeight,r=e.childRect;N(r,{left:-(t-r.width)/2,width:t,bottom:-(u+n),height:n,top:null,arrowLeft:0})},H=function(e){var t=e.popoverWidth,n=e.popoverHeight;N(e.childRect,{left:-d,width:t,bottom:-(u+n),height:n,arrowLeft:0,top:null})},z=(0,i.useCallback)((function(){var e=t.current;if(e){var r=e.dom;if(r){var o=r.getBoundingClientRect(),i=o.width,a=o.height;if(0!==i&&0!==a){var s=n.current;if(s){var l={popoverWidth:i,popoverHeight:a,childRect:s.getBoundingClientRect()};switch(A){case"topRight":j(l);break;case"topCenter":D(l);break;case"topLeft":L(l);break;case"bottomRight":B(l);break;case"bottomCenter":F(l);break;case"bottomLeft":H(l)}}}}}}),[n,A,t,j,D,L,B,F,H]),U=function(e){if(-1===A.indexOf(e)){var t=A.replace(/top|bottom/,e);R(t),I.current=t}},G=(0,i.useCallback)((function(){var e=t.current;if(e){var n=e.dom;if(n){var r=n.getBoundingClientRect(),o=r.top,i=r.bottom;(-1!==A.indexOf("top")&&owindow.innerHeight)&&z()}}}),[A,t,z,P]);return{direction:A,position:x,isCalcPosition:k,arrowWidth:m,transformOrigin:_,computedChildAndPopoverOffset:z,resetPosition:function(){E(Dr),R(s)},onAdjustDirection:U,adjustVerticalDirection:G}},Hr=0,zr=!1,Ur=(0,i.forwardRef)((function(e,t){var n=e.className,r=void 0===n?"":n,o=e.innerPopoverClassName,s=void 0===o?"":o,l=e.style,u=void 0===l?{}:l,d=e.theme,h=void 0===d?"black":d,p=e.needShadow,v=void 0!==p&&p,m=e.content,g=void 0===m?"":m,y=e.transitionTimeout,b=void 0===y?300:y,w=e.minWidth,C=void 0===w?"10px":w,E=e.maxWidth,k=void 0===E?"90vw":E,T=e.transitionName,_=void 0===T?"fade":T,O=e.clickSelfToClose,S=void 0===O||O,A=e.touchSelfToClose,I=void 0===A?void 0!==e.touchToClose&&e.touchToClose:A,R=e.defaultVisible,P=void 0!==R&&R,M=e.visible,N=e.children,j=e.bordered,D=void 0===j?"white"===e.theme:j,L=e.showCloseIcon,B=void 0!==L&&L,F=e.textSuffix,H=void 0===F?null:F,z=e.mode,U=void 0===z?"follow":z,V=e.showMask,G=void 0===V||V,X=e.maskTransitionTimeout,Y=void 0===X?{enter:450,exit:240}:X,J=e.onChange,q=void 0===J?function(){}:J,Q=e.onClickCloseIcon,K=void 0===Q?function(){}:Q,Z=e.onClickTextSuffix,$=void 0===Z?function(){}:Z,ee=e.onClickMask,te=void 0===ee?function(){}:ee,ne=(0,i.useContext)(W).prefixCls,re=(0,i.useState)(!1),oe=re[0],ie=re[1],se=(0,i.useRef)(oe),le=(0,i.useRef)(null),ce=(0,i.useRef)(null),ue=(0,i.useRef)(null),fe=Fr(e,ue,ce,le),de=fe.direction,he=fe.position,pe=fe.isCalcPosition,ve=fe.transformOrigin,me=fe.computedChildAndPopoverOffset,ge=fe.arrowWidth,ye=fe.resetPosition,be=fe.adjustVerticalDirection,we=function(e){void 0===e&&(e=!0),e&&!pe||(q(e),void 0===M&&ie(e))},Ce=function(e,t,n,r,o,a){var s=e.clickOtherToClose,l=void 0===s||s,u=e.touchOtherToClose,f=void 0===u?void 0!==e.touchToClose&&e.touchToClose:u,d=e.duration,h=void 0===d?0:d,p=e.useAutoDirection,v=void 0===p||p,m=e.verticalScrollThrottle,g=void 0===m?100:m,y=e.getVerticalScrollContainer,b=void 0===y?function(){return document}:y,w=(0,i.useRef)(0),C=ae(c(v)?v.vertical:v,Br),E=function(e){o(!1),e&&e.preventDefault(),window.clearTimeout(w.current),w.current=0},k=(0,i.useMemo)((function(){return yn()(a,g)}),[a,g]);(0,i.useEffect)((function(){var e=b();return r.current&&e&&C&&e.addEventListener("scroll",k),function(){e&&e.removeEventListener("scroll",k)}}),[k,b,C,r]);var T=(0,i.useCallback)((function(){document.body.removeEventListener("click",_),document.body.removeEventListener("touchstart",O);var e=b();e&&(e.removeEventListener("scroll",k),e.removeEventListener("scroll",S))}),[k]),_=(0,i.useCallback)((function(e){var r;x(t.current,e.target)||x((null==(r=n.current)?void 0:r.dom)||null,e.target)||(e.stopPropagation(),E(e))}),[]),O=(0,i.useCallback)((function(e){var o,i,a,s;(null==(o=e.targetTouches[0])?void 0:o.target)&&t.current&&(null==(i=n.current)?void 0:i.dom)&&r.current&&(x(t.current,null==(a=e.targetTouches[0])?void 0:a.target)||x(n.current.dom,null==(s=e.targetTouches[0])?void 0:s.target)||(function(){clearTimeout(Hr);var e=function e(t){t.stopPropagation(),t.preventDefault(),document.body.removeEventListener("click",e),clearTimeout(Hr)};document.body.addEventListener("click",e),Hr=window.setTimeout((function(){document.body.removeEventListener("click",e)}),500)}(),E(e)))}),[]),S=(0,i.useCallback)((function(){r.current&&f&&E()}),[f]);return(0,i.useEffect)((function(){var e=b();return e&&f&&r.current&&e.addEventListener("scroll",S),function(){e&&e.removeEventListener("scroll",S)}}),[S,f]),{popoverDisappear:E,mayRemoveEventListenerOnBody:T,startCloseTimer:function(){0!==h&&(w.current=window.setTimeout((function(){o(!1),T()}),h))},mayAddEventOnBody:function(){if(f){document.body.addEventListener("touchstart",O);var e=b();e&&e.addEventListener("scroll",S)}else l&&document.body.addEventListener("click",_)}}}(e,le,ue,se,we,be),xe=Ce.popoverDisappear,Ee=Ce.mayAddEventOnBody,ke=Ce.startCloseTimer,Te=Ce.mayRemoveEventListenerOnBody;function _e(){oe&&me()}(0,i.useImperativeHandle)(t,(function(){var e;return{dom:le.current,innerPopoverDom:(null==(e=ue.current)?void 0:e.dom)||null,updatePosition:_e}})),(0,i.useEffect)((function(){return(P||M)&&ie(!0),function(){Te()}}),[]),(0,i.useEffect)((function(){void 0!==M&&ie(Boolean(M))}),[M]),(0,i.useEffect)((function(){oe&&se.current&&me()}),[oe,N,g,de]),(0,i.useEffect)((function(){oe&&(ke(),setTimeout(Ee,0),pe&&setTimeout((function(){me()}),0)),se.current=oe,zr=oe,oe||(Te(),setTimeout((function(){!se.current&&ye()}),("object"==typeof b?b.exit:b)||300))}),[oe]);var Oe=function(){return a().createElement(jr,{className:f(h+"-theme",s,{bordered:D}),ref:ue,direction:de,minWidth:C,maxWidth:k,position:he,arrowWidth:ge,transformOrigin:ve,needShadow:v,content:g,mode:U,showCloseIcon:B,textSuffix:H,onClickCloseIcon:K,onClickTextSuffix:$})};return a().createElement(a().Fragment,null,"global"===U&&G&&a().createElement(st,null,a().createElement(Et,{in:oe&&!pe,timeout:Y,type:"fade",mountOnEnter:!0,unmountOnExit:!0},a().createElement("div",{className:ne+"-popover-mask",onClick:te}))),a().createElement("div",{className:f(ne+"-popover",r,h+"-theme",U+"-mode",{bordered:D,"custom-content":"string"!=typeof g}),style:u,ref:le,onClick:function(){var e=se.current;e||zr?e&&S&&!I&&xe():we(!0)},onTouchStart:function(){I&&se.current&&xe()}},a().createElement(st,{getContainer:function(){return"global"===U?document.body:le.current}},oe&&pe&&Oe(),a().createElement(Et,{in:oe&&!pe,timeout:b,type:_,mountOnEnter:!0,unmountOnExit:!0},Oe())),a().createElement("div",{ref:ce,className:"popover-child-inner"},N)))})),Vr=function(e){return(0,i.forwardRef)((function(t,n){var r=t.menu,s=t.menuLayout,l=void 0===s?"vertical":s,c=t.onSelect,u=void 0===c?function(){}:c,d=t.onClickMenuItem,h=void 0===d?function(){}:d,p=t.className,v=void 0===p?"":p,m=t.useClickStatus,g=void 0!==m&&m,y=t.clickStatusDuration,b=void 0===y?300:y,w=t.clickSelfToClose,C=void 0===w||w,x=t.touchSelfToClose,E=void 0===x?void 0!==t.touchToClose&&t.touchToClose:x,k=t.defaultVisible,T=void 0!==k&&k,_=t.visible,O=t.onChange,S=V(t,["menu","menuLayout","onSelect","onClickMenuItem","className","useClickStatus","clickStatusDuration","clickSelfToClose","touchSelfToClose","defaultVisible","visible","onChange"]),A=(0,i.useContext)(W).prefixCls,I=(0,i.useState)(-1),R=I[0],P=I[1],M=(0,i.useRef)(0),N=(0,i.useMemo)((function(){return r.map((function(e){return"string"==typeof e?{text:e}:e}))}),[r]),j=(0,i.useState)(void 0===_?T:_),D=j[0],L=j[1];(0,i.useEffect)((function(){L(Boolean(_))}),[_]);var B=(0,i.useRef)(null);return(0,i.useImperativeHandle)(n,(function(){return B.current})),a().createElement(e,o({ref:B,visible:D,clickSelfToClose:C,touchSelfToClose:E,onChange:function(e){var t=function(){O&&"function"==typeof O&&O(e),void 0===_&&L(e)};!e&&g?window.setTimeout(t,b):t()}},S,{content:a().createElement("div",{className:f(A+"-popover-menu-content",l+"-menu")},N.map((function(e,t){var n="string"==typeof e.text?e.text:"menu_item_"+t,o=e.text,i=e.value,s=void 0===i?n:i,l=e.disabled,c=void 0!==l&&l,d=e.icon;return a().createElement("div",{className:f(A+"-popover-menu-item",{disabled:c,active:R===t}),key:s,onClick:function(){h&&h(s,r[t]),c||(u(s,r[t]),g&&(clearTimeout(M.current),P(t),M.current=window.setTimeout((function(){P(-1),M.current=0}),b)))}},d&&a().createElement("div",{className:f(A+"-popover-menu-icon")},d),a().createElement("div",{className:f(A+"-popover-menu-text")},o))}))),className:f(v,A+"-popover-menu")}))}))}(Ur);const Gr=L(Ur,{Menu:Vr}),Wr=(0,i.forwardRef)((function(e,t){var n=(0,i.useRef)(null);return(0,i.useImperativeHandle)(t,(function(){return n.current})),a().createElement(we,null,a().createElement(Gr.Menu,o({},e,{ref:n})))})),Xr=L((0,i.forwardRef)((function(e,t){var n=(0,i.useRef)(null);return(0,i.useImperativeHandle)(t,(function(){return n.current})),a().createElement(we,null,a().createElement(Gr,o({},e,{ref:n})))})),{Menu:Wr});var Yr=(0,i.forwardRef)((function(e,t){var n=(0,i.useRef)(null);return(0,i.useImperativeHandle)(t,(function(){return n.current})),a().createElement(we,null,a().createElement(Rt,o({},e,{ref:n})))}));const Jr=L(Yr,It(Yr)),qr=function(e){return a().createElement(we,null,a().createElement(st,e))};var Qr;!function(e){e[e.Static=0]="Static",e[e.Pulling=1]="Pulling",e[e.Loosing=2]="Loosing",e[e.Loading=3]="Loading",e[e.Finish=4]="Finish"}(Qr||(Qr={}));var Kr=n(2702),Zr=function(e){var t=e.onRefresh,n=e.loosingMinHeight,r=(0,i.useState)(Qr.Static),o=r[0],a=r[1],s=(0,i.useRef)(!1),l=(0,i.useRef)(null),c=(0,i.useRef)(null),u=(0,i.useState)(!1),f=u[0],d=u[1],h=(0,i.useMemo)((function(){var e,t;return null!=(e=null==(t=l.current)?void 0:t.getBoundingClientRect().height)?e:40}),[o]),p=(0,i.useMemo)((function(){return n||h}),[h,n]),v=(0,i.useCallback)((function(){return s.current=!0,Kr.Promise.all([null==t?void 0:t(),new Kr.Promise((function(e){setTimeout((function(){e()}),500)}))])}),[t]);return{status:o,setStatus:a,touching:f,setTouching:d,loadingRef:s,labelRef:l,domRef:c,loosingHeight:p,handleRefresh:v,tipsHeight:h}},$r=function(e){var t=e.domRef,n=e.handleTouchStart,r=e.handleTouchMove,o=e.handleTouchEnd;(0,i.useEffect)((function(){var e;return null==(e=t.current)||e.addEventListener("touchstart",n,{passive:!1}),function(){var e;null==(e=t.current)||e.removeEventListener("touchstart",n)}}),[r]),(0,i.useEffect)((function(){var e;return null==(e=t.current)||e.addEventListener("touchmove",r,{passive:!1}),function(){var e;null==(e=t.current)||e.removeEventListener("touchmove",r)}}),[r]),(0,i.useEffect)((function(){var e,n;return null==(e=t.current)||e.addEventListener("touchend",o),null==(n=t.current)||n.addEventListener("touchcancel",o),function(){var e,n;null==(e=t.current)||e.removeEventListener("touchend",o),null==(n=t.current)||n.removeEventListener("touchcancel",o)}}),[o])},eo=function(e){var t=e.allowPullWhenNotTop,n=e.domRef,r=(0,i.useMemo)((function(){var e,t,r;return null!=(e=null==(t=n.current)||null==(r=t.getBoundingClientRect())?void 0:r.height)?e:0}),[n.current]);return{ifShouldHandle:(0,i.useCallback)((function(){return n.current&&!(!t&&(n.current.scrollTop<0||n.current.scrollTop>n.current.scrollHeight-r))}),[r,t])}},to=(0,i.forwardRef)((function(e,t){var n,r=(0,i.useContext)(W).prefixCls,s=(0,i.useRef)(0),l=e.className,c=e.children,u=e.loadingText,d=void 0===u?a().createElement("div",{className:f(r+"-pull-refresh-label-text")},a().createElement(le,{type:"circle",radius:4}),a().createElement("span",null,"加载中...")):u,h=e.pullingText,p=void 0===h?a().createElement("div",{className:f(r+"-pull-refresh-label-text")},a().createElement("span",null,"下拉即可刷新")):h,v=e.finishText,m=void 0===v?a().createElement("div",{className:f(r+"-pull-refresh-label-text")},a().createElement("span",null,"刷新成功")):v,g=e.finishDelay,y=void 0===g?300:g,b=e.disabled,w=void 0!==b&&b,C=e.loosingMinHeight,x=e.useHideAsNestedScroll,E=void 0===x||x,k=e.allowPullWhenNotTop,T=void 0!==k&&k,_=e.onRefresh,O=(0,i.useRef)(0),S=(0,i.useRef)(Qr.Static),A=(0,i.useState)({}),I=A[0],R=A[1],P=(0,i.useState)(0),M=P[0],N=P[1],j=Zr({loosingMinHeight:C,onRefresh:_}),D=j.loadingRef,L=j.status,B=j.setStatus,F=j.labelRef,H=j.domRef,z=j.touching,U=j.setTouching,V=j.loosingHeight,G=j.tipsHeight,X=j.handleRefresh,Y=eo({domRef:H,allowPullWhenNotTop:T}).ifShouldHandle,q=(0,i.useMemo)((function(){if(null==H?void 0:H.current){var e,t=(null==(e=H.current)?void 0:e.getBoundingClientRect()).height;return[{height:t+"px"},{minHeight:t+1+"px"}]}return[{},{}]}),[null==H?void 0:H.current,M]),Q=q[0],K=q[1],Z=(0,i.useMemo)((function(){var e,t;return E&&!z&&L===Qr.Pulling&&(null!=(e=null==H||null==(t=H.current)?void 0:t.scrollTop)?e:0)>0||w?o({},I,{opacity:0}):I}),[I,E,z,w]),$=((n={})[Qr.Static]=p,n[Qr.Pulling]=p,n[Qr.Loading]=d,n[Qr.Finish]=m,n),ee=(0,i.useCallback)((function(e,t){void 0===t&&(t=function(){}),s.current===e&&R({position:"relative",height:"0px",top:0,transition:"height .45s"}),setTimeout((function(){s.current===e&&(H.current&&(H.current.style.overflow="auto"),B(Qr.Pulling),R({position:"absolute",top:"-"+G+"px",height:G+"px",transition:"height 0s"}),S.current=Qr.Static,D.current=!1,t())}),450)}),[G]),te=(0,i.useCallback)((function(){!w&&!D.current&&H.current&&Y()&&(U(!0),H.current&&0===H.current.scrollTop&&(H.current.scrollTop=1))}),[w,Y]),ne=function(){return new Promise((function(e){if(H.current){H.current.style.overflow="hidden";var t=(new Date).getTime();B(Qr.Loading),R({position:"relative",top:0,height:G+"px",transition:"height 0s"}),s.current=t,X().then((function(){$[Qr.Finish]?(B(Qr.Finish),setTimeout((function(){ee(t,e)}),y)):ee(t,e)}))}}))},re=(0,i.useCallback)((function(){w||D.current||!H.current||(U(!1),S.current===Qr.Loosing&&ne())}),[w,G]),oe=(0,i.useCallback)((function(){w||D.current||!H.current||setTimeout((function(){var e,t,n,r,o=-(null!=(e=null==(t=H.current)?void 0:t.scrollTop)?e:0)>V;o&&(O.current=null!=(n=null==(r=H.current)?void 0:r.scrollTop)?n:0),S.current=o?Qr.Loosing:Qr.Pulling}))}),[w,V]),ie=(0,i.useCallback)((function(){console.info("1",e),N((new Date).getTime())}),[]);return J(ie),(0,i.useImperativeHandle)(t,(function(){return{dom:H.current,refresh:ne,updateIOSHeight:ie}})),(0,i.useEffect)((function(){ee(s.current)}),[]),$r({domRef:H,handleTouchStart:te,handleTouchMove:oe,handleTouchEnd:re}),a().createElement("div",{className:f(r+"-pull-refresh all-border-box is-ios",l,{"is-disabled":w||!z&&E}),ref:H,style:Q},a().createElement("div",{className:f(r+"-pull-refresh-content-wrapper")},a().createElement("div",{className:f(r+"-pull-refresh-label-wrapper"),style:Z},a().createElement("div",{className:f(r+"-pull-refresh-label"),ref:F},$[L])),a().createElement("div",{className:f(r+"-pull-refresh-content"),style:K},c)))})),no=(0,i.forwardRef)((function(e,t){var n,r=(0,i.useContext)(W).prefixCls,o=e.className,s=e.children,l=e.loosingText,c=void 0===l?a().createElement("div",{className:f(r+"-pull-refresh-label-text")},a().createElement("span",null,"释放即可刷新")):l,u=e.loadingText,d=void 0===u?a().createElement("div",{className:f(r+"-pull-refresh-label-text")},a().createElement(le,{type:"circle",radius:4}),a().createElement("span",null,"加载中...")):u,h=e.pullingText,p=void 0===h?a().createElement("div",{className:f(r+"-pull-refresh-label-text")},a().createElement("span",null,"下拉即可刷新")):h,v=e.finishText,m=void 0===v?a().createElement("div",{className:f(r+"-pull-refresh-label-text")},a().createElement("span",null,"刷新成功")):v,g=e.finishDelay,y=void 0===g?300:g,b=e.loosingMinHeight,w=e.dampRate,C=void 0===w?4:w,x=e.disabled,E=void 0!==x&&x,k=e.useHideAsNestedScroll,T=void 0===k||k,_=e.onRefresh,O=e.allowPullWhenNotTop,S=void 0!==O&&O,A=(0,i.useState)({}),I=A[0],R=A[1],P=(0,i.useRef)(null),M=(0,i.useRef)(0),N=(0,i.useRef)(!1),j=Zr({loosingMinHeight:b,onRefresh:_}),D=j.loadingRef,L=j.status,B=j.setStatus,F=j.labelRef,H=j.domRef,U=j.touching,V=j.setTouching,G=j.loosingHeight,X=j.handleRefresh,Y=j.tipsHeight,J=eo({domRef:H,allowPullWhenNotTop:S}).ifShouldHandle,q=(0,i.useMemo)((function(){var e,t;return T&&!U&&L===Qr.Pulling&&(null!=(e=null==H||null==(t=H.current)?void 0:t.scrollTop)?e:0)>0?{opacity:0}:{}}),[T,U]),Q=((n={})[Qr.Static]=m,n[Qr.Pulling]=p,n[Qr.Loosing]=c||p,n[Qr.Loading]=d,n[Qr.Finish]=m,n),K=function(e,t,n){if(e<5){if(e<0)return void(M.current=0);if(0===t)return setTimeout((function(){R({transition:"all 0s"})})),void(M.current=0)}var r=function(e,t,n){return e>t?t+(e-t)/n:e}(e,G,C);M.current=r,R({transform:r?"translateY("+r+"px)":"",transition:"all "+t/1e3+"s"}),setTimeout((function(){null==n||n()}),t)},Z=function(e){void 0===e&&(e=function(){}),K(0,300,(function(){H.current&&H.current.scrollTop<0&&(H.current.scrollTop=0),D.current=!1,B(Qr.Static),e()}))},$=(0,i.useCallback)((function(e){if(!(E||P.current||D.current)&&H.current&&J()){V(!0),0===H.current.scrollTop&&(H.current.scrollTop=1);var t,n=e.touches[0],r=n.pageX,o=n.pageY;r&&o&&(P.current={start:null==(t=H.current)?void 0:t.scrollTop,x:r,y:o}),B(Qr.Pulling)}}),[E,J]),ee=function(){return new Promise((function(e){B(Qr.Loading),z((function(){K(Y,300),X().then((function(){Q[Qr.Finish]?(B(Qr.Finish),setTimeout((function(){Z(e)}),y)):Z(e)}))}))}))},te=(0,i.useCallback)((function(){(0!==M.current||J())&&(N.current=!1,V(!1),E||!P.current||D.current||(P.current=null,L===Qr.Loosing?ee():Z()))}),[E,L,Y,J]),ne=(0,i.useCallback)((function(e){if(N.current=!0,!E&&!D.current&&H.current&&P.current){var t=e.touches[0].pageY-P.current.y-P.current.start;0===M.current&&H.current.scrollTop>0||0===M.current&&t<0||(B((function(){return t>G?Qr.Loosing:Qr.Pulling})),K(t,0),e.stopPropagation(),e.cancelable&&e.preventDefault())}}),[E,G]);return(0,i.useEffect)((function(){var e,t=function(){N.current&&H.current&&(H.current.scrollTop<0||M.current)&&(H.current.scrollTop=0)};return null==(e=H.current)||e.addEventListener("scroll",t),function(){var e;null==(e=H.current)||e.removeEventListener("scroll",t)}}),[]),(0,i.useImperativeHandle)(t,(function(){return{dom:H.current,refresh:ee,updateIOSHeight:function(){console.warn('updateIOSHeight 仅在 type="ios" 时可用')}}})),$r({domRef:H,handleTouchStart:$,handleTouchMove:ne,handleTouchEnd:te}),a().createElement("div",{className:f(r+"-pull-refresh all-border-box is-android",o,{"is-disabled":(E||!U&&T)&&L!==Qr.Loading}),ref:H},a().createElement("div",{className:f(r+"-pull-refresh-place"),style:ie(I)},a().createElement("div",{className:f(r+"-pull-refresh-label"),ref:F,style:q},Q[L]),a().createElement("div",{className:f(r+"-pull-refresh-content",{"is-loading":[Qr.Loading,Qr.Finish].includes(L)})},s)))}));const ro=(0,i.forwardRef)((function(e,t){var n=e.type,r=e.children,i=V(e,["type","children"]),s=Z(),l="ios"===(n||s)?to:no;return a().createElement(l,o({},i,{ref:t}),r)})),oo=function(e){return a().createElement(we,null,a().createElement(ro,e))};var io=a().createContext({isGroup:!1,shape:"circle",layout:"inline",disabled:!1,value:[],onChange:function(){}}),ao=function(e){return(0,i.forwardRef)((function(t,n){var r=Xe(t,io),s=(0,i.useRef)(null);return(0,i.useImperativeHandle)(n,(function(){return s.current})),a().createElement(e,o({ref:s},r,{isRadio:!0}))}))}(qe),so=function(e){return(0,i.forwardRef)((function(t,n){var r=t.style,s=void 0===r?{}:r,l=t.className,c=void 0===l?"":l,u=t.defaultValue,d=t.disabled,h=void 0!==d&&d,p=t.shape,v=void 0===p?"circle":p,m=t.options,g=t.icons,y=t.onChange,b=void 0===y?function(){}:y,w=t.value,C=t.children,x=void 0===C?null:C,E=t.layout,k=void 0===E?"inline":E,T=(0,i.useState)(w||u),_=T[0],O=T[1],S=(0,i.useRef)(null);(0,i.useImperativeHandle)(n,(function(){return{dom:S.current}})),(0,i.useEffect)((function(){w&&O(w)}),[w]);var A=function(e,t){e&&(b(t),void 0===w&&O(t))};return a().createElement(Y,null,(function(t){var n=t.prefixCls;return a().createElement("div",{ref:S,style:s,className:f(c,n+"-radio-group")},a().createElement(io.Provider,{value:{isGroup:!0,shape:v,layout:k,disabled:h,icons:g,value:void 0===_?[]:[_],onChange:A}},x,!x&&m&&m.map((function(t){return a().createElement(e,o({key:t.value},t,{isRadio:!0}))}))))}))}))}(ao);const lo=L(ao,{Group:so}),co=(0,i.forwardRef)((function(e,t){var n=(0,i.useRef)(null);return(0,i.useImperativeHandle)(t,(function(){return n.current})),a().createElement(we,null,a().createElement(lo.Group,o({},e,{ref:n})))})),uo=L((0,i.forwardRef)((function(e,t){var n=(0,i.useRef)(null);return(0,i.useImperativeHandle)(t,(function(){return n.current})),a().createElement(we,null,a().createElement(lo,o({},e,{ref:n})))})),{Group:co});var fo;!function(e){e[e.Idle=0]="Idle",e[e.Start=1]="Start",e[e.Moving=2]="Moving"}(fo||(fo={}));var ho=function(e){return function(){return a().createElement("div",{className:e+"-slider-thumb"})}},po=(0,i.createContext)({className:"",style:{},disabled:!1,useRange:!1,useAnimation:!0,size:2,min:0,max:100,step:1,type:"horizontal",showTooltip:"auto",useMarkOnly:!1,showMarks:!1,prefixLabel:!1,suffixLabel:!1,draggableTrackOnly:!1,formatTooltip:function(e){return String(e)},onChange:function(){},onAfterChange:function(){},renderThumb:ho("")}),vo=function(e){var t=e.visible,n=e.content,r=e.children,o=(0,i.useContext)(W).prefixCls,s=void 0===o?"":o;return a().createElement("div",{className:s+"-slider-popover-wrapper"},a().createElement(Et,{in:t,timeout:300,type:"fade",mountOnEnter:!0},a().createElement("div",{className:s+"-slider-popover"+(n?"":" no-content")},a().createElement("div",{className:s+"-slider-popover-content"},n),a().createElement("div",{className:s+"-slider-popover-arrow"}))),r)};const mo=function(e){var t,n=e.className,r=e.value,s=e.style,l=e.isTouching,c=(0,i.useContext)(W).prefixCls,u=void 0===c?"":c,f=(0,i.useContext)(po),d=f.showTooltip,h=f.renderThumb,p=f.formatTooltip,v="never"===d,m=(0,i.useMemo)((function(){return p(r)}),[p,r]),g=(0,i.useMemo)((function(){return!v&&("always"===d||l)}),[d,l]),y="function"==typeof h?h(r):h;return t=v?y:a().createElement(vo,{visible:g,content:m},y),a().createElement("div",{className:u+"-slider-thumb-wrapper "+n,style:o({},s)},t)},go=function(e){var t=e.runTimeConfig,n=e.className,r=void 0===n?"":n,s=e.style,l=void 0===s?{}:s,c=(0,i.useContext)(W).prefixCls,u=void 0===c?"":c,d=(0,i.useContext)(po),h=d.type,p=d.showMarks,v=d.max,m=d.min,g=/^horizontal/g.test(h),y=(0,i.useCallback)((function(e){var t;return(t={})[g?"left":"bottom"]=(e-m)/(v-m)*100+"%",t}),[g,m,v]);return a().createElement("div",{className:u+"-slider-marks"},t.map((function(e){var t=e.value,n=e.label,i=e.activated;return a().createElement("div",{key:t,className:f(u+"-slider-marks-item",{"is-activated":i},r),style:o({},y(t),l)},p&&a().createElement("div",{className:u+"-slider-marks-item-label"},n))})))};var yo=(0,i.forwardRef)((function(e,t){var n=(0,i.useContext)(W).prefixCls,r=void 0===n?"":n,s=(0,i.useContext)(po),l=s.className,c=s.style,u=s.disabled,d=s.min,h=s.max,p=s.type,v=s.showTooltip,m=s.showMarks,g=(0,i.useRef)(null),y=(0,i.useRef)(null),b=(0,i.useRef)(null),w=(0,i.useRef)(null),C=(0,i.useState)(-1),x=C[0],E=C[1],k=/^horizontal/g.test(p);(0,i.useImperativeHandle)(t,(function(){return{dom:g.current}}),[]);var T=function(e){var t,n,r=e.commonIsTouching,o=(0,i.useContext)(po),s=o.value,l=o.min,c=o.max,u=o.onAfterChange,f=o.onChange,d=o.useMarkOnly,h=o.marks,p=o.useRange,v=null!=(t=null!=(n=null==o?void 0:o.value)?n:null==o?void 0:o.defaultValue)?t:l,m=(0,i.useState)(v),g=m[0],y=m[1],b=(0,i.useState)(!1),w=b[0],C=b[1],x=(0,i.useState)(!1),E=x[0],k=x[1],T=(0,i.useMemo)((function(){if(void 0===h)return[];var e;return e="number"==typeof h?Array((c-l)/h+1).fill("").map((function(e,t){return t*h})):Array.isArray(h)?h:Object.keys(h).map((function(e){return parseInt(e)})),[].concat(e).filter((function(e){return e<=c&&e>=l})).sort((function(e,t){return e>t?1:-1}))}),[h,c,l]),_=(0,i.useCallback)((function(e){if("number"==typeof g)return e<=g;var t=[].concat(g).sort((function(e,t){return e>t?1:-1})),n=t[0],r=t[1];return e>=n&&e<=r}),[g]),O=(0,i.useMemo)((function(){return T.map((function(e){var t=h&&!Array.isArray(h)&&h[String(e)]&&"number"!=typeof h?h[String(e)]:a().createElement("p",null,e);return{activated:_(e),value:e,label:t}}))}),[T,g,_,h]),S=(0,i.useCallback)((function(e){if(!d||void 0===h)return e;var t=function(e){var t;if(T.forEach((function(n,r){e>=n&&(t=r)})),void 0!==t){var n=t+1;return nt?1:-1}))}),[g]);return(0,i.useEffect)((function(){E&&r>-1&&f(I)}),[g]),(0,i.useEffect)((function(){if(E&&-1===r&&(u(S(I)),void 0===s)){var e=S(g);y(e)}}),[r,S]),{valueGroup:g,setValueGroup:y,firstRender:w,runTimeConfig:O,isMultiThumb:A}}({commonIsTouching:x}),_=T.firstRender,O=T.valueGroup,S=T.setValueGroup,A=T.runTimeConfig,I=T.isMultiThumb,R=(0,i.useCallback)((function(){var e,t,n=null!=(e=null==(t=b.current)?void 0:t.getBoundingClientRect())?e:{width:0,x:0,y:0,height:0},r=n.width,o=n.x,i=n.y,a=n.height;return{length:k?r:a,start:k?o:i}}),[k,_]),P=function(e){var t=e.getLinePosition,n=e.commonIsTouching,r=e.valueGroup,o=(0,i.useContext)(po),a=o.size,s=o.useAnimation,l=o.min,c=o.max,u=o.type,f=/^horizontal/g.test(u),d=(0,i.useMemo)((function(){var e;if(void 0===a)return{};var t="string"==typeof a?parseInt(a):a;return(e={})[f?"height":"width"]=t+"px",e}),[a,f]),h=(0,i.useMemo)((function(){return s&&-1===n?"is-transferable":""}),[n,s]),p=(0,i.useMemo)((function(){var e,n=t().length,o=0;if("number"==typeof r)n*=(r-l)/(c-l);else{var i=[].concat(r).sort((function(e,t){return e>t?1:-1})),a=i[0];n=(i[1]-l)/(c-l)*n-(o=(a-l)/(c-l)*n)}return(e={})[f?"left":"bottom"]=o+"px",e[f?"width":"height"]=Math.abs(n)+"px",e}),[r,t,l,c,f]);return{heightStyle:d,transitionClass:h,activeLineStyle:p}}({getLinePosition:R,commonIsTouching:x,valueGroup:O}),M=P.heightStyle,N=P.transitionClass,j=P.activeLineStyle;!function(e){var t=e.getLinePosition,n=e.lineRef,r=e.valueGroup,o=e.setValueGroup,a=e.setCommonIsTouching,s=(0,i.useContext)(po),l=s.disabled,c=s.step,u=s.min,f=s.max,d=s.type,h=s.draggableTrackOnly,p=(0,i.useState)(fo.Idle),v=p[0],m=p[1],g=(0,i.useState)(0),y=g[0],b=g[1],w=(0,i.useRef)({length:0,start:0}),C=/^horizontal/g.test(d),x=(0,i.useCallback)((function(e){return e>=u&&e<=f?e:e<=(u+f)/2?u:f}),[u,f]),E=(0,i.useCallback)((function(e){var t=w.current,n=t.length,r=t.start;if(0===n)return 0;var o=C?e-r:n-e+r;return o<0?o=0:o>n&&(o=n),x(Math.round(o/n*(f-u)/c)*c+u)}),[C,f,u]),k=(0,i.useMemo)((function(){var e=E(y);if(Array.isArray(r)){var t=Math.abs(r[0]-e)O[1-n]?r=e[0]:O[n]-(s||0),m="absolute"===b?0:d,g={};p&&(g={transform:"translateZ(0)",WebkitTransform:"translateZ(0)",position:"absolute"===b?"absolute":"fixed",zIndex:v,top:h>0?m+r:m+r+h,left:l.left,width:l.width}),null==T||T(Math.max(0,u.top-d-r)),I(p),B(g),p!==N.current&&k&&k({isSticky:p,wasSticky:N.current})}}),[U,L,r,s,c,v,b,k,T]);(0,i.useEffect)((function(){c&&console.warn("[Deprecation] StickyProps['relative'] is deprecated. Please use 'getScrollContainer' instead of 'getContainer' when 'relative=true', and remove the prop 'relative'.")}),[c]),(0,i.useEffect)((function(){var e=A(C);U.current=e||document.body;var t=function(e){if(!G.current){var t=e.currentTarget;E((function(){if(G.current=!1,U.current){var e=U.current.getBoundingClientRect(),n=e.top,r=e.bottom;W({distanceFromTop:n,distanceFromBottom:r,eventSource:t===window?document.body:U.current})}})),G.current=!0}},n=c?e:window,r=x?A(x):n;if(r)return V.current=r,r.addEventListener("scroll",t),function(){r.removeEventListener("scroll",t)}}),[C,x,r,W]),(0,i.useEffect)((function(){H.current&&(H.current.style.height=(S.current?z.current:0)+"px")}),[O,M,z]);var X=(0,i.useCallback)((function(){G.current||(E((function(){if(G.current=!1,U.current){var e=U.current.getBoundingClientRect(),t=e.top,n=e.bottom;W({distanceFromTop:t,distanceFromBottom:n,eventSource:document.body})}})),G.current=!0)}),[]);(0,i.useImperativeHandle)(t,(function(){return{dom:F.current,recalculatePosition:X}}),[X]);var J=(0,i.useMemo)((function(){return o({},h||{},L)}),[L,h]);function q(e){return a().createElement("div",{className:f(e+"-sticky",d),ref:F,style:J},u)}return a().createElement(Y,null,(function(e){var t=e.prefixCls;return a().createElement("div",null,a().createElement("div",{ref:H}),g&&O?a().createElement(st,{getContainer:w},q(t)):q(t))}))})),xo=(0,i.forwardRef)((function(e,t){var n=(0,i.useRef)(null);return(0,i.useImperativeHandle)(t,(function(){return n.current})),a().createElement(we,null,a().createElement(Co,o({},e,{ref:n})))})),Eo=(0,i.forwardRef)((function(e,t){var n=e.className,r=void 0===n?"":n,o=e.maxElementOffset,s=void 0===o?56:o,l=e.maxLabelOffset,c=void 0===l?40:l,u=e.onConfirm,d=e.disabled,h=void 0!==d&&d,p=e.circleSize,v=void 0===p?80:p,m=e.minConfirmOffset,g=void 0===m?30:m,y=e.labelAnimationFunction,b=void 0===y?"cubic-bezier(0.14, 1, 0.34, 1)":y,w=e.labelAnimationDuration,C=void 0===w?250:w,x=e.children,E=e.normalText,k=void 0===E?"更多":E,T=e.activeText,_=void 0===T?"释放查看":T,O=e.initPos,S=void 0===O?0:O,A=(0,i.useState)(h),I=A[0],R=A[1],P=(0,i.useState)(0),M=P[0],N=P[1],j=(0,i.useRef)(null),D=(0,i.useRef)(null),L=(0,i.useRef)(null),B=(0,i.useRef)(!1),F=(0,i.useRef)(!1),H=(0,i.useRef)(0),z=(0,i.useRef)(null),V=z.current;return te(V,"touchstart",e.onTouchStart),te(V,"touchend",e.onTouchEnd),te(V,"touchcancel",e.onTouchCancel),te(V,"touchmove",e.onTouchMove),(0,i.useEffect)((function(){var t;if(!h&&j.current&&!I&&(0===j.current.childNodes.length?R(!0):1===j.current.childNodes.length?t=e.getScrollContainer?e.getScrollContainer():j.current.firstChild:((t=j.current).style.width="100%",t.style.overflowX="scroll",t.style.display="inline-flex",t.style.webkitOverflowScrolling="touch"),t)){var n=D.current,r=L.current;if(n){n.style.display="none";var o=0,i=0,a=function(e){o=e.touches[0].pageX},l=function(a){t.scrollLeft||(t.scrollLeft=1);var l=(i=a.touches[0].pageX)-o;H.current=l;var u=U(Math.abs(l),e.damping);if(l<0&&(t.scrollLeft+t.clientWidth>=t.scrollWidth-1||!t.scrollLeft)&&!F.current&&(B.current=!0,n.style.display="flex"),B.current&&l<0){a.stopPropagation(),a.cancelable&&a.preventDefault();var f=u>s?s:u,d=u>c?c:u;N(d),r&&(r.innerHTML=u>=g?_:k),n.style.transition="all 0.02s",n.style.webkitTransform="translateX(-"+d+"px)",n.style.transform="translateX(-"+d+"px)",t.style.transition="all 0.03s",t.style.webkitTransform="translateX(-"+f+"px)",t.style.transform="translateX(-"+f+"px)"}l>0&&t.scrollLeft+t.clientWidth<=t.scrollWidth-1&&(B.current=!1,n.style.display="none"),l<0&&t.scrollLeft+t.clientWidth<=t.scrollWidth-1?F.current=!1:F.current=!0},f=function(){var e=i-o;H.current=e;var r=U(Math.abs(e)),a=function(){t.style.transition="all "+C+"ms "+b,t.style.webkitTransform="translateX(0px)",t.style.transform="translateX(0px)",n.style.transition="all "+C+"ms "+b,n.style.webkitTransform="translateX(0px)",n.style.transform="translateX(0px)",B.current=!1,F.current=!1,setTimeout((function(){n.style.display="none"}),C)};if(r>=g&&(t.scrollLeft+t.clientWidth>=t.scrollWidth-1||!t.scrollLeft)&&B.current)return u(),void setTimeout((function(){a()}),250);a()};return t.addEventListener("touchstart",a),t.addEventListener("touchmove",l),t.addEventListener("touchend",f),function(){t.removeEventListener("touchstart",a),t.removeEventListener("touchmove",l),t.removeEventListener("touchend",f)}}}}),[h]),(0,i.useImperativeHandle)(t,(function(){return{dom:z.current}})),a().createElement(Y,null,(function(t){var n=t.prefixCls;return a().createElement("div",{className:n+"-swipe-load "+r,ref:z},a().createElement("div",{className:f(n+"-list-area"),ref:j},x),e.renderLabel?a().createElement("div",{className:f(n+"-custom-loading-area"),ref:D,style:{position:"absolute",right:S+"px"}},e.renderLabel.length?e.renderLabel(M):e.renderLabel()):a().createElement("div",{className:f(n+"-loading-area"),ref:D,style:{width:v+"px",height:v+"px",position:"absolute",right:"-"+v+"px"}},a().createElement("div",{className:f(n+"-loading-label"),ref:L})))}))})),ko=(0,i.forwardRef)((function(e,t){var n=(0,i.useRef)(null);return(0,i.useImperativeHandle)(t,(function(){return n.current})),a().createElement(we,null,a().createElement(Eo,o({},e,{ref:n})))})),To=(0,i.forwardRef)((function(e,t){var n,r=Z(),o=e.className,s=e.style,l=e.platform,c=void 0===l?r:l,u=e.checked,d=e.disabled,h=void 0!==d&&d,p=e.defaultChecked,v=void 0!==p&&p,m=e.text,g=e.shape,y=void 0===g?"fully":g,b=e.innerArea,w=e.onChange,C=e.onTouchStart,x=e.onTouchEnd,E=e.onClick,k=(0,i.useState)(0),T=k[0],_=k[1];n="checked"in e?Boolean(u):v;var O=(0,i.useState)(n),S=O[0],A=O[1],I=(0,i.useRef)(null);function R(e){if(C&&C(e),!h){var t=e.touches&&e.touches[0]?e.touches[0].clientX:0;_(t)}}function P(t){if(x&&x(t),!h){var n,r=(t.changedTouches&&t.changedTouches[0]?t.changedTouches[0].clientX:0)-T;n=r>0||!(r<0)&&!S,"checked"in e||A(n),w&&w(n)}}return(0,i.useImperativeHandle)(t,(function(){return{dom:I.current}})),(0,i.useEffect)((function(){"checked"in e&&A(Boolean(u))}),[u]),a().createElement(Y,null,(function(e){var t=e.prefixCls;return a().createElement("div",{ref:I,className:f(t+"-switch all-border-box",o,"type-"+c,"system-"+r,y,{checked:S,disabled:h}),style:s,onTouchStart:R,onTouchEnd:P,onClick:E},m?a().createElement("span",{className:t+"-switch-text"},S?m.off||"":m.on||""):null,a().createElement("div",{className:t+"-switch-inner"},b||null))}))})),_o=(0,i.forwardRef)((function(e,t){var n=(0,i.useRef)(null);return(0,i.useImperativeHandle)(t,(function(){return n.current})),a().createElement(we,null,a().createElement(To,o({},e,{ref:n})))}));var Oo=(0,i.forwardRef)((function(e,t){var n=e.tabs,r=e.prefixCls,s=e.activeIndex,l=e.tabDirection,c=e.type,u=e.onTabClick,d=e.changeIndex,h=e.tabBarPosition,p=e.tabBarArrange,v=e.tabBarScroll,m=e.tabBarFixed,g=e.renderUnderline,y=e.duration,b=e.transitionDuration,w=e.useCaterpillar,C=e.wrapWidth,x=e.wrapHeight,E=e.cellTrans,T=e.distance,_=e.jumpingDis,O=e.tabBarExtra,S=e.onTabBarOverflowChange,A=e.tabBarGutter,I=e.tabBarPadding,R=e.underlineSize,P=e.underlineThick,M=e.underlineInnerStyle,j=e.caterpillarMaxScale,L=e.caterpillarProperty,B=e.onTabBarScroll,F=e.hideTabBarBeforeMounted,H=e.overflowThreshold,U=void 0===H?5:H,V=e.tabBarScrollBezier,G=e.tabBarScrollDuration,W=e.tabBarScrollChance,X=e.tabBarHasDivider,Y=e.showUnderline,J=e.disabled,q=e.renderTabBarItem,K=e.tabBarStyle,$=e.tabBarClass,ee=r+"-tab-cell",te=(0,i.useRef)(null),ne=(0,i.useRef)(null),re=(0,i.useRef)(0),oe=(0,i.useState)({}),ae=oe[0],se=oe[1],le=Q(!1),ce=le[0],ue=le[1],fe=le[2],de=(0,i.useState)(0),he=de[0],pe=de[1],ve=(0,i.useState)(!1),me=ve[0],ge=ve[1],ye=(0,i.useState)((function(){return n.length0?s-1:T<0?s+1:s),r=C?T/C:0,i=r*(t-n),a=Oe?"X":"Y",l=w&&!_?"size"===L?((e={})[Oe?"width":"height"]=100*ze(r)+"%",e.willChange="width",e):{transform:"scale"+a+"("+ze(r)+")"}:{};return{outer:o({transform:"translate"+a+"("+(T>0?t-i:t+i)+"px) translateZ(0)"},Oe?{width:R,height:P}:{height:R,width:P}),inner:o({},l)}}();return{outer:ie(o({transitionDuration:E?y+"ms":"0ms"},t.outer||{})),inner:ie(o({},e,t.inner||{}))}}function Fe(e){var t,n,r=(Oe?null==(t=ne.current)?void 0:t.offsetWidth:null==(n=ne.current)?void 0:n.offsetHeight)||0;return He(e)-r/2}function He(e){var t=(te.current&&te.current.querySelectorAll("."+ee)||[])[e]||{},n=(Oe?t.offsetWidth:t.offsetHeight)||0;return((Oe?t.offsetLeft:t.offsetTop)||0)+n/2}function ze(e){var t=Math.abs(e);return t>.5?2*(1-t)*(je-1)+1:2*t*(je-1)+1}function Ue(e){if(void 0===e&&(e=0),y){var t=(y||0)*Math.abs(e);pe(t),z((function(){fe(!0)})),re.current&&clearTimeout(re.current),re.current=window.setTimeout((function(){fe(!1),pe(0)}),(y||0)-t+20)}}function Ve(e){return"object"==typeof Ie?Ie[e]:Ie}function Ge(e){return Oe?0===e?{marginRight:Re,marginLeft:Ve("left")}:{marginRight:e===n.length-1?void 0:Re}:{}}return(0,i.useEffect)((function(){if(De){var e=Oe?"X":"Y";if("size"!==L)return D(De,"{\n 0% {\n transform: scale"+e+"(1) translateZ(0);\n -webkit-transform: scale"+e+"(1) translateZ(0);\n }\n 50% {\n transform: scale"+e+"("+j+") translateZ(0);\n -webkit-transform: scale"+e+"("+j+") translateZ(0);\n }\n 100% {\n transform: scale"+e+"(1) translateZ(0);\n -webkit-transform: scale"+e+"(1) translateZ(0);\n }\n }"),function(){N(De)};var t=Oe?"width":"height";D(De,"{\n 0% {\n "+t+": 100%;\n }\n 50% {\n "+t+": "+100*je+"%;\n }\n 100% {\n "+t+": 100%;\n }\n }")}}),[De]),(0,i.useEffect)((function(){z((function(){var e;e=!1,te.current&&(e=Oe?te.current.scrollWidth>te.current.offsetWidth:te.current.scrollHeight>te.current.offsetHeight),e!==me&&S&&S(e),ge(e),we(void 0),Ee(!0),_e(!0)}))}),[te.current,Me,n]),(0,i.useEffect)((function(){se(Be())}),[w,ce,E,y,l,C,x,T,De,he]),(0,i.useEffect)((function(){z((function(){se(Be())}))}),[s,n,Ve("left"),Ve("right"),A,l]),(0,i.useImperativeHandle)(t,(function(){return{dom:te.current,scrollToCenter:Le,hasOverflow:me,setCaterpillarAnimate:Ue}}),[Le,me,Ue]),(0,i.useEffect)((function(){Me&&setTimeout((function(){Le()}),"after-jump"===W?Math.max(b||0,y||0):0)}),[s,Me]),(0,i.useEffect)((function(){Le(!0);var e=function(e){return e.stopPropagation()};return Oe&&me&&te.current&&(te.current.addEventListener("touchstart",e),te.current.addEventListener("touchmove",e)),function(){Oe&&me&&te.current&&(te.current.removeEventListener("touchstart",e),te.current.removeEventListener("touchmove",e))}}),[me]),(0,i.useEffect)((function(){_&&w&&"ios"!==Ne&&Ue(C?_/C:0)}),[_]),a().createElement("div",{className:f(ee+"-container-wrap",l,"type-"+c,$,Ne),style:K},a().createElement("div",{className:f(ee+"-container-inner",l,"pos-"+h,"type-"+c,{fixed:m},{"has-divider":Pe})},a().createElement("div",{className:f(ee+"-container",l,"pos-"+h,"arrange-"+(be||p),"type-"+c,{overflow:me},{shown:xe}),ref:te,onScroll:B},n.map((function(e,t){return a().createElement("div",{key:t,className:f(ee,l,c,Ne,{active:t===s},{"no-shrink":v},{last:t===n.length-1},{custom:Boolean(q)}),style:Ge(t),onClick:function(n){J||(d(t,"click"),u&&u(e,t,n))}},function(e,t){return q?q(e,t,{active:t===s}):"string"==typeof e?e:e.title}(e,t))})),Ie&&!Ae&&Oe?a().createElement("div",{className:"fake-padding",style:{width:Ve("right"),height:"100%"}}):null,Y&&Se?g?g(ae,Te,ne):a().createElement("div",{className:f(ee+"-underline",{show:Te}),ref:ne,style:ae.outer},a().createElement("div",{className:f(ee+"-underline-inner",{caterpillar:ce,"custom-animate":De,"caterpillar-moving":ce||w&&T},l),style:o({},ae.inner||{},M||{})})):null),O))}));const So=Oo,Ao=(0,i.forwardRef)((function(e,t){var n,r=e.prefixCls,s=e.panes,l=e.tabDirection,c=e.activeIndex,u=e.distance,d=e.wrapWidth,h=e.wrapHeight,p=e.handlePaneTouchEnd,v=e.transitionDuration,m=e.paneTrans,g=e.swipeable,y=e.lazyloadCount,b=e.hideContentStyle,w=e.renderHideContent,C=e.mode,x=e.tabPaneStyle,E=e.tabPaneClass,T=e.getScrollContainer,_=e.scrollThrottle,O=e.scrollOffset,S=void 0===O?0:O,A=e.goLastWhenScrollBottom,I=e.scrollVertical,R=e.changeIndex,M=(0,i.useRef)(null),N=(0,i.useRef)([]),j=(0,i.useRef)(!1),D=(0,i.useRef)(0),L=(0,i.useState)([c,c]),B=L[0],F=L[1],H=r+"-tab-pane",U=g?p:void 0;(0,i.useImperativeHandle)(t,(function(){return{dom:M.current,getTransition:W,scrollToIndex:X}})),(0,i.useEffect)((function(){"swipe"===C&&setTimeout((function(){F("number"!=typeof y?[0,1/0]:[c-y,c+y])}),W())}),[y,c,C]);var V,G=(0,i.useMemo)((function(){return"scroll"!==C?function(){}:yn()((function(){if(!j.current){var e=T?T():window;if(e){for(var t=Y(e),n=t.containerTop,r=t.containerBottom,o=0;o=i-S&&n=B[0]&&t<=B[1]?a().createElement("div",n,e):w?a().createElement("div",o({},n,{style:b||{}}),w(t,e)):null===b?a().createElement("div",n):a().createElement("div",o({},n,{style:b}),e)}(e,t)})))}));var Io=(0,i.forwardRef)((function(e,t){var n,r=e.className,s=e.style,l=e.tabs,c=e.tabBarPosition,u=void 0===c?"top":c,d=e.activeTab,h=e.defaultActiveTab,p=void 0===h?0:h,v=e.children,m=e.onChange,g=e.onAfterChange,y=e.onTabClick,b=e.onTabBarOverflowChange,w=e.onTouchStart,C=e.onTouchMove,x=e.onTouchEnd,E=e.onTabBarScroll,k=e.type,T=void 0===k?"line":k,_=e.swipeable,O=void 0===_||_,S=e.disabled,A=e.tabBarArrange,I=void 0===A?"center":A,R=e.tabBarScroll,P=void 0===R||R,M=e.tabBarFixed,N=e.tabBarExtra,j=e.tabBarScrollBezier,D=e.tabBarScrollDuration,L=e.tabBarScrollChance,B=void 0===L?"jump":L,F=e.tabBarHasDivider,H=e.stopPropagation,U=void 0===H||H,V=e.mode,G=void 0===V?"swipe":V,W=e.getScrollContainer,X=e.scrollThrottle,q=void 0===X?300:X,Z=e.scrollOffset,$=void 0===Z?0:Z,ee=e.scrollWhenMounted,te=e.goLastWhenScrollBottom,ne=void 0===te||te,re=e.scrollVertical,oe=void 0===re||re,ie=e.renderUnderline,ae=e.renderTabBar,se=e.renderTabBarItem,le=e.duration,ce=void 0===le?240:le,ue=e.transitionDuration,fe=void 0===ue?300:ue,de=e.useCaterpillar,he=void 0!==de&&de,pe=e.distanceToChangeTab,ve=void 0===pe?10:pe,me=e.percentToChangeTab,ge=void 0===me?.3:me,ye=e.speedToChangeTab,be=void 0===ye?200:ye,we=e.disableClickTransition,Ce=void 0===we||we,xe=e.lazyloadCount,Ee=e.hideContentStyle,ke=void 0===Ee?null:Ee,Te=e.renderHideContent,_e=e.hideTabBarBeforeMounted,Oe=e.overflowThreshold,Se=void 0===Oe?5:Oe,Ae=e.tabBarGutter,Ie=e.tabBarPadding,Re=e.underlineSize,Pe=e.underlineThick,Me=e.underlineInnerStyle,Ne=e.caterpillarMaxScale,je=e.caterpillarProperty,De=void 0===je?"scale":je,Le=e.showUnderline,Be=void 0===Le||Le,Fe=e.stopTouchThreshold,He=void 0===Fe?0:Fe,ze=e.touchSideDisableThreshold,Ue=void 0===ze?0:ze,Ve=e.onTouchStopped,Ge=e.tabBarStyle,We=e.tabPaneStyle,Xe=e.tabBarClass,Ye=e.tabPaneClass,Je=(0,i.useRef)(null),qe=(0,i.useRef)(null),Qe=(0,i.useRef)(null),Ke=(0,i.useState)(p),Ze=Ke[0],$e=Ke[1],et=(0,i.useState)(0),tt=et[0],nt=et[1],rt=(0,i.useState)(0),ot=rt[0],it=rt[1],at=(0,i.useState)(0),st=at[0],lt=at[1],ct=(0,i.useState)(!1),ut=ct[0],ft=ct[1],dt=(0,i.useState)(!1),ht=dt[0],pt=dt[1],vt=Q(void 0===d?Ze:d),mt=vt[0],gt=vt[1],yt=vt[2],bt=Q(0),wt=bt[0],Ct=bt[1],xt=bt[2],Et=(0,i.useRef)(!1),kt=(0,i.useRef)(!1),Tt=(0,i.useRef)(0),_t=(0,i.useRef)(0),Ot=(0,i.useRef)(0),St=(0,i.useRef)(null),At=(0,i.useRef)(!1),It=(0,i.useRef)(""),Rt=(n=v?[v]:[],v&&"[object Array]"===Object.prototype.toString.call(v)&&(n=v),n.slice(0,l.length)),Pt=-1!==["top","bottom"].indexOf(u)?"vertical":"horizontal",Mt="swipe"===G&&!S&&O&&"vertical"===Pt;(0,i.useImperativeHandle)(t,(function(){return{dom:Je.current,bar:qe.current,pane:Qe.current,barOverflow:!!qe.current&&qe.current.hasOverflow,updateLayout:Lt,changeIndex:function(e,t){return Bt(e,"manual",t)},scrollToIndex:Qe.current?Qe.current.scrollToIndex:function(){}}})),J(Lt),(0,i.useEffect)((function(){ve>0&&ve<1&&console.warn("[Carousel Props Warning] The value of the prop `distanceToChangeTab` is too small("+ve+"). Do you meant to use the prop `percentToChangeTab`?")}),[ve]),(0,i.useEffect)((function(){var e;Lt(),"scroll"===G&&(void 0===ee?0!==mt:ee)&&(null==(e=Qe.current)||e.scrollToIndex(mt,!0))}),[]),(0,i.useEffect)((function(){yt(void 0===d?Ze:d)}),[d,Ze]),K((function(){ft(!0)}),[d]),K((function(){var e,t;"scroll"!==It.current&&"scroll"===G&&(null==(e=Qe.current)||e.scrollToIndex(mt)),"click"===It.current&&he&&(null==(t=qe.current)||t.setCaterpillarAnimate());var n=It.current;It.current="",z((function(){setTimeout((function(){g&&g(l[mt],mt,n)}),Qe.current?Qe.current.getTransition():0)}))}),[mt]);var Nt=(0,i.useCallback)((function(e){if(!(w&&w(e,gt.current)||Et.current)){kt.current=!0,ft(!1),pt(!1);var t=e.touches[0];Tt.current=t.clientX||0,_t.current=t.clientY||0,St.current=null,Et.current=!1,Ot.current=(new Date).getTime(),At.current=!1}}),[]),jt=(0,i.useCallback)((function(e){if(!(C&&C(e,gt.current)||Tt.current0||gt.current===l.length-1&&o<0)return!At.current&&a>He&&(At.current=!0,Ve&&Ve(o>=0?-1:1)),void xt(0);e.cancelable&&e.preventDefault(),xt(o)}else e.cancelable&&e.preventDefault()}),[l,U]);function Dt(e){if((!x||!x(e.nativeEvent,gt.current))&&(U&&e.stopPropagation(),kt.current&&!Et.current&&!St.current)){kt.current=!1,ft(!0),pt(!0);var t=(new Date).getTime(),n=Ct.current,r=n/(t-Ot.current)*1e3,o=ot*ge,i=gt.current,a=Math.abs(n)>o&&Math.abs(n)>ve||Math.abs(r)>be,s=i;n>0&&a?s=i-1:n<0&&a&&(s=i+1),z((function(){!function(e){Et.current=!0,e!==gt.current&&nt(Ct.current),Bt(e,"swipe"),Ot.current=0,setTimeout((function(){Et.current=!1,nt(0)}),fe)}(s)}))}}function Lt(){it(Je.current?Je.current.offsetWidth:0),lt(Je.current?Je.current.offsetHeight:0)}function Bt(e,t,n){(n||"click"===t&&Ce)&&pt(!1),It.current=t||"",ft(!0),$e(e),xt(0),e!==gt.current&&m&&m(l[e],e,t)}return(0,i.useEffect)((function(){return Qe.current&&Qe.current.dom&&Mt&&(Qe.current.dom.addEventListener("touchstart",Nt),Qe.current.dom.addEventListener("touchmove",jt)),function(){Qe.current&&Qe.current.dom&&Mt&&(Qe.current.dom.removeEventListener("touchstart",Nt),Qe.current.dom.removeEventListener("touchmove",jt))}}),[l,Mt]),a().createElement(Y,null,(function(e){var t=e.prefixCls,n=t+"-tabs",i={prefixCls:t,activeIndex:mt,tabDirection:Pt,changeIndex:Bt,duration:ce,transitionDuration:fe,wrapWidth:ot,wrapHeight:st,distance:wt,mode:G},c=o({ref:qe,tabs:l,onTabClick:y,type:T,tabBarPosition:u,tabBarArrange:I,tabBarScroll:P,renderUnderline:ie,useCaterpillar:he,cellTrans:ut,jumpingDis:tt,tabBarExtra:N,onTabBarOverflowChange:b,tabBarGutter:Ae,tabBarPadding:Ie,tabBarFixed:M,tabBarScrollBezier:j,tabBarScrollDuration:D,tabBarScrollChance:B,tabBarHasDivider:F,underlineSize:Re,underlineThick:Pe,underlineInnerStyle:Me,caterpillarMaxScale:Ne,caterpillarProperty:De,onTabBarScroll:E,hideTabBarBeforeMounted:_e,overflowThreshold:Se,showUnderline:Be,disabled:S,renderTabBarItem:se,tabBarStyle:Ge,tabBarClass:Xe},i),d=a().createElement(So,c);return a().createElement("div",{className:f(n+" "+n+"-"+u+" "+n+"-"+Pt+" all-border-box",r||""),style:s,ref:Je},ae?ae(d,c):d,a().createElement(Ao,o({ref:Qe,panes:Rt,handlePaneTouchEnd:Dt,paneTrans:ht,swipeable:Mt,lazyloadCount:xe,hideContentStyle:ke,renderHideContent:Te,tabPaneStyle:We,getScrollContainer:W,scrollThrottle:q,scrollOffset:$,goLastWhenScrollBottom:ne,scrollVertical:oe,tabPaneClass:Ye},i)))}))}));const Ro=Io,Po=(0,i.forwardRef)((function(e,t){var n=(0,i.useRef)(null);return(0,i.useImperativeHandle)(t,(function(){return n.current})),a().createElement(we,null,a().createElement(Ro,o({},e,{ref:n})))}));var Mo=(0,i.forwardRef)((function(e,t){var n=e.className,r=e.style,s=e.type,l=void 0===s?"primary":s,c=e.icon,u=e.children,d=e.size,h=void 0===d?"medium":d,p=e.color,v=e.bgColor,m=e.borderColor,g=e.borderStyle,y=void 0===g?"solid":g,b=e.halfBorder,w=void 0===b||b,C=e.closeable,x=e.closeIcon,E=e.closeColor,k=e.filleted,T=e.onClose,_=e.onClick,O=(0,i.useRef)(null),S=Z();return(0,i.useImperativeHandle)(t,(function(){return{dom:O.current}})),a().createElement(Y,null,(function(e){var t=e.prefixCls+"-tag";return a().createElement("div",{className:f(t,"all-border-box",n,t+"-"+l,{"half-border":w},S,"size-"+h,{filleted:k}),style:o({color:p,background:v,borderColor:m,borderStyle:y},r||{}),ref:O,onClick:_},c,a().createElement("span",{className:"tag-text"},u),C?a().createElement("div",{onClick:function(e){e.stopPropagation(),T&&T(e)},className:"tag-close-wrap"},x||a().createElement(Ir,{className:"tag-close-icon",color:E})):null)}))}));function No(e){var t=e.className,n=void 0===t?"":t,r=e.useCurrentColor,o=void 0===r||r,i=e.style;return a().createElement(Y,null,(function(e){var t=e.prefixCls;return a().createElement("svg",{className:t+"-icon "+t+"-icon-add "+n,width:"1em",height:"1em",style:i,viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},a().createElement("path",{fill:o?"currentColor":"#000000",d:"M527.317 85.333c9.515 0 12.95.982 16.427 2.859a19.337 19.337 0 018.064 8.064c1.877 3.477 2.859 6.912 2.859 16.427v356.65h356.65c9.515 0 12.95.982 16.427 2.859a19.337 19.337 0 018.064 8.064c1.877 3.477 2.859 6.912 2.859 16.427v30.634c0 9.515-.982 12.95-2.859 16.427a19.392 19.392 0 01-8.064 8.064c-3.477 1.877-6.912 2.859-16.427 2.859h-356.65v356.65c0 9.515-.982 12.95-2.859 16.427a19.392 19.392 0 01-8.064 8.064c-3.477 1.877-6.912 2.859-16.427 2.859h-30.634c-9.515 0-12.95-.982-16.427-2.859a19.392 19.392 0 01-8.064-8.064c-1.877-3.477-2.859-6.912-2.859-16.427l-.021-356.65h-356.63c-9.514 0-12.949-.982-16.426-2.859a19.392 19.392 0 01-8.064-8.064c-1.877-3.477-2.859-6.912-2.859-16.427v-30.634c0-9.515.982-12.95 2.859-16.427a19.392 19.392 0 018.064-8.064c3.477-1.877 6.912-2.859 16.427-2.859l356.65-.021v-356.63c0-9.514.982-12.949 2.859-16.426a19.392 19.392 0 018.064-8.064c3.477-1.877 6.912-2.859 16.427-2.859h30.634z"}))}))}var jo=function(e){return(0,i.forwardRef)((function(t,n){var r=t.className,s=t.style,l=t.list,c=t.type,u=t.showAddButton,d=void 0===u||u,h=t.addArea,p=t.horizontalPadding,v=t.verticalPadding,m=t.onAdd,g=t.onClose,y=(0,i.useRef)(null);function b(e,t){return o({},e.style||{},t!==l.length-1||d?{marginRight:p}:{},{marginBottom:v})}return(0,i.useImperativeHandle)(n,(function(){return{dom:y.current}})),a().createElement(Y,null,(function(t){var n,i=t.prefixCls+"-tag-list";return a().createElement("div",{className:f(i,r),style:(n={},v&&"string"==typeof v?n={marginBottom:"-"+v}:v&&"number"==typeof v&&(n={marginBottom:-1*v}),o({},s||{},n)),ref:y},l.map((function(t,n){return a().createElement(e,o({key:n},t,{style:b(t,n),type:c,onClose:function(e){t.onClose&&t.onClose(e),g&&g(n,e)}}))})),d?a().createElement("div",{className:"tag-list-add-wrap",onClick:m},void 0!==h?h:a().createElement(Mo,{type:c,className:"tag-list-add",borderStyle:"dashed",icon:a().createElement(No,null),style:{marginBottom:v}},"添加标签")):null)}))}))}(Mo);const Do=L(Mo,{List:jo}),Lo=(0,i.forwardRef)((function(e,t){var n=(0,i.useRef)(null);return(0,i.useImperativeHandle)(t,(function(){return n.current})),a().createElement(we,null,a().createElement(Do.List,o({},e,{ref:n})))})),Bo=L((0,i.forwardRef)((function(e,t){var n=(0,i.useRef)(null);return(0,i.useImperativeHandle)(t,(function(){return n.current})),a().createElement(we,null,a().createElement(Do,o({},e,{ref:n})))})),{List:Lo}),Fo=(0,i.forwardRef)((function(e,t){var n=e.id,r=e.name,s=e.rows,l=e.placeholder,c=e.readOnly,u=e.onFocus,d=e.onBlur,h=e.onKeyUp,p=e.onKeyPress,v=e.disabled,m=e.autosize,g=e.cloneNodeWhenAutosize,y=e.showStatistics,b=void 0===y||y,w=e.statisticsMaxlength,C=e.statisticsLengthCaculator,x=e.onErrStatusChange,E=e.onErrValueChange,k=e.renderStatistics,T=e.maxLength,_=e.textareaClass,O=e.textareaStyle,S=e.nativeProps,A=void 0===S?{}:S,I=(0,i.useRef)(null),R=(0,i.useRef)(null),P=pr(e,I),M=P.inputValue,N=P.handleClick,j=P.handleChange,D=P.handleInput,L=P.handleKeyDown,B=P.renderWrapper,F=P.wrapRef,H=w||T,z=(0,i.useMemo)((function(){if(C)return C(M);var e=M.replace(/\n/g,"");return e?String(e).length:0}),[M,C]),U=!!H&&z>H;function V(e){var t=e.prefixCls;return B(t+"-input","textarea "+(b?"has-stat":""),a().createElement(a().Fragment,null,a().createElement("textarea",o({},A,{id:n,name:r,rows:s,placeholder:l,readOnly:c,onFocus:u,onBlur:d,onKeyUp:h,onKeyPress:p,ref:I,className:f(t+"-textarea",_),style:O,value:M,maxLength:T,disabled:v,onChange:j,onInput:D,onKeyDown:L,onClick:N})),b&&H?a().createElement("span",{className:f("statistic-text",{exceed:U})},k?k(z,H):z+"/"+H):null))}return(0,i.useImperativeHandle)(t,(function(){return{dom:F.current,textarea:I.current}})),(0,i.useEffect)((function(){return function(){R.current&&document.body.removeChild(R.current)}}),[]),(0,i.useEffect)((function(){!function(){if(m){if(!I.current)return;var e=I.current;if(g){var t=I.current.cloneNode(!0);R.current?document.body.replaceChild(t,R.current):document.body.appendChild(t);var n=window.getComputedStyle(I.current);["width","fontSize","lineHeight","letterSpacing","wordSpacing"].forEach((function(e){t.style[e]=n[e]})),t.classList.add("fake-textarea"),R.current=t,e=t}e.style.height="auto";var r=Math.max(e.clientHeight,e.scrollHeight);I.current.style.height=r+"px"}}()}),[M]),(0,i.useEffect)((function(){x&&x(U)}),[U]),(0,i.useEffect)((function(){E&&E(U,z,H)}),[H,z]),a().createElement(Y,null,V)})),Ho=(0,i.forwardRef)((function(e,t){var n=(0,i.useRef)(null);return(0,i.useImperativeHandle)(t,(function(){return n.current})),a().createElement(we,null,a().createElement(Fo,o({},e,{ref:n})))}));function zo(e){var t=e.className,n=void 0===t?"":t,r=e.useCurrentColor,o=void 0===r||r,i=e.style;return a().createElement(Y,null,(function(e){var t=e.prefixCls;return a().createElement("svg",{className:t+"-icon "+t+"-icon-error-circle "+n,width:"1em",height:"1em",style:i,fill:o?"currentColor":"#000000",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},a().createElement("path",{d:"M12 24C5.4 24 0 18.6 0 12S5.4 0 12 0s12 5.4 12 12-5.4 12-12 12zm0-22.5C6.2 1.5 1.5 6.2 1.5 12S6.2 22.5 12 22.5 22.5 17.8 22.5 12 17.8 1.5 12 1.5z"}),a().createElement("path",{d:"M13.1 12l3.7-3.7c.3-.3.3-.7 0-1l-.1-.1c-.3-.3-.7-.3-1 0L12 10.9 8.3 7.2c-.3-.3-.7-.3-1 0l-.1.1c-.3.3-.3.7 0 1l3.7 3.7-3.7 3.7c-.3.3-.3.7 0 1l.1.1c.2.1.3.2.5.2s.4-.1.5-.2l3.7-3.7 3.7 3.7c.3.3.7.3 1 0l.1-.1c.3-.3.3-.7 0-1L13.1 12z"}))}))}function Uo(e){var t=e.className,n=void 0===t?"":t,r=e.useCurrentColor,o=void 0===r||r,i=e.style;return a().createElement(Y,null,(function(e){var t=e.prefixCls;return a().createElement("svg",{className:t+"-icon "+t+"-icon-warn-circle "+n,width:"1em",height:"1em",style:i,fill:o?"currentColor":"#000000",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},a().createElement("path",{d:"M12 24C5.4 24 0 18.6 0 12S5.4 0 12 0s12 5.4 12 12-5.4 12-12 12zm0-22.5C6.2 1.5 1.5 6.2 1.5 12S6.2 22.5 12 22.5 22.5 17.8 22.5 12 17.8 1.5 12 1.5z"}),a().createElement("path",{d:"M11.8 15.2h.3c.4 0 .7-.3.7-.7V7.2c0-.4-.3-.7-.7-.7h-.3c-.4 0-.7.3-.7.7v7.3c0 .4.3.7.7.7zM12.2 16.5h-.3c-.4 0-.7.3-.7.7v.3c0 .4.3.7.7.7h.3c.4 0 .7-.3.7-.7v-.3c0-.4-.3-.7-.7-.7z"}))}))}function Vo(e){var t=e.className,n=void 0===t?"":t,r=e.useCurrentColor,o=void 0===r||r,i=e.style;return a().createElement(Y,null,(function(e){var t=e.prefixCls;return a().createElement("svg",{className:t+"-icon "+t+"-icon-success-circle "+n,width:"1em",height:"1em",style:i,fill:o?"currentColor":"#000000",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},a().createElement("path",{d:"M12 24C5.4 24 0 18.6 0 12S5.4 0 12 0s12 5.4 12 12-5.4 12-12 12zm0-22.5C6.2 1.5 1.5 6.2 1.5 12S6.2 22.5 12 22.5 22.5 17.8 22.5 12 17.8 1.5 12 1.5z"}),a().createElement("path",{d:"M17.5 8c-.3-.3-.7-.3-1 0l-6.3 6.3-3-3c-.3-.3-.7-.3-1 0-.3.3-.3.7 0 1l3.5 3.5c.1.1.3.2.4.2s.4-.1.5-.2L17.5 9c.2-.3.2-.7 0-1z"}))}))}function Go(e,t){return function(n){var r="string"==typeof n?{content:n,type:"info"}:n;void 0!==t&&(r.type=t,r.loading="loading"===t);var i=document.createElement("div");function s(t){at().render(a().createElement(e,t),i)}document.body.appendChild(i);var l=o({},r,{close:c,getContainer:function(){return i},onClose:function(){var e=r.onClose;e&&e(),at().unmountComponentAtNode(i)&&i.parentNode&&i.parentNode.removeChild(i)},visible:!1});function c(){l.visible=!1,s(l)}return s(l),z((function(){l.visible=!0,s(l)})),{update:function(e){s(l=o({},l,e))},close:c,hide:c}}}var Wo=(0,i.forwardRef)((function(e,t){var n=e.className,r=e.getContainer,o=e.visible,s=void 0!==o&&o,l=e.onClose,c=e.close,u=e.type,d=void 0===u?"info":u,h=e.icon,p=e.layout,v=void 0===p?"vertical":p,m=e.duration,g=void 0===m?3e3:m,y=e.transitionDuration,b=void 0===y?300:y,w=e.content,C=e.loading,x=void 0!==C&&C,E=e.loadingIcon,k=e.disableBodyTouch,T=void 0!==k&&k,_=e.loadingInner,O=e.direction,S=void 0===O?"center":O,A=e.typeIconMap,I=e.initialBodyOverflow,R=(0,i.useRef)(),P=(0,i.useRef)(null),M=(0,i.useRef)(!1),N=d&&"info"!==d;function j(){g&&(clearTimeout(R.current),R.current=window.setTimeout((function(){c&&c()}),g))}function D(e){T&&e.preventDefault()}return(0,i.useImperativeHandle)(t,(function(){return{dom:P.current}})),oe(s,T,I),(0,i.useEffect)((function(){var e=M.current;s?j():(clearTimeout(R.current),e&&setTimeout((function(){l&&l()}),b)),M.current=!0}),[s]),(0,i.useEffect)((function(){j()}),[g]),a().createElement(Y,null,(function(e){var t,o,i,l,c=e.prefixCls;return a().createElement(st,{getContainer:r},a().createElement("div",{className:f(c+"-toast","all-border-box",n),ref:P},a().createElement(Et,{in:s,timeout:b,type:"fade"},(t=c+"-toast",a().createElement("div",{className:f(t+"-wrapper","from-"+S,{"no-event":!T}),onClick:D},a().createElement("div",{className:f(t+"-inner",v,(o={},o[t+"-inner-mixin"]=(x||N||h)&&"vertical"===v,o))},x&&a().createElement("div",{className:t+"-loading-wrapper"},void 0!==E?E:a().createElement(le,{className:"loading-icon",type:"arc",stroke:2,radius:_?19:11}),_?a().createElement("span",{className:t+"-loading-inner"},_):null),!x&&N?(i=A||{},l={success:a().createElement(Vo,null),error:a().createElement(zo,null),warn:a().createElement(Uo,null)},i[d]||l[d]||null):null,x||N||!h?null:h,w?a().createElement("div",{className:t+"-content"},w):null))))))}))}));function Xo(e){return{toast:Go(e),info:Go(e,"info"),success:Go(e,"success"),error:Go(e,"error"),loading:Go(e,"loading"),warn:Go(e,"warn")}}const Yo=L(Wo,Xo(Wo));var Jo=(0,i.forwardRef)((function(e,t){var n=(0,i.useRef)(null);return(0,i.useImperativeHandle)(t,(function(){return n.current})),a().createElement(we,null,a().createElement(Yo,o({},e,{ref:n})))}));const qo=L(Jo,Xo(Jo)),Qo=function(e){return a().createElement(we,null,a().createElement(Et,e))};function Ko(e){return function(e){if(Array.isArray(e))return ei(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||$o(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(e,t)||$o(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $o(e,t){if(e){if("string"==typeof e)return ei(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ei(e,t):void 0}}function ei(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2]?arguments[2]:[],r=(0,i.useRef)(),o=(0,i.useState)(!1),a=Zo(o,2),s=a[0],l=a[1],c=(0,i.useCallback)((function(e){l(e[0].isIntersecting)}),[]);return(0,i.useLayoutEffect)((function(){var n=r.current;e&&(n="function"==typeof e?e():e);var o=new IntersectionObserver(c,t);return n&&o.observe(n),function(){return o.disconnect()}}),[r.current,"function"==typeof e?void 0:e].concat(Ko(n))),[r,s]},ni=function(e){var t=(0,i.useRef)();return(0,i.useEffect)((function(){t.current=e})),t.current};var ri,oi,ii;!function(e){e[e.COMMON=0]="COMMON",e[e.SENIOR=1]="SENIOR",e[e.ENTERPRISE=2]="ENTERPRISE",e[e.UNAUTH=3]="UNAUTH"}(ri||(ri={})),function(e){e[e.FOUR=4]="FOUR",e[e.THREE=3]="THREE",e[e.TWO=2]="TWO",e[e.SINGLE=1]="SINGLE"}(oi||(oi={}));var ai=((ii={})[ri.COMMON]="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAAAXNSR0IArs4c6QAABlpJREFUWAnNWV2oVUUUXrPPOV7/rhpq/lCKpoSZIkqRmPnQQ/XQpXyOICMiKIjeM7L3QpIyin5EIoiKrJeCIirTfok0o/Ano65Xr6b3Hv+u95zZfd86e/aZ2Wefu89Vb7pgzsysWTPz7TUza9asY+QSKI7jZejeg3QT0lwvoSi9XtqH8g5jzB42/C9EcEgvIB1EGi2xD/vyA8eGMPg8pLeQ6kiXShyDY83rFK0pEsRg4yCzCelJpC5fPq5VJa7uFlv9UWT4qMTDJ0RqxyGCYcvTxVSmi1RmSdS9Skz3bWLK3X53ls8jbUbaiG1xgYx2NCJQgJyJju8j3e4PYAe+Env8A4nP/AK29ZtGKEdiJi2XaMb9Ek1dm5X7Goz1ANufbXD1tkABcjmEdiDNd8L2zF6xR16R+OyvjnVRuZm4VKI5j0o06Wa//2FUegCWX99CuUATkDshPZk9sC0B8GVokcq9fBTNWA/Aj4kxJTfoaRTW5IFtAZos9/fooJqM66elfvhZiU9jH44BmcmrpDT/GTEl1QlnoGZvyW6DAChA8uB8hqR7kiBr+x8XGfoLrDGkrnlSXrTFB8s9eyfApgcsykz/HOoNkFhuanLMQRIAFKGrhjkTIgZampRSjUKbtGl/IKkJqvduuex7Mp21TYF7tjQXK9ggmq4boVVdTl+j1KaC1NN9mQ9OMvmIGQ8r505oPHJiUlKNQpvLUPsZSYHX9j8RmKDK8s8b0gW/w3vvgVkdapGqLP0YI1da+I4xvOcuVxSarvKiF12dRnoFtLrHaXQDGFqmMc/aSdv/Dm6dY65zmMdW7KkvpH70TdixdI8FMvb4eyL1Ki4sgPVSPPSP2BM01U3i3MSQEDERG+862sn4ILIFLNcOPIUbh8rNUDRByou3ium6Pmiw/e9KHTa2iKKp69QMqRw+rn7kJb3dMHtLVzNphZRveN7xD0GjCyOA5A2kIPXu1mvRyXi5PSe27zWPkRRLE1t5ORzj3UJcocbl0QqSXXk1E0tCC4iRqu1xnLi6C0Vui3yyg9+i+VzQGE1Zg3XRXRPw/YqpzJRo+r0NVu2U1Pvf9ptzyhbODrGk1MMZlriqekGukpfHF+ApfRe2lKepsxEyw1o060F8DO8SbNWj2/BzNhTIqdnqTz53CYHSM29QuwPj2pHHzY2ecqOpd6TlbMF0XSfRNXcrOx76W+y/sACdENxGj+YGQNWf9FrzinZwN9AOB01mCi8SPZcBn5Vo1gY0lZRv+15F31qLTB4jgyUE2nB687p5PHsW+yd0UExlBuxfuoNSYTNhsUTT1mk9Y3ZSmbYFdcDTVgWa1tppxRPQoh1M7VzalLf8pdkPo72h6XpvsQlLB9NCuEJc+t5UAM+HTsgOfoMlDK2DyXjt9OZN9606nB34EpcIH6KjoBBLbwBU3zidjFUbSJ4hTWEzbo5wqR2V5jzSKGJP5tpfJ9gmz2AJgfIh1inlL/9a7W6mrNY7mxV74iPhaR81hVgU6G9ukKh7pSsW5vEAfdvwZjFqpow09iaaYS/rx7YVjpUnwJerR/u49KlXYLpXo0pWMcXD/dh3vweCBp56afZDYsYvVL7eQNgmoye8WPG89mhHhAufr75DZPLdzUPQKeUu/7UPaHd+iHpNnQ7myelBbMYA6JSkbt6HTo7v7k4p75ZyfW3f67m+qWsfKc9gUGxunTFqwxthcIDOayfEQxKf/7NFND5/QOzJT1v4nTD0zd80dbSBxNbYkFQtytvJIDE40CnlabXeuxXdw4PW6XiZubcn2IKT8zQG03cEIxh8aHVC2X0aV3+46BiABiSafisfd8Sk5JYe0Qp97W1OGxjBQHCgiOJz+yW+cCQRi+G5U5ujJ87FqIlHmxNMykqBJgL8AhpIDbMwgiEwOUXUsKnY5Cc/wZ49WCTe2k6zxmhJM7RDDBt9wQAovoCRCa75YQoxzKIRjALN6vLj9Wn73mC3URE1mYmScG5G9oglpdBFSdjJO2onqhoQKg6SGezp+5LHWjp2YeGSgmRu9AQsb635jnfVhR0dMIC9+gO5Hli+yjYhtQmN70pC48e80Diky/D609D4Stzd8Kia16IbniaIlqYwNO46FObQ7hX9s6EQYFYAgK/I3ze5pz4Lrl09OXAMYPBlx2e3S+zCJ45L9Hn5hxg9tYui/wCDOXr8Hvj9vwAAAABJRU5ErkJggg==",ii[ri.SENIOR]="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAAAXNSR0IArs4c6QAADLhJREFUWAnFWXuMVNUd/s69dx67s7Ozyy6wy8NlhWURBQQEaX0U10ehsUgaiSmS2NTWJg2xapOmTaxJtX81JkalSVOr1pT6rlqCYG0FNVIpKoiEh4D7gGXfb2Z2du7Mvaff7869w+yC+ErrT3+cO+f5ne/3OOfeVfgKorVewOFrqPOp04qUj+go0kN83qKUOiAN/xcRcNSHqM3ULyoyRsbKBv83wskvoD5FdahfVWQOmeuCz4tWfVZHThZmn/upd1EjE/oPAnoH3N425PpqtN23GNquh9LsFm5RVvU+WFVdsCbXAWYTKysnjB/j74ep99Et7Alt436eFyhBTmbvl6hXjhsFvR32ib2w9zQi07MC2c4ZcAeAbAqa/yFUChUp57aIS8cAJ9YOs3w3Iks+RnjWEoJePX4+vMPf3yPY3gn1hZ+fCpQgF7LXFirZCETvgX18J8Z2XY/MsSVI7gMGGCc2iQ2XAiUV1CrqJIJMeIChaBCDhrAIPMu6bOU+RJe+jsj8awC1PJiZZRt1DcF+VFRXeDwnUB/kLvYq83s6cFOP6NFX69Xo/rUYfAvoeo9M0VoRgiidSq3OA42SxTBBhUqIw+Jwl/9n2TcD5HKsZ7s7nbxf8Ioqu7EFVvxOdjL9dZIsrzgX2LOA+uYmigKTQ3BPbUJy280Y2TkPbduB9BAX5NwR7iNKlkroISUEECWjUmeRXSVr0w0ch8C4oZwATZNRYiF2xOayz8VHULbqRYTrNrKGgz0RZpdNdINxQAlSAucNauCTQxh77wWc3vZ9dL1Qht6DnJytVjQPSEwtfihsRoVFUYk3dtLCJBl0yGaOMeOBJNDcaB6sneKYGtpsZRIlNzyDxDfXcWAAVnz2WoItBJjBimJ5gD8CkI5rn9yEka3rcWpzGfoIUkgKE0hJnOAIMEZfLKNPlgpggrSKQGoxN9dxCNIhONEcwYlmfcCDdMe+58tw+tX17mjbJs5O+j0RDJJpClJglGxKTjtKldU44emH9NDmG1XH7xt0D0F6AREiUDG3mFmUZo8QdJhqRhg33InHpA9SzG2PQY8JQDG7AJRSQPssE7hKzIFbfccx1Ny+1QjF7/bWB9gBjWT1hPwWbw9E2MyDBKM79eosNbazwT3VjFz3UugczS350SAYRUOIDyqaVg0T3DBU1ELoqqlQcbZJ0AgQNw23P4PsXo5zuZRiqtL0X81NekGmGG+jsKYeglH2RgO6Y7Mw40d72HE5O3BBCKbbqHmgZFOOtA1S4Yn98Q6k9/8Cba/DCGVgVNMi9fdwnZlchCAC0QTgi+IGVAWBgHGY3kag4pujUGoIVuMVwOS1ZJ2ZQAfWlYEGgVrc92Hg1G/J/ps3oeTS36FqmQAV2UBsD5LVAwGjP2QlqRBxtmNo52oM7jSQIVulpTxYWM6gv8Vmc2v0y7OEgHU/gZ0iyNN502bZn6ZWVhJmTTd0OV0jvpDBJkT54rBvpg0Ylr58Tr5toD22Wlcsek2Z4VXsJZgE290+ONzkD6VnNH+AXPMi9O6jI9BMJYxo8cvBR6E7HoDbw91PlFwrMPIg+9wLZgguSt/kKZUPnBx051vIbv0Zckf+mc8EMj5zEjh2D/D+N4DDt5PNDm6yneWuRWrgzfeLlvCwGaSW20S93zCoh96dj1FGo/hjKdkrlagmWEnq4ZNwDj4GLawVi9PLBbhIVsxN15DUIyo5M5eE01/JE5bzpQfJPNOWJoOtvwFO/okGZB+hKwhr+yR062PzWcPOntQLRumyxq9god9Almd3sjUPMkqQchx6p02C0clgCXfCbaO/F0uogb+4GYlmD5yUVEa0TrtwumJQlY0w6pbRT5mqB9/kyfZMPkICgDKfPEueTXes0I69Q6p8WSNALwp+IdPdBqdnGgyyEp/OHDklz2aUYEMMFB6J5swSuCfeBndZGAaDURxaQhbJVIZsZ8gSfU5n0gSZIIGTYC2/FcbkRvbpAT75JV2AgCaC9LIJGc/1TVOjx1vPLICLBOi0QkWms1a5Q2SQybt0cp5JSeQSADKJ60CVmySe5umnjxVL9HK2M7vZAlLYHIVOhuB0V8KcfRXMWStoYs7R+RiQOnAOkJxM7gaSj90RYOhgbdH008YB1afblnrRFxOQZFGSuZgqOBIdMq2yMBIjZLXY39klMoc+TKVPwqHJbYdsToFWNTAvZgDLcZskwM4/c6OcJxBhNWBW1jLj0NxodpC3szMyHijGeuvgMmIleCTSLeY98XTJfd6ZzTYmcpVIQ/d9yDqaKRA5AOLXsZ19mZbckXI4w1Ng1i2GMW0Re9FV2h8GRpvPAAtAFkquF0rQcC50amBWMDVLD2jht8q285m0R7h7msCbkeb2LheyATltsgQaTnPdY3C7jhbGeg+JlVyolr6pkOuaCVU2HeaitdwrN9H7N6B/G6f0N1cAl1/GG28lSE41XNdgciiKATaK6ZnAfFFWm5c6BKTiTMKk3CW9vCgg6XtMOwqjPPrb4XbsC0bmyzDdqvxaOH01nKYa1rymPJvZLq7yRwZZZ57Nc4EUXKEaWrKKe7FI1qTWosk7xgF1S+fshZZg4aiJV7TgMuElcp44oV7oQZo/ww0Uia64hSavZ4RTF0jm41ydTzIl/fvTQQbjoxeyTxyGy9MwMXtvUM1yPFCjfEGHHuXENK9EuHdN8245wiTVYzT/rEweq/YBBswE85cvhaq+FOYlN0LJYWGTza7nvAArJPaA0SIkXsSXXsJ+BnJ2DGblQtJfEA9o4UzUZXNn6bTZgWQfgdp5cJJuJC/akh+pXvoR86dg6IM0/+7CbPKgoqUIrbwL5lwGFm9P6CCbqY9oVjaK/UQFaLGI20aZzuMLmBkGYefKO3TFnPqiLodk2JaggheBJo1JuzFMoHLhFTMLi57y2bv4CqMEwI0oi2wN0VsmmF9VcQ2TyFKHaHYek3Icn4tFWZhN3qtJxdVexGNgANqYsltZ4WsCXCy3GLxCcbto8Ssrzdm3HUIfA2h0gGAJKDi3vVJAs857/8nBsAg28yH0CE+biSI3o47HeRxyarr9WSxKfwEpKqmtajWvtS2w+21EFt/BHRa+AbTINU8YFfl7vuC4qddflk3F96OXF43i1wcJJs9fybS8YogPMziVbmZQHQ+G+yVXH2bw9Dz12SA5DUrE7POgmnkNTsf2hxq+fVnRhB62AOgTbPASnLIiq8z627aj13AxMpQ3exBIAlRABpdfEqHCg9Bd7/LyQT8OJDfIm9GD+Y0KmxMlYNJjk6dRzTq43R9h7JPDbuTSH28XDP4QwSTYPNdmyvS+sm32G6Fmr7vWtmdsQS+POvFTcQF5L5cAk2taIFxIRXnf7NvFc73fr2Vlz/P03X/lb0dB36AMQMpvYbPqamDKd4G9z2IsHd0SXXJrU9CV5WYfWx6o3/BrlkQjLmMtM771aMtY/4xjGOFsHtAJIKWjABXz2wcJlm4lIDLt9M2HWCkdiiQAKKWIgIw38ib8U6D5Pxhs6ThWtu6JFpjmcq89/3InmDwJTC+snmAND+O8WOUz7zSW3vtctqs2hZR0E1RBa1HJOqOUKW94K9lnAHX+gYF41LeV3y8AJ6UYhIZC/EJg7k+A7m4M7/hrKnL1r56zquvu9EdI8bCPyasqAPU7yA7e8Z/NcMN1G7O165+2u+YkkYzmgU4cIfjjWZjqNZ4+L9Psfzl7QwJQGBSAimlrKvNlw3q+oiQxvP3ZpFuz8umyxd/ZyNbAowXDfdSCnMURL8ST2cpXyTOfdPhSusnedf/NsciReaju5tso58vNJjtEbXRTeZExicQoIyA/qAIWhUG5N4QrmXDqCLKRt8AEnPe7MXI8eSTa9PMXyxavEpC8CXnSxn/P/0nH7yi394V83kXlyp44uaFTj6Re2lhv2kfWxir5VlnJ61t4HhslyJgdFCNd3vGZW2EIaIILMaLlW1Siim+wJcwMOTjHhpE8ZDPTxV9JbHi0JTTFM3fApOzy830ky+OiR57rs6Pj7Enve3ln5r3Hbwg5fYujcc5fPolE1jCo+KpikuEQKQzRxmEqQWvNu+nQAK+EKb4KGRgbS3xYcvmGf8SvuOWaosCRZYXJL/bZsQisuMFL1CuDOikdO/Oac2THB8l3n2x0TvesUEjPCFsuXMWvk6bYmq8sVCNn8TUqzA965e1mbPLu2JU/+DhySdNSM1zIk8G04pNf7kNuMAOZpf0+/dO4ztk7ct1HW3OnDtamuz5ZYg8Mz5IEEaqoaC2tnbvXqp3XZUxvqDOtcBPnoaOOE54gn+/T+LhR5/tBwF/rHxvOh+2cbQT8tfz5hqH55cUPuDWcgbeK8/5B7DDb5Q9iclP7UvJfutp/vPyNbjcAAAAASUVORK5CYII=",ii[ri.ENTERPRISE]="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAAAXNSR0IArs4c6QAABh5JREFUWAnNWV1sFUUUPnsVqyChBhtbFK6tUoSCVSj+BF8M8khTizHGN00Mib7w5oNKDOqDT6YvPPkTE2LAH1Jq1Jj692ABgSr0T1O01xZLqQRBoUiB3vX7Znf2zs7u9m5vL8KXnLuzs2fmfHt25syZuY7MAq7rrkLzZsgKyCJDUJTjhgyg3OE4Ti8f/C8gOchbkCHITME2bMsXvDJA50sg70OmILMF+2BfS9KydYoporMboLMNsgVSYepPTLpyZFik/w9XTp0TOXMeMiHioNcFc0UqIQtvFmm4w5HGrMi8ioi5C+ivDbIVw+Ki2bddjrQ0FUCyCve7IY+Y9d05V77qc2VwTCTvmk+SyxlYqq8ReWylI2tqI2a/R8tWkD2Z1EOkhVYEyXtR7oDAFx6OnnDlw/2u/Dqua0q73n2byJMPObK0OmR+GL01g2xPXK8hTa3gk+zCPT4cvAa37dznSmef1ijPdcNKkacediRDd3vAAJJ1cWQDDa3pf+6DuFeePI9xuL3Tlf5RrVHea8PtIs9vcGRuYfzSs2vtYRAiCpKcOF9D1JgkydfbXRk7U15ydm81lSIvt4TIcsyuB9lggmWsRq/hXpHk56YnrzRJ2qcN2qJNH+TASBMg8Ci8yZg2CFEh6IOufNnHZGA1ocAx+/S6wHcMXcvg1RGqB7Uo05uKJGd3uScOjRUDbdK2jxtxJScF5VF4k0vaYYgi/kZ7PhSC3ttsvo/XMO538zt5uXg5+mT7MxmZc120Xtc893ZeF4Wh66WWwB4f3Aev9uqaZ1Ghygzmdpz8/LArfzFwxIDD6sBvrrQfcmWqYC+k2YnFYWJS5HqQNWX8H5FvBgIPqja0TQ4+yIncRHt0COVaVrz5aV5+Yd5joWKOyKutGanGDDXxZY8XY826uHJTnSMvIAwRfLmde7G69bviBpwKre5BHvbiRuU3Vubg0boMPjtXIEWSazeXxThMXhL5+EC015sY0FJgaXVB6Qt8IXo5jiS1yIFcfNSSI2kzn1RgglGIELq2cO0ZcYWETdx/J1YWz1Fmdah8yzyRR1d4Smcxlz8D0elADuRioJlEl+uKPmRB0+HSlEjPsbDOfMzN+prpmbY0OcFk2tPtyr9BGE+2xozMwHISxYjwkDRh9HNeu3PmnVduqo3W6ZrqBVhB6r0XGf9b5Dtr8mg9+8q00cCiEFHmk8VwZNiVy/CsidVI25J8+vhaJh2e9kc/JEcGsz+WLS4WUSS9xXABY7R/NPRZhGOwDvHPRvZWZBd3ea9ghR1bNXLPBNyAIhrcO0luCTS8Qvznjzbe9EDB07v2JQRZq299a3PhRwmiJrcPafDT70ggwk6VNYiTJpYhm1+12Ks7NBRdREzduLLF5XiIKPc4aXAOIWZwLMy0aj4SWHxqjSce9AYmV6u4+Kv1kq4WlzBRbsTSIu7z671QY9ZRazb7+haznLN9prC4KKI/6064W0wLrsdhn4pwmWQPmzDTCcZLxs1SYHEZ4PfhBk6hMYvMJCXX05iVuT91S+/KTJ3haPFC754rEIfJTEEO5GKgI4MFn7u+HCu57+aWNi1+LGQ5QZONq7035Yt09pbmTXIwzgCYlARp3h5tifvutDDSsUiTT5DAxOWmEcWYCouD4uZNTZF3oa8CHScEk9c0OIFJMno6qnnslMjeo6V5k7b1pETP5ERuXrJM16K8gxUEDwfSIs6ru/Ynp3DF+rVs7/C5hfZMr6AT5OGiTjC40UqDbgRzE8zArMzHfDxtmTaN0xNOQ3JS0J8eB1tqt9emH/AEg4cDxTCCz3zyrKfFRJhHPqWAtmjTQJvPSVUFRH0FvgE3/+qYhScYDDnFoGd/16ArHJ8zBW3QlnG0Qw5bzX5CRPEGTGlbIcNU4jELTzCKeZbjlDN898GZe5N9W6cktM2TvVB6HfI1yRH+Pir1IRkznfUNjjqK9HpI9zurQzJtwifLVSur6665Y0dNDGSrUL62D3INstwQb4NsgagjH/1MH40zJHG/pY/G+bwSWX85j8a1zaJXePeq/tlQlKCtAMJX5e+b2Flvk0u69yccDzB4NsBttxY24RZHC3PeDoQcZmol4T+lzFiWfEDREQAAAABJRU5ErkJggg==",ii[ri.UNAUTH]="",ii),si={background:"#fff",unameColor:"#000",subTextColor:"#00000061",unFollowImage:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAA4CAYAAAA2PDy+AAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAVUSURBVHgB7Z05dBNHGMe/XaUEnimBRmmgdRC93XOlhSZHwVFBgDqyXQOh5ChCw1GGo4/dg6MWmrgByvg9WvQ289Pqkyab2UO2VtIO83tvrX3S7Go9/++amX2rSApIlpeXJI6vSRStSpK0zWtbAovArtl6ZvtD+v0XUa+3k9cwcr1phG1Lq/W72V2VQBN4bIRedwkdZ99IOp1rRty/JIjbJH5Es+TkyevZD/4jsGnQNS/3zLYkgaaxZFLob0MNR4xC9MBzU3EDTSdJfom2twdaDgQe5lzCcvBcP9g1Ofk7cnIaolutNQni+sTSsEiWaOi9f0vAP/r9w7EZ534vAT+J4+uxqbzOS8BPomiFHLwsAV9pI3AorvylHUvAa4LAnhME9pwgsOf4K/DBgyJnz5a363bTdkePlrftdKQSZ86k561yzprxU2A69uXLtJNv3sxvhxCI2+2Wn3NtTeTBA5FLl8rbck42zj9n/BT440eR16/T/QsX8j1PPfzt2/SYPIgGBw6k+wiM0LyXx7Nn4+8uajcD/A3RDx+KfPqU7ru8GNFVeDWGPD5/Frl1Kz2nHvvkSX4I3txMj0Hc1VWZJ9/IvKBz8IQkEblypdiD9gIdrGFVO5tXhc/g/XuRV68qnXIgMOewDYbzF+XaGzfcYf3p07Gn18j8BCY/HTky3lfv2A95QiEAHWqj381r9rii4gxRiAwYBkbJufVcLjAsV5ieUeien8B1kNfRexEgC/mUXI2whGDlzp1xfra5fDn9Xtra7RXOMwP8EljDrgtE1NCKKHa4LgNx7WPt0OoSD4gCCIyQZTm+RvwSuKgjjx8f729tTZbzaX/xYioYQmMs00gpM+Drmcmyw/Ak3gsYAwJrWKVowqsbQP0eTBHiGvDbY1P2XZUmHjmt6lo9GHEnFViPI69SNZNz8eoGECWdTiJ1QoVaVOQUgbjnzpW3yzMQG64BY0OoKgUOedaVX7UoU8Nj3+XNmoMpzNhsuIYZDJHAjxxMR1adJ0aQKm3z8nk2AuDNRcZlT6goGIc3AhPW8kK0/uMuK4eq1SceWVT0uNIEHVwUqt+9y/+MMI1Ijx6lEzWuayclYEyMmbNpZtqTOgXULzD/jKvzsXpb4P1UpQhcFHZ1+MS1aIhF3L18J1OPapwIjIAYcRaMgDakqDlW3P5X0ceOjb2XiKCdTd60h05V0XxbtkCxIPgtMOLev5/ua95jQxy8+PbtydZsaVt1gWJB8FfgEydScbWCv3t3nHPX19PQimCsClW5MQC0mMJYqi5QzBn/BD50KJ1tQjjEpQhCUHvIg0DkTUTGk1nwL7sDwy7UXEXVglL/ODgPOgwPQ4CrV/efz06dEllZSUXQWasPH0Q2NvIF4RpYzrPXbPFMwm/2GAo1FZixOddLuM67a4Pr0bnovIocw6uZ+Qk8TfBYe7IBoyHXUuVWmbVCJF39URBYq2O9BQgwABWG44oWOMrACGrGj4kOxDx9Ot1//rx8jJsFj93eHt+jhdCsGtkQ4vF0jEYhxC94LvbDgwEvm8awRRfwXWE9e1dIA/BH4ICTcOO75wSBPScI7DlBYM8JAnsOAu9IwFd2g8B+04vNtF4z7h4LTE6SvIgGz4Rutf6RgH/0+9/GUa/Hw6X/lIBvPB4/q7Lf/9n8DV7sC0nCw0gHS14DgQdPCk+SDQn4QRyPnv4+GgcPni8cRageFh+ajNEwevNm9Nzv//1mw+Cx8FH0q9k9LIHmQFjGcy1xoehHOXgyyQ9F7QILw6bJuT+5fpSjULih0DyN9ryxkGXj2U1+rqU/RpokO0YLti358uXecCTk5F/in+zo4/hB1QAAAABJRU5ErkJggg==",followedImage:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAA4CAYAAAA2PDy+AAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAbmSURBVHgB7V1baBNZGD5JL2qLJoqKBkyqgsKC9cEHddm+69J93i32SbGhDeKLtNDom7psEFRslNbLU2XXZ130delCfdAXy3ZREbYVRUQ0QeqlzWW/b8gp6XQmM6nppHM4H4xJZk7OxPnO//23cQyIyghga8QWLL0PCo2VgCK2ArZ8aSvaDQxU2N+MrUFo+AE5bHPCgmgrgmmxTcKefI2VCZJLknPlO80WSmJpuZpc/4GcST4Lcmc5wbTcZqHhd5BT6aPngyay3yQ0VMG8iw2ad2goARkkz6c/jUJDNVCqA0GhUyGV0agJVhtBEqyrU+oiKH2whpoIaOtVHJpgxaEJVhyaYMWhLMFHjx4NX7p0qcNp3LVr15JXr15N9PT0hJzm6+/vjwkXuHLlSjfnFSsAjKBbhAcYGhrqDAQCIfGNSCQSt92Mu3HjxngwGGx//fr1wdOnTz+xGkNS9+/f/y/eZo4dO/Zdpflu3rw5jpfQhw8f4qdOnRqrNHZ4eHiwqakp+f79+0NOY5cbnpUo16xZkwLBrizAAa4IfvPmTTwSiYxv3br1DxB5cGRkJGses2fPnp+46GZmZvqd5vv06VO6paUltWHDhgewzvO9vb3n7MY+fvw4feDAgWQoFKIVHxJ1hGcWfPny5c7GxsYlW/Dq1auTXCCQyla335GW9PXrV0tCYJWTfH369OnhVCo15TQflCC2ffv2+/wddnNKYEHdwd+38+HDhxGrxeUVPCP4W3H9+vUHDQ0NHdUQXJJgSqswSzD9ZGtr67ATUWaUkRwCed9RBZqbm6PmcXQP3HK53D18zJiPf/z4ccwL+VaKYFhsCi8LVALfiRaLxWyhUFhgRbCuDlri3NzcqGmabDweryjZJBmKEqJvl79LVAmc9xzOc14sMzxtE5IAypZbSawWnNvOz4MEy+9AwrvLP2Mx8HctIpgWPzExcZdye/bs2fnfPj4+/svGjRsXuZ6dO3cmMHcClvrzq1evJszH371754lse0owJCtUo0DLElw4lY7v3r37vptxZkg5h9wPhsPhBYvz1q1blN9FEozFbOyDpWaXYzG7hVKNfqcLiaDK1TgzTpw4MQrCogzYuEiQDx+uJ2nVoC4Et7W1dabT6Uw136lFDg2ESxJcNegvURDJwvem/ERyXQjmRRIegxE1F4k52KoGfX19ach1FvnwoPAJ6kLw58+fe7BNixqBUe22bduOVBoD/2/4fpLM/Fg44MWLF7etLJRyjUj+Xsn3zp/fYoow/0CBJ2o+jupatvz7y4m6EDw1NfV3LeUNUazhH92Mlfmp07jNmzczR7X8jWZyd+zYMWk3DwgewfEF+2Kx2Bjm8KTCpUSQNTk5+WTXrl0VL9j69et/g/XuZU6MjxnWlB3mnLA7xkYCFkkUfjn+9u3bDNTDnEszZWvH+drz+fxds1vA55qplxN8SfDatWsDSD+KX758MT6XSoG2VaEzZ87EUEPei4s9RoKZL+O7WbsmRCXQl6NylZDBWuncixZLqUzans1m0/VsOPiuXQirEGgD/nPx4kVXkoyATkSjUcPnomEwND09bRQxtmzZMiyWANmgQAyRFj6A7wg+fvy4USyhRDqNJblocgyiitVNqTx58uQ9VqFgvf30w7CyqkmWEfTLly/r2gZ0C98RDGuUEaltkAbySESA5DL4gpz+9/z58wF5nOkOCB9lmZJdH6dmvwRvIJD1a78UOupCMGV2KSBxKBUaETCs8InVvLTaZDLZBnJ/l+SiNPmjmRAoQRydniH6Y3ac2M50Oj/KlYZbyGQyvpBnwtMgCxfbSC9Qyepet25d1Z0USGwMaYchkeUFfJAkVq1aFejq6grv27evD+/7sJtFjb+ePXvWa2dtsNwBqHSWCwGB2x28H0X+e95qPK2XXSMGagMDA8bi4m08kUjEzvpt82CJ8qbFcsHTduGFCxc6EM3eF992s32R/hQW2FU+L++eKLXt+G9jM7DwXynFbiYkAcCwbPuRRAZk9NlyjGwLzszMxFns4D6UW48wzxVLAKNwp9uEagFPLZjpAlbt95s2bWLVaUm1ZVz8iUePHi26bQcX/wda7Ozs7J88Xk2lqGRJh9g1gu/uI5FwB/O5rbRAkiLJJViNg3qMiqXBk3ahbxr+TuAdj7UKfKgIVrkrJdmrEmOtoAzBGtbQN74rDk2w4tAEKw5NsOLQBCsOElwQGqqiSIKLQkNVFLQFq408Cc4JDVWRlxKdFxqqgYZblFH0rNC+WCXIZ0cvesqdfuqdGiC5RmxVTqgMtjTJ/saCp76bySTJNG/9BDz/wfKR/pX+Uw4+Q1o/ZtgfYJBsGUc5Wan8fwC4aateOZBKy9ecqBAg/w8WW9VsAwRzxwAAAABJRU5ErkJggg=="},li=function(e){var t=e.user,n=e.showFollow,r=e.columnType,o=e.theme,s=e.onUserClick,l=e.onFollowClick,c=e.onUserInView,u=ti(),f=u[0],d=u[1],h=ni(d);return(0,i.useEffect)((function(){d&&c&&h!==d&&c(t)}),[d,c,t,h]),a().createElement(be,null,(function(e){var i=e.prefixCls;return a().createElement("div",{className:i+"-user-list__item",ref:f},a().createElement("div",{className:i+"-user-list__avatar",onClick:function(){return null==s?void 0:s(t)}},a().createElement(_n,{fit:"cover",width:"100%",height:"100%",radius:"50%",forceHttps:!0,bottomOverlap:a().createElement("div",{className:i+"-user-list__overlap"}),src:t.avatarUrl}),r===oi.SINGLE&&Boolean(ai[t.authType])&&a().createElement("img",{className:i+"-user-list__verified",src:ai[t.authType]})),a().createElement("div",{className:i+"-user-list__uname",style:{color:o.unameColor},onClick:function(){return null==s?void 0:s(t)}},a().createElement("span",{className:i+"-user-list__uname-text"},t.name),r===oi.SINGLE&&a().createElement("span",{className:i+"-user-list__uname-subtext",style:{color:o.subTextColor}},t.followersCountStr+"粉丝","·",t.videoTotalCount+"视频")),n&&a().createElement("div",{className:i+"-user-list__follow",onClick:function(){return null==l?void 0:l(t)}},a().createElement(_n,{fit:"cover",className:i+"-user-list__follow-img",bottomOverlap:a().createElement("div",{className:i+"-user-list__overlap"}),src:t.follow?o.followedImage:o.unFollowImage})))}))};const ci=(0,i.memo)(li);var ui=(0,i.forwardRef)((function(e,t){var n=e.showFrame,r=void 0!==n&&n,s=e.showFollow,l=void 0===s||s,c=e.theme,u=void 0===c?{}:c,f=e.columnType,d=void 0===f?1:f,h=e.users,p=e.onUserClick,v=e.onFollowClick,m=e.onUserInView,g=(0,i.useRef)(null),y=(0,i.useMemo)((function(){return d||1}),[d]),b=(0,i.useMemo)((function(){return function(e,t){var n=Array.from({length:Math.floor(e.length/t)},(function(n,r){return Array.from({length:t},(function(n,o){return e[r*t+o]}))})),r=n.length;return r*t",startPause:"",fullscreen:"",volumeLarge:"",volumeMuted:""}},yi=n(3279),bi=n.n(yi),wi=window.innerHeight||screen.availHeight||document.body.clientHeight,Ci=(0,i.createContext)(null),xi=Ci.Provider,Ei=function(e,t){var n=e.itemElsRef;switch(t.type){case"RegisterItemEl":return n.current=[].concat(n.current.filter((function(e){return e.id!==t.item.id})),[t.item]),e;case"UnregisterItemEl":return n.current=n.current.filter((function(e){return e.id!==t.id})),e;case"UpdateCurrentPlay":return o({},e,{currentPlay:t.id});case"SwitchCanUpdate":return e.canUpdateRef.current=t.canUpdate,e;default:return e}},ki=function(e){var t=e.canPlay,n=e.children,r=e.autoplay,o=(0,i.useRef)([]),s=(0,i.useRef)(!0),l=(0,i.useRef)(!1),c=(0,i.useReducer)(Ei,{currentPlay:null,canUpdateRef:s,itemElsRef:o}),u=c[0],f=c[1],d=(0,i.useCallback)(bi()((function(){if(s.current){var e=o.current.filter((function(e){var t=e.el.getBoundingClientRect(),n=t.top,r=t.height;return n>=0&&n+r<=wi}));if(!(e.filter((function(e){return e.id===(null==u?void 0:u.currentPlay)})).length>0))return r&&e.length>0?(l.current=!0,void f({type:"UpdateCurrentPlay",id:e[0].id})):void(u.currentPlay&&f({type:"UpdateCurrentPlay",id:null}))}}),300),[u,f,r]);return(0,i.useEffect)((function(){if(t)return r&&!l.current&&setTimeout((function(){return d()}),300),window.addEventListener("scroll",d),function(){return window.removeEventListener("scroll",d)};null!==u.currentPlay&&f({type:"UpdateCurrentPlay",id:null})}),[r,d,t,f,u.currentPlay]),a().createElement(xi,{value:{state:u,dispatch:f}},n)};const Ti=function(e){var t=e.prefixCls,n=e.color,r=e.title,o=e.onClick;return a().createElement("p",{className:t+"-video-feed__title",style:{color:n},onClick:o},r)},_i=function(e){var t=e.video,n=e.theme,r=e.onVideoClick,o=e.onUserClick,i=e.onFollowClick,s=t.userInfo,l=t.title;return s?a().createElement(be,null,(function(e){var t=e.prefixCls;return a().createElement("div",{className:t+"-video-feed__header"},a().createElement("div",{className:t+"-video-feed__avatar",onClick:function(){return o()}},a().createElement(_n,{fit:"cover",width:"100%",height:"100%",radius:"50%",forceHttps:!0,lazyload:!0,src:s.avatarUrl,bottomOverlap:a().createElement("div",{className:t+"-video-feed__overlap"})}),Boolean(pi[s.authType])&&a().createElement("img",{className:t+"-video-feed__verified",src:pi[s.authType]})),a().createElement("div",{className:t+"-video-feed__header-info"},a().createElement("p",{className:t+"-video-feed__user"},a().createElement("span",{className:t+"-video-feed__uname",style:{color:n.unameColor},onClick:function(){return o()}},s.name),a().createElement("span",{className:t+"-video-feed__follow",style:{color:s.follow?n.followedColor:n.unFollowColor,fontWeight:s.follow?"normal":"bold"},onClick:function(){return i()}},s.follow?"已关注":"关注",a().createElement("span",{className:t+"-video-feed__dot",style:{background:n.unameColor}}))),a().createElement(Ti,{prefixCls:t,color:n.titleColor,title:l,onClick:function(){return r()}})))})):null};var Oi=function(e){return e<1e4?""+e:Math.floor(e/1e4)+"."+Math.floor(e%1e4/1e3)+"万"},Si="play",Ai="playing",Ii="ended",Ri="pause",Pi="error",Mi="seeking",Ni="seeked",ji="timeupdate",Di="waiting",Li="canplay",Bi="canplaythrough",Fi="durationchange",Hi="volumechange",zi="loadeddata",Ui="ratechange",Vi="progress",Gi="loadstart",Wi="emptied",Xi="stalled",Yi="suspend",Ji="abort",qi="bufferedChange",Qi="focus",Ki="blur",Zi="ready",$i="urlNull",ea="autoplay_started",ta="autoplay_was_prevented",na="complete",ra="replay",oa="destroy",ia="urlchange",aa="fullscreen_change",sa="cssFullscreen_change",la="mini_state_change",ca="definition_change",ua="before_definition_change",fa="after_definition_change",da="SEI_PARSED",ha="retry",pa="video_resize",va="pip_change",ma=n(8370),ga=n.n(ma),ya=n(3835),ba=n.n(ya),wa="undefined"!=typeof window&&window.location&&window.location.href.indexOf("xgplayerdebug=1")>-1,Ca={info:"color: #525252; background-color: #90ee90;",error:"color: #525252; background-color: red;",warn:"color: #525252; background-color: yellow; "},xa="%c[xgplayer]》》",Ea={config:{debug:"undefined"!=typeof window&&window.location&&window.location.href.indexOf("playerdebug")>-1},logInfo:function(e){for(var t,n=arguments.length,r=Array(n>1?n-1:0),o=1;o1?n-1:0),o=1;o1?n-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=document.createElement(e);return o.className=r,o.innerHTML=t,Object.keys(n).forEach((function(t){var r=t,i=n[t];"video"===e||"audio"===e||"mobile-video"===e?i&&o.setAttribute(r,i):o.setAttribute(r,i)})),o},createDomFromHtml:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";try{var r=document.createElement("div");r.innerHTML=e;var o=r.children;return r=null,o.length>0?(o=o[0],n&&Ta.addClass(o,n),t&&Object.keys(t).forEach((function(e){o.setAttribute(e,t[e])})),o):null}catch(e){return Ea.logError("util.createDomFromHtml",e),null}},hasClass:function(e,t){if(!e)return!1;if(e.classList)return Array.prototype.some.call(e.classList,(function(e){return e===t}));var n=e.className&&"object"===ka(e.className)?e.getAttribute("class"):e.className;return n&&!!n.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))},addClass:function(e,t){e&&(e.classList?t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach((function(t){t&&e.classList.add(t)})):Ta.hasClass(e,t)||(e.className&&"object"===ka(e.className)?e.setAttribute("class",e.getAttribute("class")+" "+t):e.className+=" "+t))},removeClass:function(e,t){e&&(e.classList?t.split(/\s+/g).forEach((function(t){e.classList.remove(t)})):Ta.hasClass(e,t)&&t.split(/\s+/g).forEach((function(t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className&&"object"===ka(e.className)?e.setAttribute("class",e.getAttribute("class").replace(n," ")):e.className=e.className.replace(n," ")})))},toggleClass:function(e,t){e&&t.split(/\s+/g).forEach((function(t){Ta.hasClass(e,t)?Ta.removeClass(e,t):Ta.addClass(e,t)}))},findDom:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=arguments[1],n=void 0;try{n=e.querySelector(t)}catch(r){Ea.logError("util.findDom",r),0===t.indexOf("#")&&(n=e.getElementById(t.slice(1)))}return n},getCss:function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,!1)[t]},padStart:function(e,t,n){for(var r=String(n),o=t>>0,i=Math.ceil(o/r.length),a=[],s=String(e);i--;)a.push(r);return a.join("").substring(0,o-s.length)+s},format:function(e){if(window.isNaN(e))return"";e=Math.round(e);var t=Ta.padStart(Math.floor(e/3600),2,0),n=Ta.padStart(Math.floor((e-3600*t)/60),2,0),r=Ta.padStart(Math.floor(e-3600*t-60*n),2,0);return("00"===t?[n,r]:[t,n,r]).join(":")},event:function(e){if(e.touches){var t=e.touches[0]||e.changedTouches[0];e.clientX=t.clientX||0,e.clientY=t.clientY||0,e.offsetX=t.pageX-t.target.offsetLeft,e.offsetY=t.pageY-t.target.offsetTop}e._target=e.target||e.srcElement},typeOf:function(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]},deepCopy:function(e,t){if("Object"===Ta.typeOf(t)&&"Object"===Ta.typeOf(e))return Object.keys(t).forEach((function(n){"Object"!==Ta.typeOf(t[n])||t[n]instanceof Node?"Array"===Ta.typeOf(t[n])?e[n]="Array"===Ta.typeOf(e[n])?e[n].concat(t[n]):t[n]:e[n]=t[n]:void 0===e[n]||void 0===e[n]?e[n]=t[n]:Ta.deepCopy(e[n],t[n])})),e},deepMerge:function(e,t){return Object.keys(t).map((function(n){var r;"Array"===Ta.typeOf(t[n])&&"Array"===Ta.typeOf(e[n])?"Array"===Ta.typeOf(e[n])&&(r=e[n]).push.apply(r,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t-1&&r.indexOf(e)>-1&&(i=parseFloat(n.slice(0,n.indexOf(e)).trim()),a=parseFloat(r.slice(0,r.indexOf(e)).trim()),s=e,1))})),o.style.width=""+i+s,o.style.height=""+a+s,o.style.backgroundSize=""+i+s+" "+a+s,o.style.margin="start"===e?"-"+a/2+s+" auto auto -"+i/2+s:"auto 5px auto 5px"}return o},Hex2RGBA:function(e,t){var n=[];if(/^\#[0-9A-F]{3}$/i.test(e)){var r="#";e.replace(/[0-9A-F]/gi,(function(e){r+=e+e})),e=r}return/^#[0-9A-F]{6}$/i.test(e)?(e.replace(/[0-9A-F]{2}/gi,(function(e){n.push(parseInt(e,16))})),"rgba("+n.join(",")+", "+t+")"):"rgba(255, 255, 255, 0.1)"},getFullScreenEl:function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},checkIsFunction:function(e){return e&&"function"==typeof e},checkIsObject:function(e){return null!==e&&"object"===(void 0===e?"undefined":ka(e))},hide:function(e){e.style.display="none"},show:function(e,t){e.style.display=t||"block"},isUndefined:function(e){if(null==e)return!0},setStyleFromCsstext:function(e,t){t.replace(/\s+/g,"").split(";").map((function(t){if(t){var n=t.split(":");n.length>1&&(e.style[n[0]]=n[1])}}))},preloadImg:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},r=new window.Image;r.complete?t&&t():(r.onload=function(e){r=null,t&&t(e)},r.onerror=function(e){console.log("img.onerror"),r=null,n&&n(e)}),r.src=e},stopPropagation:function(e){e&&(e.stopPropagation(),e.cancelable&&e.preventDefault())},scrollTop:function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},scrollLeft:function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0}};const _a=Ta;var Oa={get device(){return Oa.os.isPc?"pc":"mobile"},get browser(){if("undefined"==typeof navigator)return"";var e=navigator.userAgent.toLowerCase(),t={ie:/rv:([\d.]+)\) like gecko/,firfox:/firefox\/([\d.]+)/,chrome:/chrome\/([\d.]+)/,opera:/opera.([\d.]+)/,safari:/version\/([\d.]+).*safari/};return[].concat(Object.keys(t).filter((function(n){return t[n].test(e)})))[0]},get os(){if("undefined"==typeof navigator)return{};var e=navigator.userAgent,t=/(?:Windows Phone)/.test(e),n=/(?:SymbianOS)/.test(e)||t,r=/(?:Android)/.test(e),o=/(?:Firefox)/.test(e),i=/(?:iPad|PlayBook)/.test(e)||r&&!/(?:Mobile)/.test(e)||o&&/(?:Tablet)/.test(e),a=/(?:iPhone)/.test(e)&&!i;return{isTablet:i,isPhone:a,isIos:a,isAndroid:r,isPc:!(a||r||n||i),isSymbian:n,isWindowsPhone:t,isFireFox:o}},get isWeixin(){return"undefined"!=typeof navigator&&(!!/(micromessenger)\/([\d.]+)/.exec(navigator.userAgent.toLocaleLowerCase())||void 0)}};const Sa=Oa,Aa=JSON.parse('{"i8":"3.0.0-alpha.84-5"}');function Ia(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Ra={network:{code:1,msg:"视频下载错误",remark:"只要视频下载错误就使用此类型,无论是video本身的超时还是xhr的分段请求超时或者资源不存在"},mse:{code:2,msg:"流追加错误",remark:"追加流的时候如果类型不对、无法被正确解码则会触发此类错误"},parse:{code:3,msg:"解析错误",remark:"mp4、hls、flv我们都是使用js进行格式解析,如果解析失败则会触发此类错误"},format:{code:4,msg:"格式错误",remark:"如果浏览器不支持的格式导致播放错误"},decoder:{code:5,msg:"解码错误",remark:"浏览器解码异常会抛出此类型错误"},runtime:{code:6,msg:"语法错误",remark:"播放器语法错误"},timeout:{code:7,msg:"播放超时",remark:"播放过程中无法正常请求下一个分段导致播放中断"},other:{code:8,msg:"其他错误",remark:"不可知的错误或被忽略的错误类型"}};const Pa=function e(t,n,r,o,i,a,s,l){var c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:{line:"",handle:"",msg:"",version:""},u=arguments[9],f=arguments[10];Ia(this,e);var d={};if(arguments.length>1)d.playerVersion=Aa.i8,d.errorType=t,d.domain=document.domain,d.duration=r,d.currentTime=n,d.networkState=o,d.readyState=i,d.currentSrc=s,d.src=a,d.ended=l,d.errd=c,d.ex=(Ra[t]||{}).msg,d.errorCode=u,d.mediaError=f;else{var h=arguments[0];Object.keys(h).map((function(e){d[e]=h[e]})),d.ex=(h.type&&Ra[h.type]||{}).msg}return d};var Ma=function(){function e(e,t){for(var n=0;n=this.currentTime)return{start:e.start(n),end:e.end(n)};return t}},{key:"crossOrigin",get:function(){return this.video.crossOrigin},set:function(e){this.video.crossOrigin=e}},{key:"currentSrc",get:function(){return this.video.currentSrc},set:function(e){this.video.currentSrc=e}},{key:"currentTime",get:function(){return this.video.currentTime||this._currentTime},set:function(e){this.video.currentTime=e}},{key:"defaultMuted",get:function(){return this.video.defaultMuted},set:function(e){this.video.defaultMuted=e}},{key:"duration",get:function(){return this._duration}},{key:"ended",get:function(){return this.video.ended}},{key:"error",get:function(){var e=this.video.error;return e?["MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED"][e.code-1]:null}},{key:"loop",get:function(){return this.video.loop},set:function(e){this.video.loop=e}},{key:"muted",get:function(){return this.video.muted},set:function(e){this.video.muted=e}},{key:"networkState",get:function(){return["NETWORK_EMPTY","NETWORK_IDLE","NETWORK_LOADING","NETWORK_NO_SOURCE"][this.video.networkState]}},{key:"paused",get:function(){return this.video.paused}},{key:"playbackRate",get:function(){return this.video.playbackRate},set:function(e){this.video.defaultPlaybackRate=e,this.video.playbackRate=e}},{key:"played",get:function(){return this.video.played}},{key:"preload",get:function(){return this.video.preload},set:function(e){this.video.preload=e}},{key:"readyState",get:function(){return["HAVE_NOTHING","HAVE_METADATA","HAVE_CURRENT_DATA","HAVE_FUTURE_DATA","HAVE_ENOUGH_DATA"][this.video.readyState]}},{key:"seekable",get:function(){return this.video.seekable}},{key:"seeking",get:function(){return this.video.seeking}},{key:"src",get:function(){return this.video.src},set:function(e){this.emit(ia,e),this._currentTime=0,this._duration=0,/^blob/.test(this.video.currentSrc)||/^blob/.test(this.video.src)?this.onWaiting():this.video.src=e}},{key:"volume",get:function(){return this.video.volume},set:function(e){this.video.volume=e}}]),e}();const Da=ja;var La=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{name:"xgplayer",version:1,db:null,ojstore:{name:"xg-m4a",keypath:"vid"}};Ba(this,e),this.indexedDB=window.indexedDB||window.webkitindexedDB,this.IDBKeyRange=window.IDBKeyRange||window.webkitIDBKeyRange,this.myDB=t}return La(e,[{key:"openDB",value:function(e){var t=this,n=this,r=this.myDB.version||1,o=n.indexedDB.open(n.myDB.name,r);o.onerror=function(e){},o.onsuccess=function(r){t.myDB.db=r.target.result,e.call(n)},o.onupgradeneeded=function(e){var t=e.target.result;e.target.transaction,t.objectStoreNames.contains(n.myDB.ojstore.name)||t.createObjectStore(n.myDB.ojstore.name,{keyPath:n.myDB.ojstore.keypath})}}},{key:"deletedb",value:function(){this.indexedDB.deleteDatabase(this.myDB.name)}},{key:"closeDB",value:function(){this.myDB.db.close()}},{key:"addData",value:function(e,t){for(var n=this.myDB.db.transaction(e,"readwrite").objectStore(e),r=void 0,o=0;o2&&void 0!==arguments[2]?arguments[2]:{};if(e&&t&&"function"==typeof t&&void 0!==t.prototype){var r=e._pluginInfoId;r&&this.pluginGroup&&this.pluginGroup[r]||(this.init(e),r=e._pluginInfoId),this.pluginGroup[r]._plugins||(this.pluginGroup[r]._plugins=[]);var o=this.pluginGroup[r]._plugins,i=this.pluginGroup[r]._originalOptions;n.player=this.pluginGroup[r]._player;var a=n.pluginName||t.pluginName;if(!a)throw new Error("The property pluginName is necessary");if(!t.isSupported||t.isSupported()){n.config||(n.config={});for(var s=Object.keys(i),l=0;l1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return n&&(t.pluginName=n),this.player.registerPlugin({plugin:e,options:t})}},{key:"getPlugin",value:function(e){return this.player.getPlugin(e)}},{key:"__destroy",value:function(){var e=this,t=this.player,n=this.pluginName;this.offAll(),_a.checkIsFunction(this.destroy)&&this.destroy(),["player","playerConfig","pluginName","logger"].map((function(t){Object.defineProperty(e,t,{writable:!0})})),Object.keys(this).map((function(t){e[t]=null,delete e[t]})),Object.setPrototypeOf&&Object.setPrototypeOf(this,null),t.unRegisterPlugin(n)}},{key:"lang",get:function(){return this.player.lang}},{key:"i18n",get:function(){return this.player.i18n}},{key:"i18nKeys",get:function(){return this.player.i18nKeys}}]),e}(),Qa=n(9438),Ka=n.n(Qa),Za=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},$a=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",i=null;if(e instanceof window.Element)return _a.addClass(e,n),Object.keys(r).map((function(t){e.setAttribute(t,r[t])})),e;if(rs(e)||rs(e.url))return r.src=rs(e)?e:e.url||"",i=_a.createDom(e.tag||"img","",r,"xg-img "+n);if("function"==typeof e)try{return(i=e())instanceof window.Element?(_a.addClass(i,n),Object.keys(r).map((function(e){i.setAttribute(e,r[e])})),i):(Ea.logWarn("warn>>icons."+t+" in config of plugin named ["+o+"] is a function mast return an Element Object"),null)}catch(e){return Ea.logError("Plugin named ["+o+"]:createIcon",e),null}return"string"==typeof e?_a.createDomFromHtml(e,r,n):(Ea.logWarn("warn>>icons."+t+" in config of plugin named ["+o+"] is invalid"),null)}var is=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ts(this,t);var n=ns(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.__delegates=[],n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),$a(t,null,[{key:"insert",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=t.children.length,o=Number(n),i=e instanceof window.Node;if(r){for(var a=0,s=null,l="";a=o){l="beforebegin";break}c4&&void 0!==arguments[4]&&arguments[4],i=[];if(e instanceof window.Node&&"function"==typeof r)if(Array.isArray(n))n.forEach((function(n){var a=Ka()(e,t,n,r,o);a.key=t+"_"+n,i.push(a)}));else{var a=Ka()(e,t,n,r,o);a.key=t+"_"+n,i.push(a)}return i}},{key:"defaultConfig",get:function(){return{}}}]),$a(t,[{key:"__init",value:function(e){Za(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"__init",this).call(this,e);var n=e.root,r=null;this.icons={},function(e,t){var n=t.config.icons||t.playerConfig.icons;Object.keys(e).map((function(r){var o=e[r],i=o&&o.class?o.class:"",a=o&&o.attr?o.attr:{},s=null;n&&n[r]&&(i=function(e,t){return"object"===(void 0===e?"undefined":es(e))&&e.class&&"string"==typeof e.class?t+" "+e.class:t}(n[r],i),a=function(e,t){return"object"===(void 0===e?"undefined":es(e))&&e.attr&&"object"===es(e.attr)&&Object.keys(e.attr).map((function(n){t[n]=e.attr[n]})),t}(n[r],a),s=os(n[r],r,i,a,t.pluginName)),!s&&o&&(s=os(o.icon?o.icon:o,a,i,{},t.pluginName)),t.icons[r]=s}))}(this.registerIcons()||{},this),this.langText={};var o,i,a=this.registerLangauageTexts()||{};o=a,i=this,Object.keys(o).map((function(e){Object.defineProperty(i.langText,e,{get:function(){var t=i.lang;return o[e][t]||o[e].zh}})}));var s="";try{s=this.render()}catch(e){throw Ea.logError("Plugin:"+this.pluginName+":render",e),new Error("Plugin:"+this.pluginName+":render:"+e.message)}if(s)(r=t.insert(s,n,e.index)).setAttribute("data-index",e.index);else{if(!e.tag)return;(r=_a.createDom(e.tag,"",e.attr,e.name)).setAttribute("data-index",e.index),n.appendChild(r)}t.defineGetterOrSetter(this,{root:{get:function(){return r},configurable:!0},parent:{get:function(){return n},configurable:!0}});var l=this.config.attr||{},c=this.config.style||{};this.setAttr(l),this.setStyle(c),this.config.index&&this.root.setAttribute("data-index",this.config.index),this.__registeChildren()}},{key:"__registeChildren",value:function(){var e=this;if(this.root){var t=this.children();t&&"object"===(void 0===t?"undefined":es(t))&&(this._children||(this._children=[]),Object.keys(t).length>0&&Object.keys(t).map((function(n){var r=n,o=t[r],i={root:e.root},a=void 0,s=void 0;"function"==typeof o?(a=e.config[r]||{},s=o):"object"===(void 0===o?"undefined":es(o))&&"function"==typeof o.plugin&&(a=o.options?_a.deepCopy(e.config[r]||{},o.options):e.config[r]||{},s=o.plugin),i.config=a,void 0!==a.index&&(i.index=a.index),a.root&&(i.root=a.root),e.registerPlugin(s,i,r)})))}}},{key:"updateLang",value:function(e){e||(e=this.lang);var t=this.root,n=this.i18n,r=this.langText;t&&function e(t,n){for(var r=0;r0?e(t.children[r],n):n(t.children[r])}(t,(function(t){var o=t.getAttribute&&t.getAttribute("lang-key");if(o){var i=n[o.toUpperCase()]||r[o];i&&(t.innerHTML="function"==typeof i?i(e):i)}}))}},{key:"changeLangTextKey",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.i18n||{},r=this.langText;e.setAttribute&&e.setAttribute("lang-key",t);var o=n[t.toUpperCase()]||r[t];o&&(e.innerHTML=o)}},{key:"plugins",value:function(){return this._children}},{key:"children",value:function(){return{}}},{key:"registerPlugin",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";n.root=n.root||this.root;var o=Za(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"registerPlugin",this).call(this,e,n,r);return this._children.push(o),o}},{key:"registerIcons",value:function(){return{}}},{key:"registerLangauageTexts",value:function(){return{}}},{key:"find",value:function(e){if(this.root)return this.root.querySelector(e)}},{key:"bind",value:function(e,n,r){var o=this;if(arguments.length<3&&"function"==typeof n)Array.isArray(e)?e.forEach((function(e){o.bindEL(e,n)})):this.bindEL(e,n);else{var i=t.delegate.call(this,this.root,e,n,r);this.__delegates=this.__delegates.concat(i)}}},{key:"unbind",value:function(e,t,n){var r=this;if(arguments.length<3&&"function"==typeof t)Array.isArray(e)?e.forEach((function(e){r.unbindEL(e,t)})):this.unbindEL(e,t);else for(var o=e+"_"+t,i=0;i2&&void 0!==arguments[2]&&arguments[2];this.root&&"on"+e in this.root&&"function"==typeof t&&this.root.addEventListener(e,t,n)}},{key:"unbindEL",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.root&&"on"+e in this.root&&"function"==typeof t&&this.root.removeEventListener(e,t,n)}},{key:"show",value:function(e){if(this.root)return this.root.style.display=void 0!==e?e:"block","none"===window.getComputedStyle(this.root,null).getPropertyValue("display")?this.root.style.display="block":void 0}},{key:"hide",value:function(){this.root&&(this.root.style.display="none")}},{key:"appendChild",value:function(e,t){if(arguments.length<2&&arguments[0]instanceof window.Element)return this.root.appendChild(arguments[0]);if(!(t&&t instanceof window.Element))return null;try{return"string"==typeof e?this.find(e).appendChild(t):e.appendChild(t)}catch(e){return Ea.logError("Plugin:appendChild",e),null}}},{key:"render",value:function(){return""}},{key:"destroy",value:function(){}},{key:"__destroy",value:function(){var e=this,n=this.player;this.__delegates.map((function(e){e.destroy()})),this.__delegates=[],this._children instanceof Array&&(this._children.map((function(e){n.unRegisterPlugin(e.pluginName)})),this._children=null),this.root&&(this.root.hasOwnProperty("remove")?this.root.remove():this.root.parentNode&&this.root.parentNode.removeChild(this.root)),Za(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"__destroy",this).call(this),["root","parent"].map((function(t){Object.defineProperty(e,t,{writable:!0})}))}},{key:"lang",get:function(){return this.player.lang}}]),t}(qa),as={ROOT:"root",ROOT_LEFT:"rootLeft",ROOT_RIGHT:"rootRight",ROOT_TOP:"rootTop",CONTROLS_LEFT:"controlsLeft",CONTROLS_RIGTH:"controlsRight",CONTROLS_RIGHT:"controlsRight",CONTROLS_CENTER:"controlsCenter",CONTROLS:"controls"};is.POSITIONS=as,is.ROOT_TYPES={CONTROLS:"controls",ROOT:"root"};const ss="xgplayer-is-enter",ls="xgplayer-pause",cs="xgplayer-playing",us="xgplayer-ended",fs="xgplayer-isloading",ds="xgplayer-is-error",hs="xgplayer-replay",ps="xgplayer-nostart",vs="xgplayer-inactive",ms="xgplayer-is-fullscreen",gs="xgplayer-is-cssfullscreen",ys="xgplayer-rotate-fullscreen",bs="not-allow-autoplay",ws="seeking";function Cs(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t3?r-3:0),i=3;i2&&void 0!==arguments[2]?arguments[2]:{pre:null,next:null};return this.__hooks||(this.__hooks={}),!this.__hooks[e]&&(this.__hooks[e]=null),function(){var r=this,o=arguments;if(n.pre)try{var i;(i=n.pre).call.apply(i,[this].concat(Array.prototype.slice.call(arguments)))}catch(t){throw t.message="[pluginName: "+this.pluginName+":"+e+":pre error] >> "+t.message,t}if(this.__hooks&&this.__hooks[e])try{var a,s=(a=this.__hooks[e]).call.apply(a,[this].concat(Array.prototype.slice.call(arguments)));s&&(s.then?s.then((function(e){e&&xs.apply(void 0,[r,t,n.next].concat(Array.prototype.slice.call(o)))})).catch((function(e){throw e})):xs.apply(void 0,[this,t,n.next].concat(Array.prototype.slice.call(arguments))))}catch(t){throw t.message="[pluginName: "+this.pluginName+":"+e+"] >> "+t.message,t}else xs.apply(void 0,[this,t,n.next].concat(Array.prototype.slice.call(arguments)))}.bind(this)}function ks(e,t){var n=this.__hooks;return n.hasOwnProperty(e)?(n&&(n[e]=t),!0):(console.warn("has no supported hook which name ["+e+"]"),!1)}function Ts(e){if(this.plugins&&this.plugins[e.toLowerCase()]){for(var t=this.plugins[e.toLowerCase()],n=arguments.length,r=Array(n>1?n-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:{},r=arguments[2];if(this.root){var o=e.defaultConfig||{};if(!n.root){var i=n.position?n.position:n.config&&n.config.position?n.config.position:o.position;switch(i){case as.CONTROLS_LEFT:n.root=this.left;break;case as.CONTROLS_RIGHT:n.root=this.right;break;case as.CONTROLS_CENTER:n.root=this.center;break;case as.CONTROLS:n.root=this.root;break;default:n.root=this.left}return Ss(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"registerPlugin",this).call(this,e,n,r)}}}},{key:"destroy",value:function(){"mobile"===Sa.device&&(this.unbind("mouseenter",this.onMouseEnter),this.unbind("mouseleave",this.onMouseLeave))}},{key:"render",value:function(){if(!this.config.disable){var e="flex"===this.config.mode?"flex-controls ":"";return e+=this.config.autoHide?"control_autohide":"controls_permanent xgplayer-controls-initshow",'\n \n \n \n \n \n \n \n '}}},{key:"mode",get:function(){return this.config.mode}}],[{key:"pluginName",get:function(){return"controls"}},{key:"defaultConfig",get:function(){return{disable:!1,autoHide:!0,mode:"",initShow:!1}}}]),t}(is);const Ps=Rs;var Ms={},Ns={},js=[];function Ds(){Object.keys(Ms.en).map((function(e){Ns[e]=e.toLowerCase()}))}function Ls(e){var t=e.LANG,n=e.TEXT||{};Ms[t]||js.push(t),Ms[t]?_a.deepMerge(Ms[t],n):Ms[t]=n,"zh-cn"===t&&(Ms.zh=Ms["zh-cn"]),Ds()}Ls({LANG:"en",TEXT:{HAVE_NOTHING:"There is no information on whether audio/video is ready",HAVE_METADATA:"Audio/video metadata is ready ",HAVE_CURRENT_DATA:"Data about the current play location is available, but there is not enough data to play the next frame/millisecond",HAVE_FUTURE_DATA:"Current and at least one frame of data is available",HAVE_ENOUGH_DATA:"The available data is sufficient to start playing",NETWORK_EMPTY:"Audio/video has not been initialized",NETWORK_IDLE:"Audio/video is active and has been selected for resources, but no network is used",NETWORK_LOADING:"The browser is downloading the data",NETWORK_NO_SOURCE:"No audio/video source was found",MEDIA_ERR_ABORTED:"The fetch process is aborted by the user",MEDIA_ERR_NETWORK:"An error occurred while downloading",MEDIA_ERR_DECODE:"An error occurred while decoding",MEDIA_ERR_SRC_NOT_SUPPORTED:"Audio/video is not supported",REPLAY:"Replay",ERROR:"Network is offline",PLAY_TIPS:"Play",PAUSE_TIPS:"Pause",PLAYNEXT_TIPS:"Play next",DOWNLOAD_TIPS:"Download",ROTATE_TIPS:"Rotate",RELOAD_TIPS:"Reload",FULLSCREEN_TIPS:"Fullscreen",EXITFULLSCREEN_TIPS:"Exit fullscreen",CSSFULLSCREEN_TIPS:"Cssfullscreen",EXITCSSFULLSCREEN_TIPS:"Exit cssfullscreen",TEXTTRACK:"Caption",PIP:"PIP",SCREENSHOT:"Screenshot",LIVE:"LIVE",OFF:"Off",OPEN:"Open",MINI_DRAG:"Click and hold to drag",MINISCREEN:"Miniscreen",REFRESH_TIPS:"Please Try",REFRESH:"Refresh"}}),Ls({LANG:"zh-cn",TEXT:{HAVE_NOTHING:"没有关于音频/视频是否就绪的信息",HAVE_METADATA:"音频/视频的元数据已就绪",HAVE_CURRENT_DATA:"关于当前播放位置的数据是可用的,但没有足够的数据来播放下一帧/毫秒",HAVE_FUTURE_DATA:"当前及至少下一帧的数据是可用的",HAVE_ENOUGH_DATA:"可用数据足以开始播放",NETWORK_EMPTY:"音频/视频尚未初始化",NETWORK_IDLE:"音频/视频是活动的且已选取资源,但并未使用网络",NETWORK_LOADING:"浏览器正在下载数据",NETWORK_NO_SOURCE:"未找到音频/视频来源",MEDIA_ERR_ABORTED:"取回过程被用户中止",MEDIA_ERR_NETWORK:"当下载时发生错误",MEDIA_ERR_DECODE:"当解码时发生错误",MEDIA_ERR_SRC_NOT_SUPPORTED:"不支持的音频/视频格式",REPLAY:"重播",ERROR:"网络连接似乎出现了问题",PLAY_TIPS:"播放",PAUSE_TIPS:"暂停",PLAYNEXT_TIPS:"下一集",DOWNLOAD_TIPS:"下载",ROTATE_TIPS:"旋转",RELOAD_TIPS:"重新载入",FULLSCREEN_TIPS:"进入全屏",EXITFULLSCREEN_TIPS:"退出全屏",CSSFULLSCREEN_TIPS:"进入样式全屏",EXITCSSFULLSCREEN_TIPS:"退出样式全屏",TEXTTRACK:"字幕",PIP:"画中画",SCREENSHOT:"截图",LIVE:"正在直播",OFF:"关闭",OPEN:"开启",MINI_DRAG:"点击按住可拖动视频",MINISCREEN:"小屏幕",REFRESH_TIPS:"请试试",REFRESH:"刷新"}});const Bs={get textKeys(){return Ns},get langKeys(){return js},get lang(){var e={};return js.map((function(t){e[t]=Ms[t]})),e.zh=Ms["zh-cn"],e},extend:function(e){Object.keys(e).map((function(t){Ms[t]||(Ms[t]={}),"zh"===t?_a.deepMerge(Ms["zh-cn"],e[t]):_a.deepMerge(Ms[t],e[t])})),Ds()},use:Ls};var Fs=function(){function e(e,t){for(var n=0;n=0&&t.defaultPreset&&(o.config.presets[i]=t.defaultPreset)}else t.defaultPreset&&o.config.presets.push(t.defaultPreset);return o.userTimer=null,o.waitTimer=null,o.isReady=!1,o.isPlaying=!1,o.isSeeking=!1,o.isCanplay=!1,o._runPending=!1,o.rotateDeg=0,o.isActive=!1,o.isCssfullScreen=!1,o.fullscreen=!1,o._fullscreenEl=null,o._originCssText="",o._fullScreenOffset=null,o._videoHeight=0,o._videoWidth=0,o._played={begin:-1,end:-1,acc:0},o.database=new Ha,o._initDOM()?(o._bindEvents(),o._registerPresets(),o._registerPlugins(),Xa.onPluginsReady(o),setTimeout((function(){o.emit(Zi),o.onReady&&o.onReady(),o.isReady=!0}),0),(o.config.videoInit||o.config.autoplay)&&(o.hasStart||o.start()),o):(console.error(new Error("can't find the dom which id is "+o.config.id+" or this.config.el does not exist")),zs(o))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),Fs(t,[{key:"_initDOM",value:function(){var e=this;if(this.root=this.config.id?document.getElementById(this.config.id):null,!this.root){var t=this.config.el;if(!t||1!==t.nodeType)return this.emit(Pi,new Pa("use",this.config.vid,{line:32,handle:"Constructor",msg:"container id can't be empty"})),console.error("this.confg.id or this.config.el can't be empty"),!1;this.root=t}var n=Xa.checkPlayerRoot(this.root);if(n&&(Ea.logWarn("The is an Player instance already exists in this.root, destroy it and reinitialize"),n.destroy()),this._initBaseDoms(),this.config.controls){var r=Xa.register(this,Ps);this.controls=r}var o=this.config.isMobileSimulateMode?"mobile":Sa.device;if(this.addClass("xgplayer xgplayer-inactive xgplayer-"+o+" "+(this.config.controls?"":"no-controls")),this.config.autoplay?this.addClass(ss):this.addClass(ps),this.config.fluid){var i={"max-width":"100%",width:"100%",height:"0","padding-top":100*this.config.height/this.config.width+"%",position:"position",top:"0",left:"0"};Object.keys(i).map((function(t){e.root.style[t]=i[t]}))}else["width","height"].map((function(t){e.config[t]&&("number"!=typeof e.config[t]?e.root.style[t]=e.config[t]:e.root.style[t]=e.config[t]+"px")}));return!0}},{key:"_initBaseDoms",value:function(){this.topBar=_a.createDom("xg-bar","",{"data-index":-1},"xg-top-bar"),this.leftBar=_a.createDom("xg-bar","",{"data-index":-1},"xg-left-bar"),this.rightBar=_a.createDom("xg-bar","",{"data-index":-1},"xg-right-bar"),this.config.marginControls&&(this.innerContainer=_a.createDom("xg-video-container","",{"data-index":-1},"xg-video-container"),this.root.appendChild(this.innerContainer)),this.root.appendChild(this.topBar),this.root.appendChild(this.leftBar),this.root.appendChild(this.rightBar)}},{key:"_bindEvents",value:function(){var e=this;["focus","blur"].forEach((function(t){e.on(t,e["on"+t.charAt(0).toUpperCase()+t.slice(1)])}));var t=function(){e.fullscreen=!1,e._fullScreenOffset=null,e._fullscreenEl=null};this.onFullscreenChange=function(n,r){var o=_a.getFullScreenEl();if(r||o&&(o===e._fullscreenEl||"VIDEO"===o.tagName))e.fullscreen=!0,e.addClass(ms),e.emit(aa,!0,e._fullScreenOffset),e.isCssfullScreen&&e.exitCssFullscreen();else if(e.fullscreen){var i=e._fullScreenOffset;if(e.config.needFullsreenScroll)try{window.scrollTo(i.left,i.top),setTimeout((function(){t()}),100)}catch(e){Ea.logError(e),t()}else e.video.focus(),t();e._originCssText&&!e.isCssfullScreen&&(_a.setStyleFromCsstext(e.root,e._originCssText),e._originCssText=""),e.removeClass(ms),e.emit(aa,!1)}},za.forEach((function(t){document&&document.addEventListener(t,e.onFullscreenChange)})),this.__webkitbeginfullscreen=function(t){e._fullscreenEl=e.video,e.onFullscreenChange(t,!0)},this.__webkitendfullscreen=function(t){e.onFullscreenChange(t,!1)},Sa.os.isIos&&(this.video.addEventListener("webkitbeginfullscreen",this.__webkitbeginfullscreen),this.video.addEventListener("webkitendfullscreen",this.__webkitendfullscreen)),this.once("loadeddata",this.getVideoSize),this.playFunc=function(){e.config.closeFocusVideoFocus||e.video.focus()},this.once("play",this.playFunc)}},{key:"_unbindEvents",value:function(){var e=this;this.root.removeEventListener("mousemove",this.mousemoveFunc),za.forEach((function(t){document.removeEventListener(t,e.onFullscreenChange)})),this.playFunc&&this.off("play",this.playFunc),this.canPlayFunc&&this.off("canplay",this.canPlayFunc),this.video.removeEventListener("webkitbeginfullscreen",this.__webkitbeginfullscreen),this.video.removeEventListener("webkitendfullscreen",this.__webkitendfullscreen)}},{key:"_startInit",value:function(e){var t=this,n=this.root,r=this.innerContainer;(e&&""!==e||(this.emit($i),Ea.logWarn("config.url is null, please get url and run player._startInit(url)"),!this.config.nullUrlStart))&&(this.canPlayFunc=function(){if(t.config){var e=t.config,n=e.autoplay,r=e.startTime,o=e.volume;Ea.logInfo("player","canPlayFunc",r),t.volume="number"==typeof o?o:.6,r&&(t.currentTime=r>t.duration?t.duration:r),n&&t.videoPlay(),t.off(Li,t.canPlayFunc),t.removeClass(ss)}},"String"===_a.typeOf(e)?this.video.src=e:e.forEach((function(e){t.video.appendChild(_a.createDom("source","",{src:""+e.src,type:""+(e.type||"")}))})),this.loadeddataFunc&&this.once("loadeddata",this.loadeddataFunc),r?r.firstChild!==this.video&&this.innerContainer.insertBefore(this.video,this.innerContainer.firstChild):n.firstChild!==this.video&&n.insertBefore(this.video,n.firstChild),this.once(Li,this.canPlayFunc),Ea.logInfo("_startInit"),this.config.autoplay&&(this.load(),Sa.os.isPhone&&this.videoPlay()),setTimeout((function(){t.emit(na)}),1),this.hasStart||Xa.afterInit(this),this.hasStart=!0)}},{key:"_registerPlugins",value:function(){var e=this;this._loadingPlugins=[];var t=this.config.ignores||[],n=this.config.plugins||[],r=t.join("||").toLowerCase().split("||");n.map((function(t){try{var n=t.plugin?t.plugin.pluginName:t.pluginName;if(n&&r.indexOf(n.toLowerCase())>-1)return null;if(t.lazy&&t.loader){var o=Xa.lazyRegister(e,t);return void(t.forceBeforeInit&&(o.then((function(){e._loadingPlugins.splice(e._loadingPlugins.indexOf(o),1)})).catch((function(t){Ea.logError("_registerPlugins:loadingPlugin",t),e._loadingPlugins.splice(e._loadingPlugins.indexOf(o),1)})),e._loadingPlugins.push(o)))}return e.registerPlugin(t)}catch(e){return Ea.logError("_registerPlugins:",e),null}}))}},{key:"_registerPresets",value:function(){var e=this;this.config.presets.forEach((function(t){var n,r,o,i,a,s,l,c,u,f,d;n=e,l=void 0===(s=(a=(r=t).preset&&r.options?new r.preset(r.options,n.config):new r({},n.config)).plugins)?[]:s,u=void 0===(c=a.ignores)?[]:c,f=a.icons,d=void 0===f?{}:f,n.config.plugins||(n.config.plugins=[]),n.config.ignores||(n.config.ignores=[]),(o=n.config.plugins).push.apply(o,Cs(l)),(i=n.config.ignores).push.apply(i,Cs(u)),Object.keys(d).map((function(e){n.config.icons[e]||(n.config.icons[e]=d[e])}))}))}},{key:"registerPlugin",value:function(e){var t=null,n=null;e.plugin&&"function"==typeof e.plugin?(t=e.plugin,n=e.options):(t=e,n={});for(var r=Object.keys(this.config),o=0;o-1)return this.controls&&this.controls.registerPlugin(t,n,t.pluginName);if(!n.root)switch(a){case s.ROOT_RIGHT:n.root=this.rightBar;break;case s.ROOT_LEFT:n.root=this.leftBar;break;case s.ROOT_TOP:n.root=this.topBar;break;default:n.root=this.innerContainer||this.root}return Xa.register(this,t,n)}},{key:"unRegisterPlugin",value:function(e){"string"==typeof e?Xa.unRegister(this,e):e instanceof qa&&Xa.unRegister(this,e.pluginName)}},{key:"getPlugin",value:function(e){var t=Xa.findPlugin(this,e);return t&&t.pluginName?t:null}},{key:"addClass",value:function(e){this.root&&(_a.hasClass(this.root,e)||_a.addClass(this.root,e))}},{key:"removeClass",value:function(e){this.root&&_a.removeClass(this.root,e)}},{key:"hasClass",value:function(e){if(this.root)return _a.hasClass(this.root,e)}},{key:"setAttribute",value:function(e,t){this.root&&this.root.setAttribute(e,t)}},{key:"removeAttribute",value:function(e,t){this.root&&this.root.removeAttribute(e,t)}},{key:"start",value:function(e){var t=this;if(!this.hasStart)return this.hasStart=!0,Xa.beforeInit(this).then((function(){return e||(e=t.url||t.config.url),t._startInit(e)})).catch((function(e){throw e.fileName="player",e.lineNumber="236",Ea.logError("start:beforeInit:",e),e}))}},{key:"load",value:function(){this.video&&this.video.load()}},{key:"videoPlay",value:function(){var e=this;if(!this.hasStart)return this.removeClass(ps),this.addClass(ss),void this.start().then((function(t){!e.config.autoplay&&e.videoPlay()}));this.isPlaying||(this.removeClass(ps),!this.isCanplay&&this.addClass(ss));var n=Hs(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"play",this).call(this);return void 0!==n&&n&&n.then?n.then((function(){e.removeClass(bs),e.addClass(cs),e.isPlaying||(Ea.logInfo(">>>>playPromise.then"),e.isPlaying=!0,e.emit(ea))})).catch((function(t){if(Ea.logWarn(">>>>playPromise.catch",t.name),e.video&&e.video.error)return e.onError(),e.errorHandler("error"),void e.removeClass(ss);"NotAllowedError"===t.name&&(e._errorTimer=setTimeout((function(){e._errorTimer=null,clearTimeout(e._errorTimer),e.emit(ta),e.addClass(bs),e.removeClass(ss),e.pause()}),0))})):(Ea.logWarn("video.play not return promise"),this.isPlaying||(this.isPlaying=!0,this.removeClass(bs),this.removeClass(ps),this.removeClass(ss),this.addClass(cs),this.emit(ea))),n}},{key:"play",value:function(){var e=this;this.removeClass(ls);var t=this.__hooks;if(!t||!t.play)return this.videoPlay();var n=t.play.call(this);if(!n||!n.then)return this.videoPlay();n.then((function(){return e.videoPlay()})).catch((function(t){return e.videoPlay()}))}},{key:"seek",value:function(e){var t=this;if(this.video&&!isNaN(Number(e))){var n=this.config,r=n.isSeekedPlay,o=n.seekedStatus,i=r?"play":o;e=e<0?0:e>this.duration?parseInt(this.duration,10):e,this.once(Li,(function(){switch(t.removeClass(ss),t.isSeeking=!1,i){case"play":t.play();break;case"pause":t.pause();break;default:!t.paused&&t.play()}})),this.isPlaying?this.currentTime=e:(this.removeClass(ps),this.addClass(ss),this.currentTime=e,"play"===i&&this.play())}}},{key:"reload",value:function(){this.load(),this.reloadFunc=function(){this.play().catch((function(e){console.log(e)}))},this.once("loadeddata",this.reloadFunc)}},{key:"resetClasses",value:function(){var e=this;[bs,cs,ps,ls,hs,ss,us,ds].forEach((function(t){e.removeClass(t)}))}},{key:"destroy",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=this.innerContainer,r=this.root,o=this.video;if(r){if(this._unbindEvents(),clearTimeout(this.waitTimer),clearTimeout(this._errorTimer),Xa.destroy(this),r.removeChild(this.topBar),r.removeChild(this.leftBar),r.removeChild(this.rightBar),Hs(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this),n){for(var i=n.children,a=0;a0?r.className=s.filter((function(e){return e.indexOf("xgplayer")<0})).join(" "):r.className="",this.removeAttribute("data-xgfill")}for(var l in this)delete this[l];Object.setPrototypeOf&&Object.setPrototypeOf(this,null)}}},{key:"replay",value:function(){var e=this;this.removeClass(us),this.once(Li,(function(){var t=e.play();t&&t.catch&&t.catch((function(e){console.log(e)}))})),this.currentTime=0,this.isSeeking=!1,this.play(),this.emit(ra),this.onPlay()}},{key:"retry",value:function(){this.removeClass(ds),this.addClass(fs);var e=this.currentTime;this.pause(),this.src=this.config.url,this.currentTime=e,this.play()}},{key:"getFullscreen",value:function(e){var t=this.root,n=this.video;e||(e=t),this._fullScreenOffset={top:_a.scrollTop(),left:_a.scrollLeft()},t.getAttribute("style")&&(this._originCssText=t.style.cssText,t.removeAttribute("style")),this._fullscreenEl=e;for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{autoHide:!0,delay:0};if(this.isActive=!0,this.removeClass(vs),this.userTimer&&clearTimeout(this.userTimer),!1!==t.autoHide){var n=t&&t.delay?t.delay:this.config.inactive;this.userTimer=setTimeout((function(){e.emit(Ki)}),n)}}},{key:"onBlur",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{ignoreStatus:!1};if(this.isActive){var t=this.config.closePauseVideoFocus;this.isActive=!1,(e.ignoreStatus||t||!this.paused&&!this.ended)&&this.addClass(vs)}}},{key:"onCanplay",value:function(){this.removeClass(ss),this.isCanplay=!0}},{key:"onPlay",value:function(){this.removeClass(ls),this.ended&&this.removeClass(us),!this.config.closePlayVideoFocus&&this.emit(Qi)}},{key:"onPause",value:function(){this.addClass(ls),this.config.closePauseVideoFocus&&(this.userTimer&&clearTimeout(this.userTimer),this.emit(Qi))}},{key:"onEnded",value:function(){this.addClass(us)}},{key:"onError",value:function(){this.removeClass(bs),this.removeClass(ps),this.removeClass(ss),this.addClass(ds)}},{key:"onSeeking",value:function(){if(!this.isSeeking){var e=this._played;e.acc+=e.begin-1?e.end-e.begin:0,e.begin=parseInt(1e3*this.video.currentTime,10),e.end=-1}this.isSeeking=!0,this.addClass(ws)}},{key:"onSeeked",value:function(){this.isSeeking=!1,this.waitTimer&&clearTimeout(this.waitTimer),this.removeClass(fs),this.removeClass(ws)}},{key:"onWaiting",value:function(){var e=this;this.waitTimer&&clearTimeout(this.waitTimer),this.waitTimer=setTimeout((function(){e.addClass(fs),clearTimeout(e.waitTimer),e.waitTimer=null}),500)}},{key:"onPlaying",value:function(){var e=this;[ps,ls,us,ds,hs].forEach((function(t){e.removeClass(t)}))}},{key:"onTimeupdate",value:function(){!this._videoHeight&&this.getVideoSize(),(this.waitTimer||this.hasClass(fs))&&this.checkBuffer()&&(this.removeClass(fs),clearTimeout(this.waitTimer),this.waitTimer=null),this._played.begin<0&&(this._played.begin=parseInt(1e3*this.video.currentTime,10)),this._played.end=parseInt(1e3*this.video.currentTime,10)}},{key:"checkBuffer",value:function(e){var t=this.video.buffered;if(!t||0===t.length)return!0;for(var n=e||this.video.currentTime+.2,r=t.length,o=0;on)return!0;return!1}},{key:"getVideoSize",value:function(){var e=this.video.videoWidth,t=this.video.videoHeight,n=this.config,r=n.fitVideoSize,o=n.videoFillMode;if("fill"!==o&&"cover"!==o||this.setAttribute("data-xgfill",o),t&&e){this._videoHeight=t,this._videoWidth=e;var i=this.root.getBoundingClientRect(),a=this.controls&&this.innerContainer?this.controls.root.getBoundingClientRect().height:0,s=i.width,l=i.height-a,c=parseInt(e/t*1e3,10),u=parseInt(s/l*1e3,10),f=s,d=l;"auto"===r&&u>c||"fixWidth"===r?(d=s/c*1e3,this.root.style.height=d+a+"px"):("auto"===r&&uc)&&this.setAttribute("data-xgfill","cover"),this.emit(pa,{videoScale:c,vWidth:f,vHeight:d,cWidth:f,cHeight:d+a})}}},{key:"updateObjectPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.video.updateObjectPosition?this.video.updateObjectPosition(e,t):this.video.style.objectPosition=100*e+"% "+100*t+"%"}},{key:"plugins",get:function(){return Xa.getPlugins(this)}},{key:"lang",set:function(e){0!==Bs.langKeys.filter((function(t){return t===e})).length||"zh"===e?(this.config.lang=e,Xa.setLang(e,this)):console.error("Sorry, set lang fail, because the language ["+e+"] is not supported now, list of all supported languages is ["+Bs.langKeys.join()+"] ")},get:function(){return this.config.lang}},{key:"i18n",get:function(){var e=this.config.lang;return Bs.lang[e]||{}}},{key:"i18nKeys",get:function(){return Bs.textKeys||{}}},{key:"version",get:function(){return Aa.i8}},{key:"url",set:function(e){this.__url=e},get:function(){return this.__url||this.config.url}},{key:"poster",set:function(e){this.plugins.poster&&this.plugins.poster.update(e)}},{key:"fullscreen",get:function(){return this._isFullScreen},set:function(e){this._isFullScreen=e}},{key:"readyState",get:function(){var e=Hs(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"readyState",this);return this.i18n[e]||e}},{key:"error",get:function(){var e=Hs(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"error",this);return this.i18n[e]||e}},{key:"networkState",get:function(){var e=Hs(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"networkState",this);return this.i18n[e]||e}},{key:"fullscreenChanging",get:function(){return!(null===this._fullScreenOffset)}},{key:"cumulateTime",get:function(){var e=this._played,t=e.acc,n=e.end,r=e.begin;return r>-1&&n>r?(t+n-r)/1e3:t/1e3}}],[{key:"install",value:function(e,n){t.plugins||(t.plugins={}),t.plugins[e]||(t.plugins[e]=n)}},{key:"use",value:function(e,n){t.plugins||(t.plugins={}),t.plugins[e]=n}}]),t}(Da),Gs=function(){function e(e,t){for(var n=0;n'}}},{key:"afterCreate",value:function(){var e=this;_s(this),is.insert(this.icons.replay,this.root,0),this.__handleReplay=this.hook("replayHandler",(function(){e.player.replay()}),{pre:function(e){e.preventDefault(),e.stopPropagation()}}),this.bind("svg",["click","touchend"],this.__handleReplay),this.bind(".xgplayer-replay-txt",["click","touchend"],this.__handleReplay),this.on(Ii,(function(){if(e.playerConfig.loop||_a.addClass(e.player.root,"replay"),!e.config.disable){e.show();var t=e.root.querySelector("path");if(t){var n=window.getComputedStyle(t).getPropertyValue("transform");if("string"==typeof n&&n.indexOf("none")>-1)return null;t.setAttribute("transform",n)}}})),this.on(Si,(function(){e.hide()}))}},{key:"handleReplay",value:function(e){e.preventDefault(),e.stopPropagation(),this.player.replay(),_a.removeClass(this.player.root,"replay")}},{key:"show",value:function(){this.config.disable||(this.root.style.display="flex")}},{key:"enable",value:function(){this.config.disable=!1}},{key:"disable",value:function(){this.config.disable=!0,this.hide()}},{key:"destroy",value:function(){this.unbind("svg",["click","touchend"],this.__handleReplay),this.unbind(".xgplayer-replay-txt",["click","touchend"],this.__handleReplay)}},{key:"render",value:function(){return'\n '+(this.i18n.REPLAY||"重播")+"\n "}}],[{key:"pluginName",get:function(){return"replay"}},{key:"defaultConfig",get:function(){return{disable:!1}}}]),t}(is);const Js=Ys;var qs=function(){function e(e,t){for(var n=0;n\n '}},{key:"isEndedShow",set:function(e){this.config.isEndedShow=e},get:function(){return this.config.isEndedShow}}],[{key:"pluginName",get:function(){return"poster"}},{key:"defaultConfig",get:function(){return{isEndedShow:!0,hideCanplay:!1,poster:""}}}]),t}(is);const $s=Zs;var el=function(){function e(e,t){for(var n=0;n',class:"xg-icon-play"},startPause:{icon:'',class:"xg-icon-pause"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(e.startPlay),this.appendChild(e.startPause)}},{key:"hide",value:function(){_a.addClass(this.root,"hide")}},{key:"show",value:function(){_a.removeClass(this.root,"hide")}},{key:"focusHide",value:function(){_a.addClass(this.root,"focus-hide")}},{key:"recover",value:function(){_a.removeClass(this.root,"focus-hide")}},{key:"switchStatus",value:function(e){e?this.setAttr("data-state",this.player.paused?"pause":"play"):this.setAttr("data-state",this.player.paused?"play":"pause")}},{key:"animate",value:function(e){var t=this;!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{start:null,end:null};tl[e]&&window.clearTimeout(tl[e].id),tl[e]={},n.start&&n.start(),tl[e].id=window.setTimeout((function(){n.end&&n.end(),window.clearTimeout(tl[e].id),delete tl[e]}),t)}("pauseplay",400,{start:function(){_a.addClass(t.root,"interact"),t.show(),t.switchStatus(!0)},end:function(){_a.removeClass(t.root,"interact"),!e&&t.hide()}})}},{key:"switchPausePlay",value:function(e){var t=this.player;e.preventDefault(),e.stopPropagation(),t.isReady&&(!this.player.paused&&t.isPlaying?t.pause():t.play())}},{key:"onPlayPause",value:function(e){var t=this.config,n=this.player;if(n.isPlaying&&this.autoPlayStart){if("show"===t.mode)return this.switchStatus(),void this.show();if("auto"!==t.mode){if(t.isShowPause&&n.paused&&!n.ended||t.isShowEnd&&n.ended)return this.switchStatus(),void this.show();if(t.disableAnimate)return this.switchStatus(),void this.hide();if("play"===e)this.autoPlayStart?this.animate():this.hide();else{if(!this.autoPlayStart)return;this.animate()}}else this.switchStatus()}}},{key:"destroy",value:function(){this.unbind(["click","touchend"],this.clickHandler),Object.keys(tl).map((function(e){window.clearTimeout(tl[e].id),delete tl[e]}))}},{key:"render",value:function(){return'\n \n '}}]),t}(is);const rl=nl;var ol=function(){function e(e,t){for(var n=0;n';t.innerHTML='
'+n+"
"}return t}}],[{key:"pluginName",get:function(){return"enter"}},{key:"defaultConfig",get:function(){return{innerHtml:"",logo:""}}}]),t}(is);const ll=sl;var cl=function(){function e(e,t){for(var n=0;n\n
'+this.i18n[e]+"
\n "}}],[{key:"pluginName",get:function(){return"miniscreenIcon"}},{key:"defaultConfig",get:function(){return{position:as.CONTROLS_RIGHT,index:10}}}]),t}(is);const hl=dl;var pl=function(){function e(e,t){for(var n=0;n',class:"xg-icon-play"},pause:{icon:'',class:"xg-icon-pause"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".play-icon",e.play),this.appendChild(".play-icon",e.pause)}},{key:"onCancelClick",value:function(e){e.preventDefault(),e.stopPropagation(),this.exitMini(),this.isClose=!0}},{key:"onCenterClick",value:function(e){var t=this.player;t.paused?t.play():t.pause()}},{key:"onScroll",value:function(e){if(!(!window.scrollY&&0!==window.scrollY||Math.abs(window.scrollY-this.coordinate.scrollY)<50)){var t=parseInt(_a.getCss(this.player.root,"height"));t+=this.config.scrollTop,this.coordinate.scrollY=window.scrollY,window.scrollY>t+5?!this.isMini&&!this.isClose&&this.getMini():window.scrollY<=t&&(this.isMini&&this.exitMini(),this.isClose=!1)}}},{key:"onMousedown",value:function(e){e.target!==this.root||this.isMoveing||(this.isMoveing=!0,this.coordinate.currentX=e.clientX,this.coordinate.currentY=e.clientY,this.bind("mouseup",this.onMouseup),this.bind("mousemove",this.onMousemove))}},{key:"onMouseup",value:function(e){if(e.target===this.root&&this.isMoveing){this.isMoveing=!1,this.clientWidth=window.innerWidth;var t=this.config.target||this.player.root;this.pos.top=parseInt(_a.getCss(t,"top")),this.pos.left=parseInt(_a.getCss(t,"left")),this.unbind("mousemove",this.onMousemove),this.unbind("mouseup",this.onMouseup)}}},{key:"onMousemove",value:function(e,t){e=e||window.event;var n=this.config.target||this.player.root,r=window.innerHeight-parseInt(_a.getCss(n,"height")),o=window.innerWidth-parseInt(_a.getCss(n,"width"));if(this.isMoveing){var i=e.clientX,a=e.clientY,s=i-this.coordinate.currentX,l=a-this.coordinate.currentY,c=parseInt(this.pos.top)+l,u=parseInt(this.pos.left)+s;return u<0?u=0:u>o&&(u=o),c<0?c=0:c>r&&(c=r),n.style.left=u+"px",n.style.top=c+"px","function"==typeof t&&t(u,c),e.preventDefault&&e.preventDefault(),!1}}},{key:"getMini",value:function(){var e=this;if(!this.isMini){var t=this.player,n=this.playerConfig,r=this.config.target||this.player.root;this.lastStyle={},_a.addClass(t.root,"xgplayer-mini"),Object.keys(this.pos).map((function(t){e.lastStyle[t]=r.style[t],r.style[t]=e.pos[t]+"px"})),n.fluid&&(r.style["padding-top"]=""),this.emit(la,!0),t.isMini=this.isMini=!0}}},{key:"exitMini",value:function(){var e=this;if(!this.isMini)return!1;var t=this.player,n=this.playerConfig,r=this.config.target||this.player.root;_a.removeClass(t.root,"xgplayer-mini"),this.lastStyle&&Object.keys(this.lastStyle).map((function(t){r.style[t]=e.lastStyle[t]})),this.lastStyle=null,n.fluid&&(t.root.style.width="100%",t.root.style.height="0",t.root.style["padding-top"]=100*n.height/n.width+"%"),this.emit(la,!1),this.isMini=t.isMini=!1}},{key:"destroy",value:function(){window.removeEventListener("scroll",this.onScroll),this.unbind(".mini-cancel-btn","click",this.onCancelClick),this.unbind(".play-icon","click",this.onCenterClick),this.unbind("mousedown",this.onMousedown)}},{key:"render",value:function(){if(!this.config.disable)return'\n \n
\n \n
'+this.i18n.MINI_DRAG+'
\n
\n
X
\n
\n
\n
'}}]),t}(is),ml=function(){function e(e,t){for(var n=0;n0?n.replay:null:n.paused?n.play:n.pause)&&(r.clickTimer=setTimeout((function(){i.call(n),clearTimeout(r.clickTimer),r.clickTimer=null}),200))}},r.onVideoDblClick=function(e){var t=r,n=t.player,o=t.playerConfig;e.target&&e.target===n.video&&!o.closeVideoDblclick&&(r.clickTimer&&(clearTimeout(r.clickTimer),r.clickTimer=null),e.preventDefault(),e.stopPropagation(),n.fullscreen?n.exitFullscreen():n.getFullscreen())},yl(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),ml(t,[{key:"afterCreate",value:function(){var e=this.playerConfig,t=e.enableContextmenu;e.isMobileSimulateMode||"mobile"===Sa.device||(this.config.disableContextmenu=!t,this.initEvents())}},{key:"initEvents",value:function(){var e=this,t=this.player,n=t.video,r=t.root;n.addEventListener("click",this.onVideoClick,!1),n.addEventListener("dblclick",this.onVideoDblClick,!1),Object.keys(bl).map((function(t){r.addEventListener(t,e[bl[t]],!1)})),this.config.disableContextmenu&&n.addEventListener("contextmenu",this.onContextmenu,!1)}},{key:"onContextmenu",value:function(e){(e=e||window.event).preventDefault&&e.preventDefault(),e.stopPropagation?e.stopPropagation():(e.returnValue=!1,e.cancelBubble=!0)}},{key:"destroy",value:function(){var e=this,t=this.player,n=t.video,r=t.root;this.clickTimer&&clearTimeout(this.clickTimer),n.removeEventListener("click",this.onVideoClick,!1),n.removeEventListener("dblclick",this.onVideoDblClick,!1),n.removeEventListener("contextmenu",this.onContextmenu,!1),Object.keys(bl).map((function(t){r.removeEventListener(t,e[bl[t]],!1)}))}}],[{key:"pluginName",get:function(){return"pc"}},{key:"defaultConfig",get:function(){return{disableContextmenu:!0}}}]),t}(qa);const Cl=wl;var xl=function(){function e(e,t){for(var n=0;n0?e[e.length-1]:null}var Sl=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{eventType:"touch"};El(this,e),this._pos={moving:!1,start:!1,x:0,y:0},this.config={pressDelay:600,dbClickDelay:300,disablePress:!1,disableDbClick:!1,miniStep:2},Object.keys(r).map((function(e){n.config[e]=r[e]})),this.root=t,this.events="mouse"===r.eventType?_l:Tl,this.pressIntrvalId=null,this.dbIntrvalId=null,this.__handlers={},this._initEvent()}return xl(e,[{key:"_initEvent",value:function(){this.onTouchStart=this.onTouchStart.bind(this),this.onTouchMove=this.onTouchMove.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.onTouchCancel=this.onTouchCancel.bind(this),this.root.addEventListener(this.events.start,this.onTouchStart)}},{key:"__stopPropagation",value:function(e){e&&(e.stopPropagation(),e.cancelable&&e.preventDefault())}},{key:"__setPress",value:function(e){var t=this,n=this.config;this.pressIntrvalId&&this.__clearPress(),this.pressIntrvalId=setTimeout((function(){t.trigger("press",e),t._pos.press=!0,t.__clearPress()}),n.pressDelay)}},{key:"__clearPress",value:function(){window.clearTimeout(this.pressIntrvalId),this.pressIntrvalId=null}},{key:"__setDb",value:function(e){var t=this,n=this.config;if(this.dbIntrvalId)return this.__clearDb(),void this.trigger("doubleclick",e);this.dbIntrvalId=setTimeout((function(){t.__clearDb(),t._pos.start||t._pos.press||t._pos.moving||t.trigger("click",e)}),n.dbClickDelay)}},{key:"__clearDb",value:function(){clearTimeout(this.dbIntrvalId),this.dbIntrvalId=null}},{key:"on",value:function(e,t){this.__handlers[e]||(this.__handlers[e]=[]),this.__handlers[e].push(t)}},{key:"off",value:function(e,t){if(this.__handlers[e]){for(var n=this.__handlers[e],r=-1,o=0;o=0&&this.__handlers[e].splice(r,1)}}},{key:"offAll",value:function(){}},{key:"trigger",value:function(e,t){this.__handlers[e]&&this.__handlers[e].map((function(n){try{n(t)}catch(t){console.error("trigger>>:"+e,t)}}))}},{key:"onTouchStart",value:function(e){var t=this._pos,n=this.root,r=Ol(e.touches);t.x=r?parseInt(r.pageX,10):e.pageX,t.y=r?parseInt(r.pageX,10):e.pageX,t.start=!0,this.__setPress(e),n.addEventListener(this.events.end,this.onTouchEnd),n.addEventListener(this.events.cancel,this.onTouchCancel),n.addEventListener(this.events.move,this.onTouchMove),this.trigger("touchstart",e)}},{key:"onTouchCancel",value:function(e){this.onTouchEnd(e)}},{key:"onTouchEnd",value:function(e){var t=this._pos,n=this.root;this.__clearPress(),n.removeEventListener(this.events.cancel,this.onTouchCancel),n.removeEventListener(this.events.end,this.onTouchEnd),n.removeEventListener(this.events.move,this.onTouchMove),e.moving=t.moving,e.press=t.press,t.press&&this.trigger(kl,e),this.trigger("touchend",e),!t.press&&!t.moving&&this.__setDb(),t.press=!1,t.start=!1,t.moving=!1}},{key:"onTouchMove",value:function(e){var t=this._pos,n=this.config,r=Ol(e.touches),o=r?parseInt(r.pageX,10):e.pageX,i=r?parseInt(r.pageY,10):e.pageX,a=o-t.x,s=i-t.y;Math.abs(s)0&&!t.ended){o.isStart=!0,_a.checkIsFunction(i.disableSwipeHandler)&&i.disableSwipeHandler(),n.find(".xg-dur").innerHTML=_a.format(n.duration);var s=n.root.getBoundingClientRect();90===t.rotateDeg?(o.top=s.left,o.left=s.top,o.width=s.height,o.height=s.width):(o.top=s.top,o.left=s.left,o.width=s.width,o.height=s.height),o.x=parseInt(a.pageX-o.left,10),o.y=parseInt(a.pageY-o.top,10),o.scopeL=r.scopeL*o.width,o.scopeR=(1-r.scopeR)*o.width,o.scopeM1=o.width*(1-r.scopeM)/2,o.scopeM2=o.width-o.scopeM1}},n.onTouchMove=function(e){var t=n.getTouche(e),r=n.pos,o=n.config,i=n.player;if(t&&!o.disableGesture&&n.duration&&r.isStart){var a=o.miniMoveStep,s=o.hideControlsActive,l=parseInt(t.pageX-r.left,10),c=parseInt(t.pageY-r.top,10);if(Math.abs(l-r.x)>a||Math.abs(c-r.y)>a){var u=l-r.x,f=c-r.y,d=r.scope;if(-1===d&&(0===(d=n.checkScope(l,c,u,f,r))&&(s?i.emit(Ki):i.emit(Qi,{autoHide:!1}),!r.time&&(r.time=parseInt(1e3*i.currentTime,10)+1e3*n.timeOffset)),r.scope=d),-1===d||d>0&&!o.gestureY||0===d&&!o.gestureX)return;e.cancelable&&e.preventDefault(),n.executeMove(u,f,d,r.width,r.height),r.x=l,r.y=c}}},n.onTouchEnd=function(e){var t=n.player,r=n.pos,o=n.playerConfig;r.isStart&&(r.scope>-1&&e.cancelable&&e.preventDefault(),n.endLastMove(r.scope),setTimeout((function(){t.getPlugin("progress")&&t.getPlugin("progress").resetSeekState()}),10),r.scope=-1,n.resetPos(),_a.checkIsFunction(o.enableSwipeHandler)&&o.enableSwipeHandler(),n.changeAction(Rl))},n.onRootTouchMove=function(e){!n.config.disableGesture&&n.config.gestureX&&n.checkIsRootTarget(e)&&(e.stopPropagation(),n.pos.isStart?n.onTouchMove(e):n.onTouchStart(e))},n.onRootTouchEnd=function(e){if(n.pos.isStart&&n.checkIsRootTarget(e)){e.stopPropagation(),n.onTouchEnd(e);var t=n.player.controls;t&&t.recoverAutoHide()}},n.pos={isStart:!1,x:0,y:0,time:0,volume:0,rate:1,light:0,width:0,height:0,scopeL:0,scopeR:0,scopeM1:0,scopeM2:0,scope:-1},n.timer=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),Il(t,null,[{key:"pluginName",get:function(){return"mobile"}},{key:"defaultConfig",get:function(){return{stopPropagation:!0,index:0,disableGesture:!1,gestureX:!0,gestureY:!0,updateGesture:function(){},onTouchStart:function(){},onTouchEnd:function(){},gradient:"normal",isTouchingSeek:!1,miniMoveStep:5,miniYPer:5,scopeL:.25,scopeR:.25,scopeM:.9,pressRate:2,darkness:!0,maxDarkness:.8,disableActive:!1,disableTimeProgress:!1,hideControlsActive:!1,hideControlsEnd:!1,moveDuration:36e4,closedbClick:!1,disablePress:!0,disableSeekIcon:!1}}}]),Il(t,[{key:"registerIcons",value:function(){return{seekTipIcon:{icon:'',class:"xg-seek-pre"}}}},{key:"afterCreate",value:function(){var e=this,t=this.playerConfig,n=this.config,r=this.player;!0===t.closeVideoDblclick&&(n.closedbClick=!0),this.resetPos(),_a.isUndefined(t.disableGesture)||(n.disableGesture=!!t.disableGesture),this.appendChild(".xg-seek-icon",this.icons.seekTipIcon),this.xgMask=_a.createDom("xg-mask","",{},"xgmask"),r.root.appendChild(this.xgMask),this.initCustomStyle(),this.registerThumbnail();var o="mobile"!==Sa.device?"mouse":"touch";this.touch=new Al(this.root,{eventType:o}),this.root.addEventListener("contextmenu",(function(e){e.preventDefault()})),r.root.addEventListener("touchmove",this.onRootTouchMove,!0),r.root.addEventListener("touchend",this.onRootTouchEnd,!0),this.on(Fi,(function(){var t=e.player,n=e.config;1e3*t.duration0&&(e.pos.time=0)}));var i={touchstart:"onTouchStart",touchmove:"onTouchMove",touchend:"onTouchEnd",press:"onPress",pressend:"onPressEnd",click:"onClick",doubleclick:"onDbClick"};if(Object.keys(i).map((function(t){e.touch.on(t,(function(n){e[i[t]](n)}))})),!n.disableActive){var a=r.plugins.progress;a&&(a.addCallBack("dragmove",(function(t){e.activeSeekNote(t.currentTime,t.forward)})),a.addCallBack("dragend",(function(){e.changeAction(Rl)})))}}},{key:"registerThumbnail",value:function(){var e=this.player.plugins.thumbnail;if(e&&e.usable){this.thumbnail=e.createThumbnail(null,"mobile-thumbnail");var t=this.find(".time-preview");t.insertBefore(this.thumbnail,t.children[0])}}},{key:"initCustomStyle",value:function(){var e=(this.playerConfig||{}).commonStyle,t=e.playedColor,n=e.progressColor;t&&(this.find(".xg-curbar").style.backgroundColor=t,this.find(".xg-cur").style.color=t),n&&(this.find(".xg-bar").style.backgroundColor=n,this.find(".time-preview").style.color=n),this.config.disableTimeProgress&&_a.addClass(this.find(".xg-timebar"),"hide")}},{key:"resetPos",value:function(){var e=this;this.pos?(this.pos.isStart=!1,this.pos.scope=-1,["x","y","width","height","scopeL","scopeR","scopeM1","scopeM2"].map((function(t){e.pos[t]=0}))):this.pos={isStart:!1,x:0,y:0,volume:0,rate:1,light:0,width:0,height:0,scopeL:0,scopeR:0,scopeM1:0,scopeM2:0,scope:-1,time:0}}},{key:"changeAction",value:function(e){var t=this.player;this.root.setAttribute("data-xg-action",e);var n=t.plugins.start;n&&n.recover()}},{key:"getTouche",value:function(e){this.player.rotateDeg;var t=e.touches&&e.touches.length>0?e.touches[e.touches.length-1]:e;return{pageX:t.pageX,pageY:t.pageY}}},{key:"checkScope",value:function(e,t,n,r,o){var i=o.width,a=-1;if(e<0||e>i)return a;var s=0===r?Math.abs(n):Math.abs(n/r);return Math.abs(n)>0&&s>=1.73&&e>o.scopeM1&&eo.scopeR?2:3),a}},{key:"executeMove",value:function(e,t,n,r,o){switch(n){case 0:this.updateTime(e/r*this.config.scopeM);break;case 1:this.updateBrightness(t/o);break;case 2:Sa.os.isIos||this.updateVolume(t/o)}}},{key:"endLastMove",value:function(e){var t=this,n=this.pos,r=this.player,o=this.config;if(0===e){var i=(n.time-this.timeOffset)/1e3;r.seek(Number(i).toFixed(1)),o.hideControlsEnd?r.emit(Ki):r.emit(Qi),this.timer=setTimeout((function(){t.pos.time=0}),500)}this.changeAction(Rl)}},{key:"checkIsRootTarget",value:function(e){var t=this.player.plugins||{};return(!t.progress||!t.progress.root.contains(e.target))&&(t.start&&t.start.root.contains(e.target)||t.controls&&t.controls.root.contains(e.target))}},{key:"onClick",value:function(e){var t=this.player,n=this.config,r=this.playerConfig;t.isPlaying?!n.closedbClick||r.closeVideoClick?t.isActive?t.emit(Ki):t.emit(Qi):r.closeVideoClick||(t.isActive&&this.switchPlayPause(),t.emit(Qi)):!r.closeVideoClick&&t.play()}},{key:"onDbClick",value:function(e){var t=this.config,n=this.player;!t.closedbClick&&n.isPlaying&&this.switchPlayPause()}},{key:"onPress",value:function(e){var t=this.pos,n=this.config,r=this.player;n.disablePress||(t.rate=this.player.playbackRate,r.playbackRate=n.pressRate,this.changeAction("playbackrate"))}},{key:"onPressEnd",value:function(e){var t=this.pos,n=this.config,r=this.player;n.disablePress||(r.playbackRate=t.rate,t.rate=1,this.changeAction(Rl))}},{key:"updateTime",value:function(e){var t=this.player,n=this.config,r=this.player.duration;e=Number(e.toFixed(4));var o=parseInt(e*n.moveDuration,10)+this.timeOffset;o=(o+=this.pos.time)<0?0:o>1e3*r?1e3*r-200:o,t.getPlugin("time")&&t.getPlugin("time").updateTime(o/1e3),t.getPlugin("progress")&&t.getPlugin("progress").updatePercent(o/1e3/this.duration,!0),this.activeSeekNote(o/1e3,e>0),n.isTouchingSeek&&t.seek(Number((o-this.timeOffset)/1e3).toFixed(1)),this.pos.time=o}},{key:"updateVolume",value:function(e){this.player.rotateDeg&&(e=-e);var t=this.player,n=this.pos;if(e=parseInt(100*e,10),n.volume+=e,!(Math.abs(n.volume)<10)){var r=parseInt(10*t.volume,10)-parseInt(n.volume/10,10);r=r>10?10:r<1?0:r,t.volume=r/10,n.volume=0}}},{key:"updateBrightness",value:function(e){this.player.rotateDeg&&(e=-e);var t=this.pos,n=this.config,r=this.xgMask,o=t.light+.8*e;o=o>n.maxDarkness?n.maxDarkness:o<0?0:o,r&&(r.style.backgroundColor="rgba(0,0,0,"+o+")"),t.light=o}},{key:"activeSeekNote",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.player,r=this.config,o=!(this.duration!==1/0&&this.duration>0);if(e&&"number"==typeof e&&!o&&!r.disableActive){e<0?e=0:e>n.duration&&(e=n.duration-.2),this.changeAction(Pl);var i=n.plugins.start;i&&i.focusHide(),this.find(".xg-dur").innerHTML=_a.format(this.duration),this.find(".xg-cur").innerHTML=_a.format(e),this.find(".xg-curbar").style.width=e/this.duration*100+"%",t?_a.removeClass(this.find(".xg-seek-show"),"xg-back"):_a.addClass(this.find(".xg-seek-show"),"xg-back"),this.updateThumbnails(e)}}},{key:"updateThumbnails",value:function(e){var t=this.player.plugins.thumbnail;t&&t.usable&&this.thumbnail&&t.update(this.thumbnail,e,160,90)}},{key:"switchPlayPause",value:function(){var e=this.player;if(!e.hasStart)return!1;e.ended||(e.paused?e.play():e.pause())}},{key:"disableGesture",value:function(){this.config.disableGesture=!1}},{key:"enableGesture",value:function(){this.config.disableGesture=!0}},{key:"destroy",value:function(){var e=this.player;this.timer&&clearTimeout(this.timer),this.thumbnail=null,e.root.removeChild(this.xgMask),this.xgMask=null,this.touch&&this.touch.destroy(),this.touch=null,e.root.removeEventListener("touchmove",this.onRootTouchMove,!0),e.root.removeEventListener("touchend",this.onRootTouchEnd,!0)}},{key:"render",value:function(){return'\n \n
\n
\n
\n \n 00:00\n /\n 00:00\n
\n
\n
\n
\n
\n
\n '+this.config.pressRate+"X快进中\n
\n
\n "}},{key:"duration",get:function(){return this.playerConfig.customDuration||this.player.duration}},{key:"timeOffset",get:function(){return this.playerConfig.timeOffset||0}}]),t}(is);const Nl=Ml;var jl=function(){function e(e,t){for(var n=0;n0&&r-o>t/100)}},{key:"checkCode",value:function(e,t){var n=this,r=!1;return Object.keys(this.keyCodeMap).map((function(o){n.keyCodeMap[o]&&e===n.keyCodeMap[o].keyCode&&(r=!t||t&&!n.keyCodeMap[o].noBodyTarget)})),r}},{key:"downVolume",value:function(){var e=this.player;e.volume-.1>=0?e.volume=parseFloat((e.volume-.1).toFixed(1)):e.volume=0}},{key:"upVolume",value:function(){var e=this.player;e.volume+.1<=1?e.volume=parseFloat((e.volume+.1).toFixed(1)):e.volume=1}},{key:"seek",value:function(){var e=this.player;e.currentTime+this.seekStep<=e.duration?e.currentTime+=this.seekStep:e.currentTime=e.duration-1}},{key:"seekBack",value:function(){var e=this.player;e.currentTime-this.seekStep>=0?e.currentTime-=this.seekStep:e.currentTime=0}},{key:"playPause",value:function(){var e=this.player;e.paused?e.play():e.pause()}},{key:"exitFullscreen",value:function(){var e=this.player;e.fullscreen&&e.exitFullscreen(),e.isCssfullScreen&&e.exitCssFullscreen()}},{key:"onBodyKeyDown",value:function(e){if(!this.config.disable&&this.checkIsVisible()){var t=e||window.event,n=t.keyCode;return!(t.target!==document.body||!this.checkCode(n,!0)||(t.preventDefault(),t.cancelBubble=!0,t.returnValue=!1,this.handleKeyCode(n),1))}}},{key:"onKeydown",value:function(e){if(!this.config.disable){var t=this.player,n=e||window.event;if(!n||37!==n.keyCode&&!this.checkCode(n.keyCode)||n.target!==this.player.root&&n.target!==this.player.video&&n.target!==this.player.controls.el)return!0;t.emit("focus"),n.preventDefault(),n.cancelBubble=!0,n.returnValue=!1,this.handleKeyCode(n.keyCode)}}},{key:"handleKeyCode",value:function(e){var t=this,n=this.player;40!==e&&38!==e||n.controls,Object.keys(this.keyCodeMap).map((function(n){if(t.keyCodeMap[n].keyCode===e&&!t.keyCodeMap[n].disable)if("function"==typeof t.keyCodeMap[n].action)t.keyCodeMap[n].action();else if("string"==typeof t.keyCodeMap[n].action){var r=t.keyCodeMap[n].action;"function"==typeof t[r]&&t[r]()}}))}},{key:"destroy",value:function(){this.player.root.removeEventListener("keydown",this.onKeydown),document.removeEventListener("keydown",this.onBodyKeyDown)}}],[{key:"pluginName",get:function(){return"keyboard"}},{key:"defaultConfig",get:function(){return{seekStep:10,keyCodeMap:{},disable:!1}}}]),t}(qa);const Fl=Bl;var Hl=function(){function e(e,t){for(var n=0;n'}}},{key:"afterCreate",value:function(){this.appendChild(this.icons.loadingIcon)}},{key:"render",value:function(){return'\n \n '}}],[{key:"pluginName",get:function(){return"loading"}},{key:"defaultConfig",get:function(){return{position:as.ROOT}}}]),t}(is);const Gl=Vl;var Wl=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"played",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{newIndex:0,curIndex:0,millisecond:0},n=this.progressList,r=this.fragments,o=t.newIndex,i=t.curIndex,a=t.millisecond;o!==i&&n.map((function(t,n){no&&(t[e].style.width=0)}));var s=r[o],l=(a-s.start)/s.duration;n[o][e].style.width=l<0?0:100*l+"%"}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{cached:0,played:0},t=arguments[1];if(!this.duration||parseInt(1e3*t,10)!==this.duration){if(!t)return;this.updateDuration(t)}var n=this.playedIndex,r=this.cachedIndex;if(e.played){var o=this.findIndex(1e3*e.played,n);this.updateProgress("played",{newIndex:o,curIndex:n,millisecond:parseInt(1e3*e.played,10)}),this.playedIndex=o}if(e.cached){var i=this.findIndex(1e3*e.cached,r);this.updateProgress("cached",{newIndex:i,curIndex:r,millisecond:parseInt(1e3*e.cached,10)}),this.cachedIndex=i}}},{key:"findIndex",value:function(e,t){var n=this.fragments;return 1===n.length?0:(e>n[t].start&&en.start&&e<=n.end&&(t=r)})),t)}},{key:"findHightLight",value:function(){for(var e=this.root.children,t=0;t=t.length?null:{dom:t[e],pos:t[e].getBoundingClientRect()}}},{key:"unHightLight",value:function(){for(var e=this.root.children,t=0;t0&&void 0!==arguments[0])||arguments[0];this.useable=e}},{key:"beforeCreate",value:function(e){"boolean"==typeof e.player.config.progress&&(e.config.disable=!e.player.config.progress)}},{key:"createInner",value:function(){var e=this;this.innerList=new Jl({fragments:this.config.fragments,style:this.playerConfig.commonStyle||{}}),this.outer.insertBefore(this.innerList.render(),this.outer.children[0]),["findHightLight","unHightLight","setHightLight","findFragment"].map((function(t){e[t]=e.innerList[t].bind(e.innerList)}))}},{key:"afterCreate",value:function(){var e=this;this.config.disable||(this.pos={x:0,y:0,moving:!1,isDown:!1,isEnter:!1},this.outer=this.find("xg-outer"),this.createInner(),"mobile"===Sa.device&&(this.config.isDragingSeek=!1,this.isMobile=!0),this.progressBtn=this.find(".xgplayer-progress-btn"),this.on(ji,(function(){e.onTimeupdate()})),this.on(Ni,(function(){e.onTimeupdate(),e.onCacheUpdate()})),this.on(Vi,(function(){e.onCacheUpdate()})),this.on(Ii,(function(){e.onCacheUpdate(),e._state.now=0})),this.bindDomEvents(),this.initCustomStyle())}},{key:"initCustomStyle",value:function(){var e=(this.playerConfig||{}).commonStyle.sliderBtnStyle,t=this.progressBtn;e&&("string"==typeof e?t.style.boxShadow=e:"object"===(void 0===e?"undefined":ql(e))&&Object.keys(e).map((function(n){t.style[n]=e[n]})))}},{key:"triggerCallbacks",value:function(e,t){this.__dragCallBacks.length>0&&this.__dragCallBacks.map((function(n){if(n&&n.handler&&n.type===e)try{n.handler(t)}catch(e){console.error("[XGPLAYER][triggerCallbacks] "+n+" error",e)}}))}},{key:"addCallBack",value:function(e,t){t&&"function"==typeof t&&this.__dragCallBacks.push({type:e,handler:t})}},{key:"removeCallBack",value:function(e,t){var n=this.__dragCallBacks,r=-1;n.map((function(n,o){n&&n.type===e&&n.handler===t&&(r=o)})),r>-1&&n.splice(r,1)}},{key:"bindDomEvents",value:function(){var e=this.player,t=e.controls,n=e.config;this.isMobile?(this.bind("touchstart",this.onMouseDown),t&&(t.root&&t.root.addEventListener("touchmove",_a.stopPropagation),t.center&&t.center.addEventListener("touchend",_a.stopPropagation))):(this.bind("mousedown",this.onMouseDown),!n.isMobileSimulateMode&&this.bind("mouseenter",this.onMouseEnter))}},{key:"focus",value:function(){this.player.controls.pauseAutoHide(),_a.addClass(this.root,"active")}},{key:"blur",value:function(){this.player.controls.recoverAutoHide(),_a.removeClass(this.root,"active")}},{key:"updateWidth",value:function(e,t,n){var r=this.config,o=this.player;if(!r.isCloseClickSeek||0!==n){var i=e>o.duration?o.duration-.2:Number(e).toFixed(1);this.updatePercent(t),this.updateTime(e),(1!==n||r.isDragingSeek&&"audio"!==o.videoConfig.mediaType)&&(this._state.now=i,this._state.direc=i>o.currentTime?0:1,o.seek(i))}}},{key:"computeTime",value:function(e){var t=this.player,n=this.root.getBoundingClientRect(),r=n.width,o=n.height,i=n.top,a=n.left,s=void 0,l=void 0,c=void 0;90===t.rotateDeg?(s=o,l=i,c=e.clientY):(s=r,l=a,c=e.clientX);var u=c-l,f=(u=u>s?s:u<0?0:u)/s;return{percent:f=f<0?0:f>1?1:f,currentTime:parseInt(f*this.duration*1e3,10)/1e3,offset:u,width:s,left:l,e}}},{key:"updateTime",value:function(e){var t=this.player,n=this.duration;e>n?e=n:e<0&&(e=0);var r=t.plugins.time;r&&r.updateTime(e)}},{key:"resetSeekState",value:function(){this.isProgressMoving=!1;var e=this.player.plugins.time;e&&e.resetActive()}},{key:"updatePercent",value:function(e,t){if(this.isProgressMoving=!0,!this.config.disable){e=e>1?1:e<0?0:e,this.progressBtn.style.left=100*e+"%",this.innerList.update({played:e*this.duration},this.duration);var n=this.player.plugins.miniprogress;n&&n.update({played:e*this.duration},this.duration)}}},{key:"onTimeupdate",value:function(){var e=this.player,t=this._state,n=this.duration;if(!e.isSeeking&&!this.isProgressMoving){if(t.now>-1){var r=parseInt(1e3*t.now,10)-parseInt(1e3*e.currentTime,10);if(0===t.direc&&r>300||1===t.direc&&r>-300)return;t.now=-1}var o=this.timeOffset+e.currentTime;this.innerList.update({played:o},n),this.progressBtn.style.left=o/n*100+"%";var i=this.player.plugins.miniprogress;i&&i.update({played:o},n)}}},{key:"onCacheUpdate",value:function(){var e=this.player,t=this.duration,n=e.bufferedPoint;this.innerList.update({cached:n.end},t);var r=this.player.plugins.miniprogress;r&&r.update({cached:n.end},t)}},{key:"destroy",value:function(){var e=this.player,t=e.controls;this.thumbnailPlugin=null,this.innerList.destroy(),this.innerList=null,this.isMobile?(this.unbind("touchstart",this.onMouseDown),this.unbind("touchmove",this.onMouseMove),this.unbind("touchend",this.onMouseUp),t&&(t.root&&t.root.removeEventListener("touchmove",_a.stopPropagation),t.center&&t.center.removeEventListener("touchend",_a.stopPropagation))):(this.unbind("mousedown",this.onMouseDown),this.unbind("mouseenter",this.onMouseEnter),this.unbind("mousemove",this.onMoveOnly),document.removeEventListener("mousemove",this.onMouseMove,!1),document.removeEventListener("mouseup",this.onMouseUp,!1),e.root.removeEventListener("click",this.onBodyClick,!1))}},{key:"render",value:function(){if(!this.config.disable)return'\n \n \n \n \n \n '}},{key:"duration",get:function(){return this.playerConfig.customDuration||this.player.duration}},{key:"timeOffset",get:function(){return this.playerConfig.timeOffset||0}}]),t}(is);const Zl=Kl;var $l=function(){function e(e,t){for(var n=0;n',class:"xg-icon-play"},pause:{icon:'',class:"xg-icon-pause"}}}},{key:"btnClick",value:function(e){e.preventDefault(),e.stopPropagation();var t=this.player;return t.paused?(t.play(),this.animate(!1)):(t.pause(),this.animate(!0)),!1}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.play),this.appendChild(".xgplayer-icon",e.pause)}},{key:"animate",value:function(e){var t=this.i18nKeys;e?(this.setAttr("data-state","pause"),this.changeLangTextKey(this.find(".xg-tips"),t.PLAY_TIPS)):(this.setAttr("data-state","play"),this.changeLangTextKey(this.find(".xg-tips"),t.PAUSE_TIPS))}},{key:"destroy",value:function(){this.unbind(["touchend","click"],this.btnClick)}},{key:"render",value:function(){if(!this.config.disable)return'\n
\n
\n
'+this.i18n.PLAY_TIPS+"
\n
"}}],[{key:"pluginName",get:function(){return"play"}},{key:"defaultConfig",get:function(){return{position:as.CONTROLS_LEFT,index:0,disable:!1}}}]),t}(is);const rc=nc;var oc=function(){function e(e,t){for(var n=0;n',class:"xg-fullscreen-back"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(this.root,e.screenBack)}},{key:"show",value:function(){_a.addClass(this.root,"show")}},{key:"hide",value:function(){_a.removeClass(this.root,"show")}},{key:"render",value:function(){return'\n '}}],[{key:"pluginName",get:function(){return"topbackicon"}},{key:"defaultConfig",get:function(){return{position:as.ROOT_TOP,index:0}}}]),t}(is);const lc=sc;var cc=function(){function e(e,t){for(var n=0;n',class:"xg-get-fullscreen"},exitFullscreen:{icon:'',class:"xg-exit-fullscreen"}}}},{key:"destroy",value:function(){this.unbind(".xgplayer-icon","mobile"===Sa.device?"touchend":"click",this.fullSreenHandler)}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.fullscreen),this.appendChild(".xgplayer-icon",e.exitFullscreen)}},{key:"setRotateDeg",value:function(e){var t=this.player;90===window.orientation||-90===window.orientation?t.rotateDeg=0:t.rotateDeg=e}},{key:"getRotateFullscreen",value:function(){var e=this.player;e.isCssfullScreen&&e.exitCssFullscreen(),e.root.getAttribute("style")&&(this._originCssText=e.root.style.cssText,e.root.removeAttribute("style")),e.addClass(ys),e.fullscreen=!0,this.setRotateDeg(90),this.emit(aa,!0)}},{key:"exitRotateFullscreen",value:function(){var e=this.player;e.removeClass(ys),e.fullscreen=!1,this._originCssText&&_a.setStyleFromCsstext(e.root,this._originCssText),this._originCssText="",this.setRotateDeg(0),this.emit(aa,!1)}},{key:"changeFullScreen",value:function(e){e.stopPropagation();var t=this.player,n=this.config,r=!1;if((!0===n.useCssFullscreen||"function"==typeof n.useCssFullscreen&&n.useCssFullscreen())&&(r=!0),r)t.fullscreen?(t.fullscreen=!1,t.exitCssFullscreen(),this.emit(aa,!1)):(t.fullscreen=!0,t.getCssFullscreen(),this.emit(aa,!0)),this.animate(t.fullscreen);else if(n.rotateFullscreen)t.fullscreen?this.exitRotateFullscreen():this.getRotateFullscreen(),this.animate(t.fullscreen);else{if(n.switchCallback&&"function"==typeof n.switchCallback)return n.switchCallback(this.isFullScreen),void(this.isFullScreen=!this.isFullScreen);t.fullscreen?t.exitFullscreen(n.target):t.getFullscreen(n.target)}}},{key:"animate",value:function(e){e?this.setAttr("data-state","full"):this.setAttr("data-state","normal"),this.topBackIcon&&(e?(this.topBackIcon.show(),this.hide()):(this.topBackIcon.hide(),this.show()))}},{key:"show",value:function(){uc(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"show",this).call(this)}},{key:"hide",value:function(){uc(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"hide",this).call(this)}},{key:"render",value:function(){if(!this.config.disable){var e="FULLSCREEN_TIPS";return'\n
\n
\n
'+this.i18n[e]+"
\n
"}}}],[{key:"pluginName",get:function(){return"fullscreen"}},{key:"defaultConfig",get:function(){return{position:as.CONTROLS_RIGHT,index:0,useCssFullscreen:!1,rotateFullscreen:!1,switchCallback:null,target:null,disable:!1,needBackIcon:!1}}}]),t}(is);const pc=hc;var vc=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},mc=function(){function e(e,t){for(var n=0;n0&&(this.centerDurDom.innerHTML=_a.format(this.duration))):(this.timeDom.innerHTML=_a.format(t),this.duration!==1/0&&this.duration>0&&(this.durationDom.innerHTML=_a.format(this.duration)))}}},{key:"createCenterTime",value:function(){var e=this.player;if(e.controls&&e.controls.center){var t=e.controls.center;this.centerCurDom=_a.createDom("xg-icon","00:00",{},"xgplayer-time left"),this.centerDurDom=_a.createDom("xg-icon","00:00",{},"xgplayer-time right"),t.children.length>0?t.insertBefore(this.centerCurDom,t.children[0]):t.appendChild(this.centerCurDom),t.appendChild(this.centerDurDom)}}},{key:"afterPlayerInit",value:function(){var e=this.config;this.duration===1/0||this.playerConfig.isLive?(_a.hide(this.durationDom),_a.hide(this.timeDom),_a.hide(this.find(".time-separator")),_a.show(this.find(".time-live-tag"))):_a.hide(this.find(".time-live-tag")),e.hide?this.hide():this.show()}},{key:"changeLiveState",value:function(e){e?(_a.hide(this.durationDom),_a.hide(this.timeDom),_a.hide(this.find(".time-separator")),_a.show(this.find(".time-live-tag"))):(_a.hide(this.find(".time-live-tag")),_a.show(this.find(".time-separator")),_a.show(this.durationDom),_a.show(this.timeDom))}},{key:"updateTime",value:function(e){this.isActiving=!0,!e&&0!==e||e>this.duration||("flex"!==this.mode?this.timeDom.innerHTML=_a.format(e):this.centerCurDom.innerHTML=_a.format(e))}},{key:"resetActive",value:function(){var e=this,t=this.player,n=function(){e.isActiving=!1};this.off(Ni,n),t.isSeeking?this.once(Ni,n):this.isActiving=!1}},{key:"destroy",value:function(){var e=this.player.controls.center;this.centerCurDom&&e.removeChild(this.centerCurDom),this.centerCurDom=null,this.centerDurDom&&e.removeChild(this.centerDurDom),this.centerDurDom=null}},{key:"render",value:function(){if(!this.config.disable)return'\n 00:00\n /\n 00:00\n 直播\n '}},{key:"duration",get:function(){return this.playerConfig.customDuration||this.player.duration}},{key:"timeOffset",get:function(){return this.playerConfig.timeOffset||0}}]),t}(is);const yc=gc;var bc=function(){function e(e,t){for(var n=0;n',class:"xg-volume-small"},volumeLarge:{icon:'',class:"xg-volume"},volumeMuted:{icon:'',class:"xg-volume-mute"}}}},{key:"afterCreate",value:function(){var e=this;if(_s(this),!this.config.disable){this.initIcons();var t=this.playerConfig.commonStyle;t.volumeColor&&(this.find(".xgplayer-drag").style.backgroundColor=t.volumeColor),this.changeMutedHandler=this.hook("muted_change",(function(){var t=e.player;t.muted=!t.muted}),{pre:function(e){e.stopPropagation()}}),this.onBarMousedown=this.onBarMousedown.bind(this),this.onMouseenter=this.onMouseenter.bind(this),this.onMouseleave=this.onMouseleave.bind(this),"mobile"===Sa.device||this.playerConfig.isMobileSimulateMode||(this.bind("mouseenter",this.onMouseenter),this.bind(["blur","mouseleave"],this.onMouseleave),this.bind(".xgplayer-bar","mousedown",this.onBarMousedown)),this.bind(".xgplayer-icon","mobile"===Sa.device?"touchend":"click",this.changeMutedHandler),this.on(Hi,this.onVolumeChange.bind(this)),this.player.volume=this.config.default,this.onVolumeChange()}}},{key:"onBarMousedown",value:function(e){var t=this,n=this.find(".xgplayer-slider"),r=this.find(".xgplayer-bar");n.focus(),_a.event(e);var o=r.getBoundingClientRect(),i=(e.clientX,e.clientY),a=o.height-(e.clientY-o.top);this.updateVolumePos(a),this.isMoveing=!1;var s=function(e){e.preventDefault(),e.stopPropagation(),_a.event(e),t.isMoveing=!0;var n=a-e.clientY+i;n>o.height||t.updateVolumePos(n)},l=function e(n){n.preventDefault(),n.stopPropagation(),_a.event(n),window.removeEventListener("mousemove",s),window.removeEventListener("touchmove",s),window.removeEventListener("mouseup",e),window.removeEventListener("touchend",e),t.isMoveing=!1};return window.addEventListener("mousemove",s),window.addEventListener("touchmove",s),window.addEventListener("mouseup",l),window.addEventListener("touchend",l),!1}},{key:"updateVolumePos",value:function(e){var t=this.player,n=this.find(".xgplayer-drag"),r=e/this.find(".xgplayer-bar").getBoundingClientRect().height;n.style.height=e+"px",t.volume=Math.max(Math.min(r,1),0),t.muted=!1}},{key:"onMouseenter",value:function(e){_a.addClass(this.root,"slide-show")}},{key:"onMouseleave",value:function(e){_a.removeClass(this.root,"slide-show")}},{key:"changeMuted",value:function(e){e.stopPropagation();var t=this.player;t.muted=!t.muted}},{key:"onVolumeChange",value:function(){var e=this.player,t=e.muted,n=e.volume;this.isMoveing||(this.find(".xgplayer-drag").style.height=t||0===n?"0px":100*n+"%"),this.animate(t,n)}},{key:"animate",value:function(e,t){e||0===t?this.setAttr("data-state","mute"):t<.5&&this.icons.volumeSmall?this.setAttr("data-state","small"):this.setAttr("data-state","normal")}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.volumeSmall),this.appendChild(".xgplayer-icon",e.volumeLarge),this.appendChild(".xgplayer-icon",e.volumeMuted)}},{key:"destroy",value:function(){this.unbind("mouseenter",this.onMouseenter),this.unbind(["blur","mouseleave"],this.onMouseleave),this.unbind(".xgplayer-bar","mousedown",this.onBarMousedown),this.unbind(".xgplayer-icon","mobile"===Sa.device?"touchend":"click",this.changeMutedHandler)}},{key:"render",value:function(){if(!this.config.disable)return'\n \n
\n
\n \n
\n \n
\n
\n
'}}],[{key:"pluginName",get:function(){return"volume"}},{key:"defaultConfig",get:function(){return{position:as.CONTROLS_RIGHT,index:1,disable:!1,default:.6}}}]),t}(is);const Ec=xc;var kc=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=this.player;this.rotateDeg||(this.rotateDeg=0);var o=e?1:-1;this.rotateDeg=(this.rotateDeg+1+.25*o*n)%1,console.log("this.rotateDeg",this.rotateDeg),this.updateRotateDeg(this.rotateDeg,t),r.emit("rotate",360*this.rotateDeg)}},{key:"registerIcons",value:function(){return{rotate:''}}},{key:"render",value:function(){if(!this.config.disable)return'\n \n
\n
\n
\n '+this.i18n.ROTATE_TIPS+"\n
\n
"}}]),t}(is);const _c=Tc;var Oc=function(){function e(e,t){for(var n=0;n\n
\n '+(this.icons.pipIcon?"":''+this.i18n.PIP+"")+' \n
\n
'+this.i18n.PIP+"
\n "}},{key:"isPip",get:function(){var e=this.player;return document.pictureInPictureElement&&document.pictureInPictureElement===e.video||e.video.webkitPresentationMode===Ic}}],[{key:"checkWebkitSetPresentationMode",value:function(e){return"function"==typeof e.webkitSetPresentationMode}},{key:"pluginName",get:function(){return"pip"}},{key:"defaultConfig",get:function(){return{position:as.CONTROLS_RIGHT,index:6,showIcon:!1}}}]),t}(is);const Nc=Mc;var jc=function(){function e(e,t){for(var n=0;n'}}},{key:"initEvents",value:function(){this.playNext=this.playNext.bind(this);var e="mobile"===Sa.device?"touchend":"click";this.bind(e,this.playNext),this.show()}},{key:"playNext",value:function(){var e=this.player;this.idx+1\n
\n
\n
'+this.i18n.PLAYNEXT_TIPS+"
\n \n "}}]),t}(is);var Lc=n(3729),Bc=n.n(Lc),Fc=function(){function e(e,t){for(var n=0;n'}}},{key:"download",value:function(){var e=this;if(!this.isLock){var t=this.getAbsoluteURL(this.player.src);Bc()(t),this.isLock=!0,this.timer=window.setTimeout((function(){e.isLock=!1,window.clearTimeout(e.timer),e.timer=null}),300)}}},{key:"getAbsoluteURL",value:function(e){if(!e.match(/^https?:\/\//)){var t=document.createElement("div");t.innerHTML='x',e=t.firstChild.href}return e}},{key:"destroy",value:function(){this.unbind(["click","touchend"],this.download),window.clearTimeout(this.timer),this.timer=null}},{key:"render",value:function(){if(!this.config.disable)return'\n
\n
\n
'+this.i18n.DOWNLOAD_TIPS+"
\n
"}}]),t}(is);var zc=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{quality:.92,type:"image/png"},o=this.config,i=this.player,a=r.quality||o.quality,s=r.type||o.type;return new Promise((function(r,l){n.canvas?(n.canvas.width=e||o.width,n.canvas.height=t||o.height):n.createCanvans(e,t),n.canvasCtx.drawImage(i.video,0,0,e||o.width,t||o.height);var c=n.canvas.toDataURL(s,a).replace(s,"image/octet-stream");r(c=c.replace(/^data:image\/[^;]+/,"data:application/octet-stream"))}))}},{key:"registerIcons",value:function(){return{screenshotIcon:null}}},{key:"destroy",value:function(){this.unbind(["click","touchend"],this.onClickBtn),this.off(pa,this.initSize)}},{key:"render",value:function(){if(!this.config.disable){var e="SCREENSHOT";return'\n \n
\n '+(this.icons.screenshotIcon?"":''+this.i18n[e]+"")+" \n
\n
"}}}],[{key:"pluginName",get:function(){return"screenShot"}},{key:"defaultConfig",get:function(){return{position:as.CONTROLS_RIGHT,index:5,quality:.92,type:"image/png",format:".png",width:600,height:337,fitVideo:!0,disable:!1,name:"截图"}}}]),t}(is);const Wc=Gc;var Xc=function(){function e(e,t){for(var n=0;n0&&(this.attrKeys=Object.keys(e[0])),this.root.innerHTML="",e.map((function(e,n){var r=e.isCurrent?"option-item selected":"option-item";e["data-index"]=n,t.root.appendChild(_a.createDom("li",""+e.showText+"",e,r))}))}},{key:"onItemClick",value:function(e){e.delegateTarget||(e.delegateTarget=e.target);var t=e.delegateTarget;if(t&&_a.hasClass(t,"selected"))return!1;var n="function"==typeof this.config.onItemClick?this.config.onItemClick:null,r=this.root.querySelector(".selected");_a.addClass(t,"selected"),r&&_a.removeClass(r,"selected"),n(e,{from:r?this.getAttrObj(r,this.attrKeys):null,to:this.getAttrObj(t,this.attrKeys)})}},{key:"getAttrObj",value:function(e,t){if(!e||!t)return{};var n={};t.map((function(t){n[t]=e.getAttribute(t)}));var r=e.getAttribute("data-index");return r&&(n.index=Number(r)),n}},{key:"show",value:function(){_a.removeClass(this.root,"hide"),_a.addClass(this.root,"active")}},{key:"hide",value:function(){_a.removeClass(this.root,"active"),_a.addClass(this.root,"hide")}},{key:"destroy",value:function(){this._delegates&&(this._delegates.map((function(e){e.destroy&&e.destroy()})),this._delegates=null),this.root.innerHTML=null,this.parent.removeChild(this.root),this.root=null}}]),e}();var Jc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qc=function(){function e(e,t){for(var n=0;n0&&(e.renderItemList(t.list),e.show())})),Qc&&this.on(Qi,(function(){e.isActive&&(e.optionsList&&e.optionsList.hide(),e.isActive=!1)})),this.activeEvent=Qc?"touchend":"mouseenter",this.onEnter=this.onEnter.bind(this),this.onLeave=this.onLeave.bind(this),this.bind(this.activeEvent,this.onEnter),this.bind("mouseleave",this.onLeave)}},{key:"show",value:function(){this.config.list&&0!==this.config.list.length&&_a.addClass(this.root,"show")}},{key:"getTextByLang",value:function(e,t,n){if(void 0===e)return"";var r=this.config.list;!n&&(n=this.player.lang),t=!t||_a.isUndefined(e[t])?"text":t,"number"==typeof e&&(e=r[e]);try{return"object"===Jc(e[t])?e[t][n]||e[t].zh:e[t]}catch(e){return console.warn(e),""}}},{key:"onEnter",value:function(e){e.preventDefault(),e.stopPropagation(),this.onToggle(!0)}},{key:"onLeave",value:function(e){e.preventDefault(),e.stopPropagation(),this.isActive&&this.onToggle(!1)}},{key:"onToggle",value:function(e){if(e!==this.isActive){var t=this.player.controls,n=this.config.listType;e?("rightSide"===n?t.blur():t.focus(),this.optionsList&&this.optionsList.show()):("rightSide"===n?t.focus():t.unFocus(),this.optionsList&&this.optionsList.hide()),this.isActive=e}}},{key:"onItemClick",value:function(e,t){e.preventDefault(),e.stopPropagation();var n=this.config,r=n.listType,o=n.list;(Qc||"rightSide"===r)&&this.onToggle(!1),this.curIndex=t.to.index,this.curItem=o[this.curIndex],this.changeCurrentText()}},{key:"changeCurrentText",value:function(){var e=this.config.list,t=e[this.curIndex\n
\n \n
\n '}}]),t}(is);const Zc=Kc;var $c=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},eu=function(){function e(e,t){for(var n=0;n0&&(e.config.list=t.map((function(e){return!e.text&&e.name&&(e.text=e.name),e})))}}],[{key:"pluginName",get:function(){return"definition"}},{key:"defaultConfig",get:function(){return{position:as.CONTROLS_RIGHT,index:3,list:[],disable:!1,hidePortrait:!1,className:"xgplayer-definition"}}}]),eu(t,[{key:"afterCreate",value:function(){var e=this;$c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"afterCreate",this).call(this),this.on("resourceReady",(function(t){e.changeDefinitionList(t)}))}},{key:"renderItemList",value:function(){var e=this,n=this.player,r=this.config.list,o=n.currentSrc||n.src;if(n.switchURL){var i=document.createElement("a");["hlsjs"].every((function(e){return!n[e]||(n[e].url&&(i.href=n[e].url),"hlsjs"===e&&(i.href=n[e].originUrl||n[e].url),o=i.href,!1)})),i=null}var a=0,s=r.map((function(t,n){var r={url:t.url,definition:t.definition||"",showText:e.getTextByLang(t)};return(t.url===o||!_a.isUndefined(t.definition)&&t.definition===e.config.defaultDefinition)&&(r.isCurrent=!0,a=n),r}));$c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"renderItemList",this).call(this,s,a)}},{key:"onCanplayChangeDefinition",value:function(){var e=this.player;if(e.currentTime=this.curTime,this.isPaused)e.pause();else{var t=e.play();void 0!==t&&t&&t.catch((function(e){}))}e.emit(fa)}},{key:"onTimeupdateChangeDefinition",value:function(){var e=this;this.once("timeupdate",(function(){e.onCanplayChangeDefinition()}))}},{key:"switchUrl",value:function(e){var t=this.player,n=document.createElement("a");["mp4","hls","__flv__","dash","hlsjs"].every((function(e){return!t[e]||(t[e].url&&(n.href=t[e].url),"__flv__"===e&&(t[e]._options?n.href=t[e]._options.url:n.href=t[e]._mediaDataSource.url),"hlsjs"===e&&(n.href=t[e].originUrl||t[e].url),!1)})),e&&n.href!==e.url&&!t.ended&&t.switchURL(e.url),n=null}},{key:"changeDefinitionList",value:function(e){Array.isArray(e)&&(this.config.list=e.map((function(e){return!e.text&&e.name&&(e.text=e.name),e})),this.renderItemList(),this.show())}},{key:"changeDefinition",value:function(e){var t=this,n=this.player;n.switchURL?this.switchUrl(e):e.url!==n.currentSrc&&(this.curTime=n.currentTime,this.isPaused=n.paused,n.ended||(n.src=e.url,n.play(),navigator.userAgent.toLowerCase().indexOf("android")>-1?this.once("timeupdate",(function(){t.onTimeupdateChangeDefinition()})):this.once("canplay",(function(){t.onCanplayChangeDefinition()}))))}},{key:"onItemClick",value:function(e,n){$c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"onItemClick",this).apply(this,arguments);var r=this.player,o=e.delegateTarget,i=o.getAttribute("url");r.emit(ua,i),this.changeDefinition(n.to),r.emit(ca,{from:n.from,to:n.to})}}]),t}(Zc);const nu=tu;var ru=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},ou=function(){function e(e,t){for(var n=0;n',class:"xg-get-cssfull"},exitCssFullscreen:{icon:'',class:"xg-exit-cssfull"}}}},{key:"destroy",value:function(){this.unbind(["click","touchend"],this.btnClick)}},{key:"render",value:function(){if(!this.config.disable)return'\n
\n
\n
'+this.i18n.CSSFULLSCREEN_TIPS+"
\n
"}}],[{key:"pluginName",get:function(){return"cssFullscreen"}},{key:"defaultConfig",get:function(){return{position:as.CONTROLS_RIGHT,index:1,disable:!1}}}]),t}(is);const fu=uu;var du=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=this.player,n=e&&e.message?e.message:t.error;this.find(".xgplayer-error-text").innerHTML=n,this.find(".xgplayer-error-tips").innerHTML=this.i18n.REFRESH_TIPS+''+this.i18n.REFRESH+""}},{key:"destroy",value:function(){this.unbind(".xgplayer-error-refresh","click",this.clickHandler)}},{key:"render",value:function(){return'\n
\n \n \n
\n
'}}],[{key:"pluginName",get:function(){return"error"}}]),t}(is);const mu=vu;var gu=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(e){this.customOnClick=r;var o=this.config.interval;this.intervalId&&(clearTimeout(this.intervalId),this.intervalId=null),_a.addClass(this.root,"show"),"arrow"===n.mode&&_a.addClass(this.root,"arrow"),this.find(".xgplayer-prompt-detail").innerHTML="string"==typeof e?e:(e.text||"")+(e.highlight?''+e.highlight+"":""),n.style&&this.setStyle(n.style);var i="boolean"==typeof n.autoHide?n.autoHide:this.config.autoHide;if(i){var a=n.interval||o;this.intervalId=setTimeout((function(){t.hide()}),a)}}}},{key:"hide",value:function(){_a.removeClass(this.root,"show"),_a.removeClass(this.root,"arrow"),this.root.removeAttribute("style"),this.customOnClick=null}},{key:"render",value:function(){return'\n 精选片段共10s\n '}}],[{key:"pluginName",get:function(){return"prompt"}},{key:"defaultConfig",get:function(){return{interval:3e3,style:{},mode:"arrow",autoHide:!0,detail:{text:"",highlight:""},onClick:function(){}}}}]),t}(is);const Cu=wu;var xu={time:0,text:"",id:1,duration:1,color:"#fff",style:{},width:6,height:6};function Eu(e){Object.keys(xu).map((function(t){void 0===e[t]&&(e[t]=xu[t])}))}var ku={initDots:function(){var e=this;this._ispots.map((function(t){e.createDot(t,!1)})),this._ispotsInit=!0},createDot:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.player.plugins.progress;if(n&&(t&&(Eu(e),this._ispots.push(e)),this._ispotsInit||!t)){var r=this.calcuPosition(e.time,e.duration),o=e.style||{};o.left=r.left+"%",o.width=r.width+"%";var i="xgspot_"+e.id+" xgplayer-spot";r.isMini&&(i+=" mini");var a=_a.createDom("xg-spot","",{"data-text":e.text,"data-time":e.time,"data-id":e.id},i);Object.keys(o).map((function(e){a.style[e]=o[e]})),n.outer&&n.outer.appendChild(a)}},findDot:function(e){if(this.player.plugins.progress){var t=this._ispots.filter((function(t,n){return t.id===e}));return t.length>0?t[0]:null}},updateDot:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.player.plugins.progress;if(n){var r=this.findDot(e.id);if(r&&Object.keys(e).map((function(t){r[t]=e[t]})),this._ispotsInit){var o=n.find('xg-spot[data-id="'+e.id+'"]');if(o){var i=this.calcuPosition(e.time,e.duration),a=e.style||{};a.left=i.left+"%",a.width=i.width+"%",o.setAttribute("data-text",e.text),o.setAttribute("data-time",e.time),i.isMini?_a.addClass(o,"mini"):_a.removeClass(o,"mini"),Object.keys(a).map((function(e){o.style[e]=a[e]})),t&&this.showDot(e.id)}}}},deleteDot:function(e){var t=this._ispots,n=this.player.plugins.progress;if(n){for(var r=[],o=0;o=0;i--)if(t.splice(r[i],1),this._ispotsInit){var a=n.find('xg-spot[data-id="'+e+'"]');a&&a.parentElement.removeChild(a)}}},deleteAllDots:function(){var e=this.player.plugins.progress;if(e)if(this._ispotsInit){for(var t=e.root.getElementsByTagName("xg-spot"),n=t.length-1;n>=0;n--)e.outer.removeChild(t[n]);this._ispots=[]}else this._ispots=[]},updateAllDots:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=this.player.plugins.progress;if(n)if(this._ispotsInit){this._ispots=[];var r=n.root.getElementsByTagName("xg-spot"),o=r.length;if(o>t.length)for(var i=o-1;i>t.length-1;i--)n.outer.removeChild(r[i]);t.map((function(t,n){nt-a&&!i?(c=l-(t-a),!this.thumbnail&&(u=l-(t-a)-s/2),l=t-a):(c=0,!this.thumbnail&&(u=-s/2)),void 0!==c&&(r.style.transform="translateX("+c+"px)"),void 0!==u&&(o.style.transform="translateX("+u+"px)"),n.style.transform="translateX("+l+"px)"}},{key:"updateTimeText",value:function(e){var t=this.timeText,n=this.timePoint;t.textContent=e,!this.thumbnail&&(n.textContent=e)}},{key:"updatePosition",value:function(e,t,n,r){var o=this.root,i=this.config,a=this._state;if(o){this.updateLinePos(e,t),a.now=n;var s=_a.format(n);r&&r.target&&_a.hasClass(r.target,"xgplayer-spot")?(this.showTips(r.target.getAttribute("data-text"),!1,s),a.f=!0,i.isFocusDots&&a.f&&(a.now=parseInt(r.target.getAttribute("data-time"),10))):i.defaultText?(a.f=!1,this.showTips(i.defaultText,!0,s)):(a.f=!1,this.hideTips("")),this.updateTimeText(s),this.updateThumbnails(a.now)}}},{key:"updateThumbnails",value:function(e){var t=this.player,n=this.videoPreview,r=t.plugins.thumbnail;if(r&&r.usable){this.thumbnail&&r.update(this.thumbnail,e,160,90);var o=n&&n.getBoundingClientRect();this.videothumbnail&&r.update(this.videothumbnail,e,o.width,o.height)}}},{key:"registerThumbnail",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("mobile"!==Sa.device){var t=this.player,n=this.config,r=t.getPlugin("thumbnail");if(r&&Object.keys(e).map((function(t){r.config[t]=e[t]})),r&&r.usable&&n.isShowThumbnail){_a.removeClass(this.root,"short-line no-thumbnail"),this._hasThumnail=!0;var o=this.find(".xg-spot-thumbnail");this.thumbnail=r.createThumbnail(o,"progress-thumbnail"),n.isShowCoverPreview&&(this.videoPreview=_a.createDom("xg-video-preview","",{},"xgvideo-preview"),t.root.appendChild(this.videoPreview),this.videothumbnail=r.createThumbnail(this.videoPreview,"xgvideo-thumbnail"))}else _a.addClass(this.root,"short-line no-thumbnail")}}},{key:"calcuPosition",value:function(e,t){var n=this.player.plugins.progress,r=this.player,o=n.root.getBoundingClientRect().width,i=r.duration/o*6,a={};return e+t>r.duration&&(t=r.duration-e),a.left=e/r.duration*100,a.width=t/r.duration,a.isMini=i>t,{left:e/r.duration*100,width:t/r.duration*100,isMini:t2&&void 0!==arguments[2]?arguments[2]:"";e&&(_a.addClass(this.root,"no-timepoint"),_a.addClass(this.find(".xg-spot-content"),"show-text"),t&&"production"===this.config.mode?(_a.addClass(this.root,"product"),this.tipText.textContent=e):(_a.removeClass(this.root,"product"),this.tipText.textContent=this._hasThumnail?e:n+" "+e))}},{key:"hideTips",value:function(){_a.removeClass(this.root,"no-timepoint"),this.tipText.textContent="",_a.removeClass(this.find(".xg-spot-content"),"show-text"),_a.removeClass(this.root,"product")}},{key:"destroy",value:function(){var e=this,t=this.player.plugins.progress;t&&Object.keys(_u).map((function(n){t.removeCallBack(n,e[_u[n]])})),this.videothumbnail=null,this.thumbnail=null,this.videoPreview&&this.player.root.removeChild(this.videoPreview),this.unbind(".xg-spot-info","mousemove",this.onMousemove),this.unbind(".xg-spot-info","mousedown",this.onMousedown),this.unbind(".xg-spot-content","mouseup",this.handlerPreviewClick)}},{key:"render",value:function(){return"mobile"===Sa.device||this.playerConfig.isMobileSimulateMode?"":'
\n
\n
\n \n
\n
\n
\n
00:00
\n
\n
'}}],[{key:"pluginName",get:function(){return"progresspreview"}},{key:"defaultConfig",get:function(){return{index:1,miniWidth:6,ispots:[],defaultText:"",isFocusDots:!0,isShowThumbnail:!0,isShowCoverPreview:!1,mode:""}}}]),t}(is);const Su=Ou;var Au=function(){function e(e,t){for(var n=0;n=0&&e=0&&e1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this.config,o=r.pic_num,i=r.row,a=r.col,s=r.width,l=r.height;this.interval=Math.round(this.player.duration/o);var c=Math.ceil(e/this.interval),u=(c=c>o?o:c)0?Math.ceil(f/a)-1:0,h=f>0?f-d*a-1:0,p=0,v=0;if(t&&n){var m=t/n;m2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",i=this.config,a=i.pic_num,s=i.urls;if(!(a<=0)&&s&&0!==s.length){var l=this.getPosition(t,n,r);this.preload(l.urlIndex),Object.keys(l.style).map((function(t){e.style[t]=l.style[t]})),Object.keys(o).map((function(t){e.style[t]=o[t]}))}}},{key:"createThumbnail",value:function(e,t){var n=_a.createDom("xg-thumbnail","",{},"thumbnail "+t);return e&&e.appendChild(n),n}},{key:"usable",get:function(){var e=this.config,t=e.urls,n=e.pic_num;return t&&t.length>0&&n>0}}]),t}(is);const Ru=Iu;var Pu=n(6167),Mu=n.n(Pu),Nu=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},ju=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=Lu(t),o=this.subTitles&&this.subTitles.currentText?this.subTitles.currentText.language:null,i=null;t.map((function(e,t){e.language===o&&(e.isDefault=!0,i=t)})),r>-1&&r!==i&&(t[r].isDefault=!1),this.subTitles.destroy();var a={subTitles:t,defaultOpen:n};Object.keys(this.config.style).map((function(t){a[t]=e.config.style[t]})),this.subTitles=new(Mu())(a),this.subTitles.attachPlayer(this.player),this.renderItemList()}},{key:"onItemClick",value:function(e,n){Nu(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"onItemClick",this).apply(this,arguments);var r=e.delegateTarget,o=r.getAttribute("language"),i=r.getAttribute("data-id"),a=r.getAttribute("data-type");this.subTitles&&(a===Du?this.subTitles.switchOff():this.subTitles.switch({language:o,id:i}).catch((function(e){console.log("onItemClick",e)})))}},{key:"changeCurrentText",value:function(){var e=this.config,t=e.list,n=e.closeText,r=this.curIndex;if(r-1<0)this.find(".icon-text").innerHTML=this.getTextByLang(n,"iconText");else if(r-10&&void 0!==arguments[0]?arguments[0]:{cached:0,played:0},t=arguments[1];t&&this.root&&(e.cached&&(this.find("xg-mini-progress-cache").style.width=e.cached/t*100+"%"),e.played&&(this.find("xg-mini-progress-played").style.width=e.played/t*100+"%"))}},{key:"render",value:function(){if(this.playerConfig.progress&&this.playerConfig.miniprogress)return'\n \n \n '}}],[{key:"pluginName",get:function(){return"MiniProgress"}},{key:"defaultConfig",get:function(){return{}}}]),t}(is);const Gu=Vu;Vs.defaultPreset=function e(t,n){var r,o,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var a=n&&n.isMobileSimulateMode,s=[Zl,rc,pc,yc,_c,Dc,nu,au,Hc,Wc,Ec,Fu,Gu],l=[Nc],c=[Js,$s,rl,Gl,ll,mu,Cu,Ru,Su];switch(this.plugins=[].concat(s,c),a?"mobile":Sa.device){case"pc":(r=this.plugins).push.apply(r,[Fl,Cl,fu].concat(l,[vl]));break;case"mobile":(o=this.plugins).push.apply(o,[Nl].concat(l));break;default:(i=this.plugins).push.apply(i,[Fl,Cl,fu].concat(l,[vl]))}this.ignores=[]},Vs.Util=_a,Vs.Sniffer=Sa,Vs.Errors=Pa,Vs.Events=r,Vs.Plugin=is,Vs.BasePlugin=qa,Vs.I18N=Bs;const Wu=Vs;var Xu=(0,i.forwardRef)((function(e,t){var n,r=e.id,s=e.src,l=e.poster,c=e.fullscreen,u=void 0===c||c,f=e.onPlay,d=e.onPause,h=e.onEnded,p=e.onReplay,v=e.onFullscreenChange,m=e.onDestroy,g=e.onError,y=e.onAutoplayWasPrevented,b=(0,i.useRef)(null),w=(0,i.useRef)(null),C=(0,i.useRef)(null),x="ARCO_VIDEO_FEED_PLAY_TIME_"+r,E=(0,i.useRef)(((n={})[Si]=f,n[Ri]=d,n[Ii]=h,n[Pi]=g,n[ra]=p,n[aa]=v,n[oa]=m,n[ta]=y,n)),k=(0,i.useCallback)((function(){var e,t,n,r,i,a,c,f,d;s&&w.current&&!b.current&&(b.current=new Wu(o({},gi,{fullscreen:u&&gi.fullscreen,el:w.current,url:s+"#"+Date.now(),poster:l,autoplay:!1,startTime:parseInt(sessionStorage.getItem(x)||"0",10)})),null==(e=b.current)||e.on(Zi,(function(){var e;null==(e=b.current)||e.play()})),null==(t=b.current)||t.on(Si,(function(){E.current[Si](),C.current&&clearInterval(C.current),C.current=setInterval((function(){var e;sessionStorage.setItem(x,""+((null==(e=b.current)?void 0:e.currentTime)||0))}),300)})),null==(n=b.current)||n.on(Ri,(function(){E.current[Ri](),C.current&&clearInterval(C.current)})),null==(r=b.current)||r.on(ta,(function(){E.current[ta]()})),null==(i=b.current)||i.on(aa,(function(e){E.current[aa](e)})),null==(a=b.current)||a.on(ra,(function(){E.current[ra]()})),null==(c=b.current)||c.on(Ii,(function(){E.current[Ii](),sessionStorage.removeItem(x),C.current&&clearInterval(C.current)})),null==(f=b.current)||f.on(Pi,(function(){E.current[Pi](),C.current&&clearInterval(C.current)})),null==(d=b.current)||d.on(oa,(function(){E.current[oa](),C.current&&clearInterval(C.current)})))}),[s,l,u,x]);return(0,i.useLayoutEffect)((function(){return k(),function(){var e,t,n;C.current&&clearInterval(C.current);var r=(null==(e=b.current)?void 0:e.currentTime)||0;((null==(t=b.current)?void 0:t.duration)||0)-r>5?sessionStorage.setItem(x,r.toString()):sessionStorage.removeItem(x),null==(n=b.current)||null==n.destroy||n.destroy(),b.current=null}}),[k,r,x]),(0,i.useImperativeHandle)(t,(function(){return b.current})),a().createElement(be,null,(function(e){var t=e.prefixCls;return a().createElement("div",{className:t+"-video-feed__player"},a().createElement("div",{ref:w}))}))}));const Yu=Xu;var Ju=(0,i.forwardRef)((function(e,t){var n=e.video,r=e.prefixCls,o=e.fullColumn,s=e.coverBackgroundColor,l=e.autoplay,c=e.showImage,u=e.showVideoInfo,f=e.coverOverlap,d=e.onVideoClick,h=e.getVideoSource,p=e.fullscreen,v=e.onPlay,m=e.onPause,g=e.onEnded,y=e.onError,b=e.onReplay,w=e.onFullscreenChange,C=e.onDestroy,x=(0,i.useRef)(null),E=(0,i.useState)(""),k=E[0],T=E[1],_=(0,i.useContext)(Ci),O=_.state,S=_.dispatch,A=(0,i.useMemo)((function(){return!(!c&&k)||O.currentPlay!==n.id}),[c,k,O.currentPlay,n.id]),I=(0,i.useMemo)((function(){return Oi(n.watchCount||0)}),[n.watchCount]),R=(0,i.useMemo)((function(){return function(e){var t=Math.floor(e/3600),n=Math.floor((e-3600*t)/60),r=Math.floor(e%60),o=t.toString().padStart(2,"0"),i=n.toString().padStart(2,"0"),a=r.toString().padStart(2,"0");return 0===t?i+":"+a:o+":"+i+":"+a}(n.duration||0)}),[n.duration]),P=(0,i.useCallback)((function(){!c&&h?""===k&&h(n).then((function(e){T(e)})).catch((function(e){return console.error("get video source error",e)})):null==d||d(n)}),[c,h,k,n,d]),M=(0,i.useCallback)((function(){S({type:"UpdateCurrentPlay",id:n.id}),P()}),[S,n.id,P]),N=(0,i.useCallback)((function(){null==v||v(n,x.current||void 0)}),[n,v]),j=(0,i.useCallback)((function(){null==m||m(n,x.current||void 0)}),[n,m]),D=(0,i.useCallback)((function(){null==g||g(n,x.current||void 0)}),[n,g]),L=(0,i.useCallback)((function(){null==y||y(n,x.current||void 0)}),[n,y]),B=(0,i.useCallback)((function(){null==b||b(n,x.current||void 0)}),[n,b]),F=(0,i.useCallback)((function(e){S({type:"SwitchCanUpdate",canUpdate:!e}),null==w||w(n,x.current||void 0,e)}),[n,w,S]),H=(0,i.useCallback)((function(){null==C||C(n,x.current||void 0)}),[n,C]),z=(0,i.useCallback)((function(){S({type:"UpdateCurrentPlay",id:null})}),[S]);return(0,i.useEffect)((function(){l&&O.currentPlay===n.id&&P()}),[n.id,l,P,O.currentPlay]),(0,i.useImperativeHandle)(t,(function(){return{player:x.current}})),A?a().createElement("div",{className:r+"-video-feed__cover",onClick:M},a().createElement(_n,{fit:"cover",width:"100%",height:"100%",radius:o?0:"0.16rem",forceHttps:!0,lazyload:!0,src:n.cover,bottomOverlap:f||a().createElement("div",{className:r+"-video-feed__overlap",style:{background:s}})}),a().createElement("img",{className:r+"-video-feed__cover-player",src:mi}),u&&a().createElement("p",{className:r+"-video-feed__video-info"},"number"==typeof n.watchCount&&a().createElement("span",null,I,"观看"),"number"==typeof n.watchCount&&Boolean(n.duration)&&a().createElement("span",null),Boolean(n.duration)&&a().createElement("span",null,R))):a().createElement(Yu,{ref:x,id:n.id,src:k,poster:n.cover,fullscreen:p,onPlay:N,onPause:j,onEnded:D,onError:L,onReplay:B,onDestroy:H,onAutoplayWasPrevented:z,onFullscreenChange:F})}));const qu=Ju;var Qu=function(){return Qu=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"backEnd";if(this.isEditor()){var t=window.globalGetState().canvas;return"default"===t.canvastype?t.ostype:t.canvastype}if("backEnd"===e){var n,o=null===(n=window.__MAGIC__)||void 0===n?void 0:n.canvas;return"object"===r(o)&&o.os?o.os:null}if("frontEnd"===e){var i=navigator.userAgent,a=i.match(/(Android);?[\s\/]+([\d.]+)?/),s=i.match(/(iPad).*OS\s([\d_]+)/),l=i.match(/(iPod)(.*OS\s([\d_]+))?/),c=!s&&i.match(/(iPhone\sOS)\s([\d_]+)/);return a?"android":s||l||c?"ios":"pc"}},getproductUid:function(){return this.isEditor()?window.globalGetState().canvas.productUId:window.__MAGIC__.canvas.productUId},getVersion:function(){if(this.isEditor())return window.globalGetState().canvas.appversion;if(this.inApp()){var e=window.__MAGIC__.action&&window.__MAGIC__.action.custom&&window.__MAGIC__.action.custom.getAppInfo;if(e&&"function"==typeof e){var t=e();if(t&&t.version)return t.version}var n=this.getOS(),r=window.__MAGIC__.canvas.pua,o=new RegExp("(".concat(r,") *([^ ]*)"),"i");"gogokid"===r&&("ios"===n?o=/Version ([\d\.]*);/:"android"===n&&(o=/gogokid\(([^)]*)\)/));var i=window.navigator.userAgent.match(/app_version\/([\d\.]+)/),a=window.navigator.userAgent.match(o);if(i)return i[1].replace(/[^0-9\.]+/g,"");if(a)return a[2].replace(/[^0-9\.]+/g,"")}},compareVersion:function(e,t){t=t||this.getVersion();var n=e.split(".").map((function(e){return parseInt(e)})),r=t.split(".").map((function(e){return parseInt(e)}));if(n.length==r.length){for(var o=0;or[o])return 1;if(n[o]1&&void 0!==arguments[1]?arguments[1]:"s";if(!e)return 0;var n=Number(new Date)-Number(e)||0;return n=n>=0?n:0,"ms"===t?n:Number((n/1e3).toFixed(2))},escapeHTML:function(e){var t={"&":"&","<":"<",">":">","'":"'",'"':"""};return e.replace(/[&<>'"]/g,(function(e){return t[e]||""}))},getQuery:function(e){var t=(e||location.href).split("?")[1]||"";if(t){var n=t.split("&"),r={};for(var o in n){var i=n[o].split("="),a=i.shift(),s=this.escapeHTML(decodeURIComponent(i.join("=")));r[a]=s}return r}return{}},urlEncode:function(e){var t=[];for(var n in e){var r="".concat(n,"=").concat(encodeURIComponent(e[n]));t.push(r)}return t.join("&")},addQueryUrl:function(e,t){return"object"===r(t)&&(t=this.urlEncode(t)),t?e.match(/\?/)?e.match(/&$/)?e+t:"".concat(e,"&").concat(t):"".concat(e,"?").concat(t):e},sendLog:function(e){var t,n,o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"===r(e)&&(a=e.params||{},e=e.eventName),this.isEditor())console.log(e,"magic editor canvas no log!");else if(a.language=navigator.language,a.country=window.__MAGIC__.canvas.region||"unknow",a.appType=window.__MAGIC__.canvas.appType||"unknow",a.pageNo=(null===(t=window.__MAGIC__.dynamicInfo)||void 0===t||null===(n=t.schemaRenderComponent)||void 0===n||null===(o=n.state)||void 0===o?void 0:o.pageNo)||0,a.inorout=this.inApp()?"in":"out",a.osType=this.getOS(),a.h5url=location.href,e.match(/^magic_sdk_/)||(e="magic_sdk_".concat(e)),this.inApp()&&window.__MAGIC__.action&&window.__MAGIC__.action.magicUnifyJsb&&window.__MAGIC__.action.magicUnifyJsb.appSendLog){var s=window.__MAGIC__.teaEvtParams||{},l=Object.assign({},s,a);window.__MAGIC__.action.magicUnifyJsb.call("appSendLog",{eventName:e,params:l})}else if(window.collectEvent){var c=this.inApp()?{}:{__userless:1};window.collectEvent(e,i(i({},a),c))}else console.log(e,"cannot log")},backToApp:function(e){if(e=e||{},!this.isEditor()){if(window.self!==window.top)return void this.toast({type:"text",content:"Please operate in app."});var t=e.downloadLink||window.__MAGIC__.canvas.downlink;"object"===r(t)&&(t=t[this.getOS()]);var n,o=e.timeout||3e3,i=e.type||"webview",a=e.data||{url:location.href};try{n=function(e){var t,n=e.type,r=e.data,o=window.__MAGIC__&&window.__MAGIC__.action&&window.__MAGIC__.action.custom&&window.__MAGIC__.action.custom.urlScheme;return o&&"function"==typeof o?(t=o(e),console.log("custom.urlScheme",e,t),t):(o=window.__MAGIC__&&window.__MAGIC__.action&&window.__MAGIC__.action.urlScheme&&window.__MAGIC__.action.urlScheme[n])&&"function"==typeof o?(t=o(r),console.log("urlScheme[type]",e,t),t):void 0}({type:i,data:a})}catch(e){console.log(e),n=null}var s=e.scheme||n||window.__MAGIC__.canvas.urlScheme;"object"===r(s)&&(s=s[i]),s=s.replace(/{{([\w\.]*)}}/g,(function(e,t){for(var n=t.split("."),r=a[n.shift()],o=0,i=n.length;o2&&void 0!==arguments[2]?arguments[2]:3e3);e&&(this.iframeHref(e),location.href=e),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&clearTimeout(n)}))}else console.log("Product downlink is not existed.");else console.log("Product scheme is not existed.")},iframeHref:function(e){var t=document.getElementsByTagName("body"),n=document.getElementById("app_iframe");if(n){var r=n.parentNode;r&&r.removeChild(n)}var o=document.createElement("iframe");o.id="app_iframe",o.src=e,o.style.cssText="display: none",t[0].appendChild(o)},getimgsize:function(e){var t=this.getQuery(e);return t.size?{width:"".concat(parseFloat(t.size.split("x")[0])/100,"rem"),height:"".concat(parseFloat(t.size.split("x")[1])/100,"rem")}:{}},toast:function(e){var t=e.type,n=void 0===t?"text":t,r=e.content,o=void 0===r?"toast tips":r,i=e.duration,a=void 0===i?2:i,s=document.createElement("div"),l="mes_".concat(Math.random().toString(36).substr(2));if(s.className="magic-tool-toast",s.id=l,s.setAttribute("style","background-size:100% 100%;position: fixed; left: 50%; top: 50%; transform: translate(-50%,-50%);-webkit-transform: translate(-50%, -50%);background-color: rgba(0,0,0,0.7); border-radius: 0.06rem;z-index: 9999; font-size: 0.3rem;padding: 0.2rem; text-align: center; color: white;"),"text"===n)s.innerHTML=o;else{var c=this.getimgsize(o);s.style.width=c.width||"2rem",s.style.height=c.height||"2rem",s.style.backgroundImage="url(".concat(o,")")}var u=document.body;this.isEditor()&&(u=document.getElementsByClassName("magic-editor-canvas-area")[0]||document.body),u.appendChild(s),setTimeout((function(){u.removeChild(s)}),1e3*a)},getTzName:function(){return window&&window.Intl?window.Intl.DateTimeFormat().resolvedOptions().timeZone:(new Date).getTimezoneOffset()/-60},debounce:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:400,n=null;return function(){for(var r=arguments.length,o=new Array(r),i=0;i{"use strict";n.d(t,{Z:()=>s});var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".mvideolist {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 7.5rem;\n}\n.mvideolist__empty {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n min-height: 2.4rem;\n color: var(--color-text-2);\n font-size: 0.28rem;\n}\n.mvideolist__change-btn {\n margin: 0.16rem 0 0.48rem;\n width: 100%;\n height: 0.88rem;\n background-repeat: no-repeat;\n background-size: 100% 100%;\n background-position: center;\n}\n.mvideolist .xigua-load-more {\n padding-top: 16px;\n padding-bottom: 44px;\n}\n.mvideolist .xigua-video-list {\n margin: 0 auto;\n width: 7.5rem;\n}\n.mvideolist .xigua-video-list__container {\n overflow: hidden;\n margin: 0 auto;\n padding: 0.32rem 0.24rem 0 0.24rem;\n}\n.mvideolist .xigua-video-list__noframe {\n padding: 0;\n}\n.mvideolist .xigua-video-list__frame {\n padding: 0 0.24rem;\n}\n.mvideolist .xigua-video-list__row {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n}\n.mvideolist .xigua-video-list__item {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n overflow: hidden;\n}\n.mvideolist .xigua-video-list__item:last-child {\n margin-left: 0.14rem;\n}\n.mvideolist .xigua-video-list__cover {\n position: relative;\n width: 100%;\n height: 1.92rem;\n overflow: hidden;\n}\n.mvideolist .xigua-video-list .xigua-show-monitor {\n width: 100%;\n height: 100%;\n}\n.mvideolist .xigua-video-list__overlap {\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.1);\n}\n.mvideolist .xigua-video-list__video-info {\n position: absolute;\n bottom: 0.08rem;\n z-index: 1;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n padding: 0.16rem;\n width: 100%;\n height: 0.32rem;\n line-height: 0.24rem;\n color: #fff;\n font-size: 0.24rem;\n}\n.mvideolist .xigua-video-list__video-info span {\n text-shadow: 0.5px 0.5px 0.5px rgba(0, 0, 0, 0.3);\n}\n.mvideolist .xigua-video-list__video-info .watch-icon {\n display: block;\n width: 0.26rem;\n height: 0.22rem;\n}\n.mvideolist .xigua-video-list__video-info .watch-count {\n margin-left: 0.07rem;\n}\n.mvideolist .xigua-video-list__title {\n display: -webkit-box;\n overflow: hidden;\n max-height: 0.84rem;\n min-height: 0.42rem;\n line-height: 0.42rem;\n margin-top: 0.16rem;\n font-size: 0.3rem;\n text-overflow: ellipsis;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n margin-bottom: 0.32rem;\n}\n.mvideolist .xigua-video-list__placeholder {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n}\n.mvideolist .xigua-video-list__user {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-wrap: nowrap;\n flex-wrap: nowrap;\n -webkit-box-pack: start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n width: 100%;\n line-height: 0.24rem;\n word-break: keep-all;\n height: 0.36rem;\n max-height: 0.36rem;\n margin-top: -0.2rem;\n margin-bottom: 0.32rem;\n}\n.mvideolist .xigua-video-list__avatar {\n position: relative;\n display: block;\n width: 0.36rem;\n min-width: 0.36rem;\n height: 0.36rem;\n line-height: 0;\n}\n.mvideolist .xigua-video-list__verified {\n position: absolute;\n right: -0.02rem;\n bottom: -0.02rem;\n z-index: 1;\n width: 0.16rem !important;\n height: 0.16rem !important;\n}\n.mvideolist .xigua-video-list__uname {\n display: inline-block;\n overflow: hidden;\n margin-left: 0.12rem;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 0.24rem;\n}\n.mvideolist .xigua-video-list__follow {\n position: relative;\n display: inline-block;\n margin-left: 0.28rem;\n font-size: 0.24rem;\n white-space: nowrap;\n}\n.mvideolist .xigua-video-list__dot {\n position: absolute;\n top: calc(50% - 0.02rem);\n left: -0.16rem;\n width: 0.04rem;\n height: 0.04rem;\n border-radius: 50%;\n}\n.mvideolist .xigua-image {\n display: inline-block;\n position: relative;\n}\n.mvideolist .xigua-image.preview {\n -webkit-transition: all 0.3s ease-in-out;\n transition: all 0.3s ease-in-out;\n}\n.mvideolist .xigua-image.preview .image-container,\n.mvideolist .xigua-image.preview .image-loading-container .image-loading,\n.mvideolist .xigua-image.preview .image-error-container .image-retry-load {\n background-color: transparent;\n}\n.mvideolist .xigua-image.preview .image-container::after {\n border-color: transparent;\n}\n.mvideolist .xigua-image .image-bottom-overlap,\n.mvideolist .xigua-image .image-top-overlap {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n}\n.mvideolist .xigua-image .image-bottom-overlap {\n z-index: 0;\n overflow: hidden;\n}\n.mvideolist .xigua-image .image-placeholder {\n background-color: #f7f8fa;\n width: 100%;\n height: 100%;\n}\n.mvideolist .xigua-image .image-top-overlap {\n z-index: 10;\n}\n.mvideolist .xigua-image .image-loading-container,\n.mvideolist .xigua-image .image-error-container {\n overflow: hidden;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n z-index: 2;\n font-size: 0.32rem;\n}\n.mvideolist .xigua-image .image-container {\n position: relative;\n font-size: 0;\n opacity: 0;\n z-index: 1;\n}\n.mvideolist .xigua-image .image-container.static-label,\n.mvideolist .xigua-image .image-container.loaded,\n.mvideolist .xigua-image .image-container.error {\n opacity: 1;\n}\n.mvideolist .xigua-image .image-container.animate {\n -webkit-transition-property: opacity;\n transition-property: opacity;\n -webkit-transition-timing-function: cubic-bezier(0.39, 0.575, 0.565, 1);\n transition-timing-function: cubic-bezier(0.39, 0.575, 0.565, 1);\n}\n.mvideolist .xigua-image .image-container .bordered {\n -webkit-box-shadow: 0 0 0 1PX #e5e6eb inset;\n box-shadow: 0 0 0 1PX #e5e6eb inset;\n}\n@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {\n .mvideolist .xigua-image .image-container .bordered {\n -webkit-box-shadow: 0 0 0 0.5PX #e5e6eb inset;\n box-shadow: 0 0 0 0.5PX #e5e6eb inset;\n }\n}\n.mvideolist .ios .xigua-image .image-container .bordered,\n.mvideolist .xigua-image .image-container .bordered.ios {\n -webkit-box-shadow: none;\n box-shadow: none;\n border: 0.5PX solid #e5e6eb;\n}\n@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {\n .mvideolist .xigua-image .image-container .bordered {\n -webkit-box-shadow: 0 0 0 0.5PX #e5e6eb inset;\n box-shadow: 0 0 0 0.5PX #e5e6eb inset;\n }\n}\n.mvideolist .ios .xigua-image .image-container .bordered,\n.mvideolist .xigua-image .image-container .bordered.ios {\n -webkit-box-shadow: none;\n box-shadow: none;\n border: 0.5PX solid #e5e6eb;\n}\n.mvideolist .xigua-image .image-container,\n.mvideolist .xigua-image .image-container img {\n width: inherit;\n height: inherit;\n min-width: inherit;\n min-height: inherit;\n max-width: inherit;\n max-height: inherit;\n}\n.mvideolist .xigua-image .image-container .preview-fit-contain-y {\n width: 100%;\n height: auto;\n position: absolute;\n top: 50%;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n}\n.mvideolist .xigua-image .image-container .preview-fit-contain-x {\n height: 100%;\n width: auto;\n position: absolute;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n}\n.mvideolist .xigua-image .image-delete-button {\n font-size: 0.24rem;\n width: 0.36rem;\n height: 0.36rem;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n position: absolute;\n top: 0;\n right: 0;\n color: #ffffff;\n background-color: rgba(0, 0, 0, 0.6);\n z-index: 3;\n}\n.mvideolist .xigua-image .image-error-container .image-retry-load {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 0.6);\n font-size: 0.28rem;\n color: #e6e8eb;\n}\n.mvideolist .xigua-image .image-error-container .image-retry-load .image-retry-icon {\n font-size: 0.36rem;\n}\n.mvideolist .xigua-image .image-loading-container .image-loading {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n color: #e6e8eb;\n background-color: rgba(0, 0, 0, 0.6);\n}\n.mvideolist .xigua-image .image-loading-container .image-loading .bg-color-with-config {\n background: #e6e8eb;\n}\n.mvideolist .xigua-image .image-loading-container .image-loading .stop-color-with-config {\n stop-color: #e6e8eb;\n}\n.mvideolist .xigua-image .image-loading-container .image-loading .fill-color-with-config {\n fill: #e6e8eb;\n}\n.mvideolist .xigua-image .image-loading-container .image-loading .stroke-color-with-config {\n stroke: #e6e8eb;\n}\n.mvideolist .xigua-image .image-loading-container .image-loading .bg-color-with-config {\n background: #e6e8eb;\n}\n.mvideolist .xigua-image .image-loading-container .image-loading .stop-color-with-config {\n stop-color: #e6e8eb;\n}\n.mvideolist .xigua-image .image-loading-container .image-loading .fill-color-with-config {\n fill: #e6e8eb;\n}\n.mvideolist .xigua-image .image-loading-container .image-loading .stroke-color-with-config {\n stroke: #e6e8eb;\n}\n.mvideolist * {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0;\n -webkit-font-smoothing: antialiased;\n -webkit-tap-highlight-color: transparent;\n}\n",""]);const s=a},3645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var s=0;s0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),t.push(u))}},t}},8081:e=>{"use strict";e.exports=function(e){return e[1]}},1804:(e,t,n)=>{"use strict";var r=n(5618),o=n(7205),i=n(7191),a=n(5516),s=n(9981),l=e.exports=function(e,t){var n,o,l,c,u;return arguments.length<2||"string"!=typeof e?(c=t,t=e,e=null):c=arguments[2],r(e)?(n=s.call(e,"c"),o=s.call(e,"e"),l=s.call(e,"w")):(n=l=!0,o=!1),u={value:t,configurable:n,enumerable:o,writable:l},c?i(a(c),u):u};l.gs=function(e,t,n){var l,c,u,f;return"string"!=typeof e?(u=n,n=t,t=e,e=null):u=arguments[3],r(t)?o(t)?r(n)?o(n)||(u=n,n=void 0):n=void 0:(u=t,t=n=void 0):t=void 0,r(e)?(l=s.call(e,"c"),c=s.call(e,"e")):(l=!0,c=!1),f={get:t,set:n,configurable:l,enumerable:c},u?i(a(u),f):f}},2828:e=>{if("undefined"!=typeof Element&&!Element.prototype.matches){var t=Element.prototype;t.matches=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}e.exports=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}},9438:(e,t,n)=>{var r=n(2828);function o(e,t,n,r,o){var a=i.apply(this,arguments);return e.addEventListener(n,a,o),{destroy:function(){e.removeEventListener(n,a,o)}}}function i(e,t,n,o){return function(n){n.delegateTarget=r(n.target,t),n.delegateTarget&&o.call(e,n)}}e.exports=function(e,t,n,r,i){return"function"==typeof e.addEventListener?o.apply(null,arguments):"function"==typeof n?o.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,(function(e){return o(e,t,n,r,i)})))}},3729:function(e,t){var n,r;void 0===(r="function"==typeof(n=function(){return function e(t,n,r){var o,i,a=window,s="application/octet-stream",l=r||s,c=t,u=!n&&!r&&c,f=document.createElement("a"),d=function(e){return String(e)},h=a.Blob||a.MozBlob||a.WebKitBlob||d,p=n||"download";if(h=h.call?h.bind(a):Blob,"true"===String(this)&&(l=(c=[c,l])[0],c=c[1]),u&&u.length<2048&&(p=u.split("/").pop().split("?")[0],f.href=u,-1!==f.href.indexOf(u))){var v=new XMLHttpRequest;return v.open("GET",u,!0),v.responseType="blob",v.onload=function(t){e(t.target.response,p,s)},setTimeout((function(){v.send()}),0),v}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(c)){if(!(c.length>2096103.424&&h!==d))return navigator.msSaveBlob?navigator.msSaveBlob(b(c),p):w(c);l=(c=b(c)).type||s}else if(/([\x80-\xff])/.test(c)){for(var m=0,g=new Uint8Array(c.length),y=g.length;m{"use strict";e.exports=function(){}},7191:(e,t,n)=>{"use strict";e.exports=n(6560)()?Object.assign:n(7346)},6560:e=>{"use strict";e.exports=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},7346:(e,t,n)=>{"use strict";var r=n(5103),o=n(2745),i=Math.max;e.exports=function(e,t){var n,a,s,l=i(arguments.length,2);for(e=Object(o(e)),s=function(r){try{e[r]=t[r]}catch(e){n||(n=e)}},a=1;a{"use strict";var r=n(6914),o={function:!0,object:!0};e.exports=function(e){return r(e)&&o[typeof e]||!1}},6914:(e,t,n)=>{"use strict";var r=n(430)();e.exports=function(e){return e!==r&&null!==e}},5103:(e,t,n)=>{"use strict";e.exports=n(7446)()?Object.keys:n(6137)},7446:e=>{"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},6137:(e,t,n)=>{"use strict";var r=n(6914),o=Object.keys;e.exports=function(e){return o(r(e)?Object(e):e)}},5516:(e,t,n)=>{"use strict";var r=n(6914),o=Array.prototype.forEach,i=Object.create,a=function(e,t){var n;for(n in e)t[n]=e[n]};e.exports=function(e){var t=i(null);return o.call(arguments,(function(e){r(e)&&a(Object(e),t)})),t}},1290:e=>{"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},7415:(e,t,n)=>{"use strict";var r=n(6191);e.exports=function(e){if(!r(e))throw new TypeError(e+" is not an Object");return e}},2745:(e,t,n)=>{"use strict";var r=n(6914);e.exports=function(e){if(!r(e))throw new TypeError("Cannot use null or undefined");return e}},9981:(e,t,n)=>{"use strict";e.exports=n(3591)()?String.prototype.contains:n(6042)},3591:e=>{"use strict";var t="razdwatrzy";e.exports=function(){return"function"==typeof t.contains&&!0===t.contains("dwa")&&!1===t.contains("foo")}},6042:e=>{"use strict";var t=String.prototype.indexOf;e.exports=function(e){return t.call(this,e,arguments[1])>-1}},2702:function(e,t,n){e.exports=function(){"use strict";function e(e){return"function"==typeof e}var t=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},r=0,o=void 0,i=void 0,a=function(e,t){h[r]=e,h[r+1]=t,2===(r+=2)&&(i?i(p):b())};var s="undefined"!=typeof window?window:void 0,l=s||{},c=l.MutationObserver||l.WebKitMutationObserver,u="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),f="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function d(){var e=setTimeout;return function(){return e(p,1)}}var h=new Array(1e3);function p(){for(var e=0;e{"use strict";var r=n(7415),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t,n=arguments[1];if(r(e),void 0===n)o.call(e,"__ee__")&&delete e.__ee__;else{if(!(t=o.call(e,"__ee__")&&e.__ee__))return;t[n]&&delete t[n]}}},8370:(e,t,n)=>{"use strict";var r,o,i,a,s,l,c,u=n(1804),f=n(1290),d=Function.prototype.apply,h=Function.prototype.call,p=Object.create,v=Object.defineProperty,m=Object.defineProperties,g=Object.prototype.hasOwnProperty,y={configurable:!0,enumerable:!1,writable:!0};o=function(e,t){var n,o;return f(t),o=this,r.call(this,e,n=function(){i.call(o,e,n),d.call(t,this,arguments)}),n.__eeOnceListener__=t,this},a=function(e){var t,n,r,o,i;if(g.call(this,"__ee__")&&(o=this.__ee__[e]))if("object"==typeof o){for(n=arguments.length,i=new Array(n-1),t=1;t{!function(){"use strict";if("object"==typeof window)if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});else{var e=window.document,t=[];r.prototype.THROTTLE_TIMEOUT=100,r.prototype.POLL_INTERVAL=null,r.prototype.USE_MUTATION_OBSERVER=!0,r.prototype.observe=function(e){if(!this._observationTargets.some((function(t){return t.element==e}))){if(!e||1!=e.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:e,entry:null}),this._monitorIntersections(),this._checkForIntersections()}},r.prototype.unobserve=function(e){this._observationTargets=this._observationTargets.filter((function(t){return t.element!=e})),this._observationTargets.length||(this._unmonitorIntersections(),this._unregisterInstance())},r.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorIntersections(),this._unregisterInstance()},r.prototype.takeRecords=function(){var e=this._queuedEntries.slice();return this._queuedEntries=[],e},r.prototype._initThresholds=function(e){var t=e||[0];return Array.isArray(t)||(t=[t]),t.sort().filter((function(e,t,n){if("number"!=typeof e||isNaN(e)||e<0||e>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return e!==n[t-1]}))},r.prototype._parseRootMargin=function(e){var t=(e||"0px").split(/\s+/).map((function(e){var t=/^(-?\d*\.?\d+)(px|%)$/.exec(e);if(!t)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(t[1]),unit:t[2]}}));return t[1]=t[1]||t[0],t[2]=t[2]||t[0],t[3]=t[3]||t[1],t},r.prototype._monitorIntersections=function(){this._monitoringIntersections||(this._monitoringIntersections=!0,this.POLL_INTERVAL?this._monitoringInterval=setInterval(this._checkForIntersections,this.POLL_INTERVAL):(o(window,"resize",this._checkForIntersections,!0),o(e,"scroll",this._checkForIntersections,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in window&&(this._domObserver=new MutationObserver(this._checkForIntersections),this._domObserver.observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))))},r.prototype._unmonitorIntersections=function(){this._monitoringIntersections&&(this._monitoringIntersections=!1,clearInterval(this._monitoringInterval),this._monitoringInterval=null,i(window,"resize",this._checkForIntersections,!0),i(e,"scroll",this._checkForIntersections,!0),this._domObserver&&(this._domObserver.disconnect(),this._domObserver=null))},r.prototype._checkForIntersections=function(){var e=this._rootIsInDom(),t=e?this._getRootRect():{top:0,bottom:0,left:0,right:0,width:0,height:0};this._observationTargets.forEach((function(r){var o=r.element,i=a(o),s=this._rootContainsTarget(o),l=r.entry,c=e&&s&&this._computeTargetAndRootIntersection(o,t),u=r.entry=new n({time:window.performance&&performance.now&&performance.now(),target:o,boundingClientRect:i,rootBounds:t,intersectionRect:c});l?e&&s?this._hasCrossedThreshold(l,u)&&this._queuedEntries.push(u):l&&l.isIntersecting&&this._queuedEntries.push(u):this._queuedEntries.push(u)}),this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)},r.prototype._computeTargetAndRootIntersection=function(t,n){if("none"!=window.getComputedStyle(t).display){for(var r,o,i,s,c,u,f,d,h=a(t),p=l(t),v=!1;!v;){var m=null,g=1==p.nodeType?window.getComputedStyle(p):{};if("none"==g.display)return;if(p==this.root||p==e?(v=!0,m=n):p!=e.body&&p!=e.documentElement&&"visible"!=g.overflow&&(m=a(p)),m&&(r=m,o=h,void 0,void 0,void 0,void 0,void 0,void 0,i=Math.max(r.top,o.top),s=Math.min(r.bottom,o.bottom),c=Math.max(r.left,o.left),d=s-i,!(h=(f=(u=Math.min(r.right,o.right))-c)>=0&&d>=0&&{top:i,bottom:s,left:c,right:u,width:f,height:d})))break;p=l(p)}return h}},r.prototype._getRootRect=function(){var t;if(this.root)t=a(this.root);else{var n=e.documentElement,r=e.body;t={top:0,left:0,right:n.clientWidth||r.clientWidth,width:n.clientWidth||r.clientWidth,bottom:n.clientHeight||r.clientHeight,height:n.clientHeight||r.clientHeight}}return this._expandRectByRootMargin(t)},r.prototype._expandRectByRootMargin=function(e){var t=this._rootMarginValues.map((function(t,n){return"px"==t.unit?t.value:t.value*(n%2?e.width:e.height)/100})),n={top:e.top-t[0],right:e.right+t[1],bottom:e.bottom+t[2],left:e.left-t[3]};return n.width=n.right-n.left,n.height=n.bottom-n.top,n},r.prototype._hasCrossedThreshold=function(e,t){var n=e&&e.isIntersecting?e.intersectionRatio||0:-1,r=t.isIntersecting?t.intersectionRatio||0:-1;if(n!==r)for(var o=0;o{var r="Expected a function",o=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,l=parseInt,c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,u="object"==typeof self&&self&&self.Object===Object&&self,f=c||u||Function("return this")(),d=Object.prototype.toString,h=Math.max,p=Math.min,v=function(){return f.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return NaN;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var n=a.test(e);return n||s.test(e)?l(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var o=!0,i=!0;if("function"!=typeof e)throw new TypeError(r);return m(n)&&(o="leading"in n?!!n.leading:o,i="trailing"in n?!!n.trailing:i),function(e,t,n){var o,i,a,s,l,c,u=0,f=!1,d=!1,y=!0;if("function"!=typeof e)throw new TypeError(r);function b(t){var n=o,r=i;return o=i=void 0,u=t,s=e.apply(r,n)}function w(e){return u=e,l=setTimeout(x,t),f?b(e):s}function C(e){var n=e-c;return void 0===c||n>=t||n<0||d&&e-u>=a}function x(){var e=v();if(C(e))return E(e);l=setTimeout(x,function(e){var n=t-(e-c);return d?p(n,a-(e-u)):n}(e))}function E(e){return l=void 0,y&&o?b(e):(o=i=void 0,s)}function k(){var e=v(),n=C(e);if(o=arguments,i=this,c=e,n){if(void 0===l)return w(c);if(d)return l=setTimeout(x,t),b(c)}return void 0===l&&(l=setTimeout(x,t)),s}return t=g(t)||0,m(n)&&(f=!!n.leading,a=(d="maxWait"in n)?h(g(n.maxWait)||0,t):a,y="trailing"in n?!!n.trailing:y),k.cancel=function(){void 0!==l&&clearTimeout(l),u=0,o=c=i=l=void 0},k.flush=function(){return void 0===l?s:E(v())},k}(e,t,{leading:o,maxWait:t,trailing:i})}},2705:(e,t,n)=>{var r=n(5639).Symbol;e.exports=r},4239:(e,t,n)=>{var r=n(2705),o=n(9607),i=n(2333),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},4107:(e,t,n)=>{var r=n(7990),o=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(o,""):e}},1957:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},9607:(e,t,n)=>{var r=n(2705),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[s]=n:delete e[s]),o}},2333:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5639:(e,t,n)=>{var r=n(1957),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},7990:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},3279:(e,t,n)=>{var r=n(3218),o=n(7771),i=n(4841),a=Math.max,s=Math.min;e.exports=function(e,t,n){var l,c,u,f,d,h,p=0,v=!1,m=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=l,r=c;return l=c=void 0,p=t,f=e.apply(r,n)}function b(e){return p=e,d=setTimeout(C,t),v?y(e):f}function w(e){var n=e-h;return void 0===h||n>=t||n<0||m&&e-p>=u}function C(){var e=o();if(w(e))return x(e);d=setTimeout(C,function(e){var n=t-(e-h);return m?s(n,u-(e-p)):n}(e))}function x(e){return d=void 0,g&&l?y(e):(l=c=void 0,f)}function E(){var e=o(),n=w(e);if(l=arguments,c=this,h=e,n){if(void 0===d)return b(h);if(m)return clearTimeout(d),d=setTimeout(C,t),y(h)}return void 0===d&&(d=setTimeout(C,t)),f}return t=i(t)||0,r(n)&&(v=!!n.leading,u=(m="maxWait"in n)?a(i(n.maxWait)||0,t):u,g="trailing"in n?!!n.trailing:g),E.cancel=function(){void 0!==d&&clearTimeout(d),p=0,l=h=c=d=void 0},E.flush=function(){return void 0===d?f:x(o())},E}},3218:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},7005:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},3448:(e,t,n)=>{var r=n(4239),o=n(7005);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},7771:(e,t,n)=>{var r=n(5639);e.exports=function(){return r.Date.now()}},4841:(e,t,n)=>{var r=n(4107),o=n(3218),i=n(3448),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):a.test(e)?NaN:+e}},2703:(e,t,n)=>{"use strict";var r=n(414);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},3197:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>g});var r=n(3379),o=n.n(r),i=n(7795),a=n.n(i),s=n(569),l=n.n(s),c=n(3565),u=n.n(c),f=n(9216),d=n.n(f),h=n(4589),p=n.n(h),v=n(8206),m={};m.styleTagTransform=p(),m.setAttributes=u(),m.insert=l().bind(null,"head"),m.domAPI=a(),m.insertStyleElement=d(),o()(v.Z,m);const g=v.Z&&v.Z.locals?v.Z.locals:void 0},3379:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},9216:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},3565:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},7795:e=>{"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},4589:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},9925:(e,t,n)=>{var r;void 0===(r=function(t,n){"use strict";const r={},o={on:function(e,t){if(r[e]){for(let n of r[e])if(t===n)return;r[e].push(t)}else r[e]=[t]},off:function(e,t){if(r[e])for(let n=0;n{const i=(0,n.useCallback)((()=>{r.default.sendLog("activity_frame_button_click",{compid:e,module_name:"videoframe",button_name:"changevideo"}),o()}),[o,e]);return n.default.createElement("div",{className:"mvideolist__change-btn",style:{backgroundImage:`url(${t})`},onClick:i})}}.apply(t,r),void 0===o||(e.exports=o)},9830:function(e,t,n){var r,o,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};r=[n,t,n(359)],o=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n=i(n),t.default=()=>n.default.createElement("div",{className:"mvideolist__empty"},n.default.createElement("p",null,"请配置内容"))}.apply(t,r),void 0===o||(e.exports=o)},8885:function(e,t,n){var r,o,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};r=[n,t,n(8286)],o=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n=i(n);const{isEditor:r,isOurApp:o}=n.default.env,{downloadOrArouseApp:a}=n.default;t.default=(e,t)=>{const{needDownload:n=!0}=t||{};return r?()=>{}:!o&&n?()=>a():e}}.apply(t,r),void 0===o||(e.exports=o)},1379:function(e,t,n){var r,o,i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return a(t,e),t},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};r=[n,t,n(359),n(9017),n(8286),n(6679),n(9830),n(1995),n(9986),n(4278),n(8885),n(3197)],o=function(e,t,n,r,o,i,a,c,u,f,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n=s(n),r=l(r),o=l(o),a=l(a),c=l(c),u=l(u),f=l(f),d=l(d);const{isEditor:h,isXGApp:p,isTTApp:v,isOurApp:m}=o.default.env,g=e=>{window.__MAGIC__.action.jsb.bridge.call("view.open",{url:e})};t.default=({id:e,magicComType:t,dataSourceType:s,blockId:l,activityId:y,gids:b,showFrame:w,showUserInfo:C,showVideoInfo:x,showChangeBtn:E,random:k,size:T,changeBtn:_,background:O,titleColor:S,unameColor:A,unFollowColor:I,followedColor:R,coverBackgroundColor:P})=>{const M=(0,n.useMemo)((()=>b.map((({gid:e})=>e))),[b]),{showEmpty:N,showBlockChangeBtn:j,showLoadMore:D,videos:L,getVideos:B,updateUserState:F,loadMoreStatus:H}=(0,f.default)({dataSourceType:s,blockId:l,activityId:y,gids:M,showChangeBtn:E,size:T,random:k}),{handleFollow:z,registerAppFollowListener:U,unRegisterAppFollowListener:V}=(0,u.default)(),G=(0,n.useCallback)((0,d.default)((t=>{var n,o;r.default.sendLog("activity_frame_component_show",{compid:e,gid:t.id,module_name:"videoframe"}),C&&r.default.sendLog("button_show",{button_type:"follow",compid:e,user_id:null===(n=t.userInfo)||void 0===n?void 0:n.userId,isfollow:(null===(o=t.userInfo)||void 0===o?void 0:o.follow)?"follow":"unfollow"})}),{needDownload:!1}),[e,C]),W=(0,n.useCallback)((0,d.default)((t=>{r.default.sendLog("activity_frame_video_click",{compid:e,gid:t.id,module_name:"videoframe"}),console.info("schema"),g(`sslocal://detail?groupid=${t.id}&aggr_type=0&log_pb=${JSON.stringify((null==t?void 0:t.logPb)||{})}`)})),[e]),X=(0,n.useCallback)((0,d.default)((e=>{const t=`sslocal://pgcprofile?user_id=${e.userId}`,n=`sslocal://profile?uid=${e.userId}`;p?g(t):v?g(n):o.default.downloadOrArouseApp(n,{toutiaoUrl:n})})),[]),Y=(0,n.useCallback)((()=>{h||B()}),[B]),J=(0,n.useCallback)((0,d.default)((t=>{z(t).then((({follow:n})=>{F(t.userId,n),r.default.sendLog("button_click",{button_type:"follow",compid:e,user_id:t.userId,isfollow:n?"follow":"unfollow"})})).catch((()=>{o.default.toast((t.follow?"取消关注":"关注")+"失败")}))})),[L]);return(0,n.useEffect)((()=>(U(F),()=>V(F))),[F]),(0,n.useEffect)((()=>{if(h||!m)return;const t=()=>{r.default.sendLog("activity_frame_show",{compid:e,module_name:"videoframe"})};return t(),window.__MAGIC__.action.jsb.bridge.on("view.onPageVisible",t),()=>{window.__MAGIC__.action.jsb.bridge.off("view.onPageVisible",t)}}),[e]),n.default.createElement("div",{id:e,"data-comp-type":t,className:"mvideolist"},N?n.default.createElement(a.default,null):n.default.createElement(i.VideoList,{videos:L,showFrame:w,showUserInfo:C,showVideoInfo:x,onVideoInView:G,onVideoClick:W,onUserClick:X,onFollowClick:J,theme:{background:null==O?void 0:O.background,titleColor:S,unameColor:A,unFollowColor:I,followedColor:R,coverBackgroundColor:P},bottomChildren:n.default.createElement("div",{className:"mvideolist__footer"},j&&n.default.createElement(c.default,{compid:e,backgroundImage:_,onClick:B}),D&&n.default.createElement(i.LoadMore,{threshold:500,throttle:500,status:H,onEndReached:Y,noMoreArea:n.default.createElement("p",{className:"load-more-text nomore"},h?"编辑器内只展示部分数据":"没有更多数据了")}))}))}}.apply(t,r),void 0===o||(e.exports=o)},689:function(e,t,n){var r,o,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};r=[n,t,n(8286)],o=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getVideoSourceAPI=t.getVideosAPI=void 0,n=i(n);const{fetch:r}=n.default,{isOurApp:o,isTTLiteApp:a}=n.default.env;t.getVideosAPI=({dataSourceType:e,blockId:t,activityId:n,gids:i,behotTime:s,size:l,offset:c})=>{const u=e=>{let t="/api/proxy"+e;return(o||a)&&(t="https://api5-normal-hl.toutiaoapi.com"+e),t};return"block"===e&&t?r({url:u("/lvfe/activity/api/packer/simplify/block/video"),method:"GET",params:{blockId:null==t?void 0:t.trim(),size:l,offset:c}}).then((({code:e,data:t})=>{if(0!==e)return Promise.reject(new Error("获取数据失败!"));const{offset:n,total:r,videos:o}=t||{};return{offset:n,total:r,hasMore:n+lObject.assign(Object.assign({},e),{id:e.gid})))}})):"top"===e&&n?r({url:u("/lvfe/activity/api/packer/simplify/activity/video"),method:"GET",params:{activityId:null==n?void 0:n.trim(),maxBehotTime:s,count:10}}).then((({code:e,data:t={}})=>{if(0!==e)return Promise.reject(new Error("获取数据失败!"));const{videos:n=[],hasMore:r}=t;return{offset:-1,total:0,hasMore:r,behotTime:n[n.length-1].beHotTime,videos:n.map((e=>Object.assign(Object.assign({},e),{id:e.gid})))}})):"gid"===e&&i.length>0?r({url:u("/lvfe/activity/api/packer/simplify/video"),method:"POST",data:{gids:i.join(",")}}).then((({code:e,data:t={}})=>{if(0!==e)return Promise.reject(new Error("获取数据失败!"));const n=i.map((e=>t[e]?Object.assign(Object.assign({},t[e]),{id:e}):null)).filter((e=>null!==e));return{offset:0,total:n.length,hasMore:!1,behotTime:0,videos:n}})):Promise.reject()},t.getVideoSourceAPI=()=>{}}.apply(t,r),void 0===o||(e.exports=o)},4278:function(e,t,n){var r,o,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};r=[n,t,n(359),n(689),n(8608),n(8286)],o=function(e,t,n,r,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),o=i(o),a=i(a);const{isEditor:s}=a.default.env;t.default=({dataSourceType:e,blockId:t,activityId:i,gids:a,showChangeBtn:l,size:c,random:u})=>{const[f,d]=(0,n.useState)([]),[h,p]=(0,n.useState)(0),[v,m]=(0,n.useState)("prepare"),[g,y]=(0,n.useState)(0),[b,w]=(0,n.useState)(0),{showEmpty:C,showBlockChangeBtn:x,showLoadMore:E}=(0,o.default)({dataSourceType:e,blockId:t,activityId:i,gids:a,showChangeBtn:l,size:c,total:g}),k=(0,n.useCallback)((n=>{C||(m("loading"),(0,r.getVideosAPI)({dataSourceType:e,blockId:t,activityId:i,gids:a,behotTime:n?0:b,size:l?c:10,offset:l&&u&&n?-1:n?0:h}).then((({offset:e,total:t,videos:r,behotTime:o,hasMore:i})=>{const a=()=>{p(e+Number(c)>t?0:e),y(t),w(o),m(s?"nomore":i?"prepare":"nomore")};0!==f.length&&!n&&E?setTimeout((()=>{d([...f,...r]),a()}),500):(d(r),a())})).catch((e=>{console.error(e),m("retry")})))}),[C,E,e,t,i,a,b,u,l,c,h]),T=(0,n.useCallback)(((e,t)=>{const n=f.map((n=>{var r;return(null===(r=n.userInfo)||void 0===r?void 0:r.userId)===e?Object.assign(Object.assign({},n),{userInfo:Object.assign(Object.assign({},n.userInfo),{follow:t})}):n}));d(n)}),[f]);return(0,n.useEffect)((()=>{C||k(!0)}),[C,e,c,u,t,i,l,a.join(",")]),(0,n.useEffect)((()=>{C||s||"block"===e&&l||"prepare"===v&&f.length>0&&f.length<20&&k()}),[C,e,l,f,v]),{showEmpty:C,showBlockChangeBtn:x,showLoadMore:E,videos:f,getVideos:k,loadMoreStatus:v,updateUserState:T}}}.apply(t,r),void 0===o||(e.exports=o)},9986:function(e,t,n){var r,o,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};r=[n,t,n(359),n(8286),n(6126)],o=function(e,t,n,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r=i(r);const{fetch:a}=r.default,{isTTApp:s,isTTLiteApp:l,isOurApp:c,isiOS:u,getAppId:f}=r.default.env;t.default=()=>{const{login:e,userInfo:t,isLoginRef:i}=(0,o.useLogin)(),d=(0,n.useRef)([]),h=(0,n.useCallback)((e=>a({url:(e=>{let t="/api/proxy"+e;return(c||l)&&(t="https://api5-normal-hl.toutiaoapi.com"+e),t})("/lvfe/activity/api/user/MGetFollowStatus"),method:"GET",params:{toUids:e,aid:f()}}).then((({code:t,data:n={}})=>0!==t?Promise.reject("fetch error"):{follow:Boolean(n[e])}))),[]),p=(0,n.useCallback)(((e,n)=>s?new Promise(((r,o)=>{const i=n?"do_media_like":"do_media_unlike";window.__MAGIC__.action.jsb.bridge.call(i,{id:t.userId,uid:e,content_type:"",source:"59"},(t=>{l&&u?h(e).then((e=>r({follow:e.follow||n}))).catch(console.error):1===t.code?r({follow:n}):o()}))})):a({url:`https://it.snssdk.com/video/app/user/${n?"follow":"unfollow"}/v2/`,method:"POST",data:{to_user_id:e}}).then((({status:e,user_presentation_text:t})=>0!==e?Promise.reject(t||"请求失败"):(r.default.toast(n?"关注成功":"已取消关注"),{follow:n})))),[t]),v=(0,n.useCallback)((e=>{d.current.push(e)}),[]),m=(0,n.useCallback)((e=>{d.current=d.current.filter((t=>t!==e))}),[]),g=(0,n.useCallback)((t=>i.current?p(t.userId,!t.follow):e().then((()=>p(t.userId,!t.follow))).catch(console.error)),[p,e]);return(0,n.useEffect)((()=>{if(!c)return;s&&u&&window.__MAGIC__.action.jsb.bridge.call("addEventListener",{name:"page_state_change"});const e=e=>{var t;const{type:n,id:r,status:o}=e;"user_action"!==n&&"pgc_action"!==n||null===(t=d.current)||void 0===t||t.forEach((e=>{null==e||e(r,Boolean(o))}))};return window.__MAGIC__.action.jsb.bridge.on("page_state_change",e),()=>{window.__MAGIC__.action.jsb.bridge.off("page_state_change",e)}}),[]),{handleFollow:g,registerAppFollowListener:v,unRegisterAppFollowListener:m}}}.apply(t,r),void 0===o||(e.exports=o)},8608:function(e,t,n){var r,o,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};r=[n,t,n(359),n(8286)],o=function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r=i(r);const{isEditor:o}=r.default.env;t.default=({dataSourceType:e,blockId:t,activityId:r,gids:i,showChangeBtn:a,total:s,size:l})=>{const c=(0,n.useMemo)((()=>!!o&&("block"===e&&!t||"top"===e&&!r||"gid"===e&&0===i.length)),[e,t,r,i]),u=(0,n.useMemo)((()=>!c&&!("block"!==e||!a)&&s>2*l),[c,e,a,s,l]),f=(0,n.useMemo)((()=>!c&&("top"===e||"block"===e&&!a)),[c,e,a]);return{showEmpty:c,showBlockChangeBtn:u,showLoadMore:f}}}.apply(t,r),void 0===o||(e.exports=o)},6126:function(e,t,n){var r,o,i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};r=[n,t,n(8901),n(0)],o=function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),a(n,t),a(r,t)}.apply(t,r),void 0===o||(e.exports=o)},0:(e,t,n)=>{var r,o;r=[n,t,n(359),n(1193)],o=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useInView=void 0;const r=new Map,o=new IntersectionObserver(((e,t)=>{e.forEach((e=>{const n=r.get(e.target);n&&n(e,t)}))}),{root:null,rootMargin:"0px",threshold:[.1,.9]}),i=e=>{o.unobserve(e),r.delete(e)};t.useInView=({onlyFirst:e=!0})=>{const[t,a]=(0,n.useState)(!1),s=(0,n.useRef)(null);return(0,n.useLayoutEffect)((()=>{const t=s.current;if(t)return((e,t)=>{r.set(e,t),o.observe(e)})(t,(n=>{n.intersectionRatio>=.1?(a(!0),e&&i(t)):a(!1)})),()=>i(t)}),[]),{viewRef:s,inView:t}}}.apply(t,r),void 0===o||(e.exports=o)},8901:function(e,t,n){var r,o,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};r=[n,t,n(359),n(9925),n(8286)],o=function(e,t,n,r,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useLogin=void 0,r=i(r),o=i(o);const{isXGApp:a,isiOS:s,isOurApp:l}=o.default.env;let c=0,u=null;const f=()=>l?(Date.now()-c<500&&u||(c=Date.now(),u=new Promise((e=>{window.__MAGIC__.action.jsb.app.getAppInfo().then((({data:t})=>{const n=Number((null==t?void 0:t.user_id)||0);e({isLogin:Boolean(n),deviceId:(null==t?void 0:t.device_id)||"0",userId:n})})).catch(console.error)}))),u):Promise.resolve({isLogin:!1,deviceId:"0",userId:0});l&&window.__MAGIC__.action.jsb.view.onPageVisible((()=>{f().then((e=>{r.default.emit("loginChange",Object.assign({},e))}))})),t.useLogin=()=>{const[e,t]=(0,n.useState)({isLogin:!1,deviceId:"0",userId:0}),o=(0,n.useRef)(!1),i=(0,n.useRef)(!1);o.current=e.isLogin;const l=(0,n.useCallback)(((e=!1)=>f().then((n=>(t(n),o.current=n.isLogin,e&&r.default.emit("loginChange",Object.assign({},n)),n)))),[f]),c=(0,n.useCallback)((()=>new Promise(((t,n)=>{i.current||(i.current=!0,setTimeout((()=>{i.current=!1}),500),o.current?t(e):window.__MAGIC__.action.jsb.app.login().then((()=>{l(!0).then((e=>{if(e.isLogin)t(e);else{if(a&&s)return;n()}})).catch((()=>{n()}))})).catch((e=>{n(e)})))}))),[l,o,e]);return(0,n.useEffect)((()=>{r.default.on("loginChange",(e=>{o.current!==e.isLogin&&t(Object.assign({},e))}))}),[]),(0,n.useEffect)((()=>{l()}),[]),{userInfo:e,isLoginRef:o,login:c}}}.apply(t,r),void 0===o||(e.exports=o)},8580:(e,t,n)=>{var r;r=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=(e,t=(()=>{}))=>{const n=document.createElement("input");n.setAttribute("readonly","readonly"),n.value=e,document.body.appendChild(n),n.select(),n.setSelectionRange(0,n.value.length),document.execCommand("copy")&&(null==t||t()),document.body.removeChild(n)}}.apply(t,[n,t]),void 0===r||(e.exports=r)},6164:(e,t,n)=>{var r;r=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UTM_SOURCE=void 0,t.UTM_SOURCE="utm_source=magic"}.apply(t,[n,t]),void 0===r||(e.exports=r)},100:function(e,t,n){var r,o,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};r=[n,t,n(2943),n(2872),n(2726)],o=function(e,t,n,r,o){"use strict";var a;Object.defineProperty(t,"__esModule",{value:!0}),t.backToApp=t.getFormatScheme=t.getShortLink=t.getArouseApp=void 0,n=i(n),function(e){e.TOUTIAO="toutiao",e.LITE="lite",e.XIGUA="xigua"}(a||(a={}));const s={[a.TOUTIAO]:"https://article.zlink.toutiao.com/krxM",[a.LITE]:"https://z.toutiao.com/YKw6"},l={[a.TOUTIAO]:["snssdk141","snssdk143"],[a.LITE]:["snssdk35","snssdk35"],[a.XIGUA]:["snssdk32","snssdk32"]};t.getArouseApp=e=>{var t;if(e)return a.TOUTIAO;const n=(null===(t=(0,r.getQuery)().appTypeSource)||void 0===t?void 0:t.trim())||"";return Object.values(a).includes(n)?n:a.TOUTIAO},t.getShortLink=e=>{var t,n;return e===a.LITE?(null===(t=window.__IXIGUA_SHORTLINK__)||void 0===t?void 0:t.lite)||s[a.LITE]:(null===(n=window.__IXIGUA_SHORTLINK__)||void 0===n?void 0:n.toutiao)||s[a.TOUTIAO]},t.getFormatScheme=(e,t)=>{let n=e;/^http/.test(e)&&(n=`sslocal://webview?url=${encodeURIComponent(e)}`);let r=n.split(":"),i=r.length>1?r[0]:"";return n=n.replace(i,l[t][Number(o.isAndroid)]),n},t.backToApp=(e,t,r)=>{r!==a.TOUTIAO&&r!==a.LITE||(0,n.default)({link:t,scheme:e,cancelUniversalLink:!!(0,o.isWithinTheClient)()})},t.default=(e=window.location.href,n,r)=>{const o=(0,t.getArouseApp)(r),i=(0,t.getShortLink)(o),s=((e,t,n)=>n?e===a.LITE?n.liteUrl||n.toutiaoUrl||t:n.toutiaoUrl||t:t)(o,e,n),l=(0,t.getFormatScheme)(s,o);(0,t.backToApp)(l,i,o)}}.apply(t,r),void 0===o||(e.exports=o)},2726:function(e,t,n){var r,o,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};r=[n,t,n(3978)],o=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isWithinTheClient=t.getOSVersion=t.getOS=t.getAppName=t.getAppId=t.AppInfoMap=t.getPlatform=t.isQQ=t.isWeChat=t.isDouYinApp=t.isVideoCutApp=t.isOurApp=t.isTTMainApp=t.isTTLiteApp=t.isTTApp=t.isXGApp=t.isPreview=t.isPC=t.isiOS=t.isiPod=t.isiPhone=t.isiPad=t.isAndroid=t.isEditor=void 0,n=i(n);const r=navigator.userAgent;t.isEditor=!0===window.__EDITOR__,t.isAndroid=Boolean(r.match(/(android|adr)/i)),t.isiPad=Boolean(r.match(/(iPad).*OS\s([\d_]+)/)),t.isiPhone=Boolean(r.match(/(iPhone\sOS)\s([\d_]+)/)),t.isiPod=Boolean(r.match(/(iPod)(.*OS\s([\d_]+))?/)),t.isiOS=t.isiPad||t.isiPhone||t.isiPod,t.isPC=!t.isEditor&&!t.isAndroid&&!t.isiOS,t.isPreview=t.isPC&&window.self!==window.top,t.isXGApp=Boolean(r.match(/VideoArticle/i)),t.isTTApp=Boolean(r.match(/newsarticle/i)),t.isTTLiteApp=Boolean(r.match(/newslite/i)),t.isTTMainApp=t.isTTApp&&!t.isTTLiteApp,t.isOurApp=t.isXGApp||t.isTTApp,t.isVideoCutApp=Boolean(r.match(/LV/)),t.isDouYinApp=Boolean(r.match(/aweme/i)),t.isWeChat=Boolean(r.match(/micromessenger/i)),t.isQQ=Boolean(r.match(/ qq/i))&&!r.match(/mqqbrowser/i),t.getPlatform=function(){return t.isPC?"pc":t.isXGApp?"xigua":t.isTTLiteApp?"lite":t.isTTMainApp?"toutiao":t.isVideoCutApp?"videocut":t.isDouYinApp?"douyin":t.isWeChat?"wechat":t.isQQ?"qq":"other"},t.AppInfoMap={xigua:{appId:32,appName:"video_article"},toutiao:{appId:13,appName:"news_article"},lite:{appId:35,appName:"news_article_lite"}},t.getAppId=()=>{const e=(0,t.getPlatform)();return t.AppInfoMap[e]?t.AppInfoMap[e].appId:t.AppInfoMap.xigua.appId},t.getAppName=()=>{const e=(0,t.getPlatform)();return t.AppInfoMap[e]?t.AppInfoMap[e].appName:t.AppInfoMap.xigua.appName},t.getOS=()=>t.isAndroid?"android":t.isiOS?"ios":"pc",t.getOSVersion=()=>{var e;try{let n=navigator.userAgent.toLowerCase();if(t.isAndroid)return(null===(e=n.match(/android (.*?);/))||void 0===e?void 0:e[0].replace(/android/gi,""))||"";if(t.isiOS)return`${n.match(/os [\d._]+/gi)}`.replace(/[^0-9|_.]/gi,"").replace(/_/gi,".")}catch(e){(0,n.default)("啊哦!出错啦>_<")}return""},t.isWithinTheClient=()=>t.isTTMainApp||t.isTTLiteApp||t.isXGApp||t.isVideoCutApp||t.isDouYinApp}.apply(t,r),void 0===o||(e.exports=o)},7889:function(e,t,n){var r,o,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};r=[n,t,n(1519),n(2726)],o=function(e,t,n,r){"use strict";function o(e,t,n=location.host){let r=e;if(/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+)/.test(r)||(r=`${n}${r.startsWith("/")?"":"/"}${r}`),r.startsWith("//")||r.startsWith("http")||(r=`${location.protocol||"https:"}//${r}`),!t)return r;const[o,i]=r.split("?"),a=new URLSearchParams(i);return Object.keys(t).forEach((e=>a.set(e,t[e]))),`${o}?${a.toString()}`}Object.defineProperty(t,"__esModule",{value:!0}),t.getUrlWithParams=void 0,n=i(n),t.getUrlWithParams=o,t.default=function(e){const t=o(e.url,e.params),{method:i="GET",headers:a={},platform:s="all",forceHttp:l,data:c,needCommonParams:u=!0}=e,f=function(e=!1,t="all"){return e?"http":r.isXGApp&&["all","inApp","onlyXigua"].includes(t)||r.isTTApp&&["all","inApp","onlyToutiao"].includes(t)?"jsb":["all","outApp"].includes(t)?"http":null}(l,s);return"jsb"===f?new Promise(((e,n)=>{window.JSBridge.call("app.fetch",{url:t,method:i,data:c,header:a,needCommonParams:u},(({code:t,status:r,data:o})=>{let i=!1;if(1===t&&(i=!0),200===o.status&&(i=!0),1===o.code&&(i=!0),i)try{e(JSON.parse(null==o?void 0:o.response))}catch(e){console.error(o),n("请求失败")}else console.error(o),n(r)}))})):"http"===f?(0,n.default)({url:t,method:i,headers:Object.assign({"Content-Type":"application/json"},a),data:c}).then((({status:e,data:t})=>200===e?t:(console.error(t),Promise.reject("请求失败")))):new Promise((()=>{}))}}.apply(t,r),void 0===o||(e.exports=o)},3815:function(e,t,n){var r,o,i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};r=[n,t,n(7889),n(7889),n(6947),n(1668),n(3746)],o=function(e,t,n,r,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a(n,t),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s(r).default}}),a(o,t),a(i,t)}.apply(t,r),void 0===o||(e.exports=o)},6947:function(e,t,n){var r,o,i=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o{const{batch:r}=e,o=i(e,["batch"]),{pack:a,unPack:s,beforeRequest:l}=r,{params:c,data:u}=t.map((({params:e,data:t})=>({params:e,data:t}))).reduce(((e,t,n)=>0===n?t:a(e,t)));let f=Object.assign(Object.assign({},o),{params:c,data:u});return l&&(f=l(f)),(0,n.default)(f).then((e=>{t.forEach((({params:t,data:n,resolve:r})=>{r(s(e,{params:t,data:n}))}))})).catch((e=>{t.forEach((({reject:t})=>{t(e)}))}))};t.PackFetchHOF=function(e){let t,n=[];return o=>{const i=new Promise(((e,t)=>{n.push(Object.assign(Object.assign({},o),{resolve:e,reject:t}))}));return t||(t=setTimeout((()=>{r(e,[...n]),clearTimeout(t),t=0,n=[]}),e.batch.throttle||100)),n.length===e.batch.limit&&(r(e,[...n]),clearTimeout(t),t=0,n=[]),i}}}.apply(t,r),void 0===o||(e.exports=o)},1668:function(e,t,n){var r,o,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};r=[n,t,n(7889)],o=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throttleFetch=void 0,n=i(n);const r={};t.throttleFetch=function(e){const t=JSON.stringify(e);return r[t]||(r[t]=(0,n.default)(e).then((e=>(delete r[t],e))).catch((e=>{throw delete r[t],e}))),r[t]}}.apply(t,r),void 0===o||(e.exports=o)},8286:function(e,t,n){var r,o,i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return a(t,e),t},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};r=[n,t,n(6921),n(3815)],o=function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n=l(n),r=s(r);const o=Object.assign({fetch:r.default,getUrlWithParams:r.getUrlWithParams,PackFetchHOF:r.PackFetchHOF,throttleFetch:r.throttleFetch},n.default);t.default=o}.apply(t,r),void 0===o||(e.exports=o)},6921:function(e,t,n){var r,o,i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return a(t,e),t},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};r=[n,t,n(8580),n(1575),n(2726),n(100),n(6164),n(2872),n(3978),n(2695)],o=function(e,t,n,r,o,i,a,c,u,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n=l(n),r=s(r),o=s(o),i=s(i),a=s(a),c=s(c),u=l(u),f=l(f);const d=i;t.default={clipboard:n.default,version:r,env:o,downloadOrArouseApp:i.default,constance:a,query:c,toast:u.default,sendXTLog:f.default,arouseTool:d}}.apply(t,r),void 0===o||(e.exports=o)},2872:(e,t,n)=>{var r;r=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.modifyUrl=t.getQuery=t.urlEncode=t.escapeHTML=void 0,t.escapeHTML=function(e){const t={"&":"&","<":"<",">":">","'":"'",'"':"""};return e.replace(/[&<>'"]/g,(e=>t[e]||""))},t.urlEncode=function(e){let t=[];for(let n in e){let r=`${n}=${encodeURIComponent(e[n])}`;t.push(r)}return t.join("&")},t.getQuery=function(e=location.search){let n=e.split("?")[1]||"",r={};if(n){let e=n.split("&");for(let n in e){let o=e[n].split("="),i=o.shift(),a=(0,t.escapeHTML)(decodeURIComponent(o.join("=")));r[i]=a}}return r},t.modifyUrl=(e,n)=>{if(void 0===n||0===Object.keys(n).length)return e;const r=(0,t.urlEncode)(n);return e.match(/\?/)?e.match(/&$/)?e+r:`${e}&${r}`:`${e}?${r}`}}.apply(t,[n,t]),void 0===r||(e.exports=r)},2695:(e,t,n)=>{var r,o;r=[n,t,n(2726)],o=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t={}){var r,o,i;if("object"==typeof e&&(t=e.params||{},e=e.event),n.isEditor)console.log(e,"magic editor canvas no log!");else if(t.language=navigator.language,t.country=window.__MAGIC__.canvas.region||"unknow",t.appType=window.__MAGIC__.canvas.appType||"unknow",t.pageNo=(null===(i=null===(o=null===(r=window.__MAGIC__.dynamicInfo)||void 0===r?void 0:r.schemaRenderComponent)||void 0===o?void 0:o.state)||void 0===i?void 0:i.pageNo)||0,t.inorout=n.isOurApp?"in":"out",t.osType=(0,n.getOS)(),e.match(/^magic_sdk_/)||(e=`magic_sdk_${e}`),n.isOurApp&&window.__MAGIC__.action&&window.__MAGIC__.action.magicUnifyJsb&&window.__MAGIC__.action.magicUnifyJsb.appSendLog){let n=window.__MAGIC__.teaEvtParams||{},r=Object.assign({},n,t);window.__MAGIC__.action.magicUnifyJsb.appSendLog(e,r)}else window.collectEvent?window.collectEvent(e,t):console.log(e,"cannot log")}}.apply(t,r),void 0===o||(e.exports=o)},3978:(e,t,n)=>{var r,o;r=[n,t,n(2726)],o=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e="",t=2){if(!e)return;let r=document.createElement("div"),o=`mes_${Math.random().toString(36).substr(2)}`;r.id=o,r.style="background-size:100% 100%;position: fixed; left: 50%; top: 50%; transform: translate(-50%,-50%);-webkit-transform: translate(-50%, -50%);background-color: rgba(0,0,0,0.7); border-radius: 0.06rem;z-index: 999; font-size: 0.3rem;padding: 0.2rem; text-align: center; color: white;",r.innerHTML=e;let i=document.body;n.isEditor&&(i=document.getElementsByClassName("magic-editor-canvas-area")[0]||document.body),i.appendChild(r),setTimeout((function(){i.removeChild(r)}),1e3*t)}}.apply(t,r),void 0===o||(e.exports=o)},1575:(e,t,n)=>{var r,o;r=[n,t,n(2726)],o=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isGeVersion=t.isLowVersion=void 0,t.isLowVersion=(e,t,r)=>{const[o,i,a]=e.split("."),s=parseInt(`${o}${i}${a}`,10);if(n.isiOS)return s!(0,t.isLowVersion)(e,n,r)}.apply(t,r),void 0===o||(e.exports=o)},372:(e,t,n)=>{"use strict";var r=n(6060);e.exports=function(e){if("function"!=typeof e)return!1;if(!hasOwnProperty.call(e,"length"))return!1;try{if("number"!=typeof e.length)return!1;if("function"!=typeof e.call)return!1;if("function"!=typeof e.apply)return!1}catch(e){return!1}return!r(e)}},3940:(e,t,n)=>{"use strict";var r=n(5618),o={object:!0,function:!0,undefined:!0};e.exports=function(e){return!!r(e)&&hasOwnProperty.call(o,typeof e)}},7205:(e,t,n)=>{"use strict";var r=n(372),o=/^\s*class[\s{/}]/,i=Function.prototype.toString;e.exports=function(e){return!!r(e)&&!o.test(i.call(e))}},6060:(e,t,n)=>{"use strict";var r=n(3940);e.exports=function(e){if(!r(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(e){return!1}}},5618:e=>{"use strict";e.exports=function(e){return null!=e}},6167:function(e){e.exports=function(){"use strict";function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function t(e,t){return e(t={exports:{}},t.exports),t.exports}function n(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=v(t),this.reject=v(n)}function r(e){var t=e.length;return 3===t?(60*(60*Number(e[0])+Number(e[1]))*1e3+1e3*Number(e[2]))/1e3:2===t?(60*Number(e[0])*1e3+1e3*Number(e[1]))/1e3:Number(e[0])}function o(e){return/^(\-|\+)?\d+(\.\d+)?$/.test(e)}function i(e,t){return e>=0&&e=r?r-1:n].start<=e&&et[o].end&&o+1t[o].end&&o+1>=r)return-1}return-1}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={code:Or[e].code,msg:Or[e].msg};return Yt(t).map((function(e){n[e]=t[e]})),n}function u(e){return new Wt((function(t,n){e.list&&t(e),new gn({url:e.url,type:"text"}).then((function(r){Sn.parse(r.res.response,(function(r,o){if(o){var i=c(2,o);console.trace(i),n(i,{format:r.format})}else if(r.format)e.list=r.list,e.format=r.format,e.styles=r.styles,t(e);else{var a=c(3);console.trace(a),n(a)}}))})).catch((function(e){var t=c(1,{statusText:e.statusText,status:e.status,type:e.type,message:"http load error"});console.trace(t),n(t)}))}))}function f(e,t){return!!(e.id&&e.id===t.id||e.language&&e.language===t.language)}var d=e(t((function(e,t){t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}}))),h=t((function(e){var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)})),p=t((function(e){var t=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=t)})),v=(p.version,function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}),m=function(e,t,n){if(v(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}},g=function(e){return"object"==typeof e?null!==e:"function"==typeof e},y=function(e){if(!g(e))throw TypeError(e+" is not an object!");return e},b=function(e){try{return!!e()}catch(e){return!0}},w=!b((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})),C=h.document,x=g(C)&&g(C.createElement),E=function(e){return x?C.createElement(e):{}},k=!w&&!b((function(){return 7!=Object.defineProperty(E("div"),"a",{get:function(){return 7}}).a})),T=function(e,t){if(!g(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!g(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!g(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!g(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},_=Object.defineProperty,O={f:w?Object.defineProperty:function(e,t,n){if(y(e),t=T(t,!0),y(n),k)try{return _(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},S=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},A=w?function(e,t,n){return O.f(e,t,S(1,n))}:function(e,t,n){return e[t]=n,e},I={}.hasOwnProperty,R=function(e,t){return I.call(e,t)},P=function(e,t,n){var r,o,i,a=e&P.F,s=e&P.G,l=e&P.S,c=e&P.P,u=e&P.B,f=e&P.W,d=s?p:p[t]||(p[t]={}),v=d.prototype,g=s?h:l?h[t]:(h[t]||{}).prototype;for(r in s&&(n=t),n)(o=!a&&g&&void 0!==g[r])&&R(d,r)||(i=o?g[r]:n[r],d[r]=s&&"function"!=typeof g[r]?n[r]:u&&o?m(i,h):f&&g[r]==i?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(i):c&&"function"==typeof i?m(Function.call,i):i,c&&((d.virtual||(d.virtual={}))[r]=i,e&P.R&&v&&!v[r]&&A(v,r,i)))};P.F=1,P.G=2,P.S=4,P.P=8,P.B=16,P.W=32,P.U=64,P.R=128;var M=P;M(M.S+M.F*!w,"Object",{defineProperty:O.f});var N=p.Object,j=function(e,t,n){return N.defineProperty(e,t,n)},D=t((function(e){e.exports={default:j,__esModule:!0}}));e(D);var L=e(t((function(e,t){t.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(D);t.default=function(){function e(e,t){for(var r=0;r0?F:B)(e)},z=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},U=A,V={},G={}.toString,W=function(e){return G.call(e).slice(8,-1)},X=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==W(e)?e.split(""):Object(e)},Y=function(e){return X(z(e))},J=Math.min,q=function(e){return e>0?J(H(e),9007199254740991):0},Q=Math.max,K=Math.min,Z=t((function(e){var t=h["__core-js_shared__"]||(h["__core-js_shared__"]={});(e.exports=function(e,n){return t[e]||(t[e]=void 0!==n?n:{})})("versions",[]).push({version:p.version,mode:"pure",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),$=0,ee=Math.random(),te=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++$+ee).toString(36))},ne=Z("keys"),re=function(e){return ne[e]||(ne[e]=te(e))},oe=function(e){return function(t,n,r){var o=Y(t),i=q(o.length),a=function(e,t){return(e=H(e))<0?Q(e+t,0):K(e,t)}(r,i);for(e;i>a;a++)if(a in o&&o[a]===n)return a||0;return-1}}(!1),ie=re("IE_PROTO"),ae=function(e,t){var n,r=Y(e),o=0,i=[];for(n in r)n!=ie&&R(r,n)&&i.push(n);for(;t.length>o;)R(r,n=t[o++])&&(~oe(i,n)||i.push(n));return i},se="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),le=Object.keys||function(e){return ae(e,se)},ce=w?Object.defineProperties:function(e,t){y(e);for(var n,r=le(t),o=r.length,i=0;o>i;)O.f(e,n=r[i++],t[n]);return e},ue=h.document,fe=ue&&ue.documentElement,de=re("IE_PROTO"),he=function(){},pe=function(){var e,t=E("iframe"),n=se.length;for(t.style.display="none",fe.appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("