szld-libs 0.3.27 → 0.3.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -190,7 +190,7 @@ Check the render method of \``+re+"`.")}throw new Error("Element type is invalid
190
190
  Check the render method of %s.`,kt(ur)||"Unknown"));var Y=qs(_,P);Y.payload={element:n},h=h===void 0?null:h,h!==null&&(typeof h!="function"&&c("render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",h),Y.callback=h);var re=ac(y,Y,P);return re!==null&&(Kr(re,y,P,_),Ex(re,y,P)),P}function vb(n){var a=n.current;if(!a.child)return null;switch(a.child.tag){case x:return a.child.stateNode;default:return a.child.stateNode}}function SW(n){switch(n.tag){case C:{var a=n.stateNode;if(xr(a)){var u=k_(a);PK(a,u)}break}case B:{Qs(function(){var y=Si(n,xt);if(y!==null){var _=ei();Kr(y,n,xt,_)}});var h=xt;O4(n,h);break}}}function aF(n,a){var u=n.memoizedState;u!==null&&u.dehydrated!==null&&(u.retryLane=E1(u.retryLane,a))}function O4(n,a){aF(n,a);var u=n.alternate;u&&aF(u,a)}function DW(n){if(n.tag===B){var a=Nu,u=Si(n,a);if(u!==null){var h=ei();Kr(u,n,a,h)}O4(n,a)}}function kW(n){if(n.tag===B){var a=dc(n),u=Si(n,a);if(u!==null){var h=ei();Kr(u,n,a,h)}O4(n,a)}}function iF(n){var a=u1(n);return a===null?null:a.stateNode}var oF=function(n){return null};function TW(n){return oF(n)}var lF=function(n){return!1};function AW(n){return lF(n)}var sF=null,uF=null,cF=null,fF=null,dF=null,hF=null,pF=null,vF=null,mF=null;{var gF=function(n,a,u){var h=a[u],y=Er(n)?n.slice():zt({},n);return u+1===a.length?(Er(y)?y.splice(h,1):delete y[h],y):(y[h]=gF(n[h],a,u+1),y)},yF=function(n,a){return gF(n,a,0)},xF=function(n,a,u,h){var y=a[h],_=Er(n)?n.slice():zt({},n);if(h+1===a.length){var P=u[h];_[P]=_[y],Er(_)?_.splice(y,1):delete _[y]}else _[y]=xF(n[y],a,u,h+1);return _},bF=function(n,a,u){if(a.length!==u.length){f("copyWithRename() expects paths of the same length");return}else for(var h=0;h<u.length-1;h++)if(a[h]!==u[h]){f("copyWithRename() expects paths to be the same except for the deepest key");return}return xF(n,a,u,0)},CF=function(n,a,u,h){if(u>=a.length)return h;var y=a[u],_=Er(n)?n.slice():zt({},n);return _[y]=CF(n[y],a,u+1,h),_},wF=function(n,a,u){return CF(n,a,0,u)},R4=function(n,a){for(var u=n.memoizedState;u!==null&&a>0;)u=u.next,a--;return u};sF=function(n,a,u,h){var y=R4(n,a);if(y!==null){var _=wF(y.memoizedState,u,h);y.memoizedState=_,y.baseState=_,n.memoizedProps=zt({},n.memoizedProps);var P=Si(n,xt);P!==null&&Kr(P,n,xt,Tn)}},uF=function(n,a,u){var h=R4(n,a);if(h!==null){var y=yF(h.memoizedState,u);h.memoizedState=y,h.baseState=y,n.memoizedProps=zt({},n.memoizedProps);var _=Si(n,xt);_!==null&&Kr(_,n,xt,Tn)}},cF=function(n,a,u,h){var y=R4(n,a);if(y!==null){var _=bF(y.memoizedState,u,h);y.memoizedState=_,y.baseState=_,n.memoizedProps=zt({},n.memoizedProps);var P=Si(n,xt);P!==null&&Kr(P,n,xt,Tn)}},fF=function(n,a,u){n.pendingProps=wF(n.memoizedProps,a,u),n.alternate&&(n.alternate.pendingProps=n.pendingProps);var h=Si(n,xt);h!==null&&Kr(h,n,xt,Tn)},dF=function(n,a){n.pendingProps=yF(n.memoizedProps,a),n.alternate&&(n.alternate.pendingProps=n.pendingProps);var u=Si(n,xt);u!==null&&Kr(u,n,xt,Tn)},hF=function(n,a,u){n.pendingProps=bF(n.memoizedProps,a,u),n.alternate&&(n.alternate.pendingProps=n.pendingProps);var h=Si(n,xt);h!==null&&Kr(h,n,xt,Tn)},pF=function(n){var a=Si(n,xt);a!==null&&Kr(a,n,xt,Tn)},vF=function(n){oF=n},mF=function(n){lF=n}}function OW(n){var a=gi(n);return a===null?null:a.stateNode}function RW(n){return null}function FW(){return ur}function NW(n){var a=n.findFiberByHostInstance,u=t.ReactCurrentDispatcher;return Tv({bundleType:n.bundleType,version:n.version,rendererPackageName:n.rendererPackageName,rendererConfig:n.rendererConfig,overrideHookState:sF,overrideHookStateDeletePath:uF,overrideHookStateRenamePath:cF,overrideProps:fF,overridePropsDeletePath:dF,overridePropsRenamePath:hF,setErrorHandler:vF,setSuspenseHandler:mF,scheduleUpdate:pF,currentDispatcherRef:u,findHostInstanceByFiber:OW,findFiberByHostInstance:a||RW,findHostInstancesForRefresh:uW,scheduleRefresh:lW,scheduleRoot:sW,setRefreshHandler:oW,getCurrentFiber:FW,reconcilerVersion:k4})}var _F=typeof reportError=="function"?reportError:function(n){};function F4(n){this._internalRoot=n}mb.prototype.render=F4.prototype.render=function(n){var a=this._internalRoot;if(a===null)throw new Error("Cannot update an unmounted root.");{typeof arguments[1]=="function"?c("render(...): does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."):gb(arguments[1])?c("You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root."):typeof arguments[1]<"u"&&c("You passed a second argument to root.render(...) but it only accepts one argument.");var u=a.containerInfo;if(u.nodeType!==cr){var h=iF(a.current);h&&h.parentNode!==u&&c("render(...): It looks like the React-rendered content of the root container was removed without using React. This is not supported and will cause errors. Instead, call root.unmount() to empty a root's container.")}}tg(n,a,null,null)},mb.prototype.unmount=F4.prototype.unmount=function(){typeof arguments[0]=="function"&&c("unmount(...): does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().");var n=this._internalRoot;if(n!==null){this._internalRoot=null;var a=n.containerInfo;PR()&&c("Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition."),Qs(function(){tg(null,n,null,null)}),wA(a)}};function MW(n,a){if(!gb(n))throw new Error("createRoot(...): Target container is not a DOM element.");EF(n);var u=!1,h=!1,y="",_=_F;a!=null&&(a.hydrate?f("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof a=="object"&&a!==null&&a.$$typeof===Lr&&c(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
191
191
 
192
192
  let root = createRoot(domContainer);
193
- root.render(<App />);`),a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(y=a.identifierPrefix),a.onRecoverableError!==void 0&&(_=a.onRecoverableError),a.transitionCallbacks!==void 0&&a.transitionCallbacks);var P=nF(n,fx,null,u,h,y,_);ax(P.current,n);var j=n.nodeType===cr?n.parentNode:n;return um(j),new F4(P)}function mb(n){this._internalRoot=n}function PW(n){n&&F1(n)}mb.prototype.unstable_scheduleHydration=PW;function BW(n,a,u){if(!gb(n))throw new Error("hydrateRoot(...): Target container is not a DOM element.");EF(n),a===void 0&&c("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var h=u??null,y=u!=null&&u.hydratedSources||null,_=!1,P=!1,j="",Y=_F;u!=null&&(u.unstable_strictMode===!0&&(_=!0),u.identifierPrefix!==void 0&&(j=u.identifierPrefix),u.onRecoverableError!==void 0&&(Y=u.onRecoverableError));var re=rF(a,null,n,fx,h,_,P,j,Y);if(ax(re.current,n),um(n),y)for(var oe=0;oe<y.length;oe++){var he=y[oe];$q(re,he)}return new mb(re)}function gb(n){return!!(n&&(n.nodeType===ka||n.nodeType===Hi||n.nodeType===hs||!te))}function ng(n){return!!(n&&(n.nodeType===ka||n.nodeType===Hi||n.nodeType===hs||n.nodeType===cr&&n.nodeValue===" react-mount-point-unstable "))}function EF(n){n.nodeType===ka&&n.tagName&&n.tagName.toUpperCase()==="BODY"&&c("createRoot(): Creating roots directly with document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try using a container element created for your app."),bm(n)&&(n._reactRootContainer?c("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):c("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}var LW=t.ReactCurrentOwner,SF;SF=function(n){if(n._reactRootContainer&&n.nodeType!==cr){var a=iF(n._reactRootContainer.current);a&&a.parentNode!==n&&c("render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container.")}var u=!!n._reactRootContainer,h=N4(n),y=!!(h&&Ju(h));y&&!u&&c("render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render."),n.nodeType===ka&&n.tagName&&n.tagName.toUpperCase()==="BODY"&&c("render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.")};function N4(n){return n?n.nodeType===Hi?n.documentElement:n.firstChild:null}function DF(){}function zW(n,a,u,h,y){if(y){if(typeof h=="function"){var _=h;h=function(){var fe=vb(P);_.call(fe)}}var P=rF(a,h,n,tc,null,!1,!1,"",DF);n._reactRootContainer=P,ax(P.current,n);var j=n.nodeType===cr?n.parentNode:n;return um(j),Qs(),P}else{for(var Y;Y=n.lastChild;)n.removeChild(Y);if(typeof h=="function"){var re=h;h=function(){var fe=vb(oe);re.call(fe)}}var oe=nF(n,tc,null,!1,!1,"",DF);n._reactRootContainer=oe,ax(oe.current,n);var he=n.nodeType===cr?n.parentNode:n;return um(he),Qs(function(){tg(a,oe,u,h)}),oe}}function UW(n,a){n!==null&&typeof n!="function"&&c("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",a,n)}function yb(n,a,u,h,y){SF(u),UW(y===void 0?null:y,"render");var _=u._reactRootContainer,P;if(!_)P=zW(u,a,n,y,h);else{if(P=_,typeof y=="function"){var j=y;y=function(){var Y=vb(P);j.call(Y)}}tg(a,P,n,y)}return vb(P)}function jW(n){{var a=LW.current;if(a!==null&&a.stateNode!==null){var u=a.stateNode._warnedAboutRefsInRender;u||c("%s is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",Dn(a.type)||"A component"),a.stateNode._warnedAboutRefsInRender=!0}}return n==null?null:n.nodeType===ka?n:EW(n,"findDOMNode")}function IW(n,a,u){if(c("ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!ng(a))throw new Error("Target container is not a DOM element.");{var h=bm(a)&&a._reactRootContainer===void 0;h&&c("You are calling ReactDOM.hydrate() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call hydrateRoot(container, element)?")}return yb(null,n,a,!0,u)}function HW(n,a,u){if(c("ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!ng(a))throw new Error("Target container is not a DOM element.");{var h=bm(a)&&a._reactRootContainer===void 0;h&&c("You are calling ReactDOM.render() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.render(element)?")}return yb(null,n,a,!1,u)}function VW(n,a,u,h){if(c("ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported in React 18. Consider using a portal instead. Until you switch to the createRoot API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!ng(u))throw new Error("Target container is not a DOM element.");if(n==null||!cf(n))throw new Error("parentComponent must be a valid React Component");return yb(n,a,u,!1,h)}function $W(n){if(!ng(n))throw new Error("unmountComponentAtNode(...): Target container is not a DOM element.");{var a=bm(n)&&n._reactRootContainer===void 0;a&&c("You are calling ReactDOM.unmountComponentAtNode() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?")}if(n._reactRootContainer){{var u=N4(n),h=u&&!Ju(u);h&&c("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.")}return Qs(function(){yb(null,null,n,!1,function(){n._reactRootContainer=null,wA(n)})}),!0}else{{var y=N4(n),_=!!(y&&Ju(y)),P=n.nodeType===ka&&ng(n.parentNode)&&!!n.parentNode._reactRootContainer;_&&c("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",P?"You may have accidentally passed in a React root node instead of its container.":"Instead, have the parent component update its state and rerender in order to remove this component.")}return!1}}et(SW),D1(DW),Sf(kW),Yv(bi),T1(wf),(typeof Map!="function"||Map.prototype==null||typeof Map.prototype.forEach!="function"||typeof Set!="function"||Set.prototype==null||typeof Set.prototype.clear!="function"||typeof Set.prototype.forEach!="function")&&c("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),o1(G$),Kd(c4,BK,Qs);function YW(n,a){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!gb(a))throw new Error("Target container is not a DOM element.");return _W(n,a,null,u)}function qW(n,a,u,h){return VW(n,a,u,h)}var M4={usingClientEntryPoint:!1,Events:[Ju,Q0,ix,Gd,lf,c4]};function GW(n,a){return M4.usingClientEntryPoint||c('You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),MW(n,a)}function KW(n,a,u){return M4.usingClientEntryPoint||c('You are importing hydrateRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),BW(n,a,u)}function WW(n){return PR()&&c("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."),Qs(n)}var QW=NW({findFiberByHostInstance:Pf,bundleType:1,version:k4,rendererPackageName:"react-dom"});if(!QW&&it&&window.top===window.self&&(navigator.userAgent.indexOf("Chrome")>-1&&navigator.userAgent.indexOf("Edge")===-1||navigator.userAgent.indexOf("Firefox")>-1)){var ZW=window.location.protocol;/^(https?|file):$/.test(ZW)}ai.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=M4,ai.createPortal=YW,ai.createRoot=GW,ai.findDOMNode=jW,ai.flushSync=WW,ai.hydrate=IW,ai.hydrateRoot=KW,ai.render=HW,ai.unmountComponentAtNode=$W,ai.unstable_batchedUpdates=c4,ai.unstable_renderSubtreeIntoContainer=qW,ai.version=k4,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),ai}(function(e){function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function")){if(process.env.NODE_ENV!=="production")throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch{}}}process.env.NODE_ENV==="production"?(r(),e.exports=s9()):e.exports=u9()})(eu);const cg=OF(eu.exports),c9=AF({__proto__:null,default:cg},[eu.exports]);var Lb=(e=>(e.zip="application/zip",e.png="image/png",e.jpg="image/jpg",e.jpeg="image/jpeg",e.pdf="application/pdf",e.doc="application/msword",e.docx="application/vnd.openxmlformats-officedocument.wordprocessingml.document",e.pptx="application/vnd.openxmlformats-officedocument.presentationml.presentation",e.ppt="application/vnd.ms-powerpoint",e.xlsx="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",e.xls="application/vnd.ms-excel",e.txt="text/plain",e.csv="text/csv",e.svg="image/svg+xml",e))(Lb||{});const zb=new Map(Object.entries(Lb));var Jf=(e=>(e.zip=".zip",e.png=".png",e.jpg=".jpg",e.jpeg=".jpeg",e.pdf=".pdf",e.doc=".doc",e.docx=".docx",e.ppt=".ppt",e.pptx=".pptx",e.xls=".xls",e.xlsx=".xlsx",e.txt=".txt",e.csv=".csv",e.svg=".svg",e.rar=".rar",e))(Jf||{});const f9=Object.freeze(Object.defineProperty({__proto__:null,FileType:Lb,FileTypeMap:zb,FileSuffix:Jf},Symbol.toStringTag,{value:"Module"})),d9=e=>{if(!Js.isObject(e))return e;const r=e;return Js.pick(r,Js.keys(r).filter(t=>!Js.isNil(r[t])))},N8=e=>new Promise((r,t)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>r(i.result),i.onerror=l=>t(l)}),fg=e=>{var r;if(e)return"."+((r=e.split(".").at(-1))==null?void 0:r.toLowerCase())},h9=e=>{if(e){if(e.startsWith("http")){const r=e.split(".").at(-1);if(r&&zb.has(r))return zb.get(r)}if(e.startsWith("data:")&&e.includes("base64")){const r=e.indexOf(";base64"),t=e.slice(0,r).split(":");if(t[1])return t[1]}}},M8=(e,r)=>{const t=typeof r=="object"?JSON.stringify(r):r;localStorage.setItem(e,t)},Ub=e=>{let t=localStorage.getItem(e);return typeof t=="string"&&(t=jb(t)),t||null},p9=e=>{localStorage.removeItem(e)},v9=(e,r)=>{const t=typeof r=="object"?JSON.stringify(r):r;sessionStorage.setItem(e,t)},m9=e=>{let t=sessionStorage.getItem(e);return typeof t=="string"&&(t=jb(t)),t||null},g9=e=>{sessionStorage.removeItem(e)},y9=(e,r)=>{const t=[];for(let i=0;i<r.length;i++)t.findIndex(l=>l[e]===r[i][e])<0&&t.push(r[i]);return t},jb=e=>{if(!e)return null;if(typeof e=="object")return e;if(typeof e=="string"){let r=e;try{r=JSON.parse(e)}catch{}return r}};function x9(){var e=URL.createObjectURL(new Blob),r=e.toString();return URL.revokeObjectURL(e),r.substr(r.lastIndexOf("/")+1)}const b9=Object.freeze(Object.defineProperty({__proto__:null,filterObject:d9,getBase64:N8,getFileSuffix:fg,getFileType:h9,setLocalStorage:M8,getLocalStorage:Ub,removeLocalStorage:p9,setSessionStorage:v9,getSessionStorage:m9,removeSessionStorage:g9,arrayDeduplication:y9,JSONParse:jb,uuid:x9,forceReload:()=>{const e="FORCERELOAD";sessionStorage.getItem(e)!=="1"&&(sessionStorage.setItem(e,"1"),window.location.reload())},formatResponse:e=>{if(typeof e=="string"){const r=e.indexOf(",");return JSON.parse(e.slice(r+1))}return e}},Symbol.toStringTag,{value:"Module"}));const C9=4,P8=0,B8=1,w9=2;function ed(e){let r=e.length;for(;--r>=0;)e[r]=0}const _9=0,L8=1,E9=2,S9=3,D9=258,Ib=29,Dh=256,kh=Dh+1+Ib,td=30,Hb=19,z8=2*kh+1,mc=15,Vb=16,k9=7,$b=256,U8=16,j8=17,I8=18,Yb=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),dg=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),T9=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),H8=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),A9=512,ns=new Array((kh+2)*2);ed(ns);const Th=new Array(td*2);ed(Th);const Ah=new Array(A9);ed(Ah);const Oh=new Array(D9-S9+1);ed(Oh);const qb=new Array(Ib);ed(qb);const hg=new Array(td);ed(hg);function Gb(e,r,t,i,l){this.static_tree=e,this.extra_bits=r,this.extra_base=t,this.elems=i,this.max_length=l,this.has_stree=e&&e.length}let V8,$8,Y8;function Kb(e,r){this.dyn_tree=e,this.max_code=0,this.stat_desc=r}const q8=e=>e<256?Ah[e]:Ah[256+(e>>>7)],Rh=(e,r)=>{e.pending_buf[e.pending++]=r&255,e.pending_buf[e.pending++]=r>>>8&255},ii=(e,r,t)=>{e.bi_valid>Vb-t?(e.bi_buf|=r<<e.bi_valid&65535,Rh(e,e.bi_buf),e.bi_buf=r>>Vb-e.bi_valid,e.bi_valid+=t-Vb):(e.bi_buf|=r<<e.bi_valid&65535,e.bi_valid+=t)},al=(e,r,t)=>{ii(e,t[r*2],t[r*2+1])},G8=(e,r)=>{let t=0;do t|=e&1,e>>>=1,t<<=1;while(--r>0);return t>>>1},O9=e=>{e.bi_valid===16?(Rh(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},R9=(e,r)=>{const t=r.dyn_tree,i=r.max_code,l=r.stat_desc.static_tree,f=r.stat_desc.has_stree,c=r.stat_desc.extra_bits,p=r.stat_desc.extra_base,g=r.stat_desc.max_length;let d,m,C,b,x,E,k=0;for(b=0;b<=mc;b++)e.bl_count[b]=0;for(t[e.heap[e.heap_max]*2+1]=0,d=e.heap_max+1;d<z8;d++)m=e.heap[d],b=t[t[m*2+1]*2+1]+1,b>g&&(b=g,k++),t[m*2+1]=b,!(m>i)&&(e.bl_count[b]++,x=0,m>=p&&(x=c[m-p]),E=t[m*2],e.opt_len+=E*(b+x),f&&(e.static_len+=E*(l[m*2+1]+x)));if(k!==0){do{for(b=g-1;e.bl_count[b]===0;)b--;e.bl_count[b]--,e.bl_count[b+1]+=2,e.bl_count[g]--,k-=2}while(k>0);for(b=g;b!==0;b--)for(m=e.bl_count[b];m!==0;)C=e.heap[--d],!(C>i)&&(t[C*2+1]!==b&&(e.opt_len+=(b-t[C*2+1])*t[C*2],t[C*2+1]=b),m--)}},K8=(e,r,t)=>{const i=new Array(mc+1);let l=0,f,c;for(f=1;f<=mc;f++)l=l+t[f-1]<<1,i[f]=l;for(c=0;c<=r;c++){let p=e[c*2+1];p!==0&&(e[c*2]=G8(i[p]++,p))}},F9=()=>{let e,r,t,i,l;const f=new Array(mc+1);for(t=0,i=0;i<Ib-1;i++)for(qb[i]=t,e=0;e<1<<Yb[i];e++)Oh[t++]=i;for(Oh[t-1]=i,l=0,i=0;i<16;i++)for(hg[i]=l,e=0;e<1<<dg[i];e++)Ah[l++]=i;for(l>>=7;i<td;i++)for(hg[i]=l<<7,e=0;e<1<<dg[i]-7;e++)Ah[256+l++]=i;for(r=0;r<=mc;r++)f[r]=0;for(e=0;e<=143;)ns[e*2+1]=8,e++,f[8]++;for(;e<=255;)ns[e*2+1]=9,e++,f[9]++;for(;e<=279;)ns[e*2+1]=7,e++,f[7]++;for(;e<=287;)ns[e*2+1]=8,e++,f[8]++;for(K8(ns,kh+1,f),e=0;e<td;e++)Th[e*2+1]=5,Th[e*2]=G8(e,5);V8=new Gb(ns,Yb,Dh+1,kh,mc),$8=new Gb(Th,dg,0,td,mc),Y8=new Gb(new Array(0),T9,0,Hb,k9)},W8=e=>{let r;for(r=0;r<kh;r++)e.dyn_ltree[r*2]=0;for(r=0;r<td;r++)e.dyn_dtree[r*2]=0;for(r=0;r<Hb;r++)e.bl_tree[r*2]=0;e.dyn_ltree[$b*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},Q8=e=>{e.bi_valid>8?Rh(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Z8=(e,r,t,i)=>{const l=r*2,f=t*2;return e[l]<e[f]||e[l]===e[f]&&i[r]<=i[t]},Wb=(e,r,t)=>{const i=e.heap[t];let l=t<<1;for(;l<=e.heap_len&&(l<e.heap_len&&Z8(r,e.heap[l+1],e.heap[l],e.depth)&&l++,!Z8(r,i,e.heap[l],e.depth));)e.heap[t]=e.heap[l],t=l,l<<=1;e.heap[t]=i},X8=(e,r,t)=>{let i,l,f=0,c,p;if(e.sym_next!==0)do i=e.pending_buf[e.sym_buf+f++]&255,i+=(e.pending_buf[e.sym_buf+f++]&255)<<8,l=e.pending_buf[e.sym_buf+f++],i===0?al(e,l,r):(c=Oh[l],al(e,c+Dh+1,r),p=Yb[c],p!==0&&(l-=qb[c],ii(e,l,p)),i--,c=q8(i),al(e,c,t),p=dg[c],p!==0&&(i-=hg[c],ii(e,i,p)));while(f<e.sym_next);al(e,$b,r)},Qb=(e,r)=>{const t=r.dyn_tree,i=r.stat_desc.static_tree,l=r.stat_desc.has_stree,f=r.stat_desc.elems;let c,p,g=-1,d;for(e.heap_len=0,e.heap_max=z8,c=0;c<f;c++)t[c*2]!==0?(e.heap[++e.heap_len]=g=c,e.depth[c]=0):t[c*2+1]=0;for(;e.heap_len<2;)d=e.heap[++e.heap_len]=g<2?++g:0,t[d*2]=1,e.depth[d]=0,e.opt_len--,l&&(e.static_len-=i[d*2+1]);for(r.max_code=g,c=e.heap_len>>1;c>=1;c--)Wb(e,t,c);d=f;do c=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Wb(e,t,1),p=e.heap[1],e.heap[--e.heap_max]=c,e.heap[--e.heap_max]=p,t[d*2]=t[c*2]+t[p*2],e.depth[d]=(e.depth[c]>=e.depth[p]?e.depth[c]:e.depth[p])+1,t[c*2+1]=t[p*2+1]=d,e.heap[1]=d++,Wb(e,t,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],R9(e,r),K8(t,g,e.bl_count)},J8=(e,r,t)=>{let i,l=-1,f,c=r[0*2+1],p=0,g=7,d=4;for(c===0&&(g=138,d=3),r[(t+1)*2+1]=65535,i=0;i<=t;i++)f=c,c=r[(i+1)*2+1],!(++p<g&&f===c)&&(p<d?e.bl_tree[f*2]+=p:f!==0?(f!==l&&e.bl_tree[f*2]++,e.bl_tree[U8*2]++):p<=10?e.bl_tree[j8*2]++:e.bl_tree[I8*2]++,p=0,l=f,c===0?(g=138,d=3):f===c?(g=6,d=3):(g=7,d=4))},e5=(e,r,t)=>{let i,l=-1,f,c=r[0*2+1],p=0,g=7,d=4;for(c===0&&(g=138,d=3),i=0;i<=t;i++)if(f=c,c=r[(i+1)*2+1],!(++p<g&&f===c)){if(p<d)do al(e,f,e.bl_tree);while(--p!==0);else f!==0?(f!==l&&(al(e,f,e.bl_tree),p--),al(e,U8,e.bl_tree),ii(e,p-3,2)):p<=10?(al(e,j8,e.bl_tree),ii(e,p-3,3)):(al(e,I8,e.bl_tree),ii(e,p-11,7));p=0,l=f,c===0?(g=138,d=3):f===c?(g=6,d=3):(g=7,d=4)}},N9=e=>{let r;for(J8(e,e.dyn_ltree,e.l_desc.max_code),J8(e,e.dyn_dtree,e.d_desc.max_code),Qb(e,e.bl_desc),r=Hb-1;r>=3&&e.bl_tree[H8[r]*2+1]===0;r--);return e.opt_len+=3*(r+1)+5+5+4,r},M9=(e,r,t,i)=>{let l;for(ii(e,r-257,5),ii(e,t-1,5),ii(e,i-4,4),l=0;l<i;l++)ii(e,e.bl_tree[H8[l]*2+1],3);e5(e,e.dyn_ltree,r-1),e5(e,e.dyn_dtree,t-1)},P9=e=>{let r=4093624447,t;for(t=0;t<=31;t++,r>>>=1)if(r&1&&e.dyn_ltree[t*2]!==0)return P8;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return B8;for(t=32;t<Dh;t++)if(e.dyn_ltree[t*2]!==0)return B8;return P8};let t5=!1;const B9=e=>{t5||(F9(),t5=!0),e.l_desc=new Kb(e.dyn_ltree,V8),e.d_desc=new Kb(e.dyn_dtree,$8),e.bl_desc=new Kb(e.bl_tree,Y8),e.bi_buf=0,e.bi_valid=0,W8(e)},n5=(e,r,t,i)=>{ii(e,(_9<<1)+(i?1:0),3),Q8(e),Rh(e,t),Rh(e,~t),t&&e.pending_buf.set(e.window.subarray(r,r+t),e.pending),e.pending+=t},L9=e=>{ii(e,L8<<1,3),al(e,$b,ns),O9(e)},z9=(e,r,t,i)=>{let l,f,c=0;e.level>0?(e.strm.data_type===w9&&(e.strm.data_type=P9(e)),Qb(e,e.l_desc),Qb(e,e.d_desc),c=N9(e),l=e.opt_len+3+7>>>3,f=e.static_len+3+7>>>3,f<=l&&(l=f)):l=f=t+5,t+4<=l&&r!==-1?n5(e,r,t,i):e.strategy===C9||f===l?(ii(e,(L8<<1)+(i?1:0),3),X8(e,ns,Th)):(ii(e,(E9<<1)+(i?1:0),3),M9(e,e.l_desc.max_code+1,e.d_desc.max_code+1,c+1),X8(e,e.dyn_ltree,e.dyn_dtree)),W8(e),i&&Q8(e)},U9=(e,r,t)=>(e.pending_buf[e.sym_buf+e.sym_next++]=r,e.pending_buf[e.sym_buf+e.sym_next++]=r>>8,e.pending_buf[e.sym_buf+e.sym_next++]=t,r===0?e.dyn_ltree[t*2]++:(e.matches++,r--,e.dyn_ltree[(Oh[t]+Dh+1)*2]++,e.dyn_dtree[q8(r)*2]++),e.sym_next===e.sym_end);var j9=B9,I9=n5,H9=z9,V9=U9,$9=L9,Y9={_tr_init:j9,_tr_stored_block:I9,_tr_flush_block:H9,_tr_tally:V9,_tr_align:$9},Fh=(e,r,t,i)=>{let l=e&65535|0,f=e>>>16&65535|0,c=0;for(;t!==0;){c=t>2e3?2e3:t,t-=c;do l=l+r[i++]|0,f=f+l|0;while(--c);l%=65521,f%=65521}return l|f<<16|0};const q9=()=>{let e,r=[];for(var t=0;t<256;t++){e=t;for(var i=0;i<8;i++)e=e&1?3988292384^e>>>1:e>>>1;r[t]=e}return r},G9=new Uint32Array(q9());var Qr=(e,r,t,i)=>{const l=G9,f=i+t;e^=-1;for(let c=i;c<f;c++)e=e>>>8^l[(e^r[c])&255];return e^-1},gc={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},yc={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:K9,_tr_stored_block:Zb,_tr_flush_block:W9,_tr_tally:tu,_tr_align:Q9}=Y9,{Z_NO_FLUSH:nu,Z_PARTIAL_FLUSH:Z9,Z_FULL_FLUSH:X9,Z_FINISH:Zi,Z_BLOCK:r5,Z_OK:ca,Z_STREAM_END:a5,Z_STREAM_ERROR:il,Z_DATA_ERROR:J9,Z_BUF_ERROR:Xb,Z_DEFAULT_COMPRESSION:eN,Z_FILTERED:tN,Z_HUFFMAN_ONLY:pg,Z_RLE:nN,Z_FIXED:rN,Z_DEFAULT_STRATEGY:aN,Z_UNKNOWN:iN,Z_DEFLATED:vg}=yc,oN=9,lN=15,sN=8,uN=29,Jb=256+1+uN,cN=30,fN=19,dN=2*Jb+1,hN=15,qt=3,ru=258,ol=ru+qt+1,pN=32,nd=42,e2=57,t2=69,n2=73,r2=91,a2=103,xc=113,Nh=666,Ia=1,rd=2,bc=3,ad=4,vN=3,Cc=(e,r)=>(e.msg=gc[r],r),i5=e=>e*2-(e>4?9:0),au=e=>{let r=e.length;for(;--r>=0;)e[r]=0},mN=e=>{let r,t,i,l=e.w_size;r=e.hash_size,i=r;do t=e.head[--i],e.head[i]=t>=l?t-l:0;while(--r);r=l,i=r;do t=e.prev[--i],e.prev[i]=t>=l?t-l:0;while(--r)};let iu=(e,r,t)=>(r<<e.hash_shift^t)&e.hash_mask;const Ai=e=>{const r=e.state;let t=r.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(e.output.set(r.pending_buf.subarray(r.pending_out,r.pending_out+t),e.next_out),e.next_out+=t,r.pending_out+=t,e.total_out+=t,e.avail_out-=t,r.pending-=t,r.pending===0&&(r.pending_out=0))},Oi=(e,r)=>{W9(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,r),e.block_start=e.strstart,Ai(e.strm)},cn=(e,r)=>{e.pending_buf[e.pending++]=r},Mh=(e,r)=>{e.pending_buf[e.pending++]=r>>>8&255,e.pending_buf[e.pending++]=r&255},i2=(e,r,t,i)=>{let l=e.avail_in;return l>i&&(l=i),l===0?0:(e.avail_in-=l,r.set(e.input.subarray(e.next_in,e.next_in+l),t),e.state.wrap===1?e.adler=Fh(e.adler,r,l,t):e.state.wrap===2&&(e.adler=Qr(e.adler,r,l,t)),e.next_in+=l,e.total_in+=l,l)},o5=(e,r)=>{let t=e.max_chain_length,i=e.strstart,l,f,c=e.prev_length,p=e.nice_match;const g=e.strstart>e.w_size-ol?e.strstart-(e.w_size-ol):0,d=e.window,m=e.w_mask,C=e.prev,b=e.strstart+ru;let x=d[i+c-1],E=d[i+c];e.prev_length>=e.good_match&&(t>>=2),p>e.lookahead&&(p=e.lookahead);do if(l=r,!(d[l+c]!==E||d[l+c-1]!==x||d[l]!==d[i]||d[++l]!==d[i+1])){i+=2,l++;do;while(d[++i]===d[++l]&&d[++i]===d[++l]&&d[++i]===d[++l]&&d[++i]===d[++l]&&d[++i]===d[++l]&&d[++i]===d[++l]&&d[++i]===d[++l]&&d[++i]===d[++l]&&i<b);if(f=ru-(b-i),i=b-ru,f>c){if(e.match_start=r,c=f,f>=p)break;x=d[i+c-1],E=d[i+c]}}while((r=C[r&m])>g&&--t!==0);return c<=e.lookahead?c:e.lookahead},id=e=>{const r=e.w_size;let t,i,l;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=r+(r-ol)&&(e.window.set(e.window.subarray(r,r+r-i),0),e.match_start-=r,e.strstart-=r,e.block_start-=r,e.insert>e.strstart&&(e.insert=e.strstart),mN(e),i+=r),e.strm.avail_in===0)break;if(t=i2(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=t,e.lookahead+e.insert>=qt)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=iu(e,e.ins_h,e.window[l+1]);e.insert&&(e.ins_h=iu(e,e.ins_h,e.window[l+qt-1]),e.prev[l&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=l,l++,e.insert--,!(e.lookahead+e.insert<qt)););}while(e.lookahead<ol&&e.strm.avail_in!==0)},l5=(e,r)=>{let t=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,i,l,f,c=0,p=e.strm.avail_in;do{if(i=65535,f=e.bi_valid+42>>3,e.strm.avail_out<f||(f=e.strm.avail_out-f,l=e.strstart-e.block_start,i>l+e.strm.avail_in&&(i=l+e.strm.avail_in),i>f&&(i=f),i<t&&(i===0&&r!==Zi||r===nu||i!==l+e.strm.avail_in)))break;c=r===Zi&&i===l+e.strm.avail_in?1:0,Zb(e,0,0,c),e.pending_buf[e.pending-4]=i,e.pending_buf[e.pending-3]=i>>8,e.pending_buf[e.pending-2]=~i,e.pending_buf[e.pending-1]=~i>>8,Ai(e.strm),l&&(l>i&&(l=i),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+l),e.strm.next_out),e.strm.next_out+=l,e.strm.avail_out-=l,e.strm.total_out+=l,e.block_start+=l,i-=l),i&&(i2(e.strm,e.strm.output,e.strm.next_out,i),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i)}while(c===0);return p-=e.strm.avail_in,p&&(p>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=p&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-p,e.strm.next_in),e.strstart),e.strstart+=p,e.insert+=p>e.w_size-e.insert?e.w_size-e.insert:p),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),c?ad:r!==nu&&r!==Zi&&e.strm.avail_in===0&&e.strstart===e.block_start?rd:(f=e.window_size-e.strstart,e.strm.avail_in>f&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,f+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),f>e.strm.avail_in&&(f=e.strm.avail_in),f&&(i2(e.strm,e.window,e.strstart,f),e.strstart+=f,e.insert+=f>e.w_size-e.insert?e.w_size-e.insert:f),e.high_water<e.strstart&&(e.high_water=e.strstart),f=e.bi_valid+42>>3,f=e.pending_buf_size-f>65535?65535:e.pending_buf_size-f,t=f>e.w_size?e.w_size:f,l=e.strstart-e.block_start,(l>=t||(l||r===Zi)&&r!==nu&&e.strm.avail_in===0&&l<=f)&&(i=l>f?f:l,c=r===Zi&&e.strm.avail_in===0&&i===l?1:0,Zb(e,e.block_start,i,c),e.block_start+=i,Ai(e.strm)),c?bc:Ia)},o2=(e,r)=>{let t,i;for(;;){if(e.lookahead<ol){if(id(e),e.lookahead<ol&&r===nu)return Ia;if(e.lookahead===0)break}if(t=0,e.lookahead>=qt&&(e.ins_h=iu(e,e.ins_h,e.window[e.strstart+qt-1]),t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),t!==0&&e.strstart-t<=e.w_size-ol&&(e.match_length=o5(e,t)),e.match_length>=qt)if(i=tu(e,e.strstart-e.match_start,e.match_length-qt),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=qt){e.match_length--;do e.strstart++,e.ins_h=iu(e,e.ins_h,e.window[e.strstart+qt-1]),t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=iu(e,e.ins_h,e.window[e.strstart+1]);else i=tu(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(Oi(e,!1),e.strm.avail_out===0))return Ia}return e.insert=e.strstart<qt-1?e.strstart:qt-1,r===Zi?(Oi(e,!0),e.strm.avail_out===0?bc:ad):e.sym_next&&(Oi(e,!1),e.strm.avail_out===0)?Ia:rd},od=(e,r)=>{let t,i,l;for(;;){if(e.lookahead<ol){if(id(e),e.lookahead<ol&&r===nu)return Ia;if(e.lookahead===0)break}if(t=0,e.lookahead>=qt&&(e.ins_h=iu(e,e.ins_h,e.window[e.strstart+qt-1]),t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=qt-1,t!==0&&e.prev_length<e.max_lazy_match&&e.strstart-t<=e.w_size-ol&&(e.match_length=o5(e,t),e.match_length<=5&&(e.strategy===tN||e.match_length===qt&&e.strstart-e.match_start>4096)&&(e.match_length=qt-1)),e.prev_length>=qt&&e.match_length<=e.prev_length){l=e.strstart+e.lookahead-qt,i=tu(e,e.strstart-1-e.prev_match,e.prev_length-qt),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=l&&(e.ins_h=iu(e,e.ins_h,e.window[e.strstart+qt-1]),t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=qt-1,e.strstart++,i&&(Oi(e,!1),e.strm.avail_out===0))return Ia}else if(e.match_available){if(i=tu(e,0,e.window[e.strstart-1]),i&&Oi(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Ia}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=tu(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<qt-1?e.strstart:qt-1,r===Zi?(Oi(e,!0),e.strm.avail_out===0?bc:ad):e.sym_next&&(Oi(e,!1),e.strm.avail_out===0)?Ia:rd},gN=(e,r)=>{let t,i,l,f;const c=e.window;for(;;){if(e.lookahead<=ru){if(id(e),e.lookahead<=ru&&r===nu)return Ia;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=qt&&e.strstart>0&&(l=e.strstart-1,i=c[l],i===c[++l]&&i===c[++l]&&i===c[++l])){f=e.strstart+ru;do;while(i===c[++l]&&i===c[++l]&&i===c[++l]&&i===c[++l]&&i===c[++l]&&i===c[++l]&&i===c[++l]&&i===c[++l]&&l<f);e.match_length=ru-(f-l),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=qt?(t=tu(e,1,e.match_length-qt),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(t=tu(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),t&&(Oi(e,!1),e.strm.avail_out===0))return Ia}return e.insert=0,r===Zi?(Oi(e,!0),e.strm.avail_out===0?bc:ad):e.sym_next&&(Oi(e,!1),e.strm.avail_out===0)?Ia:rd},yN=(e,r)=>{let t;for(;;){if(e.lookahead===0&&(id(e),e.lookahead===0)){if(r===nu)return Ia;break}if(e.match_length=0,t=tu(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,t&&(Oi(e,!1),e.strm.avail_out===0))return Ia}return e.insert=0,r===Zi?(Oi(e,!0),e.strm.avail_out===0?bc:ad):e.sym_next&&(Oi(e,!1),e.strm.avail_out===0)?Ia:rd};function ll(e,r,t,i,l){this.good_length=e,this.max_lazy=r,this.nice_length=t,this.max_chain=i,this.func=l}const Ph=[new ll(0,0,0,0,l5),new ll(4,4,8,4,o2),new ll(4,5,16,8,o2),new ll(4,6,32,32,o2),new ll(4,4,16,16,od),new ll(8,16,32,32,od),new ll(8,16,128,128,od),new ll(8,32,128,256,od),new ll(32,128,258,1024,od),new ll(32,258,258,4096,od)],xN=e=>{e.window_size=2*e.w_size,au(e.head),e.max_lazy_match=Ph[e.level].max_lazy,e.good_match=Ph[e.level].good_length,e.nice_match=Ph[e.level].nice_length,e.max_chain_length=Ph[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=qt-1,e.match_available=0,e.ins_h=0};function bN(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=vg,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(dN*2),this.dyn_dtree=new Uint16Array((2*cN+1)*2),this.bl_tree=new Uint16Array((2*fN+1)*2),au(this.dyn_ltree),au(this.dyn_dtree),au(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(hN+1),this.heap=new Uint16Array(2*Jb+1),au(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Jb+1),au(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Bh=e=>{if(!e)return 1;const r=e.state;return!r||r.strm!==e||r.status!==nd&&r.status!==e2&&r.status!==t2&&r.status!==n2&&r.status!==r2&&r.status!==a2&&r.status!==xc&&r.status!==Nh?1:0},s5=e=>{if(Bh(e))return Cc(e,il);e.total_in=e.total_out=0,e.data_type=iN;const r=e.state;return r.pending=0,r.pending_out=0,r.wrap<0&&(r.wrap=-r.wrap),r.status=r.wrap===2?e2:r.wrap?nd:xc,e.adler=r.wrap===2?0:1,r.last_flush=-2,K9(r),ca},u5=e=>{const r=s5(e);return r===ca&&xN(e.state),r},CN=(e,r)=>Bh(e)||e.state.wrap!==2?il:(e.state.gzhead=r,ca),c5=(e,r,t,i,l,f)=>{if(!e)return il;let c=1;if(r===eN&&(r=6),i<0?(c=0,i=-i):i>15&&(c=2,i-=16),l<1||l>oN||t!==vg||i<8||i>15||r<0||r>9||f<0||f>rN||i===8&&c!==1)return Cc(e,il);i===8&&(i=9);const p=new bN;return e.state=p,p.strm=e,p.status=nd,p.wrap=c,p.gzhead=null,p.w_bits=i,p.w_size=1<<p.w_bits,p.w_mask=p.w_size-1,p.hash_bits=l+7,p.hash_size=1<<p.hash_bits,p.hash_mask=p.hash_size-1,p.hash_shift=~~((p.hash_bits+qt-1)/qt),p.window=new Uint8Array(p.w_size*2),p.head=new Uint16Array(p.hash_size),p.prev=new Uint16Array(p.w_size),p.lit_bufsize=1<<l+6,p.pending_buf_size=p.lit_bufsize*4,p.pending_buf=new Uint8Array(p.pending_buf_size),p.sym_buf=p.lit_bufsize,p.sym_end=(p.lit_bufsize-1)*3,p.level=r,p.strategy=f,p.method=t,u5(e)},wN=(e,r)=>c5(e,r,vg,lN,sN,aN),_N=(e,r)=>{if(Bh(e)||r>r5||r<0)return e?Cc(e,il):il;const t=e.state;if(!e.output||e.avail_in!==0&&!e.input||t.status===Nh&&r!==Zi)return Cc(e,e.avail_out===0?Xb:il);const i=t.last_flush;if(t.last_flush=r,t.pending!==0){if(Ai(e),e.avail_out===0)return t.last_flush=-1,ca}else if(e.avail_in===0&&i5(r)<=i5(i)&&r!==Zi)return Cc(e,Xb);if(t.status===Nh&&e.avail_in!==0)return Cc(e,Xb);if(t.status===nd&&t.wrap===0&&(t.status=xc),t.status===nd){let l=vg+(t.w_bits-8<<4)<<8,f=-1;if(t.strategy>=pg||t.level<2?f=0:t.level<6?f=1:t.level===6?f=2:f=3,l|=f<<6,t.strstart!==0&&(l|=pN),l+=31-l%31,Mh(t,l),t.strstart!==0&&(Mh(t,e.adler>>>16),Mh(t,e.adler&65535)),e.adler=1,t.status=xc,Ai(e),t.pending!==0)return t.last_flush=-1,ca}if(t.status===e2){if(e.adler=0,cn(t,31),cn(t,139),cn(t,8),t.gzhead)cn(t,(t.gzhead.text?1:0)+(t.gzhead.hcrc?2:0)+(t.gzhead.extra?4:0)+(t.gzhead.name?8:0)+(t.gzhead.comment?16:0)),cn(t,t.gzhead.time&255),cn(t,t.gzhead.time>>8&255),cn(t,t.gzhead.time>>16&255),cn(t,t.gzhead.time>>24&255),cn(t,t.level===9?2:t.strategy>=pg||t.level<2?4:0),cn(t,t.gzhead.os&255),t.gzhead.extra&&t.gzhead.extra.length&&(cn(t,t.gzhead.extra.length&255),cn(t,t.gzhead.extra.length>>8&255)),t.gzhead.hcrc&&(e.adler=Qr(e.adler,t.pending_buf,t.pending,0)),t.gzindex=0,t.status=t2;else if(cn(t,0),cn(t,0),cn(t,0),cn(t,0),cn(t,0),cn(t,t.level===9?2:t.strategy>=pg||t.level<2?4:0),cn(t,vN),t.status=xc,Ai(e),t.pending!==0)return t.last_flush=-1,ca}if(t.status===t2){if(t.gzhead.extra){let l=t.pending,f=(t.gzhead.extra.length&65535)-t.gzindex;for(;t.pending+f>t.pending_buf_size;){let p=t.pending_buf_size-t.pending;if(t.pending_buf.set(t.gzhead.extra.subarray(t.gzindex,t.gzindex+p),t.pending),t.pending=t.pending_buf_size,t.gzhead.hcrc&&t.pending>l&&(e.adler=Qr(e.adler,t.pending_buf,t.pending-l,l)),t.gzindex+=p,Ai(e),t.pending!==0)return t.last_flush=-1,ca;l=0,f-=p}let c=new Uint8Array(t.gzhead.extra);t.pending_buf.set(c.subarray(t.gzindex,t.gzindex+f),t.pending),t.pending+=f,t.gzhead.hcrc&&t.pending>l&&(e.adler=Qr(e.adler,t.pending_buf,t.pending-l,l)),t.gzindex=0}t.status=n2}if(t.status===n2){if(t.gzhead.name){let l=t.pending,f;do{if(t.pending===t.pending_buf_size){if(t.gzhead.hcrc&&t.pending>l&&(e.adler=Qr(e.adler,t.pending_buf,t.pending-l,l)),Ai(e),t.pending!==0)return t.last_flush=-1,ca;l=0}t.gzindex<t.gzhead.name.length?f=t.gzhead.name.charCodeAt(t.gzindex++)&255:f=0,cn(t,f)}while(f!==0);t.gzhead.hcrc&&t.pending>l&&(e.adler=Qr(e.adler,t.pending_buf,t.pending-l,l)),t.gzindex=0}t.status=r2}if(t.status===r2){if(t.gzhead.comment){let l=t.pending,f;do{if(t.pending===t.pending_buf_size){if(t.gzhead.hcrc&&t.pending>l&&(e.adler=Qr(e.adler,t.pending_buf,t.pending-l,l)),Ai(e),t.pending!==0)return t.last_flush=-1,ca;l=0}t.gzindex<t.gzhead.comment.length?f=t.gzhead.comment.charCodeAt(t.gzindex++)&255:f=0,cn(t,f)}while(f!==0);t.gzhead.hcrc&&t.pending>l&&(e.adler=Qr(e.adler,t.pending_buf,t.pending-l,l))}t.status=a2}if(t.status===a2){if(t.gzhead.hcrc){if(t.pending+2>t.pending_buf_size&&(Ai(e),t.pending!==0))return t.last_flush=-1,ca;cn(t,e.adler&255),cn(t,e.adler>>8&255),e.adler=0}if(t.status=xc,Ai(e),t.pending!==0)return t.last_flush=-1,ca}if(e.avail_in!==0||t.lookahead!==0||r!==nu&&t.status!==Nh){let l=t.level===0?l5(t,r):t.strategy===pg?yN(t,r):t.strategy===nN?gN(t,r):Ph[t.level].func(t,r);if((l===bc||l===ad)&&(t.status=Nh),l===Ia||l===bc)return e.avail_out===0&&(t.last_flush=-1),ca;if(l===rd&&(r===Z9?Q9(t):r!==r5&&(Zb(t,0,0,!1),r===X9&&(au(t.head),t.lookahead===0&&(t.strstart=0,t.block_start=0,t.insert=0))),Ai(e),e.avail_out===0))return t.last_flush=-1,ca}return r!==Zi?ca:t.wrap<=0?a5:(t.wrap===2?(cn(t,e.adler&255),cn(t,e.adler>>8&255),cn(t,e.adler>>16&255),cn(t,e.adler>>24&255),cn(t,e.total_in&255),cn(t,e.total_in>>8&255),cn(t,e.total_in>>16&255),cn(t,e.total_in>>24&255)):(Mh(t,e.adler>>>16),Mh(t,e.adler&65535)),Ai(e),t.wrap>0&&(t.wrap=-t.wrap),t.pending!==0?ca:a5)},EN=e=>{if(Bh(e))return il;const r=e.state.status;return e.state=null,r===xc?Cc(e,J9):ca},SN=(e,r)=>{let t=r.length;if(Bh(e))return il;const i=e.state,l=i.wrap;if(l===2||l===1&&i.status!==nd||i.lookahead)return il;if(l===1&&(e.adler=Fh(e.adler,r,t,0)),i.wrap=0,t>=i.w_size){l===0&&(au(i.head),i.strstart=0,i.block_start=0,i.insert=0);let g=new Uint8Array(i.w_size);g.set(r.subarray(t-i.w_size,t),0),r=g,t=i.w_size}const f=e.avail_in,c=e.next_in,p=e.input;for(e.avail_in=t,e.next_in=0,e.input=r,id(i);i.lookahead>=qt;){let g=i.strstart,d=i.lookahead-(qt-1);do i.ins_h=iu(i,i.ins_h,i.window[g+qt-1]),i.prev[g&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=g,g++;while(--d);i.strstart=g,i.lookahead=qt-1,id(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=qt-1,i.match_available=0,e.next_in=c,e.input=p,e.avail_in=f,i.wrap=l,ca};var DN=wN,kN=c5,TN=u5,AN=s5,ON=CN,RN=_N,FN=EN,NN=SN,MN="pako deflate (from Nodeca project)",Lh={deflateInit:DN,deflateInit2:kN,deflateReset:TN,deflateResetKeep:AN,deflateSetHeader:ON,deflate:RN,deflateEnd:FN,deflateSetDictionary:NN,deflateInfo:MN};const PN=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var BN=function(e){const r=Array.prototype.slice.call(arguments,1);for(;r.length;){const t=r.shift();if(t){if(typeof t!="object")throw new TypeError(t+"must be non-object");for(const i in t)PN(t,i)&&(e[i]=t[i])}}return e},LN=e=>{let r=0;for(let i=0,l=e.length;i<l;i++)r+=e[i].length;const t=new Uint8Array(r);for(let i=0,l=0,f=e.length;i<f;i++){let c=e[i];t.set(c,l),l+=c.length}return t},mg={assign:BN,flattenChunks:LN};let f5=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{f5=!1}const zh=new Uint8Array(256);for(let e=0;e<256;e++)zh[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;zh[254]=zh[254]=1;var zN=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let r,t,i,l,f,c=e.length,p=0;for(l=0;l<c;l++)t=e.charCodeAt(l),(t&64512)===55296&&l+1<c&&(i=e.charCodeAt(l+1),(i&64512)===56320&&(t=65536+(t-55296<<10)+(i-56320),l++)),p+=t<128?1:t<2048?2:t<65536?3:4;for(r=new Uint8Array(p),f=0,l=0;f<p;l++)t=e.charCodeAt(l),(t&64512)===55296&&l+1<c&&(i=e.charCodeAt(l+1),(i&64512)===56320&&(t=65536+(t-55296<<10)+(i-56320),l++)),t<128?r[f++]=t:t<2048?(r[f++]=192|t>>>6,r[f++]=128|t&63):t<65536?(r[f++]=224|t>>>12,r[f++]=128|t>>>6&63,r[f++]=128|t&63):(r[f++]=240|t>>>18,r[f++]=128|t>>>12&63,r[f++]=128|t>>>6&63,r[f++]=128|t&63);return r};const UN=(e,r)=>{if(r<65534&&e.subarray&&f5)return String.fromCharCode.apply(null,e.length===r?e:e.subarray(0,r));let t="";for(let i=0;i<r;i++)t+=String.fromCharCode(e[i]);return t};var jN=(e,r)=>{const t=r||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,r));let i,l;const f=new Array(t*2);for(l=0,i=0;i<t;){let c=e[i++];if(c<128){f[l++]=c;continue}let p=zh[c];if(p>4){f[l++]=65533,i+=p-1;continue}for(c&=p===2?31:p===3?15:7;p>1&&i<t;)c=c<<6|e[i++]&63,p--;if(p>1){f[l++]=65533;continue}c<65536?f[l++]=c:(c-=65536,f[l++]=55296|c>>10&1023,f[l++]=56320|c&1023)}return UN(f,l)},IN=(e,r)=>{r=r||e.length,r>e.length&&(r=e.length);let t=r-1;for(;t>=0&&(e[t]&192)===128;)t--;return t<0||t===0?r:t+zh[e[t]]>r?t:r},Uh={string2buf:zN,buf2string:jN,utf8border:IN};function HN(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var d5=HN;const h5=Object.prototype.toString,{Z_NO_FLUSH:VN,Z_SYNC_FLUSH:$N,Z_FULL_FLUSH:YN,Z_FINISH:qN,Z_OK:gg,Z_STREAM_END:GN,Z_DEFAULT_COMPRESSION:KN,Z_DEFAULT_STRATEGY:WN,Z_DEFLATED:QN}=yc;function jh(e){this.options=mg.assign({level:KN,method:QN,chunkSize:16384,windowBits:15,memLevel:8,strategy:WN},e||{});let r=this.options;r.raw&&r.windowBits>0?r.windowBits=-r.windowBits:r.gzip&&r.windowBits>0&&r.windowBits<16&&(r.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d5,this.strm.avail_out=0;let t=Lh.deflateInit2(this.strm,r.level,r.method,r.windowBits,r.memLevel,r.strategy);if(t!==gg)throw new Error(gc[t]);if(r.header&&Lh.deflateSetHeader(this.strm,r.header),r.dictionary){let i;if(typeof r.dictionary=="string"?i=Uh.string2buf(r.dictionary):h5.call(r.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(r.dictionary):i=r.dictionary,t=Lh.deflateSetDictionary(this.strm,i),t!==gg)throw new Error(gc[t]);this._dict_set=!0}}jh.prototype.push=function(e,r){const t=this.strm,i=this.options.chunkSize;let l,f;if(this.ended)return!1;for(r===~~r?f=r:f=r===!0?qN:VN,typeof e=="string"?t.input=Uh.string2buf(e):h5.call(e)==="[object ArrayBuffer]"?t.input=new Uint8Array(e):t.input=e,t.next_in=0,t.avail_in=t.input.length;;){if(t.avail_out===0&&(t.output=new Uint8Array(i),t.next_out=0,t.avail_out=i),(f===$N||f===YN)&&t.avail_out<=6){this.onData(t.output.subarray(0,t.next_out)),t.avail_out=0;continue}if(l=Lh.deflate(t,f),l===GN)return t.next_out>0&&this.onData(t.output.subarray(0,t.next_out)),l=Lh.deflateEnd(this.strm),this.onEnd(l),this.ended=!0,l===gg;if(t.avail_out===0){this.onData(t.output);continue}if(f>0&&t.next_out>0){this.onData(t.output.subarray(0,t.next_out)),t.avail_out=0;continue}if(t.avail_in===0)break}return!0},jh.prototype.onData=function(e){this.chunks.push(e)},jh.prototype.onEnd=function(e){e===gg&&(this.result=mg.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function l2(e,r){const t=new jh(r);if(t.push(e,!0),t.err)throw t.msg||gc[t.err];return t.result}function ZN(e,r){return r=r||{},r.raw=!0,l2(e,r)}function XN(e,r){return r=r||{},r.gzip=!0,l2(e,r)}var JN=jh,eM=l2,tM=ZN,nM=XN,rM=yc,aM={Deflate:JN,deflate:eM,deflateRaw:tM,gzip:nM,constants:rM};const yg=16209,iM=16191;var oM=function(r,t){let i,l,f,c,p,g,d,m,C,b,x,E,k,D,A,T,S,O,B,z,M,U,V,F;const N=r.state;i=r.next_in,V=r.input,l=i+(r.avail_in-5),f=r.next_out,F=r.output,c=f-(t-r.avail_out),p=f+(r.avail_out-257),g=N.dmax,d=N.wsize,m=N.whave,C=N.wnext,b=N.window,x=N.hold,E=N.bits,k=N.lencode,D=N.distcode,A=(1<<N.lenbits)-1,T=(1<<N.distbits)-1;e:do{E<15&&(x+=V[i++]<<E,E+=8,x+=V[i++]<<E,E+=8),S=k[x&A];t:for(;;){if(O=S>>>24,x>>>=O,E-=O,O=S>>>16&255,O===0)F[f++]=S&65535;else if(O&16){B=S&65535,O&=15,O&&(E<O&&(x+=V[i++]<<E,E+=8),B+=x&(1<<O)-1,x>>>=O,E-=O),E<15&&(x+=V[i++]<<E,E+=8,x+=V[i++]<<E,E+=8),S=D[x&T];n:for(;;){if(O=S>>>24,x>>>=O,E-=O,O=S>>>16&255,O&16){if(z=S&65535,O&=15,E<O&&(x+=V[i++]<<E,E+=8,E<O&&(x+=V[i++]<<E,E+=8)),z+=x&(1<<O)-1,z>g){r.msg="invalid distance too far back",N.mode=yg;break e}if(x>>>=O,E-=O,O=f-c,z>O){if(O=z-O,O>m&&N.sane){r.msg="invalid distance too far back",N.mode=yg;break e}if(M=0,U=b,C===0){if(M+=d-O,O<B){B-=O;do F[f++]=b[M++];while(--O);M=f-z,U=F}}else if(C<O){if(M+=d+C-O,O-=C,O<B){B-=O;do F[f++]=b[M++];while(--O);if(M=0,C<B){O=C,B-=O;do F[f++]=b[M++];while(--O);M=f-z,U=F}}}else if(M+=C-O,O<B){B-=O;do F[f++]=b[M++];while(--O);M=f-z,U=F}for(;B>2;)F[f++]=U[M++],F[f++]=U[M++],F[f++]=U[M++],B-=3;B&&(F[f++]=U[M++],B>1&&(F[f++]=U[M++]))}else{M=f-z;do F[f++]=F[M++],F[f++]=F[M++],F[f++]=F[M++],B-=3;while(B>2);B&&(F[f++]=F[M++],B>1&&(F[f++]=F[M++]))}}else if(O&64){r.msg="invalid distance code",N.mode=yg;break e}else{S=D[(S&65535)+(x&(1<<O)-1)];continue n}break}}else if(O&64)if(O&32){N.mode=iM;break e}else{r.msg="invalid literal/length code",N.mode=yg;break e}else{S=k[(S&65535)+(x&(1<<O)-1)];continue t}break}}while(i<l&&f<p);B=E>>3,i-=B,E-=B<<3,x&=(1<<E)-1,r.next_in=i,r.next_out=f,r.avail_in=i<l?5+(l-i):5-(i-l),r.avail_out=f<p?257+(p-f):257-(f-p),N.hold=x,N.bits=E};const ld=15,p5=852,v5=592,m5=0,s2=1,g5=2,lM=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),sM=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),uM=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),cM=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var Ih=(e,r,t,i,l,f,c,p)=>{const g=p.bits;let d=0,m=0,C=0,b=0,x=0,E=0,k=0,D=0,A=0,T=0,S,O,B,z,M,U=null,V;const F=new Uint16Array(ld+1),N=new Uint16Array(ld+1);let $=null,I,q,ee;for(d=0;d<=ld;d++)F[d]=0;for(m=0;m<i;m++)F[r[t+m]]++;for(x=g,b=ld;b>=1&&F[b]===0;b--);if(x>b&&(x=b),b===0)return l[f++]=1<<24|64<<16|0,l[f++]=1<<24|64<<16|0,p.bits=1,0;for(C=1;C<b&&F[C]===0;C++);for(x<C&&(x=C),D=1,d=1;d<=ld;d++)if(D<<=1,D-=F[d],D<0)return-1;if(D>0&&(e===m5||b!==1))return-1;for(N[1]=0,d=1;d<ld;d++)N[d+1]=N[d]+F[d];for(m=0;m<i;m++)r[t+m]!==0&&(c[N[r[t+m]]++]=m);if(e===m5?(U=$=c,V=20):e===s2?(U=lM,$=sM,V=257):(U=uM,$=cM,V=0),T=0,m=0,d=C,M=f,E=x,k=0,B=-1,A=1<<x,z=A-1,e===s2&&A>p5||e===g5&&A>v5)return 1;for(;;){I=d-k,c[m]+1<V?(q=0,ee=c[m]):c[m]>=V?(q=$[c[m]-V],ee=U[c[m]-V]):(q=32+64,ee=0),S=1<<d-k,O=1<<E,C=O;do O-=S,l[M+(T>>k)+O]=I<<24|q<<16|ee|0;while(O!==0);for(S=1<<d-1;T&S;)S>>=1;if(S!==0?(T&=S-1,T+=S):T=0,m++,--F[d]===0){if(d===b)break;d=r[t+c[m]]}if(d>x&&(T&z)!==B){for(k===0&&(k=x),M+=C,E=d-k,D=1<<E;E+k<b&&(D-=F[E+k],!(D<=0));)E++,D<<=1;if(A+=1<<E,e===s2&&A>p5||e===g5&&A>v5)return 1;B=T&z,l[B]=x<<24|E<<16|M-f|0}}return T!==0&&(l[M+T]=d-k<<24|64<<16|0),p.bits=x,0};const fM=0,y5=1,x5=2,{Z_FINISH:b5,Z_BLOCK:dM,Z_TREES:xg,Z_OK:wc,Z_STREAM_END:hM,Z_NEED_DICT:pM,Z_STREAM_ERROR:Xi,Z_DATA_ERROR:C5,Z_MEM_ERROR:w5,Z_BUF_ERROR:vM,Z_DEFLATED:_5}=yc,bg=16180,E5=16181,S5=16182,D5=16183,k5=16184,T5=16185,A5=16186,O5=16187,R5=16188,F5=16189,Cg=16190,rs=16191,u2=16192,N5=16193,c2=16194,M5=16195,P5=16196,B5=16197,L5=16198,wg=16199,_g=16200,z5=16201,U5=16202,j5=16203,I5=16204,H5=16205,f2=16206,V5=16207,$5=16208,Qn=16209,Y5=16210,q5=16211,mM=852,gM=592,yM=15,G5=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function xM(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const _c=e=>{if(!e)return 1;const r=e.state;return!r||r.strm!==e||r.mode<bg||r.mode>q5?1:0},K5=e=>{if(_c(e))return Xi;const r=e.state;return e.total_in=e.total_out=r.total=0,e.msg="",r.wrap&&(e.adler=r.wrap&1),r.mode=bg,r.last=0,r.havedict=0,r.flags=-1,r.dmax=32768,r.head=null,r.hold=0,r.bits=0,r.lencode=r.lendyn=new Int32Array(mM),r.distcode=r.distdyn=new Int32Array(gM),r.sane=1,r.back=-1,wc},W5=e=>{if(_c(e))return Xi;const r=e.state;return r.wsize=0,r.whave=0,r.wnext=0,K5(e)},Q5=(e,r)=>{let t;if(_c(e))return Xi;const i=e.state;return r<0?(t=0,r=-r):(t=(r>>4)+5,r<48&&(r&=15)),r&&(r<8||r>15)?Xi:(i.window!==null&&i.wbits!==r&&(i.window=null),i.wrap=t,i.wbits=r,W5(e))},Z5=(e,r)=>{if(!e)return Xi;const t=new xM;e.state=t,t.strm=e,t.window=null,t.mode=bg;const i=Q5(e,r);return i!==wc&&(e.state=null),i},bM=e=>Z5(e,yM);let X5=!0,d2,h2;const CM=e=>{if(X5){d2=new Int32Array(512),h2=new Int32Array(32);let r=0;for(;r<144;)e.lens[r++]=8;for(;r<256;)e.lens[r++]=9;for(;r<280;)e.lens[r++]=7;for(;r<288;)e.lens[r++]=8;for(Ih(y5,e.lens,0,288,d2,0,e.work,{bits:9}),r=0;r<32;)e.lens[r++]=5;Ih(x5,e.lens,0,32,h2,0,e.work,{bits:5}),X5=!1}e.lencode=d2,e.lenbits=9,e.distcode=h2,e.distbits=5},J5=(e,r,t,i)=>{let l;const f=e.state;return f.window===null&&(f.wsize=1<<f.wbits,f.wnext=0,f.whave=0,f.window=new Uint8Array(f.wsize)),i>=f.wsize?(f.window.set(r.subarray(t-f.wsize,t),0),f.wnext=0,f.whave=f.wsize):(l=f.wsize-f.wnext,l>i&&(l=i),f.window.set(r.subarray(t-i,t-i+l),f.wnext),i-=l,i?(f.window.set(r.subarray(t-i,t),0),f.wnext=i,f.whave=f.wsize):(f.wnext+=l,f.wnext===f.wsize&&(f.wnext=0),f.whave<f.wsize&&(f.whave+=l))),0},wM=(e,r)=>{let t,i,l,f,c,p,g,d,m,C,b,x,E,k,D=0,A,T,S,O,B,z,M,U;const V=new Uint8Array(4);let F,N;const $=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(_c(e)||!e.output||!e.input&&e.avail_in!==0)return Xi;t=e.state,t.mode===rs&&(t.mode=u2),c=e.next_out,l=e.output,g=e.avail_out,f=e.next_in,i=e.input,p=e.avail_in,d=t.hold,m=t.bits,C=p,b=g,U=wc;e:for(;;)switch(t.mode){case bg:if(t.wrap===0){t.mode=u2;break}for(;m<16;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if(t.wrap&2&&d===35615){t.wbits===0&&(t.wbits=15),t.check=0,V[0]=d&255,V[1]=d>>>8&255,t.check=Qr(t.check,V,2,0),d=0,m=0,t.mode=E5;break}if(t.head&&(t.head.done=!1),!(t.wrap&1)||(((d&255)<<8)+(d>>8))%31){e.msg="incorrect header check",t.mode=Qn;break}if((d&15)!==_5){e.msg="unknown compression method",t.mode=Qn;break}if(d>>>=4,m-=4,M=(d&15)+8,t.wbits===0&&(t.wbits=M),M>15||M>t.wbits){e.msg="invalid window size",t.mode=Qn;break}t.dmax=1<<t.wbits,t.flags=0,e.adler=t.check=1,t.mode=d&512?F5:rs,d=0,m=0;break;case E5:for(;m<16;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if(t.flags=d,(t.flags&255)!==_5){e.msg="unknown compression method",t.mode=Qn;break}if(t.flags&57344){e.msg="unknown header flags set",t.mode=Qn;break}t.head&&(t.head.text=d>>8&1),t.flags&512&&t.wrap&4&&(V[0]=d&255,V[1]=d>>>8&255,t.check=Qr(t.check,V,2,0)),d=0,m=0,t.mode=S5;case S5:for(;m<32;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}t.head&&(t.head.time=d),t.flags&512&&t.wrap&4&&(V[0]=d&255,V[1]=d>>>8&255,V[2]=d>>>16&255,V[3]=d>>>24&255,t.check=Qr(t.check,V,4,0)),d=0,m=0,t.mode=D5;case D5:for(;m<16;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}t.head&&(t.head.xflags=d&255,t.head.os=d>>8),t.flags&512&&t.wrap&4&&(V[0]=d&255,V[1]=d>>>8&255,t.check=Qr(t.check,V,2,0)),d=0,m=0,t.mode=k5;case k5:if(t.flags&1024){for(;m<16;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}t.length=d,t.head&&(t.head.extra_len=d),t.flags&512&&t.wrap&4&&(V[0]=d&255,V[1]=d>>>8&255,t.check=Qr(t.check,V,2,0)),d=0,m=0}else t.head&&(t.head.extra=null);t.mode=T5;case T5:if(t.flags&1024&&(x=t.length,x>p&&(x=p),x&&(t.head&&(M=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Uint8Array(t.head.extra_len)),t.head.extra.set(i.subarray(f,f+x),M)),t.flags&512&&t.wrap&4&&(t.check=Qr(t.check,i,x,f)),p-=x,f+=x,t.length-=x),t.length))break e;t.length=0,t.mode=A5;case A5:if(t.flags&2048){if(p===0)break e;x=0;do M=i[f+x++],t.head&&M&&t.length<65536&&(t.head.name+=String.fromCharCode(M));while(M&&x<p);if(t.flags&512&&t.wrap&4&&(t.check=Qr(t.check,i,x,f)),p-=x,f+=x,M)break e}else t.head&&(t.head.name=null);t.length=0,t.mode=O5;case O5:if(t.flags&4096){if(p===0)break e;x=0;do M=i[f+x++],t.head&&M&&t.length<65536&&(t.head.comment+=String.fromCharCode(M));while(M&&x<p);if(t.flags&512&&t.wrap&4&&(t.check=Qr(t.check,i,x,f)),p-=x,f+=x,M)break e}else t.head&&(t.head.comment=null);t.mode=R5;case R5:if(t.flags&512){for(;m<16;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if(t.wrap&4&&d!==(t.check&65535)){e.msg="header crc mismatch",t.mode=Qn;break}d=0,m=0}t.head&&(t.head.hcrc=t.flags>>9&1,t.head.done=!0),e.adler=t.check=0,t.mode=rs;break;case F5:for(;m<32;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}e.adler=t.check=G5(d),d=0,m=0,t.mode=Cg;case Cg:if(t.havedict===0)return e.next_out=c,e.avail_out=g,e.next_in=f,e.avail_in=p,t.hold=d,t.bits=m,pM;e.adler=t.check=1,t.mode=rs;case rs:if(r===dM||r===xg)break e;case u2:if(t.last){d>>>=m&7,m-=m&7,t.mode=f2;break}for(;m<3;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}switch(t.last=d&1,d>>>=1,m-=1,d&3){case 0:t.mode=N5;break;case 1:if(CM(t),t.mode=wg,r===xg){d>>>=2,m-=2;break e}break;case 2:t.mode=P5;break;case 3:e.msg="invalid block type",t.mode=Qn}d>>>=2,m-=2;break;case N5:for(d>>>=m&7,m-=m&7;m<32;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if((d&65535)!==(d>>>16^65535)){e.msg="invalid stored block lengths",t.mode=Qn;break}if(t.length=d&65535,d=0,m=0,t.mode=c2,r===xg)break e;case c2:t.mode=M5;case M5:if(x=t.length,x){if(x>p&&(x=p),x>g&&(x=g),x===0)break e;l.set(i.subarray(f,f+x),c),p-=x,f+=x,g-=x,c+=x,t.length-=x;break}t.mode=rs;break;case P5:for(;m<14;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if(t.nlen=(d&31)+257,d>>>=5,m-=5,t.ndist=(d&31)+1,d>>>=5,m-=5,t.ncode=(d&15)+4,d>>>=4,m-=4,t.nlen>286||t.ndist>30){e.msg="too many length or distance symbols",t.mode=Qn;break}t.have=0,t.mode=B5;case B5:for(;t.have<t.ncode;){for(;m<3;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}t.lens[$[t.have++]]=d&7,d>>>=3,m-=3}for(;t.have<19;)t.lens[$[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,F={bits:t.lenbits},U=Ih(fM,t.lens,0,19,t.lencode,0,t.work,F),t.lenbits=F.bits,U){e.msg="invalid code lengths set",t.mode=Qn;break}t.have=0,t.mode=L5;case L5:for(;t.have<t.nlen+t.ndist;){for(;D=t.lencode[d&(1<<t.lenbits)-1],A=D>>>24,T=D>>>16&255,S=D&65535,!(A<=m);){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if(S<16)d>>>=A,m-=A,t.lens[t.have++]=S;else{if(S===16){for(N=A+2;m<N;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if(d>>>=A,m-=A,t.have===0){e.msg="invalid bit length repeat",t.mode=Qn;break}M=t.lens[t.have-1],x=3+(d&3),d>>>=2,m-=2}else if(S===17){for(N=A+3;m<N;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}d>>>=A,m-=A,M=0,x=3+(d&7),d>>>=3,m-=3}else{for(N=A+7;m<N;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}d>>>=A,m-=A,M=0,x=11+(d&127),d>>>=7,m-=7}if(t.have+x>t.nlen+t.ndist){e.msg="invalid bit length repeat",t.mode=Qn;break}for(;x--;)t.lens[t.have++]=M}}if(t.mode===Qn)break;if(t.lens[256]===0){e.msg="invalid code -- missing end-of-block",t.mode=Qn;break}if(t.lenbits=9,F={bits:t.lenbits},U=Ih(y5,t.lens,0,t.nlen,t.lencode,0,t.work,F),t.lenbits=F.bits,U){e.msg="invalid literal/lengths set",t.mode=Qn;break}if(t.distbits=6,t.distcode=t.distdyn,F={bits:t.distbits},U=Ih(x5,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,F),t.distbits=F.bits,U){e.msg="invalid distances set",t.mode=Qn;break}if(t.mode=wg,r===xg)break e;case wg:t.mode=_g;case _g:if(p>=6&&g>=258){e.next_out=c,e.avail_out=g,e.next_in=f,e.avail_in=p,t.hold=d,t.bits=m,oM(e,b),c=e.next_out,l=e.output,g=e.avail_out,f=e.next_in,i=e.input,p=e.avail_in,d=t.hold,m=t.bits,t.mode===rs&&(t.back=-1);break}for(t.back=0;D=t.lencode[d&(1<<t.lenbits)-1],A=D>>>24,T=D>>>16&255,S=D&65535,!(A<=m);){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if(T&&!(T&240)){for(O=A,B=T,z=S;D=t.lencode[z+((d&(1<<O+B)-1)>>O)],A=D>>>24,T=D>>>16&255,S=D&65535,!(O+A<=m);){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}d>>>=O,m-=O,t.back+=O}if(d>>>=A,m-=A,t.back+=A,t.length=S,T===0){t.mode=H5;break}if(T&32){t.back=-1,t.mode=rs;break}if(T&64){e.msg="invalid literal/length code",t.mode=Qn;break}t.extra=T&15,t.mode=z5;case z5:if(t.extra){for(N=t.extra;m<N;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}t.length+=d&(1<<t.extra)-1,d>>>=t.extra,m-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=U5;case U5:for(;D=t.distcode[d&(1<<t.distbits)-1],A=D>>>24,T=D>>>16&255,S=D&65535,!(A<=m);){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if(!(T&240)){for(O=A,B=T,z=S;D=t.distcode[z+((d&(1<<O+B)-1)>>O)],A=D>>>24,T=D>>>16&255,S=D&65535,!(O+A<=m);){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}d>>>=O,m-=O,t.back+=O}if(d>>>=A,m-=A,t.back+=A,T&64){e.msg="invalid distance code",t.mode=Qn;break}t.offset=S,t.extra=T&15,t.mode=j5;case j5:if(t.extra){for(N=t.extra;m<N;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}t.offset+=d&(1<<t.extra)-1,d>>>=t.extra,m-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){e.msg="invalid distance too far back",t.mode=Qn;break}t.mode=I5;case I5:if(g===0)break e;if(x=b-g,t.offset>x){if(x=t.offset-x,x>t.whave&&t.sane){e.msg="invalid distance too far back",t.mode=Qn;break}x>t.wnext?(x-=t.wnext,E=t.wsize-x):E=t.wnext-x,x>t.length&&(x=t.length),k=t.window}else k=l,E=c-t.offset,x=t.length;x>g&&(x=g),g-=x,t.length-=x;do l[c++]=k[E++];while(--x);t.length===0&&(t.mode=_g);break;case H5:if(g===0)break e;l[c++]=t.length,g--,t.mode=_g;break;case f2:if(t.wrap){for(;m<32;){if(p===0)break e;p--,d|=i[f++]<<m,m+=8}if(b-=g,e.total_out+=b,t.total+=b,t.wrap&4&&b&&(e.adler=t.check=t.flags?Qr(t.check,l,b,c-b):Fh(t.check,l,b,c-b)),b=g,t.wrap&4&&(t.flags?d:G5(d))!==t.check){e.msg="incorrect data check",t.mode=Qn;break}d=0,m=0}t.mode=V5;case V5:if(t.wrap&&t.flags){for(;m<32;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if(t.wrap&4&&d!==(t.total&4294967295)){e.msg="incorrect length check",t.mode=Qn;break}d=0,m=0}t.mode=$5;case $5:U=hM;break e;case Qn:U=C5;break e;case Y5:return w5;case q5:default:return Xi}return e.next_out=c,e.avail_out=g,e.next_in=f,e.avail_in=p,t.hold=d,t.bits=m,(t.wsize||b!==e.avail_out&&t.mode<Qn&&(t.mode<f2||r!==b5))&&J5(e,e.output,e.next_out,b-e.avail_out),C-=e.avail_in,b-=e.avail_out,e.total_in+=C,e.total_out+=b,t.total+=b,t.wrap&4&&b&&(e.adler=t.check=t.flags?Qr(t.check,l,b,e.next_out-b):Fh(t.check,l,b,e.next_out-b)),e.data_type=t.bits+(t.last?64:0)+(t.mode===rs?128:0)+(t.mode===wg||t.mode===c2?256:0),(C===0&&b===0||r===b5)&&U===wc&&(U=vM),U},_M=e=>{if(_c(e))return Xi;let r=e.state;return r.window&&(r.window=null),e.state=null,wc},EM=(e,r)=>{if(_c(e))return Xi;const t=e.state;return t.wrap&2?(t.head=r,r.done=!1,wc):Xi},SM=(e,r)=>{const t=r.length;let i,l,f;return _c(e)||(i=e.state,i.wrap!==0&&i.mode!==Cg)?Xi:i.mode===Cg&&(l=1,l=Fh(l,r,t,0),l!==i.check)?C5:(f=J5(e,r,t,t),f?(i.mode=Y5,w5):(i.havedict=1,wc))};var DM=W5,kM=Q5,TM=K5,AM=bM,OM=Z5,RM=wM,FM=_M,NM=EM,MM=SM,PM="pako inflate (from Nodeca project)",as={inflateReset:DM,inflateReset2:kM,inflateResetKeep:TM,inflateInit:AM,inflateInit2:OM,inflate:RM,inflateEnd:FM,inflateGetHeader:NM,inflateSetDictionary:MM,inflateInfo:PM};function BM(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var LM=BM;const e6=Object.prototype.toString,{Z_NO_FLUSH:zM,Z_FINISH:UM,Z_OK:Hh,Z_STREAM_END:p2,Z_NEED_DICT:v2,Z_STREAM_ERROR:jM,Z_DATA_ERROR:t6,Z_MEM_ERROR:IM}=yc;function Vh(e){this.options=mg.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});const r=this.options;r.raw&&r.windowBits>=0&&r.windowBits<16&&(r.windowBits=-r.windowBits,r.windowBits===0&&(r.windowBits=-15)),r.windowBits>=0&&r.windowBits<16&&!(e&&e.windowBits)&&(r.windowBits+=32),r.windowBits>15&&r.windowBits<48&&(r.windowBits&15||(r.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d5,this.strm.avail_out=0;let t=as.inflateInit2(this.strm,r.windowBits);if(t!==Hh)throw new Error(gc[t]);if(this.header=new LM,as.inflateGetHeader(this.strm,this.header),r.dictionary&&(typeof r.dictionary=="string"?r.dictionary=Uh.string2buf(r.dictionary):e6.call(r.dictionary)==="[object ArrayBuffer]"&&(r.dictionary=new Uint8Array(r.dictionary)),r.raw&&(t=as.inflateSetDictionary(this.strm,r.dictionary),t!==Hh)))throw new Error(gc[t])}Vh.prototype.push=function(e,r){const t=this.strm,i=this.options.chunkSize,l=this.options.dictionary;let f,c,p;if(this.ended)return!1;for(r===~~r?c=r:c=r===!0?UM:zM,e6.call(e)==="[object ArrayBuffer]"?t.input=new Uint8Array(e):t.input=e,t.next_in=0,t.avail_in=t.input.length;;){for(t.avail_out===0&&(t.output=new Uint8Array(i),t.next_out=0,t.avail_out=i),f=as.inflate(t,c),f===v2&&l&&(f=as.inflateSetDictionary(t,l),f===Hh?f=as.inflate(t,c):f===t6&&(f=v2));t.avail_in>0&&f===p2&&t.state.wrap>0&&e[t.next_in]!==0;)as.inflateReset(t),f=as.inflate(t,c);switch(f){case jM:case t6:case v2:case IM:return this.onEnd(f),this.ended=!0,!1}if(p=t.avail_out,t.next_out&&(t.avail_out===0||f===p2))if(this.options.to==="string"){let g=Uh.utf8border(t.output,t.next_out),d=t.next_out-g,m=Uh.buf2string(t.output,g);t.next_out=d,t.avail_out=i-d,d&&t.output.set(t.output.subarray(g,g+d),0),this.onData(m)}else this.onData(t.output.length===t.next_out?t.output:t.output.subarray(0,t.next_out));if(!(f===Hh&&p===0)){if(f===p2)return f=as.inflateEnd(this.strm),this.onEnd(f),this.ended=!0,!0;if(t.avail_in===0)break}}return!0},Vh.prototype.onData=function(e){this.chunks.push(e)},Vh.prototype.onEnd=function(e){e===Hh&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=mg.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function m2(e,r){const t=new Vh(r);if(t.push(e),t.err)throw t.msg||gc[t.err];return t.result}function HM(e,r){return r=r||{},r.raw=!0,m2(e,r)}var VM=Vh,$M=m2,YM=HM,qM=m2,GM=yc,KM={Inflate:VM,inflate:$M,inflateRaw:YM,ungzip:qM,constants:GM};const{Deflate:WM,deflate:QM,deflateRaw:ZM,gzip:XM}=aM,{Inflate:JM,inflate:eP,inflateRaw:tP,ungzip:nP}=KM;var rP=WM,aP=QM,iP=ZM,oP=XM,lP=JM,sP=eP,uP=tP,cP=nP,fP=yc,dP={Deflate:rP,deflate:aP,deflateRaw:iP,gzip:oP,Inflate:lP,inflate:sP,inflateRaw:uP,ungzip:cP,constants:fP},Be={};Be.toRGBA8=function(e){var r=e.width,t=e.height;if(e.tabs.acTL==null)return[Be.toRGBA8.decodeImage(e.data,r,t,e).buffer];var i=[];e.frames[0].data==null&&(e.frames[0].data=e.data);for(var l=r*t*4,f=new Uint8Array(l),c=new Uint8Array(l),p=new Uint8Array(l),g=0;g<e.frames.length;g++){var d=e.frames[g],m=d.rect.x,C=d.rect.y,b=d.rect.width,x=d.rect.height,E=Be.toRGBA8.decodeImage(d.data,b,x,e);if(g!=0)for(var k=0;k<l;k++)p[k]=f[k];if(d.blend==0?Be._copyTile(E,b,x,f,r,t,m,C,0):d.blend==1&&Be._copyTile(E,b,x,f,r,t,m,C,1),i.push(f.buffer.slice(0)),d.dispose!=0){if(d.dispose==1)Be._copyTile(c,b,x,f,r,t,m,C,0);else if(d.dispose==2)for(var k=0;k<l;k++)f[k]=p[k]}}return i},Be.toRGBA8.decodeImage=function(e,r,t,i){var l=r*t,f=Be.decode._getBPP(i),c=Math.ceil(r*f/8),p=new Uint8Array(l*4),g=new Uint32Array(p.buffer),d=i.ctype,m=i.depth,C=Be._bin.readUshort;if(d==6){var b=l<<2;if(m==8)for(var x=0;x<b;x+=4)p[x]=e[x],p[x+1]=e[x+1],p[x+2]=e[x+2],p[x+3]=e[x+3];if(m==16)for(var x=0;x<b;x++)p[x]=e[x<<1]}else if(d==2){var E=i.tabs.tRNS;if(E==null){if(m==8)for(var x=0;x<l;x++){var k=x*3;g[x]=255<<24|e[k+2]<<16|e[k+1]<<8|e[k]}if(m==16)for(var x=0;x<l;x++){var k=x*6;g[x]=255<<24|e[k+4]<<16|e[k+2]<<8|e[k]}}else{var D=E[0],A=E[1],T=E[2];if(m==8)for(var x=0;x<l;x++){var S=x<<2,k=x*3;g[x]=255<<24|e[k+2]<<16|e[k+1]<<8|e[k],e[k]==D&&e[k+1]==A&&e[k+2]==T&&(p[S+3]=0)}if(m==16)for(var x=0;x<l;x++){var S=x<<2,k=x*6;g[x]=255<<24|e[k+4]<<16|e[k+2]<<8|e[k],C(e,k)==D&&C(e,k+2)==A&&C(e,k+4)==T&&(p[S+3]=0)}}}else if(d==3){var O=i.tabs.PLTE,B=i.tabs.tRNS,z=B?B.length:0;if(m==1)for(var M=0;M<t;M++)for(var U=M*c,V=M*r,x=0;x<r;x++){var S=V+x<<2,F=e[U+(x>>3)]>>7-((x&7)<<0)&1,N=3*F;p[S]=O[N],p[S+1]=O[N+1],p[S+2]=O[N+2],p[S+3]=F<z?B[F]:255}if(m==2)for(var M=0;M<t;M++)for(var U=M*c,V=M*r,x=0;x<r;x++){var S=V+x<<2,F=e[U+(x>>2)]>>6-((x&3)<<1)&3,N=3*F;p[S]=O[N],p[S+1]=O[N+1],p[S+2]=O[N+2],p[S+3]=F<z?B[F]:255}if(m==4)for(var M=0;M<t;M++)for(var U=M*c,V=M*r,x=0;x<r;x++){var S=V+x<<2,F=e[U+(x>>1)]>>4-((x&1)<<2)&15,N=3*F;p[S]=O[N],p[S+1]=O[N+1],p[S+2]=O[N+2],p[S+3]=F<z?B[F]:255}if(m==8)for(var x=0;x<l;x++){var S=x<<2,F=e[x],N=3*F;p[S]=O[N],p[S+1]=O[N+1],p[S+2]=O[N+2],p[S+3]=F<z?B[F]:255}}else if(d==4){if(m==8)for(var x=0;x<l;x++){var S=x<<2,$=x<<1,I=e[$];p[S]=I,p[S+1]=I,p[S+2]=I,p[S+3]=e[$+1]}if(m==16)for(var x=0;x<l;x++){var S=x<<2,$=x<<2,I=e[$];p[S]=I,p[S+1]=I,p[S+2]=I,p[S+3]=e[$+2]}}else if(d==0)for(var D=i.tabs.tRNS?i.tabs.tRNS:-1,M=0;M<t;M++){var q=M*c,ee=M*r;if(m==1)for(var Z=0;Z<r;Z++){var I=255*(e[q+(Z>>>3)]>>>7-(Z&7)&1),J=I==D*255?0:255;g[ee+Z]=J<<24|I<<16|I<<8|I}else if(m==2)for(var Z=0;Z<r;Z++){var I=85*(e[q+(Z>>>2)]>>>6-((Z&3)<<1)&3),J=I==D*85?0:255;g[ee+Z]=J<<24|I<<16|I<<8|I}else if(m==4)for(var Z=0;Z<r;Z++){var I=17*(e[q+(Z>>>1)]>>>4-((Z&1)<<2)&15),J=I==D*17?0:255;g[ee+Z]=J<<24|I<<16|I<<8|I}else if(m==8)for(var Z=0;Z<r;Z++){var I=e[q+Z],J=I==D?0:255;g[ee+Z]=J<<24|I<<16|I<<8|I}else if(m==16)for(var Z=0;Z<r;Z++){var I=e[q+(Z<<1)],J=C(e,q+(Z<<x))==D?0:255;g[ee+Z]=J<<24|I<<16|I<<8|I}}return p},Be.decode=function(e){for(var r=new Uint8Array(e),t=8,i=Be._bin,l=i.readUshort,f=i.readUint,c={tabs:{},frames:[]},p=new Uint8Array(r.length),g=0,d,m=0,C=[137,80,78,71,13,10,26,10],b=0;b<8;b++)if(r[b]!=C[b])throw"The input is not a PNG file!";for(;t<r.length;){var x=i.readUint(r,t);t+=4;var E=i.readASCII(r,t,4);if(t+=4,E=="IHDR")Be.decode._IHDR(r,t,c);else if(E=="CgBI")c.tabs[E]=r.slice(t,t+4);else if(E=="IDAT"){for(var b=0;b<x;b++)p[g+b]=r[t+b];g+=x}else if(E=="acTL")c.tabs[E]={num_frames:f(r,t),num_plays:f(r,t+4)},d=new Uint8Array(r.length);else if(E=="fcTL"){if(m!=0){var k=c.frames[c.frames.length-1];k.data=Be.decode._decompress(c,d.slice(0,m),k.rect.width,k.rect.height),m=0}var D={x:f(r,t+12),y:f(r,t+16),width:f(r,t+4),height:f(r,t+8)},A=l(r,t+22);A=l(r,t+20)/(A==0?100:A);var T={rect:D,delay:Math.round(A*1e3),dispose:r[t+24],blend:r[t+25]};c.frames.push(T)}else if(E=="fdAT"){for(var b=0;b<x-4;b++)d[m+b]=r[t+b+4];m+=x-4}else if(E=="pHYs")c.tabs[E]=[i.readUint(r,t),i.readUint(r,t+4),r[t+8]];else if(E=="cHRM"){c.tabs[E]=[];for(var b=0;b<8;b++)c.tabs[E].push(i.readUint(r,t+b*4))}else if(E=="tEXt"||E=="zTXt"){c.tabs[E]==null&&(c.tabs[E]={});var S=i.nextZero(r,t),O=i.readASCII(r,t,S-t),B,z=t+x-S-1;if(E=="tEXt")B=i.readASCII(r,S+1,z);else{var M=Be.decode._inflate(r.slice(S+2,S+2+z));B=i.readUTF8(M,0,M.length)}c.tabs[E][O]=B}else if(E=="iTXt"){c.tabs[E]==null&&(c.tabs[E]={});var S=0,U=t;S=i.nextZero(r,U);var O=i.readASCII(r,U,S-U);U=S+1;var V=r[U];r[U+1],U+=2,S=i.nextZero(r,U),i.readASCII(r,U,S-U),U=S+1,S=i.nextZero(r,U),i.readUTF8(r,U,S-U),U=S+1;var B,z=x-(U-t);if(V==0)B=i.readUTF8(r,U,z);else{var M=Be.decode._inflate(r.slice(U,U+z));B=i.readUTF8(M,0,M.length)}c.tabs[E][O]=B}else if(E=="PLTE")c.tabs[E]=i.readBytes(r,t,x);else if(E=="hIST"){var F=c.tabs.PLTE.length/3;c.tabs[E]=[];for(var b=0;b<F;b++)c.tabs[E].push(l(r,t+b*2))}else if(E=="tRNS")c.ctype==3?c.tabs[E]=i.readBytes(r,t,x):c.ctype==0?c.tabs[E]=l(r,t):c.ctype==2&&(c.tabs[E]=[l(r,t),l(r,t+2),l(r,t+4)]);else if(E=="gAMA")c.tabs[E]=i.readUint(r,t)/1e5;else if(E=="sRGB")c.tabs[E]=r[t];else if(E=="bKGD")c.ctype==0||c.ctype==4?c.tabs[E]=[l(r,t)]:c.ctype==2||c.ctype==6?c.tabs[E]=[l(r,t),l(r,t+2),l(r,t+4)]:c.ctype==3&&(c.tabs[E]=r[t]);else if(E=="IEND")break;t+=x,i.readUint(r,t),t+=4}if(m!=0){var k=c.frames[c.frames.length-1];k.data=Be.decode._decompress(c,d.slice(0,m),k.rect.width,k.rect.height),m=0}return c.data=Be.decode._decompress(c,p,c.width,c.height),delete c.compress,delete c.interlace,delete c.filter,c},Be.decode._decompress=function(e,r,t,i){var l=Be.decode._getBPP(e),f=Math.ceil(t*l/8),c=new Uint8Array((f+1+e.interlace)*i);return e.tabs.CgBI?r=Be.inflateRaw(r,c):r=Be.decode._inflate(r,c),e.interlace==0?r=Be.decode._filterZero(r,e,0,t,i):e.interlace==1&&(r=Be.decode._readInterlace(r,e)),r},Be.decode._inflate=function(e,r){var t=Be.inflateRaw(new Uint8Array(e.buffer,2,e.length-6),r);return t},Be.inflateRaw=function(){var e={};return e.H={},e.H.N=function(r,t){var i=Uint8Array,l=0,f=0,c=0,p=0,g=0,d=0,m=0,C=0,b=0,x,E;if(r[0]==3&&r[1]==0)return t||new i(0);var k=e.H,D=k.b,A=k.e,T=k.R,S=k.n,O=k.A,B=k.Z,z=k.m,M=t==null;for(M&&(t=new i(r.length>>>2<<3));l==0;){if(l=D(r,b,1),f=D(r,b+1,2),b+=3,f==0){b&7&&(b+=8-(b&7));var U=(b>>>3)+4,V=r[U-4]|r[U-3]<<8;M&&(t=e.H.W(t,C+V)),t.set(new i(r.buffer,r.byteOffset+U,V),C),b=U+V<<3,C+=V;continue}if(M&&(t=e.H.W(t,C+(1<<17))),f==1&&(x=z.J,E=z.h,d=(1<<9)-1,m=(1<<5)-1),f==2){c=A(r,b,5)+257,p=A(r,b+5,5)+1,g=A(r,b+10,4)+4,b+=14;for(var F=1,N=0;N<38;N+=2)z.Q[N]=0,z.Q[N+1]=0;for(var N=0;N<g;N++){var $=A(r,b+N*3,3);z.Q[(z.X[N]<<1)+1]=$,$>F&&(F=$)}b+=3*g,S(z.Q,F),O(z.Q,F,z.u),x=z.w,E=z.d,b=T(z.u,(1<<F)-1,c+p,r,b,z.v);var I=k.V(z.v,0,c,z.C);d=(1<<I)-1;var q=k.V(z.v,c,p,z.D);m=(1<<q)-1,S(z.C,I),O(z.C,I,x),S(z.D,q),O(z.D,q,E)}for(;;){var ee=x[B(r,b)&d];b+=ee&15;var Z=ee>>>4;if(!(Z>>>8))t[C++]=Z;else{if(Z==256)break;var J=C+Z-254;if(Z>264){var Q=z.q[Z-257];J=C+(Q>>>3)+A(r,b,Q&7),b+=Q&7}var ne=E[B(r,b)&m];b+=ne&15;var K=ne>>>4,H=z.c[K],te=(H>>>4)+D(r,b,H&15);for(b+=H&15;C<J;)t[C]=t[C++-te],t[C]=t[C++-te],t[C]=t[C++-te],t[C]=t[C++-te];C=J}}}return t.length==C?t:t.slice(0,C)},e.H.W=function(r,t){var i=r.length;if(t<=i)return r;var l=new Uint8Array(i<<1);return l.set(r,0),l},e.H.R=function(r,t,i,l,f,c){for(var p=e.H.e,g=e.H.Z,d=0;d<i;){var m=r[g(l,f)&t];f+=m&15;var C=m>>>4;if(C<=15)c[d]=C,d++;else{var b=0,x=0;C==16?(x=3+p(l,f,2),f+=2,b=c[d-1]):C==17?(x=3+p(l,f,3),f+=3):C==18&&(x=11+p(l,f,7),f+=7);for(var E=d+x;d<E;)c[d]=b,d++}}return f},e.H.V=function(r,t,i,l){for(var f=0,c=0,p=l.length>>>1;c<i;){var g=r[c+t];l[c<<1]=0,l[(c<<1)+1]=g,g>f&&(f=g),c++}for(;c<p;)l[c<<1]=0,l[(c<<1)+1]=0,c++;return f},e.H.n=function(r,t){for(var i=e.H.m,l=r.length,f,c,p,g,d,m=i.j,g=0;g<=t;g++)m[g]=0;for(g=1;g<l;g+=2)m[r[g]]++;var C=i.K;for(f=0,m[0]=0,c=1;c<=t;c++)f=f+m[c-1]<<1,C[c]=f;for(p=0;p<l;p+=2)d=r[p+1],d!=0&&(r[p]=C[d],C[d]++)},e.H.A=function(r,t,i){for(var l=r.length,f=e.H.m,c=f.r,p=0;p<l;p+=2)if(r[p+1]!=0)for(var g=p>>1,d=r[p+1],m=g<<4|d,C=t-d,b=r[p]<<C,x=b+(1<<C);b!=x;){var E=c[b]>>>15-t;i[E]=m,b++}},e.H.l=function(r,t){for(var i=e.H.m.r,l=15-t,f=0;f<r.length;f+=2){var c=r[f]<<t-r[f+1];r[f]=i[c]>>>l}},e.H.M=function(r,t,i){i=i<<(t&7);var l=t>>>3;r[l]|=i,r[l+1]|=i>>>8},e.H.I=function(r,t,i){i=i<<(t&7);var l=t>>>3;r[l]|=i,r[l+1]|=i>>>8,r[l+2]|=i>>>16},e.H.e=function(r,t,i){return(r[t>>>3]|r[(t>>>3)+1]<<8)>>>(t&7)&(1<<i)-1},e.H.b=function(r,t,i){return(r[t>>>3]|r[(t>>>3)+1]<<8|r[(t>>>3)+2]<<16)>>>(t&7)&(1<<i)-1},e.H.Z=function(r,t){return(r[t>>>3]|r[(t>>>3)+1]<<8|r[(t>>>3)+2]<<16)>>>(t&7)},e.H.i=function(r,t){return(r[t>>>3]|r[(t>>>3)+1]<<8|r[(t>>>3)+2]<<16|r[(t>>>3)+3]<<24)>>>(t&7)},e.H.m=function(){var r=Uint16Array,t=Uint32Array;return{K:new r(16),j:new r(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new r(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new t(32),J:new r(512),_:[],h:new r(32),$:[],w:new r(32768),C:[],v:[],d:new r(32768),D:[],u:new r(512),Q:[],r:new r(1<<15),s:new t(286),Y:new t(30),a:new t(19),t:new t(15e3),k:new r(1<<16),g:new r(1<<15)}}(),function(){for(var r=e.H.m,t=1<<15,i=0;i<t;i++){var l=i;l=(l&2863311530)>>>1|(l&1431655765)<<1,l=(l&3435973836)>>>2|(l&858993459)<<2,l=(l&4042322160)>>>4|(l&252645135)<<4,l=(l&4278255360)>>>8|(l&16711935)<<8,r.r[i]=(l>>>16|l<<16)>>>17}function f(c,p,g){for(;p--!=0;)c.push(0,g)}for(var i=0;i<32;i++)r.q[i]=r.S[i]<<3|r.T[i],r.c[i]=r.p[i]<<4|r.z[i];f(r._,144,8),f(r._,255-143,9),f(r._,279-255,7),f(r._,287-279,8),e.H.n(r._,9),e.H.A(r._,9,r.J),e.H.l(r._,9),f(r.$,32,5),e.H.n(r.$,5),e.H.A(r.$,5,r.h),e.H.l(r.$,5),f(r.Q,19,0),f(r.C,286,0),f(r.D,30,0),f(r.v,320,0)}(),e.H.N}(),Be.decode._readInterlace=function(e,r){for(var t=r.width,i=r.height,l=Be.decode._getBPP(r),f=l>>3,c=Math.ceil(t*l/8),p=new Uint8Array(i*c),g=0,d=[0,0,4,0,2,0,1],m=[0,4,0,2,0,1,0],C=[8,8,8,4,4,2,2],b=[8,8,4,4,2,2,1],x=0;x<7;){for(var E=C[x],k=b[x],D=0,A=0,T=d[x];T<i;)T+=E,A++;for(var S=m[x];S<t;)S+=k,D++;var O=Math.ceil(D*l/8);Be.decode._filterZero(e,r,g,D,A);for(var B=0,z=d[x];z<i;){for(var M=m[x],U=g+B*O<<3;M<t;){if(l==1){var V=e[U>>3];V=V>>7-(U&7)&1,p[z*c+(M>>3)]|=V<<7-((M&7)<<0)}if(l==2){var V=e[U>>3];V=V>>6-(U&7)&3,p[z*c+(M>>2)]|=V<<6-((M&3)<<1)}if(l==4){var V=e[U>>3];V=V>>4-(U&7)&15,p[z*c+(M>>1)]|=V<<4-((M&1)<<2)}if(l>=8)for(var F=z*c+M*f,N=0;N<f;N++)p[F+N]=e[(U>>3)+N];U+=l,M+=k}B++,z+=E}D*A!=0&&(g+=A*(1+O)),x=x+1}return p},Be.decode._getBPP=function(e){var r=[1,null,3,1,2,null,4][e.ctype];return r*e.depth},Be.decode._filterZero=function(e,r,t,i,l){var f=Be.decode._getBPP(r),c=Math.ceil(i*f/8),p=Be.decode._paeth;f=Math.ceil(f/8);var g=0,d=1,m=e[t],C=0;if(m>1&&(e[t]=[0,0,1][m-2]),m==3)for(C=f;C<c;C++)e[C+1]=e[C+1]+(e[C+1-f]>>>1)&255;for(var b=0;b<l;b++)if(g=t+b*c,d=g+b+1,m=e[d-1],C=0,m==0)for(;C<c;C++)e[g+C]=e[d+C];else if(m==1){for(;C<f;C++)e[g+C]=e[d+C];for(;C<c;C++)e[g+C]=e[d+C]+e[g+C-f]}else if(m==2)for(;C<c;C++)e[g+C]=e[d+C]+e[g+C-c];else if(m==3){for(;C<f;C++)e[g+C]=e[d+C]+(e[g+C-c]>>>1);for(;C<c;C++)e[g+C]=e[d+C]+(e[g+C-c]+e[g+C-f]>>>1)}else{for(;C<f;C++)e[g+C]=e[d+C]+p(0,e[g+C-c],0);for(;C<c;C++)e[g+C]=e[d+C]+p(e[g+C-f],e[g+C-c],e[g+C-f-c])}return e},Be.decode._paeth=function(e,r,t){var i=e+r-t,l=i-e,f=i-r,c=i-t;return l*l<=f*f&&l*l<=c*c?e:f*f<=c*c?r:t},Be.decode._IHDR=function(e,r,t){var i=Be._bin;t.width=i.readUint(e,r),r+=4,t.height=i.readUint(e,r),r+=4,t.depth=e[r],r++,t.ctype=e[r],r++,t.compress=e[r],r++,t.filter=e[r],r++,t.interlace=e[r],r++},Be._bin={nextZero:function(e,r){for(;e[r]!=0;)r++;return r},readUshort:function(e,r){return e[r]<<8|e[r+1]},writeUshort:function(e,r,t){e[r]=t>>8&255,e[r+1]=t&255},readUint:function(e,r){return e[r]*(256*256*256)+(e[r+1]<<16|e[r+2]<<8|e[r+3])},writeUint:function(e,r,t){e[r]=t>>24&255,e[r+1]=t>>16&255,e[r+2]=t>>8&255,e[r+3]=t&255},readASCII:function(e,r,t){for(var i="",l=0;l<t;l++)i+=String.fromCharCode(e[r+l]);return i},writeASCII:function(e,r,t){for(var i=0;i<t.length;i++)e[r+i]=t.charCodeAt(i)},readBytes:function(e,r,t){for(var i=[],l=0;l<t;l++)i.push(e[r+l]);return i},pad:function(e){return e.length<2?"0"+e:e},readUTF8:function(e,r,t){for(var i="",l,f=0;f<t;f++)i+="%"+Be._bin.pad(e[r+f].toString(16));try{l=decodeURIComponent(i)}catch{return Be._bin.readASCII(e,r,t)}return l}},Be._copyTile=function(e,r,t,i,l,f,c,p,g){for(var d=Math.min(r,l),m=Math.min(t,f),C=0,b=0,x=0;x<m;x++)for(var E=0;E<d;E++)if(c>=0&&p>=0?(C=x*r+E<<2,b=(p+x)*l+c+E<<2):(C=(-p+x)*r-c+E<<2,b=x*l+E<<2),g==0)i[b]=e[C],i[b+1]=e[C+1],i[b+2]=e[C+2],i[b+3]=e[C+3];else if(g==1){var k=e[C+3]*.00392156862745098,D=e[C]*k,A=e[C+1]*k,T=e[C+2]*k,S=i[b+3]*(1/255),O=i[b]*S,B=i[b+1]*S,z=i[b+2]*S,M=1-k,U=k+S*M,V=U==0?0:1/U;i[b+3]=255*U,i[b+0]=(D+O*M)*V,i[b+1]=(A+B*M)*V,i[b+2]=(T+z*M)*V}else if(g==2){var k=e[C+3],D=e[C],A=e[C+1],T=e[C+2],S=i[b+3],O=i[b],B=i[b+1],z=i[b+2];k==S&&D==O&&A==B&&T==z?(i[b]=0,i[b+1]=0,i[b+2]=0,i[b+3]=0):(i[b]=D,i[b+1]=A,i[b+2]=T,i[b+3]=k)}else if(g==3){var k=e[C+3],D=e[C],A=e[C+1],T=e[C+2],S=i[b+3],O=i[b],B=i[b+1],z=i[b+2];if(k==S&&D==O&&A==B&&T==z)continue;if(k<220&&S>20)return!1}return!0},Be.encode=function(e,r,t,i,l,f,c){i==null&&(i=0),c==null&&(c=!1);var p=Be.encode.compress(e,r,t,i,[!1,!1,!1,0,c]);return Be.encode.compressPNG(p,-1),Be.encode._main(p,r,t,l,f)},Be.encodeLL=function(e,r,t,i,l,f,c,p){for(var g={ctype:0+(i==1?0:2)+(l==0?0:4),depth:f,frames:[]},d=(i+l)*f,m=d*r,C=0;C<e.length;C++)g.frames.push({rect:{x:0,y:0,width:r,height:t},img:new Uint8Array(e[C]),blend:0,dispose:1,bpp:Math.ceil(d/8),bpl:Math.ceil(m/8)});Be.encode.compressPNG(g,0,!0);var b=Be.encode._main(g,r,t,c,p);return b},Be.encode._main=function(e,r,t,i,l){l==null&&(l={});var f=Be.crc.crc,c=Be._bin.writeUint,p=Be._bin.writeUshort,g=Be._bin.writeASCII,d=8,m=e.frames.length>1,C=!1,b=8+(16+5+4)+(m?20:0);if(l.sRGB!=null&&(b+=8+1+4),l.pHYs!=null&&(b+=8+9+4),e.ctype==3){for(var x=e.plte.length,E=0;E<x;E++)e.plte[E]>>>24!=255&&(C=!0);b+=8+x*3+4+(C?8+x*1+4:0)}for(var k=0;k<e.frames.length;k++){var D=e.frames[k];m&&(b+=38),b+=D.cimg.length+12,k!=0&&(b+=4)}b+=12;for(var A=new Uint8Array(b),T=[137,80,78,71,13,10,26,10],E=0;E<8;E++)A[E]=T[E];if(c(A,d,13),d+=4,g(A,d,"IHDR"),d+=4,c(A,d,r),d+=4,c(A,d,t),d+=4,A[d]=e.depth,d++,A[d]=e.ctype,d++,A[d]=0,d++,A[d]=0,d++,A[d]=0,d++,c(A,d,f(A,d-17,17)),d+=4,l.sRGB!=null&&(c(A,d,1),d+=4,g(A,d,"sRGB"),d+=4,A[d]=l.sRGB,d++,c(A,d,f(A,d-5,5)),d+=4),l.pHYs!=null&&(c(A,d,9),d+=4,g(A,d,"pHYs"),d+=4,c(A,d,l.pHYs[0]),d+=4,c(A,d,l.pHYs[1]),d+=4,A[d]=l.pHYs[2],d++,c(A,d,f(A,d-13,13)),d+=4),m&&(c(A,d,8),d+=4,g(A,d,"acTL"),d+=4,c(A,d,e.frames.length),d+=4,c(A,d,l.loop!=null?l.loop:0),d+=4,c(A,d,f(A,d-12,12)),d+=4),e.ctype==3){var x=e.plte.length;c(A,d,x*3),d+=4,g(A,d,"PLTE"),d+=4;for(var E=0;E<x;E++){var S=E*3,O=e.plte[E],B=O&255,z=O>>>8&255,M=O>>>16&255;A[d+S+0]=B,A[d+S+1]=z,A[d+S+2]=M}if(d+=x*3,c(A,d,f(A,d-x*3-4,x*3+4)),d+=4,C){c(A,d,x),d+=4,g(A,d,"tRNS"),d+=4;for(var E=0;E<x;E++)A[d+E]=e.plte[E]>>>24&255;d+=x,c(A,d,f(A,d-x-4,x+4)),d+=4}}for(var U=0,k=0;k<e.frames.length;k++){var D=e.frames[k];m&&(c(A,d,26),d+=4,g(A,d,"fcTL"),d+=4,c(A,d,U++),d+=4,c(A,d,D.rect.width),d+=4,c(A,d,D.rect.height),d+=4,c(A,d,D.rect.x),d+=4,c(A,d,D.rect.y),d+=4,p(A,d,i[k]),d+=2,p(A,d,1e3),d+=2,A[d]=D.dispose,d++,A[d]=D.blend,d++,c(A,d,f(A,d-30,30)),d+=4);var V=D.cimg,x=V.length;c(A,d,x+(k==0?0:4)),d+=4;var F=d;g(A,d,k==0?"IDAT":"fdAT"),d+=4,k!=0&&(c(A,d,U++),d+=4),A.set(V,d),d+=x,c(A,d,f(A,F,d-F)),d+=4}return c(A,d,0),d+=4,g(A,d,"IEND"),d+=4,c(A,d,f(A,d-4,4)),d+=4,A.buffer},Be.encode.compressPNG=function(e,r,t){for(var i=0;i<e.frames.length;i++){var l=e.frames[i];l.rect.width;var f=l.rect.height,c=new Uint8Array(f*l.bpl+f);l.cimg=Be.encode._filterZero(l.img,f,l.bpp,l.bpl,c,r,t)}},Be.encode.compress=function(e,r,t,i,l){for(var f=l[0],c=l[1],p=l[2],g=l[3],d=l[4],m=6,C=8,b=255,x=0;x<e.length;x++)for(var E=new Uint8Array(e[x]),k=E.length,D=0;D<k;D+=4)b&=E[D+3];var A=b!=255,T=Be.encode.framize(e,r,t,f,c,p),S={},O=[],B=[];if(i!=0){for(var z=[],D=0;D<T.length;D++)z.push(T[D].img.buffer);for(var M=Be.encode.concatRGBA(z),U=Be.quantize(M,i),V=0,F=new Uint8Array(U.abuf),D=0;D<T.length;D++){var N=T[D].img,$=N.length;B.push(new Uint8Array(U.inds.buffer,V>>2,$>>2));for(var x=0;x<$;x+=4)N[x]=F[V+x],N[x+1]=F[V+x+1],N[x+2]=F[V+x+2],N[x+3]=F[V+x+3];V+=$}for(var D=0;D<U.plte.length;D++)O.push(U.plte[D].est.rgba)}else for(var x=0;x<T.length;x++){var I=T[x],q=new Uint32Array(I.img.buffer),ee=I.rect.width,k=q.length,Z=new Uint8Array(k);B.push(Z);for(var D=0;D<k;D++){var J=q[D];if(D!=0&&J==q[D-1])Z[D]=Z[D-1];else if(D>ee&&J==q[D-ee])Z[D]=Z[D-ee];else{var Q=S[J];if(Q==null&&(S[J]=Q=O.length,O.push(J),O.length>=300))break;Z[D]=Q}}}var ne=O.length;ne<=256&&d==!1&&(ne<=2?C=1:ne<=4?C=2:ne<=16?C=4:C=8,C=Math.max(C,g));for(var x=0;x<T.length;x++){var I=T[x];I.rect.x,I.rect.y;var ee=I.rect.width,K=I.rect.height,H=I.img;new Uint32Array(H.buffer);var te=4*ee,ae=4;if(ne<=256&&d==!1){te=Math.ceil(C*ee/8);for(var ie=new Uint8Array(te*K),pe=B[x],be=0;be<K;be++){var D=be*te,me=be*ee;if(C==8)for(var ce=0;ce<ee;ce++)ie[D+ce]=pe[me+ce];else if(C==4)for(var ce=0;ce<ee;ce++)ie[D+(ce>>1)]|=pe[me+ce]<<4-(ce&1)*4;else if(C==2)for(var ce=0;ce<ee;ce++)ie[D+(ce>>2)]|=pe[me+ce]<<6-(ce&3)*2;else if(C==1)for(var ce=0;ce<ee;ce++)ie[D+(ce>>3)]|=pe[me+ce]<<7-(ce&7)*1}H=ie,m=3,ae=1}else if(A==!1&&T.length==1){for(var ie=new Uint8Array(ee*K*3),Oe=ee*K,D=0;D<Oe;D++){var N=D*3,Ne=D*4;ie[N]=H[Ne],ie[N+1]=H[Ne+1],ie[N+2]=H[Ne+2]}H=ie,m=2,ae=3,te=3*ee}I.img=H,I.bpl=te,I.bpp=ae}return{ctype:m,depth:C,plte:O,frames:T}},Be.encode.framize=function(e,r,t,i,l,f){for(var c=[],p=0;p<e.length;p++){var g=new Uint8Array(e[p]),d=new Uint32Array(g.buffer),m,C=0,b=0,x=r,E=t,k=i?1:0;if(p!=0){for(var D=f||i||p==1||c[p-2].dispose!=0?1:2,A=0,T=1e9,S=0;S<D;S++){for(var I=new Uint8Array(e[p-1-S]),O=new Uint32Array(e[p-1-S]),B=r,z=t,M=-1,U=-1,V=0;V<t;V++)for(var F=0;F<r;F++){var N=V*r+F;d[N]!=O[N]&&(F<B&&(B=F),F>M&&(M=F),V<z&&(z=V),V>U&&(U=V))}M==-1&&(B=z=M=U=0),l&&((B&1)==1&&B--,(z&1)==1&&z--);var $=(M-B+1)*(U-z+1);$<T&&(T=$,A=S,C=B,b=z,x=M-B+1,E=U-z+1)}var I=new Uint8Array(e[p-1-A]);A==1&&(c[p-1].dispose=2),m=new Uint8Array(x*E*4),Be._copyTile(I,r,t,m,x,E,-C,-b,0),k=Be._copyTile(g,r,t,m,x,E,-C,-b,3)?1:0,k==1?Be.encode._prepareDiff(g,r,t,m,{x:C,y:b,width:x,height:E}):Be._copyTile(g,r,t,m,x,E,-C,-b,0)}else m=g.slice(0);c.push({rect:{x:C,y:b,width:x,height:E},img:m,blend:k,dispose:0})}if(i)for(var p=0;p<c.length;p++){var q=c[p];if(q.blend!=1){var ee=q.rect,Z=c[p-1].rect,J=Math.min(ee.x,Z.x),Q=Math.min(ee.y,Z.y),ne=Math.max(ee.x+ee.width,Z.x+Z.width),K=Math.max(ee.y+ee.height,Z.y+Z.height),H={x:J,y:Q,width:ne-J,height:K-Q};c[p-1].dispose=1,p-1!=0&&Be.encode._updateFrame(e,r,t,c,p-1,H,l),Be.encode._updateFrame(e,r,t,c,p,H,l)}}var te=0;if(e.length!=1)for(var N=0;N<c.length;N++){var q=c[N];te+=q.rect.width*q.rect.height}return c},Be.encode._updateFrame=function(e,r,t,i,l,f,c){for(var p=Uint8Array,g=Uint32Array,d=new p(e[l-1]),m=new g(e[l-1]),C=l+1<e.length?new p(e[l+1]):null,b=new p(e[l]),x=new g(b.buffer),E=r,k=t,D=-1,A=-1,T=0;T<f.height;T++)for(var S=0;S<f.width;S++){var O=f.x+S,B=f.y+T,z=B*r+O,M=x[z];M==0||i[l-1].dispose==0&&m[z]==M&&(C==null||C[z*4+3]!=0)||(O<E&&(E=O),O>D&&(D=O),B<k&&(k=B),B>A&&(A=B))}D==-1&&(E=k=D=A=0),c&&((E&1)==1&&E--,(k&1)==1&&k--),f={x:E,y:k,width:D-E+1,height:A-k+1};var U=i[l];U.rect=f,U.blend=1,U.img=new Uint8Array(f.width*f.height*4),i[l-1].dispose==0?(Be._copyTile(d,r,t,U.img,f.width,f.height,-f.x,-f.y,0),Be.encode._prepareDiff(b,r,t,U.img,f)):Be._copyTile(b,r,t,U.img,f.width,f.height,-f.x,-f.y,0)},Be.encode._prepareDiff=function(e,r,t,i,l){Be._copyTile(e,r,t,i,l.width,l.height,-l.x,-l.y,2)},Be.encode._filterZero=function(e,r,t,i,l,f,c){var p=[],g=[0,1,2,3,4];f!=-1?g=[f]:(r*i>5e5||t==1)&&(g=[0]);var d;c&&(d={level:0});for(var m=l.length>1e7&&UZIP!=null?UZIP:dP,C=0;C<g.length;C++){for(var b=0;b<r;b++)Be.encode._filterLine(l,e,b,i,t,g[C]);p.push(m.deflate(l,d))}for(var x,E=1e9,C=0;C<p.length;C++)p[C].length<E&&(x=C,E=p[C].length);return p[x]},Be.encode._filterLine=function(e,r,t,i,l,f){var c=t*i,p=c+t,g=Be.decode._paeth;if(e[p]=f,p++,f==0)if(i<500)for(var d=0;d<i;d++)e[p+d]=r[c+d];else e.set(new Uint8Array(r.buffer,c,i),p);else if(f==1){for(var d=0;d<l;d++)e[p+d]=r[c+d];for(var d=l;d<i;d++)e[p+d]=r[c+d]-r[c+d-l]+256&255}else if(t==0){for(var d=0;d<l;d++)e[p+d]=r[c+d];if(f==2)for(var d=l;d<i;d++)e[p+d]=r[c+d];if(f==3)for(var d=l;d<i;d++)e[p+d]=r[c+d]-(r[c+d-l]>>1)+256&255;if(f==4)for(var d=l;d<i;d++)e[p+d]=r[c+d]-g(r[c+d-l],0,0)+256&255}else{if(f==2)for(var d=0;d<i;d++)e[p+d]=r[c+d]+256-r[c+d-i]&255;if(f==3){for(var d=0;d<l;d++)e[p+d]=r[c+d]+256-(r[c+d-i]>>1)&255;for(var d=l;d<i;d++)e[p+d]=r[c+d]+256-(r[c+d-i]+r[c+d-l]>>1)&255}if(f==4){for(var d=0;d<l;d++)e[p+d]=r[c+d]+256-g(0,r[c+d-i],0)&255;for(var d=l;d<i;d++)e[p+d]=r[c+d]+256-g(r[c+d-l],r[c+d-i],r[c+d-l-i])&255}}},Be.crc={table:function(){for(var e=new Uint32Array(256),r=0;r<256;r++){for(var t=r,i=0;i<8;i++)t&1?t=3988292384^t>>>1:t=t>>>1;e[r]=t}return e}(),update:function(e,r,t,i){for(var l=0;l<i;l++)e=Be.crc.table[(e^r[t+l])&255]^e>>>8;return e},crc:function(e,r,t){return Be.crc.update(4294967295,e,r,t)^4294967295}},Be.quantize=function(e,r){var t=new Uint8Array(e),i=t.slice(0),l=new Uint32Array(i.buffer),f=Be.quantize.getKDtree(i,r),c=f[0],p=f[1],g=Be.quantize.planeDst,d=t,m=l,C=d.length,b=new Uint8Array(t.length>>2),x;if(t.length<2e7)for(var E=0;E<C;E+=4){var k=d[E]*.00392156862745098,D=d[E+1]*(1/255),A=d[E+2]*(1/255),T=d[E+3]*(1/255);x=Be.quantize.getNearest(c,k,D,A,T),b[E>>2]=x.ind,m[E>>2]=x.est.rgba}else for(var E=0;E<C;E+=4){var k=d[E]*.00392156862745098,D=d[E+1]*(1/255),A=d[E+2]*(1/255),T=d[E+3]*(1/255);for(x=c;x.left;)x=g(x.est,k,D,A,T)<=0?x.left:x.right;b[E>>2]=x.ind,m[E>>2]=x.est.rgba}return{abuf:i.buffer,inds:b,plte:p}},Be.quantize.getKDtree=function(e,r,t){t==null&&(t=1e-4);var i=new Uint32Array(e.buffer),l={i0:0,i1:e.length,bst:null,est:null,tdst:0,left:null,right:null};l.bst=Be.quantize.stats(e,l.i0,l.i1),l.est=Be.quantize.estats(l.bst);for(var f=[l];f.length<r;){for(var c=0,p=0,g=0;g<f.length;g++)f[g].est.L>c&&(c=f[g].est.L,p=g);if(c<t)break;var d=f[p],m=Be.quantize.splitPixels(e,i,d.i0,d.i1,d.est.e,d.est.eMq255),C=d.i0>=m||d.i1<=m;if(C){d.est.L=0;continue}var b={i0:d.i0,i1:m,bst:null,est:null,tdst:0,left:null,right:null};b.bst=Be.quantize.stats(e,b.i0,b.i1),b.est=Be.quantize.estats(b.bst);var x={i0:m,i1:d.i1,bst:null,est:null,tdst:0,left:null,right:null};x.bst={R:[],m:[],N:d.bst.N-b.bst.N};for(var g=0;g<16;g++)x.bst.R[g]=d.bst.R[g]-b.bst.R[g];for(var g=0;g<4;g++)x.bst.m[g]=d.bst.m[g]-b.bst.m[g];x.est=Be.quantize.estats(x.bst),d.left=b,d.right=x,f[p]=b,f.push(x)}f.sort(function(E,k){return k.bst.N-E.bst.N});for(var g=0;g<f.length;g++)f[g].ind=g;return[l,f]},Be.quantize.getNearest=function(e,r,t,i,l){if(e.left==null)return e.tdst=Be.quantize.dist(e.est.q,r,t,i,l),e;var f=Be.quantize.planeDst(e.est,r,t,i,l),c=e.left,p=e.right;f>0&&(c=e.right,p=e.left);var g=Be.quantize.getNearest(c,r,t,i,l);if(g.tdst<=f*f)return g;var d=Be.quantize.getNearest(p,r,t,i,l);return d.tdst<g.tdst?d:g},Be.quantize.planeDst=function(e,r,t,i,l){var f=e.e;return f[0]*r+f[1]*t+f[2]*i+f[3]*l-e.eMq},Be.quantize.dist=function(e,r,t,i,l){var f=r-e[0],c=t-e[1],p=i-e[2],g=l-e[3];return f*f+c*c+p*p+g*g},Be.quantize.splitPixels=function(e,r,t,i,l,f){var c=Be.quantize.vecDot;for(i-=4;t<i;){for(;c(e,t,l)<=f;)t+=4;for(;c(e,i,l)>f;)i-=4;if(t>=i)break;var p=r[t>>2];r[t>>2]=r[i>>2],r[i>>2]=p,t+=4,i-=4}for(;c(e,t,l)>f;)t-=4;return t+4},Be.quantize.vecDot=function(e,r,t){return e[r]*t[0]+e[r+1]*t[1]+e[r+2]*t[2]+e[r+3]*t[3]},Be.quantize.stats=function(e,r,t){for(var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],l=[0,0,0,0],f=t-r>>2,c=r;c<t;c+=4){var p=e[c]*.00392156862745098,g=e[c+1]*(1/255),d=e[c+2]*(1/255),m=e[c+3]*(1/255);l[0]+=p,l[1]+=g,l[2]+=d,l[3]+=m,i[0]+=p*p,i[1]+=p*g,i[2]+=p*d,i[3]+=p*m,i[5]+=g*g,i[6]+=g*d,i[7]+=g*m,i[10]+=d*d,i[11]+=d*m,i[15]+=m*m}return i[4]=i[1],i[8]=i[2],i[9]=i[6],i[12]=i[3],i[13]=i[7],i[14]=i[11],{R:i,m:l,N:f}},Be.quantize.estats=function(e){var r=e.R,t=e.m,i=e.N,l=t[0],f=t[1],c=t[2],p=t[3],g=i==0?0:1/i,d=[r[0]-l*l*g,r[1]-l*f*g,r[2]-l*c*g,r[3]-l*p*g,r[4]-f*l*g,r[5]-f*f*g,r[6]-f*c*g,r[7]-f*p*g,r[8]-c*l*g,r[9]-c*f*g,r[10]-c*c*g,r[11]-c*p*g,r[12]-p*l*g,r[13]-p*f*g,r[14]-p*c*g,r[15]-p*p*g],m=d,C=Be.M4,b=[Math.random(),Math.random(),Math.random(),Math.random()],x=0,E=0;if(i!=0)for(var k=0;k<16&&(b=C.multVec(m,b),E=Math.sqrt(C.dot(b,b)),b=C.sml(1/E,b),!(k!=0&&Math.abs(E-x)<1e-9));k++)x=E;var D=[l*g,f*g,c*g,p*g],A=C.dot(C.sml(255,D),b);return{Cov:d,q:D,e:b,L:x,eMq255:A,eMq:C.dot(b,D),rgba:(Math.round(255*D[3])<<24|Math.round(255*D[2])<<16|Math.round(255*D[1])<<8|Math.round(255*D[0])<<0)>>>0}},Be.M4={multVec:function(e,r){return[e[0]*r[0]+e[1]*r[1]+e[2]*r[2]+e[3]*r[3],e[4]*r[0]+e[5]*r[1]+e[6]*r[2]+e[7]*r[3],e[8]*r[0]+e[9]*r[1]+e[10]*r[2]+e[11]*r[3],e[12]*r[0]+e[13]*r[1]+e[14]*r[2]+e[15]*r[3]]},dot:function(e,r){return e[0]*r[0]+e[1]*r[1]+e[2]*r[2]+e[3]*r[3]},sml:function(e,r){return[e*r[0],e*r[1],e*r[2],e*r[3]]}},Be.encode.concatRGBA=function(e){for(var r=0,t=0;t<e.length;t++)r+=e[t].byteLength;for(var i=new Uint8Array(r),l=0,t=0;t<e.length;t++){for(var f=new Uint8Array(e[t]),c=f.length,p=0;p<c;p+=4){var g=f[p],d=f[p+1],m=f[p+2],C=f[p+3];C==0&&(g=d=m=0),i[l+p]=g,i[l+p+1]=d,i[l+p+2]=m,i[l+p+3]=C}l+=c}return i.buffer};const hP=e=>new Promise((r,t)=>{const i=new FileReader;i.onloadend=l=>r(l.target.result),i.onerror=l=>t(l),i.readAsDataURL(e)}),pP=e=>new Promise((r,t)=>{const i=new Image;i.onload=()=>r(i),i.onerror=l=>t(l),i.src=e}),vP=(e,r,t)=>new Promise(i=>e.toBlob(l=>i(l),r,t)),mP=e=>{const i=e.width,l=e.height;let f=e.width,c=e.height;return(i>2e3||l>2e3)&&(i/l>2e3/2e3?(f=2e3,c=Math.round(2e3*(l/i))):(c=2e3,f=Math.round(2e3*(i/l)))),{width:f,height:c}},gP=e=>{let r=0;return e>1||e<0?r=0:r=e?e*256:0,r},n6=async(e,r=.5,t=5)=>{const i=e.name;if(e.size/1024/1024<t)return e;try{const l=document.createElement("canvas"),f=l.getContext("2d"),c=await hP(e),p=await pP(c),g=mP(p);if(l.width=g.width,l.height=g.height,f.clearRect(0,0,g.width,g.height),f.drawImage(p,0,0,g.width,g.height),["image/jpeg","image/jpg"].includes(e.type)){const d=await vP(l,e.type,r);return new File([d],i,{type:e.type})}else{const d=f.getImageData(0,0,g.width,g.height).data,m=gP(r),C=Be.encode([d.buffer],g.width,g.height,m);return new File([C],e.name,{type:e.type})}}catch{return e}},r6=[Jf.jpeg,Jf.jpg,Jf.png],a6=e=>{const{maxCount:r=1,listType:t="picture-card",fileList:i=[],maxSize:l=2,accept:f=r6.join(","),uploadBtnName:c="上传",uploadHint:p=null,compression:g}=e,[d,m]=G.useState(!1),[C,b]=G.useState(""),x=()=>t!=="text"?Pe("div",{style:{position:"relative"},children:[Pe("div",{children:[W(Fb,{}),W("div",{style:{marginTop:8},children:c})]}),p]}):Pe(tn,{children:[W(ve.Button,{icon:W(Nb,{}),children:c}),p]}),E=T=>new Promise(async(O,B)=>{const z=f.split(","),M=fg(T.name)||"";if(f&&!z.includes(M)&&(ve.message.error(`只允许上传 ${f} 文件`),B(!1)),!(T.size/1024/1024<l)&&!g&&(ve.message.error(`文件必须小于${l}MB`),B(!1)),g){let V=0;async function F($){if(!g)return;const I=await n6($,g.quality,g.limit);if(V++,V>=5)return I;if(I.size/1024/1024>l)await F(I);else return I}const N=await F(T);O(N)}O(T)}).catch(O=>ve.Upload.LIST_IGNORE),k=T=>{e.onChange&&e.onChange(T)},D=T=>{e.onPreview?e.onPreview(T):A(T)},A=async T=>{let S=fg(T.name)||"";if(S||(S=fg(T.name||T.url)||""),S===Jf.pdf)return ve.Modal.info({title:"PDF",width:"60%",content:W("iframe",{title:"PDF预览",src:T.url||T.response.url,frameBorder:"0",style:{width:"100%",height:"70vh"}}),okText:"关闭"});r6.includes(S)&&(!T.url&&!T.thumbUrl&&!T.preview&&(T.preview=await N8(T.originFileObj)),b(T.url||T.thumbUrl||T.preview),m(!0))};return Pe(tn,{children:[W(ve.Upload,{beforeUpload:E,onChange:k,listType:t,...e,onPreview:D,children:i.length>=r?null:x()}),W(ve.Image,{style:{display:"none"},preview:{visible:d,src:C,onVisibleChange:()=>{m(!1),b("")}}})]})},Eg={fieldModal:"create-form-module_fieldModal_8bf3d",content:"create-form-module_content_61f84",suffix:"create-form-module_suffix_42205",placeholder:"create-form-module_placeholder_90d6a"},yP={labelCol:{span:4},wrapperCol:{span:20}},i6=e=>{switch(e){case"upload":return"fileList";case"switch":return"checked";default:return"value"}},g2=e=>{const{items:r,rowProps:t,formProps:i,readonly:l=!1,hiddenTitle:f=!1,langId:c="10001"}=e,p=(m,C)=>{var b,x;if(C.btnType==="submit"){(b=i==null?void 0:i.form)==null||b.validateFields().then(E=>{C.onClick&&C.onClick(E)});return}if(C.btnType==="reset"){(x=i==null?void 0:i.form)==null||x.resetFields(),C.onClick&&C.onClick(m);return}C.btnType==="cancel"&&C.onClick&&C.onClick(m)},g=m=>Array.isArray(m)?m:m&&m.fileList,d=m=>{var b;const C=i==null?void 0:i.initialValues;return m.dataIndex?((b=m.render)==null?void 0:b.call(m,C==null?void 0:C[m.dataIndex],C))||m.value||(C==null?void 0:C[m.dataIndex]):""};return W(ve.Form,{layout:"horizontal",form:i==null?void 0:i.form,...yP,...i||{},children:W(ve.Row,{gutter:16,...t,children:r.filter(m=>!m.hidden).map((m,C)=>W(ve.Col,{...m.colProps||{span:24},children:W(ve.Form.Item,{...m.valueType==="upload"?{getValueFromEvent:g}:{},label:f?"":m.title,name:m.valueType==="btns"?void 0:m.dataIndex,...m.formItemProps,children:m.readonly?W("div",{children:d(m)}):m.readonly===void 0&&l?W("div",{children:d(m)}):W(o6,{onChange:b=>{var x;return(x=m==null?void 0:m.onChange)==null?void 0:x.call(m,b)},valueType:m.valueType,onBtnClick:p,valueProps:m.valueProps,formItemProps:m.formItemProps,langId:c})})},m.dataIndex||C))})})},o6=e=>{const{valueType:r,valueProps:t,value:i,onChange:l,onBtnClick:f,inputRef:c,formItemProps:p,langId:g}=e,d=G.useMemo(()=>{let m=W(ve.Input,{placeholder:g==="10001"?"请输入":"Please input",allowClear:!0,...t});switch(r){case"rate":m=W(ve.Rate,{...t});break;case"password":m=W(ve.Input.Password,{...t});break;case"modal":m=W(xP,{...t});break;case"checkbox":m=W(ve.Checkbox.Group,{...t});break;case"select":m=W(ve.Select,{placeholder:g==="10001"?"请选择":"Please select",allowClear:!0,...t});break;case"inputNumber":m=W(ve.InputNumber,{style:{width:"100%"},placeholder:g==="10001"?"请输入":"Please input",...t});break;case"textarea":m=W(ve.Input.TextArea,{placeholder:g==="10001"?"请输入":"Please input",allowClear:!0,...t});break;case"radio":m=W(ve.Radio.Group,{...t});break;case"switch":m=W(ve.Switch,{...t});break;case"datePicker":m=W(ve.DatePicker,{style:{width:"100%"},allowClear:!0,...t});break;case"rangePicker":m=W(ve.DatePicker.RangePicker,{style:{width:"100%"},allowClear:!0,...t});break;case"timePicker":m=W(ve.TimePicker,{style:{width:"100%"},allowClear:!0,...t});break;case"cascader":m=W(ve.Cascader,{allowClear:!0,...t});break;case"upload":m=W(a6,{...t});break;case"btns":m=W(ve.Space,{children:t==null?void 0:t.map(C=>G.createElement(ve.Button,{type:C.btnType==="submit"?"primary":"default",...Js.omit(C,["btnType"]),key:C.key||C.btnType,onClick:b=>{f==null||f(b,C)}},C.title||C.children))});break}return m},[r,t,l,i]);if(r==="custom"){const m=t;return G.cloneElement(m.children,{[(p==null?void 0:p.valuePropName)||i6(r||"input")]:i,onChange:l,ref:c})}return G.cloneElement(d,{[i6(r||"input")]:i,onChange:l,ref:c})},xP=e=>{const{placeholder:r,labelKey:t,onToggle:i,value:l,onClear:f,className:c,style:p}=e;return Pe("div",{className:[Eg.fieldModal,c].filter(g=>g).join(" "),style:p,children:[W("div",{className:Eg.content,onClick:()=>i(!0),children:l?W("span",{children:l[t]}):W("span",{className:Eg.placeholder,children:r})}),W("span",{className:Eg.suffix,onClick:f,children:l&&W(b7,{})})]})};var y2={exports:{}},$h={},Sg={exports:{}},l6={},Ct={exports:{}},x2={exports:{}},gn={};var s6;function bP(){if(s6)return gn;s6=1;var e=typeof Symbol=="function"&&Symbol.for,r=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,l=e?Symbol.for("react.strict_mode"):60108,f=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,p=e?Symbol.for("react.context"):60110,g=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,C=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,x=e?Symbol.for("react.memo"):60115,E=e?Symbol.for("react.lazy"):60116,k=e?Symbol.for("react.block"):60121,D=e?Symbol.for("react.fundamental"):60117,A=e?Symbol.for("react.responder"):60118,T=e?Symbol.for("react.scope"):60119;function S(B){if(typeof B=="object"&&B!==null){var z=B.$$typeof;switch(z){case r:switch(B=B.type,B){case g:case d:case i:case f:case l:case C:return B;default:switch(B=B&&B.$$typeof,B){case p:case m:case E:case x:case c:return B;default:return z}}case t:return z}}}function O(B){return S(B)===d}return gn.AsyncMode=g,gn.ConcurrentMode=d,gn.ContextConsumer=p,gn.ContextProvider=c,gn.Element=r,gn.ForwardRef=m,gn.Fragment=i,gn.Lazy=E,gn.Memo=x,gn.Portal=t,gn.Profiler=f,gn.StrictMode=l,gn.Suspense=C,gn.isAsyncMode=function(B){return O(B)||S(B)===g},gn.isConcurrentMode=O,gn.isContextConsumer=function(B){return S(B)===p},gn.isContextProvider=function(B){return S(B)===c},gn.isElement=function(B){return typeof B=="object"&&B!==null&&B.$$typeof===r},gn.isForwardRef=function(B){return S(B)===m},gn.isFragment=function(B){return S(B)===i},gn.isLazy=function(B){return S(B)===E},gn.isMemo=function(B){return S(B)===x},gn.isPortal=function(B){return S(B)===t},gn.isProfiler=function(B){return S(B)===f},gn.isStrictMode=function(B){return S(B)===l},gn.isSuspense=function(B){return S(B)===C},gn.isValidElementType=function(B){return typeof B=="string"||typeof B=="function"||B===i||B===d||B===f||B===l||B===C||B===b||typeof B=="object"&&B!==null&&(B.$$typeof===E||B.$$typeof===x||B.$$typeof===c||B.$$typeof===p||B.$$typeof===m||B.$$typeof===D||B.$$typeof===A||B.$$typeof===T||B.$$typeof===k)},gn.typeOf=S,gn}var yn={};var u6;function CP(){return u6||(u6=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,r=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,l=e?Symbol.for("react.strict_mode"):60108,f=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,p=e?Symbol.for("react.context"):60110,g=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,C=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,x=e?Symbol.for("react.memo"):60115,E=e?Symbol.for("react.lazy"):60116,k=e?Symbol.for("react.block"):60121,D=e?Symbol.for("react.fundamental"):60117,A=e?Symbol.for("react.responder"):60118,T=e?Symbol.for("react.scope"):60119;function S(Se){return typeof Se=="string"||typeof Se=="function"||Se===i||Se===d||Se===f||Se===l||Se===C||Se===b||typeof Se=="object"&&Se!==null&&(Se.$$typeof===E||Se.$$typeof===x||Se.$$typeof===c||Se.$$typeof===p||Se.$$typeof===m||Se.$$typeof===D||Se.$$typeof===A||Se.$$typeof===T||Se.$$typeof===k)}function O(Se){if(typeof Se=="object"&&Se!==null){var it=Se.$$typeof;switch(it){case r:var He=Se.type;switch(He){case g:case d:case i:case f:case l:case C:return He;default:var gt=He&&He.$$typeof;switch(gt){case p:case m:case E:case x:case c:return gt;default:return it}}case t:return it}}}var B=g,z=d,M=p,U=c,V=r,F=m,N=i,$=E,I=x,q=t,ee=f,Z=l,J=C,Q=!1;function ne(Se){return Q||(Q=!0),K(Se)||O(Se)===g}function K(Se){return O(Se)===d}function H(Se){return O(Se)===p}function te(Se){return O(Se)===c}function ae(Se){return typeof Se=="object"&&Se!==null&&Se.$$typeof===r}function ie(Se){return O(Se)===m}function pe(Se){return O(Se)===i}function be(Se){return O(Se)===E}function me(Se){return O(Se)===x}function ce(Se){return O(Se)===t}function Oe(Se){return O(Se)===f}function Ne(Se){return O(Se)===l}function tt(Se){return O(Se)===C}yn.AsyncMode=B,yn.ConcurrentMode=z,yn.ContextConsumer=M,yn.ContextProvider=U,yn.Element=V,yn.ForwardRef=F,yn.Fragment=N,yn.Lazy=$,yn.Memo=I,yn.Portal=q,yn.Profiler=ee,yn.StrictMode=Z,yn.Suspense=J,yn.isAsyncMode=ne,yn.isConcurrentMode=K,yn.isContextConsumer=H,yn.isContextProvider=te,yn.isElement=ae,yn.isForwardRef=ie,yn.isFragment=pe,yn.isLazy=be,yn.isMemo=me,yn.isPortal=ce,yn.isProfiler=Oe,yn.isStrictMode=Ne,yn.isSuspense=tt,yn.isValidElementType=S,yn.typeOf=O}()),yn}var c6;function f6(){return c6||(c6=1,function(e){process.env.NODE_ENV==="production"?e.exports=bP():e.exports=CP()}(x2)),x2.exports}var b2,d6;function wP(){if(d6)return b2;d6=1;var e=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function i(f){if(f==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(f)}function l(){try{if(!Object.assign)return!1;var f=new String("abc");if(f[5]="de",Object.getOwnPropertyNames(f)[0]==="5")return!1;for(var c={},p=0;p<10;p++)c["_"+String.fromCharCode(p)]=p;var g=Object.getOwnPropertyNames(c).map(function(m){return c[m]});if(g.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(m){d[m]=m}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return b2=l()?Object.assign:function(f,c){for(var p,g=i(f),d,m=1;m<arguments.length;m++){p=Object(arguments[m]);for(var C in p)r.call(p,C)&&(g[C]=p[C]);if(e){d=e(p);for(var b=0;b<d.length;b++)t.call(p,d[b])&&(g[d[b]]=p[d[b]])}}return g},b2}var C2,h6;function w2(){if(h6)return C2;h6=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return C2=e,C2}var _2,p6;function v6(){return p6||(p6=1,_2=Function.call.bind(Object.prototype.hasOwnProperty)),_2}var E2,m6;function _P(){if(m6)return E2;m6=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var r=w2(),t={},i=v6();e=function(f){var c="Warning: "+f;try{throw new Error(c)}catch{}}}function l(f,c,p,g,d){if(process.env.NODE_ENV!=="production"){for(var m in f)if(i(f,m)){var C;try{if(typeof f[m]!="function"){var b=Error((g||"React class")+": "+p+" type `"+m+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof f[m]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw b.name="Invariant Violation",b}C=f[m](c,m,g,p,null,r)}catch(E){C=E}if(C&&!(C instanceof Error)&&e((g||"React class")+": type specification of "+p+" `"+m+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof C+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),C instanceof Error&&!(C.message in t)){t[C.message]=!0;var x=d?d():"";e("Failed "+p+" type: "+C.message+(x??""))}}}}return l.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},E2=l,E2}var S2,g6;function EP(){if(g6)return S2;g6=1;var e=f6(),r=wP(),t=w2(),i=v6(),l=_P(),f=function(){};process.env.NODE_ENV!=="production"&&(f=function(p){var g="Warning: "+p;try{throw new Error(g)}catch{}});function c(){return null}return S2=function(p,g){var d=typeof Symbol=="function"&&Symbol.iterator,m="@@iterator";function C(K){var H=K&&(d&&K[d]||K[m]);if(typeof H=="function")return H}var b="<<anonymous>>",x={array:A("array"),bigint:A("bigint"),bool:A("boolean"),func:A("function"),number:A("number"),object:A("object"),string:A("string"),symbol:A("symbol"),any:T(),arrayOf:S,element:O(),elementType:B(),instanceOf:z,node:F(),objectOf:U,oneOf:M,oneOfType:V,shape:$,exact:I};function E(K,H){return K===H?K!==0||1/K===1/H:K!==K&&H!==H}function k(K,H){this.message=K,this.data=H&&typeof H=="object"?H:{},this.stack=""}k.prototype=Error.prototype;function D(K){if(process.env.NODE_ENV!=="production")var H={},te=0;function ae(pe,be,me,ce,Oe,Ne,tt){if(ce=ce||b,Ne=Ne||me,tt!==t){if(g){var Se=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 Se.name="Invariant Violation",Se}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var it=ce+":"+me;!H[it]&&te<3&&(f("You are manually calling a React.PropTypes validation function for the `"+Ne+"` prop on `"+ce+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),H[it]=!0,te++)}}return be[me]==null?pe?be[me]===null?new k("The "+Oe+" `"+Ne+"` is marked as required "+("in `"+ce+"`, but its value is `null`.")):new k("The "+Oe+" `"+Ne+"` is marked as required in "+("`"+ce+"`, but its value is `undefined`.")):null:K(be,me,ce,Oe,Ne)}var ie=ae.bind(null,!1);return ie.isRequired=ae.bind(null,!0),ie}function A(K){function H(te,ae,ie,pe,be,me){var ce=te[ae],Oe=Z(ce);if(Oe!==K){var Ne=J(ce);return new k("Invalid "+pe+" `"+be+"` of type "+("`"+Ne+"` supplied to `"+ie+"`, expected ")+("`"+K+"`."),{expectedType:K})}return null}return D(H)}function T(){return D(c)}function S(K){function H(te,ae,ie,pe,be){if(typeof K!="function")return new k("Property `"+be+"` of component `"+ie+"` has invalid PropType notation inside arrayOf.");var me=te[ae];if(!Array.isArray(me)){var ce=Z(me);return new k("Invalid "+pe+" `"+be+"` of type "+("`"+ce+"` supplied to `"+ie+"`, expected an array."))}for(var Oe=0;Oe<me.length;Oe++){var Ne=K(me,Oe,ie,pe,be+"["+Oe+"]",t);if(Ne instanceof Error)return Ne}return null}return D(H)}function O(){function K(H,te,ae,ie,pe){var be=H[te];if(!p(be)){var me=Z(be);return new k("Invalid "+ie+" `"+pe+"` of type "+("`"+me+"` supplied to `"+ae+"`, expected a single ReactElement."))}return null}return D(K)}function B(){function K(H,te,ae,ie,pe){var be=H[te];if(!e.isValidElementType(be)){var me=Z(be);return new k("Invalid "+ie+" `"+pe+"` of type "+("`"+me+"` supplied to `"+ae+"`, expected a single ReactElement type."))}return null}return D(K)}function z(K){function H(te,ae,ie,pe,be){if(!(te[ae]instanceof K)){var me=K.name||b,ce=ne(te[ae]);return new k("Invalid "+pe+" `"+be+"` of type "+("`"+ce+"` supplied to `"+ie+"`, expected ")+("instance of `"+me+"`."))}return null}return D(H)}function M(K){if(!Array.isArray(K))return process.env.NODE_ENV!=="production"&&(arguments.length>1?f("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):f("Invalid argument supplied to oneOf, expected an array.")),c;function H(te,ae,ie,pe,be){for(var me=te[ae],ce=0;ce<K.length;ce++)if(E(me,K[ce]))return null;var Oe=JSON.stringify(K,function(tt,Se){var it=J(Se);return it==="symbol"?String(Se):Se});return new k("Invalid "+pe+" `"+be+"` of value `"+String(me)+"` "+("supplied to `"+ie+"`, expected one of "+Oe+"."))}return D(H)}function U(K){function H(te,ae,ie,pe,be){if(typeof K!="function")return new k("Property `"+be+"` of component `"+ie+"` has invalid PropType notation inside objectOf.");var me=te[ae],ce=Z(me);if(ce!=="object")return new k("Invalid "+pe+" `"+be+"` of type "+("`"+ce+"` supplied to `"+ie+"`, expected an object."));for(var Oe in me)if(i(me,Oe)){var Ne=K(me,Oe,ie,pe,be+"."+Oe,t);if(Ne instanceof Error)return Ne}return null}return D(H)}function V(K){if(!Array.isArray(K))return process.env.NODE_ENV!=="production"&&f("Invalid argument supplied to oneOfType, expected an instance of array."),c;for(var H=0;H<K.length;H++){var te=K[H];if(typeof te!="function")return f("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Q(te)+" at index "+H+"."),c}function ae(ie,pe,be,me,ce){for(var Oe=[],Ne=0;Ne<K.length;Ne++){var tt=K[Ne],Se=tt(ie,pe,be,me,ce,t);if(Se==null)return null;Se.data&&i(Se.data,"expectedType")&&Oe.push(Se.data.expectedType)}var it=Oe.length>0?", expected one of type ["+Oe.join(", ")+"]":"";return new k("Invalid "+me+" `"+ce+"` supplied to "+("`"+be+"`"+it+"."))}return D(ae)}function F(){function K(H,te,ae,ie,pe){return q(H[te])?null:new k("Invalid "+ie+" `"+pe+"` supplied to "+("`"+ae+"`, expected a ReactNode."))}return D(K)}function N(K,H,te,ae,ie){return new k((K||"React class")+": "+H+" type `"+te+"."+ae+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ie+"`.")}function $(K){function H(te,ae,ie,pe,be){var me=te[ae],ce=Z(me);if(ce!=="object")return new k("Invalid "+pe+" `"+be+"` of type `"+ce+"` "+("supplied to `"+ie+"`, expected `object`."));for(var Oe in K){var Ne=K[Oe];if(typeof Ne!="function")return N(ie,pe,be,Oe,J(Ne));var tt=Ne(me,Oe,ie,pe,be+"."+Oe,t);if(tt)return tt}return null}return D(H)}function I(K){function H(te,ae,ie,pe,be){var me=te[ae],ce=Z(me);if(ce!=="object")return new k("Invalid "+pe+" `"+be+"` of type `"+ce+"` "+("supplied to `"+ie+"`, expected `object`."));var Oe=r({},te[ae],K);for(var Ne in Oe){var tt=K[Ne];if(i(K,Ne)&&typeof tt!="function")return N(ie,pe,be,Ne,J(tt));if(!tt)return new k("Invalid "+pe+" `"+be+"` key `"+Ne+"` supplied to `"+ie+"`.\nBad object: "+JSON.stringify(te[ae],null," ")+`
193
+ root.render(<App />);`),a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(y=a.identifierPrefix),a.onRecoverableError!==void 0&&(_=a.onRecoverableError),a.transitionCallbacks!==void 0&&a.transitionCallbacks);var P=nF(n,fx,null,u,h,y,_);ax(P.current,n);var j=n.nodeType===cr?n.parentNode:n;return um(j),new F4(P)}function mb(n){this._internalRoot=n}function PW(n){n&&F1(n)}mb.prototype.unstable_scheduleHydration=PW;function BW(n,a,u){if(!gb(n))throw new Error("hydrateRoot(...): Target container is not a DOM element.");EF(n),a===void 0&&c("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var h=u??null,y=u!=null&&u.hydratedSources||null,_=!1,P=!1,j="",Y=_F;u!=null&&(u.unstable_strictMode===!0&&(_=!0),u.identifierPrefix!==void 0&&(j=u.identifierPrefix),u.onRecoverableError!==void 0&&(Y=u.onRecoverableError));var re=rF(a,null,n,fx,h,_,P,j,Y);if(ax(re.current,n),um(n),y)for(var oe=0;oe<y.length;oe++){var he=y[oe];$q(re,he)}return new mb(re)}function gb(n){return!!(n&&(n.nodeType===ka||n.nodeType===Hi||n.nodeType===hs||!te))}function ng(n){return!!(n&&(n.nodeType===ka||n.nodeType===Hi||n.nodeType===hs||n.nodeType===cr&&n.nodeValue===" react-mount-point-unstable "))}function EF(n){n.nodeType===ka&&n.tagName&&n.tagName.toUpperCase()==="BODY"&&c("createRoot(): Creating roots directly with document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try using a container element created for your app."),bm(n)&&(n._reactRootContainer?c("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):c("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}var LW=t.ReactCurrentOwner,SF;SF=function(n){if(n._reactRootContainer&&n.nodeType!==cr){var a=iF(n._reactRootContainer.current);a&&a.parentNode!==n&&c("render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container.")}var u=!!n._reactRootContainer,h=N4(n),y=!!(h&&Ju(h));y&&!u&&c("render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render."),n.nodeType===ka&&n.tagName&&n.tagName.toUpperCase()==="BODY"&&c("render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.")};function N4(n){return n?n.nodeType===Hi?n.documentElement:n.firstChild:null}function DF(){}function zW(n,a,u,h,y){if(y){if(typeof h=="function"){var _=h;h=function(){var fe=vb(P);_.call(fe)}}var P=rF(a,h,n,tc,null,!1,!1,"",DF);n._reactRootContainer=P,ax(P.current,n);var j=n.nodeType===cr?n.parentNode:n;return um(j),Qs(),P}else{for(var Y;Y=n.lastChild;)n.removeChild(Y);if(typeof h=="function"){var re=h;h=function(){var fe=vb(oe);re.call(fe)}}var oe=nF(n,tc,null,!1,!1,"",DF);n._reactRootContainer=oe,ax(oe.current,n);var he=n.nodeType===cr?n.parentNode:n;return um(he),Qs(function(){tg(a,oe,u,h)}),oe}}function UW(n,a){n!==null&&typeof n!="function"&&c("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",a,n)}function yb(n,a,u,h,y){SF(u),UW(y===void 0?null:y,"render");var _=u._reactRootContainer,P;if(!_)P=zW(u,a,n,y,h);else{if(P=_,typeof y=="function"){var j=y;y=function(){var Y=vb(P);j.call(Y)}}tg(a,P,n,y)}return vb(P)}function jW(n){{var a=LW.current;if(a!==null&&a.stateNode!==null){var u=a.stateNode._warnedAboutRefsInRender;u||c("%s is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",Dn(a.type)||"A component"),a.stateNode._warnedAboutRefsInRender=!0}}return n==null?null:n.nodeType===ka?n:EW(n,"findDOMNode")}function IW(n,a,u){if(c("ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!ng(a))throw new Error("Target container is not a DOM element.");{var h=bm(a)&&a._reactRootContainer===void 0;h&&c("You are calling ReactDOM.hydrate() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call hydrateRoot(container, element)?")}return yb(null,n,a,!0,u)}function HW(n,a,u){if(c("ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!ng(a))throw new Error("Target container is not a DOM element.");{var h=bm(a)&&a._reactRootContainer===void 0;h&&c("You are calling ReactDOM.render() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.render(element)?")}return yb(null,n,a,!1,u)}function VW(n,a,u,h){if(c("ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported in React 18. Consider using a portal instead. Until you switch to the createRoot API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!ng(u))throw new Error("Target container is not a DOM element.");if(n==null||!cf(n))throw new Error("parentComponent must be a valid React Component");return yb(n,a,u,!1,h)}function $W(n){if(!ng(n))throw new Error("unmountComponentAtNode(...): Target container is not a DOM element.");{var a=bm(n)&&n._reactRootContainer===void 0;a&&c("You are calling ReactDOM.unmountComponentAtNode() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?")}if(n._reactRootContainer){{var u=N4(n),h=u&&!Ju(u);h&&c("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.")}return Qs(function(){yb(null,null,n,!1,function(){n._reactRootContainer=null,wA(n)})}),!0}else{{var y=N4(n),_=!!(y&&Ju(y)),P=n.nodeType===ka&&ng(n.parentNode)&&!!n.parentNode._reactRootContainer;_&&c("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",P?"You may have accidentally passed in a React root node instead of its container.":"Instead, have the parent component update its state and rerender in order to remove this component.")}return!1}}et(SW),D1(DW),Sf(kW),Yv(bi),T1(wf),(typeof Map!="function"||Map.prototype==null||typeof Map.prototype.forEach!="function"||typeof Set!="function"||Set.prototype==null||typeof Set.prototype.clear!="function"||typeof Set.prototype.forEach!="function")&&c("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),o1(G$),Kd(c4,BK,Qs);function YW(n,a){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!gb(a))throw new Error("Target container is not a DOM element.");return _W(n,a,null,u)}function qW(n,a,u,h){return VW(n,a,u,h)}var M4={usingClientEntryPoint:!1,Events:[Ju,Q0,ix,Gd,lf,c4]};function GW(n,a){return M4.usingClientEntryPoint||c('You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),MW(n,a)}function KW(n,a,u){return M4.usingClientEntryPoint||c('You are importing hydrateRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),BW(n,a,u)}function WW(n){return PR()&&c("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."),Qs(n)}var QW=NW({findFiberByHostInstance:Pf,bundleType:1,version:k4,rendererPackageName:"react-dom"});if(!QW&&it&&window.top===window.self&&(navigator.userAgent.indexOf("Chrome")>-1&&navigator.userAgent.indexOf("Edge")===-1||navigator.userAgent.indexOf("Firefox")>-1)){var ZW=window.location.protocol;/^(https?|file):$/.test(ZW)}ai.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=M4,ai.createPortal=YW,ai.createRoot=GW,ai.findDOMNode=jW,ai.flushSync=WW,ai.hydrate=IW,ai.hydrateRoot=KW,ai.render=HW,ai.unmountComponentAtNode=$W,ai.unstable_batchedUpdates=c4,ai.unstable_renderSubtreeIntoContainer=qW,ai.version=k4,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),ai}(function(e){function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function")){if(process.env.NODE_ENV!=="production")throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch{}}}process.env.NODE_ENV==="production"?(r(),e.exports=s9()):e.exports=u9()})(eu);const cg=OF(eu.exports),c9=AF({__proto__:null,default:cg},[eu.exports]);var Lb=(e=>(e.zip="application/zip",e.png="image/png",e.jpg="image/jpg",e.jpeg="image/jpeg",e.pdf="application/pdf",e.doc="application/msword",e.docx="application/vnd.openxmlformats-officedocument.wordprocessingml.document",e.pptx="application/vnd.openxmlformats-officedocument.presentationml.presentation",e.ppt="application/vnd.ms-powerpoint",e.xlsx="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",e.xls="application/vnd.ms-excel",e.txt="text/plain",e.csv="text/csv",e.svg="image/svg+xml",e))(Lb||{});const zb=new Map(Object.entries(Lb));var Jf=(e=>(e.zip=".zip",e.png=".png",e.jpg=".jpg",e.jpeg=".jpeg",e.pdf=".pdf",e.doc=".doc",e.docx=".docx",e.ppt=".ppt",e.pptx=".pptx",e.xls=".xls",e.xlsx=".xlsx",e.txt=".txt",e.csv=".csv",e.svg=".svg",e.rar=".rar",e))(Jf||{});const f9=Object.freeze(Object.defineProperty({__proto__:null,FileType:Lb,FileTypeMap:zb,FileSuffix:Jf},Symbol.toStringTag,{value:"Module"})),d9=e=>{if(!Js.isObject(e))return e;const r=e;return Js.pick(r,Js.keys(r).filter(t=>!Js.isNil(r[t])))},N8=e=>new Promise((r,t)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>r(i.result),i.onerror=l=>t(l)}),fg=e=>{var r;if(e)return"."+((r=e.split(".").at(-1))==null?void 0:r.toLowerCase())},h9=e=>{if(e){if(e.startsWith("http")){const r=e.split(".").at(-1);if(r&&zb.has(r))return zb.get(r)}if(e.startsWith("data:")&&e.includes("base64")){const r=e.indexOf(";base64"),t=e.slice(0,r).split(":");if(t[1])return t[1]}}},M8=(e,r)=>{const t=typeof r=="object"?JSON.stringify(r):r;localStorage.setItem(e,t)},Ub=e=>{let t=localStorage.getItem(e);return typeof t=="string"&&(t=jb(t)),t||null},p9=e=>{localStorage.removeItem(e)},v9=(e,r)=>{const t=typeof r=="object"?JSON.stringify(r):r;sessionStorage.setItem(e,t)},m9=e=>{let t=sessionStorage.getItem(e);return typeof t=="string"&&(t=jb(t)),t||null},g9=e=>{sessionStorage.removeItem(e)},y9=(e,r)=>{const t=[];for(let i=0;i<r.length;i++)t.findIndex(l=>l[e]===r[i][e])<0&&t.push(r[i]);return t},jb=e=>{if(!e)return null;if(typeof e=="object")return e;if(typeof e=="string"){let r=e;try{r=JSON.parse(e)}catch{}return r}};function x9(){var e=URL.createObjectURL(new Blob),r=e.toString();return URL.revokeObjectURL(e),r.substr(r.lastIndexOf("/")+1)}const b9=Object.freeze(Object.defineProperty({__proto__:null,filterObject:d9,getBase64:N8,getFileSuffix:fg,getFileType:h9,setLocalStorage:M8,getLocalStorage:Ub,removeLocalStorage:p9,setSessionStorage:v9,getSessionStorage:m9,removeSessionStorage:g9,arrayDeduplication:y9,JSONParse:jb,uuid:x9,forceReload:()=>{const e="FORCERELOAD";sessionStorage.getItem(e)!=="1"&&(sessionStorage.setItem(e,"1"),window.location.reload())},formatResponse:e=>{if(typeof e=="string"){const r=e.indexOf(",");return JSON.parse(e.slice(r+1))}return e}},Symbol.toStringTag,{value:"Module"}));const C9=4,P8=0,B8=1,w9=2;function ed(e){let r=e.length;for(;--r>=0;)e[r]=0}const _9=0,L8=1,E9=2,S9=3,D9=258,Ib=29,Dh=256,kh=Dh+1+Ib,td=30,Hb=19,z8=2*kh+1,mc=15,Vb=16,k9=7,$b=256,U8=16,j8=17,I8=18,Yb=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),dg=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),T9=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),H8=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),A9=512,ns=new Array((kh+2)*2);ed(ns);const Th=new Array(td*2);ed(Th);const Ah=new Array(A9);ed(Ah);const Oh=new Array(D9-S9+1);ed(Oh);const qb=new Array(Ib);ed(qb);const hg=new Array(td);ed(hg);function Gb(e,r,t,i,l){this.static_tree=e,this.extra_bits=r,this.extra_base=t,this.elems=i,this.max_length=l,this.has_stree=e&&e.length}let V8,$8,Y8;function Kb(e,r){this.dyn_tree=e,this.max_code=0,this.stat_desc=r}const q8=e=>e<256?Ah[e]:Ah[256+(e>>>7)],Rh=(e,r)=>{e.pending_buf[e.pending++]=r&255,e.pending_buf[e.pending++]=r>>>8&255},ii=(e,r,t)=>{e.bi_valid>Vb-t?(e.bi_buf|=r<<e.bi_valid&65535,Rh(e,e.bi_buf),e.bi_buf=r>>Vb-e.bi_valid,e.bi_valid+=t-Vb):(e.bi_buf|=r<<e.bi_valid&65535,e.bi_valid+=t)},al=(e,r,t)=>{ii(e,t[r*2],t[r*2+1])},G8=(e,r)=>{let t=0;do t|=e&1,e>>>=1,t<<=1;while(--r>0);return t>>>1},O9=e=>{e.bi_valid===16?(Rh(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},R9=(e,r)=>{const t=r.dyn_tree,i=r.max_code,l=r.stat_desc.static_tree,f=r.stat_desc.has_stree,c=r.stat_desc.extra_bits,p=r.stat_desc.extra_base,g=r.stat_desc.max_length;let d,m,C,b,x,E,k=0;for(b=0;b<=mc;b++)e.bl_count[b]=0;for(t[e.heap[e.heap_max]*2+1]=0,d=e.heap_max+1;d<z8;d++)m=e.heap[d],b=t[t[m*2+1]*2+1]+1,b>g&&(b=g,k++),t[m*2+1]=b,!(m>i)&&(e.bl_count[b]++,x=0,m>=p&&(x=c[m-p]),E=t[m*2],e.opt_len+=E*(b+x),f&&(e.static_len+=E*(l[m*2+1]+x)));if(k!==0){do{for(b=g-1;e.bl_count[b]===0;)b--;e.bl_count[b]--,e.bl_count[b+1]+=2,e.bl_count[g]--,k-=2}while(k>0);for(b=g;b!==0;b--)for(m=e.bl_count[b];m!==0;)C=e.heap[--d],!(C>i)&&(t[C*2+1]!==b&&(e.opt_len+=(b-t[C*2+1])*t[C*2],t[C*2+1]=b),m--)}},K8=(e,r,t)=>{const i=new Array(mc+1);let l=0,f,c;for(f=1;f<=mc;f++)l=l+t[f-1]<<1,i[f]=l;for(c=0;c<=r;c++){let p=e[c*2+1];p!==0&&(e[c*2]=G8(i[p]++,p))}},F9=()=>{let e,r,t,i,l;const f=new Array(mc+1);for(t=0,i=0;i<Ib-1;i++)for(qb[i]=t,e=0;e<1<<Yb[i];e++)Oh[t++]=i;for(Oh[t-1]=i,l=0,i=0;i<16;i++)for(hg[i]=l,e=0;e<1<<dg[i];e++)Ah[l++]=i;for(l>>=7;i<td;i++)for(hg[i]=l<<7,e=0;e<1<<dg[i]-7;e++)Ah[256+l++]=i;for(r=0;r<=mc;r++)f[r]=0;for(e=0;e<=143;)ns[e*2+1]=8,e++,f[8]++;for(;e<=255;)ns[e*2+1]=9,e++,f[9]++;for(;e<=279;)ns[e*2+1]=7,e++,f[7]++;for(;e<=287;)ns[e*2+1]=8,e++,f[8]++;for(K8(ns,kh+1,f),e=0;e<td;e++)Th[e*2+1]=5,Th[e*2]=G8(e,5);V8=new Gb(ns,Yb,Dh+1,kh,mc),$8=new Gb(Th,dg,0,td,mc),Y8=new Gb(new Array(0),T9,0,Hb,k9)},W8=e=>{let r;for(r=0;r<kh;r++)e.dyn_ltree[r*2]=0;for(r=0;r<td;r++)e.dyn_dtree[r*2]=0;for(r=0;r<Hb;r++)e.bl_tree[r*2]=0;e.dyn_ltree[$b*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},Q8=e=>{e.bi_valid>8?Rh(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Z8=(e,r,t,i)=>{const l=r*2,f=t*2;return e[l]<e[f]||e[l]===e[f]&&i[r]<=i[t]},Wb=(e,r,t)=>{const i=e.heap[t];let l=t<<1;for(;l<=e.heap_len&&(l<e.heap_len&&Z8(r,e.heap[l+1],e.heap[l],e.depth)&&l++,!Z8(r,i,e.heap[l],e.depth));)e.heap[t]=e.heap[l],t=l,l<<=1;e.heap[t]=i},X8=(e,r,t)=>{let i,l,f=0,c,p;if(e.sym_next!==0)do i=e.pending_buf[e.sym_buf+f++]&255,i+=(e.pending_buf[e.sym_buf+f++]&255)<<8,l=e.pending_buf[e.sym_buf+f++],i===0?al(e,l,r):(c=Oh[l],al(e,c+Dh+1,r),p=Yb[c],p!==0&&(l-=qb[c],ii(e,l,p)),i--,c=q8(i),al(e,c,t),p=dg[c],p!==0&&(i-=hg[c],ii(e,i,p)));while(f<e.sym_next);al(e,$b,r)},Qb=(e,r)=>{const t=r.dyn_tree,i=r.stat_desc.static_tree,l=r.stat_desc.has_stree,f=r.stat_desc.elems;let c,p,g=-1,d;for(e.heap_len=0,e.heap_max=z8,c=0;c<f;c++)t[c*2]!==0?(e.heap[++e.heap_len]=g=c,e.depth[c]=0):t[c*2+1]=0;for(;e.heap_len<2;)d=e.heap[++e.heap_len]=g<2?++g:0,t[d*2]=1,e.depth[d]=0,e.opt_len--,l&&(e.static_len-=i[d*2+1]);for(r.max_code=g,c=e.heap_len>>1;c>=1;c--)Wb(e,t,c);d=f;do c=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Wb(e,t,1),p=e.heap[1],e.heap[--e.heap_max]=c,e.heap[--e.heap_max]=p,t[d*2]=t[c*2]+t[p*2],e.depth[d]=(e.depth[c]>=e.depth[p]?e.depth[c]:e.depth[p])+1,t[c*2+1]=t[p*2+1]=d,e.heap[1]=d++,Wb(e,t,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],R9(e,r),K8(t,g,e.bl_count)},J8=(e,r,t)=>{let i,l=-1,f,c=r[0*2+1],p=0,g=7,d=4;for(c===0&&(g=138,d=3),r[(t+1)*2+1]=65535,i=0;i<=t;i++)f=c,c=r[(i+1)*2+1],!(++p<g&&f===c)&&(p<d?e.bl_tree[f*2]+=p:f!==0?(f!==l&&e.bl_tree[f*2]++,e.bl_tree[U8*2]++):p<=10?e.bl_tree[j8*2]++:e.bl_tree[I8*2]++,p=0,l=f,c===0?(g=138,d=3):f===c?(g=6,d=3):(g=7,d=4))},e5=(e,r,t)=>{let i,l=-1,f,c=r[0*2+1],p=0,g=7,d=4;for(c===0&&(g=138,d=3),i=0;i<=t;i++)if(f=c,c=r[(i+1)*2+1],!(++p<g&&f===c)){if(p<d)do al(e,f,e.bl_tree);while(--p!==0);else f!==0?(f!==l&&(al(e,f,e.bl_tree),p--),al(e,U8,e.bl_tree),ii(e,p-3,2)):p<=10?(al(e,j8,e.bl_tree),ii(e,p-3,3)):(al(e,I8,e.bl_tree),ii(e,p-11,7));p=0,l=f,c===0?(g=138,d=3):f===c?(g=6,d=3):(g=7,d=4)}},N9=e=>{let r;for(J8(e,e.dyn_ltree,e.l_desc.max_code),J8(e,e.dyn_dtree,e.d_desc.max_code),Qb(e,e.bl_desc),r=Hb-1;r>=3&&e.bl_tree[H8[r]*2+1]===0;r--);return e.opt_len+=3*(r+1)+5+5+4,r},M9=(e,r,t,i)=>{let l;for(ii(e,r-257,5),ii(e,t-1,5),ii(e,i-4,4),l=0;l<i;l++)ii(e,e.bl_tree[H8[l]*2+1],3);e5(e,e.dyn_ltree,r-1),e5(e,e.dyn_dtree,t-1)},P9=e=>{let r=4093624447,t;for(t=0;t<=31;t++,r>>>=1)if(r&1&&e.dyn_ltree[t*2]!==0)return P8;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return B8;for(t=32;t<Dh;t++)if(e.dyn_ltree[t*2]!==0)return B8;return P8};let t5=!1;const B9=e=>{t5||(F9(),t5=!0),e.l_desc=new Kb(e.dyn_ltree,V8),e.d_desc=new Kb(e.dyn_dtree,$8),e.bl_desc=new Kb(e.bl_tree,Y8),e.bi_buf=0,e.bi_valid=0,W8(e)},n5=(e,r,t,i)=>{ii(e,(_9<<1)+(i?1:0),3),Q8(e),Rh(e,t),Rh(e,~t),t&&e.pending_buf.set(e.window.subarray(r,r+t),e.pending),e.pending+=t},L9=e=>{ii(e,L8<<1,3),al(e,$b,ns),O9(e)},z9=(e,r,t,i)=>{let l,f,c=0;e.level>0?(e.strm.data_type===w9&&(e.strm.data_type=P9(e)),Qb(e,e.l_desc),Qb(e,e.d_desc),c=N9(e),l=e.opt_len+3+7>>>3,f=e.static_len+3+7>>>3,f<=l&&(l=f)):l=f=t+5,t+4<=l&&r!==-1?n5(e,r,t,i):e.strategy===C9||f===l?(ii(e,(L8<<1)+(i?1:0),3),X8(e,ns,Th)):(ii(e,(E9<<1)+(i?1:0),3),M9(e,e.l_desc.max_code+1,e.d_desc.max_code+1,c+1),X8(e,e.dyn_ltree,e.dyn_dtree)),W8(e),i&&Q8(e)},U9=(e,r,t)=>(e.pending_buf[e.sym_buf+e.sym_next++]=r,e.pending_buf[e.sym_buf+e.sym_next++]=r>>8,e.pending_buf[e.sym_buf+e.sym_next++]=t,r===0?e.dyn_ltree[t*2]++:(e.matches++,r--,e.dyn_ltree[(Oh[t]+Dh+1)*2]++,e.dyn_dtree[q8(r)*2]++),e.sym_next===e.sym_end);var j9=B9,I9=n5,H9=z9,V9=U9,$9=L9,Y9={_tr_init:j9,_tr_stored_block:I9,_tr_flush_block:H9,_tr_tally:V9,_tr_align:$9},Fh=(e,r,t,i)=>{let l=e&65535|0,f=e>>>16&65535|0,c=0;for(;t!==0;){c=t>2e3?2e3:t,t-=c;do l=l+r[i++]|0,f=f+l|0;while(--c);l%=65521,f%=65521}return l|f<<16|0};const q9=()=>{let e,r=[];for(var t=0;t<256;t++){e=t;for(var i=0;i<8;i++)e=e&1?3988292384^e>>>1:e>>>1;r[t]=e}return r},G9=new Uint32Array(q9());var Qr=(e,r,t,i)=>{const l=G9,f=i+t;e^=-1;for(let c=i;c<f;c++)e=e>>>8^l[(e^r[c])&255];return e^-1},gc={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},yc={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:K9,_tr_stored_block:Zb,_tr_flush_block:W9,_tr_tally:tu,_tr_align:Q9}=Y9,{Z_NO_FLUSH:nu,Z_PARTIAL_FLUSH:Z9,Z_FULL_FLUSH:X9,Z_FINISH:Zi,Z_BLOCK:r5,Z_OK:ca,Z_STREAM_END:a5,Z_STREAM_ERROR:il,Z_DATA_ERROR:J9,Z_BUF_ERROR:Xb,Z_DEFAULT_COMPRESSION:eN,Z_FILTERED:tN,Z_HUFFMAN_ONLY:pg,Z_RLE:nN,Z_FIXED:rN,Z_DEFAULT_STRATEGY:aN,Z_UNKNOWN:iN,Z_DEFLATED:vg}=yc,oN=9,lN=15,sN=8,uN=29,Jb=256+1+uN,cN=30,fN=19,dN=2*Jb+1,hN=15,qt=3,ru=258,ol=ru+qt+1,pN=32,nd=42,e2=57,t2=69,n2=73,r2=91,a2=103,xc=113,Nh=666,Ia=1,rd=2,bc=3,ad=4,vN=3,Cc=(e,r)=>(e.msg=gc[r],r),i5=e=>e*2-(e>4?9:0),au=e=>{let r=e.length;for(;--r>=0;)e[r]=0},mN=e=>{let r,t,i,l=e.w_size;r=e.hash_size,i=r;do t=e.head[--i],e.head[i]=t>=l?t-l:0;while(--r);r=l,i=r;do t=e.prev[--i],e.prev[i]=t>=l?t-l:0;while(--r)};let iu=(e,r,t)=>(r<<e.hash_shift^t)&e.hash_mask;const Ai=e=>{const r=e.state;let t=r.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(e.output.set(r.pending_buf.subarray(r.pending_out,r.pending_out+t),e.next_out),e.next_out+=t,r.pending_out+=t,e.total_out+=t,e.avail_out-=t,r.pending-=t,r.pending===0&&(r.pending_out=0))},Oi=(e,r)=>{W9(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,r),e.block_start=e.strstart,Ai(e.strm)},cn=(e,r)=>{e.pending_buf[e.pending++]=r},Mh=(e,r)=>{e.pending_buf[e.pending++]=r>>>8&255,e.pending_buf[e.pending++]=r&255},i2=(e,r,t,i)=>{let l=e.avail_in;return l>i&&(l=i),l===0?0:(e.avail_in-=l,r.set(e.input.subarray(e.next_in,e.next_in+l),t),e.state.wrap===1?e.adler=Fh(e.adler,r,l,t):e.state.wrap===2&&(e.adler=Qr(e.adler,r,l,t)),e.next_in+=l,e.total_in+=l,l)},o5=(e,r)=>{let t=e.max_chain_length,i=e.strstart,l,f,c=e.prev_length,p=e.nice_match;const g=e.strstart>e.w_size-ol?e.strstart-(e.w_size-ol):0,d=e.window,m=e.w_mask,C=e.prev,b=e.strstart+ru;let x=d[i+c-1],E=d[i+c];e.prev_length>=e.good_match&&(t>>=2),p>e.lookahead&&(p=e.lookahead);do if(l=r,!(d[l+c]!==E||d[l+c-1]!==x||d[l]!==d[i]||d[++l]!==d[i+1])){i+=2,l++;do;while(d[++i]===d[++l]&&d[++i]===d[++l]&&d[++i]===d[++l]&&d[++i]===d[++l]&&d[++i]===d[++l]&&d[++i]===d[++l]&&d[++i]===d[++l]&&d[++i]===d[++l]&&i<b);if(f=ru-(b-i),i=b-ru,f>c){if(e.match_start=r,c=f,f>=p)break;x=d[i+c-1],E=d[i+c]}}while((r=C[r&m])>g&&--t!==0);return c<=e.lookahead?c:e.lookahead},id=e=>{const r=e.w_size;let t,i,l;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=r+(r-ol)&&(e.window.set(e.window.subarray(r,r+r-i),0),e.match_start-=r,e.strstart-=r,e.block_start-=r,e.insert>e.strstart&&(e.insert=e.strstart),mN(e),i+=r),e.strm.avail_in===0)break;if(t=i2(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=t,e.lookahead+e.insert>=qt)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=iu(e,e.ins_h,e.window[l+1]);e.insert&&(e.ins_h=iu(e,e.ins_h,e.window[l+qt-1]),e.prev[l&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=l,l++,e.insert--,!(e.lookahead+e.insert<qt)););}while(e.lookahead<ol&&e.strm.avail_in!==0)},l5=(e,r)=>{let t=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,i,l,f,c=0,p=e.strm.avail_in;do{if(i=65535,f=e.bi_valid+42>>3,e.strm.avail_out<f||(f=e.strm.avail_out-f,l=e.strstart-e.block_start,i>l+e.strm.avail_in&&(i=l+e.strm.avail_in),i>f&&(i=f),i<t&&(i===0&&r!==Zi||r===nu||i!==l+e.strm.avail_in)))break;c=r===Zi&&i===l+e.strm.avail_in?1:0,Zb(e,0,0,c),e.pending_buf[e.pending-4]=i,e.pending_buf[e.pending-3]=i>>8,e.pending_buf[e.pending-2]=~i,e.pending_buf[e.pending-1]=~i>>8,Ai(e.strm),l&&(l>i&&(l=i),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+l),e.strm.next_out),e.strm.next_out+=l,e.strm.avail_out-=l,e.strm.total_out+=l,e.block_start+=l,i-=l),i&&(i2(e.strm,e.strm.output,e.strm.next_out,i),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i)}while(c===0);return p-=e.strm.avail_in,p&&(p>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=p&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-p,e.strm.next_in),e.strstart),e.strstart+=p,e.insert+=p>e.w_size-e.insert?e.w_size-e.insert:p),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),c?ad:r!==nu&&r!==Zi&&e.strm.avail_in===0&&e.strstart===e.block_start?rd:(f=e.window_size-e.strstart,e.strm.avail_in>f&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,f+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),f>e.strm.avail_in&&(f=e.strm.avail_in),f&&(i2(e.strm,e.window,e.strstart,f),e.strstart+=f,e.insert+=f>e.w_size-e.insert?e.w_size-e.insert:f),e.high_water<e.strstart&&(e.high_water=e.strstart),f=e.bi_valid+42>>3,f=e.pending_buf_size-f>65535?65535:e.pending_buf_size-f,t=f>e.w_size?e.w_size:f,l=e.strstart-e.block_start,(l>=t||(l||r===Zi)&&r!==nu&&e.strm.avail_in===0&&l<=f)&&(i=l>f?f:l,c=r===Zi&&e.strm.avail_in===0&&i===l?1:0,Zb(e,e.block_start,i,c),e.block_start+=i,Ai(e.strm)),c?bc:Ia)},o2=(e,r)=>{let t,i;for(;;){if(e.lookahead<ol){if(id(e),e.lookahead<ol&&r===nu)return Ia;if(e.lookahead===0)break}if(t=0,e.lookahead>=qt&&(e.ins_h=iu(e,e.ins_h,e.window[e.strstart+qt-1]),t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),t!==0&&e.strstart-t<=e.w_size-ol&&(e.match_length=o5(e,t)),e.match_length>=qt)if(i=tu(e,e.strstart-e.match_start,e.match_length-qt),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=qt){e.match_length--;do e.strstart++,e.ins_h=iu(e,e.ins_h,e.window[e.strstart+qt-1]),t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=iu(e,e.ins_h,e.window[e.strstart+1]);else i=tu(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(Oi(e,!1),e.strm.avail_out===0))return Ia}return e.insert=e.strstart<qt-1?e.strstart:qt-1,r===Zi?(Oi(e,!0),e.strm.avail_out===0?bc:ad):e.sym_next&&(Oi(e,!1),e.strm.avail_out===0)?Ia:rd},od=(e,r)=>{let t,i,l;for(;;){if(e.lookahead<ol){if(id(e),e.lookahead<ol&&r===nu)return Ia;if(e.lookahead===0)break}if(t=0,e.lookahead>=qt&&(e.ins_h=iu(e,e.ins_h,e.window[e.strstart+qt-1]),t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=qt-1,t!==0&&e.prev_length<e.max_lazy_match&&e.strstart-t<=e.w_size-ol&&(e.match_length=o5(e,t),e.match_length<=5&&(e.strategy===tN||e.match_length===qt&&e.strstart-e.match_start>4096)&&(e.match_length=qt-1)),e.prev_length>=qt&&e.match_length<=e.prev_length){l=e.strstart+e.lookahead-qt,i=tu(e,e.strstart-1-e.prev_match,e.prev_length-qt),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=l&&(e.ins_h=iu(e,e.ins_h,e.window[e.strstart+qt-1]),t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=qt-1,e.strstart++,i&&(Oi(e,!1),e.strm.avail_out===0))return Ia}else if(e.match_available){if(i=tu(e,0,e.window[e.strstart-1]),i&&Oi(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Ia}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=tu(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<qt-1?e.strstart:qt-1,r===Zi?(Oi(e,!0),e.strm.avail_out===0?bc:ad):e.sym_next&&(Oi(e,!1),e.strm.avail_out===0)?Ia:rd},gN=(e,r)=>{let t,i,l,f;const c=e.window;for(;;){if(e.lookahead<=ru){if(id(e),e.lookahead<=ru&&r===nu)return Ia;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=qt&&e.strstart>0&&(l=e.strstart-1,i=c[l],i===c[++l]&&i===c[++l]&&i===c[++l])){f=e.strstart+ru;do;while(i===c[++l]&&i===c[++l]&&i===c[++l]&&i===c[++l]&&i===c[++l]&&i===c[++l]&&i===c[++l]&&i===c[++l]&&l<f);e.match_length=ru-(f-l),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=qt?(t=tu(e,1,e.match_length-qt),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(t=tu(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),t&&(Oi(e,!1),e.strm.avail_out===0))return Ia}return e.insert=0,r===Zi?(Oi(e,!0),e.strm.avail_out===0?bc:ad):e.sym_next&&(Oi(e,!1),e.strm.avail_out===0)?Ia:rd},yN=(e,r)=>{let t;for(;;){if(e.lookahead===0&&(id(e),e.lookahead===0)){if(r===nu)return Ia;break}if(e.match_length=0,t=tu(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,t&&(Oi(e,!1),e.strm.avail_out===0))return Ia}return e.insert=0,r===Zi?(Oi(e,!0),e.strm.avail_out===0?bc:ad):e.sym_next&&(Oi(e,!1),e.strm.avail_out===0)?Ia:rd};function ll(e,r,t,i,l){this.good_length=e,this.max_lazy=r,this.nice_length=t,this.max_chain=i,this.func=l}const Ph=[new ll(0,0,0,0,l5),new ll(4,4,8,4,o2),new ll(4,5,16,8,o2),new ll(4,6,32,32,o2),new ll(4,4,16,16,od),new ll(8,16,32,32,od),new ll(8,16,128,128,od),new ll(8,32,128,256,od),new ll(32,128,258,1024,od),new ll(32,258,258,4096,od)],xN=e=>{e.window_size=2*e.w_size,au(e.head),e.max_lazy_match=Ph[e.level].max_lazy,e.good_match=Ph[e.level].good_length,e.nice_match=Ph[e.level].nice_length,e.max_chain_length=Ph[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=qt-1,e.match_available=0,e.ins_h=0};function bN(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=vg,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(dN*2),this.dyn_dtree=new Uint16Array((2*cN+1)*2),this.bl_tree=new Uint16Array((2*fN+1)*2),au(this.dyn_ltree),au(this.dyn_dtree),au(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(hN+1),this.heap=new Uint16Array(2*Jb+1),au(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Jb+1),au(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Bh=e=>{if(!e)return 1;const r=e.state;return!r||r.strm!==e||r.status!==nd&&r.status!==e2&&r.status!==t2&&r.status!==n2&&r.status!==r2&&r.status!==a2&&r.status!==xc&&r.status!==Nh?1:0},s5=e=>{if(Bh(e))return Cc(e,il);e.total_in=e.total_out=0,e.data_type=iN;const r=e.state;return r.pending=0,r.pending_out=0,r.wrap<0&&(r.wrap=-r.wrap),r.status=r.wrap===2?e2:r.wrap?nd:xc,e.adler=r.wrap===2?0:1,r.last_flush=-2,K9(r),ca},u5=e=>{const r=s5(e);return r===ca&&xN(e.state),r},CN=(e,r)=>Bh(e)||e.state.wrap!==2?il:(e.state.gzhead=r,ca),c5=(e,r,t,i,l,f)=>{if(!e)return il;let c=1;if(r===eN&&(r=6),i<0?(c=0,i=-i):i>15&&(c=2,i-=16),l<1||l>oN||t!==vg||i<8||i>15||r<0||r>9||f<0||f>rN||i===8&&c!==1)return Cc(e,il);i===8&&(i=9);const p=new bN;return e.state=p,p.strm=e,p.status=nd,p.wrap=c,p.gzhead=null,p.w_bits=i,p.w_size=1<<p.w_bits,p.w_mask=p.w_size-1,p.hash_bits=l+7,p.hash_size=1<<p.hash_bits,p.hash_mask=p.hash_size-1,p.hash_shift=~~((p.hash_bits+qt-1)/qt),p.window=new Uint8Array(p.w_size*2),p.head=new Uint16Array(p.hash_size),p.prev=new Uint16Array(p.w_size),p.lit_bufsize=1<<l+6,p.pending_buf_size=p.lit_bufsize*4,p.pending_buf=new Uint8Array(p.pending_buf_size),p.sym_buf=p.lit_bufsize,p.sym_end=(p.lit_bufsize-1)*3,p.level=r,p.strategy=f,p.method=t,u5(e)},wN=(e,r)=>c5(e,r,vg,lN,sN,aN),_N=(e,r)=>{if(Bh(e)||r>r5||r<0)return e?Cc(e,il):il;const t=e.state;if(!e.output||e.avail_in!==0&&!e.input||t.status===Nh&&r!==Zi)return Cc(e,e.avail_out===0?Xb:il);const i=t.last_flush;if(t.last_flush=r,t.pending!==0){if(Ai(e),e.avail_out===0)return t.last_flush=-1,ca}else if(e.avail_in===0&&i5(r)<=i5(i)&&r!==Zi)return Cc(e,Xb);if(t.status===Nh&&e.avail_in!==0)return Cc(e,Xb);if(t.status===nd&&t.wrap===0&&(t.status=xc),t.status===nd){let l=vg+(t.w_bits-8<<4)<<8,f=-1;if(t.strategy>=pg||t.level<2?f=0:t.level<6?f=1:t.level===6?f=2:f=3,l|=f<<6,t.strstart!==0&&(l|=pN),l+=31-l%31,Mh(t,l),t.strstart!==0&&(Mh(t,e.adler>>>16),Mh(t,e.adler&65535)),e.adler=1,t.status=xc,Ai(e),t.pending!==0)return t.last_flush=-1,ca}if(t.status===e2){if(e.adler=0,cn(t,31),cn(t,139),cn(t,8),t.gzhead)cn(t,(t.gzhead.text?1:0)+(t.gzhead.hcrc?2:0)+(t.gzhead.extra?4:0)+(t.gzhead.name?8:0)+(t.gzhead.comment?16:0)),cn(t,t.gzhead.time&255),cn(t,t.gzhead.time>>8&255),cn(t,t.gzhead.time>>16&255),cn(t,t.gzhead.time>>24&255),cn(t,t.level===9?2:t.strategy>=pg||t.level<2?4:0),cn(t,t.gzhead.os&255),t.gzhead.extra&&t.gzhead.extra.length&&(cn(t,t.gzhead.extra.length&255),cn(t,t.gzhead.extra.length>>8&255)),t.gzhead.hcrc&&(e.adler=Qr(e.adler,t.pending_buf,t.pending,0)),t.gzindex=0,t.status=t2;else if(cn(t,0),cn(t,0),cn(t,0),cn(t,0),cn(t,0),cn(t,t.level===9?2:t.strategy>=pg||t.level<2?4:0),cn(t,vN),t.status=xc,Ai(e),t.pending!==0)return t.last_flush=-1,ca}if(t.status===t2){if(t.gzhead.extra){let l=t.pending,f=(t.gzhead.extra.length&65535)-t.gzindex;for(;t.pending+f>t.pending_buf_size;){let p=t.pending_buf_size-t.pending;if(t.pending_buf.set(t.gzhead.extra.subarray(t.gzindex,t.gzindex+p),t.pending),t.pending=t.pending_buf_size,t.gzhead.hcrc&&t.pending>l&&(e.adler=Qr(e.adler,t.pending_buf,t.pending-l,l)),t.gzindex+=p,Ai(e),t.pending!==0)return t.last_flush=-1,ca;l=0,f-=p}let c=new Uint8Array(t.gzhead.extra);t.pending_buf.set(c.subarray(t.gzindex,t.gzindex+f),t.pending),t.pending+=f,t.gzhead.hcrc&&t.pending>l&&(e.adler=Qr(e.adler,t.pending_buf,t.pending-l,l)),t.gzindex=0}t.status=n2}if(t.status===n2){if(t.gzhead.name){let l=t.pending,f;do{if(t.pending===t.pending_buf_size){if(t.gzhead.hcrc&&t.pending>l&&(e.adler=Qr(e.adler,t.pending_buf,t.pending-l,l)),Ai(e),t.pending!==0)return t.last_flush=-1,ca;l=0}t.gzindex<t.gzhead.name.length?f=t.gzhead.name.charCodeAt(t.gzindex++)&255:f=0,cn(t,f)}while(f!==0);t.gzhead.hcrc&&t.pending>l&&(e.adler=Qr(e.adler,t.pending_buf,t.pending-l,l)),t.gzindex=0}t.status=r2}if(t.status===r2){if(t.gzhead.comment){let l=t.pending,f;do{if(t.pending===t.pending_buf_size){if(t.gzhead.hcrc&&t.pending>l&&(e.adler=Qr(e.adler,t.pending_buf,t.pending-l,l)),Ai(e),t.pending!==0)return t.last_flush=-1,ca;l=0}t.gzindex<t.gzhead.comment.length?f=t.gzhead.comment.charCodeAt(t.gzindex++)&255:f=0,cn(t,f)}while(f!==0);t.gzhead.hcrc&&t.pending>l&&(e.adler=Qr(e.adler,t.pending_buf,t.pending-l,l))}t.status=a2}if(t.status===a2){if(t.gzhead.hcrc){if(t.pending+2>t.pending_buf_size&&(Ai(e),t.pending!==0))return t.last_flush=-1,ca;cn(t,e.adler&255),cn(t,e.adler>>8&255),e.adler=0}if(t.status=xc,Ai(e),t.pending!==0)return t.last_flush=-1,ca}if(e.avail_in!==0||t.lookahead!==0||r!==nu&&t.status!==Nh){let l=t.level===0?l5(t,r):t.strategy===pg?yN(t,r):t.strategy===nN?gN(t,r):Ph[t.level].func(t,r);if((l===bc||l===ad)&&(t.status=Nh),l===Ia||l===bc)return e.avail_out===0&&(t.last_flush=-1),ca;if(l===rd&&(r===Z9?Q9(t):r!==r5&&(Zb(t,0,0,!1),r===X9&&(au(t.head),t.lookahead===0&&(t.strstart=0,t.block_start=0,t.insert=0))),Ai(e),e.avail_out===0))return t.last_flush=-1,ca}return r!==Zi?ca:t.wrap<=0?a5:(t.wrap===2?(cn(t,e.adler&255),cn(t,e.adler>>8&255),cn(t,e.adler>>16&255),cn(t,e.adler>>24&255),cn(t,e.total_in&255),cn(t,e.total_in>>8&255),cn(t,e.total_in>>16&255),cn(t,e.total_in>>24&255)):(Mh(t,e.adler>>>16),Mh(t,e.adler&65535)),Ai(e),t.wrap>0&&(t.wrap=-t.wrap),t.pending!==0?ca:a5)},EN=e=>{if(Bh(e))return il;const r=e.state.status;return e.state=null,r===xc?Cc(e,J9):ca},SN=(e,r)=>{let t=r.length;if(Bh(e))return il;const i=e.state,l=i.wrap;if(l===2||l===1&&i.status!==nd||i.lookahead)return il;if(l===1&&(e.adler=Fh(e.adler,r,t,0)),i.wrap=0,t>=i.w_size){l===0&&(au(i.head),i.strstart=0,i.block_start=0,i.insert=0);let g=new Uint8Array(i.w_size);g.set(r.subarray(t-i.w_size,t),0),r=g,t=i.w_size}const f=e.avail_in,c=e.next_in,p=e.input;for(e.avail_in=t,e.next_in=0,e.input=r,id(i);i.lookahead>=qt;){let g=i.strstart,d=i.lookahead-(qt-1);do i.ins_h=iu(i,i.ins_h,i.window[g+qt-1]),i.prev[g&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=g,g++;while(--d);i.strstart=g,i.lookahead=qt-1,id(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=qt-1,i.match_available=0,e.next_in=c,e.input=p,e.avail_in=f,i.wrap=l,ca};var DN=wN,kN=c5,TN=u5,AN=s5,ON=CN,RN=_N,FN=EN,NN=SN,MN="pako deflate (from Nodeca project)",Lh={deflateInit:DN,deflateInit2:kN,deflateReset:TN,deflateResetKeep:AN,deflateSetHeader:ON,deflate:RN,deflateEnd:FN,deflateSetDictionary:NN,deflateInfo:MN};const PN=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var BN=function(e){const r=Array.prototype.slice.call(arguments,1);for(;r.length;){const t=r.shift();if(t){if(typeof t!="object")throw new TypeError(t+"must be non-object");for(const i in t)PN(t,i)&&(e[i]=t[i])}}return e},LN=e=>{let r=0;for(let i=0,l=e.length;i<l;i++)r+=e[i].length;const t=new Uint8Array(r);for(let i=0,l=0,f=e.length;i<f;i++){let c=e[i];t.set(c,l),l+=c.length}return t},mg={assign:BN,flattenChunks:LN};let f5=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{f5=!1}const zh=new Uint8Array(256);for(let e=0;e<256;e++)zh[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;zh[254]=zh[254]=1;var zN=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let r,t,i,l,f,c=e.length,p=0;for(l=0;l<c;l++)t=e.charCodeAt(l),(t&64512)===55296&&l+1<c&&(i=e.charCodeAt(l+1),(i&64512)===56320&&(t=65536+(t-55296<<10)+(i-56320),l++)),p+=t<128?1:t<2048?2:t<65536?3:4;for(r=new Uint8Array(p),f=0,l=0;f<p;l++)t=e.charCodeAt(l),(t&64512)===55296&&l+1<c&&(i=e.charCodeAt(l+1),(i&64512)===56320&&(t=65536+(t-55296<<10)+(i-56320),l++)),t<128?r[f++]=t:t<2048?(r[f++]=192|t>>>6,r[f++]=128|t&63):t<65536?(r[f++]=224|t>>>12,r[f++]=128|t>>>6&63,r[f++]=128|t&63):(r[f++]=240|t>>>18,r[f++]=128|t>>>12&63,r[f++]=128|t>>>6&63,r[f++]=128|t&63);return r};const UN=(e,r)=>{if(r<65534&&e.subarray&&f5)return String.fromCharCode.apply(null,e.length===r?e:e.subarray(0,r));let t="";for(let i=0;i<r;i++)t+=String.fromCharCode(e[i]);return t};var jN=(e,r)=>{const t=r||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,r));let i,l;const f=new Array(t*2);for(l=0,i=0;i<t;){let c=e[i++];if(c<128){f[l++]=c;continue}let p=zh[c];if(p>4){f[l++]=65533,i+=p-1;continue}for(c&=p===2?31:p===3?15:7;p>1&&i<t;)c=c<<6|e[i++]&63,p--;if(p>1){f[l++]=65533;continue}c<65536?f[l++]=c:(c-=65536,f[l++]=55296|c>>10&1023,f[l++]=56320|c&1023)}return UN(f,l)},IN=(e,r)=>{r=r||e.length,r>e.length&&(r=e.length);let t=r-1;for(;t>=0&&(e[t]&192)===128;)t--;return t<0||t===0?r:t+zh[e[t]]>r?t:r},Uh={string2buf:zN,buf2string:jN,utf8border:IN};function HN(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var d5=HN;const h5=Object.prototype.toString,{Z_NO_FLUSH:VN,Z_SYNC_FLUSH:$N,Z_FULL_FLUSH:YN,Z_FINISH:qN,Z_OK:gg,Z_STREAM_END:GN,Z_DEFAULT_COMPRESSION:KN,Z_DEFAULT_STRATEGY:WN,Z_DEFLATED:QN}=yc;function jh(e){this.options=mg.assign({level:KN,method:QN,chunkSize:16384,windowBits:15,memLevel:8,strategy:WN},e||{});let r=this.options;r.raw&&r.windowBits>0?r.windowBits=-r.windowBits:r.gzip&&r.windowBits>0&&r.windowBits<16&&(r.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d5,this.strm.avail_out=0;let t=Lh.deflateInit2(this.strm,r.level,r.method,r.windowBits,r.memLevel,r.strategy);if(t!==gg)throw new Error(gc[t]);if(r.header&&Lh.deflateSetHeader(this.strm,r.header),r.dictionary){let i;if(typeof r.dictionary=="string"?i=Uh.string2buf(r.dictionary):h5.call(r.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(r.dictionary):i=r.dictionary,t=Lh.deflateSetDictionary(this.strm,i),t!==gg)throw new Error(gc[t]);this._dict_set=!0}}jh.prototype.push=function(e,r){const t=this.strm,i=this.options.chunkSize;let l,f;if(this.ended)return!1;for(r===~~r?f=r:f=r===!0?qN:VN,typeof e=="string"?t.input=Uh.string2buf(e):h5.call(e)==="[object ArrayBuffer]"?t.input=new Uint8Array(e):t.input=e,t.next_in=0,t.avail_in=t.input.length;;){if(t.avail_out===0&&(t.output=new Uint8Array(i),t.next_out=0,t.avail_out=i),(f===$N||f===YN)&&t.avail_out<=6){this.onData(t.output.subarray(0,t.next_out)),t.avail_out=0;continue}if(l=Lh.deflate(t,f),l===GN)return t.next_out>0&&this.onData(t.output.subarray(0,t.next_out)),l=Lh.deflateEnd(this.strm),this.onEnd(l),this.ended=!0,l===gg;if(t.avail_out===0){this.onData(t.output);continue}if(f>0&&t.next_out>0){this.onData(t.output.subarray(0,t.next_out)),t.avail_out=0;continue}if(t.avail_in===0)break}return!0},jh.prototype.onData=function(e){this.chunks.push(e)},jh.prototype.onEnd=function(e){e===gg&&(this.result=mg.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function l2(e,r){const t=new jh(r);if(t.push(e,!0),t.err)throw t.msg||gc[t.err];return t.result}function ZN(e,r){return r=r||{},r.raw=!0,l2(e,r)}function XN(e,r){return r=r||{},r.gzip=!0,l2(e,r)}var JN=jh,eM=l2,tM=ZN,nM=XN,rM=yc,aM={Deflate:JN,deflate:eM,deflateRaw:tM,gzip:nM,constants:rM};const yg=16209,iM=16191;var oM=function(r,t){let i,l,f,c,p,g,d,m,C,b,x,E,k,D,A,T,S,O,B,z,M,U,V,F;const N=r.state;i=r.next_in,V=r.input,l=i+(r.avail_in-5),f=r.next_out,F=r.output,c=f-(t-r.avail_out),p=f+(r.avail_out-257),g=N.dmax,d=N.wsize,m=N.whave,C=N.wnext,b=N.window,x=N.hold,E=N.bits,k=N.lencode,D=N.distcode,A=(1<<N.lenbits)-1,T=(1<<N.distbits)-1;e:do{E<15&&(x+=V[i++]<<E,E+=8,x+=V[i++]<<E,E+=8),S=k[x&A];t:for(;;){if(O=S>>>24,x>>>=O,E-=O,O=S>>>16&255,O===0)F[f++]=S&65535;else if(O&16){B=S&65535,O&=15,O&&(E<O&&(x+=V[i++]<<E,E+=8),B+=x&(1<<O)-1,x>>>=O,E-=O),E<15&&(x+=V[i++]<<E,E+=8,x+=V[i++]<<E,E+=8),S=D[x&T];n:for(;;){if(O=S>>>24,x>>>=O,E-=O,O=S>>>16&255,O&16){if(z=S&65535,O&=15,E<O&&(x+=V[i++]<<E,E+=8,E<O&&(x+=V[i++]<<E,E+=8)),z+=x&(1<<O)-1,z>g){r.msg="invalid distance too far back",N.mode=yg;break e}if(x>>>=O,E-=O,O=f-c,z>O){if(O=z-O,O>m&&N.sane){r.msg="invalid distance too far back",N.mode=yg;break e}if(M=0,U=b,C===0){if(M+=d-O,O<B){B-=O;do F[f++]=b[M++];while(--O);M=f-z,U=F}}else if(C<O){if(M+=d+C-O,O-=C,O<B){B-=O;do F[f++]=b[M++];while(--O);if(M=0,C<B){O=C,B-=O;do F[f++]=b[M++];while(--O);M=f-z,U=F}}}else if(M+=C-O,O<B){B-=O;do F[f++]=b[M++];while(--O);M=f-z,U=F}for(;B>2;)F[f++]=U[M++],F[f++]=U[M++],F[f++]=U[M++],B-=3;B&&(F[f++]=U[M++],B>1&&(F[f++]=U[M++]))}else{M=f-z;do F[f++]=F[M++],F[f++]=F[M++],F[f++]=F[M++],B-=3;while(B>2);B&&(F[f++]=F[M++],B>1&&(F[f++]=F[M++]))}}else if(O&64){r.msg="invalid distance code",N.mode=yg;break e}else{S=D[(S&65535)+(x&(1<<O)-1)];continue n}break}}else if(O&64)if(O&32){N.mode=iM;break e}else{r.msg="invalid literal/length code",N.mode=yg;break e}else{S=k[(S&65535)+(x&(1<<O)-1)];continue t}break}}while(i<l&&f<p);B=E>>3,i-=B,E-=B<<3,x&=(1<<E)-1,r.next_in=i,r.next_out=f,r.avail_in=i<l?5+(l-i):5-(i-l),r.avail_out=f<p?257+(p-f):257-(f-p),N.hold=x,N.bits=E};const ld=15,p5=852,v5=592,m5=0,s2=1,g5=2,lM=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),sM=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),uM=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),cM=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var Ih=(e,r,t,i,l,f,c,p)=>{const g=p.bits;let d=0,m=0,C=0,b=0,x=0,E=0,k=0,D=0,A=0,T=0,S,O,B,z,M,U=null,V;const F=new Uint16Array(ld+1),N=new Uint16Array(ld+1);let $=null,I,q,ee;for(d=0;d<=ld;d++)F[d]=0;for(m=0;m<i;m++)F[r[t+m]]++;for(x=g,b=ld;b>=1&&F[b]===0;b--);if(x>b&&(x=b),b===0)return l[f++]=1<<24|64<<16|0,l[f++]=1<<24|64<<16|0,p.bits=1,0;for(C=1;C<b&&F[C]===0;C++);for(x<C&&(x=C),D=1,d=1;d<=ld;d++)if(D<<=1,D-=F[d],D<0)return-1;if(D>0&&(e===m5||b!==1))return-1;for(N[1]=0,d=1;d<ld;d++)N[d+1]=N[d]+F[d];for(m=0;m<i;m++)r[t+m]!==0&&(c[N[r[t+m]]++]=m);if(e===m5?(U=$=c,V=20):e===s2?(U=lM,$=sM,V=257):(U=uM,$=cM,V=0),T=0,m=0,d=C,M=f,E=x,k=0,B=-1,A=1<<x,z=A-1,e===s2&&A>p5||e===g5&&A>v5)return 1;for(;;){I=d-k,c[m]+1<V?(q=0,ee=c[m]):c[m]>=V?(q=$[c[m]-V],ee=U[c[m]-V]):(q=32+64,ee=0),S=1<<d-k,O=1<<E,C=O;do O-=S,l[M+(T>>k)+O]=I<<24|q<<16|ee|0;while(O!==0);for(S=1<<d-1;T&S;)S>>=1;if(S!==0?(T&=S-1,T+=S):T=0,m++,--F[d]===0){if(d===b)break;d=r[t+c[m]]}if(d>x&&(T&z)!==B){for(k===0&&(k=x),M+=C,E=d-k,D=1<<E;E+k<b&&(D-=F[E+k],!(D<=0));)E++,D<<=1;if(A+=1<<E,e===s2&&A>p5||e===g5&&A>v5)return 1;B=T&z,l[B]=x<<24|E<<16|M-f|0}}return T!==0&&(l[M+T]=d-k<<24|64<<16|0),p.bits=x,0};const fM=0,y5=1,x5=2,{Z_FINISH:b5,Z_BLOCK:dM,Z_TREES:xg,Z_OK:wc,Z_STREAM_END:hM,Z_NEED_DICT:pM,Z_STREAM_ERROR:Xi,Z_DATA_ERROR:C5,Z_MEM_ERROR:w5,Z_BUF_ERROR:vM,Z_DEFLATED:_5}=yc,bg=16180,E5=16181,S5=16182,D5=16183,k5=16184,T5=16185,A5=16186,O5=16187,R5=16188,F5=16189,Cg=16190,rs=16191,u2=16192,N5=16193,c2=16194,M5=16195,P5=16196,B5=16197,L5=16198,wg=16199,_g=16200,z5=16201,U5=16202,j5=16203,I5=16204,H5=16205,f2=16206,V5=16207,$5=16208,Qn=16209,Y5=16210,q5=16211,mM=852,gM=592,yM=15,G5=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function xM(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const _c=e=>{if(!e)return 1;const r=e.state;return!r||r.strm!==e||r.mode<bg||r.mode>q5?1:0},K5=e=>{if(_c(e))return Xi;const r=e.state;return e.total_in=e.total_out=r.total=0,e.msg="",r.wrap&&(e.adler=r.wrap&1),r.mode=bg,r.last=0,r.havedict=0,r.flags=-1,r.dmax=32768,r.head=null,r.hold=0,r.bits=0,r.lencode=r.lendyn=new Int32Array(mM),r.distcode=r.distdyn=new Int32Array(gM),r.sane=1,r.back=-1,wc},W5=e=>{if(_c(e))return Xi;const r=e.state;return r.wsize=0,r.whave=0,r.wnext=0,K5(e)},Q5=(e,r)=>{let t;if(_c(e))return Xi;const i=e.state;return r<0?(t=0,r=-r):(t=(r>>4)+5,r<48&&(r&=15)),r&&(r<8||r>15)?Xi:(i.window!==null&&i.wbits!==r&&(i.window=null),i.wrap=t,i.wbits=r,W5(e))},Z5=(e,r)=>{if(!e)return Xi;const t=new xM;e.state=t,t.strm=e,t.window=null,t.mode=bg;const i=Q5(e,r);return i!==wc&&(e.state=null),i},bM=e=>Z5(e,yM);let X5=!0,d2,h2;const CM=e=>{if(X5){d2=new Int32Array(512),h2=new Int32Array(32);let r=0;for(;r<144;)e.lens[r++]=8;for(;r<256;)e.lens[r++]=9;for(;r<280;)e.lens[r++]=7;for(;r<288;)e.lens[r++]=8;for(Ih(y5,e.lens,0,288,d2,0,e.work,{bits:9}),r=0;r<32;)e.lens[r++]=5;Ih(x5,e.lens,0,32,h2,0,e.work,{bits:5}),X5=!1}e.lencode=d2,e.lenbits=9,e.distcode=h2,e.distbits=5},J5=(e,r,t,i)=>{let l;const f=e.state;return f.window===null&&(f.wsize=1<<f.wbits,f.wnext=0,f.whave=0,f.window=new Uint8Array(f.wsize)),i>=f.wsize?(f.window.set(r.subarray(t-f.wsize,t),0),f.wnext=0,f.whave=f.wsize):(l=f.wsize-f.wnext,l>i&&(l=i),f.window.set(r.subarray(t-i,t-i+l),f.wnext),i-=l,i?(f.window.set(r.subarray(t-i,t),0),f.wnext=i,f.whave=f.wsize):(f.wnext+=l,f.wnext===f.wsize&&(f.wnext=0),f.whave<f.wsize&&(f.whave+=l))),0},wM=(e,r)=>{let t,i,l,f,c,p,g,d,m,C,b,x,E,k,D=0,A,T,S,O,B,z,M,U;const V=new Uint8Array(4);let F,N;const $=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(_c(e)||!e.output||!e.input&&e.avail_in!==0)return Xi;t=e.state,t.mode===rs&&(t.mode=u2),c=e.next_out,l=e.output,g=e.avail_out,f=e.next_in,i=e.input,p=e.avail_in,d=t.hold,m=t.bits,C=p,b=g,U=wc;e:for(;;)switch(t.mode){case bg:if(t.wrap===0){t.mode=u2;break}for(;m<16;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if(t.wrap&2&&d===35615){t.wbits===0&&(t.wbits=15),t.check=0,V[0]=d&255,V[1]=d>>>8&255,t.check=Qr(t.check,V,2,0),d=0,m=0,t.mode=E5;break}if(t.head&&(t.head.done=!1),!(t.wrap&1)||(((d&255)<<8)+(d>>8))%31){e.msg="incorrect header check",t.mode=Qn;break}if((d&15)!==_5){e.msg="unknown compression method",t.mode=Qn;break}if(d>>>=4,m-=4,M=(d&15)+8,t.wbits===0&&(t.wbits=M),M>15||M>t.wbits){e.msg="invalid window size",t.mode=Qn;break}t.dmax=1<<t.wbits,t.flags=0,e.adler=t.check=1,t.mode=d&512?F5:rs,d=0,m=0;break;case E5:for(;m<16;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if(t.flags=d,(t.flags&255)!==_5){e.msg="unknown compression method",t.mode=Qn;break}if(t.flags&57344){e.msg="unknown header flags set",t.mode=Qn;break}t.head&&(t.head.text=d>>8&1),t.flags&512&&t.wrap&4&&(V[0]=d&255,V[1]=d>>>8&255,t.check=Qr(t.check,V,2,0)),d=0,m=0,t.mode=S5;case S5:for(;m<32;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}t.head&&(t.head.time=d),t.flags&512&&t.wrap&4&&(V[0]=d&255,V[1]=d>>>8&255,V[2]=d>>>16&255,V[3]=d>>>24&255,t.check=Qr(t.check,V,4,0)),d=0,m=0,t.mode=D5;case D5:for(;m<16;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}t.head&&(t.head.xflags=d&255,t.head.os=d>>8),t.flags&512&&t.wrap&4&&(V[0]=d&255,V[1]=d>>>8&255,t.check=Qr(t.check,V,2,0)),d=0,m=0,t.mode=k5;case k5:if(t.flags&1024){for(;m<16;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}t.length=d,t.head&&(t.head.extra_len=d),t.flags&512&&t.wrap&4&&(V[0]=d&255,V[1]=d>>>8&255,t.check=Qr(t.check,V,2,0)),d=0,m=0}else t.head&&(t.head.extra=null);t.mode=T5;case T5:if(t.flags&1024&&(x=t.length,x>p&&(x=p),x&&(t.head&&(M=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Uint8Array(t.head.extra_len)),t.head.extra.set(i.subarray(f,f+x),M)),t.flags&512&&t.wrap&4&&(t.check=Qr(t.check,i,x,f)),p-=x,f+=x,t.length-=x),t.length))break e;t.length=0,t.mode=A5;case A5:if(t.flags&2048){if(p===0)break e;x=0;do M=i[f+x++],t.head&&M&&t.length<65536&&(t.head.name+=String.fromCharCode(M));while(M&&x<p);if(t.flags&512&&t.wrap&4&&(t.check=Qr(t.check,i,x,f)),p-=x,f+=x,M)break e}else t.head&&(t.head.name=null);t.length=0,t.mode=O5;case O5:if(t.flags&4096){if(p===0)break e;x=0;do M=i[f+x++],t.head&&M&&t.length<65536&&(t.head.comment+=String.fromCharCode(M));while(M&&x<p);if(t.flags&512&&t.wrap&4&&(t.check=Qr(t.check,i,x,f)),p-=x,f+=x,M)break e}else t.head&&(t.head.comment=null);t.mode=R5;case R5:if(t.flags&512){for(;m<16;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if(t.wrap&4&&d!==(t.check&65535)){e.msg="header crc mismatch",t.mode=Qn;break}d=0,m=0}t.head&&(t.head.hcrc=t.flags>>9&1,t.head.done=!0),e.adler=t.check=0,t.mode=rs;break;case F5:for(;m<32;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}e.adler=t.check=G5(d),d=0,m=0,t.mode=Cg;case Cg:if(t.havedict===0)return e.next_out=c,e.avail_out=g,e.next_in=f,e.avail_in=p,t.hold=d,t.bits=m,pM;e.adler=t.check=1,t.mode=rs;case rs:if(r===dM||r===xg)break e;case u2:if(t.last){d>>>=m&7,m-=m&7,t.mode=f2;break}for(;m<3;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}switch(t.last=d&1,d>>>=1,m-=1,d&3){case 0:t.mode=N5;break;case 1:if(CM(t),t.mode=wg,r===xg){d>>>=2,m-=2;break e}break;case 2:t.mode=P5;break;case 3:e.msg="invalid block type",t.mode=Qn}d>>>=2,m-=2;break;case N5:for(d>>>=m&7,m-=m&7;m<32;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if((d&65535)!==(d>>>16^65535)){e.msg="invalid stored block lengths",t.mode=Qn;break}if(t.length=d&65535,d=0,m=0,t.mode=c2,r===xg)break e;case c2:t.mode=M5;case M5:if(x=t.length,x){if(x>p&&(x=p),x>g&&(x=g),x===0)break e;l.set(i.subarray(f,f+x),c),p-=x,f+=x,g-=x,c+=x,t.length-=x;break}t.mode=rs;break;case P5:for(;m<14;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if(t.nlen=(d&31)+257,d>>>=5,m-=5,t.ndist=(d&31)+1,d>>>=5,m-=5,t.ncode=(d&15)+4,d>>>=4,m-=4,t.nlen>286||t.ndist>30){e.msg="too many length or distance symbols",t.mode=Qn;break}t.have=0,t.mode=B5;case B5:for(;t.have<t.ncode;){for(;m<3;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}t.lens[$[t.have++]]=d&7,d>>>=3,m-=3}for(;t.have<19;)t.lens[$[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,F={bits:t.lenbits},U=Ih(fM,t.lens,0,19,t.lencode,0,t.work,F),t.lenbits=F.bits,U){e.msg="invalid code lengths set",t.mode=Qn;break}t.have=0,t.mode=L5;case L5:for(;t.have<t.nlen+t.ndist;){for(;D=t.lencode[d&(1<<t.lenbits)-1],A=D>>>24,T=D>>>16&255,S=D&65535,!(A<=m);){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if(S<16)d>>>=A,m-=A,t.lens[t.have++]=S;else{if(S===16){for(N=A+2;m<N;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if(d>>>=A,m-=A,t.have===0){e.msg="invalid bit length repeat",t.mode=Qn;break}M=t.lens[t.have-1],x=3+(d&3),d>>>=2,m-=2}else if(S===17){for(N=A+3;m<N;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}d>>>=A,m-=A,M=0,x=3+(d&7),d>>>=3,m-=3}else{for(N=A+7;m<N;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}d>>>=A,m-=A,M=0,x=11+(d&127),d>>>=7,m-=7}if(t.have+x>t.nlen+t.ndist){e.msg="invalid bit length repeat",t.mode=Qn;break}for(;x--;)t.lens[t.have++]=M}}if(t.mode===Qn)break;if(t.lens[256]===0){e.msg="invalid code -- missing end-of-block",t.mode=Qn;break}if(t.lenbits=9,F={bits:t.lenbits},U=Ih(y5,t.lens,0,t.nlen,t.lencode,0,t.work,F),t.lenbits=F.bits,U){e.msg="invalid literal/lengths set",t.mode=Qn;break}if(t.distbits=6,t.distcode=t.distdyn,F={bits:t.distbits},U=Ih(x5,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,F),t.distbits=F.bits,U){e.msg="invalid distances set",t.mode=Qn;break}if(t.mode=wg,r===xg)break e;case wg:t.mode=_g;case _g:if(p>=6&&g>=258){e.next_out=c,e.avail_out=g,e.next_in=f,e.avail_in=p,t.hold=d,t.bits=m,oM(e,b),c=e.next_out,l=e.output,g=e.avail_out,f=e.next_in,i=e.input,p=e.avail_in,d=t.hold,m=t.bits,t.mode===rs&&(t.back=-1);break}for(t.back=0;D=t.lencode[d&(1<<t.lenbits)-1],A=D>>>24,T=D>>>16&255,S=D&65535,!(A<=m);){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if(T&&!(T&240)){for(O=A,B=T,z=S;D=t.lencode[z+((d&(1<<O+B)-1)>>O)],A=D>>>24,T=D>>>16&255,S=D&65535,!(O+A<=m);){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}d>>>=O,m-=O,t.back+=O}if(d>>>=A,m-=A,t.back+=A,t.length=S,T===0){t.mode=H5;break}if(T&32){t.back=-1,t.mode=rs;break}if(T&64){e.msg="invalid literal/length code",t.mode=Qn;break}t.extra=T&15,t.mode=z5;case z5:if(t.extra){for(N=t.extra;m<N;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}t.length+=d&(1<<t.extra)-1,d>>>=t.extra,m-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=U5;case U5:for(;D=t.distcode[d&(1<<t.distbits)-1],A=D>>>24,T=D>>>16&255,S=D&65535,!(A<=m);){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if(!(T&240)){for(O=A,B=T,z=S;D=t.distcode[z+((d&(1<<O+B)-1)>>O)],A=D>>>24,T=D>>>16&255,S=D&65535,!(O+A<=m);){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}d>>>=O,m-=O,t.back+=O}if(d>>>=A,m-=A,t.back+=A,T&64){e.msg="invalid distance code",t.mode=Qn;break}t.offset=S,t.extra=T&15,t.mode=j5;case j5:if(t.extra){for(N=t.extra;m<N;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}t.offset+=d&(1<<t.extra)-1,d>>>=t.extra,m-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){e.msg="invalid distance too far back",t.mode=Qn;break}t.mode=I5;case I5:if(g===0)break e;if(x=b-g,t.offset>x){if(x=t.offset-x,x>t.whave&&t.sane){e.msg="invalid distance too far back",t.mode=Qn;break}x>t.wnext?(x-=t.wnext,E=t.wsize-x):E=t.wnext-x,x>t.length&&(x=t.length),k=t.window}else k=l,E=c-t.offset,x=t.length;x>g&&(x=g),g-=x,t.length-=x;do l[c++]=k[E++];while(--x);t.length===0&&(t.mode=_g);break;case H5:if(g===0)break e;l[c++]=t.length,g--,t.mode=_g;break;case f2:if(t.wrap){for(;m<32;){if(p===0)break e;p--,d|=i[f++]<<m,m+=8}if(b-=g,e.total_out+=b,t.total+=b,t.wrap&4&&b&&(e.adler=t.check=t.flags?Qr(t.check,l,b,c-b):Fh(t.check,l,b,c-b)),b=g,t.wrap&4&&(t.flags?d:G5(d))!==t.check){e.msg="incorrect data check",t.mode=Qn;break}d=0,m=0}t.mode=V5;case V5:if(t.wrap&&t.flags){for(;m<32;){if(p===0)break e;p--,d+=i[f++]<<m,m+=8}if(t.wrap&4&&d!==(t.total&4294967295)){e.msg="incorrect length check",t.mode=Qn;break}d=0,m=0}t.mode=$5;case $5:U=hM;break e;case Qn:U=C5;break e;case Y5:return w5;case q5:default:return Xi}return e.next_out=c,e.avail_out=g,e.next_in=f,e.avail_in=p,t.hold=d,t.bits=m,(t.wsize||b!==e.avail_out&&t.mode<Qn&&(t.mode<f2||r!==b5))&&J5(e,e.output,e.next_out,b-e.avail_out),C-=e.avail_in,b-=e.avail_out,e.total_in+=C,e.total_out+=b,t.total+=b,t.wrap&4&&b&&(e.adler=t.check=t.flags?Qr(t.check,l,b,e.next_out-b):Fh(t.check,l,b,e.next_out-b)),e.data_type=t.bits+(t.last?64:0)+(t.mode===rs?128:0)+(t.mode===wg||t.mode===c2?256:0),(C===0&&b===0||r===b5)&&U===wc&&(U=vM),U},_M=e=>{if(_c(e))return Xi;let r=e.state;return r.window&&(r.window=null),e.state=null,wc},EM=(e,r)=>{if(_c(e))return Xi;const t=e.state;return t.wrap&2?(t.head=r,r.done=!1,wc):Xi},SM=(e,r)=>{const t=r.length;let i,l,f;return _c(e)||(i=e.state,i.wrap!==0&&i.mode!==Cg)?Xi:i.mode===Cg&&(l=1,l=Fh(l,r,t,0),l!==i.check)?C5:(f=J5(e,r,t,t),f?(i.mode=Y5,w5):(i.havedict=1,wc))};var DM=W5,kM=Q5,TM=K5,AM=bM,OM=Z5,RM=wM,FM=_M,NM=EM,MM=SM,PM="pako inflate (from Nodeca project)",as={inflateReset:DM,inflateReset2:kM,inflateResetKeep:TM,inflateInit:AM,inflateInit2:OM,inflate:RM,inflateEnd:FM,inflateGetHeader:NM,inflateSetDictionary:MM,inflateInfo:PM};function BM(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var LM=BM;const e6=Object.prototype.toString,{Z_NO_FLUSH:zM,Z_FINISH:UM,Z_OK:Hh,Z_STREAM_END:p2,Z_NEED_DICT:v2,Z_STREAM_ERROR:jM,Z_DATA_ERROR:t6,Z_MEM_ERROR:IM}=yc;function Vh(e){this.options=mg.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});const r=this.options;r.raw&&r.windowBits>=0&&r.windowBits<16&&(r.windowBits=-r.windowBits,r.windowBits===0&&(r.windowBits=-15)),r.windowBits>=0&&r.windowBits<16&&!(e&&e.windowBits)&&(r.windowBits+=32),r.windowBits>15&&r.windowBits<48&&(r.windowBits&15||(r.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d5,this.strm.avail_out=0;let t=as.inflateInit2(this.strm,r.windowBits);if(t!==Hh)throw new Error(gc[t]);if(this.header=new LM,as.inflateGetHeader(this.strm,this.header),r.dictionary&&(typeof r.dictionary=="string"?r.dictionary=Uh.string2buf(r.dictionary):e6.call(r.dictionary)==="[object ArrayBuffer]"&&(r.dictionary=new Uint8Array(r.dictionary)),r.raw&&(t=as.inflateSetDictionary(this.strm,r.dictionary),t!==Hh)))throw new Error(gc[t])}Vh.prototype.push=function(e,r){const t=this.strm,i=this.options.chunkSize,l=this.options.dictionary;let f,c,p;if(this.ended)return!1;for(r===~~r?c=r:c=r===!0?UM:zM,e6.call(e)==="[object ArrayBuffer]"?t.input=new Uint8Array(e):t.input=e,t.next_in=0,t.avail_in=t.input.length;;){for(t.avail_out===0&&(t.output=new Uint8Array(i),t.next_out=0,t.avail_out=i),f=as.inflate(t,c),f===v2&&l&&(f=as.inflateSetDictionary(t,l),f===Hh?f=as.inflate(t,c):f===t6&&(f=v2));t.avail_in>0&&f===p2&&t.state.wrap>0&&e[t.next_in]!==0;)as.inflateReset(t),f=as.inflate(t,c);switch(f){case jM:case t6:case v2:case IM:return this.onEnd(f),this.ended=!0,!1}if(p=t.avail_out,t.next_out&&(t.avail_out===0||f===p2))if(this.options.to==="string"){let g=Uh.utf8border(t.output,t.next_out),d=t.next_out-g,m=Uh.buf2string(t.output,g);t.next_out=d,t.avail_out=i-d,d&&t.output.set(t.output.subarray(g,g+d),0),this.onData(m)}else this.onData(t.output.length===t.next_out?t.output:t.output.subarray(0,t.next_out));if(!(f===Hh&&p===0)){if(f===p2)return f=as.inflateEnd(this.strm),this.onEnd(f),this.ended=!0,!0;if(t.avail_in===0)break}}return!0},Vh.prototype.onData=function(e){this.chunks.push(e)},Vh.prototype.onEnd=function(e){e===Hh&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=mg.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function m2(e,r){const t=new Vh(r);if(t.push(e),t.err)throw t.msg||gc[t.err];return t.result}function HM(e,r){return r=r||{},r.raw=!0,m2(e,r)}var VM=Vh,$M=m2,YM=HM,qM=m2,GM=yc,KM={Inflate:VM,inflate:$M,inflateRaw:YM,ungzip:qM,constants:GM};const{Deflate:WM,deflate:QM,deflateRaw:ZM,gzip:XM}=aM,{Inflate:JM,inflate:eP,inflateRaw:tP,ungzip:nP}=KM;var rP=WM,aP=QM,iP=ZM,oP=XM,lP=JM,sP=eP,uP=tP,cP=nP,fP=yc,dP={Deflate:rP,deflate:aP,deflateRaw:iP,gzip:oP,Inflate:lP,inflate:sP,inflateRaw:uP,ungzip:cP,constants:fP},Be={};Be.toRGBA8=function(e){var r=e.width,t=e.height;if(e.tabs.acTL==null)return[Be.toRGBA8.decodeImage(e.data,r,t,e).buffer];var i=[];e.frames[0].data==null&&(e.frames[0].data=e.data);for(var l=r*t*4,f=new Uint8Array(l),c=new Uint8Array(l),p=new Uint8Array(l),g=0;g<e.frames.length;g++){var d=e.frames[g],m=d.rect.x,C=d.rect.y,b=d.rect.width,x=d.rect.height,E=Be.toRGBA8.decodeImage(d.data,b,x,e);if(g!=0)for(var k=0;k<l;k++)p[k]=f[k];if(d.blend==0?Be._copyTile(E,b,x,f,r,t,m,C,0):d.blend==1&&Be._copyTile(E,b,x,f,r,t,m,C,1),i.push(f.buffer.slice(0)),d.dispose!=0){if(d.dispose==1)Be._copyTile(c,b,x,f,r,t,m,C,0);else if(d.dispose==2)for(var k=0;k<l;k++)f[k]=p[k]}}return i},Be.toRGBA8.decodeImage=function(e,r,t,i){var l=r*t,f=Be.decode._getBPP(i),c=Math.ceil(r*f/8),p=new Uint8Array(l*4),g=new Uint32Array(p.buffer),d=i.ctype,m=i.depth,C=Be._bin.readUshort;if(d==6){var b=l<<2;if(m==8)for(var x=0;x<b;x+=4)p[x]=e[x],p[x+1]=e[x+1],p[x+2]=e[x+2],p[x+3]=e[x+3];if(m==16)for(var x=0;x<b;x++)p[x]=e[x<<1]}else if(d==2){var E=i.tabs.tRNS;if(E==null){if(m==8)for(var x=0;x<l;x++){var k=x*3;g[x]=255<<24|e[k+2]<<16|e[k+1]<<8|e[k]}if(m==16)for(var x=0;x<l;x++){var k=x*6;g[x]=255<<24|e[k+4]<<16|e[k+2]<<8|e[k]}}else{var D=E[0],A=E[1],T=E[2];if(m==8)for(var x=0;x<l;x++){var S=x<<2,k=x*3;g[x]=255<<24|e[k+2]<<16|e[k+1]<<8|e[k],e[k]==D&&e[k+1]==A&&e[k+2]==T&&(p[S+3]=0)}if(m==16)for(var x=0;x<l;x++){var S=x<<2,k=x*6;g[x]=255<<24|e[k+4]<<16|e[k+2]<<8|e[k],C(e,k)==D&&C(e,k+2)==A&&C(e,k+4)==T&&(p[S+3]=0)}}}else if(d==3){var O=i.tabs.PLTE,B=i.tabs.tRNS,z=B?B.length:0;if(m==1)for(var M=0;M<t;M++)for(var U=M*c,V=M*r,x=0;x<r;x++){var S=V+x<<2,F=e[U+(x>>3)]>>7-((x&7)<<0)&1,N=3*F;p[S]=O[N],p[S+1]=O[N+1],p[S+2]=O[N+2],p[S+3]=F<z?B[F]:255}if(m==2)for(var M=0;M<t;M++)for(var U=M*c,V=M*r,x=0;x<r;x++){var S=V+x<<2,F=e[U+(x>>2)]>>6-((x&3)<<1)&3,N=3*F;p[S]=O[N],p[S+1]=O[N+1],p[S+2]=O[N+2],p[S+3]=F<z?B[F]:255}if(m==4)for(var M=0;M<t;M++)for(var U=M*c,V=M*r,x=0;x<r;x++){var S=V+x<<2,F=e[U+(x>>1)]>>4-((x&1)<<2)&15,N=3*F;p[S]=O[N],p[S+1]=O[N+1],p[S+2]=O[N+2],p[S+3]=F<z?B[F]:255}if(m==8)for(var x=0;x<l;x++){var S=x<<2,F=e[x],N=3*F;p[S]=O[N],p[S+1]=O[N+1],p[S+2]=O[N+2],p[S+3]=F<z?B[F]:255}}else if(d==4){if(m==8)for(var x=0;x<l;x++){var S=x<<2,$=x<<1,I=e[$];p[S]=I,p[S+1]=I,p[S+2]=I,p[S+3]=e[$+1]}if(m==16)for(var x=0;x<l;x++){var S=x<<2,$=x<<2,I=e[$];p[S]=I,p[S+1]=I,p[S+2]=I,p[S+3]=e[$+2]}}else if(d==0)for(var D=i.tabs.tRNS?i.tabs.tRNS:-1,M=0;M<t;M++){var q=M*c,ee=M*r;if(m==1)for(var Z=0;Z<r;Z++){var I=255*(e[q+(Z>>>3)]>>>7-(Z&7)&1),J=I==D*255?0:255;g[ee+Z]=J<<24|I<<16|I<<8|I}else if(m==2)for(var Z=0;Z<r;Z++){var I=85*(e[q+(Z>>>2)]>>>6-((Z&3)<<1)&3),J=I==D*85?0:255;g[ee+Z]=J<<24|I<<16|I<<8|I}else if(m==4)for(var Z=0;Z<r;Z++){var I=17*(e[q+(Z>>>1)]>>>4-((Z&1)<<2)&15),J=I==D*17?0:255;g[ee+Z]=J<<24|I<<16|I<<8|I}else if(m==8)for(var Z=0;Z<r;Z++){var I=e[q+Z],J=I==D?0:255;g[ee+Z]=J<<24|I<<16|I<<8|I}else if(m==16)for(var Z=0;Z<r;Z++){var I=e[q+(Z<<1)],J=C(e,q+(Z<<x))==D?0:255;g[ee+Z]=J<<24|I<<16|I<<8|I}}return p},Be.decode=function(e){for(var r=new Uint8Array(e),t=8,i=Be._bin,l=i.readUshort,f=i.readUint,c={tabs:{},frames:[]},p=new Uint8Array(r.length),g=0,d,m=0,C=[137,80,78,71,13,10,26,10],b=0;b<8;b++)if(r[b]!=C[b])throw"The input is not a PNG file!";for(;t<r.length;){var x=i.readUint(r,t);t+=4;var E=i.readASCII(r,t,4);if(t+=4,E=="IHDR")Be.decode._IHDR(r,t,c);else if(E=="CgBI")c.tabs[E]=r.slice(t,t+4);else if(E=="IDAT"){for(var b=0;b<x;b++)p[g+b]=r[t+b];g+=x}else if(E=="acTL")c.tabs[E]={num_frames:f(r,t),num_plays:f(r,t+4)},d=new Uint8Array(r.length);else if(E=="fcTL"){if(m!=0){var k=c.frames[c.frames.length-1];k.data=Be.decode._decompress(c,d.slice(0,m),k.rect.width,k.rect.height),m=0}var D={x:f(r,t+12),y:f(r,t+16),width:f(r,t+4),height:f(r,t+8)},A=l(r,t+22);A=l(r,t+20)/(A==0?100:A);var T={rect:D,delay:Math.round(A*1e3),dispose:r[t+24],blend:r[t+25]};c.frames.push(T)}else if(E=="fdAT"){for(var b=0;b<x-4;b++)d[m+b]=r[t+b+4];m+=x-4}else if(E=="pHYs")c.tabs[E]=[i.readUint(r,t),i.readUint(r,t+4),r[t+8]];else if(E=="cHRM"){c.tabs[E]=[];for(var b=0;b<8;b++)c.tabs[E].push(i.readUint(r,t+b*4))}else if(E=="tEXt"||E=="zTXt"){c.tabs[E]==null&&(c.tabs[E]={});var S=i.nextZero(r,t),O=i.readASCII(r,t,S-t),B,z=t+x-S-1;if(E=="tEXt")B=i.readASCII(r,S+1,z);else{var M=Be.decode._inflate(r.slice(S+2,S+2+z));B=i.readUTF8(M,0,M.length)}c.tabs[E][O]=B}else if(E=="iTXt"){c.tabs[E]==null&&(c.tabs[E]={});var S=0,U=t;S=i.nextZero(r,U);var O=i.readASCII(r,U,S-U);U=S+1;var V=r[U];r[U+1],U+=2,S=i.nextZero(r,U),i.readASCII(r,U,S-U),U=S+1,S=i.nextZero(r,U),i.readUTF8(r,U,S-U),U=S+1;var B,z=x-(U-t);if(V==0)B=i.readUTF8(r,U,z);else{var M=Be.decode._inflate(r.slice(U,U+z));B=i.readUTF8(M,0,M.length)}c.tabs[E][O]=B}else if(E=="PLTE")c.tabs[E]=i.readBytes(r,t,x);else if(E=="hIST"){var F=c.tabs.PLTE.length/3;c.tabs[E]=[];for(var b=0;b<F;b++)c.tabs[E].push(l(r,t+b*2))}else if(E=="tRNS")c.ctype==3?c.tabs[E]=i.readBytes(r,t,x):c.ctype==0?c.tabs[E]=l(r,t):c.ctype==2&&(c.tabs[E]=[l(r,t),l(r,t+2),l(r,t+4)]);else if(E=="gAMA")c.tabs[E]=i.readUint(r,t)/1e5;else if(E=="sRGB")c.tabs[E]=r[t];else if(E=="bKGD")c.ctype==0||c.ctype==4?c.tabs[E]=[l(r,t)]:c.ctype==2||c.ctype==6?c.tabs[E]=[l(r,t),l(r,t+2),l(r,t+4)]:c.ctype==3&&(c.tabs[E]=r[t]);else if(E=="IEND")break;t+=x,i.readUint(r,t),t+=4}if(m!=0){var k=c.frames[c.frames.length-1];k.data=Be.decode._decompress(c,d.slice(0,m),k.rect.width,k.rect.height),m=0}return c.data=Be.decode._decompress(c,p,c.width,c.height),delete c.compress,delete c.interlace,delete c.filter,c},Be.decode._decompress=function(e,r,t,i){var l=Be.decode._getBPP(e),f=Math.ceil(t*l/8),c=new Uint8Array((f+1+e.interlace)*i);return e.tabs.CgBI?r=Be.inflateRaw(r,c):r=Be.decode._inflate(r,c),e.interlace==0?r=Be.decode._filterZero(r,e,0,t,i):e.interlace==1&&(r=Be.decode._readInterlace(r,e)),r},Be.decode._inflate=function(e,r){var t=Be.inflateRaw(new Uint8Array(e.buffer,2,e.length-6),r);return t},Be.inflateRaw=function(){var e={};return e.H={},e.H.N=function(r,t){var i=Uint8Array,l=0,f=0,c=0,p=0,g=0,d=0,m=0,C=0,b=0,x,E;if(r[0]==3&&r[1]==0)return t||new i(0);var k=e.H,D=k.b,A=k.e,T=k.R,S=k.n,O=k.A,B=k.Z,z=k.m,M=t==null;for(M&&(t=new i(r.length>>>2<<3));l==0;){if(l=D(r,b,1),f=D(r,b+1,2),b+=3,f==0){b&7&&(b+=8-(b&7));var U=(b>>>3)+4,V=r[U-4]|r[U-3]<<8;M&&(t=e.H.W(t,C+V)),t.set(new i(r.buffer,r.byteOffset+U,V),C),b=U+V<<3,C+=V;continue}if(M&&(t=e.H.W(t,C+(1<<17))),f==1&&(x=z.J,E=z.h,d=(1<<9)-1,m=(1<<5)-1),f==2){c=A(r,b,5)+257,p=A(r,b+5,5)+1,g=A(r,b+10,4)+4,b+=14;for(var F=1,N=0;N<38;N+=2)z.Q[N]=0,z.Q[N+1]=0;for(var N=0;N<g;N++){var $=A(r,b+N*3,3);z.Q[(z.X[N]<<1)+1]=$,$>F&&(F=$)}b+=3*g,S(z.Q,F),O(z.Q,F,z.u),x=z.w,E=z.d,b=T(z.u,(1<<F)-1,c+p,r,b,z.v);var I=k.V(z.v,0,c,z.C);d=(1<<I)-1;var q=k.V(z.v,c,p,z.D);m=(1<<q)-1,S(z.C,I),O(z.C,I,x),S(z.D,q),O(z.D,q,E)}for(;;){var ee=x[B(r,b)&d];b+=ee&15;var Z=ee>>>4;if(!(Z>>>8))t[C++]=Z;else{if(Z==256)break;var J=C+Z-254;if(Z>264){var Q=z.q[Z-257];J=C+(Q>>>3)+A(r,b,Q&7),b+=Q&7}var ne=E[B(r,b)&m];b+=ne&15;var K=ne>>>4,H=z.c[K],te=(H>>>4)+D(r,b,H&15);for(b+=H&15;C<J;)t[C]=t[C++-te],t[C]=t[C++-te],t[C]=t[C++-te],t[C]=t[C++-te];C=J}}}return t.length==C?t:t.slice(0,C)},e.H.W=function(r,t){var i=r.length;if(t<=i)return r;var l=new Uint8Array(i<<1);return l.set(r,0),l},e.H.R=function(r,t,i,l,f,c){for(var p=e.H.e,g=e.H.Z,d=0;d<i;){var m=r[g(l,f)&t];f+=m&15;var C=m>>>4;if(C<=15)c[d]=C,d++;else{var b=0,x=0;C==16?(x=3+p(l,f,2),f+=2,b=c[d-1]):C==17?(x=3+p(l,f,3),f+=3):C==18&&(x=11+p(l,f,7),f+=7);for(var E=d+x;d<E;)c[d]=b,d++}}return f},e.H.V=function(r,t,i,l){for(var f=0,c=0,p=l.length>>>1;c<i;){var g=r[c+t];l[c<<1]=0,l[(c<<1)+1]=g,g>f&&(f=g),c++}for(;c<p;)l[c<<1]=0,l[(c<<1)+1]=0,c++;return f},e.H.n=function(r,t){for(var i=e.H.m,l=r.length,f,c,p,g,d,m=i.j,g=0;g<=t;g++)m[g]=0;for(g=1;g<l;g+=2)m[r[g]]++;var C=i.K;for(f=0,m[0]=0,c=1;c<=t;c++)f=f+m[c-1]<<1,C[c]=f;for(p=0;p<l;p+=2)d=r[p+1],d!=0&&(r[p]=C[d],C[d]++)},e.H.A=function(r,t,i){for(var l=r.length,f=e.H.m,c=f.r,p=0;p<l;p+=2)if(r[p+1]!=0)for(var g=p>>1,d=r[p+1],m=g<<4|d,C=t-d,b=r[p]<<C,x=b+(1<<C);b!=x;){var E=c[b]>>>15-t;i[E]=m,b++}},e.H.l=function(r,t){for(var i=e.H.m.r,l=15-t,f=0;f<r.length;f+=2){var c=r[f]<<t-r[f+1];r[f]=i[c]>>>l}},e.H.M=function(r,t,i){i=i<<(t&7);var l=t>>>3;r[l]|=i,r[l+1]|=i>>>8},e.H.I=function(r,t,i){i=i<<(t&7);var l=t>>>3;r[l]|=i,r[l+1]|=i>>>8,r[l+2]|=i>>>16},e.H.e=function(r,t,i){return(r[t>>>3]|r[(t>>>3)+1]<<8)>>>(t&7)&(1<<i)-1},e.H.b=function(r,t,i){return(r[t>>>3]|r[(t>>>3)+1]<<8|r[(t>>>3)+2]<<16)>>>(t&7)&(1<<i)-1},e.H.Z=function(r,t){return(r[t>>>3]|r[(t>>>3)+1]<<8|r[(t>>>3)+2]<<16)>>>(t&7)},e.H.i=function(r,t){return(r[t>>>3]|r[(t>>>3)+1]<<8|r[(t>>>3)+2]<<16|r[(t>>>3)+3]<<24)>>>(t&7)},e.H.m=function(){var r=Uint16Array,t=Uint32Array;return{K:new r(16),j:new r(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new r(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new t(32),J:new r(512),_:[],h:new r(32),$:[],w:new r(32768),C:[],v:[],d:new r(32768),D:[],u:new r(512),Q:[],r:new r(1<<15),s:new t(286),Y:new t(30),a:new t(19),t:new t(15e3),k:new r(1<<16),g:new r(1<<15)}}(),function(){for(var r=e.H.m,t=1<<15,i=0;i<t;i++){var l=i;l=(l&2863311530)>>>1|(l&1431655765)<<1,l=(l&3435973836)>>>2|(l&858993459)<<2,l=(l&4042322160)>>>4|(l&252645135)<<4,l=(l&4278255360)>>>8|(l&16711935)<<8,r.r[i]=(l>>>16|l<<16)>>>17}function f(c,p,g){for(;p--!=0;)c.push(0,g)}for(var i=0;i<32;i++)r.q[i]=r.S[i]<<3|r.T[i],r.c[i]=r.p[i]<<4|r.z[i];f(r._,144,8),f(r._,255-143,9),f(r._,279-255,7),f(r._,287-279,8),e.H.n(r._,9),e.H.A(r._,9,r.J),e.H.l(r._,9),f(r.$,32,5),e.H.n(r.$,5),e.H.A(r.$,5,r.h),e.H.l(r.$,5),f(r.Q,19,0),f(r.C,286,0),f(r.D,30,0),f(r.v,320,0)}(),e.H.N}(),Be.decode._readInterlace=function(e,r){for(var t=r.width,i=r.height,l=Be.decode._getBPP(r),f=l>>3,c=Math.ceil(t*l/8),p=new Uint8Array(i*c),g=0,d=[0,0,4,0,2,0,1],m=[0,4,0,2,0,1,0],C=[8,8,8,4,4,2,2],b=[8,8,4,4,2,2,1],x=0;x<7;){for(var E=C[x],k=b[x],D=0,A=0,T=d[x];T<i;)T+=E,A++;for(var S=m[x];S<t;)S+=k,D++;var O=Math.ceil(D*l/8);Be.decode._filterZero(e,r,g,D,A);for(var B=0,z=d[x];z<i;){for(var M=m[x],U=g+B*O<<3;M<t;){if(l==1){var V=e[U>>3];V=V>>7-(U&7)&1,p[z*c+(M>>3)]|=V<<7-((M&7)<<0)}if(l==2){var V=e[U>>3];V=V>>6-(U&7)&3,p[z*c+(M>>2)]|=V<<6-((M&3)<<1)}if(l==4){var V=e[U>>3];V=V>>4-(U&7)&15,p[z*c+(M>>1)]|=V<<4-((M&1)<<2)}if(l>=8)for(var F=z*c+M*f,N=0;N<f;N++)p[F+N]=e[(U>>3)+N];U+=l,M+=k}B++,z+=E}D*A!=0&&(g+=A*(1+O)),x=x+1}return p},Be.decode._getBPP=function(e){var r=[1,null,3,1,2,null,4][e.ctype];return r*e.depth},Be.decode._filterZero=function(e,r,t,i,l){var f=Be.decode._getBPP(r),c=Math.ceil(i*f/8),p=Be.decode._paeth;f=Math.ceil(f/8);var g=0,d=1,m=e[t],C=0;if(m>1&&(e[t]=[0,0,1][m-2]),m==3)for(C=f;C<c;C++)e[C+1]=e[C+1]+(e[C+1-f]>>>1)&255;for(var b=0;b<l;b++)if(g=t+b*c,d=g+b+1,m=e[d-1],C=0,m==0)for(;C<c;C++)e[g+C]=e[d+C];else if(m==1){for(;C<f;C++)e[g+C]=e[d+C];for(;C<c;C++)e[g+C]=e[d+C]+e[g+C-f]}else if(m==2)for(;C<c;C++)e[g+C]=e[d+C]+e[g+C-c];else if(m==3){for(;C<f;C++)e[g+C]=e[d+C]+(e[g+C-c]>>>1);for(;C<c;C++)e[g+C]=e[d+C]+(e[g+C-c]+e[g+C-f]>>>1)}else{for(;C<f;C++)e[g+C]=e[d+C]+p(0,e[g+C-c],0);for(;C<c;C++)e[g+C]=e[d+C]+p(e[g+C-f],e[g+C-c],e[g+C-f-c])}return e},Be.decode._paeth=function(e,r,t){var i=e+r-t,l=i-e,f=i-r,c=i-t;return l*l<=f*f&&l*l<=c*c?e:f*f<=c*c?r:t},Be.decode._IHDR=function(e,r,t){var i=Be._bin;t.width=i.readUint(e,r),r+=4,t.height=i.readUint(e,r),r+=4,t.depth=e[r],r++,t.ctype=e[r],r++,t.compress=e[r],r++,t.filter=e[r],r++,t.interlace=e[r],r++},Be._bin={nextZero:function(e,r){for(;e[r]!=0;)r++;return r},readUshort:function(e,r){return e[r]<<8|e[r+1]},writeUshort:function(e,r,t){e[r]=t>>8&255,e[r+1]=t&255},readUint:function(e,r){return e[r]*(256*256*256)+(e[r+1]<<16|e[r+2]<<8|e[r+3])},writeUint:function(e,r,t){e[r]=t>>24&255,e[r+1]=t>>16&255,e[r+2]=t>>8&255,e[r+3]=t&255},readASCII:function(e,r,t){for(var i="",l=0;l<t;l++)i+=String.fromCharCode(e[r+l]);return i},writeASCII:function(e,r,t){for(var i=0;i<t.length;i++)e[r+i]=t.charCodeAt(i)},readBytes:function(e,r,t){for(var i=[],l=0;l<t;l++)i.push(e[r+l]);return i},pad:function(e){return e.length<2?"0"+e:e},readUTF8:function(e,r,t){for(var i="",l,f=0;f<t;f++)i+="%"+Be._bin.pad(e[r+f].toString(16));try{l=decodeURIComponent(i)}catch{return Be._bin.readASCII(e,r,t)}return l}},Be._copyTile=function(e,r,t,i,l,f,c,p,g){for(var d=Math.min(r,l),m=Math.min(t,f),C=0,b=0,x=0;x<m;x++)for(var E=0;E<d;E++)if(c>=0&&p>=0?(C=x*r+E<<2,b=(p+x)*l+c+E<<2):(C=(-p+x)*r-c+E<<2,b=x*l+E<<2),g==0)i[b]=e[C],i[b+1]=e[C+1],i[b+2]=e[C+2],i[b+3]=e[C+3];else if(g==1){var k=e[C+3]*.00392156862745098,D=e[C]*k,A=e[C+1]*k,T=e[C+2]*k,S=i[b+3]*(1/255),O=i[b]*S,B=i[b+1]*S,z=i[b+2]*S,M=1-k,U=k+S*M,V=U==0?0:1/U;i[b+3]=255*U,i[b+0]=(D+O*M)*V,i[b+1]=(A+B*M)*V,i[b+2]=(T+z*M)*V}else if(g==2){var k=e[C+3],D=e[C],A=e[C+1],T=e[C+2],S=i[b+3],O=i[b],B=i[b+1],z=i[b+2];k==S&&D==O&&A==B&&T==z?(i[b]=0,i[b+1]=0,i[b+2]=0,i[b+3]=0):(i[b]=D,i[b+1]=A,i[b+2]=T,i[b+3]=k)}else if(g==3){var k=e[C+3],D=e[C],A=e[C+1],T=e[C+2],S=i[b+3],O=i[b],B=i[b+1],z=i[b+2];if(k==S&&D==O&&A==B&&T==z)continue;if(k<220&&S>20)return!1}return!0},Be.encode=function(e,r,t,i,l,f,c){i==null&&(i=0),c==null&&(c=!1);var p=Be.encode.compress(e,r,t,i,[!1,!1,!1,0,c]);return Be.encode.compressPNG(p,-1),Be.encode._main(p,r,t,l,f)},Be.encodeLL=function(e,r,t,i,l,f,c,p){for(var g={ctype:0+(i==1?0:2)+(l==0?0:4),depth:f,frames:[]},d=(i+l)*f,m=d*r,C=0;C<e.length;C++)g.frames.push({rect:{x:0,y:0,width:r,height:t},img:new Uint8Array(e[C]),blend:0,dispose:1,bpp:Math.ceil(d/8),bpl:Math.ceil(m/8)});Be.encode.compressPNG(g,0,!0);var b=Be.encode._main(g,r,t,c,p);return b},Be.encode._main=function(e,r,t,i,l){l==null&&(l={});var f=Be.crc.crc,c=Be._bin.writeUint,p=Be._bin.writeUshort,g=Be._bin.writeASCII,d=8,m=e.frames.length>1,C=!1,b=8+(16+5+4)+(m?20:0);if(l.sRGB!=null&&(b+=8+1+4),l.pHYs!=null&&(b+=8+9+4),e.ctype==3){for(var x=e.plte.length,E=0;E<x;E++)e.plte[E]>>>24!=255&&(C=!0);b+=8+x*3+4+(C?8+x*1+4:0)}for(var k=0;k<e.frames.length;k++){var D=e.frames[k];m&&(b+=38),b+=D.cimg.length+12,k!=0&&(b+=4)}b+=12;for(var A=new Uint8Array(b),T=[137,80,78,71,13,10,26,10],E=0;E<8;E++)A[E]=T[E];if(c(A,d,13),d+=4,g(A,d,"IHDR"),d+=4,c(A,d,r),d+=4,c(A,d,t),d+=4,A[d]=e.depth,d++,A[d]=e.ctype,d++,A[d]=0,d++,A[d]=0,d++,A[d]=0,d++,c(A,d,f(A,d-17,17)),d+=4,l.sRGB!=null&&(c(A,d,1),d+=4,g(A,d,"sRGB"),d+=4,A[d]=l.sRGB,d++,c(A,d,f(A,d-5,5)),d+=4),l.pHYs!=null&&(c(A,d,9),d+=4,g(A,d,"pHYs"),d+=4,c(A,d,l.pHYs[0]),d+=4,c(A,d,l.pHYs[1]),d+=4,A[d]=l.pHYs[2],d++,c(A,d,f(A,d-13,13)),d+=4),m&&(c(A,d,8),d+=4,g(A,d,"acTL"),d+=4,c(A,d,e.frames.length),d+=4,c(A,d,l.loop!=null?l.loop:0),d+=4,c(A,d,f(A,d-12,12)),d+=4),e.ctype==3){var x=e.plte.length;c(A,d,x*3),d+=4,g(A,d,"PLTE"),d+=4;for(var E=0;E<x;E++){var S=E*3,O=e.plte[E],B=O&255,z=O>>>8&255,M=O>>>16&255;A[d+S+0]=B,A[d+S+1]=z,A[d+S+2]=M}if(d+=x*3,c(A,d,f(A,d-x*3-4,x*3+4)),d+=4,C){c(A,d,x),d+=4,g(A,d,"tRNS"),d+=4;for(var E=0;E<x;E++)A[d+E]=e.plte[E]>>>24&255;d+=x,c(A,d,f(A,d-x-4,x+4)),d+=4}}for(var U=0,k=0;k<e.frames.length;k++){var D=e.frames[k];m&&(c(A,d,26),d+=4,g(A,d,"fcTL"),d+=4,c(A,d,U++),d+=4,c(A,d,D.rect.width),d+=4,c(A,d,D.rect.height),d+=4,c(A,d,D.rect.x),d+=4,c(A,d,D.rect.y),d+=4,p(A,d,i[k]),d+=2,p(A,d,1e3),d+=2,A[d]=D.dispose,d++,A[d]=D.blend,d++,c(A,d,f(A,d-30,30)),d+=4);var V=D.cimg,x=V.length;c(A,d,x+(k==0?0:4)),d+=4;var F=d;g(A,d,k==0?"IDAT":"fdAT"),d+=4,k!=0&&(c(A,d,U++),d+=4),A.set(V,d),d+=x,c(A,d,f(A,F,d-F)),d+=4}return c(A,d,0),d+=4,g(A,d,"IEND"),d+=4,c(A,d,f(A,d-4,4)),d+=4,A.buffer},Be.encode.compressPNG=function(e,r,t){for(var i=0;i<e.frames.length;i++){var l=e.frames[i];l.rect.width;var f=l.rect.height,c=new Uint8Array(f*l.bpl+f);l.cimg=Be.encode._filterZero(l.img,f,l.bpp,l.bpl,c,r,t)}},Be.encode.compress=function(e,r,t,i,l){for(var f=l[0],c=l[1],p=l[2],g=l[3],d=l[4],m=6,C=8,b=255,x=0;x<e.length;x++)for(var E=new Uint8Array(e[x]),k=E.length,D=0;D<k;D+=4)b&=E[D+3];var A=b!=255,T=Be.encode.framize(e,r,t,f,c,p),S={},O=[],B=[];if(i!=0){for(var z=[],D=0;D<T.length;D++)z.push(T[D].img.buffer);for(var M=Be.encode.concatRGBA(z),U=Be.quantize(M,i),V=0,F=new Uint8Array(U.abuf),D=0;D<T.length;D++){var N=T[D].img,$=N.length;B.push(new Uint8Array(U.inds.buffer,V>>2,$>>2));for(var x=0;x<$;x+=4)N[x]=F[V+x],N[x+1]=F[V+x+1],N[x+2]=F[V+x+2],N[x+3]=F[V+x+3];V+=$}for(var D=0;D<U.plte.length;D++)O.push(U.plte[D].est.rgba)}else for(var x=0;x<T.length;x++){var I=T[x],q=new Uint32Array(I.img.buffer),ee=I.rect.width,k=q.length,Z=new Uint8Array(k);B.push(Z);for(var D=0;D<k;D++){var J=q[D];if(D!=0&&J==q[D-1])Z[D]=Z[D-1];else if(D>ee&&J==q[D-ee])Z[D]=Z[D-ee];else{var Q=S[J];if(Q==null&&(S[J]=Q=O.length,O.push(J),O.length>=300))break;Z[D]=Q}}}var ne=O.length;ne<=256&&d==!1&&(ne<=2?C=1:ne<=4?C=2:ne<=16?C=4:C=8,C=Math.max(C,g));for(var x=0;x<T.length;x++){var I=T[x];I.rect.x,I.rect.y;var ee=I.rect.width,K=I.rect.height,H=I.img;new Uint32Array(H.buffer);var te=4*ee,ae=4;if(ne<=256&&d==!1){te=Math.ceil(C*ee/8);for(var ie=new Uint8Array(te*K),pe=B[x],be=0;be<K;be++){var D=be*te,me=be*ee;if(C==8)for(var ce=0;ce<ee;ce++)ie[D+ce]=pe[me+ce];else if(C==4)for(var ce=0;ce<ee;ce++)ie[D+(ce>>1)]|=pe[me+ce]<<4-(ce&1)*4;else if(C==2)for(var ce=0;ce<ee;ce++)ie[D+(ce>>2)]|=pe[me+ce]<<6-(ce&3)*2;else if(C==1)for(var ce=0;ce<ee;ce++)ie[D+(ce>>3)]|=pe[me+ce]<<7-(ce&7)*1}H=ie,m=3,ae=1}else if(A==!1&&T.length==1){for(var ie=new Uint8Array(ee*K*3),Oe=ee*K,D=0;D<Oe;D++){var N=D*3,Ne=D*4;ie[N]=H[Ne],ie[N+1]=H[Ne+1],ie[N+2]=H[Ne+2]}H=ie,m=2,ae=3,te=3*ee}I.img=H,I.bpl=te,I.bpp=ae}return{ctype:m,depth:C,plte:O,frames:T}},Be.encode.framize=function(e,r,t,i,l,f){for(var c=[],p=0;p<e.length;p++){var g=new Uint8Array(e[p]),d=new Uint32Array(g.buffer),m,C=0,b=0,x=r,E=t,k=i?1:0;if(p!=0){for(var D=f||i||p==1||c[p-2].dispose!=0?1:2,A=0,T=1e9,S=0;S<D;S++){for(var I=new Uint8Array(e[p-1-S]),O=new Uint32Array(e[p-1-S]),B=r,z=t,M=-1,U=-1,V=0;V<t;V++)for(var F=0;F<r;F++){var N=V*r+F;d[N]!=O[N]&&(F<B&&(B=F),F>M&&(M=F),V<z&&(z=V),V>U&&(U=V))}M==-1&&(B=z=M=U=0),l&&((B&1)==1&&B--,(z&1)==1&&z--);var $=(M-B+1)*(U-z+1);$<T&&(T=$,A=S,C=B,b=z,x=M-B+1,E=U-z+1)}var I=new Uint8Array(e[p-1-A]);A==1&&(c[p-1].dispose=2),m=new Uint8Array(x*E*4),Be._copyTile(I,r,t,m,x,E,-C,-b,0),k=Be._copyTile(g,r,t,m,x,E,-C,-b,3)?1:0,k==1?Be.encode._prepareDiff(g,r,t,m,{x:C,y:b,width:x,height:E}):Be._copyTile(g,r,t,m,x,E,-C,-b,0)}else m=g.slice(0);c.push({rect:{x:C,y:b,width:x,height:E},img:m,blend:k,dispose:0})}if(i)for(var p=0;p<c.length;p++){var q=c[p];if(q.blend!=1){var ee=q.rect,Z=c[p-1].rect,J=Math.min(ee.x,Z.x),Q=Math.min(ee.y,Z.y),ne=Math.max(ee.x+ee.width,Z.x+Z.width),K=Math.max(ee.y+ee.height,Z.y+Z.height),H={x:J,y:Q,width:ne-J,height:K-Q};c[p-1].dispose=1,p-1!=0&&Be.encode._updateFrame(e,r,t,c,p-1,H,l),Be.encode._updateFrame(e,r,t,c,p,H,l)}}var te=0;if(e.length!=1)for(var N=0;N<c.length;N++){var q=c[N];te+=q.rect.width*q.rect.height}return c},Be.encode._updateFrame=function(e,r,t,i,l,f,c){for(var p=Uint8Array,g=Uint32Array,d=new p(e[l-1]),m=new g(e[l-1]),C=l+1<e.length?new p(e[l+1]):null,b=new p(e[l]),x=new g(b.buffer),E=r,k=t,D=-1,A=-1,T=0;T<f.height;T++)for(var S=0;S<f.width;S++){var O=f.x+S,B=f.y+T,z=B*r+O,M=x[z];M==0||i[l-1].dispose==0&&m[z]==M&&(C==null||C[z*4+3]!=0)||(O<E&&(E=O),O>D&&(D=O),B<k&&(k=B),B>A&&(A=B))}D==-1&&(E=k=D=A=0),c&&((E&1)==1&&E--,(k&1)==1&&k--),f={x:E,y:k,width:D-E+1,height:A-k+1};var U=i[l];U.rect=f,U.blend=1,U.img=new Uint8Array(f.width*f.height*4),i[l-1].dispose==0?(Be._copyTile(d,r,t,U.img,f.width,f.height,-f.x,-f.y,0),Be.encode._prepareDiff(b,r,t,U.img,f)):Be._copyTile(b,r,t,U.img,f.width,f.height,-f.x,-f.y,0)},Be.encode._prepareDiff=function(e,r,t,i,l){Be._copyTile(e,r,t,i,l.width,l.height,-l.x,-l.y,2)},Be.encode._filterZero=function(e,r,t,i,l,f,c){var p=[],g=[0,1,2,3,4];f!=-1?g=[f]:(r*i>5e5||t==1)&&(g=[0]);var d;c&&(d={level:0});for(var m=l.length>1e7&&UZIP!=null?UZIP:dP,C=0;C<g.length;C++){for(var b=0;b<r;b++)Be.encode._filterLine(l,e,b,i,t,g[C]);p.push(m.deflate(l,d))}for(var x,E=1e9,C=0;C<p.length;C++)p[C].length<E&&(x=C,E=p[C].length);return p[x]},Be.encode._filterLine=function(e,r,t,i,l,f){var c=t*i,p=c+t,g=Be.decode._paeth;if(e[p]=f,p++,f==0)if(i<500)for(var d=0;d<i;d++)e[p+d]=r[c+d];else e.set(new Uint8Array(r.buffer,c,i),p);else if(f==1){for(var d=0;d<l;d++)e[p+d]=r[c+d];for(var d=l;d<i;d++)e[p+d]=r[c+d]-r[c+d-l]+256&255}else if(t==0){for(var d=0;d<l;d++)e[p+d]=r[c+d];if(f==2)for(var d=l;d<i;d++)e[p+d]=r[c+d];if(f==3)for(var d=l;d<i;d++)e[p+d]=r[c+d]-(r[c+d-l]>>1)+256&255;if(f==4)for(var d=l;d<i;d++)e[p+d]=r[c+d]-g(r[c+d-l],0,0)+256&255}else{if(f==2)for(var d=0;d<i;d++)e[p+d]=r[c+d]+256-r[c+d-i]&255;if(f==3){for(var d=0;d<l;d++)e[p+d]=r[c+d]+256-(r[c+d-i]>>1)&255;for(var d=l;d<i;d++)e[p+d]=r[c+d]+256-(r[c+d-i]+r[c+d-l]>>1)&255}if(f==4){for(var d=0;d<l;d++)e[p+d]=r[c+d]+256-g(0,r[c+d-i],0)&255;for(var d=l;d<i;d++)e[p+d]=r[c+d]+256-g(r[c+d-l],r[c+d-i],r[c+d-l-i])&255}}},Be.crc={table:function(){for(var e=new Uint32Array(256),r=0;r<256;r++){for(var t=r,i=0;i<8;i++)t&1?t=3988292384^t>>>1:t=t>>>1;e[r]=t}return e}(),update:function(e,r,t,i){for(var l=0;l<i;l++)e=Be.crc.table[(e^r[t+l])&255]^e>>>8;return e},crc:function(e,r,t){return Be.crc.update(4294967295,e,r,t)^4294967295}},Be.quantize=function(e,r){var t=new Uint8Array(e),i=t.slice(0),l=new Uint32Array(i.buffer),f=Be.quantize.getKDtree(i,r),c=f[0],p=f[1],g=Be.quantize.planeDst,d=t,m=l,C=d.length,b=new Uint8Array(t.length>>2),x;if(t.length<2e7)for(var E=0;E<C;E+=4){var k=d[E]*.00392156862745098,D=d[E+1]*(1/255),A=d[E+2]*(1/255),T=d[E+3]*(1/255);x=Be.quantize.getNearest(c,k,D,A,T),b[E>>2]=x.ind,m[E>>2]=x.est.rgba}else for(var E=0;E<C;E+=4){var k=d[E]*.00392156862745098,D=d[E+1]*(1/255),A=d[E+2]*(1/255),T=d[E+3]*(1/255);for(x=c;x.left;)x=g(x.est,k,D,A,T)<=0?x.left:x.right;b[E>>2]=x.ind,m[E>>2]=x.est.rgba}return{abuf:i.buffer,inds:b,plte:p}},Be.quantize.getKDtree=function(e,r,t){t==null&&(t=1e-4);var i=new Uint32Array(e.buffer),l={i0:0,i1:e.length,bst:null,est:null,tdst:0,left:null,right:null};l.bst=Be.quantize.stats(e,l.i0,l.i1),l.est=Be.quantize.estats(l.bst);for(var f=[l];f.length<r;){for(var c=0,p=0,g=0;g<f.length;g++)f[g].est.L>c&&(c=f[g].est.L,p=g);if(c<t)break;var d=f[p],m=Be.quantize.splitPixels(e,i,d.i0,d.i1,d.est.e,d.est.eMq255),C=d.i0>=m||d.i1<=m;if(C){d.est.L=0;continue}var b={i0:d.i0,i1:m,bst:null,est:null,tdst:0,left:null,right:null};b.bst=Be.quantize.stats(e,b.i0,b.i1),b.est=Be.quantize.estats(b.bst);var x={i0:m,i1:d.i1,bst:null,est:null,tdst:0,left:null,right:null};x.bst={R:[],m:[],N:d.bst.N-b.bst.N};for(var g=0;g<16;g++)x.bst.R[g]=d.bst.R[g]-b.bst.R[g];for(var g=0;g<4;g++)x.bst.m[g]=d.bst.m[g]-b.bst.m[g];x.est=Be.quantize.estats(x.bst),d.left=b,d.right=x,f[p]=b,f.push(x)}f.sort(function(E,k){return k.bst.N-E.bst.N});for(var g=0;g<f.length;g++)f[g].ind=g;return[l,f]},Be.quantize.getNearest=function(e,r,t,i,l){if(e.left==null)return e.tdst=Be.quantize.dist(e.est.q,r,t,i,l),e;var f=Be.quantize.planeDst(e.est,r,t,i,l),c=e.left,p=e.right;f>0&&(c=e.right,p=e.left);var g=Be.quantize.getNearest(c,r,t,i,l);if(g.tdst<=f*f)return g;var d=Be.quantize.getNearest(p,r,t,i,l);return d.tdst<g.tdst?d:g},Be.quantize.planeDst=function(e,r,t,i,l){var f=e.e;return f[0]*r+f[1]*t+f[2]*i+f[3]*l-e.eMq},Be.quantize.dist=function(e,r,t,i,l){var f=r-e[0],c=t-e[1],p=i-e[2],g=l-e[3];return f*f+c*c+p*p+g*g},Be.quantize.splitPixels=function(e,r,t,i,l,f){var c=Be.quantize.vecDot;for(i-=4;t<i;){for(;c(e,t,l)<=f;)t+=4;for(;c(e,i,l)>f;)i-=4;if(t>=i)break;var p=r[t>>2];r[t>>2]=r[i>>2],r[i>>2]=p,t+=4,i-=4}for(;c(e,t,l)>f;)t-=4;return t+4},Be.quantize.vecDot=function(e,r,t){return e[r]*t[0]+e[r+1]*t[1]+e[r+2]*t[2]+e[r+3]*t[3]},Be.quantize.stats=function(e,r,t){for(var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],l=[0,0,0,0],f=t-r>>2,c=r;c<t;c+=4){var p=e[c]*.00392156862745098,g=e[c+1]*(1/255),d=e[c+2]*(1/255),m=e[c+3]*(1/255);l[0]+=p,l[1]+=g,l[2]+=d,l[3]+=m,i[0]+=p*p,i[1]+=p*g,i[2]+=p*d,i[3]+=p*m,i[5]+=g*g,i[6]+=g*d,i[7]+=g*m,i[10]+=d*d,i[11]+=d*m,i[15]+=m*m}return i[4]=i[1],i[8]=i[2],i[9]=i[6],i[12]=i[3],i[13]=i[7],i[14]=i[11],{R:i,m:l,N:f}},Be.quantize.estats=function(e){var r=e.R,t=e.m,i=e.N,l=t[0],f=t[1],c=t[2],p=t[3],g=i==0?0:1/i,d=[r[0]-l*l*g,r[1]-l*f*g,r[2]-l*c*g,r[3]-l*p*g,r[4]-f*l*g,r[5]-f*f*g,r[6]-f*c*g,r[7]-f*p*g,r[8]-c*l*g,r[9]-c*f*g,r[10]-c*c*g,r[11]-c*p*g,r[12]-p*l*g,r[13]-p*f*g,r[14]-p*c*g,r[15]-p*p*g],m=d,C=Be.M4,b=[Math.random(),Math.random(),Math.random(),Math.random()],x=0,E=0;if(i!=0)for(var k=0;k<16&&(b=C.multVec(m,b),E=Math.sqrt(C.dot(b,b)),b=C.sml(1/E,b),!(k!=0&&Math.abs(E-x)<1e-9));k++)x=E;var D=[l*g,f*g,c*g,p*g],A=C.dot(C.sml(255,D),b);return{Cov:d,q:D,e:b,L:x,eMq255:A,eMq:C.dot(b,D),rgba:(Math.round(255*D[3])<<24|Math.round(255*D[2])<<16|Math.round(255*D[1])<<8|Math.round(255*D[0])<<0)>>>0}},Be.M4={multVec:function(e,r){return[e[0]*r[0]+e[1]*r[1]+e[2]*r[2]+e[3]*r[3],e[4]*r[0]+e[5]*r[1]+e[6]*r[2]+e[7]*r[3],e[8]*r[0]+e[9]*r[1]+e[10]*r[2]+e[11]*r[3],e[12]*r[0]+e[13]*r[1]+e[14]*r[2]+e[15]*r[3]]},dot:function(e,r){return e[0]*r[0]+e[1]*r[1]+e[2]*r[2]+e[3]*r[3]},sml:function(e,r){return[e*r[0],e*r[1],e*r[2],e*r[3]]}},Be.encode.concatRGBA=function(e){for(var r=0,t=0;t<e.length;t++)r+=e[t].byteLength;for(var i=new Uint8Array(r),l=0,t=0;t<e.length;t++){for(var f=new Uint8Array(e[t]),c=f.length,p=0;p<c;p+=4){var g=f[p],d=f[p+1],m=f[p+2],C=f[p+3];C==0&&(g=d=m=0),i[l+p]=g,i[l+p+1]=d,i[l+p+2]=m,i[l+p+3]=C}l+=c}return i.buffer};const hP=e=>new Promise((r,t)=>{const i=new FileReader;i.onloadend=l=>r(l.target.result),i.onerror=l=>t(l),i.readAsDataURL(e)}),pP=e=>new Promise((r,t)=>{const i=new Image;i.onload=()=>r(i),i.onerror=l=>t(l),i.src=e}),vP=(e,r,t)=>new Promise(i=>e.toBlob(l=>i(l),r,t)),mP=e=>{const i=e.width,l=e.height;let f=e.width,c=e.height;return(i>2e3||l>2e3)&&(i/l>2e3/2e3?(f=2e3,c=Math.round(2e3*(l/i))):(c=2e3,f=Math.round(2e3*(i/l)))),{width:f,height:c}},gP=e=>{let r=0;return e>1||e<0?r=0:r=e?e*256:0,r},n6=async(e,r=.5,t=5)=>{const i=e.name;if(e.size/1024/1024<t)return e;try{const l=document.createElement("canvas"),f=l.getContext("2d"),c=await hP(e),p=await pP(c),g=mP(p);if(l.width=g.width,l.height=g.height,f.clearRect(0,0,g.width,g.height),f.drawImage(p,0,0,g.width,g.height),["image/jpeg","image/jpg"].includes(e.type)){const d=await vP(l,e.type,r);return new File([d],i,{type:e.type})}else{const d=f.getImageData(0,0,g.width,g.height).data,m=gP(r),C=Be.encode([d.buffer],g.width,g.height,m);return new File([C],e.name,{type:e.type})}}catch{return e}},r6=[Jf.jpeg,Jf.jpg,Jf.png],a6=e=>{const{maxCount:r=1,listType:t="picture-card",fileList:i=[],maxSize:l=2,accept:f=r6.join(","),uploadBtnName:c="上传",uploadHint:p=null,compression:g}=e,[d,m]=G.useState(!1),[C,b]=G.useState(""),x=()=>t!=="text"?Pe("div",{style:{position:"relative"},children:[Pe("div",{children:[W(Fb,{}),W("div",{style:{marginTop:8},children:c})]}),p]}):Pe(tn,{children:[W(ve.Button,{icon:W(Nb,{}),children:c}),p]}),E=T=>new Promise(async(O,B)=>{const z=f.split(","),M=fg(T.name)||"";if(f&&!z.includes(M)&&(ve.message.error(`只允许上传 ${f} 文件`),B(!1)),!(T.size/1024/1024<l)&&!g&&(ve.message.error(`文件必须小于${l}MB`),B(!1)),g){let V=0;async function F($){if(!g)return;const I=await n6($,g.quality,g.limit);if(V++,V>=5)return I;if(I.size/1024/1024>l)await F(I);else return I}const N=await F(T);O(N)}O(T)}).catch(O=>ve.Upload.LIST_IGNORE),k=T=>{e.onChange&&e.onChange(T)},D=T=>{e.onPreview?e.onPreview(T):A(T)},A=async T=>{let S=fg(T.name)||"";if(S||(S=fg(T.name||T.url)||""),S===Jf.pdf)return ve.Modal.info({title:"PDF",width:"60%",content:W("iframe",{title:"PDF预览",src:T.url||T.response.url,frameBorder:"0",style:{width:"100%",height:"70vh"}}),okText:"关闭"});r6.includes(S)&&(!T.url&&!T.thumbUrl&&!T.preview&&(T.preview=await N8(T.originFileObj)),b(T.url||T.thumbUrl||T.preview),m(!0))};return Pe(tn,{children:[W(ve.Upload,{beforeUpload:E,onChange:k,listType:t,...e,onPreview:D,children:i.length>=r?null:x()}),W(ve.Image,{style:{display:"none"},preview:{visible:d,src:C,onVisibleChange:()=>{m(!1),b("")}}})]})},Eg={fieldModal:"create-form-module_fieldModal_8bf3d",content:"create-form-module_content_61f84",suffix:"create-form-module_suffix_42205",placeholder:"create-form-module_placeholder_90d6a"},yP={labelCol:{span:4},wrapperCol:{span:20}},i6=e=>{switch(e){case"upload":return"fileList";case"switch":return"checked";default:return"value"}},g2=e=>{const{items:r,rowProps:t,formProps:i,readonly:l=!1,hiddenTitle:f=!1,langId:c="10001"}=e,p=(m,C)=>{var b,x;if(C.btnType==="submit"){(b=i==null?void 0:i.form)==null||b.validateFields().then(E=>{C.onClick&&C.onClick(E)});return}if(C.btnType==="reset"){(x=i==null?void 0:i.form)==null||x.resetFields(),C.onClick&&C.onClick(m);return}C.btnType==="cancel"&&C.onClick&&C.onClick(m)},g=m=>Array.isArray(m)?m:m&&m.fileList,d=m=>{var b;const C=i==null?void 0:i.initialValues;return m.dataIndex?((b=m.render)==null?void 0:b.call(m,C==null?void 0:C[m.dataIndex],C))||m.value||(C==null?void 0:C[m.dataIndex]):""};return W(ve.ConfigProvider,{theme:{components:{Select:{zIndexPopup:3e4}}},children:W(ve.Form,{layout:"horizontal",form:i==null?void 0:i.form,...yP,...i||{},children:W(ve.Row,{gutter:16,...t,children:r.filter(m=>!m.hidden).map((m,C)=>W(ve.Col,{...m.colProps||{span:24},children:W(ve.Form.Item,{...m.valueType==="upload"?{getValueFromEvent:g}:{},label:f?"":m.title,name:m.valueType==="btns"?void 0:m.dataIndex,...m.formItemProps,children:m.readonly?W("div",{children:d(m)}):m.readonly===void 0&&l?W("div",{children:d(m)}):W(o6,{onChange:b=>{var x;return(x=m==null?void 0:m.onChange)==null?void 0:x.call(m,b)},valueType:m.valueType,onBtnClick:p,valueProps:m.valueProps,formItemProps:m.formItemProps,langId:c})})},m.dataIndex||C))})})})},o6=e=>{const{valueType:r,valueProps:t,value:i,onChange:l,onBtnClick:f,inputRef:c,formItemProps:p,langId:g}=e,d=G.useMemo(()=>{let m=W(ve.Input,{placeholder:g==="10001"?"请输入":"Please input",allowClear:!0,...t});switch(r){case"rate":m=W(ve.Rate,{...t});break;case"password":m=W(ve.Input.Password,{...t});break;case"modal":m=W(xP,{...t});break;case"checkbox":m=W(ve.Checkbox.Group,{...t});break;case"select":m=W(ve.Select,{placeholder:g==="10001"?"请选择":"Please select",allowClear:!0,...t});break;case"inputNumber":m=W(ve.InputNumber,{style:{width:"100%"},placeholder:g==="10001"?"请输入":"Please input",...t});break;case"textarea":m=W(ve.Input.TextArea,{placeholder:g==="10001"?"请输入":"Please input",allowClear:!0,...t});break;case"radio":m=W(ve.Radio.Group,{...t});break;case"switch":m=W(ve.Switch,{...t});break;case"datePicker":m=W(ve.DatePicker,{style:{width:"100%"},allowClear:!0,...t});break;case"rangePicker":m=W(ve.DatePicker.RangePicker,{style:{width:"100%"},allowClear:!0,...t});break;case"timePicker":m=W(ve.TimePicker,{style:{width:"100%"},allowClear:!0,...t});break;case"cascader":m=W(ve.Cascader,{allowClear:!0,...t});break;case"upload":m=W(a6,{...t});break;case"btns":m=W(ve.Space,{children:t==null?void 0:t.map(C=>G.createElement(ve.Button,{type:C.btnType==="submit"?"primary":"default",...Js.omit(C,["btnType"]),key:C.key||C.btnType,onClick:b=>{f==null||f(b,C)}},C.title||C.children))});break}return m},[r,t,l,i]);if(r==="custom"){const m=t;return G.cloneElement(m.children,{[(p==null?void 0:p.valuePropName)||i6(r||"input")]:i,onChange:l,ref:c})}return G.cloneElement(d,{[i6(r||"input")]:i,onChange:l,ref:c})},xP=e=>{const{placeholder:r,labelKey:t,onToggle:i,value:l,onClear:f,className:c,style:p}=e;return Pe("div",{className:[Eg.fieldModal,c].filter(g=>g).join(" "),style:p,children:[W("div",{className:Eg.content,onClick:()=>i(!0),children:l?W("span",{children:l[t]}):W("span",{className:Eg.placeholder,children:r})}),W("span",{className:Eg.suffix,onClick:f,children:l&&W(b7,{})})]})};var y2={exports:{}},$h={},Sg={exports:{}},l6={},Ct={exports:{}},x2={exports:{}},gn={};var s6;function bP(){if(s6)return gn;s6=1;var e=typeof Symbol=="function"&&Symbol.for,r=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,l=e?Symbol.for("react.strict_mode"):60108,f=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,p=e?Symbol.for("react.context"):60110,g=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,C=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,x=e?Symbol.for("react.memo"):60115,E=e?Symbol.for("react.lazy"):60116,k=e?Symbol.for("react.block"):60121,D=e?Symbol.for("react.fundamental"):60117,A=e?Symbol.for("react.responder"):60118,T=e?Symbol.for("react.scope"):60119;function S(B){if(typeof B=="object"&&B!==null){var z=B.$$typeof;switch(z){case r:switch(B=B.type,B){case g:case d:case i:case f:case l:case C:return B;default:switch(B=B&&B.$$typeof,B){case p:case m:case E:case x:case c:return B;default:return z}}case t:return z}}}function O(B){return S(B)===d}return gn.AsyncMode=g,gn.ConcurrentMode=d,gn.ContextConsumer=p,gn.ContextProvider=c,gn.Element=r,gn.ForwardRef=m,gn.Fragment=i,gn.Lazy=E,gn.Memo=x,gn.Portal=t,gn.Profiler=f,gn.StrictMode=l,gn.Suspense=C,gn.isAsyncMode=function(B){return O(B)||S(B)===g},gn.isConcurrentMode=O,gn.isContextConsumer=function(B){return S(B)===p},gn.isContextProvider=function(B){return S(B)===c},gn.isElement=function(B){return typeof B=="object"&&B!==null&&B.$$typeof===r},gn.isForwardRef=function(B){return S(B)===m},gn.isFragment=function(B){return S(B)===i},gn.isLazy=function(B){return S(B)===E},gn.isMemo=function(B){return S(B)===x},gn.isPortal=function(B){return S(B)===t},gn.isProfiler=function(B){return S(B)===f},gn.isStrictMode=function(B){return S(B)===l},gn.isSuspense=function(B){return S(B)===C},gn.isValidElementType=function(B){return typeof B=="string"||typeof B=="function"||B===i||B===d||B===f||B===l||B===C||B===b||typeof B=="object"&&B!==null&&(B.$$typeof===E||B.$$typeof===x||B.$$typeof===c||B.$$typeof===p||B.$$typeof===m||B.$$typeof===D||B.$$typeof===A||B.$$typeof===T||B.$$typeof===k)},gn.typeOf=S,gn}var yn={};var u6;function CP(){return u6||(u6=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,r=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,l=e?Symbol.for("react.strict_mode"):60108,f=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,p=e?Symbol.for("react.context"):60110,g=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,C=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,x=e?Symbol.for("react.memo"):60115,E=e?Symbol.for("react.lazy"):60116,k=e?Symbol.for("react.block"):60121,D=e?Symbol.for("react.fundamental"):60117,A=e?Symbol.for("react.responder"):60118,T=e?Symbol.for("react.scope"):60119;function S(Se){return typeof Se=="string"||typeof Se=="function"||Se===i||Se===d||Se===f||Se===l||Se===C||Se===b||typeof Se=="object"&&Se!==null&&(Se.$$typeof===E||Se.$$typeof===x||Se.$$typeof===c||Se.$$typeof===p||Se.$$typeof===m||Se.$$typeof===D||Se.$$typeof===A||Se.$$typeof===T||Se.$$typeof===k)}function O(Se){if(typeof Se=="object"&&Se!==null){var it=Se.$$typeof;switch(it){case r:var He=Se.type;switch(He){case g:case d:case i:case f:case l:case C:return He;default:var gt=He&&He.$$typeof;switch(gt){case p:case m:case E:case x:case c:return gt;default:return it}}case t:return it}}}var B=g,z=d,M=p,U=c,V=r,F=m,N=i,$=E,I=x,q=t,ee=f,Z=l,J=C,Q=!1;function ne(Se){return Q||(Q=!0),K(Se)||O(Se)===g}function K(Se){return O(Se)===d}function H(Se){return O(Se)===p}function te(Se){return O(Se)===c}function ae(Se){return typeof Se=="object"&&Se!==null&&Se.$$typeof===r}function ie(Se){return O(Se)===m}function pe(Se){return O(Se)===i}function be(Se){return O(Se)===E}function me(Se){return O(Se)===x}function ce(Se){return O(Se)===t}function Oe(Se){return O(Se)===f}function Ne(Se){return O(Se)===l}function tt(Se){return O(Se)===C}yn.AsyncMode=B,yn.ConcurrentMode=z,yn.ContextConsumer=M,yn.ContextProvider=U,yn.Element=V,yn.ForwardRef=F,yn.Fragment=N,yn.Lazy=$,yn.Memo=I,yn.Portal=q,yn.Profiler=ee,yn.StrictMode=Z,yn.Suspense=J,yn.isAsyncMode=ne,yn.isConcurrentMode=K,yn.isContextConsumer=H,yn.isContextProvider=te,yn.isElement=ae,yn.isForwardRef=ie,yn.isFragment=pe,yn.isLazy=be,yn.isMemo=me,yn.isPortal=ce,yn.isProfiler=Oe,yn.isStrictMode=Ne,yn.isSuspense=tt,yn.isValidElementType=S,yn.typeOf=O}()),yn}var c6;function f6(){return c6||(c6=1,function(e){process.env.NODE_ENV==="production"?e.exports=bP():e.exports=CP()}(x2)),x2.exports}var b2,d6;function wP(){if(d6)return b2;d6=1;var e=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function i(f){if(f==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(f)}function l(){try{if(!Object.assign)return!1;var f=new String("abc");if(f[5]="de",Object.getOwnPropertyNames(f)[0]==="5")return!1;for(var c={},p=0;p<10;p++)c["_"+String.fromCharCode(p)]=p;var g=Object.getOwnPropertyNames(c).map(function(m){return c[m]});if(g.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(m){d[m]=m}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return b2=l()?Object.assign:function(f,c){for(var p,g=i(f),d,m=1;m<arguments.length;m++){p=Object(arguments[m]);for(var C in p)r.call(p,C)&&(g[C]=p[C]);if(e){d=e(p);for(var b=0;b<d.length;b++)t.call(p,d[b])&&(g[d[b]]=p[d[b]])}}return g},b2}var C2,h6;function w2(){if(h6)return C2;h6=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return C2=e,C2}var _2,p6;function v6(){return p6||(p6=1,_2=Function.call.bind(Object.prototype.hasOwnProperty)),_2}var E2,m6;function _P(){if(m6)return E2;m6=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var r=w2(),t={},i=v6();e=function(f){var c="Warning: "+f;try{throw new Error(c)}catch{}}}function l(f,c,p,g,d){if(process.env.NODE_ENV!=="production"){for(var m in f)if(i(f,m)){var C;try{if(typeof f[m]!="function"){var b=Error((g||"React class")+": "+p+" type `"+m+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof f[m]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw b.name="Invariant Violation",b}C=f[m](c,m,g,p,null,r)}catch(E){C=E}if(C&&!(C instanceof Error)&&e((g||"React class")+": type specification of "+p+" `"+m+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof C+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),C instanceof Error&&!(C.message in t)){t[C.message]=!0;var x=d?d():"";e("Failed "+p+" type: "+C.message+(x??""))}}}}return l.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},E2=l,E2}var S2,g6;function EP(){if(g6)return S2;g6=1;var e=f6(),r=wP(),t=w2(),i=v6(),l=_P(),f=function(){};process.env.NODE_ENV!=="production"&&(f=function(p){var g="Warning: "+p;try{throw new Error(g)}catch{}});function c(){return null}return S2=function(p,g){var d=typeof Symbol=="function"&&Symbol.iterator,m="@@iterator";function C(K){var H=K&&(d&&K[d]||K[m]);if(typeof H=="function")return H}var b="<<anonymous>>",x={array:A("array"),bigint:A("bigint"),bool:A("boolean"),func:A("function"),number:A("number"),object:A("object"),string:A("string"),symbol:A("symbol"),any:T(),arrayOf:S,element:O(),elementType:B(),instanceOf:z,node:F(),objectOf:U,oneOf:M,oneOfType:V,shape:$,exact:I};function E(K,H){return K===H?K!==0||1/K===1/H:K!==K&&H!==H}function k(K,H){this.message=K,this.data=H&&typeof H=="object"?H:{},this.stack=""}k.prototype=Error.prototype;function D(K){if(process.env.NODE_ENV!=="production")var H={},te=0;function ae(pe,be,me,ce,Oe,Ne,tt){if(ce=ce||b,Ne=Ne||me,tt!==t){if(g){var Se=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 Se.name="Invariant Violation",Se}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var it=ce+":"+me;!H[it]&&te<3&&(f("You are manually calling a React.PropTypes validation function for the `"+Ne+"` prop on `"+ce+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),H[it]=!0,te++)}}return be[me]==null?pe?be[me]===null?new k("The "+Oe+" `"+Ne+"` is marked as required "+("in `"+ce+"`, but its value is `null`.")):new k("The "+Oe+" `"+Ne+"` is marked as required in "+("`"+ce+"`, but its value is `undefined`.")):null:K(be,me,ce,Oe,Ne)}var ie=ae.bind(null,!1);return ie.isRequired=ae.bind(null,!0),ie}function A(K){function H(te,ae,ie,pe,be,me){var ce=te[ae],Oe=Z(ce);if(Oe!==K){var Ne=J(ce);return new k("Invalid "+pe+" `"+be+"` of type "+("`"+Ne+"` supplied to `"+ie+"`, expected ")+("`"+K+"`."),{expectedType:K})}return null}return D(H)}function T(){return D(c)}function S(K){function H(te,ae,ie,pe,be){if(typeof K!="function")return new k("Property `"+be+"` of component `"+ie+"` has invalid PropType notation inside arrayOf.");var me=te[ae];if(!Array.isArray(me)){var ce=Z(me);return new k("Invalid "+pe+" `"+be+"` of type "+("`"+ce+"` supplied to `"+ie+"`, expected an array."))}for(var Oe=0;Oe<me.length;Oe++){var Ne=K(me,Oe,ie,pe,be+"["+Oe+"]",t);if(Ne instanceof Error)return Ne}return null}return D(H)}function O(){function K(H,te,ae,ie,pe){var be=H[te];if(!p(be)){var me=Z(be);return new k("Invalid "+ie+" `"+pe+"` of type "+("`"+me+"` supplied to `"+ae+"`, expected a single ReactElement."))}return null}return D(K)}function B(){function K(H,te,ae,ie,pe){var be=H[te];if(!e.isValidElementType(be)){var me=Z(be);return new k("Invalid "+ie+" `"+pe+"` of type "+("`"+me+"` supplied to `"+ae+"`, expected a single ReactElement type."))}return null}return D(K)}function z(K){function H(te,ae,ie,pe,be){if(!(te[ae]instanceof K)){var me=K.name||b,ce=ne(te[ae]);return new k("Invalid "+pe+" `"+be+"` of type "+("`"+ce+"` supplied to `"+ie+"`, expected ")+("instance of `"+me+"`."))}return null}return D(H)}function M(K){if(!Array.isArray(K))return process.env.NODE_ENV!=="production"&&(arguments.length>1?f("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):f("Invalid argument supplied to oneOf, expected an array.")),c;function H(te,ae,ie,pe,be){for(var me=te[ae],ce=0;ce<K.length;ce++)if(E(me,K[ce]))return null;var Oe=JSON.stringify(K,function(tt,Se){var it=J(Se);return it==="symbol"?String(Se):Se});return new k("Invalid "+pe+" `"+be+"` of value `"+String(me)+"` "+("supplied to `"+ie+"`, expected one of "+Oe+"."))}return D(H)}function U(K){function H(te,ae,ie,pe,be){if(typeof K!="function")return new k("Property `"+be+"` of component `"+ie+"` has invalid PropType notation inside objectOf.");var me=te[ae],ce=Z(me);if(ce!=="object")return new k("Invalid "+pe+" `"+be+"` of type "+("`"+ce+"` supplied to `"+ie+"`, expected an object."));for(var Oe in me)if(i(me,Oe)){var Ne=K(me,Oe,ie,pe,be+"."+Oe,t);if(Ne instanceof Error)return Ne}return null}return D(H)}function V(K){if(!Array.isArray(K))return process.env.NODE_ENV!=="production"&&f("Invalid argument supplied to oneOfType, expected an instance of array."),c;for(var H=0;H<K.length;H++){var te=K[H];if(typeof te!="function")return f("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Q(te)+" at index "+H+"."),c}function ae(ie,pe,be,me,ce){for(var Oe=[],Ne=0;Ne<K.length;Ne++){var tt=K[Ne],Se=tt(ie,pe,be,me,ce,t);if(Se==null)return null;Se.data&&i(Se.data,"expectedType")&&Oe.push(Se.data.expectedType)}var it=Oe.length>0?", expected one of type ["+Oe.join(", ")+"]":"";return new k("Invalid "+me+" `"+ce+"` supplied to "+("`"+be+"`"+it+"."))}return D(ae)}function F(){function K(H,te,ae,ie,pe){return q(H[te])?null:new k("Invalid "+ie+" `"+pe+"` supplied to "+("`"+ae+"`, expected a ReactNode."))}return D(K)}function N(K,H,te,ae,ie){return new k((K||"React class")+": "+H+" type `"+te+"."+ae+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ie+"`.")}function $(K){function H(te,ae,ie,pe,be){var me=te[ae],ce=Z(me);if(ce!=="object")return new k("Invalid "+pe+" `"+be+"` of type `"+ce+"` "+("supplied to `"+ie+"`, expected `object`."));for(var Oe in K){var Ne=K[Oe];if(typeof Ne!="function")return N(ie,pe,be,Oe,J(Ne));var tt=Ne(me,Oe,ie,pe,be+"."+Oe,t);if(tt)return tt}return null}return D(H)}function I(K){function H(te,ae,ie,pe,be){var me=te[ae],ce=Z(me);if(ce!=="object")return new k("Invalid "+pe+" `"+be+"` of type `"+ce+"` "+("supplied to `"+ie+"`, expected `object`."));var Oe=r({},te[ae],K);for(var Ne in Oe){var tt=K[Ne];if(i(K,Ne)&&typeof tt!="function")return N(ie,pe,be,Ne,J(tt));if(!tt)return new k("Invalid "+pe+" `"+be+"` key `"+Ne+"` supplied to `"+ie+"`.\nBad object: "+JSON.stringify(te[ae],null," ")+`
194
194
  Valid keys: `+JSON.stringify(Object.keys(K),null," "));var Se=tt(me,Ne,ie,pe,be+"."+Ne,t);if(Se)return Se}return null}return D(H)}function q(K){switch(typeof K){case"number":case"string":case"undefined":return!0;case"boolean":return!K;case"object":if(Array.isArray(K))return K.every(q);if(K===null||p(K))return!0;var H=C(K);if(H){var te=H.call(K),ae;if(H!==K.entries){for(;!(ae=te.next()).done;)if(!q(ae.value))return!1}else for(;!(ae=te.next()).done;){var ie=ae.value;if(ie&&!q(ie[1]))return!1}}else return!1;return!0;default:return!1}}function ee(K,H){return K==="symbol"?!0:H?H["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&H instanceof Symbol:!1}function Z(K){var H=typeof K;return Array.isArray(K)?"array":K instanceof RegExp?"object":ee(H,K)?"symbol":H}function J(K){if(typeof K>"u"||K===null)return""+K;var H=Z(K);if(H==="object"){if(K instanceof Date)return"date";if(K instanceof RegExp)return"regexp"}return H}function Q(K){var H=J(K);switch(H){case"array":case"object":return"an "+H;case"boolean":case"date":case"regexp":return"a "+H;default:return H}}function ne(K){return!K.constructor||!K.constructor.name?b:K.constructor.name}return x.checkPropTypes=l,x.resetWarningCache=l.resetWarningCache,x.PropTypes=x,x},S2}var D2,y6;function SP(){if(y6)return D2;y6=1;var e=w2();function r(){}function t(){}return t.resetWarningCache=r,D2=function(){function i(c,p,g,d,m,C){if(C!==e){var b=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 b.name="Invariant Violation",b}}i.isRequired=i;function l(){return i}var f={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:l,element:i,elementType:i,instanceOf:l,node:i,objectOf:l,oneOf:l,oneOfType:l,shape:l,exact:l,checkPropTypes:t,resetWarningCache:r};return f.PropTypes=f,f},D2}if(process.env.NODE_ENV!=="production"){var DP=f6(),kP=!0;Ct.exports=EP()(DP.isElement,kP)}else Ct.exports=SP()();function x6(e){var r,t,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e))for(r=0;r<e.length;r++)e[r]&&(t=x6(e[r]))&&(i&&(i+=" "),i+=t);else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function Ae(){for(var e,r,t=0,i="";t<arguments.length;)(e=arguments[t++])&&(r=x6(e))&&(i&&(i+=" "),i+=r);return i}const TP=P4(Object.freeze(Object.defineProperty({__proto__:null,clsx:Ae,default:Ae},Symbol.toStringTag,{value:"Module"})));var or={},sl={};Object.defineProperty(sl,"__esModule",{value:!0}),sl.dontSetMe=NP,sl.findInArray=AP,sl.int=FP,sl.isFunction=OP,sl.isNum=RP;function AP(e,r){for(let t=0,i=e.length;t<i;t++)if(r.apply(r,[e[t],t,e]))return e[t]}function OP(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Function]"}function RP(e){return typeof e=="number"&&!isNaN(e)}function FP(e){return parseInt(e,10)}function NP(e,r,t){if(e[r])return new Error("Invalid prop ".concat(r," passed to ").concat(t," - do not set this, set it on the child."))}var Ec={};Object.defineProperty(Ec,"__esModule",{value:!0}),Ec.browserPrefixToKey=C6,Ec.browserPrefixToStyle=MP,Ec.default=void 0,Ec.getPrefix=b6;const k2=["Moz","Webkit","O","ms"];function b6(){var e;let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";const t=(e=window.document)===null||e===void 0||(e=e.documentElement)===null||e===void 0?void 0:e.style;if(!t||r in t)return"";for(let i=0;i<k2.length;i++)if(C6(r,k2[i])in t)return k2[i];return""}function C6(e,r){return r?"".concat(r).concat(PP(e)):e}function MP(e,r){return r?"-".concat(r.toLowerCase(),"-").concat(e):e}function PP(e){let r="",t=!0;for(let i=0;i<e.length;i++)t?(r+=e[i].toUpperCase(),t=!1):e[i]==="-"?t=!0:r+=e[i];return r}Ec.default=b6(),Object.defineProperty(or,"__esModule",{value:!0}),or.addClassName=S6,or.addEvent=zP,or.addUserSelectStyles=WP,or.createCSSTransform=YP,or.createSVGTransform=qP,or.getTouch=GP,or.getTouchIdentifier=KP,or.getTranslation=T2,or.innerHeight=HP,or.innerWidth=VP,or.matchesSelector=E6,or.matchesSelectorAndParentsTo=LP,or.offsetXYFromParent=$P,or.outerHeight=jP,or.outerWidth=IP,or.removeClassName=D6,or.removeEvent=UP,or.removeUserSelectStyles=QP;var Ri=sl,w6=BP(Ec);function _6(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(_6=function(i){return i?t:r})(e)}function BP(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=_6(r);if(t&&t.has(e))return t.get(e);var i={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in e)if(f!=="default"&&Object.prototype.hasOwnProperty.call(e,f)){var c=l?Object.getOwnPropertyDescriptor(e,f):null;c&&(c.get||c.set)?Object.defineProperty(i,f,c):i[f]=e[f]}return i.default=e,t&&t.set(e,i),i}let Dg="";function E6(e,r){return Dg||(Dg=(0,Ri.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(t){return(0,Ri.isFunction)(e[t])})),(0,Ri.isFunction)(e[Dg])?e[Dg](r):!1}function LP(e,r,t){let i=e;do{if(E6(i,r))return!0;if(i===t)return!1;i=i.parentNode}while(i);return!1}function zP(e,r,t,i){if(!e)return;const l={capture:!0,...i};e.addEventListener?e.addEventListener(r,t,l):e.attachEvent?e.attachEvent("on"+r,t):e["on"+r]=t}function UP(e,r,t,i){if(!e)return;const l={capture:!0,...i};e.removeEventListener?e.removeEventListener(r,t,l):e.detachEvent?e.detachEvent("on"+r,t):e["on"+r]=null}function jP(e){let r=e.clientHeight;const t=e.ownerDocument.defaultView.getComputedStyle(e);return r+=(0,Ri.int)(t.borderTopWidth),r+=(0,Ri.int)(t.borderBottomWidth),r}function IP(e){let r=e.clientWidth;const t=e.ownerDocument.defaultView.getComputedStyle(e);return r+=(0,Ri.int)(t.borderLeftWidth),r+=(0,Ri.int)(t.borderRightWidth),r}function HP(e){let r=e.clientHeight;const t=e.ownerDocument.defaultView.getComputedStyle(e);return r-=(0,Ri.int)(t.paddingTop),r-=(0,Ri.int)(t.paddingBottom),r}function VP(e){let r=e.clientWidth;const t=e.ownerDocument.defaultView.getComputedStyle(e);return r-=(0,Ri.int)(t.paddingLeft),r-=(0,Ri.int)(t.paddingRight),r}function $P(e,r,t){const l=r===r.ownerDocument.body?{left:0,top:0}:r.getBoundingClientRect(),f=(e.clientX+r.scrollLeft-l.left)/t,c=(e.clientY+r.scrollTop-l.top)/t;return{x:f,y:c}}function YP(e,r){const t=T2(e,r,"px");return{[(0,w6.browserPrefixToKey)("transform",w6.default)]:t}}function qP(e,r){return T2(e,r,"")}function T2(e,r,t){let{x:i,y:l}=e,f="translate(".concat(i).concat(t,",").concat(l).concat(t,")");if(r){const c="".concat(typeof r.x=="string"?r.x:r.x+t),p="".concat(typeof r.y=="string"?r.y:r.y+t);f="translate(".concat(c,", ").concat(p,")")+f}return f}function GP(e,r){return e.targetTouches&&(0,Ri.findInArray)(e.targetTouches,t=>r===t.identifier)||e.changedTouches&&(0,Ri.findInArray)(e.changedTouches,t=>r===t.identifier)}function KP(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function WP(e){if(!e)return;let r=e.getElementById("react-draggable-style-el");r||(r=e.createElement("style"),r.type="text/css",r.id="react-draggable-style-el",r.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
195
195
  `,r.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
196
196
  `,e.getElementsByTagName("head")[0].appendChild(r)),e.body&&S6(e.body,"react-draggable-transparent-selection")}function QP(e){if(e)try{if(e.body&&D6(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const r=(e.defaultView||window).getSelection();r&&r.type!=="Caret"&&r.removeAllRanges()}}catch{}}function S6(e,r){e.classList?e.classList.add(r):e.className.match(new RegExp("(?:^|\\s)".concat(r,"(?!\\S)")))||(e.className+=" ".concat(r))}function D6(e,r){e.classList?e.classList.remove(r):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(r,"(?!\\S)"),"g"),"")}var ul={};Object.defineProperty(ul,"__esModule",{value:!0}),ul.canDragX=JP,ul.canDragY=eB,ul.createCoreData=nB,ul.createDraggableData=rB,ul.getBoundPosition=ZP,ul.getControlPosition=tB,ul.snapToGrid=XP;var Fi=sl,sd=or;function ZP(e,r,t){if(!e.props.bounds)return[r,t];let{bounds:i}=e.props;i=typeof i=="string"?i:aB(i);const l=A2(e);if(typeof i=="string"){const{ownerDocument:f}=l,c=f.defaultView;let p;if(i==="parent"?p=l.parentNode:p=f.querySelector(i),!(p instanceof c.HTMLElement))throw new Error('Bounds selector "'+i+'" could not find an element.');const g=p,d=c.getComputedStyle(l),m=c.getComputedStyle(g);i={left:-l.offsetLeft+(0,Fi.int)(m.paddingLeft)+(0,Fi.int)(d.marginLeft),top:-l.offsetTop+(0,Fi.int)(m.paddingTop)+(0,Fi.int)(d.marginTop),right:(0,sd.innerWidth)(g)-(0,sd.outerWidth)(l)-l.offsetLeft+(0,Fi.int)(m.paddingRight)-(0,Fi.int)(d.marginRight),bottom:(0,sd.innerHeight)(g)-(0,sd.outerHeight)(l)-l.offsetTop+(0,Fi.int)(m.paddingBottom)-(0,Fi.int)(d.marginBottom)}}return(0,Fi.isNum)(i.right)&&(r=Math.min(r,i.right)),(0,Fi.isNum)(i.bottom)&&(t=Math.min(t,i.bottom)),(0,Fi.isNum)(i.left)&&(r=Math.max(r,i.left)),(0,Fi.isNum)(i.top)&&(t=Math.max(t,i.top)),[r,t]}function XP(e,r,t){const i=Math.round(r/e[0])*e[0],l=Math.round(t/e[1])*e[1];return[i,l]}function JP(e){return e.props.axis==="both"||e.props.axis==="x"}function eB(e){return e.props.axis==="both"||e.props.axis==="y"}function tB(e,r,t){const i=typeof r=="number"?(0,sd.getTouch)(e,r):null;if(typeof r=="number"&&!i)return null;const l=A2(t),f=t.props.offsetParent||l.offsetParent||l.ownerDocument.body;return(0,sd.offsetXYFromParent)(i||e,f,t.props.scale)}function nB(e,r,t){const i=!(0,Fi.isNum)(e.lastX),l=A2(e);return i?{node:l,deltaX:0,deltaY:0,lastX:r,lastY:t,x:r,y:t}:{node:l,deltaX:r-e.lastX,deltaY:t-e.lastY,lastX:e.lastX,lastY:e.lastY,x:r,y:t}}function rB(e,r){const t=e.props.scale;return{node:r.node,x:e.state.x+r.deltaX/t,y:e.state.y+r.deltaY/t,deltaX:r.deltaX/t,deltaY:r.deltaY/t,lastX:e.state.x,lastY:e.state.y}}function aB(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function A2(e){const r=e.findDOMNode();if(!r)throw new Error("<DraggableCore>: Unmounted during event!");return r}var kg={},Tg={};Object.defineProperty(Tg,"__esModule",{value:!0}),Tg.default=iB;function iB(){}Object.defineProperty(kg,"__esModule",{value:!0}),kg.default=void 0;var O2=lB(G),oi=F2(Ct.exports),oB=F2(eu.exports),_a=or,ou=ul,R2=sl,Yh=F2(Tg);function F2(e){return e&&e.__esModule?e:{default:e}}function k6(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(k6=function(i){return i?t:r})(e)}function lB(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=k6(r);if(t&&t.has(e))return t.get(e);var i={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in e)if(f!=="default"&&Object.prototype.hasOwnProperty.call(e,f)){var c=l?Object.getOwnPropertyDescriptor(e,f):null;c&&(c.get||c.set)?Object.defineProperty(i,f,c):i[f]=e[f]}return i.default=e,t&&t.set(e,i),i}function Ha(e,r,t){return r=sB(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function sB(e){var r=uB(e,"string");return typeof r=="symbol"?r:String(r)}function uB(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,r||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}const xo={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let lu=xo.mouse,Ag=class extends O2.Component{constructor(){super(...arguments),Ha(this,"dragging",!1),Ha(this,"lastX",NaN),Ha(this,"lastY",NaN),Ha(this,"touchIdentifier",null),Ha(this,"mounted",!1),Ha(this,"handleDragStart",r=>{if(this.props.onMouseDown(r),!this.props.allowAnyClick&&typeof r.button=="number"&&r.button!==0)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:i}=t;if(this.props.disabled||!(r.target instanceof i.defaultView.Node)||this.props.handle&&!(0,_a.matchesSelectorAndParentsTo)(r.target,this.props.handle,t)||this.props.cancel&&(0,_a.matchesSelectorAndParentsTo)(r.target,this.props.cancel,t))return;r.type==="touchstart"&&r.preventDefault();const l=(0,_a.getTouchIdentifier)(r);this.touchIdentifier=l;const f=(0,ou.getControlPosition)(r,l,this);if(f==null)return;const{x:c,y:p}=f,g=(0,ou.createCoreData)(this,c,p);(0,Yh.default)("DraggableCore: handleDragStart: %j",g),(0,Yh.default)("calling",this.props.onStart),!(this.props.onStart(r,g)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,_a.addUserSelectStyles)(i),this.dragging=!0,this.lastX=c,this.lastY=p,(0,_a.addEvent)(i,lu.move,this.handleDrag),(0,_a.addEvent)(i,lu.stop,this.handleDragStop))}),Ha(this,"handleDrag",r=>{const t=(0,ou.getControlPosition)(r,this.touchIdentifier,this);if(t==null)return;let{x:i,y:l}=t;if(Array.isArray(this.props.grid)){let p=i-this.lastX,g=l-this.lastY;if([p,g]=(0,ou.snapToGrid)(this.props.grid,p,g),!p&&!g)return;i=this.lastX+p,l=this.lastY+g}const f=(0,ou.createCoreData)(this,i,l);if((0,Yh.default)("DraggableCore: handleDrag: %j",f),this.props.onDrag(r,f)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const g=document.createEvent("MouseEvents");g.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(g)}return}this.lastX=i,this.lastY=l}),Ha(this,"handleDragStop",r=>{if(!this.dragging)return;const t=(0,ou.getControlPosition)(r,this.touchIdentifier,this);if(t==null)return;let{x:i,y:l}=t;if(Array.isArray(this.props.grid)){let g=i-this.lastX||0,d=l-this.lastY||0;[g,d]=(0,ou.snapToGrid)(this.props.grid,g,d),i=this.lastX+g,l=this.lastY+d}const f=(0,ou.createCoreData)(this,i,l);if(this.props.onStop(r,f)===!1||this.mounted===!1)return!1;const p=this.findDOMNode();p&&this.props.enableUserSelectHack&&(0,_a.removeUserSelectStyles)(p.ownerDocument),(0,Yh.default)("DraggableCore: handleDragStop: %j",f),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,p&&((0,Yh.default)("DraggableCore: Removing handlers"),(0,_a.removeEvent)(p.ownerDocument,lu.move,this.handleDrag),(0,_a.removeEvent)(p.ownerDocument,lu.stop,this.handleDragStop))}),Ha(this,"onMouseDown",r=>(lu=xo.mouse,this.handleDragStart(r))),Ha(this,"onMouseUp",r=>(lu=xo.mouse,this.handleDragStop(r))),Ha(this,"onTouchStart",r=>(lu=xo.touch,this.handleDragStart(r))),Ha(this,"onTouchEnd",r=>(lu=xo.touch,this.handleDragStop(r)))}componentDidMount(){this.mounted=!0;const r=this.findDOMNode();r&&(0,_a.addEvent)(r,xo.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const r=this.findDOMNode();if(r){const{ownerDocument:t}=r;(0,_a.removeEvent)(t,xo.mouse.move,this.handleDrag),(0,_a.removeEvent)(t,xo.touch.move,this.handleDrag),(0,_a.removeEvent)(t,xo.mouse.stop,this.handleDragStop),(0,_a.removeEvent)(t,xo.touch.stop,this.handleDragStop),(0,_a.removeEvent)(r,xo.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,_a.removeUserSelectStyles)(t)}}findDOMNode(){var r,t;return(r=this.props)!==null&&r!==void 0&&r.nodeRef?(t=this.props)===null||t===void 0||(t=t.nodeRef)===null||t===void 0?void 0:t.current:oB.default.findDOMNode(this)}render(){return O2.cloneElement(O2.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};kg.default=Ag,Ha(Ag,"displayName","DraggableCore"),Ha(Ag,"propTypes",{allowAnyClick:oi.default.bool,children:oi.default.node.isRequired,disabled:oi.default.bool,enableUserSelectHack:oi.default.bool,offsetParent:function(e,r){if(e[r]&&e[r].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:oi.default.arrayOf(oi.default.number),handle:oi.default.string,cancel:oi.default.string,nodeRef:oi.default.object,onStart:oi.default.func,onDrag:oi.default.func,onStop:oi.default.func,onMouseDown:oi.default.func,scale:oi.default.number,className:R2.dontSetMe,style:R2.dontSetMe,transform:R2.dontSetMe}),Ha(Ag,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return g.default}}),e.default=void 0;var r=b(G),t=m(Ct.exports),i=m(eu.exports),l=m(TP),f=or,c=ul,p=sl,g=m(kg),d=m(Tg);function m(T){return T&&T.__esModule?T:{default:T}}function C(T){if(typeof WeakMap!="function")return null;var S=new WeakMap,O=new WeakMap;return(C=function(B){return B?O:S})(T)}function b(T,S){if(!S&&T&&T.__esModule)return T;if(T===null||typeof T!="object"&&typeof T!="function")return{default:T};var O=C(S);if(O&&O.has(T))return O.get(T);var B={},z=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var M in T)if(M!=="default"&&Object.prototype.hasOwnProperty.call(T,M)){var U=z?Object.getOwnPropertyDescriptor(T,M):null;U&&(U.get||U.set)?Object.defineProperty(B,M,U):B[M]=T[M]}return B.default=T,O&&O.set(T,B),B}function x(){return x=Object.assign?Object.assign.bind():function(T){for(var S=1;S<arguments.length;S++){var O=arguments[S];for(var B in O)Object.prototype.hasOwnProperty.call(O,B)&&(T[B]=O[B])}return T},x.apply(this,arguments)}function E(T,S,O){return S=k(S),S in T?Object.defineProperty(T,S,{value:O,enumerable:!0,configurable:!0,writable:!0}):T[S]=O,T}function k(T){var S=D(T,"string");return typeof S=="symbol"?S:String(S)}function D(T,S){if(typeof T!="object"||T===null)return T;var O=T[Symbol.toPrimitive];if(O!==void 0){var B=O.call(T,S||"default");if(typeof B!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return(S==="string"?String:Number)(T)}class A extends r.Component{static getDerivedStateFromProps(S,O){let{position:B}=S,{prevPropsPosition:z}=O;return B&&(!z||B.x!==z.x||B.y!==z.y)?((0,d.default)("Draggable: getDerivedStateFromProps %j",{position:B,prevPropsPosition:z}),{x:B.x,y:B.y,prevPropsPosition:{...B}}):null}constructor(S){super(S),E(this,"onDragStart",(O,B)=>{if((0,d.default)("Draggable: onDragStart: %j",B),this.props.onStart(O,(0,c.createDraggableData)(this,B))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),E(this,"onDrag",(O,B)=>{if(!this.state.dragging)return!1;(0,d.default)("Draggable: onDrag: %j",B);const z=(0,c.createDraggableData)(this,B),M={x:z.x,y:z.y,slackX:0,slackY:0};if(this.props.bounds){const{x:V,y:F}=M;M.x+=this.state.slackX,M.y+=this.state.slackY;const[N,$]=(0,c.getBoundPosition)(this,M.x,M.y);M.x=N,M.y=$,M.slackX=this.state.slackX+(V-M.x),M.slackY=this.state.slackY+(F-M.y),z.x=M.x,z.y=M.y,z.deltaX=M.x-this.state.x,z.deltaY=M.y-this.state.y}if(this.props.onDrag(O,z)===!1)return!1;this.setState(M)}),E(this,"onDragStop",(O,B)=>{if(!this.state.dragging||this.props.onStop(O,(0,c.createDraggableData)(this,B))===!1)return!1;(0,d.default)("Draggable: onDragStop: %j",B);const M={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:V,y:F}=this.props.position;M.x=V,M.y=F}this.setState(M)}),this.state={dragging:!1,dragged:!1,x:S.position?S.position.x:S.defaultPosition.x,y:S.position?S.position.y:S.defaultPosition.y,prevPropsPosition:{...S.position},slackX:0,slackY:0,isElementSVG:!1},S.position&&(S.onDrag||S.onStop)}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var S,O;return(S=(O=this.props)===null||O===void 0||(O=O.nodeRef)===null||O===void 0?void 0:O.current)!==null&&S!==void 0?S:i.default.findDOMNode(this)}render(){const{axis:S,bounds:O,children:B,defaultPosition:z,defaultClassName:M,defaultClassNameDragging:U,defaultClassNameDragged:V,position:F,positionOffset:N,scale:$,...I}=this.props;let q={},ee=null;const J=!Boolean(F)||this.state.dragging,Q=F||z,ne={x:(0,c.canDragX)(this)&&J?this.state.x:Q.x,y:(0,c.canDragY)(this)&&J?this.state.y:Q.y};this.state.isElementSVG?ee=(0,f.createSVGTransform)(ne,N):q=(0,f.createCSSTransform)(ne,N);const K=(0,l.default)(B.props.className||"",M,{[U]:this.state.dragging,[V]:this.state.dragged});return r.createElement(g.default,x({},I,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),r.cloneElement(r.Children.only(B),{className:K,style:{...B.props.style,...q},transform:ee}))}}e.default=A,E(A,"displayName","Draggable"),E(A,"propTypes",{...g.default.propTypes,axis:t.default.oneOf(["both","x","y","none"]),bounds:t.default.oneOfType([t.default.shape({left:t.default.number,right:t.default.number,top:t.default.number,bottom:t.default.number}),t.default.string,t.default.oneOf([!1])]),defaultClassName:t.default.string,defaultClassNameDragging:t.default.string,defaultClassNameDragged:t.default.string,defaultPosition:t.default.shape({x:t.default.number,y:t.default.number}),positionOffset:t.default.shape({x:t.default.oneOfType([t.default.number,t.default.string]),y:t.default.oneOfType([t.default.number,t.default.string])}),position:t.default.shape({x:t.default.number,y:t.default.number}),className:p.dontSetMe,style:p.dontSetMe,transform:p.dontSetMe}),E(A,"defaultProps",{...g.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(l6);const{default:T6,DraggableCore:cB}=l6;Sg.exports=T6,Sg.exports.default=T6,Sg.exports.DraggableCore=cB;var N2={};N2.__esModule=!0,N2.cloneElement=mB;var fB=dB(G);function dB(e){return e&&e.__esModule?e:{default:e}}function A6(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),t.push.apply(t,i)}return t}function O6(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?A6(Object(t),!0).forEach(function(i){hB(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):A6(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function hB(e,r,t){return r=pB(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function pB(e){var r=vB(e,"string");return typeof r=="symbol"?r:String(r)}function vB(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,r||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function mB(e,r){return r.style&&e.props.style&&(r.style=O6(O6({},e.props.style),r.style)),r.className&&e.props.className&&(r.className=e.props.className+" "+r.className),fB.default.cloneElement(e,r)}var qh={};qh.__esModule=!0,qh.resizableProps=void 0;var Bt=gB(Ct.exports);function gB(e){return e&&e.__esModule?e:{default:e}}var yB={axis:Bt.default.oneOf(["both","x","y","none"]),className:Bt.default.string,children:Bt.default.element.isRequired,draggableOpts:Bt.default.shape({allowAnyClick:Bt.default.bool,cancel:Bt.default.string,children:Bt.default.node,disabled:Bt.default.bool,enableUserSelectHack:Bt.default.bool,offsetParent:Bt.default.node,grid:Bt.default.arrayOf(Bt.default.number),handle:Bt.default.string,nodeRef:Bt.default.object,onStart:Bt.default.func,onDrag:Bt.default.func,onStop:Bt.default.func,onMouseDown:Bt.default.func,scale:Bt.default.number}),height:function(){for(var r=arguments.length,t=new Array(r),i=0;i<r;i++)t[i]=arguments[i];var l=t[0];if(l.axis==="both"||l.axis==="y"){var f;return(f=Bt.default.number).isRequired.apply(f,t)}return Bt.default.number.apply(Bt.default,t)},handle:Bt.default.oneOfType([Bt.default.node,Bt.default.func]),handleSize:Bt.default.arrayOf(Bt.default.number),lockAspectRatio:Bt.default.bool,maxConstraints:Bt.default.arrayOf(Bt.default.number),minConstraints:Bt.default.arrayOf(Bt.default.number),onResizeStop:Bt.default.func,onResizeStart:Bt.default.func,onResize:Bt.default.func,resizeHandles:Bt.default.arrayOf(Bt.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:Bt.default.number,width:function(){for(var r=arguments.length,t=new Array(r),i=0;i<r;i++)t[i]=arguments[i];var l=t[0];if(l.axis==="both"||l.axis==="x"){var f;return(f=Bt.default.number).isRequired.apply(f,t)}return Bt.default.number.apply(Bt.default,t)}};qh.resizableProps=yB,$h.__esModule=!0,$h.default=void 0;var Gh=_B(G),xB=Sg.exports,bB=N2,CB=qh,wB=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function R6(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(R6=function(l){return l?t:r})(e)}function _B(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=R6(r);if(t&&t.has(e))return t.get(e);var i={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in e)if(f!=="default"&&Object.prototype.hasOwnProperty.call(e,f)){var c=l?Object.getOwnPropertyDescriptor(e,f):null;c&&(c.get||c.set)?Object.defineProperty(i,f,c):i[f]=e[f]}return i.default=e,t&&t.set(e,i),i}function M2(){return M2=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},M2.apply(this,arguments)}function EB(e,r){if(e==null)return{};var t={},i=Object.keys(e),l,f;for(f=0;f<i.length;f++)l=i[f],!(r.indexOf(l)>=0)&&(t[l]=e[l]);return t}function F6(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),t.push.apply(t,i)}return t}function P2(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?F6(Object(t),!0).forEach(function(i){SB(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):F6(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function SB(e,r,t){return r=DB(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function DB(e){var r=kB(e,"string");return typeof r=="symbol"?r:String(r)}function kB(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,r||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function TB(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,B2(e,r)}function B2(e,r){return B2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,l){return i.__proto__=l,i},B2(e,r)}var L2=function(e){TB(r,e);function r(){for(var i,l=arguments.length,f=new Array(l),c=0;c<l;c++)f[c]=arguments[c];return i=e.call.apply(e,[this].concat(f))||this,i.handleRefs={},i.lastHandleRect=null,i.slack=null,i}var t=r.prototype;return t.componentWillUnmount=function(){this.resetData()},t.resetData=function(){this.lastHandleRect=this.slack=null},t.runConstraints=function(l,f){var c=this.props,p=c.minConstraints,g=c.maxConstraints,d=c.lockAspectRatio;if(!p&&!g&&!d)return[l,f];if(d){var m=this.props.width/this.props.height,C=l-this.props.width,b=f-this.props.height;Math.abs(C)>Math.abs(b*m)?f=l/m:l=f*m}var x=l,E=f,k=this.slack||[0,0],D=k[0],A=k[1];return l+=D,f+=A,p&&(l=Math.max(p[0],l),f=Math.max(p[1],f)),g&&(l=Math.min(g[0],l),f=Math.min(g[1],f)),this.slack=[D+(x-l),A+(E-f)],[l,f]},t.resizeHandler=function(l,f){var c=this;return function(p,g){var d=g.node,m=g.deltaX,C=g.deltaY;l==="onResizeStart"&&c.resetData();var b=(c.props.axis==="both"||c.props.axis==="x")&&f!=="n"&&f!=="s",x=(c.props.axis==="both"||c.props.axis==="y")&&f!=="e"&&f!=="w";if(!(!b&&!x)){var E=f[0],k=f[f.length-1],D=d.getBoundingClientRect();if(c.lastHandleRect!=null){if(k==="w"){var A=D.left-c.lastHandleRect.left;m+=A}if(E==="n"){var T=D.top-c.lastHandleRect.top;C+=T}}c.lastHandleRect=D,k==="w"&&(m=-m),E==="n"&&(C=-C);var S=c.props.width+(b?m/c.props.transformScale:0),O=c.props.height+(x?C/c.props.transformScale:0),B=c.runConstraints(S,O);S=B[0],O=B[1];var z=S!==c.props.width||O!==c.props.height,M=typeof c.props[l]=="function"?c.props[l]:null,U=l==="onResize"&&!z;M&&!U&&(p.persist==null||p.persist(),M(p,{node:d,size:{width:S,height:O},handle:f})),l==="onResizeStop"&&c.resetData()}}},t.renderResizeHandle=function(l,f){var c=this.props.handle;if(!c)return Gh.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+l,ref:f});if(typeof c=="function")return c(l,f);var p=typeof c.type=="string",g=P2({ref:f},p?{}:{handleAxis:l});return Gh.cloneElement(c,g)},t.render=function(){var l=this,f=this.props,c=f.children,p=f.className,g=f.draggableOpts;f.width,f.height,f.handle,f.handleSize,f.lockAspectRatio,f.axis,f.minConstraints,f.maxConstraints,f.onResize,f.onResizeStop,f.onResizeStart;var d=f.resizeHandles;f.transformScale;var m=EB(f,wB);return(0,bB.cloneElement)(c,P2(P2({},m),{},{className:(p?p+" ":"")+"react-resizable",children:[].concat(c.props.children,d.map(function(C){var b,x=(b=l.handleRefs[C])!=null?b:l.handleRefs[C]=Gh.createRef();return Gh.createElement(xB.DraggableCore,M2({},g,{nodeRef:x,key:"resizableHandle-"+C,onStop:l.resizeHandler("onResizeStop",C),onStart:l.resizeHandler("onResizeStart",C),onDrag:l.resizeHandler("onResize",C)}),l.renderResizeHandle(C,x))}))}))},r}(Gh.Component);$h.default=L2,L2.propTypes=CB.resizableProps,L2.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1};var Og={};Og.__esModule=!0,Og.default=void 0;var z2=NB(G),AB=N6(Ct.exports),OB=N6($h),RB=qh,FB=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function N6(e){return e&&e.__esModule?e:{default:e}}function M6(e){if(typeof WeakMap!="function")return null;var r=new WeakMap,t=new WeakMap;return(M6=function(l){return l?t:r})(e)}function NB(e,r){if(!r&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=M6(r);if(t&&t.has(e))return t.get(e);var i={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in e)if(f!=="default"&&Object.prototype.hasOwnProperty.call(e,f)){var c=l?Object.getOwnPropertyDescriptor(e,f):null;c&&(c.get||c.set)?Object.defineProperty(i,f,c):i[f]=e[f]}return i.default=e,t&&t.set(e,i),i}function U2(){return U2=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},U2.apply(this,arguments)}function P6(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),t.push.apply(t,i)}return t}function Rg(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?P6(Object(t),!0).forEach(function(i){MB(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):P6(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function MB(e,r,t){return r=PB(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function PB(e){var r=BB(e,"string");return typeof r=="symbol"?r:String(r)}function BB(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,r||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function LB(e,r){if(e==null)return{};var t={},i=Object.keys(e),l,f;for(f=0;f<i.length;f++)l=i[f],!(r.indexOf(l)>=0)&&(t[l]=e[l]);return t}function zB(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,j2(e,r)}function j2(e,r){return j2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,l){return i.__proto__=l,i},j2(e,r)}var B6=function(e){zB(r,e);function r(){for(var i,l=arguments.length,f=new Array(l),c=0;c<l;c++)f[c]=arguments[c];return i=e.call.apply(e,[this].concat(f))||this,i.state={width:i.props.width,height:i.props.height,propsWidth:i.props.width,propsHeight:i.props.height},i.onResize=function(p,g){var d=g.size;i.props.onResize?(p.persist==null||p.persist(),i.setState(d,function(){return i.props.onResize&&i.props.onResize(p,g)})):i.setState(d)},i}r.getDerivedStateFromProps=function(l,f){return f.propsWidth!==l.width||f.propsHeight!==l.height?{width:l.width,height:l.height,propsWidth:l.width,propsHeight:l.height}:null};var t=r.prototype;return t.render=function(){var l=this.props,f=l.handle,c=l.handleSize;l.onResize;var p=l.onResizeStart,g=l.onResizeStop,d=l.draggableOpts,m=l.minConstraints,C=l.maxConstraints,b=l.lockAspectRatio,x=l.axis;l.width,l.height;var E=l.resizeHandles,k=l.style,D=l.transformScale,A=LB(l,FB);return z2.createElement(OB.default,{axis:x,draggableOpts:d,handle:f,handleSize:c,height:this.state.height,lockAspectRatio:b,maxConstraints:C,minConstraints:m,onResizeStart:p,onResize:this.onResize,onResizeStop:g,resizeHandles:E,transformScale:D,width:this.state.width},z2.createElement("div",U2({},A,{style:Rg(Rg({},k),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},r}(z2.Component);Og.default=B6,B6.propTypes=Rg(Rg({},RB.resizableProps),{},{children:AB.default.element}),y2.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")};var UB=y2.exports.Resizable=$h.default;y2.exports.ResizableBox=Og.default;const jB={search:"search-table-module_search_17add",table:"search-table-module_table_5f652"},IB=e=>{const{onResize:r,width:t,resizeable:i,...l}=e;return!t||!i?W("th",{...l}):W(UB,{width:t||200,height:0,onResize:r,draggableOpts:{enableUserSelectHack:!1},children:W("th",{...l})})};function HB(e){const{tableProps:r={},searchProps:t,langId:i}=e,{minColumnWidth:l=200,resizeable:f=!1,tableId:c,storageKey:p="szld_table_cell_width",emptyText:g,...d}=r,[m,C]=G.useState(r.columns||[]),b=D=>{var T,S;let A=D.width||l;if(D.dataIndex&&c){const O=Array.isArray(D.dataIndex)?D.dataIndex.join("-"):String(D.dataIndex),B=(S=(T=Ub(p))==null?void 0:T[c])==null?void 0:S[O];B&&(A=B)}return A};G.useEffect(()=>{const D=r.columns||[];if(D.length===0||!f){C(D);return}const A=D==null?void 0:D.filter(T=>!T.hidden).map(T=>T.dataIndex?{...T,width:b(T),onHeaderCell:S=>({width:S.width,resizeable:f,onResize:(O,{size:B})=>x(S,B)})}:T);A.length>0&&(A[A.length-1].minWidth=A[A.length-1].width,A[A.length-1].width=void 0),C(A)},[r.columns,c,l,f]);const x=(D,A)=>{C(T=>{const S=T==null?void 0:T.map(O=>O.dataIndex===D.dataIndex?{...O,width:A.width}:O);if(c){const O=Ub(p)||{};O[c]=O[c]||{},S==null||S.forEach(B=>{if(B.dataIndex){const z=Array.isArray(B.dataIndex)?B.dataIndex.join("-"):String(B.dataIndex);O[c][z]=B.width}}),localStorage.setItem(p,JSON.stringify(O))}return S})},E={header:{cell:IB},...d==null?void 0:d.components},k=G.useMemo(()=>{var A;const D=T=>{let S=T.width||T.minWidth;return(!S||typeof S=="string")&&(S=l),S};return(A=m==null?void 0:m.map(T=>D(T)))==null?void 0:A.reduce((T,S)=>T+S,0)},[m,l]);return Pe(tn,{children:[t&&W(g2,{hiddenTitle:!0,...t,items:t.items}),W(ve.Table,{scroll:{x:k},...d,components:E,columns:m,className:ts(jB.table,r==null?void 0:r.className),locale:{emptyText:W(ve.Empty,{image:ve.Empty.PRESENTED_IMAGE_SIMPLE,description:g})},pagination:typeof(r==null?void 0:r.pagination)=="boolean"?r.pagination:{showPrevNextJumpers:!0,showQuickJumper:!0,showSizeChanger:!0,showTotal:D=>i==="10001"?`共 ${D} 条`:`Total ${D} items`,...r==null?void 0:r.pagination}})]})}const VB={editableCellValueWrap:"editable-module_editableCellValueWrap_3b3d9"},L6=G.createContext(null),$B=({index:e,...r})=>{const[t]=ve.Form.useForm();return W(ve.Form,{form:t,component:!1,children:W(L6.Provider,{value:t,children:W("tr",{...r})})})};function YB(e){const{title:r,editable:t,children:i,dataIndex:l,record:f,rules:c,onChange:p,type:g="input",valueProps:d,initialValue:m,...C}=e,b=G.useRef(null),x=G.useContext(L6),E=async()=>{try{const A=await x.validateFields();p({...f,...A})}catch{}},k=()=>W(o6,{valueType:g,valueProps:{...d,onBlur:E,onPressEnter:E},inputRef:b});let D=i;return t&&(D=W(ve.Form.Item,{style:{margin:0},initialValue:m||Js.get(f,l),name:l,rules:c,children:k()})),W("td",{...C,children:D})}function qB(e){const{columns:r,onChange:t,...i}=e,l={body:{row:$B,cell:YB}},f=r==null?void 0:r.map(c=>c.editable?{...c,onCell:p=>({...c,record:p,onChange:t})}:c);return W(ve.Table,{...i,components:l,rowClassName:()=>VB.editableRow,columns:f})}const z6=e=>{const{auth:r=!0,...t}=e;return r?W(ve.Button,{...t}):null},GB=e=>{const{PId:r,auths:t,...i}=e,l=G.useMemo(()=>t?!!(typeof r=="number"&&t.find(f=>f.PId===r)||Array.isArray(r)&&t.filter(f=>r.includes(f.PId)).length>0):!1,[r,t]);return W(z6,{...i,auth:l})},Kh={wrapper:"LoopSlide-module_wrapper_dde90",container:"LoopSlide-module_container_be123",scrollContent:"LoopSlide-module_scrollContent_36ed7",content:"LoopSlide-module_content_f392a"},KB=({speed:e=10,delay:r=1,timingFunction:t="linear",className:i="",style:l,children:f,height:c="100vh",mouseControl:p=!1,classes:g})=>{const d=G.useRef(null),m=G.useRef(null),C=G.useRef(null),b=G.useRef(null),x=G.useRef(0),E=G.useRef(),k=G.useRef(0),D=G.useMemo(()=>{if(!m.current||!C.current)return;const M=m.current,U=C.current,V=parseFloat(U.scrollHeight.toString());return V*2-M.clientHeight<V},[]),A=()=>{if(!m.current||!C.current)return;const M=m.current,U=C.current,V=parseFloat(U.scrollHeight.toString());if(V*2<=M.clientHeight){M.style.animation="none";return}const F=V/M.clientHeight;M.style.setProperty("--content-height",`${V}px`),M.style.animationDuration=`${e*F}s`,M.style.animationDelay=`${r}s`,M.style.animationTimingFunction=t};G.useEffect(()=>(A(),m.current&&(b.current=new ResizeObserver(A),b.current.observe(m.current)),()=>{b.current&&m.current&&b.current.unobserve(m.current)}),[e,r]);const T=()=>{p&&m.current&&(m.current.style.animationPlayState="paused")},S=()=>{p&&m.current&&(z(),m.current.style.animationPlayState="running")},O=()=>{if(!m.current||!p)return;const U=m.current.getAnimations()[0];if(U)if(Math.abs(x.current)>.1){const V=performance.now(),F=V-k.current;k.current=V;const N=.95;x.current*=Math.pow(N,F/16);const $=U.currentTime||0;U.currentTime=$+x.current,E.current=requestAnimationFrame(O)}else x.current=0,z()},B=M=>{if(!p||!m.current)return;M.preventDefault();const U=M.deltaY,V=.25;x.current+=U*V;const F=50;x.current=Math.max(-F,Math.min(F,x.current)),E.current||(k.current=performance.now(),E.current=requestAnimationFrame(O))},z=()=>{E.current&&(cancelAnimationFrame(E.current),E.current=void 0)};return G.useEffect(()=>()=>{z()},[]),G.useEffect(()=>{const M=d.current;if(M)return p&&M.addEventListener("wheel",B,{passive:!1}),()=>{M.removeEventListener("wheel",B)}},[p]),W("div",{ref:d,className:`${Kh.wrapper} ${i}`,style:{height:c,...l},onMouseEnter:T,onMouseLeave:S,children:Pe("div",{ref:m,className:ts(Kh.container,g==null?void 0:g.container),children:[W("div",{ref:C,className:ts(Kh.content,g==null?void 0:g.content),children:f}),W("div",{className:ts(Kh.content,g==null?void 0:g.content),children:f}),D&&W("div",{className:ts(Kh.content,g==null?void 0:g.content),children:f})]})})},Mr={main:"workflownode-module_main_dce7f",item:"workflownode-module_item_73d7c",tail:"workflownode-module_tail_3cb51",node:"workflownode-module_node_005fd",content:"workflownode-module_content_8334f",btn:"workflownode-module_btn_b0c06",collpase:"workflownode-module_collpase_f2468",title:"workflownode-module_title_cb34c",dateWrapper:"workflownode-module_dateWrapper_94849",remark:"workflownode-module_remark_4f910",itemActive:"workflownode-module_itemActive_2a29d",itemDone:"workflownode-module_itemDone_489bc",itemUnDo:"workflownode-module_itemUnDo_2914c"},U6=e=>{const{data:r,current:t,rowKey:i,renderContent:l}=e,[f,c]=G.useState(!1),p=G.useMemo(()=>e.currentIndex!==void 0?e.currentIndex:!t||r.length===0?0:r.findIndex(C=>C.PNId===t),[t,r]),g=G.useMemo(()=>p>1?f?0:p-1:0,[p,f]),d=()=>{c(!0)};return Pe("ul",{className:Mr.main,children:[p>1&&!f&&Pe("li",{className:ts(Mr.item,Mr.itemDone),children:[W("div",{className:Mr.tail}),W("div",{className:Mr.node}),W("div",{className:Mr.content,children:Pe("div",{className:Mr.collpase,children:[Pe("div",{children:["已收起",W("span",{children:p-1}),"个节点"]}),Pe("a",{className:Mr.btn,onClick:d,children:["展开节点",W(k7,{})]})]})})]}),r.slice(g).map((m,C)=>Pe("li",{className:ts(Mr.item,p===C+g?Mr.itemActive:p>C+g?Mr.itemDone:Mr.itemUnDo),children:[W("div",{className:Mr.tail}),W("div",{className:Mr.node}),Pe("div",{className:Mr.content,children:[l?l(m,C,f?p:p-g):Pe(tn,{children:[W("div",{className:Mr.title,children:m.PNName}),Pe("div",{className:Mr.dateWrapper,children:[m.PlanFinishDate&&Pe("span",{children:["预计完成时间: ",m.PlanFinishDate]}),m.UpdateTime&&Pe("span",{style:{color:"#333",fontWeight:"bold"},children:["实际完成时间: ",m.UpdateTime]})]}),m.Remark&&W("div",{className:Mr.remark,children:m.Remark})]}),f&&p-1===C&&Pe("a",{className:Mr.btn,onClick:()=>c(!1),children:["收起节点 ",W(G7,{})]})]})]},typeof i=="string"?m[i]:i(m)))]})},WB=e=>{const{current:r,data:t,rowKey:i,renderContent:l,currentIndex:f,...c}=e;return(()=>{ve.Modal.info({icon:null,title:"流程节点",width:700,content:W(U6,{rowKey:i,renderContent:l,current:r,currentIndex:f,data:t}),closable:!0,footer:null,maskClosable:!0,...c})})(),null},j6={customPagination:"custom-pagination-module_customPagination_bb6f7",jumpBtns:"custom-pagination-module_jumpBtns_a6c0b"};function QB(e){const{totalText:r="共",unitText:t="条",jumpText:i="跳至",pageText:l="页",paginationProps:f}=e,[c,p]=G.useState(""),g=(f==null?void 0:f.pageSize)||10,d=b=>{p(b.target.value)},m=b=>{var x;p(""),!Number.isNaN(Number(b.target.value))&&((x=f==null?void 0:f.onChange)==null||x.call(f,Number(b.target.value),g))},C=b=>{var x;if(b.key==="Enter"){if(p(""),Number.isNaN(Number(c)))return;(x=f==null?void 0:f.onChange)==null||x.call(f,Number(c),g)}};return Pe("div",{className:j6.customPagination,children:[W(ve.Pagination,{showTotal:b=>`${r} ${b} ${t}`,showSizeChanger:{options:[{label:`10 ${t}/${l}`,value:10},{label:`20 ${t}/${l}`,value:20},{label:`50 ${t}/${l}`,value:50},{label:`100 ${t}/${l}`,value:100}]},...f}),Pe("div",{className:j6.jumpBtns,children:[i,W(ve.Input,{style:{width:"50px",margin:"0 8px"},value:c,onChange:d,onBlur:b=>m(b),onKeyDown:b=>C(b)}),l]})]})}var I6={exports:{}};(function(e,r){(function(t,i){e.exports=i()})(Pt,function(){var t=1e3,i=6e4,l=36e5,f="millisecond",c="second",p="minute",g="hour",d="day",m="week",C="month",b="quarter",x="year",E="date",k="Invalid Date",D=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,A=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,T={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(q){var ee=["th","st","nd","rd"],Z=q%100;return"["+q+(ee[(Z-20)%10]||ee[Z]||ee[0])+"]"}},S=function(q,ee,Z){var J=String(q);return!J||J.length>=ee?q:""+Array(ee+1-J.length).join(Z)+q},O={s:S,z:function(q){var ee=-q.utcOffset(),Z=Math.abs(ee),J=Math.floor(Z/60),Q=Z%60;return(ee<=0?"+":"-")+S(J,2,"0")+":"+S(Q,2,"0")},m:function q(ee,Z){if(ee.date()<Z.date())return-q(Z,ee);var J=12*(Z.year()-ee.year())+(Z.month()-ee.month()),Q=ee.clone().add(J,C),ne=Z-Q<0,K=ee.clone().add(J+(ne?-1:1),C);return+(-(J+(Z-Q)/(ne?Q-K:K-Q))||0)},a:function(q){return q<0?Math.ceil(q)||0:Math.floor(q)},p:function(q){return{M:C,y:x,w:m,d,D:E,h:g,m:p,s:c,ms:f,Q:b}[q]||String(q||"").toLowerCase().replace(/s$/,"")},u:function(q){return q===void 0}},B="en",z={};z[B]=T;var M="$isDayjsObject",U=function(q){return q instanceof $||!(!q||!q[M])},V=function q(ee,Z,J){var Q;if(!ee)return B;if(typeof ee=="string"){var ne=ee.toLowerCase();z[ne]&&(Q=ne),Z&&(z[ne]=Z,Q=ne);var K=ee.split("-");if(!Q&&K.length>1)return q(K[0])}else{var H=ee.name;z[H]=ee,Q=H}return!J&&Q&&(B=Q),Q||!J&&B},F=function(q,ee){if(U(q))return q.clone();var Z=typeof ee=="object"?ee:{};return Z.date=q,Z.args=arguments,new $(Z)},N=O;N.l=V,N.i=U,N.w=function(q,ee){return F(q,{locale:ee.$L,utc:ee.$u,x:ee.$x,$offset:ee.$offset})};var $=function(){function q(Z){this.$L=V(Z.locale,null,!0),this.parse(Z),this.$x=this.$x||Z.x||{},this[M]=!0}var ee=q.prototype;return ee.parse=function(Z){this.$d=function(J){var Q=J.date,ne=J.utc;if(Q===null)return new Date(NaN);if(N.u(Q))return new Date;if(Q instanceof Date)return new Date(Q);if(typeof Q=="string"&&!/Z$/i.test(Q)){var K=Q.match(D);if(K){var H=K[2]-1||0,te=(K[7]||"0").substring(0,3);return ne?new Date(Date.UTC(K[1],H,K[3]||1,K[4]||0,K[5]||0,K[6]||0,te)):new Date(K[1],H,K[3]||1,K[4]||0,K[5]||0,K[6]||0,te)}}return new Date(Q)}(Z),this.init()},ee.init=function(){var Z=this.$d;this.$y=Z.getFullYear(),this.$M=Z.getMonth(),this.$D=Z.getDate(),this.$W=Z.getDay(),this.$H=Z.getHours(),this.$m=Z.getMinutes(),this.$s=Z.getSeconds(),this.$ms=Z.getMilliseconds()},ee.$utils=function(){return N},ee.isValid=function(){return this.$d.toString()!==k},ee.isSame=function(Z,J){var Q=F(Z);return this.startOf(J)<=Q&&Q<=this.endOf(J)},ee.isAfter=function(Z,J){return F(Z)<this.startOf(J)},ee.isBefore=function(Z,J){return this.endOf(J)<F(Z)},ee.$g=function(Z,J,Q){return N.u(Z)?this[J]:this.set(Q,Z)},ee.unix=function(){return Math.floor(this.valueOf()/1e3)},ee.valueOf=function(){return this.$d.getTime()},ee.startOf=function(Z,J){var Q=this,ne=!!N.u(J)||J,K=N.p(Z),H=function(Oe,Ne){var tt=N.w(Q.$u?Date.UTC(Q.$y,Ne,Oe):new Date(Q.$y,Ne,Oe),Q);return ne?tt:tt.endOf(d)},te=function(Oe,Ne){return N.w(Q.toDate()[Oe].apply(Q.toDate("s"),(ne?[0,0,0,0]:[23,59,59,999]).slice(Ne)),Q)},ae=this.$W,ie=this.$M,pe=this.$D,be="set"+(this.$u?"UTC":"");switch(K){case x:return ne?H(1,0):H(31,11);case C:return ne?H(1,ie):H(0,ie+1);case m:var me=this.$locale().weekStart||0,ce=(ae<me?ae+7:ae)-me;return H(ne?pe-ce:pe+(6-ce),ie);case d:case E:return te(be+"Hours",0);case g:return te(be+"Minutes",1);case p:return te(be+"Seconds",2);case c:return te(be+"Milliseconds",3);default:return this.clone()}},ee.endOf=function(Z){return this.startOf(Z,!1)},ee.$set=function(Z,J){var Q,ne=N.p(Z),K="set"+(this.$u?"UTC":""),H=(Q={},Q[d]=K+"Date",Q[E]=K+"Date",Q[C]=K+"Month",Q[x]=K+"FullYear",Q[g]=K+"Hours",Q[p]=K+"Minutes",Q[c]=K+"Seconds",Q[f]=K+"Milliseconds",Q)[ne],te=ne===d?this.$D+(J-this.$W):J;if(ne===C||ne===x){var ae=this.clone().set(E,1);ae.$d[H](te),ae.init(),this.$d=ae.set(E,Math.min(this.$D,ae.daysInMonth())).$d}else H&&this.$d[H](te);return this.init(),this},ee.set=function(Z,J){return this.clone().$set(Z,J)},ee.get=function(Z){return this[N.p(Z)]()},ee.add=function(Z,J){var Q,ne=this;Z=Number(Z);var K=N.p(J),H=function(ie){var pe=F(ne);return N.w(pe.date(pe.date()+Math.round(ie*Z)),ne)};if(K===C)return this.set(C,this.$M+Z);if(K===x)return this.set(x,this.$y+Z);if(K===d)return H(1);if(K===m)return H(7);var te=(Q={},Q[p]=i,Q[g]=l,Q[c]=t,Q)[K]||1,ae=this.$d.getTime()+Z*te;return N.w(ae,this)},ee.subtract=function(Z,J){return this.add(-1*Z,J)},ee.format=function(Z){var J=this,Q=this.$locale();if(!this.isValid())return Q.invalidDate||k;var ne=Z||"YYYY-MM-DDTHH:mm:ssZ",K=N.z(this),H=this.$H,te=this.$m,ae=this.$M,ie=Q.weekdays,pe=Q.months,be=Q.meridiem,me=function(Ne,tt,Se,it){return Ne&&(Ne[tt]||Ne(J,ne))||Se[tt].slice(0,it)},ce=function(Ne){return N.s(H%12||12,Ne,"0")},Oe=be||function(Ne,tt,Se){var it=Ne<12?"AM":"PM";return Se?it.toLowerCase():it};return ne.replace(A,function(Ne,tt){return tt||function(Se){switch(Se){case"YY":return String(J.$y).slice(-2);case"YYYY":return N.s(J.$y,4,"0");case"M":return ae+1;case"MM":return N.s(ae+1,2,"0");case"MMM":return me(Q.monthsShort,ae,pe,3);case"MMMM":return me(pe,ae);case"D":return J.$D;case"DD":return N.s(J.$D,2,"0");case"d":return String(J.$W);case"dd":return me(Q.weekdaysMin,J.$W,ie,2);case"ddd":return me(Q.weekdaysShort,J.$W,ie,3);case"dddd":return ie[J.$W];case"H":return String(H);case"HH":return N.s(H,2,"0");case"h":return ce(1);case"hh":return ce(2);case"a":return Oe(H,te,!0);case"A":return Oe(H,te,!1);case"m":return String(te);case"mm":return N.s(te,2,"0");case"s":return String(J.$s);case"ss":return N.s(J.$s,2,"0");case"SSS":return N.s(J.$ms,3,"0");case"Z":return K}return null}(Ne)||K.replace(":","")})},ee.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},ee.diff=function(Z,J,Q){var ne,K=this,H=N.p(J),te=F(Z),ae=(te.utcOffset()-this.utcOffset())*i,ie=this-te,pe=function(){return N.m(K,te)};switch(H){case x:ne=pe()/12;break;case C:ne=pe();break;case b:ne=pe()/3;break;case m:ne=(ie-ae)/6048e5;break;case d:ne=(ie-ae)/864e5;break;case g:ne=ie/l;break;case p:ne=ie/i;break;case c:ne=ie/t;break;default:ne=ie}return Q?ne:N.a(ne)},ee.daysInMonth=function(){return this.endOf(C).$D},ee.$locale=function(){return z[this.$L]},ee.locale=function(Z,J){if(!Z)return this.$L;var Q=this.clone(),ne=V(Z,J,!0);return ne&&(Q.$L=ne),Q},ee.clone=function(){return N.w(this.$d,this)},ee.toDate=function(){return new Date(this.valueOf())},ee.toJSON=function(){return this.isValid()?this.toISOString():null},ee.toISOString=function(){return this.$d.toISOString()},ee.toString=function(){return this.$d.toUTCString()},q}(),I=$.prototype;return F.prototype=I,[["$ms",f],["$s",c],["$m",p],["$H",g],["$W",d],["$M",C],["$y",x],["$D",E]].forEach(function(q){I[q[1]]=function(ee){return this.$g(ee,q[0],q[1])}}),F.extend=function(q,ee){return q.$i||(q(ee,$,F),q.$i=!0),F},F.locale=V,F.isDayjs=U,F.unix=function(q){return F(1e3*q)},F.en=z[B],F.Ls=z,F.p={},F})})(I6);const xn=I6.exports,Wh=(e,r)=>{const{input:t=""}=(e==null?void 0:e.json)||{};let i="请输入",l="Please input";return["radio","checkbox","select","mult-select","modal-select","modal-mult-select","mul-field-modal-select","cascader","radio-card","date-picker","range-picker","multiple-date-picker","time-picker","week-picker","month-picker","quarter-picker","year-picker","second-picker"].includes(t)&&(i="请选择",l="Please select"),["image","file","video","audio"].includes(t)&&(i="请上传",l="Please upload"),r==="10001"?i:l},Sc=e=>{var i,l,f,c;const r=(i=e.json)==null?void 0:i.input;let t=e.attrvalue||((l=e.json)==null?void 0:l.default);if(r==="label"&&t&&(t=((f=e.json)==null?void 0:f["label-value"])??t??"-"),r==="range-picker"&&t)try{t=t==null?void 0:t.split("~"),t=t.map(p=>p)}catch{t=void 0}if(r==="multiple-date-picker"&&t)try{t=t==null?void 0:t.split(","),t=t.map(p=>xn())}catch{t=void 0}if(r==="cascader"&&t&&typeof t=="string"){const p=(c=e.json)==null?void 0:c["cascader-delimiter"];p&&(t=t.split(p).filter(Boolean))}if(["mult-select","checkbox"].includes(r)&&t&&typeof t=="string"&&(t=t.split(",").filter(Boolean)),["image","video","audio","file"].includes(r)&&t)try{t=(Array.isArray(t)?t:JSON.parse(t)).map(g=>({...g,url:g.FilePath,name:g.FileName,uid:g.FileId}))}catch{t=[]}return e.attrtype===1&&(t=ZB(e.children||[])),t||null},H6=e=>e&&e<xn().startOf("day"),ZB=e=>{if(!(e!=null&&e.length))return[];const r=t=>t==null?void 0:t.map(i=>{const l={};return Array.isArray(i)&&i.forEach(f=>{var c;(c=f==null?void 0:f.children)!=null&&c.length?l[f.attrid]=r(f.children):l[f.attrid]=f.attrvalue}),l});return r(e)};function su(e){try{return JSON.parse(e)}catch{return{}}}function Qh(e){if(!V6(e))return e;const r=atob(e),t=new Uint8Array(r.length);for(let i=0;i<r.length;i++)t[i]=r.charCodeAt(i);return new TextDecoder().decode(t)}function V6(e){return e?e.length%4!==0?!1:/^[A-Za-z0-9+/]+(?:=?=?)$/.test(e):!0}const XB=(e,r)=>{var C;let t=Js.cloneDeep(e);const{attr_list:i=[]}=t,{isMobile:l=!1,guid:f,isListToObj:c=!1,isAutoFill:p=!0}=e;let g=[];p&&((C=t==null?void 0:t.attr_list)==null||C.forEach(b=>{var x,E,k,D,A,T;(x=b==null?void 0:b.json)!=null&&x["auto-generate"]&&((E=b==null?void 0:b.json)!=null&&E["auto-generate-type"])&&(((k=b==null?void 0:b.json)==null?void 0:k["auto-generate-type"])==="currenttime"&&(b.attrvalue=xn().format("YYYY-MM-DD HH:mm:ss")),((D=b==null?void 0:b.json)==null?void 0:D["auto-generate-type"])==="guid"&&(b.attrvalue=f||"")),(A=b==null?void 0:b.json)!=null&&A.default&&(b.attrvalue=(T=b==null?void 0:b.json)==null?void 0:T.default)}));const d=(b,x)=>{try{const E=new Map(b.map((k,D)=>[k.attrid,D]));for(const[k,D]of Object.entries(x)){const A=E.get(k);if(A===void 0)continue;let T=b[A];if(!D&&D!==0){T.attrvalue="";continue}T=m(T,D,l)}b.forEach(k=>{k.children&&Array.isArray(k.children)&&k.children.length>0&&!Array.isArray(k.children[0])&&x[k.attrid]&&d(k.children,x[k.attrid]),k.children&&Array.isArray(k.children)&&k.children.length>0&&Array.isArray(k.children[0])&&k.children.forEach((D,A)=>{var T,S;D&&Array.isArray(D)&&((T=x==null?void 0:x[k.attrid])!=null&&T[A])&&d(D,(S=x==null?void 0:x[k.attrid])==null?void 0:S[A])})})}catch{}},m=(b,x,E)=>{var A,T,S,O;const k=(A=b.json)==null?void 0:A.input,D=(T=b.json)==null?void 0:T.format;switch(k){case"image":case"file":case"video":case"audio":const B=typeof x=="string"?JSON.parse(x):x;if(!Array.isArray(B)){b.attrvalue=JSON.stringify([]);return}const z=B.filter(V=>V.FileId),M=B.filter(V=>{var F;return V.status==="done"&&((F=V.response)==null?void 0:F.data)}).map(V=>V.response.data),U=[...z,...M];g=[...g,...M],b.attrvalue=JSON.stringify(U);break;case"cascader":if(Array.isArray(x)&&x.length>0){const V=((S=b.json)==null?void 0:S["cascader-delimiter"])||"/";b.attrvalue=x.join(V)}else b.attrvalue="";break;case"range-picker":E?Array.isArray(x)&&x.length>0?b.attrvalue=x==null?void 0:x.map(V=>xn(V).format(D||"YYYY-MM-DD")).join("~"):b.attrvalue="":Array.isArray(x)&&x.length>0?b.attrvalue=x.join("~"):b.attrvalue="";break;case"multiple-date-picker":E?Array.isArray(x)&&x.length>0?b.attrvalue=x==null?void 0:x.map(V=>xn(V).format(D||"YYYY-MM-DD")).join(","):b.attrvalue=x:Array.isArray(x)&&x.length>0?b.attrvalue=x.join(","):b.attrvalue=x;break;case"checkbox":case"mult-select":Array.isArray(x)&&x.length>0?b.attrvalue=x.join(","):b.attrvalue=x;break;case"date-picker":x?b.attrvalue=xn(x).format(D||"YYYY-MM-DD"):b.attrvalue="";break;case"time-picker":x?b.attrvalue=xn(x).format(D||"YYYY-MM-DD HH:mm:ss"):b.attrvalue="";break;default:(O=b==null?void 0:b.json)!=null&&O["properties-multiple"]||(b.attrvalue=x);break}return b};return t.attr_list&&Array.isArray(t.attr_list)&&d(i,r),{updatedData:c?G6(t.attr_list||[]):t,uploadedFiles:g}},I2=(e,r)=>e.map(t=>{var f,c,p;const i=$6(t,r),{children:l}=i;if(l&&!Array.isArray(l==null?void 0:l[0])&&(l!=null&&l.length)&&(i.children=[I2(l)]),i!=null&&i.children&&Array.isArray((f=i==null?void 0:i.children)==null?void 0:f[0])&&((c=i==null?void 0:i.children)!=null&&c.length)){const g=(p=i==null?void 0:i.children)==null?void 0:p.map(d=>d==null?void 0:d.map(m=>$6(m)));i.children=g}return i}),$6=(e,r)=>{if(!e.json&&e.info)try{const t=e.info_base64===1?Qh(e.info):e.info,i=su(t);return{...e,json:i,...r}}catch{return{...e,json:{},...r}}return{...e,...r}},Y6=(e,r)=>I2(e,r),q6=(e,r)=>{const t=I2(e,r),i=t.filter(c=>{var p;return(p=c.json)==null?void 0:p.combination}).reduce((c,p)=>{const g=p.json["combination-id"];return g&&(c[g]||(c[g]=[]),c[g].push(p)),c},{}),l=new Set;Object.values(i).forEach(c=>{(c==null?void 0:c.length)!==0&&c.slice(1).forEach(p=>l.add(p.attrid))});const f=c=>c.filter(p=>!l.has(p.attrid)).map(p=>{var m;const g=(m=p.json)==null?void 0:m["combination-id"];if(g&&i[g]){const C={...p,json:{...p.json,combinations:i[g]}},{children:b}=C;return b&&Array.isArray(b==null?void 0:b[0])&&(b!=null&&b.length)&&(C.children=b==null?void 0:b.map(x=>f(x))),C}const{children:d}=p;return d&&Array.isArray(d==null?void 0:d[0])&&(d!=null&&d.length)&&(p.children=d==null?void 0:d.map(C=>f(C))),p});return f(t)},JB=async({number:e,key:r,sourceNumber:t,guidInterfaceName:i,SelPCParamInterfaceName:l,servicerAttrListInterfaceName:f,accepterAttrListInterfaceName:c,defaultAttrListInterfaceName:p,commonRequest:g,guidParams:d,pcParam:m,attrReqKey:C="asid",attrListExtraParams:b={}})=>new Promise(async(x,E)=>{var B,z,M,U;let k="",D=[],A={},T={};const S=await g(i||"FWDXGLCreateGUID",d||{"source-number":t});(S==null?void 0:S.ReturnValue)===1&&((B=S==null?void 0:S.data)!=null&&B.GUID)?k=S.data.GUID:E("获取GUID失败");const O=await g(l||"FWDXGLSelPCParam",m||{"source-number":t});if((O==null?void 0:O.ReturnValue)===1){const V=(z=O.data[e])==null?void 0:z[r],F=(M=O.data[e])==null?void 0:M["properties-type"],N={server:f||"",accepter:c||""};T=O.data;const $=await g(N[F]||p,{[C]:V,"source-number":t,...b});if(($==null?void 0:$.ReturnValue)===1&&$.data){const I=((U=$.data)==null?void 0:U.attr_list)||[];D=q6(I),A={...$.data,attr_list:D},x({baseData:A,newGUID:k,attrListConfigs:D,selPCParam:T})}else E("请配置属性集")}else E("获取配置失败")}),eL=async(e,r,t)=>await t(e,r);function tL(e){return e.replace(/-([a-z])/g,function(r,t){return t.toUpperCase()})}const G6=e=>{var l;function r(f){const c={};return f.forEach(p=>{var d,m,C,b;const g=`${p.attrid}_${p.attrtype}`;if(p.attrtype===1&&p.children.length>0&&!Array.isArray(p.children))c[g]={asid:((m=(d=p.children)==null?void 0:d[0])==null?void 0:m.asid)||"",data_list:[r(p.children)]};else if(p.attrtype===1&&p.children.length>0&&Array.isArray(p.children)){let{children:x=[],attrvalue:E}=p||{};E&&(E!=null&&E.length)&&Array.isArray(E)?x=E.map(k=>{var T,S,O,B;const D=(T=Object.values(k))==null?void 0:T.findIndex(z=>Array.isArray(z)),A=((S=Object.keys(k))==null?void 0:S[D])||"";if(A){const z=((O=x==null?void 0:x[0])==null?void 0:O.find(U=>U.attrid===A))||{},{input:M}=(z==null?void 0:z.json)||{};if(["file","image","video","audio"].includes(M)){const U=((B=Object.values(k))==null?void 0:B[D])||[],V=U.filter($=>$.FileId),F=U.filter($=>{var I;return $.status==="done"&&((I=$.response)==null?void 0:I.data)}).map($=>$.response.data),N=[...V,...F];k[A]=N}}return W6((x==null?void 0:x[0])||[],k)}):x=[],x!=null&&x.length&&Array.isArray(x==null?void 0:x[0])&&(c[g]={asid:((b=(C=x==null?void 0:x[0])==null?void 0:C[0])==null?void 0:b.asid)||"",data_list:x.map(k=>r(k))})}else c[g]=p.attrvalue}),c}const t=((l=e[0])==null?void 0:l.asid)||"",i=[r(e)];return{data:{asid:t,data_list:i}}},K6=async({attrList:e,params:r,extra:t={},commonRequest:i})=>{var p;const l=await i("YLFWLRDataDetails",r),f=((p=l==null?void 0:l.data)==null?void 0:p.list)||[];return f.length?await Promise.all(f.map(async g=>await Promise.all((e==null?void 0:e.map(async m=>{const C={...m,...t};if(C.attrvalue=(g==null?void 0:g[m.attrid])||"",m.attrtype===1&&Array.isArray(m.children)&&m.children.length>0){const b=(g==null?void 0:g[m.attrid])||{};C.children=await K6({attrList:m.children,params:b,extra:t,commonRequest:i})}return C}))||[])))||[]:e.map(g=>({...g,...t,attrvalue:"",children:[]}))},Dc=(e,r,t)=>{let i=[];return t.forEach(l=>{i.push(e==null?void 0:e[l])}),i.join(r||"-")},Fg=async({commonRequestWidthParams:e,commonRequest:r,interfaceTypeDict:t="YLZDDictList",interfaceTypeSysDict:i="YLZDSysConfigList",actionUrlKey:l="action-url",actionUrlExtraParams:f={},item:c})=>{var m;let p=[];const g=async C=>{var x;let b=[];if(c.classify)try{const E=await r(C,{asctypeid:c.classify});(x=E==null?void 0:E.data)!=null&&x.list&&Array.isArray(E.data.list)&&(b=E.data.list.map(k=>({label:`${k.dicid||""}-${k.info||""}`,value:`${k.dicid||""}-${k.info||""}`})))}catch{ve.message.error("加载选项失败")}return b},d=async()=>{var C,b;try{const x=((C=c==null?void 0:c["key-field"])==null?void 0:C.list)||[],E=((b=c==null?void 0:c["key-field"])==null?void 0:b.delimiter)||"",k=c==null?void 0:c["field-names"];if(!x.length){ve.message.error("请配置key-field");return}const D=await e({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{[l]:c==null?void 0:c["action-url"],...f});if(D!=null&&D.data){const A=D==null?void 0:D.data,T=(A==null?void 0:A.list)||[];let S=[];Array.isArray(A)&&(S=A),Array.isArray(T)&&(S=T),k?p=S:p=S.map(O=>({label:Dc(O,E,x),value:Dc(O,E,x)}))}}catch{ve.message.error("加载选项失败")}};return c.inputType==="local"?(p=((m=c.data)==null?void 0:m.map(C=>({label:C,value:C})))||[],c.options&&Array.isArray(c.options)&&(p=c.options)):c.inputType==="dictionary"?p=await g(t):c.inputType==="system-dictionary"&&(p=await g(i)),c.inputType==="url"&&(c!=null&&c["action-url"])&&await d(),p},W6=(e,r)=>e.map(t=>({...t,attrvalue:r[t.attrid]||""})),nL=Object.freeze(Object.defineProperty({__proto__:null,getJson:su,base64ToString:Qh,isBase64:V6,handleSubmitForm:XB,handleBaseAttrList:Y6,handleAttrList:q6,handleFormConfig:JB,handleOperationFile:eL,handleKebabToCamel:tL,handleAttrListToObj:G6,handleAttrListToObjDetail:K6,handleUrlOptions:Dc,handleSelectOptions:Fg,handleObjDetailToSignleAttrList:W6},Symbol.toStringTag,{value:"Module"}));function rL(e){const{item:r,disabled:t,style:i,commonRequestWidthParams:l,CustomModalComponent:f,attrid:c,form:p,langId:g}=e,d=ve.Form.useWatch(c,p),{message:m}=ve.App.useApp(),C=r.input,[b,x]=G.useState(e.value),[E,k]=G.useState(!1),[D,A]=G.useState([]),[T,S]=G.useState([]),[O,B]=G.useState(!1),[z,M]=G.useState({PageNum:1,PageSize:6}),[U,V]=G.useState([]),[F,N]=G.useState(0),$=Q();G.useEffect(()=>{E&&q()},[E,z]);const I=(K,H)=>{A(K),S(H)},q=async()=>{var K;if(r.inputType==="url"&&(r!=null&&r["action-url"])){B(!0);try{const H=await l({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":r==null?void 0:r["action-url"],...z,...(r==null?void 0:r["action-url-extra-params"])||{}});if((H==null?void 0:H.ReturnValue)===0){m.error(H.msg),B(!1);return}const te=H==null?void 0:H.data,ae=(K=te==null?void 0:te.list)==null?void 0:K.map((pe,be)=>{const me=(z.PageNum-1)*z.PageSize+be;return{...pe,_rowKey:me}}),ie=(ae==null?void 0:ae.filter(pe=>D.includes(pe._rowKey)))||[];S(ie),V([...ae||[]]),N((te==null?void 0:te.number)||0),B(!1)}catch{B(!1)}return}m.error(g==="10001"?"参数配置错误":"Parameter configuration error")},ee=()=>{var K;if(!t){if(b){const H=r==null?void 0:r["key-field"],te=H==null?void 0:H[c],{delimiter:ae="-",list:ie=[]}=te||{};if(!H){m.error(g==="10001"?"请配置key-field":"Please configure key-field");return}switch(C){case"mul-field-modal-select":const pe=(K=b==null?void 0:b.split(ae))==null?void 0:K[0],be=U==null?void 0:U.findIndex(Oe=>Object.values(Oe).includes(pe));A([be]);break;case"modal-mult-select":const me=b==null?void 0:b.split(","),ce=me==null?void 0:me.map(Oe=>{var tt;const Ne=(tt=Oe.split(ae))==null?void 0:tt[0];return U==null?void 0:U.findIndex(Se=>Ne.includes((Se==null?void 0:Se.typeid)||(Se==null?void 0:Se.instanceid)))});A(ce);break}}k(!0)}},Z=async()=>{try{const K=await aL(T,r,g);x((K==null?void 0:K[c])||""),e.onSure(K),k(!1)}catch(K){m.error(K.msg||"参数错误")}},J=()=>{M({...z,PageNum:1}),k(!1)};function Q(){const K=r["modal-field-list"];let H=[];for(let te in K){let ae=K[te];const ie={dataIndex:te,title:ae};H=[...H,ie]}return H}const ne=K=>{M({...z,PageNum:K})};return Pe(tn,{children:[W(ve.Select,{placeholder:Wh({json:r}),onClick:ee,open:!1,value:d,disabled:t,style:i}),f&&W(f,{title:r["modal-caption"]||"",open:E,onOk:Z,onCancel:J,modalStyle:{width:r["modal-width"]??600,minHeight:r["modal-height"]??400},children:W(ve.Table,{columns:$,loading:O,dataSource:U,rowKey:K=>K._rowKey,scroll:{y:"calc(80vh - 300px)"},rowSelection:{type:C==="mul-field-modal-select"?"radio":"checkbox",selectedRowKeys:D,onChange:I},pagination:{total:F,current:z.PageNum,pageSize:z.PageSize,onChange:ne}})})||W(ve.Modal,{title:r["modal-caption"],open:E,onOk:Z,onCancel:J,width:r["modal-width"]??600,okButtonProps:{disabled:D.length===0},children:W(ve.Table,{columns:$,loading:O,dataSource:U,rowKey:K=>K._rowKey,rowSelection:{type:C==="mul-field-modal-select"?"radio":"checkbox",selectedRowKeys:D,onChange:I},pagination:{total:F,current:z.PageNum,pageSize:z.PageSize,onChange:ne}})})]})}function aL(e,r,t){return new Promise((i,l)=>{try{var f=r["key-field"];if(!f){l({msg:t==="10001"?"请配置key-field":"Please configure key-field"});return}let c={};e.forEach(p=>{for(let[g,d]of Object.entries(f)){const m=(d==null?void 0:d.list)??[],C=(d==null?void 0:d.delimiter)??"-",b=m.map(x=>p==null?void 0:p[x]);c[g]=b.join(C)}}),i(c)}catch{l({msg:t==="10001"?"key-field参数配置错误":"key-field parameter configuration error"})}})}var Q6={exports:{}};(function(e,r){(function(t,i){e.exports=i()})(Pt,function(){var t="day";return function(i,l,f){var c=function(d){return d.add(4-d.isoWeekday(),t)},p=l.prototype;p.isoWeekYear=function(){return c(this).year()},p.isoWeek=function(d){if(!this.$utils().u(d))return this.add(7*(d-this.isoWeek()),t);var m,C,b,x,E=c(this),k=(m=this.isoWeekYear(),C=this.$u,b=(C?f.utc:f)().year(m).startOf("year"),x=4-b.isoWeekday(),b.isoWeekday()>4&&(x+=7),b.add(x,t));return E.diff(k,"week")+1},p.isoWeekday=function(d){return this.$utils().u(d)?this.day()||7:this.day(this.day()%7?d:d-7)};var g=p.startOf;p.startOf=function(d,m){var C=this.$utils(),b=!!C.u(m)||m;return C.p(d)==="isoweek"?b?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):g.bind(this)(d,m)}}})})(Q6);const Z6=Q6.exports;function iL(e){const{item:r,disabled:t,style:i,commonRequestWidthParams:l,CustomModalComponent:f,langId:c}=e,{message:p}=ve.App.useApp(),g=r.input,[d,m]=G.useState(e.value),[C,b]=G.useState(!1),[x,E]=G.useState([]),[k,D]=G.useState([]),[A,T]=G.useState(!1),[S,O]=G.useState({PageNum:1,PageSize:6}),[B,z]=G.useState([]),[M,U]=G.useState(0),V=ee();G.useEffect(()=>{C&&N()},[C,S]);const F=(J,Q)=>{E(J),D(Q)},N=async()=>{var J;if(r.inputType==="url"&&(r!=null&&r["action-url"])){T(!0);try{const Q=await l({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":r==null?void 0:r["action-url"],...S});if((Q==null?void 0:Q.ReturnValue)===0){p.error(Q.msg),T(!1);return}const ne=Q==null?void 0:Q.data,K=(J=ne==null?void 0:ne.list)==null?void 0:J.map((te,ae)=>{const ie=(S.PageNum-1)*S.PageSize+ae;return{...te,_rowKey:ie}}),H=(K==null?void 0:K.filter(te=>x.includes(te._rowKey)))||[];D(H),z([...K||[]]),U((ne==null?void 0:ne.number)||0),T(!1)}catch(Q){T(!1),p.error(Q.msg||"参数错误")}return}p.error("请配置action-url")},$=()=>{var J,Q;if(!t){if(d){const ne=((J=r==null?void 0:r["key-field"])==null?void 0:J.list)??[],K=((Q=r==null?void 0:r["key-field"])==null?void 0:Q.delimiter)??"-";if(!ne.length){p.error("请配置key-field");return}switch(g){case"modal-select":const H=d==null?void 0:d.split("-"),te=B==null?void 0:B.findIndex(pe=>H.includes((pe==null?void 0:pe.typeid)||(pe==null?void 0:pe.instanceid)));E([te]);break;case"modal-mult-select":const ae=d==null?void 0:d.split(","),ie=ae==null?void 0:ae.map(pe=>{var me;const be=(me=pe.split(K))==null?void 0:me[0];return B==null?void 0:B.findIndex(ce=>be.includes((ce==null?void 0:ce.typeid)||(ce==null?void 0:ce.instanceid)))});E(ie);break}}b(!0)}},I=async()=>{try{const J=await oL(k,r,c);m(J),e.onSure(J),b(!1)}catch(J){p.error(J.msg||"参数错误")}},q=()=>{O({...S,PageNum:1}),b(!1)};function ee(){const J=r["modal-field-list"];let Q=[];for(let ne in J){let K=J[ne];const H={dataIndex:ne,title:K};Q=[...Q,H]}return Q}const Z=J=>{O({...S,PageNum:J})};return Pe(tn,{children:[W(ve.Select,{placeholder:Wh({json:r},c),onClick:$,value:d,open:!1,disabled:t,style:i}),f&&W(f,{title:r["modal-caption"]||"",open:C,onOk:I,onCancel:q,modalStyle:{width:r["modal-width"]??600,minHeight:r["modal-height"]??400},children:W(ve.Table,{columns:V,loading:A,dataSource:B,rowKey:J=>J._rowKey,scroll:{y:"calc(80vh - 300px)"},rowSelection:{type:g==="modal-select"?"radio":"checkbox",selectedRowKeys:x,onChange:F},pagination:{total:M,current:S.PageNum,pageSize:S.PageSize,onChange:Z}})})||W(ve.Modal,{title:r["modal-caption"],open:C,onOk:I,onCancel:q,width:r["modal-width"]??600,okButtonProps:{disabled:x.length===0},children:W(ve.Table,{columns:V,loading:A,dataSource:B,rowKey:J=>J._rowKey,rowSelection:{type:g==="modal-select"?"radio":"checkbox",selectedRowKeys:x,onChange:F},pagination:{total:M,current:S.PageNum,pageSize:S.PageSize,onChange:Z}})})]})}function oL(e,r,t){return new Promise((i,l)=>{try{var f=r["key-field"];if(!f){l({msg:t==="10001"?"请配置key-field":"Please configure key-field"});return}var c=(f==null?void 0:f.list)??[];let p=e.map(g=>c.map(m=>g[m]).join((f==null?void 0:f.delimiter)||"-")).join(",");i(p)}catch{l({msg:t==="10001"?"key-field参数配置错误":"key-field parameter configuration error"})}})}const lL=e=>{const{item:r,onChange:t,readonly:i=!1,options:l,radioAlign:f="horizontal",commonRequestWidthParams:c,commonRequest:p,handleUrlOptions:g,value:d,interfaceTypeDict:m,interfaceTypeSysDict:C,actionUrlKey:b,actionUrlExtraParams:x,langId:E}=e,{message:k}=ve.App.useApp(),[D,A]=G.useState([]),[T,S]=G.useState(d||[]);G.useEffect(()=>{if((r==null?void 0:r.inputType)==="local"){const z=(r==null?void 0:r.data)||[];A(z.map(M=>({value:M,label:M})))}else(r==null?void 0:r.inputType)==="dictionary"?O(r.classify,m):(r==null?void 0:r.inputType)==="system-dictionary"?O(r.classify,C):(r==null?void 0:r.inputType)==="url"&&B()},[r==null?void 0:r.inputType]);const O=async(z,M)=>{var V;if(!z)return;const U=await p(M,{asctypeid:z});if((U==null?void 0:U.ReturnValue)===1){const F=((V=U==null?void 0:U.data)==null?void 0:V.list)||[];A(F.map(N=>{const $=N.dicid+"-"+N.info;return{value:$,label:$}}))}},B=async()=>{var z,M;try{const U=((z=r==null?void 0:r["key-field"])==null?void 0:z.list)||[],V=((M=r==null?void 0:r["key-field"])==null?void 0:M.delimiter)||"";if(!U.length){k.error(E==="10001"?"请配置key-field":"Please configure key-field");return}const F=await c({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{[b]:r==null?void 0:r["action-url"],...x});if(F!=null&&F.data){const N=F==null?void 0:F.data,$=N==null?void 0:N.list;let I=[];Array.isArray(N)&&(I=N),Array.isArray($)&&(I=$);const q=I.map(ee=>({label:g(ee,V,U),value:g(ee,V,U)}));A([...q])}}catch{k.error(E==="10001"?"加载选项失败":"Failed to load options")}finally{}};return W(ve.Checkbox.Group,{...l,options:D,value:T,style:f==="vertical"?{display:"flex",flexDirection:"column",gap:"8px",width:"100%"}:{width:"100%"},onChange:z=>{S(z),t==null||t(z)},disabled:i})},sL=({item:e,readonly:r,value:t,onChange:i,style:l,commonRequestWidthParams:f,commonRequest:c,interfaceTypeDict:p,interfaceTypeSysDict:g,actionUrlKey:d,actionUrlExtraParams:m,langId:C="10001"})=>{const[b,x]=G.useState([]),[E,k]=G.useState(!1),{message:D}=ve.App.useApp();G.useEffect(()=>{A()},[e.inputType,e.classify,e.data,e.options]);const A=async()=>{if(e.inputType==="local"){let M=[];e.data&&Array.isArray(e.data)?M=e.data.map(U=>({label:U,value:U})):e.options&&Array.isArray(e.options)&&(M=e.options),x(M)}else if(e.inputType==="dictionary")await T(g);else if(e.inputType==="system-dictionary")T(g);else if(e.inputType==="url"&&(e!=null&&e["action-url"])){const M=await O();M&&Array.isArray(M)&&x(M)}else{let M=[];e.data&&Array.isArray(e.data)?M=e.data.map(U=>({label:U,value:U})):e.options&&Array.isArray(e.options)&&(M=e.options),x(M)}},T=async M=>{var U;if(e.classify){k(!0);try{const V=await c(M,{asctypeid:e.classify});if((U=V==null?void 0:V.data)!=null&&U.list&&Array.isArray(V.data.list)){const F=V.data.list.map(N=>({label:`${N.dicid||""}-${N.info||""}`,value:`${N.dicid||""}-${N.info||""}`}));x(F)}}catch{D.error(C==="10001"?"加载选项失败":"Failed to load options")}finally{k(!1)}}},S=(M,U)=>{i&&i(M)},O=async M=>new Promise(async(U,V)=>{var q,ee,Z;const F=((q=e==null?void 0:e["key-field"])==null?void 0:q.list)||[],N=(e==null?void 0:e["search-field"])||[],$=((ee=e==null?void 0:e["key-field"])==null?void 0:ee.delimiter)||"-";if(!F.length){D.error(C==="10001"?"请配置key-field":"Please configure key-field");return}const I={[d]:e==null?void 0:e["action-url"],...m};M&&(N.forEach(J=>{I[J]=M[J]||""}),I.level=Number(M.level||0)+1||""),k(!0);try{const J=await f({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},I);if((Z=J==null?void 0:J.data)!=null&&Z.list&&Array.isArray(J.data.list)){const Q=J.data.list.map(ne=>({...ne,label:`${ne[F[0]]||""}${$}${ne[F[1]]||""}`,value:`${ne[F[0]]||""}${$}${ne[F[1]]||""}`,children:[],isLeaf:(ne==null?void 0:ne.subcount)===0}));U(Q)}V([])}catch{D.error(C==="10001"?"加载选项失败":"Failed to load options"),V([])}finally{V([]),k(!1)}}),B=async M=>{const U=M[M.length-1],V=await O(U)||[];return U.children=V,x([...b]),V},z=(M,U)=>U.some(V=>V.label.toLowerCase().includes(M.toLowerCase()));return W(ve.Cascader,{showSearch:{filter:z},loading:E,placeholder:"请选择",loadData:B,disabled:r,onChange:S,style:{...l},options:b,value:t,onOpenChange:async M=>{var U;if(M&&(t!=null&&t.length)){const V=((U=e==null?void 0:e["key-field"])==null?void 0:U.list)||[],F=(e==null?void 0:e["search-field"])||[];if(!V.length||!F.length){D.error(C==="10001"?"请配置key-field和search-field":"Please configure key-field and search-field");return}const N=V.findIndex(q=>q===F[0]);if(N===-1){D.error(C==="10001"?"key-field与search-field配置不匹配":"key-field and search-field configuration does not match");return}const $=t.map(q=>q.split("-")[N]||"").filter(Boolean);let I=b;for(const[q,ee]of $.entries()){if(q===$.length-1)break;const Z=I.filter(ne=>ne[F[0]]===ee);if(Z.length===0)break;const J=Z[0];if(J.children&&J.children.length>0){I=J.children;continue}I=await B(Z)}}}})},uL=({item:e,readonly:r,value:t,onChange:i,style:l,commonRequestWidthParams:f,langId:c})=>{const[p,g]=G.useState([]),[d,m]=G.useState(!1);G.useEffect(()=>{(async()=>{var S;if(e.inputType==="url"&&e["action-url"]){m(!0);try{const O=await f({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":e==null?void 0:e["action-url"]});(S=O==null?void 0:O.data)!=null&&S.list&&Array.isArray(O.data.list)?g(O.data.list):O!=null&&O.data&&Array.isArray(O.data)?g(O.data):Array.isArray(O==null?void 0:O.list)?g(O.list):(O==null?void 0:O.ReturnValue)===1&&(O!=null&&O.data)&&(Array.isArray(O.data)?g(O.data):g([O.data]))}catch{}finally{m(!1)}}else e.data&&Array.isArray(e.data)&&g(e.data)})()},[e.inputType,e["action-url"],e.data]);const C=T=>JSON.stringify(T),b=T=>{const S=C(T);return t===S},x=T=>{if(r)return;const S=C(T);i&&i(S)},E=e["card-image-width"]||200,k=e["card-image-height"]||100,D=e["card-image-field"],A=e["card-info-field"];return W("div",{style:{...l},children:d?W("div",{style:{textAlign:"center",padding:"20px"},children:"loading..."}):W("div",{style:{display:"flex",flexWrap:"wrap",gap:"50px"},children:p.map((T,S)=>{const O=b(T);return Pe("div",{onClick:()=>x(T),style:{flex:"1 1 auto",width:`${E}px`,padding:"12px 0",cursor:r?"not-allowed":"pointer",opacity:r?.6:1,transition:"all 0.3s"},children:[T[D]&&W("img",{src:T.picurl,alt:T[A]||"",style:{width:`${E}px`,height:`${k}px`,objectFit:"cover",borderRadius:"8px",marginBottom:"8px"},onError:B=>{B.currentTarget.style.display="none"}}),W("div",{style:{fontSize:"14px",color:"#333333"},children:Pe(ve.Space,{size:6,children:[W("div",{style:{width:"16px",height:"16px",borderRadius:"50%",border:O?"none":"1px solid #d9d9d9",backgroundColor:O?"var(--color-primary)":"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,cursor:r?"not-allowed":"pointer"},children:O&&W(c8,{style:{fontSize:"12px",color:"#fff"}})}),T[A]||""]})})]},S)})})})},cL=({item:e,readonly:r,style:t,commonRequestWidthParams:i,commonRequest:l,value:f,onChange:c,interfaceTypeDict:p,interfaceTypeSysDict:g,actionUrlKey:d,actionUrlExtraParams:m,langId:C})=>{const[b,x]=G.useState([]),[E,k]=G.useState(!1);G.useEffect(()=>{D()},[e.inputType,e.classify,e.data,e.options]);const D=async()=>{k(!0);const A=await Fg({commonRequestWidthParams:i,commonRequest:l,interfaceTypeDict:p,interfaceTypeSysDict:g,actionUrlKey:d,actionUrlExtraParams:m,item:e});x(A),k(!1)};return W(ve.Select,{placeholder:Wh({json:e},C),mode:e.input==="mult-select"?"multiple":void 0,disabled:r,loading:E,showSearch:!0,value:f,filterOption:(A,T)=>{var S;return((S=T==null?void 0:T.label)==null?void 0:S.toLowerCase().indexOf(A.toLowerCase()))>=0},options:b,style:{...t},allowClear:!0,onChange:A=>{c(A)}})},fL={customUpload:"myUpload-module_customUpload_7c7d3"},dL=e=>new Promise((r,t)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>r(i.result),i.onerror=l=>t(l)}),hL=e=>{const{langId:r="10001"}=e,{action:t,item:i,onChange:l,readonly:f=!1,relatedid:c,uploadText:p=r==="10001"?"上传文件":"Upload File",onRemove:g,list:d=[],uploadType:m,relatedidKey:C}=e,{message:b}=ve.App.useApp(),x=(i==null?void 0:i["upload-accept"])||"*",E=i==null?void 0:i.input,k=i==null?void 0:i["upload-size"],D=(i==null?void 0:i["upload-max-count"])||1,[A,T]=G.useState(E==="image"?"picture-card":"text"),[S,O]=G.useState([]),[B,z]=G.useState(!1),[M,U]=G.useState("");G.useEffect(()=>{d&&d.length&&O(d)},[d]);const V=async I=>{m==="image"&&(!I.url&&!I.preview&&(I.preview=await dL(I.originFileObj)),U(I.url||I.preview),z(!0))},F=({fileList:I})=>{O(I),l&&l(I)},N=I=>{if(!k)return!0;const q=I.size/1024/1024<Number(k);return q||b.error(r==="10001"?`请上传不超过${k}MB的文件`:`Please upload files smaller than ${k}MB`),q},$=E==="image"?Pe("button",{style:{border:0,background:"none"},type:"button",children:[W(Fb,{}),W("div",{style:{marginTop:8},children:"Upload"})]}):W(tn,{children:W(ve.Button,{style:{fontSize:14},icon:W(Nb,{}),children:p})});return Pe(tn,{children:[W(ve.Upload,{action:t,beforeUpload:N,listType:A,accept:x,fileList:S,onPreview:V,data:{[C]:c},maxCount:D,onChange:F,onRemove:g,disabled:f,className:fL.customUpload,children:S.length>=D?null:$}),M&&W(ve.Image,{wrapperStyle:{display:"none"},preview:{visible:B,onVisibleChange:I=>z(I),afterOpenChange:I=>!I&&U("")},src:M})]})},pL=e=>{const{item:r,onChange:t,readonly:i=!1,options:l,radioAlign:f="horizontal",commonRequestWidthParams:c,commonRequest:p,handleUrlOptions:g,value:d,interfaceTypeDict:m,interfaceTypeSysDict:C,actionUrlKey:b,actionUrlExtraParams:x,langId:E}=e,{message:k}=ve.App.useApp(),[D,A]=G.useState([]);G.useEffect(()=>{if((r==null?void 0:r.inputType)==="local"){const O=(r==null?void 0:r.data)||[];A(O.map(B=>({value:B,label:B})))}else(r==null?void 0:r.inputType)==="dictionary"?T(r.classify,m):(r==null?void 0:r.inputType)==="system-dictionary"?T(r.classify,C):(r==null?void 0:r.inputType)==="url"&&S()},[r==null?void 0:r.inputType]);const T=async(O,B)=>{var M;if(!O)return;const z=await p(B,{asctypeid:O});if((z==null?void 0:z.ReturnValue)===1){const U=((M=z==null?void 0:z.data)==null?void 0:M.list)||[];A(U.map(V=>{const F=V.dicid+"-"+V.info;return{value:F,label:F}}))}},S=async()=>{var O,B;try{const z=((O=r==null?void 0:r["key-field"])==null?void 0:O.list)||[],M=((B=r==null?void 0:r["key-field"])==null?void 0:B.delimiter)||"";if(!z.length){k.error(E==="10001"?"请配置key-field":"Please configure key-field");return}if(!c)return;const U=await c({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{[b]:r==null?void 0:r["action-url"],...x});if(U!=null&&U.data){const V=U==null?void 0:U.data,F=V==null?void 0:V.list;let N=[];Array.isArray(V)&&(N=V),Array.isArray(F)&&(N=F);const $=N.map(I=>({label:g(I,M,z),value:g(I,M,z)}));A([...$])}}catch{k.error(E==="10001"?"加载选项失败":"Failed to load options")}finally{}};return W(ve.Radio.Group,{...l,options:D,onChange:t,disabled:i,value:d,style:f==="vertical"?{display:"flex",flexDirection:"column",gap:"8px",width:"100%"}:{width:"100%"}})};xn.extend(Z6);function vL(e){const{commonRequestWidthParams:r,uploadAction:t,commonRequest:i,formConfig:l,updateDelFileList:f,interfaceTypeDict:c,interfaceTypeSysDict:p,relatedidKey:g,actionUrlKey:d,actionUrlExtraParams:m,CustomModalComponent:C,isEdit:b,formShowType:x="form",langId:E}=e,k=G.useRef([]),{message:D}=ve.App.useApp();G.useEffect(()=>{l&&(k.current=l)},[l]);const A=G.useCallback(N=>Array.isArray(N)?N:(N==null?void 0:N.fileList)??[],[]),T=N=>{f(N)},S=G.useCallback(N=>{var ee,Z;const $=(ee=N.json)==null?void 0:ee.input,I=(Z=N.json)==null?void 0:Z.format,q={};switch($){case"image":case"file":case"video":case"audio":q.getValueFromEvent=A;break;case"date-picker":q.getValueFromEvent=J=>J==null?void 0:J.format(I||"YYYY-MM-DD"),q.getValueProps=J=>({value:J?xn(J):null});break;case"time-picker":q.getValueFromEvent=J=>J==null?void 0:J.format(I||"YYYY-MM-DD HH:mm:ss"),q.getValueProps=J=>({value:J?xn(J):null});break;case"week-picker":q.getValueFromEvent=J=>`${J==null?void 0:J.year()}-${xn(J).isoWeek()}周`,q.getValueProps=J=>{if(!J)return{value:null};const[Q,ne]=J.split("-"),K=Number(Q),H=Number(ne.replace("周",""));return{value:xn().year(K).isoWeek(H)}};break;case"month-picker":q.getValueFromEvent=J=>J==null?void 0:J.format(I||"YYYY-MM"),q.getValueProps=J=>({value:J?xn(J):null});break;case"quarter-picker":q.getValueFromEvent=J=>J==null?void 0:J.format(I||"YYYY年第Q季度"),q.getValueProps=J=>({value:J?xn(J,I||"YYYY年第Q季度"):null});break;case"year-picker":q.getValueFromEvent=J=>J==null?void 0:J.format(I||"YYYY"),q.getValueProps=J=>({value:J?xn(J):null});break;case"second-picker":q.getValueFromEvent=J=>J==null?void 0:J.format(I||"HH:mm:ss"),q.getValueProps=J=>({value:J?xn(J,I||"HH:mm:ss"):null});break;case"range-picker":q.getValueFromEvent=J=>J==null?void 0:J.map(Q=>Q==null?void 0:Q.format(I||"YYYY-MM-DD")),q.getValueProps=J=>({value:(J==null?void 0:J.map(Q=>xn(Q)))||null});break;case"multiple-date-picker":q.getValueFromEvent=J=>J==null?void 0:J.map(Q=>Q==null?void 0:Q.format(I||"YYYY-MM-DD")),q.getValueProps=J=>({value:(J==null?void 0:J.map(Q=>xn(Q)))||null});break}return q},[A]),O=G.useCallback(({isActive:N})=>N?W(y8,{style:{fontSize:18,color:"#999"}}):W(C8,{style:{fontSize:18,color:"#999"}}),[]),B=(N,$)=>{var I,q,ee,Z,J;return Pe(ve.Flex,{gap:10,vertical:$==="flex",align:"center",children:[W("span",{children:N.attrname}),((I=N==null?void 0:N.json)==null?void 0:I.instruction)&&$==="icon"&&W(ve.Tooltip,{title:(q=N==null?void 0:N.json)==null?void 0:q.instruction,children:W(m8,{style:{color:((ee=N==null?void 0:N.json)==null?void 0:ee["instruction-color"])??"#888888",fontSize:16,cursor:"pointer"}})})||W("span",{style:{color:((Z=N==null?void 0:N.json)==null?void 0:Z["instruction-color"])??"red"},children:(J=N==null?void 0:N.json)==null?void 0:J.instruction})]})},z=G.useCallback(({itemWithJson:N,colNum:$=1,readonly:I=!1,instructionShowMode:q="icon",radioAlign:ee="horizontal",formItemStyle:Z,relatedid:J,form:Q,defaultWidth:ne=358,parentFormListField:K,isShowLabel:H=!0})=>{const te=Sc(N);let ae=N.children||[];Array.isArray(ae==null?void 0:ae[0])&&ae.length&&(ae=ae[0]);const ie=pe=>{const be=(K==null?void 0:K.parentName)||(K==null?void 0:K.name);return be?Array.isArray(be)?[...be,N.attrid,pe.name]:[be,N.attrid,pe.name]:[N.attrid,pe.name]};return W(ve.Col,{span:24/$,children:W(ve.Collapse,{bordered:!1,style:{backgroundColor:"transparent"},expandIcon:({isActive:pe})=>O({isActive:pe}),items:[{key:N.attrid,label:N.attrname,styles:{header:{paddingLeft:0}},children:W(ve.Form.List,{name:K?Array.isArray(K.name)?[...K.name,N.attrid]:[K.name,N.attrid]:N.attrid,initialValue:te,children:(pe,{add:be,remove:me})=>Pe("div",{style:{display:"flex",rowGap:16,flexDirection:"column"},children:[pe.map(ce=>{const Oe={...ce,parentName:ie(ce)};return W(ve.Card,{style:{width:ne+100},size:"small",title:`${N.attrname} ${ce.name+1}`,extra:!b&&W(h8,{onClick:()=>{pe.length>1?me(ce.name):D.warning("至少需要保留一个!")}}),children:(ae||[]).map((Ne,tt)=>W(G.Fragment,{children:F({item:Ne,readonly:I,colNum:$,instructionShowMode:q,relatedid:J,form:Q,defaultWidth:ne,formItemStyle:Z,radioAlign:ee,isFormListItem:!0,formListField:Oe,isShowLabel:!0})},Ne.attrid||`child-${tt}`))},ce.key)}),!b&&W(ve.Flex,{style:{width:200},children:W(ve.Button,{type:"dashed",onClick:()=>be(),block:!0,children:"+ 新增"})})]})})}]},N.attrid)})},[O,Sc]),M=G.useCallback(({itemWithJson:N,colNum:$=1,readonly:I=!1,instructionShowMode:q="icon",radioAlign:ee="horizontal",formItemStyle:Z,relatedid:J,form:Q,defaultWidth:ne=358,isFormListItem:K=!1,formListField:H,isShowLabel:te=!0})=>{var ae,ie,pe,be,me,ce,Oe;if(((ae=N.json)==null?void 0:ae.hide)===!0)return W(tn,{});if(N.attrtype===1)return z({itemWithJson:N,colNum:$,readonly:I,instructionShowMode:q,radioAlign:ee,formItemStyle:Z,relatedid:J,form:Q,defaultWidth:ne,parentFormListField:H,isShowLabel:te});if(N.attrtype===2)return W(tn,{children:"实例信息"});if(N.attrtype===0){const Ne=Sc(N),tt=(ie=N.json)==null?void 0:ie["default-prompt"],Se=Wh(N,E),{combinations:it=[]}=N.json||{};if(it!=null&&it.length)return W(ve.Col,{span:24/$,children:W(ve.Form.Item,{label:(pe=N==null?void 0:N.json)==null?void 0:pe["combination-name"],required:(be=N.json)==null?void 0:be.must,children:W(ve.Space.Compact,{children:it.map((gt,yt)=>{var Cn,nr,Zn,$n;let It=Sc(gt),On=ne;const Ln={},lr=gt.json.input||"text",on=Z==null?void 0:Z.find(rn=>rn.type===lr);if(on){const{width:rn}=(on==null?void 0:on.style)||{};rn&&(Ln.width=rn)}const ln=(Cn=gt==null?void 0:gt.json)==null?void 0:Cn["combination-width-ratio"];return ln&&(On=ne*ln),W(ve.Form.Item,{name:H?Array.isArray(H.name)?[...H.name,gt.attrid]:[H.name,gt.attrid]:gt.attrid,noStyle:!0,initialValue:It,rules:[...(nr=gt.json)!=null&&nr.must?[{required:!0,message:tt||`${Se}${gt.attrname}`}]:[],...(Zn=N.json)!=null&&Zn.regexp?[{pattern:new RegExp(N.json.regexp.replace(/^\/|\/$/g,"")),message:(($n=N.json)==null?void 0:$n["regexp-message"])||`${N.attrname}格式不正确`}]:[]],...S(gt),children:V({item:gt,readonly:I,formItemStyle:Z,radioAlign:ee,relatedid:J,form:Q,defaultWidth:On,customWidth:Ln})},yt)})})},`${N.attrid}+1`)});const He=K&&H?Array.isArray(H.name)?[...H.name,N.attrid]:[H.name,N.attrid]:N.attrid;return W(ve.Col,{span:24/$,children:W(ve.Form.Item,{name:He,label:te&&B(N,q)||null,initialValue:Ne,rules:[...(me=N.json)!=null&&me.must?[{required:!0,message:`${Se}${N.attrname}`}]:[],...(ce=N.json)!=null&&ce.regexp?[{pattern:new RegExp(N.json.regexp.replace(/^\/|\/$/g,"")),message:((Oe=N.json)==null?void 0:Oe["regexp-message"])||`${N.attrname}格式不正确`}]:[]],...S(N),children:V({item:N,readonly:I,formItemStyle:Z,radioAlign:ee,relatedid:J,form:Q,defaultWidth:ne})},N.attrid)})}return null},[B,Sc,S,z]),U=async N=>{var $;try{const I=($=N==null?void 0:N.response)==null?void 0:$.data;if(I){if(!r)return;const q=await r({Controlname:"DelFile",PageName:"initializationfile"},I);if((q==null?void 0:q.ReturnValue)!==1)return D.error((q==null?void 0:q.msg)||"删除文件失败"),!1}else T(N);return!0}catch{return D.error("删除文件失败,请重试"),!1}},V=({item:N,readonly:$=!1,formItemStyle:I=[],radioAlign:q="horizontal",relatedid:ee,form:Z,defaultWidth:J=358,customWidth:Q={}})=>{var Ne,tt,Se,it,He,gt;const ne=N.json.input||"text",K=((Ne=N.json)==null?void 0:Ne.format)||"",H=N.attrid,te=Sc(N),ae=((tt=N.json)==null?void 0:tt["default-prompt"])||"",ie=((Se=N.json)==null?void 0:Se["disable-date-goover"])||!1,pe=Wh(N,E),be=N.json.length&&{maxLength:N.json.length}||{},me=I.find(yt=>yt.type===ne);let ce=(it=N.json)==null?void 0:it["input-width"];ce&&(ce=x==="table"?Number(ce)-32:ce);const Oe=ce||J;switch(ne){case"label":return W(ve.Input,{disabled:!0,value:((He=N.json)==null?void 0:He["label-value"])||N.attrvalue||((gt=N.json)==null?void 0:gt.default)||"-",style:{width:Oe,...me==null?void 0:me.style,...Q}});case"text":return W(ve.Input,{placeholder:ae||pe,...be,disabled:$,allowClear:!0,style:{width:Oe,...me==null?void 0:me.style,...Q}});case"password":return W(ve.Input.Password,{placeholder:ae||pe,...be,disabled:$,allowClear:!0,style:{width:Oe,...me==null?void 0:me.style,...Q}});case"textarea":return W(ve.Input.TextArea,{allowClear:!0,placeholder:ae||pe,rows:5,...be,disabled:$,style:{width:Oe,...me==null?void 0:me.style,...Q}});case"number":return W(ve.InputNumber,{controls:!1,placeholder:ae||pe,...be,disabled:$,style:{width:Oe,...me==null?void 0:me.style,...Q}});case"select":case"mult-select":return W(cL,{item:N.json,readonly:$,style:{width:Oe,...me==null?void 0:me.style,...Q},commonRequestWidthParams:r,commonRequest:i,value:te,interfaceTypeDict:c,interfaceTypeSysDict:p,actionUrlKey:d,actionUrlExtraParams:m,langId:E,onChange:yt=>{Z.setFieldValue(N.attrid,yt)}});case"modal-mult-select":case"modal-select":return W(iL,{style:{width:Oe,...me==null?void 0:me.style,...Q},item:N.json,value:N.attrvalue||N.json.default||"",commonRequestWidthParams:r,commonRequest:i,onSure:async yt=>{Z.setFieldValue(N.attrid,yt)},disabled:$,langId:E,CustomModalComponent:C});case"mul-field-modal-select":return W(rL,{style:{width:Oe,...me==null?void 0:me.style,...Q},item:N.json,form:Z,attrid:H,value:N.attrvalue||N.json.default||"",commonRequestWidthParams:r,commonRequest:i,onSure:async yt=>{Z.setFieldsValue(yt)},disabled:$,CustomModalComponent:C,langId:E});case"date-picker":case"time-picker":case"week-picker":case"month-picker":case"quarter-picker":case"year-picker":case"second-picker":{const yt={"date-picker":"date","time-picker":"date","week-picker":"week","month-picker":"month","quarter-picker":"quarter","year-picker":"year","second-picker":"time"};let It;return ne==="date-picker"&&(It=ie?H6:void 0),W(ve.DatePicker,{showTime:ne==="time-picker",format:K||void 0,picker:yt[ne]||"date",disabled:$,disabledDate:It,placement:"bottomLeft",style:{width:Oe,...me==null?void 0:me.style,...Q}})}case"range-picker":return W(ve.DatePicker.RangePicker,{disabledDate:ie?H6:void 0,disabled:$,style:{width:Oe,...me==null?void 0:me.style,...Q}});case"multiple-date-picker":return W(ve.DatePicker,{multiple:!0,disabled:$,style:{width:Oe,...me==null?void 0:me.style,...Q}});case"radio":return W(pL,{radioAlign:q,commonRequest:i,commonRequestWidthParams:r,item:N.json,readonly:$,options:be,handleUrlOptions:Dc,value:te,interfaceTypeDict:c,interfaceTypeSysDict:p,actionUrlKey:d,actionUrlExtraParams:m,langId:E,onChange:yt=>{Z.setFieldValue(N.attrid,yt.target.value)}});case"checkbox":return W(lL,{radioAlign:q,commonRequest:i,commonRequestWidthParams:r,item:N.json,readonly:$,options:be,value:te,handleUrlOptions:Dc,interfaceTypeDict:c,interfaceTypeSysDict:p,actionUrlKey:d,actionUrlExtraParams:m,langId:E,onChange:yt=>{Z.setFieldValue(N.attrid,yt.join(","))}});case"audio":case"file":case"image":case"video":return W(hL,{action:t&&t("initializationfile"),item:N.json,uploadType:ne,langId:E,list:te,readonly:$,relatedid:ee,relatedidKey:g,onRemove:yt=>U(yt)});case"cascader":return W(sL,{commonRequestWidthParams:r,commonRequest:i,item:N.json,value:N.attrvalue,style:{width:Oe,...me==null?void 0:me.style,...Q},interfaceTypeDict:c,interfaceTypeSysDict:p,actionUrlKey:d,actionUrlExtraParams:m,langId:E});case"radio-card":return W(uL,{item:N.json,readonly:$,onChange:yt=>{Z.setFieldValue(N.attrid,yt)},langId:E,commonRequestWidthParams:r});default:return W(ve.Input,{placeholder:ae||pe,...be,showCount:!0,disabled:$,style:{width:Oe,...me==null?void 0:me.style,...Q}})}},F=({item:N,readonly:$=!1,colNum:I=1,instructionShowMode:q="icon",relatedid:ee,form:Z,defaultWidth:J=358,formItemStyle:Q,radioAlign:ne="horizontal",isFormListItem:K=!1,formListField:H,isShowLabel:te=!0})=>{var pe;const ae=N.info_base64===1?su(Qh(N.info)):su(N.info),ie={...N,json:{...N==null?void 0:N.json,...ae}};return((pe=ie.json)==null?void 0:pe.hide)===!0?null:W(G.Fragment,{children:M({itemWithJson:ie,readonly:$,colNum:I,instructionShowMode:q,relatedid:ee,form:Z,defaultWidth:J,formItemStyle:Q,radioAlign:ne,isFormListItem:K,formListField:H,isShowLabel:te})},ie.attrid)};return{handleRenderItem:F,handleSetFormItemInitialValue:Sc}}const mL=G.forwardRef((e,r)=>{const{formConfig:t,form:i,readonly:l=!1,relatedid:f,colNum:c=1,colSpace:p=[0,0],instructionShowMode:g="flex",defaultWidth:d=358,commonRequestWidthParams:m,uploadAction:C,commonRequest:b,formItemStyle:x=[],radioAlign:E="horizontal",interfaceTypeChildren:k="YLLRDetailAttrlist",interfaceTypeDict:D="YLZDDictList",interfaceTypeSysDict:A="YLZDSysConfigList",relatedidKey:T="relatedid",actionUrlKey:S="action-url",actionUrlExtraParams:O={},CustomModalComponent:B,formShowType:z="form",headerWidth:M,formListItemWidth:U,formListItemName:V,isEdit:F=!1,langId:N="10001"}=e,$=G.useRef([]),I=ee=>{$.current.push(ee)},{handleRenderItem:q}=vL({commonRequestWidthParams:m,uploadAction:C,commonRequest:b,updateDelFileList:I,formConfig:t,interfaceTypeChildren:k,interfaceTypeDict:D,interfaceTypeSysDict:A,relatedidKey:T,actionUrlKey:S,actionUrlExtraParams:O,CustomModalComponent:B,isEdit:F,formShowType:z,langId:N});return G.useImperativeHandle(r,()=>({getDelFileList:()=>$.current})),W(tn,{children:z==="table"?W(ve.Form.List,{name:V||"customFormList",initialValue:[{}],children:(ee,{add:Z,remove:J})=>W(ve.Flex,{className:"custom-form-body",children:Pe("div",{className:"custom-form-list",children:[Pe(ve.Flex,{align:"center",style:{position:"relative",backgroundColor:"#004d32"},children:[W(ve.Flex,{className:"custom-form-list-header",align:"center",children:t==null?void 0:t.map((Q,ne)=>{var H,te;const K=((H=Q==null?void 0:Q.json)==null?void 0:H["input-width"])&&Number((te=Q==null?void 0:Q.json)==null?void 0:te["input-width"])||d;return Pe(ve.Flex,{style:{width:K,flexShrink:0},align:"center",children:[ne!==0&&W("div",{className:"line"}),W("div",{className:"custom-form-list-header-item",children:Q.attrname})]},ne)})}),W("a",{className:"custom-form-list-add-btn",onClick:()=>Z(),children:N==="10001"?"新增":"Add"})]}),ee.map(Q=>Pe(ve.Flex,{align:"center",className:"custom-form-list-item-container",children:[W(ve.Flex,{className:"custom-form-list-item",align:"center",children:t==null?void 0:t.map((ne,K)=>{var te,ae;const H=((te=ne==null?void 0:ne.json)==null?void 0:te["input-width"])&&Number((ae=ne==null?void 0:ne.json)==null?void 0:ae["input-width"])||d;return W(ve.Flex,{align:"center",className:"custom-form-list-item-content",justify:"center",style:{width:H,flexShrink:0},children:q({item:ne,readonly:l,colNum:c,instructionShowMode:g,relatedid:f,form:i,defaultWidth:(U==null?void 0:U[K])||d,formItemStyle:x,isFormListItem:!0,formListField:Q,isShowLabel:!1})},ne.attrid||`child-${K}`)})}),W("a",{className:"custom-form-list-del-btn",onClick:()=>J(Q.key),children:N==="10001"?"删除":"Delete"})]},Q.key))]})})}):W(ve.Row,{gutter:p,children:t.map((ee,Z)=>W(G.Fragment,{children:q({item:ee,readonly:l,colNum:c,instructionShowMode:g,relatedid:f,form:i,defaultWidth:d,formItemStyle:x,radioAlign:E})},ee.attrid||`form-item-${Z}`))})})}),X6=(e,r)=>{const{input:t=""}=(e==null?void 0:e.json)||{};let i="请输入",l="Please input";return["radio","checkbox","select","mult-select","modal-select","modal-mult-select","mul-field-modal-select","cascader","radio-card","date-picker","range-picker","multiple-date-picker","time-picker","week-picker","month-picker","quarter-picker","year-picker","second-picker"].includes(t)&&(i="请选择",l="Please select"),["image","file","video","audio"].includes(t)&&(i="请上传",l="Please upload"),r==="10001"?i:l},kc=e=>{var i,l,f,c;const r=(i=e.json)==null?void 0:i.input;let t=e.attrvalue||((l=e.json)==null?void 0:l.default)||"";if(r==="label"&&t&&(t=((f=e.json)==null?void 0:f["label-value"])??t??"-"),r==="range-picker"&&t)try{t=t==null?void 0:t.split("~"),t=t.map(p=>p)}catch{t=void 0}if(r==="multiple-date-picker"&&t)try{t=t==null?void 0:t.split(","),t=t.map(p=>xn())}catch{t=void 0}if(r==="cascader"&&t&&typeof t=="string"){const p=(c=e.json)==null?void 0:c["cascader-delimiter"];p&&(t=t.split(p).filter(Boolean))}if(["mult-select","checkbox"].includes(r)&&t&&typeof t=="string"&&(t=t.split(",").filter(Boolean)),["image","video","audio","file"].includes(r)&&t)try{t=(Array.isArray(t)?t:JSON.parse(t)).map(g=>({...g,url:g.FilePath,name:g.FileName,uid:g.FileId}))}catch{t=[]}return e.attrtype===1&&(t=gL(e.children||[])),t||void 0},gL=e=>{if(!(e!=null&&e.length))return[];const r=t=>t==null?void 0:t.map(i=>{const l={};return Array.isArray(i)&&i.forEach(f=>{var c;(c=f==null?void 0:f.children)!=null&&c.length?l[f.attrid]=r(f.children):l[f.attrid]=f.attrvalue}),l});return r(e)};function yL(e){const{item:r,disabled:t,style:i,commonRequestWidthParams:l,CustomModalComponent:f,attrid:c,form:p,langId:g}=e,d=ve.Form.useWatch(c,p),{message:m}=ve.App.useApp(),C=r.input,[b,x]=G.useState(e.value),[E,k]=G.useState(!1),[D,A]=G.useState([]),[T,S]=G.useState([]),[O,B]=G.useState(!1),[z,M]=G.useState({PageNum:1,PageSize:6}),[U,V]=G.useState([]),[F,N]=G.useState(0),$=Q();G.useEffect(()=>{E&&q()},[E,z]);const I=(K,H)=>{A(K),S(H)},q=async()=>{var K;if(r.inputType==="url"&&(r!=null&&r["action-url"])){B(!0);try{const H=await l({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":r==null?void 0:r["action-url"],...z,...(r==null?void 0:r["action-url-extra-params"])||{}});if((H==null?void 0:H.ReturnValue)===0){m.error(H.msg),B(!1);return}const te=H==null?void 0:H.data,ae=(K=te==null?void 0:te.list)==null?void 0:K.map((pe,be)=>{const me=(z.PageNum-1)*z.PageSize+be;return{...pe,_rowKey:me}}),ie=(ae==null?void 0:ae.filter(pe=>D.includes(pe._rowKey)))||[];S(ie),V([...ae||[]]),N((te==null?void 0:te.number)||0),B(!1)}catch(H){B(!1),m.error(g==="10001"?H.msg||"参数错误":"Failed to load data")}return}m.error(g==="10001"?"请配置action-url":"Please configure action-url")},ee=()=>{var K;if(!t){if(b){const H=r==null?void 0:r["key-field"],te=H==null?void 0:H[c],{delimiter:ae="-",list:ie=[]}=te||{};if(!H){m.error(g==="10001"?"请配置key-field":"Please configure key-field");return}switch(C){case"mul-field-modal-select":const pe=(K=b==null?void 0:b.split(ae))==null?void 0:K[0],be=U==null?void 0:U.findIndex(Oe=>Object.values(Oe).includes(pe));A([be]);break;case"modal-mult-select":const me=b==null?void 0:b.split(","),ce=me==null?void 0:me.map(Oe=>{var tt;const Ne=(tt=Oe.split(ae))==null?void 0:tt[0];return U==null?void 0:U.findIndex(Se=>Ne.includes((Se==null?void 0:Se.typeid)||(Se==null?void 0:Se.instanceid)))});A(ce);break}}k(!0)}},Z=async()=>{try{const K=await xL(T,r);x((K==null?void 0:K[c])||""),e.onSure(K),k(!1)}catch(K){m.error(g==="10001"?K.msg||"参数错误":"Failed to load data")}},J=()=>{M({...z,PageNum:1}),k(!1)};function Q(){const K=r["modal-field-list"];let H=[];for(let te in K){let ae=K[te];const ie={dataIndex:te,title:ae};H=[...H,ie]}return H}const ne=K=>{M({...z,PageNum:K})};return Pe(tn,{children:[W(ve.Select,{placeholder:g==="10001"?(r==null?void 0:r["default-prompt"])||"请选择":"Please select",onClick:ee,open:!1,value:d,disabled:t,style:i}),f&&W(f,{title:r["modal-caption"]||"",open:E,onOk:Z,onCancel:J,modalStyle:{width:r["modal-width"]??600,minHeight:r["modal-height"]??400},children:W(ve.Table,{columns:$,loading:O,dataSource:U,rowKey:K=>K._rowKey,scroll:{y:"calc(80vh - 300px)"},rowSelection:{type:C==="mul-field-modal-select"?"radio":"checkbox",selectedRowKeys:D,onChange:I},pagination:{total:F,current:z.PageNum,pageSize:z.PageSize,onChange:ne}})})||W(ve.Modal,{title:r["modal-caption"],open:E,onOk:Z,onCancel:J,width:r["modal-width"]??600,okButtonProps:{disabled:D.length===0},children:W(ve.Table,{columns:$,loading:O,dataSource:U,rowKey:K=>K._rowKey,rowSelection:{type:C==="mul-field-modal-select"?"radio":"checkbox",selectedRowKeys:D,onChange:I},pagination:{total:F,current:z.PageNum,pageSize:z.PageSize,onChange:ne}})})]})}function xL(e,r){return new Promise((t,i)=>{try{var l=r["key-field"];if(!l){i({msg:"请配置key-field"});return}let f={};e.forEach(c=>{for(let[p,g]of Object.entries(l)){const d=(g==null?void 0:g.list)??[],m=(g==null?void 0:g.delimiter)??"-",C=d.map(b=>c==null?void 0:c[b]);f[p]=C.join(m)}}),t(f)}catch{i({msg:"key-field参数配置错误"})}})}function bL(e){const{item:r,disabled:t,style:i,commonRequestWidthParams:l,CustomModalComponent:f,langId:c}=e,{message:p}=ve.App.useApp(),g=r.input,[d,m]=G.useState(e.value),[C,b]=G.useState(!1),[x,E]=G.useState([]),[k,D]=G.useState([]),[A,T]=G.useState(!1),[S,O]=G.useState({PageNum:1,PageSize:6}),[B,z]=G.useState([]),[M,U]=G.useState(0),V=ee();G.useEffect(()=>{C&&N()},[C,S]);const F=(J,Q)=>{E(J),D(Q)},N=async()=>{var J;if(r.inputType==="url"&&(r!=null&&r["action-url"])){T(!0);try{const Q=await l({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":r==null?void 0:r["action-url"],...S});if((Q==null?void 0:Q.ReturnValue)===0){p.error(Q.msg),T(!1);return}const ne=Q==null?void 0:Q.data,K=(J=ne==null?void 0:ne.list)==null?void 0:J.map((te,ae)=>{const ie=(S.PageNum-1)*S.PageSize+ae;return{...te,_rowKey:ie}}),H=(K==null?void 0:K.filter(te=>x.includes(te._rowKey)))||[];D(H),z([...K||[]]),U((ne==null?void 0:ne.number)||0),T(!1)}catch(Q){T(!1),p.error(c==="10001"?Q.msg||"参数错误":"Failed to load data")}return}p.error(c==="10001"?"请配置action-url":"Please configure action-url")},$=()=>{var J,Q;if(!t){if(d){const ne=((J=r==null?void 0:r["key-field"])==null?void 0:J.list)??[],K=((Q=r==null?void 0:r["key-field"])==null?void 0:Q.delimiter)??"-";if(!ne.length){p.error(c==="10001"?"请配置key-field":"Please configure key-field");return}switch(g){case"modal-select":const H=d==null?void 0:d.split("-"),te=B==null?void 0:B.findIndex(pe=>H.includes((pe==null?void 0:pe.typeid)||(pe==null?void 0:pe.instanceid)));E([te]);break;case"modal-mult-select":const ae=d==null?void 0:d.split(","),ie=ae==null?void 0:ae.map(pe=>{var me;const be=(me=pe.split(K))==null?void 0:me[0];return B==null?void 0:B.findIndex(ce=>be.includes((ce==null?void 0:ce.typeid)||(ce==null?void 0:ce.instanceid)))});E(ie);break}}b(!0)}},I=async()=>{try{const J=await CL(k,r,c);m(J),e.onSure(J),b(!1)}catch(J){p.error(c==="10001"?J.msg||"参数错误":"Failed to build value")}},q=()=>{O({...S,PageNum:1}),b(!1)};function ee(){const J=r["modal-field-list"];let Q=[];for(let ne in J){let K=J[ne];const H={dataIndex:ne,title:K};Q=[...Q,H]}return Q}const Z=J=>{O({...S,PageNum:J})};return Pe(tn,{children:[W(ve.Select,{placeholder:c==="10001"?(r==null?void 0:r["default-prompt"])||"请选择":"Please select",onClick:$,value:d,open:!1,disabled:t,style:i}),f&&W(f,{title:r["modal-caption"]||"",open:C,onOk:I,onCancel:q,modalStyle:{width:r["modal-width"]??600,minHeight:r["modal-height"]??400},children:W(ve.Table,{columns:V,loading:A,dataSource:B,rowKey:J=>J._rowKey,scroll:{y:"calc(80vh - 300px)"},rowSelection:{type:g==="modal-select"?"radio":"checkbox",selectedRowKeys:x,onChange:F},pagination:{total:M,current:S.PageNum,pageSize:S.PageSize,onChange:Z}})})||W(ve.Modal,{title:r["modal-caption"],open:C,onOk:I,onCancel:q,width:r["modal-width"]??600,okButtonProps:{disabled:x.length===0},children:W(ve.Table,{columns:V,loading:A,dataSource:B,rowKey:J=>J._rowKey,rowSelection:{type:g==="modal-select"?"radio":"checkbox",selectedRowKeys:x,onChange:F},pagination:{total:M,current:S.PageNum,pageSize:S.PageSize,onChange:Z}})})]})}function CL(e,r,t){return new Promise((i,l)=>{try{var f=r["key-field"];if(!f){l({msg:t==="10001"?"请配置key-field":"Please configure key-field"});return}var c=(f==null?void 0:f.list)??[];let p=e.map(g=>c.map(m=>g[m]).join((f==null?void 0:f.delimiter)||"-")).join(",");i(p)}catch{l({msg:t==="10001"?"key-field参数配置错误":"Failed to build value"})}})}const wL=e=>{const{item:r,onChange:t,readonly:i=!1,options:l,radioAlign:f="horizontal",commonRequestWidthParams:c,commonRequest:p,handleUrlOptions:g,value:d,interfaceTypeDict:m,interfaceTypeSysDict:C,actionUrlKey:b,actionUrlExtraParams:x,langId:E}=e,{message:k}=ve.App.useApp(),[D,A]=G.useState([]),[T,S]=G.useState(d||[]);G.useEffect(()=>{if((r==null?void 0:r.inputType)==="local"){const z=(r==null?void 0:r.data)||[];A(z.map(M=>({value:M,label:M})))}else(r==null?void 0:r.inputType)==="dictionary"?O(r.classify,m):(r==null?void 0:r.inputType)==="system-dictionary"?O(r.classify,C):(r==null?void 0:r.inputType)==="url"&&B()},[r==null?void 0:r.inputType]);const O=async(z,M)=>{var V;if(!z)return;const U=await p(M,{asctypeid:z});if((U==null?void 0:U.ReturnValue)===1){const F=((V=U==null?void 0:U.data)==null?void 0:V.list)||[];A(F.map(N=>{const $=N.dicid+"-"+N.info;return{value:$,label:$}}))}},B=async()=>{var z,M;try{const U=((z=r==null?void 0:r["key-field"])==null?void 0:z.list)||[],V=((M=r==null?void 0:r["key-field"])==null?void 0:M.delimiter)||"";if(!U.length){k.error(E==="10001"?"请配置key-field":"Please configure key-field");return}const F=await c({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{[b]:r==null?void 0:r["action-url"],...x});if(F!=null&&F.data){const N=F==null?void 0:F.data,$=N==null?void 0:N.list;let I=[];Array.isArray(N)&&(I=N),Array.isArray($)&&(I=$);const q=I.map(ee=>({label:g(ee,V,U),value:g(ee,V,U)}));A([...q])}}catch{k.error(E==="10001"?"加载选项失败":"Failed to load options")}finally{}};return W(ve.Checkbox.Group,{...l,options:D,value:T,style:f==="vertical"?{display:"flex",flexDirection:"column",gap:"8px",width:"100%"}:{width:"100%"},onChange:z=>{S(z),t==null||t(z)},disabled:i})},_L=({item:e,readonly:r,value:t,onChange:i,style:l,commonRequestWidthParams:f,commonRequest:c,interfaceTypeDict:p,interfaceTypeSysDict:g,actionUrlKey:d,actionUrlExtraParams:m,langId:C})=>{const[b,x]=G.useState([]),[E,k]=G.useState(!1),{message:D}=ve.App.useApp();G.useEffect(()=>{A()},[e.inputType,e.classify,e.data,e.options]);const A=async()=>{if(e.inputType==="local"){let M=[];e.data&&Array.isArray(e.data)?M=e.data.map(U=>({label:U,value:U})):e.options&&Array.isArray(e.options)&&(M=e.options),x(M)}else if(e.inputType==="dictionary")await T(g);else if(e.inputType==="system-dictionary")T(g);else if(e.inputType==="url"&&(e!=null&&e["action-url"])){const M=await O();M&&Array.isArray(M)&&x(M)}else{let M=[];e.data&&Array.isArray(e.data)?M=e.data.map(U=>({label:U,value:U})):e.options&&Array.isArray(e.options)&&(M=e.options),x(M)}},T=async M=>{var U;if(e.classify){k(!0);try{const V=await c(M,{asctypeid:e.classify});if((U=V==null?void 0:V.data)!=null&&U.list&&Array.isArray(V.data.list)){const F=V.data.list.map(N=>({label:`${N.dicid||""}-${N.info||""}`,value:`${N.dicid||""}-${N.info||""}`}));x(F)}}catch{D.error(C==="10001"?"加载选项失败":"Failed to load options")}finally{k(!1)}}},S=(M,U)=>{i&&i(M)},O=async M=>new Promise(async(U,V)=>{var q,ee,Z;const F=((q=e==null?void 0:e["key-field"])==null?void 0:q.list)||[],N=(e==null?void 0:e["search-field"])||[],$=((ee=e==null?void 0:e["key-field"])==null?void 0:ee.delimiter)||"-";if(!F.length){D.error(C==="10001"?"请配置key-field":"Please configure key-field");return}const I={[d]:e==null?void 0:e["action-url"],...m};M&&(N.forEach(J=>{I[J]=M[J]||""}),I.level=Number(M.level||0)+1||""),k(!0);try{const J=await f({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},I);if((Z=J==null?void 0:J.data)!=null&&Z.list&&Array.isArray(J.data.list)){const Q=J.data.list.map(ne=>({...ne,label:`${ne[F[0]]||""}${$}${ne[F[1]]||""}`,value:`${ne[F[0]]||""}${$}${ne[F[1]]||""}`,children:[],isLeaf:(ne==null?void 0:ne.subcount)===0}));U(Q)}V([])}catch{D.error(C==="10001"?"加载选项失败":"Failed to load options"),V([])}finally{V([]),k(!1)}}),B=async M=>{const U=M[M.length-1],V=await O(U)||[];return U.children=V,x([...b]),V},z=(M,U)=>U.some(V=>V.label.toLowerCase().includes(M.toLowerCase()));return W(ve.Cascader,{showSearch:{filter:z},loading:E,placeholder:C==="10001"?"请选择":"Please select",loadData:B,disabled:r,onChange:S,style:{...l},options:b,value:t,onOpenChange:async M=>{var U;if(M&&(t!=null&&t.length)){const V=((U=e==null?void 0:e["key-field"])==null?void 0:U.list)||[],F=(e==null?void 0:e["search-field"])||[];if(!V.length||!F.length){D.error(C==="10001"?"请配置key-field和search-field":"Please configure key-field and search-field");return}const N=V.findIndex(q=>q===F[0]);if(N===-1){D.error(C==="10001"?"key-field与search-field配置不匹配":"key-field and search-field configuration does not match");return}const $=t.map(q=>q.split("-")[N]||"").filter(Boolean);let I=b;for(const[q,ee]of $.entries()){if(q===$.length-1)break;const Z=I.filter(ne=>ne[F[0]]===ee);if(Z.length===0)break;const J=Z[0];if(J.children&&J.children.length>0){I=J.children;continue}I=await B(Z)}}}})},EL=({item:e,readonly:r,value:t,onChange:i,style:l,commonRequestWidthParams:f})=>{const[c,p]=G.useState([]),[g,d]=G.useState(!1);G.useEffect(()=>{(async()=>{var T;if(e.inputType==="url"&&e["action-url"]){d(!0);try{const S=await f({PageName:"dns_relay",Controlname:"CallActionUrl",InterfaceType:""},{"action-url":e==null?void 0:e["action-url"]});(T=S==null?void 0:S.data)!=null&&T.list&&Array.isArray(S.data.list)?p(S.data.list):S!=null&&S.data&&Array.isArray(S.data)?p(S.data):Array.isArray(S==null?void 0:S.list)?p(S.list):(S==null?void 0:S.ReturnValue)===1&&(S!=null&&S.data)&&(Array.isArray(S.data)?p(S.data):p([S.data]))}catch{}finally{d(!1)}}else e.data&&Array.isArray(e.data)&&p(e.data)})()},[e.inputType,e["action-url"],e.data]);const m=A=>JSON.stringify(A),C=A=>{const T=m(A);return t===T},b=A=>{if(r)return;const T=m(A);i&&i(T)},x=e["card-image-width"]||200,E=e["card-image-height"]||100,k=e["card-image-field"],D=e["card-info-field"];return W("div",{style:{...l},children:g?W("div",{style:{textAlign:"center",padding:"20px"},children:"加载中..."}):W("div",{style:{display:"flex",flexWrap:"wrap",gap:"0px"},children:c.map((A,T)=>{const S=C(A);return Pe("div",{onClick:()=>b(A),style:{flex:"1 1 auto",width:`${x}px`,padding:"12px",cursor:r?"not-allowed":"pointer",opacity:r?.6:1,transition:"all 0.3s"},children:[A[k]&&W("img",{src:A.picurl,alt:A[D]||"",style:{width:`${x}px`,height:`${E}px`,objectFit:"cover",borderRadius:"4px",marginBottom:"8px"},onError:O=>{O.currentTarget.style.display="none"}}),W("div",{style:{fontSize:"14px",color:"#333333"},children:Pe(ve.Space,{size:6,children:[W("div",{style:{width:"16px",height:"16px",borderRadius:"50%",border:S?"none":"1px solid #d9d9d9",backgroundColor:S?"var(--color-primary)":"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,cursor:r?"not-allowed":"pointer"},children:S&&W(c8,{style:{fontSize:"12px",color:"#fff"}})}),A[D]||""]})})]},T)})})})},HQ="";function Zh(e,r){if(!e)return r;let t;return typeof e=="function"?t=e():"current"in e?t=e.current:t=e,t}function Ni(){}const Xh=Object.assign,Tc=typeof window<"u";function Zr(e){return e!=null}function Ac(e){return typeof e=="function"}function SL(e){return ud(e)&&Ac(e.then)&&Ac(e.catch)}function ud(e){return e!==null&&typeof e=="object"}function J6(e,r,t){return r.reduce((i,l)=>((!t||e[l]!==void 0)&&(i[l]=e[l]),i),{})}function H2(e,r){return r?typeof r=="string"?` ${e}--${r}`:Array.isArray(r)?r.reduce((t,i)=>t+H2(e,i),""):Object.keys(r).reduce((t,i)=>t+(r[i]?H2(e,i):""),""):""}function DL(e){return(r,t)=>(r&&typeof r!="string"&&(t=r,r=""),r=r?`${e}__${r}`:e,`${r}${H2(r,t)}`)}function bn(e,r){return e=`${r||"rv"}-${e}`,[DL(e),e]}function kL(e){e.stopPropagation()}function V2(e,r){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),r&&kL(e)}const TL={click:"onClick"};function eD(e,r){const t=Object.assign({},r.props);for(const i of e){const l=TL[i];t[l]=function(f){var c,p;f.stopPropagation(),(p=(c=r.props)[l])===null||p===void 0||p.call(c,f)}}return G.cloneElement(r,t)}const cd=Tc?window:global;let tD=Date.now();function AL(e){const r=Date.now(),t=Math.max(0,16-(r-tD)),i=setTimeout(e,t);return tD=r+t,i}function $2(e){return(cd.requestAnimationFrame||AL).call(cd,e)}function OL(){return Tc?/ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()):!1}function RL(e){const r="scrollTop"in e?e.scrollTop:e.pageYOffset;return Math.max(r,0)}function FL(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}function NL(e){nD(window,e)}function nD(e,r){"scrollTop"in e?e.scrollTop=r:e.scrollTo(e.scrollX,r)}const ML=OL();function rD(){ML&&NL(FL())}function aD(e){return/^\d+(\.\d+)?$/.test(e)}function iD(e){return Number.isNaN?Number.isNaN(e):e!==e}function cl(e){if(Zr(e))return e=String(e),aD(e)?`${e}px`:e}function PL(e){if(Zr(e)){const r=cl(e);return{width:r,height:r}}return{}}let Y2;function BL(){if(!Y2){const e=document.documentElement,r=e.style.fontSize||window.getComputedStyle(e).fontSize;Y2=parseFloat(r)}return Y2}function LL(e){return e=e.replace(/rem/g,""),+e*BL()}function zL(e){return e=e.replace(/vw/g,""),+e*window.innerWidth/100}function UL(e){return e=e.replace(/vh/g,""),+e*window.innerHeight/100}function oD(e){if(typeof e=="number")return e;if(Tc){if(e.indexOf("rem")!==-1)return LL(e);if(e.indexOf("vw")!==-1)return zL(e);if(e.indexOf("vh")!==-1)return UL(e)}return parseFloat(e)}function Jh(e,r,t){return Math.min(Math.max(e,r),t)}function lD(e,r,t){const i=e.indexOf(r);return i===-1?e:r==="-"&&i!==0?e.slice(0,i):e.slice(0,i+1)+e.slice(i).replace(t,"")}function jL(e,r=!0,t=!0){r?e=lD(e,".",/\./g):e=e.split(".")[0],t?e=lD(e,"-",/-/g):e=e.replace(/-/,"");const i=r?/[^-0-9.]/g:/[^-0-9]/g;return e.replace(i,"")}function fl(e,r=2){let t=`${e}`;for(;t.length<r;)t=`0${t}`;return t}let sD=!1;if(Tc)try{const e={};Object.defineProperty(e,"passive",{get(){sD=!0}}),window.addEventListener("test-passive",null,e)}catch{}function q2(e,r,t={}){if(!Tc)return;const{target:i=window,passive:l=!1,capture:f=!1,depends:c=[]}=t;let p;const g=()=>{const m=Zh(i);m&&!p&&(m.addEventListener(e,r,sD?{capture:f,passive:l}:f),p=!0)},d=()=>{const m=Zh(i);m&&p&&(m.removeEventListener(e,r,f),p=!1)};G.useEffect(()=>(g(),()=>d()),[i,...c])}function G2(e){const[r,t]=G.useState(e),i=G.useRef(r),l=G.useCallback(f=>{t(c=>i.current=Ac(f)?f(c):f)},[r]);return[r,l,i]}const IL=()=>{const e=G.useRef(!1);return G.useEffect(()=>(e.current=!1,()=>{e.current=!0}),[]),e},uD=(e={})=>{const r=IL(),[t,i,l]=G2(e),f=G.useCallback(c=>{r.current||i(p=>Object.assign(Object.assign({},p),Ac(c)?c(p):c))},[]);return[t,f,l]},Oc=(e,r)=>{const t=G.useRef(!1);G.useEffect(()=>{if(!t.current)t.current=!0;else return e()},r)};function cD(e){const r=G.useRef(e);return r.current=e,r}const HL=process.env.NODE_ENV==="development";function qQ(e,r){}const fD=e=>{process.env.NODE_ENV==="development"&&(Ac(e)||void 0);const r=cD(e);G.useEffect(()=>()=>{r.current()},[])};function dD(e,r){if(e===r)return!0;for(let t=0;t<e.length;t++)if(!Object.is(e[t],r[t]))return!1;return!0}const VL=(e=>(t,i,l)=>{const f=G.useRef(!1),c=G.useRef([]),p=G.useRef([]),g=G.useRef();e(()=>{var d;const C=(Array.isArray(l)?l:[l]).map(b=>Zh(b));if(!f.current){f.current=!0,c.current=C,p.current=i,g.current=t();return}(C.length!==c.current.length||!dD(C,c.current)||!dD(i,p.current))&&((d=g.current)===null||d===void 0||d.call(g),c.current=C,p.current=i,g.current=t())}),fD(()=>{var d;(d=g.current)===null||d===void 0||d.call(g),f.current=!1})})(G.useEffect);function $L(e,r){const[t,i]=G.useState(),[l,f]=G.useState();return VL(()=>{const c=Zh(e);if(!c)return;const p=new IntersectionObserver(g=>{for(const d of g)f(d.intersectionRatio),i(d.isIntersecting)},Object.assign(Object.assign({},r),{root:Zh(r==null?void 0:r.root)}));return p.observe(c),()=>{p.disconnect()}},[],e),[t,l]}const hD=10;function YL(e,r){return e>r&&e>hD?"horizontal":r>e&&r>hD?"vertical":""}function pD(){const e=G.useRef(0),r=G.useRef(0),t=G.useRef(0),i=G.useRef(0),l=G.useRef(0),f=G.useRef(0),c=G.useRef(""),p=G.useRef(null),g=()=>c.current==="vertical",d=()=>c.current==="horizontal",m=()=>{t.current=0,i.current=0,l.current=0,f.current=0,c.current="",p.current=null};return{move:x=>{const E=x.touches[0];t.current=E.clientX<0?0:E.clientX-e.current,i.current=E.clientY-r.current,l.current=Math.abs(t.current),f.current=Math.abs(i.current),p.current===null?p.current=!0:p.current=!1,c.current||(c.current=YL(l.current,f.current))},start:x=>{m(),e.current=x.touches[0].clientX,r.current=x.touches[0].clientY},reset:m,startX:e,startY:r,deltaX:t,deltaY:i,offsetX:l,offsetY:f,direction:c,isVertical:g,isHorizontal:d,firstMove:p}}const vD=/scroll|auto/i,qL=Tc?window:void 0;function GL(e){return e.tagName!=="HTML"&&e.tagName!=="BODY"&&e.nodeType===1}function KL(e,r=qL){r===void 0&&(r=window);let t=e;for(;t&&t!==r&&GL(t);){const{overflowY:i}=window.getComputedStyle(t);if(vD.test(i)){if(t.tagName!=="BODY")return t;const l=window.getComputedStyle(t.parentNode).overflowY;if(vD.test(l))return t}t=t.parentNode}return r}const WL=e=>(r,t)=>{const i=G.useRef(!1);e(()=>()=>{i.current=!1},[]),e(()=>{if(!i.current)i.current=!0;else return r()},t)},ep=Tc?G.useLayoutEffect:G.useEffect,QL=WL(ep),mD=()=>{const[,e]=G.useState({});return G.useCallback(()=>e({}),[])};function gD(e){process.env.NODE_ENV==="development"&&(Ac(e)||void 0);const r=G.useRef(e);r.current=G.useMemo(()=>e,[e]);const t=G.useRef();return t.current||(t.current=function(...i){return r.current.apply(this,i)}),t.current}function tp(e){const{value:r,defaultValue:t,onChange:i}=e,l=mD(),f=G.useRef(r!==void 0?r:t);r!==void 0&&(f.current=r);const c=gD((p,g)=>{const d=typeof p=="function"?p(f.current):p;!g&&d===f.current||(f.current=d,l(),i==null||i(d))});return[f.current,c]}const ZQ="";function Va(e,r){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&r.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,i=Object.getOwnPropertySymbols(e);l<i.length;l++)r.indexOf(i[l])<0&&Object.prototype.propertyIsEnumerable.call(e,i[l])&&(t[i[l]]=e[i[l]]);return t}function K2(e,r,t,i){function l(f){return f instanceof t?f:new t(function(c){c(f)})}return new(t||(t=Promise))(function(f,c){function p(m){try{d(i.next(m))}catch(C){c(C)}}function g(m){try{d(i.throw(m))}catch(C){c(C)}}function d(m){m.done?f(m.value):l(m.value).then(p,g)}d((i=i.apply(e,r||[])).next())})}const XQ="",ZL=({bem:e})=>W(tn,{children:Array(12).fill(null).map((r,t)=>W("i",{className:Ae(e("line",String(t+1)))},t))}),XL=({bem:e})=>W("svg",Object.assign({className:Ae(e("circular")),viewBox:"25 25 50 50"},{children:W("circle",{cx:"50",cy:"50",r:"20",fill:"none"})})),JL=({bem:e})=>Pe("div",Object.assign({className:Ae(e("ball"))},{children:[W("div",{}),W("div",{}),W("div",{})]})),ez=e=>({spinner:W(ZL,{bem:e}),circular:W(XL,{bem:e}),ball:W(JL,{bem:e})}),[Ng]=bn("loading"),W2=e=>{const{className:r,type:t="circular",vertical:i,color:l,size:f,textColor:c,children:p,textSize:g}=e,d=G.useMemo(()=>Object.assign({color:l},PL(f)),[l,f]),m=()=>p?W("span",Object.assign({className:Ae(Ng("text")),style:{fontSize:cl(g),color:c??l}},{children:p})):null;return Pe("div",Object.assign({className:Ae(r,Ng([t,{vertical:i}])),style:e.style},{children:[W("span",Object.assign({className:Ae(Ng("spinner",t)),style:d},{children:ez(Ng)[t]})),m()]}))},tz="#fff",np="rv-hairline",nz=`${np}--top`,rz=`${np}--left`,az=`${np}--surround`,iz=`${np}--top-bottom`,oz=`${np}-unset--top-bottom`,yD="rv-shadow",lz="__REACT_VANT_COMPONENT",xD=G.createContext({}),[rp]=bn("button"),sz=e=>{const{color:r,loading:t,className:i,hairline:l,loadingText:f,round:c,square:p,plain:g,block:d,loadingType:m,nativeType:C,iconPosition:b}=e,x=Va(e,["color","loading","className","hairline","loadingText","round","square","plain","block","loadingType","nativeType","iconPosition"]),{parent:E}=G.useContext(xD),k=G.useMemo(()=>e.size||(E==null?void 0:E.size)||"normal",[E==null?void 0:E.size,e.size]),D=G.useMemo(()=>e.type||(E==null?void 0:E.type)||"default",[E==null?void 0:E.type,e.type]),A=G.useMemo(()=>g??(E==null?void 0:E.plain),[E==null?void 0:E.plain,g]),T=G.useMemo(()=>d??(E==null?void 0:E.block),[E==null?void 0:E.block,d]),S=G.useMemo(()=>b||(E==null?void 0:E.iconPosition)||"left",[E==null?void 0:E.iconPosition,b]),O=G.useMemo(()=>{var ee;return(ee=e.disabled)!==null&&ee!==void 0?ee:E==null?void 0:E.disabled},[E==null?void 0:E.disabled,e.disabled]),B=G.useMemo(()=>C||(E==null?void 0:E.nativeType)||"button",[E==null?void 0:E.nativeType,C]),M=G.useMemo(()=>e.tag||(E==null?void 0:E.tag)||"button",[E==null?void 0:E.tag,e.tag]),U=Ae(i,rp([D,k,{plain:A,loading:t,disabled:O,hairline:l,block:T,round:c,square:p}]),{[az]:l},e.shadow&&`${yD}--${+e.shadow}`),V=Object.assign({},e.style);r&&(V.color=A?r:tz,A||(V.background=r),r.indexOf("gradient")!==-1?V.border=0:V.borderColor=r);const F=ee=>{!t&&!O&&e.onClick&&e.onClick(ee)},N=()=>{if(t){const{loadingSize:ee="20px"}=e;return W(W2,{className:Ae(rp("loading")),size:ee,type:m,color:D==="default"?void 0:""})}return null},$=()=>e.loading?N():e.icon?G.cloneElement(e.icon,{className:Ae(rp("icon"))}):null,I=()=>{let ee;return t?ee=f:ee=e.children||e.text,ee?W("span",Object.assign({className:Ae(rp("text"))},{children:ee}),"text"):null};return W(M,Object.assign({},x,{disabled:O,className:U,style:V,type:B,onClick:F},{children:(()=>Pe("div",Object.assign({className:Ae(rp("content"))},{children:[S==="left"&&$(),I(),S==="right"&&$()]})))()}))},[uz]=bn("button-group"),ap=Object.assign(sz,{Group:e=>{var{className:r,style:t,children:i,onClick:l}=e,f=Va(e,["className","style","children","onClick"]);return W("div",Object.assign({onClick:p=>{f.disabled||l==null||l(p)},style:t,className:Ae(r,uz([f.type,{round:f.round,plain:f.plain,disabled:f.disabled}]),f.shadow&&`${yD}--${+f.shadow}`)},{children:W(xD.Provider,Object.assign({value:{parent:f}},{children:i}))}))}}),aZ="";function Xr(...e){const r=Object.assign({},e[0]);return e.forEach(t=>{for(const i in t){const l=t[i];r[i]=r.hasOwnProperty(i)?r[i]:l}}),r}const[bD]=bn("badge"),cz=e=>{const r=Xr(e,{tag:"div",showZero:!0}),{content:t,max:i,dot:l,showZero:f,tag:c="div"}=r,p=c,g=()=>r.content?!0:Zr(t)&&t!==""&&(f||+t!=0),d=()=>!l&&g()?Zr(i)&&aD(t==null?void 0:t.toString())&&+t>i?`${i}+`:t:null,m=()=>{if(g()||r.dot){let C={background:r.color};if(r.offset){const[b,x]=r.offset;r.children?(C.top=cl(x),C.right=cl(b)):(C.marginTop=cl(x),C.marginLeft=cl(b))}return r.children||(C=Object.assign(Object.assign({},r.style),C)),W("div",Object.assign({className:Ae({[r.className]:r.className&&!r.children},bD({dot:r.dot,fixed:!!r.children})),style:C},{children:d()}))}return null};return r.children?Pe(p,Object.assign({className:Ae(bD("wrapper"),r.className),style:r.style,onClick:r.onClick,onTouchStart:r.onTouchStart},{children:[r.children,m()]})):m()},oZ="";var fz=globalThis&&globalThis.__rest||function(e,r){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&r.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,i=Object.getOwnPropertySymbols(e);l<i.length;l++)r.indexOf(i[l])<0&&Object.prototype.propertyIsEnumerable.call(e,i[l])&&(t[i[l]]=e[i[l]]);return t};function dz(e){return e.substring(3).replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^-/,"")}const is=G.forwardRef((e,r)=>{const{name:t="",className:i,style:l,spin:f,rotate:c,tabIndex:p,onClick:g,children:d}=e,m=fz(e,["name","className","style","spin","rotate","tabIndex","onClick","children"]),C={};c&&(C.msTransform=`rotate(${c}deg)`,C.transform=`rotate(${c}deg)`);const b=t?dz(t):void 0;let x=p;x===void 0&&g&&(x=-1);const E=Object.assign({role:"img","aria-label":b,focusable:"false","data-icon":b,"aria-hidden":"true",preserveAspectRatio:"xMidYMid meet",ref:r,tabIndex:x,onClick:g,className:["rv-icon",b?`rv-icon-${b}`:"",f?"rv-icon--spin":"",i].join(" ").trim(),style:Object.assign(Object.assign({},l),C)},m);return G.cloneElement(d,E)}),hz=e=>Fe.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Fe.createElement("path",{d:"M494.094 733.426a41.472 41.472 0 01-20.023-11.126L140.16 388.388c-16.272-16.271-16.272-42.653 0-58.925 16.271-16.272 42.653-16.272 58.925 0L503.66 634.037 808.186 329.51c16.271-16.272 42.653-16.272 58.925 0s16.272 42.654 0 58.926L533.2 722.347c-10.607 10.607-25.508 14.3-39.106 11.08z",fillRule:"evenodd"})),pz=Fe.forwardRef((e,r)=>Fe.createElement(is,Object.assign({name:"SvgArrowDown"},e,{ref:r}),Fe.createElement(hz,null))),vz=e=>Fe.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Fe.createElement("path",{d:"M296.114 508.035c-3.22-13.597.473-28.499 11.079-39.105l333.912-333.912c16.271-16.272 42.653-16.272 58.925 0s16.272 42.654 0 58.926L395.504 498.47l304.574 304.574c16.272 16.272 16.272 42.654 0 58.926s-42.654 16.272-58.926 0L307.241 528.058a41.472 41.472 0 01-11.127-20.023z",fillRule:"evenodd"})),mz=Fe.forwardRef((e,r)=>Fe.createElement(is,Object.assign({name:"SvgArrowLeft"},e,{ref:r}),Fe.createElement(vz,null))),gz=e=>Fe.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Fe.createElement("path",{d:"M513.176 285.05a41.472 41.472 0 0120.024 11.127L867.11 630.089c16.272 16.271 16.272 42.653 0 58.925s-42.654 16.272-58.925 0L503.612 384.44 199.085 688.967c-16.272 16.271-42.654 16.271-58.925 0-16.272-16.272-16.272-42.654 0-58.926L474.07 296.129c10.606-10.606 25.508-14.299 39.105-11.078z",fillRule:"evenodd"})),yz=Fe.forwardRef((e,r)=>Fe.createElement(is,Object.assign({name:"SvgArrowUp"},e,{ref:r}),Fe.createElement(gz,null))),xz=e=>Fe.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Fe.createElement("path",{d:"M711.156 508.035a41.472 41.472 0 01-11.126 20.023L366.12 861.97c-16.272 16.272-42.654 16.272-58.926 0s-16.272-42.654 0-58.926L611.767 498.47 307.241 193.944c-16.272-16.272-16.272-42.654 0-58.926 16.271-16.272 42.653-16.272 58.925 0L700.078 468.93c10.606 10.606 14.299 25.508 11.078 39.105z",fillRule:"evenodd"})),bz=Fe.forwardRef((e,r)=>Fe.createElement(is,Object.assign({name:"SvgArrow"},e,{ref:r}),Fe.createElement(xz,null))),Cz=e=>Fe.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Fe.createElement("path",{d:"M500 55.556c245.46 0 444.444 198.984 444.444 444.444S745.46 944.444 500 944.444 55.556 745.46 55.556 500 254.54 55.556 500 55.556zm176.441 267.887c-10.848-10.848-28.436-10.848-39.284 0L499.665 460.936 362.172 323.443c-10.848-10.848-28.436-10.848-39.284 0-10.848 10.848-10.848 28.436 0 39.284L460.38 500.22 322.888 637.713c-10.848 10.848-10.848 28.436 0 39.284 10.848 10.848 28.436 10.848 39.284 0l137.493-137.493 137.492 137.493c10.848 10.848 28.436 10.848 39.284 0 10.848-10.848 10.848-28.436 0-39.284L538.948 500.22l137.493-137.493c10.848-10.848 10.848-28.436 0-39.284z",fillRule:"evenodd"})),Mg=Fe.forwardRef((e,r)=>Fe.createElement(is,Object.assign({name:"SvgClear"},e,{ref:r}),Fe.createElement(Cz,null))),wz=e=>Fe.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Fe.createElement("path",{d:"M560.149 501.223l255.344 255.344c16.272 16.272 16.272 42.654 0 58.926s-42.654 16.272-58.926 0L501.223 560.149 245.88 815.493c-16.272 16.272-42.654 16.272-58.925 0-16.272-16.272-16.272-42.654 0-58.926l255.344-255.344L186.954 245.88c-16.272-16.272-16.272-42.654 0-58.925 16.271-16.272 42.653-16.272 58.925 0l255.344 255.344 255.344-255.344c16.272-16.272 42.654-16.272 58.926 0 16.272 16.271 16.272 42.653 0 58.925L560.149 501.223z",fillRule:"nonzero"})),Q2=Fe.forwardRef((e,r)=>Fe.createElement(is,Object.assign({name:"SvgCross"},e,{ref:r}),Fe.createElement(wz,null))),_z=e=>Fe.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Fe.createElement("path",{d:"M537.5 537.5v325c0 20.71-16.79 37.5-37.5 37.5s-37.5-16.79-37.5-37.5v-325h-325c-20.71 0-37.5-16.79-37.5-37.5s16.79-37.5 37.5-37.5h325v-325c0-20.71 16.79-37.5 37.5-37.5s37.5 16.79 37.5 37.5v325h325c20.71 0 37.5 16.79 37.5 37.5s-16.79 37.5-37.5 37.5h-325z",fillRule:"nonzero"})),Ez=Fe.forwardRef((e,r)=>Fe.createElement(is,Object.assign({name:"SvgPlus"},e,{ref:r}),Fe.createElement(_z,null))),Sz=e=>Fe.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Fe.createElement("path",{d:"M500 888.889c-214.389 0-388.889-174.5-388.889-388.889S285.611 111.111 500 111.111 888.889 285.611 888.889 500 714.389 888.889 500 888.889m0-833.333c-245.444 0-444.444 199-444.444 444.444 0 245.444 199 444.444 444.444 444.444 245.444 0 444.444-199 444.444-444.444 0-245.444-199-444.444-444.444-444.444m6.456 222.222c-44.612 0-80 12.778-105.612 39.055-26.277 25.667-39.055 60.445-39.055 105.056v1c0 17.944 14.444 32.444 32.389 32.444 17.889 0 32.389-14.5 32.389-32.444 0-.389-.111-1-.111-1 0-26.945 5.444-48.222 16.444-62.889 12.222-17.111 32.333-25.667 59.889-25.667 21.944 0 39.055 6.111 51.222 18.334 11.611 12.222 17.778 28.722 17.778 50.055 0 15.89-5.556 30.5-16.556 44.556l-10.389 11.61c-37.777 33.556-60.333 59-69.61 75.668-13.834 24.944-11.334 48-11.334 48 0 17.888 14.556 32.388 32.444 32.388 17.945 0 29.778-12.333 32.39-32.388 0 0 3.333-18.667 10.055-30.89 5.5-10.944 14.055-21.388 25-31.11 29.389-25.056 46.444-40.945 51.889-47.667 14.666-19.5 22.555-44.556 22.555-74.445 0-36.61-12.166-65.944-35.944-87.333-24.445-21.944-56.167-32.333-95.833-32.333m-10.417 357.15c-12.778 0-23.222 3.666-31.111 12.222-9.222 7.889-13.5 18.333-13.5 31.111 0 12.222 4.278 22.611 13.5 31.167 7.889 8.5 18.333 12.778 31.11 12.778 12.279 0 23.223-4.278 32.39-12.167 8.5-8.611 12.778-18.945 12.778-31.778 0-12.778-4.278-23.222-12.778-31.111-8.556-8.556-19.556-12.222-32.39-12.222",fillRule:"evenodd"})),Dz=Fe.forwardRef((e,r)=>Fe.createElement(is,Object.assign({name:"SvgQuestionO"},e,{ref:r}),Fe.createElement(Sz,null))),kz=e=>Fe.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"},e),Fe.createElement("path",{d:"M119.415 524.046c-9.708-9.693-11.278-24.766-2.72-35.554l20.007-25.223c8.201-10.34 23.543-12.936 34.386-5.699l173.175 115.585c9.134 6.097 24.856 5.303 33.384-1.616l457.6-371.25c10.286-8.345 26.397-7.634 35.412 1.368l11.272 11.255c9.81 9.795 9.096 25.343-1.187 35.611l-491.14 490.414c-15.28 15.258-40.369 14.59-56.099-1.116l-214.09-213.775z",fillRule:"nonzero"})),CD=Fe.forwardRef((e,r)=>Fe.createElement(is,Object.assign({name:"SvgSuccess"},e,{ref:r}),Fe.createElement(kz,null))),gZ="",[wD]=bn("cell-group"),Tz=e=>{const r=Xr(e,{border:!0}),{title:t,border:i,inset:l,card:f}=r,c=f||l,p=()=>W("div",Object.assign({className:Ae(wD({inset:c}),{[iz]:!c&&i})},{children:r.children})),g=()=>t?W("div",Object.assign({className:Ae(wD("title"))},{children:t})):null;return Pe("div",Object.assign({className:r.className,style:r.style},{children:[g(),p()]}))},[fd]=bn("cell"),Z2=Object.assign(e=>{const r=()=>Zr(e.label)?W("div",Object.assign({className:Ae(fd("label"),e.labelClass)},{children:e.label})):null,t=()=>Zr(e.title)?Pe("div",Object.assign({className:Ae(fd("title"),e.titleClass),style:e.titleStyle},{children:[e.title,r()]})):null,i=()=>{const D=Zr(e.title);return Zr(e.children)||Zr(e.value)?W("div",Object.assign({className:Ae(fd("value",{alone:!D}),e.valueClass)},{children:Zr(e.children)?e.children:W("span",{children:e.value})})):null},l=()=>e.icon?G.cloneElement(e.icon,{className:Ae(fd("left-icon"))}):null,f=()=>{if(e.rightIcon)return e.rightIcon;if(e.isLink){const D=Ae(fd("right-icon"));return e.arrowDirection==="left"?W(mz,{className:D}):e.arrowDirection==="up"?W(yz,{className:D}):e.arrowDirection==="down"?W(pz,{className:D}):W(bz,{className:D})}return null},{className:c,style:p,size:g,center:d,border:m=!0,isLink:C,required:b,onClick:x}=e,E=C||e.clickable,k={center:d,required:b,clickable:E,borderless:!m};return g&&(k[g]=!!g),Pe("div",Object.assign({style:p,className:Ae(fd(k),c),role:E?"button":void 0,onClick:x},{children:[l(),t(),i(),f(),e.extra]}))},{Group:Tz}),CZ="",wZ="";function Pg(e,r){return Pg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},Pg(e,r)}function _D(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,Pg(e,r)}function Az(e,r){return e.classList?!!r&&e.classList.contains(r):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+r+" ")!==-1}function Oz(e,r){e.classList?e.classList.add(r):Az(e,r)||(typeof e.className=="string"?e.className=e.className+" "+r:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+r))}function ED(e,r){return e.replace(new RegExp("(^|\\s)"+r+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function Rz(e,r){e.classList?e.classList.remove(r):typeof e.className=="string"?e.className=ED(e.className,r):e.setAttribute("class",ED(e.className&&e.className.baseVal||"",r))}const SD={disabled:!1};var Fz=process.env.NODE_ENV!=="production"?Ct.exports.oneOfType([Ct.exports.number,Ct.exports.shape({enter:Ct.exports.number,exit:Ct.exports.number,appear:Ct.exports.number}).isRequired]):null,Nz=process.env.NODE_ENV!=="production"?Ct.exports.oneOfType([Ct.exports.string,Ct.exports.shape({enter:Ct.exports.string,exit:Ct.exports.string,active:Ct.exports.string}),Ct.exports.shape({enter:Ct.exports.string,enterDone:Ct.exports.string,enterActive:Ct.exports.string,exit:Ct.exports.string,exitDone:Ct.exports.string,exitActive:Ct.exports.string})]):null;const DD=G.createContext(null);var ip="unmounted",Rc="exited",Fc="entering",dd="entered",X2="exiting",os=function(e){_D(r,e);function r(i,l){var f;f=e.call(this,i,l)||this;var c=l,p=c&&!c.isMounting?i.enter:i.appear,g;return f.appearStatus=null,i.in?p?(g=Rc,f.appearStatus=Fc):g=dd:i.unmountOnExit||i.mountOnEnter?g=ip:g=Rc,f.state={status:g},f.nextCallback=null,f}r.getDerivedStateFromProps=function(l,f){var c=l.in;return c&&f.status===ip?{status:Rc}:null};var t=r.prototype;return t.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},t.componentDidUpdate=function(l){var f=null;if(l!==this.props){var c=this.state.status;this.props.in?c!==Fc&&c!==dd&&(f=Fc):(c===Fc||c===dd)&&(f=X2)}this.updateStatus(!1,f)},t.componentWillUnmount=function(){this.cancelNextCallback()},t.getTimeouts=function(){var l=this.props.timeout,f,c,p;return f=c=p=l,l!=null&&typeof l!="number"&&(f=l.exit,c=l.enter,p=l.appear!==void 0?l.appear:c),{exit:f,enter:c,appear:p}},t.updateStatus=function(l,f){l===void 0&&(l=!1),f!==null?(this.cancelNextCallback(),f===Fc?this.performEnter(l):this.performExit()):this.props.unmountOnExit&&this.state.status===Rc&&this.setState({status:ip})},t.performEnter=function(l){var f=this,c=this.props.enter,p=this.context?this.context.isMounting:l,g=this.props.nodeRef?[p]:[cg.findDOMNode(this),p],d=g[0],m=g[1],C=this.getTimeouts(),b=p?C.appear:C.enter;if(!l&&!c||SD.disabled){this.safeSetState({status:dd},function(){f.props.onEntered(d)});return}this.props.onEnter(d,m),this.safeSetState({status:Fc},function(){f.props.onEntering(d,m),f.onTransitionEnd(b,function(){f.safeSetState({status:dd},function(){f.props.onEntered(d,m)})})})},t.performExit=function(){var l=this,f=this.props.exit,c=this.getTimeouts(),p=this.props.nodeRef?void 0:cg.findDOMNode(this);if(!f||SD.disabled){this.safeSetState({status:Rc},function(){l.props.onExited(p)});return}this.props.onExit(p),this.safeSetState({status:X2},function(){l.props.onExiting(p),l.onTransitionEnd(c.exit,function(){l.safeSetState({status:Rc},function(){l.props.onExited(p)})})})},t.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},t.safeSetState=function(l,f){f=this.setNextCallback(f),this.setState(l,f)},t.setNextCallback=function(l){var f=this,c=!0;return this.nextCallback=function(p){c&&(c=!1,f.nextCallback=null,l(p))},this.nextCallback.cancel=function(){c=!1},this.nextCallback},t.onTransitionEnd=function(l,f){this.setNextCallback(f);var c=this.props.nodeRef?this.props.nodeRef.current:cg.findDOMNode(this),p=l==null&&!this.props.addEndListener;if(!c||p){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var g=this.props.nodeRef?[this.nextCallback]:[c,this.nextCallback],d=g[0],m=g[1];this.props.addEndListener(d,m)}l!=null&&setTimeout(this.nextCallback,l)},t.render=function(){var l=this.state.status;if(l===ip)return null;var f=this.props,c=f.children;f.in,f.mountOnEnter,f.unmountOnExit,f.appear,f.enter,f.exit,f.timeout,f.addEndListener,f.onEnter,f.onEntering,f.onEntered,f.onExit,f.onExiting,f.onExited,f.nodeRef;var p=wb(f,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return G.createElement(DD.Provider,{value:null},typeof c=="function"?c(l,p):G.cloneElement(G.Children.only(c),p))},r}(G.Component);os.contextType=DD,os.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:Ct.exports.shape({current:typeof Element>"u"?Ct.exports.any:function(e,r,t,i,l,f){var c=e[r];return Ct.exports.instanceOf(c&&"ownerDocument"in c?c.ownerDocument.defaultView.Element:Element)(e,r,t,i,l,f)}}),children:Ct.exports.oneOfType([Ct.exports.func.isRequired,Ct.exports.element.isRequired]).isRequired,in:Ct.exports.bool,mountOnEnter:Ct.exports.bool,unmountOnExit:Ct.exports.bool,appear:Ct.exports.bool,enter:Ct.exports.bool,exit:Ct.exports.bool,timeout:function(r){var t=Fz;r.addEndListener||(t=t.isRequired);for(var i=arguments.length,l=new Array(i>1?i-1:0),f=1;f<i;f++)l[f-1]=arguments[f];return t.apply(void 0,[r].concat(l))},addEndListener:Ct.exports.func,onEnter:Ct.exports.func,onEntering:Ct.exports.func,onEntered:Ct.exports.func,onExit:Ct.exports.func,onExiting:Ct.exports.func,onExited:Ct.exports.func}:{};function hd(){}os.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:hd,onEntering:hd,onEntered:hd,onExit:hd,onExiting:hd,onExited:hd},os.UNMOUNTED=ip,os.EXITED=Rc,os.ENTERING=Fc,os.ENTERED=dd,os.EXITING=X2;const kD=os;var Mz=function(r,t){return r&&t&&t.split(" ").forEach(function(i){return Oz(r,i)})},J2=function(r,t){return r&&t&&t.split(" ").forEach(function(i){return Rz(r,i)})},eC=function(e){_D(r,e);function r(){for(var i,l=arguments.length,f=new Array(l),c=0;c<l;c++)f[c]=arguments[c];return i=e.call.apply(e,[this].concat(f))||this,i.appliedClasses={appear:{},enter:{},exit:{}},i.onEnter=function(p,g){var d=i.resolveArguments(p,g),m=d[0],C=d[1];i.removeClasses(m,"exit"),i.addClass(m,C?"appear":"enter","base"),i.props.onEnter&&i.props.onEnter(p,g)},i.onEntering=function(p,g){var d=i.resolveArguments(p,g),m=d[0],C=d[1],b=C?"appear":"enter";i.addClass(m,b,"active"),i.props.onEntering&&i.props.onEntering(p,g)},i.onEntered=function(p,g){var d=i.resolveArguments(p,g),m=d[0],C=d[1],b=C?"appear":"enter";i.removeClasses(m,b),i.addClass(m,b,"done"),i.props.onEntered&&i.props.onEntered(p,g)},i.onExit=function(p){var g=i.resolveArguments(p),d=g[0];i.removeClasses(d,"appear"),i.removeClasses(d,"enter"),i.addClass(d,"exit","base"),i.props.onExit&&i.props.onExit(p)},i.onExiting=function(p){var g=i.resolveArguments(p),d=g[0];i.addClass(d,"exit","active"),i.props.onExiting&&i.props.onExiting(p)},i.onExited=function(p){var g=i.resolveArguments(p),d=g[0];i.removeClasses(d,"exit"),i.addClass(d,"exit","done"),i.props.onExited&&i.props.onExited(p)},i.resolveArguments=function(p,g){return i.props.nodeRef?[i.props.nodeRef.current,p]:[p,g]},i.getClassNames=function(p){var g=i.props.classNames,d=typeof g=="string",m=d&&g?g+"-":"",C=d?""+m+p:g[p],b=d?C+"-active":g[p+"Active"],x=d?C+"-done":g[p+"Done"];return{baseClassName:C,activeClassName:b,doneClassName:x}},i}var t=r.prototype;return t.addClass=function(l,f,c){var p=this.getClassNames(f)[c+"ClassName"],g=this.getClassNames("enter"),d=g.doneClassName;f==="appear"&&c==="done"&&d&&(p+=" "+d),c==="active"&&l&&l.scrollTop,p&&(this.appliedClasses[f][c]=p,Mz(l,p))},t.removeClasses=function(l,f){var c=this.appliedClasses[f],p=c.base,g=c.active,d=c.done;this.appliedClasses[f]={},p&&J2(l,p),g&&J2(l,g),d&&J2(l,d)},t.render=function(){var l=this.props;l.classNames;var f=wb(l,["classNames"]);return G.createElement(kD,Fr({},f,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},r}(G.Component);eC.defaultProps={classNames:""},eC.propTypes=process.env.NODE_ENV!=="production"?Fr({},kD.propTypes,{classNames:Nz,onEnter:Ct.exports.func,onEntering:Ct.exports.func,onEntered:Ct.exports.func,onExit:Ct.exports.func,onExiting:Ct.exports.func,onExited:Ct.exports.func}):{};const TD=eC;function fn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}const _Z="",[Pz]=bn("overlay"),Bz=e=>{const r=G.useRef(null),t=Xr(e,{stopPropagation:["click"],lockScroll:!0,duration:300}),{visible:i,duration:l}=t,f=p=>{t.lockScroll&&V2(p,!0)},c=()=>{const p=Object.assign(Object.assign({zIndex:t.zIndex!==void 0?+t.zIndex:void 0,touchAction:t.lockScroll&&"none"},t.style),t.customStyle);return Zr(l)&&(p.animationDuration=`${l}ms`),eD(t.stopPropagation,W("div",Object.assign({ref:r,style:p,onClick:g=>{var d;g.target===g.currentTarget&&((d=t.onClick)===null||d===void 0||d.call(t,g))},className:Ae(Pz(),t.className)},{children:t.children})))};return q2("touchmove",f,{target:r}),W(TD,Object.assign({nodeRef:r,mountOnEnter:!0,unmountOnExit:!0,in:i,timeout:l,classNames:"rv-fade"},{children:c()}))};function Lz(e){const{interceptor:r,args:t,done:i,canceled:l}=e;if(r){const f=r.apply(null,t||[]);SL(f)?f.then(c=>{c?i():l&&l()}).catch(Ni):f?i():l&&l()}else i()}function tC(e){return(typeof e=="function"?e():e)||document.body}function Bg(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function zz(e,r){if(Bg()&&e){const t=tC(e);return eu.exports.createPortal(r,t)}return r}const Uz=G.createContext({});let AD=!1;if(Bg())try{const e={};Object.defineProperty(e,"passive",{get(){AD=!0}}),window.addEventListener("test-passive",null,e)}catch{}let op=0;const OD="rv-overflow-hidden";function jz(e,r){const t=pD(),i=c=>{t.move(c);const p=t.deltaY.current>0?"10":"01",g=KL(c.target,e.current);if(!g)return;const{scrollHeight:d,offsetHeight:m,scrollTop:C}=g;let b="11";C===0?b=m>=d?"00":"01":C+m>=d&&(b="10"),b!=="11"&&t.isVertical()&&!(parseInt(b,2)&parseInt(p,2))&&c.cancelable&&c.preventDefault()},l=()=>{document.addEventListener("touchstart",t.start),document.addEventListener("touchmove",i,AD?{passive:!1}:!1),op||document.body.classList.add(OD),op++},f=()=>{op&&(document.removeEventListener("touchstart",t.start),document.removeEventListener("touchmove",i),op--,op||document.body.classList.remove(OD))};G.useEffect(()=>{if(r)return l(),()=>{f()}},[r])}let RD=2e3;const[Lg]=bn("popup"),lp=G.forwardRef((e,r)=>{var t;const i=Xr(e,{duration:300,overlay:!0,lockScroll:!0,position:"center",closeIcon:W(Q2,{}),closeIconPosition:"top-right",closeOnClickOverlay:!0,stopPropagation:["click"],teleport:()=>document.body}),{round:l,closeable:f,title:c,description:p,children:g,duration:d,closeIcon:m,position:C}=i,b=G.useRef(!1),x=G.useRef((t=i.zIndex)!==null&&t!==void 0?t:RD),E=G.useRef(),[k,D]=G.useState(i.visible),[A,T]=G.useState(k),S=G.useMemo(()=>{const q=Object.assign({zIndex:x.current},i.style);if(Zr(i.duration)){const ee=i.position==="center"?"animationDuration":"transitionDuration";q[ee]=`${i.duration}ms`}return q},[x.current,i.position,i.style,i.duration]),O=()=>{var q;i.zIndex!==void 0?x.current=+i.zIndex:x.current=RD++,b.current=!0,(q=i.onOpen)===null||q===void 0||q.call(i)},B=()=>{Lz({interceptor:i.beforeClose,args:["close"],done:()=>{var q;b.current=!1,(q=i.onClose)===null||q===void 0||q.call(i)}})},z=q=>{var ee;(ee=i.onClickOverlay)===null||ee===void 0||ee.call(i,q),i.closeOnClickOverlay&&B()},M=()=>i.overlay?W(Bz,{visible:k,className:i.overlayClass,customStyle:i.overlayStyle,zIndex:x.current,duration:d,onClick:z}):null,U=q=>{i.onClickCloseIcon&&i.onClickCloseIcon(q),B()},V=()=>{if(f){const{closeIconPosition:q}=i;return m?W("div",Object.assign({className:Ae(Lg("close-icon",q)),onClick:U},{children:m})):null}return null},F=()=>c?W("div",Object.assign({className:Ae(Lg("title"))},{children:c})):null,N=()=>p?W("div",Object.assign({className:Ae(Lg("description"))},{children:p})):null,$=()=>{const{safeAreaInsetBottom:q}=i;return eD(i.stopPropagation,Pe("div",Object.assign({ref:E,style:Object.assign(Object.assign({},S),{display:!k&&!A?"none":void 0}),className:Ae(Lg({round:l,[C]:C}),{"rv-safe-area-bottom":q},i.className),onClick:i.onClick},{children:[F(),N(),g,V()]})))},I=()=>{const{transition:q,destroyOnClose:ee,forceRender:Z}=i,J=C==="center"?"rv-fade":`rv-popup-slide-${C}`;return W(TD,Object.assign({in:k,nodeRef:E,timeout:d,classNames:q||J,mountOnEnter:!Z,unmountOnExit:ee,onEnter:O,onEntered:i.onOpened,onExited:()=>{var Q;T(!1),(Q=i.onClosed)===null||Q===void 0||Q.call(i)}},{children:$()}))};return q2("popstate",()=>{i.closeOnPopstate&&B()}),ep(()=>{k&&T(!0)},[k]),ep(()=>{D(i.visible)},[i.visible]),jz(E,k&&i.lockScroll),G.useImperativeHandle(r,()=>({popupRef:E})),zz(i.teleport,Pe(Uz.Provider,Object.assign({value:{visible:k}},{children:[M(),I()]})))}),kZ="",FD=G.createContext({}),[Iz]=bn("action-bar"),Hz=e=>{const r=Xr(e,{safeAreaInsetBottom:!0}),t=G.useMemo(()=>G.Children.toArray(r.children),[r.children]);return W(FD.Provider,Object.assign({value:{parent:{children:t}}},{children:W("div",Object.assign({className:Ae(r.className,Iz(),{"rv-safe-area-bottom":r.safeAreaInsetBottom}),style:r.style},{children:G.Children.toArray(r.children).filter(Boolean).map((i,l)=>G.cloneElement(i,{index:l}))}))}))},[ND]=bn("action-bar-icon"),Vz=e=>{const r=()=>{const{badge:t,icon:i}=e;return i?W(cz,Object.assign({},t,{className:Ae(ND("icon"))},{children:i})):null};return Pe("div",Object.assign({role:"button",className:Ae(e.className,ND()),style:e.style,tabIndex:0,onClick:e.onClick},{children:[r(),e.children||e.text]}))},[$z]=bn("action-bar-button"),Yz=Object.assign(e=>{const{type:r,icon:t,text:i,color:l,loading:f,disabled:c,index:p}=e,{parent:g}=G.useContext(FD),d=G.useMemo(()=>{if(g){const C=g.children[p-1];return!(C&&"isButton"in C.type)}return!1},[p,g]),m=G.useMemo(()=>{if(g){const C=g.children[p+1];return!(C&&"isButton"in C.type)}return!1},[p,g]);return W(ap,Object.assign({className:Ae(e.className,$z([r,{last:m,first:d}])),style:e.style,size:"large",type:r,icon:t,color:l,loading:f,disabled:c,onClick:e.onClick},{children:e.children?e.children:i}))},{isButton:!0}),nC=Object.assign(Hz,{Icon:Vz,Button:Yz});function qz(e,r,t){const i=r[t];Zr(i)&&(!Object.prototype.hasOwnProperty.call(e,t)||!ud(i)?e[t]=i:e[t]=MD(Object(e[t]),r[t]))}function MD(e,r){return Object.keys(r).forEach(t=>{qz(e,r,t)}),e}const Gz={locale:MD({name:"姓名",tel:"电话",save:"保存",confirm:"确认",cancel:"取消",delete:"删除",loading:"加载中...",noCoupon:"暂无优惠券",nameEmpty:"请填写姓名",telInvalid:"请填写正确的电话",vanCalendar:{end:"结束",start:"开始",title:"日期选择",confirm:"确定",startEnd:"开始/结束",weekdays:["日","一","二","三","四","五","六"],monthTitle:(e,r)=>`${e}年${r}月`,rangePrompt:e=>`最多选择 ${e} 天`},vanPicker:{select:"请选择"},vanContactCard:{addText:"添加联系人"},vanContactList:{addText:"新建联系人"},vanPagination:{prev:"上一页",next:"下一页"},vanPullRefresh:{pulling:"下拉即可刷新...",loosing:"释放即可刷新...",loading:"加载中..."},vanSubmitBar:{label:"合计:"},vanCoupon:{unlimited:"无使用门槛",discount:e=>`${e}折`,condition:e=>`满${e}元可用`},vanCouponCell:{title:"优惠券",count:e=>`${e}张可用`},vanCouponList:{exchange:"兑换",close:"不使用优惠券",enable:"可用",disabled:"不可用",placeholder:"请输入优惠码"},vanAddressEdit:{area:"地区",postal:"邮政编码",areaEmpty:"请选择地区",addressEmpty:"请填写详细地址",postalEmpty:"邮政编码不正确",defaultAddress:"设为默认收货地址"},vanAddressEditDetail:{label:"详细地址",placeholder:"街道门牌信息"},vanAddressList:{add:"新增地址"}},{})},pd=G.createContext(Gz),[bo]=bn("dialog"),PD=e=>{const{locale:r}=G.useContext(pd),t=Xr(e,{transition:"rv-dialog-bounce",showConfirmButton:!0,closeOnPopstate:!0}),{width:i,title:l,theme:f,visible:c,message:p,className:g,messageAlign:d,closeOnClickOverlay:m,onClickCloseIcon:C}=t,b=Va(t,["width","title","theme","visible","message","className","messageAlign","closeOnClickOverlay","onClickCloseIcon"]),x=()=>t.title?W("div",Object.assign({className:Ae(bo("header",{isolated:!t.message&&!t.children}))},{children:l})):null,E=()=>t.children?W("div",Object.assign({className:Ae(bo("content"))},{children:t.children})):p?W("div",Object.assign({className:Ae(bo("content",{isolated:!l}))},{children:W("div",Object.assign({className:Ae(bo("message",{"has-title":l,[d]:d}))},{children:p}))})):null,k=()=>{var T,S,O,B,z,M;return Pe("div",Object.assign({className:Ae(nz,bo("footer"))},{children:[t.showCancelButton&&W(ap,{size:"large",text:t.cancelButtonText||r.cancel,className:Ae(bo("cancel")),style:{color:t.cancelButtonColor},loading:(T=t.cancelProps)===null||T===void 0?void 0:T.loading,disabled:(S=t.cancelProps)===null||S===void 0?void 0:S.disabled,onClick:!((O=t.cancelProps)===null||O===void 0)&&O.loading?Ni:t.onCancel}),t.showConfirmButton&&W(ap,{size:"large",text:t.confirmButtonText||r.confirm,className:Ae(bo("confirm"),{[rz]:t.showCancelButton}),round:f==="round-button"||void 0,style:{color:t.confirmButtonColor},loading:(B=t.confirmProps)===null||B===void 0?void 0:B.loading,disabled:(z=t.confirmProps)===null||z===void 0?void 0:z.disabled,onClick:!((M=t.confirmProps)===null||M===void 0)&&M.loading?Ni:t.onConfirm})]}))},D=()=>{var T,S,O,B,z,M;return Pe(nC,Object.assign({className:Ae(bo("footer"))},{children:[t.showCancelButton&&W(nC.Button,{type:"warning",text:t.cancelButtonText||r.cancel,className:Ae(bo("cancel")),color:t.cancelButtonColor,loading:(T=t.cancelProps)===null||T===void 0?void 0:T.loading,disabled:(S=t.cancelProps)===null||S===void 0?void 0:S.disabled,onClick:!((O=t.cancelProps)===null||O===void 0)&&O.loading?Ni:t.onCancel}),t.showConfirmButton&&W(nC.Button,{type:"danger",text:t.confirmButtonText||r.confirm,className:Ae(bo("confirm")),color:t.confirmButtonColor,loading:(B=t.confirmProps)===null||B===void 0?void 0:B.loading,disabled:(z=t.confirmProps)===null||z===void 0?void 0:z.disabled,onClick:!((M=t.confirmProps)===null||M===void 0)&&M.loading?Ni:t.onConfirm})]}))},A=()=>t.footer?t.footer:t.theme==="round-button"?D():k();return Pe(lp,Object.assign({},b,{visible:c,className:Ae(bo([f]),g),style:{width:cl(i)},"aria-labelledby":l||p,closeOnClickOverlay:m,onClickCloseIcon:C,onClose:t.onClose,onClosed:t.onClosed},{children:[x(),E(),A()]}))};Number((G.version||"").split(".")[0]);const Kz=Number((eu.exports.version||"").split(".")[0]),zg=Object.assign({},c9),{render:Wz,unmountComponentAtNode:Qz}=zg;let Ug;try{Kz>=18&&zg.createRoot&&(Ug=zg.createRoot)}catch{}function BD(e){const{__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:r}=zg;r&&typeof r=="object"&&(r.usingClientEntryPoint=e)}const jg="__react_vant_root__";function Zz(e,r){Wz(e,r)}function Xz(e,r){BD(!0);const t=r[jg]||Ug(r);BD(!1),t.render(e),r[jg]=t}function LD(e,r){if(Ug){Xz(e,r);return}Zz(e,r)}function Jz(e){return Qz(e)}function eU(e){return K2(this,void 0,void 0,function*(){return Promise.resolve().then(()=>{var r;(r=e[jg])===null||r===void 0||r.unmount(),delete e[jg]})})}function zD(e){return Ug?eU(e):Jz(e)}const vd=PD;vd.show=e=>{if(!Bg())return null;const r={overlay:!0,closeable:!1,closeIcon:W(Q2,{}),lockScroll:!0,transition:"rv-dialog-bounce",showConfirmButton:!0,showCancelButton:!1,closeOnClickOverlay:!1},{onClosed:t,onCancel:i=Ni,onConfirm:l=Ni,onClose:f=Ni,cancelProps:c,confirmProps:p}=e,g=Va(e,["onClosed","onCancel","onConfirm","onClose","cancelProps","confirmProps"]),d=tC(e.teleport),m=document.createElement("div");d.appendChild(m);let C=Ni;return LD(W(()=>{const[x,E]=G.useState(!1),[k,D]=G.useState(!1),[A,T]=G.useState(!1);G.useEffect(()=>{E(!0)},[]),C=()=>{E(!1),f&&f()};const S=()=>{t&&t(),zD(m)&&m.parentNode&&m.parentNode.removeChild(m)},O=z=>K2(void 0,void 0,void 0,function*(){const M=setTimeout(()=>T(!0));(yield l(z))!==!1?(clearTimeout(M),C()):(clearTimeout(M),T(!1))}),B=(z,M)=>K2(void 0,void 0,void 0,function*(){if(M){C();return}const U=setTimeout(()=>D(!0));(yield i(z))!==!1?(clearTimeout(U),C()):(clearTimeout(U),D(!1))});return W(PD,Object.assign({},r,g,{visible:x,teleport:()=>m,cancelProps:Object.assign({loading:k},c),confirmProps:Object.assign({loading:A},p),onClose:C,onCancel:B,onConfirm:O,onClosed:S}))},{}),m),C},vd.alert=e=>{const{onConfirm:r=Ni}=e;return new Promise(t=>{vd.show(Object.assign(Object.assign({},e),{onConfirm:i=>{r(i),t(i)}}))})},vd.confirm=e=>{const{onCancel:r=Ni,onConfirm:t=Ni}=e;return new Promise((i,l)=>{vd.show(Object.assign(Object.assign({showCancelButton:!0},e),{onCancel:f=>{r(f),l()},onConfirm:f=>{t(f),i(!0)}}))})};const tU=vd,[sp]=bn("input"),nU=G.forwardRef((e,r)=>{const t=Xr(e,{clearIcon:W(Mg,{}),clearTrigger:"focus",defaultValue:""}),i=G.useRef(),[l,f]=G.useState(!1),c=G.useRef(!1),[p,g]=tp(t),{className:d,style:m,align:C,type:b,name:x,placeholder:E,disabled:k,readOnly:D,maxLength:A,autoFocus:T}=t,S=()=>{i!=null&&i.current&&i.current.focus()},O=()=>{i!=null&&i.current&&i.current.blur()};G.useImperativeHandle(r,()=>({clear:()=>{g("")},focus:S,blur:O,get nativeElement(){return i.current}}));const B=G.useMemo(()=>{if(t.clearable&&!D){const $=p!=="",I=t.clearTrigger==="always"||t.clearTrigger==="focus"&&l;return $&&I}return!1},[p,t.clearTrigger,l]),z=$=>{var I;let q=$;if(!c.current&&(Zr(A)&&q.length>+A&&(q=q.slice(0,A),(I=t.onOverlimit)===null||I===void 0||I.call(t)),b==="number"||b==="digit")){const ee=b==="number";q=jL(q,ee,ee)}g(q)},M=$=>{var I;f(!0),(I=t.onFocus)===null||I===void 0||I.call(t,$),D&&O()},U=$=>{var I;f(!1),(I=t.onBlur)===null||I===void 0||I.call(t,$),rD()},V=$=>{var I;($.key==="Enter"||+$.charCode==13)&&(V2($),t.type==="search"&&O()),(I=t.onKeyPress)===null||I===void 0||I.call(t,$)},F=()=>{let $=b,I;return b==="number"&&($="text",I="decimal"),b==="digit"&&($="tel",I="numeric"),W("input",{value:p,type:$,inputMode:I,ref:i,name:x,className:Ae(sp("control")),disabled:k,autoFocus:T,readOnly:D,placeholder:E||"",onBlur:U,onFocus:M,onChange:q=>{var ee;return z((ee=q==null?void 0:q.currentTarget)===null||ee===void 0?void 0:ee.value)},onKeyPress:V,autoCapitalize:t.autoCapitalize,autoCorrect:t.autoCorrect,onKeyDown:t.onKeyDown,onKeyUp:t.onKeyUp,onCompositionStart:q=>{var ee;c.current=!0,(ee=t.onCompositionStart)===null||ee===void 0||ee.call(t,q)},onCompositionEnd:q=>{var ee,Z;c.current=!1,(ee=t.onCompositionEnd)===null||ee===void 0||ee.call(t,q),z((Z=q==null?void 0:q.currentTarget)===null||Z===void 0?void 0:Z.value)},onClick:t.onClick})},N=$=>{var I;g(""),(I=t.onClear)===null||I===void 0||I.call(t,$)};return Pe("div",Object.assign({className:Ae(sp([C]),d),style:m},{children:[t.prefix&&W("div",Object.assign({className:Ae(sp("prefix"))},{children:t.prefix})),F(),B&&G.cloneElement(t.clearIcon||W(Mg,{}),{className:Ae(sp("clear")),onTouchStart:N}),t.suffix&&W("div",Object.assign({className:Ae(sp("suffix"))},{children:t.suffix}))]}))}),[up]=bn("textarea"),rU=G.forwardRef((e,r)=>{const t=Xr(e,{rows:2,clearIcon:W(Mg,{}),clearTrigger:"focus",defaultValue:""}),[i,l]=G.useState(!1),f=G.useRef(),c=G.useRef(!1),[p,g]=tp(t),{className:d,style:m,name:C,rows:b,placeholder:x,disabled:E,readOnly:k,maxLength:D,showWordLimit:A,autoFocus:T}=t,S=()=>{f!=null&&f.current&&f.current.focus()},O=()=>{f!=null&&f.current&&f.current.blur()};G.useImperativeHandle(r,()=>({clear:()=>{g("")},focus:S,blur:O,get nativeElement(){return f.current}}));const B=()=>{const I=f.current;if(!I)return;I.style.height="auto";let q=I.scrollHeight;if(ud(t.autoSize)){const{maxHeight:ee,minHeight:Z}=t.autoSize;ee&&(q=Math.min(q,ee)),Z&&(q=Math.max(q,Z))}q&&(I.style.height=`${q}px`)};G.useEffect(()=>{B()},[p]);const z=G.useMemo(()=>up("control",[{"min-height":!t.autoSize,clear:t.clearable}]),[t.autoSize]),M=I=>{var q;let ee=I;c.current||Zr(D)&&ee.length>+D&&(ee=ee.slice(0,D),(q=t.onOverlimit)===null||q===void 0||q.call(t)),g(ee)},U=I=>{var q;l(!0),(q=t.onFocus)===null||q===void 0||q.call(t,I),k&&O()},V=I=>{var q;l(!1),(q=t.onBlur)===null||q===void 0||q.call(t,I),rD()},F=()=>{if(A){const I=(p?`${p}`:"").length;return W("div",Object.assign({className:Ae(up("word-limit"))},{children:typeof A=="function"?A({currentCount:I,maxLength:D}):Pe(tn,{children:[W("span",Object.assign({className:Ae(up("word-num"))},{children:I})),D?`/${D}`:!1]})}))}return null},N=I=>{var q;g(""),(q=t.onClear)===null||q===void 0||q.call(t,I)},$=G.useMemo(()=>{if(t.clearable&&!k){const I=p!=="",q=t.clearTrigger==="always"||t.clearTrigger==="focus"&&i;return I&&q}return!1},[p,t.clearTrigger,i]);return Pe("div",Object.assign({className:Ae(up(),d),style:m},{children:[W("textarea",{ref:f,name:C,rows:b,className:Ae(z),value:p,disabled:E,autoFocus:T,readOnly:k,placeholder:x||"",onBlur:V,onFocus:U,onChange:I=>{var q;return M((q=I==null?void 0:I.currentTarget)===null||q===void 0?void 0:q.value)},onKeyPress:t.onKeyPress,onKeyDown:t.onKeyDown,onKeyUp:t.onKeyUp,autoComplete:t.autoComplete,onCompositionStart:I=>{var q;c.current=!0,(q=t.onCompositionStart)===null||q===void 0||q.call(t,I)},onCompositionEnd:I=>{var q,ee;c.current=!1,(q=t.onCompositionEnd)===null||q===void 0||q.call(t,I),M((ee=I==null?void 0:I.currentTarget)===null||ee===void 0?void 0:ee.value)},onClick:t.onClick}),$&&G.cloneElement(t.clearIcon,{className:Ae(up("clear")),onTouchStart:N}),F()]}))}),IZ="",HZ="",uu=Object.assign(nU,{TextArea:rU}),[Mi]=bn("field"),aU=G.forwardRef((e,r)=>{var t;const i=Xr(e,{clearIcon:W(Mg,{}),clearTrigger:"focus",formatTrigger:"onChange",defaultValue:""}),l=G.useRef(null),f=G.useRef(null),c=i.type==="textarea"?f:l,p=()=>{c.current&&c.current.focus()},g=()=>{c.current&&c.current.blur()},d=()=>{c.current&&c.current.clear()};G.useImperativeHandle(r,()=>({focus:p,blur:g,clear:d,get nativeElement(){return c.current.nativeElement}}));const m=H=>Zr(i[H])?i[H]:null,C=()=>{const H=m("labelWidth");return H?{width:cl(H)}:{}},b=(H,te="onChange")=>{const{formatTrigger:ae,formatter:ie}=i;return ie&&te===ae?ie(H):H},x=H=>{var te;(te=i.onChange)===null||te===void 0||te.call(i,b(H))},E=()=>{const{value:H,defaultValue:te,align:ae,type:ie,placeholder:pe,name:be,maxLength:me,disabled:ce,readOnly:Oe,clearable:Ne,clearIcon:tt,clearTrigger:Se,autoFocus:it,onClear:He,onBlur:gt,onFocus:yt,onKeyPress:It,onOverlimit:On}=i;if(Zr(i.children))return W("div",Object.assign({className:Ae(Mi("children"))},{children:i.children}));const Ln={value:H,onChange:x,placeholder:pe,name:be,defaultValue:te,disabled:ce,clearable:Ne,clearIcon:tt,clearTrigger:Se,onClear:He,onBlur:gt,onFocus:yt,onKeyPress:It,onOverlimit:On,autoFocus:it,readOnly:Oe,maxLength:me,onClick:i.onClickInput};return ie==="textarea"?W(uu.TextArea,Object.assign({ref:f,autoSize:i.autoSize,showWordLimit:i.showWordLimit,rows:i.rows},Ln)):W(uu,Object.assign({ref:l,type:ie,align:ae},Ln))},k=()=>{const{leftIcon:H,onClickLeftIcon:te}=i;return H?W("div",Object.assign({className:Ae(Mi("left-icon")),onClick:te},{children:H})):null},D=()=>{const{rightIcon:H,onClickRightIcon:te}=i;return H?W("div",Object.assign({className:Ae(Mi("right-icon")),onClick:te},{children:H})):null},A=()=>{const H=i.errorMessage;return H?W("div",Object.assign({className:Ae(Mi("error-message"))},{children:H})):null},T=()=>i.intro?W("div",Object.assign({className:Ae(Mi("intro"))},{children:i.intro})):null,S=()=>{const{tooltip:H}=i;if(H){let te=W(Dz,{}),ae={message:H};if(!(G.isValidElement(H)||typeof H=="string")){const ie=H,{icon:pe}=ie,be=Va(ie,["icon"]);te=pe||te,ae=be}return W("div",Object.assign({className:Ae(Mi("tooltip")),onClick:()=>tU.show(ae)},{children:te}))}return null},O=()=>{const{label:H,colon:te}=i;return H?Pe(tn,{children:[H,!!te&&":",S()]}):null},{size:B,center:z,border:M,isLink:U,required:V,clickable:F,labelAlign:N,className:$,labelClass:I,valueClass:q,controlAlign:ee,arrowDirection:Z,disabled:J,titleStyle:Q,error:ne}=i,K=(t=i.suffix)!==null&&t!==void 0?t:i.button;return Pe(Z2,Object.assign({title:O(),size:B,icon:k(),center:z,border:M,isLink:U,required:V,clickable:F,extra:i.extra,titleStyle:Object.assign(Object.assign({},C()),Q),valueClass:Ae(Mi("value",[ee]),q),titleClass:Ae(Mi("label",N),I),arrowDirection:Z,onClick:i.onClick,style:i.style,className:Ae(Mi({error:ne,disabled:J,[`label-${N}`]:N}),$)},{children:[Pe("div",Object.assign({className:Ae(Mi("body"))},{children:[i.prefix&&W("div",Object.assign({className:Ae(Mi("prefix"))},{children:i.prefix})),W("div",Object.assign({className:Ae(Mi("control-wrapper"))},{children:E()})),D(),K&&W("div",Object.assign({className:Ae(Mi("suffix"))},{children:K}))]})),A(),T()]}))}),iU=Symbol("field"),rC=Object.assign(aU,{[lz]:iU});function oU(e,r,t){return Math.max(r,Math.min(e,t))}const Ea={toVector(e,r){return e===void 0&&(e=r),Array.isArray(e)?e:[e,e]},add(e,r){return[e[0]+r[0],e[1]+r[1]]},sub(e,r){return[e[0]-r[0],e[1]-r[1]]},addTo(e,r){e[0]+=r[0],e[1]+=r[1]},subTo(e,r){e[0]-=r[0],e[1]-=r[1]}};function UD(e,r,t){return r===0||Math.abs(r)===1/0?Math.pow(e,t*5):e*r*t/(r+t*e)}function jD(e,r,t,i=.15){return i===0?oU(e,r,t):e<r?-UD(r-e,t-r,i)+r:e>t?+UD(e-t,t-r,i)+t:e}function lU(e,[r,t],[i,l]){const[[f,c],[p,g]]=e;return[jD(r,f,c,i),jD(t,p,g,l)]}function li(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function ID(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),t.push.apply(t,i)}return t}function tr(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?ID(Object(t),!0).forEach(function(i){li(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ID(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}const HD={pointer:{start:"down",change:"move",end:"up"},mouse:{start:"down",change:"move",end:"up"},touch:{start:"start",change:"move",end:"end"},gesture:{start:"start",change:"change",end:"end"}};function VD(e){return e?e[0].toUpperCase()+e.slice(1):""}const sU=["enter","leave"];function uU(e=!1,r){return e&&!sU.includes(r)}function cU(e,r="",t=!1){const i=HD[e],l=i&&i[r]||r;return"on"+VD(e)+VD(l)+(uU(t,l)?"Capture":"")}const fU=["gotpointercapture","lostpointercapture"];function dU(e){let r=e.substring(2).toLowerCase();const t=!!~r.indexOf("passive");t&&(r=r.replace("passive",""));const i=fU.includes(r)?"capturecapture":"capture",l=!!~r.indexOf(i);return l&&(r=r.replace("capture","")),{device:r,capture:l,passive:t}}function hU(e,r=""){const t=HD[e],i=t&&t[r]||r;return e+i}function Ig(e){return"touches"in e}function $D(e){return Ig(e)?"touch":"pointerType"in e?e.pointerType:"mouse"}function pU(e){return Array.from(e.touches).filter(r=>{var t,i;return r.target===e.currentTarget||((t=e.currentTarget)===null||t===void 0||(i=t.contains)===null||i===void 0?void 0:i.call(t,r.target))})}function vU(e){return e.type==="touchend"||e.type==="touchcancel"?e.changedTouches:e.targetTouches}function YD(e){return Ig(e)?vU(e)[0]:e}function mU(e){return pU(e).map(r=>r.identifier)}function aC(e){const r=YD(e);return Ig(e)?r.identifier:r.pointerId}function qD(e){const r=YD(e);return[r.clientX,r.clientY]}function gU(e){const r={};if("buttons"in e&&(r.buttons=e.buttons),"shiftKey"in e){const{shiftKey:t,altKey:i,metaKey:l,ctrlKey:f}=e;Object.assign(r,{shiftKey:t,altKey:i,metaKey:l,ctrlKey:f})}return r}function Hg(e,...r){return typeof e=="function"?e(...r):e}function yU(){}function xU(...e){return e.length===0?yU:e.length===1?e[0]:function(){let r;for(const t of e)r=t.apply(this,arguments)||r;return r}}function GD(e,r){return Object.assign({},r,e||{})}const bU=32;class CU{constructor(r,t,i){this.ctrl=r,this.args=t,this.key=i,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(r){this.ctrl.state[this.key]=r}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:r,shared:t,ingKey:i,args:l}=this;t[i]=r._active=r.active=r._blocked=r._force=!1,r._step=[!1,!1],r.intentional=!1,r._movement=[0,0],r._distance=[0,0],r._direction=[0,0],r._delta=[0,0],r._bounds=[[-1/0,1/0],[-1/0,1/0]],r.args=l,r.axis=void 0,r.memo=void 0,r.elapsedTime=0,r.direction=[0,0],r.distance=[0,0],r.overflow=[0,0],r._movementBound=[!1,!1],r.velocity=[0,0],r.movement=[0,0],r.delta=[0,0],r.timeStamp=0}start(r){const t=this.state,i=this.config;t._active||(this.reset(),this.computeInitial(),t._active=!0,t.target=r.target,t.currentTarget=r.currentTarget,t.lastOffset=i.from?Hg(i.from,t):t.offset,t.offset=t.lastOffset),t.startTime=t.timeStamp=r.timeStamp}computeValues(r){const t=this.state;t._values=r,t.values=this.config.transform(r)}computeInitial(){const r=this.state;r._initial=r._values,r.initial=r.values}compute(r){const{state:t,config:i,shared:l}=this;t.args=this.args;let f=0;if(r&&(t.event=r,i.preventDefault&&r.cancelable&&t.event.preventDefault(),t.type=r.type,l.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,l.locked=!!document.pointerLockElement,Object.assign(l,gU(r)),l.down=l.pressed=l.buttons%2===1||l.touches>0,f=r.timeStamp-t.timeStamp,t.timeStamp=r.timeStamp,t.elapsedTime=t.timeStamp-t.startTime),t._active){const z=t._delta.map(Math.abs);Ea.addTo(t._distance,z)}this.axisIntent&&this.axisIntent(r);const[c,p]=t._movement,[g,d]=i.threshold,{_step:m,values:C}=t;if(i.hasCustomTransform?(m[0]===!1&&(m[0]=Math.abs(c)>=g&&C[0]),m[1]===!1&&(m[1]=Math.abs(p)>=d&&C[1])):(m[0]===!1&&(m[0]=Math.abs(c)>=g&&Math.sign(c)*g),m[1]===!1&&(m[1]=Math.abs(p)>=d&&Math.sign(p)*d)),t.intentional=m[0]!==!1||m[1]!==!1,!t.intentional)return;const b=[0,0];if(i.hasCustomTransform){const[z,M]=C;b[0]=m[0]!==!1?z-m[0]:0,b[1]=m[1]!==!1?M-m[1]:0}else b[0]=m[0]!==!1?c-m[0]:0,b[1]=m[1]!==!1?p-m[1]:0;this.restrictToAxis&&!t._blocked&&this.restrictToAxis(b);const x=t.offset,E=t._active&&!t._blocked||t.active;E&&(t.first=t._active&&!t.active,t.last=!t._active&&t.active,t.active=l[this.ingKey]=t._active,r&&(t.first&&("bounds"in i&&(t._bounds=Hg(i.bounds,t)),this.setup&&this.setup()),t.movement=b,this.computeOffset()));const[k,D]=t.offset,[[A,T],[S,O]]=t._bounds;t.overflow=[k<A?-1:k>T?1:0,D<S?-1:D>O?1:0],t._movementBound[0]=t.overflow[0]?t._movementBound[0]===!1?t._movement[0]:t._movementBound[0]:!1,t._movementBound[1]=t.overflow[1]?t._movementBound[1]===!1?t._movement[1]:t._movementBound[1]:!1;const B=t._active?i.rubberband||[0,0]:[0,0];if(t.offset=lU(t._bounds,t.offset,B),t.delta=Ea.sub(t.offset,x),this.computeMovement(),E&&(!t.last||f>bU)){t.delta=Ea.sub(t.offset,x);const z=t.delta.map(Math.abs);Ea.addTo(t.distance,z),t.direction=t.delta.map(Math.sign),t._direction=t._delta.map(Math.sign),!t.first&&f>0&&(t.velocity=[z[0]/f,z[1]/f])}}emit(){const r=this.state,t=this.shared,i=this.config;if(r._active||this.clean(),(r._blocked||!r.intentional)&&!r._force&&!i.triggerAllEvents)return;const l=this.handler(tr(tr(tr({},t),r),{},{[this.aliasKey]:r.values}));l!==void 0&&(r.memo=l)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}function wU([e,r],t){const i=Math.abs(e),l=Math.abs(r);if(i>l&&i>t)return"x";if(l>i&&l>t)return"y"}class _U extends CU{constructor(...r){super(...r),li(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=Ea.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=Ea.sub(this.state.offset,this.state.lastOffset)}axisIntent(r){const t=this.state,i=this.config;if(!t.axis&&r){const l=typeof i.axisThreshold=="object"?i.axisThreshold[$D(r)]:i.axisThreshold;t.axis=wU(t._movement,l)}t._blocked=(i.lockDirection||!!i.axis)&&!t.axis||!!i.axis&&i.axis!==t.axis}restrictToAxis(r){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":r[1]=0;break;case"y":r[0]=0;break}}}const KD=e=>e,WD=.15,iC={enabled(e=!0){return e},eventOptions(e,r,t){return tr(tr({},t.shared.eventOptions),e)},preventDefault(e=!1){return e},triggerAllEvents(e=!1){return e},rubberband(e=0){switch(e){case!0:return[WD,WD];case!1:return[0,0];default:return Ea.toVector(e)}},from(e){if(typeof e=="function")return e;if(e!=null)return Ea.toVector(e)},transform(e,r,t){const i=e||t.shared.transform;if(this.hasCustomTransform=!!i,process.env.NODE_ENV==="development"){const l=i||KD;return f=>{const c=l(f);return!isFinite(c[0])||isFinite(c[1]),c}}return i||KD},threshold(e){return Ea.toVector(e,0)}};process.env.NODE_ENV==="development"&&Object.assign(iC,{domTarget(e){if(e!==void 0)throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.");return NaN},lockDirection(e){if(e!==void 0)throw Error("[@use-gesture]: `lockDirection` option has been merged with `axis`. Use it as in `{ axis: 'lock' }`");return NaN},initial(e){if(e!==void 0)throw Error("[@use-gesture]: `initial` option has been renamed to `from`.");return NaN}});const EU=0,cp=tr(tr({},iC),{},{axis(e,r,{axis:t}){if(this.lockDirection=t==="lock",!this.lockDirection)return t},axisThreshold(e=EU){return e},bounds(e={}){if(typeof e=="function")return f=>cp.bounds(e(f));if("current"in e)return()=>e.current;if(typeof HTMLElement=="function"&&e instanceof HTMLElement)return e;const{left:r=-1/0,right:t=1/0,top:i=-1/0,bottom:l=1/0}=e;return[[r,t],[i,l]]}}),Vg=10,QD={ArrowRight:(e=1)=>[Vg*e,0],ArrowLeft:(e=1)=>[-Vg*e,0],ArrowUp:(e=1)=>[0,-Vg*e],ArrowDown:(e=1)=>[0,Vg*e]};class SU extends _U{constructor(...r){super(...r),li(this,"ingKey","dragging")}reset(){super.reset();const r=this.state;r._pointerId=void 0,r._pointerActive=!1,r._keyboardActive=!1,r._preventScroll=!1,r._delayed=!1,r.swipe=[0,0],r.tap=!1,r.canceled=!1,r.cancel=this.cancel.bind(this)}setup(){const r=this.state;if(r._bounds instanceof HTMLElement){const t=r._bounds.getBoundingClientRect(),i=r.currentTarget.getBoundingClientRect(),l={left:t.left-i.left+r.offset[0],right:t.right-i.right+r.offset[0],top:t.top-i.top+r.offset[1],bottom:t.bottom-i.bottom+r.offset[1]};r._bounds=cp.bounds(l)}}cancel(){const r=this.state;r.canceled||(r.canceled=!0,r._active=!1,setTimeout(()=>{this.compute(),this.emit()},0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(r){const t=this.config,i=this.state;if(r.buttons!=null&&(Array.isArray(t.pointerButtons)?!t.pointerButtons.includes(r.buttons):t.pointerButtons!==-1&&t.pointerButtons!==r.buttons))return;const l=this.ctrl.setEventIds(r);t.pointerCapture&&r.target.setPointerCapture(r.pointerId),!(l&&l.size>1&&i._pointerActive)&&(this.start(r),this.setupPointer(r),i._pointerId=aC(r),i._pointerActive=!0,this.computeValues(qD(r)),this.computeInitial(),t.preventScrollAxis&&$D(r)!=="mouse"?(i._active=!1,this.setupScrollPrevention(r)):t.delay>0?(this.setupDelayTrigger(r),t.triggerAllEvents&&(this.compute(r),this.emit())):this.startPointerDrag(r))}startPointerDrag(r){const t=this.state;t._active=!0,t._preventScroll=!0,t._delayed=!1,this.compute(r),this.emit()}pointerMove(r){const t=this.state,i=this.config;if(!t._pointerActive||t.type===r.type&&r.timeStamp===t.timeStamp)return;const l=aC(r);if(t._pointerId!==void 0&&l!==t._pointerId)return;const f=qD(r);if(document.pointerLockElement===r.target?t._delta=[r.movementX,r.movementY]:(t._delta=Ea.sub(f,t._values),this.computeValues(f)),Ea.addTo(t._movement,t._delta),this.compute(r),t._delayed&&t.intentional){this.timeoutStore.remove("dragDelay"),t.active=!1,this.startPointerDrag(r);return}if(i.preventScrollAxis&&!t._preventScroll)if(t.axis)if(t.axis===i.preventScrollAxis||i.preventScrollAxis==="xy"){t._active=!1,this.clean();return}else{this.timeoutStore.remove("startPointerDrag"),this.startPointerDrag(r);return}else return;this.emit()}pointerUp(r){this.ctrl.setEventIds(r);try{this.config.pointerCapture&&r.target.hasPointerCapture(r.pointerId)&&r.target.releasePointerCapture(r.pointerId)}catch{process.env.NODE_ENV}const t=this.state,i=this.config;if(!t._active||!t._pointerActive)return;const l=aC(r);if(t._pointerId!==void 0&&l!==t._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(r);const[f,c]=t._distance;if(t.tap=f<=i.tapsThreshold&&c<=i.tapsThreshold,t.tap&&i.filterTaps)t._force=!0;else{const[p,g]=t.direction,[d,m]=t.velocity,[C,b]=t.movement,[x,E]=i.swipe.velocity,[k,D]=i.swipe.distance,A=i.swipe.duration;t.elapsedTime<A&&(Math.abs(d)>x&&Math.abs(C)>k&&(t.swipe[0]=p),Math.abs(m)>E&&Math.abs(b)>D&&(t.swipe[1]=g))}this.emit()}pointerClick(r){this.state.tap||(r.preventDefault(),r.stopPropagation())}setupPointer(r){const t=this.config,i=t.device;if(process.env.NODE_ENV==="development")try{if(i==="pointer"&&t.preventScrollDelay===void 0){const l="uv"in r?r.sourceEvent.currentTarget:r.currentTarget;window.getComputedStyle(l).touchAction}}catch{}t.pointerLock&&r.currentTarget.requestPointerLock(),t.pointerCapture||(this.eventStore.add(this.sharedConfig.window,i,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,i,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,i,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(r){this.state._preventScroll&&r.cancelable&&r.preventDefault()}setupScrollPrevention(r){this.state._preventScroll=!1,DU(r);const t=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",t),this.eventStore.add(this.sharedConfig.window,"touch","cancel",t),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,r)}setupDelayTrigger(r){this.state._delayed=!0,this.timeoutStore.add("dragDelay",()=>{this.state._step=[0,0],this.startPointerDrag(r)},this.config.delay)}keyDown(r){const t=QD[r.key];if(t){const i=this.state,l=r.shiftKey?10:r.altKey?.1:1;this.start(r),i._delta=t(l),i._keyboardActive=!0,Ea.addTo(i._movement,i._delta),this.compute(r),this.emit()}}keyUp(r){r.key in QD&&(this.state._keyboardActive=!1,this.setActive(),this.compute(r),this.emit())}bind(r){const t=this.config.device;r(t,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(r(t,"change",this.pointerMove.bind(this)),r(t,"end",this.pointerUp.bind(this)),r(t,"cancel",this.pointerUp.bind(this)),r("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(r("key","down",this.keyDown.bind(this)),r("key","up",this.keyUp.bind(this))),this.config.filterTaps&&r("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}}function DU(e){"persist"in e&&typeof e.persist=="function"&&e.persist()}const fp=typeof window<"u"&&window.document&&window.document.createElement;function kU(){return fp&&"ontouchstart"in window}function ZD(){return kU()||fp&&window.navigator.maxTouchPoints>1}function TU(){return fp&&"onpointerdown"in window}function AU(){return fp&&"exitPointerLock"in window.document}function OU(){try{return"constructor"in GestureEvent}catch{return!1}}const Ji={isBrowser:fp,gesture:OU(),touch:ZD(),touchscreen:ZD(),pointer:TU(),pointerLock:AU()},RU=250,FU=180,NU=.5,MU=50,PU=250,XD={mouse:0,touch:0,pen:8},JD=tr(tr({},cp),{},{device(e,r,{pointer:{touch:t=!1,lock:i=!1,mouse:l=!1}={}}){return this.pointerLock=i&&Ji.pointerLock,Ji.touch&&t?"touch":this.pointerLock?"mouse":Ji.pointer&&!l?"pointer":Ji.touch?"touch":"mouse"},preventScrollAxis(e,r,{preventScroll:t}){if(this.preventScrollDelay=typeof t=="number"?t:t||t===void 0&&e?RU:void 0,!(!Ji.touchscreen||t===!1))return e||(t!==void 0?"y":void 0)},pointerCapture(e,r,{pointer:{capture:t=!0,buttons:i=1}={}}){return this.pointerButtons=i,!this.pointerLock&&this.device==="pointer"&&t},keys(e=!0){return e},threshold(e,r,{filterTaps:t=!1,tapsThreshold:i=3,axis:l=void 0}){const f=Ea.toVector(e,t?i:l?1:0);return this.filterTaps=t,this.tapsThreshold=i,f},swipe({velocity:e=NU,distance:r=MU,duration:t=PU}={}){return{velocity:this.transform(Ea.toVector(e)),distance:this.transform(Ea.toVector(r)),duration:t}},delay(e=0){switch(e){case!0:return FU;case!1:return 0;default:return e}},axisThreshold(e){return e?tr(tr({},XD),e):XD}});process.env.NODE_ENV==="development"&&Object.assign(JD,{useTouch(e){if(e!==void 0)throw Error("[@use-gesture]: `useTouch` option has been renamed to `pointer.touch`. Use it as in `{ pointer: { touch: true } }`.");return NaN},experimental_preventWindowScrollY(e){if(e!==void 0)throw Error("[@use-gesture]: `experimental_preventWindowScrollY` option has been renamed to `preventScroll`.");return NaN},swipeVelocity(e){if(e!==void 0)throw Error("[@use-gesture]: `swipeVelocity` option has been renamed to `swipe.velocity`. Use it as in `{ swipe: { velocity: 0.5 } }`.");return NaN},swipeDistance(e){if(e!==void 0)throw Error("[@use-gesture]: `swipeDistance` option has been renamed to `swipe.distance`. Use it as in `{ swipe: { distance: 50 } }`.");return NaN},swipeDuration(e){if(e!==void 0)throw Error("[@use-gesture]: `swipeDuration` option has been renamed to `swipe.duration`. Use it as in `{ swipe: { duration: 250 } }`.");return NaN}}),tr(tr({},iC),{},{device(e,r,{shared:t,pointer:{touch:i=!1}={}}){if(t.target&&!Ji.touch&&Ji.gesture)return"gesture";if(Ji.touch&&i)return"touch";if(Ji.touchscreen){if(Ji.pointer)return"pointer";if(Ji.touch)return"touch"}},bounds(e,r,{scaleBounds:t={},angleBounds:i={}}){const l=c=>{const p=GD(Hg(t,c),{min:-1/0,max:1/0});return[p.min,p.max]},f=c=>{const p=GD(Hg(i,c),{min:-1/0,max:1/0});return[p.min,p.max]};return typeof t!="function"&&typeof i!="function"?[l(),f()]:c=>[l(c),f(c)]},threshold(e,r,t){return this.lockDirection=t.axis==="lock",Ea.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey(e){return e===void 0?"ctrlKey":e}}),tr(tr({},cp),{},{mouseOnly:(e=!0)=>e}),tr(tr({},cp),{},{mouseOnly:(e=!0)=>e});const ek=new Map,oC=new Map;function BU(e){ek.set(e.key,e.engine),oC.set(e.key,e.resolver)}const LU={key:"drag",engine:SU,resolver:JD};function zU(e,r){if(e==null)return{};var t={},i=Object.keys(e),l,f;for(f=0;f<i.length;f++)l=i[f],!(r.indexOf(l)>=0)&&(t[l]=e[l]);return t}function UU(e,r){if(e==null)return{};var t=zU(e,r),i,l;if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(e);for(l=0;l<f.length;l++)i=f[l],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}const jU={target(e){if(e)return()=>"current"in e?e.current:e},enabled(e=!0){return e},window(e=Ji.isBrowser?window:void 0){return e},eventOptions({passive:e=!0,capture:r=!1}={}){return{passive:e,capture:r}},transform(e){return e}},IU=["target","eventOptions","window","enabled","transform"];function $g(e={},r){const t={};for(const[i,l]of Object.entries(r))switch(typeof l){case"function":if(process.env.NODE_ENV==="development"){const f=l.call(t,e[i],i,e);Number.isNaN(f)||(t[i]=f)}else t[i]=l.call(t,e[i],i,e);break;case"object":t[i]=$g(e[i],l);break;case"boolean":l&&(t[i]=e[i]);break}return t}function HU(e,r){const t=e,{target:i,eventOptions:l,window:f,enabled:c,transform:p}=t,g=UU(t,IU),d={shared:$g({target:i,eventOptions:l,window:f,enabled:c,transform:p},jU)};if(r){const m=oC.get(r);d[r]=$g(tr({shared:d.shared},g),m)}else for(const m in g){const C=oC.get(m);if(C)d[m]=$g(tr({shared:d.shared},g[m]),C);else if(process.env.NODE_ENV==="development"&&!["drag","pinch","scroll","wheel","move","hover"].includes(m)&&m==="domTarget")throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.")}return d}class tk{constructor(r,t){li(this,"_listeners",new Set),this._ctrl=r,this._gestureKey=t}add(r,t,i,l,f){const c=this._listeners,p=hU(t,i),g=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},d=tr(tr({},g),f);r.addEventListener(p,l,d);const m=()=>{r.removeEventListener(p,l,d),c.delete(m)};return c.add(m),m}clean(){this._listeners.forEach(r=>r()),this._listeners.clear()}}class VU{constructor(){li(this,"_timeouts",new Map)}add(r,t,i=140,...l){this.remove(r),this._timeouts.set(r,window.setTimeout(t,i,...l))}remove(r){const t=this._timeouts.get(r);t&&window.clearTimeout(t)}clean(){this._timeouts.forEach(r=>void window.clearTimeout(r)),this._timeouts.clear()}}let $U=class{constructor(r){li(this,"gestures",new Set),li(this,"_targetEventStore",new tk(this)),li(this,"gestureEventStores",{}),li(this,"gestureTimeoutStores",{}),li(this,"handlers",{}),li(this,"config",{}),li(this,"pointerIds",new Set),li(this,"touchIds",new Set),li(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),YU(this,r)}setEventIds(r){if(Ig(r))return this.touchIds=new Set(mU(r)),this.touchIds;if("pointerId"in r)return r.type==="pointerup"||r.type==="pointercancel"?this.pointerIds.delete(r.pointerId):r.type==="pointerdown"&&this.pointerIds.add(r.pointerId),this.pointerIds}applyHandlers(r,t){this.handlers=r,this.nativeHandlers=t}applyConfig(r,t){this.config=HU(r,t)}clean(){this._targetEventStore.clean();for(const r of this.gestures)this.gestureEventStores[r].clean(),this.gestureTimeoutStores[r].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...r){const t=this.config.shared,i={};let l;if(!(t.target&&(l=t.target(),!l))){if(t.enabled){for(const c of this.gestures){const p=this.config[c],g=nk(i,p.eventOptions,!!l);if(p.enabled){const d=ek.get(c);new d(this,r,c).bind(g)}}const f=nk(i,t.eventOptions,!!l);for(const c in this.nativeHandlers)f(c,"",p=>this.nativeHandlers[c](tr(tr({},this.state.shared),{},{event:p,args:r})),void 0,!0)}for(const f in i)i[f]=xU(...i[f]);if(!l)return i;for(const f in i){const{device:c,capture:p,passive:g}=dU(f);this._targetEventStore.add(l,c,"",i[f],{capture:p,passive:g})}}}};function md(e,r){e.gestures.add(r),e.gestureEventStores[r]=new tk(e,r),e.gestureTimeoutStores[r]=new VU}function YU(e,r){r.drag&&md(e,"drag"),r.wheel&&md(e,"wheel"),r.scroll&&md(e,"scroll"),r.move&&md(e,"move"),r.pinch&&md(e,"pinch"),r.hover&&md(e,"hover")}const nk=(e,r,t)=>(i,l,f,c={},p=!1)=>{var g,d;const m=(g=c.capture)!==null&&g!==void 0?g:r.capture,C=(d=c.passive)!==null&&d!==void 0?d:r.passive;let b=p?i:cU(i,l,m);t&&C&&(b+="Passive"),e[b]=e[b]||[],e[b].push(f)};function qU(e,r={},t,i){const l=G.useMemo(()=>new $U(e),[]);if(l.applyHandlers(e,i),l.applyConfig(r,t),G.useEffect(l.effect.bind(l)),G.useEffect(()=>l.clean.bind(l),[]),r.target===void 0)return l.bind.bind(l)}function GU(e,r){return BU(LU),qU({drag:e},r||{},"drag")}var lC=hp(),Ft=e=>dp(e,lC),sC=hp();Ft.write=e=>dp(e,sC);var Yg=hp();Ft.onStart=e=>dp(e,Yg);var uC=hp();Ft.onFrame=e=>dp(e,uC);var cC=hp();Ft.onFinish=e=>dp(e,cC);var gd=[];Ft.setTimeout=(e,r)=>{const t=Ft.now()+r,i=()=>{const f=gd.findIndex(c=>c.cancel==i);~f&&gd.splice(f,1),fu-=~f?1:0},l={time:t,handler:e,cancel:i};return gd.splice(rk(t),0,l),fu+=1,ak(),l};var rk=e=>~(~gd.findIndex(r=>r.time>e)||~gd.length);Ft.cancel=e=>{Yg.delete(e),uC.delete(e),cC.delete(e),lC.delete(e),sC.delete(e)},Ft.sync=e=>{dC=!0,Ft.batchedUpdates(e),dC=!1},Ft.throttle=e=>{let r;function t(){try{e(...r)}finally{r=null}}function i(...l){r=l,Ft.onStart(t)}return i.handler=e,i.cancel=()=>{Yg.delete(t),r=null},i};var fC=typeof window<"u"?window.requestAnimationFrame:()=>{};Ft.use=e=>fC=e,Ft.now=typeof performance<"u"?()=>performance.now():Date.now,Ft.batchedUpdates=e=>e(),Ft.catch=console.error,Ft.frameLoop="always",Ft.advance=()=>{Ft.frameLoop!=="demand"||ok()};var cu=-1,fu=0,dC=!1;function dp(e,r){dC?(r.delete(e),e(0)):(r.add(e),ak())}function ak(){cu<0&&(cu=0,Ft.frameLoop!=="demand"&&fC(ik))}function KU(){cu=-1}function ik(){~cu&&(fC(ik),Ft.batchedUpdates(ok))}function ok(){const e=cu;cu=Ft.now();const r=rk(cu);if(r&&(lk(gd.splice(0,r),t=>t.handler()),fu-=r),!fu){KU();return}Yg.flush(),lC.flush(e?Math.min(64,cu-e):16.667),uC.flush(),sC.flush(),cC.flush()}function hp(){let e=new Set,r=e;return{add(t){fu+=r==e&&!e.has(t)?1:0,e.add(t)},delete(t){return fu-=r==e&&e.has(t)?1:0,e.delete(t)},flush(t){r.size&&(e=new Set,fu-=r.size,lk(r,i=>i(t)&&e.add(i)),fu+=e.size,r=e)}}}function lk(e,r){e.forEach(t=>{try{r(t)}catch(i){Ft.catch(i)}})}var WU=Object.defineProperty,QU=(e,r)=>{for(var t in r)WU(e,t,{get:r[t],enumerable:!0})},Co={};QU(Co,{assign:()=>XU,colors:()=>du,createStringInterpolator:()=>vC,skipAnimation:()=>uk,to:()=>sk,willAdvance:()=>mC});function hC(){}var ZU=(e,r,t)=>Object.defineProperty(e,r,{value:t,writable:!0,configurable:!0}),$e={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function ls(e,r){if($e.arr(e)){if(!$e.arr(r)||e.length!==r.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==r[t])return!1;return!0}return e===r}var Gt=(e,r)=>e.forEach(r);function dl(e,r,t){if($e.arr(e)){for(let i=0;i<e.length;i++)r.call(t,e[i],`${i}`);return}for(const i in e)e.hasOwnProperty(i)&&r.call(t,e[i],i)}var Pi=e=>$e.und(e)?[]:$e.arr(e)?e:[e];function pp(e,r){if(e.size){const t=Array.from(e);e.clear(),Gt(t,r)}}var vp=(e,...r)=>pp(e,t=>t(...r)),pC=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),vC,sk,du=null,uk=!1,mC=hC,XU=e=>{e.to&&(sk=e.to),e.now&&(Ft.now=e.now),e.colors!==void 0&&(du=e.colors),e.skipAnimation!=null&&(uk=e.skipAnimation),e.createStringInterpolator&&(vC=e.createStringInterpolator),e.requestAnimationFrame&&Ft.use(e.requestAnimationFrame),e.batchedUpdates&&(Ft.batchedUpdates=e.batchedUpdates),e.willAdvance&&(mC=e.willAdvance),e.frameLoop&&(Ft.frameLoop=e.frameLoop)},mp=new Set,eo=[],gC=[],qg=0,Gg={get idle(){return!mp.size&&!eo.length},start(e){qg>e.priority?(mp.add(e),Ft.onStart(JU)):(ck(e),Ft(yC))},advance:yC,sort(e){if(qg)Ft.onFrame(()=>Gg.sort(e));else{const r=eo.indexOf(e);~r&&(eo.splice(r,1),fk(e))}},clear(){eo=[],mp.clear()}};function JU(){mp.forEach(ck),mp.clear(),Ft(yC)}function ck(e){eo.includes(e)||fk(e)}function fk(e){eo.splice(ej(eo,r=>r.priority>e.priority),0,e)}function yC(e){const r=gC;for(let t=0;t<eo.length;t++){const i=eo[t];qg=i.priority,i.idle||(mC(i),i.advance(e),i.idle||r.push(i))}return qg=0,gC=eo,gC.length=0,eo=r,eo.length>0}function ej(e,r){const t=e.findIndex(r);return t<0?e.length:t}var tj=(e,r,t)=>Math.min(Math.max(t,e),r),nj={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},wo="[-+]?\\d*\\.?\\d+",Kg=wo+"%";function Wg(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var rj=new RegExp("rgb"+Wg(wo,wo,wo)),aj=new RegExp("rgba"+Wg(wo,wo,wo,wo)),ij=new RegExp("hsl"+Wg(wo,Kg,Kg)),oj=new RegExp("hsla"+Wg(wo,Kg,Kg,wo)),lj=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,sj=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,uj=/^#([0-9a-fA-F]{6})$/,cj=/^#([0-9a-fA-F]{8})$/;function fj(e){let r;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(r=uj.exec(e))?parseInt(r[1]+"ff",16)>>>0:du&&du[e]!==void 0?du[e]:(r=rj.exec(e))?(yd(r[1])<<24|yd(r[2])<<16|yd(r[3])<<8|255)>>>0:(r=aj.exec(e))?(yd(r[1])<<24|yd(r[2])<<16|yd(r[3])<<8|pk(r[4]))>>>0:(r=lj.exec(e))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+"ff",16)>>>0:(r=cj.exec(e))?parseInt(r[1],16)>>>0:(r=sj.exec(e))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+r[4]+r[4],16)>>>0:(r=ij.exec(e))?(dk(hk(r[1]),Qg(r[2]),Qg(r[3]))|255)>>>0:(r=oj.exec(e))?(dk(hk(r[1]),Qg(r[2]),Qg(r[3]))|pk(r[4]))>>>0:null}function xC(e,r,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?e+(r-e)*6*t:t<1/2?r:t<2/3?e+(r-e)*(2/3-t)*6:e}function dk(e,r,t){const i=t<.5?t*(1+r):t+r-t*r,l=2*t-i,f=xC(l,i,e+1/3),c=xC(l,i,e),p=xC(l,i,e-1/3);return Math.round(f*255)<<24|Math.round(c*255)<<16|Math.round(p*255)<<8}function yd(e){const r=parseInt(e,10);return r<0?0:r>255?255:r}function hk(e){return(parseFloat(e)%360+360)%360/360}function pk(e){const r=parseFloat(e);return r<0?0:r>1?255:Math.round(r*255)}function Qg(e){const r=parseFloat(e);return r<0?0:r>100?1:r/100}function vk(e){let r=fj(e);if(r===null)return e;r=r||0;const t=(r&4278190080)>>>24,i=(r&16711680)>>>16,l=(r&65280)>>>8,f=(r&255)/255;return`rgba(${t}, ${i}, ${l}, ${f})`}var gp=(e,r,t)=>{if($e.fun(e))return e;if($e.arr(e))return gp({range:e,output:r,extrapolate:t});if($e.str(e.output[0]))return vC(e);const i=e,l=i.output,f=i.range||[0,1],c=i.extrapolateLeft||i.extrapolate||"extend",p=i.extrapolateRight||i.extrapolate||"extend",g=i.easing||(d=>d);return d=>{const m=hj(d,f);return dj(d,f[m],f[m+1],l[m],l[m+1],g,c,p,i.map)}};function dj(e,r,t,i,l,f,c,p,g){let d=g?g(e):e;if(d<r){if(c==="identity")return d;c==="clamp"&&(d=r)}if(d>t){if(p==="identity")return d;p==="clamp"&&(d=t)}return i===l?i:r===t?e<=r?i:l:(r===-1/0?d=-d:t===1/0?d=d-r:d=(d-r)/(t-r),d=f(d),i===-1/0?d=-d:l===1/0?d=d+i:d=d*(l-i)+i,d)}function hj(e,r){for(var t=1;t<r.length-1&&!(r[t]>=e);++t);return t-1}var pj=(e,r="end")=>t=>{t=r==="end"?Math.min(t,.999):Math.max(t,.001);const i=t*e,l=r==="end"?Math.floor(i):Math.ceil(i);return tj(0,1,l/e)},Zg=1.70158,Xg=Zg*1.525,mk=Zg+1,gk=2*Math.PI/3,yk=2*Math.PI/4.5,Jg=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,vj={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>mk*e*e*e-Zg*e*e,easeOutBack:e=>1+mk*Math.pow(e-1,3)+Zg*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((Xg+1)*2*e-Xg)/2:(Math.pow(2*e-2,2)*((Xg+1)*(e*2-2)+Xg)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*gk),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*gk)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*yk))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*yk)/2+1,easeInBounce:e=>1-Jg(1-e),easeOutBounce:Jg,easeInOutBounce:e=>e<.5?(1-Jg(1-2*e))/2:(1+Jg(2*e-1))/2,steps:pj},yp=Symbol.for("FluidValue.get"),xd=Symbol.for("FluidValue.observers"),to=e=>Boolean(e&&e[yp]),si=e=>e&&e[yp]?e[yp]():e,xk=e=>e[xd]||null;function mj(e,r){e.eventObserved?e.eventObserved(r):e(r)}function xp(e,r){const t=e[xd];t&&t.forEach(i=>{mj(i,r)})}var bk=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");gj(this,e)}},gj=(e,r)=>Ck(e,yp,r);function bd(e,r){if(e[yp]){let t=e[xd];t||Ck(e,xd,t=new Set),t.has(r)||(t.add(r),e.observerAdded&&e.observerAdded(t.size,r))}return r}function bp(e,r){const t=e[xd];if(t&&t.has(r)){const i=t.size-1;i?t.delete(r):e[xd]=null,e.observerRemoved&&e.observerRemoved(i,r)}}var Ck=(e,r,t)=>Object.defineProperty(e,r,{value:t,writable:!0,configurable:!0}),ey=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,yj=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,wk=new RegExp(`(${ey.source})(%|[a-z]+)`,"i"),xj=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,ty=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,_k=e=>{const[r,t]=bj(e);if(!r||pC())return e;const i=window.getComputedStyle(document.documentElement).getPropertyValue(r);if(i)return i.trim();if(t&&t.startsWith("--")){const l=window.getComputedStyle(document.documentElement).getPropertyValue(t);return l||e}else{if(t&&ty.test(t))return _k(t);if(t)return t}return e},bj=e=>{const r=ty.exec(e);if(!r)return[,];const[,t,i]=r;return[t,i]},bC,Cj=(e,r,t,i,l)=>`rgba(${Math.round(r)}, ${Math.round(t)}, ${Math.round(i)}, ${l})`,Ek=e=>{bC||(bC=du?new RegExp(`(${Object.keys(du).join("|")})(?!\\w)`,"g"):/^\b$/);const r=e.output.map(f=>si(f).replace(ty,_k).replace(yj,vk).replace(bC,vk)),t=r.map(f=>f.match(ey).map(Number)),l=t[0].map((f,c)=>t.map(p=>{if(!(c in p))throw Error('The arity of each "output" value must be equal');return p[c]})).map(f=>gp({...e,output:f}));return f=>{var g;const c=!wk.test(r[0])&&((g=r.find(d=>wk.test(d)))==null?void 0:g.replace(ey,""));let p=0;return r[0].replace(ey,()=>`${l[p++](f)}${c||""}`).replace(xj,Cj)}},CC="react-spring: ",Sk=e=>{const r=e;let t=!1;if(typeof r!="function")throw new TypeError(`${CC}once requires a function parameter`);return(...i)=>{t||(r(...i),t=!0)}},wj=Sk(console.warn);function _j(){wj(`${CC}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var Ej=Sk(console.warn);function Sj(){Ej(`${CC}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function ny(e){return $e.str(e)&&(e[0]=="#"||/\d/.test(e)||!pC()&&ty.test(e)||e in(du||{}))}var wC=pC()?G.useEffect:G.useLayoutEffect,Dj=()=>{const e=G.useRef(!1);return wC(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Dk(){const e=G.useState()[1],r=Dj();return()=>{r.current&&e(Math.random())}}function kj(e,r){const[t]=G.useState(()=>({inputs:r,result:e()})),i=G.useRef(),l=i.current;let f=l;return f?Boolean(r&&f.inputs&&Tj(r,f.inputs))||(f={inputs:r,result:e()}):f=t,G.useEffect(()=>{i.current=f,l==t&&(t.inputs=t.result=void 0)},[f]),f.result}function Tj(e,r){if(e.length!==r.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==r[t])return!1;return!0}var kk=e=>G.useEffect(e,Aj),Aj=[];function Tk(e){const r=G.useRef();return G.useEffect(()=>{r.current=e}),r.current}var Cp=Symbol.for("Animated:node"),Oj=e=>!!e&&e[Cp]===e,hl=e=>e&&e[Cp],_C=(e,r)=>ZU(e,Cp,r),ry=e=>e&&e[Cp]&&e[Cp].getPayload(),Ak=class{constructor(){_C(this,this)}getPayload(){return this.payload||[]}},wp=class extends Ak{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,$e.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new wp(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,r){return $e.num(e)&&(this.lastPosition=e,r&&(e=Math.round(e/r)*r,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,$e.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},_p=class extends wp{constructor(e){super(0),this._string=null,this._toString=gp({output:[e,e]})}static create(e){return new _p(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if($e.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=gp({output:[this.getValue(),e]})),this._value=0,super.reset()}},ay={dependencies:null},iy=class extends Ak{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const r={};return dl(this.source,(t,i)=>{Oj(t)?r[i]=t.getValue(e):to(t)?r[i]=si(t):e||(r[i]=t)}),r}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Gt(this.payload,e=>e.reset())}_makePayload(e){if(e){const r=new Set;return dl(e,this._addToPayload,r),Array.from(r)}}_addToPayload(e){ay.dependencies&&to(e)&&ay.dependencies.add(e);const r=ry(e);r&&Gt(r,t=>this.add(t))}},Ok=class extends iy{constructor(e){super(e)}static create(e){return new Ok(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const r=this.getPayload();return e.length==r.length?r.map((t,i)=>t.setValue(e[i])).some(Boolean):(super.setValue(e.map(Rj)),!0)}};function Rj(e){return(ny(e)?_p:wp).create(e)}function EC(e){const r=hl(e);return r?r.constructor:$e.arr(e)?Ok:ny(e)?_p:wp}var Rk=(e,r)=>{const t=!$e.fun(e)||e.prototype&&e.prototype.isReactComponent;return G.forwardRef((i,l)=>{const f=G.useRef(null),c=t&&G.useCallback(E=>{f.current=Mj(l,E)},[l]),[p,g]=Nj(i,r),d=Dk(),m=()=>{const E=f.current;if(t&&!E)return;(E?r.applyAnimatedValues(E,p.getValue(!0)):!1)===!1&&d()},C=new Fj(m,g),b=G.useRef();wC(()=>(b.current=C,Gt(g,E=>bd(E,C)),()=>{b.current&&(Gt(b.current.deps,E=>bp(E,b.current)),Ft.cancel(b.current.update))})),G.useEffect(m,[]),kk(()=>()=>{const E=b.current;Gt(E.deps,k=>bp(k,E))});const x=r.getComponentProps(p.getValue());return Fe.createElement(e,{...x,ref:c})})},Fj=class{constructor(e,r){this.update=e,this.deps=r}eventObserved(e){e.type=="change"&&Ft.write(this.update)}};function Nj(e,r){const t=new Set;return ay.dependencies=t,e.style&&(e={...e,style:r.createAnimatedStyle(e.style)}),e=new iy(e),ay.dependencies=null,[e,t]}function Mj(e,r){return e&&($e.fun(e)?e(r):e.current=r),r}var Fk=Symbol.for("AnimatedComponent"),Pj=(e,{applyAnimatedValues:r=()=>!1,createAnimatedStyle:t=l=>new iy(l),getComponentProps:i=l=>l}={})=>{const l={applyAnimatedValues:r,createAnimatedStyle:t,getComponentProps:i},f=c=>{const p=Nk(c)||"Anonymous";return $e.str(c)?c=f[c]||(f[c]=Rk(c,l)):c=c[Fk]||(c[Fk]=Rk(c,l)),c.displayName=`Animated(${p})`,c};return dl(e,(c,p)=>{$e.arr(e)&&(p=Nk(c)),f[p]=f(c)}),{animated:f}},Nk=e=>$e.str(e)?e:e&&$e.str(e.displayName)?e.displayName:$e.fun(e)&&e.name||null;function Nc(e,...r){return $e.fun(e)?e(...r):e}var Ep=(e,r)=>e===!0||!!(r&&e&&($e.fun(e)?e(r):Pi(e).includes(r))),Mk=(e,r)=>$e.obj(e)?r&&e[r]:e,Pk=(e,r)=>e.default===!0?e[r]:e.default?e.default[r]:void 0,Bj=e=>e,SC=(e,r=Bj)=>{let t=Lj;e.default&&e.default!==!0&&(e=e.default,t=Object.keys(e));const i={};for(const l of t){const f=r(e[l],l);$e.und(f)||(i[l]=f)}return i},Lj=["config","onProps","onStart","onChange","onPause","onResume","onRest"],zj={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function Uj(e){const r={};let t=0;if(dl(e,(i,l)=>{zj[l]||(r[l]=i,t++)}),t)return r}function Bk(e){const r=Uj(e);if(r){const t={to:r};return dl(e,(i,l)=>l in r||(t[l]=i)),t}return{...e}}function Sp(e){return e=si(e),$e.arr(e)?e.map(Sp):ny(e)?Co.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function jj(e){for(const r in e)return!0;return!1}function DC(e){return $e.fun(e)||$e.arr(e)&&$e.obj(e[0])}function Ij(e,r){var t;(t=e.ref)==null||t.delete(e),r==null||r.delete(e)}function Hj(e,r){var t;r&&e.ref!==r&&((t=e.ref)==null||t.delete(e),r.add(e),e.ref=r)}var Vj={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},kC={...Vj.default,mass:1,damping:1,easing:vj.linear,clamp:!1},$j=class{constructor(){this.velocity=0,Object.assign(this,kC)}};function Yj(e,r,t){t&&(t={...t},Lk(t,r),r={...t,...r}),Lk(e,r),Object.assign(e,r);for(const c in kC)e[c]==null&&(e[c]=kC[c]);let{frequency:i,damping:l}=e;const{mass:f}=e;return $e.und(i)||(i<.01&&(i=.01),l<0&&(l=0),e.tension=Math.pow(2*Math.PI/i,2)*f,e.friction=4*Math.PI*l*f/i),e}function Lk(e,r){if(!$e.und(r.decay))e.duration=void 0;else{const t=!$e.und(r.tension)||!$e.und(r.friction);(t||!$e.und(r.frequency)||!$e.und(r.damping)||!$e.und(r.mass))&&(e.duration=void 0,e.decay=void 0),t&&(e.frequency=void 0)}}var zk=[],qj=class{constructor(){this.changed=!1,this.values=zk,this.toValues=null,this.fromValues=zk,this.config=new $j,this.immediate=!1}};function Uk(e,{key:r,props:t,defaultProps:i,state:l,actions:f}){return new Promise((c,p)=>{let g,d,m=Ep(t.cancel??(i==null?void 0:i.cancel),r);if(m)x();else{$e.und(t.pause)||(l.paused=Ep(t.pause,r));let E=i==null?void 0:i.pause;E!==!0&&(E=l.paused||Ep(E,r)),g=Nc(t.delay||0,r),E?(l.resumeQueue.add(b),f.pause()):(f.resume(),b())}function C(){l.resumeQueue.add(b),l.timeouts.delete(d),d.cancel(),g=d.time-Ft.now()}function b(){g>0&&!Co.skipAnimation?(l.delayed=!0,d=Ft.setTimeout(x,g),l.pauseQueue.add(C),l.timeouts.add(d)):x()}function x(){l.delayed&&(l.delayed=!1),l.pauseQueue.delete(C),l.timeouts.delete(d),e<=(l.cancelId||0)&&(m=!0);try{f.start({...t,callId:e,cancel:m},c)}catch(E){p(E)}}})}var TC=(e,r)=>r.length==1?r[0]:r.some(t=>t.cancelled)?Cd(e.get()):r.every(t=>t.noop)?jk(e.get()):_o(e.get(),r.every(t=>t.finished)),jk=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),_o=(e,r,t=!1)=>({value:e,finished:r,cancelled:t}),Cd=e=>({value:e,cancelled:!0,finished:!1});function Ik(e,r,t,i){const{callId:l,parentId:f,onRest:c}=r,{asyncTo:p,promise:g}=t;return!f&&e===p&&!r.reset?g:t.promise=(async()=>{t.asyncId=l,t.asyncTo=e;const d=SC(r,(D,A)=>A==="onRest"?void 0:D);let m,C;const b=new Promise((D,A)=>(m=D,C=A)),x=D=>{const A=l<=(t.cancelId||0)&&Cd(i)||l!==t.asyncId&&_o(i,!1);if(A)throw D.result=A,C(D),D},E=(D,A)=>{const T=new Hk,S=new Vk;return(async()=>{if(Co.skipAnimation)throw Dp(t),S.result=_o(i,!1),C(S),S;x(T);const O=$e.obj(D)?{...D}:{...A,to:D};O.parentId=l,dl(d,(z,M)=>{$e.und(O[M])&&(O[M]=z)});const B=await i.start(O);return x(T),t.paused&&await new Promise(z=>{t.resumeQueue.add(z)}),B})()};let k;if(Co.skipAnimation)return Dp(t),_o(i,!1);try{let D;$e.arr(e)?D=(async A=>{for(const T of A)await E(T)})(e):D=Promise.resolve(e(E,i.stop.bind(i))),await Promise.all([D.then(m),b]),k=_o(i.get(),!0,!1)}catch(D){if(D instanceof Hk)k=D.result;else if(D instanceof Vk)k=D.result;else throw D}finally{l==t.asyncId&&(t.asyncId=f,t.asyncTo=f?p:void 0,t.promise=f?g:void 0)}return $e.fun(c)&&Ft.batchedUpdates(()=>{c(k,i,i.item)}),k})()}function Dp(e,r){pp(e.timeouts,t=>t.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,r&&(e.cancelId=r)}var Hk=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},Vk=class extends Error{constructor(){super("SkipAnimationSignal")}},AC=e=>e instanceof OC,Gj=1,OC=class extends bk{constructor(){super(...arguments),this.id=Gj++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=hl(this);return e&&e.getValue()}to(...e){return Co.to(this,e)}interpolate(...e){return _j(),Co.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,r=!1){xp(this,{type:"change",parent:this,value:e,idle:r})}_onPriorityChange(e){this.idle||Gg.sort(this),xp(this,{type:"priority",parent:this,priority:e})}},Mc=Symbol.for("SpringPhase"),$k=1,RC=2,FC=4,NC=e=>(e[Mc]&$k)>0,hu=e=>(e[Mc]&RC)>0,kp=e=>(e[Mc]&FC)>0,Yk=(e,r)=>r?e[Mc]|=RC|$k:e[Mc]&=~RC,qk=(e,r)=>r?e[Mc]|=FC:e[Mc]&=~FC,Kj=class extends OC{constructor(e,r){if(super(),this.animation=new qj,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!$e.und(e)||!$e.und(r)){const t=$e.obj(e)?{...e}:{...r,from:e};$e.und(t.default)&&(t.default=!0),this.start(t)}}get idle(){return!(hu(this)||this._state.asyncTo)||kp(this)}get goal(){return si(this.animation.to)}get velocity(){const e=hl(this);return e instanceof wp?e.lastVelocity||0:e.getPayload().map(r=>r.lastVelocity||0)}get hasAnimated(){return NC(this)}get isAnimating(){return hu(this)}get isPaused(){return kp(this)}get isDelayed(){return this._state.delayed}advance(e){let r=!0,t=!1;const i=this.animation;let{toValues:l}=i;const{config:f}=i,c=ry(i.to);!c&&to(i.to)&&(l=Pi(si(i.to))),i.values.forEach((d,m)=>{if(d.done)return;const C=d.constructor==_p?1:c?c[m].lastPosition:l[m];let b=i.immediate,x=C;if(!b){if(x=d.lastPosition,f.tension<=0){d.done=!0;return}let E=d.elapsedTime+=e;const k=i.fromValues[m],D=d.v0!=null?d.v0:d.v0=$e.arr(f.velocity)?f.velocity[m]:f.velocity;let A;const T=f.precision||(k==C?.005:Math.min(1,Math.abs(C-k)*.001));if($e.und(f.duration))if(f.decay){const S=f.decay===!0?.998:f.decay,O=Math.exp(-(1-S)*E);x=k+D/(1-S)*(1-O),b=Math.abs(d.lastPosition-x)<=T,A=D*O}else{A=d.lastVelocity==null?D:d.lastVelocity;const S=f.restVelocity||T/10,O=f.clamp?0:f.bounce,B=!$e.und(O),z=k==C?d.v0>0:k<C;let M,U=!1;const V=1,F=Math.ceil(e/V);for(let N=0;N<F&&(M=Math.abs(A)>S,!(!M&&(b=Math.abs(C-x)<=T,b)));++N){B&&(U=x==C||x>C==z,U&&(A=-A*O,x=C));const $=-f.tension*1e-6*(x-C),I=-f.friction*.001*A,q=($+I)/f.mass;A=A+q*V,x=x+A*V}}else{let S=1;f.duration>0&&(this._memoizedDuration!==f.duration&&(this._memoizedDuration=f.duration,d.durationProgress>0&&(d.elapsedTime=f.duration*d.durationProgress,E=d.elapsedTime+=e)),S=(f.progress||0)+E/this._memoizedDuration,S=S>1?1:S<0?0:S,d.durationProgress=S),x=k+f.easing(S)*(C-k),A=(x-d.lastPosition)/e,b=S==1}d.lastVelocity=A,Number.isNaN(x)&&(b=!0)}c&&!c[m].done&&(b=!1),b?d.done=!0:r=!1,d.setValue(x,f.round)&&(t=!0)});const p=hl(this),g=p.getValue();if(r){const d=si(i.to);(g!==d||t)&&!f.decay?(p.setValue(d),this._onChange(d)):t&&f.decay&&this._onChange(g),this._stop()}else t&&this._onChange(g)}set(e){return Ft.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(hu(this)){const{to:e,config:r}=this.animation;Ft.batchedUpdates(()=>{this._onStart(),r.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,r){let t;return $e.und(e)?(t=this.queue||[],this.queue=[]):t=[$e.obj(e)?e:{...r,to:e}],Promise.all(t.map(i=>this._update(i))).then(i=>TC(this,i))}stop(e){const{to:r}=this.animation;return this._focus(this.get()),Dp(this._state,e&&this._lastCallId),Ft.batchedUpdates(()=>this._stop(r,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const r=this.key||"";let{to:t,from:i}=e;t=$e.obj(t)?t[r]:t,(t==null||DC(t))&&(t=void 0),i=$e.obj(i)?i[r]:i,i==null&&(i=void 0);const l={to:t,from:i};return NC(this)||(e.reverse&&([t,i]=[i,t]),i=si(i),$e.und(i)?hl(this)||this._set(t):this._set(i)),l}_update({...e},r){const{key:t,defaultProps:i}=this;e.default&&Object.assign(i,SC(e,(c,p)=>/^on/.test(p)?Mk(c,t):c)),Wk(this,e,"onProps"),Op(this,"onProps",e,this);const l=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const f=this._state;return Uk(++this._lastCallId,{key:t,props:e,defaultProps:i,state:f,actions:{pause:()=>{kp(this)||(qk(this,!0),vp(f.pauseQueue),Op(this,"onPause",_o(this,Tp(this,this.animation.to)),this))},resume:()=>{kp(this)&&(qk(this,!1),hu(this)&&this._resume(),vp(f.resumeQueue),Op(this,"onResume",_o(this,Tp(this,this.animation.to)),this))},start:this._merge.bind(this,l)}}).then(c=>{if(e.loop&&c.finished&&!(r&&c.noop)){const p=Gk(e);if(p)return this._update(p,!0)}return c})}_merge(e,r,t){if(r.cancel)return this.stop(!0),t(Cd(this));const i=!$e.und(e.to),l=!$e.und(e.from);if(i||l)if(r.callId>this._lastToId)this._lastToId=r.callId;else return t(Cd(this));const{key:f,defaultProps:c,animation:p}=this,{to:g,from:d}=p;let{to:m=g,from:C=d}=e;l&&!i&&(!r.default||$e.und(m))&&(m=C),r.reverse&&([m,C]=[C,m]);const b=!ls(C,d);b&&(p.from=C),C=si(C);const x=!ls(m,g);x&&this._focus(m);const E=DC(r.to),{config:k}=p,{decay:D,velocity:A}=k;(i||l)&&(k.velocity=0),r.config&&!E&&Yj(k,Nc(r.config,f),r.config!==c.config?Nc(c.config,f):void 0);let T=hl(this);if(!T||$e.und(m))return t(_o(this,!0));const S=$e.und(r.reset)?l&&!r.default:!$e.und(C)&&Ep(r.reset,f),O=S?C:this.get(),B=Sp(m),z=$e.num(B)||$e.arr(B)||ny(B),M=!E&&(!z||Ep(c.immediate||r.immediate,f));if(x){const N=EC(m);if(N!==T.constructor)if(M)T=this._set(B);else throw Error(`Cannot animate between ${T.constructor.name} and ${N.name}, as the "to" prop suggests`)}const U=T.constructor;let V=to(m),F=!1;if(!V){const N=S||!NC(this)&&b;(x||N)&&(F=ls(Sp(O),B),V=!F),(!ls(p.immediate,M)&&!M||!ls(k.decay,D)||!ls(k.velocity,A))&&(V=!0)}if(F&&hu(this)&&(p.changed&&!S?V=!0:V||this._stop(g)),!E&&((V||to(g))&&(p.values=T.getPayload(),p.toValues=to(m)?null:U==_p?[1]:Pi(B)),p.immediate!=M&&(p.immediate=M,!M&&!S&&this._set(g)),V)){const{onRest:N}=p;Gt(Qj,I=>Wk(this,r,I));const $=_o(this,Tp(this,g));vp(this._pendingCalls,$),this._pendingCalls.add(t),p.changed&&Ft.batchedUpdates(()=>{var I;p.changed=!S,N==null||N($,this),S?Nc(c.onRest,$):(I=p.onStart)==null||I.call(p,$,this)})}S&&this._set(O),E?t(Ik(r.to,r,this._state,this)):V?this._start():hu(this)&&!x?this._pendingCalls.add(t):t(jk(O))}_focus(e){const r=this.animation;e!==r.to&&(xk(this)&&this._detach(),r.to=e,xk(this)&&this._attach())}_attach(){let e=0;const{to:r}=this.animation;to(r)&&(bd(r,this),AC(r)&&(e=r.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;to(e)&&bp(e,this)}_set(e,r=!0){const t=si(e);if(!$e.und(t)){const i=hl(this);if(!i||!ls(t,i.getValue())){const l=EC(t);!i||i.constructor!=l?_C(this,l.create(t)):i.setValue(t),i&&Ft.batchedUpdates(()=>{this._onChange(t,r)})}}return hl(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,Op(this,"onStart",_o(this,Tp(this,e.to)),this))}_onChange(e,r){r||(this._onStart(),Nc(this.animation.onChange,e,this)),Nc(this.defaultProps.onChange,e,this),super._onChange(e,r)}_start(){const e=this.animation;hl(this).reset(si(e.to)),e.immediate||(e.fromValues=e.values.map(r=>r.lastPosition)),hu(this)||(Yk(this,!0),kp(this)||this._resume())}_resume(){Co.skipAnimation?this.finish():Gg.start(this)}_stop(e,r){if(hu(this)){Yk(this,!1);const t=this.animation;Gt(t.values,l=>{l.done=!0}),t.toValues&&(t.onChange=t.onPause=t.onResume=void 0),xp(this,{type:"idle",parent:this});const i=r?Cd(this.get()):_o(this.get(),Tp(this,e??t.to));vp(this._pendingCalls,i),t.changed&&(t.changed=!1,Op(this,"onRest",i,this))}}};function Tp(e,r){const t=Sp(r),i=Sp(e.get());return ls(i,t)}function Gk(e,r=e.loop,t=e.to){const i=Nc(r);if(i){const l=i!==!0&&Bk(i),f=(l||e).reverse,c=!l||l.reset;return Ap({...e,loop:r,default:!1,pause:void 0,to:!f||DC(t)?t:void 0,from:c?e.from:void 0,reset:c,...l})}}function Ap(e){const{to:r,from:t}=e=Bk(e),i=new Set;return $e.obj(r)&&Kk(r,i),$e.obj(t)&&Kk(t,i),e.keys=i.size?Array.from(i):null,e}function Wj(e){const r=Ap(e);return $e.und(r.default)&&(r.default=SC(r)),r}function Kk(e,r){dl(e,(t,i)=>t!=null&&r.add(i))}var Qj=["onStart","onRest","onChange","onPause","onResume"];function Wk(e,r,t){e.animation[t]=r[t]!==Pk(r,t)?Mk(r[t],e.key):void 0}function Op(e,r,...t){var i,l,f,c;(l=(i=e.animation)[r])==null||l.call(i,...t),(c=(f=e.defaultProps)[r])==null||c.call(f,...t)}var Zj=["onStart","onChange","onRest"],Xj=1,Jj=class{constructor(e,r){this.id=Xj++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),r&&(this._flush=r),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each((r,t)=>e[t]=r.get()),e}set(e){for(const r in e){const t=e[r];$e.und(t)||this.springs[r].set(t)}}update(e){return e&&this.queue.push(Ap(e)),this}start(e){let{queue:r}=this;return e?r=Pi(e).map(Ap):this.queue=[],this._flush?this._flush(this,r):(tT(this,r),MC(this,r))}stop(e,r){if(e!==!!e&&(r=e),r){const t=this.springs;Gt(Pi(r),i=>t[i].stop(!!e))}else Dp(this._state,this._lastAsyncId),this.each(t=>t.stop(!!e));return this}pause(e){if($e.und(e))this.start({pause:!0});else{const r=this.springs;Gt(Pi(e),t=>r[t].pause())}return this}resume(e){if($e.und(e))this.start({pause:!1});else{const r=this.springs;Gt(Pi(e),t=>r[t].resume())}return this}each(e){dl(this.springs,e)}_onFrame(){const{onStart:e,onChange:r,onRest:t}=this._events,i=this._active.size>0,l=this._changed.size>0;(i&&!this._started||l&&!this._started)&&(this._started=!0,pp(e,([p,g])=>{g.value=this.get(),p(g,this,this._item)}));const f=!i&&this._started,c=l||f&&t.size?this.get():null;l&&r.size&&pp(r,([p,g])=>{g.value=c,p(g,this,this._item)}),f&&(this._started=!1,pp(t,([p,g])=>{g.value=c,p(g,this,this._item)}))}eventObserved(e){if(e.type=="change")this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type=="idle")this._active.delete(e.parent);else return;Ft.onFrame(this._onFrame)}};function MC(e,r){return Promise.all(r.map(t=>Qk(e,t))).then(t=>TC(e,t))}async function Qk(e,r,t){const{keys:i,to:l,from:f,loop:c,onRest:p,onResolve:g}=r,d=$e.obj(r.default)&&r.default;c&&(r.loop=!1),l===!1&&(r.to=null),f===!1&&(r.from=null);const m=$e.arr(l)||$e.fun(l)?l:void 0;m?(r.to=void 0,r.onRest=void 0,d&&(d.onRest=void 0)):Gt(Zj,k=>{const D=r[k];if($e.fun(D)){const A=e._events[k];r[k]=({finished:T,cancelled:S})=>{const O=A.get(D);O?(T||(O.finished=!1),S&&(O.cancelled=!0)):A.set(D,{value:null,finished:T||!1,cancelled:S||!1})},d&&(d[k]=r[k])}});const C=e._state;r.pause===!C.paused?(C.paused=r.pause,vp(r.pause?C.pauseQueue:C.resumeQueue)):C.paused&&(r.pause=!0);const b=(i||Object.keys(e.springs)).map(k=>e.springs[k].start(r)),x=r.cancel===!0||Pk(r,"cancel")===!0;(m||x&&C.asyncId)&&b.push(Uk(++e._lastAsyncId,{props:r,state:C,actions:{pause:hC,resume:hC,start(k,D){x?(Dp(C,e._lastAsyncId),D(Cd(e))):(k.onRest=p,D(Ik(m,k,C,e)))}}})),C.paused&&await new Promise(k=>{C.resumeQueue.add(k)});const E=TC(e,await Promise.all(b));if(c&&E.finished&&!(t&&E.noop)){const k=Gk(r,c,l);if(k)return tT(e,[k]),Qk(e,k,!0)}return g&&Ft.batchedUpdates(()=>g(E,e,e.item)),E}function Zk(e,r){const t={...e.springs};return r&&Gt(Pi(r),i=>{$e.und(i.keys)&&(i=Ap(i)),$e.obj(i.to)||(i={...i,to:void 0}),eT(t,i,l=>Jk(l))}),Xk(e,t),t}function Xk(e,r){dl(r,(t,i)=>{e.springs[i]||(e.springs[i]=t,bd(t,e))})}function Jk(e,r){const t=new Kj;return t.key=e,r&&bd(t,r),t}function eT(e,r,t){r.keys&&Gt(r.keys,i=>{(e[i]||(e[i]=t(i)))._prepareNode(r)})}function tT(e,r){Gt(r,t=>{eT(e.springs,t,i=>Jk(i,e))})}var oy=({children:e,...r})=>{const t=G.useContext(ly),i=r.pause||!!t.pause,l=r.immediate||!!t.immediate;r=kj(()=>({pause:i,immediate:l}),[i,l]);const{Provider:f}=ly;return Fe.createElement(f,{value:r},e)},ly=eI(oy,{});oy.Provider=ly.Provider,oy.Consumer=ly.Consumer;function eI(e,r){return Object.assign(e,Fe.createContext(r)),e.Provider._context=e,e.Consumer._context=e,e}var tI=()=>{const e=[],r=function(i){Sj();const l=[];return Gt(e,(f,c)=>{if($e.und(i))l.push(f.start());else{const p=t(i,f,c);p&&l.push(f.start(p))}}),l};r.current=e,r.add=function(i){e.includes(i)||e.push(i)},r.delete=function(i){const l=e.indexOf(i);~l&&e.splice(l,1)},r.pause=function(){return Gt(e,i=>i.pause(...arguments)),this},r.resume=function(){return Gt(e,i=>i.resume(...arguments)),this},r.set=function(i){Gt(e,(l,f)=>{const c=$e.fun(i)?i(f,l):i;c&&l.set(c)})},r.start=function(i){const l=[];return Gt(e,(f,c)=>{if($e.und(i))l.push(f.start());else{const p=this._getProps(i,f,c);p&&l.push(f.start(p))}}),l},r.stop=function(){return Gt(e,i=>i.stop(...arguments)),this},r.update=function(i){return Gt(e,(l,f)=>l.update(this._getProps(i,l,f))),this};const t=function(i,l,f){return $e.fun(i)?i(f,l):i};return r._getProps=t,r};function nI(e,r,t){const i=$e.fun(r)&&r;i&&!t&&(t=[]);const l=G.useMemo(()=>i||arguments.length==3?tI():void 0,[]),f=G.useRef(0),c=Dk(),p=G.useMemo(()=>({ctrls:[],queue:[],flush(A,T){const S=Zk(A,T);return f.current>0&&!p.queue.length&&!Object.keys(S).some(B=>!A.springs[B])?MC(A,T):new Promise(B=>{Xk(A,S),p.queue.push(()=>{B(MC(A,T))}),c()})}}),[]),g=G.useRef([...p.ctrls]),d=[],m=Tk(e)||0;G.useMemo(()=>{Gt(g.current.slice(e,m),A=>{Ij(A,l),A.stop(!0)}),g.current.length=e,C(m,e)},[e]),G.useMemo(()=>{C(0,Math.min(m,e))},t);function C(A,T){for(let S=A;S<T;S++){const O=g.current[S]||(g.current[S]=new Jj(null,p.flush)),B=i?i(S,O):r[S];B&&(d[S]=Wj(B))}}const b=g.current.map((A,T)=>Zk(A,d[T])),x=G.useContext(oy),E=Tk(x),k=x!==E&&jj(x);wC(()=>{f.current++,p.ctrls=g.current;const{queue:A}=p;A.length&&(p.queue=[],Gt(A,T=>T())),Gt(g.current,(T,S)=>{l==null||l.add(T),k&&T.start({default:x});const O=d[S];O&&(Hj(T,O.ref),T.ref?T.queue.push(O):T.start(O))})}),kk(()=>()=>{Gt(p.ctrls,A=>A.stop(!0))});const D=b.map(A=>({...A}));return l?[D,l]:D}function rI(e,r){const t=$e.fun(e),[[i],l]=nI(1,t?e:[e],t?r||[]:r);return t||arguments.length==2?[i,l]:i}var aI=class extends OC{constructor(e,r){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=gp(...r);const t=this._get(),i=EC(t);_C(this,i.create(t))}advance(e){const r=this._get(),t=this.get();ls(r,t)||(hl(this).setValue(r),this._onChange(r,this.idle)),!this.idle&&nT(this._active)&&PC(this)}_get(){const e=$e.arr(this.source)?this.source.map(si):Pi(si(this.source));return this.calc(...e)}_start(){this.idle&&!nT(this._active)&&(this.idle=!1,Gt(ry(this),e=>{e.done=!1}),Co.skipAnimation?(Ft.batchedUpdates(()=>this.advance()),PC(this)):Gg.start(this))}_attach(){let e=1;Gt(Pi(this.source),r=>{to(r)&&bd(r,this),AC(r)&&(r.idle||this._active.add(r),e=Math.max(e,r.priority+1))}),this.priority=e,this._start()}_detach(){Gt(Pi(this.source),e=>{to(e)&&bp(e,this)}),this._active.clear(),PC(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=Pi(this.source).reduce((r,t)=>Math.max(r,(AC(t)?t.priority:0)+1),0))}};function iI(e){return e.idle!==!1}function nT(e){return!e.size||Array.from(e).every(iI)}function PC(e){e.idle||(e.idle=!0,Gt(ry(e),r=>{r.done=!0}),xp(e,{type:"idle",parent:e}))}Co.assign({createStringInterpolator:Ek,to:(e,r)=>new aI(e,r)});var rT=/^--/;function oI(e,r){return r==null||typeof r=="boolean"||r===""?"":typeof r=="number"&&r!==0&&!rT.test(e)&&!(Rp.hasOwnProperty(e)&&Rp[e])?r+"px":(""+r).trim()}var aT={};function lI(e,r){if(!e.nodeType||!e.setAttribute)return!1;const t=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{className:i,style:l,children:f,scrollTop:c,scrollLeft:p,viewBox:g,...d}=r,m=Object.values(d),C=Object.keys(d).map(b=>t||e.hasAttribute(b)?b:aT[b]||(aT[b]=b.replace(/([A-Z])/g,x=>"-"+x.toLowerCase())));f!==void 0&&(e.textContent=f);for(const b in l)if(l.hasOwnProperty(b)){const x=oI(b,l[b]);rT.test(b)?e.style.setProperty(b,x):e.style[b]=x}C.forEach((b,x)=>{e.setAttribute(b,m[x])}),i!==void 0&&(e.className=i),c!==void 0&&(e.scrollTop=c),p!==void 0&&(e.scrollLeft=p),g!==void 0&&e.setAttribute("viewBox",g)}var Rp={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},sI=(e,r)=>e+r.charAt(0).toUpperCase()+r.substring(1),uI=["Webkit","Ms","Moz","O"];Rp=Object.keys(Rp).reduce((e,r)=>(uI.forEach(t=>e[sI(t,r)]=e[r]),e),Rp);var cI=/^(matrix|translate|scale|rotate|skew)/,fI=/^(translate)/,dI=/^(rotate|skew)/,BC=(e,r)=>$e.num(e)&&e!==0?e+r:e,sy=(e,r)=>$e.arr(e)?e.every(t=>sy(t,r)):$e.num(e)?e===r:parseFloat(e)===r,hI=class extends iy{constructor({x:e,y:r,z:t,...i}){const l=[],f=[];(e||r||t)&&(l.push([e||0,r||0,t||0]),f.push(c=>[`translate3d(${c.map(p=>BC(p,"px")).join(",")})`,sy(c,0)])),dl(i,(c,p)=>{if(p==="transform")l.push([c||""]),f.push(g=>[g,g===""]);else if(cI.test(p)){if(delete i[p],$e.und(c))return;const g=fI.test(p)?"px":dI.test(p)?"deg":"";l.push(Pi(c)),f.push(p==="rotate3d"?([d,m,C,b])=>[`rotate3d(${d},${m},${C},${BC(b,g)})`,sy(b,0)]:d=>[`${p}(${d.map(m=>BC(m,g)).join(",")})`,sy(d,p.startsWith("scale")?1:0)])}}),l.length&&(i.transform=new pI(l,f)),super(i)}},pI=class extends bk{constructor(e,r){super(),this.inputs=e,this.transforms=r,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",r=!0;return Gt(this.inputs,(t,i)=>{const l=si(t[0]),[f,c]=this.transforms[i]($e.arr(l)?l:t.map(si));e+=" "+f,r=r&&c}),r?"none":e}observerAdded(e){e==1&&Gt(this.inputs,r=>Gt(r,t=>to(t)&&bd(t,this)))}observerRemoved(e){e==0&&Gt(this.inputs,r=>Gt(r,t=>to(t)&&bp(t,this)))}eventObserved(e){e.type=="change"&&(this._value=null),xp(this,e)}},vI=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];Co.assign({batchedUpdates:eu.exports.unstable_batchedUpdates,createStringInterpolator:Ek,colors:nj});var mI=Pj(vI,{applyAnimatedValues:lI,createAnimatedStyle:e=>new hI(e),getComponentProps:({scrollTop:e,scrollLeft:r,...t})=>t}),iT=mI.animated;function oT(e,r,t){let i=e;return r!==void 0&&(i=Math.max(e,r)),t!==void 0&&(i=Math.min(i,t)),i}const[lT]=bn("indicator"),gI=G.memo(e=>{var{vertical:r}=e,t=Va(e,["vertical"]);const i=[];for(let l=0;l<t.total;l++)i.push(W("div",{className:Ae(lT("dot",{active:t.current===l}))},l));return W("div",Object.assign({className:Ae(t.className,lT({vertical:r})),style:t.style},{children:i}))});let Fp=0;function LC(e){e?(Fp||document.body.classList.add("rv-toast--unclickable"),Fp+=1):Fp&&(Fp-=1,Fp||document.body.classList.remove("rv-toast--unclickable"))}function yI(e){return e===window}const sT=e=>{const r=e;if(yI(r)){const t=r.innerWidth,i=r.innerHeight;return{top:0,left:0,right:t,bottom:i,width:t,height:i}}return r&&r.getBoundingClientRect?r.getBoundingClientRect():{top:0,left:0,right:0,bottom:0,width:0,height:0}};function xI(e,r,t){let i,l,f,c,p,g,d=0,m=!1,C=!1,b=!0;const x=!r&&r!==0&&typeof cd.requestAnimationFrame=="function";if(typeof e!="function")throw new TypeError("Expected a function");r=+r||0,ud(t)&&(m=!!t.leading,C="maxWait"in t,f=C?Math.max(+t.maxWait||0,r):f,b="trailing"in t?!!t.trailing:b);function E(F){const N=i,$=l;return i=l=void 0,d=F,c=e.apply($,N),c}function k(F,N){return x?(cd.cancelAnimationFrame(p),cd.requestAnimationFrame(F)):setTimeout(()=>F(),N)}function D(F){if(x)return cd.cancelAnimationFrame(F);clearTimeout(F)}function A(F){return d=F,p=k(O,r),m?E(F):c}function T(F){const N=F-g,$=F-d,I=r-N;return C?Math.min(I,f-$):I}function S(F){const N=F-g,$=F-d;return g===void 0||N>=r||N<0||C&&$>=f}function O(){const F=Date.now();if(S(F))return B(F);p=k(O,T(F))}function B(F){return p=void 0,b&&i?E(F):(i=l=void 0,c)}function z(){p!==void 0&&D(p),d=0,i=g=l=p=void 0}function M(){return p===void 0?c:B(Date.now())}function U(){return p!==void 0}function V(...F){const N=Date.now(),$=S(N);if(i=F,l=this,g=N,$){if(p===void 0)return A(g);if(C)return p=k(O,r),E(g)}return p===void 0&&(p=k(O,r)),c}return V.cancel=z,V.flush=M,V.pending=U,V}const YZ="",[uy]=bn("toast"),bI=e=>{const r=Xr(e,{type:"info",duration:2e3,position:"middle",transition:"rv-fade",loadingType:"circular",overlay:!1}),t=()=>{r.closeOnClick&&r.onClose()};G.useEffect(()=>{if(!r.visible){LC(!1);return}let f=!1;const c=r.visible&&r.forbidClick;f!==c&&(f=c,LC(f))},[r.visible,r.forbidClick]);const i=()=>{const{icon:f,type:c,iconSize:p,loadingType:g}=r;if(f||c==="success"||c==="fail"){const m=c==="fail"?W(Q2,{}):W(CD,{});return G.cloneElement(f||m,{className:Ae(uy("icon")),fontSize:p})}return c==="loading"?W(W2,{className:Ae(uy("loading")),type:g}):null},l=()=>{const{message:f}=r;return Zr(f)&&f!==""?W("div",Object.assign({className:Ae(uy("info"))},{children:f})):null};return Pe(lp,Object.assign({className:Ae([uy([r.position,{[r.type]:!r.icon}]),r.className]),visible:r.visible,overlay:r.overlay,transition:r.transition,overlayClass:r.overlayClass,overlayStyle:r.overlayStyle,closeOnClickOverlay:r.closeOnClickOverlay,lockScroll:!1,onClick:t,onClose:r.onClose,onClosed:r.onClosed,onOpened:r.onOpened,teleport:r.teleport},{children:[i(),l()]}))},zC={message:"",className:"",type:"info",position:"middle",forbidClick:!1,duration:2e3,teleport:()=>document.body},UC=[];let uT=!1,jC=Xh({},zC);const cy=new Map;function cT(){let e=UC.pop();for(;e;)e(),e=UC.pop()}function CI(){setTimeout(cT)}const Pc=e=>{if(!Bg())return null;const r=fT(e),t={config:()=>{},clear:()=>null};let i=0;const{onClose:l,teleport:f}=r,c=document.createElement("div");return tC(f).appendChild(c),LD(W(()=>{const d=Object.assign({duration:2e3},r),[m,C]=G.useState(!1),[b,x]=G.useState(Object.assign({},d)),E=G.useCallback(()=>{b.forbidClick&&LC(!1),C(!1),window.setTimeout(()=>{zD(c)&&c.parentNode&&c.parentNode.removeChild(c)},+b.duration||+zC.duration)},[c]),k=G.useCallback(()=>{C(!1),l&&l()},[]);return t.clear=E,t.config=G.useCallback(D=>{x(A=>typeof D=="function"?Object.assign(Object.assign({},A),D(A)):Object.assign(Object.assign({},A),D))},[x]),G.useEffect(()=>(C(!0),uT||cT(),UC.push(E),b.duration!==0&&"duration"in b&&(i=window.setTimeout(k,+b.duration)),()=>{i!==0&&window.clearTimeout(i)}),[]),W(bI,Object.assign({},b,{visible:m,teleport:()=>c,onClose:k,onClosed:E}))},{}),c),t};function fT(e){return ud(e)?e:{message:e}}const wI=e=>r=>Pc(Object.assign(Object.assign(Object.assign(Object.assign({},jC),cy.get(e)),fT(r)),{type:e}));["info","loading","success","fail"].forEach(e=>{Pc[e]=wI(e)}),Pc.allowMultiple=(e=!0)=>{uT=e},Pc.clear=CI;function _I(e,r){typeof e=="string"?cy.set(e,r):Xh(jC,e)}Pc.setDefaultOptions=_I,Pc.resetDefaultOptions=e=>{typeof e=="string"?cy.delete(e):(jC=Xh({},zC),cy.clear())};const dT=Pc;function fy(){const e=G.useRef([]),r=G.useCallback(i=>l=>{l&&(e.current[i]=l)},[]),t=G.useCallback(()=>{e.current=[]},[]);return[e.current,r,t]}const hT=e=>{const{defaultValue:r,value:t}=e||{},[i,l]=G.useState(()=>{if(t!==void 0)return t;if(r!==void 0)return typeof r=="function"?r():r}),f=t!==void 0?t:i;function c(p){l(p)}return[f,c]},WZ="",[EI]=bn("swiper-item"),pT=G.forwardRef((e,r)=>{const t=G.useRef(null);G.useImperativeHandle(r,()=>({self:t.current}));const[i]=$L(t,{rootMargin:"-0.1px",threshold:0,root:()=>{var l;return(l=e.trackRef)===null||l===void 0?void 0:l.current}});return W("div",Object.assign({ref:t,className:Ae(e.className,EI({hidden:e.autoHeight&&i===!1})),onClick:e.onClick,style:e.style},{children:e.children}))}),[Bc]=bn("swiper"),SI=G.forwardRef((e,r)=>{const t=Xr(e,{initialSwipe:0,loop:!0,touchable:!0,enabled:!0,rubberband:!0,autoplay:!1,slideSize:100,trackOffset:0,stuckAtBoundary:!1,preventScroll:!0}),{loop:i,autoplay:l,vertical:f,duration:c,autoHeight:p}=t,g=f?"y":"x",d=t.slideSize/100,m=t.trackOffset/100,{validChildren:C,count:b}=G.useMemo(()=>{let ne=0;return{validChildren:G.Children.map(t.children,H=>G.isValidElement(H)?H.type!==pT?null:(ne++,H):null),count:ne}},[t.children]),x=G.useRef(null),[E,k]=fy(),[D,A]=G.useState(()=>t.enabled),[T,S]=G.useState(t.initialSwipe),[O,B,z]=G2(!1),M=G.useMemo(()=>Object.assign({["--rv-swipe-slide-size"]:`${t.slideSize}%`,["--rv-swipe-track-offset"]:`${t.trackOffset}%`},t.style),[t.slideSize,t.trackOffset,t.style]),U=G.useMemo(()=>d*(b-1)<1?!1:i,[b,i,d]),V=()=>{const ne=x.current;return ne?(f?ne.offsetHeight:ne.offsetWidth)*t.slideSize/100:0},F=ne=>{let K=0,H=b-1;return t.stuckAtBoundary&&(K+=(1-d-m)/d,H-=(1-d-m)/d),oT(ne,K,H)},[{position:N},$]=rI(()=>({position:F(T)*100,config:{tension:200,friction:30,duration:c},onRest:()=>{if(z.current||!U)return;const ne=N.get(),K=100*b,H=IC(ne,K);H!==ne&&$.start({position:H,immediate:!0})}}),[b]),I=GU(ne=>{var K;const H=V();if(!H||!t.preventScroll&&vT(ne.target,(K=E[T])===null||K===void 0?void 0:K.self))return;const te=f?1:0,ae=ne.offset[te],ie=ne.direction[te],pe=ne.velocity[te];if(B(!0),!ne.last)$.start({position:ae*100/H,immediate:!0});else{const be=Math.round((ae+Math.min(pe*2e3,H)*ie)/H);ee(be),window.setTimeout(()=>{B(!1)})}},{enabled:D,transform:([ne,K])=>[-ne,-K],from:()=>{const ne=V();return[N.get()/100*ne,N.get()/100*ne]},bounds:()=>{if(U)return{};const ne=V(),K=F(0)*ne,H=F(b-1)*ne;return f?{top:K,bottom:H}:{left:K,right:H}},rubberband:t.rubberband,axis:g,preventScroll:g==="x"?t.preventScroll:!1,pointer:{touch:!0}}),q=()=>t.indicator===void 0||t.indicator===!0?W("div",Object.assign({className:Ae(Bc("indicator",{vertical:f}))},{children:W(gI,Object.assign({},t.indicatorProps,{vertical:f,total:b,current:T}))})):typeof t.indicator=="function"?t.indicator(b,T):null;function ee(ne,K=!1){const H=Math.round(ne),te=U?IC(H,b):oT(H,0,b-1);S(te),$.start({position:(U?H:F(H))*100,immediate:K})}const Z=()=>{ee(Math.round(N.get()/100)+1)},J=()=>{ee(Math.round(N.get()/100)-1)};G.useImperativeHandle(r,()=>({activeIndex:T,swipeTo:ee,swipeNext:Z,swipePrev:J,enable:()=>{A(!0)},disable:()=>{A(!1)}})),ep(()=>{const ne=C.length-1;T>ne&&ee(ne,!0)}),Oc(()=>{var ne;(ne=t.onChange)===null||ne===void 0||ne.call(t,T)},[T]),G.useEffect(()=>{if(!l||O)return Ni;const ne=typeof l=="boolean"?5e3:l,K=window.setInterval(()=>{Z()},ne);return()=>{window.clearInterval(K)}},[l,O]);const Q=()=>U?W("div",Object.assign({className:Ae(Bc("track-inner",{vertical:f}))},{children:G.Children.map(C,(ne,K)=>W(iT.div,Object.assign({className:Ae(Bc("slide")),style:{[g]:N.to(H=>{let te=-H+K*100;const ae=b*100,ie=ae/2;return te=IC(te+ie,ae)-ie,`${te}%`}),[f?"top":"left"]:`-${K*100}%`}},{children:G.cloneElement(ne,{ref:k(K),autoHeight:p,trackRef:x})})))})):W(iT.div,Object.assign({className:Ae(Bc("track-inner")),style:{[g]:N.to(ne=>`${-ne}%`)}},{children:G.Children.map(C,(ne,K)=>W("div",Object.assign({className:Ae(Bc("slide"))},{children:G.cloneElement(ne,{ref:k(K),autoHeight:p})})))}));return b===0&&void 0,Pe("div",Object.assign({className:Ae(t.className,Bc({vertical:f})),style:M},{children:[W("div",Object.assign({ref:x,className:Ae(Bc("track",{"allow-touch-move":t.touchable})),onClickCapture:ne=>{z.current&&ne.stopPropagation()}},t.touchable?I():{},{children:Q()})),q()]}))});function IC(e,r){const t=e%r;return t<0?t+r:t}function vT(e,r){return r?e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight?!0:e.parentElement&&e.parentElement!==r?vT(e.parentElement,r):!1:!1}const mT=Object.assign(SI,{Item:pT}),DI=e=>{const r=Xr(e,{shape:"round",bindGroup:!0}),t=G.useRef(null),i=m=>r.parent&&r.bindGroup?r.parent.props[m]:null,l=G.useMemo(()=>i("disabled")||r.disabled,[r.parent,r.disabled]),f=G.useMemo(()=>i("direction")||null,[r.parent]),c=G.useMemo(()=>{const m=r.checkedColor||i("checkedColor");return m&&r.checked&&!l?{borderColor:m,backgroundColor:m}:{}},[r.checkedColor,r.checked,l]),p=m=>{const{target:C}=m,b=t.current,x=b===C||(b==null?void 0:b.contains(C));!l&&(x||!r.labelDisabled)&&r.onToggle&&r.onToggle(),r.onClick&&r.onClick(m)},g=()=>{const{bem:m,shape:C,checked:b}=r,x=r.iconSize||i("iconSize");return W("div",Object.assign({ref:t,className:Ae(m("icon",[C,{disabled:l,checked:b}])),style:{fontSize:cl(x)}},{children:r.iconRender?r.iconRender({checked:b,disabled:l}):W(CD,{style:c})}))},d=()=>r.children?W("span",Object.assign({className:r.bem("label",[r.labelPosition,{disabled:l}])},{children:r.children})):null;return Pe("div",Object.assign({role:r.role,className:Ae(r.bem([{disabled:l,"label-disabled":r.labelDisabled},f]),r.className),style:r.style,tabIndex:l?-1:0,"aria-checked":r.checked,onClick:p},{children:[r.labelPosition==="left"&&d(),g(),r.labelPosition!=="left"&&d()]}))},eX="";function kI(e){return[e.getFullYear(),e.getMonth()+1]}function HC(e,r){const t=e.getFullYear(),i=r.getFullYear();if(t===i){const l=e.getMonth(),f=r.getMonth();return l===f?0:l>f?1:-1}return t>i?1:-1}function pl(e,r){const t=HC(e,r);if(t===0){const i=e.getDate(),l=r.getDate();return i===l?0:i>l?1:-1}return t}const dy=e=>new Date(e),gT=e=>Array.isArray(e)?e.map(dy):dy(e);function VC(e,r){const t=dy(e);return t.setDate(t.getDate()+r),t}const yT=e=>VC(e,-1),xT=e=>VC(e,1),$C=()=>{const e=new Date;return e.setHours(0,0,0,0),e};function TI(e){const r=e[0].getTime();return(e[1].getTime()-r)/(1e3*60*60*24)+1}function bT(e,r){let t=-1;const i=Array(e);for(;++t<e;)i[t]=r(t);return i}function AI(e){if(!e)return 0;for(;iD(parseInt(e,10));)if(e.length>1)e=e.slice(1);else return 0;return parseInt(e,10)}function YC(e,r){return 32-new Date(e,r-1,32).getDate()}const[Np]=bn("calendar"),OI=e=>{const r=Xr(e,{offset:0}),t=G.useMemo(()=>{const{item:d,index:m,color:C,offset:b,rowHeight:x}=r,E={height:x};if(d.type==="placeholder")return E.width="100%",E;if(m===0&&(E.marginLeft=`${100*b/7}%`),C)switch(d.type){case"end":case"start":case"start-end":case"multiple-middle":case"multiple-selected":E.background=C;break;case"middle":E.color=C;break}return E},[r.item,r.index,r.color,r.offset,r.rowHeight]),i=()=>{var d;r.item.type!=="disabled"&&((d=r.onClick)===null||d===void 0||d.call(r,r.item))},l=()=>{const{topInfo:d}=r.item;return d||r.topInfoRender?W("div",Object.assign({className:Ae(Np("top-info"))},{children:r.topInfoRender?r.topInfoRender(r.item):d})):null},f=()=>{const{bottomInfo:d}=r.item;return d||r.bottomInfoRender?W("div",Object.assign({className:Ae(Np("bottom-info"))},{children:r.bottomInfoRender?r.bottomInfoRender(r.item):d})):null},c=()=>{const{item:d,color:m,rowHeight:C}=r,{type:b,text:x}=d,E=Pe(tn,{children:[l(),x,f()]});return b==="selected"?W("div",Object.assign({className:Ae(Np("selected-day")),style:{width:C,height:C,background:m}},{children:E})):E},{type:p,className:g}=r.item;return p==="placeholder"?W("div",{className:Ae(Np("day")),style:t}):W("div",Object.assign({role:"gridcell",style:t,className:Ae(Np("day",p),g),tabIndex:p==="disabled"?void 0:-1,onClick:i},{children:c()}))},[hy]=bn("calendar"),RI=G.forwardRef((e,r)=>{const[t,i]=G.useState(),l=G.useRef(),[f,c]=G.useState(),p=G.useRef(0),{locale:g}=G.useContext(pd);G.useEffect(()=>{f&&(p.current=sT(f).height)},[f]);const d=G.useMemo(()=>e.formatMonthTitle?e.formatMonthTitle(e.date):g.vanCalendar.monthTitle(...kI(e.date)),[e.date,e.formatMonthTitle]),m=G.useMemo(()=>cl(e.rowHeight),[e.rowHeight]),C=G.useMemo(()=>{const F=e.date.getDay();return e.firstDayOfWeek?(F+7-e.firstDayOfWeek)%7:F},[e.date,e.firstDayOfWeek]),b=G.useMemo(()=>YC(e.date.getFullYear(),e.date.getMonth()+1),[e.date]),x=G.useMemo(()=>t||!e.lazyRender,[t]),E=()=>d,k=F=>{const N=e.showSubtitle?l.current:f,$=(N==null?void 0:N.getBoundingClientRect().top)-F.getBoundingClientRect().top+F.scrollTop;nD(F,$)},D=F=>{const N=$=>e.currentDate.some(I=>pl(I,$)===0);if(N(F)){const $=yT(F),I=xT(F),q=N($),ee=N(I);return q&&ee?"multiple-middle":q?"end":ee?"start":"multiple-selected"}return""},A=F=>{const[N,$]=e.currentDate;if(!N)return"";const I=pl(F,N);if(!$)return I===0?"start":"";const q=pl(F,$);return e.allowSameDay&&I===0&&q===0?"start-end":I===0?"start":q===0?"end":I>0&&q<0?"middle":""},T=F=>{const{type:N,minDate:$,maxDate:I,currentDate:q}=e;if(pl(F,$)<0||pl(F,I)>0)return"disabled";if(q===null)return"";if(Array.isArray(q)){if(N==="multiple")return D(F);if(N==="range")return A(F)}else if(N==="single")return pl(F,q)===0?"selected":"";return""},S=F=>{if(e.type==="range"){if(F==="start")return g.vanCalendar.start;if(F==="end")return g.vanCalendar.end;if(F==="start-end")return g.vanCalendar.startEnd}return null},O=()=>e.showMonthTitle?W("div",Object.assign({className:Ae(hy("month-title"))},{children:d})):null,B=()=>e.showMark&&x?W("div",Object.assign({className:Ae(hy("month-mark"))},{children:e.date.getMonth()+1})):null,z=G.useMemo(()=>{const F=Math.ceil((b+C)/7);return Array(F).fill({type:"placeholder"})},[b,C]),M=G.useMemo(()=>{const F=[],N=e.date.getFullYear(),$=e.date.getMonth();for(let I=1;I<=b;I++){const q=new Date(N,$,I),ee=T(q);let Z={date:q,type:ee,text:I,bottomInfo:S(ee)};e.formatter&&(Z=e.formatter(Z)),F.push(Z)}return F},[T,e.date,e.formatter]),U=(F,N)=>W(OI,{item:F,index:N,color:e.color,offset:C,rowHeight:m,onClick:e.onClick,topInfoRender:e.topInfoRender,bottomInfoRender:e.bottomInfoRender},N),V=()=>Pe("div",Object.assign({ref:l,role:"grid",className:Ae(hy("days"))},{children:[B(),(x?M:z).map(U)]}));return G.useImperativeHandle(r,()=>({getTitle:E,getHeight:()=>p.current,setVisible:i,scrollIntoView:k})),Pe("div",Object.assign({className:Ae(hy("month")),ref:c},{children:[O(),V()]}))}),[Mp]=bn("calendar"),FI=e=>{const{locale:r}=G.useContext(pd),t=()=>{if(e.showTitle){const c=e.title||r.vanCalendar.title;return W("div",Object.assign({className:Ae(Mp("header-title"))},{children:c}))}return null},i=c=>{var p;(p=e.onClickSubtitle)===null||p===void 0||p.call(e,c)},l=()=>e.showSubtitle?W("div",Object.assign({className:Ae(Mp("header-subtitle")),onClick:i},{children:e.subtitle})):null,f=()=>{const{weekdays:c,firstDayOfWeek:p}=e,g=r.vanCalendar.weekdays,d=c?g.map((C,b)=>c[b]||C):g,m=[...d.slice(p,7),...d.slice(0,p)];return W("div",Object.assign({className:Ae(Mp("weekdays"))},{children:m.map((C,b)=>W("span",Object.assign({className:Ae(Mp("weekday"))},{children:C}),b))}))};return Pe("div",Object.assign({className:Ae(Mp("header"))},{children:[t(),l(),f()]}))},[wd]=bn("calendar"),NI=$C(),MI=(()=>{const e=$C();return new Date(e.getFullYear(),e.getMonth()+6,e.getDate())})(),CT=G.forwardRef((e,r)=>{var t,{className:i,style:l}=e,f=Va(e,["className","style"]);const c=Xr(f,{round:!0,poppable:!0,showMark:!0,showTitle:!0,showConfirm:!0,showSubtitle:!0,closeOnPopstate:!0,closeOnClickOverlay:!0,safeAreaInsetBottom:!0,defaultValue:null,type:"single",position:"bottom",maxRange:null,minDate:NI,maxDate:MI,firstDayOfWeek:0,showRangePrompt:!0}),{locale:p}=G.useContext(pd),[g,d]=tp({value:c.visible,defaultValue:!1,onChange:H=>{var te;H===!1&&((te=c.onClose)===null||te===void 0||te.call(c))}}),m=(H,te=c.minDate,ae=c.maxDate)=>pl(H,te)===-1?te:pl(H,ae)===1?ae:H,C=(H=c.defaultValue)=>{const{type:te,minDate:ae,maxDate:ie}=c;if(H===null)return H;const pe=$C();if(te==="range"){Array.isArray(H)||(H=[]);const be=m(H[0]||pe,ae,yT(ie)),me=m(H[1]||pe,xT(ae));return[be,me]}return te==="multiple"?Array.isArray(H)?H.map(be=>m(be)):[m(pe)]:((!H||Array.isArray(H))&&(H=pe),m(H))},b=G.useRef(),x=G.useRef(0),[E,k]=G.useState(C(c.value===void 0?c.defaultValue:c.value)),[D,A]=uD({subtitle:"",currentDate:E});Oc(()=>{c.value!==void 0&&JSON.stringify(E)!==JSON.stringify(c.value)&&k(c.value)},[c.value]),G.useEffect(()=>{JSON.stringify(D.currentDate)!==JSON.stringify(E)&&A({currentDate:E})},[E]);const[T,S]=fy(),O=G.useMemo(()=>c.firstDayOfWeek?+c.firstDayOfWeek%7:0,[c.firstDayOfWeek,c.firstDayOfWeek]),B=G.useMemo(()=>{const H=[],te=new Date(c.minDate);te.setDate(1);do H.push(new Date(te)),te.setMonth(te.getMonth()+1);while(HC(te,c.maxDate)!==1);return H},[c.minDate,c.maxDate]),z=G.useMemo(()=>{const{currentDate:H}=D;if(H){if(c.type==="range")return!H[0]||!H[1];if(c.type==="multiple")return!H.length}return!H},[c.type,D.currentDate]),M=()=>{var H;const te=RL(b.current),ae=te+x.current,ie=B.map((Oe,Ne)=>T[Ne].getHeight()),pe=ie.reduce((Oe,Ne)=>Oe+Ne,0);if(ae>pe&&te>0)return;let be=0,me;const ce=[-1,-1];for(let Oe=0;Oe<B.length;Oe++){const Ne=T[Oe];be<=ae&&be+ie[Oe]>=te&&(ce[1]=Oe,me||(me=Ne,ce[0]=Oe),T[Oe].showed||(T[Oe].showed=!0,(H=c.onMonthShow)===null||H===void 0||H.call(c,{date:Ne.date,title:Ne.getTitle()}))),be+=ie[Oe]}B.forEach((Oe,Ne)=>{const tt=Ne>=ce[0]-1&&Ne<=ce[1]+1;T[Ne].setVisible(tt)}),me&&me.getTitle()!==D.subtitle&&!c.horizontal&&A({subtitle:me.getTitle()})},U=H=>{$2(()=>{B.some((te,ae)=>HC(te,H)===0?(b.current&&T[ae].scrollIntoView(b.current),!0):!1),M()})},V=()=>{if(c.poppable&&!g)return;const{currentDate:H}=D;if(H){const te=c.type==="single"?H:H[0];U(te)}else $2(M)},F=()=>{$2(()=>{x.current=Math.floor(sT(b.current).height),V()})},N=(H=C())=>{A({currentDate:H}),V()},$=H=>{var te;const{maxRange:ae,rangePrompt:ie,showRangePrompt:pe}=c;return ae&&TI(H)>ae?(pe&&dT.info(ie||p.vanCalendar.rangePrompt(+ae)),(te=c.onOverRange)===null||te===void 0||te.call(c),!1):!0},I=()=>{var H;const te=gT(D.currentDate);c.poppable&&k(te),(H=c.onConfirm)===null||H===void 0||H.call(c,te),K.close()},q=(H,te)=>{const ae=ie=>{var pe;D.currentDate=ie,A({currentDate:ie}),(pe=c.onSelect)===null||pe===void 0||pe.call(c,gT(D.currentDate))};if(te&&c.type==="range"&&!$(H)){c.showConfirm?ae([H[0],VC(H[0],+c.maxRange-1)]):ae(H);return}ae(H),te&&!c.showConfirm&&I()},ee=H=>{var te;if(c.readOnly||!H.date)return;const{date:ae}=H,{type:ie}=c,{currentDate:pe}=D;if(ie==="range"){if(!pe){q([ae]);return}const[be,me]=pe;if(be&&!me){const ce=pl(ae,be);ce===1?q([be,ae],!0):ce===-1?q([ae]):c.allowSameDay&&q([ae,ae],!0)}else q([ae])}else if(ie==="multiple"){if(!pe){q([ae]);return}let be;if(D.currentDate.some((ce,Oe)=>{const Ne=pl(ce,ae)===0;return Ne&&(be=Oe),Ne})){const[ce]=pe.splice(be,1);(te=c.onUnselect)===null||te===void 0||te.call(c,dy(ce)),q([...pe])}else c.maxRange&&pe.length>=c.maxRange?dT(c.rangePrompt||`选择天数不能超过 ${c.maxRange} 天`):q([...pe,ae])}else q(ae,!0)},Z=(H,te)=>{const ae=!c.horizontal&&(te!==0||!c.showSubtitle);return W(RI,Object.assign({ref:S(te),date:H,currentDate:D.currentDate,showMonthTitle:ae,firstDayOfWeek:O},J6(c,["type","color","minDate","maxDate","showMark","formatter","rowHeight","showSubtitle","lazyRender","allowSameDay","topInfoRender","bottomInfoRender","formatMonthTitle"]),{onClick:ee}),te)},J=()=>{if(c.footer)return c.footer;if(c.showConfirm){const H=z?c.confirmDisabledText:c.confirmText;return W(ap,Object.assign({round:!0,block:!0,type:"danger",color:c.color,className:Ae(wd("confirm")),disabled:z,nativeType:"button",onClick:I},{children:H||p.vanCalendar.confirm}))}return null},Q=()=>W("div",Object.assign({className:Ae(wd("footer"),{"rv-safe-area-bottom":c.safeAreaInsetBottom})},{children:J()})),ne=()=>Pe("div",Object.assign({className:Ae(i,wd()),style:l},{children:[W(FI,{weekdays:c.weekdays,title:c.title,subtitle:c.subtitle||D.subtitle,showTitle:c.showTitle,showSubtitle:c.showSubtitle,firstDayOfWeek:O,onClickSubtitle:H=>{var te;(te=c.onClickSubtitle)===null||te===void 0||te.call(c,H)}}),c.horizontal?W("div",Object.assign({ref:b,className:Ae(wd("horizontal-body"))},{children:W(mT,Object.assign({indicator:()=>null,onChange:H=>{A({subtitle:T[H].getTitle()})}},{children:B.map((H,te)=>W(mT.Item,{children:Z(H,te)},H))}))})):W("div",Object.assign({ref:b,className:Ae(wd("body")),onScroll:M},{children:B.map(Z)})),Q()]})),K={toggle:()=>{c.poppable&&d(H=>!H)},open:()=>{c.poppable&&d(!0)},close:()=>{c.poppable&&d(!1)}};return G.useEffect(()=>{c.poppable||F()},[]),G.useEffect(()=>{c.poppable&&g&&F()},[g]),Oc(()=>{N(C(D.currentDate))},[c.type,c.minDate,c.maxDate]),G.useImperativeHandle(r,()=>Object.assign({reset:N,scrollToDate:U},K)),c.poppable?Pe(tn,{children:[W(lp,Object.assign({visible:g,className:Ae(wd("popup")),round:c.round,position:c.position,closeable:c.showTitle||c.showSubtitle,closeOnPopstate:c.closeOnPopstate,closeOnClickOverlay:c.closeOnClickOverlay,onClose:K.close,onClosed:()=>{var H;c.poppable&&JSON.stringify(D.currentDate)!==JSON.stringify(E)&&A({currentDate:E}),(H=c.onClosed)===null||H===void 0||H.call(c)}},{children:ne()})),(t=c.children)===null||t===void 0?void 0:t.call(c,E,K)]}):ne()});function PI(e,r){var t;process.env.NODE_ENV==="development"&&(Ac(e)||void 0);const i=cD(e),l=(t=r==null?void 0:r.wait)!==null&&t!==void 0?t:1e3,f=G.useMemo(()=>xI((...c)=>i.current(...c),l,r),[]);return fD(()=>{f.cancel()}),{run:f,cancel:f.cancel,flush:f.flush}}function BI(e,r,t){const[i,l]=G.useState({}),{run:f}=PI(()=>{l({})},t);G.useEffect(()=>f(),r),Oc(e,[i])}const iX="",wT=G.createContext({}),[LI]=bn("checkbox-group"),zI=G.forwardRef((e,r)=>{const[t,i]=fy(),[l,f]=hT({value:e.value,defaultValue:e.defaultValue}),c=(g={})=>{typeof g=="boolean"&&(g={checked:g});const{checked:d,skipDisabled:m}=g,b=t.filter(x=>x.props.bindGroup?x.props.disabled&&m?x.checked:d??!x.checked:!1).map(x=>x.props.name);f(b),e.onChange(b)},p=g=>{var d;f(g),(d=e.onChange)===null||d===void 0||d.call(e,g)};return G.useImperativeHandle(r,()=>({toggleAll:c})),W(wT.Provider,Object.assign({value:{parent:{props:e},toggle:p,checked:l||[]}},{children:W("div",Object.assign({className:Ae(e.className,LI([e.direction]))},{children:G.Children.toArray(e.children).filter(Boolean).map((g,d)=>{var m;return((m=g.type)===null||m===void 0?void 0:m.displayName)!=="Checkbox"?g:G.cloneElement(g,{ref:i(d)})})}))}))}),[UI]=bn("checkbox"),_T=G.forwardRef((e,r)=>{const t=Xr(e,{bindGroup:!0}),i=G.useContext(wT),{parent:l}=i,f=Va(i,["parent"]),[c,p]=hT({value:t.checked,defaultValue:t.defaultChecked}),g=C=>{const{name:b}=t,{max:x}=l.props,E=f.checked.slice();if(C)!(x&&E.length>=x)&&E.indexOf(b)===-1&&(E.push(b),t.bindGroup&&f.toggle(E));else{const k=E.indexOf(b);k!==-1&&(E.splice(k,1),t.bindGroup&&f.toggle(E))}},d=G.useMemo(()=>l&&t.bindGroup?f.checked.indexOf(t.name)!==-1:c,[f.checked,c]),m=(C=!d)=>{var b;l&&t.bindGroup?g(C):(p(C),(b=t.onChange)===null||b===void 0||b.call(t,C))};return G.useImperativeHandle(r,()=>({toggle:m,checked:d,props:t})),W(DI,Object.assign({},t,{bem:UI,role:"checkbox",parent:l,checked:d,className:t.className,bindGroup:t.bindGroup,onToggle:m}))});_T.displayName="Checkbox";const ET=Object.assign(_T,{Group:zI}),uX="",ST=200,DT=300,jI=15;function II(e){const r=window.getComputedStyle(e),t=r.transform||r.webkitTransform,i=t.slice(7,t.length-1).split(", ")[5];return Number(i)}const[qC]=bn("picker-column"),HI=G.memo(G.forwardRef((e,r)=>{const{locale:t}=G.useContext(pd),{valueKey:i,textKey:l,itemHeight:f,visibleItemCount:c,placeholder:p,value:g}=e,d=G.useMemo(()=>oD(f),[f]),m=G.useMemo(()=>Array.isArray(e.options)&&!e.options.length?[]:p?[{[i]:void 0,[l]:p===!0?t.vanPicker.select:p},...e.options]:e.options,[e.options]),C=G.useRef(null),b=G.useRef(!1),x=G.useRef(0),E=G.useRef(null),k=G.useRef(0),D=G.useRef(0),[A,T,S]=uD({offset:0,duration:0}),O=pD(),B=G.useMemo(()=>d*(+c-1)/2,[d,c]),z=Q=>{var ne,K;Q=Jh(Q,0,m.length);for(let H=Q;H<m.length;H+=1)if(!(!((ne=m[H])===null||ne===void 0)&&ne.disabled))return H;for(let H=Q-1;H>=0;H-=1)if(!(!((K=m[H])===null||K===void 0)&&K.disabled))return H;return null},M=Q=>{e.onSelect(Q,e.index)},U=Q=>{Q=z(Q)||0;const ne=-Q*d,K=()=>{var H;((H=m[Q])===null||H===void 0?void 0:H[i])!==g&&M(m[Q])};b.current&&ne!==S.current.offset?E.current=K:K(),T({offset:ne})},V=Q=>{Q=z(Q)||0;const ne=-Q*d;T({offset:ne})};ep(()=>{if(m.length===0)g!==void 0&&M(void 0);else{let Q=m.findIndex(ne=>ne[i]===g);Q<0&&(Q=0,M(m[0])),V(Q)}},[g,JSON.stringify(m)]);const F=Q=>{b.current||e.readOnly||(E.current=null,T({duration:ST}),U(Q))},N=Q=>Jh(Math.round(-Q/d),0,m.length-1),$=(Q,ne)=>{const K=Math.abs(Q/ne);Q=S.current.offset+K/.003*(Q<0?-1:1);const H=N(Q);T({duration:+e.swipeDuration}),U(H)},I=()=>{b.current=!1,T({duration:0}),E.current&&(E.current(),E.current=null)},q=Q=>{if(e.readOnly)return;O.start(Q);let{offset:ne}=A;if(b.current){const K=II(C.current);ne=Math.min(0,K-B),x.current=ne}else x.current=ne;T({duration:0,offset:ne}),k.current=Date.now(),D.current=x.current,E.current=null},ee=Q=>{if(e.readOnly)return;O.move(Q),O.isVertical()&&(b.current=!0);const ne=Jh(x.current+O.deltaY.current,-(m.length*d),d);T({offset:ne});const K=Date.now();K-k.current>DT&&(k.current=K,D.current=ne)},Z=()=>{if(e.readOnly||!b.current)return;const Q=S.current.offset-D.current,ne=Date.now()-k.current;if(ne<DT&&Math.abs(Q)>jI){$(Q,ne);return}const H=N(S.current.offset);T({duration:ST}),U(H),setTimeout(()=>{b.current=!1},0)},J=()=>{const Q={height:`${e.itemHeight}px`};return m.map((ne,K)=>{const{disabled:H}=ne,te={role:"button",style:Q,tabIndex:H?-1:0,className:Ae(qC("item",{disabled:H,selected:ne[i]===g})),onClick:()=>{F(K)}},ae={className:"rv-ellipsis",children:ne[l]};return G.createElement("li",Object.assign({},te,{key:K}),e.optionRender?e.optionRender(ne):W("div",Object.assign({},ae)))})};return G.useImperativeHandle(r,()=>({stopMomentum:I})),W("div",Object.assign({className:Ae(qC(),e.className),onTouchStart:q,onTouchMove:ee,onTouchEnd:Z,onTouchCancel:Z},{children:W("ul",Object.assign({ref:C,style:{transform:`translate3d(0, ${A.offset+B}px, 0)`,transitionDuration:`${A.duration}ms`,transitionProperty:A.duration?"all":"none"},className:Ae(qC("wrapper")),onTransitionEnd:I},{children:J()}))}))}),(e,r)=>!(e.index!==r.index||e.value!==r.value||e.onSelect!==r.onSelect||JSON.stringify(e.options)!==JSON.stringify(r.options)));function VI(e,r){const{textKey:t,valueKey:i,childrenKey:l}=r,f=G.useMemo(()=>{if(e.some(d=>typeof d=="object"&&l in d))return"cascade";const g=e[0]||{};return typeof g=="object"?l in g?"cascade":"object":"plain"},[e,l]),c=G.useMemo(()=>{let p=0;function g(d,m){m>p&&(p=m);const C=m+1;d.forEach(b=>{b[l]&&g(b[l],C)})}return g(e,1),p},[e,l]);return f!=="cascade"?e:p=>{const g=[];let d=e,m=0;for(;;){g.push(d.map(x=>{var E;return{[t]:x[t],[i]:(E=x[i])!==null&&E!==void 0?E:x[t]}}));const C=p[m],b=d.find(x=>{var E;return((E=x[i])!==null&&E!==void 0?E:x[t])===C});if(!b||!b[l])break;d=b[l],m++}for(;m<c-1;)g.push([]),m++;return g}}function GC(e){let r=null;return()=>(r===null&&(r=e()),r)}function $I(e,r,t){const{textKey:i,valueKey:l}=r,f=GC(()=>{let d=typeof e=="function"?e(t):e;return Array.isArray(d[0])||(d=[d]),d.map(m=>m.map(C=>typeof C=="string"?{[i]:C,[l]:C}:(l in C||(C[l]=C[i]),C)))}),c=GC(()=>t.map((d,m)=>{var C;const b=f()[m];return b?(C=b.find(x=>x[l]===d))!==null&&C!==void 0?C:void 0:null})),p=GC(()=>t.map((d,m)=>{var C;const b=f()[m];return b&&(C=b.findIndex(x=>x[l]===d))!==null&&C!==void 0?C:null}));return{get columns(){return f()},get items(){return c()},get indexes(){return p()}}}function kT(e,r,t){const i=VI(e,r);return G.useMemo(()=>$I(i,r,t),[e,r,t])}const[ss]=bn("picker");function YI(e){const{locale:r}=G.useContext(pd),t=G.useRef(null),[i,l]=fy(),{text:f,value:c,children:p}=Xh({text:"text",value:"value",children:"children"},e.columnsFieldNames),[g,d]=G.useState(e.value);G.useEffect(()=>{e.value!==void 0&&JSON.stringify(g)!==JSON.stringify(e.value)&&d(e.value)},[e.value]);const m=kT(e.columns,{textKey:f,valueKey:c,childrenKey:p},g),{columns:C,items:b,indexes:x}=m;BI(()=>{var U;JSON.stringify(e.value)!==JSON.stringify(g)&&((U=e.onChange)===null||U===void 0||U.call(e,g,b,x))},[g],{wait:100,leading:!1,trailing:!0});const E=G.useMemo(()=>oD(e.itemHeight),[e.itemHeight]),k=(U,V)=>{d(F=>{const N=[...F];return N[V]=U==null?void 0:U[c],N})},D=()=>{var U;i.forEach(V=>V.stopMomentum()),(U=e.onConfirm)===null||U===void 0||U.call(e,g,b,x)},A=()=>{var U;(U=e.onCancel)===null||U===void 0||U.call(e)},T=()=>e.title?W("div",Object.assign({className:Ae(ss("title"),"rv-ellipsis")},{children:e.title})):null,S=()=>{const U=e.cancelButtonText||r.cancel;return W("button",Object.assign({type:"button",className:Ae(ss("cancel")),onClick:A},{children:U}))},O=()=>{const U=e.confirmButtonText||r.confirm;return W("button",Object.assign({type:"button",className:Ae(ss("confirm")),onClick:D},{children:U}))},B=()=>e.showToolbar?W("div",Object.assign({className:Ae(ss("toolbar"))},{children:e.toolbar||Pe(tn,{children:[S(),T(),O()]})})):null,z=()=>C.map((U,V)=>{const F=Array.isArray(e.placeholder)?e.placeholder[V]:e.placeholder;return W(HI,{textKey:f,valueKey:c,ref:l(V),placeholder:F,optionRender:e.optionRender,readOnly:e.readOnly,value:g[V],itemHeight:E,index:V,swipeDuration:e.swipeDuration,visibleItemCount:e.visibleItemCount,options:U,onSelect:k},V)}),M=()=>{const U=E*e.visibleItemCount,V={height:`${E}px`},F={height:`${U}px`},N={backgroundSize:`100% ${(U-E)/2}px`};return Pe("div",Object.assign({ref:t,className:Ae(ss("columns")),style:F},{children:[z(),W("div",{className:Ae(ss("mask")),style:N}),W("div",{className:Ae(oz,ss("frame")),style:V})]}))};return q2("touchmove",V2,{target:t.current}),Pe("div",Object.assign({className:Ae(ss(),e.className)},{children:[e.toolbarPosition==="top"?B():null,e.loading?W(W2,{className:Ae(ss("loading"))}):null,e.columnsTop,M(),e.columnsBottom,e.toolbarPosition==="bottom"?B():null]}))}function qI(e,r){const t=Xr(e,{columns:[],itemHeight:44,visibleItemCount:5,swipeDuration:300,showToolbar:!0,placeholder:!0,toolbarPosition:"top"}),{visible:i,popup:l,children:f,defaultValue:c=[]}=t,p=Va(t,["visible","popup","children","defaultValue"]),[g,d]=tp({value:i,defaultValue:!1,onChange:$=>{var I;$===!1&&((I=t.onClose)===null||I===void 0||I.call(t))}}),m={toggle:()=>{l&&d($=>!$)},open:()=>{l&&d(!0)},close:()=>{l&&d(!1)}};G.useImperativeHandle(r,()=>m);const C=Array.isArray(t.value)?t.value:t.value!==void 0?[t.value]:void 0,b=Array.isArray(c)?c:c!==void 0?[c]:[],{text:x,value:E,children:k}=Xh({text:"text",value:"value",children:"children"},t.columnsFieldNames),D=G.useMemo(()=>{const $=t.columns[0]||{};return!(Array.isArray($)||typeof $=="object"&&k in $)},[t.columns,k]),A=$=>D?$==null?void 0:$[0]:$,[T,S]=tp({value:C,defaultValue:b}),O=kT(t.columns,{textKey:x,valueKey:E,childrenKey:k},T),[B,z]=G.useState(T);G.useEffect(()=>{l&&JSON.stringify(B)!==JSON.stringify(T)&&z(T)},[g]),G.useEffect(()=>{!l&&JSON.stringify(B)!==JSON.stringify(T)&&z(T)},[T]);const M=($,I,q)=>{var ee;S(B,!0),(ee=t.onConfirm)===null||ee===void 0||ee.call(t,A($),A(I),A(q)),l&&m.close()},U=()=>{var $;($=t.onCancel)===null||$===void 0||$.call(t),l&&m.close()},V=gD(($,I,q)=>{var ee,Z;z($),l?g&&((ee=t.onChange)===null||ee===void 0||ee.call(t,A($),A(I),A(q))):(Z=t.onChange)===null||Z===void 0||Z.call(t,A($),A(I),A(q))}),F=ud(l)?Object.assign({closeOnClickOverlay:!0},l):{closeOnClickOverlay:!0},N=W(YI,Object.assign({},p,{value:B,onCancel:U,onConfirm:M,onChange:V}));return l?Pe(tn,{children:[W(lp,Object.assign({round:!0,position:"bottom",visible:g,closeOnClickOverlay:!0,onClickOverlay:()=>{F!=null&&F.closeOnClickOverlay&&d(!1)}},F,{children:N})),f==null?void 0:f(A(T),A(O.items),m)]}):N}const KC=G.forwardRef(qI);function GI(e){return Object.prototype.toString.call(e)==="[object Date]"&&!iD(e.getTime())}const KI=G.forwardRef((e,r)=>{const t=Xr(e,{type:"datetime",placeholder:!1,minDate:WI,maxDate:QI,formatter:(M,U)=>U}),{value:i,defaultValue:l,formatter:f,columnsOrder:c,type:p,filter:g,minDate:d,maxDate:m}=t,C=Va(t,["value","defaultValue","formatter","columnsOrder","type","filter","minDate","maxDate"]),b=M=>(GI(M)||(M=new Date),M=Math.max(M,d.getTime()),M=Math.min(M,m.getTime()),new Date(M)),[x,E,k]=G2(()=>b(i||l)),D=(M,U)=>{const V=t[`${M}Date`],F=V.getFullYear();let N=1,$=1,I=0,q=0;return M==="max"&&(N=12,$=YC(U.getFullYear(),U.getMonth()+1),I=23,q=59),U.getFullYear()===F&&(N=V.getMonth()+1,U.getMonth()+1===N&&($=V.getDate(),U.getDate()===$&&(I=V.getHours(),U.getHours()===I&&(q=V.getMinutes())))),{[`${M}Year`]:F,[`${M}Month`]:N,[`${M}Date`]:$,[`${M}Hour`]:I,[`${M}Minute`]:q}},A=G.useMemo(()=>{const{maxYear:M,maxDate:U,maxMonth:V,maxHour:F,maxMinute:N}=D("max",k.current),{minYear:$,minDate:I,minMonth:q,minHour:ee,minMinute:Z}=D("min",k.current);let J=[{type:"year",range:[$,M]},{type:"month",range:[q,V]},{type:"day",range:[I,U]},{type:"hour",range:[ee,F]},{type:"minute",range:[Z,N]}];switch(p){case"date":J=J.slice(0,3);break;case"year-month":J=J.slice(0,2);break;case"month-day":J=J.slice(1,3);break;case"datehour":J=J.slice(0,4);break}if(c){const Q=c.concat(J.map(ne=>ne.type));J.sort((ne,K)=>Q.indexOf(ne.type)-Q.indexOf(K.type))}return J.map(({type:Q,range:ne})=>{let K=bT(ne[1]-ne[0]+1,H=>fl(ne[0]+H));return g&&(K=g(Q,K)),{type:Q,values:K}})},[c,k.current,d,m]),T=G.useMemo(()=>A.map(M=>M.values.map(U=>f(M.type,U))),[A,f]),S=G.useMemo(()=>{const M=t.popup?b(k.current):k.current;return A.map(V=>{switch(V.type){case"year":return f("year",`${M.getFullYear()}`);case"month":return f("month",fl(M.getMonth()+1));case"day":return f("day",fl(M.getDate()));case"hour":return f("hour",fl(M.getHours()));case"minute":return f("minute",fl(M.getMinutes()));default:return""}})},[t.value,k.current,b]),O=M=>{const{type:U}=t,V=Z=>{let J=0;A.forEach((ne,K)=>{Z===ne.type&&(J=K)});const{values:Q}=A[J];return AI(Q[M[J]])};let F=null,N=null,$=null;U==="month-day"?(F=(x||d).getFullYear(),N=V("month"),$=V("day")):(F=V("year"),N=V("month"),$=U==="year-month"?1:V("day"));const I=YC(F,N);$=$>I?I:$;let q=0,ee=0;return U==="datehour"&&(q=+V("hour")),U==="datetime"&&(q=+V("hour"),ee=+V("minute")),b(new Date(F,N-1,$,q,ee))},B=(M,U,V)=>{var F;const N=O(V);E(N),(F=t.onChange)===null||F===void 0||F.call(t,N)},z=()=>{var M;(M=t.onConfirm)===null||M===void 0||M.call(t,x)};return Oc(()=>{const M=b(i);M&&M.valueOf()!==(x==null?void 0:x.valueOf())&&E(M)},[i,g,d,m]),W(KC,Object.assign({},C,{value:S,ref:r,columns:T,onChange:B,onConfirm:z,onCancel:t.onCancel},{children:(M,U,V)=>{var F;return(F=t.children)===null||F===void 0?void 0:F.call(t,i||l,U,V)}}))}),TT=new Date().getFullYear(),WI=new Date(TT-10,0,1),QI=new Date(TT+10,11,31),ZI=KI,XI=G.forwardRef((e,r)=>{const t=Xr(e,{minHour:0,maxHour:23,minMinute:0,maxMinute:59,placeholder:!1,defaultValue:"",formatter:(z,M)=>M}),{value:i,defaultValue:l,formatter:f,filter:c,minHour:p,maxHour:g,minMinute:d,maxMinute:m}=t,C=Va(t,["value","defaultValue","formatter","filter","minHour","maxHour","minMinute","maxMinute"]),b=z=>{z||(z=`${fl(p)}:${fl(d)}`);let[M,U]=z.split(":");return M=fl(Jh(M,+p,+g)),U=fl(Jh(U,+d,+m)),`${M}:${U}`},[x,E]=G.useState(()=>b(i===void 0?l:i)),k=G.useMemo(()=>[{type:"hour",range:[+p,+g]},{type:"minute",range:[+d,+m]}],[p,g,d,m]),D=G.useMemo(()=>k.map(({type:z,range:M})=>{let U=bT(M[1]-M[0]+1,V=>fl(M[0]+V));return c&&(U=c(z,U)),{type:z,values:U}}),[k]),A=G.useMemo(()=>D.map(z=>z.values.map(M=>f(z.type,M))),[D]),T=G.useMemo(()=>{const z=(t.popup?b(t.value):x).split(":");return[f("hour",z[0]),f("minute",z[1])]},[t.value,x,b]),S=()=>{var z;(z=t.onConfirm)===null||z===void 0||z.call(t,x)},O=()=>{var z;(z=t.onCancel)===null||z===void 0||z.call(t)},B=z=>{var M;const U=b(z.join(":"));E(U),(M=t.onChange)===null||M===void 0||M.call(t,U)};return Oc(()=>{const z=b(x);E(z)},[c,p,g,d,m]),Oc(()=>{const z=b(i);z!==x&&E(z)},[i]),W(KC,Object.assign({},C,{ref:r,columns:A,value:T,onChange:B,onConfirm:S,onCancel:O},{children:(z,M,U)=>{var V;return(V=t.children)===null||V===void 0?void 0:V.call(t,i,M,U)}}))}),[AT]=bn("datetime-picker"),WC=G.forwardRef((e,r)=>e.type==="time"?W(XI,Object.assign({ref:r,className:Ae(AT())},e)):W(ZI,Object.assign({ref:r,className:Ae(AT())},e)));function QC(e){return Array.isArray(e)?e:[e]}const pX="";function OT(e,r){this.v=e,this.k=r}function Sa(e,r,t,i){var l=Object.defineProperty;try{l({},"",{})}catch{l=0}Sa=function(c,p,g,d){function m(C,b){Sa(c,C,function(x){return this._invoke(C,b,x)})}p?l?l(c,p,{value:g,enumerable:!d,configurable:!d,writable:!d}):c[p]=g:(m("next",0),m("throw",1),m("return",2))},Sa(e,r,t,i)}function ZC(){var e,r,t=typeof Symbol=="function"?Symbol:{},i=t.iterator||"@@iterator",l=t.toStringTag||"@@toStringTag";function f(x,E,k,D){var A=E&&E.prototype instanceof p?E:p,T=Object.create(A.prototype);return Sa(T,"_invoke",function(S,O,B){var z,M,U,V=0,F=B||[],N=!1,$={p:0,n:0,v:e,a:I,f:I.bind(e,4),d:function(ee,Z){return z=ee,M=0,U=e,$.n=Z,c}};function I(q,ee){for(M=q,U=ee,r=0;!N&&V&&!Z&&r<F.length;r++){var Z,J=F[r],Q=$.p,ne=J[2];q>3?(Z=ne===ee)&&(U=J[(M=J[4])?5:(M=3,3)],J[4]=J[5]=e):J[0]<=Q&&((Z=q<2&&Q<J[1])?(M=0,$.v=ee,$.n=J[1]):Q<ne&&(Z=q<3||J[0]>ee||ee>ne)&&(J[4]=q,J[5]=ee,$.n=ne,M=0))}if(Z||q>1)return c;throw N=!0,ee}return function(q,ee,Z){if(V>1)throw TypeError("Generator is already running");for(N&&ee===1&&I(ee,Z),M=ee,U=Z;(r=M<2?e:U)||!N;){z||(M?M<3?(M>1&&($.n=-1),I(M,U)):$.n=U:$.v=U);try{if(V=2,z){if(M||(q="next"),r=z[q]){if(!(r=r.call(z,U)))throw TypeError("iterator result is not an object");if(!r.done)return r;U=r.value,M<2&&(M=0)}else M===1&&(r=z.return)&&r.call(z),M<2&&(U=TypeError("The iterator does not provide a '"+q+"' method"),M=1);z=e}else if((r=(N=$.n<0)?U:S.call(O,$))!==c)break}catch(J){z=e,M=1,U=J}finally{V=1}}return{value:r,done:N}}}(x,k,D),!0),T}var c={};function p(){}function g(){}function d(){}r=Object.getPrototypeOf;var m=[][i]?r(r([][i]())):(Sa(r={},i,function(){return this}),r),C=d.prototype=p.prototype=Object.create(m);function b(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,d):(x.__proto__=d,Sa(x,l,"GeneratorFunction")),x.prototype=Object.create(C),x}return g.prototype=d,Sa(C,"constructor",d),Sa(d,"constructor",g),g.displayName="GeneratorFunction",Sa(d,l,"GeneratorFunction"),Sa(C),Sa(C,l,"Generator"),Sa(C,i,function(){return this}),Sa(C,"toString",function(){return"[object Generator]"}),(ZC=function(){return{w:f,m:b}})()}function py(e,r){function t(l,f,c,p){try{var g=e[l](f),d=g.value;return d instanceof OT?r.resolve(d.v).then(function(m){t("next",m,c,p)},function(m){t("throw",m,c,p)}):r.resolve(d).then(function(m){g.value=m,c(g)},function(m){return t("throw",m,c,p)})}catch(m){p(m)}}var i;this.next||(Sa(py.prototype),Sa(py.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),Sa(this,"_invoke",function(l,f,c){function p(){return new r(function(g,d){t(l,c,g,d)})}return i=i?i.then(p,p):p()},!0)}function RT(e,r,t,i,l){return new py(ZC().w(e,r,t,i),l||Promise)}function JI(e,r,t,i,l){var f=RT(e,r,t,i,l);return f.next().then(function(c){return c.done?c.value:f.next()})}function eH(e){var r=Object(e),t=[];for(var i in r)t.unshift(i);return function l(){for(;t.length;)if((i=t.pop())in r)return l.value=i,l.done=!1,l;return l.done=!0,l}}function FT(e){if(e!=null){var r=e[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],t=0;if(r)return r.call(e);if(typeof e.next=="function")return e;if(!isNaN(e.length))return{next:function(){return e&&t>=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}}}throw new TypeError(Nr(e)+" is not iterable")}function no(){var e=ZC(),r=e.m(no),t=(Object.getPrototypeOf?Object.getPrototypeOf(r):r.__proto__).constructor;function i(c){var p=typeof c=="function"&&c.constructor;return!!p&&(p===t||(p.displayName||p.name)==="GeneratorFunction")}var l={throw:1,return:2,break:3,continue:3};function f(c){var p,g;return function(d){p||(p={stop:function(){return g(d.a,2)},catch:function(){return d.v},abrupt:function(C,b){return g(d.a,l[C],b)},delegateYield:function(C,b,x){return p.resultName=b,g(d.d,FT(C),x)},finish:function(C){return g(d.f,C)}},g=function(C,b,x){d.p=p.prev,d.n=p.next;try{return C(b,x)}finally{p.next=d.n}}),p.resultName&&(p[p.resultName]=d.v,p.resultName=void 0),p.sent=d.v,p.next=d.n;try{return c.call(this,p)}finally{d.p=p.prev,d.n=p.next}}}return(no=function(){return{wrap:function(g,d,m,C){return e.w(f(g),d,m,C&&C.reverse())},isGeneratorFunction:i,mark:e.m,awrap:function(g,d){return new OT(g,d)},AsyncIterator:py,async:function(g,d,m,C,b){return(i(d)?RT:JI)(f(g),d,m,C,b)},keys:eH,values:FT}})()}function NT(e,r,t,i,l,f,c){try{var p=e[f](c),g=p.value}catch(d){return void t(d)}p.done?r(g):Promise.resolve(g).then(i,l)}function Pp(e){return function(){var r=this,t=arguments;return new Promise(function(i,l){var f=e.apply(r,t);function c(g){NT(f,i,l,c,p,"next",g)}function p(g){NT(f,i,l,c,p,"throw",g)}c(void 0)})}}function tH(e){if(Array.isArray(e))return bb(e)}function MT(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function nH(){throw new TypeError(`Invalid attempt to spread non-iterable instance.