diff --git a/Dockerfile b/Dockerfile index cbc27962..34a577e5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,19 @@ FROM oven/bun:1.1.15-debian as base WORKDIR /app/prasi/repo +ENV DEBIAN_FRONTEND noninteractive RUN apt-get update -RUN apt-get install git curl gnupg zip unzip -yq +RUN apt-get install build-essential gcc git curl gnupg zip unzip -yq RUN git config --global --add safe.directory /app/prasi/repo RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - + RUN apt-get update RUN apt-get install nodejs -yq +RUN npm i -g node-gyp-build-optional-packages node-gyp pnpm +RUN PATH="/usr/lib/node_modules/npm/bin:$PATH" + COPY dockerzip . RUN unzip -o dockerzip RUN bun install diff --git a/app/srv/api/prod.ts b/app/srv/api/prod.ts index 24038ef8..dfed8f4c 100644 --- a/app/srv/api/prod.ts +++ b/app/srv/api/prod.ts @@ -223,7 +223,7 @@ export const _ = { return await responseCompressed( req, JSON.stringify( - pages.map((e) => ({ + pages.map((e: any) => ({ id: e.id, url: e.url, root: e.content_tree, diff --git a/app/srv/core/main.js b/app/srv/core/main.js index fb74494b..ce7a7a33 100644 --- a/app/srv/core/main.js +++ b/app/srv/core/main.js @@ -1,23 +1,23 @@ -var T1=Object.create;var Da=Object.defineProperty;var P1=Object.getOwnPropertyDescriptor;var A1=Object.getOwnPropertyNames;var L1=Object.getPrototypeOf,M1=Object.prototype.hasOwnProperty;var ie=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),z1=(e,t)=>{for(var n in t)Da(e,n,{get:t[n],enumerable:!0})},D1=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of A1(t))!M1.call(e,i)&&i!==n&&Da(e,i,{get:()=>t[i],enumerable:!(r=P1(t,i))||r.enumerable});return e};var P=(e,t,n)=>(n=e!=null?T1(L1(e)):{},D1(t||!e||!e.__esModule?Da(n,"default",{value:e,enumerable:!0}):n,e));var cp=ie(j=>{"use strict";var Ri=Symbol.for("react.element"),j1=Symbol.for("react.portal"),F1=Symbol.for("react.fragment"),U1=Symbol.for("react.strict_mode"),B1=Symbol.for("react.profiler"),$1=Symbol.for("react.provider"),H1=Symbol.for("react.context"),V1=Symbol.for("react.forward_ref"),W1=Symbol.for("react.suspense"),G1=Symbol.for("react.memo"),Z1=Symbol.for("react.lazy"),ep=Symbol.iterator;function K1(e){return e===null||typeof e!="object"?null:(e=ep&&e[ep]||e["@@iterator"],typeof e=="function"?e:null)}var rp={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ip=Object.assign,op={};function vr(e,t,n){this.props=e,this.context=t,this.refs=op,this.updater=n||rp}vr.prototype.isReactComponent={};vr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};vr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function lp(){}lp.prototype=vr.prototype;function Fa(e,t,n){this.props=e,this.context=t,this.refs=op,this.updater=n||rp}var Ua=Fa.prototype=new lp;Ua.constructor=Fa;ip(Ua,vr.prototype);Ua.isPureReactComponent=!0;var tp=Array.isArray,sp=Object.prototype.hasOwnProperty,Ba={current:null},ap={key:!0,ref:!0,__self:!0,__source:!0};function up(e,t,n){var r,i={},o=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(o=""+t.key),t)sp.call(t,r)&&!ap.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1{"use strict";fp.exports=cp()});var xp=ie(K=>{"use strict";function Ga(e,t){var n=e.length;e.push(t);e:for(;0>>1,i=e[r];if(0>>1;rhl(s,n))ahl(u,s)?(e[r]=u,e[a]=n,r=a):(e[r]=s,e[l]=n,r=l);else if(ahl(u,n))e[r]=u,e[a]=n,r=a;else break e}}return t}function hl(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(dp=performance,K.unstable_now=function(){return dp.now()}):(Ha=Date,pp=Ha.now(),K.unstable_now=function(){return Ha.now()-pp});var dp,Ha,pp,Et=[],an=[],Y1=1,tt=null,ke=3,_l=!1,$n=!1,Ii=!1,gp=typeof setTimeout=="function"?setTimeout:null,yp=typeof clearTimeout=="function"?clearTimeout:null,mp=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Za(e){for(var t=mt(an);t!==null;){if(t.callback===null)yl(an);else if(t.startTime<=e)yl(an),t.sortIndex=t.expirationTime,Ga(Et,t);else break;t=mt(an)}}function Ka(e){if(Ii=!1,Za(e),!$n)if(mt(Et)!==null)$n=!0,Xa(Qa);else{var t=mt(an);t!==null&&qa(Ka,t.startTime-e)}}function Qa(e,t){$n=!1,Ii&&(Ii=!1,yp(Ni),Ni=-1),_l=!0;var n=ke;try{for(Za(t),tt=mt(Et);tt!==null&&(!(tt.expirationTime>t)||e&&!wp());){var r=tt.callback;if(typeof r=="function"){tt.callback=null,ke=tt.priorityLevel;var i=r(tt.expirationTime<=t);t=K.unstable_now(),typeof i=="function"?tt.callback=i:tt===mt(Et)&&yl(Et),Za(t)}else yl(Et);tt=mt(Et)}if(tt!==null)var o=!0;else{var l=mt(an);l!==null&&qa(Ka,l.startTime-t),o=!1}return o}finally{tt=null,ke=n,_l=!1}}var vl=!1,gl=null,Ni=-1,_p=5,vp=-1;function wp(){return!(K.unstable_now()-vp<_p)}function Va(){if(gl!==null){var e=K.unstable_now();vp=e;var t=!0;try{t=gl(!0,e)}finally{t?Ci():(vl=!1,gl=null)}}else vl=!1}var Ci;typeof mp=="function"?Ci=function(){mp(Va)}:typeof MessageChannel<"u"?(Wa=new MessageChannel,hp=Wa.port2,Wa.port1.onmessage=Va,Ci=function(){hp.postMessage(null)}):Ci=function(){gp(Va,0)};var Wa,hp;function Xa(e){gl=e,vl||(vl=!0,Ci())}function qa(e,t){Ni=gp(function(){e(K.unstable_now())},t)}K.unstable_IdlePriority=5;K.unstable_ImmediatePriority=1;K.unstable_LowPriority=4;K.unstable_NormalPriority=3;K.unstable_Profiling=null;K.unstable_UserBlockingPriority=2;K.unstable_cancelCallback=function(e){e.callback=null};K.unstable_continueExecution=function(){$n||_l||($n=!0,Xa(Qa))};K.unstable_forceFrameRate=function(e){0>e||125r?(e.sortIndex=n,Ga(an,e),mt(Et)===null&&e===mt(an)&&(Ii?(yp(Ni),Ni=-1):Ii=!0,qa(Ka,n-r))):(e.sortIndex=i,Ga(Et,e),$n||_l||($n=!0,Xa(Qa))),e};K.unstable_shouldYield=wp;K.unstable_wrapCallback=function(e){var t=ke;return function(){var n=ke;ke=t;try{return e.apply(this,arguments)}finally{ke=n}}}});var Sp=ie((BC,kp)=>{"use strict";kp.exports=xp()});var N0=ie(qe=>{"use strict";var Om=ge(),Qe=Sp();function E(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),wu=Object.prototype.hasOwnProperty,ew=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Ep={},bp={};function tw(e){return wu.call(bp,e)?!0:wu.call(Ep,e)?!1:ew.test(e)?bp[e]=!0:(Ep[e]=!0,!1)}function nw(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function rw(e,t,n,r){if(t===null||typeof t>"u"||nw(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Pe(e,t,n,r,i,o,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=l}var ve={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ve[e]=new Pe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ve[t]=new Pe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ve[e]=new Pe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ve[e]=new Pe(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ve[e]=new Pe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ve[e]=new Pe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ve[e]=new Pe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ve[e]=new Pe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ve[e]=new Pe(e,5,!1,e.toLowerCase(),null,!1,!1)});var dc=/[\-:]([a-z])/g;function pc(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(dc,pc);ve[t]=new Pe(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(dc,pc);ve[t]=new Pe(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(dc,pc);ve[t]=new Pe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ve[e]=new Pe(e,1,!1,e.toLowerCase(),null,!1,!1)});ve.xlinkHref=new Pe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ve[e]=new Pe(e,1,!1,e.toLowerCase(),null,!0,!0)});function mc(e,t,n,r){var i=ve.hasOwnProperty(t)?ve[t]:null;(i!==null?i.type!==0:r||!(2()=>(t||e((t={exports:{}}).exports,t),t.exports),q1=(e,t)=>{for(var n in t)$a(e,n,{get:t[n],enumerable:!0})},Q1=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of G1(t))!K1.call(e,i)&&i!==n&&$a(e,i,{get:()=>t[i],enumerable:!(r=W1(t,i))||r.enumerable});return e};var P=(e,t,n)=>(n=e!=null?V1(Z1(e)):{},Q1(t||!e||!e.__esModule?$a(n,"default",{value:e,enumerable:!0}):n,e));var vp=ie(j=>{"use strict";var Ii=Symbol.for("react.element"),X1=Symbol.for("react.portal"),J1=Symbol.for("react.fragment"),Y1=Symbol.for("react.strict_mode"),ew=Symbol.for("react.profiler"),tw=Symbol.for("react.provider"),nw=Symbol.for("react.context"),rw=Symbol.for("react.forward_ref"),iw=Symbol.for("react.suspense"),ow=Symbol.for("react.memo"),sw=Symbol.for("react.lazy"),up=Symbol.iterator;function lw(e){return e===null||typeof e!="object"?null:(e=up&&e[up]||e["@@iterator"],typeof e=="function"?e:null)}var dp={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},pp=Object.assign,mp={};function wr(e,t,n){this.props=e,this.context=t,this.refs=mp,this.updater=n||dp}wr.prototype.isReactComponent={};wr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};wr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function hp(){}hp.prototype=wr.prototype;function Va(e,t,n){this.props=e,this.context=t,this.refs=mp,this.updater=n||dp}var Wa=Va.prototype=new hp;Wa.constructor=Va;pp(Wa,wr.prototype);Wa.isPureReactComponent=!0;var cp=Array.isArray,gp=Object.prototype.hasOwnProperty,Ga={current:null},yp={key:!0,ref:!0,__self:!0,__source:!0};function _p(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)gp.call(t,r)&&!yp.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1{"use strict";wp.exports=vp()});var Op=ie(K=>{"use strict";function Xa(e,t){var n=e.length;e.push(t);e:for(;0>>1,i=e[r];if(0>>1;rys(l,n))cys(a,l)?(e[r]=a,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else if(cys(a,n))e[r]=a,e[c]=n,r=c;else break e}}return t}function ys(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(xp=performance,K.unstable_now=function(){return xp.now()}):(Ka=Date,kp=Ka.now(),K.unstable_now=function(){return Ka.now()-kp});var xp,Ka,kp,Rt=[],cn=[],dw=1,tt=null,be=3,ws=!1,Hn=!1,Ni=!1,bp=typeof setTimeout=="function"?setTimeout:null,Rp=typeof clearTimeout=="function"?clearTimeout:null,Sp=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Ja(e){for(var t=mt(cn);t!==null;){if(t.callback===null)vs(cn);else if(t.startTime<=e)vs(cn),t.sortIndex=t.expirationTime,Xa(Rt,t);else break;t=mt(cn)}}function Ya(e){if(Ni=!1,Ja(e),!Hn)if(mt(Rt)!==null)Hn=!0,tu(eu);else{var t=mt(cn);t!==null&&nu(Ya,t.startTime-e)}}function eu(e,t){Hn=!1,Ni&&(Ni=!1,Rp(Pi),Pi=-1),ws=!0;var n=be;try{for(Ja(t),tt=mt(Rt);tt!==null&&(!(tt.expirationTime>t)||e&&!Ip());){var r=tt.callback;if(typeof r=="function"){tt.callback=null,be=tt.priorityLevel;var i=r(tt.expirationTime<=t);t=K.unstable_now(),typeof i=="function"?tt.callback=i:tt===mt(Rt)&&vs(Rt),Ja(t)}else vs(Rt);tt=mt(Rt)}if(tt!==null)var o=!0;else{var s=mt(cn);s!==null&&nu(Ya,s.startTime-t),o=!1}return o}finally{tt=null,be=n,ws=!1}}var xs=!1,_s=null,Pi=-1,Cp=5,Tp=-1;function Ip(){return!(K.unstable_now()-Tpe||125r?(e.sortIndex=n,Xa(cn,e),mt(Rt)===null&&e===mt(cn)&&(Ni?(Rp(Pi),Pi=-1):Ni=!0,nu(Ya,n-r))):(e.sortIndex=i,Xa(Rt,e),Hn||ws||(Hn=!0,tu(eu))),e};K.unstable_shouldYield=Ip;K.unstable_wrapCallback=function(e){var t=be;return function(){var n=be;be=t;try{return e.apply(this,arguments)}finally{be=n}}}});var Pp=ie((h3,Np)=>{"use strict";Np.exports=Op()});var j0=ie(Xe=>{"use strict";var Fm=_e(),qe=Pp();function E(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),bu=Object.prototype.hasOwnProperty,pw=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Ap={},Lp={};function mw(e){return bu.call(Lp,e)?!0:bu.call(Ap,e)?!1:pw.test(e)?Lp[e]=!0:(Ap[e]=!0,!1)}function hw(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function gw(e,t,n,r){if(t===null||typeof t>"u"||hw(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function De(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var xe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){xe[e]=new De(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];xe[t]=new De(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){xe[e]=new De(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){xe[e]=new De(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){xe[e]=new De(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){xe[e]=new De(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){xe[e]=new De(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){xe[e]=new De(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){xe[e]=new De(e,5,!1,e.toLowerCase(),null,!1,!1)});var yc=/[\-:]([a-z])/g;function _c(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(yc,_c);xe[t]=new De(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(yc,_c);xe[t]=new De(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(yc,_c);xe[t]=new De(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){xe[e]=new De(e,1,!1,e.toLowerCase(),null,!1,!1)});xe.xlinkHref=new De("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){xe[e]=new De(e,1,!1,e.toLowerCase(),null,!0,!0)});function vc(e,t,n,r){var i=xe.hasOwnProperty(t)?xe[t]:null;(i!==null?i.type!==0:r||!(2s||i[l]!==o[s]){var a=` -`+i[l].replace(" at new "," at ");return e.displayName&&a.includes("")&&(a=a.replace("",e.displayName)),a}while(1<=l&&0<=s);break}}}finally{Ya=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ji(e):""}function iw(e){switch(e.tag){case 5:return ji(e.type);case 16:return ji("Lazy");case 13:return ji("Suspense");case 19:return ji("SuspenseList");case 0:case 2:case 15:return e=eu(e.type,!1),e;case 11:return e=eu(e.type.render,!1),e;case 1:return e=eu(e.type,!0),e;default:return""}}function Eu(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Sr:return"Fragment";case kr:return"Portal";case xu:return"Profiler";case hc:return"StrictMode";case ku:return"Suspense";case Su:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Am:return(e.displayName||"Context")+".Consumer";case Pm:return(e._context.displayName||"Context")+".Provider";case gc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case yc:return t=e.displayName||null,t!==null?t:Eu(e.type)||"Memo";case cn:t=e._payload,e=e._init;try{return Eu(e(t))}catch{}}return null}function ow(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Eu(t);case 8:return t===hc?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function En(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Mm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function lw(e){var t=Mm(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(l){r=""+l,o.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function xl(e){e._valueTracker||(e._valueTracker=lw(e))}function zm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Mm(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ql(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function bu(e,t){var n=t.checked;return re({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Cp(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=En(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Dm(e,t){t=t.checked,t!=null&&mc(e,"checked",t,!1)}function Ru(e,t){Dm(e,t);var n=En(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Cu(e,t.type,n):t.hasOwnProperty("defaultValue")&&Cu(e,t.type,En(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ip(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Cu(e,t,n){(t!=="number"||Ql(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Fi=Array.isArray;function Lr(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=kl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ji(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var $i={animationIterationCount:!0,aspectRatio:!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,gridArea:!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},sw=["Webkit","ms","Moz","O"];Object.keys($i).forEach(function(e){sw.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),$i[t]=$i[e]})});function Bm(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||$i.hasOwnProperty(e)&&$i[e]?(""+t).trim():t+"px"}function $m(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Bm(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var aw=re({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ou(e,t){if(t){if(aw[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(E(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(E(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(E(61))}if(t.style!=null&&typeof t.style!="object")throw Error(E(62))}}function Tu(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Pu=null;function _c(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Au=null,Mr=null,zr=null;function Tp(e){if(e=yo(e)){if(typeof Au!="function")throw Error(E(280));var t=e.stateNode;t&&(t=Ss(t),Au(e.stateNode,e.type,t))}}function Hm(e){Mr?zr?zr.push(e):zr=[e]:Mr=e}function Vm(){if(Mr){var e=Mr,t=zr;if(zr=Mr=null,Tp(e),t)for(e=0;e>>=0,e===0?32:31-(vw(e)/ww|0)|0}var Sl=64,El=4194304;function Ui(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Yl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,l=n&268435455;if(l!==0){var s=l&~i;s!==0?r=Ui(s):(o&=l,o!==0&&(r=Ui(o)))}else l=n&~i,l!==0?r=Ui(l):o!==0&&(r=Ui(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function ho(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-vt(t),e[t]=n}function Ew(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Vi),Up=" ",Bp=!1;function ch(e,t){switch(e){case"keyup":return Jw.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function fh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Er=!1;function ex(e,t){switch(e){case"compositionend":return fh(t);case"keypress":return t.which!==32?null:(Bp=!0,Up);case"textInput":return e=t.data,e===Up&&Bp?null:e;default:return null}}function tx(e,t){if(Er)return e==="compositionend"||!Rc&&ch(e,t)?(e=ah(),Ul=Sc=mn=null,Er=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Vp(n)}}function hh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?hh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function gh(){for(var e=window,t=Ql();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ql(e.document)}return t}function Cc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function fx(e){var t=gh(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&hh(n.ownerDocument.documentElement,n)){if(r!==null&&Cc(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Wp(n,o);var l=Wp(n,r);i&&l&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,br=null,Fu=null,Gi=null,Uu=!1;function Gp(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Uu||br==null||br!==Ql(r)||(r=br,"selectionStart"in r&&Cc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Gi&&io(Gi,r)||(Gi=r,r=ns(Fu,"onSelect"),0Ir||(e.current=Gu[Ir],Gu[Ir]=null,Ir--)}function Q(e,t){Ir++,Gu[Ir]=e.current,e.current=t}var bn={},Re=Cn(bn),Ue=Cn(!1),Xn=bn;function Br(e,t){var n=e.type.contextTypes;if(!n)return bn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Be(e){return e=e.childContextTypes,e!=null}function is(){J(Ue),J(Re)}function tm(e,t,n){if(Re.current!==bn)throw Error(E(168));Q(Re,t),Q(Ue,n)}function bh(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(E(108,ow(e)||"Unknown",i));return re({},n,r)}function os(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||bn,Xn=Re.current,Q(Re,e),Q(Ue,Ue.current),!0}function nm(e,t,n){var r=e.stateNode;if(!r)throw Error(E(169));n?(e=bh(e,t,Xn),r.__reactInternalMemoizedMergedChildContext=e,J(Ue),J(Re),Q(Re,e)):J(Ue),Q(Ue,n)}var Ut=null,Es=!1,fu=!1;function Rh(e){Ut===null?Ut=[e]:Ut.push(e)}function xx(e){Es=!0,Rh(e)}function In(){if(!fu&&Ut!==null){fu=!0;var e=0,t=W;try{var n=Ut;for(W=1;e>=l,i-=l,Bt=1<<32-vt(t)+i|n<b?(O=k,k=null):O=k.sibling;var C=f(h,k,y[b],v);if(C===null){k===null&&(k=O);break}e&&k&&C.alternate===null&&t(h,k),m=o(C,m,b),R===null?S=C:R.sibling=C,R=C,k=O}if(b===y.length)return n(h,k),Y&&Hn(h,b),S;if(k===null){for(;bb?(O=k,k=null):O=k.sibling;var T=f(h,k,C.value,v);if(T===null){k===null&&(k=O);break}e&&k&&T.alternate===null&&t(h,k),m=o(T,m,b),R===null?S=T:R.sibling=T,R=T,k=O}if(C.done)return n(h,k),Y&&Hn(h,b),S;if(k===null){for(;!C.done;b++,C=y.next())C=d(h,C.value,v),C!==null&&(m=o(C,m,b),R===null?S=C:R.sibling=C,R=C);return Y&&Hn(h,b),S}for(k=r(h,k);!C.done;b++,C=y.next())C=p(k,h,b,C.value,v),C!==null&&(e&&C.alternate!==null&&k.delete(C.key===null?b:C.key),m=o(C,m,b),R===null?S=C:R.sibling=C,R=C);return e&&k.forEach(function(De){return t(h,De)}),Y&&Hn(h,b),S}function w(h,m,y,v){if(typeof y=="object"&&y!==null&&y.type===Sr&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case wl:e:{for(var S=y.key,R=m;R!==null;){if(R.key===S){if(S=y.type,S===Sr){if(R.tag===7){n(h,R.sibling),m=i(R,y.props.children),m.return=h,h=m;break e}}else if(R.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===cn&&um(S)===R.type){n(h,R.sibling),m=i(R,y.props),m.ref=Li(h,R,y),m.return=h,h=m;break e}n(h,R);break}else t(h,R);R=R.sibling}y.type===Sr?(m=Qn(y.props.children,h.mode,v,y.key),m.return=h,h=m):(v=Kl(y.type,y.key,y.props,null,h.mode,v),v.ref=Li(h,m,y),v.return=h,h=v)}return l(h);case kr:e:{for(R=y.key;m!==null;){if(m.key===R)if(m.tag===4&&m.stateNode.containerInfo===y.containerInfo&&m.stateNode.implementation===y.implementation){n(h,m.sibling),m=i(m,y.children||[]),m.return=h,h=m;break e}else{n(h,m);break}else t(h,m);m=m.sibling}m=vu(y,h.mode,v),m.return=h,h=m}return l(h);case cn:return R=y._init,w(h,m,R(y._payload),v)}if(Fi(y))return g(h,m,y,v);if(Oi(y))return _(h,m,y,v);Ml(h,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,m!==null&&m.tag===6?(n(h,m.sibling),m=i(m,y),m.return=h,h=m):(n(h,m),m=_u(y,h.mode,v),m.return=h,h=m),l(h)):n(h,m)}return w}var Hr=Lh(!0),Mh=Lh(!1),_o={},Nt=Cn(_o),ao=Cn(_o),uo=Cn(_o);function Zn(e){if(e===_o)throw Error(E(174));return e}function zc(e,t){switch(Q(uo,t),Q(ao,e),Q(Nt,_o),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Nu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Nu(t,e)}J(Nt),Q(Nt,t)}function Vr(){J(Nt),J(ao),J(uo)}function zh(e){Zn(uo.current);var t=Zn(Nt.current),n=Nu(t,e.type);t!==n&&(Q(ao,e),Q(Nt,n))}function Dc(e){ao.current===e&&(J(Nt),J(ao))}var te=Cn(0);function fs(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var du=[];function jc(){for(var e=0;en?n:4,e(!0);var r=pu.transition;pu.transition={};try{e(!1),t()}finally{W=n,pu.transition=r}}function Jh(){return st().memoizedState}function bx(e,t,n){var r=kn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Yh(e))e0(t,n);else if(n=Oh(e,t,n,r),n!==null){var i=Te();wt(n,e,r,i),t0(n,t,r)}}function Rx(e,t,n){var r=kn(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Yh(e))e0(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var l=t.lastRenderedState,s=o(l,n);if(i.hasEagerState=!0,i.eagerState=s,xt(s,l)){var a=t.interleaved;a===null?(i.next=i,Lc(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=Oh(e,t,i,r),n!==null&&(i=Te(),wt(n,e,r,i),t0(n,t,r))}}function Yh(e){var t=e.alternate;return e===ne||t!==null&&t===ne}function e0(e,t){Zi=ds=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function t0(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,wc(e,n)}}var ps={readContext:lt,useCallback:Se,useContext:Se,useEffect:Se,useImperativeHandle:Se,useInsertionEffect:Se,useLayoutEffect:Se,useMemo:Se,useReducer:Se,useRef:Se,useState:Se,useDebugValue:Se,useDeferredValue:Se,useTransition:Se,useMutableSource:Se,useSyncExternalStore:Se,useId:Se,unstable_isNewReconciler:!1},Cx={readContext:lt,useCallback:function(e,t){return Rt().memoizedState=[e,t===void 0?null:t],e},useContext:lt,useEffect:fm,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Vl(4194308,4,Zh.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Vl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Vl(4,2,e,t)},useMemo:function(e,t){var n=Rt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Rt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=bx.bind(null,ne,e),[r.memoizedState,e]},useRef:function(e){var t=Rt();return e={current:e},t.memoizedState=e},useState:cm,useDebugValue:Hc,useDeferredValue:function(e){return Rt().memoizedState=e},useTransition:function(){var e=cm(!1),t=e[0];return e=Ex.bind(null,e[1]),Rt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ne,i=Rt();if(Y){if(n===void 0)throw Error(E(407));n=n()}else{if(n=t(),me===null)throw Error(E(349));Jn&30||Fh(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,fm(Bh.bind(null,r,o,e),[e]),r.flags|=2048,po(9,Uh.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Rt(),t=me.identifierPrefix;if(Y){var n=$t,r=Bt;n=(r&~(1<<32-vt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=co++,0l||i[s]!==o[l]){var c=` +`+i[s].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=s&&0<=l);break}}}finally{iu=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Bi(e):""}function yw(e){switch(e.tag){case 5:return Bi(e.type);case 16:return Bi("Lazy");case 13:return Bi("Suspense");case 19:return Bi("SuspenseList");case 0:case 2:case 15:return e=ou(e.type,!1),e;case 11:return e=ou(e.type.render,!1),e;case 1:return e=ou(e.type,!0),e;default:return""}}function Iu(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Er:return"Fragment";case Sr:return"Portal";case Ru:return"Profiler";case wc:return"StrictMode";case Cu:return"Suspense";case Tu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case $m:return(e.displayName||"Context")+".Consumer";case Bm:return(e._context.displayName||"Context")+".Provider";case xc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case kc:return t=e.displayName||null,t!==null?t:Iu(e.type)||"Memo";case dn:t=e._payload,e=e._init;try{return Iu(e(t))}catch{}}return null}function _w(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Iu(t);case 8:return t===wc?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Rn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Vm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function vw(e){var t=Vm(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ss(e){e._valueTracker||(e._valueTracker=vw(e))}function Wm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Vm(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Xs(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ou(e,t){var n=t.checked;return re({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Mp(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Rn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Gm(e,t){t=t.checked,t!=null&&vc(e,"checked",t,!1)}function Nu(e,t){Gm(e,t);var n=Rn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Pu(e,t.type,n):t.hasOwnProperty("defaultValue")&&Pu(e,t.type,Rn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function zp(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Pu(e,t,n){(t!=="number"||Xs(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var $i=Array.isArray;function Dr(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Es.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function to(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Wi={animationIterationCount:!0,aspectRatio:!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,gridArea:!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},ww=["Webkit","ms","Moz","O"];Object.keys(Wi).forEach(function(e){ww.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Wi[t]=Wi[e]})});function Qm(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Wi.hasOwnProperty(e)&&Wi[e]?(""+t).trim():t+"px"}function Xm(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Qm(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var xw=re({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Du(e,t){if(t){if(xw[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(E(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(E(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(E(61))}if(t.style!=null&&typeof t.style!="object")throw Error(E(62))}}function Mu(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var zu=null;function Sc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ju=null,Mr=null,zr=null;function Up(e){if(e=wo(e)){if(typeof ju!="function")throw Error(E(280));var t=e.stateNode;t&&(t=bl(t),ju(e.stateNode,e.type,t))}}function Jm(e){Mr?zr?zr.push(e):zr=[e]:Mr=e}function Ym(){if(Mr){var e=Mr,t=zr;if(zr=Mr=null,Up(e),t)for(e=0;e>>=0,e===0?32:31-(Pw(e)/Aw|0)|0}var bs=64,Rs=4194304;function Hi(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function tl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~i;l!==0?r=Hi(l):(o&=s,o!==0&&(r=Hi(o)))}else s=n&~i,s!==0?r=Hi(s):o!==0&&(r=Hi(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function _o(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-vt(t),e[t]=n}function zw(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Zi),qp=" ",Qp=!1;function vh(e,t){switch(e){case"keyup":return dx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var br=!1;function mx(e,t){switch(e){case"compositionend":return wh(t);case"keypress":return t.which!==32?null:(Qp=!0,qp);case"textInput":return e=t.data,e===qp&&Qp?null:e;default:return null}}function hx(e,t){if(br)return e==="compositionend"||!Nc&&vh(e,t)?(e=yh(),$s=Tc=gn=null,br=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Yp(n)}}function Eh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Eh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function bh(){for(var e=window,t=Xs();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Xs(e.document)}return t}function Pc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Ex(e){var t=bh(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Eh(n.ownerDocument.documentElement,n)){if(r!==null&&Pc(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=em(n,o);var s=em(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Rr=null,Vu=null,qi=null,Wu=!1;function tm(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Wu||Rr==null||Rr!==Xs(r)||(r=Rr,"selectionStart"in r&&Pc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),qi&&lo(qi,r)||(qi=r,r=il(Vu,"onSelect"),0Ir||(e.current=Xu[Ir],Xu[Ir]=null,Ir--)}function q(e,t){Ir++,Xu[Ir]=e.current,e.current=t}var Cn={},Ie=In(Cn),Ue=In(!1),Xn=Cn;function $r(e,t){var n=e.type.contextTypes;if(!n)return Cn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Be(e){return e=e.childContextTypes,e!=null}function sl(){J(Ue),J(Ie)}function cm(e,t,n){if(Ie.current!==Cn)throw Error(E(168));q(Ie,t),q(Ue,n)}function Lh(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(E(108,_w(e)||"Unknown",i));return re({},n,r)}function ll(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Cn,Xn=Ie.current,q(Ie,e),q(Ue,Ue.current),!0}function fm(e,t,n){var r=e.stateNode;if(!r)throw Error(E(169));n?(e=Lh(e,t,Xn),r.__reactInternalMemoizedMergedChildContext=e,J(Ue),J(Ie),q(Ie,e)):J(Ue),q(Ue,n)}var Ht=null,Rl=!1,gu=!1;function Dh(e){Ht===null?Ht=[e]:Ht.push(e)}function Lx(e){Rl=!0,Dh(e)}function On(){if(!gu&&Ht!==null){gu=!0;var e=0,t=W;try{var n=Ht;for(W=1;e>=s,i-=s,Vt=1<<32-vt(t)+i|n<b?(O=k,k=null):O=k.sibling;var C=f(h,k,y[b],v);if(C===null){k===null&&(k=O);break}e&&k&&C.alternate===null&&t(h,k),m=o(C,m,b),R===null?S=C:R.sibling=C,R=C,k=O}if(b===y.length)return n(h,k),Y&&Vn(h,b),S;if(k===null){for(;bb?(O=k,k=null):O=k.sibling;var N=f(h,k,C.value,v);if(N===null){k===null&&(k=O);break}e&&k&&N.alternate===null&&t(h,k),m=o(N,m,b),R===null?S=N:R.sibling=N,R=N,k=O}if(C.done)return n(h,k),Y&&Vn(h,b),S;if(k===null){for(;!C.done;b++,C=y.next())C=p(h,C.value,v),C!==null&&(m=o(C,m,b),R===null?S=C:R.sibling=C,R=C);return Y&&Vn(h,b),S}for(k=r(h,k);!C.done;b++,C=y.next())C=d(k,h,b,C.value,v),C!==null&&(e&&C.alternate!==null&&k.delete(C.key===null?b:C.key),m=o(C,m,b),R===null?S=C:R.sibling=C,R=C);return e&&k.forEach(function(ze){return t(h,ze)}),Y&&Vn(h,b),S}function w(h,m,y,v){if(typeof y=="object"&&y!==null&&y.type===Er&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case ks:e:{for(var S=y.key,R=m;R!==null;){if(R.key===S){if(S=y.type,S===Er){if(R.tag===7){n(h,R.sibling),m=i(R,y.props.children),m.return=h,h=m;break e}}else if(R.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===dn&&_m(S)===R.type){n(h,R.sibling),m=i(R,y.props),m.ref=zi(h,R,y),m.return=h,h=m;break e}n(h,R);break}else t(h,R);R=R.sibling}y.type===Er?(m=Qn(y.props.children,h.mode,v,y.key),m.return=h,h=m):(v=Qs(y.type,y.key,y.props,null,h.mode,v),v.ref=zi(h,m,y),v.return=h,h=v)}return s(h);case Sr:e:{for(R=y.key;m!==null;){if(m.key===R)if(m.tag===4&&m.stateNode.containerInfo===y.containerInfo&&m.stateNode.implementation===y.implementation){n(h,m.sibling),m=i(m,y.children||[]),m.return=h,h=m;break e}else{n(h,m);break}else t(h,m);m=m.sibling}m=Eu(y,h.mode,v),m.return=h,h=m}return s(h);case dn:return R=y._init,w(h,m,R(y._payload),v)}if($i(y))return g(h,m,y,v);if(Ai(y))return _(h,m,y,v);zs(h,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,m!==null&&m.tag===6?(n(h,m.sibling),m=i(m,y),m.return=h,h=m):(n(h,m),m=Su(y,h.mode,v),m.return=h,h=m),s(h)):n(h,m)}return w}var Vr=Hh(!0),Vh=Hh(!1),xo={},Nt=In(xo),fo=In(xo),po=In(xo);function Kn(e){if(e===xo)throw Error(E(174));return e}function Bc(e,t){switch(q(po,t),q(fo,e),q(Nt,xo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Lu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Lu(t,e)}J(Nt),q(Nt,t)}function Wr(){J(Nt),J(fo),J(po)}function Wh(e){Kn(po.current);var t=Kn(Nt.current),n=Lu(t,e.type);t!==n&&(q(fo,e),q(Nt,n))}function $c(e){fo.current===e&&(J(Nt),J(fo))}var te=In(0);function pl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var yu=[];function Hc(){for(var e=0;en?n:4,e(!0);var r=_u.transition;_u.transition={};try{e(!1),t()}finally{W=n,_u.transition=r}}function l0(){return lt().memoizedState}function jx(e,t,n){var r=En(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},a0(e))u0(t,n);else if(n=Fh(e,t,n,r),n!==null){var i=Le();wt(n,e,r,i),c0(n,t,r)}}function Fx(e,t,n){var r=En(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(a0(e))u0(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,l=o(s,n);if(i.hasEagerState=!0,i.eagerState=l,xt(l,s)){var c=t.interleaved;c===null?(i.next=i,Fc(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}n=Fh(e,t,i,r),n!==null&&(i=Le(),wt(n,e,r,i),c0(n,t,r))}}function a0(e){var t=e.alternate;return e===ne||t!==null&&t===ne}function u0(e,t){Qi=ml=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function c0(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,bc(e,n)}}var hl={readContext:st,useCallback:Re,useContext:Re,useEffect:Re,useImperativeHandle:Re,useInsertionEffect:Re,useLayoutEffect:Re,useMemo:Re,useReducer:Re,useRef:Re,useState:Re,useDebugValue:Re,useDeferredValue:Re,useTransition:Re,useMutableSource:Re,useSyncExternalStore:Re,useId:Re,unstable_isNewReconciler:!1},Ux={readContext:st,useCallback:function(e,t){return Tt().memoizedState=[e,t===void 0?null:t],e},useContext:st,useEffect:wm,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Gs(4194308,4,n0.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Gs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Gs(4,2,e,t)},useMemo:function(e,t){var n=Tt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Tt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=jx.bind(null,ne,e),[r.memoizedState,e]},useRef:function(e){var t=Tt();return e={current:e},t.memoizedState=e},useState:vm,useDebugValue:Kc,useDeferredValue:function(e){return Tt().memoizedState=e},useTransition:function(){var e=vm(!1),t=e[0];return e=zx.bind(null,e[1]),Tt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ne,i=Tt();if(Y){if(n===void 0)throw Error(E(407));n=n()}else{if(n=t(),he===null)throw Error(E(349));Yn&30||Kh(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,wm(Qh.bind(null,r,o,e),[e]),r.flags|=2048,go(9,qh.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Tt(),t=he.identifierPrefix;if(Y){var n=Wt,r=Vt;n=(r&~(1<<32-vt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=mo++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[Ct]=t,e[so]=r,c0(e,t,!1,!1),t.stateNode=e;e:{switch(l=Tu(n,r),n){case"dialog":q("cancel",e),q("close",e),i=r;break;case"iframe":case"object":case"embed":q("load",e),i=r;break;case"video":case"audio":for(i=0;iGr&&(t.flags|=128,r=!0,Mi(o,!1),t.lanes=4194304)}else{if(!r)if(e=fs(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Mi(o,!0),o.tail===null&&o.tailMode==="hidden"&&!l.alternate&&!Y)return Ee(t),null}else 2*le()-o.renderingStartTime>Gr&&n!==1073741824&&(t.flags|=128,r=!0,Mi(o,!1),t.lanes=4194304);o.isBackwards?(l.sibling=t.child,t.child=l):(n=o.last,n!==null?n.sibling=l:t.child=l,o.last=l)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=le(),t.sibling=null,n=te.current,Q(te,r?n&1|2:n&1),t):(Ee(t),null);case 22:case 23:return Qc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ge&1073741824&&(Ee(t),t.subtreeFlags&6&&(t.flags|=8192)):Ee(t),null;case 24:return null;case 25:return null}throw Error(E(156,t.tag))}function Mx(e,t){switch(Nc(t),t.tag){case 1:return Be(t.type)&&is(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vr(),J(Ue),J(Re),jc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Dc(t),null;case 13:if(J(te),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(E(340));$r()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return J(te),null;case 4:return Vr(),null;case 10:return Ac(t.type._context),null;case 22:case 23:return Qc(),null;case 24:return null;default:return null}}var Dl=!1,be=!1,zx=typeof WeakSet=="function"?WeakSet:Set,N=null;function Pr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){oe(e,t,r)}else n.current=null}function ic(e,t,n){try{n()}catch(r){oe(e,t,r)}}var wm=!1;function Dx(e,t){if(Bu=es,e=gh(),Cc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var l=0,s=-1,a=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||i!==0&&d.nodeType!==3||(s=l+i),d!==o||r!==0&&d.nodeType!==3||(a=l+r),d.nodeType===3&&(l+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++u===i&&(s=l),f===o&&++c===r&&(a=l),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=s===-1||a===-1?null:{start:s,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for($u={focusedElem:e,selectionRange:n},es=!1,N=t;N!==null;)if(t=N,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,N=e;else for(;N!==null;){t=N;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var _=g.memoizedProps,w=g.memoizedState,h=t.stateNode,m=h.getSnapshotBeforeUpdate(t.elementType===t.type?_:gt(t.type,_),w);h.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(E(163))}}catch(v){oe(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,N=e;break}N=t.return}return g=wm,wm=!1,g}function Ki(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&ic(t,n,o)}i=i.next}while(i!==r)}}function Cs(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function oc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function p0(e){var t=e.alternate;t!==null&&(e.alternate=null,p0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ct],delete t[so],delete t[Wu],delete t[vx],delete t[wx])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function m0(e){return e.tag===5||e.tag===3||e.tag===4}function xm(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||m0(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function lc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=rs));else if(r!==4&&(e=e.child,e!==null))for(lc(e,t,n),e=e.sibling;e!==null;)lc(e,t,n),e=e.sibling}function sc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(sc(e,t,n),e=e.sibling;e!==null;)sc(e,t,n),e=e.sibling}var ye=null,yt=!1;function un(e,t,n){for(n=n.child;n!==null;)h0(e,t,n),n=n.sibling}function h0(e,t,n){if(It&&typeof It.onCommitFiberUnmount=="function")try{It.onCommitFiberUnmount(vs,n)}catch{}switch(n.tag){case 5:be||Pr(n,t);case 6:var r=ye,i=yt;ye=null,un(e,t,n),ye=r,yt=i,ye!==null&&(yt?(e=ye,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ye.removeChild(n.stateNode));break;case 18:ye!==null&&(yt?(e=ye,n=n.stateNode,e.nodeType===8?cu(e.parentNode,n):e.nodeType===1&&cu(e,n),no(e)):cu(ye,n.stateNode));break;case 4:r=ye,i=yt,ye=n.stateNode.containerInfo,yt=!0,un(e,t,n),ye=r,yt=i;break;case 0:case 11:case 14:case 15:if(!be&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,l=o.destroy;o=o.tag,l!==void 0&&(o&2||o&4)&&ic(n,t,l),i=i.next}while(i!==r)}un(e,t,n);break;case 1:if(!be&&(Pr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){oe(n,t,s)}un(e,t,n);break;case 21:un(e,t,n);break;case 22:n.mode&1?(be=(r=be)||n.memoizedState!==null,un(e,t,n),be=r):un(e,t,n);break;default:un(e,t,n)}}function km(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new zx),t.forEach(function(r){var i=Gx.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function ht(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=l),r&=~o}if(r=i,r=le()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Fx(r/1960))-r,10e?16:e,hn===null)var r=!1;else{if(e=hn,hn=null,gs=0,B&6)throw Error(E(331));var i=B;for(B|=4,N=e.current;N!==null;){var o=N,l=o.child;if(N.flags&16){var s=o.deletions;if(s!==null){for(var a=0;ale()-Zc?Kn(e,0):Gc|=n),$e(e,t)}function S0(e,t){t===0&&(e.mode&1?(t=El,El<<=1,!(El&130023424)&&(El=4194304)):t=1);var n=Te();e=Gt(e,t),e!==null&&(ho(e,t,n),$e(e,n))}function Wx(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),S0(e,n)}function Gx(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(E(314))}r!==null&&r.delete(t),S0(e,n)}var E0;E0=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ue.current)Fe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Fe=!1,Ax(e,t,n);Fe=!!(e.flags&131072)}else Fe=!1,Y&&t.flags&1048576&&Ch(t,ss,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Wl(e,t),e=t.pendingProps;var i=Br(t,Re.current);jr(t,n),i=Uc(null,t,r,e,i,n);var o=Bc();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Be(r)?(o=!0,os(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Mc(t),i.updater=bs,t.stateNode=i,i._reactInternals=t,qu(t,r,e,n),t=ec(null,t,r,!0,o,n)):(t.tag=0,Y&&o&&Ic(t),Oe(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Wl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Kx(r),e=gt(r,e),i){case 0:t=Yu(null,t,r,e,n);break e;case 1:t=ym(null,t,r,e,n);break e;case 11:t=hm(null,t,r,e,n);break e;case 14:t=gm(null,t,r,gt(r.type,e),n);break e}throw Error(E(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gt(r,i),Yu(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gt(r,i),ym(e,t,r,i,n);case 3:e:{if(s0(t),e===null)throw Error(E(387));r=t.pendingProps,o=t.memoizedState,i=o.element,Th(e,t),cs(t,r,null,n);var l=t.memoizedState;if(r=l.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Wr(Error(E(423)),t),t=_m(e,t,r,n,i);break e}else if(r!==i){i=Wr(Error(E(424)),t),t=_m(e,t,r,n,i);break e}else for(Ze=vn(t.stateNode.containerInfo.firstChild),Ke=t,Y=!0,_t=null,n=Mh(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if($r(),r===i){t=Zt(e,t,n);break e}Oe(e,t,r,n)}t=t.child}return t;case 5:return zh(t),e===null&&Ku(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,l=i.children,Hu(r,i)?l=null:o!==null&&Hu(r,o)&&(t.flags|=32),l0(e,t),Oe(e,t,l,n),t.child;case 6:return e===null&&Ku(t),null;case 13:return a0(e,t,n);case 4:return zc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Hr(t,null,r,n):Oe(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gt(r,i),hm(e,t,r,i,n);case 7:return Oe(e,t,t.pendingProps,n),t.child;case 8:return Oe(e,t,t.pendingProps.children,n),t.child;case 12:return Oe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,l=i.value,Q(as,r._currentValue),r._currentValue=l,o!==null)if(xt(o.value,l)){if(o.children===i.children&&!Ue.current){t=Zt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){l=o.child;for(var a=s.firstContext;a!==null;){if(a.context===r){if(o.tag===1){a=Ht(-1,n&-n),a.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Qu(o.return,n,t),s.lanes|=n;break}a=a.next}}else if(o.tag===10)l=o.type===t.type?null:o.child;else if(o.tag===18){if(l=o.return,l===null)throw Error(E(341));l.lanes|=n,s=l.alternate,s!==null&&(s.lanes|=n),Qu(l,n,t),l=o.sibling}else l=o.child;if(l!==null)l.return=o;else for(l=o;l!==null;){if(l===t){l=null;break}if(o=l.sibling,o!==null){o.return=l.return,l=o;break}l=l.return}o=l}Oe(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,jr(t,n),i=lt(i),r=r(i),t.flags|=1,Oe(e,t,r,n),t.child;case 14:return r=t.type,i=gt(r,t.pendingProps),i=gt(r.type,i),gm(e,t,r,i,n);case 15:return i0(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gt(r,i),Wl(e,t),t.tag=1,Be(r)?(e=!0,os(t)):e=!1,jr(t,n),Ah(t,r,i),qu(t,r,i,n),ec(null,t,r,!0,e,n);case 19:return u0(e,t,n);case 22:return o0(e,t,n)}throw Error(E(156,t.tag))};function b0(e,t){return qm(e,t)}function Zx(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function it(e,t,n,r){return new Zx(e,t,n,r)}function qc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Kx(e){if(typeof e=="function")return qc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===gc)return 11;if(e===yc)return 14}return 2}function Sn(e,t){var n=e.alternate;return n===null?(n=it(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Kl(e,t,n,r,i,o){var l=2;if(r=e,typeof e=="function")qc(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case Sr:return Qn(n.children,i,o,t);case hc:l=8,i|=8;break;case xu:return e=it(12,n,t,i|2),e.elementType=xu,e.lanes=o,e;case ku:return e=it(13,n,t,i),e.elementType=ku,e.lanes=o,e;case Su:return e=it(19,n,t,i),e.elementType=Su,e.lanes=o,e;case Lm:return Ns(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Pm:l=10;break e;case Am:l=9;break e;case gc:l=11;break e;case yc:l=14;break e;case cn:l=16,r=null;break e}throw Error(E(130,e==null?e:typeof e,""))}return t=it(l,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Qn(e,t,n,r){return e=it(7,e,r,t),e.lanes=n,e}function Ns(e,t,n,r){return e=it(22,e,r,t),e.elementType=Lm,e.lanes=n,e.stateNode={isHidden:!1},e}function _u(e,t,n){return e=it(6,e,null,t),e.lanes=n,e}function vu(e,t,n){return t=it(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Qx(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=nu(0),this.expirationTimes=nu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nu(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Jc(e,t,n,r,i,o,l,s,a){return e=new Qx(e,t,n,s,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=it(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Mc(o),e}function Xx(e,t,n){var r=3{"use strict";function O0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(O0)}catch(e){console.error(e)}}O0(),T0.exports=N0()});var A0=ie(rf=>{"use strict";var P0=nf();rf.createRoot=P0.createRoot,rf.hydrateRoot=P0.hydrateRoot;var VC});var M0=ie(sf=>{"use strict";var nk=Symbol.for("react.fragment");sf.Fragment=nk;sf.jsxDEV=void 0});var D0=ie((t3,z0)=>{"use strict";z0.exports=M0()});var F0=ie(Ls=>{"use strict";var rk=ge(),ik=Symbol.for("react.element"),ok=Symbol.for("react.fragment"),lk=Object.prototype.hasOwnProperty,sk=rk.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ak={key:!0,ref:!0,__self:!0,__source:!0};function j0(e,t,n){var r,i={},o=null,l=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(l=t.ref);for(r in t)lk.call(t,r)&&!ak.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:ik,type:e,key:o,ref:l,props:i,_owner:sk.current}}Ls.Fragment=ok;Ls.jsx=j0;Ls.jsxs=j0});var G=ie((r3,U0)=>{"use strict";U0.exports=F0()});var xf=ie((V3,vg)=>{var gk="Expected a function",fg="__lodash_hash_undefined__",dg=1/0,yk="[object Function]",_k="[object GeneratorFunction]",vk="[object Symbol]",wk=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xk=/^\w*$/,kk=/^\./,Sk=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ek=/[\\^$.*+?()[\]{}|]/g,bk=/\\(\\)?/g,Rk=/^\[object .+?Constructor\]$/,Ck=typeof global=="object"&&global&&global.Object===Object&&global,Ik=typeof self=="object"&&self&&self.Object===Object&&self,yf=Ck||Ik||Function("return this")();function Nk(e,t){return e?.[t]}function Ok(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var Tk=Array.prototype,Pk=Function.prototype,pg=Object.prototype,gf=yf["__core-js_shared__"],sg=function(){var e=/[^.]+$/.exec(gf&&gf.keys&&gf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),mg=Pk.toString,_f=pg.hasOwnProperty,hg=pg.toString,Ak=RegExp("^"+mg.call(_f).replace(Ek,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ag=yf.Symbol,Lk=Tk.splice,Mk=gg(yf,"Map"),xo=gg(Object,"create"),ug=ag?ag.prototype:void 0,cg=ug?ug.toString:void 0;function ir(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1}function Wk(e,t){var n=this.__data__,r=Ds(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}qr.prototype.clear=Bk;qr.prototype.delete=$k;qr.prototype.get=Hk;qr.prototype.has=Vk;qr.prototype.set=Wk;function or(e){var t=-1,n=e?e.length:0;for(this.clear();++t{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.output=Ae.exists=Ae.hash=Ae.bytes=Ae.bool=Ae.number=void 0;function Fs(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}Ae.number=Fs;function Ig(e){if(typeof e!="boolean")throw new Error(`Expected boolean, not ${e}`)}Ae.bool=Ig;function dS(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function Sf(e,...t){if(!dS(e))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}Ae.bytes=Sf;function Ng(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Fs(e.outputLen),Fs(e.blockLen)}Ae.hash=Ng;function Og(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}Ae.exists=Og;function Tg(e,t){Sf(e);let n=t.outputLen;if(e.length{"use strict";Object.defineProperty(A,"__esModule",{value:!0});A.add5L=A.add5H=A.add4H=A.add4L=A.add3H=A.add3L=A.add=A.rotlBL=A.rotlBH=A.rotlSL=A.rotlSH=A.rotr32L=A.rotr32H=A.rotrBL=A.rotrBH=A.rotrSL=A.rotrSH=A.shrSL=A.shrSH=A.toBig=A.split=A.fromBig=void 0;var Us=BigInt(2**32-1),Ef=BigInt(32);function bf(e,t=!1){return t?{h:Number(e&Us),l:Number(e>>Ef&Us)}:{h:Number(e>>Ef&Us)|0,l:Number(e&Us)|0}}A.fromBig=bf;function Ag(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let i=0;iBigInt(e>>>0)<>>0);A.toBig=Lg;var Mg=(e,t,n)=>e>>>n;A.shrSH=Mg;var zg=(e,t,n)=>e<<32-n|t>>>n;A.shrSL=zg;var Dg=(e,t,n)=>e>>>n|t<<32-n;A.rotrSH=Dg;var jg=(e,t,n)=>e<<32-n|t>>>n;A.rotrSL=jg;var Fg=(e,t,n)=>e<<64-n|t>>>n-32;A.rotrBH=Fg;var Ug=(e,t,n)=>e>>>n-32|t<<64-n;A.rotrBL=Ug;var Bg=(e,t)=>t;A.rotr32H=Bg;var $g=(e,t)=>e;A.rotr32L=$g;var Hg=(e,t,n)=>e<>>32-n;A.rotlSH=Hg;var Vg=(e,t,n)=>t<>>32-n;A.rotlSL=Vg;var Wg=(e,t,n)=>t<>>64-n;A.rotlBH=Wg;var Gg=(e,t,n)=>e<>>64-n;A.rotlBL=Gg;function Zg(e,t,n,r){let i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:i|0}}A.add=Zg;var Kg=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0);A.add3L=Kg;var Qg=(e,t,n,r)=>t+n+r+(e/2**32|0)|0;A.add3H=Qg;var Xg=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0);A.add4L=Xg;var qg=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0;A.add4H=qg;var Jg=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0);A.add5L=Jg;var Yg=(e,t,n,r,i,o)=>t+n+r+i+o+(e/2**32|0)|0;A.add5H=Yg;var mS={fromBig:bf,split:Ag,toBig:Lg,shrSH:Mg,shrSL:zg,rotrSH:Dg,rotrSL:jg,rotrBH:Fg,rotrBL:Ug,rotr32H:Bg,rotr32L:$g,rotlSH:Hg,rotlSL:Vg,rotlBH:Wg,rotlBL:Gg,add:Zg,add3L:Kg,add3H:Qg,add4L:Xg,add4H:qg,add5H:Yg,add5L:Jg};A.default=mS});var ty=ie(Bs=>{"use strict";Object.defineProperty(Bs,"__esModule",{value:!0});Bs.crypto=void 0;Bs.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0});var iy=ie(z=>{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.randomBytes=z.wrapXOFConstructorWithOpts=z.wrapConstructorWithOpts=z.wrapConstructor=z.checkOpts=z.Hash=z.concatBytes=z.toBytes=z.utf8ToBytes=z.asyncLoop=z.nextTick=z.hexToBytes=z.bytesToHex=z.isLE=z.rotr=z.createView=z.u32=z.u8=void 0;var Rf=ty(),hS=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength);z.u8=hS;var gS=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));z.u32=gS;function If(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}var yS=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);z.createView=yS;var _S=(e,t)=>e<<32-t|e>>>t;z.rotr=_S;z.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!z.isLE)throw new Error("Non little-endian hardware is not supported");var vS=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function wS(e){if(!If(e))throw new Error("Uint8Array expected");let t="";for(let n=0;n=Jt._0&&e<=Jt._9)return e-Jt._0;if(e>=Jt._A&&e<=Jt._F)return e-(Jt._A-10);if(e>=Jt._a&&e<=Jt._f)return e-(Jt._a-10)}function xS(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);let t=e.length,n=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);let r=new Uint8Array(n);for(let i=0,o=0;i{};z.nextTick=kS;async function SS(e,t,n){let r=Date.now();for(let i=0;i=0&&oe().update($s(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}z.wrapConstructor=CS;function IS(e){let t=(r,i)=>e(i).update($s(r)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}z.wrapConstructorWithOpts=IS;function NS(e){let t=(r,i)=>e(i).update($s(r)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}z.wrapXOFConstructorWithOpts=NS;function OS(e=32){if(Rf.crypto&&typeof Rf.crypto.getRandomValues=="function")return Rf.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}z.randomBytes=OS});var dy=ie(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.shake256=X.shake128=X.keccak_512=X.keccak_384=X.keccak_256=X.keccak_224=X.sha3_512=X.sha3_384=X.sha3_256=X.sha3_224=X.Keccak=X.keccakP=void 0;var Yr=Pg(),bo=ey(),Eo=iy(),[sy,ay,uy]=[[],[],[]],TS=BigInt(0),So=BigInt(1),PS=BigInt(2),AS=BigInt(7),LS=BigInt(256),MS=BigInt(113);for(let e=0,t=So,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],sy.push(2*(5*r+n)),ay.push((e+1)*(e+2)/2%64);let i=TS;for(let o=0;o<7;o++)t=(t<>AS)*MS)%LS,t&PS&&(i^=So<<(So<n>32?(0,bo.rotlBH)(e,t,n):(0,bo.rotlSH)(e,t,n),ly=(e,t,n)=>n>32?(0,bo.rotlBL)(e,t,n):(0,bo.rotlSL)(e,t,n);function cy(e,t=24){let n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let l=0;l<10;l++)n[l]=e[l]^e[l+10]^e[l+20]^e[l+30]^e[l+40];for(let l=0;l<10;l+=2){let s=(l+8)%10,a=(l+2)%10,u=n[a],c=n[a+1],d=oy(u,c,1)^n[s],f=ly(u,c,1)^n[s+1];for(let p=0;p<50;p+=10)e[l+p]^=d,e[l+p+1]^=f}let i=e[2],o=e[3];for(let l=0;l<24;l++){let s=ay[l],a=oy(i,o,s),u=ly(i,o,s),c=sy[l];i=e[c],o=e[c+1],e[c]=a,e[c+1]=u}for(let l=0;l<50;l+=10){for(let s=0;s<10;s++)n[s]=e[l+s];for(let s=0;s<10;s++)e[l+s]^=~n[(s+2)%10]&n[(s+4)%10]}e[0]^=zS[r],e[1]^=DS[r]}n.fill(0)}X.keccakP=cy;var Ro=class e extends Eo.Hash{constructor(t,n,r,i=!1,o=24){if(super(),this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,Yr.number)(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,Eo.u32)(this.state)}keccak(){cy(this.state32,this.rounds),this.posOut=0,this.pos=0}update(t){(0,Yr.exists)(this);let{blockLen:n,state:r}=this;t=(0,Eo.toBytes)(t);let i=t.length;for(let o=0;o=r&&this.keccak();let l=Math.min(r-this.posOut,o-i);t.set(n.subarray(this.posOut,this.posOut+l),i),this.posOut+=l,i+=l}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return(0,Yr.number)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,Yr.output)(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:n,suffix:r,outputLen:i,rounds:o,enableXOF:l}=this;return t||(t=new e(n,r,i,l,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=r,t.outputLen=i,t.enableXOF=l,t.destroyed=this.destroyed,t}};X.Keccak=Ro;var Pn=(e,t,n)=>(0,Eo.wrapConstructor)(()=>new Ro(t,e,n));X.sha3_224=Pn(6,144,224/8);X.sha3_256=Pn(6,136,256/8);X.sha3_384=Pn(6,104,384/8);X.sha3_512=Pn(6,72,512/8);X.keccak_224=Pn(1,144,224/8);X.keccak_256=Pn(1,136,256/8);X.keccak_384=Pn(1,104,384/8);X.keccak_512=Pn(1,72,512/8);var fy=(e,t,n)=>(0,Eo.wrapXOFConstructorWithOpts)((r={})=>new Ro(t,e,r.dkLen===void 0?n:r.dkLen,!0));X.shake128=fy(31,168,128/8);X.shake256=fy(31,136,256/8)});var wy=ie((vI,An)=>{var{sha3_512:jS}=dy(),my=24,Co=32,Nf=(e=4,t=Math.random)=>{let n="";for(;n.lengthhy(jS(e)).toString(36).slice(1),py=Array.from({length:26},(e,t)=>String.fromCharCode(t+97)),FS=e=>py[Math.floor(e()*py.length)],yy=({globalObj:e=typeof global<"u"?global:typeof window<"u"?window:{},random:t=Math.random}={})=>{let n=Object.keys(e).toString(),r=n.length?n+Nf(Co,t):Nf(Co,t);return gy(r).substring(0,Co)},_y=e=>()=>e++,US=476782367,vy=({random:e=Math.random,counter:t=_y(Math.floor(e()*US)),length:n=my,fingerprint:r=yy({random:e})}={})=>function(){let o=FS(e),l=Date.now().toString(36),s=t().toString(36),a=Nf(n,e),u=`${l+a+s+r}`;return`${o+gy(u).substring(1,n)}`},BS=vy(),$S=(e,{minLength:t=2,maxLength:n=Co}={})=>{let r=e.length,i=/^[0-9a-z]+$/;try{if(typeof e=="string"&&r>=t&&r<=n&&i.test(e))return!0}finally{}return!1};An.exports.getConstants=()=>({defaultLength:my,bigLength:Co});An.exports.init=vy;An.exports.createId=BS;An.exports.bufToBigInt=hy;An.exports.createCounter=_y;An.exports.createFingerprint=yy;An.exports.isCuid=$S});var Hs=ie((wI,Io)=>{var{createId:HS,init:VS,getConstants:WS,isCuid:GS}=wy();Io.exports.createId=HS;Io.exports.init=VS;Io.exports.getConstants=WS;Io.exports.isCuid=GS});var Uy=ie((To,ea)=>{(function(e,t){"use strict";var n="1.0.37",r="",i="?",o="function",l="undefined",s="object",a="string",u="major",c="model",d="name",f="type",p="vendor",g="version",_="architecture",w="console",h="mobile",m="tablet",y="smarttv",v="wearable",S="embedded",R=500,k="Amazon",b="Apple",O="ASUS",C="BlackBerry",T="Browser",De="Chrome",ll="Edge",Dt="Firefox",jt="Google",Vd="Huawei",Oa="LG",Ta="Microsoft",Wd="Motorola",sl="Opera",al="Samsung",Gd="Sharp",ul="Sony",Pa="Xiaomi",Aa="Zebra",Zd="Facebook",Kd="Chromium OS",Qd="Mac OS",I1=function(F,V){var M={};for(var Z in F)V[Z]&&V[Z].length%2===0?M[Z]=V[Z].concat(F[Z]):M[Z]=F[Z];return M},cl=function(F){for(var V={},M=0;M0?H.length===2?typeof H[1]==o?this[H[0]]=H[1].call(this,St):this[H[0]]=H[1]:H.length===3?typeof H[1]===o&&!(H[1].exec&&H[1].test)?this[H[0]]=St?H[1].call(this,St,H[2]):t:this[H[0]]=St?St.replace(H[1],H[2]):t:H.length===4&&(this[H[0]]=St?H[3].call(this,St.replace(H[1],H[2])):t):this[H]=St||t;M+=2}},Ma=function(F,V){for(var M in V)if(typeof V[M]===s&&V[M].length>0){for(var Z=0;Z2&&(L[c]="iPad",L[f]=m),L},this.getEngine=function(){var L={};return L[d]=t,L[g]=t,bi.call(L,Z,kt.engine),L},this.getOS=function(){var L={};return L[d]=t,L[g]=t,bi.call(L,Z,kt.os),H&&!L[d]&&sn&&sn.platform!="Unknown"&&(L[d]=sn.platform.replace(/chrome os/i,Kd).replace(/macos/i,Qd)),L},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return Z},this.setUA=function(L){return Z=typeof L===a&&L.length>R?La(L,R):L,this},this.setUA(Z),this};We.VERSION=n,We.BROWSER=cl([d,g,u]),We.CPU=cl([_]),We.DEVICE=cl([c,p,f,w,h,y,m,v,S]),We.ENGINE=We.OS=cl([d,g]),typeof To!==l?(typeof ea!==l&&ea.exports&&(To=ea.exports=We),To.UAParser=We):typeof define===o&&define.amd?define(function(){return We}):typeof e!==l&&(e.UAParser=We);var _r=typeof e!==l&&(e.jQuery||e.Zepto);if(_r&&!_r.ua){var fl=new We;_r.ua=fl.getResult(),_r.ua.get=function(){return fl.getUA()},_r.ua.set=function(F){fl.setUA(F);var V=fl.getResult();for(var M in V)_r.ua[M]=V[M]}}})(typeof window=="object"?window:To)});var $_=ie((QP,B_)=>{var o2=1/0,l2="[object Symbol]",s2=/^\s+|\s+$/g,cd="\\ud800-\\udfff",O_="\\u0300-\\u036f\\ufe20-\\ufe23",T_="\\u20d0-\\u20f0",P_="\\ufe0e\\ufe0f",a2="["+cd+"]",ad="["+O_+T_+"]",ud="\\ud83c[\\udffb-\\udfff]",u2="(?:"+ad+"|"+ud+")",A_="[^"+cd+"]",L_="(?:\\ud83c[\\udde6-\\uddff]){2}",M_="[\\ud800-\\udbff][\\udc00-\\udfff]",z_="\\u200d",D_=u2+"?",j_="["+P_+"]?",c2="(?:"+z_+"(?:"+[A_,L_,M_].join("|")+")"+j_+D_+")*",f2=j_+D_+c2,d2="(?:"+[A_+ad+"?",ad,L_,M_,a2].join("|")+")",p2=RegExp(ud+"(?="+ud+")|"+d2+f2,"g"),m2=RegExp("["+z_+cd+O_+T_+P_+"]"),h2=typeof global=="object"&&global&&global.Object===Object&&global,g2=typeof self=="object"&&self&&self.Object===Object&&self,y2=h2||g2||Function("return this")();function _2(e){return e.split("")}function v2(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o-1;);return n}function k2(e,t){for(var n=e.length;n--&&F_(t,e[n],0)>-1;);return n}function S2(e){return m2.test(e)}function R_(e){return S2(e)?E2(e):_2(e)}function E2(e){return e.match(p2)||[]}var b2=Object.prototype,R2=b2.toString,C_=y2.Symbol,I_=C_?C_.prototype:void 0,N_=I_?I_.toString:void 0;function C2(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r=r?e:C2(e,t,n)}function N2(e){return!!e&&typeof e=="object"}function O2(e){return typeof e=="symbol"||N2(e)&&R2.call(e)==l2}function T2(e){return e==null?"":U_(e)}function P2(e,t,n){if(e=T2(e),e&&(n||t===void 0))return e.replace(s2,"");if(!e||!(t=U_(t)))return e;var r=R_(e),i=R_(t),o=x2(r,i),l=k2(r,i)+1;return I2(r,o,l).join("")}B_.exports=P2});var Q_=ie((rA,K_)=>{"use strict";function M2(e,t){for(;e.length{let[,r]=(0,Qr.useState)({}),o=(0,Qr.useRef)({data:e,deps:n||[],ready:!1,_loading:{},lastRender:0,lastRenderCount:0}).current;if((0,Qr.useEffect)(()=>{o.ready=!0,t&&t({init:!0})},[]),o.ready===!1)o._loading={},o.data.render=()=>{if(o.ready){if(Date.now()-o.lastRender<300?o.lastRenderCount++:o.lastRenderCount=0,o.lastRenderCount>300)throw new Error("local.render more than 300 times in less than 300ms");o.lastRender=Date.now(),r({})}};else if(o.deps.length>0&&n){for(let[l,s]of Object.entries(n))if(o.deps[l]!==s){o.deps[l]=s,t&&setTimeout(()=>{t({init:!1})});break}}return o.data};var L0=(e,t)=>new Promise(async n=>{if(typeof e=="function"){let r=null;if(t&&(r=setTimeout(n,t)),await e()){clearTimeout(r),n();return}let i=0,o=setInterval(async()=>{await e()&&(r&&clearTimeout(r),clearInterval(o),n()),i>100&&clearInterval(o)},10)}else typeof e=="number"&&setTimeout(()=>{n()},e)});var tk=P(ge());var Qt=P(ge());function of(e){let t=new WeakMap;function n(r,i=[]){if(!(r!==null&&typeof r=="object"))return r;let o=t.get(r);if(o)return`[Circular *${o.join(".")}]`;t.set(r,i);let l=Array.isArray(r)?[]:{};for(let[s,a]of Object.entries(r))l[s]=n(a,[...i,s]);return t.delete(r),l}return n(e)}var lf=(0,Qt.createContext)({global:{},render:()=>{}});var On=(e,t)=>{let n=(0,Qt.useContext)(lf),{global:r,render:i}=n;r[t]||(r[t]=e),(0,Qt.useEffect)(()=>{let l=null;return()=>{typeof l=="function"?l():l instanceof Promise&&l.then(s=>{typeof s=="function"&&s()})}},[]);let o=r[t];return o&&(o.render=l=>{l&&(r[t]=void 0),(0,Qt.startTransition)(i)}),o},Xr=of;var f3=P(ge());var af=P(ge()),B0=P(nf()),$0=P(D0()),H0=P(G()),V0=()=>{let e=typeof window=="object"?window:globalThis;e.React=af.default,e.ReactDOM=B0.default,e.JSXRuntime=H0.default,e.JSXDevRuntime=$0.default,e.Fragment=af.default.Fragment};var uk={data:""},G0=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||uk,Z0=e=>{let t=G0(e),n=t.data;return t.data="",n},ck=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,fk=/\/\*[^]*?\*\/| +/g,W0=/\n+/g,rr=(e,t)=>{let n="",r="",i="";for(let o in e){let l=e[o];o[0]=="@"?o[1]=="i"?n=o+" "+l+";":r+=o[1]=="f"?rr(l,o):o+"{"+rr(l,o[1]=="k"?"":t)+"}":typeof l=="object"?r+=rr(l,t?t.replace(/([^,])+/g,s=>o.replace(/(^:.*)|([^,])+/g,a=>/&/.test(a)?a.replace(/&/g,s):s?s+" "+a:a)):o):l!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=rr.p?rr.p(o,l):o+":"+l+";")}return n+(t&&i?t+"{"+i+"}":i)+r},Xt={},K0=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+K0(e[n]);return t}return e},dk=(e,t,n,r,i)=>{let o=K0(e),l=Xt[o]||(Xt[o]=(a=>{let u=0,c=11;for(;u>>0;return"go"+c})(o));if(!Xt[l]){let a=o!==e?e:(u=>{let c,d,f=[{}];for(;c=ck.exec(u.replace(fk,""));)c[4]?f.shift():c[3]?(d=c[3].replace(W0," ").trim(),f.unshift(f[0][d]=f[0][d]||{})):f[0][c[1]]=c[2].replace(W0," ").trim();return f[0]})(e);Xt[l]=rr(i?{["@keyframes "+l]:a}:a,n?"":"."+l)}let s=n&&Xt.g?Xt.g:null;return n&&(Xt.g=Xt[l]),((a,u,c,d)=>{d?u.data=u.data.replace(d,a):u.data.indexOf(a)===-1&&(u.data=c?a+u.data:u.data+a)})(Xt[l],t,r,s),l},pk=(e,t,n)=>e.reduce((r,i,o)=>{let l=t[o];if(l&&l.call){let s=l(n),a=s&&s.props&&s.props.className||/^go/.test(s)&&s;l=a?"."+a:s&&typeof s=="object"?s.props?"":rr(s,""):s===!1?"":s}return r+i+(l??"")},"");function Ms(e){let t=this||{},n=e.call?e(t.p):e;return dk(n.unshift?n.raw?pk(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,G0(t.target),t.g,t.o,t.k)}var o3=Ms.bind({g:1}),l3=Ms.bind({k:1});var Q0=async(e=!0)=>{let t=typeof window=="object"?window:globalThis;e&&await L0(()=>t.__SRV_URL__),t.prasiContext={global:{},render(){}};let n=window.location,r=n.protocol.indexOf("http")===0?n.hostname:"localhost",i=n.protocol!="https:"||/localhost|127.0.0.1|0.0.0.0/.test(r)?"http":"https";if(t.__SRV_URL__){t.serverurl=t.__SRV_URL__;let l=new URL(t.serverurl);(l.hostname==="localhost"||l.hostname==="127.0.0.1")&&(l.hostname=n.hostname,l.pathname=l.pathname==="/"?"":l.pathname,t.serverurl=l.toString(),t.serverurl.endsWith("/")&&(t.serverurl=t.serverurl.substring(0,t.serverurl.length-1)))}let o=n.port;t.baseurl=i+"://"+r+(o?":"+o:"")+"/",t.basepath||(t.basepath="/"),t.css=Ms,t.extractCss=Z0,t.pathname=n.pathname,t.cx=(...l)=>{let s=[];return l.filter(a=>a?(typeof a=="string"&&a.trim(),!0):!1).forEach(a=>{if(Array.isArray(a))for(let u of a)typeof u=="string"&&u.trim()&&s.push(u.trim());else s.push(a.trim())}),s.join(" ")},t.navigate=l=>{let s=l;if(typeof t.navigateOverride=="function"&&(s=t.navigateOverride(l),!s))return null;history.pushState({prevUrl:window.location.href},"",s),t.pathname=l,t.prasiContext&&t.prasiContext.render&&t.prasiContext.render()},typeof window=="object"&&window.addEventListener("popstate",()=>{let l=navigator.serviceWorker.controller;if(l&&l.postMessage({type:"add-cache",url:n.href}),t.prasiContext.popState){t.prasiContext.popState();return}if(t.preventPopRender){t.preventPopRender=!1;return}t.prasiContext&&t.prasiContext.render&&(t.pathname=n.pathname,t.prasiContext.render())})};function cf(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function ff(e,t){let n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);let r=cf(n);return(i,o)=>r.then(l=>o(l.transaction(t,i).objectStore(t)))}var uf;function X0(){return uf||(uf=ff("keyval-store","keyval")),uf}function df(e,t=X0()){return t("readonly",n=>cf(n.get(e)))}function zs(e,t,n=X0()){return n("readwrite",r=>(r.put(t,e),cf(r.transaction)))}var E1=P(ge());var q0=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function mk(e){return typeof e=="string"&&q0.test(e)}var pf=mk;var vo=P(G()),mf=({children:e,back:t})=>(0,vo.jsxs)("div",{className:"flex items-center justify-center w-full h-full fixed inset-0 flex-col",children:[(0,vo.jsx)("div",{children:e}),(0,vo.jsxs)("div",{className:"border mt-2 rounded-md p-2 cursor-pointer",onClick:t||(()=>{history.back()}),children:[" ","Go Back"]})]});var Y0=P(ge());var Ce=P(G()),J0=window,wo=({children:e,className:t,show:n,backdrop:r,note:i,alt:o,pointer:l})=>{let s=Nn({icon:(0,Ce.jsx)("div",{className:"px-4 py-1",children:"Loading..."}),value:.111,ival:null},()=>{});return(0,Y0.useEffect)(()=>(s.ival=setInterval(()=>{s.value+=.1333,s.value>=1.3&&(s.value=0),s.render()},200),J0.loadingIcon&&(s.icon=(0,Ce.jsx)("img",{alt:"loading",src:J0.loadingIcon,className:css` +`+o.stack}return{value:e,source:t,stack:i,digest:null}}function xu(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function rc(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Hx=typeof WeakMap=="function"?WeakMap:Map;function f0(e,t,n){n=Gt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){yl||(yl=!0,pc=r),rc(e,t)},n}function d0(e,t,n){n=Gt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){rc(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){rc(e,t),typeof r!="function"&&(Sn===null?Sn=new Set([this]):Sn.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function xm(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Hx;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=rk.bind(null,e,t,n),t.then(e,e))}function km(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Sm(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Gt(-1,1),t.tag=2,kn(n,t,1))),n.lanes|=1),e)}var Vx=Xt.ReactCurrentOwner,Fe=!1;function Ae(e,t,n,r){t.child=e===null?Vh(t,null,n,r):Vr(t,e.child,n,r)}function Em(e,t,n,r,i){n=n.render;var o=t.ref;return Fr(t,i),r=Wc(e,t,n,r,o,i),n=Gc(),e!==null&&!Fe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Qt(e,t,i)):(Y&&n&&Ac(t),t.flags|=1,Ae(e,t,r,i),t.child)}function bm(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!nf(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,p0(e,t,o,r,i)):(e=Qs(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:lo,n(s,r)&&e.ref===t.ref)return Qt(e,t,i)}return t.flags|=1,e=bn(o,r),e.ref=t.ref,e.return=t,t.child=e}function p0(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(lo(o,r)&&e.ref===t.ref)if(Fe=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(Fe=!0);else return t.lanes=e.lanes,Qt(e,t,i)}return ic(e,t,n,r,i)}function m0(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},q(Lr,Ge),Ge|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,q(Lr,Ge),Ge|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,q(Lr,Ge),Ge|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,q(Lr,Ge),Ge|=r;return Ae(e,t,i,n),t.child}function h0(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ic(e,t,n,r,i){var o=Be(n)?Xn:Ie.current;return o=$r(t,o),Fr(t,i),n=Wc(e,t,n,r,o,i),r=Gc(),e!==null&&!Fe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Qt(e,t,i)):(Y&&r&&Ac(t),t.flags|=1,Ae(e,t,n,i),t.child)}function Rm(e,t,n,r,i){if(Be(n)){var o=!0;ll(t)}else o=!1;if(Fr(t,i),t.stateNode===null)Zs(e,t),$h(t,n,r),nc(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,l=t.memoizedProps;s.props=l;var c=s.context,a=n.contextType;typeof a=="object"&&a!==null?a=st(a):(a=Be(n)?Xn:Ie.current,a=$r(t,a));var u=n.getDerivedStateFromProps,p=typeof u=="function"||typeof s.getSnapshotBeforeUpdate=="function";p||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||c!==a)&&ym(t,s,r,a),pn=!1;var f=t.memoizedState;s.state=f,dl(t,r,s,i),c=t.memoizedState,l!==r||f!==c||Ue.current||pn?(typeof u=="function"&&(tc(t,n,u,r),c=t.memoizedState),(l=pn||gm(t,n,l,r,f,c,a))?(p||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),s.props=r,s.state=c,s.context=a,r=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,Uh(e,t),l=t.memoizedProps,a=t.type===t.elementType?l:gt(t.type,l),s.props=a,p=t.pendingProps,f=s.context,c=n.contextType,typeof c=="object"&&c!==null?c=st(c):(c=Be(n)?Xn:Ie.current,c=$r(t,c));var d=n.getDerivedStateFromProps;(u=typeof d=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==p||f!==c)&&ym(t,s,r,c),pn=!1,f=t.memoizedState,s.state=f,dl(t,r,s,i);var g=t.memoizedState;l!==p||f!==g||Ue.current||pn?(typeof d=="function"&&(tc(t,n,d,r),g=t.memoizedState),(a=pn||gm(t,n,a,r,f,g,c)||!1)?(u||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,g,c),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,g,c)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=g),s.props=r,s.state=g,s.context=c,r=a):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return oc(e,t,n,r,o,i)}function oc(e,t,n,r,i,o){h0(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&fm(t,n,!1),Qt(e,t,o);r=t.stateNode,Vx.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Vr(t,e.child,null,o),t.child=Vr(t,null,l,o)):Ae(e,t,l,o),t.memoizedState=r.state,i&&fm(t,n,!0),t.child}function g0(e){var t=e.stateNode;t.pendingContext?cm(e,t.pendingContext,t.pendingContext!==t.context):t.context&&cm(e,t.context,!1),Bc(e,t.containerInfo)}function Cm(e,t,n,r,i){return Hr(),Dc(i),t.flags|=256,Ae(e,t,n,r),t.child}var sc={dehydrated:null,treeContext:null,retryLane:0};function lc(e){return{baseLanes:e,cachePool:null,transitions:null}}function y0(e,t,n){var r=t.pendingProps,i=te.current,o=!1,s=(t.flags&128)!==0,l;if((l=s)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),q(te,i&1),e===null)return Yu(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,o?(r=t.mode,o=t.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=Nl(s,r,0,null),e=Qn(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=lc(n),t.memoizedState=sc,e):qc(t,s));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return Wx(e,t,s,r,l,i,n);if(o){o=r.fallback,s=t.mode,i=e.child,l=i.sibling;var c={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=bn(i,c),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?o=bn(l,o):(o=Qn(o,s,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,s=e.child.memoizedState,s=s===null?lc(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=sc,r}return o=e.child,e=o.sibling,r=bn(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function qc(e,t){return t=Nl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function js(e,t,n,r){return r!==null&&Dc(r),Vr(t,e.child,null,n),e=qc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Wx(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=xu(Error(E(422))),js(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Nl({mode:"visible",children:r.children},i,0,null),o=Qn(o,i,s,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Vr(t,e.child,null,s),t.child.memoizedState=lc(s),t.memoizedState=sc,o);if(!(t.mode&1))return js(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,o=Error(E(419)),r=xu(o,r,void 0),js(e,t,s,r)}if(l=(s&e.childLanes)!==0,Fe||l){if(r=he,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,qt(e,i),wt(r,e,i,-1))}return tf(),r=xu(Error(E(421))),js(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=ik.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Ze=xn(i.nextSibling),Ke=t,Y=!0,_t=null,e!==null&&(nt[rt++]=Vt,nt[rt++]=Wt,nt[rt++]=Jn,Vt=e.id,Wt=e.overflow,Jn=t),t=qc(t,r.children),t.flags|=4096,t)}function Tm(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ec(e.return,t,n)}function ku(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function _0(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Ae(e,t,r.children,n),r=te.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Tm(e,n,t);else if(e.tag===19)Tm(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(q(te,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&pl(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ku(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&pl(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ku(t,!0,n,null,o);break;case"together":ku(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Zs(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Qt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),er|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(E(153));if(t.child!==null){for(e=t.child,n=bn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=bn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Gx(e,t,n){switch(t.tag){case 3:g0(t),Hr();break;case 5:Wh(t);break;case 1:Be(t.type)&&ll(t);break;case 4:Bc(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;q(cl,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(q(te,te.current&1),t.flags|=128,null):n&t.child.childLanes?y0(e,t,n):(q(te,te.current&1),e=Qt(e,t,n),e!==null?e.sibling:null);q(te,te.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return _0(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),q(te,te.current),r)break;return null;case 22:case 23:return t.lanes=0,m0(e,t,n)}return Qt(e,t,n)}var v0,ac,w0,x0;v0=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};ac=function(){};w0=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Kn(Nt.current);var o=null;switch(n){case"input":i=Ou(e,i),r=Ou(e,r),o=[];break;case"select":i=re({},i,{value:void 0}),r=re({},r,{value:void 0}),o=[];break;case"textarea":i=Au(e,i),r=Au(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ol)}Du(n,r);var s;n=null;for(a in i)if(!r.hasOwnProperty(a)&&i.hasOwnProperty(a)&&i[a]!=null)if(a==="style"){var l=i[a];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else a!=="dangerouslySetInnerHTML"&&a!=="children"&&a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(eo.hasOwnProperty(a)?o||(o=[]):(o=o||[]).push(a,null));for(a in r){var c=r[a];if(l=i?.[a],r.hasOwnProperty(a)&&c!==l&&(c!=null||l!=null))if(a==="style")if(l){for(s in l)!l.hasOwnProperty(s)||c&&c.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in c)c.hasOwnProperty(s)&&l[s]!==c[s]&&(n||(n={}),n[s]=c[s])}else n||(o||(o=[]),o.push(a,n)),n=c;else a==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(o=o||[]).push(a,c)):a==="children"?typeof c!="string"&&typeof c!="number"||(o=o||[]).push(a,""+c):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&(eo.hasOwnProperty(a)?(c!=null&&a==="onScroll"&&X("scroll",e),o||l===c||(o=[])):(o=o||[]).push(a,c))}n&&(o=o||[]).push("style",n);var a=o;(t.updateQueue=a)&&(t.flags|=4)}};x0=function(e,t,n,r){n!==r&&(t.flags|=4)};function ji(e,t){if(!Y)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ce(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Zx(e,t,n){var r=t.pendingProps;switch(Lc(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ce(t),null;case 1:return Be(t.type)&&sl(),Ce(t),null;case 3:return r=t.stateNode,Wr(),J(Ue),J(Ie),Hc(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ms(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,_t!==null&&(gc(_t),_t=null))),ac(e,t),Ce(t),null;case 5:$c(t);var i=Kn(po.current);if(n=t.type,e!==null&&t.stateNode!=null)w0(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(E(166));return Ce(t),null}if(e=Kn(Nt.current),Ms(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[It]=t,r[co]=o,e=(t.mode&1)!==0,n){case"dialog":X("cancel",r),X("close",r);break;case"iframe":case"object":case"embed":X("load",r);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[It]=t,e[co]=r,v0(e,t,!1,!1),t.stateNode=e;e:{switch(s=Mu(n,r),n){case"dialog":X("cancel",e),X("close",e),i=r;break;case"iframe":case"object":case"embed":X("load",e),i=r;break;case"video":case"audio":for(i=0;iZr&&(t.flags|=128,r=!0,ji(o,!1),t.lanes=4194304)}else{if(!r)if(e=pl(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ji(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Y)return Ce(t),null}else 2*se()-o.renderingStartTime>Zr&&n!==1073741824&&(t.flags|=128,r=!0,ji(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=se(),t.sibling=null,n=te.current,q(te,r?n&1|2:n&1),t):(Ce(t),null);case 22:case 23:return ef(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ge&1073741824&&(Ce(t),t.subtreeFlags&6&&(t.flags|=8192)):Ce(t),null;case 24:return null;case 25:return null}throw Error(E(156,t.tag))}function Kx(e,t){switch(Lc(t),t.tag){case 1:return Be(t.type)&&sl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wr(),J(Ue),J(Ie),Hc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return $c(t),null;case 13:if(J(te),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(E(340));Hr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return J(te),null;case 4:return Wr(),null;case 10:return jc(t.type._context),null;case 22:case 23:return ef(),null;case 24:return null;default:return null}}var Fs=!1,Te=!1,qx=typeof WeakSet=="function"?WeakSet:Set,I=null;function Ar(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){oe(e,t,r)}else n.current=null}function uc(e,t,n){try{n()}catch(r){oe(e,t,r)}}var Im=!1;function Qx(e,t){if(Gu=nl,e=bh(),Pc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,l=-1,c=-1,a=0,u=0,p=e,f=null;t:for(;;){for(var d;p!==n||i!==0&&p.nodeType!==3||(l=s+i),p!==o||r!==0&&p.nodeType!==3||(c=s+r),p.nodeType===3&&(s+=p.nodeValue.length),(d=p.firstChild)!==null;)f=p,p=d;for(;;){if(p===e)break t;if(f===n&&++a===i&&(l=s),f===o&&++u===r&&(c=s),(d=p.nextSibling)!==null)break;p=f,f=p.parentNode}p=d}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Zu={focusedElem:e,selectionRange:n},nl=!1,I=t;I!==null;)if(t=I,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,I=e;else for(;I!==null;){t=I;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var _=g.memoizedProps,w=g.memoizedState,h=t.stateNode,m=h.getSnapshotBeforeUpdate(t.elementType===t.type?_:gt(t.type,_),w);h.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(E(163))}}catch(v){oe(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,I=e;break}I=t.return}return g=Im,Im=!1,g}function Xi(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&uc(t,n,o)}i=i.next}while(i!==r)}}function Il(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function cc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function k0(e){var t=e.alternate;t!==null&&(e.alternate=null,k0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[It],delete t[co],delete t[Qu],delete t[Px],delete t[Ax])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function S0(e){return e.tag===5||e.tag===3||e.tag===4}function Om(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||S0(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function fc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ol));else if(r!==4&&(e=e.child,e!==null))for(fc(e,t,n),e=e.sibling;e!==null;)fc(e,t,n),e=e.sibling}function dc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(dc(e,t,n),e=e.sibling;e!==null;)dc(e,t,n),e=e.sibling}var ve=null,yt=!1;function fn(e,t,n){for(n=n.child;n!==null;)E0(e,t,n),n=n.sibling}function E0(e,t,n){if(Ot&&typeof Ot.onCommitFiberUnmount=="function")try{Ot.onCommitFiberUnmount(xl,n)}catch{}switch(n.tag){case 5:Te||Ar(n,t);case 6:var r=ve,i=yt;ve=null,fn(e,t,n),ve=r,yt=i,ve!==null&&(yt?(e=ve,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ve.removeChild(n.stateNode));break;case 18:ve!==null&&(yt?(e=ve,n=n.stateNode,e.nodeType===8?hu(e.parentNode,n):e.nodeType===1&&hu(e,n),oo(e)):hu(ve,n.stateNode));break;case 4:r=ve,i=yt,ve=n.stateNode.containerInfo,yt=!0,fn(e,t,n),ve=r,yt=i;break;case 0:case 11:case 14:case 15:if(!Te&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&uc(n,t,s),i=i.next}while(i!==r)}fn(e,t,n);break;case 1:if(!Te&&(Ar(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){oe(n,t,l)}fn(e,t,n);break;case 21:fn(e,t,n);break;case 22:n.mode&1?(Te=(r=Te)||n.memoizedState!==null,fn(e,t,n),Te=r):fn(e,t,n);break;default:fn(e,t,n)}}function Nm(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new qx),t.forEach(function(r){var i=ok.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function ht(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=se()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Jx(r/1960))-r,10e?16:e,yn===null)var r=!1;else{if(e=yn,yn=null,_l=0,B&6)throw Error(E(331));var i=B;for(B|=4,I=e.current;I!==null;){var o=I,s=o.child;if(I.flags&16){var l=o.deletions;if(l!==null){for(var c=0;cse()-Jc?qn(e,0):Xc|=n),$e(e,t)}function P0(e,t){t===0&&(e.mode&1?(t=Rs,Rs<<=1,!(Rs&130023424)&&(Rs=4194304)):t=1);var n=Le();e=qt(e,t),e!==null&&(_o(e,t,n),$e(e,n))}function ik(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),P0(e,n)}function ok(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(E(314))}r!==null&&r.delete(t),P0(e,n)}var A0;A0=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ue.current)Fe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Fe=!1,Gx(e,t,n);Fe=!!(e.flags&131072)}else Fe=!1,Y&&t.flags&1048576&&Mh(t,ul,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Zs(e,t),e=t.pendingProps;var i=$r(t,Ie.current);Fr(t,n),i=Wc(null,t,r,e,i,n);var o=Gc();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Be(r)?(o=!0,ll(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Uc(t),i.updater=Cl,t.stateNode=i,i._reactInternals=t,nc(t,r,e,n),t=oc(null,t,r,!0,o,n)):(t.tag=0,Y&&o&&Ac(t),Ae(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Zs(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=lk(r),e=gt(r,e),i){case 0:t=ic(null,t,r,e,n);break e;case 1:t=Rm(null,t,r,e,n);break e;case 11:t=Em(null,t,r,e,n);break e;case 14:t=bm(null,t,r,gt(r.type,e),n);break e}throw Error(E(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gt(r,i),ic(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gt(r,i),Rm(e,t,r,i,n);case 3:e:{if(g0(t),e===null)throw Error(E(387));r=t.pendingProps,o=t.memoizedState,i=o.element,Uh(e,t),dl(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Gr(Error(E(423)),t),t=Cm(e,t,r,n,i);break e}else if(r!==i){i=Gr(Error(E(424)),t),t=Cm(e,t,r,n,i);break e}else for(Ze=xn(t.stateNode.containerInfo.firstChild),Ke=t,Y=!0,_t=null,n=Vh(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Hr(),r===i){t=Qt(e,t,n);break e}Ae(e,t,r,n)}t=t.child}return t;case 5:return Wh(t),e===null&&Yu(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,Ku(r,i)?s=null:o!==null&&Ku(r,o)&&(t.flags|=32),h0(e,t),Ae(e,t,s,n),t.child;case 6:return e===null&&Yu(t),null;case 13:return y0(e,t,n);case 4:return Bc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Vr(t,null,r,n):Ae(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gt(r,i),Em(e,t,r,i,n);case 7:return Ae(e,t,t.pendingProps,n),t.child;case 8:return Ae(e,t,t.pendingProps.children,n),t.child;case 12:return Ae(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,q(cl,r._currentValue),r._currentValue=s,o!==null)if(xt(o.value,s)){if(o.children===i.children&&!Ue.current){t=Qt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=Gt(-1,n&-n),c.tag=2;var a=o.updateQueue;if(a!==null){a=a.shared;var u=a.pending;u===null?c.next=c:(c.next=u.next,u.next=c),a.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),ec(o.return,n,t),l.lanes|=n;break}c=c.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(E(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),ec(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Ae(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Fr(t,n),i=st(i),r=r(i),t.flags|=1,Ae(e,t,r,n),t.child;case 14:return r=t.type,i=gt(r,t.pendingProps),i=gt(r.type,i),bm(e,t,r,i,n);case 15:return p0(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gt(r,i),Zs(e,t),t.tag=1,Be(r)?(e=!0,ll(t)):e=!1,Fr(t,n),$h(t,r,i),nc(t,r,i,n),oc(null,t,r,!0,e,n);case 19:return _0(e,t,n);case 22:return m0(e,t,n)}throw Error(E(156,t.tag))};function L0(e,t){return sh(e,t)}function sk(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function it(e,t,n,r){return new sk(e,t,n,r)}function nf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function lk(e){if(typeof e=="function")return nf(e)?1:0;if(e!=null){if(e=e.$$typeof,e===xc)return 11;if(e===kc)return 14}return 2}function bn(e,t){var n=e.alternate;return n===null?(n=it(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Qs(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")nf(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Er:return Qn(n.children,i,o,t);case wc:s=8,i|=8;break;case Ru:return e=it(12,n,t,i|2),e.elementType=Ru,e.lanes=o,e;case Cu:return e=it(13,n,t,i),e.elementType=Cu,e.lanes=o,e;case Tu:return e=it(19,n,t,i),e.elementType=Tu,e.lanes=o,e;case Hm:return Nl(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Bm:s=10;break e;case $m:s=9;break e;case xc:s=11;break e;case kc:s=14;break e;case dn:s=16,r=null;break e}throw Error(E(130,e==null?e:typeof e,""))}return t=it(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Qn(e,t,n,r){return e=it(7,e,r,t),e.lanes=n,e}function Nl(e,t,n,r){return e=it(22,e,r,t),e.elementType=Hm,e.lanes=n,e.stateNode={isHidden:!1},e}function Su(e,t,n){return e=it(6,e,null,t),e.lanes=n,e}function Eu(e,t,n){return t=it(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ak(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=lu(0),this.expirationTimes=lu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=lu(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function rf(e,t,n,r,i,o,s,l,c){return e=new ak(e,t,n,l,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=it(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Uc(o),e}function uk(e,t,n){var r=3{"use strict";function F0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(F0)}catch(e){console.error(e)}}F0(),U0.exports=j0()});var $0=ie(uf=>{"use strict";var B0=af();uf.createRoot=B0.createRoot,uf.hydrateRoot=B0.hydrateRoot;var _3});var V0=ie(df=>{"use strict";var hk=Symbol.for("react.fragment");df.Fragment=hk;df.jsxDEV=void 0});var G0=ie((I3,W0)=>{"use strict";W0.exports=V0()});var K0=ie(Ml=>{"use strict";var gk=_e(),yk=Symbol.for("react.element"),_k=Symbol.for("react.fragment"),vk=Object.prototype.hasOwnProperty,wk=gk.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,xk={key:!0,ref:!0,__self:!0,__source:!0};function Z0(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)vk.call(t,r)&&!xk.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:yk,type:e,key:o,ref:s,props:i,_owner:wk.current}}Ml.Fragment=_k;Ml.jsx=Z0;Ml.jsxs=Z0});var G=ie((N3,q0)=>{"use strict";q0.exports=K0()});var Rf=ie((_T,Tg)=>{var Ik="Expected a function",wg="__lodash_hash_undefined__",xg=1/0,Ok="[object Function]",Nk="[object GeneratorFunction]",Pk="[object Symbol]",Ak=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Lk=/^\w*$/,Dk=/^\./,Mk=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zk=/[\\^$.*+?()[\]{}|]/g,jk=/\\(\\)?/g,Fk=/^\[object .+?Constructor\]$/,Uk=typeof global=="object"&&global&&global.Object===Object&&global,Bk=typeof self=="object"&&self&&self.Object===Object&&self,kf=Uk||Bk||Function("return this")();function $k(e,t){return e?.[t]}function Hk(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var Vk=Array.prototype,Wk=Function.prototype,kg=Object.prototype,xf=kf["__core-js_shared__"],gg=function(){var e=/[^.]+$/.exec(xf&&xf.keys&&xf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Sg=Wk.toString,Sf=kg.hasOwnProperty,Eg=kg.toString,Gk=RegExp("^"+Sg.call(Sf).replace(zk,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),yg=kf.Symbol,Zk=Vk.splice,Kk=bg(kf,"Map"),Eo=bg(Object,"create"),_g=yg?yg.prototype:void 0,vg=_g?_g.toString:void 0;function or(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1}function iS(e,t){var n=this.__data__,r=Fl(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}Jr.prototype.clear=eS;Jr.prototype.delete=tS;Jr.prototype.get=nS;Jr.prototype.has=rS;Jr.prototype.set=iS;function sr(e){var t=-1,n=e?e.length:0;for(this.clear();++t{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.output=ke.exists=ke.hash=ke.bytes=ke.bool=ke.number=ke.isBytes=void 0;function Bl(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}ke.number=Bl;function zg(e){if(typeof e!="boolean")throw new Error(`boolean expected, not ${e}`)}ke.bool=zg;function jg(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}ke.isBytes=jg;function Tf(e,...t){if(!jg(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}ke.bytes=Tf;function Fg(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Bl(e.outputLen),Bl(e.blockLen)}ke.hash=Fg;function Ug(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}ke.exists=Ug;function Bg(e,t){Tf(e);let n=t.outputLen;if(e.length{"use strict";Object.defineProperty(L,"__esModule",{value:!0});L.add5L=L.add5H=L.add4H=L.add4L=L.add3H=L.add3L=L.add=L.rotlBL=L.rotlBH=L.rotlSL=L.rotlSH=L.rotr32L=L.rotr32H=L.rotrBL=L.rotrBH=L.rotrSL=L.rotrSH=L.shrSL=L.shrSH=L.toBig=L.split=L.fromBig=void 0;var $l=BigInt(2**32-1),Of=BigInt(32);function Nf(e,t=!1){return t?{h:Number(e&$l),l:Number(e>>Of&$l)}:{h:Number(e>>Of&$l)|0,l:Number(e&$l)|0}}L.fromBig=Nf;function $g(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let i=0;iBigInt(e>>>0)<>>0);L.toBig=Hg;var Vg=(e,t,n)=>e>>>n;L.shrSH=Vg;var Wg=(e,t,n)=>e<<32-n|t>>>n;L.shrSL=Wg;var Gg=(e,t,n)=>e>>>n|t<<32-n;L.rotrSH=Gg;var Zg=(e,t,n)=>e<<32-n|t>>>n;L.rotrSL=Zg;var Kg=(e,t,n)=>e<<64-n|t>>>n-32;L.rotrBH=Kg;var qg=(e,t,n)=>e>>>n-32|t<<64-n;L.rotrBL=qg;var Qg=(e,t)=>t;L.rotr32H=Qg;var Xg=(e,t)=>e;L.rotr32L=Xg;var Jg=(e,t,n)=>e<>>32-n;L.rotlSH=Jg;var Yg=(e,t,n)=>t<>>32-n;L.rotlSL=Yg;var ey=(e,t,n)=>t<>>64-n;L.rotlBH=ey;var ty=(e,t,n)=>e<>>64-n;L.rotlBL=ty;function ny(e,t,n,r){let i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:i|0}}L.add=ny;var ry=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0);L.add3L=ry;var iy=(e,t,n,r)=>t+n+r+(e/2**32|0)|0;L.add3H=iy;var oy=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0);L.add4L=oy;var sy=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0;L.add4H=sy;var ly=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0);L.add5L=ly;var ay=(e,t,n,r,i,o)=>t+n+r+i+o+(e/2**32|0)|0;L.add5H=ay;var RS={fromBig:Nf,split:$g,toBig:Hg,shrSH:Vg,shrSL:Wg,rotrSH:Gg,rotrSL:Zg,rotrBH:Kg,rotrBL:qg,rotr32H:Qg,rotr32L:Xg,rotlSH:Jg,rotlSL:Yg,rotlBH:ey,rotlBL:ty,add:ny,add3L:ry,add3H:iy,add4L:oy,add4H:sy,add5H:ay,add5L:ly};L.default=RS});var cy=ie(Hl=>{"use strict";Object.defineProperty(Hl,"__esModule",{value:!0});Hl.crypto=void 0;Hl.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0});var py=ie(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});A.randomBytes=A.wrapXOFConstructorWithOpts=A.wrapConstructorWithOpts=A.wrapConstructor=A.checkOpts=A.Hash=A.concatBytes=A.toBytes=A.utf8ToBytes=A.asyncLoop=A.nextTick=A.hexToBytes=A.bytesToHex=A.byteSwap32=A.byteSwapIfBE=A.byteSwap=A.isLE=A.rotl=A.rotr=A.createView=A.u32=A.u8=A.isBytes=void 0;var Pf=cy(),Lf=If();function CS(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}A.isBytes=CS;var TS=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength);A.u8=TS;var IS=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));A.u32=IS;var OS=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);A.createView=OS;var NS=(e,t)=>e<<32-t|e>>>t;A.rotr=NS;var PS=(e,t)=>e<>>32-t>>>0;A.rotl=PS;A.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;var AS=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255;A.byteSwap=AS;A.byteSwapIfBE=A.isLE?e=>e:e=>(0,A.byteSwap)(e);function LS(e){for(let t=0;tt.toString(16).padStart(2,"0"));function MS(e){(0,Lf.bytes)(e);let t="";for(let n=0;n=tn._0&&e<=tn._9)return e-tn._0;if(e>=tn._A&&e<=tn._F)return e-(tn._A-10);if(e>=tn._a&&e<=tn._f)return e-(tn._a-10)}function zS(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);let t=e.length,n=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);let r=new Uint8Array(n);for(let i=0,o=0;i{};A.nextTick=jS;async function FS(e,t,n){let r=Date.now();for(let i=0;i=0&&oe().update(Vl(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}A.wrapConstructor=HS;function VS(e){let t=(r,i)=>e(i).update(Vl(r)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}A.wrapConstructorWithOpts=VS;function WS(e){let t=(r,i)=>e(i).update(Vl(r)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}A.wrapXOFConstructorWithOpts=WS;function GS(e=32){if(Pf.crypto&&typeof Pf.crypto.getRandomValues=="function")return Pf.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}A.randomBytes=GS});var xy=ie(Q=>{"use strict";Object.defineProperty(Q,"__esModule",{value:!0});Q.shake256=Q.shake128=Q.keccak_512=Q.keccak_384=Q.keccak_256=Q.keccak_224=Q.sha3_512=Q.sha3_384=Q.sha3_256=Q.sha3_224=Q.Keccak=Q.keccakP=void 0;var ei=If(),Co=uy(),nn=py(),gy=[],yy=[],_y=[],ZS=BigInt(0),Ro=BigInt(1),KS=BigInt(2),qS=BigInt(7),QS=BigInt(256),XS=BigInt(113);for(let e=0,t=Ro,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],gy.push(2*(5*r+n)),yy.push((e+1)*(e+2)/2%64);let i=ZS;for(let o=0;o<7;o++)t=(t<>qS)*XS)%QS,t&KS&&(i^=Ro<<(Ro<n>32?(0,Co.rotlBH)(e,t,n):(0,Co.rotlSH)(e,t,n),hy=(e,t,n)=>n>32?(0,Co.rotlBL)(e,t,n):(0,Co.rotlSL)(e,t,n);function vy(e,t=24){let n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let s=0;s<10;s++)n[s]=e[s]^e[s+10]^e[s+20]^e[s+30]^e[s+40];for(let s=0;s<10;s+=2){let l=(s+8)%10,c=(s+2)%10,a=n[c],u=n[c+1],p=my(a,u,1)^n[l],f=hy(a,u,1)^n[l+1];for(let d=0;d<50;d+=10)e[s+d]^=p,e[s+d+1]^=f}let i=e[2],o=e[3];for(let s=0;s<24;s++){let l=yy[s],c=my(i,o,l),a=hy(i,o,l),u=gy[s];i=e[u],o=e[u+1],e[u]=c,e[u+1]=a}for(let s=0;s<50;s+=10){for(let l=0;l<10;l++)n[l]=e[s+l];for(let l=0;l<10;l++)e[s+l]^=~n[(l+2)%10]&n[(l+4)%10]}e[0]^=JS[r],e[1]^=YS[r]}n.fill(0)}Q.keccakP=vy;var To=class e extends nn.Hash{constructor(t,n,r,i=!1,o=24){if(super(),this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,ei.number)(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,nn.u32)(this.state)}keccak(){nn.isLE||(0,nn.byteSwap32)(this.state32),vy(this.state32,this.rounds),nn.isLE||(0,nn.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(t){(0,ei.exists)(this);let{blockLen:n,state:r}=this;t=(0,nn.toBytes)(t);let i=t.length;for(let o=0;o=r&&this.keccak();let s=Math.min(r-this.posOut,o-i);t.set(n.subarray(this.posOut,this.posOut+s),i),this.posOut+=s,i+=s}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return(0,ei.number)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,ei.output)(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:n,suffix:r,outputLen:i,rounds:o,enableXOF:s}=this;return t||(t=new e(n,r,i,s,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=r,t.outputLen=i,t.enableXOF=s,t.destroyed=this.destroyed,t}};Q.Keccak=To;var Ln=(e,t,n)=>(0,nn.wrapConstructor)(()=>new To(t,e,n));Q.sha3_224=Ln(6,144,224/8);Q.sha3_256=Ln(6,136,256/8);Q.sha3_384=Ln(6,104,384/8);Q.sha3_512=Ln(6,72,512/8);Q.keccak_224=Ln(1,144,224/8);Q.keccak_256=Ln(1,136,256/8);Q.keccak_384=Ln(1,104,384/8);Q.keccak_512=Ln(1,72,512/8);var wy=(e,t,n)=>(0,nn.wrapXOFConstructorWithOpts)((r={})=>new To(t,e,r.dkLen===void 0?n:r.dkLen,!0));Q.shake128=wy(31,168,128/8);Q.shake256=wy(31,136,256/8)});var Iy=ie((ZT,Dn)=>{var{sha3_512:eE}=xy(),Sy=24,Io=32,Df=(e=4,t=Math.random)=>{let n="";for(;n.lengthEy(eE(e)).toString(36).slice(1),ky=Array.from({length:26},(e,t)=>String.fromCharCode(t+97)),tE=e=>ky[Math.floor(e()*ky.length)],Ry=({globalObj:e=typeof global<"u"?global:typeof window<"u"?window:{},random:t=Math.random}={})=>{let n=Object.keys(e).toString(),r=n.length?n+Df(Io,t):Df(Io,t);return by(r).substring(0,Io)},Cy=e=>()=>e++,nE=476782367,Ty=({random:e=Math.random,counter:t=Cy(Math.floor(e()*nE)),length:n=Sy,fingerprint:r=Ry({random:e})}={})=>function(){let o=tE(e),s=Date.now().toString(36),l=t().toString(36),c=Df(n,e),a=`${s+c+l+r}`;return`${o+by(a).substring(1,n)}`},rE=Ty(),iE=(e,{minLength:t=2,maxLength:n=Io}={})=>{let r=e.length,i=/^[0-9a-z]+$/;try{if(typeof e=="string"&&r>=t&&r<=n&&i.test(e))return!0}finally{}return!1};Dn.exports.getConstants=()=>({defaultLength:Sy,bigLength:Io});Dn.exports.init=Ty;Dn.exports.createId=rE;Dn.exports.bufToBigInt=Ey;Dn.exports.createCounter=Cy;Dn.exports.createFingerprint=Ry;Dn.exports.isCuid=iE});var Wl=ie((KT,Oo)=>{var{createId:oE,init:sE,getConstants:lE,isCuid:aE}=Iy();Oo.exports.createId=oE;Oo.exports.init=sE;Oo.exports.getConstants=lE;Oo.exports.isCuid=aE});var qy=ie((Ao,na)=>{(function(e,t){"use strict";var n="1.0.38",r="",i="?",o="function",s="undefined",l="object",c="string",a="major",u="model",p="name",f="type",d="vendor",g="version",_="architecture",w="console",h="mobile",m="tablet",y="smarttv",v="wearable",S="embedded",R=500,k="Amazon",b="Apple",O="ASUS",C="BlackBerry",N="Browser",ze="Chrome",us="Edge",Ft="Firefox",Ut="Google",Yd="Huawei",Da="LG",Ma="Microsoft",ep="Motorola",Ri="Opera",cs="Samsung",tp="Sharp",fs="Sony",za="Xiaomi",ja="Zebra",np="Facebook",rp="Chromium OS",ip="Mac OS",B1=function(F,V){var z={};for(var Z in F)V[Z]&&V[Z].length%2===0?z[Z]=V[Z].concat(F[Z]):z[Z]=F[Z];return z},ds=function(F){for(var V={},z=0;z0?H.length===2?typeof H[1]==o?this[H[0]]=H[1].call(this,bt):this[H[0]]=H[1]:H.length===3?typeof H[1]===o&&!(H[1].exec&&H[1].test)?this[H[0]]=bt?H[1].call(this,bt,H[2]):t:this[H[0]]=bt?bt.replace(H[1],H[2]):t:H.length===4&&(this[H[0]]=bt?H[3].call(this,bt.replace(H[1],H[2])):t):this[H]=bt||t;z+=2}},Ua=function(F,V){for(var z in V)if(typeof V[z]===l&&V[z].length>0){for(var Z=0;Z2&&(M[u]="iPad",M[f]=m),M},this.getEngine=function(){var M={};return M[p]=t,M[g]=t,Ti.call(M,Z,Et.engine),M},this.getOS=function(){var M={};return M[p]=t,M[g]=t,Ti.call(M,Z,Et.os),H&&!M[p]&&Bt&&Bt.platform&&Bt.platform!="Unknown"&&(M[p]=Bt.platform.replace(/chrome os/i,rp).replace(/macos/i,ip)),M},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return Z},this.setUA=function(M){return Z=typeof M===c&&M.length>R?Fa(M,R):M,this},this.setUA(Z),this};We.VERSION=n,We.BROWSER=ds([p,g,a]),We.CPU=ds([_]),We.DEVICE=ds([u,d,f,w,h,y,m,v,S]),We.ENGINE=We.OS=ds([p,g]),typeof Ao!==s?(typeof na!==s&&na.exports&&(Ao=na.exports=We),Ao.UAParser=We):typeof define===o&&define.amd?define(function(){return We}):typeof e!==s&&(e.UAParser=We);var vr=typeof e!==s&&(e.jQuery||e.Zepto);if(vr&&!vr.ua){var ps=new We;vr.ua=ps.getResult(),vr.ua.get=function(){return ps.getUA()},vr.ua.set=function(F){ps.setUA(F);var V=ps.getResult();for(var z in V)vr.ua[z]=V[z]}}})(typeof window=="object"?window:Ao)});var tv=ie((KA,ev)=>{var A2=1/0,L2="[object Symbol]",D2=/^\s+|\s+$/g,vd="\\ud800-\\udfff",H_="\\u0300-\\u036f\\ufe20-\\ufe23",V_="\\u20d0-\\u20f0",W_="\\ufe0e\\ufe0f",M2="["+vd+"]",yd="["+H_+V_+"]",_d="\\ud83c[\\udffb-\\udfff]",z2="(?:"+yd+"|"+_d+")",G_="[^"+vd+"]",Z_="(?:\\ud83c[\\udde6-\\uddff]){2}",K_="[\\ud800-\\udbff][\\udc00-\\udfff]",q_="\\u200d",Q_=z2+"?",X_="["+W_+"]?",j2="(?:"+q_+"(?:"+[G_,Z_,K_].join("|")+")"+X_+Q_+")*",F2=X_+Q_+j2,U2="(?:"+[G_+yd+"?",yd,Z_,K_,M2].join("|")+")",B2=RegExp(_d+"(?="+_d+")|"+U2+F2,"g"),$2=RegExp("["+q_+vd+H_+V_+W_+"]"),H2=typeof global=="object"&&global&&global.Object===Object&&global,V2=typeof self=="object"&&self&&self.Object===Object&&self,W2=H2||V2||Function("return this")();function G2(e){return e.split("")}function Z2(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o-1;);return n}function Q2(e,t){for(var n=e.length;n--&&J_(t,e[n],0)>-1;);return n}function X2(e){return $2.test(e)}function F_(e){return X2(e)?J2(e):G2(e)}function J2(e){return e.match(B2)||[]}var Y2=Object.prototype,eb=Y2.toString,U_=W2.Symbol,B_=U_?U_.prototype:void 0,$_=B_?B_.toString:void 0;function tb(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r=r?e:tb(e,t,n)}function rb(e){return!!e&&typeof e=="object"}function ib(e){return typeof e=="symbol"||rb(e)&&eb.call(e)==L2}function ob(e){return e==null?"":Y_(e)}function sb(e,t,n){if(e=ob(e),e&&(n||t===void 0))return e.replace(D2,"");if(!e||!(t=Y_(t)))return e;var r=F_(e),i=F_(t),o=q2(r,i),s=Q2(r,i)+1;return nb(r,o,s).join("")}ev.exports=sb});var av=ie((n4,lv)=>{"use strict";function ub(e,t){for(;e.length{let[,r]=(0,Qr.useState)({}),o=(0,Qr.useRef)({data:e,deps:n||[],ready:!1,_loading:{},lastRender:0,lastRenderCount:0}).current;if((0,Qr.useEffect)(()=>{o.ready=!0,t&&t({init:!0})},[]),o.ready===!1)o._loading={},o.data.render=()=>{if(o.ready){if(Date.now()-o.lastRender<300?o.lastRenderCount++:o.lastRenderCount=0,o.lastRenderCount>300)throw new Error("local.render more than 300 times in less than 300ms");o.lastRender=Date.now(),r({})}};else if(o.deps.length>0&&n){for(let[s,l]of Object.entries(n))if(o.deps[s]!==l){o.deps[s]=l,t&&setTimeout(()=>{t({init:!1})});break}}return o.data};var H0=(e,t)=>new Promise(async n=>{if(typeof e=="function"){let r=null;if(t&&(r=setTimeout(n,t)),await e()){clearTimeout(r),n();return}let i=0,o=setInterval(async()=>{await e()&&(r&&clearTimeout(r),clearInterval(o),n()),i>100&&clearInterval(o)},10)}else typeof e=="number"&&setTimeout(()=>{n()},e)});var mk=P(_e());var Jt=P(_e());function cf(e){let t=new WeakMap;function n(r,i=[]){if(!(r!==null&&typeof r=="object"))return r;let o=t.get(r);if(o)return`[Circular *${o.join(".")}]`;t.set(r,i);let s=Array.isArray(r)?[]:{};for(let[l,c]of Object.entries(r))s[l]=n(c,[...i,l]);return t.delete(r),s}return n(e)}var ff=(0,Jt.createContext)({global:{},render:()=>{}});var Pn=(e,t)=>{let n=(0,Jt.useContext)(ff),{global:r,render:i}=n;r[t]||(r[t]=e),(0,Jt.useEffect)(()=>{let s=null;return()=>{typeof s=="function"?s():s instanceof Promise&&s.then(l=>{typeof l=="function"&&l()})}},[]);let o=r[t];return o&&(o.render=s=>{s&&(r[t]=void 0),(0,Jt.startTransition)(i)}),o},Xr=cf;var F3=P(_e());var pf=P(_e()),Q0=P(af()),X0=P(G0()),J0=P(G()),Y0=()=>{let e=typeof window=="object"?window:globalThis;e.React=pf.default,e.ReactDOM=Q0.default,e.JSXRuntime=J0.default,e.JSXDevRuntime=X0.default,e.Fragment=pf.default.Fragment};var kk={data:""},tg=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||kk,ng=e=>{let t=tg(e),n=t.data;return t.data="",n},Sk=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Ek=/\/\*[^]*?\*\/| +/g,eg=/\n+/g,ir=(e,t)=>{let n="",r="",i="";for(let o in e){let s=e[o];o[0]=="@"?o[1]=="i"?n=o+" "+s+";":r+=o[1]=="f"?ir(s,o):o+"{"+ir(s,o[1]=="k"?"":t)+"}":typeof s=="object"?r+=ir(s,t?t.replace(/([^,])+/g,l=>o.replace(/(^:.*)|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,l):l?l+" "+c:c)):o):s!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=ir.p?ir.p(o,s):o+":"+s+";")}return n+(t&&i?t+"{"+i+"}":i)+r},Yt={},rg=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+rg(e[n]);return t}return e},bk=(e,t,n,r,i)=>{let o=rg(e),s=Yt[o]||(Yt[o]=(c=>{let a=0,u=11;for(;a>>0;return"go"+u})(o));if(!Yt[s]){let c=o!==e?e:(a=>{let u,p,f=[{}];for(;u=Sk.exec(a.replace(Ek,""));)u[4]?f.shift():u[3]?(p=u[3].replace(eg," ").trim(),f.unshift(f[0][p]=f[0][p]||{})):f[0][u[1]]=u[2].replace(eg," ").trim();return f[0]})(e);Yt[s]=ir(i?{["@keyframes "+s]:c}:c,n?"":"."+s)}let l=n&&Yt.g?Yt.g:null;return n&&(Yt.g=Yt[s]),((c,a,u,p)=>{p?a.data=a.data.replace(p,c):a.data.indexOf(c)===-1&&(a.data=u?c+a.data:a.data+c)})(Yt[s],t,r,l),s},Rk=(e,t,n)=>e.reduce((r,i,o)=>{let s=t[o];if(s&&s.call){let l=s(n),c=l&&l.props&&l.props.className||/^go/.test(l)&&l;s=c?"."+c:l&&typeof l=="object"?l.props?"":ir(l,""):l===!1?"":l}return r+i+(s??"")},"");function zl(e){let t=this||{},n=e.call?e(t.p):e;return bk(n.unshift?n.raw?Rk(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,tg(t.target),t.g,t.o,t.k)}var A3=zl.bind({g:1}),L3=zl.bind({k:1});var ig=async(e=!0)=>{let t=typeof window=="object"?window:globalThis;e&&await H0(()=>t.__SRV_URL__),t.prasiContext={global:{},render(){}};let n=window.location,r=n.protocol.indexOf("http")===0?n.hostname:"localhost",i=n.protocol!="https:"||/localhost|127.0.0.1|0.0.0.0/.test(r)?"http":"https";if(t.__SRV_URL__){t.serverurl=t.__SRV_URL__;let s=new URL(t.serverurl);(s.hostname==="localhost"||s.hostname==="127.0.0.1")&&(s.hostname=n.hostname,s.pathname=s.pathname==="/"?"":s.pathname,t.serverurl=s.toString(),t.serverurl.endsWith("/")&&(t.serverurl=t.serverurl.substring(0,t.serverurl.length-1)))}let o=n.port;t.baseurl=i+"://"+r+(o?":"+o:"")+"/",t.basepath||(t.basepath="/"),t.css=zl,t.extractCss=ng,t.pathname=n.pathname,t.cx=(...s)=>{let l=[];return s.filter(c=>c?(typeof c=="string"&&c.trim(),!0):!1).forEach(c=>{if(Array.isArray(c))for(let a of c)typeof a=="string"&&a.trim()&&l.push(a.trim());else l.push(c.trim())}),l.join(" ")},t.navigate=s=>{let l=s;if(typeof t.navigateOverride=="function"&&(l=t.navigateOverride(s),!l))return null;history.pushState({prevUrl:window.location.href},"",l),t.pathname=s,t.prasiContext&&t.prasiContext.render&&t.prasiContext.render()},typeof window=="object"&&window.addEventListener("popstate",()=>{let s=navigator.serviceWorker.controller;if(s&&s.postMessage({type:"add-cache",url:n.href}),t.prasiContext.popState){t.prasiContext.popState();return}if(t.preventPopRender){t.preventPopRender=!1;return}t.prasiContext&&t.prasiContext.render&&(t.pathname=n.pathname,t.prasiContext.render())})};function hf(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function gf(e,t){let n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);let r=hf(n);return(i,o)=>r.then(s=>o(s.transaction(t,i).objectStore(t)))}var mf;function og(){return mf||(mf=gf("keyval-store","keyval")),mf}function yf(e,t=og()){return t("readonly",n=>hf(n.get(e)))}function jl(e,t,n=og()){return n("readwrite",r=>(r.put(t,e),hf(r.transaction)))}var z1=P(_e());var sg=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Ck(e){return typeof e=="string"&&sg.test(e)}var _f=Ck;var ko=P(G()),vf=({children:e,back:t})=>(0,ko.jsxs)("div",{className:"flex items-center justify-center w-full h-full fixed inset-0 flex-col",children:[(0,ko.jsx)("div",{children:e}),(0,ko.jsxs)("div",{className:"border mt-2 rounded-md p-2 cursor-pointer",onClick:t||(()=>{history.back()}),children:[" ","Go Back"]})]});var ag=P(_e());var Oe=P(G()),lg=window,So=({children:e,className:t,show:n,backdrop:r,note:i,alt:o,pointer:s})=>{let l=Nn({icon:(0,Oe.jsx)("div",{className:"px-4 py-1",children:"Loading..."}),value:.111,ival:null},()=>{});return(0,ag.useEffect)(()=>(l.ival=setInterval(()=>{l.value+=.1333,l.value>=1.3&&(l.value=0),l.render()},200),lg.loadingIcon&&(l.icon=(0,Oe.jsx)("img",{alt:"loading",src:lg.loadingIcon,className:css` width: 42px; height: 42px; - `}),s.render()),()=>{clearInterval(s.ival)}),[]),(0,Ce.jsxs)(Ce.Fragment,{children:[r!==!1&&(0,Ce.jsx)("div",{className:cx("flex items-center z-40 bg-white pointer-events-none","w-full h-full fixed transition-all duration-1000",typeof n<"u"?n?"opacity-50":"opacity-0":"opacity-50"),onContextMenuCapture:a=>{a.preventDefault()}}),e?(0,Ce.jsx)("div",{onContextMenuCapture:a=>{a.preventDefault()},className:cx("flex flex-1 items-center justify-center z-40 transition-all",t||(r!==!1?"w-full h-full fixed":""),typeof n<"u"?n?"":"hidden":""),children:(0,Ce.jsx)("div",{className:"flex items-center justify-center flex-col space-y-3 bg-white p-4 rounded-lg select-none",children:(0,Ce.jsx)("div",{className:"text-sm",children:e})})}):(0,Ce.jsx)("div",{className:cx("flex flex-1 items-center justify-center z-40 transition-all",l!==!0&&"pointer-events-none",t||(r!==!1?"w-full h-full fixed":""),typeof n<"u"?n?"":"hidden":""),children:(0,Ce.jsxs)("div",{className:cx("w-1/6 flex flex-col items-center justify-center",css` + `}),l.render()),()=>{clearInterval(l.ival)}),[]),(0,Oe.jsxs)(Oe.Fragment,{children:[r!==!1&&(0,Oe.jsx)("div",{className:cx("flex items-center z-40 bg-white pointer-events-none","w-full h-full fixed transition-all duration-1000",typeof n<"u"?n?"opacity-50":"opacity-0":"opacity-50"),onContextMenuCapture:c=>{c.preventDefault()}}),e?(0,Oe.jsx)("div",{onContextMenuCapture:c=>{c.preventDefault()},className:cx("flex flex-1 items-center justify-center z-40 transition-all",t||(r!==!1?"w-full h-full fixed":""),typeof n<"u"?n?"":"hidden":""),children:(0,Oe.jsx)("div",{className:"flex items-center justify-center flex-col space-y-3 bg-white p-4 rounded-lg select-none",children:(0,Oe.jsx)("div",{className:"text-sm",children:e})})}):(0,Oe.jsx)("div",{className:cx("flex flex-1 items-center justify-center z-40 transition-all",s!==!0&&"pointer-events-none",t||(r!==!1?"w-full h-full fixed":""),typeof n<"u"?n?"":"hidden":""),children:(0,Oe.jsxs)("div",{className:cx("w-1/6 flex flex-col items-center justify-center",css` min-width: 30px; .pr-outer { background: rgba(0, 0, 0, 0.1) !important; } - `),children:[(0,Ce.jsx)("div",{className:"text-[10px] text-slate-400 whitespace-nowrap",children:i}),(0,Ce.jsx)("div",{className:"pr-outer w-full h-[3px] flex items-stretch rounded-sm overflow-hidden",children:(0,Ce.jsx)("div",{className:cx("bg-blue-800 transition-all duration-200 rounded-sm w-full",css` - transform: translate(${-100+s.value*200}%); - `)})}),o]})})]})};var Js=P(ge());var eg=(e,t)=>{e.status="loading",e.on_status_changes&&e.on_status_changes(e.status),e.site.id=t.site_id,e.site.api_url=t.api_url,e.status="ready",e.on_status_changes&&e.on_status_changes(e.status)};var Tn={ts:0,status:"init",meta:{},entry:[],tick:0,mode:"desktop",site:{id:"",api_url:"",api:null,db:null},site_url:null,script:{init_local_effect:void 0},visit:void 0,on_status_changes:void 0,layout:void 0,page:{cur:{id:""},navs:{}},comp:{load:async()=>null},on_preload:void 0};var Py=P(ge());var de=P(ge()),hf=class extends de.Component{displayName="ReactUseErrorBoundary";componentDidCatch(...t){this.setState({}),this.props.onError(...t)}render(){return this.props.children}},hk=()=>!1,tg=(0,de.createContext)({componentDidCatch:{current:void 0},error:void 0,setError:hk});function ng({children:e}){let[t,n]=(0,de.useState)(),r=(0,de.useRef)(),i=(0,de.useMemo)(()=>({componentDidCatch:r,error:t,setError:n}),[t]);return de.default.createElement(tg.Provider,{value:i},de.default.createElement(hf,{error:t,onError:(o,l)=>{n(o),r.current?.(o,l)}},e))}ng.displayName="ReactUseErrorBoundaryContext";function rg(e){function t(n){return de.default.createElement(ng,null,de.default.createElement(e,{key:"WrappedComponent",...n}))}return t.displayName=`WithErrorBoundary(${e.displayName??e.name??"Component"})`,t}function ig(e){let t=(0,de.useContext)(tg);t.componentDidCatch.current=e;let n=(0,de.useCallback)(()=>{t.setError(void 0)},[]);return[t.error,n]}var at=P(G()),Ot=rg(({children:e,meta:t,id:n,silent:r=!0})=>{let i=Nn({retrying:!1,meta:t}),[o,l]=ig((a,u)=>{r!==!0&&console.warn(a)});t&&i.meta!==t&&(i.meta=t,setTimeout(l));let s=t;return o?(0,at.jsxs)("div",{className:"bg-red-100 border border-red-300 rounded-sm text-xs flex flex-col items-center",children:[(0,at.jsxs)("div",{className:"text-[10px] font-bold text-red-900 self-stretch px-1",children:["ERROR ",s?.item.name?"["+s.item.name+"]:":""]}),(0,at.jsx)("p",{className:"border-b border-red-300 px-1 pb-1 min-w-[100px]",children:i.retrying?(0,at.jsx)(at.Fragment,{children:"Retrying..."}):(0,at.jsx)(at.Fragment,{children:o.message})}),(0,at.jsx)("div",{className:"p-1",children:(0,at.jsx)("button",{onClick:()=>{i.retrying=!0,i.render(),setTimeout(()=>{i.retrying=!1,i.render(),l()},100)},className:"bg-white border border-white hover:border-red-400 hover:bg-red-50 rounded px-2",children:"Try again"})})]}):e});var He=(e,t,n,r)=>{let i=e[t];return n==="desktop"||!n?!i&&e.mobile&&e.mobile[t]&&(i=e.mobile[t]):e.mobile&&e.mobile[t]&&(i=e.mobile[t]),i||(i=r),i};var og=(e,t)=>{let n=He(e,"adv",t,{});return typeof n.css=="string"&&n.css.trim()?cx(css` + `),children:[(0,Oe.jsx)("div",{className:"text-[10px] text-slate-400 whitespace-nowrap",children:i}),(0,Oe.jsx)("div",{className:"pr-outer w-full h-[3px] flex items-stretch rounded-sm overflow-hidden",children:(0,Oe.jsx)("div",{className:cx("bg-blue-800 transition-all duration-200 rounded-sm w-full",css` + transform: translate(${-100+l.value*200}%); + `)})}),o]})})]})};var ea=P(_e());var ug=(e,t)=>{e.status="loading",e.on_status_changes&&e.on_status_changes(e.status),e.site.id=t.site_id,e.site.api_url=t.api_url,e.status="ready",e.on_status_changes&&e.on_status_changes(e.status)};var An={ts:0,status:"init",meta:{},entry:[],tick:0,mode:"desktop",site:{id:"",api_url:"",api:null,db:null},site_url:null,script:{init_local_effect:void 0},visit:void 0,on_status_changes:void 0,layout:void 0,page:{cur:{id:""},navs:{}},comp:{load:async()=>null},on_preload:void 0};var By=P(_e());var de=P(_e()),wf=class extends de.Component{displayName="ReactUseErrorBoundary";componentDidCatch(...t){this.setState({}),this.props.onError(...t)}render(){return this.props.children}},Tk=()=>!1,cg=(0,de.createContext)({componentDidCatch:{current:void 0},error:void 0,setError:Tk});function fg({children:e}){let[t,n]=(0,de.useState)(),r=(0,de.useRef)(),i=(0,de.useMemo)(()=>({componentDidCatch:r,error:t,setError:n}),[t]);return de.default.createElement(cg.Provider,{value:i},de.default.createElement(wf,{error:t,onError:(o,s)=>{n(o),r.current?.(o,s)}},e))}fg.displayName="ReactUseErrorBoundaryContext";function dg(e){function t(n){return de.default.createElement(fg,null,de.default.createElement(e,{key:"WrappedComponent",...n}))}return t.displayName=`WithErrorBoundary(${e.displayName??e.name??"Component"})`,t}function pg(e){let t=(0,de.useContext)(cg);t.componentDidCatch.current=e;let n=(0,de.useCallback)(()=>{t.setError(void 0)},[]);return[t.error,n]}var at=P(G()),Pt=dg(({children:e,meta:t,id:n,silent:r=!0})=>{let i=Nn({retrying:!1,meta:t}),[o,s]=pg((c,a)=>{r!==!0&&console.warn(c)});t&&i.meta!==t&&(i.meta=t,setTimeout(s));let l=t;return o?(0,at.jsxs)("div",{className:"bg-red-100 border border-red-300 rounded-sm text-xs flex flex-col items-center",children:[(0,at.jsxs)("div",{className:"text-[10px] font-bold text-red-900 self-stretch px-1",children:["ERROR ",l?.item.name?"["+l.item.name+"]:":""]}),(0,at.jsx)("p",{className:"border-b border-red-300 px-1 pb-1 min-w-[100px]",children:i.retrying?(0,at.jsx)(at.Fragment,{children:"Retrying..."}):(0,at.jsx)(at.Fragment,{children:o.message})}),(0,at.jsx)("div",{className:"p-1",children:(0,at.jsx)("button",{onClick:()=>{i.retrying=!0,i.render(),setTimeout(()=>{i.retrying=!1,i.render(),s()},100)},className:"bg-white border border-white hover:border-red-400 hover:bg-red-50 rounded px-2",children:"Try again"})})]}):e});var He=(e,t,n,r)=>{let i=e[t];return n==="desktop"||!n?!i&&e.mobile&&e.mobile[t]&&(i=e.mobile[t]):e.mobile&&e.mobile[t]&&(i=e.mobile[t]),i||(i=r),i};var mg=(e,t)=>{let n=He(e,"adv",t,{});return typeof n.css=="string"&&n.css.trim()?cx(css` ${n.css} - `,t):""};var lg=(e,t)=>{let n=He(e,"bg",t,{size:"contain",pos:"center"}),r=`${serverurl}${n.url}`;return n&&n.url&&n.url.startsWith("http")&&(r=n.url),cx(` + `,t):""};var hg=(e,t)=>{let n=He(e,"bg",t,{size:"contain",pos:"center"}),r=`${serverurl}${n.url}`;return n&&n.url&&n.url.startsWith("http")&&(r=n.url),cx(` background-repeat: no-repeat; `,n.color&&` background-color: ${n.color}; @@ -25,7 +25,7 @@ Error generating stack: `+o.message+` background-size: ${n.size}; `,n.pos&&` background-position: ${n.pos}; - `)};var wg=P(xf());var xg=(e,t)=>{let n=He(e,"border",t,{style:"solid",stroke:{},rounded:{tr:0,tl:0,bl:0,br:0},color:"transparent"});return cx(Tt(n,"stroke.l","border-left-width"),Tt(n,"stroke.r","border-right-width"),Tt(n,"stroke.b","border-bottom-width"),Tt(n,"stroke.t","border-top-width"),Tt(n,"color","border-color","transparent"),Tt(n,"style","border-style","dashed"),Tt(n,"rounded.tl","border-top-left-radius"),Tt(n,"rounded.tr","border-top-right-radius"),Tt(n,"rounded.bl","border-bottom-left-radius"),Tt(n,"rounded.br","border-bottom-right-radius"))},Tt=(e,t,n,r)=>{let i=(0,wg.default)(e,t);if(r)return i?`${n}: ${i};`:`${n}: ${r};`;if(i)return`${n}: ${i}px;`};var kg=(e,t,n)=>{let r=He(e,"dim",t,{h:"fit",w:"fit"});return r.w==="full"&&r.h==="full"?` + `)};var Ig=P(Rf());var Og=(e,t)=>{let n=He(e,"border",t,{style:"solid",stroke:{},rounded:{tr:0,tl:0,bl:0,br:0},color:"transparent"});return cx(At(n,"stroke.l","border-left-width"),At(n,"stroke.r","border-right-width"),At(n,"stroke.b","border-bottom-width"),At(n,"stroke.t","border-top-width"),At(n,"color","border-color","transparent"),At(n,"style","border-style","dashed"),At(n,"rounded.tl","border-top-left-radius"),At(n,"rounded.tr","border-top-right-radius"),At(n,"rounded.bl","border-bottom-left-radius"),At(n,"rounded.br","border-bottom-right-radius"))},At=(e,t,n,r)=>{let i=(0,Ig.default)(e,t);if(r)return i?`${n}: ${i};`:`${n}: ${r};`;if(i)return`${n}: ${i}px;`};var Ng=(e,t,n)=>{let r=He(e,"dim",t,{h:"fit",w:"fit"});return r.w==="full"&&r.h==="full"?` width:100%; height:100%; flex:1; @@ -44,7 +44,7 @@ Error generating stack: `+o.message+` `,r.h&&typeof r.h=="number"&&r.h>=0&&` height: ${r.h}${r.hUnit||"px"}; overflow-y: clip; - `)};var Sg=({item:e,hover:t,active:n})=>cx(t&&css` + `)};var Pg=({item:e,hover:t,active:n})=>cx(t&&css` & { box-shadow: inset 0 0 0px 3px #bae3fd; > img { @@ -56,7 +56,7 @@ Error generating stack: `+o.message+` > img { opacity: 0.6; } - `);var Jr=window,Eg=(e,t)=>{let n=He(e,"font",t,{});if(n.family){Jr.loadedFonts||(Jr.loadedFonts=[]);let i=`:wght@${[300,400,500,600].join(";")}`,o=n.family.replace(/ /g,"+");if(Jr.loadedFonts.indexOf(n.family)<0){Jr.loadedFonts.push(n.family);let l=document,s=`https://fonts.googleapis.com/css2?family=${o}${i}&display=swap`;if(!l.querySelector(`link[href="${s}]`)){let a=l.createElement("link");a.type="text/css",a.rel="stylesheet",a.crossOrigin="anonymous",a.href=s,l.head.appendChild(a)}}}return!n.family&&Jr.defaultFont&&(n.family=Jr.defaultFont),cx(n.color&&` + `);var Yr=window,Ag=(e,t)=>{let n=He(e,"font",t,{});if(n.family){Yr.loadedFonts||(Yr.loadedFonts=[]);let i=`:wght@${[300,400,500,600].join(";")}`,o=n.family.replace(/ /g,"+");if(Yr.loadedFonts.indexOf(n.family)<0){Yr.loadedFonts.push(n.family);let s=document,l=`https://fonts.googleapis.com/css2?family=${o}${i}&display=swap`;if(!s.querySelector(`link[href="${l}]`)){let c=s.createElement("link");c.type="text/css",c.rel="stylesheet",c.crossOrigin="anonymous",c.href=l,s.head.appendChild(c)}}}return!n.family&&Yr.defaultFont&&(n.family=Yr.defaultFont),cx(n.color&&` color: ${n.color}; `,n.whitespace==="whitespace-normal"&&` word-break: break-word; @@ -72,10 +72,10 @@ Error generating stack: `+o.message+` line-height: ${n.height==="auto"?"normal":`${n.height}%`}; `,n.family&&` font-family: ${n.family}; - `)};var bg=(e,t)=>{let n=[],r=He(e,"layout",t,{dir:"col",align:"top-left",gap:0,wrap:void 0});if(r)r.wrap&&n.push(r.wrap==="flex-wrap"?"flex-wrap: wrap;":"flex-wrap: nowrap;"),r.dir.startsWith("col")?(r.dir==="col"?n.push("flex-direction: column;"):r.dir==="col-reverse"&&n.push("flex-direction: column-reverse;"),r.gap==="auto"?(r.align==="left"&&n.push("align-items:start; justify-content: space-between;"),r.align==="center"&&n.push("align-items:center; justify-content: space-between;"),r.align==="right"&&n.push("align-items:end; justify-content: space-between;")):(n.push(`gap: ${r.gap}px;`),r.align==="top-left"&&n.push("align-items:start; justify-content: start;"),r.align==="top-center"&&n.push("align-items:center; justify-content: start;"),r.align==="top-right"&&n.push("align-items:end; justify-content: start;"),r.align==="left"&&n.push("align-items:start; justify-content: center;"),r.align==="center"&&n.push("align-items:center; justify-content: center;"),r.align==="right"&&n.push("align-items:end; justify-content: center;"),r.align==="bottom-left"&&n.push("align-items:start; justify-content: end;"),r.align==="bottom-center"&&n.push("align-items:center; justify-content: end;"),r.align==="bottom-right"&&n.push("align-items:end; justify-content: end;"))):(r.dir==="row"?n.push("flex-direction: row;"):r.dir==="row-reverse"&&n.push("flex-direction: row-reverse;"),r.gap==="auto"?(r.align==="top"&&n.push("align-items:start; justify-content: space-between;"),r.align==="center"&&n.push("align-items:center; justify-content: space-between;"),r.align==="bottom"&&n.push("align-items:end; justify-content: space-between;")):(n.push(` + `)};var Lg=(e,t)=>{let n=[],r=He(e,"layout",t,{dir:"col",align:"top-left",gap:0,wrap:void 0});if(r)r.wrap&&n.push(r.wrap==="flex-wrap"?"flex-wrap: wrap;":"flex-wrap: nowrap;"),r.dir.startsWith("col")?(r.dir==="col"?n.push("flex-direction: column;"):r.dir==="col-reverse"&&n.push("flex-direction: column-reverse;"),r.gap==="auto"?(r.align==="left"&&n.push("align-items:start; justify-content: space-between;"),r.align==="center"&&n.push("align-items:center; justify-content: space-between;"),r.align==="right"&&n.push("align-items:end; justify-content: space-between;")):(n.push(`gap: ${r.gap}px;`),r.align==="top-left"&&n.push("align-items:start; justify-content: start;"),r.align==="top-center"&&n.push("align-items:center; justify-content: start;"),r.align==="top-right"&&n.push("align-items:end; justify-content: start;"),r.align==="left"&&n.push("align-items:start; justify-content: center;"),r.align==="center"&&n.push("align-items:center; justify-content: center;"),r.align==="right"&&n.push("align-items:end; justify-content: center;"),r.align==="bottom-left"&&n.push("align-items:start; justify-content: end;"),r.align==="bottom-center"&&n.push("align-items:center; justify-content: end;"),r.align==="bottom-right"&&n.push("align-items:end; justify-content: end;"))):(r.dir==="row"?n.push("flex-direction: row;"):r.dir==="row-reverse"&&n.push("flex-direction: row-reverse;"),r.gap==="auto"?(r.align==="top"&&n.push("align-items:start; justify-content: space-between;"),r.align==="center"&&n.push("align-items:center; justify-content: space-between;"),r.align==="bottom"&&n.push("align-items:end; justify-content: space-between;")):(n.push(` gap: ${r.gap}px; `),r.align==="top-left"&&n.push("align-items:start; justify-content: start;"),r.align==="top-center"&&n.push("align-items:start; justify-content: center;"),r.align==="top-right"&&n.push("align-items:start; justify-content: end;"),r.align==="left"&&n.push("align-items:center; justify-content: start;"),r.align==="center"&&n.push("align-items:center; justify-content: center;"),r.align==="right"&&n.push("align-items:center; justify-content: end;"),r.align==="bottom-left"&&n.push("align-items:end; justify-content: start;"),r.align==="bottom-center"&&n.push("align-items:end; justify-content: center;"),r.align==="bottom-right"&&n.push("align-items:end; justify-content: end;")));else return"flex-direction:column; align-items:start; justify-content: start;";return n.join(` - `).trim()};var Rg=(e,t)=>{let n=He(e,"padding",t,{l:0,b:0,t:0,r:0});return cx(n.l!==void 0&&` + `).trim()};var Dg=(e,t)=>{let n=He(e,"padding",t,{l:0,b:0,t:0,r:0});return cx(n.l!==void 0&&` padding-left: ${n.l}px; `,n.r!==void 0&&` padding-right: ${n.r}px; @@ -83,37 +83,37 @@ Error generating stack: `+o.message+` padding-bottom: ${n.b}px; `,n.t!==void 0&&` padding-top: ${n.t}px; - `)};var kf=(e,t)=>{try{return cx([e.id?`s-${e.id}`:"",css` + `)};var Cf=(e,t)=>{try{return cx([e.id?`s-${e.id}`:"",css` display: flex; position: relative; user-select: none; - ${bg(e,t.mode)} - ${Rg(e,t.mode)} - ${kg(e,t.mode,t?.editor)} - ${xg(e,t.mode)} - ${lg(e,t.mode)} - ${Eg(e,t.mode)} - `,(t?.hover||t?.active)&&Sg({item:e,hover:t?.hover,active:t?.active}),og(e,t.mode)])}catch(n){console.log(n)}return cx([])};var Cg=P(G()),ko=(e,t,n,r,i)=>{let o=t.item,l;o.component?.style&&(l={style:o.component.style,className:kf(o.component.style,{mode:e.mode})});let s={className:kf(o,{mode:e.mode}),inherit:l},a={},u=t.item.childs,c;return t.item.type==="text"?(c=null,s.dangerouslySetInnerHTML={__html:t.item.html||""}):c=Array.isArray(u)&&u?.map(d=>{if(!d)return null;let{id:f}=d,p=n?e.layout?.meta[f]:e.meta[f];return p?(0,Cg.jsx)(qt,{meta:p,is_layout:n,passprop:{...r},depth:i+1},f):null}),s.children=c,t.item.adv?.html?(delete s.children,s.dangerouslySetInnerHTML={__html:t.item.adv?.html}):t.item.adv?.js&&!t.item.adv.js.includes("children")&&(delete s.children,delete s.dangerouslySetInnerHTML),{props:s,text_props:a}};var Ty=P(ge());var Iy=P(Hs());var ei={NORMAL:0,WILDCARD:1,PLACEHOLDER:2};function Vs(e={}){let t={options:e,rootNode:ky(),staticRoutesMap:{}},n=r=>e.strictTrailingSlash?r:r.replace(/\/$/,"")||"/";if(e.routes)for(let r in e.routes)xy(t,n(r),e.routes[r]);return{ctx:t,lookup:r=>ZS(t,n(r)),insert:(r,i)=>xy(t,n(r),i),remove:r=>KS(t,n(r))}}function ZS(e,t){let n=e.staticRoutesMap[t];if(n)return n.data;let r=t.split("/"),i={},o=!1,l=null,s=e.rootNode,a=null;for(let u=0;u{},db:null,api:null,init_local_effect:{}},page:{history:{id:"",show:!1},root_id:"root",cur:qS,doc:null,list:{},building:!1,meta:{},entry:[],tree:[],render:()=>{}},comp:{doc:null,item:null,loaded:{},list:{},group:{}},code:{},global_prop:[],ui:{monaco:null,comp_editable:localStorage.getItem("prasi-comp-editable")==="yes",zoom:localStorage.zoom||"100%",side:{prop:!0},layout:{left:parseInt(localStorage.getItem("prasi-layout-left")||"250"),right:parseInt(localStorage.getItem("prasi-layout-right")||"250")},prevent_indent_hook:!1,syncing:!1,tree:{item_loading:[],search:"",search_ref:null,search_mode:{Name:!0,JS:!1,HTML:!1,CSS:!1},rename_id:"",open:{}},popup:{file:{enabled:!1,open:!1,picker:{value:"",on_pick:!1,multi:!1},path:"/",expanded:JSON.parse(localStorage.getItem("panel-file-expanded")||"{}"),entry:{},selected:new Set,action:null,file_renaming:"",file_ctx_menu_event:null,tree:[],tree_renaming:"",tree_ctx_path:"",tree_ctx_menu_event:null,preview:!0,upload:{started:!1,progress:{}}},code:{init:!1,open:!1,name:"site",log:"",loading:!1,rebuilding:!1,startup_status:"init",error:!1,show_log:!1,list:{}},page:{open:null,form:null},script:{open:!1,mode:"js",lastMode:"js",type:"item",prop_kind:"",prop_name:"",on_close:()=>{},typings:{status:"ok",err_msg:""},wb_render:()=>{}},site:null,site_form:null,comp:{preview_id:"",open:null,import:!1},comp_group:null,api:{open:!1}}}};var Ws=e=>({isMobile:e.mode==="mobile",isDesktop:e.mode==="desktop",isEditor:location.pathname.startsWith("/ed/")});var ar=P(ge());var ut=window;var JS=ff("prasi-cache","prasi-cache-store"),No={timeout:null,store:JS},Gs=(e,t)=>{let n=[...Sy(t,"navigate(",")"),...Sy(t,"href = ",";")],r=e.page.cur.id;e.page.navs[r]||(e.page.navs[r]=new Set);for(let i of n)e.page.navs[r].add(i);clearTimeout(No.timeout),No.timeout=setTimeout(()=>{e.on_nav_loaded&&e.on_nav_loaded({urls:Array.from(e.page.navs[r])})},100)},Sy=(e,t,n)=>{let r=0,i=0,o=[];for(;;){let l=e.indexOf(t,r);if(i=r,l>=0){let s=e[l+t.length];if(s==='"'||s==="'"||s==="`"){let a=e.indexOf(`${s}${n}`,l+t.length+1),u=e.substring(l+t.length+1,a);r=a+2+n.length,o.push(u)}}if(i===r)break}return o};var sr=P(ge());var Ey=P(xf()),lr=P(ge());var Tf=P(G()),by=(e,t,n,r,i)=>o=>{let[l,s]=(0,lr.useState)({}),a=o.internal_key;n.item.script||(n.item.script={});let u=n.item.script;a&&(n.item.script_keyed||(n.item.script_keyed={}),n.item.script_keyed[a]||(n.item.script_keyed[a]={}),u=n.item.script_keyed[a]),u.passprop||(u.passprop={});let c={};if(u.passprop){let p=!1;for(let[g,_]of Object.entries(o))["children","key"].includes(g)||(p=!0,c[g]=_)}let d={...r,...c};if(!Array.isArray(o.children)&&(0,lr.isValidElement)(o.children)&&typeof o.children=="object"){let p=(0,Ey.default)(o.children,"props.meta.item.component.props.child.content.childs");if(Array.isArray(p)){let g=!0;for(let _ of p)!(0,lr.isValidElement)(_)&&typeof _=="object"||(g=!1);if(g)return p.map(_=>{let w=e.meta[_.id];if(w||(e.meta[_.id]={item:_},w=e.meta[_.id]),w){if(Object.keys(w.item).length<=3&&w.mitem){let h={...w.item},m=w.mitem.toJSON();w.item={...m,...h}}return(0,Tf.jsx)(qt,{is_layout:t,meta:w,passprop:d,parent_key:o.internal_key,depth:i},_.id)}return null})}}if(!Array.isArray(o.children)&&!(0,lr.isValidElement)(o.children)&&typeof o.children=="object"){let p=o.children.id;if(p){let g=e.meta[p];if(!g){e.meta[p]={item:o.children},g=e.meta[p];let _=g.item.component?.id;_&&e.comp.load(_).then(w=>{if(w){for(let[m,y]of Object.entries(w)){let v=g.item;v[m]||(v[m]=y)}let h=g.item.component?.props;for(let[m,y]of Object.entries(w.component?.props||{}))h[m]||(h[m]=y);s({})}})}return(0,Tf.jsx)(qt,{is_layout:t,meta:g,passprop:d,parent_key:o.internal_key,depth:i})}}return Pf(o,d,a?{parent_key:a}:void 0)},Pf=(e,t,n)=>{let r={};if(Array.isArray(e)?r.children=e:r=e,Array.isArray(r.children)){if(r.children.length===1)return Of(r.children[0],r,t,n);let i=[];for(let o of r.children)i.push(Of(o,r,t,n));return i}return Of(r.children,r,t,n)},Of=(e,t,n,r)=>{if((0,lr.isValidElement)(e)){let i={...t};return delete i.children,{...e,props:{...e.props,...r,passprop:{...n,...i}}}}return e};var ni={},Ry=(e,t,n)=>r=>{let i=["localhost","prasi.avolut.com"].includes(location.hostname)&&location.pathname.startsWith("/ed/"),o=n.item.id,{children:l,parent_key:s}=r,a=e.script?.init_local_effect,u=t?e.layout?.meta:e.meta,c=(0,sr.useRef)(ni[o]?ni[o]:r.value),[d,f]=(0,sr.useState)({}),p=c.current;return p.render=()=>{window.prasiContext.render?window.prasiContext.render():f({})},Zs(e,n,n.script?.scope,s),r.hook&&r.hook(p),(0,sr.useEffect)(()=>{if(n.parent?.instance_id&&u){let _=u[n.parent?.instance_id];if(_&&_.instances){for(let[w,h]of Object.entries(_.instances[n.parent.instance_id]))if(h===n.item.id){o=w;break}}}return!a[o]&&(typeof a=="object"&&(a[o]=!0),(async()=>r.effect&&(await r.effect(p),i&&(ni[o]=p)))()),()=>{}},[...r.deps||[],location.pathname]),(0,sr.useEffect)(()=>{i&&ni[o]===null&&(async()=>r.effect&&(await r.effect(p),i&&(ni[o]=p)))()},[ni[o]]),Pf(l,{...n.script?.scope,[r.name]:p})};var Af=P(Hs()),Oo=window,ri=(e,t,n)=>{Oo.prasiEdit||(Oo.prasiEdit={});let r=Oo.prasiEdit[n];r||(Oo.prasiEdit[n]={},r=Oo.prasiEdit[n]);let i=()=>{let l=t.get("id")||"",s=r[l];return s||(r[l]=[],s=r[l]),s},o=t.toJSON();return{...o,edit:{get props(){if(o.component?.props){let l={};for(let[s,a]of Object.entries(o.component.props))if(a.content){let u=t.get("component")?.get("props")?.get(s)?.get("content");u?l[s]={mode:"jsx",value:ri(e,u,n)}:l[s]={mode:"jsx",value:null}}else{let u=typeof a.valueBuilt=="string"?a.valueBuilt.trim():"";if(u.endsWith(`; -`)&&(u=u.substring(0,u.length-2)),u&&u===a.value.trim()){let c=new Function(`return ${a.value}`);l[s]={mode:"string",value:c()}}else l[s]={mode:"raw",value:a.value,valueBuilt:a.valueBuilt}}return l}},get pending(){return[]},async commit(){let l={},s={};if(t){for(let[a,u]of Object.entries(r)){let c=e[a];if(!c||!c.mitem)continue;let f=c.mitem.toJSON();if(f&&f.component){let p=f?.component?.props;if(!p){console.log(f,p);return}let g={};for(let w of u)if(w.type==="prop"&&p)p[w.name]&&(w.mode==="string"?(p[w.name].value=JSON.stringify(w.value),p[w.name].valueBuilt=JSON.stringify(w.value)):w.mode==="raw"?(p[w.name].value=w.value,w.valueBuilt?p[w.name].valueBuilt=w.valueBuilt:g[w.name]=w.value):w.mode==="jsx"&&(p[w.name]||(p[w.name]={meta:{type:"content-element"}}),w.value&&(p[w.name].content=ii([w.value],s)[0])));else if(w.type==="set"&&typeof w.value=="object")for(let[h,m]of Object.entries(w.value))f[h]=m;else if(w.type==="child"&&Array.isArray(w.childs))if(f.component?.id)f.component.props||(f.component.props={}),f.component.props.child={meta:{type:"content-element"},content:{type:"item",id:(0,Af.createId)(),name:"child",childs:ii(w.childs.filter(h=>h),s)}};else{let h=ii(w.childs.filter(m=>m),s);f.childs=h}for(let[w,h]of Object.entries(s))g[w]=h.value;let _=await _api.code_build(g);if(p)for(let[w,h]of Object.entries(_))p[w]?p[w].valueBuilt=h:s[w]&&(s[w].valueBuilt=h);l[a]=f}}t.doc?.transact(()=>{for(let[a,u]of Object.entries(l)){let c=e[a];c.mitem&&syncronize(c.mitem,u)}})}},setValue(l,s){let a=i(),u=s;if(l==="childs")throw new Error("Please modify childs via .child");a.push({type:"set",name:l,value:u})},setProp(l,s){let a=i();typeof s=="string"?a.push({type:"prop",mode:"string",name:l,value:s}):s.mode==="string"?a.push({type:"prop",mode:"string",name:l,value:s.value}):s.mode==="raw"?a.push({type:"prop",mode:"raw",name:l,value:s.value,valueBuilt:s.valueBuilt}):s.mode==="jsx"&&a.push({type:"prop",mode:"jsx",name:l,value:s.value})},setChilds(l){i().push({type:"child",childs:l})},get childs(){let l=t?.toJSON();if(l.component?.id){if((l.component?.props.child).content){let a=t.get("component")?.get("props")?.get("child")?.get("content");if(a)return[ri(e,a,n)]}return[]}return l.childs?l.childs.map(s=>{if(s){let a=e[s.id];if(a&&a.mitem)return ri(e,a.mitem,n)}}).filter(s=>s):[]},get parent(){if(t){let l=t.parent.toJSON();if(Array.isArray(l)){let s=(t.parent?.parent).get("id"),a=e[s].mitem;if(a)return{item:ri(e,a,n),child_type:"child",child_idx:l.findIndex(u=>u.id===o.id)}}}return null}}}},YS=(e,t)=>{let n={};for(let[r,i]of Object.entries(e))i.mode?i.mode==="string"?n[r]={value:JSON.stringify(i.value),valueBuilt:JSON.stringify(i.value),meta:{type:"text"}}:i.mode==="jsx"&&i.value?n[r]={value:"",valueBuilt:"",content:ii([i.value],t)[0],meta:{type:"content-element"}}:i.mode==="raw"&&(n[r]={value:i.value,valueBuilt:i.valueBuilt,meta:{type:"text"}}):n[r]=i;return n},ii=(e,t)=>{let n=t||{};return e.map(i=>{let o={...i};if(delete o.edit,o.id||(o.id=(0,Af.createId)()),o.component&&(o.component.instances||(o.component.instances={}),o.component.ref_ids||(o.component.ref_ids={}),o.component?.props)){o.component.props=YS(o.component.props,n);for(let[l,s]of Object.entries(o.component.props))!s.valueBuilt&&s.value&&(n[o.id+"|||"+l]=s),s.content&&(s.content=ii([s.content],n)[0])}return o.childs?o.childs=ii(o.childs,n):o.childs=[],o})};var oi=(e,t,n)=>({...t,edit:{setChilds(r){},get childs(){if(t.component?.id){let r=t.component?.props.child;return r.content?[oi(e,r.content,n)]:[]}return t.childs?t.childs.map(r=>{if(r){let i=e[r.id];if(i&&i.item)return oi(e,i.item,n)}}).filter(r=>r):[]},get props(){if(t.component?.props){let r={};for(let[i,o]of Object.entries(t.component.props))if(o.content){let l=t.component?.props?.[i]?.content;l?r[i]={mode:"jsx",value:oi(e,l,n)}:r[i]={mode:"jsx",value:null}}else{let l=typeof o.valueBuilt=="string"?o.valueBuilt.trim():"";if(l.endsWith(`; -`)&&(l=l.substring(0,l.length-2)),l&&l===o.value.trim()){let s=new Function(`return ${o.value}`);r[i]={mode:"string",value:s()}}else r[i]={mode:"raw",value:o.value,valueBuilt:o.valueBuilt}}return r}},async commit(){},get parent(){let r=e[t.id];if(r&&r.parent?.id){let i=e[r.parent.id];return oi(e,i.item,n)}return null},pending:[],setProp(r,i){},setValue(r,i){}}});var Lf=P(G()),Cy=(e,t,n,r,i,o)=>{let l=ko(e,t,n,r,i);e.visit&&e.visit(t,l),t.script?t.script.scope=r:t.script={scope:r,result:null,Local:Ry(e,n,t),PassProp:by(e,n,t,r,i)};let s=t.script,a=window.exports,u={useEffect:ar.useEffect,children:l.props.children,props:l.props,Local:s?.Local,db:e.site.db,api:e.site.api,PassProp:s?.PassProp,ErrorBox:Ot,newElement:()=>{},__props:r,_item:t.mitem?ri(e.meta,t.mitem,e.page.cur.id):oi(e.meta,t.item,e.page.cur.id),_meta:e.meta,render:f=>{let p=f;if((0,ar.isValidElement)(f)&&f.props.children){let g=w=>{let h=!1,m=[];if((0,ar.isValidElement)(w)){if(w.type===t.script?.PassProp)return{should_replace:!0,el:{...w,props:{...w.props,internal_key:w.key}}};if(Array.isArray(w.props?.children))for(let y of w.props?.children)if(Array.isArray(y)){let v=[],S=!1;for(let R of y){let k=g(R);k.should_replace?(v.push(k.el),S=!0):v.push(R)}S?(h=!0,m.push(v)):m.push(y)}else typeof y=="object"&&y?y.type===t.script?.PassProp&&(h=!0,m.push({...y,props:{...y.props,internal_key:y.props.key}})):m.push(y)}return{should_replace:h,el:{...w,props:{...w.props,children:m}}}},_=g(f);_.should_replace&&(p=_.el)}s&&(s.result=(0,Lf.jsx)(ar.Suspense,{children:p}))},params,...Ws(e),...a,...r};if(typeof r=="object"){for(let[f,p]of Object.entries(r))if(typeof p=="object"&&p&&p._jsx){let g=p;u[f]=(0,Lf.jsx)(eE,{fn:g.fn,passprop:{...r},meta:t})}}!ut.isEditor&&t.item.adv?.js&&Gs(e,t.item.adv.js);let c=t.item.adv?.jsBuilt||"",d=zf(c,Mf)||"";try{new Function(...Object.keys(u),"___js",`// ${t.item.name}: ${t.item.id} + ${Lg(e,t.mode)} + ${Dg(e,t.mode)} + ${Ng(e,t.mode,t?.editor)} + ${Og(e,t.mode)} + ${hg(e,t.mode)} + ${Ag(e,t.mode)} + `,(t?.hover||t?.active)&&Pg({item:e,hover:t?.hover,active:t?.active}),mg(e,t.mode)])}catch(n){console.log(n)}return cx([])};var Mg=P(G()),bo=(e,t,n,r,i)=>{let o=t.item,s;o.component?.style&&(s={style:o.component.style,className:Cf(o.component.style,{mode:e.mode})});let l={className:Cf(o,{mode:e.mode}),inherit:s},c={},a=t.item.childs,u;return t.item.type==="text"?(u=null,l.dangerouslySetInnerHTML={__html:t.item.html||""}):u=Array.isArray(a)&&a?.map(p=>{if(!p)return null;let{id:f}=p,d=n?e.layout?.meta[f]:e.meta[f];return d?(0,Mg.jsx)(en,{meta:d,is_layout:n,passprop:{...r},depth:i+1},f):null}),l.children=u,t.item.adv?.html?(delete l.children,l.dangerouslySetInnerHTML={__html:t.item.adv?.html}):t.item.adv?.js&&!t.item.adv.js.includes("children")&&(delete l.children,delete l.dangerouslySetInnerHTML),{props:l,text_props:c}};var Uy=P(_e());var zy=P(Wl());var ti={NORMAL:0,WILDCARD:1,PLACEHOLDER:2};function Gl(e={}){let t={options:e,rootNode:Ny(),staticRoutesMap:{}},n=r=>e.strictTrailingSlash?r:r.replace(/\/$/,"")||"/";if(e.routes)for(let r in e.routes)Oy(t,n(r),e.routes[r]);return{ctx:t,lookup:r=>uE(t,n(r)),insert:(r,i)=>Oy(t,n(r),i),remove:r=>cE(t,n(r))}}function uE(e,t){let n=e.staticRoutesMap[t];if(n)return n.data;let r=t.split("/"),i={},o=!1,s=null,l=e.rootNode,c=null;for(let a=0;a1){let f=r.length-a;l=l.placeholderChildren.find(d=>d.maxDepth===f)||null}else l=l.placeholderChildren[0]||null;if(!l)break;l.paramName&&(i[l.paramName]=u),o=!0}else l=p}return(l===null||l.data===null)&&s!==null&&(l=s,i[l.paramName||"_"]=c,o=!0),l?o?{...l.data,params:o?i:void 0}:l.data:null}function Oy(e,t,n){let r=!0,i=t.split("/"),o=e.rootNode,s=0,l=[o];for(let c of i){let a;if(a=o.children.get(c))o=a;else{let u=fE(c);a=Ny({type:u,parent:o}),o.children.set(c,a),u===ti.PLACEHOLDER?(a.paramName=c==="*"?`_${s++}`:c.slice(1),o.placeholderChildren.push(a),r=!1):u===ti.WILDCARD&&(o.wildcardChildNode=a,a.paramName=c.slice(3)||"_",r=!1),l.push(a),o=a}}for(let[c,a]of l.entries())a.maxDepth=Math.max(l.length-c,a.maxDepth||0);return o.data=n,r===!0&&(e.staticRoutesMap[t]=o),o}function cE(e,t){let n=!1,r=t.split("/"),i=e.rootNode;for(let o of r)if(i=i.children.get(o),!i)return n;if(i.data){let o=r.at(-1)||"";i.data=null,Object.keys(i.children).length===0&&i.parent&&(i.parent.children.delete(o),i.parent.wildcardChildNode=null,i.parent.placeholderChildren=[]),n=!0}return n}function Ny(e={}){return{type:e.type||ti.NORMAL,maxDepth:0,parent:e.parent||null,children:new Map,data:e.data||null,paramName:e.paramName||null,wildcardChildNode:null,placeholderChildren:[]}}function fE(e){return e.startsWith("**")?ti.WILDCARD:e[0]===":"||e==="*"?ti.PLACEHOLDER:ti.NORMAL}var dE={id:"",name:"",domain:"",config:{api_url:""},js:"",js_compiled:"",responsive:"",layout:{id:"--",meta:void 0,entry:[]}},pE={id:"",name:"",url:"",snapshot:null,comps:{}};var Ne={active_id:!1,comp_id:!1,instance_comp_id:!1,instance_item_id:!1},ni={should_render_main:!0,hover:{id:""},scope:{},script_nav:{list:[],idx:-1},text:{id:"",content:"",timeout:null,el:null},get item_id(){return Ne.active_id===!1&&(Ne.active_id=localStorage.getItem("prasi-active-id")||""),Ne.active_id||""},set item_id(e){localStorage.setItem("prasi-active-id",e||""),Ne.active_id=e||""},get comp_id(){return Ne.comp_id===!1&&(Ne.comp_id=localStorage.getItem("prasi-comp-id")||""),Ne.comp_id||""},set comp_id(e){localStorage.setItem("prasi-comp-id",e||""),Ne.comp_id=e||""},instance:{get comp_id(){return Ne.instance_comp_id===!1&&(Ne.instance_comp_id=localStorage.getItem("prasi-instance-comp-id")||""),Ne.instance_comp_id||""},set comp_id(e){localStorage.setItem("prasi-instance-comp-id",e||""),Ne.instance_comp_id=e||""},get item_id(){return Ne.instance_item_id===!1&&(Ne.instance_item_id=localStorage.getItem("prasi-instance-item-id")||""),Ne.instance_item_id||""},set item_id(e){localStorage.setItem("prasi-instance-item-id",e||""),Ne.instance_item_id=e||""}}},JT={mode:"",user:{id:"",username:"",client_id:""},clients:{},status:"init",preview:{url_cache:new Set,route_cache:Gl(),page_cache:{},meta_cache:{}},sync:null,sync_assigned:!1,site:Xr(dE),site_tstamp:Date.now(),site_exports:{},site_dts:"",site_dts_entry:{},prisma_ext:"",script:{site_types:{},loaded:!1,do_edit:async(e,t)=>{},db:null,api:null,init_local_effect:{}},page:{history:{id:"",show:!1},root_id:"root",cur:pE,doc:null,list:{},building:!1,meta:{},entry:[],tree:[],render:()=>{}},comp:{doc:null,item:null,loaded:{},list:{},group:{}},code:{},global_prop:[],ui:{monaco:null,comp_editable:localStorage.getItem("prasi-comp-editable")==="yes",zoom:localStorage.zoom||"100%",side:{prop:!0},layout:{left:parseInt(localStorage.getItem("prasi-layout-left")||"250"),right:parseInt(localStorage.getItem("prasi-layout-right")||"250")},prevent_indent_hook:!1,syncing:!1,tree:{item_loading:[],search:"",search_ref:null,search_mode:{Name:!0,JS:!1,HTML:!1,CSS:!1},rename_id:"",open:{}},popup:{file:{enabled:!1,open:!1,picker:{value:"",on_pick:!1,multi:!1},path:"/",expanded:JSON.parse(localStorage.getItem("panel-file-expanded")||"{}"),entry:{},selected:new Set,action:null,file_renaming:"",file_ctx_menu_event:null,tree:[],tree_renaming:"",tree_ctx_path:"",tree_ctx_menu_event:null,preview:!0,upload:{started:!1,progress:{}}},code:{init:!1,open:!1,name:"site",log:"",loading:!1,rebuilding:!1,startup_status:"init",error:!1,show_log:!1,list:{}},page:{open:null,form:null},script:{open:!1,mode:"js",lastMode:"js",type:"item",prop_kind:"",prop_name:"",on_close:()=>{},typings:{status:"ok",err_msg:""},wb_render:()=>{}},site:null,site_form:null,comp:{preview_id:"",open:null,import:!1},comp_group:null,api:{open:!1}}}};var Zl=e=>({isMobile:e.mode==="mobile",isDesktop:e.mode==="desktop",isEditor:location.pathname.startsWith("/ed/")});var ur=P(_e());var ut=window;var mE=gf("prasi-cache","prasi-cache-store"),No={timeout:null,store:mE},Kl=(e,t)=>{let n=[...Py(t,"navigate(",")"),...Py(t,"href = ",";")],r=e.page.cur.id;e.page.navs[r]||(e.page.navs[r]=new Set);for(let i of n)e.page.navs[r].add(i);clearTimeout(No.timeout),No.timeout=setTimeout(()=>{e.on_nav_loaded&&e.on_nav_loaded({urls:Array.from(e.page.navs[r])})},100)},Py=(e,t,n)=>{let r=0,i=0,o=[];for(;;){let s=e.indexOf(t,r);if(i=r,s>=0){let l=e[s+t.length];if(l==='"'||l==="'"||l==="`"){let c=e.indexOf(`${l}${n}`,s+t.length+1),a=e.substring(s+t.length+1,c);r=c+2+n.length,o.push(a)}}if(i===r)break}return o};var ar=P(_e());var Ay=P(Rf()),lr=P(_e());var zf=P(G()),Ly=(e,t,n,r,i)=>o=>{let[s,l]=(0,lr.useState)({}),c=o.internal_key;n.item.script||(n.item.script={});let a=n.item.script;c&&(n.item.script_keyed||(n.item.script_keyed={}),n.item.script_keyed[c]||(n.item.script_keyed[c]={}),a=n.item.script_keyed[c]),a.passprop||(a.passprop={});let u={};if(a.passprop){let d=!1;for(let[g,_]of Object.entries(o))["children","key"].includes(g)||(d=!0,u[g]=_)}let p={...r,...u};if(!Array.isArray(o.children)&&(0,lr.isValidElement)(o.children)&&typeof o.children=="object"){let d=(0,Ay.default)(o.children,"props.meta.item.component.props.child.content.childs");if(Array.isArray(d)){let g=!0;for(let _ of d)!(0,lr.isValidElement)(_)&&typeof _=="object"||(g=!1);if(g)return d.map(_=>{let w=e.meta[_.id];if(w||(e.meta[_.id]={item:_},w=e.meta[_.id]),w){if(Object.keys(w.item).length<=3&&w.mitem){let h={...w.item},m=w.mitem.toJSON();w.item={...m,...h}}return(0,zf.jsx)(en,{is_layout:t,meta:w,passprop:p,parent_key:o.internal_key,depth:i},_.id)}return null})}}if(!Array.isArray(o.children)&&!(0,lr.isValidElement)(o.children)&&typeof o.children=="object"){let d=o.children.id;if(d){let g=e.meta[d];if(!g){e.meta[d]={item:o.children},g=e.meta[d];let _=g.item.component?.id;_&&e.comp.load(_).then(w=>{if(w){for(let[m,y]of Object.entries(w)){let v=g.item;v[m]||(v[m]=y)}let h=g.item.component?.props;for(let[m,y]of Object.entries(w.component?.props||{}))h[m]||(h[m]=y);l({})}})}return(0,zf.jsx)(en,{is_layout:t,meta:g,passprop:p,parent_key:o.internal_key,depth:i})}}return jf(o,p,c?{parent_key:c}:void 0)},jf=(e,t,n)=>{let r={};if(Array.isArray(e)?r.children=e:r=e,Array.isArray(r.children)){if(r.children.length===1)return Mf(r.children[0],r,t,n);let i=[];for(let o of r.children)i.push(Mf(o,r,t,n));return i}return Mf(r.children,r,t,n)},Mf=(e,t,n,r)=>{if((0,lr.isValidElement)(e)){let i={...t};return delete i.children,{...e,props:{...e.props,...r,passprop:{...n,...i}}}}return e};var ri={},Dy=(e,t,n)=>r=>{let i=["localhost","prasi.avolut.com"].includes(location.hostname)&&location.pathname.startsWith("/ed/"),o=n.item.id,{children:s,parent_key:l}=r,c=e.script?.init_local_effect,a=t?e.layout?.meta:e.meta,u=(0,ar.useRef)(ri[o]?ri[o]:r.value),[p,f]=(0,ar.useState)({}),d=u.current;return d.render=()=>{window.prasiContext.render?window.prasiContext.render():f({})},ql(e,n,n.script?.scope,l),r.hook&&r.hook(d),(0,ar.useEffect)(()=>{if(n.parent?.instance_id&&a){let _=a[n.parent?.instance_id];if(_&&_.instances){for(let[w,h]of Object.entries(_.instances[n.parent.instance_id]))if(h===n.item.id){o=w;break}}}return!c[o]&&(typeof c=="object"&&(c[o]=!0),(async()=>r.effect&&(await r.effect(d),i&&(ri[o]=d)))()),()=>{}},[...r.deps||[],location.pathname]),(0,ar.useEffect)(()=>{i&&ri[o]===null&&(async()=>r.effect&&(await r.effect(d),i&&(ri[o]=d)))()},[ri[o]]),jf(s,{...n.script?.scope,[r.name]:d})};var Ff=P(Wl()),Po=window,ii=(e,t,n)=>{Po.prasiEdit||(Po.prasiEdit={});let r=Po.prasiEdit[n];r||(Po.prasiEdit[n]={},r=Po.prasiEdit[n]);let i=()=>{let s=t.get("id")||"",l=r[s];return l||(r[s]=[],l=r[s]),l},o=t.toJSON();return{...o,edit:{get props(){if(o.component?.props){let s={};for(let[l,c]of Object.entries(o.component.props))if(c.content){let a=t.get("component")?.get("props")?.get(l)?.get("content");a?s[l]={mode:"jsx",value:ii(e,a,n)}:s[l]={mode:"jsx",value:null}}else{let a=typeof c.valueBuilt=="string"?c.valueBuilt.trim():"";if(a.endsWith(`; +`)&&(a=a.substring(0,a.length-2)),a&&a===c.value.trim()){let u=new Function(`return ${c.value}`);s[l]={mode:"string",value:u()}}else s[l]={mode:"raw",value:c.value,valueBuilt:c.valueBuilt}}return s}},get pending(){return[]},async commit(){let s={},l={};if(t){for(let[c,a]of Object.entries(r)){let u=e[c];if(!u||!u.mitem)continue;let f=u.mitem.toJSON();if(f&&f.component){let d=f?.component?.props;if(!d){console.log(f,d);return}let g={};for(let w of a)if(w.type==="prop"&&d)d[w.name]&&(w.mode==="string"?(d[w.name].value=JSON.stringify(w.value),d[w.name].valueBuilt=JSON.stringify(w.value)):w.mode==="raw"?(d[w.name].value=w.value,w.valueBuilt?d[w.name].valueBuilt=w.valueBuilt:g[w.name]=w.value):w.mode==="jsx"&&(d[w.name]||(d[w.name]={meta:{type:"content-element"}}),w.value&&(d[w.name].content=oi([w.value],l)[0])));else if(w.type==="set"&&typeof w.value=="object")for(let[h,m]of Object.entries(w.value))f[h]=m;else if(w.type==="child"&&Array.isArray(w.childs))if(f.component?.id)f.component.props||(f.component.props={}),f.component.props.child={meta:{type:"content-element"},content:{type:"item",id:(0,Ff.createId)(),name:"child",childs:oi(w.childs.filter(h=>h),l)}};else{let h=oi(w.childs.filter(m=>m),l);f.childs=h}for(let[w,h]of Object.entries(l))g[w]=h.value;let _=await _api.code_build(g);if(d)for(let[w,h]of Object.entries(_))d[w]?d[w].valueBuilt=h:l[w]&&(l[w].valueBuilt=h);s[c]=f}}t.doc?.transact(()=>{for(let[c,a]of Object.entries(s)){let u=e[c];u.mitem&&syncronize(u.mitem,a)}})}},setValue(s,l){let c=i(),a=l;if(s==="childs")throw new Error("Please modify childs via .child");c.push({type:"set",name:s,value:a})},setProp(s,l){let c=i();typeof l=="string"?c.push({type:"prop",mode:"string",name:s,value:l}):l.mode==="string"?c.push({type:"prop",mode:"string",name:s,value:l.value}):l.mode==="raw"?c.push({type:"prop",mode:"raw",name:s,value:l.value,valueBuilt:l.valueBuilt}):l.mode==="jsx"&&c.push({type:"prop",mode:"jsx",name:s,value:l.value})},setChilds(s){i().push({type:"child",childs:s})},get childs(){let s=t?.toJSON();if(s.component?.id){if((s.component?.props.child).content){let c=t.get("component")?.get("props")?.get("child")?.get("content");if(c)return[ii(e,c,n)]}return[]}return s.childs?s.childs.map(l=>{if(l){let c=e[l.id];if(c&&c.mitem)return ii(e,c.mitem,n)}}).filter(l=>l):[]},get parent(){if(t){let s=t.parent.toJSON();if(Array.isArray(s)){let l=(t.parent?.parent).get("id"),c=e[l].mitem;if(c)return{item:ii(e,c,n),child_type:"child",child_idx:s.findIndex(a=>a.id===o.id)}}}return null}}}},hE=(e,t)=>{let n={};for(let[r,i]of Object.entries(e))i.mode?i.mode==="string"?n[r]={value:JSON.stringify(i.value),valueBuilt:JSON.stringify(i.value),meta:{type:"text"}}:i.mode==="jsx"&&i.value?n[r]={value:"",valueBuilt:"",content:oi([i.value],t)[0],meta:{type:"content-element"}}:i.mode==="raw"&&(n[r]={value:i.value,valueBuilt:i.valueBuilt,meta:{type:"text"}}):n[r]=i;return n},oi=(e,t)=>{let n=t||{};return e.map(i=>{let o={...i};if(delete o.edit,o.id||(o.id=(0,Ff.createId)()),o.component&&(o.component.instances||(o.component.instances={}),o.component.ref_ids||(o.component.ref_ids={}),o.component?.props)){o.component.props=hE(o.component.props,n);for(let[s,l]of Object.entries(o.component.props))!l.valueBuilt&&l.value&&(n[o.id+"|||"+s]=l),l.content&&(l.content=oi([l.content],n)[0])}return o.childs?o.childs=oi(o.childs,n):o.childs=[],o})};var si=(e,t,n)=>({...t,edit:{setChilds(r){},get childs(){if(t.component?.id){let r=t.component?.props.child;return r.content?[si(e,r.content,n)]:[]}return t.childs?t.childs.map(r=>{if(r){let i=e[r.id];if(i&&i.item)return si(e,i.item,n)}}).filter(r=>r):[]},get props(){if(t.component?.props){let r={};for(let[i,o]of Object.entries(t.component.props))if(o.content){let s=t.component?.props?.[i]?.content;s?r[i]={mode:"jsx",value:si(e,s,n)}:r[i]={mode:"jsx",value:null}}else{let s=typeof o.valueBuilt=="string"?o.valueBuilt.trim():"";if(s.endsWith(`; +`)&&(s=s.substring(0,s.length-2)),s&&s===o.value.trim()){let l=new Function(`return ${o.value}`);r[i]={mode:"string",value:l()}}else r[i]={mode:"raw",value:o.value,valueBuilt:o.valueBuilt}}return r}},async commit(){},get parent(){let r=e[t.id];if(r&&r.parent?.id){let i=e[r.parent.id];return si(e,i.item,n)}return null},pending:[],setProp(r,i){},setValue(r,i){}}});var Uf=P(G()),My=(e,t,n,r,i,o)=>{let s=bo(e,t,n,r,i);e.visit&&e.visit(t,s),t.script?t.script.scope=r:t.script={scope:r,result:null,Local:Dy(e,n,t),PassProp:Ly(e,n,t,r,i)};let l=t.script,c=window.exports,a={useEffect:ur.useEffect,children:s.props.children,props:s.props,Local:l?.Local,db:e.site.db,api:e.site.api,PassProp:l?.PassProp,ErrorBox:Pt,newElement:()=>{},__props:r,_item:t.mitem?ii(e.meta,t.mitem,e.page.cur.id):si(e.meta,t.item,e.page.cur.id),_meta:e.meta,render:f=>{let d=f;if((0,ur.isValidElement)(f)&&f.props.children){let g=w=>{let h=!1,m=[];if((0,ur.isValidElement)(w)){if(w.type===t.script?.PassProp)return{should_replace:!0,el:{...w,props:{...w.props,internal_key:w.key}}};if(Array.isArray(w.props?.children))for(let y of w.props?.children)if(Array.isArray(y)){let v=[],S=!1;for(let R of y){let k=g(R);k.should_replace?(v.push(k.el),S=!0):v.push(R)}S?(h=!0,m.push(v)):m.push(y)}else typeof y=="object"&&y?y.type===t.script?.PassProp&&(h=!0,m.push({...y,props:{...y.props,internal_key:y.props.key}})):m.push(y)}return{should_replace:h,el:{...w,props:{...w.props,children:m}}}},_=g(f);_.should_replace&&(d=_.el)}l&&(l.result=(0,Uf.jsx)(ur.Suspense,{children:d}))},params,...Zl(e),...c,...r};if(typeof r=="object"){for(let[f,d]of Object.entries(r))if(typeof d=="object"&&d&&d._jsx){let g=d;a[f]=(0,Uf.jsx)(gE,{fn:g.fn,passprop:{...r},meta:t})}}!ut.isEditor&&t.item.adv?.js&&Kl(e,t.item.adv.js);let u=t.item.adv?.jsBuilt||"",p=$f(u,Bf)||"";try{new Function(...Object.keys(a),"___js",`// ${t.item.name}: ${t.item.id} try { -${d} +${p} } catch(e) { console.warn("Error at item ${t.item.name}:", ___js); console.error(e); } - `)(...Object.values(u),t.item.adv?.js)}catch(f){console.warn(`Error at item ${t.item.name}:`,t.item.adv?.js),console.error(f)}Zs(e,t,r,o)},eE=({fn:e,meta:t,passprop:n})=>e({passprop:n,meta:t}),Mf={"stroke-width":"strokeWidth","fill-rule":"fillRule","clip-rule":"clipRule","stroke-linejoin":"strokeLinejoin","stroke-linecap":"strokeLinecap","clip-path":"clipPath"},zf=(e,t)=>{let n=e;for(let[r,i]of Object.entries(t))n=n.replaceAll(r,i);return n};var Oy=P(G());var Ny=(e,t,n,r,i,o)=>{if(t.item.component?.id){let l=t.item.script;if(o?(t.item.script_keyed||(t.item.script_keyed={}),t.item.script_keyed[o]||(t.item.script_keyed[o]={}),l=t.item.script_keyed[o]):(t.item.script||(t.item.script={}),l=t.item.script),!l)return;let a={...window.exports,db:e.site.db,api:e.site.api,...Ws(e),...r,params};l.props={};let u=new Set;if(t.item.component.props){let c={};for(let[d,f]of Object.entries(t.item.component.props))try{if(f.meta?.type==="content-element"){let h={_jsx:!0,fn:m=>{let y=f.content?.id;if(y){let v=n?e.layout?.meta[y]:e.meta[y];if(!v)return null;let S=t.instances;if(!m.meta.item.originalId||!S||!S[t.item.id])return null;let k=m.meta.item.originalId;if(v.mitem&&(f.jsxCalledBy&&(!f.jsxCalledBy.includes(k)||f.jsxCalledBy.length!==2)||!f.jsxCalledBy)){let b=t.mitem?.get("component")?.get("props")?.get(d);if(b){let O=b.get("jsxCalledBy");!O||typeof O!="object"?b.set("jsxCalledBy",[t.item.id,k]):Array.isArray(O)&&(!O.includes(k)||O.length!==2||O[0]!==t.item.id||O[1]!==k)&&b.set("jsxCalledBy",[t.item.id,k])}}return(0,Oy.jsx)(qt,{meta:v,passprop:m.passprop,is_layout:n,depth:i+1})}return null}};a[d]=h,r&&(r[d]=h);continue}if(f.value&&Gs(e,f.value),!f.valueBuilt&&f.value&&t.mitem){let h=t.mitem?.get("component")?.get("props")?.get(d);if(h){tE(h,f.value);return}}let p=f.valueBuilt||"",g=zf(p,Mf)||"",_=new Function(...Object.keys(a),`// [${t.item.name}] ${d}: ${t.item.id} + `)(...Object.values(a),t.item.adv?.js)}catch(f){console.warn(`Error at item ${t.item.name}:`,t.item.adv?.js),console.error(f)}ql(e,t,r,o)},gE=({fn:e,meta:t,passprop:n})=>e({passprop:n,meta:t}),Bf={"stroke-width":"strokeWidth","fill-rule":"fillRule","clip-rule":"clipRule","stroke-linejoin":"strokeLinejoin","stroke-linecap":"strokeLinecap","clip-path":"clipPath"},$f=(e,t)=>{let n=e;for(let[r,i]of Object.entries(t))n=n.replaceAll(r,i);return n};var Fy=P(G());var jy=(e,t,n,r,i,o)=>{if(t.item.component?.id){let s=t.item.script;if(o?(t.item.script_keyed||(t.item.script_keyed={}),t.item.script_keyed[o]||(t.item.script_keyed[o]={}),s=t.item.script_keyed[o]):(t.item.script||(t.item.script={}),s=t.item.script),!s)return;let c={...window.exports,db:e.site.db,api:e.site.api,...Zl(e),...r,params};s.props={};let a=new Set;if(t.item.component.props){let u={};for(let[p,f]of Object.entries(t.item.component.props))try{if(f.meta?.type==="content-element"){let h={_jsx:!0,fn:m=>{let y=f.content?.id;if(y){let v=n?e.layout?.meta[y]:e.meta[y];if(!v)return null;let S=t.instances;if(!m.meta.item.originalId||!S||!S[t.item.id])return null;let k=m.meta.item.originalId;if(v.mitem&&(f.jsxCalledBy&&(!f.jsxCalledBy.includes(k)||f.jsxCalledBy.length!==2)||!f.jsxCalledBy)){let b=t.mitem?.get("component")?.get("props")?.get(p);if(b){let O=b.get("jsxCalledBy");!O||typeof O!="object"?b.set("jsxCalledBy",[t.item.id,k]):Array.isArray(O)&&(!O.includes(k)||O.length!==2||O[0]!==t.item.id||O[1]!==k)&&b.set("jsxCalledBy",[t.item.id,k])}}return(0,Fy.jsx)(en,{meta:v,passprop:m.passprop,is_layout:n,depth:i+1})}return null}};c[p]=h,r&&(r[p]=h);continue}if(f.value&&Kl(e,f.value),!f.valueBuilt&&f.value&&t.mitem){let h=t.mitem?.get("component")?.get("props")?.get(p);if(h){yE(h,f.value);return}}let d=f.valueBuilt||"",g=$f(d,Bf)||"",_=new Function(...Object.keys(c),`// [${t.item.name}] ${p}: ${t.item.id} return ${g} - `);l.props[d]={value:g};let w=_(...Object.values(a));typeof w=="function"&&(l.props[d].fn=w,w=(...h)=>{if(l)return l.props?.[d].fn(...h)}),a[d]=w,c[d]=w,r&&(r[d]=w)}catch{u.add(d)}if(location.pathname.startsWith("/ed/")&&ti.item_id&&t.item.id===ti.item_id){ti.scope={};for(let[d,f]of Object.entries(r))ti.scope[d]=f;ti.scope.self_props=c}}}},ct={timeout:null,set:new WeakSet,map:{},src:{}},tE=(e,t)=>{if(!ct.set.has(e)){ct.set.add(e);let n=(0,Iy.createId)();ct.map[n]={mprop:e},ct.src[n]=t}clearTimeout(ct.timeout),ct.timeout=setTimeout(async()=>{let n=await _api.code_build(ct.src),r=null;for(let[i,o]of Object.entries(n)){let l=ct.map[i].mprop;if(!r&&l.doc){r=l.doc;break}}r&&(r.transact(()=>{for(let[i,o]of Object.entries(n))ct.map[i].mprop.set("valueBuilt",o)}),ct.set=new WeakSet,ct.map={},ct.src={})},300)},Zs=(e,t,n,r)=>{let i=r?t.item.script_keyed?.[r]:t.item.script;if(i&&i.props){let o={...n,api:e.site.api,db:e.site.db};for(let[l,s]of Object.entries(i.props))if(s.fn){let a=new Function(...Object.keys(o),`// [${t.item.name}] ${l}: ${t.item.id} - return ${s.value||""} - `);s.fn=a(...Object.values(o))}}};var Df=P(G()),jf=({meta:e,passprop:t,is_layout:n,parent_key:r,depth:i})=>{let o=On(Tn,"VI"),[l,s]=(0,Ty.useState)({});e.render=()=>{s({})};let a=t;return e.item.component?.id&&(a||(a={}),Ny(o,e,n,a,i,r)),e.item.adv?.html?(0,Df.jsx)(Ks,{meta:e,passprop:a,is_layout:n,depth:i}):e.item.adv?.js&&(Cy(o,e,n,a,i,r),e.script)?e.script.result:(0,Df.jsx)(Ks,{meta:e,passprop:a,is_layout:n,depth:i})};var we=P(G()),nE=70,rE={debug:!!localStorage.getItem("prasi-js-debug")},Qs={enabled:!1,meta:{}},qt=({meta:e,passprop:t,is_layout:n,parent_key:r,depth:i})=>{if(Qs.enabled){let o=Qs.meta;if(o[e.item.id]?o[e.item.id].last_render===Math.floor(Date.now()/1e3)?o[e.item.id].count++:o[e.item.id]={last_render:Math.floor(Date.now()/1e3),count:1}:o[e.item.id]={last_render:Math.floor(Date.now()/1e3),count:1},o[e.item.id]?.count>nE)return(0,we.jsxs)("div",{className:"bg-orange-100 border border-orange-300 rounded-sm text-xs flex flex-col items-center",children:[(0,we.jsxs)("div",{className:"text-[10px] font-bold text-red-900 self-stretch px-1",children:["WARNING: Render loop detected in [",e.item.name,"]"]}),(0,we.jsxs)("p",{className:"border-b border-orange-300 px-1 pb-1 min-w-[100px]",children:["Rendered ",o[e.item.id]?.count," times in less than 1 second."]})]})}if(!e||e.item.hidden)return null;if(rE.debug){let o="";for(let l=0;l{let o=On(Tn,"VI");if(n&&e.item.name==="children"){let s=[];for(let a of o.entry){let u=o.meta[a];if(u.item.adv?.js||u.item.component?.id)s.push((0,we.jsx)(Ot,{meta:u,children:(0,we.jsx)(jf,{meta:u,is_layout:!1,passprop:{...t},parent_key:r,depth:i+1})}));else{let c=ko(o,u,!1,t,i);o.visit&&o.visit(u,c),s.push((0,we.jsx)("div",{...c.props}))}}return(0,we.jsx)(we.Fragment,{children:s.map((a,u)=>(0,we.jsx)(Py.Fragment,{children:a},u))})}let l=ko(o,e,n,t,i);return o.visit&&o.visit(e,l),(0,we.jsx)("div",{...l.props})};var Je=window,Ay=async(e,t)=>{window.parent&&(window.addEventListener("message",async({data:n})=>{if(typeof n=="object"&&n.mobile){let r=n,i=async o=>{if(!Je.notif?.onTap){let l=null,s=0;await new Promise(()=>{l=setInterval(()=>{s++,s>20&&clearInterval(l),o()&&clearInterval(l)},500)});return}};switch(r.type){case"notification-token":t.notif={token:r.token},Je.notif={async send(o){if(e&&e.site.api)return await e.site.api._notif("send",{type:"send",id:typeof o.user_id=="string"?o.user_id:o.user_id.toString(),body:o.body,title:o.title,data:o.data})},async register(o){if(e&&e.site.api&&t.notif?.token)return await e.site.api._notif("register",{type:"register",id:typeof o=="string"?o:o.toString(),token:t.notif.token})},onReceive(o){},onTap(o){}};break;case"notification-tap":if(!Je.notif?.onTap){i(()=>Je.notif?.onTap?(Je.notif?.onTap(r.notif),!0):!1);return}Je.notif?.onTap&&Je.notif?.onTap(r.notif);break;case"notification-receive":Je.notif?.onReceive||i(()=>Je.notif?.onReceive?(Je.notif?.onReceive(r.notif),!0):!1),Je.notif?.onReceive&&Je.notif?.onReceive(r.notif);break}}}),window.parent.postMessage({mobile:!0,type:"ready"},"*")),Je.notif={async send(n){if(e&&e.site.api)return await e.site.api._notif("send",{type:"send",id:typeof n.user_id=="string"?n.user_id:n.user_id.toString(),body:n.body,title:n.title,data:n.data})}}};var Ff=window;Ff.prasi_ext||(Ff.prasi_ext={});var Xs=Ff.prasi_ext;var Ly=async e=>{let t=Xs[e.site.id];if(t||(Xs[e.site.id]={status:"init"},t=Xs[e.site.id]),t.status==="init"){if(t.status="loading",window.parent!==window){let n=r=>{window.parent.postMessage({mobile:!0,...r},"*")};window.addEventListener("message",async({data:r})=>{console.log(r),typeof r=="object"&&r.mobile}),n({type:"ready"})}await Ay(e,t),t.status="ready"}};var li=P(G()),My=({})=>{let e=On(Tn,"VI"),t=Nn({tick:Date.now()});if(e.tick=t.tick,Ly(e),e.status!=="ready")return(0,li.jsx)("div",{className:"flex flex-1 flex-col relative",children:(0,li.jsx)(wo,{backdrop:!1})});let n=!!e.layout?.entry&&e.layout.entry.length>0,r=e.entry;return n&&e.layout?.entry&&(r=e.layout?.entry),(0,li.jsx)("div",{className:"flex flex-1 flex-col relative",children:Array.isArray(r)&&r.map(i=>{let o=n?e.layout?.meta[i]:e.meta[i];return o&&Element?(0,li.jsx)(Ot,{children:(0,li.jsx)(qt,{meta:o,is_layout:n,depth:0})},o.item.id):null})})};var qs=P(G()),si=window,zy=({meta:e,entry:t,api_url:n,site_id:r,api:i,mode:o,db:l,visit:s,script:a,page_id:u,render_stat:c,on_status_changed:d,on_preload:f,layout:p,comp_load:g})=>{let _=On(Tn,"VI");return _.mode=o,_.entry=t,_.on_preload=f,_.comp.load=g,si.siteurl=(w,h)=>{if(w.startsWith("http://")||w.startsWith("https://"))return w;try{["prasi.avolut.com","localhost"].includes(location.hostname)?_.site.api_url&&(_.site_url||(_.site_url=new URL(_.site.api_url))):_.site_url||(h&&_.site.api_url?_.site_url=new URL(_.site.api_url):_.site_url=new URL(location.href),_.site_url.pathname="")}catch{}if(_.site_url){let m=_.site_url,y=w;return y.startsWith("/")||(y="/"+y),si.prasiContext.siteUrl&&(y=si.prasiContext.siteUrl(y)),`${m.protocol}//${m.host}${y}`}return w},si.isMobile=o==="mobile",si.isDesktop=o==="desktop",si.preload=(w,h)=>{_.page.navs[u]||(_.page.navs[u]=new Set);let m=typeof w=="string"?[w]:w;for(let y of m)_.page.navs[u].add(y);return clearTimeout(No.timeout),No.timeout=setTimeout(()=>{_.on_preload&&_.on_preload({urls:Array.from(_.page.navs[u]),opt:{on_load:h?.on_load}})},100),""},_.layout=p,_.page.cur.id=u,_.on_status_changes=d,c==="disabled"&&(Qs.enabled=!1),_.meta!==e&&(_.meta=e),a&&(_.script.init_local_effect=a.init_local_effect),_.visit=s,_.status==="init"&&(_.site.db=l,_.site.api=i,eg(_,{api_url:n,site_id:r})),f&&(0,Js.useEffect)(()=>{setTimeout(()=>{let w=_.page.navs[_.page.cur.id];w&&f({urls:Array.from(w),opt:{on_load(h){}}})},500)},[_.page.cur.id]),(0,qs.jsx)(Ot,{children:(0,qs.jsx)(Js.Suspense,{children:(0,qs.jsx)(My,{})})})};var Uf=window,I={root:null,url(...e){let t=e.map(r=>Array.isArray(r)?r.join(""):r).join(""),n=this.root.toString();return n.endsWith("/")&&(n=n.substring(0,n.length-1)),t.startsWith("/")?n+t:n+"/"+t},get pathname(){let e=location.pathname.substring(I.root.pathname.length);return e.startsWith("/")?e:`/${e}`},site:{id:Uf._prasi?.site_id},init_local_effect:{},mode:"",route:{status:"init",pages:[],router:null},comp:{list:{},pending:{}},layout:{id:"",root:null,meta:null},cache:{urls:new Set},page:{id:"",url:"",root:null,meta:null,cache:{}}},Dy=()=>{if(!I.root){let e=new URL(location.href);Uf._prasi.basepath&&(e.pathname=Uf._prasi.basepath),I.root=new URL(`${e.protocol}//${e.host}${e.pathname}`),I.root.pathname.endsWith("/")&&(I.root.pathname=I.root.pathname.substring(0,I.root.length-1))}};var ai=async e=>{let t=I.comp;for(let r of e)r&&r.type!=="text"&&Ys(r);let n=Object.keys(t.pending);if(n.length>0)try{let r=await(await fetch(I.url`_prasi/comp`,{method:"POST",body:JSON.stringify({ids:[...n]})})).json();for(let[i,o]of Object.entries(r))delete t.pending[i],t.list[i]=o,await zs(`comp-${i}`,o);if(Object.keys(t.pending).length>0){console.warn(`Warning: component not found: ${Object.keys(t.pending)}`);return}await ai(Object.values(r))}catch(r){console.error(r)}},Ys=e=>{let t=I.comp;if(e.type==="item"){let n=e.component?.id;if(n&&(!t.list[n]&&!t.pending[n]&&(t.pending[n]=[]),t.pending[n]&&(t.pending[n].find(r=>r.id===e.id)||t.pending[n].push(e)),t.pending[n])){if(t.list[n]){for(let r of t.pending[n])for(let i of Object.values(r.component?.props||{}))i.content&&Ys(i.content);delete t.pending[n]}else if(e.component?.props)for(let r of Object.values(e.component?.props||{}))r.content&&Ys(r.content)}}if(e.childs)for(let n of e.childs){let r=n;r&&r.type!=="text"&&Ys(r)}};var jy=e=>new Promise(async t=>{let n=!1,r=await df(`page-${e}`);r&&(t(r),n=!0);let i=await(await fetch(I.url`_prasi/page/${e}`)).json();n||t(i)}),iE=e=>new Promise(async t=>{let n={},r=[...new Set(e)],i=!0;for(let l of r){let s=await df(`page-${l}`);if(s)n[l]=s;else{i=!1;break}}i&&t(n);let o=await(await fetch(I.url`_prasi/pages`,{method:"POST",body:JSON.stringify({ids:r})})).json();i||t(o)}),Fy=async e=>{let t=e.map(r=>I.route.router?.lookup(r)).filter(r=>r&&r.id);return await iE(t.map(r=>r?.id))};var By=P(Uy()),$y=()=>{let e=I;if(e.site.id){if(!e.mode&&e.site.responsive)if(e.site.responsive!=="mobile-only"&&e.site.responsive!=="desktop-only"){let t=(0,By.default)();e.mode=t.device.type==="mobile"?"mobile":"desktop"}else e.site.responsive==="mobile-only"?e.mode="mobile":e.site.responsive==="desktop-only"&&(e.mode="desktop");localStorage.getItem("prasi-editor-mode")&&(e.mode=localStorage.getItem("prasi-editor-mode"))}};function Po(e,t){return function(){return e.apply(t,arguments)}}var{toString:oE}=Object.prototype,{getPrototypeOf:Hf}=Object,na=(e=>t=>{let n=oE.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Pt=e=>(e=e.toLowerCase(),t=>na(t)===e),ra=e=>t=>typeof t===e,{isArray:ui}=Array,Ao=ra("undefined");function lE(e){return e!==null&&!Ao(e)&&e.constructor!==null&&!Ao(e.constructor)&&ft(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var Wy=Pt("ArrayBuffer");function sE(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Wy(e.buffer),t}var aE=ra("string"),ft=ra("function"),Gy=ra("number"),ia=e=>e!==null&&typeof e=="object",uE=e=>e===!0||e===!1,ta=e=>{if(na(e)!=="object")return!1;let t=Hf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},cE=Pt("Date"),fE=Pt("File"),dE=Pt("Blob"),pE=Pt("FileList"),mE=e=>ia(e)&&ft(e.pipe),hE=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ft(e.append)&&((t=na(e))==="formdata"||t==="object"&&ft(e.toString)&&e.toString()==="[object FormData]"))},gE=Pt("URLSearchParams"),yE=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Lo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),ui(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}var Ky=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Qy=e=>!Ao(e)&&e!==Ky;function $f(){let{caseless:e}=Qy(this)&&this||{},t={},n=(r,i)=>{let o=e&&Zy(t,i)||i;ta(t[o])&&ta(r)?t[o]=$f(t[o],r):ta(r)?t[o]=$f({},r):ui(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r(Lo(t,(i,o)=>{n&&ft(i)?e[o]=Po(i,n):e[o]=i},{allOwnKeys:r}),e),vE=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),wE=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},xE=(e,t,n,r)=>{let i,o,l,s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)l=i[o],(!r||r(l,e,t))&&!s[l]&&(t[l]=e[l],s[l]=!0);e=n!==!1&&Hf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kE=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},SE=e=>{if(!e)return null;if(ui(e))return e;let t=e.length;if(!Gy(t))return null;let n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},EE=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Hf(Uint8Array)),bE=(e,t)=>{let r=(e&&e[Symbol.iterator]).call(e),i;for(;(i=r.next())&&!i.done;){let o=i.value;t.call(e,o[0],o[1])}},RE=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},CE=Pt("HTMLFormElement"),IE=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Hy=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),NE=Pt("RegExp"),Xy=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};Lo(n,(i,o)=>{let l;(l=t(i,o,e))!==!1&&(r[o]=l||i)}),Object.defineProperties(e,r)},OE=e=>{Xy(e,(t,n)=>{if(ft(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;let r=e[n];if(ft(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},TE=(e,t)=>{let n={},r=i=>{i.forEach(o=>{n[o]=!0})};return ui(e)?r(e):r(String(e).split(t)),n},PE=()=>{},AE=(e,t)=>(e=+e,Number.isFinite(e)?e:t),Bf="abcdefghijklmnopqrstuvwxyz",Vy="0123456789",qy={DIGIT:Vy,ALPHA:Bf,ALPHA_DIGIT:Bf+Bf.toUpperCase()+Vy},LE=(e=16,t=qy.ALPHA_DIGIT)=>{let n="",{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function ME(e){return!!(e&&ft(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var zE=e=>{let t=new Array(10),n=(r,i)=>{if(ia(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;let o=ui(r)?[]:{};return Lo(r,(l,s)=>{let a=n(l,i+1);!Ao(a)&&(o[s]=a)}),t[i]=void 0,o}}return r};return n(e,0)},DE=Pt("AsyncFunction"),jE=e=>e&&(ia(e)||ft(e))&&ft(e.then)&&ft(e.catch),x={isArray:ui,isArrayBuffer:Wy,isBuffer:lE,isFormData:hE,isArrayBufferView:sE,isString:aE,isNumber:Gy,isBoolean:uE,isObject:ia,isPlainObject:ta,isUndefined:Ao,isDate:cE,isFile:fE,isBlob:dE,isRegExp:NE,isFunction:ft,isStream:mE,isURLSearchParams:gE,isTypedArray:EE,isFileList:pE,forEach:Lo,merge:$f,extend:_E,trim:yE,stripBOM:vE,inherits:wE,toFlatObject:xE,kindOf:na,kindOfTest:Pt,endsWith:kE,toArray:SE,forEachEntry:bE,matchAll:RE,isHTMLForm:CE,hasOwnProperty:Hy,hasOwnProp:Hy,reduceDescriptors:Xy,freezeMethods:OE,toObjectSet:TE,toCamelCase:IE,noop:PE,toFiniteNumber:AE,findKey:Zy,global:Ky,isContextDefined:Qy,ALPHABET:qy,generateString:LE,isSpecCompliantForm:ME,toJSONObject:zE,isAsyncFn:DE,isThenable:jE};function ci(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}x.inherits(ci,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:x.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var Jy=ci.prototype,Yy={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Yy[e]={value:e}});Object.defineProperties(ci,Yy);Object.defineProperty(Jy,"isAxiosError",{value:!0});ci.from=(e,t,n,r,i,o)=>{let l=Object.create(Jy);return x.toFlatObject(e,l,function(a){return a!==Error.prototype},s=>s!=="isAxiosError"),ci.call(l,e.message,t,n,r,i),l.cause=e,l.name=e.name,o&&Object.assign(l,o),l};var D=ci;var oa=null;function Vf(e){return x.isPlainObject(e)||x.isArray(e)}function t_(e){return x.endsWith(e,"[]")?e.slice(0,-2):e}function e_(e,t,n){return e?e.concat(t).map(function(i,o){return i=t_(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function FE(e){return x.isArray(e)&&!e.some(Vf)}var UE=x.toFlatObject(x,{},null,function(t){return/^is[A-Z]/.test(t)});function BE(e,t,n){if(!x.isObject(e))throw new TypeError("target must be an object");t=t||new(oa||FormData),n=x.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(_,w){return!x.isUndefined(w[_])});let r=n.metaTokens,i=n.visitor||c,o=n.dots,l=n.indexes,a=(n.Blob||typeof Blob<"u"&&Blob)&&x.isSpecCompliantForm(t);if(!x.isFunction(i))throw new TypeError("visitor must be a function");function u(g){if(g===null)return"";if(x.isDate(g))return g.toISOString();if(!a&&x.isBlob(g))throw new D("Blob is not supported. Use a Buffer instead.");return x.isArrayBuffer(g)||x.isTypedArray(g)?a&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function c(g,_,w){let h=g;if(g&&!w&&typeof g=="object"){if(x.endsWith(_,"{}"))_=r?_:_.slice(0,-2),g=JSON.stringify(g);else if(x.isArray(g)&&FE(g)||(x.isFileList(g)||x.endsWith(_,"[]"))&&(h=x.toArray(g)))return _=t_(_),h.forEach(function(y,v){!(x.isUndefined(y)||y===null)&&t.append(l===!0?e_([_],v,o):l===null?_:_+"[]",u(y))}),!1}return Vf(g)?!0:(t.append(e_(w,_,o),u(g)),!1)}let d=[],f=Object.assign(UE,{defaultVisitor:c,convertValue:u,isVisitable:Vf});function p(g,_){if(!x.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+_.join("."));d.push(g),x.forEach(g,function(h,m){(!(x.isUndefined(h)||h===null)&&i.call(t,h,x.isString(m)?m.trim():m,_,f))===!0&&p(h,_?_.concat(m):[m])}),d.pop()}}if(!x.isObject(e))throw new TypeError("data must be an object");return p(e),t}var Ln=BE;function n_(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function r_(e,t){this._pairs=[],e&&Ln(e,this,t)}var i_=r_.prototype;i_.append=function(t,n){this._pairs.push([t,n])};i_.toString=function(t){let n=t?function(r){return t.call(this,r,n_)}:n_;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};var la=r_;function $E(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Mo(e,t,n){if(!t)return e;let r=n&&n.encode||$E,i=n&&n.serialize,o;if(i?o=i(t,n):o=x.isURLSearchParams(t)?t.toString():new la(t,n).toString(r),o){let l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}var Wf=class{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){x.forEach(this.handlers,function(r){r!==null&&t(r)})}},Gf=Wf;var sa={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var o_=typeof URLSearchParams<"u"?URLSearchParams:la;var l_=typeof FormData<"u"?FormData:null;var s_=typeof Blob<"u"?Blob:null;var a_={isBrowser:!0,classes:{URLSearchParams:o_,FormData:l_,Blob:s_},protocols:["http","https","file","blob","url","data"]};var Zf={};z1(Zf,{hasBrowserEnv:()=>u_,hasStandardBrowserEnv:()=>HE,hasStandardBrowserWebWorkerEnv:()=>VE});var u_=typeof window<"u"&&typeof document<"u",HE=(e=>u_&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),VE=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function";var Le={...Zf,...a_};function Kf(e,t){return Ln(e,new Le.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Le.isNode&&x.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function WE(e){return x.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function GE(e){let t={},n=Object.keys(e),r,i=n.length,o;for(r=0;r=n.length;return l=!l&&x.isArray(i)?i.length:l,a?(x.hasOwnProp(i,l)?i[l]=[i[l],r]:i[l]=r,!s):((!i[l]||!x.isObject(i[l]))&&(i[l]=[]),t(n,r,i[l],o)&&x.isArray(i[l])&&(i[l]=GE(i[l])),!s)}if(x.isFormData(e)&&x.isFunction(e.entries)){let n={};return x.forEachEntry(e,(r,i)=>{t(WE(r),i,n,0)}),n}return null}var aa=ZE;function KE(e,t,n){if(x.isString(e))try{return(t||JSON.parse)(e),x.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}var Qf={transitional:sa,adapter:["xhr","http"],transformRequest:[function(t,n){let r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=x.isObject(t);if(o&&x.isHTMLForm(t)&&(t=new FormData(t)),x.isFormData(t))return i?JSON.stringify(aa(t)):t;if(x.isArrayBuffer(t)||x.isBuffer(t)||x.isStream(t)||x.isFile(t)||x.isBlob(t))return t;if(x.isArrayBufferView(t))return t.buffer;if(x.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Kf(t,this.formSerializer).toString();if((s=x.isFileList(t))||r.indexOf("multipart/form-data")>-1){let a=this.env&&this.env.FormData;return Ln(s?{"files[]":t}:t,a&&new a,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),KE(t)):t}],transformResponse:[function(t){let n=this.transitional||Qf.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&x.isString(t)&&(r&&!this.responseType||i)){let l=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(l)throw s.name==="SyntaxError"?D.from(s,D.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Le.classes.FormData,Blob:Le.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};x.forEach(["delete","get","head","post","put","patch"],e=>{Qf.headers[e]={}});var fi=Qf;var QE=x.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),c_=e=>{let t={},n,r,i;return e&&e.split(` -`).forEach(function(l){i=l.indexOf(":"),n=l.substring(0,i).trim().toLowerCase(),r=l.substring(i+1).trim(),!(!n||t[n]&&QE[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};var f_=Symbol("internals");function zo(e){return e&&String(e).trim().toLowerCase()}function ua(e){return e===!1||e==null?e:x.isArray(e)?e.map(ua):String(e)}function XE(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}var qE=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Xf(e,t,n,r,i){if(x.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!x.isString(t)){if(x.isString(r))return t.indexOf(r)!==-1;if(x.isRegExp(r))return r.test(t)}}function JE(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function YE(e,t){let n=x.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,l){return this[r].call(this,t,i,o,l)},configurable:!0})})}var di=class{constructor(t){t&&this.set(t)}set(t,n,r){let i=this;function o(s,a,u){let c=zo(a);if(!c)throw new Error("header name must be a non-empty string");let d=x.findKey(i,c);(!d||i[d]===void 0||u===!0||u===void 0&&i[d]!==!1)&&(i[d||a]=ua(s))}let l=(s,a)=>x.forEach(s,(u,c)=>o(u,c,a));return x.isPlainObject(t)||t instanceof this.constructor?l(t,n):x.isString(t)&&(t=t.trim())&&!qE(t)?l(c_(t),n):t!=null&&o(n,t,r),this}get(t,n){if(t=zo(t),t){let r=x.findKey(this,t);if(r){let i=this[r];if(!n)return i;if(n===!0)return XE(i);if(x.isFunction(n))return n.call(this,i,r);if(x.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=zo(t),t){let r=x.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Xf(this,this[r],r,n)))}return!1}delete(t,n){let r=this,i=!1;function o(l){if(l=zo(l),l){let s=x.findKey(r,l);s&&(!n||Xf(r,r[s],s,n))&&(delete r[s],i=!0)}}return x.isArray(t)?t.forEach(o):o(t),i}clear(t){let n=Object.keys(this),r=n.length,i=!1;for(;r--;){let o=n[r];(!t||Xf(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){let n=this,r={};return x.forEach(this,(i,o)=>{let l=x.findKey(r,o);if(l){n[l]=ua(i),delete n[o];return}let s=t?JE(o):String(o).trim();s!==o&&delete n[o],n[s]=ua(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let n=Object.create(null);return x.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&x.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){let r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){let r=(this[f_]=this[f_]={accessors:{}}).accessors,i=this.prototype;function o(l){let s=zo(l);r[s]||(YE(i,l),r[s]=!0)}return x.isArray(t)?t.forEach(o):o(t),this}};di.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);x.reduceDescriptors(di.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});x.freezeMethods(di);var Me=di;function Do(e,t){let n=this||fi,r=t||n,i=Me.from(r.headers),o=r.data;return x.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function jo(e){return!!(e&&e.__CANCEL__)}function d_(e,t,n){D.call(this,e??"canceled",D.ERR_CANCELED,t,n),this.name="CanceledError"}x.inherits(d_,D,{__CANCEL__:!0});var Mn=d_;function qf(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new D("Request failed with status code "+n.status,[D.ERR_BAD_REQUEST,D.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}var p_=Le.hasStandardBrowserEnv?{write(e,t,n,r,i,o){let l=[e+"="+encodeURIComponent(t)];x.isNumber(n)&&l.push("expires="+new Date(n).toGMTString()),x.isString(r)&&l.push("path="+r),x.isString(i)&&l.push("domain="+i),o===!0&&l.push("secure"),document.cookie=l.join("; ")},read(e){let t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Jf(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Yf(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Fo(e,t){return e&&!Jf(t)?Yf(e,t):t}var m_=Le.hasStandardBrowserEnv?function(){let t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),r;function i(o){let l=o;return t&&(n.setAttribute("href",l),l=n.href),n.setAttribute("href",l),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(l){let s=x.isString(l)?i(l):l;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}();function ed(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function e2(e,t){e=e||10;let n=new Array(e),r=new Array(e),i=0,o=0,l;return t=t!==void 0?t:1e3,function(a){let u=Date.now(),c=r[o];l||(l=u),n[i]=a,r[i]=u;let d=o,f=0;for(;d!==i;)f+=n[d++],d=d%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),u-l{let o=i.loaded,l=i.lengthComputable?i.total:void 0,s=o-n,a=r(s),u=o<=l;n=o;let c={loaded:o,total:l,progress:l?o/l:void 0,bytes:s,rate:a||void 0,estimated:a&&l&&u?(l-o)/a:void 0,event:i};c[t?"download":"upload"]=!0,e(c)}}var t2=typeof XMLHttpRequest<"u",y_=t2&&function(e){return new Promise(function(n,r){let i=e.data,o=Me.from(e.headers).normalize(),{responseType:l,withXSRFToken:s}=e,a;function u(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}let c;if(x.isFormData(i)){if(Le.hasStandardBrowserEnv||Le.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if((c=o.getContentType())!==!1){let[_,...w]=c?c.split(";").map(h=>h.trim()).filter(Boolean):[];o.setContentType([_||"multipart/form-data",...w].join("; "))}}let d=new XMLHttpRequest;if(e.auth){let _=e.auth.username||"",w=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(_+":"+w))}let f=Fo(e.baseURL,e.url);d.open(e.method.toUpperCase(),Mo(f,e.params,e.paramsSerializer),!0),d.timeout=e.timeout;function p(){if(!d)return;let _=Me.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),h={data:!l||l==="text"||l==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:_,config:e,request:d};qf(function(y){n(y),u()},function(y){r(y),u()},h),d=null}if("onloadend"in d?d.onloadend=p:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(p)},d.onabort=function(){d&&(r(new D("Request aborted",D.ECONNABORTED,e,d)),d=null)},d.onerror=function(){r(new D("Network Error",D.ERR_NETWORK,e,d)),d=null},d.ontimeout=function(){let w=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",h=e.transitional||sa;e.timeoutErrorMessage&&(w=e.timeoutErrorMessage),r(new D(w,h.clarifyTimeoutError?D.ETIMEDOUT:D.ECONNABORTED,e,d)),d=null},Le.hasStandardBrowserEnv&&(s&&x.isFunction(s)&&(s=s(e)),s||s!==!1&&m_(f))){let _=e.xsrfHeaderName&&e.xsrfCookieName&&p_.read(e.xsrfCookieName);_&&o.set(e.xsrfHeaderName,_)}i===void 0&&o.setContentType(null),"setRequestHeader"in d&&x.forEach(o.toJSON(),function(w,h){d.setRequestHeader(h,w)}),x.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),l&&l!=="json"&&(d.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&d.addEventListener("progress",g_(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",g_(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=_=>{d&&(r(!_||_.type?new Mn(null,e,d):_),d.abort(),d=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));let g=ed(f);if(g&&Le.protocols.indexOf(g)===-1){r(new D("Unsupported protocol "+g+":",D.ERR_BAD_REQUEST,e));return}d.send(i||null)})};var td={http:oa,xhr:y_};x.forEach(td,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var __=e=>`- ${e}`,n2=e=>x.isFunction(e)||e===null||e===!1,ca={getAdapter:e=>{e=x.isArray(e)?e:[e];let{length:t}=e,n,r,i={};for(let o=0;o`adapter ${s} `+(a===!1?"is not supported by the environment":"is not available in the build")),l=t?o.length>1?`since : -`+o.map(__).join(` -`):" "+__(o[0]):"as no adapter specified";throw new D("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return r},adapters:td};function nd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Mn(null,e)}function fa(e){return nd(e),e.headers=Me.from(e.headers),e.data=Do.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ca.getAdapter(e.adapter||fi.adapter)(e).then(function(r){return nd(e),r.data=Do.call(e,e.transformResponse,r),r.headers=Me.from(r.headers),r},function(r){return jo(r)||(nd(e),r&&r.response&&(r.response.data=Do.call(e,e.transformResponse,r.response),r.response.headers=Me.from(r.response.headers))),Promise.reject(r)})}var v_=e=>e instanceof Me?{...e}:e;function Yt(e,t){t=t||{};let n={};function r(u,c,d){return x.isPlainObject(u)&&x.isPlainObject(c)?x.merge.call({caseless:d},u,c):x.isPlainObject(c)?x.merge({},c):x.isArray(c)?c.slice():c}function i(u,c,d){if(x.isUndefined(c)){if(!x.isUndefined(u))return r(void 0,u,d)}else return r(u,c,d)}function o(u,c){if(!x.isUndefined(c))return r(void 0,c)}function l(u,c){if(x.isUndefined(c)){if(!x.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function s(u,c,d){if(d in t)return r(u,c);if(d in e)return r(void 0,u)}let a={url:o,method:o,data:o,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:s,headers:(u,c)=>i(v_(u),v_(c),!0)};return x.forEach(Object.keys(Object.assign({},e,t)),function(c){let d=a[c]||i,f=d(e[c],t[c],c);x.isUndefined(f)&&d!==s||(n[c]=f)}),n}var da="1.6.8";var rd={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{rd[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});var w_={};rd.transitional=function(t,n,r){function i(o,l){return"[Axios v"+da+"] Transitional option '"+o+"'"+l+(r?". "+r:"")}return(o,l,s)=>{if(t===!1)throw new D(i(l," has been removed"+(n?" in "+n:"")),D.ERR_DEPRECATED);return n&&!w_[l]&&(w_[l]=!0,console.warn(i(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,l,s):!0}};function r2(e,t,n){if(typeof e!="object")throw new D("options must be an object",D.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-- >0;){let o=r[i],l=t[o];if(l){let s=e[o],a=s===void 0||l(s,o,e);if(a!==!0)throw new D("option "+o+" must be "+a,D.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new D("Unknown option "+o,D.ERR_BAD_OPTION)}}var pa={assertOptions:r2,validators:rd};var zn=pa.validators,pi=class{constructor(t){this.defaults=t,this.interceptors={request:new Gf,response:new Gf}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;let o=i.stack?i.stack.replace(/^.+\n/,""):"";r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` -`+o):r.stack=o}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Yt(this.defaults,n);let{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&pa.assertOptions(r,{silentJSONParsing:zn.transitional(zn.boolean),forcedJSONParsing:zn.transitional(zn.boolean),clarifyTimeoutError:zn.transitional(zn.boolean)},!1),i!=null&&(x.isFunction(i)?n.paramsSerializer={serialize:i}:pa.assertOptions(i,{encode:zn.function,serialize:zn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=o&&x.merge(o.common,o[n.method]);o&&x.forEach(["delete","get","head","post","put","patch","common"],g=>{delete o[g]}),n.headers=Me.concat(l,o);let s=[],a=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(n)===!1||(a=a&&_.synchronous,s.unshift(_.fulfilled,_.rejected))});let u=[];this.interceptors.response.forEach(function(_){u.push(_.fulfilled,_.rejected)});let c,d=0,f;if(!a){let g=[fa.bind(this),void 0];for(g.unshift.apply(g,s),g.push.apply(g,u),f=g.length,c=Promise.resolve(n);d{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o,l=new Promise(s=>{r.subscribe(s),o=s}).then(i);return l.cancel=function(){r.unsubscribe(o)},l},t(function(o,l,s){r.reason||(r.reason=new Mn(o,l,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new e(function(i){t=i}),cancel:t}}},x_=id;function od(e){return function(n){return e.apply(null,n)}}function ld(e){return x.isObject(e)&&e.isAxiosError===!0}var sd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(sd).forEach(([e,t])=>{sd[t]=e});var k_=sd;function S_(e){let t=new Uo(e),n=Po(Uo.prototype.request,t);return x.extend(n,Uo.prototype,t,{allOwnKeys:!0}),x.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return S_(Yt(e,i))},n}var ue=S_(fi);ue.Axios=Uo;ue.CanceledError=Mn;ue.CancelToken=x_;ue.isCancel=jo;ue.VERSION=da;ue.toFormData=Ln;ue.AxiosError=D;ue.Cancel=ue.CanceledError;ue.all=function(t){return Promise.all(t)};ue.spread=od;ue.isAxiosError=ld;ue.mergeConfig=Yt;ue.AxiosHeaders=Me;ue.formToJSON=e=>aa(x.isHTMLForm(e)?new FormData(e):e);ue.getAdapter=ca.getAdapter;ue.HttpStatusCode=k_;ue.default=ue;var ma=ue;var{Axios:OP,AxiosError:TP,CanceledError:PP,isCancel:AP,CancelToken:LP,VERSION:MP,all:zP,Cancel:DP,isAxiosError:jP,spread:FP,toFormData:UP,AxiosHeaders:BP,HttpStatusCode:$P,formToJSON:HP,getAdapter:VP,mergeConfig:WP}=ma;BigInt.prototype.toJSON=function(){return"BigInt::"+this.toString()};var i2=typeof window<"u"?window:null,E_=typeof global<"u"?global:void 0,mi=async(e,t,n)=>{let r={...n},i=null,o=!1,l=null,s=[];if(Array.isArray(t))for(let d of t)d instanceof File&&(s.push(d),o=!0),typeof d=="function"&&(l=d);else t instanceof File&&(o=!0,s.push(t));if(!o)i=JSON.stringify(t),r["content-type"]="aplication/json";else{let d=new FormData;for(let f of s)d.append(f.name,f);i=d,delete r["content-type"],r.enctype="multipart/form-data;"}let a=new URL(e);if(i2!==null){let d=new URL(location.href),f="";if(a.host===d.host||E_&&typeof E_.server_hook=="function"?f=a.toString():f=`${d.protocol}//${d.host}/_proxy/${encodeURIComponent(a.toString())}`,f){if(l)return(await ma({method:t?"post":void 0,url:f,data:i,onUploadProgress:l})).data;{let g=await(await fetch(f,t?{method:"POST",body:i,headers:r}:void 0)).text();try{return JSON.parse(g,b_)}catch{return g}}}}let c=await(await fetch(a,t?{method:"POST",body:i,headers:r}:void 0)).text();try{return JSON.parse(c,b_)}catch{return c}},b_=(e,t)=>typeof t=="string"&&t.startsWith("BigInt::")?BigInt(t.substring(8)):t;var H_=P($_());var V_=async(e,t)=>{let n=(0,H_.default)(e,"/"),r=await mi(L2(n,"/_prasi/_")),i="";r&&r.prasi&&(i=r.prasi);let o=A2(n);if(i==="v2")await new Promise(l=>{let s=document,a=s.createElement("script");a.onload=async()=>{l()},localStorage.getItem("api-ts-"+n)||localStorage.setItem("api-ts-"+n,Date.now().toString());let u=localStorage.getItem("api-ts-"+n);t?a.src=`${o}/_prasi/load.js?url=${n}&v3&dev=1&ts=${u}`:a.src=`${o}/_prasi/load.js?url=${n}&v3&ts=${u}`,document.querySelector(`script[src="${a.src}"]`)?l():s.body.appendChild(a)});else{let l=await fetch(o+"/_prasi/api-entry");if(ut.prasiApi[n]={apiEntry:(await l.json()).srv},t){let s=await fetch(o+"/_prasi/api-types");ut.prasiApi[n].apiTypes=await s.text(),ut.prasiApi[n].prismaTypes={"prisma.d.ts":await fd(`${o}/_prasi/prisma/index.d.ts`),"runtime/index.d.ts":await fd(`${o}/_prasi/prisma/runtime/index.d.ts`),"runtime/library.d.ts":await fd(`${o}/_prasi/prisma/runtime/library.d.ts`)}}}},A2=e=>{let t=new URL(e);return`${t.protocol}//${t.host}`},L2=(e,t)=>{let n=new URL(e);return n.pathname=t,n.toString()},fd=async(e,t)=>await(await fetch(e)).text();var Bo={},G_=e=>{ut.prasiApi||(ut.prasiApi={});try{let t=new URL(e),n=`${t.protocol}//${t.host}`;return ut.prasiApi[n]||Bo[n]||(Bo[n]=V_(n,location.hostname.includes("prasi"))),new Proxy({},{get:(r,i)=>{if(i==="_url")return(l,s)=>{let a=new URL(n);a.pathname=l.split("/").filter(d=>d).join("/");let u=new URL(location.href),c="";return a.host===u.host||s===!1?c=a.toString():c=`${u.protocol}//${u.host}/_proxy/${encodeURIComponent(a.toString())}`,c};let o=l=>function(...s){return new Promise(async(a,u)=>{try{let c=ut.prasiApi[n];if(!c&&Bo&&typeof Bo[n]=="object"&&(await Bo[n],c=ut.prasiApi[n]),c){if(l==="_raw"){let p=s[0],g=`${n}${p}`,_=await W_(g,s.slice(1));a(_);return}if(c.apiEntry||(c.apiEntry={}),c.apiEntry&&!c.apiEntry[l]){u(`API ${l.toString()} not found, existing API: - - ${Object.keys(c.apiEntry||{}).join(` - - `)}`);return}let d=c.apiEntry[l].url,f=c.apiEntry[l].args;if(d&&f){if(s.length>0&&f.length>0)for(let[_,w]of Object.entries(s)){let h=f[parseInt(_)];f&&f.includes(h)&&w&&typeof w!="string"&&typeof w!="number"||(d=d.replace(`:${h}?`,w+""),d=d.replace(`:${h}`,w+""))}let p=`${n}${d}`,g=await W_(p,s);a(g)}else console.error(`API Not Found: ${l.toString()}`)}else u("Failed to load API [Proxy]: "+n)}catch(c){u(c)}})};return i==="then"?new Proxy({},{get:(l,s)=>o(s)}):o(i)}})}catch{return null}},W_=async(e,t)=>await mi(e,t,{"content-type":"application/json"});var g1=P(Q_());function wi(e){let t=e.length;for(;--t>=0;)e[t]=0}var F2=0,Lv=1,U2=2,B2=3,$2=258,Md=29,nl=256,Ko=nl+1+Md,yi=30,zd=19,Mv=2*Ko+1,ur=15,dd=16,H2=7,Dd=256,zv=16,Dv=17,jv=18,Rd=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]),wa=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]),V2=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Fv=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),W2=512,nn=new Array((Ko+2)*2);wi(nn);var Wo=new Array(yi*2);wi(Wo);var Qo=new Array(W2);wi(Qo);var Xo=new Array($2-B2+1);wi(Xo);var jd=new Array(Md);wi(jd);var xa=new Array(yi);wi(xa);function pd(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}var Uv,Bv,$v;function md(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}var Hv=e=>e<256?Qo[e]:Qo[256+(e>>>7)],qo=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},Ve=(e,t,n)=>{e.bi_valid>dd-n?(e.bi_buf|=t<>dd-e.bi_valid,e.bi_valid+=n-dd):(e.bi_buf|=t<{Ve(e,n[t*2],n[t*2+1])},Vv=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},G2=e=>{e.bi_valid===16?(qo(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)},Z2=(e,t)=>{let n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,l=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,a=t.stat_desc.max_length,u,c,d,f,p,g,_=0;for(f=0;f<=ur;f++)e.bl_count[f]=0;for(n[e.heap[e.heap_max]*2+1]=0,u=e.heap_max+1;ua&&(f=a,_++),n[c*2+1]=f,!(c>r)&&(e.bl_count[f]++,p=0,c>=s&&(p=l[c-s]),g=n[c*2],e.opt_len+=g*(f+p),o&&(e.static_len+=g*(i[c*2+1]+p)));if(_!==0){do{for(f=a-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[a]--,_-=2}while(_>0);for(f=a;f!==0;f--)for(c=e.bl_count[f];c!==0;)d=e.heap[--u],!(d>r)&&(n[d*2+1]!==f&&(e.opt_len+=(f-n[d*2+1])*n[d*2],n[d*2+1]=f),c--)}},Wv=(e,t,n)=>{let r=new Array(ur+1),i=0,o,l;for(o=1;o<=ur;o++)i=i+n[o-1]<<1,r[o]=i;for(l=0;l<=t;l++){let s=e[l*2+1];s!==0&&(e[l*2]=Vv(r[s]++,s))}},K2=()=>{let e,t,n,r,i,o=new Array(ur+1);for(n=0,r=0;r>=7;r{let t;for(t=0;t{e.bi_valid>8?qo(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},X_=(e,t,n,r)=>{let i=t*2,o=n*2;return e[i]{let r=e.heap[n],i=n<<1;for(;i<=e.heap_len&&(i{let r,i,o=0,l,s;if(e.sym_next!==0)do r=e.pending_buf[e.sym_buf+o++]&255,r+=(e.pending_buf[e.sym_buf+o++]&255)<<8,i=e.pending_buf[e.sym_buf+o++],r===0?Lt(e,i,t):(l=Xo[i],Lt(e,l+nl+1,t),s=Rd[l],s!==0&&(i-=jd[l],Ve(e,i,s)),r--,l=Hv(r),Lt(e,l,n),s=wa[l],s!==0&&(r-=xa[l],Ve(e,r,s)));while(o{let n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems,l,s,a=-1,u;for(e.heap_len=0,e.heap_max=Mv,l=0;l>1;l>=1;l--)hd(e,n,l);u=o;do l=e.heap[1],e.heap[1]=e.heap[e.heap_len--],hd(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=l,e.heap[--e.heap_max]=s,n[u*2]=n[l*2]+n[s*2],e.depth[u]=(e.depth[l]>=e.depth[s]?e.depth[l]:e.depth[s])+1,n[l*2+1]=n[s*2+1]=u,e.heap[1]=u++,hd(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],Z2(e,t),Wv(n,a,e.bl_count)},J_=(e,t,n)=>{let r,i=-1,o,l=t[0*2+1],s=0,a=7,u=4;for(l===0&&(a=138,u=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)o=l,l=t[(r+1)*2+1],!(++s{let r,i=-1,o,l=t[0*2+1],s=0,a=7,u=4;for(l===0&&(a=138,u=3),r=0;r<=n;r++)if(o=l,l=t[(r+1)*2+1],!(++s{let t;for(J_(e,e.dyn_ltree,e.l_desc.max_code),J_(e,e.dyn_dtree,e.d_desc.max_code),Cd(e,e.bl_desc),t=zd-1;t>=3&&e.bl_tree[Fv[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},X2=(e,t,n,r)=>{let i;for(Ve(e,t-257,5),Ve(e,n-1,5),Ve(e,r-4,4),i=0;i{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return 0;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return 1;for(n=32;n{ev||(K2(),ev=!0),e.l_desc=new md(e.dyn_ltree,Uv),e.d_desc=new md(e.dyn_dtree,Bv),e.bl_desc=new md(e.bl_tree,$v),e.bi_buf=0,e.bi_valid=0,Gv(e)},Kv=(e,t,n,r)=>{Ve(e,(F2<<1)+(r?1:0),3),Zv(e),qo(e,n),qo(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},Y2=e=>{Ve(e,Lv<<1,3),Lt(e,Dd,nn),G2(e)},eb=(e,t,n,r)=>{let i,o,l=0;e.level>0?(e.strm.data_type===2&&(e.strm.data_type=q2(e)),Cd(e,e.l_desc),Cd(e,e.d_desc),l=Q2(e),i=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=i&&(i=o)):i=o=n+5,n+4<=i&&t!==-1?Kv(e,t,n,r):e.strategy===4||o===i?(Ve(e,(Lv<<1)+(r?1:0),3),q_(e,nn,Wo)):(Ve(e,(U2<<1)+(r?1:0),3),X2(e,e.l_desc.max_code+1,e.d_desc.max_code+1,l+1),q_(e,e.dyn_ltree,e.dyn_dtree)),Gv(e),r&&Zv(e)},tb=(e,t,n)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(Xo[n]+nl+1)*2]++,e.dyn_dtree[Hv(t)*2]++),e.sym_next===e.sym_end),nb=J2,rb=Kv,ib=eb,ob=tb,lb=Y2,sb={_tr_init:nb,_tr_stored_block:rb,_tr_flush_block:ib,_tr_tally:ob,_tr_align:lb},ab=(e,t,n,r)=>{let i=e&65535|0,o=e>>>16&65535|0,l=0;for(;n!==0;){l=n>2e3?2e3:n,n-=l;do i=i+t[r++]|0,o=o+i|0;while(--l);i%=65521,o%=65521}return i|o<<16|0},Jo=ab,ub=()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t},cb=new Uint32Array(ub()),fb=(e,t,n,r)=>{let i=cb,o=r+n;e^=-1;for(let l=r;l>>8^i[(e^t[l])&255];return e^-1},he=fb,dr={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"},hr={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},{_tr_init:db,_tr_stored_block:Id,_tr_flush_block:pb,_tr_tally:Fn,_tr_align:mb}=sb,{Z_NO_FLUSH:Un,Z_PARTIAL_FLUSH:hb,Z_FULL_FLUSH:gb,Z_FINISH:dt,Z_BLOCK:tv,Z_OK:xe,Z_STREAM_END:nv,Z_STREAM_ERROR:Mt,Z_DATA_ERROR:yb,Z_BUF_ERROR:gd,Z_DEFAULT_COMPRESSION:_b,Z_FILTERED:vb,Z_HUFFMAN_ONLY:ha,Z_RLE:wb,Z_FIXED:xb,Z_DEFAULT_STRATEGY:kb,Z_UNKNOWN:Sb,Z_DEFLATED:Ea}=hr,Eb=9,bb=15,Rb=8,Cb=29,Ib=256,Nd=Ib+1+Cb,Nb=30,Ob=19,Tb=2*Nd+1,Pb=15,U=3,jn=258,zt=jn+U+1,Ab=32,_i=42,Fd=57,Od=69,Td=73,Pd=91,Ad=103,cr=113,Ho=666,ze=1,xi=2,pr=3,ki=4,Lb=3,fr=(e,t)=>(e.msg=dr[t],t),rv=e=>e*2-(e>4?9:0),Dn=e=>{let t=e.length;for(;--t>=0;)e[t]=0},Mb=e=>{let t,n,r,i=e.w_size;t=e.hash_size,r=t;do n=e.head[--r],e.head[r]=n>=i?n-i:0;while(--t);t=i,r=t;do n=e.prev[--r],e.prev[r]=n>=i?n-i:0;while(--t)},zb=(e,t,n)=>(t<{let t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))},et=(e,t)=>{pb(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Ye(e.strm)},$=(e,t)=>{e.pending_buf[e.pending++]=t},$o=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},Ld=(e,t,n,r)=>{let i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),e.state.wrap===1?e.adler=Jo(e.adler,t,i,n):e.state.wrap===2&&(e.adler=he(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},Qv=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,o,l=e.prev_length,s=e.nice_match,a=e.strstart>e.w_size-zt?e.strstart-(e.w_size-zt):0,u=e.window,c=e.w_mask,d=e.prev,f=e.strstart+jn,p=u[r+l-1],g=u[r+l];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,!(u[i+l]!==g||u[i+l-1]!==p||u[i]!==u[r]||u[++i]!==u[r+1])){r+=2,i++;do;while(u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&rl){if(e.match_start=t,l=o,o>=s)break;p=u[r+l-1],g=u[r+l]}}while((t=d[t&c])>a&&--n!==0);return l<=e.lookahead?l:e.lookahead},vi=e=>{let t=e.w_size,n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-zt)&&(e.window.set(e.window.subarray(t,t+t-r),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),Mb(e),r+=t),e.strm.avail_in===0)break;if(n=Ld(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,e.lookahead+e.insert>=U)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=Bn(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=Bn(e,e.ins_h,e.window[i+U-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert{let n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,r,i,o,l=0,s=e.strm.avail_in;do{if(r=65535,o=e.bi_valid+42>>3,e.strm.avail_outi+e.strm.avail_in&&(r=i+e.strm.avail_in),r>o&&(r=o),r>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,Ye(e.strm),i&&(i>r&&(i=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,r-=i),r&&(Ld(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(l===0);return s-=e.strm.avail_in,s&&(s>=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<=s&&(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-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_watero&&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++,o+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),o>e.strm.avail_in&&(o=e.strm.avail_in),o&&(Ld(e.strm,e.window,e.strstart,o),e.strstart+=o,e.insert+=o>e.w_size-e.insert?e.w_size-e.insert:o),e.high_water>3,o=e.pending_buf_size-o>65535?65535:e.pending_buf_size-o,n=o>e.w_size?e.w_size:o,i=e.strstart-e.block_start,(i>=n||(i||t===dt)&&t!==Un&&e.strm.avail_in===0&&i<=o)&&(r=i>o?o:i,l=t===dt&&e.strm.avail_in===0&&r===i?1:0,Id(e,e.block_start,r,l),e.block_start+=r,Ye(e.strm)),l?pr:ze)},yd=(e,t)=>{let n,r;for(;;){if(e.lookahead=U&&(e.ins_h=Bn(e,e.ins_h,e.window[e.strstart+U-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-zt&&(e.match_length=Qv(e,n)),e.match_length>=U)if(r=Fn(e,e.strstart-e.match_start,e.match_length-U),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=U){e.match_length--;do e.strstart++,e.ins_h=Bn(e,e.ins_h,e.window[e.strstart+U-1]),n=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=Bn(e,e.ins_h,e.window[e.strstart+1]);else r=Fn(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(et(e,!1),e.strm.avail_out===0))return ze}return e.insert=e.strstart{let n,r,i;for(;;){if(e.lookahead=U&&(e.ins_h=Bn(e,e.ins_h,e.window[e.strstart+U-1]),n=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=U-1,n!==0&&e.prev_length4096)&&(e.match_length=U-1)),e.prev_length>=U&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-U,r=Fn(e,e.strstart-1-e.prev_match,e.prev_length-U),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=Bn(e,e.ins_h,e.window[e.strstart+U-1]),n=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=U-1,e.strstart++,r&&(et(e,!1),e.strm.avail_out===0))return ze}else if(e.match_available){if(r=Fn(e,0,e.window[e.strstart-1]),r&&et(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return ze}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=Fn(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart{let n,r,i,o,l=e.window;for(;;){if(e.lookahead<=jn){if(vi(e),e.lookahead<=jn&&t===Un)return ze;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=U&&e.strstart>0&&(i=e.strstart-1,r=l[i],r===l[++i]&&r===l[++i]&&r===l[++i])){o=e.strstart+jn;do;while(r===l[++i]&&r===l[++i]&&r===l[++i]&&r===l[++i]&&r===l[++i]&&r===l[++i]&&r===l[++i]&&r===l[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=U?(n=Fn(e,1,e.match_length-U),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=Fn(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(et(e,!1),e.strm.avail_out===0))return ze}return e.insert=0,t===dt?(et(e,!0),e.strm.avail_out===0?pr:ki):e.sym_next&&(et(e,!1),e.strm.avail_out===0)?ze:xi},jb=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(vi(e),e.lookahead===0)){if(t===Un)return ze;break}if(e.match_length=0,n=Fn(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(et(e,!1),e.strm.avail_out===0))return ze}return e.insert=0,t===dt?(et(e,!0),e.strm.avail_out===0?pr:ki):e.sym_next&&(et(e,!1),e.strm.avail_out===0)?ze:xi};function At(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}var Vo=[new At(0,0,0,0,Xv),new At(4,4,8,4,yd),new At(4,5,16,8,yd),new At(4,6,32,32,yd),new At(4,4,16,16,hi),new At(8,16,32,32,hi),new At(8,16,128,128,hi),new At(8,32,128,256,hi),new At(32,128,258,1024,hi),new At(32,258,258,4096,hi)],Fb=e=>{e.window_size=2*e.w_size,Dn(e.head),e.max_lazy_match=Vo[e.level].max_lazy,e.good_match=Vo[e.level].good_length,e.nice_match=Vo[e.level].nice_length,e.max_chain_length=Vo[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=U-1,e.match_available=0,e.ins_h=0};function Ub(){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=Ea,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(Tb*2),this.dyn_dtree=new Uint16Array((2*Nb+1)*2),this.bl_tree=new Uint16Array((2*Ob+1)*2),Dn(this.dyn_ltree),Dn(this.dyn_dtree),Dn(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(Pb+1),this.heap=new Uint16Array(2*Nd+1),Dn(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Nd+1),Dn(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}var rl=e=>{if(!e)return 1;let t=e.state;return!t||t.strm!==e||t.status!==_i&&t.status!==Fd&&t.status!==Od&&t.status!==Td&&t.status!==Pd&&t.status!==Ad&&t.status!==cr&&t.status!==Ho?1:0},qv=e=>{if(rl(e))return fr(e,Mt);e.total_in=e.total_out=0,e.data_type=Sb;let t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?Fd:t.wrap?_i:cr,e.adler=t.wrap===2?0:1,t.last_flush=-2,db(t),xe},Jv=e=>{let t=qv(e);return t===xe&&Fb(e.state),t},Bb=(e,t)=>rl(e)||e.state.wrap!==2?Mt:(e.state.gzhead=t,xe),Yv=(e,t,n,r,i,o)=>{if(!e)return Mt;let l=1;if(t===_b&&(t=6),r<0?(l=0,r=-r):r>15&&(l=2,r-=16),i<1||i>Eb||n!==Ea||r<8||r>15||t<0||t>9||o<0||o>xb||r===8&&l!==1)return fr(e,Mt);r===8&&(r=9);let s=new Ub;return e.state=s,s.strm=e,s.status=_i,s.wrap=l,s.gzhead=null,s.w_bits=r,s.w_size=1<Yv(e,t,Ea,bb,Rb,kb),Hb=(e,t)=>{if(rl(e)||t>tv||t<0)return e?fr(e,Mt):Mt;let n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===Ho&&t!==dt)return fr(e,e.avail_out===0?gd:Mt);let r=n.last_flush;if(n.last_flush=t,n.pending!==0){if(Ye(e),e.avail_out===0)return n.last_flush=-1,xe}else if(e.avail_in===0&&rv(t)<=rv(r)&&t!==dt)return fr(e,gd);if(n.status===Ho&&e.avail_in!==0)return fr(e,gd);if(n.status===_i&&n.wrap===0&&(n.status=cr),n.status===_i){let i=Ea+(n.w_bits-8<<4)<<8,o=-1;if(n.strategy>=ha||n.level<2?o=0:n.level<6?o=1:n.level===6?o=2:o=3,i|=o<<6,n.strstart!==0&&(i|=Ab),i+=31-i%31,$o(n,i),n.strstart!==0&&($o(n,e.adler>>>16),$o(n,e.adler&65535)),e.adler=1,n.status=cr,Ye(e),n.pending!==0)return n.last_flush=-1,xe}if(n.status===Fd){if(e.adler=0,$(n,31),$(n,139),$(n,8),n.gzhead)$(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),$(n,n.gzhead.time&255),$(n,n.gzhead.time>>8&255),$(n,n.gzhead.time>>16&255),$(n,n.gzhead.time>>24&255),$(n,n.level===9?2:n.strategy>=ha||n.level<2?4:0),$(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&($(n,n.gzhead.extra.length&255),$(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=he(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=Od;else if($(n,0),$(n,0),$(n,0),$(n,0),$(n,0),$(n,n.level===9?2:n.strategy>=ha||n.level<2?4:0),$(n,Lb),n.status=cr,Ye(e),n.pending!==0)return n.last_flush=-1,xe}if(n.status===Od){if(n.gzhead.extra){let i=n.pending,o=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+o>n.pending_buf_size;){let s=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+s),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>i&&(e.adler=he(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex+=s,Ye(e),n.pending!==0)return n.last_flush=-1,xe;i=0,o-=s}let l=new Uint8Array(n.gzhead.extra);n.pending_buf.set(l.subarray(n.gzindex,n.gzindex+o),n.pending),n.pending+=o,n.gzhead.hcrc&&n.pending>i&&(e.adler=he(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=Td}if(n.status===Td){if(n.gzhead.name){let i=n.pending,o;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=he(e.adler,n.pending_buf,n.pending-i,i)),Ye(e),n.pending!==0)return n.last_flush=-1,xe;i=0}n.gzindexi&&(e.adler=he(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=Pd}if(n.status===Pd){if(n.gzhead.comment){let i=n.pending,o;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=he(e.adler,n.pending_buf,n.pending-i,i)),Ye(e),n.pending!==0)return n.last_flush=-1,xe;i=0}n.gzindexi&&(e.adler=he(e.adler,n.pending_buf,n.pending-i,i))}n.status=Ad}if(n.status===Ad){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(Ye(e),n.pending!==0))return n.last_flush=-1,xe;$(n,e.adler&255),$(n,e.adler>>8&255),e.adler=0}if(n.status=cr,Ye(e),n.pending!==0)return n.last_flush=-1,xe}if(e.avail_in!==0||n.lookahead!==0||t!==Un&&n.status!==Ho){let i=n.level===0?Xv(n,t):n.strategy===ha?jb(n,t):n.strategy===wb?Db(n,t):Vo[n.level].func(n,t);if((i===pr||i===ki)&&(n.status=Ho),i===ze||i===pr)return e.avail_out===0&&(n.last_flush=-1),xe;if(i===xi&&(t===hb?mb(n):t!==tv&&(Id(n,0,0,!1),t===gb&&(Dn(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),Ye(e),e.avail_out===0))return n.last_flush=-1,xe}return t!==dt?xe:n.wrap<=0?nv:(n.wrap===2?($(n,e.adler&255),$(n,e.adler>>8&255),$(n,e.adler>>16&255),$(n,e.adler>>24&255),$(n,e.total_in&255),$(n,e.total_in>>8&255),$(n,e.total_in>>16&255),$(n,e.total_in>>24&255)):($o(n,e.adler>>>16),$o(n,e.adler&65535)),Ye(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?xe:nv)},Vb=e=>{if(rl(e))return Mt;let t=e.state.status;return e.state=null,t===cr?fr(e,yb):xe},Wb=(e,t)=>{let n=t.length;if(rl(e))return Mt;let r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==_i||r.lookahead)return Mt;if(i===1&&(e.adler=Jo(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(Dn(r.head),r.strstart=0,r.block_start=0,r.insert=0);let a=new Uint8Array(r.w_size);a.set(t.subarray(n-r.w_size,n),0),t=a,n=r.w_size}let o=e.avail_in,l=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,vi(r);r.lookahead>=U;){let a=r.strstart,u=r.lookahead-(U-1);do r.ins_h=Bn(r,r.ins_h,r.window[a+U-1]),r.prev[a&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=a,a++;while(--u);r.strstart=a,r.lookahead=U-1,vi(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=U-1,r.match_available=0,e.next_in=l,e.input=s,e.avail_in=o,r.wrap=i,xe},Gb=$b,Zb=Yv,Kb=Jv,Qb=qv,Xb=Bb,qb=Hb,Jb=Vb,Yb=Wb,eR="pako deflate (from Nodeca project)",Go={deflateInit:Gb,deflateInit2:Zb,deflateReset:Kb,deflateResetKeep:Qb,deflateSetHeader:Xb,deflate:qb,deflateEnd:Jb,deflateSetDictionary:Yb,deflateInfo:eR},tR=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nR=function(e){let t=Array.prototype.slice.call(arguments,1);for(;t.length;){let n=t.shift();if(n){if(typeof n!="object")throw new TypeError(n+"must be non-object");for(let r in n)tR(n,r)&&(e[r]=n[r])}}return e},rR=e=>{let t=0;for(let r=0,i=e.length;r=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Yo[254]=Yo[254]=1;var iR=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,n,r,i,o,l=e.length,s=0;for(i=0;i>>6,t[o++]=128|n&63):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|n&63):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|n&63);return t},oR=(e,t)=>{if(t<65534&&e.subarray&&e1)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let r=0;r{let n=t||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let r,i,o=new Array(n*2);for(i=0,r=0;r4){o[i++]=65533,r+=s-1;continue}for(l&=s===2?31:s===3?15:7;s>1&&r1){o[i++]=65533;continue}l<65536?o[i++]=l:(l-=65536,o[i++]=55296|l>>10&1023,o[i++]=56320|l&1023)}return oR(o,i)},sR=(e,t)=>{t=t||e.length,t>e.length&&(t=e.length);let n=t-1;for(;n>=0&&(e[n]&192)===128;)n--;return n<0||n===0?t:n+Yo[e[n]]>t?n:t},el={string2buf:iR,buf2string:lR,utf8border:sR};function aR(){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 t1=aR,n1=Object.prototype.toString,{Z_NO_FLUSH:uR,Z_SYNC_FLUSH:cR,Z_FULL_FLUSH:fR,Z_FINISH:dR,Z_OK:ka,Z_STREAM_END:pR,Z_DEFAULT_COMPRESSION:mR,Z_DEFAULT_STRATEGY:hR,Z_DEFLATED:gR}=hr;function il(e){this.options=ba.assign({level:mR,method:gR,chunkSize:16384,windowBits:15,memLevel:8,strategy:hR},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new t1,this.strm.avail_out=0;let n=Go.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==ka)throw new Error(dr[n]);if(t.header&&Go.deflateSetHeader(this.strm,t.header),t.dictionary){let r;if(typeof t.dictionary=="string"?r=el.string2buf(t.dictionary):n1.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=Go.deflateSetDictionary(this.strm,r),n!==ka)throw new Error(dr[n]);this._dict_set=!0}}il.prototype.push=function(e,t){let n=this.strm,r=this.options.chunkSize,i,o;if(this.ended)return!1;for(t===~~t?o=t:o=t===!0?dR:uR,typeof e=="string"?n.input=el.string2buf(e):n1.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(o===cR||o===fR)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=Go.deflate(n,o),i===pR)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=Go.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===ka;if(n.avail_out===0){this.onData(n.output);continue}if(o>0&&n.next_out>0){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(n.avail_in===0)break}return!0};il.prototype.onData=function(e){this.chunks.push(e)};il.prototype.onEnd=function(e){e===ka&&(this.result=ba.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Ud(e,t){let n=new il(t);if(n.push(e,!0),n.err)throw n.msg||dr[n.err];return n.result}function yR(e,t){return t=t||{},t.raw=!0,Ud(e,t)}function _R(e,t){return t=t||{},t.gzip=!0,Ud(e,t)}var vR=il,wR=Ud,xR=yR,kR=_R,SR=hr,ER={Deflate:vR,deflate:wR,deflateRaw:xR,gzip:kR,constants:SR},ga=16209,bR=16191,RR=function(t,n){let r,i,o,l,s,a,u,c,d,f,p,g,_,w,h,m,y,v,S,R,k,b,O,C,T=t.state;r=t.next_in,O=t.input,i=r+(t.avail_in-5),o=t.next_out,C=t.output,l=o-(n-t.avail_out),s=o+(t.avail_out-257),a=T.dmax,u=T.wsize,c=T.whave,d=T.wnext,f=T.window,p=T.hold,g=T.bits,_=T.lencode,w=T.distcode,h=(1<>>24,p>>>=v,g-=v,v=y>>>16&255,v===0)C[o++]=y&65535;else if(v&16){S=y&65535,v&=15,v&&(g>>=v,g-=v),g<15&&(p+=O[r++]<>>24,p>>>=v,g-=v,v=y>>>16&255,v&16){if(R=y&65535,v&=15,ga){t.msg="invalid distance too far back",T.mode=ga;break e}if(p>>>=v,g-=v,v=o-l,R>v){if(v=R-v,v>c&&T.sane){t.msg="invalid distance too far back",T.mode=ga;break e}if(k=0,b=f,d===0){if(k+=u-v,v2;)C[o++]=b[k++],C[o++]=b[k++],C[o++]=b[k++],S-=3;S&&(C[o++]=b[k++],S>1&&(C[o++]=b[k++]))}else{k=o-R;do C[o++]=C[k++],C[o++]=C[k++],C[o++]=C[k++],S-=3;while(S>2);S&&(C[o++]=C[k++],S>1&&(C[o++]=C[k++]))}}else if(v&64){t.msg="invalid distance code",T.mode=ga;break e}else{y=w[(y&65535)+(p&(1<>3,r-=S,g-=S<<3,p&=(1<{let a=s.bits,u=0,c=0,d=0,f=0,p=0,g=0,_=0,w=0,h=0,m=0,y,v,S,R,k,b=null,O,C=new Uint16Array(gi+1),T=new Uint16Array(gi+1),De=null,ll,Dt,jt;for(u=0;u<=gi;u++)C[u]=0;for(c=0;c=1&&C[f]===0;f--);if(p>f&&(p=f),f===0)return i[o++]=1<<24|64<<16|0,i[o++]=1<<24|64<<16|0,s.bits=1,0;for(d=1;d0&&(e===lv||f!==1))return-1;for(T[1]=0,u=1;uiv||e===sv&&h>ov)return 1;for(;;){ll=u-_,l[c]+1=O?(Dt=De[l[c]-O],jt=b[l[c]-O]):(Dt=96,jt=0),y=1<>_)+v]=ll<<24|Dt<<16|jt|0;while(v!==0);for(y=1<>=1;if(y!==0?(m&=y-1,m+=y):m=0,c++,--C[u]===0){if(u===f)break;u=t[n+l[c]]}if(u>p&&(m&R)!==S){for(_===0&&(_=p),k+=d,g=u-_,w=1<iv||e===sv&&h>ov)return 1;S=m&R,i[S]=p<<24|g<<16|k-o|0}}return m!==0&&(i[k+m]=u-_<<24|64<<16|0),s.bits=p,0},Zo=TR,PR=0,r1=1,i1=2,{Z_FINISH:av,Z_BLOCK:AR,Z_TREES:ya,Z_OK:mr,Z_STREAM_END:LR,Z_NEED_DICT:MR,Z_STREAM_ERROR:pt,Z_DATA_ERROR:o1,Z_MEM_ERROR:l1,Z_BUF_ERROR:zR,Z_DEFLATED:uv}=hr,Ra=16180,cv=16181,fv=16182,dv=16183,pv=16184,mv=16185,hv=16186,gv=16187,yv=16188,_v=16189,Sa=16190,tn=16191,vd=16192,vv=16193,wd=16194,wv=16195,xv=16196,kv=16197,Sv=16198,_a=16199,va=16200,Ev=16201,bv=16202,Rv=16203,Cv=16204,Iv=16205,xd=16206,Nv=16207,Ov=16208,ee=16209,s1=16210,a1=16211,DR=852,jR=592,FR=15,UR=FR,Tv=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function BR(){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}var gr=e=>{if(!e)return 1;let t=e.state;return!t||t.strm!==e||t.modea1?1:0},u1=e=>{if(gr(e))return pt;let t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=Ra,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(DR),t.distcode=t.distdyn=new Int32Array(jR),t.sane=1,t.back=-1,mr},c1=e=>{if(gr(e))return pt;let t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,u1(e)},f1=(e,t)=>{let n;if(gr(e))return pt;let r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?pt:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,c1(e))},d1=(e,t)=>{if(!e)return pt;let n=new BR;e.state=n,n.strm=e,n.window=null,n.mode=Ra;let r=f1(e,t);return r!==mr&&(e.state=null),r},$R=e=>d1(e,UR),Pv=!0,kd,Sd,HR=e=>{if(Pv){kd=new Int32Array(512),Sd=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Zo(r1,e.lens,0,288,kd,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Zo(i1,e.lens,0,32,Sd,0,e.work,{bits:5}),Pv=!1}e.lencode=kd,e.lenbits=9,e.distcode=Sd,e.distbits=5},p1=(e,t,n,r)=>{let i,o=e.state;return o.window===null&&(o.wsize=1<=o.wsize?(o.window.set(t.subarray(n-o.wsize,n),0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>r&&(i=r),o.window.set(t.subarray(n-r,n-r+i),o.wnext),r-=i,r?(o.window.set(t.subarray(n-r,n),0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave{let n,r,i,o,l,s,a,u,c,d,f,p,g,_,w=0,h,m,y,v,S,R,k,b,O=new Uint8Array(4),C,T,De=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(gr(e)||!e.output||!e.input&&e.avail_in!==0)return pt;n=e.state,n.mode===tn&&(n.mode=vd),l=e.next_out,i=e.output,a=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,u=n.hold,c=n.bits,d=s,f=a,b=mr;e:for(;;)switch(n.mode){case Ra:if(n.wrap===0){n.mode=vd;break}for(;c<16;){if(s===0)break e;s--,u+=r[o++]<>>8&255,n.check=he(n.check,O,2,0),u=0,c=0,n.mode=cv;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((u&255)<<8)+(u>>8))%31){e.msg="incorrect header check",n.mode=ee;break}if((u&15)!==uv){e.msg="unknown compression method",n.mode=ee;break}if(u>>>=4,c-=4,k=(u&15)+8,n.wbits===0&&(n.wbits=k),k>15||k>n.wbits){e.msg="invalid window size",n.mode=ee;break}n.dmax=1<>8&1),n.flags&512&&n.wrap&4&&(O[0]=u&255,O[1]=u>>>8&255,n.check=he(n.check,O,2,0)),u=0,c=0,n.mode=fv;case fv:for(;c<32;){if(s===0)break e;s--,u+=r[o++]<>>8&255,O[2]=u>>>16&255,O[3]=u>>>24&255,n.check=he(n.check,O,4,0)),u=0,c=0,n.mode=dv;case dv:for(;c<16;){if(s===0)break e;s--,u+=r[o++]<>8),n.flags&512&&n.wrap&4&&(O[0]=u&255,O[1]=u>>>8&255,n.check=he(n.check,O,2,0)),u=0,c=0,n.mode=pv;case pv:if(n.flags&1024){for(;c<16;){if(s===0)break e;s--,u+=r[o++]<>>8&255,n.check=he(n.check,O,2,0)),u=0,c=0}else n.head&&(n.head.extra=null);n.mode=mv;case mv:if(n.flags&1024&&(p=n.length,p>s&&(p=s),p&&(n.head&&(k=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(o,o+p),k)),n.flags&512&&n.wrap&4&&(n.check=he(n.check,r,p,o)),s-=p,o+=p,n.length-=p),n.length))break e;n.length=0,n.mode=hv;case hv:if(n.flags&2048){if(s===0)break e;p=0;do k=r[o+p++],n.head&&k&&n.length<65536&&(n.head.name+=String.fromCharCode(k));while(k&&p>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=tn;break;case _v:for(;c<32;){if(s===0)break e;s--,u+=r[o++]<>>=c&7,c-=c&7,n.mode=xd;break}for(;c<3;){if(s===0)break e;s--,u+=r[o++]<>>=1,c-=1,u&3){case 0:n.mode=vv;break;case 1:if(HR(n),n.mode=_a,t===ya){u>>>=2,c-=2;break e}break;case 2:n.mode=xv;break;case 3:e.msg="invalid block type",n.mode=ee}u>>>=2,c-=2;break;case vv:for(u>>>=c&7,c-=c&7;c<32;){if(s===0)break e;s--,u+=r[o++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=ee;break}if(n.length=u&65535,u=0,c=0,n.mode=wd,t===ya)break e;case wd:n.mode=wv;case wv:if(p=n.length,p){if(p>s&&(p=s),p>a&&(p=a),p===0)break e;i.set(r.subarray(o,o+p),l),s-=p,o+=p,a-=p,l+=p,n.length-=p;break}n.mode=tn;break;case xv:for(;c<14;){if(s===0)break e;s--,u+=r[o++]<>>=5,c-=5,n.ndist=(u&31)+1,u>>>=5,c-=5,n.ncode=(u&15)+4,u>>>=4,c-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=ee;break}n.have=0,n.mode=kv;case kv:for(;n.have>>=3,c-=3}for(;n.have<19;)n.lens[De[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,C={bits:n.lenbits},b=Zo(PR,n.lens,0,19,n.lencode,0,n.work,C),n.lenbits=C.bits,b){e.msg="invalid code lengths set",n.mode=ee;break}n.have=0,n.mode=Sv;case Sv:for(;n.have>>24,m=w>>>16&255,y=w&65535,!(h<=c);){if(s===0)break e;s--,u+=r[o++]<>>=h,c-=h,n.lens[n.have++]=y;else{if(y===16){for(T=h+2;c>>=h,c-=h,n.have===0){e.msg="invalid bit length repeat",n.mode=ee;break}k=n.lens[n.have-1],p=3+(u&3),u>>>=2,c-=2}else if(y===17){for(T=h+3;c>>=h,c-=h,k=0,p=3+(u&7),u>>>=3,c-=3}else{for(T=h+7;c>>=h,c-=h,k=0,p=11+(u&127),u>>>=7,c-=7}if(n.have+p>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=ee;break}for(;p--;)n.lens[n.have++]=k}}if(n.mode===ee)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=ee;break}if(n.lenbits=9,C={bits:n.lenbits},b=Zo(r1,n.lens,0,n.nlen,n.lencode,0,n.work,C),n.lenbits=C.bits,b){e.msg="invalid literal/lengths set",n.mode=ee;break}if(n.distbits=6,n.distcode=n.distdyn,C={bits:n.distbits},b=Zo(i1,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,C),n.distbits=C.bits,b){e.msg="invalid distances set",n.mode=ee;break}if(n.mode=_a,t===ya)break e;case _a:n.mode=va;case va:if(s>=6&&a>=258){e.next_out=l,e.avail_out=a,e.next_in=o,e.avail_in=s,n.hold=u,n.bits=c,RR(e,f),l=e.next_out,i=e.output,a=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,u=n.hold,c=n.bits,n.mode===tn&&(n.back=-1);break}for(n.back=0;w=n.lencode[u&(1<>>24,m=w>>>16&255,y=w&65535,!(h<=c);){if(s===0)break e;s--,u+=r[o++]<>v)],h=w>>>24,m=w>>>16&255,y=w&65535,!(v+h<=c);){if(s===0)break e;s--,u+=r[o++]<>>=v,c-=v,n.back+=v}if(u>>>=h,c-=h,n.back+=h,n.length=y,m===0){n.mode=Iv;break}if(m&32){n.back=-1,n.mode=tn;break}if(m&64){e.msg="invalid literal/length code",n.mode=ee;break}n.extra=m&15,n.mode=Ev;case Ev:if(n.extra){for(T=n.extra;c>>=n.extra,c-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=bv;case bv:for(;w=n.distcode[u&(1<>>24,m=w>>>16&255,y=w&65535,!(h<=c);){if(s===0)break e;s--,u+=r[o++]<>v)],h=w>>>24,m=w>>>16&255,y=w&65535,!(v+h<=c);){if(s===0)break e;s--,u+=r[o++]<>>=v,c-=v,n.back+=v}if(u>>>=h,c-=h,n.back+=h,m&64){e.msg="invalid distance code",n.mode=ee;break}n.offset=y,n.extra=m&15,n.mode=Rv;case Rv:if(n.extra){for(T=n.extra;c>>=n.extra,c-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=ee;break}n.mode=Cv;case Cv:if(a===0)break e;if(p=f-a,n.offset>p){if(p=n.offset-p,p>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=ee;break}p>n.wnext?(p-=n.wnext,g=n.wsize-p):g=n.wnext-p,p>n.length&&(p=n.length),_=n.window}else _=i,g=l-n.offset,p=n.length;p>a&&(p=a),a-=p,n.length-=p;do i[l++]=_[g++];while(--p);n.length===0&&(n.mode=va);break;case Iv:if(a===0)break e;i[l++]=n.length,a--,n.mode=va;break;case xd:if(n.wrap){for(;c<32;){if(s===0)break e;s--,u|=r[o++]<{if(gr(e))return pt;let t=e.state;return t.window&&(t.window=null),e.state=null,mr},GR=(e,t)=>{if(gr(e))return pt;let n=e.state;return n.wrap&2?(n.head=t,t.done=!1,mr):pt},ZR=(e,t)=>{let n=t.length,r,i,o;return gr(e)||(r=e.state,r.wrap!==0&&r.mode!==Sa)?pt:r.mode===Sa&&(i=1,i=Jo(i,t,n,0),i!==r.check)?o1:(o=p1(e,t,n,n),o?(r.mode=s1,l1):(r.havedict=1,mr))},KR=c1,QR=f1,XR=u1,qR=$R,JR=d1,YR=VR,eC=WR,tC=GR,nC=ZR,rC="pako inflate (from Nodeca project)",rn={inflateReset:KR,inflateReset2:QR,inflateResetKeep:XR,inflateInit:qR,inflateInit2:JR,inflate:YR,inflateEnd:eC,inflateGetHeader:tC,inflateSetDictionary:nC,inflateInfo:rC};function iC(){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 oC=iC,m1=Object.prototype.toString,{Z_NO_FLUSH:lC,Z_FINISH:sC,Z_OK:tl,Z_STREAM_END:Ed,Z_NEED_DICT:bd,Z_STREAM_ERROR:aC,Z_DATA_ERROR:Av,Z_MEM_ERROR:uC}=hr;function ol(e){this.options=ba.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});let t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new t1,this.strm.avail_out=0;let n=rn.inflateInit2(this.strm,t.windowBits);if(n!==tl)throw new Error(dr[n]);if(this.header=new oC,rn.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=el.string2buf(t.dictionary):m1.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=rn.inflateSetDictionary(this.strm,t.dictionary),n!==tl)))throw new Error(dr[n])}ol.prototype.push=function(e,t){let n=this.strm,r=this.options.chunkSize,i=this.options.dictionary,o,l,s;if(this.ended)return!1;for(t===~~t?l=t:l=t===!0?sC:lC,m1.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),o=rn.inflate(n,l),o===bd&&i&&(o=rn.inflateSetDictionary(n,i),o===tl?o=rn.inflate(n,l):o===Av&&(o=bd));n.avail_in>0&&o===Ed&&n.state.wrap>0&&e[n.next_in]!==0;)rn.inflateReset(n),o=rn.inflate(n,l);switch(o){case aC:case Av:case bd:case uC:return this.onEnd(o),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(n.avail_out===0||o===Ed))if(this.options.to==="string"){let a=el.utf8border(n.output,n.next_out),u=n.next_out-a,c=el.buf2string(n.output,a);n.next_out=u,n.avail_out=r-u,u&&n.output.set(n.output.subarray(a,a+u),0),this.onData(c)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(o===tl&&s===0)){if(o===Ed)return o=rn.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(n.avail_in===0)break}}return!0};ol.prototype.onData=function(e){this.chunks.push(e)};ol.prototype.onEnd=function(e){e===tl&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=ba.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Bd(e,t){let n=new ol(t);if(n.push(e),n.err)throw n.msg||dr[n.err];return n.result}function cC(e,t){return t=t||{},t.raw=!0,Bd(e,t)}var fC=ol,dC=Bd,pC=cC,mC=Bd,hC=hr,gC={Inflate:fC,inflate:dC,inflateRaw:pC,ungzip:mC,constants:hC},{Deflate:yC,deflate:_C,deflateRaw:vC,gzip:wC}=ER,{Inflate:xC,inflate:kC,inflateRaw:SC,ungzip:EC}=gC,bC=yC,RC=_C,CC=vC,IC=wC,NC=xC,OC=kC,TC=SC,PC=EC,AC=hr,h1={Deflate:bC,deflate:RC,deflateRaw:CC,gzip:IC,Inflate:NC,inflate:OC,inflateRaw:TC,ungzip:PC,constants:AC};var on={tables:{},columns:{},rels:{}},y1=e=>{let t="";return new Proxy({},{get(n,r){return r==="_batch"?{update:async i=>yr({name:t,action:"batch_update",table:"",params:{batch:i}},e),upsert:async i=>yr({name:t,action:"batch_upsert",table:"",params:{arg:i}},e)}:r==="_schema"?{tables:async()=>(on.tables[e]||(on.tables[e]=yr({name:t,action:"schema_tables",table:"",params:[]},e)),await on.tables[e]),columns:async i=>(on.columns[e+"_"+i]||(on.columns[e+"_"+i]=yr({name:t,action:"schema_columns",table:i,params:[]},e)),await on.columns[e+"_"+i]),rels:async i=>(on.rels[e+"_"+i]||(on.rels[e+"_"+i]=yr({name:t,action:"schema_rels",table:i,params:[]},e)),await on.rels[e+"_"+i])}:r.startsWith("$")?(...i)=>{let o=h1.gzip(JSON.stringify(i));return yr({name:t,action:"query",table:r,params:btoa(o.reduce((l,s)=>l+String.fromCharCode(s),""))},e)}:new Proxy({},{get(i,o){return async(...l)=>(r==="query"&&(r=o,o="query"),await yr({name:t,action:o,table:r,params:l},e))}})}})},Ca={},yr=async(e,t)=>{try{let n=new URL(t);n.pathname="/_dbs",e.table&&(n.pathname+=`/${e.table}`);let r=n.toString();typeof localStorage<"u"&&localStorage.mlsid&&(e.mlsid=localStorage.mlsid);let i=(0,g1.default)(e),o=Ca[i];if(!o||o&&Date.now()-o.timestamp>1e3){Ca[i]={timestamp:Date.now(),promise:mi(r,e,{"content-type":"application/json"}),result:null};let l=await Ca[i].promise;return Ca[i].result=l,l}return await o.promise}catch{}};var _1=P(Hs());var v1=e=>{let{item:t,item_comp:n,ids:r}=e,i=Xr(n);if(w1(i,r),t.id&&(i.id=t.id),i.hidden=t.hidden,i.component){if(i.component.props&&t.component&&t.component.props)for(let o of Object.keys(i.component.props)){let l=t.component.props[o],s=i.component.props[o];l&&(s.value=l.value,s.valueBuilt=l.valueBuilt,s.jsxCalledBy=l.jsxCalledBy,s.content=l.content)}i.component.instances=t.component?.instances,i.component.style=t.component?.style}for(let o of Object.keys(t))delete t[o];for(let[o,l]of Object.entries(i))t[o]=l},w1=(e,t)=>{if(e.originalId=e.id,t[e.id]||(t[e.id]=(0,_1.createId)()),e.id=t[e.id],e.childs)for(let n of e.childs)w1(n,t)};var x1=e=>{let t=Object.entries(e.item_comp.component?.props||{}).sort((n,r)=>n[1].idx-r[1].idx);for(let[n,r]of t){let i=Xr(r),o=e.item.component?.props;o&&o[n]&&(i.value=o[n].value,i.valueBuilt=o[n].valueBuilt,o[n].content&&(i.content=o[n].content)),i&&e.each(n,i)}};var Ia=e=>{let t={};for(let[n,r]of Object.entries(e))if(n==="childs"){if(t.childs=[],r&&Array.isArray(r))for(let i of r)i.type==="item"&&i.component?t.childs.push(i):t.childs.push({name:i.name,id:i.id,originalId:i.originalId})}else t[n]=r;return t};var k1=(e,t)=>{let{item:n}=t;if(n.type==="item"&&n.component?.id&&t.parent?.item.id){let r=e.comps[n.component.id];if(e.on?.visit_component&&e.on.visit_component(n,t.root||t.item),!r)return;if(r){let i;if(e.mode==="page"?(n.component.instances||(n.component.instances={}),i=n.component.instances):i=t.parent?.root_instances,i){let l=i[n.id];i[n.id]||(i[n.id]={},l=i[n.id]),v1({item:n,item_comp:r,ids:l})}let o={item:Ia(n),jsx_prop:t.jsx_prop,parent:{id:t.parent.item.id,comp_id:t.parent?.comp?.component?.id,instance_id:t.parent?.instance_id},instances:i};if(e.on?.visit&&e.on.visit(o,n,t.root||t.item),n.id&&e.set_meta!==!1&&(e.meta[n.id]=o),x1({item:n,item_comp:r,instance:i?i[n.id]:{},each(l,s){let a=n.component?.id;s.meta?.type==="content-element"&&a&&s.content&&(s.content.name=l,Si({...e},{item:s.content,root:t.root||s.content,is_root:!1,jsx_prop:{is_root:!0,comp_id:a,name:l},parent:{item:o.item,instance_id:n.id,comp:r,root_instances:i}}))}}),n.childs)for(let l of Object.values(n.childs))l?.name?.startsWith("jsx:")||l&&Object.keys(l).length>3&&Si({...e,mode:"comp"},{item:l,is_root:!1,root:t.root||t.item,parent:{item:n,instance_id:n.id,root_instances:i,comp:r}})}}};var Si=(e,t)=>{let n=t.item;if(n.type==="item"&&n.component?.id&&t.ignore_first_component!==!0){k1(e,t);return}let r={item:Ia(n),parent:{id:t.parent?.item.id||"root",instance_id:t.parent?.instance_id,comp_id:t.parent?.comp?.component?.id}};if(t.jsx_prop&&(r.jsx_prop=t.jsx_prop),e.on?.visit&&e.on.visit(r,n,t.root||t.item),n.id&&e.set_meta!==!1&&(e.meta[r.item.id]=r),n.childs){for(let[i,o]of Object.entries(n.childs))if(o.id){let l={item:o,is_root:!1,root:t.root||t.item,parent:{item:r.item,instance_id:t.parent?.instance_id,comp:t.parent?.comp,root_instances:t.parent?.root_instances}};t.jsx_prop&&(l.jsx_prop={...t.jsx_prop,is_root:!1}),Si(e,l)}}};var LC=()=>new Promise(async e=>{let t=!1,n=await(await fetch(I.url`_prasi/route`)).json();t||e(n)}),S1=async()=>{let e=Vs(),t=[];try{let n=await LC();if(n&&n.site&&n.urls){n.layout&&(I.layout.id=n.layout.id,I.layout.root=n.layout.root,I.layout.meta={},I.layout.root&&(await ai(I.layout.root.childs),Na(I.layout.meta,I.layout.root))),I.site=n.site,I.site.code={mode:"vsc"},await MC(),I.site.api=G_(I.site.api_url),I.site.db=y1(I.site.api_url);let r=window;r.serverurl=I.site.api_url,r.db=I.site.db,r.api=I.site.api;for(let i of n.urls)e.insert(i.url,i),t.push(i)}}catch{}return{router:e,pages:t}},MC=()=>new Promise(e=>{let t=document,n=t.createElement("script");n.onload=async()=>{e()};let r=I.site.api_url;if(r==="*")r=`${location.protocol}//${location.host}`,I.site.api_url=r;else try{new URL(r)}catch{location.hostname==="localhost"?r="http://localhost:4550":r="https://prasi.avolut.com"}localStorage.getItem("api-ts-"+r)||localStorage.setItem("api-ts-"+r,Date.now().toString());let i=localStorage.getItem("api-ts-"+r);n.src=`${r}/_prasi/load.js?url=${r}&v3&ts=${i}`,document.querySelector(`script[src="${n.src}"]`)?e():t.body.appendChild(n)}),Na=(e,t)=>{for(let n of t.childs)Si({set_meta:!0,comps:I.comp.list,meta:e,mode:"page"},{item:n})};var se=window;var ln=P(G()),Hd=()=>location.hostname.split(".").length===4||location.hostname==="prasi.app"||location.hostname==="prasi.avolut.com"||location.hostname.includes("ngrok")||location.hostname==="localhost"||location.hostname==="127.0.0.1"||location.hostname==="10.0.2.2",b1=()=>{let e=Nn({page_id:""}),[t,n]=(0,E1.useState)({}),r=()=>n({});se.prasiContext.render=r;let i=lf.Provider,o=Hd()&&location.pathname.startsWith("/prod");if(I.route.status!=="ready")return I.route.status==="init"&&(I.route.status="loading",S1().then(async({router:c,pages:d})=>{$y(),I.route.status="ready",I.route.router=c,I.route.pages=d;let f=se._prasi.basepath,p=`${f.endsWith("/")?f:`${f}/`}_prasi/code/index.js`,g=new URL(location.href);p.startsWith("/")&&(p=`${g.protocol}//${g.host}${p}`);let _=new Function("callback",`import("${p}").then(callback)`);await new Promise(w=>{_(h=>{for(let[m,y]of Object.entries(h))se[m]=y;w()})}),r()})),(0,ln.jsx)(wo,{});let l=I.route.router;if(!l)return(0,ln.jsx)(mf,{children:"Failed to create Router"});let s="";if(o){let c=location.pathname.split("/");pf(c[3])&&(s=c[3])}let a=null;if(se._prasi.page_id)l.insert(I.pathname,{id:se._prasi.page_id,url:I.pathname}),a={id:se._prasi.page_id,url:"",params:se._prasi.params},se._prasi.routed={page_id:se._prasi.page_id,params:se._prasi.params},delete se._prasi.page_id,delete se._prasi.params;else{if(a=l.lookup(I.pathname),s){let c=I.route.pages.find(d=>s===d.id);c&&(a=c)}a&&se._prasi.routed&&se._prasi.routed.page_id===a.id&&se._prasi.routed.params&&(a.params=se._prasi.routed.params)}if(!a)return(0,ln.jsx)(mf,{children:"Page Not Found"});a.id!==e.page_id&&(I.init_local_effect={}),se.params=a.params||{},I.page.id=a.id,I.page.url=a.url;let u=I.page.cache[a.id];if(u)I.page.root=u.root,I.page.meta=u.meta;else return jy(a.id).then(async({root:c})=>{if(a){let d={id:a.id,url:a.url,root:c,meta:{}};await ai(c.childs),Na(d.meta,c),I.page.cache[d.id]=d,r()}}).catch(()=>{r()}),(0,ln.jsx)(wo,{note:"Loading page"});return(0,ln.jsx)(i,{value:se.prasiContext,children:(0,ln.jsx)("div",{className:cx("relative flex flex-1 items-center justify-center"),children:(0,ln.jsx)("div",{className:cx("absolute flex flex-col items-stretch flex-1 bg-white main-content-preview",I.mode==="mobile"?css` + `);s.props[p]={value:g};let w=_(...Object.values(c));typeof w=="function"&&(s.props[p].fn=w,w=(...h)=>{if(s)return s.props?.[p].fn(...h)}),c[p]=w,u[p]=w,r&&(r[p]=w)}catch{a.add(p)}if(location.pathname.startsWith("/ed/")&&ni.item_id&&t.item.id===ni.item_id){ni.scope={};for(let[p,f]of Object.entries(r))ni.scope[p]=f;ni.scope.self_props=u}}}},ct={timeout:null,set:new WeakSet,map:{},src:{}},yE=(e,t)=>{if(!ct.set.has(e)){ct.set.add(e);let n=(0,zy.createId)();ct.map[n]={mprop:e},ct.src[n]=t}clearTimeout(ct.timeout),ct.timeout=setTimeout(async()=>{let n=await _api.code_build(ct.src),r=null;for(let[i,o]of Object.entries(n)){let s=ct.map[i].mprop;if(!r&&s.doc){r=s.doc;break}}r&&(r.transact(()=>{for(let[i,o]of Object.entries(n))ct.map[i].mprop.set("valueBuilt",o)}),ct.set=new WeakSet,ct.map={},ct.src={})},300)},ql=(e,t,n,r)=>{let i=r?t.item.script_keyed?.[r]:t.item.script;if(i&&i.props){let o={...n,api:e.site.api,db:e.site.db};for(let[s,l]of Object.entries(i.props))if(l.fn){let c=new Function(...Object.keys(o),`// [${t.item.name}] ${s}: ${t.item.id} + return ${l.value||""} + `);l.fn=c(...Object.values(o))}}};var Hf=P(G()),Vf=({meta:e,passprop:t,is_layout:n,parent_key:r,depth:i})=>{let o=Pn(An,"VI"),[s,l]=(0,Uy.useState)({});e.render=()=>{l({})};let c=t;return e.item.component?.id&&(c||(c={}),jy(o,e,n,c,i,r)),e.item.adv?.html?(0,Hf.jsx)(Ql,{meta:e,passprop:c,is_layout:n,depth:i}):e.item.adv?.js&&(My(o,e,n,c,i,r),e.script)?e.script.result:(0,Hf.jsx)(Ql,{meta:e,passprop:c,is_layout:n,depth:i})};var Se=P(G()),_E=70,vE={debug:!!localStorage.getItem("prasi-js-debug")},Xl={enabled:!1,meta:{}},en=({meta:e,passprop:t,is_layout:n,parent_key:r,depth:i})=>{if(Xl.enabled){let o=Xl.meta;if(o[e.item.id]?o[e.item.id].last_render===Math.floor(Date.now()/1e3)?o[e.item.id].count++:o[e.item.id]={last_render:Math.floor(Date.now()/1e3),count:1}:o[e.item.id]={last_render:Math.floor(Date.now()/1e3),count:1},o[e.item.id]?.count>_E)return(0,Se.jsxs)("div",{className:"bg-orange-100 border border-orange-300 rounded-sm text-xs flex flex-col items-center",children:[(0,Se.jsxs)("div",{className:"text-[10px] font-bold text-red-900 self-stretch px-1",children:["WARNING: Render loop detected in [",e.item.name,"]"]}),(0,Se.jsxs)("p",{className:"border-b border-orange-300 px-1 pb-1 min-w-[100px]",children:["Rendered ",o[e.item.id]?.count," times in less than 1 second."]})]})}if(!e||e.item.hidden)return null;if(vE.debug){let o="";for(let s=0;s{let o=Pn(An,"VI");if(n&&e.item.name==="children"){let l=[];for(let c of o.entry){let a=o.meta[c];if(a.item.adv?.js||a.item.component?.id)l.push((0,Se.jsx)(Pt,{meta:a,children:(0,Se.jsx)(Vf,{meta:a,is_layout:!1,passprop:{...t},parent_key:r,depth:i+1})}));else{let u=bo(o,a,!1,t,i);o.visit&&o.visit(a,u),l.push((0,Se.jsx)("div",{...u.props}))}}return(0,Se.jsx)(Se.Fragment,{children:l.map((c,a)=>(0,Se.jsx)(By.Fragment,{children:c},a))})}let s=bo(o,e,n,t,i);return o.visit&&o.visit(e,s),(0,Se.jsx)("div",{...s.props})};var Je=window,$y=async(e,t)=>{window.parent&&(window.addEventListener("message",async({data:n})=>{if(typeof n=="object"&&n.mobile){let r=n,i=async o=>{if(!Je.notif?.onTap){let s=null,l=0;await new Promise(()=>{s=setInterval(()=>{l++,l>20&&clearInterval(s),o()&&clearInterval(s)},500)});return}};switch(r.type){case"notification-token":t.notif={token:r.token},Je.notif={async send(o){if(e&&e.site.api)return await e.site.api._notif("send",{type:"send",id:typeof o.user_id=="string"?o.user_id:o.user_id.toString(),body:o.body,title:o.title,data:o.data})},async register(o){if(e&&e.site.api&&t.notif?.token)return await e.site.api._notif("register",{type:"register",id:typeof o=="string"?o:o.toString(),token:t.notif.token})},onReceive(o){},onTap(o){}};break;case"notification-tap":if(!Je.notif?.onTap){i(()=>Je.notif?.onTap?(Je.notif?.onTap(r.notif),!0):!1);return}Je.notif?.onTap&&Je.notif?.onTap(r.notif);break;case"notification-receive":Je.notif?.onReceive||i(()=>Je.notif?.onReceive?(Je.notif?.onReceive(r.notif),!0):!1),Je.notif?.onReceive&&Je.notif?.onReceive(r.notif);break}}}),window.parent.postMessage({mobile:!0,type:"ready"},"*")),Je.notif={async send(n){if(e&&e.site.api)return await e.site.api._notif("send",{type:"send",id:typeof n.user_id=="string"?n.user_id:n.user_id.toString(),body:n.body,title:n.title,data:n.data})}}};var Wf=window;Wf.prasi_ext||(Wf.prasi_ext={});var Jl=Wf.prasi_ext;var Hy=async e=>{let t=Jl[e.site.id];if(t||(Jl[e.site.id]={status:"init"},t=Jl[e.site.id]),t.status==="init"){if(t.status="loading",window.parent!==window){let n=r=>{window.parent.postMessage({mobile:!0,...r},"*")};window.addEventListener("message",async({data:r})=>{console.log(r),typeof r=="object"&&r.mobile}),n({type:"ready"})}await $y(e,t),t.status="ready"}};var li=P(G()),Vy=({})=>{let e=Pn(An,"VI"),t=Nn({tick:Date.now()});if(e.tick=t.tick,Hy(e),e.status!=="ready")return(0,li.jsx)("div",{className:"flex flex-1 flex-col relative",children:(0,li.jsx)(So,{backdrop:!1})});let n=!!e.layout?.entry&&e.layout.entry.length>0,r=e.entry;return n&&e.layout?.entry&&(r=e.layout?.entry),(0,li.jsx)("div",{className:"flex flex-1 flex-col relative",children:Array.isArray(r)&&r.map(i=>{let o=n?e.layout?.meta[i]:e.meta[i];return o&&Element?(0,li.jsx)(Pt,{children:(0,li.jsx)(en,{meta:o,is_layout:n,depth:0})},o.item.id):null})})};var Yl=P(G()),ai=window,Wy=({meta:e,entry:t,api_url:n,site_id:r,api:i,mode:o,db:s,visit:l,script:c,page_id:a,render_stat:u,on_status_changed:p,on_preload:f,layout:d,comp_load:g})=>{let _=Pn(An,"VI");return _.mode=o,_.entry=t,_.on_preload=f,_.comp.load=g,ai.siteurl=(w,h)=>{if(w.startsWith("http://")||w.startsWith("https://"))return w;try{["prasi.avolut.com","localhost"].includes(location.hostname)?_.site.api_url&&(_.site_url||(_.site_url=new URL(_.site.api_url))):_.site_url||(h&&_.site.api_url?_.site_url=new URL(_.site.api_url):_.site_url=new URL(location.href),_.site_url.pathname="")}catch{}if(_.site_url){let m=_.site_url,y=w;return y.startsWith("/")||(y="/"+y),ai.prasiContext.siteUrl&&(y=ai.prasiContext.siteUrl(y)),`${m.protocol}//${m.host}${y}`}return w},ai.isMobile=o==="mobile",ai.isDesktop=o==="desktop",ai.preload=(w,h)=>{_.page.navs[a]||(_.page.navs[a]=new Set);let m=typeof w=="string"?[w]:w;for(let y of m)_.page.navs[a].add(y);return clearTimeout(No.timeout),No.timeout=setTimeout(()=>{_.on_preload&&_.on_preload({urls:Array.from(_.page.navs[a]),opt:{on_load:h?.on_load}})},100),""},_.layout=d,_.page.cur.id=a,_.on_status_changes=p,u==="disabled"&&(Xl.enabled=!1),_.meta!==e&&(_.meta=e),c&&(_.script.init_local_effect=c.init_local_effect),_.visit=l,_.status==="init"&&(_.site.db=s,_.site.api=i,ug(_,{api_url:n,site_id:r})),f&&(0,ea.useEffect)(()=>{setTimeout(()=>{let w=_.page.navs[_.page.cur.id];w&&f({urls:Array.from(w),opt:{on_load(h){}}})},500)},[_.page.cur.id]),(0,Yl.jsx)(Pt,{children:(0,Yl.jsx)(ea.Suspense,{children:(0,Yl.jsx)(Vy,{})})})};var Gf=window,T={root:null,url(...e){let t=e.map(r=>Array.isArray(r)?r.join(""):r).join(""),n=this.root.toString();return n.endsWith("/")&&(n=n.substring(0,n.length-1)),t.startsWith("/")?n+t:n+"/"+t},get pathname(){let e=location.pathname.substring(T.root.pathname.length);return e.startsWith("/")?e:`/${e}`},site:{id:Gf._prasi?.site_id},init_local_effect:{},mode:"",route:{status:"init",pages:[],router:null},comp:{list:{},pending:{}},layout:{id:"",root:null,meta:null},cache:{urls:new Set},page:{id:"",url:"",root:null,meta:null,cache:{}}},Gy=()=>{if(!T.root){let e=new URL(location.href);Gf._prasi.basepath&&(e.pathname=Gf._prasi.basepath),T.root=new URL(`${e.protocol}//${e.host}${e.pathname}`),T.root.pathname.endsWith("/")&&(T.root.pathname=T.root.pathname.substring(0,T.root.length-1))}};var ui=async e=>{let t=T.comp;for(let r of e)r&&r.type!=="text"&&ta(r);let n=Object.keys(t.pending);if(n.length>0)try{let r=await(await fetch(T.url`_prasi/comp`,{method:"POST",body:JSON.stringify({ids:[...n]})})).json();for(let[i,o]of Object.entries(r))delete t.pending[i],t.list[i]=o,await jl(`comp-${i}`,o);if(Object.keys(t.pending).length>0){console.warn(`Warning: component not found: ${Object.keys(t.pending)}`);return}await ui(Object.values(r))}catch(r){console.error(r)}},ta=e=>{let t=T.comp;if(e.type==="item"){let n=e.component?.id;if(n&&(!t.list[n]&&!t.pending[n]&&(t.pending[n]=[]),t.pending[n]&&(t.pending[n].find(r=>r.id===e.id)||t.pending[n].push(e)),t.pending[n])){if(t.list[n]){for(let r of t.pending[n])for(let i of Object.values(r.component?.props||{}))i.content&&ta(i.content);delete t.pending[n]}else if(e.component?.props)for(let r of Object.values(e.component?.props||{}))r.content&&ta(r.content)}}if(e.childs)for(let n of e.childs){let r=n;r&&r.type!=="text"&&ta(r)}};var Zy=e=>new Promise(async t=>{let n=!1,r=await yf(`page-${e}`);r&&(t(r),n=!0);let i=await(await fetch(T.url`_prasi/page/${e}`)).json();n||t(i)}),wE=e=>new Promise(async t=>{let n={},r=[...new Set(e)],i=!0;for(let s of r){let l=await yf(`page-${s}`);if(l)n[s]=l;else{i=!1;break}}i&&t(n);let o=await(await fetch(T.url`_prasi/pages`,{method:"POST",body:JSON.stringify({ids:r})})).json();i||t(o)}),Ky=async e=>{let t=e.map(r=>T.route.router?.lookup(r)).filter(r=>r&&r.id);return await wE(t.map(r=>r?.id))};var Qy=P(qy()),Xy=()=>{let e=T;if(e.site.id){if(!e.mode&&e.site.responsive)if(e.site.responsive!=="mobile-only"&&e.site.responsive!=="desktop-only"){let t=(0,Qy.default)();e.mode=t.device.type==="mobile"?"mobile":"desktop"}else e.site.responsive==="mobile-only"?e.mode="mobile":e.site.responsive==="desktop-only"&&(e.mode="desktop");localStorage.getItem("prasi-editor-mode")&&(e.mode=localStorage.getItem("prasi-editor-mode"))}};function Lo(e,t){return function(){return e.apply(t,arguments)}}var{toString:xE}=Object.prototype,{getPrototypeOf:qf}=Object,ia=(e=>t=>{let n=xE.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),kt=e=>(e=e.toLowerCase(),t=>ia(t)===e),oa=e=>t=>typeof t===e,{isArray:ci}=Array,Do=oa("undefined");function kE(e){return e!==null&&!Do(e)&&e.constructor!==null&&!Do(e.constructor)&&ft(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var e_=kt("ArrayBuffer");function SE(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&e_(e.buffer),t}var EE=oa("string"),ft=oa("function"),t_=oa("number"),sa=e=>e!==null&&typeof e=="object",bE=e=>e===!0||e===!1,ra=e=>{if(ia(e)!=="object")return!1;let t=qf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},RE=kt("Date"),CE=kt("File"),TE=kt("Blob"),IE=kt("FileList"),OE=e=>sa(e)&&ft(e.pipe),NE=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ft(e.append)&&((t=ia(e))==="formdata"||t==="object"&&ft(e.toString)&&e.toString()==="[object FormData]"))},PE=kt("URLSearchParams"),[AE,LE,DE,ME]=["ReadableStream","Request","Response","Headers"].map(kt),zE=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Mo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),ci(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}var r_=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,i_=e=>!Do(e)&&e!==r_;function Kf(){let{caseless:e}=i_(this)&&this||{},t={},n=(r,i)=>{let o=e&&n_(t,i)||i;ra(t[o])&&ra(r)?t[o]=Kf(t[o],r):ra(r)?t[o]=Kf({},r):ci(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r(Mo(t,(i,o)=>{n&&ft(i)?e[o]=Lo(i,n):e[o]=i},{allOwnKeys:r}),e),FE=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),UE=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},BE=(e,t,n,r)=>{let i,o,s,l={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!r||r(s,e,t))&&!l[s]&&(t[s]=e[s],l[s]=!0);e=n!==!1&&qf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},$E=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},HE=e=>{if(!e)return null;if(ci(e))return e;let t=e.length;if(!t_(t))return null;let n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},VE=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&qf(Uint8Array)),WE=(e,t)=>{let r=(e&&e[Symbol.iterator]).call(e),i;for(;(i=r.next())&&!i.done;){let o=i.value;t.call(e,o[0],o[1])}},GE=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},ZE=kt("HTMLFormElement"),KE=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Jy=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),qE=kt("RegExp"),o_=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};Mo(n,(i,o)=>{let s;(s=t(i,o,e))!==!1&&(r[o]=s||i)}),Object.defineProperties(e,r)},QE=e=>{o_(e,(t,n)=>{if(ft(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;let r=e[n];if(ft(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},XE=(e,t)=>{let n={},r=i=>{i.forEach(o=>{n[o]=!0})};return ci(e)?r(e):r(String(e).split(t)),n},JE=()=>{},YE=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Zf="abcdefghijklmnopqrstuvwxyz",Yy="0123456789",s_={DIGIT:Yy,ALPHA:Zf,ALPHA_DIGIT:Zf+Zf.toUpperCase()+Yy},e2=(e=16,t=s_.ALPHA_DIGIT)=>{let n="",{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function t2(e){return!!(e&&ft(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var n2=e=>{let t=new Array(10),n=(r,i)=>{if(sa(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;let o=ci(r)?[]:{};return Mo(r,(s,l)=>{let c=n(s,i+1);!Do(c)&&(o[l]=c)}),t[i]=void 0,o}}return r};return n(e,0)},r2=kt("AsyncFunction"),i2=e=>e&&(sa(e)||ft(e))&&ft(e.then)&&ft(e.catch),x={isArray:ci,isArrayBuffer:e_,isBuffer:kE,isFormData:NE,isArrayBufferView:SE,isString:EE,isNumber:t_,isBoolean:bE,isObject:sa,isPlainObject:ra,isReadableStream:AE,isRequest:LE,isResponse:DE,isHeaders:ME,isUndefined:Do,isDate:RE,isFile:CE,isBlob:TE,isRegExp:qE,isFunction:ft,isStream:OE,isURLSearchParams:PE,isTypedArray:VE,isFileList:IE,forEach:Mo,merge:Kf,extend:jE,trim:zE,stripBOM:FE,inherits:UE,toFlatObject:BE,kindOf:ia,kindOfTest:kt,endsWith:$E,toArray:HE,forEachEntry:WE,matchAll:GE,isHTMLForm:ZE,hasOwnProperty:Jy,hasOwnProp:Jy,reduceDescriptors:o_,freezeMethods:QE,toObjectSet:XE,toCamelCase:KE,noop:JE,toFiniteNumber:YE,findKey:n_,global:r_,isContextDefined:i_,ALPHABET:s_,generateString:e2,isSpecCompliantForm:t2,toJSONObject:n2,isAsyncFn:r2,isThenable:i2};function fi(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}x.inherits(fi,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:x.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var l_=fi.prototype,a_={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{a_[e]={value:e}});Object.defineProperties(fi,a_);Object.defineProperty(l_,"isAxiosError",{value:!0});fi.from=(e,t,n,r,i,o)=>{let s=Object.create(l_);return x.toFlatObject(e,s,function(c){return c!==Error.prototype},l=>l!=="isAxiosError"),fi.call(s,e.message,t,n,r,i),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};var D=fi;var la=null;function Qf(e){return x.isPlainObject(e)||x.isArray(e)}function c_(e){return x.endsWith(e,"[]")?e.slice(0,-2):e}function u_(e,t,n){return e?e.concat(t).map(function(i,o){return i=c_(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function o2(e){return x.isArray(e)&&!e.some(Qf)}var s2=x.toFlatObject(x,{},null,function(t){return/^is[A-Z]/.test(t)});function l2(e,t,n){if(!x.isObject(e))throw new TypeError("target must be an object");t=t||new(la||FormData),n=x.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(_,w){return!x.isUndefined(w[_])});let r=n.metaTokens,i=n.visitor||u,o=n.dots,s=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&x.isSpecCompliantForm(t);if(!x.isFunction(i))throw new TypeError("visitor must be a function");function a(g){if(g===null)return"";if(x.isDate(g))return g.toISOString();if(!c&&x.isBlob(g))throw new D("Blob is not supported. Use a Buffer instead.");return x.isArrayBuffer(g)||x.isTypedArray(g)?c&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function u(g,_,w){let h=g;if(g&&!w&&typeof g=="object"){if(x.endsWith(_,"{}"))_=r?_:_.slice(0,-2),g=JSON.stringify(g);else if(x.isArray(g)&&o2(g)||(x.isFileList(g)||x.endsWith(_,"[]"))&&(h=x.toArray(g)))return _=c_(_),h.forEach(function(y,v){!(x.isUndefined(y)||y===null)&&t.append(s===!0?u_([_],v,o):s===null?_:_+"[]",a(y))}),!1}return Qf(g)?!0:(t.append(u_(w,_,o),a(g)),!1)}let p=[],f=Object.assign(s2,{defaultVisitor:u,convertValue:a,isVisitable:Qf});function d(g,_){if(!x.isUndefined(g)){if(p.indexOf(g)!==-1)throw Error("Circular reference detected in "+_.join("."));p.push(g),x.forEach(g,function(h,m){(!(x.isUndefined(h)||h===null)&&i.call(t,h,x.isString(m)?m.trim():m,_,f))===!0&&d(h,_?_.concat(m):[m])}),p.pop()}}if(!x.isObject(e))throw new TypeError("data must be an object");return d(e),t}var Mn=l2;function f_(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function d_(e,t){this._pairs=[],e&&Mn(e,this,t)}var p_=d_.prototype;p_.append=function(t,n){this._pairs.push([t,n])};p_.toString=function(t){let n=t?function(r){return t.call(this,r,f_)}:f_;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};var aa=d_;function a2(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function zo(e,t,n){if(!t)return e;let r=n&&n.encode||a2,i=n&&n.serialize,o;if(i?o=i(t,n):o=x.isURLSearchParams(t)?t.toString():new aa(t,n).toString(r),o){let s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}var Xf=class{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){x.forEach(this.handlers,function(r){r!==null&&t(r)})}},Jf=Xf;var ua={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var m_=typeof URLSearchParams<"u"?URLSearchParams:aa;var h_=typeof FormData<"u"?FormData:null;var g_=typeof Blob<"u"?Blob:null;var y_={isBrowser:!0,classes:{URLSearchParams:m_,FormData:h_,Blob:g_},protocols:["http","https","file","blob","url","data"]};var ed={};q1(ed,{hasBrowserEnv:()=>Yf,hasStandardBrowserEnv:()=>u2,hasStandardBrowserWebWorkerEnv:()=>c2,origin:()=>f2});var Yf=typeof window<"u"&&typeof document<"u",u2=(e=>Yf&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),c2=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",f2=Yf&&window.location.href||"http://localhost";var ge={...ed,...y_};function td(e,t){return Mn(e,new ge.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return ge.isNode&&x.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function d2(e){return x.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function p2(e){let t={},n=Object.keys(e),r,i=n.length,o;for(r=0;r=n.length;return s=!s&&x.isArray(i)?i.length:s,c?(x.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!l):((!i[s]||!x.isObject(i[s]))&&(i[s]=[]),t(n,r,i[s],o)&&x.isArray(i[s])&&(i[s]=p2(i[s])),!l)}if(x.isFormData(e)&&x.isFunction(e.entries)){let n={};return x.forEachEntry(e,(r,i)=>{t(d2(r),i,n,0)}),n}return null}var ca=m2;function h2(e,t,n){if(x.isString(e))try{return(t||JSON.parse)(e),x.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}var nd={transitional:ua,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){let r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=x.isObject(t);if(o&&x.isHTMLForm(t)&&(t=new FormData(t)),x.isFormData(t))return i?JSON.stringify(ca(t)):t;if(x.isArrayBuffer(t)||x.isBuffer(t)||x.isStream(t)||x.isFile(t)||x.isBlob(t)||x.isReadableStream(t))return t;if(x.isArrayBufferView(t))return t.buffer;if(x.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return td(t,this.formSerializer).toString();if((l=x.isFileList(t))||r.indexOf("multipart/form-data")>-1){let c=this.env&&this.env.FormData;return Mn(l?{"files[]":t}:t,c&&new c,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),h2(t)):t}],transformResponse:[function(t){let n=this.transitional||nd.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(x.isResponse(t)||x.isReadableStream(t))return t;if(t&&x.isString(t)&&(r&&!this.responseType||i)){let s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(l){if(s)throw l.name==="SyntaxError"?D.from(l,D.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ge.classes.FormData,Blob:ge.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};x.forEach(["delete","get","head","post","put","patch"],e=>{nd.headers[e]={}});var di=nd;var g2=x.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),__=e=>{let t={},n,r,i;return e&&e.split(` +`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||t[n]&&g2[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};var v_=Symbol("internals");function jo(e){return e&&String(e).trim().toLowerCase()}function fa(e){return e===!1||e==null?e:x.isArray(e)?e.map(fa):String(e)}function y2(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}var _2=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function rd(e,t,n,r,i){if(x.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!x.isString(t)){if(x.isString(r))return t.indexOf(r)!==-1;if(x.isRegExp(r))return r.test(t)}}function v2(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function w2(e,t){let n=x.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,s){return this[r].call(this,t,i,o,s)},configurable:!0})})}var pi=class{constructor(t){t&&this.set(t)}set(t,n,r){let i=this;function o(l,c,a){let u=jo(c);if(!u)throw new Error("header name must be a non-empty string");let p=x.findKey(i,u);(!p||i[p]===void 0||a===!0||a===void 0&&i[p]!==!1)&&(i[p||c]=fa(l))}let s=(l,c)=>x.forEach(l,(a,u)=>o(a,u,c));if(x.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(x.isString(t)&&(t=t.trim())&&!_2(t))s(__(t),n);else if(x.isHeaders(t))for(let[l,c]of t.entries())o(c,l,r);else t!=null&&o(n,t,r);return this}get(t,n){if(t=jo(t),t){let r=x.findKey(this,t);if(r){let i=this[r];if(!n)return i;if(n===!0)return y2(i);if(x.isFunction(n))return n.call(this,i,r);if(x.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=jo(t),t){let r=x.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||rd(this,this[r],r,n)))}return!1}delete(t,n){let r=this,i=!1;function o(s){if(s=jo(s),s){let l=x.findKey(r,s);l&&(!n||rd(r,r[l],l,n))&&(delete r[l],i=!0)}}return x.isArray(t)?t.forEach(o):o(t),i}clear(t){let n=Object.keys(this),r=n.length,i=!1;for(;r--;){let o=n[r];(!t||rd(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){let n=this,r={};return x.forEach(this,(i,o)=>{let s=x.findKey(r,o);if(s){n[s]=fa(i),delete n[o];return}let l=t?v2(o):String(o).trim();l!==o&&delete n[o],n[l]=fa(i),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let n=Object.create(null);return x.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&x.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){let r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){let r=(this[v_]=this[v_]={accessors:{}}).accessors,i=this.prototype;function o(s){let l=jo(s);r[l]||(w2(i,s),r[l]=!0)}return x.isArray(t)?t.forEach(o):o(t),this}};pi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);x.reduceDescriptors(pi.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});x.freezeMethods(pi);var pe=pi;function Fo(e,t){let n=this||di,r=t||n,i=pe.from(r.headers),o=r.data;return x.forEach(e,function(l){o=l.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function Uo(e){return!!(e&&e.__CANCEL__)}function w_(e,t,n){D.call(this,e??"canceled",D.ERR_CANCELED,t,n),this.name="CanceledError"}x.inherits(w_,D,{__CANCEL__:!0});var Lt=w_;function Bo(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new D("Request failed with status code "+n.status,[D.ERR_BAD_REQUEST,D.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function id(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function x2(e,t){e=e||10;let n=new Array(e),r=new Array(e),i=0,o=0,s;return t=t!==void 0?t:1e3,function(c){let a=Date.now(),u=r[o];s||(s=a),n[i]=c,r[i]=a;let p=o,f=0;for(;p!==i;)f+=n[p++],p=p%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),a-sr)return i&&(clearTimeout(i),i=null),n=l,e.apply(null,arguments);i||(i=setTimeout(()=>(i=null,n=Date.now(),e.apply(null,arguments)),r-(l-n)))}}var k_=k2;var mi=(e,t,n=3)=>{let r=0,i=x_(50,250);return k_(o=>{let s=o.loaded,l=o.lengthComputable?o.total:void 0,c=s-r,a=i(c),u=s<=l;r=s;let p={loaded:s,total:l,progress:l?s/l:void 0,bytes:c,rate:a||void 0,estimated:a&&l&&u?(l-s)/a:void 0,event:o,lengthComputable:l!=null};p[t?"download":"upload"]=!0,e(p)},n)};var S_=ge.hasStandardBrowserEnv?function(){let t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),r;function i(o){let s=o;return t&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(s){let l=x.isString(s)?i(s):s;return l.protocol===r.protocol&&l.host===r.host}}():function(){return function(){return!0}}();var E_=ge.hasStandardBrowserEnv?{write(e,t,n,r,i,o){let s=[e+"="+encodeURIComponent(t)];x.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),x.isString(r)&&s.push("path="+r),x.isString(i)&&s.push("domain="+i),o===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){let t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function od(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function sd(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function $o(e,t){return e&&!od(t)?sd(e,t):t}var b_=e=>e instanceof pe?{...e}:e;function St(e,t){t=t||{};let n={};function r(a,u,p){return x.isPlainObject(a)&&x.isPlainObject(u)?x.merge.call({caseless:p},a,u):x.isPlainObject(u)?x.merge({},u):x.isArray(u)?u.slice():u}function i(a,u,p){if(x.isUndefined(u)){if(!x.isUndefined(a))return r(void 0,a,p)}else return r(a,u,p)}function o(a,u){if(!x.isUndefined(u))return r(void 0,u)}function s(a,u){if(x.isUndefined(u)){if(!x.isUndefined(a))return r(void 0,a)}else return r(void 0,u)}function l(a,u,p){if(p in t)return r(a,u);if(p in e)return r(void 0,a)}let c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l,headers:(a,u)=>i(b_(a),b_(u),!0)};return x.forEach(Object.keys(Object.assign({},e,t)),function(u){let p=c[u]||i,f=p(e[u],t[u],u);x.isUndefined(f)&&p!==l||(n[u]=f)}),n}var da=e=>{let t=St({},e),{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:l}=t;t.headers=s=pe.from(s),t.url=zo($o(t.baseURL,t.url),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let c;if(x.isFormData(n)){if(ge.hasStandardBrowserEnv||ge.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((c=s.getContentType())!==!1){let[a,...u]=c?c.split(";").map(p=>p.trim()).filter(Boolean):[];s.setContentType([a||"multipart/form-data",...u].join("; "))}}if(ge.hasStandardBrowserEnv&&(r&&x.isFunction(r)&&(r=r(t)),r||r!==!1&&S_(t.url))){let a=i&&o&&E_.read(o);a&&s.set(i,a)}return t};var S2=typeof XMLHttpRequest<"u",R_=S2&&function(e){return new Promise(function(n,r){let i=da(e),o=i.data,s=pe.from(i.headers).normalize(),{responseType:l}=i,c;function a(){i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let u=new XMLHttpRequest;u.open(i.method.toUpperCase(),i.url,!0),u.timeout=i.timeout;function p(){if(!u)return;let d=pe.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),_={data:!l||l==="text"||l==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:d,config:e,request:u};Bo(function(h){n(h),a()},function(h){r(h),a()},_),u=null}"onloadend"in u?u.onloadend=p:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(p)},u.onabort=function(){u&&(r(new D("Request aborted",D.ECONNABORTED,i,u)),u=null)},u.onerror=function(){r(new D("Network Error",D.ERR_NETWORK,i,u)),u=null},u.ontimeout=function(){let g=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded",_=i.transitional||ua;i.timeoutErrorMessage&&(g=i.timeoutErrorMessage),r(new D(g,_.clarifyTimeoutError?D.ETIMEDOUT:D.ECONNABORTED,i,u)),u=null},o===void 0&&s.setContentType(null),"setRequestHeader"in u&&x.forEach(s.toJSON(),function(g,_){u.setRequestHeader(_,g)}),x.isUndefined(i.withCredentials)||(u.withCredentials=!!i.withCredentials),l&&l!=="json"&&(u.responseType=i.responseType),typeof i.onDownloadProgress=="function"&&u.addEventListener("progress",mi(i.onDownloadProgress,!0)),typeof i.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",mi(i.onUploadProgress)),(i.cancelToken||i.signal)&&(c=d=>{u&&(r(!d||d.type?new Lt(null,e,u):d),u.abort(),u=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));let f=id(i.url);if(f&&ge.protocols.indexOf(f)===-1){r(new D("Unsupported protocol "+f+":",D.ERR_BAD_REQUEST,e));return}u.send(o||null)})};var E2=(e,t)=>{let n=new AbortController,r,i=function(c){if(!r){r=!0,s();let a=c instanceof Error?c:this.reason;n.abort(a instanceof D?a:new Lt(a instanceof Error?a.message:a))}},o=t&&setTimeout(()=>{i(new D(`timeout ${t} of ms exceeded`,D.ETIMEDOUT))},t),s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(c=>{c&&(c.removeEventListener?c.removeEventListener("abort",i):c.unsubscribe(i))}),e=null)};e.forEach(c=>c&&c.addEventListener&&c.addEventListener("abort",i));let{signal:l}=n;return l.unsubscribe=s,[l,()=>{o&&clearTimeout(o),o=null}]},C_=E2;var b2=function*(e,t){let n=e.byteLength;if(!t||n{let o=R2(e,t,i),s=0;return new ReadableStream({type:"bytes",async pull(l){let{done:c,value:a}=await o.next();if(c){l.close(),r();return}let u=a.byteLength;n&&n(s+=u),l.enqueue(new Uint8Array(a))},cancel(l){return r(l),o.return()}},{highWaterMark:2})};var T_=(e,t)=>{let n=e!=null;return r=>setTimeout(()=>t({lengthComputable:n,total:e,loaded:r}))},ma=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",O_=ma&&typeof ReadableStream=="function",ad=ma&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),C2=O_&&(()=>{let e=!1,t=new Request(ge.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),I_=64*1024,ud=O_&&!!(()=>{try{return x.isReadableStream(new Response("").body)}catch{}})(),pa={stream:ud&&(e=>e.body)};ma&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!pa[t]&&(pa[t]=x.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new D(`Response type '${t}' is not supported`,D.ERR_NOT_SUPPORT,r)})})})(new Response);var T2=async e=>{if(e==null)return 0;if(x.isBlob(e))return e.size;if(x.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(x.isArrayBufferView(e))return e.byteLength;if(x.isURLSearchParams(e)&&(e=e+""),x.isString(e))return(await ad(e)).byteLength},I2=async(e,t)=>{let n=x.toFiniteNumber(e.getContentLength());return n??T2(t)},N_=ma&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:s,onDownloadProgress:l,onUploadProgress:c,responseType:a,headers:u,withCredentials:p="same-origin",fetchOptions:f}=da(e);a=a?(a+"").toLowerCase():"text";let[d,g]=i||o||s?C_([i,o],s):[],_,w,h=()=>{!_&&setTimeout(()=>{d&&d.unsubscribe()}),_=!0},m;try{if(c&&C2&&n!=="get"&&n!=="head"&&(m=await I2(u,r))!==0){let R=new Request(t,{method:"POST",body:r,duplex:"half"}),k;x.isFormData(r)&&(k=R.headers.get("content-type"))&&u.setContentType(k),R.body&&(r=ld(R.body,I_,T_(m,mi(c)),null,ad))}x.isString(p)||(p=p?"cors":"omit"),w=new Request(t,{...f,signal:d,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",withCredentials:p});let y=await fetch(w),v=ud&&(a==="stream"||a==="response");if(ud&&(l||v)){let R={};["status","statusText","headers"].forEach(b=>{R[b]=y[b]});let k=x.toFiniteNumber(y.headers.get("content-length"));y=new Response(ld(y.body,I_,l&&T_(k,mi(l,!0)),v&&h,ad),R)}a=a||"text";let S=await pa[x.findKey(pa,a)||"text"](y,e);return!v&&h(),g&&g(),await new Promise((R,k)=>{Bo(R,k,{data:S,headers:pe.from(y.headers),status:y.status,statusText:y.statusText,config:e,request:w})})}catch(y){throw h(),y&&y.name==="TypeError"&&/fetch/i.test(y.message)?Object.assign(new D("Network Error",D.ERR_NETWORK,e,w),{cause:y.cause||y}):D.from(y,y&&y.code,e,w)}});var cd={http:la,xhr:R_,fetch:N_};x.forEach(cd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var P_=e=>`- ${e}`,O2=e=>x.isFunction(e)||e===null||e===!1,ha={getAdapter:e=>{e=x.isArray(e)?e:[e];let{length:t}=e,n,r,i={};for(let o=0;o`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build")),s=t?o.length>1?`since : +`+o.map(P_).join(` +`):" "+P_(o[0]):"as no adapter specified";throw new D("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:cd};function fd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Lt(null,e)}function ga(e){return fd(e),e.headers=pe.from(e.headers),e.data=Fo.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ha.getAdapter(e.adapter||di.adapter)(e).then(function(r){return fd(e),r.data=Fo.call(e,e.transformResponse,r),r.headers=pe.from(r.headers),r},function(r){return Uo(r)||(fd(e),r&&r.response&&(r.response.data=Fo.call(e,e.transformResponse,r.response),r.response.headers=pe.from(r.response.headers))),Promise.reject(r)})}var ya="1.7.2";var dd={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{dd[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});var A_={};dd.transitional=function(t,n,r){function i(o,s){return"[Axios v"+ya+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,l)=>{if(t===!1)throw new D(i(s," has been removed"+(n?" in "+n:"")),D.ERR_DEPRECATED);return n&&!A_[s]&&(A_[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,s,l):!0}};function N2(e,t,n){if(typeof e!="object")throw new D("options must be an object",D.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-- >0;){let o=r[i],s=t[o];if(s){let l=e[o],c=l===void 0||s(l,o,e);if(c!==!0)throw new D("option "+o+" must be "+c,D.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new D("Unknown option "+o,D.ERR_BAD_OPTION)}}var _a={assertOptions:N2,validators:dd};var zn=_a.validators,hi=class{constructor(t){this.defaults=t,this.interceptors={request:new Jf,response:new Jf}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;let o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` +`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=St(this.defaults,n);let{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&_a.assertOptions(r,{silentJSONParsing:zn.transitional(zn.boolean),forcedJSONParsing:zn.transitional(zn.boolean),clarifyTimeoutError:zn.transitional(zn.boolean)},!1),i!=null&&(x.isFunction(i)?n.paramsSerializer={serialize:i}:_a.assertOptions(i,{encode:zn.function,serialize:zn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&x.merge(o.common,o[n.method]);o&&x.forEach(["delete","get","head","post","put","patch","common"],g=>{delete o[g]}),n.headers=pe.concat(s,o);let l=[],c=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(n)===!1||(c=c&&_.synchronous,l.unshift(_.fulfilled,_.rejected))});let a=[];this.interceptors.response.forEach(function(_){a.push(_.fulfilled,_.rejected)});let u,p=0,f;if(!c){let g=[ga.bind(this),void 0];for(g.unshift.apply(g,l),g.push.apply(g,a),f=g.length,u=Promise.resolve(n);p{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o,s=new Promise(l=>{r.subscribe(l),o=l}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},t(function(o,s,l){r.reason||(r.reason=new Lt(o,s,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new e(function(i){t=i}),cancel:t}}},L_=pd;function md(e){return function(n){return e.apply(null,n)}}function hd(e){return x.isObject(e)&&e.isAxiosError===!0}var gd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(gd).forEach(([e,t])=>{gd[t]=e});var D_=gd;function M_(e){let t=new Ho(e),n=Lo(Ho.prototype.request,t);return x.extend(n,Ho.prototype,t,{allOwnKeys:!0}),x.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return M_(St(e,i))},n}var ue=M_(di);ue.Axios=Ho;ue.CanceledError=Lt;ue.CancelToken=L_;ue.isCancel=Uo;ue.VERSION=ya;ue.toFormData=Mn;ue.AxiosError=D;ue.Cancel=ue.CanceledError;ue.all=function(t){return Promise.all(t)};ue.spread=md;ue.isAxiosError=hd;ue.mergeConfig=St;ue.AxiosHeaders=pe;ue.formToJSON=e=>ca(x.isHTMLForm(e)?new FormData(e):e);ue.getAdapter=ha.getAdapter;ue.HttpStatusCode=D_;ue.default=ue;var va=ue;var{Axios:IA,AxiosError:OA,CanceledError:NA,isCancel:PA,CancelToken:AA,VERSION:LA,all:DA,Cancel:MA,isAxiosError:zA,spread:jA,toFormData:FA,AxiosHeaders:UA,HttpStatusCode:BA,formToJSON:$A,getAdapter:HA,mergeConfig:VA}=va;BigInt.prototype.toJSON=function(){return"BigInt::"+this.toString()};var P2=typeof window<"u"?window:null,z_=typeof global<"u"?global:void 0,gi=async(e,t,n)=>{let r={...n},i=null,o=!1,s=null,l=[];if(Array.isArray(t))for(let p of t)p instanceof File&&(l.push(p),o=!0),typeof p=="function"&&(s=p);else t instanceof File&&(o=!0,l.push(t));if(!o)i=JSON.stringify(t),r["content-type"]="aplication/json";else{let p=new FormData;for(let f of l)p.append(f.name,f);i=p,delete r["content-type"],r.enctype="multipart/form-data;"}let c=new URL(e);if(P2!==null){let p=new URL(location.href),f="";if(c.host===p.host||z_&&typeof z_.server_hook=="function"?f=c.toString():f=`${p.protocol}//${p.host}/_proxy/${encodeURIComponent(c.toString())}`,f){if(s)return(await va({method:t?"post":void 0,url:f,data:i,onUploadProgress:s})).data;{let g=await(await fetch(f,t?{method:"POST",body:i,headers:r}:void 0)).text();try{return JSON.parse(g,j_)}catch{return g}}}}let u=await(await fetch(c,t?{method:"POST",body:i,headers:r}:void 0)).text();try{return JSON.parse(u,j_)}catch{return u}},j_=(e,t)=>typeof t=="string"&&t.startsWith("BigInt::")?BigInt(t.substring(8)):t;var nv=P(tv());var rv=async(e,t)=>{let n=(0,nv.default)(e,"/"),r=await gi(ab(n,"/_prasi/_")),i="";r&&r.prasi&&(i=r.prasi);let o=lb(n);if(i==="v2")await new Promise(s=>{let l=document,c=l.createElement("script");c.onload=async()=>{s()},localStorage.getItem("api-ts-"+n)||localStorage.setItem("api-ts-"+n,Date.now().toString());let a=localStorage.getItem("api-ts-"+n);t?c.src=`${o}/_prasi/load.js?url=${n}&v3&dev=1&ts=${a}`:c.src=`${o}/_prasi/load.js?url=${n}&v3&ts=${a}`,document.querySelector(`script[src="${c.src}"]`)?s():l.body.appendChild(c)});else{let s=await fetch(o+"/_prasi/api-entry");if(ut.prasiApi[n]={apiEntry:(await s.json()).srv},t){let l=await fetch(o+"/_prasi/api-types");ut.prasiApi[n].apiTypes=await l.text(),ut.prasiApi[n].prismaTypes={"prisma.d.ts":await wd(`${o}/_prasi/prisma/index.d.ts`),"runtime/index.d.ts":await wd(`${o}/_prasi/prisma/runtime/index.d.ts`),"runtime/library.d.ts":await wd(`${o}/_prasi/prisma/runtime/library.d.ts`)}}}},lb=e=>{let t=new URL(e);return`${t.protocol}//${t.host}`},ab=(e,t)=>{let n=new URL(e);return n.pathname=t,n.toString()},wd=async(e,t)=>await(await fetch(e)).text();var Vo={},ov=e=>{ut.prasiApi||(ut.prasiApi={});try{let t=new URL(e),n=`${t.protocol}//${t.host}`;return ut.prasiApi[n]||Vo[n]||(Vo[n]=rv(n,location.hostname.includes("prasi"))),new Proxy({},{get:(r,i)=>{if(i==="_url")return(s,l)=>{let c=new URL(n);c.pathname=s.split("/").filter(p=>p).join("/");let a=new URL(location.href),u="";return c.host===a.host||l===!1?u=c.toString():u=`${a.protocol}//${a.host}/_proxy/${encodeURIComponent(c.toString())}`,u};let o=s=>function(...l){return new Promise(async(c,a)=>{try{let u=ut.prasiApi[n];if(!u&&Vo&&typeof Vo[n]=="object"&&(await Vo[n],u=ut.prasiApi[n]),u){if(s==="_raw"){let d=l[0],g=`${n}${d}`,_=await iv(g,l.slice(1));c(_);return}if(u.apiEntry||(u.apiEntry={}),u.apiEntry&&!u.apiEntry[s]){a(`API ${s.toString()} not found, existing API: + - ${Object.keys(u.apiEntry||{}).join(` + - `)}`);return}let p=u.apiEntry[s].url,f=u.apiEntry[s].args;if(p&&f){if(l.length>0&&f.length>0)for(let[_,w]of Object.entries(l)){let h=f[parseInt(_)];f&&f.includes(h)&&w&&typeof w!="string"&&typeof w!="number"||(p=p.replace(`:${h}?`,w+""),p=p.replace(`:${h}`,w+""))}let d=`${n}${p}`,g=await iv(d,l);c(g)}else console.error(`API Not Found: ${s.toString()}`)}else a("Failed to load API [Proxy]: "+n)}catch(u){a(u)}})};return i==="then"?new Proxy({},{get:(s,l)=>o(l)}):o(i)}})}catch{return null}},iv=async(e,t)=>await gi(e,t,{"content-type":"application/json"});var I1=P(av());function ki(e){let t=e.length;for(;--t>=0;)e[t]=0}var pb=0,Zv=1,mb=2,hb=3,gb=258,Vd=29,os=256,Xo=os+1+Vd,vi=30,Wd=19,Kv=2*Xo+1,cr=15,xd=16,yb=7,Gd=256,qv=16,Qv=17,Xv=18,Dd=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]),ba=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]),_b=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Jv=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),vb=512,sn=new Array((Xo+2)*2);ki(sn);var Ko=new Array(vi*2);ki(Ko);var Jo=new Array(vb);ki(Jo);var Yo=new Array(gb-hb+1);ki(Yo);var Zd=new Array(Vd);ki(Zd);var Ra=new Array(vi);ki(Ra);function kd(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}var Yv,e1,t1;function Sd(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}var n1=e=>e<256?Jo[e]:Jo[256+(e>>>7)],es=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},Ve=(e,t,n)=>{e.bi_valid>xd-n?(e.bi_buf|=t<>xd-e.bi_valid,e.bi_valid+=n-xd):(e.bi_buf|=t<{Ve(e,n[t*2],n[t*2+1])},r1=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},wb=e=>{e.bi_valid===16?(es(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)},xb=(e,t)=>{let n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,s=t.stat_desc.extra_bits,l=t.stat_desc.extra_base,c=t.stat_desc.max_length,a,u,p,f,d,g,_=0;for(f=0;f<=cr;f++)e.bl_count[f]=0;for(n[e.heap[e.heap_max]*2+1]=0,a=e.heap_max+1;ac&&(f=c,_++),n[u*2+1]=f,!(u>r)&&(e.bl_count[f]++,d=0,u>=l&&(d=s[u-l]),g=n[u*2],e.opt_len+=g*(f+d),o&&(e.static_len+=g*(i[u*2+1]+d)));if(_!==0){do{for(f=c-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[c]--,_-=2}while(_>0);for(f=c;f!==0;f--)for(u=e.bl_count[f];u!==0;)p=e.heap[--a],!(p>r)&&(n[p*2+1]!==f&&(e.opt_len+=(f-n[p*2+1])*n[p*2],n[p*2+1]=f),u--)}},i1=(e,t,n)=>{let r=new Array(cr+1),i=0,o,s;for(o=1;o<=cr;o++)i=i+n[o-1]<<1,r[o]=i;for(s=0;s<=t;s++){let l=e[s*2+1];l!==0&&(e[s*2]=r1(r[l]++,l))}},kb=()=>{let e,t,n,r,i,o=new Array(cr+1);for(n=0,r=0;r>=7;r{let t;for(t=0;t{e.bi_valid>8?es(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},uv=(e,t,n,r)=>{let i=t*2,o=n*2;return e[i]{let r=e.heap[n],i=n<<1;for(;i<=e.heap_len&&(i{let r,i,o=0,s,l;if(e.sym_next!==0)do r=e.pending_buf[e.sym_buf+o++]&255,r+=(e.pending_buf[e.sym_buf+o++]&255)<<8,i=e.pending_buf[e.sym_buf+o++],r===0?Mt(e,i,t):(s=Yo[i],Mt(e,s+os+1,t),l=Dd[s],l!==0&&(i-=Zd[s],Ve(e,i,l)),r--,s=n1(r),Mt(e,s,n),l=ba[s],l!==0&&(r-=Ra[s],Ve(e,r,l)));while(o{let n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems,s,l,c=-1,a;for(e.heap_len=0,e.heap_max=Kv,s=0;s>1;s>=1;s--)Ed(e,n,s);a=o;do s=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Ed(e,n,1),l=e.heap[1],e.heap[--e.heap_max]=s,e.heap[--e.heap_max]=l,n[a*2]=n[s*2]+n[l*2],e.depth[a]=(e.depth[s]>=e.depth[l]?e.depth[s]:e.depth[l])+1,n[s*2+1]=n[l*2+1]=a,e.heap[1]=a++,Ed(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],xb(e,t),i1(n,c,e.bl_count)},fv=(e,t,n)=>{let r,i=-1,o,s=t[0*2+1],l=0,c=7,a=4;for(s===0&&(c=138,a=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)o=s,s=t[(r+1)*2+1],!(++l{let r,i=-1,o,s=t[0*2+1],l=0,c=7,a=4;for(s===0&&(c=138,a=3),r=0;r<=n;r++)if(o=s,s=t[(r+1)*2+1],!(++l{let t;for(fv(e,e.dyn_ltree,e.l_desc.max_code),fv(e,e.dyn_dtree,e.d_desc.max_code),Md(e,e.bl_desc),t=Wd-1;t>=3&&e.bl_tree[Jv[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},Eb=(e,t,n,r)=>{let i;for(Ve(e,t-257,5),Ve(e,n-1,5),Ve(e,r-4,4),i=0;i{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return 0;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return 1;for(n=32;n{pv||(kb(),pv=!0),e.l_desc=new Sd(e.dyn_ltree,Yv),e.d_desc=new Sd(e.dyn_dtree,e1),e.bl_desc=new Sd(e.bl_tree,t1),e.bi_buf=0,e.bi_valid=0,o1(e)},l1=(e,t,n,r)=>{Ve(e,(pb<<1)+(r?1:0),3),s1(e),es(e,n),es(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},Cb=e=>{Ve(e,Zv<<1,3),Mt(e,Gd,sn),wb(e)},Tb=(e,t,n,r)=>{let i,o,s=0;e.level>0?(e.strm.data_type===2&&(e.strm.data_type=bb(e)),Md(e,e.l_desc),Md(e,e.d_desc),s=Sb(e),i=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=i&&(i=o)):i=o=n+5,n+4<=i&&t!==-1?l1(e,t,n,r):e.strategy===4||o===i?(Ve(e,(Zv<<1)+(r?1:0),3),cv(e,sn,Ko)):(Ve(e,(mb<<1)+(r?1:0),3),Eb(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),cv(e,e.dyn_ltree,e.dyn_dtree)),o1(e),r&&s1(e)},Ib=(e,t,n)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(Yo[n]+os+1)*2]++,e.dyn_dtree[n1(t)*2]++),e.sym_next===e.sym_end),Ob=Rb,Nb=l1,Pb=Tb,Ab=Ib,Lb=Cb,Db={_tr_init:Ob,_tr_stored_block:Nb,_tr_flush_block:Pb,_tr_tally:Ab,_tr_align:Lb},Mb=(e,t,n,r)=>{let i=e&65535|0,o=e>>>16&65535|0,s=0;for(;n!==0;){s=n>2e3?2e3:n,n-=s;do i=i+t[r++]|0,o=o+i|0;while(--s);i%=65521,o%=65521}return i|o<<16|0},ts=Mb,zb=()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t},jb=new Uint32Array(zb()),Fb=(e,t,n,r)=>{let i=jb,o=r+n;e^=-1;for(let s=r;s>>8^i[(e^t[s])&255];return e^-1},ye=Fb,pr={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"},gr={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},{_tr_init:Ub,_tr_stored_block:zd,_tr_flush_block:Bb,_tr_tally:Un,_tr_align:$b}=Db,{Z_NO_FLUSH:Bn,Z_PARTIAL_FLUSH:Hb,Z_FULL_FLUSH:Vb,Z_FINISH:dt,Z_BLOCK:mv,Z_OK:Ee,Z_STREAM_END:hv,Z_STREAM_ERROR:zt,Z_DATA_ERROR:Wb,Z_BUF_ERROR:bd,Z_DEFAULT_COMPRESSION:Gb,Z_FILTERED:Zb,Z_HUFFMAN_ONLY:wa,Z_RLE:Kb,Z_FIXED:qb,Z_DEFAULT_STRATEGY:Qb,Z_UNKNOWN:Xb,Z_DEFLATED:Ia}=gr,Jb=9,Yb=15,eR=8,tR=29,nR=256,jd=nR+1+tR,rR=30,iR=19,oR=2*jd+1,sR=15,U=3,Fn=258,jt=Fn+U+1,lR=32,wi=42,Kd=57,Fd=69,Ud=73,Bd=91,$d=103,fr=113,Go=666,Me=1,Si=2,mr=3,Ei=4,aR=3,dr=(e,t)=>(e.msg=pr[t],t),gv=e=>e*2-(e>4?9:0),jn=e=>{let t=e.length;for(;--t>=0;)e[t]=0},uR=e=>{let t,n,r,i=e.w_size;t=e.hash_size,r=t;do n=e.head[--r],e.head[r]=n>=i?n-i:0;while(--t);t=i,r=t;do n=e.prev[--r],e.prev[r]=n>=i?n-i:0;while(--t)},cR=(e,t,n)=>(t<{let t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))},et=(e,t)=>{Bb(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Ye(e.strm)},$=(e,t)=>{e.pending_buf[e.pending++]=t},Wo=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},Hd=(e,t,n,r)=>{let i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),e.state.wrap===1?e.adler=ts(e.adler,t,i,n):e.state.wrap===2&&(e.adler=ye(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},a1=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,o,s=e.prev_length,l=e.nice_match,c=e.strstart>e.w_size-jt?e.strstart-(e.w_size-jt):0,a=e.window,u=e.w_mask,p=e.prev,f=e.strstart+Fn,d=a[r+s-1],g=a[r+s];e.prev_length>=e.good_match&&(n>>=2),l>e.lookahead&&(l=e.lookahead);do if(i=t,!(a[i+s]!==g||a[i+s-1]!==d||a[i]!==a[r]||a[++i]!==a[r+1])){r+=2,i++;do;while(a[++r]===a[++i]&&a[++r]===a[++i]&&a[++r]===a[++i]&&a[++r]===a[++i]&&a[++r]===a[++i]&&a[++r]===a[++i]&&a[++r]===a[++i]&&a[++r]===a[++i]&&rs){if(e.match_start=t,s=o,o>=l)break;d=a[r+s-1],g=a[r+s]}}while((t=p[t&u])>c&&--n!==0);return s<=e.lookahead?s:e.lookahead},xi=e=>{let t=e.w_size,n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-jt)&&(e.window.set(e.window.subarray(t,t+t-r),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),uR(e),r+=t),e.strm.avail_in===0)break;if(n=Hd(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,e.lookahead+e.insert>=U)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=$n(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=$n(e,e.ins_h,e.window[i+U-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert{let n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,r,i,o,s=0,l=e.strm.avail_in;do{if(r=65535,o=e.bi_valid+42>>3,e.strm.avail_outi+e.strm.avail_in&&(r=i+e.strm.avail_in),r>o&&(r=o),r>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,Ye(e.strm),i&&(i>r&&(i=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,r-=i),r&&(Hd(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(s===0);return l-=e.strm.avail_in,l&&(l>=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<=l&&(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-l,e.strm.next_in),e.strstart),e.strstart+=l,e.insert+=l>e.w_size-e.insert?e.w_size-e.insert:l),e.block_start=e.strstart),e.high_watero&&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++,o+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),o>e.strm.avail_in&&(o=e.strm.avail_in),o&&(Hd(e.strm,e.window,e.strstart,o),e.strstart+=o,e.insert+=o>e.w_size-e.insert?e.w_size-e.insert:o),e.high_water>3,o=e.pending_buf_size-o>65535?65535:e.pending_buf_size-o,n=o>e.w_size?e.w_size:o,i=e.strstart-e.block_start,(i>=n||(i||t===dt)&&t!==Bn&&e.strm.avail_in===0&&i<=o)&&(r=i>o?o:i,s=t===dt&&e.strm.avail_in===0&&r===i?1:0,zd(e,e.block_start,r,s),e.block_start+=r,Ye(e.strm)),s?mr:Me)},Rd=(e,t)=>{let n,r;for(;;){if(e.lookahead=U&&(e.ins_h=$n(e,e.ins_h,e.window[e.strstart+U-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-jt&&(e.match_length=a1(e,n)),e.match_length>=U)if(r=Un(e,e.strstart-e.match_start,e.match_length-U),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=U){e.match_length--;do e.strstart++,e.ins_h=$n(e,e.ins_h,e.window[e.strstart+U-1]),n=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=$n(e,e.ins_h,e.window[e.strstart+1]);else r=Un(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(et(e,!1),e.strm.avail_out===0))return Me}return e.insert=e.strstart{let n,r,i;for(;;){if(e.lookahead=U&&(e.ins_h=$n(e,e.ins_h,e.window[e.strstart+U-1]),n=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=U-1,n!==0&&e.prev_length4096)&&(e.match_length=U-1)),e.prev_length>=U&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-U,r=Un(e,e.strstart-1-e.prev_match,e.prev_length-U),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=$n(e,e.ins_h,e.window[e.strstart+U-1]),n=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=U-1,e.strstart++,r&&(et(e,!1),e.strm.avail_out===0))return Me}else if(e.match_available){if(r=Un(e,0,e.window[e.strstart-1]),r&&et(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Me}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=Un(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart{let n,r,i,o,s=e.window;for(;;){if(e.lookahead<=Fn){if(xi(e),e.lookahead<=Fn&&t===Bn)return Me;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=U&&e.strstart>0&&(i=e.strstart-1,r=s[i],r===s[++i]&&r===s[++i]&&r===s[++i])){o=e.strstart+Fn;do;while(r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=U?(n=Un(e,1,e.match_length-U),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=Un(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(et(e,!1),e.strm.avail_out===0))return Me}return e.insert=0,t===dt?(et(e,!0),e.strm.avail_out===0?mr:Ei):e.sym_next&&(et(e,!1),e.strm.avail_out===0)?Me:Si},dR=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(xi(e),e.lookahead===0)){if(t===Bn)return Me;break}if(e.match_length=0,n=Un(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(et(e,!1),e.strm.avail_out===0))return Me}return e.insert=0,t===dt?(et(e,!0),e.strm.avail_out===0?mr:Ei):e.sym_next&&(et(e,!1),e.strm.avail_out===0)?Me:Si};function Dt(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}var Zo=[new Dt(0,0,0,0,u1),new Dt(4,4,8,4,Rd),new Dt(4,5,16,8,Rd),new Dt(4,6,32,32,Rd),new Dt(4,4,16,16,yi),new Dt(8,16,32,32,yi),new Dt(8,16,128,128,yi),new Dt(8,32,128,256,yi),new Dt(32,128,258,1024,yi),new Dt(32,258,258,4096,yi)],pR=e=>{e.window_size=2*e.w_size,jn(e.head),e.max_lazy_match=Zo[e.level].max_lazy,e.good_match=Zo[e.level].good_length,e.nice_match=Zo[e.level].nice_length,e.max_chain_length=Zo[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=U-1,e.match_available=0,e.ins_h=0};function mR(){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=Ia,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(oR*2),this.dyn_dtree=new Uint16Array((2*rR+1)*2),this.bl_tree=new Uint16Array((2*iR+1)*2),jn(this.dyn_ltree),jn(this.dyn_dtree),jn(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(sR+1),this.heap=new Uint16Array(2*jd+1),jn(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*jd+1),jn(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}var ss=e=>{if(!e)return 1;let t=e.state;return!t||t.strm!==e||t.status!==wi&&t.status!==Kd&&t.status!==Fd&&t.status!==Ud&&t.status!==Bd&&t.status!==$d&&t.status!==fr&&t.status!==Go?1:0},c1=e=>{if(ss(e))return dr(e,zt);e.total_in=e.total_out=0,e.data_type=Xb;let t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?Kd:t.wrap?wi:fr,e.adler=t.wrap===2?0:1,t.last_flush=-2,Ub(t),Ee},f1=e=>{let t=c1(e);return t===Ee&&pR(e.state),t},hR=(e,t)=>ss(e)||e.state.wrap!==2?zt:(e.state.gzhead=t,Ee),d1=(e,t,n,r,i,o)=>{if(!e)return zt;let s=1;if(t===Gb&&(t=6),r<0?(s=0,r=-r):r>15&&(s=2,r-=16),i<1||i>Jb||n!==Ia||r<8||r>15||t<0||t>9||o<0||o>qb||r===8&&s!==1)return dr(e,zt);r===8&&(r=9);let l=new mR;return e.state=l,l.strm=e,l.status=wi,l.wrap=s,l.gzhead=null,l.w_bits=r,l.w_size=1<d1(e,t,Ia,Yb,eR,Qb),yR=(e,t)=>{if(ss(e)||t>mv||t<0)return e?dr(e,zt):zt;let n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===Go&&t!==dt)return dr(e,e.avail_out===0?bd:zt);let r=n.last_flush;if(n.last_flush=t,n.pending!==0){if(Ye(e),e.avail_out===0)return n.last_flush=-1,Ee}else if(e.avail_in===0&&gv(t)<=gv(r)&&t!==dt)return dr(e,bd);if(n.status===Go&&e.avail_in!==0)return dr(e,bd);if(n.status===wi&&n.wrap===0&&(n.status=fr),n.status===wi){let i=Ia+(n.w_bits-8<<4)<<8,o=-1;if(n.strategy>=wa||n.level<2?o=0:n.level<6?o=1:n.level===6?o=2:o=3,i|=o<<6,n.strstart!==0&&(i|=lR),i+=31-i%31,Wo(n,i),n.strstart!==0&&(Wo(n,e.adler>>>16),Wo(n,e.adler&65535)),e.adler=1,n.status=fr,Ye(e),n.pending!==0)return n.last_flush=-1,Ee}if(n.status===Kd){if(e.adler=0,$(n,31),$(n,139),$(n,8),n.gzhead)$(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),$(n,n.gzhead.time&255),$(n,n.gzhead.time>>8&255),$(n,n.gzhead.time>>16&255),$(n,n.gzhead.time>>24&255),$(n,n.level===9?2:n.strategy>=wa||n.level<2?4:0),$(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&($(n,n.gzhead.extra.length&255),$(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=ye(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=Fd;else if($(n,0),$(n,0),$(n,0),$(n,0),$(n,0),$(n,n.level===9?2:n.strategy>=wa||n.level<2?4:0),$(n,aR),n.status=fr,Ye(e),n.pending!==0)return n.last_flush=-1,Ee}if(n.status===Fd){if(n.gzhead.extra){let i=n.pending,o=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+o>n.pending_buf_size;){let l=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+l),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>i&&(e.adler=ye(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex+=l,Ye(e),n.pending!==0)return n.last_flush=-1,Ee;i=0,o-=l}let s=new Uint8Array(n.gzhead.extra);n.pending_buf.set(s.subarray(n.gzindex,n.gzindex+o),n.pending),n.pending+=o,n.gzhead.hcrc&&n.pending>i&&(e.adler=ye(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=Ud}if(n.status===Ud){if(n.gzhead.name){let i=n.pending,o;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=ye(e.adler,n.pending_buf,n.pending-i,i)),Ye(e),n.pending!==0)return n.last_flush=-1,Ee;i=0}n.gzindexi&&(e.adler=ye(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=Bd}if(n.status===Bd){if(n.gzhead.comment){let i=n.pending,o;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=ye(e.adler,n.pending_buf,n.pending-i,i)),Ye(e),n.pending!==0)return n.last_flush=-1,Ee;i=0}n.gzindexi&&(e.adler=ye(e.adler,n.pending_buf,n.pending-i,i))}n.status=$d}if(n.status===$d){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(Ye(e),n.pending!==0))return n.last_flush=-1,Ee;$(n,e.adler&255),$(n,e.adler>>8&255),e.adler=0}if(n.status=fr,Ye(e),n.pending!==0)return n.last_flush=-1,Ee}if(e.avail_in!==0||n.lookahead!==0||t!==Bn&&n.status!==Go){let i=n.level===0?u1(n,t):n.strategy===wa?dR(n,t):n.strategy===Kb?fR(n,t):Zo[n.level].func(n,t);if((i===mr||i===Ei)&&(n.status=Go),i===Me||i===mr)return e.avail_out===0&&(n.last_flush=-1),Ee;if(i===Si&&(t===Hb?$b(n):t!==mv&&(zd(n,0,0,!1),t===Vb&&(jn(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),Ye(e),e.avail_out===0))return n.last_flush=-1,Ee}return t!==dt?Ee:n.wrap<=0?hv:(n.wrap===2?($(n,e.adler&255),$(n,e.adler>>8&255),$(n,e.adler>>16&255),$(n,e.adler>>24&255),$(n,e.total_in&255),$(n,e.total_in>>8&255),$(n,e.total_in>>16&255),$(n,e.total_in>>24&255)):(Wo(n,e.adler>>>16),Wo(n,e.adler&65535)),Ye(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?Ee:hv)},_R=e=>{if(ss(e))return zt;let t=e.state.status;return e.state=null,t===fr?dr(e,Wb):Ee},vR=(e,t)=>{let n=t.length;if(ss(e))return zt;let r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==wi||r.lookahead)return zt;if(i===1&&(e.adler=ts(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(jn(r.head),r.strstart=0,r.block_start=0,r.insert=0);let c=new Uint8Array(r.w_size);c.set(t.subarray(n-r.w_size,n),0),t=c,n=r.w_size}let o=e.avail_in,s=e.next_in,l=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,xi(r);r.lookahead>=U;){let c=r.strstart,a=r.lookahead-(U-1);do r.ins_h=$n(r,r.ins_h,r.window[c+U-1]),r.prev[c&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=c,c++;while(--a);r.strstart=c,r.lookahead=U-1,xi(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=U-1,r.match_available=0,e.next_in=s,e.input=l,e.avail_in=o,r.wrap=i,Ee},wR=gR,xR=d1,kR=f1,SR=c1,ER=hR,bR=yR,RR=_R,CR=vR,TR="pako deflate (from Nodeca project)",qo={deflateInit:wR,deflateInit2:xR,deflateReset:kR,deflateResetKeep:SR,deflateSetHeader:ER,deflate:bR,deflateEnd:RR,deflateSetDictionary:CR,deflateInfo:TR},IR=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),OR=function(e){let t=Array.prototype.slice.call(arguments,1);for(;t.length;){let n=t.shift();if(n){if(typeof n!="object")throw new TypeError(n+"must be non-object");for(let r in n)IR(n,r)&&(e[r]=n[r])}}return e},NR=e=>{let t=0;for(let r=0,i=e.length;r=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;ns[254]=ns[254]=1;var PR=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,n,r,i,o,s=e.length,l=0;for(i=0;i>>6,t[o++]=128|n&63):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|n&63):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|n&63);return t},AR=(e,t)=>{if(t<65534&&e.subarray&&p1)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let r=0;r{let n=t||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let r,i,o=new Array(n*2);for(i=0,r=0;r4){o[i++]=65533,r+=l-1;continue}for(s&=l===2?31:l===3?15:7;l>1&&r1){o[i++]=65533;continue}s<65536?o[i++]=s:(s-=65536,o[i++]=55296|s>>10&1023,o[i++]=56320|s&1023)}return AR(o,i)},DR=(e,t)=>{t=t||e.length,t>e.length&&(t=e.length);let n=t-1;for(;n>=0&&(e[n]&192)===128;)n--;return n<0||n===0?t:n+ns[e[n]]>t?n:t},rs={string2buf:PR,buf2string:LR,utf8border:DR};function MR(){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 m1=MR,h1=Object.prototype.toString,{Z_NO_FLUSH:zR,Z_SYNC_FLUSH:jR,Z_FULL_FLUSH:FR,Z_FINISH:UR,Z_OK:Ca,Z_STREAM_END:BR,Z_DEFAULT_COMPRESSION:$R,Z_DEFAULT_STRATEGY:HR,Z_DEFLATED:VR}=gr;function ls(e){this.options=Oa.assign({level:$R,method:VR,chunkSize:16384,windowBits:15,memLevel:8,strategy:HR},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new m1,this.strm.avail_out=0;let n=qo.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==Ca)throw new Error(pr[n]);if(t.header&&qo.deflateSetHeader(this.strm,t.header),t.dictionary){let r;if(typeof t.dictionary=="string"?r=rs.string2buf(t.dictionary):h1.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=qo.deflateSetDictionary(this.strm,r),n!==Ca)throw new Error(pr[n]);this._dict_set=!0}}ls.prototype.push=function(e,t){let n=this.strm,r=this.options.chunkSize,i,o;if(this.ended)return!1;for(t===~~t?o=t:o=t===!0?UR:zR,typeof e=="string"?n.input=rs.string2buf(e):h1.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(o===jR||o===FR)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=qo.deflate(n,o),i===BR)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=qo.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===Ca;if(n.avail_out===0){this.onData(n.output);continue}if(o>0&&n.next_out>0){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(n.avail_in===0)break}return!0};ls.prototype.onData=function(e){this.chunks.push(e)};ls.prototype.onEnd=function(e){e===Ca&&(this.result=Oa.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function qd(e,t){let n=new ls(t);if(n.push(e,!0),n.err)throw n.msg||pr[n.err];return n.result}function WR(e,t){return t=t||{},t.raw=!0,qd(e,t)}function GR(e,t){return t=t||{},t.gzip=!0,qd(e,t)}var ZR=ls,KR=qd,qR=WR,QR=GR,XR=gr,JR={Deflate:ZR,deflate:KR,deflateRaw:qR,gzip:QR,constants:XR},xa=16209,YR=16191,eC=function(t,n){let r,i,o,s,l,c,a,u,p,f,d,g,_,w,h,m,y,v,S,R,k,b,O,C,N=t.state;r=t.next_in,O=t.input,i=r+(t.avail_in-5),o=t.next_out,C=t.output,s=o-(n-t.avail_out),l=o+(t.avail_out-257),c=N.dmax,a=N.wsize,u=N.whave,p=N.wnext,f=N.window,d=N.hold,g=N.bits,_=N.lencode,w=N.distcode,h=(1<>>24,d>>>=v,g-=v,v=y>>>16&255,v===0)C[o++]=y&65535;else if(v&16){S=y&65535,v&=15,v&&(g>>=v,g-=v),g<15&&(d+=O[r++]<>>24,d>>>=v,g-=v,v=y>>>16&255,v&16){if(R=y&65535,v&=15,gc){t.msg="invalid distance too far back",N.mode=xa;break e}if(d>>>=v,g-=v,v=o-s,R>v){if(v=R-v,v>u&&N.sane){t.msg="invalid distance too far back",N.mode=xa;break e}if(k=0,b=f,p===0){if(k+=a-v,v2;)C[o++]=b[k++],C[o++]=b[k++],C[o++]=b[k++],S-=3;S&&(C[o++]=b[k++],S>1&&(C[o++]=b[k++]))}else{k=o-R;do C[o++]=C[k++],C[o++]=C[k++],C[o++]=C[k++],S-=3;while(S>2);S&&(C[o++]=C[k++],S>1&&(C[o++]=C[k++]))}}else if(v&64){t.msg="invalid distance code",N.mode=xa;break e}else{y=w[(y&65535)+(d&(1<>3,r-=S,g-=S<<3,d&=(1<{let c=l.bits,a=0,u=0,p=0,f=0,d=0,g=0,_=0,w=0,h=0,m=0,y,v,S,R,k,b=null,O,C=new Uint16Array(_i+1),N=new Uint16Array(_i+1),ze=null,us,Ft,Ut;for(a=0;a<=_i;a++)C[a]=0;for(u=0;u=1&&C[f]===0;f--);if(d>f&&(d=f),f===0)return i[o++]=1<<24|64<<16|0,i[o++]=1<<24|64<<16|0,l.bits=1,0;for(p=1;p0&&(e===vv||f!==1))return-1;for(N[1]=0,a=1;a<_i;a++)N[a+1]=N[a]+C[a];for(u=0;uyv||e===wv&&h>_v)return 1;for(;;){us=a-_,s[u]+1=O?(Ft=ze[s[u]-O],Ut=b[s[u]-O]):(Ft=96,Ut=0),y=1<>_)+v]=us<<24|Ft<<16|Ut|0;while(v!==0);for(y=1<>=1;if(y!==0?(m&=y-1,m+=y):m=0,u++,--C[a]===0){if(a===f)break;a=t[n+s[u]]}if(a>d&&(m&R)!==S){for(_===0&&(_=d),k+=p,g=a-_,w=1<yv||e===wv&&h>_v)return 1;S=m&R,i[S]=d<<24|g<<16|k-o|0}}return m!==0&&(i[k+m]=a-_<<24|64<<16|0),l.bits=d,0},Qo=oC,sC=0,g1=1,y1=2,{Z_FINISH:xv,Z_BLOCK:lC,Z_TREES:ka,Z_OK:hr,Z_STREAM_END:aC,Z_NEED_DICT:uC,Z_STREAM_ERROR:pt,Z_DATA_ERROR:_1,Z_MEM_ERROR:v1,Z_BUF_ERROR:cC,Z_DEFLATED:kv}=gr,Na=16180,Sv=16181,Ev=16182,bv=16183,Rv=16184,Cv=16185,Tv=16186,Iv=16187,Ov=16188,Nv=16189,Ta=16190,on=16191,Td=16192,Pv=16193,Id=16194,Av=16195,Lv=16196,Dv=16197,Mv=16198,Sa=16199,Ea=16200,zv=16201,jv=16202,Fv=16203,Uv=16204,Bv=16205,Od=16206,$v=16207,Hv=16208,ee=16209,w1=16210,x1=16211,fC=852,dC=592,pC=15,mC=pC,Vv=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function hC(){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}var yr=e=>{if(!e)return 1;let t=e.state;return!t||t.strm!==e||t.modex1?1:0},k1=e=>{if(yr(e))return pt;let t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=Na,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(fC),t.distcode=t.distdyn=new Int32Array(dC),t.sane=1,t.back=-1,hr},S1=e=>{if(yr(e))return pt;let t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,k1(e)},E1=(e,t)=>{let n;if(yr(e))return pt;let r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?pt:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,S1(e))},b1=(e,t)=>{if(!e)return pt;let n=new hC;e.state=n,n.strm=e,n.window=null,n.mode=Na;let r=E1(e,t);return r!==hr&&(e.state=null),r},gC=e=>b1(e,mC),Wv=!0,Nd,Pd,yC=e=>{if(Wv){Nd=new Int32Array(512),Pd=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Qo(g1,e.lens,0,288,Nd,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Qo(y1,e.lens,0,32,Pd,0,e.work,{bits:5}),Wv=!1}e.lencode=Nd,e.lenbits=9,e.distcode=Pd,e.distbits=5},R1=(e,t,n,r)=>{let i,o=e.state;return o.window===null&&(o.wsize=1<=o.wsize?(o.window.set(t.subarray(n-o.wsize,n),0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>r&&(i=r),o.window.set(t.subarray(n-r,n-r+i),o.wnext),r-=i,r?(o.window.set(t.subarray(n-r,n),0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave{let n,r,i,o,s,l,c,a,u,p,f,d,g,_,w=0,h,m,y,v,S,R,k,b,O=new Uint8Array(4),C,N,ze=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(yr(e)||!e.output||!e.input&&e.avail_in!==0)return pt;n=e.state,n.mode===on&&(n.mode=Td),s=e.next_out,i=e.output,c=e.avail_out,o=e.next_in,r=e.input,l=e.avail_in,a=n.hold,u=n.bits,p=l,f=c,b=hr;e:for(;;)switch(n.mode){case Na:if(n.wrap===0){n.mode=Td;break}for(;u<16;){if(l===0)break e;l--,a+=r[o++]<>>8&255,n.check=ye(n.check,O,2,0),a=0,u=0,n.mode=Sv;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((a&255)<<8)+(a>>8))%31){e.msg="incorrect header check",n.mode=ee;break}if((a&15)!==kv){e.msg="unknown compression method",n.mode=ee;break}if(a>>>=4,u-=4,k=(a&15)+8,n.wbits===0&&(n.wbits=k),k>15||k>n.wbits){e.msg="invalid window size",n.mode=ee;break}n.dmax=1<>8&1),n.flags&512&&n.wrap&4&&(O[0]=a&255,O[1]=a>>>8&255,n.check=ye(n.check,O,2,0)),a=0,u=0,n.mode=Ev;case Ev:for(;u<32;){if(l===0)break e;l--,a+=r[o++]<>>8&255,O[2]=a>>>16&255,O[3]=a>>>24&255,n.check=ye(n.check,O,4,0)),a=0,u=0,n.mode=bv;case bv:for(;u<16;){if(l===0)break e;l--,a+=r[o++]<>8),n.flags&512&&n.wrap&4&&(O[0]=a&255,O[1]=a>>>8&255,n.check=ye(n.check,O,2,0)),a=0,u=0,n.mode=Rv;case Rv:if(n.flags&1024){for(;u<16;){if(l===0)break e;l--,a+=r[o++]<>>8&255,n.check=ye(n.check,O,2,0)),a=0,u=0}else n.head&&(n.head.extra=null);n.mode=Cv;case Cv:if(n.flags&1024&&(d=n.length,d>l&&(d=l),d&&(n.head&&(k=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(o,o+d),k)),n.flags&512&&n.wrap&4&&(n.check=ye(n.check,r,d,o)),l-=d,o+=d,n.length-=d),n.length))break e;n.length=0,n.mode=Tv;case Tv:if(n.flags&2048){if(l===0)break e;d=0;do k=r[o+d++],n.head&&k&&n.length<65536&&(n.head.name+=String.fromCharCode(k));while(k&&d>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=on;break;case Nv:for(;u<32;){if(l===0)break e;l--,a+=r[o++]<>>=u&7,u-=u&7,n.mode=Od;break}for(;u<3;){if(l===0)break e;l--,a+=r[o++]<>>=1,u-=1,a&3){case 0:n.mode=Pv;break;case 1:if(yC(n),n.mode=Sa,t===ka){a>>>=2,u-=2;break e}break;case 2:n.mode=Lv;break;case 3:e.msg="invalid block type",n.mode=ee}a>>>=2,u-=2;break;case Pv:for(a>>>=u&7,u-=u&7;u<32;){if(l===0)break e;l--,a+=r[o++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=ee;break}if(n.length=a&65535,a=0,u=0,n.mode=Id,t===ka)break e;case Id:n.mode=Av;case Av:if(d=n.length,d){if(d>l&&(d=l),d>c&&(d=c),d===0)break e;i.set(r.subarray(o,o+d),s),l-=d,o+=d,c-=d,s+=d,n.length-=d;break}n.mode=on;break;case Lv:for(;u<14;){if(l===0)break e;l--,a+=r[o++]<>>=5,u-=5,n.ndist=(a&31)+1,a>>>=5,u-=5,n.ncode=(a&15)+4,a>>>=4,u-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=ee;break}n.have=0,n.mode=Dv;case Dv:for(;n.have>>=3,u-=3}for(;n.have<19;)n.lens[ze[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,C={bits:n.lenbits},b=Qo(sC,n.lens,0,19,n.lencode,0,n.work,C),n.lenbits=C.bits,b){e.msg="invalid code lengths set",n.mode=ee;break}n.have=0,n.mode=Mv;case Mv:for(;n.have>>24,m=w>>>16&255,y=w&65535,!(h<=u);){if(l===0)break e;l--,a+=r[o++]<>>=h,u-=h,n.lens[n.have++]=y;else{if(y===16){for(N=h+2;u>>=h,u-=h,n.have===0){e.msg="invalid bit length repeat",n.mode=ee;break}k=n.lens[n.have-1],d=3+(a&3),a>>>=2,u-=2}else if(y===17){for(N=h+3;u>>=h,u-=h,k=0,d=3+(a&7),a>>>=3,u-=3}else{for(N=h+7;u>>=h,u-=h,k=0,d=11+(a&127),a>>>=7,u-=7}if(n.have+d>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=ee;break}for(;d--;)n.lens[n.have++]=k}}if(n.mode===ee)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=ee;break}if(n.lenbits=9,C={bits:n.lenbits},b=Qo(g1,n.lens,0,n.nlen,n.lencode,0,n.work,C),n.lenbits=C.bits,b){e.msg="invalid literal/lengths set",n.mode=ee;break}if(n.distbits=6,n.distcode=n.distdyn,C={bits:n.distbits},b=Qo(y1,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,C),n.distbits=C.bits,b){e.msg="invalid distances set",n.mode=ee;break}if(n.mode=Sa,t===ka)break e;case Sa:n.mode=Ea;case Ea:if(l>=6&&c>=258){e.next_out=s,e.avail_out=c,e.next_in=o,e.avail_in=l,n.hold=a,n.bits=u,eC(e,f),s=e.next_out,i=e.output,c=e.avail_out,o=e.next_in,r=e.input,l=e.avail_in,a=n.hold,u=n.bits,n.mode===on&&(n.back=-1);break}for(n.back=0;w=n.lencode[a&(1<>>24,m=w>>>16&255,y=w&65535,!(h<=u);){if(l===0)break e;l--,a+=r[o++]<>v)],h=w>>>24,m=w>>>16&255,y=w&65535,!(v+h<=u);){if(l===0)break e;l--,a+=r[o++]<>>=v,u-=v,n.back+=v}if(a>>>=h,u-=h,n.back+=h,n.length=y,m===0){n.mode=Bv;break}if(m&32){n.back=-1,n.mode=on;break}if(m&64){e.msg="invalid literal/length code",n.mode=ee;break}n.extra=m&15,n.mode=zv;case zv:if(n.extra){for(N=n.extra;u>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=jv;case jv:for(;w=n.distcode[a&(1<>>24,m=w>>>16&255,y=w&65535,!(h<=u);){if(l===0)break e;l--,a+=r[o++]<>v)],h=w>>>24,m=w>>>16&255,y=w&65535,!(v+h<=u);){if(l===0)break e;l--,a+=r[o++]<>>=v,u-=v,n.back+=v}if(a>>>=h,u-=h,n.back+=h,m&64){e.msg="invalid distance code",n.mode=ee;break}n.offset=y,n.extra=m&15,n.mode=Fv;case Fv:if(n.extra){for(N=n.extra;u>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=ee;break}n.mode=Uv;case Uv:if(c===0)break e;if(d=f-c,n.offset>d){if(d=n.offset-d,d>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=ee;break}d>n.wnext?(d-=n.wnext,g=n.wsize-d):g=n.wnext-d,d>n.length&&(d=n.length),_=n.window}else _=i,g=s-n.offset,d=n.length;d>c&&(d=c),c-=d,n.length-=d;do i[s++]=_[g++];while(--d);n.length===0&&(n.mode=Ea);break;case Bv:if(c===0)break e;i[s++]=n.length,c--,n.mode=Ea;break;case Od:if(n.wrap){for(;u<32;){if(l===0)break e;l--,a|=r[o++]<{if(yr(e))return pt;let t=e.state;return t.window&&(t.window=null),e.state=null,hr},wC=(e,t)=>{if(yr(e))return pt;let n=e.state;return n.wrap&2?(n.head=t,t.done=!1,hr):pt},xC=(e,t)=>{let n=t.length,r,i,o;return yr(e)||(r=e.state,r.wrap!==0&&r.mode!==Ta)?pt:r.mode===Ta&&(i=1,i=ts(i,t,n,0),i!==r.check)?_1:(o=R1(e,t,n,n),o?(r.mode=w1,v1):(r.havedict=1,hr))},kC=S1,SC=E1,EC=k1,bC=gC,RC=b1,CC=_C,TC=vC,IC=wC,OC=xC,NC="pako inflate (from Nodeca project)",ln={inflateReset:kC,inflateReset2:SC,inflateResetKeep:EC,inflateInit:bC,inflateInit2:RC,inflate:CC,inflateEnd:TC,inflateGetHeader:IC,inflateSetDictionary:OC,inflateInfo:NC};function PC(){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 AC=PC,C1=Object.prototype.toString,{Z_NO_FLUSH:LC,Z_FINISH:DC,Z_OK:is,Z_STREAM_END:Ad,Z_NEED_DICT:Ld,Z_STREAM_ERROR:MC,Z_DATA_ERROR:Gv,Z_MEM_ERROR:zC}=gr;function as(e){this.options=Oa.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});let t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new m1,this.strm.avail_out=0;let n=ln.inflateInit2(this.strm,t.windowBits);if(n!==is)throw new Error(pr[n]);if(this.header=new AC,ln.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=rs.string2buf(t.dictionary):C1.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=ln.inflateSetDictionary(this.strm,t.dictionary),n!==is)))throw new Error(pr[n])}as.prototype.push=function(e,t){let n=this.strm,r=this.options.chunkSize,i=this.options.dictionary,o,s,l;if(this.ended)return!1;for(t===~~t?s=t:s=t===!0?DC:LC,C1.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),o=ln.inflate(n,s),o===Ld&&i&&(o=ln.inflateSetDictionary(n,i),o===is?o=ln.inflate(n,s):o===Gv&&(o=Ld));n.avail_in>0&&o===Ad&&n.state.wrap>0&&e[n.next_in]!==0;)ln.inflateReset(n),o=ln.inflate(n,s);switch(o){case MC:case Gv:case Ld:case zC:return this.onEnd(o),this.ended=!0,!1}if(l=n.avail_out,n.next_out&&(n.avail_out===0||o===Ad))if(this.options.to==="string"){let c=rs.utf8border(n.output,n.next_out),a=n.next_out-c,u=rs.buf2string(n.output,c);n.next_out=a,n.avail_out=r-a,a&&n.output.set(n.output.subarray(c,c+a),0),this.onData(u)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(o===is&&l===0)){if(o===Ad)return o=ln.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(n.avail_in===0)break}}return!0};as.prototype.onData=function(e){this.chunks.push(e)};as.prototype.onEnd=function(e){e===is&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Oa.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Qd(e,t){let n=new as(t);if(n.push(e),n.err)throw n.msg||pr[n.err];return n.result}function jC(e,t){return t=t||{},t.raw=!0,Qd(e,t)}var FC=as,UC=Qd,BC=jC,$C=Qd,HC=gr,VC={Inflate:FC,inflate:UC,inflateRaw:BC,ungzip:$C,constants:HC},{Deflate:WC,deflate:GC,deflateRaw:ZC,gzip:KC}=JR,{Inflate:qC,inflate:QC,inflateRaw:XC,ungzip:JC}=VC,YC=WC,e3=GC,t3=ZC,n3=KC,r3=qC,i3=QC,o3=XC,s3=JC,l3=gr,T1={Deflate:YC,deflate:e3,deflateRaw:t3,gzip:n3,Inflate:r3,inflate:i3,inflateRaw:o3,ungzip:s3,constants:l3};var an={tables:{},columns:{},rels:{}},O1=e=>{let t="";return new Proxy({},{get(n,r){return r==="_batch"?{update:async i=>_r({name:t,action:"batch_update",table:"",params:{batch:i}},e),upsert:async i=>_r({name:t,action:"batch_upsert",table:"",params:{arg:i}},e)}:r==="_schema"?{tables:async()=>(an.tables[e]||(an.tables[e]=_r({name:t,action:"schema_tables",table:"",params:[]},e)),await an.tables[e]),columns:async i=>(an.columns[e+"_"+i]||(an.columns[e+"_"+i]=_r({name:t,action:"schema_columns",table:i,params:[]},e)),await an.columns[e+"_"+i]),rels:async i=>(an.rels[e+"_"+i]||(an.rels[e+"_"+i]=_r({name:t,action:"schema_rels",table:i,params:[]},e)),await an.rels[e+"_"+i])}:r.startsWith("$")?(...i)=>{let o=T1.gzip(JSON.stringify(i));return _r({name:t,action:"query",table:r,params:btoa(o.reduce((s,l)=>s+String.fromCharCode(l),""))},e)}:new Proxy({},{get(i,o){return async(...s)=>(r==="query"&&(r=o,o="query"),await _r({name:t,action:o,table:r,params:s},e))}})}})},Pa={},_r=async(e,t)=>{try{let n=new URL(t);n.pathname="/_dbs",e.table&&(n.pathname+=`/${e.table}`);let r=n.toString();typeof localStorage<"u"&&localStorage.mlsid&&(e.mlsid=localStorage.mlsid);let i=(0,I1.default)(e),o=Pa[i];if(!o||o&&Date.now()-o.timestamp>1e3){Pa[i]={timestamp:Date.now(),promise:gi(r,e,{"content-type":"application/json"}),result:null};let s=await Pa[i].promise;return Pa[i].result=s,s}return await o.promise}catch{}};var N1=P(Wl());var P1=e=>{let{item:t,item_comp:n,ids:r}=e,i=Xr(n);if(A1(i,r),t.id&&(i.id=t.id),i.hidden=t.hidden,i.component){if(i.component.props&&t.component&&t.component.props)for(let o of Object.keys(i.component.props)){let s=t.component.props[o],l=i.component.props[o];s&&(l.value=s.value,l.valueBuilt=s.valueBuilt,l.jsxCalledBy=s.jsxCalledBy,l.content=s.content)}i.component.instances=t.component?.instances,i.component.style=t.component?.style}for(let o of Object.keys(t))delete t[o];for(let[o,s]of Object.entries(i))t[o]=s},A1=(e,t)=>{if(e.originalId=e.id,t[e.id]||(t[e.id]=(0,N1.createId)()),e.id=t[e.id],e.childs)for(let n of e.childs)A1(n,t)};var L1=e=>{let t=Object.entries(e.item_comp.component?.props||{}).sort((n,r)=>n[1].idx-r[1].idx);for(let[n,r]of t){let i=Xr(r),o=e.item.component?.props;o&&o[n]&&(i.value=o[n].value,i.valueBuilt=o[n].valueBuilt,o[n].content&&(i.content=o[n].content)),i&&e.each(n,i)}};var Aa=e=>{let t={};for(let[n,r]of Object.entries(e))if(n==="childs"){if(t.childs=[],r&&Array.isArray(r))for(let i of r)i.type==="item"&&i.component?t.childs.push(i):t.childs.push({name:i.name,id:i.id,originalId:i.originalId})}else t[n]=r;return t};var D1=(e,t)=>{let{item:n}=t;if(n.type==="item"&&n.component?.id&&t.parent?.item.id){let r=e.comps[n.component.id];if(e.on?.visit_component&&e.on.visit_component(n,t.root||t.item),!r)return;if(r){let i;if(e.mode==="page"?(n.component.instances||(n.component.instances={}),i=n.component.instances):i=t.parent?.root_instances,i){let s=i[n.id];i[n.id]||(i[n.id]={},s=i[n.id]),P1({item:n,item_comp:r,ids:s})}let o={item:Aa(n),jsx_prop:t.jsx_prop,parent:{id:t.parent.item.id,comp_id:t.parent?.comp?.component?.id,instance_id:t.parent?.instance_id},instances:i};if(e.on?.visit&&e.on.visit(o,n,t.root||t.item),n.id&&e.set_meta!==!1&&(e.meta[n.id]=o),L1({item:n,item_comp:r,instance:i?i[n.id]:{},each(s,l){let c=n.component?.id;l.meta?.type==="content-element"&&c&&l.content&&(l.content.name=s,bi({...e},{item:l.content,root:t.root||l.content,is_root:!1,jsx_prop:{is_root:!0,comp_id:c,name:s},parent:{item:o.item,instance_id:n.id,comp:r,root_instances:i}}))}}),n.childs)for(let s of Object.values(n.childs))s?.name?.startsWith("jsx:")||s&&Object.keys(s).length>3&&bi({...e,mode:"comp"},{item:s,is_root:!1,root:t.root||t.item,parent:{item:n,instance_id:n.id,root_instances:i,comp:r}})}}};var bi=(e,t)=>{let n=t.item;if(n.type==="item"&&n.component?.id&&t.ignore_first_component!==!0){D1(e,t);return}let r={item:Aa(n),parent:{id:t.parent?.item.id||"root",instance_id:t.parent?.instance_id,comp_id:t.parent?.comp?.component?.id}};if(t.jsx_prop&&(r.jsx_prop=t.jsx_prop),e.on?.visit&&e.on.visit(r,n,t.root||t.item),n.id&&e.set_meta!==!1&&(e.meta[r.item.id]=r),n.childs){for(let[i,o]of Object.entries(n.childs))if(o.id){let s={item:o,is_root:!1,root:t.root||t.item,parent:{item:r.item,instance_id:t.parent?.instance_id,comp:t.parent?.comp,root_instances:t.parent?.root_instances}};t.jsx_prop&&(s.jsx_prop={...t.jsx_prop,is_root:!1}),bi(e,s)}}};var a3=()=>new Promise(async e=>{let t=!1,n=await(await fetch(T.url`_prasi/route`)).json();t||e(n)}),M1=async()=>{let e=Gl(),t=[];try{let n=await a3();if(n&&n.site&&n.urls){n.layout&&(T.layout.id=n.layout.id,T.layout.root=n.layout.root,T.layout.meta={},T.layout.root&&(await ui(T.layout.root.childs),La(T.layout.meta,T.layout.root))),T.site=n.site,T.site.code={mode:"vsc"},await u3(),T.site.api=ov(T.site.api_url),T.site.db=O1(T.site.api_url);let r=window;r.serverurl=T.site.api_url,r.db=T.site.db,r.api=T.site.api;for(let i of n.urls)e.insert(i.url,i),t.push(i)}}catch{}return{router:e,pages:t}},u3=()=>new Promise(e=>{let t=document,n=t.createElement("script");n.onload=async()=>{e()};let r=T.site.api_url;if(r==="*")r=`${location.protocol}//${location.host}`,T.site.api_url=r;else try{new URL(r)}catch{location.hostname==="localhost"?r="http://localhost:4550":r="https://prasi.avolut.com"}localStorage.getItem("api-ts-"+r)||localStorage.setItem("api-ts-"+r,Date.now().toString());let i=localStorage.getItem("api-ts-"+r);n.src=`${r}/_prasi/load.js?url=${r}&v3&ts=${i}`,document.querySelector(`script[src="${n.src}"]`)?e():t.body.appendChild(n)}),La=(e,t)=>{for(let n of t.childs)bi({set_meta:!0,comps:T.comp.list,meta:e,mode:"page"},{item:n})};var le=window;var un=P(G()),Jd=()=>location.hostname.split(".").length===4||location.hostname==="prasi.app"||location.hostname==="prasi.avolut.com"||location.hostname.includes("ngrok")||location.hostname==="localhost"||location.hostname==="127.0.0.1"||location.hostname==="10.0.2.2",j1=()=>{let e=Nn({page_id:""}),[t,n]=(0,z1.useState)({}),r=()=>n({});le.prasiContext.render=r;let i=ff.Provider,o=Jd()&&location.pathname.startsWith("/prod");if(T.route.status!=="ready")return T.route.status==="init"&&(T.route.status="loading",M1().then(async({router:u,pages:p})=>{Xy(),T.route.status="ready",T.route.router=u,T.route.pages=p;let f=le._prasi.basepath,d=`${f.endsWith("/")?f:`${f}/`}_prasi/code/index.js`,g=new URL(location.href);d.startsWith("/")&&(d=`${g.protocol}//${g.host}${d}`);let _=new Function("callback",`import("${d}").then(callback)`);await new Promise(w=>{_(h=>{for(let[m,y]of Object.entries(h))le[m]=y;w()})}),r()})),(0,un.jsx)(So,{});let s=T.route.router;if(!s)return(0,un.jsx)(vf,{children:"Failed to create Router"});let l="";if(o){let u=location.pathname.split("/");_f(u[3])&&(l=u[3])}let c=null;if(le._prasi.page_id)s.insert(T.pathname,{id:le._prasi.page_id,url:T.pathname}),c={id:le._prasi.page_id,url:"",params:le._prasi.params},le._prasi.routed={page_id:le._prasi.page_id,params:le._prasi.params},delete le._prasi.page_id,delete le._prasi.params;else{if(c=s.lookup(T.pathname),l){let u=T.route.pages.find(p=>l===p.id);u&&(c=u)}c&&le._prasi.routed&&le._prasi.routed.page_id===c.id&&le._prasi.routed.params&&(c.params=le._prasi.routed.params)}if(!c)return(0,un.jsx)(vf,{children:"Page Not Found"});c.id!==e.page_id&&(T.init_local_effect={}),le.params=c.params||{},T.page.id=c.id,T.page.url=c.url;let a=T.page.cache[c.id];if(a)T.page.root=a.root,T.page.meta=a.meta;else return Zy(c.id).then(async({root:u})=>{if(c){let p={id:c.id,url:c.url,root:u,meta:{}};await ui(u.childs),La(p.meta,u),T.page.cache[p.id]=p,r()}}).catch(()=>{r()}),(0,un.jsx)(So,{note:"Loading page"});return(0,un.jsx)(i,{value:le.prasiContext,children:(0,un.jsx)("div",{className:cx("relative flex flex-1 items-center justify-center"),children:(0,un.jsx)("div",{className:cx("absolute flex flex-col items-stretch flex-1 bg-white main-content-preview",T.mode==="mobile"?css` @media (min-width: 768px) { border-left: 1px solid #ccc; border-right: 1px solid #ccc; @@ -132,7 +132,7 @@ ${d} } `:"inset-0 overflow-auto",css` contain: content; - `),children:(0,ln.jsx)(zy,{api_url:I.site.api_url,entry:Object.values(I.page.root.childs).filter(c=>c).map(c=>c.id),meta:I.page.meta,mode:I.mode,page_id:I.page.id,site_id:I.site.id,db:I.site.db,api:I.site.api,comp_load:async c=>{let d=I.comp;if(d.list[c])return d.list[c];try{let f=await(await fetch(I.url`_prasi/comp`,{method:"POST",body:JSON.stringify({ids:[c]})})).json();for(let[p,g]of Object.entries(f))delete d.pending[p],d.list[p]=g,await zs(`comp-${p}`,g)}catch{}return d.list[c]},layout:I.layout.id&&I.layout.root&&I.layout.meta?{id:I.layout.id,meta:I.layout.meta,entry:Object.values(I.layout.root.childs).filter(c=>c).map(c=>c.id)}:void 0,script:{init_local_effect:I.init_local_effect},on_preload:async({urls:c,opt:d})=>{let f=[],p={};if(I.cache.urls)for(let g of c)I.cache.urls.has(g)||(f.push(g),I.cache.urls.add(g));if(f.length>0){let g=await Fy(f);if(d?.on_load&&d.on_load(g,zC),Array.isArray(g))for(let _ of g){let w={id:_.id,url:_.url,root:_.root,meta:{}};await ai(_.root.childs),Na(w.meta,_.root),I.page.cache[w.id]=w}}}})})})})},zC=(e,t)=>{for(let n of e)for(let r of n.root.childs)$d(r,t)},$d=(e,t)=>{if(t(e),e.type!=="text"){if(e.type==="item"&&e.component?.props)for(let n of Object.values(e.component.props))n.content&&$d(n.content,t);for(let n of e.childs)$d(n,t)}};var C1=P(G());(async()=>{Dy();let e=document.getElementById("root");if(e){await Q0(!1);let t={root:(0,R1.createRoot)(e)};V0(),se.navigateOverride=n=>(n&&n.startsWith("/")&&Hd()&&location.pathname.startsWith("/prod")&&!n.startsWith("/prod")&&(n=`/prod/${location.pathname.split("/")[2]}${n}`),n),t.root.render((0,C1.jsx)(b1,{})),document.body.classList.contains("opacity-0")&&document.body.classList.remove("opacity-0")}})(); + `),children:(0,un.jsx)(Wy,{api_url:T.site.api_url,entry:Object.values(T.page.root.childs).filter(u=>u).map(u=>u.id),meta:T.page.meta,mode:T.mode,page_id:T.page.id,site_id:T.site.id,db:T.site.db,api:T.site.api,comp_load:async u=>{let p=T.comp;if(p.list[u])return p.list[u];try{let f=await(await fetch(T.url`_prasi/comp`,{method:"POST",body:JSON.stringify({ids:[u]})})).json();for(let[d,g]of Object.entries(f))delete p.pending[d],p.list[d]=g,await jl(`comp-${d}`,g)}catch{}return p.list[u]},layout:T.layout.id&&T.layout.root&&T.layout.meta?{id:T.layout.id,meta:T.layout.meta,entry:Object.values(T.layout.root.childs).filter(u=>u).map(u=>u.id)}:void 0,script:{init_local_effect:T.init_local_effect},on_preload:async({urls:u,opt:p})=>{let f=[],d={};if(T.cache.urls)for(let g of u)T.cache.urls.has(g)||(f.push(g),T.cache.urls.add(g));if(f.length>0){let g=await Ky(f);if(p?.on_load&&p.on_load(g,c3),Array.isArray(g))for(let _ of g){let w={id:_.id,url:_.url,root:_.root,meta:{}};await ui(_.root.childs),La(w.meta,_.root),T.page.cache[w.id]=w}}}})})})})},c3=(e,t)=>{for(let n of e)for(let r of n.root.childs)Xd(r,t)},Xd=(e,t)=>{if(t(e),e.type!=="text"){if(e.type==="item"&&e.component?.props)for(let n of Object.values(e.component.props))n.content&&Xd(n.content,t);for(let n of e.childs)Xd(n,t)}};var U1=P(G());(async()=>{Gy();let e=document.getElementById("root");if(e){await ig(!1);let t={root:(0,F1.createRoot)(e)};Y0(),le.navigateOverride=n=>(n&&n.startsWith("/")&&Jd()&&location.pathname.startsWith("/prod")&&!n.startsWith("/prod")&&(n=`/prod/${location.pathname.split("/")[2]}${n}`),n),t.root.render((0,U1.jsx)(j1,{})),document.body.classList.contains("opacity-0")&&document.body.classList.remove("opacity-0")}})(); /*! Bundled license information: react/cjs/react.production.min.js: diff --git a/app/srv/package.json b/app/srv/package.json index 7216920d..902ffad4 100644 --- a/app/srv/package.json +++ b/app/srv/package.json @@ -8,7 +8,7 @@ "@paralleldrive/cuid2": "^2.2.2", "@types/lodash.isequal": "^4.5.8", "@types/mime-types": "^2.1.4", - "esbuild": "^0.20.2", + "esbuild": "^0.21.5", "esbuild-clean-plugin": "^1.0.0", "lodash.isequal": "^4.5.0", "mime-types": "^2.1.35", diff --git a/app/srv/ws/sync/code/code.ts b/app/srv/ws/sync/code/code.ts index f65b026b..3803f354 100644 --- a/app/srv/ws/sync/code/code.ts +++ b/app/srv/ws/sync/code/code.ts @@ -16,12 +16,12 @@ export const code = { await ensureLib(root, id_site); await ensureFiles(root, id_site); - await initFrontEnd(root, id_site); - await initServer(root, id_site); - await initTypings(root, id_site); - if (exists(dir.data(`${root}`))) { - await $`chmod -R 777 ${dir.data(`${root}`)}`; - } + // await initFrontEnd(root, id_site); + // await initServer(root, id_site); + // await initTypings(root, id_site); + // if (exists(dir.data(`${root}`))) { + // await $`chmod -R 777 ${dir.data(`${root}`)}`; + // } }, path( id_site: string, diff --git a/app/srv/ws/sync/code/parts/init/frontend.ts b/app/srv/ws/sync/code/parts/init/frontend.ts index e1ad6176..ad43c901 100644 --- a/app/srv/ws/sync/code/parts/init/frontend.ts +++ b/app/srv/ws/sync/code/parts/init/frontend.ts @@ -1,19 +1,20 @@ import globalExternals from "@fal-works/esbuild-plugin-global-externals"; import style from "@hyrious/esbuild-plugin-style"; import { dir } from "dir"; -import { BuildOptions, BuildResult, context, formatMessages } from "esbuild"; +import { context, formatMessages } from "esbuild"; import { cleanPlugin } from "esbuild-clean-plugin"; -import isEqual from "lodash.isequal"; -import { appendFile } from "node:fs/promises"; -import { code } from "../../code"; -import { user } from "../../../entity/user"; -import { conns } from "../../../entity/conn"; -import { SyncType } from "../../../type"; -import { sendWS } from "../../../sync-handler"; -import { removeAsync } from "fs-jetpack"; import { watch } from "fs"; +import { appendFile } from "node:fs/promises"; import { server } from "../../../editor/code/server-main"; +import { conns } from "../../../entity/conn"; +import { user } from "../../../entity/user"; +import { sendWS } from "../../../sync-handler"; +import { SyncType } from "../../../type"; +import { code } from "../../code"; +import { existsAsync } from "fs-jetpack"; const decoder = new TextDecoder(); +const pending = {} as any; + export const initFrontEnd = async ( root: string, id_site: string, @@ -22,13 +23,27 @@ export const initFrontEnd = async ( let existing = code.internal.frontend[id_site]; if (existing) { - if (force) { - try { - existing.watch.close(); - await existing.ctx.dispose(); - delete code.internal.frontend[id_site]; - } catch (e) { } + if (existing.npm) { + if (pending[id_site]) return; + pending[id_site] = true; + await existing.npm; + delete pending[id_site]; + delete existing.npm; } else { + if (force) { + try { + existing.watch.close(); + await existing.ctx.dispose(); + delete code.internal.frontend[id_site]; + } catch (e) {} + } else { + return; + } + } + } else { + if ( + !(await existsAsync(code.path(id_site, "site", "src", "node_modules"))) + ) { return; } } @@ -114,25 +129,25 @@ export const initFrontEnd = async ( const srv = code.internal.server[id_site]; if (filename?.startsWith("node_modules")) return; if ( - (filename?.endsWith(".tsx") || - filename?.endsWith(".ts") || - filename?.endsWith(".css") || - filename?.endsWith(".html")) + filename?.endsWith(".tsx") || + filename?.endsWith(".ts") || + filename?.endsWith(".css") || + filename?.endsWith(".html") ) { - if (typeof fe !== 'undefined' && !fe.rebuilding) { + if (typeof fe !== "undefined" && !fe.rebuilding) { fe.rebuilding = true; try { await fe.ctx.rebuild(); - } catch (e) { } + } catch (e) {} fe.rebuilding = false; } - if (typeof srv !== 'undefined' && !srv.rebuilding && srv.ctx) { + if (typeof srv !== "undefined" && !srv.rebuilding && srv.ctx) { srv.rebuilding = true; try { await srv.ctx.rebuild(); await server.init(id_site); - } catch (e) { } + } catch (e) {} srv.rebuilding = false; } } @@ -143,7 +158,7 @@ export const initFrontEnd = async ( fe.rebuilding = true; try { await fe.ctx.rebuild(); - } catch (e) { } + } catch (e) {} fe.rebuilding = false; } catch (e: any) { console.error("Error building front end", id_site); @@ -169,127 +184,127 @@ const isInstalling = async (id_site: string) => { const text = await file.text(); if (typeof text === "string" && text.startsWith("Installing dependencies")) return true; - } catch (e) { } + } catch (e) {} return false; }; -const readPackageJSON = async (id_site: string) => { - const file = Bun.file(code.path(id_site, "site", "src", "package.json")); - const deps = new Set(); +// const readPackageJSON = async (id_site: string) => { +// const file = Bun.file(code.path(id_site, "site", "src", "package.json")); +// const deps = new Set(); - if (await file.exists()) { - const json = await file.json(); +// if (await file.exists()) { +// const json = await file.json(); - if (json.dependencies) { - for (const k of Object.keys(json.dependencies)) { - deps.add(k); - } - } +// if (json.dependencies) { +// for (const k of Object.keys(json.dependencies)) { +// deps.add(k); +// } +// } - if (json.devDependencies) { - for (const k of Object.keys(json.devDependencies)) { - deps.add(k); - } - } - } - return deps; -}; +// if (json.devDependencies) { +// for (const k of Object.keys(json.devDependencies)) { +// deps.add(k); +// } +// } +// } +// return deps; +// }; -const installDeps = async ( - root: string, - res: BuildResult, - id_site: string -) => { - const pkgjson = await readPackageJSON(id_site); - const imports = new Set(); +// const installDeps = async ( +// root: string, +// res: BuildResult, +// id_site: string +// ) => { +// const pkgjson = await readPackageJSON(id_site); +// const imports = new Set(); - if (res.errors.length > 0) { - for (const err of res.errors) { - if (err.notes?.[0].text.startsWith("You can mark the path ")) { - let im = err.notes?.[0].text.split('"')[1]; +// if (res.errors.length > 0) { +// for (const err of res.errors) { +// if (err.notes?.[0].text.startsWith("You can mark the path ")) { +// let im = err.notes?.[0].text.split('"')[1]; - if ( - !im.startsWith(".") && - !im.startsWith("@/") && - !im.startsWith("app") && - !im.startsWith("lib") && - !im.startsWith("server") - ) { - const parts = im.split("/"); - if (im.startsWith("@")) { - im = `${parts[0]}/${parts[1]}`; - } else { - im = parts[0]; - } - imports.add(im); - } - } - } - } +// if ( +// !im.startsWith(".") && +// !im.startsWith("@/") && +// !im.startsWith("app") && +// !im.startsWith("lib") && +// !im.startsWith("server") +// ) { +// const parts = im.split("/"); +// if (im.startsWith("@")) { +// im = `${parts[0]}/${parts[1]}`; +// } else { +// im = parts[0]; +// } +// imports.add(im); +// } +// } +// } +// } - if (res.metafile) { - for (const [_, file] of Object.entries(res.metafile?.inputs || {})) { - for (const im of file.imports) { - if (im.kind === "import-statement" && im.external) { - if ( - !im.path.startsWith(".") && - !im.path.startsWith("@/") && - !im.path.startsWith("app") && - !im.path.startsWith("lib") && - !im.path.startsWith("server") - ) { - const parts = im.path.split("/"); - let src = im.path; - if (src.startsWith("@")) { - src = `${parts[0]}/${parts[1]}`; - } else { - src = parts[0]; - } +// if (res.metafile) { +// for (const [_, file] of Object.entries(res.metafile?.inputs || {})) { +// for (const im of file.imports) { +// if (im.kind === "import-statement" && im.external) { +// if ( +// !im.path.startsWith(".") && +// !im.path.startsWith("@/") && +// !im.path.startsWith("app") && +// !im.path.startsWith("lib") && +// !im.path.startsWith("server") +// ) { +// const parts = im.path.split("/"); +// let src = im.path; +// if (src.startsWith("@")) { +// src = `${parts[0]}/${parts[1]}`; +// } else { +// src = parts[0]; +// } - imports.add(src); - } - } - } - } - } +// imports.add(src); +// } +// } +// } +// } +// } - if (!isEqual(imports, pkgjson)) { - const pkgjson = Bun.file(code.path(id_site, "site", "src", "package.json")); - if (!(await pkgjson.exists())) { - await Bun.write( - pkgjson, - JSON.stringify({ - name: id_site, - scripts: { - startup: - "ulimit -c 0; tailwindcss --watch -i ./app/css/global.css -o ./app/css/build.css --minify", - }, - }) - ); - } +// if (!isEqual(imports, pkgjson)) { +// const pkgjson = Bun.file(code.path(id_site, "site", "src", "package.json")); +// if (!(await pkgjson.exists())) { +// await Bun.write( +// pkgjson, +// JSON.stringify({ +// name: id_site, +// scripts: { +// startup: +// "ulimit -c 0; tailwindcss --watch -i ./app/css/global.css -o ./app/css/build.css --minify", +// }, +// }) +// ); +// } - await codeError( - id_site, - "Installing dependencies:\n " + [...imports].join("\n ") - ); - let proc = Bun.spawn([`npm`, `install`, ...imports], { - stdio: ["inherit", "pipe", "pipe"], - cwd: dir.data(root), - }); +// await codeError( +// id_site, +// "Installing dependencies:\n " + [...imports].join("\n ") +// ); +// let proc = Bun.spawn([`npm`, `install`, ...imports], { +// stdio: ["inherit", "pipe", "pipe"], +// cwd: dir.data(root), +// }); - async function print(generator: ReadableStream, prefix: any) { - for await (let value of generator) { - const str = decoder.decode(value); - await codeError(id_site, `${prefix} ${str}`, true); - } - } +// async function print(generator: ReadableStream, prefix: any) { +// for await (let value of generator) { +// const str = decoder.decode(value); +// await codeError(id_site, `${prefix} ${str}`, true); +// } +// } - print(proc.stdout, "stdout:"); - print(proc.stderr, "stderr:"); +// print(proc.stdout, "stdout:"); +// print(proc.stderr, "stderr:"); - await proc.exited; - // await codeError(id_site, ""); - return true; - } -}; +// await proc.exited; +// // await codeError(id_site, ""); +// return true; +// } +// }; diff --git a/app/srv/ws/sync/code/parts/init/typings.ts b/app/srv/ws/sync/code/parts/init/typings.ts index 78201dfb..febefedd 100644 --- a/app/srv/ws/sync/code/parts/init/typings.ts +++ b/app/srv/ws/sync/code/parts/init/typings.ts @@ -40,20 +40,19 @@ export const initTypings = async ( code.internal.typings[id_site] = { timeout: Date.now(), watch: watch(typings_path), - spawn: null as any - // spawn: Bun.spawn({ - // cmd: [ - // ...`${dir.path( - // platform() === "win32" - // ? "node_modules/.bin/tsc.exe" - // : "node_modules/.bin/tsc" - // )} --watch --moduleResolution node --emitDeclarationOnly --outFile ../typings.d.ts --declaration --noEmit false`.split( - // " " - // ), - // ], - // cwd: dir.data(`/code/${id_site}/site/src`), - // stdio: [typings_log, typings_log, "ignore"], - // }), + spawn: Bun.spawn({ + cmd: [ + ...`${dir.path( + platform() === "win32" + ? "node_modules/.bin/tsc.exe" + : "node_modules/.bin/tsc" + )} --watch --moduleResolution node --emitDeclarationOnly --outFile ../typings.d.ts --declaration --noEmit false`.split( + " " + ), + ], + cwd: dir.data(`/code/${id_site}/site/src`), + stdio: [typings_log, typings_log, "ignore"], + }), }; let timeout = null as any; code.internal.typings[id_site].watch.on("change", (e, path) => { diff --git a/app/srv/ws/sync/code/parts/internal.ts b/app/srv/ws/sync/code/parts/internal.ts index 3a106677..9a560af5 100644 --- a/app/srv/ws/sync/code/parts/internal.ts +++ b/app/srv/ws/sync/code/parts/internal.ts @@ -11,14 +11,23 @@ export const codeInternal = { get server() { if (!g.prasi_code) g.prasi_code = {}; if (!g.prasi_code.server) g.prasi_code.server = {}; - return g.prasi_code.server as Record; + return g.prasi_code.server as Record< + SITE_ID, + { rebuilding: boolean; ts: number; ctx: BuildContext } + >; }, get frontend() { if (!g.prasi_code) g.prasi_code = {}; if (!g.prasi_code.frontend) g.prasi_code.frontend = {}; return g.prasi_code.frontend as Record< SITE_ID, - { ctx: BuildContext; timeout: any, watch: FSWatcher, rebuilding: boolean } + { + ctx: BuildContext; + timeout: any; + watch: FSWatcher; + rebuilding: boolean; + npm?: Promise; + } >; }, get typings() { diff --git a/app/srv/ws/sync/code/utlis/ensure-files.ts b/app/srv/ws/sync/code/utlis/ensure-files.ts index d6112659..dc34ee86 100644 --- a/app/srv/ws/sync/code/utlis/ensure-files.ts +++ b/app/srv/ws/sync/code/utlis/ensure-files.ts @@ -2,6 +2,8 @@ import { Glob } from "bun"; import { dir } from "dir"; import { dirAsync, exists, copyAsync } from "fs-jetpack"; import { dirname } from "path"; +import { g } from "utils/global"; +import { code } from "../code"; export const ensureFiles = async (path: string, id_site: string) => { const _dir = dir.data(path); @@ -15,65 +17,6 @@ export const ensureFiles = async (path: string, id_site: string) => { }); try { - const pkg = Bun.file(dir.data(`${path}/package.json`)); - if (!(await pkg.exists())) { - await Bun.write( - pkg, - JSON.stringify({ - name: "site-" + id_site, - scripts: { - startup: - "ulimit -c 0; tailwindcss --watch -i ./app/css/global.css -o ./app/css/build.css --minify", - }, - dependencies: {}, - }) - ); - const imports = [ - "@floating-ui/react", - "@paralleldrive/cuid2", - "@radix-ui/react-dropdown-menu", - "@radix-ui/react-label", - "@radix-ui/react-navigation-menu", - "@radix-ui/react-popover", - "@radix-ui/react-slider", - "@radix-ui/react-slot", - "@radix-ui/react-switch", - "@radix-ui/react-tabs", - "@types/file-saver", - "@types/lodash.capitalize", - "@types/lodash.get", - "@types/react", - "@types/react-dom", - "any-date-parser", - "chart.js", - "class-variance-authority", - "clsx", - "date-fns", - "embla-carousel-react", - "exceljs", - "lodash.capitalize", - "lodash.get", - "lucide-react", - "next-themes", - "quill", - "react", - "react-arborist", - "react-chartjs-2", - "react-data-grid", - "react-day-picker", - "react-resizable-panels", - "sonner", - "tailwind-merge", - ]; - - let proc = Bun.spawn([`npm`, `install`, ...imports], { - stdio: ["inherit", "pipe", "pipe"], - cwd: dir.data(path), - }); - - await proc.exited; - } - for await (const t of templates) { const f = t.replaceAll("_", "."); const to = dir.data(path + `/${f}`); @@ -85,6 +28,76 @@ export const ensureFiles = async (path: string, id_site: string) => { await copyAsync(from, to); } } + + const pkg = Bun.file(dir.data(`${path}/package.json`)); + if (!code.internal.frontend[id_site]) { + code.internal.frontend[id_site] = {} as any; + } + if (!(await pkg.exists())) { + code.internal.frontend[id_site].npm = new Promise(async (done) => { + await Bun.write( + pkg, + JSON.stringify({ + name: "site-" + id_site, + scripts: { + startup: + "ulimit -c 0; tailwindcss --watch -i ./app/css/global.css -o ./app/css/build.css --minify", + }, + dependencies: { + "@babel/runtime": "^7.24.6", + "@floating-ui/core": "^1.6.2", + "@floating-ui/react": "^0.26.16", + "@noble/hashes": "^1.4.0", + "@paralleldrive/cuid2": "^2.2.2", + "@radix-ui/react-compose-refs": "^1.0.1", + "@radix-ui/react-dropdown-menu": "^2.0.6", + "@radix-ui/react-label": "^2.0.2", + "@radix-ui/react-navigation-menu": "^1.1.4", + "@radix-ui/react-popover": "^1.0.7", + "@radix-ui/react-slider": "^1.1.2", + "@radix-ui/react-slot": "^1.0.2", + "@radix-ui/react-switch": "^1.0.3", + "@radix-ui/react-tabs": "^1.0.4", + "@types/file-saver": "^2.0.7", + "@types/lodash.capitalize": "^4.2.9", + "@types/lodash.get": "^4.4.9", + "@types/react": "^18.3.2", + "@types/react-dom": "^18.3.0", + "any-date-parser": "^1.5.4", + "chart.js": "^4.4.3", + "class-variance-authority": "^0.7.0", + clsx: "^2.1.1", + dayjs: "^1.11.11", + "embla-carousel-react": "^8.1.1", + exceljs: "^4.4.0", + "lodash.capitalize": "^4.2.1", + "lodash.get": "^4.4.2", + "lucide-react": "^0.378.0", + "next-themes": "^0.3.0", + quill: "^2.0.2", + "quill-delta": "^5.1.0", + react: "^18.3.1", + "react-arborist": "^3.4.0", + "react-chartjs-2": "^5.2.0", + "react-data-grid": "^7.0.0-beta.44", + "react-day-picker": "^8.10.1", + "react-resizable-panels": "^2.0.19", + sonner: "^1.4.41", + tabbable: "^6.2.0", + "tailwind-merge": "^2.3.0", + xlsx: "https://cdn.sheetjs.com/xlsx-0.20.2/xlsx-0.20.2.tgz", + }, + }) + ); + let proc = Bun.spawn([`npm`, `install`], { + stdio: ["inherit", "inherit", "inherit"], + cwd: dir.data(path), + }); + + await proc.exited; + done(); + }); + } } catch (e) { console.log("error ensure file", e); } diff --git a/app/static-br/all.21900861.js b/app/static-br/all.21900861.js deleted file mode 100644 index a62ed15f..00000000 Binary files a/app/static-br/all.21900861.js and /dev/null differ diff --git a/app/static-br/all.3f41890f.js b/app/static-br/all.3f41890f.js deleted file mode 100644 index d0f95909..00000000 Binary files a/app/static-br/all.3f41890f.js and /dev/null differ diff --git a/app/static-br/dist.a96c51ba.js b/app/static-br/dist.a96c51ba.js deleted file mode 100644 index 57629ca3..00000000 Binary files a/app/static-br/dist.a96c51ba.js and /dev/null differ diff --git a/app/static-br/ed.5d6e7641.css b/app/static-br/ed.5d6e7641.css deleted file mode 100644 index 80da6760..00000000 Binary files a/app/static-br/ed.5d6e7641.css and /dev/null differ diff --git a/app/static-br/ed.61f3c180.js b/app/static-br/ed.61f3c180.js deleted file mode 100644 index ec1ebbfb..00000000 Binary files a/app/static-br/ed.61f3c180.js and /dev/null differ diff --git a/app/static-br/ed.7b6ea295.js b/app/static-br/ed.7b6ea295.js deleted file mode 100644 index 7f0606e9..00000000 Binary files a/app/static-br/ed.7b6ea295.js and /dev/null differ diff --git a/app/static-br/estree.e78f25f4.js b/app/static-br/estree.e78f25f4.js deleted file mode 100644 index de18e599..00000000 Binary files a/app/static-br/estree.e78f25f4.js and /dev/null differ diff --git a/app/static-br/favicon.ico b/app/static-br/favicon.ico deleted file mode 100644 index ff56da48..00000000 Binary files a/app/static-br/favicon.ico and /dev/null differ diff --git a/app/static-br/img/empty.png b/app/static-br/img/empty.png deleted file mode 100644 index 2f4147c9..00000000 Binary files a/app/static-br/img/empty.png and /dev/null differ diff --git a/app/static-br/img/logo-white.png b/app/static-br/img/logo-white.png deleted file mode 100644 index 432256ae..00000000 Binary files a/app/static-br/img/logo-white.png and /dev/null differ diff --git a/app/static-br/img/logo.png b/app/static-br/img/logo.png deleted file mode 100644 index 624eb763..00000000 Binary files a/app/static-br/img/logo.png and /dev/null differ diff --git a/app/static-br/index.css b/app/static-br/index.css deleted file mode 100644 index 1d6a33ab..00000000 Binary files a/app/static-br/index.css and /dev/null differ diff --git a/app/static-br/index.html b/app/static-br/index.html deleted file mode 100644 index 9f343624..00000000 Binary files a/app/static-br/index.html and /dev/null differ diff --git a/app/static-br/index.js b/app/static-br/index.js deleted file mode 100644 index ed184370..00000000 Binary files a/app/static-br/index.js and /dev/null differ diff --git a/app/static-br/index.module.3b6e3819.js b/app/static-br/index.module.3b6e3819.js deleted file mode 100644 index 968e7d56..00000000 Binary files a/app/static-br/index.module.3b6e3819.js and /dev/null differ diff --git a/app/static-br/ipc.01a59384.js b/app/static-br/ipc.01a59384.js deleted file mode 100644 index d598ec03..00000000 Binary files a/app/static-br/ipc.01a59384.js and /dev/null differ diff --git a/app/static-br/login.8fe5b70e.js b/app/static-br/login.8fe5b70e.js deleted file mode 100644 index 683611ea..00000000 Binary files a/app/static-br/login.8fe5b70e.js and /dev/null differ diff --git a/app/static-br/logout.18aa5af1.js b/app/static-br/logout.18aa5af1.js deleted file mode 100644 index 3f6cc228..00000000 Binary files a/app/static-br/logout.18aa5af1.js and /dev/null differ diff --git a/app/static-br/register.6d814e0e.js b/app/static-br/register.6d814e0e.js deleted file mode 100644 index 472f58b7..00000000 Binary files a/app/static-br/register.6d814e0e.js and /dev/null differ diff --git a/app/static-br/standalone.ea6a9024.js b/app/static-br/standalone.ea6a9024.js deleted file mode 100644 index 8cd2440b..00000000 Binary files a/app/static-br/standalone.ea6a9024.js and /dev/null differ diff --git a/app/static-br/sworker.js b/app/static-br/sworker.js deleted file mode 100644 index 87b7d6cf..00000000 Binary files a/app/static-br/sworker.js and /dev/null differ diff --git a/app/static-br/typescript.a8fae2bf.js b/app/static-br/typescript.a8fae2bf.js deleted file mode 100644 index 7e3d13a7..00000000 Binary files a/app/static-br/typescript.a8fae2bf.js and /dev/null differ diff --git a/app/static-br/versions.5669369a.js b/app/static-br/versions.5669369a.js deleted file mode 100644 index 73d0bc29..00000000 Binary files a/app/static-br/versions.5669369a.js and /dev/null differ diff --git a/app/static-br/vi.05c19c97.js b/app/static-br/vi.05c19c97.js deleted file mode 100644 index 3b849b98..00000000 Binary files a/app/static-br/vi.05c19c97.js and /dev/null differ diff --git a/app/static-br/wasm_gzip_bg.cbb08a7b.wasm b/app/static-br/wasm_gzip_bg.cbb08a7b.wasm deleted file mode 100644 index c0626a13..00000000 Binary files a/app/static-br/wasm_gzip_bg.cbb08a7b.wasm and /dev/null differ diff --git a/app/static-br/worker.c0506575.js b/app/static-br/worker.c0506575.js deleted file mode 100644 index 241b566a..00000000 Binary files a/app/static-br/worker.c0506575.js and /dev/null differ diff --git a/app/static-br/y-pojo.da985c44.js b/app/static-br/y-pojo.da985c44.js deleted file mode 100644 index aaa47cf5..00000000 Binary files a/app/static-br/y-pojo.da985c44.js and /dev/null differ diff --git a/app/web/package.json b/app/web/package.json index d7c7b7a7..efc377f2 100644 --- a/app/web/package.json +++ b/app/web/package.json @@ -27,7 +27,7 @@ "date-fns": "^2.30.0", "safe-flat": "^2.1.0", "dbgen": "workspace:*", - "esbuild-wasm": "^0.19.10", + "esbuild-wasm": "^0.21.5", "hash-wasm": "^4.11.0", "idb-keyval": "^6.2.1", "immer": "^10.0.3", diff --git a/bun.lockb b/bun.lockb index 4d148114..ef8c5b33 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/dockerzip b/dockerzip index 8340d33e..a2537841 100644 Binary files a/dockerzip and b/dockerzip differ diff --git a/package.json b/package.json index 7afbf134..a72ab7ca 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "pkgs/*" ], "dependencies": { - "brotli-wasm": "^2.0.1", + "brotli-wasm": "^3.0.1", "fdir": "^6.1.0", "react-select": "^5.8.0", "typescript": "^5.2.2" diff --git a/pkgs/core/package.json b/pkgs/core/package.json index bc8a1fc2..4ce539a8 100644 --- a/pkgs/core/package.json +++ b/pkgs/core/package.json @@ -7,8 +7,8 @@ "woodpile": "^0.0.5", "@types/mime": "^3.0.3", "@types/unzipper": "^0.10.8", - "esbuild": "^0.20.2", - "brotli-wasm": "^2.0.1", + "esbuild": "^0.21.5", + "brotli-wasm": "^3.0.1", "execa": "^8.0.1", "fs-jetpack": "^5.1.0", "lmdb": "^2.8.5",