@adriansteffan/reactive 0.1.25 → 0.1.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +5 -1
- package/dist/{mod-pa8Hci6M.js → mod-BDgNS_RM.js} +4 -4
- package/dist/reactive.es.js +1 -1
- package/dist/reactive.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/{web-DvZ82oLB.js → web-DoEAzxsg.js} +1 -1
- package/dist/{web-CWLGQMq-.js → web-tvqjQ4Sx.js} +1 -1
- package/package.json +1 -1
- package/src/components/quest.tsx +2 -2
- package/src/index.css +2 -1
package/dist/reactive.umd.js
CHANGED
|
@@ -10269,7 +10269,7 @@ Click the button below to add a new entry.`,noEntriesReadonlyText:"No entries",t
|
|
|
10269
10269
|
* surveyjs - Survey JavaScript library v2.4.1
|
|
10270
10270
|
* Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
10271
10271
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
10272
|
-
*/var mhe={themeName:"contrast",colorPalette:"light",isPanelless:!1,cssVariables:{"--sjs-general-backcolor":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dark":"rgba(255, 216, 77, 1)","--sjs-general-backcolor-dim":"rgba(255, 216, 77, 1)","--sjs-general-backcolor-dim-light":"rgba(255, 216, 77, 1)","--sjs-general-backcolor-dim-dark":"rgba(255, 216, 77, 1)","--sjs-general-forecolor":"rgba(0, 0, 0, 1)","--sjs-general-forecolor-light":"rgba(0, 0, 0, 1)","--sjs-general-dim-forecolor":"rgba(0, 0, 0, 1)","--sjs-general-dim-forecolor-light":"rgba(0, 0, 0, 1)","--sjs-primary-backcolor":"rgba(0, 0, 0, 1)","--sjs-primary-backcolor-light":"rgba(255, 216, 77, 1)","--sjs-primary-backcolor-dark":"rgba(83, 83, 83, 1)","--sjs-primary-forecolor":"rgba(255, 255, 255, 1)","--sjs-primary-forecolor-light":"rgba(255, 255, 255, 0.25)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-secondary-backcolor":"rgba(255, 152, 20, 1)","--sjs-secondary-backcolor-light":"rgba(255, 152, 20, 0.1)","--sjs-secondary-backcolor-semi-light":"rgba(255, 152, 20, 0.25)","--sjs-secondary-forecolor":"rgba(255, 255, 255, 1)","--sjs-secondary-forecolor-light":"rgba(255, 255, 255, 0.25)","--sjs-shadow-small":"0px 0px 0px 2px rgba(0, 0, 0, 1)","--sjs-shadow-small-reset":"0px 0px 0px 0px rgba(0, 0, 0, 1)","--sjs-shadow-medium":"0px 0px 0px 2px rgba(0, 0, 0, 1)","--sjs-shadow-large":"0px 6px 0px 0px rgba(0, 0, 0, 1)","--sjs-shadow-inner":"0px 0px 0px 2px rgba(0, 0, 0, 1),0px -2px 0px 2px rgba(0, 0, 0, 1)","--sjs-shadow-inner-reset":"0px 0px 0px 0px rgba(0, 0, 0, 1),0px 0px 0px 0px rgba(0, 0, 0, 1)","--sjs-border-light":"rgba(0, 0, 0, 0.2)","--sjs-border-default":"rgba(0, 0, 0, 1)","--sjs-border-inside":"rgba(0, 0, 0, 0.16)","--sjs-special-red":"rgba(156, 2, 39, 1)","--sjs-special-red-light":"rgba(229, 10, 62, 0.1)","--sjs-special-red-forecolor":"rgba(255, 255, 255, 1)","--sjs-special-green":"rgba(25, 179, 148, 1)","--sjs-special-green-light":"rgba(25, 179, 148, 0.1)","--sjs-special-green-forecolor":"rgba(255, 255, 255, 1)","--sjs-special-blue":"rgba(67, 127, 217, 1)","--sjs-special-blue-light":"rgba(67, 127, 217, 0.1)","--sjs-special-blue-forecolor":"rgba(255, 255, 255, 1)","--sjs-special-yellow":"rgba(255, 152, 20, 1)","--sjs-special-yellow-light":"rgba(255, 152, 20, 0.1)","--sjs-special-yellow-forecolor":"rgba(255, 255, 255, 1)","--sjs-article-font-xx-large-textDecoration":"none","--sjs-article-font-xx-large-fontWeight":"700","--sjs-article-font-xx-large-fontStyle":"normal","--sjs-article-font-xx-large-fontStretch":"normal","--sjs-article-font-xx-large-letterSpacing":"0","--sjs-article-font-xx-large-lineHeight":"64px","--sjs-article-font-xx-large-paragraphIndent":"0px","--sjs-article-font-xx-large-textCase":"none","--sjs-article-font-x-large-textDecoration":"none","--sjs-article-font-x-large-fontWeight":"700","--sjs-article-font-x-large-fontStyle":"normal","--sjs-article-font-x-large-fontStretch":"normal","--sjs-article-font-x-large-letterSpacing":"0","--sjs-article-font-x-large-lineHeight":"56px","--sjs-article-font-x-large-paragraphIndent":"0px","--sjs-article-font-x-large-textCase":"none","--sjs-article-font-large-textDecoration":"none","--sjs-article-font-large-fontWeight":"700","--sjs-article-font-large-fontStyle":"normal","--sjs-article-font-large-fontStretch":"normal","--sjs-article-font-large-letterSpacing":"0","--sjs-article-font-large-lineHeight":"40px","--sjs-article-font-large-paragraphIndent":"0px","--sjs-article-font-large-textCase":"none","--sjs-article-font-medium-textDecoration":"none","--sjs-article-font-medium-fontWeight":"700","--sjs-article-font-medium-fontStyle":"normal","--sjs-article-font-medium-fontStretch":"normal","--sjs-article-font-medium-letterSpacing":"0","--sjs-article-font-medium-lineHeight":"32px","--sjs-article-font-medium-paragraphIndent":"0px","--sjs-article-font-medium-textCase":"none","--sjs-article-font-default-textDecoration":"none","--sjs-article-font-default-fontWeight":"400","--sjs-article-font-default-fontStyle":"normal","--sjs-article-font-default-fontStretch":"normal","--sjs-article-font-default-letterSpacing":"0","--sjs-article-font-default-lineHeight":"28px","--sjs-article-font-default-paragraphIndent":"0px","--sjs-article-font-default-textCase":"none"}};ni("Quest","session"),Qs("Quest",(i,e,t,s)=>{var o,l;const r={};let n=0;const a=((o=i.surveyJson)==null?void 0:o.pages)||[{elements:((l=i.surveyJson)==null?void 0:l.elements)||[]}];for(const u of a)for(const h of u.elements||[]){if(!h.name)continue;const c=t.answerQuestion(h,s);s=c.participantState,r[h.name]=c.value,n+=c.duration??0}return{responseData:r,participantState:s,duration:n}},{answerQuestion:(i,e)=>{var s,r,n,a,o;let t;switch(i.type){case"rating":{const l=i.rateMin??1,u=i.rateMax??5;t=l+Math.floor(X.uniform(0,u-l+1));break}case"boolean":t=X.uniform(0,1)>.5;break;case"text":case"comment":t="simulated_response";break;case"radiogroup":case"dropdown":{const l=(r=i.choices)==null?void 0:r[Math.floor(X.uniform(0,((s=i.choices)==null?void 0:s.length)||0))];t=l!==void 0?typeof l=="object"?l.value:l:null;break}case"checkbox":{if((n=i.choices)!=null&&n.length){const l=1+Math.floor(X.uniform(0,i.choices.length));t=[...i.choices].sort(()=>X.uniform(0,1)-.5).slice(0,l).map(u=>typeof u=="object"?u.value:u)}break}case"matrix":{(a=i.rows)!=null&&a.length&&((o=i.columns)!=null&&o.length)&&(t=Object.fromEntries(i.rows.map(l=>{const u=i.columns[Math.floor(X.uniform(0,i.columns.length))];return[typeof l=="object"?l.value:l,typeof u=="object"?u.value:u]})));break}default:t=null}return{value:t,participantState:e,duration:X.uniform(1e3,5e3)}}});const ghe=(i,e)=>{class t extends gs{getType(){return i}}z.addClass(i,[],function(){return new t("")},"question");class s extends cs{constructor(n){super(n),this.state={value:this.questionBase.value}}get question(){return this.questionBase}renderElement(){const n=e;return R.jsx(n,{setValue:a=>{this.question.value=a}})}}rt.Instance.registerQuestion(i,r=>T.createElement(s,r))};function U5({next:i,surveyJson:e,customQuestions:t={},theme:s,containerClass:r}){Object.keys(t).forEach(o=>{ghe(o,t[o])});const n=new ze({...e,css:{...Rc,root:`sd-root-modern custom-root${r?" survey-custom-bg":""}`}});n.applyTheme(s??mhe);const a=T.useCallback(o=>{i({...o.data})},[i]);return n.onComplete.add(a),R.jsxs("div",{className:`min-h-screen ${r??""}`,children:[!r&&R.jsx("div",{className:"absolute inset-0 -z-10 h-full w-full bg-white bg-[radial-gradient(#e5e7eb_1px,transparent_1px)] [background-size:16px_16px]"}),R.jsx("div",{className:"max-w-4xl mx-auto px-4",children:R.jsx(x5,{model:n})})]})}var eu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(i){return this.listeners.add(i),this.onSubscribe(),()=>{this.listeners.delete(i),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Wc=typeof window>"u"||"Deno"in globalThis;function rr(){}function vhe(i,e){return typeof i=="function"?i(e):i}function yhe(i){return typeof i=="number"&&i>=0&&i!==1/0}function Che(i,e){return Math.max(i+(e||0)-Date.now(),0)}function z5(i,e){return typeof i=="function"?i(e):i}function bhe(i,e){return typeof i=="function"?i(e):i}function j5(i,e){const{type:t="all",exact:s,fetchStatus:r,predicate:n,queryKey:a,stale:o}=i;if(a){if(s){if(e.queryHash!==mg(a,e.options))return!1}else if(!tu(e.queryKey,a))return!1}if(t!=="all"){const l=e.isActive();if(t==="active"&&!l||t==="inactive"&&l)return!1}return!(typeof o=="boolean"&&e.isStale()!==o||r&&r!==e.state.fetchStatus||n&&!n(e))}function W5(i,e){const{exact:t,status:s,predicate:r,mutationKey:n}=i;if(n){if(!e.options.mutationKey)return!1;if(t){if(Ea(e.options.mutationKey)!==Ea(n))return!1}else if(!tu(e.options.mutationKey,n))return!1}return!(s&&e.state.status!==s||r&&!r(e))}function mg(i,e){return((e==null?void 0:e.queryKeyHashFn)||Ea)(i)}function Ea(i){return JSON.stringify(i,(e,t)=>vg(t)?Object.keys(t).sort().reduce((s,r)=>(s[r]=t[r],s),{}):t)}function tu(i,e){return i===e?!0:typeof i!=typeof e?!1:i&&e&&typeof i=="object"&&typeof e=="object"?!Object.keys(e).some(t=>!tu(i[t],e[t])):!1}function gg(i,e){if(i===e)return i;const t=G5(i)&&G5(e);if(t||vg(i)&&vg(e)){const s=t?i:Object.keys(i),r=s.length,n=t?e:Object.keys(e),a=n.length,o=t?[]:{};let l=0;for(let u=0;u<a;u++){const h=t?u:n[u];(!t&&s.includes(h)||t)&&i[h]===void 0&&e[h]===void 0?(o[h]=void 0,l++):(o[h]=gg(i[h],e[h]),o[h]===i[h]&&i[h]!==void 0&&l++)}return r===a&&l===r?i:o}return e}function whe(i,e){if(!e||Object.keys(i).length!==Object.keys(e).length)return!1;for(const t in i)if(i[t]!==e[t])return!1;return!0}function G5(i){return Array.isArray(i)&&i.length===Object.keys(i).length}function vg(i){if(!K5(i))return!1;const e=i.constructor;if(e===void 0)return!0;const t=e.prototype;return!(!K5(t)||!t.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(i)!==Object.prototype)}function K5(i){return Object.prototype.toString.call(i)==="[object Object]"}function xhe(i){return new Promise(e=>{setTimeout(e,i)})}function Ehe(i,e,t){if(typeof t.structuralSharing=="function")return t.structuralSharing(i,e);if(t.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return gg(i,e)}catch(s){console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${t.queryHash}]: ${s}`)}return gg(i,e)}return e}function Vhe(i,e,t=0){const s=[...i,e];return t&&s.length>t?s.slice(1):s}function She(i,e,t=0){const s=[e,...i];return t&&s.length>t?s.slice(0,-1):s}var Gc=Symbol();function Z5(i,e){return process.env.NODE_ENV!=="production"&&i.queryFn===Gc&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${i.queryHash}'`),!i.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!i.queryFn||i.queryFn===Gc?()=>Promise.reject(new Error(`Missing queryFn: '${i.queryHash}'`)):i.queryFn}var The=(N4=class extends eu{constructor(){super();ot(this,Na);ot(this,Jn);ot(this,Wo);je(this,Wo,e=>{if(!Wc&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){Z(this,Jn)||this.setEventListener(Z(this,Wo))}onUnsubscribe(){var e;this.hasListeners()||((e=Z(this,Jn))==null||e.call(this),je(this,Jn,void 0))}setEventListener(e){var t;je(this,Wo,e),(t=Z(this,Jn))==null||t.call(this),je(this,Jn,e(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(e){Z(this,Na)!==e&&(je(this,Na,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){var e;return typeof Z(this,Na)=="boolean"?Z(this,Na):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Na=new WeakMap,Jn=new WeakMap,Wo=new WeakMap,N4),J5=new The,Phe=(F4=class extends eu{constructor(){super();ot(this,Go,!0);ot(this,Yn);ot(this,Ko);je(this,Ko,e=>{if(!Wc&&window.addEventListener){const t=()=>e(!0),s=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",s)}}})}onSubscribe(){Z(this,Yn)||this.setEventListener(Z(this,Ko))}onUnsubscribe(){var e;this.hasListeners()||((e=Z(this,Yn))==null||e.call(this),je(this,Yn,void 0))}setEventListener(e){var t;je(this,Ko,e),(t=Z(this,Yn))==null||t.call(this),je(this,Yn,e(this.setOnline.bind(this)))}setOnline(e){Z(this,Go)!==e&&(je(this,Go,e),this.listeners.forEach(s=>{s(e)}))}isOnline(){return Z(this,Go)}},Go=new WeakMap,Yn=new WeakMap,Ko=new WeakMap,F4),Kc=new Phe;function Ihe(){let i,e;const t=new Promise((r,n)=>{i=r,e=n});t.status="pending",t.catch(()=>{});function s(r){Object.assign(t,r),delete t.resolve,delete t.reject}return t.resolve=r=>{s({status:"fulfilled",value:r}),i(r)},t.reject=r=>{s({status:"rejected",reason:r}),e(r)},t}function Rhe(i){return Math.min(1e3*2**i,3e4)}function Y5(i){return(i??"online")==="online"?Kc.isOnline():!0}var X5=class extends Error{constructor(i){super("CancelledError"),this.revert=i==null?void 0:i.revert,this.silent=i==null?void 0:i.silent}};function yg(i){return i instanceof X5}function eE(i){let e=!1,t=0,s=!1,r;const n=Ihe(),a=v=>{var m;s||(d(new X5(v)),(m=i.abort)==null||m.call(i))},o=()=>{e=!0},l=()=>{e=!1},u=()=>J5.isFocused()&&(i.networkMode==="always"||Kc.isOnline())&&i.canRun(),h=()=>Y5(i.networkMode)&&i.canRun(),c=v=>{var m;s||(s=!0,(m=i.onSuccess)==null||m.call(i,v),r==null||r(),n.resolve(v))},d=v=>{var m;s||(s=!0,(m=i.onError)==null||m.call(i,v),r==null||r(),n.reject(v))},f=()=>new Promise(v=>{var m;r=g=>{(s||u())&&v(g)},(m=i.onPause)==null||m.call(i)}).then(()=>{var v;r=void 0,s||(v=i.onContinue)==null||v.call(i)}),y=()=>{if(s)return;let v;const m=t===0?i.initialPromise:void 0;try{v=m??i.fn()}catch(g){v=Promise.reject(g)}Promise.resolve(v).then(c).catch(g=>{var _;if(s)return;const b=i.retry??(Wc?0:3),x=i.retryDelay??Rhe,P=typeof x=="function"?x(t,g):x,L=b===!0||typeof b=="number"&&t<b||typeof b=="function"&&b(t,g);if(e||!L){d(g);return}t++,(_=i.onFail)==null||_.call(i,t,g),xhe(P).then(()=>u()?void 0:f()).then(()=>{e?d(g):y()})})};return{promise:n,cancel:a,continue:()=>(r==null||r(),n),cancelRetry:o,continueRetry:l,canStart:h,start:()=>(h()?y():f().then(y),n)}}function Ahe(){let i=[],e=0,t=o=>{o()},s=o=>{o()},r=o=>setTimeout(o,0);const n=o=>{e?i.push(o):r(()=>{t(o)})},a=()=>{const o=i;i=[],o.length&&r(()=>{s(()=>{o.forEach(l=>{t(l)})})})};return{batch:o=>{let l;e++;try{l=o()}finally{e--,e||a()}return l},batchCalls:o=>(...l)=>{n(()=>{o(...l)})},schedule:n,setNotifyFunction:o=>{t=o},setBatchNotifyFunction:o=>{s=o},setScheduler:o=>{r=o}}}var Rs=Ahe(),tE=(q4=class{constructor(){ot(this,Fa)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),yhe(this.gcTime)&&je(this,Fa,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(i){this.gcTime=Math.max(this.gcTime||0,i??(Wc?1/0:5*60*1e3))}clearGcTimeout(){Z(this,Fa)&&(clearTimeout(Z(this,Fa)),je(this,Fa,void 0))}},Fa=new WeakMap,q4),Lhe=(B4=class extends tE{constructor(e){super();ot(this,cr);ot(this,Zo);ot(this,Jo);ot(this,Ui);ot(this,Bs);ot(this,_u);ot(this,qa);je(this,qa,!1),je(this,_u,e.defaultOptions),this.setOptions(e.options),this.observers=[],je(this,Ui,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,je(this,Zo,Dhe(this.options)),this.state=e.state??Z(this,Zo),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=Z(this,Bs))==null?void 0:e.promise}setOptions(e){this.options={...Z(this,_u),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&Z(this,Ui).remove(this)}setData(e,t){const s=Ehe(this.state.data,e,this.options);return as(this,cr,dn).call(this,{data:s,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),s}setState(e,t){as(this,cr,dn).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var s,r;const t=(s=Z(this,Bs))==null?void 0:s.promise;return(r=Z(this,Bs))==null||r.cancel(e),t?t.then(rr).catch(rr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(Z(this,Zo))}isActive(){return this.observers.some(e=>bhe(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Gc||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!Che(this.state.dataUpdatedAt,e)}onFocus(){var t;const e=this.observers.find(s=>s.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(t=Z(this,Bs))==null||t.continue()}onOnline(){var t;const e=this.observers.find(s=>s.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(t=Z(this,Bs))==null||t.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),Z(this,Ui).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(Z(this,Bs)&&(Z(this,qa)?Z(this,Bs).cancel({revert:!0}):Z(this,Bs).cancelRetry()),this.scheduleGc()),Z(this,Ui).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||as(this,cr,dn).call(this,{type:"invalidate"})}fetch(e,t){var l,u,h;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(Z(this,Bs))return Z(this,Bs).continueRetry(),Z(this,Bs).promise}if(e&&this.setOptions(e),!this.options.queryFn){const c=this.observers.find(d=>d.options.queryFn);c&&this.setOptions(c.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const s=new AbortController,r=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(je(this,qa,!0),s.signal)})},n=()=>{const c=Z5(this.options,t),d={queryKey:this.queryKey,meta:this.meta};return r(d),je(this,qa,!1),this.options.persister?this.options.persister(c,d,this):c(d)},a={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:n};r(a),(l=this.options.behavior)==null||l.onFetch(a,this),je(this,Jo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&as(this,cr,dn).call(this,{type:"fetch",meta:(h=a.fetchOptions)==null?void 0:h.meta});const o=c=>{var d,f,y,v;yg(c)&&c.silent||as(this,cr,dn).call(this,{type:"error",error:c}),yg(c)||((f=(d=Z(this,Ui).config).onError)==null||f.call(d,c,this),(v=(y=Z(this,Ui).config).onSettled)==null||v.call(y,this.state.data,c,this)),this.scheduleGc()};return je(this,Bs,eE({initialPromise:t==null?void 0:t.initialPromise,fn:a.fetchFn,abort:s.abort.bind(s),onSuccess:c=>{var d,f,y,v;if(c===void 0){process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),o(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(c)}catch(m){o(m);return}(f=(d=Z(this,Ui).config).onSuccess)==null||f.call(d,c,this),(v=(y=Z(this,Ui).config).onSettled)==null||v.call(y,c,this.state.error,this),this.scheduleGc()},onError:o,onFail:(c,d)=>{as(this,cr,dn).call(this,{type:"failed",failureCount:c,error:d})},onPause:()=>{as(this,cr,dn).call(this,{type:"pause"})},onContinue:()=>{as(this,cr,dn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),Z(this,Bs).start()}},Zo=new WeakMap,Jo=new WeakMap,Ui=new WeakMap,Bs=new WeakMap,_u=new WeakMap,qa=new WeakMap,cr=new WeakSet,dn=function(e){const t=s=>{switch(e.type){case"failed":return{...s,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,..._he(s.data,this.options),fetchMeta:e.meta??null};case"success":return{...s,data:e.data,dataUpdateCount:s.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=e.error;return yg(r)&&r.revert&&Z(this,Jo)?{...Z(this,Jo),fetchStatus:"idle"}:{...s,error:r,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...e.state}}};this.state=t(this.state),Rs.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),Z(this,Ui).notify({query:this,type:"updated",action:e})})},B4);function _he(i,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Y5(e.networkMode)?"fetching":"paused",...i===void 0&&{error:null,status:"pending"}}}function Dhe(i){const e=typeof i.initialData=="function"?i.initialData():i.initialData,t=e!==void 0,s=t?typeof i.initialDataUpdatedAt=="function"?i.initialDataUpdatedAt():i.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:t?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var khe=($4=class extends eu{constructor(e={}){super();ot(this,Mr);this.config=e,je(this,Mr,new Map)}build(e,t,s){const r=t.queryKey,n=t.queryHash??mg(r,t);let a=this.get(n);return a||(a=new Lhe({cache:this,queryKey:r,queryHash:n,options:e.defaultQueryOptions(t),state:s,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){Z(this,Mr).has(e.queryHash)||(Z(this,Mr).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=Z(this,Mr).get(e.queryHash);t&&(e.destroy(),t===e&&Z(this,Mr).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Rs.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return Z(this,Mr).get(e)}getAll(){return[...Z(this,Mr).values()]}find(e){const t={exact:!0,...e};return this.getAll().find(s=>j5(t,s))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(s=>j5(e,s)):t}notify(e){Rs.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Rs.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Rs.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Mr=new WeakMap,$4),Ohe=(H4=class extends tE{constructor(e){super();ot(this,Fr);ot(this,Nr);ot(this,Ks);ot(this,Ba);this.mutationId=e.mutationId,je(this,Ks,e.mutationCache),je(this,Nr,[]),this.state=e.state||sE(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){Z(this,Nr).includes(e)||(Z(this,Nr).push(e),this.clearGcTimeout(),Z(this,Ks).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){je(this,Nr,Z(this,Nr).filter(t=>t!==e)),this.scheduleGc(),Z(this,Ks).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){Z(this,Nr).length||(this.state.status==="pending"?this.scheduleGc():Z(this,Ks).remove(this))}continue(){var e;return((e=Z(this,Ba))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var r,n,a,o,l,u,h,c,d,f,y,v,m,g,b,x,P,L,_,k;je(this,Ba,eE({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(S,A)=>{as(this,Fr,aa).call(this,{type:"failed",failureCount:S,error:A})},onPause:()=>{as(this,Fr,aa).call(this,{type:"pause"})},onContinue:()=>{as(this,Fr,aa).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>Z(this,Ks).canRun(this)}));const t=this.state.status==="pending",s=!Z(this,Ba).canStart();try{if(!t){as(this,Fr,aa).call(this,{type:"pending",variables:e,isPaused:s}),await((n=(r=Z(this,Ks).config).onMutate)==null?void 0:n.call(r,e,this));const A=await((o=(a=this.options).onMutate)==null?void 0:o.call(a,e));A!==this.state.context&&as(this,Fr,aa).call(this,{type:"pending",context:A,variables:e,isPaused:s})}const S=await Z(this,Ba).start();return await((u=(l=Z(this,Ks).config).onSuccess)==null?void 0:u.call(l,S,e,this.state.context,this)),await((c=(h=this.options).onSuccess)==null?void 0:c.call(h,S,e,this.state.context)),await((f=(d=Z(this,Ks).config).onSettled)==null?void 0:f.call(d,S,null,this.state.variables,this.state.context,this)),await((v=(y=this.options).onSettled)==null?void 0:v.call(y,S,null,e,this.state.context)),as(this,Fr,aa).call(this,{type:"success",data:S}),S}catch(S){try{throw await((g=(m=Z(this,Ks).config).onError)==null?void 0:g.call(m,S,e,this.state.context,this)),await((x=(b=this.options).onError)==null?void 0:x.call(b,S,e,this.state.context)),await((L=(P=Z(this,Ks).config).onSettled)==null?void 0:L.call(P,void 0,S,this.state.variables,this.state.context,this)),await((k=(_=this.options).onSettled)==null?void 0:k.call(_,void 0,S,e,this.state.context)),S}finally{as(this,Fr,aa).call(this,{type:"error",error:S})}}finally{Z(this,Ks).runNext(this)}}},Nr=new WeakMap,Ks=new WeakMap,Ba=new WeakMap,Fr=new WeakSet,aa=function(e){const t=s=>{switch(e.type){case"failed":return{...s,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...s,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:e.error,failureCount:s.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Rs.batch(()=>{Z(this,Nr).forEach(s=>{s.onMutationUpdate(e)}),Z(this,Ks).notify({mutation:this,type:"updated",action:e})})},H4);function sE(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Mhe=(Q4=class extends eu{constructor(e={}){super();ot(this,Ti);ot(this,Du);this.config=e,je(this,Ti,new Map),je(this,Du,Date.now())}build(e,t,s){const r=new Ohe({mutationCache:this,mutationId:++np(this,Du)._,options:e.defaultMutationOptions(t),state:s});return this.add(r),r}add(e){const t=Zc(e),s=Z(this,Ti).get(t)??[];s.push(e),Z(this,Ti).set(t,s),this.notify({type:"added",mutation:e})}remove(e){var s;const t=Zc(e);if(Z(this,Ti).has(t)){const r=(s=Z(this,Ti).get(t))==null?void 0:s.filter(n=>n!==e);r&&(r.length===0?Z(this,Ti).delete(t):Z(this,Ti).set(t,r))}this.notify({type:"removed",mutation:e})}canRun(e){var s;const t=(s=Z(this,Ti).get(Zc(e)))==null?void 0:s.find(r=>r.state.status==="pending");return!t||t===e}runNext(e){var s;const t=(s=Z(this,Ti).get(Zc(e)))==null?void 0:s.find(r=>r!==e&&r.state.isPaused);return(t==null?void 0:t.continue())??Promise.resolve()}clear(){Rs.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...Z(this,Ti).values()].flat()}find(e){const t={exact:!0,...e};return this.getAll().find(s=>W5(t,s))}findAll(e={}){return this.getAll().filter(t=>W5(e,t))}notify(e){Rs.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Rs.batch(()=>Promise.all(e.map(t=>t.continue().catch(rr))))}},Ti=new WeakMap,Du=new WeakMap,Q4);function Zc(i){var e;return((e=i.options.scope)==null?void 0:e.id)??String(i.mutationId)}function iE(i){return{onFetch:(e,t)=>{var h,c,d,f,y;const s=e.options,r=(d=(c=(h=e.fetchOptions)==null?void 0:h.meta)==null?void 0:c.fetchMore)==null?void 0:d.direction,n=((f=e.state.data)==null?void 0:f.pages)||[],a=((y=e.state.data)==null?void 0:y.pageParams)||[];let o={pages:[],pageParams:[]},l=0;const u=async()=>{let v=!1;const m=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(e.signal.aborted?v=!0:e.signal.addEventListener("abort",()=>{v=!0}),e.signal)})},g=Z5(e.options,e.fetchOptions),b=async(x,P,L)=>{if(v)return Promise.reject();if(P==null&&x.pages.length)return Promise.resolve(x);const _={queryKey:e.queryKey,pageParam:P,direction:L?"backward":"forward",meta:e.options.meta};m(_);const k=await g(_),{maxPages:S}=e.options,A=L?She:Vhe;return{pages:A(x.pages,k,S),pageParams:A(x.pageParams,P,S)}};if(r&&n.length){const x=r==="backward",P=x?Nhe:rE,L={pages:n,pageParams:a},_=P(s,L);o=await b(L,_,x)}else{const x=i??n.length;do{const P=l===0?a[0]??s.initialPageParam:rE(s,o);if(l>0&&P==null)break;o=await b(o,P),l++}while(l<x)}return o};e.options.persister?e.fetchFn=()=>{var v,m;return(m=(v=e.options).persister)==null?void 0:m.call(v,u,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},t)}:e.fetchFn=u}}}function rE(i,{pages:e,pageParams:t}){const s=e.length-1;return e.length>0?i.getNextPageParam(e[s],e,t[s],t):void 0}function Nhe(i,{pages:e,pageParams:t}){var s;return e.length>0?(s=i.getPreviousPageParam)==null?void 0:s.call(i,e[0],e,t[0],t):void 0}var Fhe=(U4=class{constructor(i={}){ot(this,Yt);ot(this,Xn);ot(this,ea);ot(this,Yo);ot(this,Xo);ot(this,ta);ot(this,el);ot(this,tl);je(this,Yt,i.queryCache||new khe),je(this,Xn,i.mutationCache||new Mhe),je(this,ea,i.defaultOptions||{}),je(this,Yo,new Map),je(this,Xo,new Map),je(this,ta,0)}mount(){np(this,ta)._++,Z(this,ta)===1&&(je(this,el,J5.subscribe(async i=>{i&&(await this.resumePausedMutations(),Z(this,Yt).onFocus())})),je(this,tl,Kc.subscribe(async i=>{i&&(await this.resumePausedMutations(),Z(this,Yt).onOnline())})))}unmount(){var i,e;np(this,ta)._--,Z(this,ta)===0&&((i=Z(this,el))==null||i.call(this),je(this,el,void 0),(e=Z(this,tl))==null||e.call(this),je(this,tl,void 0))}isFetching(i){return Z(this,Yt).findAll({...i,fetchStatus:"fetching"}).length}isMutating(i){return Z(this,Xn).findAll({...i,status:"pending"}).length}getQueryData(i){var t;const e=this.defaultQueryOptions({queryKey:i});return(t=Z(this,Yt).get(e.queryHash))==null?void 0:t.state.data}ensureQueryData(i){const e=this.getQueryData(i.queryKey);if(e===void 0)return this.fetchQuery(i);{const t=this.defaultQueryOptions(i),s=Z(this,Yt).build(this,t);return i.revalidateIfStale&&s.isStaleByTime(z5(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(e)}}getQueriesData(i){return Z(this,Yt).findAll(i).map(({queryKey:e,state:t})=>{const s=t.data;return[e,s]})}setQueryData(i,e,t){const s=this.defaultQueryOptions({queryKey:i}),r=Z(this,Yt).get(s.queryHash),n=r==null?void 0:r.state.data,a=vhe(e,n);if(a!==void 0)return Z(this,Yt).build(this,s).setData(a,{...t,manual:!0})}setQueriesData(i,e,t){return Rs.batch(()=>Z(this,Yt).findAll(i).map(({queryKey:s})=>[s,this.setQueryData(s,e,t)]))}getQueryState(i){var t;const e=this.defaultQueryOptions({queryKey:i});return(t=Z(this,Yt).get(e.queryHash))==null?void 0:t.state}removeQueries(i){const e=Z(this,Yt);Rs.batch(()=>{e.findAll(i).forEach(t=>{e.remove(t)})})}resetQueries(i,e){const t=Z(this,Yt),s={type:"active",...i};return Rs.batch(()=>(t.findAll(i).forEach(r=>{r.reset()}),this.refetchQueries(s,e)))}cancelQueries(i={},e={}){const t={revert:!0,...e},s=Rs.batch(()=>Z(this,Yt).findAll(i).map(r=>r.cancel(t)));return Promise.all(s).then(rr).catch(rr)}invalidateQueries(i={},e={}){return Rs.batch(()=>{if(Z(this,Yt).findAll(i).forEach(s=>{s.invalidate()}),i.refetchType==="none")return Promise.resolve();const t={...i,type:i.refetchType??i.type??"active"};return this.refetchQueries(t,e)})}refetchQueries(i={},e){const t={...e,cancelRefetch:(e==null?void 0:e.cancelRefetch)??!0},s=Rs.batch(()=>Z(this,Yt).findAll(i).filter(r=>!r.isDisabled()).map(r=>{let n=r.fetch(void 0,t);return t.throwOnError||(n=n.catch(rr)),r.state.fetchStatus==="paused"?Promise.resolve():n}));return Promise.all(s).then(rr)}fetchQuery(i){const e=this.defaultQueryOptions(i);e.retry===void 0&&(e.retry=!1);const t=Z(this,Yt).build(this,e);return t.isStaleByTime(z5(e.staleTime,t))?t.fetch(e):Promise.resolve(t.state.data)}prefetchQuery(i){return this.fetchQuery(i).then(rr).catch(rr)}fetchInfiniteQuery(i){return i.behavior=iE(i.pages),this.fetchQuery(i)}prefetchInfiniteQuery(i){return this.fetchInfiniteQuery(i).then(rr).catch(rr)}ensureInfiniteQueryData(i){return i.behavior=iE(i.pages),this.ensureQueryData(i)}resumePausedMutations(){return Kc.isOnline()?Z(this,Xn).resumePausedMutations():Promise.resolve()}getQueryCache(){return Z(this,Yt)}getMutationCache(){return Z(this,Xn)}getDefaultOptions(){return Z(this,ea)}setDefaultOptions(i){je(this,ea,i)}setQueryDefaults(i,e){Z(this,Yo).set(Ea(i),{queryKey:i,defaultOptions:e})}getQueryDefaults(i){const e=[...Z(this,Yo).values()];let t={};return e.forEach(s=>{tu(i,s.queryKey)&&(t={...t,...s.defaultOptions})}),t}setMutationDefaults(i,e){Z(this,Xo).set(Ea(i),{mutationKey:i,defaultOptions:e})}getMutationDefaults(i){const e=[...Z(this,Xo).values()];let t={};return e.forEach(s=>{tu(i,s.mutationKey)&&(t={...t,...s.defaultOptions})}),t}defaultQueryOptions(i){if(i._defaulted)return i;const e={...Z(this,ea).queries,...this.getQueryDefaults(i.queryKey),...i,_defaulted:!0};return e.queryHash||(e.queryHash=mg(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.enabled!==!0&&e.queryFn===Gc&&(e.enabled=!1),e}defaultMutationOptions(i){return i!=null&&i._defaulted?i:{...Z(this,ea).mutations,...(i==null?void 0:i.mutationKey)&&this.getMutationDefaults(i.mutationKey),...i,_defaulted:!0}}clear(){Z(this,Yt).clear(),Z(this,Xn).clear()}},Yt=new WeakMap,Xn=new WeakMap,ea=new WeakMap,Yo=new WeakMap,Xo=new WeakMap,ta=new WeakMap,el=new WeakMap,tl=new WeakMap,U4),qhe=(z4=class extends eu{constructor(e,t){super();ot(this,ln);ot(this,sa);ot(this,ia);ot(this,pi);ot(this,on);je(this,sa,e),this.setOptions(t),this.bindMethods(),as(this,ln,ap).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var s;const t=this.options;this.options=Z(this,sa).defaultMutationOptions(e),whe(this.options,t)||Z(this,sa).getMutationCache().notify({type:"observerOptionsUpdated",mutation:Z(this,pi),observer:this}),t!=null&&t.mutationKey&&this.options.mutationKey&&Ea(t.mutationKey)!==Ea(this.options.mutationKey)?this.reset():((s=Z(this,pi))==null?void 0:s.state.status)==="pending"&&Z(this,pi).setOptions(this.options)}onUnsubscribe(){var e;this.hasListeners()||(e=Z(this,pi))==null||e.removeObserver(this)}onMutationUpdate(e){as(this,ln,ap).call(this),as(this,ln,L0).call(this,e)}getCurrentResult(){return Z(this,ia)}reset(){var e;(e=Z(this,pi))==null||e.removeObserver(this),je(this,pi,void 0),as(this,ln,ap).call(this),as(this,ln,L0).call(this)}mutate(e,t){var s;return je(this,on,t),(s=Z(this,pi))==null||s.removeObserver(this),je(this,pi,Z(this,sa).getMutationCache().build(Z(this,sa),this.options)),Z(this,pi).addObserver(this),Z(this,pi).execute(e)}},sa=new WeakMap,ia=new WeakMap,pi=new WeakMap,on=new WeakMap,ln=new WeakSet,ap=function(){var t;const e=((t=Z(this,pi))==null?void 0:t.state)??sE();je(this,ia,{...e,isPending:e.status==="pending",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset})},L0=function(e){Rs.batch(()=>{var t,s,r,n,a,o,l,u;if(Z(this,on)&&this.hasListeners()){const h=Z(this,ia).variables,c=Z(this,ia).context;(e==null?void 0:e.type)==="success"?((s=(t=Z(this,on)).onSuccess)==null||s.call(t,e.data,h,c),(n=(r=Z(this,on)).onSettled)==null||n.call(r,e.data,null,h,c)):(e==null?void 0:e.type)==="error"&&((o=(a=Z(this,on)).onError)==null||o.call(a,e.error,h,c),(u=(l=Z(this,on)).onSettled)==null||u.call(l,void 0,e.error,h,c))}this.listeners.forEach(h=>{h(Z(this,ia))})})},z4),nE=p.createContext(void 0),Bhe=i=>{const e=p.useContext(nE);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},$he=({client:i,children:e})=>(p.useEffect(()=>(i.mount(),()=>{i.unmount()}),[i]),R.jsx(nE.Provider,{value:i,children:e}));function Hhe(i,e){return typeof i=="function"?i(...e):!!i}function Qhe(){}function Uhe(i,e){const t=Bhe(),[s]=p.useState(()=>new qhe(t,i));p.useEffect(()=>{s.setOptions(i)},[s,i]);const r=p.useSyncExternalStore(p.useCallback(a=>s.subscribe(Rs.batchCalls(a)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),n=p.useCallback((a,o)=>{s.mutate(a,o).catch(Qhe)},[s]);if(r.error&&Hhe(s.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:n,mutateAsync:r.mutate}}const As=[];for(let i=0;i<256;++i)As.push((i+256).toString(16).slice(1));function zhe(i,e=0){return(As[i[e+0]]+As[i[e+1]]+As[i[e+2]]+As[i[e+3]]+"-"+As[i[e+4]]+As[i[e+5]]+"-"+As[i[e+6]]+As[i[e+7]]+"-"+As[i[e+8]]+As[i[e+9]]+"-"+As[i[e+10]]+As[i[e+11]]+As[i[e+12]]+As[i[e+13]]+As[i[e+14]]+As[i[e+15]]).toLowerCase()}let Cg;const jhe=new Uint8Array(16);function Whe(){if(!Cg){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Cg=crypto.getRandomValues.bind(crypto)}return Cg(jhe)}const aE={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Ghe(i,e,t){if(aE.randomUUID&&!i)return aE.randomUUID();i=i||{};const s=i.random||(i.rng||Whe)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,zhe(s)}const oE="/backend";async function Khe(i,e){return e instanceof FormData?await fetch(`${oE}${i}`,{method:"POST",body:e}):fetch(`${oE}${i}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}const su=15,bg=30,wg=19,Zhe=29,Jc=256,xg=Jc+1+Zhe,lE=2*xg+1,iu=256,Jhe=7,uE=16,hE=17,cE=18,Eg=8*2,Yc=-1,Yhe=1,Xc=2,Xhe=0,Lo=0,dE=1,ece=3,oi=4,nr=0,pE=1,ed=2,ar=-2,tce=-3,_o=-5;function td(i){return sd(i.map(([e,t])=>new Array(e).fill(t,0,e)))}function sd(i){return i.reduce((e,t)=>e.concat(Array.isArray(t)?sd(t):t),[])}const fE=[0,1,2,3].concat(...td([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Mt(){const i=this;function e(r){const n=i.dyn_tree,a=i.stat_desc.static_tree,o=i.stat_desc.extra_bits,l=i.stat_desc.extra_base,u=i.stat_desc.max_length;let h,c,d,f,y,v,m=0;for(f=0;f<=su;f++)r.bl_count[f]=0;for(n[r.heap[r.heap_max]*2+1]=0,h=r.heap_max+1;h<lE;h++)c=r.heap[h],f=n[n[c*2+1]*2+1]+1,f>u&&(f=u,m++),n[c*2+1]=f,!(c>i.max_code)&&(r.bl_count[f]++,y=0,c>=l&&(y=o[c-l]),v=n[c*2],r.opt_len+=v*(f+y),a&&(r.static_len+=v*(a[c*2+1]+y)));if(m!==0){do{for(f=u-1;r.bl_count[f]===0;)f--;r.bl_count[f]--,r.bl_count[f+1]+=2,r.bl_count[u]--,m-=2}while(m>0);for(f=u;f!==0;f--)for(c=r.bl_count[f];c!==0;)d=r.heap[--h],!(d>i.max_code)&&(n[d*2+1]!=f&&(r.opt_len+=(f-n[d*2+1])*n[d*2],n[d*2+1]=f),c--)}}function t(r,n){let a=0;do a|=r&1,r>>>=1,a<<=1;while(--n>0);return a>>>1}function s(r,n,a){const o=[];let l=0,u,h,c;for(u=1;u<=su;u++)o[u]=l=l+a[u-1]<<1;for(h=0;h<=n;h++)c=r[h*2+1],c!==0&&(r[h*2]=t(o[c]++,c))}i.build_tree=function(r){const n=i.dyn_tree,a=i.stat_desc.static_tree,o=i.stat_desc.elems;let l,u,h=-1,c;for(r.heap_len=0,r.heap_max=lE,l=0;l<o;l++)n[l*2]!==0?(r.heap[++r.heap_len]=h=l,r.depth[l]=0):n[l*2+1]=0;for(;r.heap_len<2;)c=r.heap[++r.heap_len]=h<2?++h:0,n[c*2]=1,r.depth[c]=0,r.opt_len--,a&&(r.static_len-=a[c*2+1]);for(i.max_code=h,l=Math.floor(r.heap_len/2);l>=1;l--)r.pqdownheap(n,l);c=o;do l=r.heap[1],r.heap[1]=r.heap[r.heap_len--],r.pqdownheap(n,1),u=r.heap[1],r.heap[--r.heap_max]=l,r.heap[--r.heap_max]=u,n[c*2]=n[l*2]+n[u*2],r.depth[c]=Math.max(r.depth[l],r.depth[u])+1,n[l*2+1]=n[u*2+1]=c,r.heap[1]=c++,r.pqdownheap(n,1);while(r.heap_len>=2);r.heap[--r.heap_max]=r.heap[1],e(r),s(n,i.max_code,r.bl_count)}}Mt._length_code=[0,1,2,3,4,5,6,7].concat(...td([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Mt.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Mt.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Mt.d_code=function(i){return i<256?fE[i]:fE[256+(i>>>7)]},Mt.extra_lbits=[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],Mt.extra_dbits=[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],Mt.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Mt.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ls(i,e,t,s,r){const n=this;n.static_tree=i,n.extra_bits=e,n.extra_base=t,n.elems=s,n.max_length=r}const sce=[12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227],ice=td([[144,8],[112,9],[24,7],[8,8]]);Ls.static_ltree=sd(sce.map((i,e)=>[i,ice[e]]));const rce=[0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23],nce=td([[30,5]]);Ls.static_dtree=sd(rce.map((i,e)=>[i,nce[e]])),Ls.static_l_desc=new Ls(Ls.static_ltree,Mt.extra_lbits,Jc+1,xg,su),Ls.static_d_desc=new Ls(Ls.static_dtree,Mt.extra_dbits,0,bg,su),Ls.static_bl_desc=new Ls(null,Mt.extra_blbits,0,wg,Jhe);const ace=9,oce=8;function Pr(i,e,t,s,r){const n=this;n.good_length=i,n.max_lazy=e,n.nice_length=t,n.max_chain=s,n.func=r}const mE=0,id=1,Va=2,or=[new Pr(0,0,0,0,mE),new Pr(4,4,8,4,id),new Pr(4,5,16,8,id),new Pr(4,6,32,32,id),new Pr(4,4,16,16,Va),new Pr(8,16,32,32,Va),new Pr(8,16,128,128,Va),new Pr(8,32,128,256,Va),new Pr(32,128,258,1024,Va),new Pr(32,258,258,4096,Va)],rd=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Bi=0,nd=1,ru=2,ad=3,lce=32,Vg=42,od=113,nu=666,Sg=8,uce=0,Tg=1,hce=2,$t=3,ld=258,Ei=ld+$t+1;function gE(i,e,t,s){const r=i[e*2],n=i[t*2];return r<n||r==n&&s[e]<=s[t]}function cce(){const i=this;let e,t,s,r,n,a,o,l,u,h,c,d,f,y,v,m,g,b,x,P,L,_,k,S,A,N,B,U,D,$,Q,H,W;const K=new Mt,oe=new Mt,ee=new Mt;i.depth=[];let ue,ae,ce,Ae,ve,ie;i.bl_count=[],i.heap=[],Q=[],H=[],W=[];function xe(){u=2*n,c[f-1]=0;for(let J=0;J<f-1;J++)c[J]=0;N=or[B].max_lazy,D=or[B].good_length,$=or[B].nice_length,A=or[B].max_chain,L=0,g=0,k=0,b=S=$t-1,P=0,d=0}function et(){let J;for(J=0;J<xg;J++)Q[J*2]=0;for(J=0;J<bg;J++)H[J*2]=0;for(J=0;J<wg;J++)W[J*2]=0;Q[iu*2]=1,i.opt_len=i.static_len=0,ae=ce=0}function Xt(){K.dyn_tree=Q,K.stat_desc=Ls.static_l_desc,oe.dyn_tree=H,oe.stat_desc=Ls.static_d_desc,ee.dyn_tree=W,ee.stat_desc=Ls.static_bl_desc,ve=0,ie=0,Ae=8,et()}i.pqdownheap=function(J,re){const te=i.heap,le=te[re];let me=re<<1;for(;me<=i.heap_len&&(me<i.heap_len&&gE(J,te[me+1],te[me],i.depth)&&me++,!gE(J,le,te[me],i.depth));)te[re]=te[me],re=me,me<<=1;te[re]=le};function jt(J,re){let te=-1,le,me=J[0*2+1],Le=0,We=7,ns=4;me===0&&(We=138,ns=3),J[(re+1)*2+1]=65535;for(let Ms=0;Ms<=re;Ms++)le=me,me=J[(Ms+1)*2+1],!(++Le<We&&le==me)&&(Le<ns?W[le*2]+=Le:le!==0?(le!=te&&W[le*2]++,W[uE*2]++):Le<=10?W[hE*2]++:W[cE*2]++,Le=0,te=le,me===0?(We=138,ns=3):le==me?(We=6,ns=3):(We=7,ns=4))}function Os(){let J;for(jt(Q,K.max_code),jt(H,oe.max_code),ee.build_tree(i),J=wg-1;J>=3&&W[Mt.bl_order[J]*2+1]===0;J--);return i.opt_len+=3*(J+1)+5+5+4,J}function Et(J){i.pending_buf[i.pending++]=J}function fs(J){Et(J&255),Et(J>>>8&255)}function is(J){Et(J>>8&255),Et(J&255&255)}function _e(J,re){let te;const le=re;ie>Eg-le?(te=J,ve|=te<<ie&65535,fs(ve),ve=te>>>Eg-ie,ie+=le-Eg):(ve|=J<<ie&65535,ie+=le)}function tt(J,re){const te=J*2;_e(re[te]&65535,re[te+1]&65535)}function Bt(J,re){let te,le=-1,me,Le=J[0*2+1],We=0,ns=7,Ms=4;for(Le===0&&(ns=138,Ms=3),te=0;te<=re;te++)if(me=Le,Le=J[(te+1)*2+1],!(++We<ns&&me==Le)){if(We<Ms)do tt(me,W);while(--We!==0);else me!==0?(me!=le&&(tt(me,W),We--),tt(uE,W),_e(We-3,2)):We<=10?(tt(hE,W),_e(We-3,3)):(tt(cE,W),_e(We-11,7));We=0,le=me,Le===0?(ns=138,Ms=3):me==Le?(ns=6,Ms=3):(ns=7,Ms=4)}}function Ht(J,re,te){let le;for(_e(J-257,5),_e(re-1,5),_e(te-4,4),le=0;le<te;le++)_e(W[Mt.bl_order[le]*2+1],3);Bt(Q,J-1),Bt(H,re-1)}function gt(){ie==16?(fs(ve),ve=0,ie=0):ie>=8&&(Et(ve&255),ve>>>=8,ie-=8)}function Oe(){_e(Tg<<1,3),tt(iu,Ls.static_ltree),gt(),1+Ae+10-ie<9&&(_e(Tg<<1,3),tt(iu,Ls.static_ltree),gt()),Ae=7}function Ke(J,re){let te,le,me;if(i.dist_buf[ae]=J,i.lc_buf[ae]=re&255,ae++,J===0?Q[re*2]++:(ce++,J--,Q[(Mt._length_code[re]+Jc+1)*2]++,H[Mt.d_code(J)*2]++),!(ae&8191)&&B>2){for(te=ae*8,le=L-g,me=0;me<bg;me++)te+=H[me*2]*(5+Mt.extra_dbits[me]);if(te>>>=3,ce<Math.floor(ae/2)&&te<Math.floor(le/2))return!0}return ae==ue-1}function Pe(J,re){let te,le,me=0,Le,We;if(ae!==0)do te=i.dist_buf[me],le=i.lc_buf[me],me++,te===0?tt(le,J):(Le=Mt._length_code[le],tt(Le+Jc+1,J),We=Mt.extra_lbits[Le],We!==0&&(le-=Mt.base_length[Le],_e(le,We)),te--,Le=Mt.d_code(te),tt(Le,re),We=Mt.extra_dbits[Le],We!==0&&(te-=Mt.base_dist[Le],_e(te,We)));while(me<ae);tt(iu,J),Ae=J[iu*2+1]}function rs(){ie>8?fs(ve):ie>0&&Et(ve&255),ve=0,ie=0}function Cs(J,re,te){rs(),Ae=8,fs(re),fs(~re),i.pending_buf.set(l.subarray(J,J+re),i.pending),i.pending+=re}function bs(J,re,te){_e((uce<<1)+(te?1:0),3),Cs(J,re)}function un(J,re,te){let le,me,Le=0;B>0?(K.build_tree(i),oe.build_tree(i),Le=Os(),le=i.opt_len+3+7>>>3,me=i.static_len+3+7>>>3,me<=le&&(le=me)):le=me=re+5,re+4<=le&&J!=-1?bs(J,re,te):me==le?(_e((Tg<<1)+(te?1:0),3),Pe(Ls.static_ltree,Ls.static_dtree)):(_e((hce<<1)+(te?1:0),3),Ht(K.max_code+1,oe.max_code+1,Le+1),Pe(Q,H)),et(),te&&rs()}function Zs(J){un(g>=0?g:-1,L-g,J),g=L,e.flush_pending()}function Js(){let J,re,te,le;do{if(le=u-k-L,le===0&&L===0&&k===0)le=n;else if(le==-1)le--;else if(L>=n+n-Ei){l.set(l.subarray(n,n+n),0),_-=n,L-=n,g-=n,J=f,te=J;do re=c[--te]&65535,c[te]=re>=n?re-n:0;while(--J!==0);J=n,te=J;do re=h[--te]&65535,h[te]=re>=n?re-n:0;while(--J!==0);le+=n}if(e.avail_in===0)return;J=e.read_buf(l,L+k,le),k+=J,k>=$t&&(d=l[L]&255,d=(d<<m^l[L+1]&255)&v)}while(k<Ei&&e.avail_in!==0)}function zi(J){let re=65535,te;for(re>s-5&&(re=s-5);;){if(k<=1){if(Js(),k===0&&J==Lo)return Bi;if(k===0)break}if(L+=k,k=0,te=g+re,(L===0||L>=te)&&(k=L-te,L=te,Zs(!1),e.avail_out===0)||L-g>=n-Ei&&(Zs(!1),e.avail_out===0))return Bi}return Zs(J==oi),e.avail_out===0?J==oi?ru:Bi:J==oi?ad:nd}function Ys(J){let re=A,te=L,le,me,Le=S;const We=L>n-Ei?L-(n-Ei):0;let ns=$;const Ms=o,hn=L+ld;let sl=l[te+Le-1],Ha=l[te+Le];S>=D&&(re>>=2),ns>k&&(ns=k);do if(le=J,!(l[le+Le]!=Ha||l[le+Le-1]!=sl||l[le]!=l[te]||l[++le]!=l[te+1])){te+=2,le++;do;while(l[++te]==l[++le]&&l[++te]==l[++le]&&l[++te]==l[++le]&&l[++te]==l[++le]&&l[++te]==l[++le]&&l[++te]==l[++le]&&l[++te]==l[++le]&&l[++te]==l[++le]&&te<hn);if(me=ld-(hn-te),te=hn-ld,me>Le){if(_=J,Le=me,me>=ns)break;sl=l[te+Le-1],Ha=l[te+Le]}}while((J=h[J&Ms]&65535)>We&&--re!==0);return Le<=k?Le:k}function ji(J){let re=0,te;for(;;){if(k<Ei){if(Js(),k<Ei&&J==Lo)return Bi;if(k===0)break}if(k>=$t&&(d=(d<<m^l[L+($t-1)]&255)&v,re=c[d]&65535,h[L&o]=c[d],c[d]=L),re!==0&&(L-re&65535)<=n-Ei&&U!=Xc&&(b=Ys(re)),b>=$t)if(te=Ke(L-_,b-$t),k-=b,b<=N&&k>=$t){b--;do L++,d=(d<<m^l[L+($t-1)]&255)&v,re=c[d]&65535,h[L&o]=c[d],c[d]=L;while(--b!==0);L++}else L+=b,b=0,d=l[L]&255,d=(d<<m^l[L+1]&255)&v;else te=Ke(0,l[L]&255),k--,L++;if(te&&(Zs(!1),e.avail_out===0))return Bi}return Zs(J==oi),e.avail_out===0?J==oi?ru:Bi:J==oi?ad:nd}function $a(J){let re=0,te,le;for(;;){if(k<Ei){if(Js(),k<Ei&&J==Lo)return Bi;if(k===0)break}if(k>=$t&&(d=(d<<m^l[L+($t-1)]&255)&v,re=c[d]&65535,h[L&o]=c[d],c[d]=L),S=b,x=_,b=$t-1,re!==0&&S<N&&(L-re&65535)<=n-Ei&&(U!=Xc&&(b=Ys(re)),b<=5&&(U==Yhe||b==$t&&L-_>4096)&&(b=$t-1)),S>=$t&&b<=S){le=L+k-$t,te=Ke(L-1-x,S-$t),k-=S-1,S-=2;do++L<=le&&(d=(d<<m^l[L+($t-1)]&255)&v,re=c[d]&65535,h[L&o]=c[d],c[d]=L);while(--S!==0);if(P=0,b=$t-1,L++,te&&(Zs(!1),e.avail_out===0))return Bi}else if(P!==0){if(te=Ke(0,l[L-1]&255),te&&Zs(!1),L++,k--,e.avail_out===0)return Bi}else P=1,L++,k--}return P!==0&&(te=Ke(0,l[L-1]&255),P=0),Zs(J==oi),e.avail_out===0?J==oi?ru:Bi:J==oi?ad:nd}function ra(J){return J.total_in=J.total_out=0,J.msg=null,i.pending=0,i.pending_out=0,t=od,r=Lo,Xt(),xe(),nr}i.deflateInit=function(J,re,te,le,me,Le){return le||(le=Sg),me||(me=oce),Le||(Le=Xhe),J.msg=null,re==Yc&&(re=6),me<1||me>ace||le!=Sg||te<9||te>15||re<0||re>9||Le<0||Le>Xc?ar:(J.dstate=i,a=te,n=1<<a,o=n-1,y=me+7,f=1<<y,v=f-1,m=Math.floor((y+$t-1)/$t),l=new Uint8Array(n*2),h=[],c=[],ue=1<<me+6,i.pending_buf=new Uint8Array(ue*4),s=ue*4,i.dist_buf=new Uint16Array(ue),i.lc_buf=new Uint8Array(ue),B=re,U=Le,ra(J))},i.deflateEnd=function(){return t!=Vg&&t!=od&&t!=nu?ar:(i.lc_buf=null,i.dist_buf=null,i.pending_buf=null,c=null,h=null,l=null,i.dstate=null,t==od?tce:nr)},i.deflateParams=function(J,re,te){let le=nr;return re==Yc&&(re=6),re<0||re>9||te<0||te>Xc?ar:(or[B].func!=or[re].func&&J.total_in!==0&&(le=J.deflate(dE)),B!=re&&(B=re,N=or[B].max_lazy,D=or[B].good_length,$=or[B].nice_length,A=or[B].max_chain),U=te,le)},i.deflateSetDictionary=function(J,re,te){let le=te,me,Le=0;if(!re||t!=Vg)return ar;if(le<$t)return nr;for(le>n-Ei&&(le=n-Ei,Le=te-le),l.set(re.subarray(Le,Le+le),0),L=le,g=le,d=l[0]&255,d=(d<<m^l[1]&255)&v,me=0;me<=le-$t;me++)d=(d<<m^l[me+($t-1)]&255)&v,h[me&o]=c[d],c[d]=me;return nr},i.deflate=function(J,re){let te,le,me,Le,We;if(re>oi||re<0)return ar;if(!J.next_out||!J.next_in&&J.avail_in!==0||t==nu&&re!=oi)return J.msg=rd[ed-ar],ar;if(J.avail_out===0)return J.msg=rd[ed-_o],_o;if(e=J,Le=r,r=re,t==Vg&&(le=Sg+(a-8<<4)<<8,me=(B-1&255)>>1,me>3&&(me=3),le|=me<<6,L!==0&&(le|=lce),le+=31-le%31,t=od,is(le)),i.pending!==0){if(e.flush_pending(),e.avail_out===0)return r=-1,nr}else if(e.avail_in===0&&re<=Le&&re!=oi)return e.msg=rd[ed-_o],_o;if(t==nu&&e.avail_in!==0)return J.msg=rd[ed-_o],_o;if(e.avail_in!==0||k!==0||re!=Lo&&t!=nu){switch(We=-1,or[B].func){case mE:We=zi(re);break;case id:We=ji(re);break;case Va:We=$a(re);break}if((We==ru||We==ad)&&(t=nu),We==Bi||We==ru)return e.avail_out===0&&(r=-1),nr;if(We==nd){if(re==dE)Oe();else if(bs(0,0,!1),re==ece)for(te=0;te<f;te++)c[te]=0;if(e.flush_pending(),e.avail_out===0)return r=-1,nr}}return re!=oi?nr:pE}}function vE(){const i=this;i.next_in_index=0,i.next_out_index=0,i.avail_in=0,i.total_in=0,i.avail_out=0,i.total_out=0}vE.prototype={deflateInit(i,e){const t=this;return t.dstate=new cce,e||(e=su),t.dstate.deflateInit(t,i,e)},deflate(i){const e=this;return e.dstate?e.dstate.deflate(e,i):ar},deflateEnd(){const i=this;if(!i.dstate)return ar;const e=i.dstate.deflateEnd();return i.dstate=null,e},deflateParams(i,e){const t=this;return t.dstate?t.dstate.deflateParams(t,i,e):ar},deflateSetDictionary(i,e){const t=this;return t.dstate?t.dstate.deflateSetDictionary(t,i,e):ar},read_buf(i,e,t){const s=this;let r=s.avail_in;return r>t&&(r=t),r===0?0:(s.avail_in-=r,i.set(s.next_in.subarray(s.next_in_index,s.next_in_index+r),e),s.next_in_index+=r,s.total_in+=r,r)},flush_pending(){const i=this;let e=i.dstate.pending;e>i.avail_out&&(e=i.avail_out),e!==0&&(i.next_out.set(i.dstate.pending_buf.subarray(i.dstate.pending_out,i.dstate.pending_out+e),i.next_out_index),i.next_out_index+=e,i.dstate.pending_out+=e,i.total_out+=e,i.avail_out-=e,i.dstate.pending-=e,i.dstate.pending===0&&(i.dstate.pending_out=0))}};function dce(i){const e=this,t=new vE,s=pce(i&&i.chunkSize?i.chunkSize:64*1024),r=Lo,n=new Uint8Array(s);let a=i?i.level:Yc;typeof a>"u"&&(a=Yc),t.deflateInit(a),t.next_out=n,e.append=function(o,l){let u,h,c=0,d=0,f=0;const y=[];if(o.length){t.next_in_index=0,t.next_in=o,t.avail_in=o.length;do{if(t.next_out_index=0,t.avail_out=s,u=t.deflate(r),u!=nr)throw new Error("deflating: "+t.msg);t.next_out_index&&(t.next_out_index==s?y.push(new Uint8Array(n)):y.push(n.subarray(0,t.next_out_index))),f+=t.next_out_index,l&&t.next_in_index>0&&t.next_in_index!=c&&(l(t.next_in_index),c=t.next_in_index)}while(t.avail_in>0||t.avail_out===0);return y.length>1?(h=new Uint8Array(f),y.forEach(function(v){h.set(v,d),d+=v.length})):h=y[0]?new Uint8Array(y[0]):new Uint8Array,h}},e.flush=function(){let o,l,u=0,h=0;const c=[];do{if(t.next_out_index=0,t.avail_out=s,o=t.deflate(oi),o!=pE&&o!=nr)throw new Error("deflating: "+t.msg);s-t.avail_out>0&&c.push(n.slice(0,t.next_out_index)),h+=t.next_out_index}while(t.avail_in>0||t.avail_out===0);return t.deflateEnd(),l=new Uint8Array(h),c.forEach(function(d){l.set(d,u),u+=d.length}),l}}function pce(i){return i+5*(Math.floor(i/16383)+1)}const fce=15,ft=0,sn=1,mce=2,li=-2,Nt=-3,yE=-4,rn=-5,Vi=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],CE=1440,gce=0,vce=4,yce=9,Cce=5,bce=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],wce=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],xce=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Ece=[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,112,112],Vce=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],Sce=[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],Fn=15;function Pg(){const i=this;let e,t,s,r,n,a;function o(u,h,c,d,f,y,v,m,g,b,x){let P,L,_,k,S,A,N,B,U,D,$,Q,H,W,K;D=0,S=c;do s[u[h+D]]++,D++,S--;while(S!==0);if(s[0]==c)return v[0]=-1,m[0]=0,ft;for(B=m[0],A=1;A<=Fn&&s[A]===0;A++);for(N=A,B<A&&(B=A),S=Fn;S!==0&&s[S]===0;S--);for(_=S,B>S&&(B=S),m[0]=B,W=1<<A;A<S;A++,W<<=1)if((W-=s[A])<0)return Nt;if((W-=s[S])<0)return Nt;for(s[S]+=W,a[1]=A=0,D=1,H=2;--S!==0;)a[H]=A+=s[D],H++,D++;S=0,D=0;do(A=u[h+D])!==0&&(x[a[A]++]=S),D++;while(++S<c);for(c=a[_],a[0]=S=0,D=0,k=-1,Q=-B,n[0]=0,$=0,K=0;N<=_;N++)for(P=s[N];P--!==0;){for(;N>Q+B;){if(k++,Q+=B,K=_-Q,K=K>B?B:K,(L=1<<(A=N-Q))>P+1&&(L-=P+1,H=N,A<K))for(;++A<K&&!((L<<=1)<=s[++H]);)L-=s[H];if(K=1<<A,b[0]+K>CE)return Nt;n[k]=$=b[0],b[0]+=K,k!==0?(a[k]=S,r[0]=A,r[1]=B,A=S>>>Q-B,r[2]=$-n[k-1]-A,g.set(r,(n[k-1]+A)*3)):v[0]=$}for(r[1]=N-Q,D>=c?r[0]=192:x[D]<d?(r[0]=x[D]<256?0:96,r[2]=x[D++]):(r[0]=y[x[D]-d]+16+64,r[2]=f[x[D++]-d]),L=1<<N-Q,A=S>>>Q;A<K;A+=L)g.set(r,($+A)*3);for(A=1<<N-1;S&A;A>>>=1)S^=A;for(S^=A,U=(1<<Q)-1;(S&U)!=a[k];)k--,Q-=B,U=(1<<Q)-1}return W!==0&&_!=1?rn:ft}function l(u){let h;for(e||(e=[],t=[],s=new Int32Array(Fn+1),r=[],n=new Int32Array(Fn),a=new Int32Array(Fn+1)),t.length<u&&(t=[]),h=0;h<u;h++)t[h]=0;for(h=0;h<Fn+1;h++)s[h]=0;for(h=0;h<3;h++)r[h]=0;n.set(s.subarray(0,Fn),0),a.set(s.subarray(0,Fn+1),0)}i.inflate_trees_bits=function(u,h,c,d,f){let y;return l(19),e[0]=0,y=o(u,0,19,19,null,null,c,h,d,e,t),y==Nt?f.msg="oversubscribed dynamic bit lengths tree":(y==rn||h[0]===0)&&(f.msg="incomplete dynamic bit lengths tree",y=Nt),y},i.inflate_trees_dynamic=function(u,h,c,d,f,y,v,m,g){let b;return l(288),e[0]=0,b=o(c,0,u,257,xce,Ece,y,d,m,e,t),b!=ft||d[0]===0?(b==Nt?g.msg="oversubscribed literal/length tree":b!=yE&&(g.msg="incomplete literal/length tree",b=Nt),b):(l(288),b=o(c,u,h,0,Vce,Sce,v,f,m,e,t),b!=ft||f[0]===0&&u>257?(b==Nt?g.msg="oversubscribed distance tree":b==rn?(g.msg="incomplete distance tree",b=Nt):b!=yE&&(g.msg="empty distance tree with lengths",b=Nt),b):ft)}}Pg.inflate_trees_fixed=function(i,e,t,s){return i[0]=yce,e[0]=Cce,t[0]=bce,s[0]=wce,ft};const ud=0,bE=1,wE=2,xE=3,EE=4,VE=5,SE=6,Ig=7,TE=8,hd=9;function Tce(){const i=this;let e,t=0,s,r=0,n=0,a=0,o=0,l=0,u=0,h=0,c,d=0,f,y=0;function v(m,g,b,x,P,L,_,k){let S,A,N,B,U,D,$,Q,H,W,K,oe,ee,ue,ae,ce;$=k.next_in_index,Q=k.avail_in,U=_.bitb,D=_.bitk,H=_.write,W=H<_.read?_.read-H-1:_.end-H,K=Vi[m],oe=Vi[g];do{for(;D<20;)Q--,U|=(k.read_byte($++)&255)<<D,D+=8;if(S=U&K,A=b,N=x,ce=(N+S)*3,(B=A[ce])===0){U>>=A[ce+1],D-=A[ce+1],_.win[H++]=A[ce+2],W--;continue}do{if(U>>=A[ce+1],D-=A[ce+1],B&16){for(B&=15,ee=A[ce+2]+(U&Vi[B]),U>>=B,D-=B;D<15;)Q--,U|=(k.read_byte($++)&255)<<D,D+=8;S=U&oe,A=P,N=L,ce=(N+S)*3,B=A[ce];do if(U>>=A[ce+1],D-=A[ce+1],B&16){for(B&=15;D<B;)Q--,U|=(k.read_byte($++)&255)<<D,D+=8;if(ue=A[ce+2]+(U&Vi[B]),U>>=B,D-=B,W-=ee,H>=ue)ae=H-ue,H-ae>0&&2>H-ae?(_.win[H++]=_.win[ae++],_.win[H++]=_.win[ae++],ee-=2):(_.win.set(_.win.subarray(ae,ae+2),H),H+=2,ae+=2,ee-=2);else{ae=H-ue;do ae+=_.end;while(ae<0);if(B=_.end-ae,ee>B){if(ee-=B,H-ae>0&&B>H-ae)do _.win[H++]=_.win[ae++];while(--B!==0);else _.win.set(_.win.subarray(ae,ae+B),H),H+=B,ae+=B,B=0;ae=0}}if(H-ae>0&&ee>H-ae)do _.win[H++]=_.win[ae++];while(--ee!==0);else _.win.set(_.win.subarray(ae,ae+ee),H),H+=ee,ae+=ee,ee=0;break}else if(!(B&64))S+=A[ce+2],S+=U&Vi[B],ce=(N+S)*3,B=A[ce];else return k.msg="invalid distance code",ee=k.avail_in-Q,ee=D>>3<ee?D>>3:ee,Q+=ee,$-=ee,D-=ee<<3,_.bitb=U,_.bitk=D,k.avail_in=Q,k.total_in+=$-k.next_in_index,k.next_in_index=$,_.write=H,Nt;while(!0);break}if(B&64)return B&32?(ee=k.avail_in-Q,ee=D>>3<ee?D>>3:ee,Q+=ee,$-=ee,D-=ee<<3,_.bitb=U,_.bitk=D,k.avail_in=Q,k.total_in+=$-k.next_in_index,k.next_in_index=$,_.write=H,sn):(k.msg="invalid literal/length code",ee=k.avail_in-Q,ee=D>>3<ee?D>>3:ee,Q+=ee,$-=ee,D-=ee<<3,_.bitb=U,_.bitk=D,k.avail_in=Q,k.total_in+=$-k.next_in_index,k.next_in_index=$,_.write=H,Nt);if(S+=A[ce+2],S+=U&Vi[B],ce=(N+S)*3,(B=A[ce])===0){U>>=A[ce+1],D-=A[ce+1],_.win[H++]=A[ce+2],W--;break}}while(!0)}while(W>=258&&Q>=10);return ee=k.avail_in-Q,ee=D>>3<ee?D>>3:ee,Q+=ee,$-=ee,D-=ee<<3,_.bitb=U,_.bitk=D,k.avail_in=Q,k.total_in+=$-k.next_in_index,k.next_in_index=$,_.write=H,ft}i.init=function(m,g,b,x,P,L){e=ud,u=m,h=g,c=b,d=x,f=P,y=L,s=null},i.proc=function(m,g,b){let x,P,L,_=0,k=0,S=0,A,N,B,U;for(S=g.next_in_index,A=g.avail_in,_=m.bitb,k=m.bitk,N=m.write,B=N<m.read?m.read-N-1:m.end-N;;)switch(e){case ud:if(B>=258&&A>=10&&(m.bitb=_,m.bitk=k,g.avail_in=A,g.total_in+=S-g.next_in_index,g.next_in_index=S,m.write=N,b=v(u,h,c,d,f,y,m,g),S=g.next_in_index,A=g.avail_in,_=m.bitb,k=m.bitk,N=m.write,B=N<m.read?m.read-N-1:m.end-N,b!=ft)){e=b==sn?Ig:hd;break}n=u,s=c,r=d,e=bE;case bE:for(x=n;k<x;){if(A!==0)b=ft;else return m.bitb=_,m.bitk=k,g.avail_in=A,g.total_in+=S-g.next_in_index,g.next_in_index=S,m.write=N,m.inflate_flush(g,b);A--,_|=(g.read_byte(S++)&255)<<k,k+=8}if(P=(r+(_&Vi[x]))*3,_>>>=s[P+1],k-=s[P+1],L=s[P],L===0){a=s[P+2],e=SE;break}if(L&16){o=L&15,t=s[P+2],e=wE;break}if(!(L&64)){n=L,r=P/3+s[P+2];break}if(L&32){e=Ig;break}return e=hd,g.msg="invalid literal/length code",b=Nt,m.bitb=_,m.bitk=k,g.avail_in=A,g.total_in+=S-g.next_in_index,g.next_in_index=S,m.write=N,m.inflate_flush(g,b);case wE:for(x=o;k<x;){if(A!==0)b=ft;else return m.bitb=_,m.bitk=k,g.avail_in=A,g.total_in+=S-g.next_in_index,g.next_in_index=S,m.write=N,m.inflate_flush(g,b);A--,_|=(g.read_byte(S++)&255)<<k,k+=8}t+=_&Vi[x],_>>=x,k-=x,n=h,s=f,r=y,e=xE;case xE:for(x=n;k<x;){if(A!==0)b=ft;else return m.bitb=_,m.bitk=k,g.avail_in=A,g.total_in+=S-g.next_in_index,g.next_in_index=S,m.write=N,m.inflate_flush(g,b);A--,_|=(g.read_byte(S++)&255)<<k,k+=8}if(P=(r+(_&Vi[x]))*3,_>>=s[P+1],k-=s[P+1],L=s[P],L&16){o=L&15,l=s[P+2],e=EE;break}if(!(L&64)){n=L,r=P/3+s[P+2];break}return e=hd,g.msg="invalid distance code",b=Nt,m.bitb=_,m.bitk=k,g.avail_in=A,g.total_in+=S-g.next_in_index,g.next_in_index=S,m.write=N,m.inflate_flush(g,b);case EE:for(x=o;k<x;){if(A!==0)b=ft;else return m.bitb=_,m.bitk=k,g.avail_in=A,g.total_in+=S-g.next_in_index,g.next_in_index=S,m.write=N,m.inflate_flush(g,b);A--,_|=(g.read_byte(S++)&255)<<k,k+=8}l+=_&Vi[x],_>>=x,k-=x,e=VE;case VE:for(U=N-l;U<0;)U+=m.end;for(;t!==0;){if(B===0&&(N==m.end&&m.read!==0&&(N=0,B=N<m.read?m.read-N-1:m.end-N),B===0&&(m.write=N,b=m.inflate_flush(g,b),N=m.write,B=N<m.read?m.read-N-1:m.end-N,N==m.end&&m.read!==0&&(N=0,B=N<m.read?m.read-N-1:m.end-N),B===0)))return m.bitb=_,m.bitk=k,g.avail_in=A,g.total_in+=S-g.next_in_index,g.next_in_index=S,m.write=N,m.inflate_flush(g,b);m.win[N++]=m.win[U++],B--,U==m.end&&(U=0),t--}e=ud;break;case SE:if(B===0&&(N==m.end&&m.read!==0&&(N=0,B=N<m.read?m.read-N-1:m.end-N),B===0&&(m.write=N,b=m.inflate_flush(g,b),N=m.write,B=N<m.read?m.read-N-1:m.end-N,N==m.end&&m.read!==0&&(N=0,B=N<m.read?m.read-N-1:m.end-N),B===0)))return m.bitb=_,m.bitk=k,g.avail_in=A,g.total_in+=S-g.next_in_index,g.next_in_index=S,m.write=N,m.inflate_flush(g,b);b=ft,m.win[N++]=a,B--,e=ud;break;case Ig:if(k>7&&(k-=8,A++,S--),m.write=N,b=m.inflate_flush(g,b),N=m.write,B=N<m.read?m.read-N-1:m.end-N,m.read!=m.write)return m.bitb=_,m.bitk=k,g.avail_in=A,g.total_in+=S-g.next_in_index,g.next_in_index=S,m.write=N,m.inflate_flush(g,b);e=TE;case TE:return b=sn,m.bitb=_,m.bitk=k,g.avail_in=A,g.total_in+=S-g.next_in_index,g.next_in_index=S,m.write=N,m.inflate_flush(g,b);case hd:return b=Nt,m.bitb=_,m.bitk=k,g.avail_in=A,g.total_in+=S-g.next_in_index,g.next_in_index=S,m.write=N,m.inflate_flush(g,b);default:return b=li,m.bitb=_,m.bitk=k,g.avail_in=A,g.total_in+=S-g.next_in_index,g.next_in_index=S,m.write=N,m.inflate_flush(g,b)}},i.free=function(){}}const PE=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Do=0,Rg=1,IE=2,RE=3,AE=4,LE=5,cd=6,dd=7,_E=8,Sa=9;function Pce(i,e){const t=this;let s=Do,r=0,n=0,a=0,o;const l=[0],u=[0],h=new Tce;let c=0,d=new Int32Array(CE*3);const f=0,y=new Pg;t.bitk=0,t.bitb=0,t.win=new Uint8Array(e),t.end=e,t.read=0,t.write=0,t.reset=function(v,m){m&&(m[0]=f),s==cd&&h.free(v),s=Do,t.bitk=0,t.bitb=0,t.read=t.write=0},t.reset(i,null),t.inflate_flush=function(v,m){let g,b,x;return b=v.next_out_index,x=t.read,g=(x<=t.write?t.write:t.end)-x,g>v.avail_out&&(g=v.avail_out),g!==0&&m==rn&&(m=ft),v.avail_out-=g,v.total_out+=g,v.next_out.set(t.win.subarray(x,x+g),b),b+=g,x+=g,x==t.end&&(x=0,t.write==t.end&&(t.write=0),g=t.write-x,g>v.avail_out&&(g=v.avail_out),g!==0&&m==rn&&(m=ft),v.avail_out-=g,v.total_out+=g,v.next_out.set(t.win.subarray(x,x+g),b),b+=g,x+=g),v.next_out_index=b,t.read=x,m},t.proc=function(v,m){let g,b,x,P,L,_,k,S;for(P=v.next_in_index,L=v.avail_in,b=t.bitb,x=t.bitk,_=t.write,k=_<t.read?t.read-_-1:t.end-_;;){let A,N,B,U,D,$,Q,H;switch(s){case Do:for(;x<3;){if(L!==0)m=ft;else return t.bitb=b,t.bitk=x,v.avail_in=L,v.total_in+=P-v.next_in_index,v.next_in_index=P,t.write=_,t.inflate_flush(v,m);L--,b|=(v.read_byte(P++)&255)<<x,x+=8}switch(g=b&7,c=g&1,g>>>1){case 0:b>>>=3,x-=3,g=x&7,b>>>=g,x-=g,s=Rg;break;case 1:A=[],N=[],B=[[]],U=[[]],Pg.inflate_trees_fixed(A,N,B,U),h.init(A[0],N[0],B[0],0,U[0],0),b>>>=3,x-=3,s=cd;break;case 2:b>>>=3,x-=3,s=RE;break;case 3:return b>>>=3,x-=3,s=Sa,v.msg="invalid block type",m=Nt,t.bitb=b,t.bitk=x,v.avail_in=L,v.total_in+=P-v.next_in_index,v.next_in_index=P,t.write=_,t.inflate_flush(v,m)}break;case Rg:for(;x<32;){if(L!==0)m=ft;else return t.bitb=b,t.bitk=x,v.avail_in=L,v.total_in+=P-v.next_in_index,v.next_in_index=P,t.write=_,t.inflate_flush(v,m);L--,b|=(v.read_byte(P++)&255)<<x,x+=8}if((~b>>>16&65535)!=(b&65535))return s=Sa,v.msg="invalid stored block lengths",m=Nt,t.bitb=b,t.bitk=x,v.avail_in=L,v.total_in+=P-v.next_in_index,v.next_in_index=P,t.write=_,t.inflate_flush(v,m);r=b&65535,b=x=0,s=r!==0?IE:c!==0?dd:Do;break;case IE:if(L===0||k===0&&(_==t.end&&t.read!==0&&(_=0,k=_<t.read?t.read-_-1:t.end-_),k===0&&(t.write=_,m=t.inflate_flush(v,m),_=t.write,k=_<t.read?t.read-_-1:t.end-_,_==t.end&&t.read!==0&&(_=0,k=_<t.read?t.read-_-1:t.end-_),k===0)))return t.bitb=b,t.bitk=x,v.avail_in=L,v.total_in+=P-v.next_in_index,v.next_in_index=P,t.write=_,t.inflate_flush(v,m);if(m=ft,g=r,g>L&&(g=L),g>k&&(g=k),t.win.set(v.read_buf(P,g),_),P+=g,L-=g,_+=g,k-=g,(r-=g)!==0)break;s=c!==0?dd:Do;break;case RE:for(;x<14;){if(L!==0)m=ft;else return t.bitb=b,t.bitk=x,v.avail_in=L,v.total_in+=P-v.next_in_index,v.next_in_index=P,t.write=_,t.inflate_flush(v,m);L--,b|=(v.read_byte(P++)&255)<<x,x+=8}if(n=g=b&16383,(g&31)>29||(g>>5&31)>29)return s=Sa,v.msg="too many length or distance symbols",m=Nt,t.bitb=b,t.bitk=x,v.avail_in=L,v.total_in+=P-v.next_in_index,v.next_in_index=P,t.write=_,t.inflate_flush(v,m);if(g=258+(g&31)+(g>>5&31),!o||o.length<g)o=[];else for(S=0;S<g;S++)o[S]=0;b>>>=14,x-=14,a=0,s=AE;case AE:for(;a<4+(n>>>10);){for(;x<3;){if(L!==0)m=ft;else return t.bitb=b,t.bitk=x,v.avail_in=L,v.total_in+=P-v.next_in_index,v.next_in_index=P,t.write=_,t.inflate_flush(v,m);L--,b|=(v.read_byte(P++)&255)<<x,x+=8}o[PE[a++]]=b&7,b>>>=3,x-=3}for(;a<19;)o[PE[a++]]=0;if(l[0]=7,g=y.inflate_trees_bits(o,l,u,d,v),g!=ft)return m=g,m==Nt&&(o=null,s=Sa),t.bitb=b,t.bitk=x,v.avail_in=L,v.total_in+=P-v.next_in_index,v.next_in_index=P,t.write=_,t.inflate_flush(v,m);a=0,s=LE;case LE:for(;g=n,!(a>=258+(g&31)+(g>>5&31));){let W,K;for(g=l[0];x<g;){if(L!==0)m=ft;else return t.bitb=b,t.bitk=x,v.avail_in=L,v.total_in+=P-v.next_in_index,v.next_in_index=P,t.write=_,t.inflate_flush(v,m);L--,b|=(v.read_byte(P++)&255)<<x,x+=8}if(g=d[(u[0]+(b&Vi[g]))*3+1],K=d[(u[0]+(b&Vi[g]))*3+2],K<16)b>>>=g,x-=g,o[a++]=K;else{for(S=K==18?7:K-14,W=K==18?11:3;x<g+S;){if(L!==0)m=ft;else return t.bitb=b,t.bitk=x,v.avail_in=L,v.total_in+=P-v.next_in_index,v.next_in_index=P,t.write=_,t.inflate_flush(v,m);L--,b|=(v.read_byte(P++)&255)<<x,x+=8}if(b>>>=g,x-=g,W+=b&Vi[S],b>>>=S,x-=S,S=a,g=n,S+W>258+(g&31)+(g>>5&31)||K==16&&S<1)return o=null,s=Sa,v.msg="invalid bit length repeat",m=Nt,t.bitb=b,t.bitk=x,v.avail_in=L,v.total_in+=P-v.next_in_index,v.next_in_index=P,t.write=_,t.inflate_flush(v,m);K=K==16?o[S-1]:0;do o[S++]=K;while(--W!==0);a=S}}if(u[0]=-1,D=[],$=[],Q=[],H=[],D[0]=9,$[0]=6,g=n,g=y.inflate_trees_dynamic(257+(g&31),1+(g>>5&31),o,D,$,Q,H,d,v),g!=ft)return g==Nt&&(o=null,s=Sa),m=g,t.bitb=b,t.bitk=x,v.avail_in=L,v.total_in+=P-v.next_in_index,v.next_in_index=P,t.write=_,t.inflate_flush(v,m);h.init(D[0],$[0],d,Q[0],d,H[0]),s=cd;case cd:if(t.bitb=b,t.bitk=x,v.avail_in=L,v.total_in+=P-v.next_in_index,v.next_in_index=P,t.write=_,(m=h.proc(t,v,m))!=sn)return t.inflate_flush(v,m);if(m=ft,h.free(v),P=v.next_in_index,L=v.avail_in,b=t.bitb,x=t.bitk,_=t.write,k=_<t.read?t.read-_-1:t.end-_,c===0){s=Do;break}s=dd;case dd:if(t.write=_,m=t.inflate_flush(v,m),_=t.write,k=_<t.read?t.read-_-1:t.end-_,t.read!=t.write)return t.bitb=b,t.bitk=x,v.avail_in=L,v.total_in+=P-v.next_in_index,v.next_in_index=P,t.write=_,t.inflate_flush(v,m);s=_E;case _E:return m=sn,t.bitb=b,t.bitk=x,v.avail_in=L,v.total_in+=P-v.next_in_index,v.next_in_index=P,t.write=_,t.inflate_flush(v,m);case Sa:return m=Nt,t.bitb=b,t.bitk=x,v.avail_in=L,v.total_in+=P-v.next_in_index,v.next_in_index=P,t.write=_,t.inflate_flush(v,m);default:return m=li,t.bitb=b,t.bitk=x,v.avail_in=L,v.total_in+=P-v.next_in_index,v.next_in_index=P,t.write=_,t.inflate_flush(v,m)}}},t.free=function(v){t.reset(v,null),t.win=null,d=null},t.set_dictionary=function(v,m,g){t.win.set(v.subarray(m,m+g),0),t.read=t.write=g},t.sync_point=function(){return s==Rg?1:0}}const Ice=32,Rce=8,Ace=0,DE=1,kE=2,OE=3,ME=4,NE=5,Ag=6,au=7,FE=12,qn=13,Lce=[0,0,255,255];function _ce(){const i=this;i.mode=0,i.method=0,i.was=[0],i.need=0,i.marker=0,i.wbits=0;function e(t){return!t||!t.istate?li:(t.total_in=t.total_out=0,t.msg=null,t.istate.mode=au,t.istate.blocks.reset(t,null),ft)}i.inflateEnd=function(t){return i.blocks&&i.blocks.free(t),i.blocks=null,ft},i.inflateInit=function(t,s){return t.msg=null,i.blocks=null,s<8||s>15?(i.inflateEnd(t),li):(i.wbits=s,t.istate.blocks=new Pce(t,1<<s),e(t),ft)},i.inflate=function(t,s){let r,n;if(!t||!t.istate||!t.next_in)return li;const a=t.istate;for(s=s==vce?rn:ft,r=rn;;)switch(a.mode){case Ace:if(t.avail_in===0)return r;if(r=s,t.avail_in--,t.total_in++,((a.method=t.read_byte(t.next_in_index++))&15)!=Rce){a.mode=qn,t.msg="unknown compression method",a.marker=5;break}if((a.method>>4)+8>a.wbits){a.mode=qn,t.msg="invalid win size",a.marker=5;break}a.mode=DE;case DE:if(t.avail_in===0)return r;if(r=s,t.avail_in--,t.total_in++,n=t.read_byte(t.next_in_index++)&255,((a.method<<8)+n)%31!==0){a.mode=qn,t.msg="incorrect header check",a.marker=5;break}if(!(n&Ice)){a.mode=au;break}a.mode=kE;case kE:if(t.avail_in===0)return r;r=s,t.avail_in--,t.total_in++,a.need=(t.read_byte(t.next_in_index++)&255)<<24&4278190080,a.mode=OE;case OE:if(t.avail_in===0)return r;r=s,t.avail_in--,t.total_in++,a.need+=(t.read_byte(t.next_in_index++)&255)<<16&16711680,a.mode=ME;case ME:if(t.avail_in===0)return r;r=s,t.avail_in--,t.total_in++,a.need+=(t.read_byte(t.next_in_index++)&255)<<8&65280,a.mode=NE;case NE:return t.avail_in===0?r:(r=s,t.avail_in--,t.total_in++,a.need+=t.read_byte(t.next_in_index++)&255,a.mode=Ag,mce);case Ag:return a.mode=qn,t.msg="need dictionary",a.marker=0,li;case au:if(r=a.blocks.proc(t,r),r==Nt){a.mode=qn,a.marker=0;break}if(r==ft&&(r=s),r!=sn)return r;r=s,a.blocks.reset(t,a.was),a.mode=FE;case FE:return t.avail_in=0,sn;case qn:return Nt;default:return li}},i.inflateSetDictionary=function(t,s,r){let n=0,a=r;if(!t||!t.istate||t.istate.mode!=Ag)return li;const o=t.istate;return a>=1<<o.wbits&&(a=(1<<o.wbits)-1,n=r-a),o.blocks.set_dictionary(s,n,a),o.mode=au,ft},i.inflateSync=function(t){let s,r,n,a,o;if(!t||!t.istate)return li;const l=t.istate;if(l.mode!=qn&&(l.mode=qn,l.marker=0),(s=t.avail_in)===0)return rn;for(r=t.next_in_index,n=l.marker;s!==0&&n<4;)t.read_byte(r)==Lce[n]?n++:t.read_byte(r)!==0?n=0:n=4-n,r++,s--;return t.total_in+=r-t.next_in_index,t.next_in_index=r,t.avail_in=s,l.marker=n,n!=4?Nt:(a=t.total_in,o=t.total_out,e(t),t.total_in=a,t.total_out=o,l.mode=au,ft)},i.inflateSyncPoint=function(t){return!t||!t.istate||!t.istate.blocks?li:t.istate.blocks.sync_point()}}function qE(){}qE.prototype={inflateInit(i){const e=this;return e.istate=new _ce,i||(i=fce),e.istate.inflateInit(e,i)},inflate(i){const e=this;return e.istate?e.istate.inflate(e,i):li},inflateEnd(){const i=this;if(!i.istate)return li;const e=i.istate.inflateEnd(i);return i.istate=null,e},inflateSync(){const i=this;return i.istate?i.istate.inflateSync(i):li},inflateSetDictionary(i,e){const t=this;return t.istate?t.istate.inflateSetDictionary(t,i,e):li},read_byte(i){return this.next_in[i]},read_buf(i,e){return this.next_in.subarray(i,i+e)}};function Dce(i){const e=this,t=new qE,s=i&&i.chunkSize?Math.floor(i.chunkSize*2):128*1024,r=gce,n=new Uint8Array(s);let a=!1;t.inflateInit(),t.next_out=n,e.append=function(o,l){const u=[];let h,c,d=0,f=0,y=0;if(o.length!==0){t.next_in_index=0,t.next_in=o,t.avail_in=o.length;do{if(t.next_out_index=0,t.avail_out=s,t.avail_in===0&&!a&&(t.next_in_index=0,a=!0),h=t.inflate(r),a&&h===rn){if(t.avail_in!==0)throw new Error("inflating: bad input")}else if(h!==ft&&h!==sn)throw new Error("inflating: "+t.msg);if((a||h===sn)&&t.avail_in===o.length)throw new Error("inflating: bad input");t.next_out_index&&(t.next_out_index===s?u.push(new Uint8Array(n)):u.push(n.subarray(0,t.next_out_index))),y+=t.next_out_index,l&&t.next_in_index>0&&t.next_in_index!=d&&(l(t.next_in_index),d=t.next_in_index)}while(t.avail_in>0||t.avail_out===0);return u.length>1?(c=new Uint8Array(y),u.forEach(function(v){c.set(v,f),f+=v.length})):c=u[0]?new Uint8Array(u[0]):new Uint8Array,c}},e.flush=function(){t.inflateEnd()}}const ui=4294967295,hi=65535,BE=8,kce=0,Oce=99,Mce=67324752,$E=134695760,Nce=$E,Fce=33639248,qce=101010256,Bce=101075792,$ce=117853008,Lg=22,HE=20,QE=56,Hce=Lg+HE+QE,Qce=1,Uce=39169,zce=10,jce=1,UE=21589,Wce=6534,Gce=1,Kce=8,Zce=2048,Jce=16,Yce=20,zE=45,jE=51,_g="/",WE=new Date(2107,11,31),GE=new Date(1980,0,1),Ft=void 0,Bn="undefined",ou="function";class KE{constructor(e){return class extends TransformStream{constructor(t,s){const r=new e(s);super({transform(n,a){a.enqueue(r.append(n))},flush(n){const a=r.flush();a&&n.enqueue(a)}})}}}}const Xce=64;let ZE=2;try{typeof navigator!=Bn&&navigator.hardwareConcurrency&&(ZE=navigator.hardwareConcurrency)}catch{}const ede={chunkSize:512*1024,maxWorkers:ZE,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:Ft,CompressionStreamNative:typeof CompressionStream!=Bn&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=Bn&&DecompressionStream},$n=Object.assign({},ede);function tde(){return $n}function sde(i){return Math.max(i.chunkSize,Xce)}function Dg(i){const{baseURL:e,chunkSize:t,maxWorkers:s,terminateWorkerTimeout:r,useCompressionStream:n,useWebWorkers:a,Deflate:o,Inflate:l,CompressionStream:u,DecompressionStream:h,workerScripts:c}=i;if(Hn("baseURL",e),Hn("chunkSize",t),Hn("maxWorkers",s),Hn("terminateWorkerTimeout",r),Hn("useCompressionStream",n),Hn("useWebWorkers",a),o&&($n.CompressionStream=new KE(o)),l&&($n.DecompressionStream=new KE(l)),Hn("CompressionStream",u),Hn("DecompressionStream",h),c!==Ft){const{deflate:d,inflate:f}=c;if((d||f)&&($n.workerScripts||($n.workerScripts={})),d){if(!Array.isArray(d))throw new Error("workerScripts.deflate must be an array");$n.workerScripts.deflate=d}if(f){if(!Array.isArray(f))throw new Error("workerScripts.inflate must be an array");$n.workerScripts.inflate=f}}}function Hn(i,e){e!==Ft&&($n[i]=e)}const kg={application:{"andrew-inset":"ez",annodex:"anx","atom+xml":"atom","atomcat+xml":"atomcat","atomserv+xml":"atomsrv",bbolin:"lin","cu-seeme":"cu","davmount+xml":"davmount",dsptype:"tsp",ecmascript:["es","ecma"],futuresplash:"spl",hta:"hta","java-archive":"jar","java-serialized-object":"ser","java-vm":"class",m3g:"m3g","mac-binhex40":"hqx",mathematica:["nb","ma","mb"],msaccess:"mdb",msword:["doc","dot","wiz"],mxf:"mxf",oda:"oda",ogg:"ogx",pdf:"pdf","pgp-keys":"key","pgp-signature":["asc","sig"],"pics-rules":"prf",postscript:["ps","ai","eps","epsi","epsf","eps2","eps3"],rar:"rar","rdf+xml":"rdf","rss+xml":"rss",rtf:"rtf","xhtml+xml":["xhtml","xht"],xml:["xml","xsl","xsd","xpdl"],"xspf+xml":"xspf",zip:"zip","vnd.android.package-archive":"apk","vnd.cinderella":"cdy","vnd.google-earth.kml+xml":"kml","vnd.google-earth.kmz":"kmz","vnd.mozilla.xul+xml":"xul","vnd.ms-excel":["xls","xlb","xlt","xlm","xla","xlc","xlw"],"vnd.ms-pki.seccat":"cat","vnd.ms-pki.stl":"stl","vnd.ms-powerpoint":["ppt","pps","pot","ppa","pwz"],"vnd.oasis.opendocument.chart":"odc","vnd.oasis.opendocument.database":"odb","vnd.oasis.opendocument.formula":"odf","vnd.oasis.opendocument.graphics":"odg","vnd.oasis.opendocument.graphics-template":"otg","vnd.oasis.opendocument.image":"odi","vnd.oasis.opendocument.presentation":"odp","vnd.oasis.opendocument.presentation-template":"otp","vnd.oasis.opendocument.spreadsheet":"ods","vnd.oasis.opendocument.spreadsheet-template":"ots","vnd.oasis.opendocument.text":"odt","vnd.oasis.opendocument.text-master":["odm","otm"],"vnd.oasis.opendocument.text-template":"ott","vnd.oasis.opendocument.text-web":"oth","vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","vnd.openxmlformats-officedocument.spreadsheetml.template":"xltx","vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","vnd.openxmlformats-officedocument.presentationml.slideshow":"ppsx","vnd.openxmlformats-officedocument.presentationml.template":"potx","vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","vnd.openxmlformats-officedocument.wordprocessingml.template":"dotx","vnd.smaf":"mmf","vnd.stardivision.calc":"sdc","vnd.stardivision.chart":"sds","vnd.stardivision.draw":"sda","vnd.stardivision.impress":"sdd","vnd.stardivision.math":["sdf","smf"],"vnd.stardivision.writer":["sdw","vor"],"vnd.stardivision.writer-global":"sgl","vnd.sun.xml.calc":"sxc","vnd.sun.xml.calc.template":"stc","vnd.sun.xml.draw":"sxd","vnd.sun.xml.draw.template":"std","vnd.sun.xml.impress":"sxi","vnd.sun.xml.impress.template":"sti","vnd.sun.xml.math":"sxm","vnd.sun.xml.writer":"sxw","vnd.sun.xml.writer.global":"sxg","vnd.sun.xml.writer.template":"stw","vnd.symbian.install":["sis","sisx"],"vnd.visio":["vsd","vst","vss","vsw","vsdx","vssx","vstx","vssm","vstm"],"vnd.wap.wbxml":"wbxml","vnd.wap.wmlc":"wmlc","vnd.wap.wmlscriptc":"wmlsc","vnd.wordperfect":"wpd","vnd.wordperfect5.1":"wp5","x-123":"wk","x-7z-compressed":"7z","x-abiword":"abw","x-apple-diskimage":"dmg","x-bcpio":"bcpio","x-bittorrent":"torrent","x-cbr":["cbr","cba","cbt","cb7"],"x-cbz":"cbz","x-cdf":["cdf","cda"],"x-cdlink":"vcd","x-chess-pgn":"pgn","x-cpio":"cpio","x-csh":"csh","x-director":["dir","dxr","cst","cct","cxt","w3d","fgd","swa"],"x-dms":"dms","x-doom":"wad","x-dvi":"dvi","x-httpd-eruby":"rhtml","x-font":"pcf.Z","x-freemind":"mm","x-gnumeric":"gnumeric","x-go-sgf":"sgf","x-graphing-calculator":"gcf","x-gtar":["gtar","taz"],"x-hdf":"hdf","x-httpd-php":["phtml","pht","php"],"x-httpd-php-source":"phps","x-httpd-php3":"php3","x-httpd-php3-preprocessed":"php3p","x-httpd-php4":"php4","x-httpd-php5":"php5","x-ica":"ica","x-info":"info","x-internet-signup":["ins","isp"],"x-iphone":"iii","x-iso9660-image":"iso","x-java-jnlp-file":"jnlp","x-jmol":"jmz","x-killustrator":"kil","x-latex":"latex","x-lyx":"lyx","x-lzx":"lzx","x-maker":["frm","fb","fbdoc"],"x-ms-wmd":"wmd","x-msdos-program":["com","exe","bat","dll"],"x-netcdf":["nc"],"x-ns-proxy-autoconfig":["pac","dat"],"x-nwc":"nwc","x-object":"o","x-oz-application":"oza","x-pkcs7-certreqresp":"p7r","x-python-code":["pyc","pyo"],"x-qgis":["qgs","shp","shx"],"x-quicktimeplayer":"qtl","x-redhat-package-manager":["rpm","rpa"],"x-ruby":"rb","x-sh":"sh","x-shar":"shar","x-shockwave-flash":["swf","swfl"],"x-silverlight":"scr","x-stuffit":"sit","x-sv4cpio":"sv4cpio","x-sv4crc":"sv4crc","x-tar":"tar","x-tex-gf":"gf","x-tex-pk":"pk","x-texinfo":["texinfo","texi"],"x-trash":["~","%","bak","old","sik"],"x-ustar":"ustar","x-wais-source":"src","x-wingz":"wz","x-x509-ca-cert":["crt","der","cer"],"x-xcf":"xcf","x-xfig":"fig","x-xpinstall":"xpi",applixware:"aw","atomsvc+xml":"atomsvc","ccxml+xml":"ccxml","cdmi-capability":"cdmia","cdmi-container":"cdmic","cdmi-domain":"cdmid","cdmi-object":"cdmio","cdmi-queue":"cdmiq","docbook+xml":"dbk","dssc+der":"dssc","dssc+xml":"xdssc","emma+xml":"emma","epub+zip":"epub",exi:"exi","font-tdpfr":"pfr","gml+xml":"gml","gpx+xml":"gpx",gxf:"gxf",hyperstudio:"stk","inkml+xml":["ink","inkml"],ipfix:"ipfix","jsonml+json":"jsonml","lost+xml":"lostxml","mads+xml":"mads",marc:"mrc","marcxml+xml":"mrcx","mathml+xml":["mathml","mml"],mbox:"mbox","mediaservercontrol+xml":"mscml","metalink+xml":"metalink","metalink4+xml":"meta4","mets+xml":"mets","mods+xml":"mods",mp21:["m21","mp21"],mp4:"mp4s","oebps-package+xml":"opf","omdoc+xml":"omdoc",onenote:["onetoc","onetoc2","onetmp","onepkg"],oxps:"oxps","patch-ops-error+xml":"xer","pgp-encrypted":"pgp",pkcs10:"p10","pkcs7-mime":["p7m","p7c"],"pkcs7-signature":"p7s",pkcs8:"p8","pkix-attr-cert":"ac","pkix-crl":"crl","pkix-pkipath":"pkipath",pkixcmp:"pki","pls+xml":"pls","prs.cww":"cww","pskc+xml":"pskcxml","reginfo+xml":"rif","relax-ng-compact-syntax":"rnc","resource-lists+xml":"rl","resource-lists-diff+xml":"rld","rls-services+xml":"rs","rpki-ghostbusters":"gbr","rpki-manifest":"mft","rpki-roa":"roa","rsd+xml":"rsd","sbml+xml":"sbml","scvp-cv-request":"scq","scvp-cv-response":"scs","scvp-vp-request":"spq","scvp-vp-response":"spp",sdp:"sdp","set-payment-initiation":"setpay","set-registration-initiation":"setreg","shf+xml":"shf","sparql-query":"rq","sparql-results+xml":"srx",srgs:"gram","srgs+xml":"grxml","sru+xml":"sru","ssdl+xml":"ssdl","ssml+xml":"ssml","tei+xml":["tei","teicorpus"],"thraud+xml":"tfi","timestamped-data":"tsd","vnd.3gpp.pic-bw-large":"plb","vnd.3gpp.pic-bw-small":"psb","vnd.3gpp.pic-bw-var":"pvb","vnd.3gpp2.tcap":"tcap","vnd.3m.post-it-notes":"pwn","vnd.accpac.simply.aso":"aso","vnd.accpac.simply.imp":"imp","vnd.acucobol":"acu","vnd.acucorp":["atc","acutc"],"vnd.adobe.air-application-installer-package+zip":"air","vnd.adobe.formscentral.fcdt":"fcdt","vnd.adobe.fxp":["fxp","fxpl"],"vnd.adobe.xdp+xml":"xdp","vnd.adobe.xfdf":"xfdf","vnd.ahead.space":"ahead","vnd.airzip.filesecure.azf":"azf","vnd.airzip.filesecure.azs":"azs","vnd.amazon.ebook":"azw","vnd.americandynamics.acc":"acc","vnd.amiga.ami":"ami","vnd.anser-web-certificate-issue-initiation":"cii","vnd.anser-web-funds-transfer-initiation":"fti","vnd.antix.game-component":"atx","vnd.apple.installer+xml":"mpkg","vnd.apple.mpegurl":"m3u8","vnd.aristanetworks.swi":"swi","vnd.astraea-software.iota":"iota","vnd.audiograph":"aep","vnd.blueice.multipass":"mpm","vnd.bmi":"bmi","vnd.businessobjects":"rep","vnd.chemdraw+xml":"cdxml","vnd.chipnuts.karaoke-mmd":"mmd","vnd.claymore":"cla","vnd.cloanto.rp9":"rp9","vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"vnd.cluetrust.cartomobile-config":"c11amc","vnd.cluetrust.cartomobile-config-pkg":"c11amz","vnd.commonspace":"csp","vnd.contact.cmsg":"cdbcmsg","vnd.cosmocaller":"cmc","vnd.crick.clicker":"clkx","vnd.crick.clicker.keyboard":"clkk","vnd.crick.clicker.palette":"clkp","vnd.crick.clicker.template":"clkt","vnd.crick.clicker.wordbank":"clkw","vnd.criticaltools.wbs+xml":"wbs","vnd.ctc-posml":"pml","vnd.cups-ppd":"ppd","vnd.curl.car":"car","vnd.curl.pcurl":"pcurl","vnd.dart":"dart","vnd.data-vision.rdz":"rdz","vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"vnd.dece.ttml+xml":["uvt","uvvt"],"vnd.dece.unspecified":["uvx","uvvx"],"vnd.dece.zip":["uvz","uvvz"],"vnd.denovo.fcselayout-link":"fe_launch","vnd.dna":"dna","vnd.dolby.mlp":"mlp","vnd.dpgraph":"dpg","vnd.dreamfactory":"dfac","vnd.ds-keypoint":"kpxx","vnd.dvb.ait":"ait","vnd.dvb.service":"svc","vnd.dynageo":"geo","vnd.ecowin.chart":"mag","vnd.enliven":"nml","vnd.epson.esf":"esf","vnd.epson.msf":"msf","vnd.epson.quickanime":"qam","vnd.epson.salt":"slt","vnd.epson.ssf":"ssf","vnd.eszigno3+xml":["es3","et3"],"vnd.ezpix-album":"ez2","vnd.ezpix-package":"ez3","vnd.fdf":"fdf","vnd.fdsn.mseed":"mseed","vnd.fdsn.seed":["seed","dataless"],"vnd.flographit":"gph","vnd.fluxtime.clip":"ftc","vnd.framemaker":["fm","frame","maker","book"],"vnd.frogans.fnc":"fnc","vnd.frogans.ltf":"ltf","vnd.fsc.weblaunch":"fsc","vnd.fujitsu.oasys":"oas","vnd.fujitsu.oasys2":"oa2","vnd.fujitsu.oasys3":"oa3","vnd.fujitsu.oasysgp":"fg5","vnd.fujitsu.oasysprs":"bh2","vnd.fujixerox.ddd":"ddd","vnd.fujixerox.docuworks":"xdw","vnd.fujixerox.docuworks.binder":"xbd","vnd.fuzzysheet":"fzs","vnd.genomatix.tuxedo":"txd","vnd.geogebra.file":"ggb","vnd.geogebra.tool":"ggt","vnd.geometry-explorer":["gex","gre"],"vnd.geonext":"gxt","vnd.geoplan":"g2w","vnd.geospace":"g3w","vnd.gmx":"gmx","vnd.grafeq":["gqf","gqs"],"vnd.groove-account":"gac","vnd.groove-help":"ghf","vnd.groove-identity-message":"gim","vnd.groove-injector":"grv","vnd.groove-tool-message":"gtm","vnd.groove-tool-template":"tpl","vnd.groove-vcard":"vcg","vnd.hal+xml":"hal","vnd.handheld-entertainment+xml":"zmm","vnd.hbci":"hbci","vnd.hhe.lesson-player":"les","vnd.hp-hpgl":"hpgl","vnd.hp-hpid":"hpid","vnd.hp-hps":"hps","vnd.hp-jlyt":"jlt","vnd.hp-pcl":"pcl","vnd.hp-pclxl":"pclxl","vnd.hydrostatix.sof-data":"sfd-hdstx","vnd.ibm.minipay":"mpy","vnd.ibm.modcap":["afp","listafp","list3820"],"vnd.ibm.rights-management":"irm","vnd.ibm.secure-container":"sc","vnd.iccprofile":["icc","icm"],"vnd.igloader":"igl","vnd.immervision-ivp":"ivp","vnd.immervision-ivu":"ivu","vnd.insors.igm":"igm","vnd.intercon.formnet":["xpw","xpx"],"vnd.intergeo":"i2g","vnd.intu.qbo":"qbo","vnd.intu.qfx":"qfx","vnd.ipunplugged.rcprofile":"rcprofile","vnd.irepository.package+xml":"irp","vnd.is-xpr":"xpr","vnd.isac.fcs":"fcs","vnd.jam":"jam","vnd.jcp.javame.midlet-rms":"rms","vnd.jisp":"jisp","vnd.joost.joda-archive":"joda","vnd.kahootz":["ktz","ktr"],"vnd.kde.karbon":"karbon","vnd.kde.kchart":"chrt","vnd.kde.kformula":"kfo","vnd.kde.kivio":"flw","vnd.kde.kontour":"kon","vnd.kde.kpresenter":["kpr","kpt"],"vnd.kde.kspread":"ksp","vnd.kde.kword":["kwd","kwt"],"vnd.kenameaapp":"htke","vnd.kidspiration":"kia","vnd.kinar":["kne","knp"],"vnd.koan":["skp","skd","skt","skm"],"vnd.kodak-descriptor":"sse","vnd.las.las+xml":"lasxml","vnd.llamagraphics.life-balance.desktop":"lbd","vnd.llamagraphics.life-balance.exchange+xml":"lbe","vnd.lotus-1-2-3":"123","vnd.lotus-approach":"apr","vnd.lotus-freelance":"pre","vnd.lotus-notes":"nsf","vnd.lotus-organizer":"org","vnd.lotus-screencam":"scm","vnd.lotus-wordpro":"lwp","vnd.macports.portpkg":"portpkg","vnd.mcd":"mcd","vnd.medcalcdata":"mc1","vnd.mediastation.cdkey":"cdkey","vnd.mfer":"mwf","vnd.mfmp":"mfm","vnd.micrografx.flo":"flo","vnd.micrografx.igx":"igx","vnd.mif":"mif","vnd.mobius.daf":"daf","vnd.mobius.dis":"dis","vnd.mobius.mbk":"mbk","vnd.mobius.mqy":"mqy","vnd.mobius.msl":"msl","vnd.mobius.plc":"plc","vnd.mobius.txf":"txf","vnd.mophun.application":"mpn","vnd.mophun.certificate":"mpc","vnd.ms-artgalry":"cil","vnd.ms-cab-compressed":"cab","vnd.ms-excel.addin.macroenabled.12":"xlam","vnd.ms-excel.sheet.binary.macroenabled.12":"xlsb","vnd.ms-excel.sheet.macroenabled.12":"xlsm","vnd.ms-excel.template.macroenabled.12":"xltm","vnd.ms-fontobject":"eot","vnd.ms-htmlhelp":"chm","vnd.ms-ims":"ims","vnd.ms-lrm":"lrm","vnd.ms-officetheme":"thmx","vnd.ms-powerpoint.addin.macroenabled.12":"ppam","vnd.ms-powerpoint.presentation.macroenabled.12":"pptm","vnd.ms-powerpoint.slide.macroenabled.12":"sldm","vnd.ms-powerpoint.slideshow.macroenabled.12":"ppsm","vnd.ms-powerpoint.template.macroenabled.12":"potm","vnd.ms-project":["mpp","mpt"],"vnd.ms-word.document.macroenabled.12":"docm","vnd.ms-word.template.macroenabled.12":"dotm","vnd.ms-works":["wps","wks","wcm","wdb"],"vnd.ms-wpl":"wpl","vnd.ms-xpsdocument":"xps","vnd.mseq":"mseq","vnd.musician":"mus","vnd.muvee.style":"msty","vnd.mynfc":"taglet","vnd.neurolanguage.nlu":"nlu","vnd.nitf":["ntf","nitf"],"vnd.noblenet-directory":"nnd","vnd.noblenet-sealer":"nns","vnd.noblenet-web":"nnw","vnd.nokia.n-gage.data":"ngdat","vnd.nokia.n-gage.symbian.install":"n-gage","vnd.nokia.radio-preset":"rpst","vnd.nokia.radio-presets":"rpss","vnd.novadigm.edm":"edm","vnd.novadigm.edx":"edx","vnd.novadigm.ext":"ext","vnd.oasis.opendocument.chart-template":"otc","vnd.oasis.opendocument.formula-template":"odft","vnd.oasis.opendocument.image-template":"oti","vnd.olpc-sugar":"xo","vnd.oma.dd2+xml":"dd2","vnd.openofficeorg.extension":"oxt","vnd.openxmlformats-officedocument.presentationml.slide":"sldx","vnd.osgeo.mapguide.package":"mgp","vnd.osgi.dp":"dp","vnd.osgi.subsystem":"esa","vnd.palm":["pdb","pqa","oprc"],"vnd.pawaafile":"paw","vnd.pg.format":"str","vnd.pg.osasli":"ei6","vnd.picsel":"efif","vnd.pmi.widget":"wg","vnd.pocketlearn":"plf","vnd.powerbuilder6":"pbd","vnd.previewsystems.box":"box","vnd.proteus.magazine":"mgz","vnd.publishare-delta-tree":"qps","vnd.pvi.ptid1":"ptid","vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"vnd.realvnc.bed":"bed","vnd.recordare.musicxml":"mxl","vnd.recordare.musicxml+xml":"musicxml","vnd.rig.cryptonote":"cryptonote","vnd.rn-realmedia":"rm","vnd.rn-realmedia-vbr":"rmvb","vnd.route66.link66+xml":"link66","vnd.sailingtracker.track":"st","vnd.seemail":"see","vnd.sema":"sema","vnd.semd":"semd","vnd.semf":"semf","vnd.shana.informed.formdata":"ifm","vnd.shana.informed.formtemplate":"itp","vnd.shana.informed.interchange":"iif","vnd.shana.informed.package":"ipk","vnd.simtech-mindmapper":["twd","twds"],"vnd.smart.teacher":"teacher","vnd.solent.sdkm+xml":["sdkm","sdkd"],"vnd.spotfire.dxp":"dxp","vnd.spotfire.sfs":"sfs","vnd.stepmania.package":"smzip","vnd.stepmania.stepchart":"sm","vnd.sus-calendar":["sus","susp"],"vnd.svd":"svd","vnd.syncml+xml":"xsm","vnd.syncml.dm+wbxml":"bdm","vnd.syncml.dm+xml":"xdm","vnd.tao.intent-module-archive":"tao","vnd.tcpdump.pcap":["pcap","cap","dmp"],"vnd.tmobile-livetv":"tmo","vnd.trid.tpt":"tpt","vnd.triscape.mxs":"mxs","vnd.trueapp":"tra","vnd.ufdl":["ufd","ufdl"],"vnd.uiq.theme":"utz","vnd.umajin":"umj","vnd.unity":"unityweb","vnd.uoml+xml":"uoml","vnd.vcx":"vcx","vnd.visionary":"vis","vnd.vsf":"vsf","vnd.webturbo":"wtb","vnd.wolfram.player":"nbp","vnd.wqd":"wqd","vnd.wt.stf":"stf","vnd.xara":"xar","vnd.xfdl":"xfdl","vnd.yamaha.hv-dic":"hvd","vnd.yamaha.hv-script":"hvs","vnd.yamaha.hv-voice":"hvp","vnd.yamaha.openscoreformat":"osf","vnd.yamaha.openscoreformat.osfpvg+xml":"osfpvg","vnd.yamaha.smaf-audio":"saf","vnd.yamaha.smaf-phrase":"spf","vnd.yellowriver-custom-menu":"cmp","vnd.zul":["zir","zirz"],"vnd.zzazz.deck+xml":"zaz","voicexml+xml":"vxml",widget:"wgt",winhlp:"hlp","wsdl+xml":"wsdl","wspolicy+xml":"wspolicy","x-ace-compressed":"ace","x-authorware-bin":["aab","x32","u32","vox"],"x-authorware-map":"aam","x-authorware-seg":"aas","x-blorb":["blb","blorb"],"x-bzip":"bz","x-bzip2":["bz2","boz"],"x-cfs-compressed":"cfs","x-chat":"chat","x-conference":"nsc","x-dgc-compressed":"dgc","x-dtbncx+xml":"ncx","x-dtbook+xml":"dtb","x-dtbresource+xml":"res","x-eva":"eva","x-font-bdf":"bdf","x-font-ghostscript":"gsf","x-font-linux-psf":"psf","x-font-pcf":"pcf","x-font-snf":"snf","x-font-ttf":["ttf","ttc"],"x-font-type1":["pfa","pfb","pfm","afm"],"x-freearc":"arc","x-gca-compressed":"gca","x-glulx":"ulx","x-gramps-xml":"gramps","x-install-instructions":"install","x-lzh-compressed":["lzh","lha"],"x-mie":"mie","x-mobipocket-ebook":["prc","mobi"],"x-ms-application":"application","x-ms-shortcut":"lnk","x-ms-xbap":"xbap","x-msbinder":"obd","x-mscardfile":"crd","x-msclip":"clp","application/x-ms-installer":"msi","x-msmediaview":["mvb","m13","m14"],"x-msmetafile":["wmf","wmz","emf","emz"],"x-msmoney":"mny","x-mspublisher":"pub","x-msschedule":"scd","x-msterminal":"trm","x-mswrite":"wri","x-nzb":"nzb","x-pkcs12":["p12","pfx"],"x-pkcs7-certificates":["p7b","spc"],"x-research-info-systems":"ris","x-silverlight-app":"xap","x-sql":"sql","x-stuffitx":"sitx","x-subrip":"srt","x-t3vm-image":"t3","x-tex-tfm":"tfm","x-tgif":"obj","x-xliff+xml":"xlf","x-xz":"xz","x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"xaml+xml":"xaml","xcap-diff+xml":"xdf","xenc+xml":"xenc","xml-dtd":"dtd","xop+xml":"xop","xproc+xml":"xpl","xslt+xml":"xslt","xv+xml":["mxml","xhvml","xvml","xvm"],yang:"yang","yin+xml":"yin",envoy:"evy",fractals:"fif","internet-property-stream":"acx",olescript:"axs","vnd.ms-outlook":"msg","vnd.ms-pkicertstore":"sst","x-compress":"z","x-perfmon":["pma","pmc","pmr","pmw"],"ynd.ms-pkipko":"pko",gzip:["gz","tgz"],"smil+xml":["smi","smil"],"vnd.debian.binary-package":["deb","udeb"],"vnd.hzn-3d-crossword":"x3d","vnd.sqlite3":["db","sqlite","sqlite3","db-wal","sqlite-wal","db-shm","sqlite-shm"],"vnd.wap.sic":"sic","vnd.wap.slc":"slc","x-krita":["kra","krz"],"x-perl":["pm","pl"],yaml:["yaml","yml"]},audio:{amr:"amr","amr-wb":"awb",annodex:"axa",basic:["au","snd"],flac:"flac",midi:["mid","midi","kar","rmi"],mpeg:["mpga","mpega","mp3","m4a","mp2a","m2a","m3a"],mpegurl:"m3u",ogg:["oga","ogg","spx"],"prs.sid":"sid","x-aiff":"aifc","x-gsm":"gsm","x-ms-wma":"wma","x-ms-wax":"wax","x-pn-realaudio":"ram","x-realaudio":"ra","x-sd2":"sd2",adpcm:"adp",mp4:"mp4a",s3m:"s3m",silk:"sil","vnd.dece.audio":["uva","uvva"],"vnd.digital-winds":"eol","vnd.dra":"dra","vnd.dts":"dts","vnd.dts.hd":"dtshd","vnd.lucent.voice":"lvp","vnd.ms-playready.media.pya":"pya","vnd.nuera.ecelp4800":"ecelp4800","vnd.nuera.ecelp7470":"ecelp7470","vnd.nuera.ecelp9600":"ecelp9600","vnd.rip":"rip",webm:"weba","x-caf":"caf","x-matroska":"mka","x-pn-realaudio-plugin":"rmp",xm:"xm",aac:"aac",aiff:["aiff","aif","aff"],opus:"opus",wav:"wav"},chemical:{"x-alchemy":"alc","x-cache":["cac","cache"],"x-cache-csf":"csf","x-cactvs-binary":["cbin","cascii","ctab"],"x-cdx":"cdx","x-chem3d":"c3d","x-cif":"cif","x-cmdf":"cmdf","x-cml":"cml","x-compass":"cpa","x-crossfire":"bsd","x-csml":["csml","csm"],"x-ctx":"ctx","x-cxf":["cxf","cef"],"x-embl-dl-nucleotide":["emb","embl"],"x-gamess-input":["inp","gam","gamin"],"x-gaussian-checkpoint":["fch","fchk"],"x-gaussian-cube":"cub","x-gaussian-input":["gau","gjc","gjf"],"x-gaussian-log":"gal","x-gcg8-sequence":"gcg","x-genbank":"gen","x-hin":"hin","x-isostar":["istr","ist"],"x-jcamp-dx":["jdx","dx"],"x-kinemage":"kin","x-macmolecule":"mcm","x-macromodel-input":"mmod","x-mdl-molfile":"mol","x-mdl-rdfile":"rd","x-mdl-rxnfile":"rxn","x-mdl-sdfile":"sd","x-mdl-tgf":"tgf","x-mmcif":"mcif","x-mol2":"mol2","x-molconn-Z":"b","x-mopac-graph":"gpt","x-mopac-input":["mop","mopcrt","zmt"],"x-mopac-out":"moo","x-ncbi-asn1":"asn","x-ncbi-asn1-ascii":["prt","ent"],"x-ncbi-asn1-binary":"val","x-rosdal":"ros","x-swissprot":"sw","x-vamas-iso14976":"vms","x-vmd":"vmd","x-xtel":"xtel","x-xyz":"xyz"},font:{otf:"otf",woff:"woff",woff2:"woff2"},image:{gif:"gif",ief:"ief",jpeg:["jpeg","jpg","jpe","jfif","jfif-tbnl","jif"],pcx:"pcx",png:"png","svg+xml":["svg","svgz"],tiff:["tiff","tif"],"vnd.djvu":["djvu","djv"],"vnd.wap.wbmp":"wbmp","x-canon-cr2":"cr2","x-canon-crw":"crw","x-cmu-raster":"ras","x-coreldraw":"cdr","x-coreldrawpattern":"pat","x-coreldrawtemplate":"cdt","x-corelphotopaint":"cpt","x-epson-erf":"erf","x-icon":"ico","x-jg":"art","x-jng":"jng","x-nikon-nef":"nef","x-olympus-orf":"orf","x-portable-anymap":"pnm","x-portable-bitmap":"pbm","x-portable-graymap":"pgm","x-portable-pixmap":"ppm","x-rgb":"rgb","x-xbitmap":"xbm","x-xpixmap":"xpm","x-xwindowdump":"xwd",bmp:"bmp",cgm:"cgm",g3fax:"g3",ktx:"ktx","prs.btif":"btif",sgi:"sgi","vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"vnd.dwg":"dwg","vnd.dxf":"dxf","vnd.fastbidsheet":"fbs","vnd.fpx":"fpx","vnd.fst":"fst","vnd.fujixerox.edmics-mmr":"mmr","vnd.fujixerox.edmics-rlc":"rlc","vnd.ms-modi":"mdi","vnd.ms-photo":"wdp","vnd.net-fpx":"npx","vnd.xiff":"xif",webp:"webp","x-3ds":"3ds","x-cmx":"cmx","x-freehand":["fh","fhc","fh4","fh5","fh7"],"x-pict":["pic","pct"],"x-tga":"tga","cis-cod":"cod",avif:"avifs",heic:["heif","heic"],pjpeg:["pjpg"],"vnd.adobe.photoshop":"psd","x-adobe-dng":"dng","x-fuji-raf":"raf","x-icns":"icns","x-kodak-dcr":"dcr","x-kodak-k25":"k25","x-kodak-kdc":"kdc","x-minolta-mrw":"mrw","x-panasonic-raw":["raw","rw2","rwl"],"x-pentax-pef":["pef","ptx"],"x-sigma-x3f":"x3f","x-sony-arw":"arw","x-sony-sr2":"sr2","x-sony-srf":"srf"},message:{rfc822:["eml","mime","mht","mhtml","nws"]},model:{iges:["igs","iges"],mesh:["msh","mesh","silo"],vrml:["wrl","vrml"],"x3d+vrml":["x3dv","x3dvz"],"x3d+xml":"x3dz","x3d+binary":["x3db","x3dbz"],"vnd.collada+xml":"dae","vnd.dwf":"dwf","vnd.gdl":"gdl","vnd.gtw":"gtw","vnd.mts":"mts","vnd.usdz+zip":"usdz","vnd.vtu":"vtu"},text:{"cache-manifest":["manifest","appcache"],calendar:["ics","icz","ifb"],css:"css",csv:"csv",h323:"323",html:["html","htm","shtml","stm"],iuls:"uls",plain:["txt","text","brf","conf","def","list","log","in","bas","diff","ksh"],richtext:"rtx",scriptlet:["sct","wsc"],texmacs:"tm","tab-separated-values":"tsv","vnd.sun.j2me.app-descriptor":"jad","vnd.wap.wml":"wml","vnd.wap.wmlscript":"wmls","x-bibtex":"bib","x-boo":"boo","x-c++hdr":["h++","hpp","hxx","hh"],"x-c++src":["c++","cpp","cxx","cc"],"x-component":"htc","x-dsrc":"d","x-diff":"patch","x-haskell":"hs","x-java":"java","x-literate-haskell":"lhs","x-moc":"moc","x-pascal":["p","pas","pp","inc"],"x-pcs-gcd":"gcd","x-python":"py","x-scala":"scala","x-setext":"etx","x-tcl":["tcl","tk"],"x-tex":["tex","ltx","sty","cls"],"x-vcalendar":"vcs","x-vcard":"vcf",n3:"n3","prs.lines.tag":"dsc",sgml:["sgml","sgm"],troff:["t","tr","roff","man","me","ms"],turtle:"ttl","uri-list":["uri","uris","urls"],vcard:"vcard","vnd.curl":"curl","vnd.curl.dcurl":"dcurl","vnd.curl.scurl":"scurl","vnd.curl.mcurl":"mcurl","vnd.dvb.subtitle":"sub","vnd.fly":"fly","vnd.fmi.flexstor":"flx","vnd.graphviz":"gv","vnd.in3d.3dml":"3dml","vnd.in3d.spot":"spot","x-asm":["s","asm"],"x-c":["c","h","dic"],"x-fortran":["f","for","f77","f90"],"x-opml":"opml","x-nfo":"nfo","x-sfv":"sfv","x-uuencode":"uu",webviewhtml:"htt",javascript:"js",json:"json",markdown:["md","markdown","mdown","markdn"],"vnd.wap.si":"si","vnd.wap.sl":"sl"},video:{avif:"avif","3gpp":"3gp",annodex:"axv",dl:"dl",dv:["dif","dv"],fli:"fli",gl:"gl",mpeg:["mpeg","mpg","mpe","m1v","m2v","mp2","mpa","mpv2"],mp4:["mp4","mp4v","mpg4"],quicktime:["qt","mov"],ogg:"ogv","vnd.mpegurl":["mxu","m4u"],"x-flv":"flv","x-la-asf":["lsf","lsx"],"x-mng":"mng","x-ms-asf":["asf","asx","asr"],"x-ms-wm":"wm","x-ms-wmv":"wmv","x-ms-wmx":"wmx","x-ms-wvx":"wvx","x-msvideo":"avi","x-sgi-movie":"movie","x-matroska":["mpv","mkv","mk3d","mks"],"3gpp2":"3g2",h261:"h261",h263:"h263",h264:"h264",jpeg:"jpgv",jpm:["jpm","jpgm"],mj2:["mj2","mjp2"],"vnd.dece.hd":["uvh","uvvh"],"vnd.dece.mobile":["uvm","uvvm"],"vnd.dece.pd":["uvp","uvvp"],"vnd.dece.sd":["uvs","uvvs"],"vnd.dece.video":["uvv","uvvv"],"vnd.dvb.file":"dvb","vnd.fvt":"fvt","vnd.ms-playready.media.pyv":"pyv","vnd.uvvu.mp4":["uvu","uvvu"],"vnd.vivo":"viv",webm:"webm","x-f4v":"f4v","x-m4v":"m4v","x-ms-vob":"vob","x-smv":"smv",mp2t:"ts"},"x-conference":{"x-cooltalk":"ice"},"x-world":{"x-vrml":["vrm","flr","wrz","xaf","xof"]}};(()=>{const i={};for(const e of Object.keys(kg))for(const t of Object.keys(kg[e])){const s=kg[e][t];if(typeof s=="string")i[s]=e+"/"+t;else for(let r=0;r<s.length;r++)i[s[r]]=e+"/"+t}return i})();const JE=[];for(let i=0;i<256;i++){let e=i;for(let t=0;t<8;t++)e&1?e=e>>>1^3988292384:e=e>>>1;JE[i]=e}class Og{constructor(e){this.crc=e||-1}append(e){let t=this.crc|0;for(let s=0,r=e.length|0;s<r;s++)t=t>>>8^JE[(t^e[s])&255];this.crc=t}get(){return~this.crc}}class YE extends TransformStream{constructor(){let e;const t=new Og;super({transform(s,r){t.append(s),r.enqueue(s)},flush(){const s=new Uint8Array(4);new DataView(s.buffer).setUint32(0,t.get()),e.value=s}}),e=this}}function pd(i){if(typeof TextEncoder==Bn){i=unescape(encodeURIComponent(i));const e=new Uint8Array(i.length);for(let t=0;t<e.length;t++)e[t]=i.charCodeAt(t);return e}else return new TextEncoder().encode(i)}const zs={concat(i,e){if(i.length===0||e.length===0)return i.concat(e);const t=i[i.length-1],s=zs.getPartial(t);return s===32?i.concat(e):zs._shiftRight(e,s,t|0,i.slice(0,i.length-1))},bitLength(i){const e=i.length;if(e===0)return 0;const t=i[e-1];return(e-1)*32+zs.getPartial(t)},clamp(i,e){if(i.length*32<e)return i;i=i.slice(0,Math.ceil(e/32));const t=i.length;return e=e&31,t>0&&e&&(i[t-1]=zs.partial(e,i[t-1]&2147483648>>e-1,1)),i},partial(i,e,t){return i===32?e:(t?e|0:e<<32-i)+i*1099511627776},getPartial(i){return Math.round(i/1099511627776)||32},_shiftRight(i,e,t,s){for(s===void 0&&(s=[]);e>=32;e-=32)s.push(t),t=0;if(e===0)return s.concat(i);for(let a=0;a<i.length;a++)s.push(t|i[a]>>>e),t=i[a]<<32-e;const r=i.length?i[i.length-1]:0,n=zs.getPartial(r);return s.push(zs.partial(e+n&31,e+n>32?t:s.pop(),1)),s}},fd={bytes:{fromBits(i){const t=zs.bitLength(i)/8,s=new Uint8Array(t);let r;for(let n=0;n<t;n++)n&3||(r=i[n/4]),s[n]=r>>>24,r<<=8;return s},toBits(i){const e=[];let t,s=0;for(t=0;t<i.length;t++)s=s<<8|i[t],(t&3)===3&&(e.push(s),s=0);return t&3&&e.push(zs.partial(8*(t&3),s)),e}}},XE={};XE.sha1=class{constructor(i){const e=this;e.blockSize=512,e._init=[1732584193,4023233417,2562383102,271733878,3285377520],e._key=[1518500249,1859775393,2400959708,3395469782],i?(e._h=i._h.slice(0),e._buffer=i._buffer.slice(0),e._length=i._length):e.reset()}reset(){const i=this;return i._h=i._init.slice(0),i._buffer=[],i._length=0,i}update(i){const e=this;typeof i=="string"&&(i=fd.utf8String.toBits(i));const t=e._buffer=zs.concat(e._buffer,i),s=e._length,r=e._length=s+zs.bitLength(i);if(r>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const n=new Uint32Array(t);let a=0;for(let o=e.blockSize+s-(e.blockSize+s&e.blockSize-1);o<=r;o+=e.blockSize)e._block(n.subarray(16*a,16*(a+1))),a+=1;return t.splice(0,16*a),e}finalize(){const i=this;let e=i._buffer;const t=i._h;e=zs.concat(e,[zs.partial(1,1)]);for(let s=e.length+2;s&15;s++)e.push(0);for(e.push(Math.floor(i._length/4294967296)),e.push(i._length|0);e.length;)i._block(e.splice(0,16));return i.reset(),t}_f(i,e,t,s){if(i<=19)return e&t|~e&s;if(i<=39)return e^t^s;if(i<=59)return e&t|e&s|t&s;if(i<=79)return e^t^s}_S(i,e){return e<<i|e>>>32-i}_block(i){const e=this,t=e._h,s=Array(80);for(let u=0;u<16;u++)s[u]=i[u];let r=t[0],n=t[1],a=t[2],o=t[3],l=t[4];for(let u=0;u<=79;u++){u>=16&&(s[u]=e._S(1,s[u-3]^s[u-8]^s[u-14]^s[u-16]));const h=e._S(5,r)+e._f(u,n,a,o)+l+s[u]+e._key[Math.floor(u/20)]|0;l=o,o=a,a=e._S(30,n),n=r,r=h}t[0]=t[0]+r|0,t[1]=t[1]+n|0,t[2]=t[2]+a|0,t[3]=t[3]+o|0,t[4]=t[4]+l|0}};const eV={};eV.aes=class{constructor(i){const e=this;e._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],e._tables[0][0][0]||e._precompute();const t=e._tables[0][4],s=e._tables[1],r=i.length;let n,a,o,l=1;if(r!==4&&r!==6&&r!==8)throw new Error("invalid aes key size");for(e._key=[a=i.slice(0),o=[]],n=r;n<4*r+28;n++){let u=a[n-1];(n%r===0||r===8&&n%r===4)&&(u=t[u>>>24]<<24^t[u>>16&255]<<16^t[u>>8&255]<<8^t[u&255],n%r===0&&(u=u<<8^u>>>24^l<<24,l=l<<1^(l>>7)*283)),a[n]=a[n-r]^u}for(let u=0;n;u++,n--){const h=a[u&3?n:n-4];n<=4||u<4?o[u]=h:o[u]=s[0][t[h>>>24]]^s[1][t[h>>16&255]]^s[2][t[h>>8&255]]^s[3][t[h&255]]}}encrypt(i){return this._crypt(i,0)}decrypt(i){return this._crypt(i,1)}_precompute(){const i=this._tables[0],e=this._tables[1],t=i[4],s=e[4],r=[],n=[];let a,o,l,u;for(let h=0;h<256;h++)n[(r[h]=h<<1^(h>>7)*283)^h]=h;for(let h=a=0;!t[h];h^=o||1,a=n[a]||1){let c=a^a<<1^a<<2^a<<3^a<<4;c=c>>8^c&255^99,t[h]=c,s[c]=h,u=r[l=r[o=r[h]]];let d=u*16843009^l*65537^o*257^h*16843008,f=r[c]*257^c*16843008;for(let y=0;y<4;y++)i[y][h]=f=f<<24^f>>>8,e[y][c]=d=d<<24^d>>>8}for(let h=0;h<5;h++)i[h]=i[h].slice(0),e[h]=e[h].slice(0)}_crypt(i,e){if(i.length!==4)throw new Error("invalid aes block size");const t=this._key[e],s=t.length/4-2,r=[0,0,0,0],n=this._tables[e],a=n[0],o=n[1],l=n[2],u=n[3],h=n[4];let c=i[0]^t[0],d=i[e?3:1]^t[1],f=i[2]^t[2],y=i[e?1:3]^t[3],v=4,m,g,b;for(let x=0;x<s;x++)m=a[c>>>24]^o[d>>16&255]^l[f>>8&255]^u[y&255]^t[v],g=a[d>>>24]^o[f>>16&255]^l[y>>8&255]^u[c&255]^t[v+1],b=a[f>>>24]^o[y>>16&255]^l[c>>8&255]^u[d&255]^t[v+2],y=a[y>>>24]^o[c>>16&255]^l[d>>8&255]^u[f&255]^t[v+3],v+=4,c=m,d=g,f=b;for(let x=0;x<4;x++)r[e?3&-x:x]=h[c>>>24]<<24^h[d>>16&255]<<16^h[f>>8&255]<<8^h[y&255]^t[v++],m=c,c=d,d=f,f=y,y=m;return r}};const ide={getRandomValues(i){const e=new Uint32Array(i.buffer),t=s=>{let r=987654321;const n=4294967295;return function(){return r=36969*(r&65535)+(r>>16)&n,s=18e3*(s&65535)+(s>>16)&n,(((r<<16)+s&n)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let s=0,r;s<i.length;s+=4){const n=t((r||Math.random())*4294967296);r=n()*987654071,e[s/4]=n()*4294967296|0}return i}},tV={};tV.ctrGladman=class{constructor(i,e){this._prf=i,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(i){return this.calculate(this._prf,i,this._iv)}incWord(i){if((i>>24&255)===255){let e=i>>16&255,t=i>>8&255,s=i&255;e===255?(e=0,t===255?(t=0,s===255?s=0:++s):++t):++e,i=0,i+=e<<16,i+=t<<8,i+=s}else i+=1<<24;return i}incCounter(i){(i[0]=this.incWord(i[0]))===0&&(i[1]=this.incWord(i[1]))}calculate(i,e,t){let s;if(!(s=e.length))return[];const r=zs.bitLength(e);for(let n=0;n<s;n+=4){this.incCounter(t);const a=i.encrypt(t);e[n]^=a[0],e[n+1]^=a[1],e[n+2]^=a[2],e[n+3]^=a[3]}return zs.clamp(e,r)}};const Ta={importKey(i){return new Ta.hmacSha1(fd.bytes.toBits(i))},pbkdf2(i,e,t,s){if(t=t||1e4,s<0||t<0)throw new Error("invalid params to pbkdf2");const r=(s>>5)+1<<2;let n,a,o,l,u;const h=new ArrayBuffer(r),c=new DataView(h);let d=0;const f=zs;for(e=fd.bytes.toBits(e),u=1;d<(r||1);u++){for(n=a=i.encrypt(f.concat(e,[u])),o=1;o<t;o++)for(a=i.encrypt(a),l=0;l<a.length;l++)n[l]^=a[l];for(o=0;d<(r||1)&&o<n.length;o++)c.setInt32(d,n[o]),d+=4}return h.slice(0,s/8)}};Ta.hmacSha1=class{constructor(i){const e=this,t=e._hash=XE.sha1,s=[[],[]];e._baseHash=[new t,new t];const r=e._baseHash[0].blockSize/32;i.length>r&&(i=new t().update(i).finalize());for(let n=0;n<r;n++)s[0][n]=i[n]^909522486,s[1][n]=i[n]^1549556828;e._baseHash[0].update(s[0]),e._baseHash[1].update(s[1]),e._resultHash=new t(e._baseHash[0])}reset(){const i=this;i._resultHash=new i._hash(i._baseHash[0]),i._updated=!1}update(i){const e=this;e._updated=!0,e._resultHash.update(i)}digest(){const i=this,e=i._resultHash.finalize(),t=new i._hash(i._baseHash[1]).update(e).finalize();return i.reset(),t}encrypt(i){if(this._updated)throw new Error("encrypt on already updated hmac called!");return this.update(i),this.digest(i)}};const rde=typeof crypto!=Bn&&typeof crypto.getRandomValues==ou,sV="Invalid password",iV="Invalid signature",rV="zipjs-abort-check-password";function nV(i){return rde?crypto.getRandomValues(i):ide.getRandomValues(i)}const ko=16,nde="raw",aV={name:"PBKDF2"},ade={name:"HMAC"},ode="SHA-1",lde=Object.assign({hash:ade},aV),Mg=Object.assign({iterations:1e3,hash:{name:ode}},aV),ude=["deriveBits"],lu=[8,12,16],uu=[16,24,32],Qn=10,hde=[0,0,0,0],md=typeof crypto!=Bn,hu=md&&crypto.subtle,oV=md&&typeof hu!=Bn,Ir=fd.bytes,cde=eV.aes,dde=tV.ctrGladman,pde=Ta.hmacSha1;let lV=md&&oV&&typeof hu.importKey==ou,uV=md&&oV&&typeof hu.deriveBits==ou;class fde extends TransformStream{constructor({password:e,rawPassword:t,signed:s,encryptionStrength:r,checkPasswordOnly:n}){super({start(){Object.assign(this,{ready:new Promise(a=>this.resolveReady=a),password:dV(e,t),signed:s,strength:r-1,pending:new Uint8Array})},async transform(a,o){const l=this,{password:u,strength:h,resolveReady:c,ready:d}=l;u?(await gde(l,h,u,$i(a,0,lu[h]+2)),a=$i(a,lu[h]+2),n?o.error(new Error(rV)):c()):await d;const f=new Uint8Array(a.length-Qn-(a.length-Qn)%ko);o.enqueue(hV(l,a,f,0,Qn,!0))},async flush(a){const{signed:o,ctr:l,hmac:u,pending:h,ready:c}=this;if(u&&l){await c;const d=$i(h,0,h.length-Qn),f=$i(h,h.length-Qn);let y=new Uint8Array;if(d.length){const v=du(Ir,d);u.update(v);const m=l.update(v);y=cu(Ir,m)}if(o){const v=$i(cu(Ir,u.digest()),0,Qn);for(let m=0;m<Qn;m++)if(v[m]!=f[m])throw new Error(iV)}a.enqueue(y)}}})}}class mde extends TransformStream{constructor({password:e,rawPassword:t,encryptionStrength:s}){let r;super({start(){Object.assign(this,{ready:new Promise(n=>this.resolveReady=n),password:dV(e,t),strength:s-1,pending:new Uint8Array})},async transform(n,a){const o=this,{password:l,strength:u,resolveReady:h,ready:c}=o;let d=new Uint8Array;l?(d=await vde(o,u,l),h()):await c;const f=new Uint8Array(d.length+n.length-n.length%ko);f.set(d,0),a.enqueue(hV(o,n,f,d.length,0))},async flush(n){const{ctr:a,hmac:o,pending:l,ready:u}=this;if(o&&a){await u;let h=new Uint8Array;if(l.length){const c=a.update(du(Ir,l));o.update(c),h=cu(Ir,c)}r.signature=cu(Ir,o.digest()).slice(0,Qn),n.enqueue(Ng(h,r.signature))}}}),r=this}}function hV(i,e,t,s,r,n){const{ctr:a,hmac:o,pending:l}=i,u=e.length-r;l.length&&(e=Ng(l,e),t=bde(t,u-u%ko));let h;for(h=0;h<=u-ko;h+=ko){const c=du(Ir,$i(e,h,h+ko));n&&o.update(c);const d=a.update(c);n||o.update(d),t.set(cu(Ir,d),h+s)}return i.pending=$i(e,h),t}async function gde(i,e,t,s){const r=await cV(i,e,t,$i(s,0,lu[e])),n=$i(s,lu[e]);if(r[0]!=n[0]||r[1]!=n[1])throw new Error(sV)}async function vde(i,e,t){const s=nV(new Uint8Array(lu[e])),r=await cV(i,e,t,s);return Ng(s,r)}async function cV(i,e,t,s){i.password=null;const r=await yde(nde,t,lde,!1,ude),n=await Cde(Object.assign({salt:s},Mg),r,8*(uu[e]*2+2)),a=new Uint8Array(n),o=du(Ir,$i(a,0,uu[e])),l=du(Ir,$i(a,uu[e],uu[e]*2)),u=$i(a,uu[e]*2);return Object.assign(i,{keys:{key:o,authentication:l,passwordVerification:u},ctr:new dde(new cde(o),Array.from(hde)),hmac:new pde(l)}),u}async function yde(i,e,t,s,r){if(lV)try{return await hu.importKey(i,e,t,s,r)}catch{return lV=!1,Ta.importKey(e)}else return Ta.importKey(e)}async function Cde(i,e,t){if(uV)try{return await hu.deriveBits(i,e,t)}catch{return uV=!1,Ta.pbkdf2(e,i.salt,Mg.iterations,t)}else return Ta.pbkdf2(e,i.salt,Mg.iterations,t)}function dV(i,e){return e===Ft?pd(i):e}function Ng(i,e){let t=i;return i.length+e.length&&(t=new Uint8Array(i.length+e.length),t.set(i,0),t.set(e,i.length)),t}function bde(i,e){if(e&&e>i.length){const t=i;i=new Uint8Array(e),i.set(t,0)}return i}function $i(i,e,t){return i.subarray(e,t)}function cu(i,e){return i.fromBits(e)}function du(i,e){return i.toBits(e)}const Oo=12;class wde extends TransformStream{constructor({password:e,passwordVerification:t,checkPasswordOnly:s}){super({start(){Object.assign(this,{password:e,passwordVerification:t}),mV(this,e)},transform(r,n){const a=this;if(a.password){const o=pV(a,r.subarray(0,Oo));if(a.password=null,o[Oo-1]!=a.passwordVerification)throw new Error(sV);r=r.subarray(Oo)}s?n.error(new Error(rV)):n.enqueue(pV(a,r))}})}}class xde extends TransformStream{constructor({password:e,passwordVerification:t}){super({start(){Object.assign(this,{password:e,passwordVerification:t}),mV(this,e)},transform(s,r){const n=this;let a,o;if(n.password){n.password=null;const l=nV(new Uint8Array(Oo));l[Oo-1]=n.passwordVerification,a=new Uint8Array(s.length+l.length),a.set(fV(n,l),0),o=Oo}else a=new Uint8Array(s.length),o=0;a.set(fV(n,s),o),r.enqueue(a)}})}}function pV(i,e){const t=new Uint8Array(e.length);for(let s=0;s<e.length;s++)t[s]=gV(i)^e[s],Fg(i,t[s]);return t}function fV(i,e){const t=new Uint8Array(e.length);for(let s=0;s<e.length;s++)t[s]=gV(i)^e[s],Fg(i,e[s]);return t}function mV(i,e){const t=[305419896,591751049,878082192];Object.assign(i,{keys:t,crcKey0:new Og(t[0]),crcKey2:new Og(t[2])});for(let s=0;s<e.length;s++)Fg(i,e.charCodeAt(s))}function Fg(i,e){let[t,s,r]=i.keys;i.crcKey0.append([e]),t=~i.crcKey0.get(),s=yV(Math.imul(yV(s+vV(t)),134775813)+1),i.crcKey2.append([s>>>24]),r=~i.crcKey2.get(),i.keys=[t,s,r]}function gV(i){const e=i.keys[2]|2;return vV(Math.imul(e,e^1)>>>8)}function vV(i){return i&255}function yV(i){return i&4294967295}const CV="deflate-raw";class Ede extends TransformStream{constructor(e,{chunkSize:t,CompressionStream:s,CompressionStreamNative:r}){super({});const{compressed:n,encrypted:a,useCompressionStream:o,zipCrypto:l,signed:u,level:h}=e,c=this;let d,f,y=bV(super.readable);(!a||l)&&u&&(d=new YE,y=Rr(y,d)),n&&(y=xV(y,o,{level:h,chunkSize:t},r,s)),a&&(l?y=Rr(y,new xde(e)):(f=new mde(e),y=Rr(y,f))),wV(c,y,()=>{let v;a&&!l&&(v=f.signature),(!a||l)&&u&&(v=new DataView(d.value.buffer).getUint32(0)),c.signature=v})}}class Vde extends TransformStream{constructor(e,{chunkSize:t,DecompressionStream:s,DecompressionStreamNative:r}){super({});const{zipCrypto:n,encrypted:a,signed:o,signature:l,compressed:u,useCompressionStream:h}=e;let c,d,f=bV(super.readable);a&&(n?f=Rr(f,new wde(e)):(d=new fde(e),f=Rr(f,d))),u&&(f=xV(f,h,{chunkSize:t},r,s)),(!a||n)&&o&&(c=new YE,f=Rr(f,c)),wV(this,f,()=>{if((!a||n)&&o){const y=new DataView(c.value.buffer);if(l!=y.getUint32(0,!1))throw new Error(iV)}})}}function bV(i){return Rr(i,new TransformStream({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function wV(i,e,t){e=Rr(e,new TransformStream({flush:t})),Object.defineProperty(i,"readable",{get(){return e}})}function xV(i,e,t,s,r){try{const n=e&&s?s:r;i=Rr(i,new n(CV,t))}catch{if(e)try{i=Rr(i,new r(CV,t))}catch{return i}else return i}return i}function Rr(i,e){return i.pipeThrough(e)}const Sde="message",Tde="start",Pde="pull",EV="data",Ide="ack",VV="close",SV="deflate",Rde="inflate";class Ade extends TransformStream{constructor(e,t){super({});const s=this,{codecType:r}=e;let n;r.startsWith(SV)?n=Ede:r.startsWith(Rde)&&(n=Vde);let a=0,o=0;const l=new n(e,t),u=super.readable,h=new TransformStream({transform(d,f){d&&d.length&&(o+=d.length,f.enqueue(d))},flush(){Object.assign(s,{inputSize:o})}}),c=new TransformStream({transform(d,f){d&&d.length&&(a+=d.length,f.enqueue(d))},flush(){const{signature:d}=l;Object.assign(s,{signature:d,outputSize:a,inputSize:o})}});Object.defineProperty(s,"readable",{get(){return u.pipeThrough(h).pipeThrough(l).pipeThrough(c)}})}}class Lde extends TransformStream{constructor(e){let t;super({transform:s,flush(r){t&&t.length&&r.enqueue(t)}});function s(r,n){if(t){const a=new Uint8Array(t.length+r.length);a.set(t),a.set(r,t.length),r=a,t=null}r.length>e?(n.enqueue(r.slice(0,e)),s(r.slice(e),n)):t=r}}}let TV=typeof Worker!=Bn;class qg{constructor(e,{readable:t,writable:s},{options:r,config:n,streamOptions:a,useWebWorkers:o,transferStreams:l,scripts:u},h){const{signal:c}=a;return Object.assign(e,{busy:!0,readable:t.pipeThrough(new Lde(n.chunkSize)).pipeThrough(new _de(t,a),{signal:c}),writable:s,options:Object.assign({},r),scripts:u,transferStreams:l,terminate(){return new Promise(d=>{const{worker:f,busy:y}=e;f?(y?e.resolveTerminated=d:(f.terminate(),d()),e.interface=null):d()})},onTaskFinished(){const{resolveTerminated:d}=e;d&&(e.resolveTerminated=null,e.terminated=!0,e.worker.terminate(),d()),e.busy=!1,h(e)}}),(o&&TV?Dde:PV)(e,n)}}class _de extends TransformStream{constructor(e,{onstart:t,onprogress:s,size:r,onend:n}){let a=0;super({async start(){t&&await Bg(t,r)},async transform(o,l){a+=o.length,s&&await Bg(s,a,r),l.enqueue(o)},async flush(){e.size=a,n&&await Bg(n,a)}})}}async function Bg(i,...e){try{await i(...e)}catch{}}function PV(i,e){return{run:()=>kde(i,e)}}function Dde(i,e){const{baseURL:t,chunkSize:s}=e;if(!i.interface){let r;try{r=Nde(i.scripts[0],t,i)}catch{return TV=!1,PV(i,e)}Object.assign(i,{worker:r,interface:{run:()=>Ode(i,{chunkSize:s})}})}return i.interface}async function kde({options:i,readable:e,writable:t,onTaskFinished:s},r){try{const n=new Ade(i,r);await e.pipeThrough(n).pipeTo(t,{preventClose:!0,preventAbort:!0});const{signature:a,inputSize:o,outputSize:l}=n;return{signature:a,inputSize:o,outputSize:l}}finally{s()}}async function Ode(i,e){let t,s;const r=new Promise((d,f)=>{t=d,s=f});Object.assign(i,{reader:null,writer:null,resolveResult:t,rejectResult:s,result:r});const{readable:n,options:a,scripts:o}=i,{writable:l,closed:u}=Mde(i.writable),h=gd({type:Tde,scripts:o.slice(1),options:a,config:e,readable:n,writable:l},i);h||Object.assign(i,{reader:n.getReader(),writer:l.getWriter()});const c=await r;return h||await l.getWriter().close(),await u,c}function Mde(i){let e;const t=new Promise(r=>e=r);return{writable:new WritableStream({async write(r){const n=i.getWriter();await n.ready,await n.write(r),n.releaseLock()},close(){e()},abort(r){return i.getWriter().abort(r)}}),closed:t}}let IV=!0,RV=!0;function Nde(i,e,t){const s={type:"module"};let r,n;typeof i==ou&&(i=i());try{r=new URL(i,e)}catch{r=i}if(IV)try{n=new Worker(r)}catch{IV=!1,n=new Worker(r,s)}else n=new Worker(r,s);return n.addEventListener(Sde,a=>Fde(a,t)),n}function gd(i,{worker:e,writer:t,onTaskFinished:s,transferStreams:r}){try{let{value:n,readable:a,writable:o}=i;const l=[];if(n&&(n.byteLength<n.buffer.byteLength?i.value=n.buffer.slice(0,n.byteLength):i.value=n.buffer,l.push(i.value)),r&&RV?(a&&l.push(a),o&&l.push(o)):i.readable=i.writable=null,l.length)try{return e.postMessage(i,l),!0}catch{RV=!1,i.readable=i.writable=null,e.postMessage(i)}else e.postMessage(i)}catch(n){throw t&&t.releaseLock(),s(),n}}async function Fde({data:i},e){const{type:t,value:s,messageId:r,result:n,error:a}=i,{reader:o,writer:l,resolveResult:u,rejectResult:h,onTaskFinished:c}=e;try{if(a){const{message:f,stack:y,code:v,name:m}=a,g=new Error(f);Object.assign(g,{stack:y,code:v,name:m}),d(g)}else{if(t==Pde){const{value:f,done:y}=await o.read();gd({type:EV,value:f,done:y,messageId:r},e)}t==EV&&(await l.ready,await l.write(new Uint8Array(s)),gd({type:Ide,messageId:r},e)),t==VV&&d(null,n)}}catch(f){gd({type:VV,messageId:r},e),d(f)}function d(f,y){f?h(f):u(y),l&&l.releaseLock(),c()}}let Pa=[];const $g=[];let AV=0;async function qde(i,e){const{options:t,config:s}=e,{transferStreams:r,useWebWorkers:n,useCompressionStream:a,codecType:o,compressed:l,signed:u,encrypted:h}=t,{workerScripts:c,maxWorkers:d}=s;e.transferStreams=r||r===Ft;const f=!l&&!u&&!h&&!e.transferStreams;return e.useWebWorkers=!f&&(n||n===Ft&&s.useWebWorkers),e.scripts=e.useWebWorkers&&c?c[o]:[],t.useCompressionStream=a||a===Ft&&s.useCompressionStream,(await y()).run();async function y(){const m=Pa.find(g=>!g.busy);if(m)return LV(m),new qg(m,i,e,v);if(Pa.length<d){const g={indexWorker:AV};return AV++,Pa.push(g),new qg(g,i,e,v)}else return new Promise(g=>$g.push({resolve:g,stream:i,workerOptions:e}))}function v(m){if($g.length){const[{resolve:g,stream:b,workerOptions:x}]=$g.splice(0,1);g(new qg(m,b,x,v))}else m.worker?(LV(m),Bde(m,e)):Pa=Pa.filter(g=>g!=m)}}function Bde(i,e){const{config:t}=e,{terminateWorkerTimeout:s}=t;Number.isFinite(s)&&s>=0&&(i.terminated?i.terminated=!1:i.terminateTimeout=setTimeout(async()=>{Pa=Pa.filter(r=>r!=i);try{await i.terminate()}catch{}},s))}function LV(i){const{terminateTimeout:e}=i;e&&(clearTimeout(e),i.terminateTimeout=null)}function $de(i,e={}){const t=`const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self,k=void 0,v="undefined",S="function";class z{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const C=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;C[e]=t}class x{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^C[255&(t^e[n])];this.t=t}get(){return~this.t}}class A extends p{constructor(){let e;const t=new x;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new i(4);new l(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,r.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s<e.length;s++)r.push(n|e[s]>>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},I={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)3&s||(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},k(e){const t=[];let n,r=0;for(n=0;n<e.length;n++)r=r<<8|e[n],3&~n||(t.push(r),r=0);return 3&n&&t.push(_.h(8*(3&n),r)),t}}},P=class{constructor(e){const t=this;t.blockSize=512,t.v=[1732584193,4023233417,2562383102,271733878,3285377520],t.S=[1518500249,1859775393,2400959708,3395469782],e?(t.C=e.C.slice(0),t.A=e.A.slice(0),t._=e._):t.reset()}reset(){const e=this;return e.C=e.v.slice(0),e.A=[],e._=0,e}update(e){const t=this;"string"==typeof e&&(e=I.I.k(e));const n=t.A=_.concat(t.A,e),r=t._,i=t._=r+_.l(e);if(i>9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.P(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t}D(){const e=this;let t=e.A;const n=e.C;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.P(t.splice(0,16));return e.reset(),n}V(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}R(e,t){return t<<e|t>>>32-e}P(t){const n=this,s=n.C,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.R(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.R(5,o)+n.V(e,c,f,a)+l+i[e]+n.S[r.floor(e/20)]|0;l=a,a=f,f=n.R(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}},D={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;i<e.length;i+=4){const e=n(4294967296*(s||r.random()));s=987654071*e(),t[i/4]=4294967296*e()|0}return e}},V={importKey:e=>new V.B(I.p.k(e)),M(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=I.p.k(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;a<c.length;a++)o[a]^=c[a];for(f=0;(i||1)>d&&f<o.length;f++)h.setInt32(d,o[f]),d+=4}return w.slice(0,r/8)},B:class{constructor(e){const t=this,n=t.U=P,r=[[],[]];t.K=[new n,new n];const s=t.K[0].blockSize/32;e.length>s&&(e=(new n).update(e).D());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.K[0].update(r[0]),t.K[1].update(r[1]),t.N=new n(t.K[0])}reset(){const e=this;e.N=new e.U(e.K[0]),e.O=!1}update(e){this.O=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.U(e.K[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.O)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},R=typeof h!=v&&typeof h.getRandomValues==S,B="Invalid password",E="Invalid signature",M="zipjs-abort-check-password";function U(e){return R?h.getRandomValues(e):D.getRandomValues(e)}const K=16,N={name:"PBKDF2"},O=t.assign({hash:{name:"HMAC"}},N),T=t.assign({iterations:1e3,hash:{name:"SHA-1"}},N),W=["deriveBits"],j=[8,12,16],H=[16,24,32],L=10,F=[0,0,0,0],q=typeof h!=v,G=q&&h.subtle,J=q&&typeof G!=v,Q=I.p,X=class{constructor(e){const t=this;t.T=[[[],[],[],[],[]],[[],[],[],[],[]]],t.T[0][0][0]||t.W();const n=t.T[0][4],r=t.T[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.S=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.j(e,0)}decrypt(e){return this.j(e,1)}W(){const e=this.T[0],t=this.T[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}j(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.S[t],r=n.length/4-2,i=[0,0,0,0],o=this.T[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},Y=class{constructor(e,t){this.H=e,this.L=t,this.F=t}reset(){this.F=this.L}update(e){return this.q(this.H,e,this.F)}G(e){if(255&~(e>>24))e+=1<<24;else{let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},Z=V.B;let $=q&&J&&typeof G.importKey==S,ee=q&&J&&typeof G.deriveBits==S;class te extends p{constructor({password:e,rawPassword:n,signed:r,encryptionStrength:o,checkPasswordOnly:c}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:ie(e,n),signed:r,Y:o-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:f,ready:a}=n;r?(await(async(e,t,n,r)=>{const i=await se(e,t,n,ce(r,0,j[t])),o=ce(r,j[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(B)})(n,o,r,ce(e,0,j[o]+2)),e=ce(e,j[o]+2),c?t.error(new s(M)):f()):await a;const l=new i(e.length-L-(e.length-L)%K);t.enqueue(re(n,e,l,0,L,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;if(r&&n){await c;const f=ce(o,0,o.length-L),a=ce(o,o.length-L);let l=new i;if(f.length){const e=ae(Q,f);r.update(e);const t=n.update(e);l=fe(Q,t)}if(t){const e=ce(fe(Q,r.digest()),0,L);for(let t=0;L>t;t++)if(e[t]!=a[t])throw new s(E)}e.enqueue(l)}}})}}class ne extends p{constructor({password:e,rawPassword:n,encryptionStrength:r}){let s;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:ie(e,n),Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=U(new i(j[t]));return oe(r,await se(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%K);a.set(f,0),t.enqueue(re(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:r,ready:o}=this;if(n&&t){await o;let c=new i;if(r.length){const e=t.update(ae(Q,r));n.update(e),c=fe(Q,e)}s.signature=fe(Q,n.digest()).slice(0,L),e.enqueue(oe(c,s.signature))}}}),s=this}}function re(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=oe(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%K)),u=0;l-K>=u;u+=K){const e=ae(Q,ce(t,u,u+K));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set(fe(Q,s),u+r)}return e.pending=ce(t,u),n}async function se(n,r,s,o){n.password=null;const c=await(async(e,t,n,r,s)=>{if(!$)return V.importKey(t);try{return await G.importKey("raw",t,n,!1,s)}catch(e){return $=!1,V.importKey(t)}})(0,s,O,0,W),f=await(async(e,t,n)=>{if(!ee)return V.M(t,e.salt,T.iterations,n);try{return await G.deriveBits(e,t,n)}catch(r){return ee=!1,V.M(t,e.salt,T.iterations,n)}})(t.assign({salt:o},T),c,8*(2*H[r]+2)),a=new i(f),l=ae(Q,ce(a,0,H[r])),u=ae(Q,ce(a,H[r],2*H[r])),w=ce(a,2*H[r]);return t.assign(n,{keys:{key:l,ee:u,passwordVerification:w},Z:new Y(new X(l),e.from(F)),$:new Z(u)}),w}function ie(e,t){return t===k?(e=>{if(typeof w==v){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new w).encode(e)})(e):t}function oe(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function ce(e,t,n){return e.subarray(t,n)}function fe(e,t){return e.m(t)}function ae(e,t){return e.k(t)}class le extends p{constructor({password:e,passwordVerification:n,checkPasswordOnly:r}){super({start(){t.assign(this,{password:e,passwordVerification:n}),de(this,e)},transform(e,t){const n=this;if(n.password){const t=we(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(B);e=e.subarray(12)}r?t.error(new s(M)):t.enqueue(we(n,e))}})}}class ue extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),de(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=U(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(he(n,t),0),s=12}else r=new i(e.length),s=0;r.set(he(n,e),s),t.enqueue(r)}})}}function we(e,t){const n=new i(t.length);for(let r=0;r<t.length;r++)n[r]=ye(e)^t[r],pe(e,n[r]);return n}function he(e,t){const n=new i(t.length);for(let r=0;r<t.length;r++)n[r]=ye(e)^t[r],pe(e,t[r]);return n}function de(e,n){const r=[305419896,591751049,878082192];t.assign(e,{keys:r,te:new x(r[0]),ne:new x(r[2])});for(let t=0;t<n.length;t++)pe(e,n.charCodeAt(t))}function pe(e,t){let[n,s,i]=e.keys;e.te.append([t]),n=~e.te.get(),s=be(r.imul(be(s+me(n)),134775813)+1),e.ne.append([s>>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ye(e){const t=2|e.keys[2];return me(r.imul(t,1^t)>>>8)}function me(e){return 255&e}function be(e){return 4294967295&e}const ge="deflate-raw";class ke extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=Se(super.readable);i&&!c||!f||(w=new A,d=xe(d,w)),s&&(d=Ce(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=xe(d,new ue(e)):(h=new ne(e),d=xe(d,h))),ze(u,d,(()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=new l(w.value.buffer).getUint32(0)),u.signature=e}))}}class ve extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=Se(super.readable);o&&(i?d=xe(d,new le(e)):(h=new te(e),d=xe(d,h))),a&&(d=Ce(d,u,{chunkSize:t},r,n)),o&&!i||!c||(w=new A,d=xe(d,w)),ze(this,d,(()=>{if((!o||i)&&c){const e=new l(w.value.buffer);if(f!=e.getUint32(0,!1))throw new s(E)}}))}}function Se(e){return xe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ze(e,n,r){n=xe(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function Ce(e,t,n,r,s){try{e=xe(e,new(t&&r?r:s)(ge,n))}catch(r){if(!t)return e;try{e=xe(e,new s(ge,n))}catch(t){return e}}return e}function xe(e,t){return e.pipeThrough(t)}const Ae="data",_e="close";class Ie extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=ke:s.startsWith("inflate")&&(i=ve);let o=0,c=0;const f=new i(e,n),a=super.readable,l=new p({transform(e,t){e&&e.length&&(c+=e.length,t.enqueue(e))},flush(){t.assign(r,{inputSize:c})}}),u=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=f;t.assign(r,{signature:e,outputSize:o,inputSize:c})}});t.defineProperty(r,"readable",{get:()=>a.pipeThrough(l).pipeThrough(f).pipeThrough(u)})}}class Pe extends p{constructor(e){let t;super({transform:function n(r,s){if(t){const e=new i(t.length+r.length);e.set(t),e.set(r,t.length),r=e,t=null}r.length>e?(s.enqueue(r.slice(0,e)),n(r.slice(e),s)):t=r},flush(e){t&&t.length&&e.enqueue(t)}})}}const De=new a,Ve=new a;let Re,Be=0,Ee=!0;async function Me(e){try{const{options:t,scripts:r,config:s}=e;if(r&&r.length)try{Ee?importScripts.apply(k,r):await Ue(r)}catch(e){Ee=!1,await Ue(r)}self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new z(self.Deflate)),self.Inflate&&(s.DecompressionStream=new z(self.Inflate));const i={highWaterMark:1},o=e.readable||new y({async pull(e){const t=new u((e=>De.set(Be,e)));Ke({type:"pull",messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));Ve.set(Be,t),Ke({type:Ae,value:e,messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new Ie(t,s);Re=new AbortController;const{signal:a}=Re;await o.pipeThrough(f).pipeThrough(new Pe(s.chunkSize)).pipeTo(c,{signal:a,preventClose:!0,preventAbort:!0}),await c.getWriter().close();const{signature:l,inputSize:w,outputSize:h}=f;Ke({type:_e,result:{signature:l,inputSize:w,outputSize:h}})}catch(e){Ne(e)}}async function Ue(e){for(const t of e)await import(t)}function Ke(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Ne(e=new s("Unknown error")){const{message:t,stack:n,code:r,name:i}=e;d({error:{message:t,stack:n,code:r,name:i}})}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&Me(e),t==Ae){const e=De.get(n);De.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=Ve.get(n);Ve.delete(n),e()}t==_e&&Re.abort()}catch(e){Ne(e)}}));const Oe=-2;function Te(t){return We(t.map((([t,n])=>new e(t).fill(n,0,t))))}function We(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?We(n):n)),[])}const je=[0,1,2,3].concat(...Te([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function He(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function Le(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}He.ke=[0,1,2,3,4,5,6,7].concat(...Te([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),He.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],He.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],He.ze=e=>256>e?je[e]:je[256+(e>>>7)],He.Ce=[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],He.xe=[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],He.Ae=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],He._e=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Fe=Te([[144,8],[112,9],[24,7],[8,8]]);Le.Ie=We([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Fe[t]])));const qe=Te([[30,5]]);function Ge(e,t,n,r,s){const i=this;i.Pe=e,i.De=t,i.Ve=n,i.Re=r,i.Be=s}Le.Ee=We([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,qe[t]]))),Le.Me=new Le(Le.Ie,He.Ce,257,286,15),Le.Ue=new Le(Le.Ee,He.xe,0,30,15),Le.Ke=new Le(null,He.Ae,0,19,7);const Je=[new Ge(0,0,0,0,0),new Ge(4,4,8,4,1),new Ge(4,5,16,8,1),new Ge(4,6,32,32,1),new Ge(4,4,16,16,2),new Ge(8,16,32,32,2),new Ge(8,16,128,128,2),new Ge(8,32,128,256,2),new Ge(32,128,258,1024,2),new Ge(32,258,258,4096,2)],Qe=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Xe=113,Ye=666,Ze=262;function $e(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function et(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,C,x,A,_,I,P,D,V,R,B,E,M,U;const K=new He,N=new He,O=new He;let T,W,j,H,L,F;function q(){let t;for(t=0;286>t;t++)E[2*t]=0;for(t=0;30>t;t++)M[2*t]=0;for(t=0;19>t;t++)U[2*t]=0;E[512]=1,e.we=e.he=0,W=j=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++i<o&&n==s||(c>i?U[2*n]+=i:0!==n?(n!=r&&U[2*n]++,U[32]++):i>10?U[36]++:U[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;F>16-r?(n=e,L|=n<<F&65535,Q(L),L=n>>>16-F,F+=r-16):(L|=e<<F&65535,F+=r)}function Y(e,t){const n=2*e;X(65535&t[n],65535&t[n+1])}function Z(e,t){let n,r,s=-1,i=e[1],o=0,c=7,f=4;for(0===i&&(c=138,f=3),n=0;t>=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,U)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,U),o--),Y(16,U),X(o-3,2)):o>10?(Y(18,U),X(o-11,7)):(Y(17,U),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==F?(Q(L),L=0,F=0):8>F||(J(255&L),L>>>=8,F-=8)}function ee(t,n){let s,i,o;if(e.Oe[W]=t,e.Te[W]=255&n,W++,0===t?E[2*n]++:(j++,t--,E[2*(He.ke[n]+256+1)]++,M[2*He.ze(t)]++),!(8191&W)&&D>2){for(s=8*W,i=C-k,o=0;30>o;o++)s+=M[2*o]*(5+He.xe[o]);if(s>>>=3,j<r.floor(W/2)&&s<r.floor(i/2))return!0}return W==T-1}function te(t,n){let r,s,i,o,c=0;if(0!==W)do{r=e.Oe[c],s=e.Te[c],c++,0===r?Y(s,t):(i=He.ke[s],Y(i+256+1,t),o=He.Ce[i],0!==o&&(s-=He.ve[i],X(s,o)),r--,i=He.ze(r),Y(i,n),o=He.xe[i],0!==o&&(r-=He.Se[i],X(r,o)))}while(W>c);Y(256,t),H=t[513]}function ne(){F>8?Q(L):F>0&&J(255&L),L=0,F=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),H=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;D>0?(K.re(e),N.re(e),o=(()=>{let t;for(G(E,K.de),G(M,N.de),O.re(e),t=18;t>=3&&0===U[2*He._e[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(Le.Ie,Le.Ee)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(U[2*He._e[r]+1],3);Z(E,e-1),Z(M,t-1)})(K.de+1,N.de+1,o+1),te(E,M)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,C-k,n),k=C,t.We()}function ie(){let e,n,r,s;do{if(s=w-A-C,0===s&&0===C&&0===A)s=f;else if(-1==s)s--;else if(C>=f+f-Ze){u.set(u.subarray(f,f+f),0),x-=f,C-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.je)return;e=t.He(u,C+A,s),A+=e,3>A||(p=255&u[C],p=(p<<g^255&u[C+1])&b)}while(Ze>A&&0!==t.je)}function oe(e){let t,n,r=I,s=C,i=_;const o=C>f-Ze?C-(f-Ze):0;let c=B;const a=l,w=C+258;let d=u[s+i-1],p=u[s+i];R>_||(r>>=2),c>A&&(c=A);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(x=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>A?A:i}e.ue=[],e.ge=[],e.le=[],E=[],M=[],U=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i<e.fe&&$e(t,r[i+1],r[i],e.ue)&&i++,!$e(t,s,r[i],e.ue));)r[n]=r[i],n=i,i<<=1;r[n]=s},e.Le=(t,S,x,W,j,G)=>(W||(W=8),j||(j=8),G||(G=0),t.Fe=null,-1==S&&(S=6),1>j||j>9||8!=W||9>x||x>15||0>S||S>9||0>G||G>2?Oe:(t.qe=e,a=x,f=1<<a,l=f-1,m=j+7,y=1<<m,b=y-1,g=r.floor((m+3-1)/3),u=new i(2*f),h=[],d=[],T=1<<j+6,e.Ne=new i(4*T),s=4*T,e.Oe=new o(T),e.Te=new i(T),D=S,V=G,(t=>(t.Ge=t.Je=0,t.Fe=null,e.pending=0,e.Qe=0,n=Xe,c=0,K.se=E,K.oe=Le.Me,N.se=M,N.oe=Le.Ue,O.se=U,O.oe=Le.Ke,L=0,F=0,H=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;P=Je[D].De,R=Je[D].Pe,B=Je[D].Ve,I=Je[D].Re,C=0,k=0,A=0,v=_=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&n!=Xe&&n!=Ye?Oe:(e.Te=null,e.Oe=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,n==Xe?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?Oe:(Je[D].Be!=Je[t].Be&&0!==e.Ge&&(r=e.Ze(1)),D!=t&&(D=t,P=Je[D].De,R=Je[D].Pe,B=Je[D].Ve,I=Je[D].Re),V=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return Oe;if(3>i)return 0;for(i>f-Ze&&(i=f-Ze,o=r-i),u.set(t.subarray(o,o+i),0),C=i,k=i,p=255&u[0],p=(p<<g^255&u[1])&b,s=0;i-3>=s;s++)p=(p<<g^255&u[s+2])&b,h[s&l]=d[p],d[p]=s;return 0},e.Ze=(r,i)=>{let o,w,m,I,R;if(i>4||0>i)return Oe;if(!r.et||!r.tt&&0!==r.je||n==Ye&&4!=i)return r.Fe=Qe[4],Oe;if(0===r.nt)return r.Fe=Qe[7],-5;var B;if(t=r,I=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(D-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==C&&(w|=32),w+=31-w%31,n=Xe,J((B=w)>>8&255),J(255&B)),0!==e.pending){if(t.We(),0===t.nt)return c=-1,0}else if(0===t.je&&I>=i&&4!=i)return t.Fe=Qe[7],-5;if(n==Ye&&0!==t.je)return r.Fe=Qe[7],-5;if(0!==t.je||0!==A||0!=i&&n!=Ye){switch(R=-1,Je[D].Be){case 0:R=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=A){if(ie(),0===A&&0==e)return 0;if(0===A)break}if(C+=A,A=0,n=k+r,(0===C||C>=n)&&(A=C-n,C=n,se(!1),0===t.nt))return 0;if(C-k>=f-Ze&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:R=(e=>{let n,r=0;for(;;){if(Ze>A){if(ie(),Ze>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<<g^255&u[C+2])&b,r=65535&d[p],h[C&l]=d[p],d[p]=C),0===r||(C-r&65535)>f-Ze||2!=V&&(v=oe(r)),3>v)n=ee(0,255&u[C]),A--,C++;else if(n=ee(C-x,v-3),A-=v,v>P||3>A)C+=v,v=0,p=255&u[C],p=(p<<g^255&u[C+1])&b;else{v--;do{C++,p=(p<<g^255&u[C+2])&b,r=65535&d[p],h[C&l]=d[p],d[p]=C}while(0!=--v);C++}if(n&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 2:R=(e=>{let n,r,s=0;for(;;){if(Ze>A){if(ie(),Ze>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<<g^255&u[C+2])&b,s=65535&d[p],h[C&l]=d[p],d[p]=C),_=v,S=x,v=2,0!==s&&P>_&&f-Ze>=(C-s&65535)&&(2!=V&&(v=oe(s)),5>=v&&(1==V||3==v&&C-x>4096)&&(v=2)),3>_||v>_)if(0!==z){if(n=ee(0,255&u[C-1]),n&&se(!1),C++,A--,0===t.nt)return 0}else z=1,C++,A--;else{r=C+A-3,n=ee(C-1-S,_-3),A-=_-1,_-=2;do{++C>r||(p=(p<<g^255&u[C+2])&b,s=65535&d[p],h[C&l]=d[p],d[p]=C)}while(0!=--_);if(z=0,v=2,C++,n&&(se(!1),0===t.nt))return 0}}return 0!==z&&(n=ee(0,255&u[C-1]),z=0),se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i)}if(2!=R&&3!=R||(n=Ye),0==R||2==R)return 0===t.nt&&(c=-1),0;if(1==R){if(1==i)X(2,3),Y(256,Le.Ie),$(),9>1+H+10-F&&(X(2,3),Y(256,Le.Ie),$()),H=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.We(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function tt(){const e=this;e.rt=0,e.st=0,e.je=0,e.Ge=0,e.nt=0,e.Je=0}function nt(e){const t=new tt,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Le(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.je=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s("deflating: "+t.Fe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.subarray(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.je>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]?new i(w[0]):new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s("deflating: "+t.Fe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.je>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}tt.prototype={Le(e,t){const n=this;return n.qe=new et,t||(t=15),n.qe.Le(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):Oe},Xe(){const e=this;if(!e.qe)return Oe;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):Oe},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):Oe},He(e,t,n){const r=this;let s=r.je;return s>n&&(s=n),0===s?0:(r.je-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},We(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const rt=-2,st=-3,it=-5,ot=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],ct=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],ft=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],at=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],lt=[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,112,112],ut=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],wt=[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];function ht(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,C,x,A,_,I,P;C=0,g=o;do{n[e[t+C]]++,C++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,I=1<<k;g>k;k++,I<<=1)if(0>(I-=n[k]))return st;if(0>(I-=n[g]))return st;for(n[g]+=I,i[1]=k=0,C=1,_=2;0!=--g;)i[_]=k+=n[C],_++,C++;g=0,C=0;do{0!==(k=e[t+C])&&(d[i[k]++]=g),C++}while(++g<o);for(o=i[m],i[0]=g=0,C=0,b=-1,A=-S,s[0]=0,x=0,P=0;m>=v;v++)for(p=n[v];0!=p--;){for(;v>A+S;){if(b++,A+=S,P=m-A,P=P>S?S:P,(y=1<<(k=v-A))>p+1&&(y-=p+1,_=v,P>k))for(;++k<P&&(y<<=1)>n[++_];)y-=n[_];if(P=1<<k,h[0]+P>1440)return st;s[b]=x=h[0],h[0]+=P,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>A-S,r[2]=x-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=x}for(r[1]=v-A,o>C?d[C]<c?(r[0]=256>d[C]?0:96,r[2]=d[C++]):(r[0]=a[d[C]-c]+16+64,r[2]=f[d[C++]-c]):r[0]=192,y=1<<v-A,k=g>>>A;P>k;k+=y)w.set(r,3*(x+k));for(k=1<<v-1;g&k;k>>>=1)g^=k;for(g^=k,z=(1<<A)-1;(g&z)!=i[b];)b--,A-=S,z=(1<<A)-1}return 0!==I&&1!=m?it:0}function c(o){let c;for(e||(e=[],t=[],n=new f(16),r=[],s=new f(15),i=new f(16)),t.length<o&&(t=[]),c=0;o>c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),a==st?f.Fe="oversubscribed dynamic bit lengths tree":a!=it&&0!==r[0]||(f.Fe="incomplete dynamic bit lengths tree",a=st),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,at,lt,a,i,u,e,t),0!=h||0===i[0]?(h==st?w.Fe="oversubscribed literal/length tree":-4!=h&&(w.Fe="incomplete literal/length tree",h=st),h):(c(288),h=o(s,n,r,0,ut,wt,l,f,u,e,t),0!=h||0===f[0]&&n>257?(h==st?w.Fe="oversubscribed distance tree":h==it?(w.Fe="incomplete distance tree",h=st):-4!=h&&(w.Fe="empty distance tree with lengths",h=st),h):0)}}function dt(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.je,w=o.ct,h=o.ft,y=o.write,m=y<o.read?o.read-y-1:o.end-y,b=ot[e],g=ot[t];do{for(;20>h;)p--,w|=(255&c.lt(d++))<<h,h+=8;if(f=w&b,a=n,l=r,z=3*(l+f),0!==(u=a[z]))for(;;){if(w>>=a[z+1],h-=a[z+1],16&u){for(u&=15,k=a[z+2]+(w&ot[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<<h,h+=8;for(f=w&g,a=s,l=i,z=3*(l+f),u=a[z];;){if(w>>=a[z+1],h-=a[z+1],16&u){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<<h,h+=8;if(v=a[z+2]+(w&ot[u]),w>>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(64&u)return c.Fe="invalid distance code",k=c.je-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.je=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,st;f+=a[z+2],f+=w&ot[u],z=3*(l+f),u=a[z]}break}if(64&u)return 32&u?(k=c.je-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.je=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Fe="invalid literal/length code",k=c.je-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.je=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,st);if(f+=a[z+2],f+=w&ot[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.je-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.je=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,C,x=0,A=0,_=0;for(_=y.rt,v=y.je,x=e.ct,A=e.ft,S=e.write,z=S<e.read?e.read-S-1:e.end-S;;)switch(t){case 0:if(z>=258&&v>=10&&(e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,m=p(u,w,r,h,s,d,e,y),_=y.rt,v=y.je,x=e.ct,A=e.ft,S=e.write,z=S<e.read?e.read-S-1:e.end-S,0!=m)){t=1==m?7:9;break}c=u,n=r,o=h,t=1;case 1:for(b=c;b>A;){if(0===v)return e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.ht(y,m);m=0,v--,x|=(255&y.lt(_++))<<A,A+=8}if(g=3*(o+(x&ot[b])),x>>>=n[g+1],A-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(16&k){a=15&k,i=n[g+2],t=2;break}if(!(64&k)){c=k,o=g/3+n[g+2];break}if(32&k){t=7;break}return t=9,y.Fe="invalid literal/length code",m=st,e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.ht(y,m);case 2:for(b=a;b>A;){if(0===v)return e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.ht(y,m);m=0,v--,x|=(255&y.lt(_++))<<A,A+=8}i+=x&ot[b],x>>=b,A-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>A;){if(0===v)return e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.ht(y,m);m=0,v--,x|=(255&y.lt(_++))<<A,A+=8}if(g=3*(o+(x&ot[b])),x>>=n[g+1],A-=n[g+1],k=n[g],16&k){a=15&k,l=n[g+2],t=4;break}if(!(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Fe="invalid distance code",m=st,e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.ht(y,m);case 4:for(b=a;b>A;){if(0===v)return e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.ht(y,m);m=0,v--,x|=(255&y.lt(_++))<<A,A+=8}l+=x&ot[b],x>>=b,A-=b,t=5;case 5:for(C=S-l;0>C;)C+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z&&(e.write=S,m=e.ht(y,m),S=e.write,z=S<e.read?e.read-S-1:e.end-S,S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z)))return e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.ht(y,m);e.ut[S++]=e.ut[C++],z--,C==e.end&&(C=0),i--}t=0;break;case 6:if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z&&(e.write=S,m=e.ht(y,m),S=e.write,z=S<e.read?e.read-S-1:e.end-S,S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z)))return e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.ht(y,m);m=0,e.ut[S++]=f,z--,t=0;break;case 7:if(A>7&&(A-=8,v++,_--),e.write=S,m=e.ht(y,m),S=e.write,z=S<e.read?e.read-S-1:e.end-S,e.read!=e.write)return e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.ht(y,m);t=8;case 8:return m=1,e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.ht(y,m);case 9:return m=st,e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.ht(y,m);default:return m=rt,e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.ht(y,m)}},e.dt=()=>{}}ht.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=ct,r[0]=ft,0);const pt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function yt(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new dt;let h=0,d=new f(4320);const p=new ht;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&t==it&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&t==it&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.je,f=n.ct,y=n.ft,g=n.write,k=g<n.read?n.read-g-1:n.end-g;;){let S,z,C,x,A,_,I,P;switch(s){case 0:for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<<y,y+=8}switch(i=7&f,h=1&i,i>>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],C=[[]],x=[[]],ht.yt(S,z,C,x),w.init(S[0],z[0],C[0],0,x[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Fe="invalid block type",t=st,n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<<y,y+=8}if((~f>>>16&65535)!=(65535&f))return s=9,e.Fe="invalid stored block lengths",t=st,n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=g<n.read?n.read-g-1:n.end-g),0===k&&(n.write=g,t=n.ht(e,t),g=n.write,k=g<n.read?n.read-g-1:n.end-g,g==n.end&&0!==n.read&&(g=0,k=g<n.read?n.read-g-1:n.end-g),0===k)))return n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(t=0,i=o,i>b&&(i=b),i>k&&(i=k),n.ut.set(e.He(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<<y,y+=8}if(c=i=16383&f,(31&i)>29||(i>>5&31)>29)return s=9,e.Fe="too many length or distance symbols",t=st,n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.length<i)r=[];else for(v=0;i>v;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<<y,y+=8}r[pt[a++]]=7&f,f>>>=3,y-=3}for(;19>a;)r[pt[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return(t=i)==st&&(r=null,s=9),n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<<y,y+=8}if(i=d[3*(u[0]+(f&ot[i]))+1],w=d[3*(u[0]+(f&ot[i]))+2],16>w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<<y,y+=8}if(f>>>=i,y-=i,o+=f&ot[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Fe="invalid bit length repeat",t=st,n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,A=[],_=[],I=[],P=[],A[0]=9,_[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,A,_,I,P,d,e),0!=i)return i==st&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(A[0],_[0],d,I[0],d,P[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.je,f=n.ct,y=n.ft,g=n.write,k=g<n.read?n.read-g-1:n.end-g,0===h){s=0;break}s=7;case 7:if(n.write=g,t=n.ht(e,t),g=n.write,k=g<n.read?n.read-g-1:n.end-g,n.read!=n.write)return n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);s=8;case 8:return t=1,n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);case 9:return t=st,n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);default:return t=rt,n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}}},n.dt=e=>{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const mt=13,bt=[0,0,255,255];function gt(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Fe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):rt}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e.Ct=0,e.xt=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.At=(n,r)=>(n.Fe=null,e.vt=null,8>r||r>15?(e.xt(n),rt):(e.Ct=r,n.kt.vt=new yt(n,1<<r),t(n),0)),e._t=(e,t)=>{let n,r;if(!e||!e.kt||!e.tt)return rt;const s=e.kt;for(t=4==t?it:0,n=it;;)switch(s.mode){case 0:if(0===e.je)return n;if(n=t,e.je--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=mt,e.Fe="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s.Ct){s.mode=mt,e.Fe="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.je)return n;if(n=t,e.je--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=mt,e.Fe="incorrect header check",s.marker=5;break}if(!(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.je)return n;n=t,e.je--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.je)return n;n=t,e.je--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.je)return n;n=t,e.je--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.je?n:(n=t,e.je--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=mt,e.Fe="need dictionary",s.marker=0,rt;case 7:if(n=s.vt.wt(e,n),n==st){s.mode=mt,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.je=0,1;case mt:return st;default:return rt}},e.It=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return rt;const i=e.kt;return s<1<<i.Ct||(s=(1<<i.Ct)-1,r=n-s),i.vt.bt(t,r,s),i.mode=7,0},e.Pt=e=>{let n,r,s,i,o;if(!e||!e.kt)return rt;const c=e.kt;if(c.mode!=mt&&(c.mode=mt,c.marker=0),0===(n=e.je))return it;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==bt[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.je=n,c.marker=s,4!=s?st:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Dt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():rt}function kt(){}function vt(e){const t=new kt,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.At(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.je=e.length;do{if(t.st=0,t.nt=n,0!==t.je||c||(t.rt=0,c=!0),a=t._t(0),c&&a===it){if(0!==t.je)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Fe);if((c||1===a)&&t.je===e.length)throw new s("inflating: bad input");t.st&&(t.st===n?f.push(new i(o)):f.push(o.subarray(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.je>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]?new i(f[0]):new i,l}},this.flush=()=>{t.xt()}}kt.prototype={At(e){const t=this;return t.kt=new gt,e||(e=15),t.kt.At(t,e)},_t(e){const t=this;return t.kt?t.kt._t(t,e):rt},xt(){const e=this;if(!e.kt)return rt;const t=e.kt.xt(e);return e.kt=null,t},Pt(){const e=this;return e.kt?e.kt.Pt(e):rt},It(e,t){const n=this;return n.kt?n.kt.It(n,e,t):rt},lt(e){return this.tt[e]},He(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=nt,self.Inflate=vt};
|
|
10272
|
+
*/var mhe={themeName:"contrast",colorPalette:"light",isPanelless:!1,cssVariables:{"--sjs-general-backcolor":"rgba(255, 255, 255, 1)","--sjs-general-backcolor-dark":"rgba(255, 216, 77, 1)","--sjs-general-backcolor-dim":"rgba(255, 216, 77, 1)","--sjs-general-backcolor-dim-light":"rgba(255, 216, 77, 1)","--sjs-general-backcolor-dim-dark":"rgba(255, 216, 77, 1)","--sjs-general-forecolor":"rgba(0, 0, 0, 1)","--sjs-general-forecolor-light":"rgba(0, 0, 0, 1)","--sjs-general-dim-forecolor":"rgba(0, 0, 0, 1)","--sjs-general-dim-forecolor-light":"rgba(0, 0, 0, 1)","--sjs-primary-backcolor":"rgba(0, 0, 0, 1)","--sjs-primary-backcolor-light":"rgba(255, 216, 77, 1)","--sjs-primary-backcolor-dark":"rgba(83, 83, 83, 1)","--sjs-primary-forecolor":"rgba(255, 255, 255, 1)","--sjs-primary-forecolor-light":"rgba(255, 255, 255, 0.25)","--sjs-base-unit":"8px","--sjs-corner-radius":"4px","--sjs-secondary-backcolor":"rgba(255, 152, 20, 1)","--sjs-secondary-backcolor-light":"rgba(255, 152, 20, 0.1)","--sjs-secondary-backcolor-semi-light":"rgba(255, 152, 20, 0.25)","--sjs-secondary-forecolor":"rgba(255, 255, 255, 1)","--sjs-secondary-forecolor-light":"rgba(255, 255, 255, 0.25)","--sjs-shadow-small":"0px 0px 0px 2px rgba(0, 0, 0, 1)","--sjs-shadow-small-reset":"0px 0px 0px 0px rgba(0, 0, 0, 1)","--sjs-shadow-medium":"0px 0px 0px 2px rgba(0, 0, 0, 1)","--sjs-shadow-large":"0px 6px 0px 0px rgba(0, 0, 0, 1)","--sjs-shadow-inner":"0px 0px 0px 2px rgba(0, 0, 0, 1),0px -2px 0px 2px rgba(0, 0, 0, 1)","--sjs-shadow-inner-reset":"0px 0px 0px 0px rgba(0, 0, 0, 1),0px 0px 0px 0px rgba(0, 0, 0, 1)","--sjs-border-light":"rgba(0, 0, 0, 0.2)","--sjs-border-default":"rgba(0, 0, 0, 1)","--sjs-border-inside":"rgba(0, 0, 0, 0.16)","--sjs-special-red":"rgba(156, 2, 39, 1)","--sjs-special-red-light":"rgba(229, 10, 62, 0.1)","--sjs-special-red-forecolor":"rgba(255, 255, 255, 1)","--sjs-special-green":"rgba(25, 179, 148, 1)","--sjs-special-green-light":"rgba(25, 179, 148, 0.1)","--sjs-special-green-forecolor":"rgba(255, 255, 255, 1)","--sjs-special-blue":"rgba(67, 127, 217, 1)","--sjs-special-blue-light":"rgba(67, 127, 217, 0.1)","--sjs-special-blue-forecolor":"rgba(255, 255, 255, 1)","--sjs-special-yellow":"rgba(255, 152, 20, 1)","--sjs-special-yellow-light":"rgba(255, 152, 20, 0.1)","--sjs-special-yellow-forecolor":"rgba(255, 255, 255, 1)","--sjs-article-font-xx-large-textDecoration":"none","--sjs-article-font-xx-large-fontWeight":"700","--sjs-article-font-xx-large-fontStyle":"normal","--sjs-article-font-xx-large-fontStretch":"normal","--sjs-article-font-xx-large-letterSpacing":"0","--sjs-article-font-xx-large-lineHeight":"64px","--sjs-article-font-xx-large-paragraphIndent":"0px","--sjs-article-font-xx-large-textCase":"none","--sjs-article-font-x-large-textDecoration":"none","--sjs-article-font-x-large-fontWeight":"700","--sjs-article-font-x-large-fontStyle":"normal","--sjs-article-font-x-large-fontStretch":"normal","--sjs-article-font-x-large-letterSpacing":"0","--sjs-article-font-x-large-lineHeight":"56px","--sjs-article-font-x-large-paragraphIndent":"0px","--sjs-article-font-x-large-textCase":"none","--sjs-article-font-large-textDecoration":"none","--sjs-article-font-large-fontWeight":"700","--sjs-article-font-large-fontStyle":"normal","--sjs-article-font-large-fontStretch":"normal","--sjs-article-font-large-letterSpacing":"0","--sjs-article-font-large-lineHeight":"40px","--sjs-article-font-large-paragraphIndent":"0px","--sjs-article-font-large-textCase":"none","--sjs-article-font-medium-textDecoration":"none","--sjs-article-font-medium-fontWeight":"700","--sjs-article-font-medium-fontStyle":"normal","--sjs-article-font-medium-fontStretch":"normal","--sjs-article-font-medium-letterSpacing":"0","--sjs-article-font-medium-lineHeight":"32px","--sjs-article-font-medium-paragraphIndent":"0px","--sjs-article-font-medium-textCase":"none","--sjs-article-font-default-textDecoration":"none","--sjs-article-font-default-fontWeight":"400","--sjs-article-font-default-fontStyle":"normal","--sjs-article-font-default-fontStretch":"normal","--sjs-article-font-default-letterSpacing":"0","--sjs-article-font-default-lineHeight":"28px","--sjs-article-font-default-paragraphIndent":"0px","--sjs-article-font-default-textCase":"none"}};ni("Quest","session"),Qs("Quest",(i,e,t,s)=>{var o,l;const r={};let n=0;const a=((o=i.surveyJson)==null?void 0:o.pages)||[{elements:((l=i.surveyJson)==null?void 0:l.elements)||[]}];for(const u of a)for(const h of u.elements||[]){if(!h.name)continue;const c=t.answerQuestion(h,s);s=c.participantState,r[h.name]=c.value,n+=c.duration??0}return{responseData:r,participantState:s,duration:n}},{answerQuestion:(i,e)=>{var s,r,n,a,o;let t;switch(i.type){case"rating":{const l=i.rateMin??1,u=i.rateMax??5;t=l+Math.floor(X.uniform(0,u-l+1));break}case"boolean":t=X.uniform(0,1)>.5;break;case"text":case"comment":t="simulated_response";break;case"radiogroup":case"dropdown":{const l=(r=i.choices)==null?void 0:r[Math.floor(X.uniform(0,((s=i.choices)==null?void 0:s.length)||0))];t=l!==void 0?typeof l=="object"?l.value:l:null;break}case"checkbox":{if((n=i.choices)!=null&&n.length){const l=1+Math.floor(X.uniform(0,i.choices.length));t=[...i.choices].sort(()=>X.uniform(0,1)-.5).slice(0,l).map(u=>typeof u=="object"?u.value:u)}break}case"matrix":{(a=i.rows)!=null&&a.length&&((o=i.columns)!=null&&o.length)&&(t=Object.fromEntries(i.rows.map(l=>{const u=i.columns[Math.floor(X.uniform(0,i.columns.length))];return[typeof l=="object"?l.value:l,typeof u=="object"?u.value:u]})));break}default:t=null}return{value:t,participantState:e,duration:X.uniform(1e3,5e3)}}});const ghe=(i,e)=>{class t extends gs{getType(){return i}}z.addClass(i,[],function(){return new t("")},"question");class s extends cs{constructor(n){super(n),this.state={value:this.questionBase.value}}get question(){return this.questionBase}renderElement(){const n=e;return R.jsx(n,{setValue:a=>{this.question.value=a}})}}rt.Instance.registerQuestion(i,r=>T.createElement(s,r))};function U5({next:i,surveyJson:e,customQuestions:t={},theme:s,containerClass:r}){Object.keys(t).forEach(o=>{ghe(o,t[o])});const n=new ze({...e,css:{...Rc,root:"sd-root-modern custom-root"}});n.applyTheme(s??mhe);const a=T.useCallback(o=>{i({...o.data})},[i]);return n.onComplete.add(a),R.jsxs("div",{className:`min-h-screen ${r??""}`,children:[!r&&R.jsx("div",{className:"absolute inset-0 -z-10 h-full w-full bg-white bg-[radial-gradient(#e5e7eb_1px,transparent_1px)] [background-size:16px_16px]"}),R.jsx("div",{className:`max-w-4xl mx-auto px-4${r?" quest-custom-bg":""}`,children:R.jsx(x5,{model:n})})]})}var eu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(i){return this.listeners.add(i),this.onSubscribe(),()=>{this.listeners.delete(i),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Wc=typeof window>"u"||"Deno"in globalThis;function rr(){}function vhe(i,e){return typeof i=="function"?i(e):i}function yhe(i){return typeof i=="number"&&i>=0&&i!==1/0}function Che(i,e){return Math.max(i+(e||0)-Date.now(),0)}function z5(i,e){return typeof i=="function"?i(e):i}function bhe(i,e){return typeof i=="function"?i(e):i}function j5(i,e){const{type:t="all",exact:s,fetchStatus:r,predicate:n,queryKey:a,stale:o}=i;if(a){if(s){if(e.queryHash!==mg(a,e.options))return!1}else if(!tu(e.queryKey,a))return!1}if(t!=="all"){const l=e.isActive();if(t==="active"&&!l||t==="inactive"&&l)return!1}return!(typeof o=="boolean"&&e.isStale()!==o||r&&r!==e.state.fetchStatus||n&&!n(e))}function W5(i,e){const{exact:t,status:s,predicate:r,mutationKey:n}=i;if(n){if(!e.options.mutationKey)return!1;if(t){if(Ea(e.options.mutationKey)!==Ea(n))return!1}else if(!tu(e.options.mutationKey,n))return!1}return!(s&&e.state.status!==s||r&&!r(e))}function mg(i,e){return((e==null?void 0:e.queryKeyHashFn)||Ea)(i)}function Ea(i){return JSON.stringify(i,(e,t)=>vg(t)?Object.keys(t).sort().reduce((s,r)=>(s[r]=t[r],s),{}):t)}function tu(i,e){return i===e?!0:typeof i!=typeof e?!1:i&&e&&typeof i=="object"&&typeof e=="object"?!Object.keys(e).some(t=>!tu(i[t],e[t])):!1}function gg(i,e){if(i===e)return i;const t=G5(i)&&G5(e);if(t||vg(i)&&vg(e)){const s=t?i:Object.keys(i),r=s.length,n=t?e:Object.keys(e),a=n.length,o=t?[]:{};let l=0;for(let u=0;u<a;u++){const h=t?u:n[u];(!t&&s.includes(h)||t)&&i[h]===void 0&&e[h]===void 0?(o[h]=void 0,l++):(o[h]=gg(i[h],e[h]),o[h]===i[h]&&i[h]!==void 0&&l++)}return r===a&&l===r?i:o}return e}function whe(i,e){if(!e||Object.keys(i).length!==Object.keys(e).length)return!1;for(const t in i)if(i[t]!==e[t])return!1;return!0}function G5(i){return Array.isArray(i)&&i.length===Object.keys(i).length}function vg(i){if(!K5(i))return!1;const e=i.constructor;if(e===void 0)return!0;const t=e.prototype;return!(!K5(t)||!t.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(i)!==Object.prototype)}function K5(i){return Object.prototype.toString.call(i)==="[object Object]"}function xhe(i){return new Promise(e=>{setTimeout(e,i)})}function Ehe(i,e,t){if(typeof t.structuralSharing=="function")return t.structuralSharing(i,e);if(t.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return gg(i,e)}catch(s){console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${t.queryHash}]: ${s}`)}return gg(i,e)}return e}function Vhe(i,e,t=0){const s=[...i,e];return t&&s.length>t?s.slice(1):s}function She(i,e,t=0){const s=[e,...i];return t&&s.length>t?s.slice(0,-1):s}var Gc=Symbol();function Z5(i,e){return process.env.NODE_ENV!=="production"&&i.queryFn===Gc&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${i.queryHash}'`),!i.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!i.queryFn||i.queryFn===Gc?()=>Promise.reject(new Error(`Missing queryFn: '${i.queryHash}'`)):i.queryFn}var The=(N4=class extends eu{constructor(){super();ot(this,Na);ot(this,Jn);ot(this,Wo);je(this,Wo,e=>{if(!Wc&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){Z(this,Jn)||this.setEventListener(Z(this,Wo))}onUnsubscribe(){var e;this.hasListeners()||((e=Z(this,Jn))==null||e.call(this),je(this,Jn,void 0))}setEventListener(e){var t;je(this,Wo,e),(t=Z(this,Jn))==null||t.call(this),je(this,Jn,e(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(e){Z(this,Na)!==e&&(je(this,Na,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){var e;return typeof Z(this,Na)=="boolean"?Z(this,Na):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Na=new WeakMap,Jn=new WeakMap,Wo=new WeakMap,N4),J5=new The,Phe=(F4=class extends eu{constructor(){super();ot(this,Go,!0);ot(this,Yn);ot(this,Ko);je(this,Ko,e=>{if(!Wc&&window.addEventListener){const t=()=>e(!0),s=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",s)}}})}onSubscribe(){Z(this,Yn)||this.setEventListener(Z(this,Ko))}onUnsubscribe(){var e;this.hasListeners()||((e=Z(this,Yn))==null||e.call(this),je(this,Yn,void 0))}setEventListener(e){var t;je(this,Ko,e),(t=Z(this,Yn))==null||t.call(this),je(this,Yn,e(this.setOnline.bind(this)))}setOnline(e){Z(this,Go)!==e&&(je(this,Go,e),this.listeners.forEach(s=>{s(e)}))}isOnline(){return Z(this,Go)}},Go=new WeakMap,Yn=new WeakMap,Ko=new WeakMap,F4),Kc=new Phe;function Ihe(){let i,e;const t=new Promise((r,n)=>{i=r,e=n});t.status="pending",t.catch(()=>{});function s(r){Object.assign(t,r),delete t.resolve,delete t.reject}return t.resolve=r=>{s({status:"fulfilled",value:r}),i(r)},t.reject=r=>{s({status:"rejected",reason:r}),e(r)},t}function Rhe(i){return Math.min(1e3*2**i,3e4)}function Y5(i){return(i??"online")==="online"?Kc.isOnline():!0}var X5=class extends Error{constructor(i){super("CancelledError"),this.revert=i==null?void 0:i.revert,this.silent=i==null?void 0:i.silent}};function yg(i){return i instanceof X5}function eE(i){let e=!1,t=0,s=!1,r;const n=Ihe(),a=v=>{var m;s||(d(new X5(v)),(m=i.abort)==null||m.call(i))},o=()=>{e=!0},l=()=>{e=!1},u=()=>J5.isFocused()&&(i.networkMode==="always"||Kc.isOnline())&&i.canRun(),h=()=>Y5(i.networkMode)&&i.canRun(),c=v=>{var m;s||(s=!0,(m=i.onSuccess)==null||m.call(i,v),r==null||r(),n.resolve(v))},d=v=>{var m;s||(s=!0,(m=i.onError)==null||m.call(i,v),r==null||r(),n.reject(v))},f=()=>new Promise(v=>{var m;r=g=>{(s||u())&&v(g)},(m=i.onPause)==null||m.call(i)}).then(()=>{var v;r=void 0,s||(v=i.onContinue)==null||v.call(i)}),y=()=>{if(s)return;let v;const m=t===0?i.initialPromise:void 0;try{v=m??i.fn()}catch(g){v=Promise.reject(g)}Promise.resolve(v).then(c).catch(g=>{var _;if(s)return;const b=i.retry??(Wc?0:3),x=i.retryDelay??Rhe,P=typeof x=="function"?x(t,g):x,L=b===!0||typeof b=="number"&&t<b||typeof b=="function"&&b(t,g);if(e||!L){d(g);return}t++,(_=i.onFail)==null||_.call(i,t,g),xhe(P).then(()=>u()?void 0:f()).then(()=>{e?d(g):y()})})};return{promise:n,cancel:a,continue:()=>(r==null||r(),n),cancelRetry:o,continueRetry:l,canStart:h,start:()=>(h()?y():f().then(y),n)}}function Ahe(){let i=[],e=0,t=o=>{o()},s=o=>{o()},r=o=>setTimeout(o,0);const n=o=>{e?i.push(o):r(()=>{t(o)})},a=()=>{const o=i;i=[],o.length&&r(()=>{s(()=>{o.forEach(l=>{t(l)})})})};return{batch:o=>{let l;e++;try{l=o()}finally{e--,e||a()}return l},batchCalls:o=>(...l)=>{n(()=>{o(...l)})},schedule:n,setNotifyFunction:o=>{t=o},setBatchNotifyFunction:o=>{s=o},setScheduler:o=>{r=o}}}var Rs=Ahe(),tE=(q4=class{constructor(){ot(this,Fa)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),yhe(this.gcTime)&&je(this,Fa,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(i){this.gcTime=Math.max(this.gcTime||0,i??(Wc?1/0:5*60*1e3))}clearGcTimeout(){Z(this,Fa)&&(clearTimeout(Z(this,Fa)),je(this,Fa,void 0))}},Fa=new WeakMap,q4),Lhe=(B4=class extends tE{constructor(e){super();ot(this,cr);ot(this,Zo);ot(this,Jo);ot(this,Ui);ot(this,Bs);ot(this,_u);ot(this,qa);je(this,qa,!1),je(this,_u,e.defaultOptions),this.setOptions(e.options),this.observers=[],je(this,Ui,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,je(this,Zo,Dhe(this.options)),this.state=e.state??Z(this,Zo),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=Z(this,Bs))==null?void 0:e.promise}setOptions(e){this.options={...Z(this,_u),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&Z(this,Ui).remove(this)}setData(e,t){const s=Ehe(this.state.data,e,this.options);return as(this,cr,dn).call(this,{data:s,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),s}setState(e,t){as(this,cr,dn).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var s,r;const t=(s=Z(this,Bs))==null?void 0:s.promise;return(r=Z(this,Bs))==null||r.cancel(e),t?t.then(rr).catch(rr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(Z(this,Zo))}isActive(){return this.observers.some(e=>bhe(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Gc||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!Che(this.state.dataUpdatedAt,e)}onFocus(){var t;const e=this.observers.find(s=>s.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(t=Z(this,Bs))==null||t.continue()}onOnline(){var t;const e=this.observers.find(s=>s.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(t=Z(this,Bs))==null||t.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),Z(this,Ui).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(Z(this,Bs)&&(Z(this,qa)?Z(this,Bs).cancel({revert:!0}):Z(this,Bs).cancelRetry()),this.scheduleGc()),Z(this,Ui).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||as(this,cr,dn).call(this,{type:"invalidate"})}fetch(e,t){var l,u,h;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(Z(this,Bs))return Z(this,Bs).continueRetry(),Z(this,Bs).promise}if(e&&this.setOptions(e),!this.options.queryFn){const c=this.observers.find(d=>d.options.queryFn);c&&this.setOptions(c.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const s=new AbortController,r=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(je(this,qa,!0),s.signal)})},n=()=>{const c=Z5(this.options,t),d={queryKey:this.queryKey,meta:this.meta};return r(d),je(this,qa,!1),this.options.persister?this.options.persister(c,d,this):c(d)},a={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:n};r(a),(l=this.options.behavior)==null||l.onFetch(a,this),je(this,Jo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&as(this,cr,dn).call(this,{type:"fetch",meta:(h=a.fetchOptions)==null?void 0:h.meta});const o=c=>{var d,f,y,v;yg(c)&&c.silent||as(this,cr,dn).call(this,{type:"error",error:c}),yg(c)||((f=(d=Z(this,Ui).config).onError)==null||f.call(d,c,this),(v=(y=Z(this,Ui).config).onSettled)==null||v.call(y,this.state.data,c,this)),this.scheduleGc()};return je(this,Bs,eE({initialPromise:t==null?void 0:t.initialPromise,fn:a.fetchFn,abort:s.abort.bind(s),onSuccess:c=>{var d,f,y,v;if(c===void 0){process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),o(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(c)}catch(m){o(m);return}(f=(d=Z(this,Ui).config).onSuccess)==null||f.call(d,c,this),(v=(y=Z(this,Ui).config).onSettled)==null||v.call(y,c,this.state.error,this),this.scheduleGc()},onError:o,onFail:(c,d)=>{as(this,cr,dn).call(this,{type:"failed",failureCount:c,error:d})},onPause:()=>{as(this,cr,dn).call(this,{type:"pause"})},onContinue:()=>{as(this,cr,dn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),Z(this,Bs).start()}},Zo=new WeakMap,Jo=new WeakMap,Ui=new WeakMap,Bs=new WeakMap,_u=new WeakMap,qa=new WeakMap,cr=new WeakSet,dn=function(e){const t=s=>{switch(e.type){case"failed":return{...s,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,..._he(s.data,this.options),fetchMeta:e.meta??null};case"success":return{...s,data:e.data,dataUpdateCount:s.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=e.error;return yg(r)&&r.revert&&Z(this,Jo)?{...Z(this,Jo),fetchStatus:"idle"}:{...s,error:r,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...e.state}}};this.state=t(this.state),Rs.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),Z(this,Ui).notify({query:this,type:"updated",action:e})})},B4);function _he(i,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Y5(e.networkMode)?"fetching":"paused",...i===void 0&&{error:null,status:"pending"}}}function Dhe(i){const e=typeof i.initialData=="function"?i.initialData():i.initialData,t=e!==void 0,s=t?typeof i.initialDataUpdatedAt=="function"?i.initialDataUpdatedAt():i.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:t?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var khe=($4=class extends eu{constructor(e={}){super();ot(this,Mr);this.config=e,je(this,Mr,new Map)}build(e,t,s){const r=t.queryKey,n=t.queryHash??mg(r,t);let a=this.get(n);return a||(a=new Lhe({cache:this,queryKey:r,queryHash:n,options:e.defaultQueryOptions(t),state:s,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){Z(this,Mr).has(e.queryHash)||(Z(this,Mr).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=Z(this,Mr).get(e.queryHash);t&&(e.destroy(),t===e&&Z(this,Mr).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Rs.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return Z(this,Mr).get(e)}getAll(){return[...Z(this,Mr).values()]}find(e){const t={exact:!0,...e};return this.getAll().find(s=>j5(t,s))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(s=>j5(e,s)):t}notify(e){Rs.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Rs.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Rs.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Mr=new WeakMap,$4),Ohe=(H4=class extends tE{constructor(e){super();ot(this,Fr);ot(this,Nr);ot(this,Ks);ot(this,Ba);this.mutationId=e.mutationId,je(this,Ks,e.mutationCache),je(this,Nr,[]),this.state=e.state||sE(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){Z(this,Nr).includes(e)||(Z(this,Nr).push(e),this.clearGcTimeout(),Z(this,Ks).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){je(this,Nr,Z(this,Nr).filter(t=>t!==e)),this.scheduleGc(),Z(this,Ks).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){Z(this,Nr).length||(this.state.status==="pending"?this.scheduleGc():Z(this,Ks).remove(this))}continue(){var e;return((e=Z(this,Ba))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var r,n,a,o,l,u,h,c,d,f,y,v,m,g,b,x,P,L,_,k;je(this,Ba,eE({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(S,A)=>{as(this,Fr,aa).call(this,{type:"failed",failureCount:S,error:A})},onPause:()=>{as(this,Fr,aa).call(this,{type:"pause"})},onContinue:()=>{as(this,Fr,aa).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>Z(this,Ks).canRun(this)}));const t=this.state.status==="pending",s=!Z(this,Ba).canStart();try{if(!t){as(this,Fr,aa).call(this,{type:"pending",variables:e,isPaused:s}),await((n=(r=Z(this,Ks).config).onMutate)==null?void 0:n.call(r,e,this));const A=await((o=(a=this.options).onMutate)==null?void 0:o.call(a,e));A!==this.state.context&&as(this,Fr,aa).call(this,{type:"pending",context:A,variables:e,isPaused:s})}const S=await Z(this,Ba).start();return await((u=(l=Z(this,Ks).config).onSuccess)==null?void 0:u.call(l,S,e,this.state.context,this)),await((c=(h=this.options).onSuccess)==null?void 0:c.call(h,S,e,this.state.context)),await((f=(d=Z(this,Ks).config).onSettled)==null?void 0:f.call(d,S,null,this.state.variables,this.state.context,this)),await((v=(y=this.options).onSettled)==null?void 0:v.call(y,S,null,e,this.state.context)),as(this,Fr,aa).call(this,{type:"success",data:S}),S}catch(S){try{throw await((g=(m=Z(this,Ks).config).onError)==null?void 0:g.call(m,S,e,this.state.context,this)),await((x=(b=this.options).onError)==null?void 0:x.call(b,S,e,this.state.context)),await((L=(P=Z(this,Ks).config).onSettled)==null?void 0:L.call(P,void 0,S,this.state.variables,this.state.context,this)),await((k=(_=this.options).onSettled)==null?void 0:k.call(_,void 0,S,e,this.state.context)),S}finally{as(this,Fr,aa).call(this,{type:"error",error:S})}}finally{Z(this,Ks).runNext(this)}}},Nr=new WeakMap,Ks=new WeakMap,Ba=new WeakMap,Fr=new WeakSet,aa=function(e){const t=s=>{switch(e.type){case"failed":return{...s,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...s,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:e.error,failureCount:s.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Rs.batch(()=>{Z(this,Nr).forEach(s=>{s.onMutationUpdate(e)}),Z(this,Ks).notify({mutation:this,type:"updated",action:e})})},H4);function sE(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Mhe=(Q4=class extends eu{constructor(e={}){super();ot(this,Ti);ot(this,Du);this.config=e,je(this,Ti,new Map),je(this,Du,Date.now())}build(e,t,s){const r=new Ohe({mutationCache:this,mutationId:++np(this,Du)._,options:e.defaultMutationOptions(t),state:s});return this.add(r),r}add(e){const t=Zc(e),s=Z(this,Ti).get(t)??[];s.push(e),Z(this,Ti).set(t,s),this.notify({type:"added",mutation:e})}remove(e){var s;const t=Zc(e);if(Z(this,Ti).has(t)){const r=(s=Z(this,Ti).get(t))==null?void 0:s.filter(n=>n!==e);r&&(r.length===0?Z(this,Ti).delete(t):Z(this,Ti).set(t,r))}this.notify({type:"removed",mutation:e})}canRun(e){var s;const t=(s=Z(this,Ti).get(Zc(e)))==null?void 0:s.find(r=>r.state.status==="pending");return!t||t===e}runNext(e){var s;const t=(s=Z(this,Ti).get(Zc(e)))==null?void 0:s.find(r=>r!==e&&r.state.isPaused);return(t==null?void 0:t.continue())??Promise.resolve()}clear(){Rs.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...Z(this,Ti).values()].flat()}find(e){const t={exact:!0,...e};return this.getAll().find(s=>W5(t,s))}findAll(e={}){return this.getAll().filter(t=>W5(e,t))}notify(e){Rs.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Rs.batch(()=>Promise.all(e.map(t=>t.continue().catch(rr))))}},Ti=new WeakMap,Du=new WeakMap,Q4);function Zc(i){var e;return((e=i.options.scope)==null?void 0:e.id)??String(i.mutationId)}function iE(i){return{onFetch:(e,t)=>{var h,c,d,f,y;const s=e.options,r=(d=(c=(h=e.fetchOptions)==null?void 0:h.meta)==null?void 0:c.fetchMore)==null?void 0:d.direction,n=((f=e.state.data)==null?void 0:f.pages)||[],a=((y=e.state.data)==null?void 0:y.pageParams)||[];let o={pages:[],pageParams:[]},l=0;const u=async()=>{let v=!1;const m=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(e.signal.aborted?v=!0:e.signal.addEventListener("abort",()=>{v=!0}),e.signal)})},g=Z5(e.options,e.fetchOptions),b=async(x,P,L)=>{if(v)return Promise.reject();if(P==null&&x.pages.length)return Promise.resolve(x);const _={queryKey:e.queryKey,pageParam:P,direction:L?"backward":"forward",meta:e.options.meta};m(_);const k=await g(_),{maxPages:S}=e.options,A=L?She:Vhe;return{pages:A(x.pages,k,S),pageParams:A(x.pageParams,P,S)}};if(r&&n.length){const x=r==="backward",P=x?Nhe:rE,L={pages:n,pageParams:a},_=P(s,L);o=await b(L,_,x)}else{const x=i??n.length;do{const P=l===0?a[0]??s.initialPageParam:rE(s,o);if(l>0&&P==null)break;o=await b(o,P),l++}while(l<x)}return o};e.options.persister?e.fetchFn=()=>{var v,m;return(m=(v=e.options).persister)==null?void 0:m.call(v,u,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},t)}:e.fetchFn=u}}}function rE(i,{pages:e,pageParams:t}){const s=e.length-1;return e.length>0?i.getNextPageParam(e[s],e,t[s],t):void 0}function Nhe(i,{pages:e,pageParams:t}){var s;return e.length>0?(s=i.getPreviousPageParam)==null?void 0:s.call(i,e[0],e,t[0],t):void 0}var Fhe=(U4=class{constructor(i={}){ot(this,Yt);ot(this,Xn);ot(this,ea);ot(this,Yo);ot(this,Xo);ot(this,ta);ot(this,el);ot(this,tl);je(this,Yt,i.queryCache||new khe),je(this,Xn,i.mutationCache||new Mhe),je(this,ea,i.defaultOptions||{}),je(this,Yo,new Map),je(this,Xo,new Map),je(this,ta,0)}mount(){np(this,ta)._++,Z(this,ta)===1&&(je(this,el,J5.subscribe(async i=>{i&&(await this.resumePausedMutations(),Z(this,Yt).onFocus())})),je(this,tl,Kc.subscribe(async i=>{i&&(await this.resumePausedMutations(),Z(this,Yt).onOnline())})))}unmount(){var i,e;np(this,ta)._--,Z(this,ta)===0&&((i=Z(this,el))==null||i.call(this),je(this,el,void 0),(e=Z(this,tl))==null||e.call(this),je(this,tl,void 0))}isFetching(i){return Z(this,Yt).findAll({...i,fetchStatus:"fetching"}).length}isMutating(i){return Z(this,Xn).findAll({...i,status:"pending"}).length}getQueryData(i){var t;const e=this.defaultQueryOptions({queryKey:i});return(t=Z(this,Yt).get(e.queryHash))==null?void 0:t.state.data}ensureQueryData(i){const e=this.getQueryData(i.queryKey);if(e===void 0)return this.fetchQuery(i);{const t=this.defaultQueryOptions(i),s=Z(this,Yt).build(this,t);return i.revalidateIfStale&&s.isStaleByTime(z5(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(e)}}getQueriesData(i){return Z(this,Yt).findAll(i).map(({queryKey:e,state:t})=>{const s=t.data;return[e,s]})}setQueryData(i,e,t){const s=this.defaultQueryOptions({queryKey:i}),r=Z(this,Yt).get(s.queryHash),n=r==null?void 0:r.state.data,a=vhe(e,n);if(a!==void 0)return Z(this,Yt).build(this,s).setData(a,{...t,manual:!0})}setQueriesData(i,e,t){return Rs.batch(()=>Z(this,Yt).findAll(i).map(({queryKey:s})=>[s,this.setQueryData(s,e,t)]))}getQueryState(i){var t;const e=this.defaultQueryOptions({queryKey:i});return(t=Z(this,Yt).get(e.queryHash))==null?void 0:t.state}removeQueries(i){const e=Z(this,Yt);Rs.batch(()=>{e.findAll(i).forEach(t=>{e.remove(t)})})}resetQueries(i,e){const t=Z(this,Yt),s={type:"active",...i};return Rs.batch(()=>(t.findAll(i).forEach(r=>{r.reset()}),this.refetchQueries(s,e)))}cancelQueries(i={},e={}){const t={revert:!0,...e},s=Rs.batch(()=>Z(this,Yt).findAll(i).map(r=>r.cancel(t)));return Promise.all(s).then(rr).catch(rr)}invalidateQueries(i={},e={}){return Rs.batch(()=>{if(Z(this,Yt).findAll(i).forEach(s=>{s.invalidate()}),i.refetchType==="none")return Promise.resolve();const t={...i,type:i.refetchType??i.type??"active"};return this.refetchQueries(t,e)})}refetchQueries(i={},e){const t={...e,cancelRefetch:(e==null?void 0:e.cancelRefetch)??!0},s=Rs.batch(()=>Z(this,Yt).findAll(i).filter(r=>!r.isDisabled()).map(r=>{let n=r.fetch(void 0,t);return t.throwOnError||(n=n.catch(rr)),r.state.fetchStatus==="paused"?Promise.resolve():n}));return Promise.all(s).then(rr)}fetchQuery(i){const e=this.defaultQueryOptions(i);e.retry===void 0&&(e.retry=!1);const t=Z(this,Yt).build(this,e);return t.isStaleByTime(z5(e.staleTime,t))?t.fetch(e):Promise.resolve(t.state.data)}prefetchQuery(i){return this.fetchQuery(i).then(rr).catch(rr)}fetchInfiniteQuery(i){return i.behavior=iE(i.pages),this.fetchQuery(i)}prefetchInfiniteQuery(i){return this.fetchInfiniteQuery(i).then(rr).catch(rr)}ensureInfiniteQueryData(i){return i.behavior=iE(i.pages),this.ensureQueryData(i)}resumePausedMutations(){return Kc.isOnline()?Z(this,Xn).resumePausedMutations():Promise.resolve()}getQueryCache(){return Z(this,Yt)}getMutationCache(){return Z(this,Xn)}getDefaultOptions(){return Z(this,ea)}setDefaultOptions(i){je(this,ea,i)}setQueryDefaults(i,e){Z(this,Yo).set(Ea(i),{queryKey:i,defaultOptions:e})}getQueryDefaults(i){const e=[...Z(this,Yo).values()];let t={};return e.forEach(s=>{tu(i,s.queryKey)&&(t={...t,...s.defaultOptions})}),t}setMutationDefaults(i,e){Z(this,Xo).set(Ea(i),{mutationKey:i,defaultOptions:e})}getMutationDefaults(i){const e=[...Z(this,Xo).values()];let t={};return e.forEach(s=>{tu(i,s.mutationKey)&&(t={...t,...s.defaultOptions})}),t}defaultQueryOptions(i){if(i._defaulted)return i;const e={...Z(this,ea).queries,...this.getQueryDefaults(i.queryKey),...i,_defaulted:!0};return e.queryHash||(e.queryHash=mg(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.enabled!==!0&&e.queryFn===Gc&&(e.enabled=!1),e}defaultMutationOptions(i){return i!=null&&i._defaulted?i:{...Z(this,ea).mutations,...(i==null?void 0:i.mutationKey)&&this.getMutationDefaults(i.mutationKey),...i,_defaulted:!0}}clear(){Z(this,Yt).clear(),Z(this,Xn).clear()}},Yt=new WeakMap,Xn=new WeakMap,ea=new WeakMap,Yo=new WeakMap,Xo=new WeakMap,ta=new WeakMap,el=new WeakMap,tl=new WeakMap,U4),qhe=(z4=class extends eu{constructor(e,t){super();ot(this,ln);ot(this,sa);ot(this,ia);ot(this,pi);ot(this,on);je(this,sa,e),this.setOptions(t),this.bindMethods(),as(this,ln,ap).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var s;const t=this.options;this.options=Z(this,sa).defaultMutationOptions(e),whe(this.options,t)||Z(this,sa).getMutationCache().notify({type:"observerOptionsUpdated",mutation:Z(this,pi),observer:this}),t!=null&&t.mutationKey&&this.options.mutationKey&&Ea(t.mutationKey)!==Ea(this.options.mutationKey)?this.reset():((s=Z(this,pi))==null?void 0:s.state.status)==="pending"&&Z(this,pi).setOptions(this.options)}onUnsubscribe(){var e;this.hasListeners()||(e=Z(this,pi))==null||e.removeObserver(this)}onMutationUpdate(e){as(this,ln,ap).call(this),as(this,ln,L0).call(this,e)}getCurrentResult(){return Z(this,ia)}reset(){var e;(e=Z(this,pi))==null||e.removeObserver(this),je(this,pi,void 0),as(this,ln,ap).call(this),as(this,ln,L0).call(this)}mutate(e,t){var s;return je(this,on,t),(s=Z(this,pi))==null||s.removeObserver(this),je(this,pi,Z(this,sa).getMutationCache().build(Z(this,sa),this.options)),Z(this,pi).addObserver(this),Z(this,pi).execute(e)}},sa=new WeakMap,ia=new WeakMap,pi=new WeakMap,on=new WeakMap,ln=new WeakSet,ap=function(){var t;const e=((t=Z(this,pi))==null?void 0:t.state)??sE();je(this,ia,{...e,isPending:e.status==="pending",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset})},L0=function(e){Rs.batch(()=>{var t,s,r,n,a,o,l,u;if(Z(this,on)&&this.hasListeners()){const h=Z(this,ia).variables,c=Z(this,ia).context;(e==null?void 0:e.type)==="success"?((s=(t=Z(this,on)).onSuccess)==null||s.call(t,e.data,h,c),(n=(r=Z(this,on)).onSettled)==null||n.call(r,e.data,null,h,c)):(e==null?void 0:e.type)==="error"&&((o=(a=Z(this,on)).onError)==null||o.call(a,e.error,h,c),(u=(l=Z(this,on)).onSettled)==null||u.call(l,void 0,e.error,h,c))}this.listeners.forEach(h=>{h(Z(this,ia))})})},z4),nE=p.createContext(void 0),Bhe=i=>{const e=p.useContext(nE);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},$he=({client:i,children:e})=>(p.useEffect(()=>(i.mount(),()=>{i.unmount()}),[i]),R.jsx(nE.Provider,{value:i,children:e}));function Hhe(i,e){return typeof i=="function"?i(...e):!!i}function Qhe(){}function Uhe(i,e){const t=Bhe(),[s]=p.useState(()=>new qhe(t,i));p.useEffect(()=>{s.setOptions(i)},[s,i]);const r=p.useSyncExternalStore(p.useCallback(a=>s.subscribe(Rs.batchCalls(a)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),n=p.useCallback((a,o)=>{s.mutate(a,o).catch(Qhe)},[s]);if(r.error&&Hhe(s.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:n,mutateAsync:r.mutate}}const As=[];for(let i=0;i<256;++i)As.push((i+256).toString(16).slice(1));function zhe(i,e=0){return(As[i[e+0]]+As[i[e+1]]+As[i[e+2]]+As[i[e+3]]+"-"+As[i[e+4]]+As[i[e+5]]+"-"+As[i[e+6]]+As[i[e+7]]+"-"+As[i[e+8]]+As[i[e+9]]+"-"+As[i[e+10]]+As[i[e+11]]+As[i[e+12]]+As[i[e+13]]+As[i[e+14]]+As[i[e+15]]).toLowerCase()}let Cg;const jhe=new Uint8Array(16);function Whe(){if(!Cg){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Cg=crypto.getRandomValues.bind(crypto)}return Cg(jhe)}const aE={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Ghe(i,e,t){if(aE.randomUUID&&!i)return aE.randomUUID();i=i||{};const s=i.random||(i.rng||Whe)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,zhe(s)}const oE="/backend";async function Khe(i,e){return e instanceof FormData?await fetch(`${oE}${i}`,{method:"POST",body:e}):fetch(`${oE}${i}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}const su=15,bg=30,wg=19,Zhe=29,Jc=256,xg=Jc+1+Zhe,lE=2*xg+1,iu=256,Jhe=7,uE=16,hE=17,cE=18,Eg=8*2,Yc=-1,Yhe=1,Xc=2,Xhe=0,Lo=0,dE=1,ece=3,oi=4,nr=0,pE=1,ed=2,ar=-2,tce=-3,_o=-5;function td(i){return sd(i.map(([e,t])=>new Array(e).fill(t,0,e)))}function sd(i){return i.reduce((e,t)=>e.concat(Array.isArray(t)?sd(t):t),[])}const fE=[0,1,2,3].concat(...td([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Mt(){const i=this;function e(r){const n=i.dyn_tree,a=i.stat_desc.static_tree,o=i.stat_desc.extra_bits,l=i.stat_desc.extra_base,u=i.stat_desc.max_length;let h,c,d,f,y,v,m=0;for(f=0;f<=su;f++)r.bl_count[f]=0;for(n[r.heap[r.heap_max]*2+1]=0,h=r.heap_max+1;h<lE;h++)c=r.heap[h],f=n[n[c*2+1]*2+1]+1,f>u&&(f=u,m++),n[c*2+1]=f,!(c>i.max_code)&&(r.bl_count[f]++,y=0,c>=l&&(y=o[c-l]),v=n[c*2],r.opt_len+=v*(f+y),a&&(r.static_len+=v*(a[c*2+1]+y)));if(m!==0){do{for(f=u-1;r.bl_count[f]===0;)f--;r.bl_count[f]--,r.bl_count[f+1]+=2,r.bl_count[u]--,m-=2}while(m>0);for(f=u;f!==0;f--)for(c=r.bl_count[f];c!==0;)d=r.heap[--h],!(d>i.max_code)&&(n[d*2+1]!=f&&(r.opt_len+=(f-n[d*2+1])*n[d*2],n[d*2+1]=f),c--)}}function t(r,n){let a=0;do a|=r&1,r>>>=1,a<<=1;while(--n>0);return a>>>1}function s(r,n,a){const o=[];let l=0,u,h,c;for(u=1;u<=su;u++)o[u]=l=l+a[u-1]<<1;for(h=0;h<=n;h++)c=r[h*2+1],c!==0&&(r[h*2]=t(o[c]++,c))}i.build_tree=function(r){const n=i.dyn_tree,a=i.stat_desc.static_tree,o=i.stat_desc.elems;let l,u,h=-1,c;for(r.heap_len=0,r.heap_max=lE,l=0;l<o;l++)n[l*2]!==0?(r.heap[++r.heap_len]=h=l,r.depth[l]=0):n[l*2+1]=0;for(;r.heap_len<2;)c=r.heap[++r.heap_len]=h<2?++h:0,n[c*2]=1,r.depth[c]=0,r.opt_len--,a&&(r.static_len-=a[c*2+1]);for(i.max_code=h,l=Math.floor(r.heap_len/2);l>=1;l--)r.pqdownheap(n,l);c=o;do l=r.heap[1],r.heap[1]=r.heap[r.heap_len--],r.pqdownheap(n,1),u=r.heap[1],r.heap[--r.heap_max]=l,r.heap[--r.heap_max]=u,n[c*2]=n[l*2]+n[u*2],r.depth[c]=Math.max(r.depth[l],r.depth[u])+1,n[l*2+1]=n[u*2+1]=c,r.heap[1]=c++,r.pqdownheap(n,1);while(r.heap_len>=2);r.heap[--r.heap_max]=r.heap[1],e(r),s(n,i.max_code,r.bl_count)}}Mt._length_code=[0,1,2,3,4,5,6,7].concat(...td([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Mt.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Mt.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Mt.d_code=function(i){return i<256?fE[i]:fE[256+(i>>>7)]},Mt.extra_lbits=[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],Mt.extra_dbits=[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],Mt.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Mt.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ls(i,e,t,s,r){const n=this;n.static_tree=i,n.extra_bits=e,n.extra_base=t,n.elems=s,n.max_length=r}const sce=[12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227],ice=td([[144,8],[112,9],[24,7],[8,8]]);Ls.static_ltree=sd(sce.map((i,e)=>[i,ice[e]]));const rce=[0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23],nce=td([[30,5]]);Ls.static_dtree=sd(rce.map((i,e)=>[i,nce[e]])),Ls.static_l_desc=new Ls(Ls.static_ltree,Mt.extra_lbits,Jc+1,xg,su),Ls.static_d_desc=new Ls(Ls.static_dtree,Mt.extra_dbits,0,bg,su),Ls.static_bl_desc=new Ls(null,Mt.extra_blbits,0,wg,Jhe);const ace=9,oce=8;function Pr(i,e,t,s,r){const n=this;n.good_length=i,n.max_lazy=e,n.nice_length=t,n.max_chain=s,n.func=r}const mE=0,id=1,Va=2,or=[new Pr(0,0,0,0,mE),new Pr(4,4,8,4,id),new Pr(4,5,16,8,id),new Pr(4,6,32,32,id),new Pr(4,4,16,16,Va),new Pr(8,16,32,32,Va),new Pr(8,16,128,128,Va),new Pr(8,32,128,256,Va),new Pr(32,128,258,1024,Va),new Pr(32,258,258,4096,Va)],rd=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Bi=0,nd=1,ru=2,ad=3,lce=32,Vg=42,od=113,nu=666,Sg=8,uce=0,Tg=1,hce=2,$t=3,ld=258,Ei=ld+$t+1;function gE(i,e,t,s){const r=i[e*2],n=i[t*2];return r<n||r==n&&s[e]<=s[t]}function cce(){const i=this;let e,t,s,r,n,a,o,l,u,h,c,d,f,y,v,m,g,b,x,P,L,_,k,S,A,N,B,U,D,$,Q,H,W;const K=new Mt,oe=new Mt,ee=new Mt;i.depth=[];let ue,ae,ce,Ae,ve,ie;i.bl_count=[],i.heap=[],Q=[],H=[],W=[];function xe(){u=2*n,c[f-1]=0;for(let J=0;J<f-1;J++)c[J]=0;N=or[B].max_lazy,D=or[B].good_length,$=or[B].nice_length,A=or[B].max_chain,L=0,g=0,k=0,b=S=$t-1,P=0,d=0}function et(){let J;for(J=0;J<xg;J++)Q[J*2]=0;for(J=0;J<bg;J++)H[J*2]=0;for(J=0;J<wg;J++)W[J*2]=0;Q[iu*2]=1,i.opt_len=i.static_len=0,ae=ce=0}function Xt(){K.dyn_tree=Q,K.stat_desc=Ls.static_l_desc,oe.dyn_tree=H,oe.stat_desc=Ls.static_d_desc,ee.dyn_tree=W,ee.stat_desc=Ls.static_bl_desc,ve=0,ie=0,Ae=8,et()}i.pqdownheap=function(J,re){const te=i.heap,le=te[re];let me=re<<1;for(;me<=i.heap_len&&(me<i.heap_len&&gE(J,te[me+1],te[me],i.depth)&&me++,!gE(J,le,te[me],i.depth));)te[re]=te[me],re=me,me<<=1;te[re]=le};function jt(J,re){let te=-1,le,me=J[0*2+1],Le=0,We=7,ns=4;me===0&&(We=138,ns=3),J[(re+1)*2+1]=65535;for(let Ms=0;Ms<=re;Ms++)le=me,me=J[(Ms+1)*2+1],!(++Le<We&&le==me)&&(Le<ns?W[le*2]+=Le:le!==0?(le!=te&&W[le*2]++,W[uE*2]++):Le<=10?W[hE*2]++:W[cE*2]++,Le=0,te=le,me===0?(We=138,ns=3):le==me?(We=6,ns=3):(We=7,ns=4))}function Os(){let J;for(jt(Q,K.max_code),jt(H,oe.max_code),ee.build_tree(i),J=wg-1;J>=3&&W[Mt.bl_order[J]*2+1]===0;J--);return i.opt_len+=3*(J+1)+5+5+4,J}function Et(J){i.pending_buf[i.pending++]=J}function fs(J){Et(J&255),Et(J>>>8&255)}function is(J){Et(J>>8&255),Et(J&255&255)}function _e(J,re){let te;const le=re;ie>Eg-le?(te=J,ve|=te<<ie&65535,fs(ve),ve=te>>>Eg-ie,ie+=le-Eg):(ve|=J<<ie&65535,ie+=le)}function tt(J,re){const te=J*2;_e(re[te]&65535,re[te+1]&65535)}function Bt(J,re){let te,le=-1,me,Le=J[0*2+1],We=0,ns=7,Ms=4;for(Le===0&&(ns=138,Ms=3),te=0;te<=re;te++)if(me=Le,Le=J[(te+1)*2+1],!(++We<ns&&me==Le)){if(We<Ms)do tt(me,W);while(--We!==0);else me!==0?(me!=le&&(tt(me,W),We--),tt(uE,W),_e(We-3,2)):We<=10?(tt(hE,W),_e(We-3,3)):(tt(cE,W),_e(We-11,7));We=0,le=me,Le===0?(ns=138,Ms=3):me==Le?(ns=6,Ms=3):(ns=7,Ms=4)}}function Ht(J,re,te){let le;for(_e(J-257,5),_e(re-1,5),_e(te-4,4),le=0;le<te;le++)_e(W[Mt.bl_order[le]*2+1],3);Bt(Q,J-1),Bt(H,re-1)}function gt(){ie==16?(fs(ve),ve=0,ie=0):ie>=8&&(Et(ve&255),ve>>>=8,ie-=8)}function Oe(){_e(Tg<<1,3),tt(iu,Ls.static_ltree),gt(),1+Ae+10-ie<9&&(_e(Tg<<1,3),tt(iu,Ls.static_ltree),gt()),Ae=7}function Ke(J,re){let te,le,me;if(i.dist_buf[ae]=J,i.lc_buf[ae]=re&255,ae++,J===0?Q[re*2]++:(ce++,J--,Q[(Mt._length_code[re]+Jc+1)*2]++,H[Mt.d_code(J)*2]++),!(ae&8191)&&B>2){for(te=ae*8,le=L-g,me=0;me<bg;me++)te+=H[me*2]*(5+Mt.extra_dbits[me]);if(te>>>=3,ce<Math.floor(ae/2)&&te<Math.floor(le/2))return!0}return ae==ue-1}function Pe(J,re){let te,le,me=0,Le,We;if(ae!==0)do te=i.dist_buf[me],le=i.lc_buf[me],me++,te===0?tt(le,J):(Le=Mt._length_code[le],tt(Le+Jc+1,J),We=Mt.extra_lbits[Le],We!==0&&(le-=Mt.base_length[Le],_e(le,We)),te--,Le=Mt.d_code(te),tt(Le,re),We=Mt.extra_dbits[Le],We!==0&&(te-=Mt.base_dist[Le],_e(te,We)));while(me<ae);tt(iu,J),Ae=J[iu*2+1]}function rs(){ie>8?fs(ve):ie>0&&Et(ve&255),ve=0,ie=0}function Cs(J,re,te){rs(),Ae=8,fs(re),fs(~re),i.pending_buf.set(l.subarray(J,J+re),i.pending),i.pending+=re}function bs(J,re,te){_e((uce<<1)+(te?1:0),3),Cs(J,re)}function un(J,re,te){let le,me,Le=0;B>0?(K.build_tree(i),oe.build_tree(i),Le=Os(),le=i.opt_len+3+7>>>3,me=i.static_len+3+7>>>3,me<=le&&(le=me)):le=me=re+5,re+4<=le&&J!=-1?bs(J,re,te):me==le?(_e((Tg<<1)+(te?1:0),3),Pe(Ls.static_ltree,Ls.static_dtree)):(_e((hce<<1)+(te?1:0),3),Ht(K.max_code+1,oe.max_code+1,Le+1),Pe(Q,H)),et(),te&&rs()}function Zs(J){un(g>=0?g:-1,L-g,J),g=L,e.flush_pending()}function Js(){let J,re,te,le;do{if(le=u-k-L,le===0&&L===0&&k===0)le=n;else if(le==-1)le--;else if(L>=n+n-Ei){l.set(l.subarray(n,n+n),0),_-=n,L-=n,g-=n,J=f,te=J;do re=c[--te]&65535,c[te]=re>=n?re-n:0;while(--J!==0);J=n,te=J;do re=h[--te]&65535,h[te]=re>=n?re-n:0;while(--J!==0);le+=n}if(e.avail_in===0)return;J=e.read_buf(l,L+k,le),k+=J,k>=$t&&(d=l[L]&255,d=(d<<m^l[L+1]&255)&v)}while(k<Ei&&e.avail_in!==0)}function zi(J){let re=65535,te;for(re>s-5&&(re=s-5);;){if(k<=1){if(Js(),k===0&&J==Lo)return Bi;if(k===0)break}if(L+=k,k=0,te=g+re,(L===0||L>=te)&&(k=L-te,L=te,Zs(!1),e.avail_out===0)||L-g>=n-Ei&&(Zs(!1),e.avail_out===0))return Bi}return Zs(J==oi),e.avail_out===0?J==oi?ru:Bi:J==oi?ad:nd}function Ys(J){let re=A,te=L,le,me,Le=S;const We=L>n-Ei?L-(n-Ei):0;let ns=$;const Ms=o,hn=L+ld;let sl=l[te+Le-1],Ha=l[te+Le];S>=D&&(re>>=2),ns>k&&(ns=k);do if(le=J,!(l[le+Le]!=Ha||l[le+Le-1]!=sl||l[le]!=l[te]||l[++le]!=l[te+1])){te+=2,le++;do;while(l[++te]==l[++le]&&l[++te]==l[++le]&&l[++te]==l[++le]&&l[++te]==l[++le]&&l[++te]==l[++le]&&l[++te]==l[++le]&&l[++te]==l[++le]&&l[++te]==l[++le]&&te<hn);if(me=ld-(hn-te),te=hn-ld,me>Le){if(_=J,Le=me,me>=ns)break;sl=l[te+Le-1],Ha=l[te+Le]}}while((J=h[J&Ms]&65535)>We&&--re!==0);return Le<=k?Le:k}function ji(J){let re=0,te;for(;;){if(k<Ei){if(Js(),k<Ei&&J==Lo)return Bi;if(k===0)break}if(k>=$t&&(d=(d<<m^l[L+($t-1)]&255)&v,re=c[d]&65535,h[L&o]=c[d],c[d]=L),re!==0&&(L-re&65535)<=n-Ei&&U!=Xc&&(b=Ys(re)),b>=$t)if(te=Ke(L-_,b-$t),k-=b,b<=N&&k>=$t){b--;do L++,d=(d<<m^l[L+($t-1)]&255)&v,re=c[d]&65535,h[L&o]=c[d],c[d]=L;while(--b!==0);L++}else L+=b,b=0,d=l[L]&255,d=(d<<m^l[L+1]&255)&v;else te=Ke(0,l[L]&255),k--,L++;if(te&&(Zs(!1),e.avail_out===0))return Bi}return Zs(J==oi),e.avail_out===0?J==oi?ru:Bi:J==oi?ad:nd}function $a(J){let re=0,te,le;for(;;){if(k<Ei){if(Js(),k<Ei&&J==Lo)return Bi;if(k===0)break}if(k>=$t&&(d=(d<<m^l[L+($t-1)]&255)&v,re=c[d]&65535,h[L&o]=c[d],c[d]=L),S=b,x=_,b=$t-1,re!==0&&S<N&&(L-re&65535)<=n-Ei&&(U!=Xc&&(b=Ys(re)),b<=5&&(U==Yhe||b==$t&&L-_>4096)&&(b=$t-1)),S>=$t&&b<=S){le=L+k-$t,te=Ke(L-1-x,S-$t),k-=S-1,S-=2;do++L<=le&&(d=(d<<m^l[L+($t-1)]&255)&v,re=c[d]&65535,h[L&o]=c[d],c[d]=L);while(--S!==0);if(P=0,b=$t-1,L++,te&&(Zs(!1),e.avail_out===0))return Bi}else if(P!==0){if(te=Ke(0,l[L-1]&255),te&&Zs(!1),L++,k--,e.avail_out===0)return Bi}else P=1,L++,k--}return P!==0&&(te=Ke(0,l[L-1]&255),P=0),Zs(J==oi),e.avail_out===0?J==oi?ru:Bi:J==oi?ad:nd}function ra(J){return J.total_in=J.total_out=0,J.msg=null,i.pending=0,i.pending_out=0,t=od,r=Lo,Xt(),xe(),nr}i.deflateInit=function(J,re,te,le,me,Le){return le||(le=Sg),me||(me=oce),Le||(Le=Xhe),J.msg=null,re==Yc&&(re=6),me<1||me>ace||le!=Sg||te<9||te>15||re<0||re>9||Le<0||Le>Xc?ar:(J.dstate=i,a=te,n=1<<a,o=n-1,y=me+7,f=1<<y,v=f-1,m=Math.floor((y+$t-1)/$t),l=new Uint8Array(n*2),h=[],c=[],ue=1<<me+6,i.pending_buf=new Uint8Array(ue*4),s=ue*4,i.dist_buf=new Uint16Array(ue),i.lc_buf=new Uint8Array(ue),B=re,U=Le,ra(J))},i.deflateEnd=function(){return t!=Vg&&t!=od&&t!=nu?ar:(i.lc_buf=null,i.dist_buf=null,i.pending_buf=null,c=null,h=null,l=null,i.dstate=null,t==od?tce:nr)},i.deflateParams=function(J,re,te){let le=nr;return re==Yc&&(re=6),re<0||re>9||te<0||te>Xc?ar:(or[B].func!=or[re].func&&J.total_in!==0&&(le=J.deflate(dE)),B!=re&&(B=re,N=or[B].max_lazy,D=or[B].good_length,$=or[B].nice_length,A=or[B].max_chain),U=te,le)},i.deflateSetDictionary=function(J,re,te){let le=te,me,Le=0;if(!re||t!=Vg)return ar;if(le<$t)return nr;for(le>n-Ei&&(le=n-Ei,Le=te-le),l.set(re.subarray(Le,Le+le),0),L=le,g=le,d=l[0]&255,d=(d<<m^l[1]&255)&v,me=0;me<=le-$t;me++)d=(d<<m^l[me+($t-1)]&255)&v,h[me&o]=c[d],c[d]=me;return nr},i.deflate=function(J,re){let te,le,me,Le,We;if(re>oi||re<0)return ar;if(!J.next_out||!J.next_in&&J.avail_in!==0||t==nu&&re!=oi)return J.msg=rd[ed-ar],ar;if(J.avail_out===0)return J.msg=rd[ed-_o],_o;if(e=J,Le=r,r=re,t==Vg&&(le=Sg+(a-8<<4)<<8,me=(B-1&255)>>1,me>3&&(me=3),le|=me<<6,L!==0&&(le|=lce),le+=31-le%31,t=od,is(le)),i.pending!==0){if(e.flush_pending(),e.avail_out===0)return r=-1,nr}else if(e.avail_in===0&&re<=Le&&re!=oi)return e.msg=rd[ed-_o],_o;if(t==nu&&e.avail_in!==0)return J.msg=rd[ed-_o],_o;if(e.avail_in!==0||k!==0||re!=Lo&&t!=nu){switch(We=-1,or[B].func){case mE:We=zi(re);break;case id:We=ji(re);break;case Va:We=$a(re);break}if((We==ru||We==ad)&&(t=nu),We==Bi||We==ru)return e.avail_out===0&&(r=-1),nr;if(We==nd){if(re==dE)Oe();else if(bs(0,0,!1),re==ece)for(te=0;te<f;te++)c[te]=0;if(e.flush_pending(),e.avail_out===0)return r=-1,nr}}return re!=oi?nr:pE}}function vE(){const i=this;i.next_in_index=0,i.next_out_index=0,i.avail_in=0,i.total_in=0,i.avail_out=0,i.total_out=0}vE.prototype={deflateInit(i,e){const t=this;return t.dstate=new cce,e||(e=su),t.dstate.deflateInit(t,i,e)},deflate(i){const e=this;return e.dstate?e.dstate.deflate(e,i):ar},deflateEnd(){const i=this;if(!i.dstate)return ar;const e=i.dstate.deflateEnd();return i.dstate=null,e},deflateParams(i,e){const t=this;return t.dstate?t.dstate.deflateParams(t,i,e):ar},deflateSetDictionary(i,e){const t=this;return t.dstate?t.dstate.deflateSetDictionary(t,i,e):ar},read_buf(i,e,t){const s=this;let r=s.avail_in;return r>t&&(r=t),r===0?0:(s.avail_in-=r,i.set(s.next_in.subarray(s.next_in_index,s.next_in_index+r),e),s.next_in_index+=r,s.total_in+=r,r)},flush_pending(){const i=this;let e=i.dstate.pending;e>i.avail_out&&(e=i.avail_out),e!==0&&(i.next_out.set(i.dstate.pending_buf.subarray(i.dstate.pending_out,i.dstate.pending_out+e),i.next_out_index),i.next_out_index+=e,i.dstate.pending_out+=e,i.total_out+=e,i.avail_out-=e,i.dstate.pending-=e,i.dstate.pending===0&&(i.dstate.pending_out=0))}};function dce(i){const e=this,t=new vE,s=pce(i&&i.chunkSize?i.chunkSize:64*1024),r=Lo,n=new Uint8Array(s);let a=i?i.level:Yc;typeof a>"u"&&(a=Yc),t.deflateInit(a),t.next_out=n,e.append=function(o,l){let u,h,c=0,d=0,f=0;const y=[];if(o.length){t.next_in_index=0,t.next_in=o,t.avail_in=o.length;do{if(t.next_out_index=0,t.avail_out=s,u=t.deflate(r),u!=nr)throw new Error("deflating: "+t.msg);t.next_out_index&&(t.next_out_index==s?y.push(new Uint8Array(n)):y.push(n.subarray(0,t.next_out_index))),f+=t.next_out_index,l&&t.next_in_index>0&&t.next_in_index!=c&&(l(t.next_in_index),c=t.next_in_index)}while(t.avail_in>0||t.avail_out===0);return y.length>1?(h=new Uint8Array(f),y.forEach(function(v){h.set(v,d),d+=v.length})):h=y[0]?new Uint8Array(y[0]):new Uint8Array,h}},e.flush=function(){let o,l,u=0,h=0;const c=[];do{if(t.next_out_index=0,t.avail_out=s,o=t.deflate(oi),o!=pE&&o!=nr)throw new Error("deflating: "+t.msg);s-t.avail_out>0&&c.push(n.slice(0,t.next_out_index)),h+=t.next_out_index}while(t.avail_in>0||t.avail_out===0);return t.deflateEnd(),l=new Uint8Array(h),c.forEach(function(d){l.set(d,u),u+=d.length}),l}}function pce(i){return i+5*(Math.floor(i/16383)+1)}const fce=15,ft=0,sn=1,mce=2,li=-2,Nt=-3,yE=-4,rn=-5,Vi=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],CE=1440,gce=0,vce=4,yce=9,Cce=5,bce=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],wce=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],xce=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Ece=[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,112,112],Vce=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],Sce=[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],Fn=15;function Pg(){const i=this;let e,t,s,r,n,a;function o(u,h,c,d,f,y,v,m,g,b,x){let P,L,_,k,S,A,N,B,U,D,$,Q,H,W,K;D=0,S=c;do s[u[h+D]]++,D++,S--;while(S!==0);if(s[0]==c)return v[0]=-1,m[0]=0,ft;for(B=m[0],A=1;A<=Fn&&s[A]===0;A++);for(N=A,B<A&&(B=A),S=Fn;S!==0&&s[S]===0;S--);for(_=S,B>S&&(B=S),m[0]=B,W=1<<A;A<S;A++,W<<=1)if((W-=s[A])<0)return Nt;if((W-=s[S])<0)return Nt;for(s[S]+=W,a[1]=A=0,D=1,H=2;--S!==0;)a[H]=A+=s[D],H++,D++;S=0,D=0;do(A=u[h+D])!==0&&(x[a[A]++]=S),D++;while(++S<c);for(c=a[_],a[0]=S=0,D=0,k=-1,Q=-B,n[0]=0,$=0,K=0;N<=_;N++)for(P=s[N];P--!==0;){for(;N>Q+B;){if(k++,Q+=B,K=_-Q,K=K>B?B:K,(L=1<<(A=N-Q))>P+1&&(L-=P+1,H=N,A<K))for(;++A<K&&!((L<<=1)<=s[++H]);)L-=s[H];if(K=1<<A,b[0]+K>CE)return Nt;n[k]=$=b[0],b[0]+=K,k!==0?(a[k]=S,r[0]=A,r[1]=B,A=S>>>Q-B,r[2]=$-n[k-1]-A,g.set(r,(n[k-1]+A)*3)):v[0]=$}for(r[1]=N-Q,D>=c?r[0]=192:x[D]<d?(r[0]=x[D]<256?0:96,r[2]=x[D++]):(r[0]=y[x[D]-d]+16+64,r[2]=f[x[D++]-d]),L=1<<N-Q,A=S>>>Q;A<K;A+=L)g.set(r,($+A)*3);for(A=1<<N-1;S&A;A>>>=1)S^=A;for(S^=A,U=(1<<Q)-1;(S&U)!=a[k];)k--,Q-=B,U=(1<<Q)-1}return W!==0&&_!=1?rn:ft}function l(u){let h;for(e||(e=[],t=[],s=new Int32Array(Fn+1),r=[],n=new Int32Array(Fn),a=new Int32Array(Fn+1)),t.length<u&&(t=[]),h=0;h<u;h++)t[h]=0;for(h=0;h<Fn+1;h++)s[h]=0;for(h=0;h<3;h++)r[h]=0;n.set(s.subarray(0,Fn),0),a.set(s.subarray(0,Fn+1),0)}i.inflate_trees_bits=function(u,h,c,d,f){let y;return l(19),e[0]=0,y=o(u,0,19,19,null,null,c,h,d,e,t),y==Nt?f.msg="oversubscribed dynamic bit lengths tree":(y==rn||h[0]===0)&&(f.msg="incomplete dynamic bit lengths tree",y=Nt),y},i.inflate_trees_dynamic=function(u,h,c,d,f,y,v,m,g){let b;return l(288),e[0]=0,b=o(c,0,u,257,xce,Ece,y,d,m,e,t),b!=ft||d[0]===0?(b==Nt?g.msg="oversubscribed literal/length tree":b!=yE&&(g.msg="incomplete literal/length tree",b=Nt),b):(l(288),b=o(c,u,h,0,Vce,Sce,v,f,m,e,t),b!=ft||f[0]===0&&u>257?(b==Nt?g.msg="oversubscribed distance tree":b==rn?(g.msg="incomplete distance tree",b=Nt):b!=yE&&(g.msg="empty distance tree with lengths",b=Nt),b):ft)}}Pg.inflate_trees_fixed=function(i,e,t,s){return i[0]=yce,e[0]=Cce,t[0]=bce,s[0]=wce,ft};const ud=0,bE=1,wE=2,xE=3,EE=4,VE=5,SE=6,Ig=7,TE=8,hd=9;function Tce(){const i=this;let e,t=0,s,r=0,n=0,a=0,o=0,l=0,u=0,h=0,c,d=0,f,y=0;function v(m,g,b,x,P,L,_,k){let S,A,N,B,U,D,$,Q,H,W,K,oe,ee,ue,ae,ce;$=k.next_in_index,Q=k.avail_in,U=_.bitb,D=_.bitk,H=_.write,W=H<_.read?_.read-H-1:_.end-H,K=Vi[m],oe=Vi[g];do{for(;D<20;)Q--,U|=(k.read_byte($++)&255)<<D,D+=8;if(S=U&K,A=b,N=x,ce=(N+S)*3,(B=A[ce])===0){U>>=A[ce+1],D-=A[ce+1],_.win[H++]=A[ce+2],W--;continue}do{if(U>>=A[ce+1],D-=A[ce+1],B&16){for(B&=15,ee=A[ce+2]+(U&Vi[B]),U>>=B,D-=B;D<15;)Q--,U|=(k.read_byte($++)&255)<<D,D+=8;S=U&oe,A=P,N=L,ce=(N+S)*3,B=A[ce];do if(U>>=A[ce+1],D-=A[ce+1],B&16){for(B&=15;D<B;)Q--,U|=(k.read_byte($++)&255)<<D,D+=8;if(ue=A[ce+2]+(U&Vi[B]),U>>=B,D-=B,W-=ee,H>=ue)ae=H-ue,H-ae>0&&2>H-ae?(_.win[H++]=_.win[ae++],_.win[H++]=_.win[ae++],ee-=2):(_.win.set(_.win.subarray(ae,ae+2),H),H+=2,ae+=2,ee-=2);else{ae=H-ue;do ae+=_.end;while(ae<0);if(B=_.end-ae,ee>B){if(ee-=B,H-ae>0&&B>H-ae)do _.win[H++]=_.win[ae++];while(--B!==0);else _.win.set(_.win.subarray(ae,ae+B),H),H+=B,ae+=B,B=0;ae=0}}if(H-ae>0&&ee>H-ae)do _.win[H++]=_.win[ae++];while(--ee!==0);else _.win.set(_.win.subarray(ae,ae+ee),H),H+=ee,ae+=ee,ee=0;break}else if(!(B&64))S+=A[ce+2],S+=U&Vi[B],ce=(N+S)*3,B=A[ce];else return k.msg="invalid distance code",ee=k.avail_in-Q,ee=D>>3<ee?D>>3:ee,Q+=ee,$-=ee,D-=ee<<3,_.bitb=U,_.bitk=D,k.avail_in=Q,k.total_in+=$-k.next_in_index,k.next_in_index=$,_.write=H,Nt;while(!0);break}if(B&64)return B&32?(ee=k.avail_in-Q,ee=D>>3<ee?D>>3:ee,Q+=ee,$-=ee,D-=ee<<3,_.bitb=U,_.bitk=D,k.avail_in=Q,k.total_in+=$-k.next_in_index,k.next_in_index=$,_.write=H,sn):(k.msg="invalid literal/length code",ee=k.avail_in-Q,ee=D>>3<ee?D>>3:ee,Q+=ee,$-=ee,D-=ee<<3,_.bitb=U,_.bitk=D,k.avail_in=Q,k.total_in+=$-k.next_in_index,k.next_in_index=$,_.write=H,Nt);if(S+=A[ce+2],S+=U&Vi[B],ce=(N+S)*3,(B=A[ce])===0){U>>=A[ce+1],D-=A[ce+1],_.win[H++]=A[ce+2],W--;break}}while(!0)}while(W>=258&&Q>=10);return ee=k.avail_in-Q,ee=D>>3<ee?D>>3:ee,Q+=ee,$-=ee,D-=ee<<3,_.bitb=U,_.bitk=D,k.avail_in=Q,k.total_in+=$-k.next_in_index,k.next_in_index=$,_.write=H,ft}i.init=function(m,g,b,x,P,L){e=ud,u=m,h=g,c=b,d=x,f=P,y=L,s=null},i.proc=function(m,g,b){let x,P,L,_=0,k=0,S=0,A,N,B,U;for(S=g.next_in_index,A=g.avail_in,_=m.bitb,k=m.bitk,N=m.write,B=N<m.read?m.read-N-1:m.end-N;;)switch(e){case ud:if(B>=258&&A>=10&&(m.bitb=_,m.bitk=k,g.avail_in=A,g.total_in+=S-g.next_in_index,g.next_in_index=S,m.write=N,b=v(u,h,c,d,f,y,m,g),S=g.next_in_index,A=g.avail_in,_=m.bitb,k=m.bitk,N=m.write,B=N<m.read?m.read-N-1:m.end-N,b!=ft)){e=b==sn?Ig:hd;break}n=u,s=c,r=d,e=bE;case bE:for(x=n;k<x;){if(A!==0)b=ft;else return m.bitb=_,m.bitk=k,g.avail_in=A,g.total_in+=S-g.next_in_index,g.next_in_index=S,m.write=N,m.inflate_flush(g,b);A--,_|=(g.read_byte(S++)&255)<<k,k+=8}if(P=(r+(_&Vi[x]))*3,_>>>=s[P+1],k-=s[P+1],L=s[P],L===0){a=s[P+2],e=SE;break}if(L&16){o=L&15,t=s[P+2],e=wE;break}if(!(L&64)){n=L,r=P/3+s[P+2];break}if(L&32){e=Ig;break}return e=hd,g.msg="invalid literal/length code",b=Nt,m.bitb=_,m.bitk=k,g.avail_in=A,g.total_in+=S-g.next_in_index,g.next_in_index=S,m.write=N,m.inflate_flush(g,b);case wE:for(x=o;k<x;){if(A!==0)b=ft;else return m.bitb=_,m.bitk=k,g.avail_in=A,g.total_in+=S-g.next_in_index,g.next_in_index=S,m.write=N,m.inflate_flush(g,b);A--,_|=(g.read_byte(S++)&255)<<k,k+=8}t+=_&Vi[x],_>>=x,k-=x,n=h,s=f,r=y,e=xE;case xE:for(x=n;k<x;){if(A!==0)b=ft;else return m.bitb=_,m.bitk=k,g.avail_in=A,g.total_in+=S-g.next_in_index,g.next_in_index=S,m.write=N,m.inflate_flush(g,b);A--,_|=(g.read_byte(S++)&255)<<k,k+=8}if(P=(r+(_&Vi[x]))*3,_>>=s[P+1],k-=s[P+1],L=s[P],L&16){o=L&15,l=s[P+2],e=EE;break}if(!(L&64)){n=L,r=P/3+s[P+2];break}return e=hd,g.msg="invalid distance code",b=Nt,m.bitb=_,m.bitk=k,g.avail_in=A,g.total_in+=S-g.next_in_index,g.next_in_index=S,m.write=N,m.inflate_flush(g,b);case EE:for(x=o;k<x;){if(A!==0)b=ft;else return m.bitb=_,m.bitk=k,g.avail_in=A,g.total_in+=S-g.next_in_index,g.next_in_index=S,m.write=N,m.inflate_flush(g,b);A--,_|=(g.read_byte(S++)&255)<<k,k+=8}l+=_&Vi[x],_>>=x,k-=x,e=VE;case VE:for(U=N-l;U<0;)U+=m.end;for(;t!==0;){if(B===0&&(N==m.end&&m.read!==0&&(N=0,B=N<m.read?m.read-N-1:m.end-N),B===0&&(m.write=N,b=m.inflate_flush(g,b),N=m.write,B=N<m.read?m.read-N-1:m.end-N,N==m.end&&m.read!==0&&(N=0,B=N<m.read?m.read-N-1:m.end-N),B===0)))return m.bitb=_,m.bitk=k,g.avail_in=A,g.total_in+=S-g.next_in_index,g.next_in_index=S,m.write=N,m.inflate_flush(g,b);m.win[N++]=m.win[U++],B--,U==m.end&&(U=0),t--}e=ud;break;case SE:if(B===0&&(N==m.end&&m.read!==0&&(N=0,B=N<m.read?m.read-N-1:m.end-N),B===0&&(m.write=N,b=m.inflate_flush(g,b),N=m.write,B=N<m.read?m.read-N-1:m.end-N,N==m.end&&m.read!==0&&(N=0,B=N<m.read?m.read-N-1:m.end-N),B===0)))return m.bitb=_,m.bitk=k,g.avail_in=A,g.total_in+=S-g.next_in_index,g.next_in_index=S,m.write=N,m.inflate_flush(g,b);b=ft,m.win[N++]=a,B--,e=ud;break;case Ig:if(k>7&&(k-=8,A++,S--),m.write=N,b=m.inflate_flush(g,b),N=m.write,B=N<m.read?m.read-N-1:m.end-N,m.read!=m.write)return m.bitb=_,m.bitk=k,g.avail_in=A,g.total_in+=S-g.next_in_index,g.next_in_index=S,m.write=N,m.inflate_flush(g,b);e=TE;case TE:return b=sn,m.bitb=_,m.bitk=k,g.avail_in=A,g.total_in+=S-g.next_in_index,g.next_in_index=S,m.write=N,m.inflate_flush(g,b);case hd:return b=Nt,m.bitb=_,m.bitk=k,g.avail_in=A,g.total_in+=S-g.next_in_index,g.next_in_index=S,m.write=N,m.inflate_flush(g,b);default:return b=li,m.bitb=_,m.bitk=k,g.avail_in=A,g.total_in+=S-g.next_in_index,g.next_in_index=S,m.write=N,m.inflate_flush(g,b)}},i.free=function(){}}const PE=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Do=0,Rg=1,IE=2,RE=3,AE=4,LE=5,cd=6,dd=7,_E=8,Sa=9;function Pce(i,e){const t=this;let s=Do,r=0,n=0,a=0,o;const l=[0],u=[0],h=new Tce;let c=0,d=new Int32Array(CE*3);const f=0,y=new Pg;t.bitk=0,t.bitb=0,t.win=new Uint8Array(e),t.end=e,t.read=0,t.write=0,t.reset=function(v,m){m&&(m[0]=f),s==cd&&h.free(v),s=Do,t.bitk=0,t.bitb=0,t.read=t.write=0},t.reset(i,null),t.inflate_flush=function(v,m){let g,b,x;return b=v.next_out_index,x=t.read,g=(x<=t.write?t.write:t.end)-x,g>v.avail_out&&(g=v.avail_out),g!==0&&m==rn&&(m=ft),v.avail_out-=g,v.total_out+=g,v.next_out.set(t.win.subarray(x,x+g),b),b+=g,x+=g,x==t.end&&(x=0,t.write==t.end&&(t.write=0),g=t.write-x,g>v.avail_out&&(g=v.avail_out),g!==0&&m==rn&&(m=ft),v.avail_out-=g,v.total_out+=g,v.next_out.set(t.win.subarray(x,x+g),b),b+=g,x+=g),v.next_out_index=b,t.read=x,m},t.proc=function(v,m){let g,b,x,P,L,_,k,S;for(P=v.next_in_index,L=v.avail_in,b=t.bitb,x=t.bitk,_=t.write,k=_<t.read?t.read-_-1:t.end-_;;){let A,N,B,U,D,$,Q,H;switch(s){case Do:for(;x<3;){if(L!==0)m=ft;else return t.bitb=b,t.bitk=x,v.avail_in=L,v.total_in+=P-v.next_in_index,v.next_in_index=P,t.write=_,t.inflate_flush(v,m);L--,b|=(v.read_byte(P++)&255)<<x,x+=8}switch(g=b&7,c=g&1,g>>>1){case 0:b>>>=3,x-=3,g=x&7,b>>>=g,x-=g,s=Rg;break;case 1:A=[],N=[],B=[[]],U=[[]],Pg.inflate_trees_fixed(A,N,B,U),h.init(A[0],N[0],B[0],0,U[0],0),b>>>=3,x-=3,s=cd;break;case 2:b>>>=3,x-=3,s=RE;break;case 3:return b>>>=3,x-=3,s=Sa,v.msg="invalid block type",m=Nt,t.bitb=b,t.bitk=x,v.avail_in=L,v.total_in+=P-v.next_in_index,v.next_in_index=P,t.write=_,t.inflate_flush(v,m)}break;case Rg:for(;x<32;){if(L!==0)m=ft;else return t.bitb=b,t.bitk=x,v.avail_in=L,v.total_in+=P-v.next_in_index,v.next_in_index=P,t.write=_,t.inflate_flush(v,m);L--,b|=(v.read_byte(P++)&255)<<x,x+=8}if((~b>>>16&65535)!=(b&65535))return s=Sa,v.msg="invalid stored block lengths",m=Nt,t.bitb=b,t.bitk=x,v.avail_in=L,v.total_in+=P-v.next_in_index,v.next_in_index=P,t.write=_,t.inflate_flush(v,m);r=b&65535,b=x=0,s=r!==0?IE:c!==0?dd:Do;break;case IE:if(L===0||k===0&&(_==t.end&&t.read!==0&&(_=0,k=_<t.read?t.read-_-1:t.end-_),k===0&&(t.write=_,m=t.inflate_flush(v,m),_=t.write,k=_<t.read?t.read-_-1:t.end-_,_==t.end&&t.read!==0&&(_=0,k=_<t.read?t.read-_-1:t.end-_),k===0)))return t.bitb=b,t.bitk=x,v.avail_in=L,v.total_in+=P-v.next_in_index,v.next_in_index=P,t.write=_,t.inflate_flush(v,m);if(m=ft,g=r,g>L&&(g=L),g>k&&(g=k),t.win.set(v.read_buf(P,g),_),P+=g,L-=g,_+=g,k-=g,(r-=g)!==0)break;s=c!==0?dd:Do;break;case RE:for(;x<14;){if(L!==0)m=ft;else return t.bitb=b,t.bitk=x,v.avail_in=L,v.total_in+=P-v.next_in_index,v.next_in_index=P,t.write=_,t.inflate_flush(v,m);L--,b|=(v.read_byte(P++)&255)<<x,x+=8}if(n=g=b&16383,(g&31)>29||(g>>5&31)>29)return s=Sa,v.msg="too many length or distance symbols",m=Nt,t.bitb=b,t.bitk=x,v.avail_in=L,v.total_in+=P-v.next_in_index,v.next_in_index=P,t.write=_,t.inflate_flush(v,m);if(g=258+(g&31)+(g>>5&31),!o||o.length<g)o=[];else for(S=0;S<g;S++)o[S]=0;b>>>=14,x-=14,a=0,s=AE;case AE:for(;a<4+(n>>>10);){for(;x<3;){if(L!==0)m=ft;else return t.bitb=b,t.bitk=x,v.avail_in=L,v.total_in+=P-v.next_in_index,v.next_in_index=P,t.write=_,t.inflate_flush(v,m);L--,b|=(v.read_byte(P++)&255)<<x,x+=8}o[PE[a++]]=b&7,b>>>=3,x-=3}for(;a<19;)o[PE[a++]]=0;if(l[0]=7,g=y.inflate_trees_bits(o,l,u,d,v),g!=ft)return m=g,m==Nt&&(o=null,s=Sa),t.bitb=b,t.bitk=x,v.avail_in=L,v.total_in+=P-v.next_in_index,v.next_in_index=P,t.write=_,t.inflate_flush(v,m);a=0,s=LE;case LE:for(;g=n,!(a>=258+(g&31)+(g>>5&31));){let W,K;for(g=l[0];x<g;){if(L!==0)m=ft;else return t.bitb=b,t.bitk=x,v.avail_in=L,v.total_in+=P-v.next_in_index,v.next_in_index=P,t.write=_,t.inflate_flush(v,m);L--,b|=(v.read_byte(P++)&255)<<x,x+=8}if(g=d[(u[0]+(b&Vi[g]))*3+1],K=d[(u[0]+(b&Vi[g]))*3+2],K<16)b>>>=g,x-=g,o[a++]=K;else{for(S=K==18?7:K-14,W=K==18?11:3;x<g+S;){if(L!==0)m=ft;else return t.bitb=b,t.bitk=x,v.avail_in=L,v.total_in+=P-v.next_in_index,v.next_in_index=P,t.write=_,t.inflate_flush(v,m);L--,b|=(v.read_byte(P++)&255)<<x,x+=8}if(b>>>=g,x-=g,W+=b&Vi[S],b>>>=S,x-=S,S=a,g=n,S+W>258+(g&31)+(g>>5&31)||K==16&&S<1)return o=null,s=Sa,v.msg="invalid bit length repeat",m=Nt,t.bitb=b,t.bitk=x,v.avail_in=L,v.total_in+=P-v.next_in_index,v.next_in_index=P,t.write=_,t.inflate_flush(v,m);K=K==16?o[S-1]:0;do o[S++]=K;while(--W!==0);a=S}}if(u[0]=-1,D=[],$=[],Q=[],H=[],D[0]=9,$[0]=6,g=n,g=y.inflate_trees_dynamic(257+(g&31),1+(g>>5&31),o,D,$,Q,H,d,v),g!=ft)return g==Nt&&(o=null,s=Sa),m=g,t.bitb=b,t.bitk=x,v.avail_in=L,v.total_in+=P-v.next_in_index,v.next_in_index=P,t.write=_,t.inflate_flush(v,m);h.init(D[0],$[0],d,Q[0],d,H[0]),s=cd;case cd:if(t.bitb=b,t.bitk=x,v.avail_in=L,v.total_in+=P-v.next_in_index,v.next_in_index=P,t.write=_,(m=h.proc(t,v,m))!=sn)return t.inflate_flush(v,m);if(m=ft,h.free(v),P=v.next_in_index,L=v.avail_in,b=t.bitb,x=t.bitk,_=t.write,k=_<t.read?t.read-_-1:t.end-_,c===0){s=Do;break}s=dd;case dd:if(t.write=_,m=t.inflate_flush(v,m),_=t.write,k=_<t.read?t.read-_-1:t.end-_,t.read!=t.write)return t.bitb=b,t.bitk=x,v.avail_in=L,v.total_in+=P-v.next_in_index,v.next_in_index=P,t.write=_,t.inflate_flush(v,m);s=_E;case _E:return m=sn,t.bitb=b,t.bitk=x,v.avail_in=L,v.total_in+=P-v.next_in_index,v.next_in_index=P,t.write=_,t.inflate_flush(v,m);case Sa:return m=Nt,t.bitb=b,t.bitk=x,v.avail_in=L,v.total_in+=P-v.next_in_index,v.next_in_index=P,t.write=_,t.inflate_flush(v,m);default:return m=li,t.bitb=b,t.bitk=x,v.avail_in=L,v.total_in+=P-v.next_in_index,v.next_in_index=P,t.write=_,t.inflate_flush(v,m)}}},t.free=function(v){t.reset(v,null),t.win=null,d=null},t.set_dictionary=function(v,m,g){t.win.set(v.subarray(m,m+g),0),t.read=t.write=g},t.sync_point=function(){return s==Rg?1:0}}const Ice=32,Rce=8,Ace=0,DE=1,kE=2,OE=3,ME=4,NE=5,Ag=6,au=7,FE=12,qn=13,Lce=[0,0,255,255];function _ce(){const i=this;i.mode=0,i.method=0,i.was=[0],i.need=0,i.marker=0,i.wbits=0;function e(t){return!t||!t.istate?li:(t.total_in=t.total_out=0,t.msg=null,t.istate.mode=au,t.istate.blocks.reset(t,null),ft)}i.inflateEnd=function(t){return i.blocks&&i.blocks.free(t),i.blocks=null,ft},i.inflateInit=function(t,s){return t.msg=null,i.blocks=null,s<8||s>15?(i.inflateEnd(t),li):(i.wbits=s,t.istate.blocks=new Pce(t,1<<s),e(t),ft)},i.inflate=function(t,s){let r,n;if(!t||!t.istate||!t.next_in)return li;const a=t.istate;for(s=s==vce?rn:ft,r=rn;;)switch(a.mode){case Ace:if(t.avail_in===0)return r;if(r=s,t.avail_in--,t.total_in++,((a.method=t.read_byte(t.next_in_index++))&15)!=Rce){a.mode=qn,t.msg="unknown compression method",a.marker=5;break}if((a.method>>4)+8>a.wbits){a.mode=qn,t.msg="invalid win size",a.marker=5;break}a.mode=DE;case DE:if(t.avail_in===0)return r;if(r=s,t.avail_in--,t.total_in++,n=t.read_byte(t.next_in_index++)&255,((a.method<<8)+n)%31!==0){a.mode=qn,t.msg="incorrect header check",a.marker=5;break}if(!(n&Ice)){a.mode=au;break}a.mode=kE;case kE:if(t.avail_in===0)return r;r=s,t.avail_in--,t.total_in++,a.need=(t.read_byte(t.next_in_index++)&255)<<24&4278190080,a.mode=OE;case OE:if(t.avail_in===0)return r;r=s,t.avail_in--,t.total_in++,a.need+=(t.read_byte(t.next_in_index++)&255)<<16&16711680,a.mode=ME;case ME:if(t.avail_in===0)return r;r=s,t.avail_in--,t.total_in++,a.need+=(t.read_byte(t.next_in_index++)&255)<<8&65280,a.mode=NE;case NE:return t.avail_in===0?r:(r=s,t.avail_in--,t.total_in++,a.need+=t.read_byte(t.next_in_index++)&255,a.mode=Ag,mce);case Ag:return a.mode=qn,t.msg="need dictionary",a.marker=0,li;case au:if(r=a.blocks.proc(t,r),r==Nt){a.mode=qn,a.marker=0;break}if(r==ft&&(r=s),r!=sn)return r;r=s,a.blocks.reset(t,a.was),a.mode=FE;case FE:return t.avail_in=0,sn;case qn:return Nt;default:return li}},i.inflateSetDictionary=function(t,s,r){let n=0,a=r;if(!t||!t.istate||t.istate.mode!=Ag)return li;const o=t.istate;return a>=1<<o.wbits&&(a=(1<<o.wbits)-1,n=r-a),o.blocks.set_dictionary(s,n,a),o.mode=au,ft},i.inflateSync=function(t){let s,r,n,a,o;if(!t||!t.istate)return li;const l=t.istate;if(l.mode!=qn&&(l.mode=qn,l.marker=0),(s=t.avail_in)===0)return rn;for(r=t.next_in_index,n=l.marker;s!==0&&n<4;)t.read_byte(r)==Lce[n]?n++:t.read_byte(r)!==0?n=0:n=4-n,r++,s--;return t.total_in+=r-t.next_in_index,t.next_in_index=r,t.avail_in=s,l.marker=n,n!=4?Nt:(a=t.total_in,o=t.total_out,e(t),t.total_in=a,t.total_out=o,l.mode=au,ft)},i.inflateSyncPoint=function(t){return!t||!t.istate||!t.istate.blocks?li:t.istate.blocks.sync_point()}}function qE(){}qE.prototype={inflateInit(i){const e=this;return e.istate=new _ce,i||(i=fce),e.istate.inflateInit(e,i)},inflate(i){const e=this;return e.istate?e.istate.inflate(e,i):li},inflateEnd(){const i=this;if(!i.istate)return li;const e=i.istate.inflateEnd(i);return i.istate=null,e},inflateSync(){const i=this;return i.istate?i.istate.inflateSync(i):li},inflateSetDictionary(i,e){const t=this;return t.istate?t.istate.inflateSetDictionary(t,i,e):li},read_byte(i){return this.next_in[i]},read_buf(i,e){return this.next_in.subarray(i,i+e)}};function Dce(i){const e=this,t=new qE,s=i&&i.chunkSize?Math.floor(i.chunkSize*2):128*1024,r=gce,n=new Uint8Array(s);let a=!1;t.inflateInit(),t.next_out=n,e.append=function(o,l){const u=[];let h,c,d=0,f=0,y=0;if(o.length!==0){t.next_in_index=0,t.next_in=o,t.avail_in=o.length;do{if(t.next_out_index=0,t.avail_out=s,t.avail_in===0&&!a&&(t.next_in_index=0,a=!0),h=t.inflate(r),a&&h===rn){if(t.avail_in!==0)throw new Error("inflating: bad input")}else if(h!==ft&&h!==sn)throw new Error("inflating: "+t.msg);if((a||h===sn)&&t.avail_in===o.length)throw new Error("inflating: bad input");t.next_out_index&&(t.next_out_index===s?u.push(new Uint8Array(n)):u.push(n.subarray(0,t.next_out_index))),y+=t.next_out_index,l&&t.next_in_index>0&&t.next_in_index!=d&&(l(t.next_in_index),d=t.next_in_index)}while(t.avail_in>0||t.avail_out===0);return u.length>1?(c=new Uint8Array(y),u.forEach(function(v){c.set(v,f),f+=v.length})):c=u[0]?new Uint8Array(u[0]):new Uint8Array,c}},e.flush=function(){t.inflateEnd()}}const ui=4294967295,hi=65535,BE=8,kce=0,Oce=99,Mce=67324752,$E=134695760,Nce=$E,Fce=33639248,qce=101010256,Bce=101075792,$ce=117853008,Lg=22,HE=20,QE=56,Hce=Lg+HE+QE,Qce=1,Uce=39169,zce=10,jce=1,UE=21589,Wce=6534,Gce=1,Kce=8,Zce=2048,Jce=16,Yce=20,zE=45,jE=51,_g="/",WE=new Date(2107,11,31),GE=new Date(1980,0,1),Ft=void 0,Bn="undefined",ou="function";class KE{constructor(e){return class extends TransformStream{constructor(t,s){const r=new e(s);super({transform(n,a){a.enqueue(r.append(n))},flush(n){const a=r.flush();a&&n.enqueue(a)}})}}}}const Xce=64;let ZE=2;try{typeof navigator!=Bn&&navigator.hardwareConcurrency&&(ZE=navigator.hardwareConcurrency)}catch{}const ede={chunkSize:512*1024,maxWorkers:ZE,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:Ft,CompressionStreamNative:typeof CompressionStream!=Bn&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=Bn&&DecompressionStream},$n=Object.assign({},ede);function tde(){return $n}function sde(i){return Math.max(i.chunkSize,Xce)}function Dg(i){const{baseURL:e,chunkSize:t,maxWorkers:s,terminateWorkerTimeout:r,useCompressionStream:n,useWebWorkers:a,Deflate:o,Inflate:l,CompressionStream:u,DecompressionStream:h,workerScripts:c}=i;if(Hn("baseURL",e),Hn("chunkSize",t),Hn("maxWorkers",s),Hn("terminateWorkerTimeout",r),Hn("useCompressionStream",n),Hn("useWebWorkers",a),o&&($n.CompressionStream=new KE(o)),l&&($n.DecompressionStream=new KE(l)),Hn("CompressionStream",u),Hn("DecompressionStream",h),c!==Ft){const{deflate:d,inflate:f}=c;if((d||f)&&($n.workerScripts||($n.workerScripts={})),d){if(!Array.isArray(d))throw new Error("workerScripts.deflate must be an array");$n.workerScripts.deflate=d}if(f){if(!Array.isArray(f))throw new Error("workerScripts.inflate must be an array");$n.workerScripts.inflate=f}}}function Hn(i,e){e!==Ft&&($n[i]=e)}const kg={application:{"andrew-inset":"ez",annodex:"anx","atom+xml":"atom","atomcat+xml":"atomcat","atomserv+xml":"atomsrv",bbolin:"lin","cu-seeme":"cu","davmount+xml":"davmount",dsptype:"tsp",ecmascript:["es","ecma"],futuresplash:"spl",hta:"hta","java-archive":"jar","java-serialized-object":"ser","java-vm":"class",m3g:"m3g","mac-binhex40":"hqx",mathematica:["nb","ma","mb"],msaccess:"mdb",msword:["doc","dot","wiz"],mxf:"mxf",oda:"oda",ogg:"ogx",pdf:"pdf","pgp-keys":"key","pgp-signature":["asc","sig"],"pics-rules":"prf",postscript:["ps","ai","eps","epsi","epsf","eps2","eps3"],rar:"rar","rdf+xml":"rdf","rss+xml":"rss",rtf:"rtf","xhtml+xml":["xhtml","xht"],xml:["xml","xsl","xsd","xpdl"],"xspf+xml":"xspf",zip:"zip","vnd.android.package-archive":"apk","vnd.cinderella":"cdy","vnd.google-earth.kml+xml":"kml","vnd.google-earth.kmz":"kmz","vnd.mozilla.xul+xml":"xul","vnd.ms-excel":["xls","xlb","xlt","xlm","xla","xlc","xlw"],"vnd.ms-pki.seccat":"cat","vnd.ms-pki.stl":"stl","vnd.ms-powerpoint":["ppt","pps","pot","ppa","pwz"],"vnd.oasis.opendocument.chart":"odc","vnd.oasis.opendocument.database":"odb","vnd.oasis.opendocument.formula":"odf","vnd.oasis.opendocument.graphics":"odg","vnd.oasis.opendocument.graphics-template":"otg","vnd.oasis.opendocument.image":"odi","vnd.oasis.opendocument.presentation":"odp","vnd.oasis.opendocument.presentation-template":"otp","vnd.oasis.opendocument.spreadsheet":"ods","vnd.oasis.opendocument.spreadsheet-template":"ots","vnd.oasis.opendocument.text":"odt","vnd.oasis.opendocument.text-master":["odm","otm"],"vnd.oasis.opendocument.text-template":"ott","vnd.oasis.opendocument.text-web":"oth","vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","vnd.openxmlformats-officedocument.spreadsheetml.template":"xltx","vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","vnd.openxmlformats-officedocument.presentationml.slideshow":"ppsx","vnd.openxmlformats-officedocument.presentationml.template":"potx","vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","vnd.openxmlformats-officedocument.wordprocessingml.template":"dotx","vnd.smaf":"mmf","vnd.stardivision.calc":"sdc","vnd.stardivision.chart":"sds","vnd.stardivision.draw":"sda","vnd.stardivision.impress":"sdd","vnd.stardivision.math":["sdf","smf"],"vnd.stardivision.writer":["sdw","vor"],"vnd.stardivision.writer-global":"sgl","vnd.sun.xml.calc":"sxc","vnd.sun.xml.calc.template":"stc","vnd.sun.xml.draw":"sxd","vnd.sun.xml.draw.template":"std","vnd.sun.xml.impress":"sxi","vnd.sun.xml.impress.template":"sti","vnd.sun.xml.math":"sxm","vnd.sun.xml.writer":"sxw","vnd.sun.xml.writer.global":"sxg","vnd.sun.xml.writer.template":"stw","vnd.symbian.install":["sis","sisx"],"vnd.visio":["vsd","vst","vss","vsw","vsdx","vssx","vstx","vssm","vstm"],"vnd.wap.wbxml":"wbxml","vnd.wap.wmlc":"wmlc","vnd.wap.wmlscriptc":"wmlsc","vnd.wordperfect":"wpd","vnd.wordperfect5.1":"wp5","x-123":"wk","x-7z-compressed":"7z","x-abiword":"abw","x-apple-diskimage":"dmg","x-bcpio":"bcpio","x-bittorrent":"torrent","x-cbr":["cbr","cba","cbt","cb7"],"x-cbz":"cbz","x-cdf":["cdf","cda"],"x-cdlink":"vcd","x-chess-pgn":"pgn","x-cpio":"cpio","x-csh":"csh","x-director":["dir","dxr","cst","cct","cxt","w3d","fgd","swa"],"x-dms":"dms","x-doom":"wad","x-dvi":"dvi","x-httpd-eruby":"rhtml","x-font":"pcf.Z","x-freemind":"mm","x-gnumeric":"gnumeric","x-go-sgf":"sgf","x-graphing-calculator":"gcf","x-gtar":["gtar","taz"],"x-hdf":"hdf","x-httpd-php":["phtml","pht","php"],"x-httpd-php-source":"phps","x-httpd-php3":"php3","x-httpd-php3-preprocessed":"php3p","x-httpd-php4":"php4","x-httpd-php5":"php5","x-ica":"ica","x-info":"info","x-internet-signup":["ins","isp"],"x-iphone":"iii","x-iso9660-image":"iso","x-java-jnlp-file":"jnlp","x-jmol":"jmz","x-killustrator":"kil","x-latex":"latex","x-lyx":"lyx","x-lzx":"lzx","x-maker":["frm","fb","fbdoc"],"x-ms-wmd":"wmd","x-msdos-program":["com","exe","bat","dll"],"x-netcdf":["nc"],"x-ns-proxy-autoconfig":["pac","dat"],"x-nwc":"nwc","x-object":"o","x-oz-application":"oza","x-pkcs7-certreqresp":"p7r","x-python-code":["pyc","pyo"],"x-qgis":["qgs","shp","shx"],"x-quicktimeplayer":"qtl","x-redhat-package-manager":["rpm","rpa"],"x-ruby":"rb","x-sh":"sh","x-shar":"shar","x-shockwave-flash":["swf","swfl"],"x-silverlight":"scr","x-stuffit":"sit","x-sv4cpio":"sv4cpio","x-sv4crc":"sv4crc","x-tar":"tar","x-tex-gf":"gf","x-tex-pk":"pk","x-texinfo":["texinfo","texi"],"x-trash":["~","%","bak","old","sik"],"x-ustar":"ustar","x-wais-source":"src","x-wingz":"wz","x-x509-ca-cert":["crt","der","cer"],"x-xcf":"xcf","x-xfig":"fig","x-xpinstall":"xpi",applixware:"aw","atomsvc+xml":"atomsvc","ccxml+xml":"ccxml","cdmi-capability":"cdmia","cdmi-container":"cdmic","cdmi-domain":"cdmid","cdmi-object":"cdmio","cdmi-queue":"cdmiq","docbook+xml":"dbk","dssc+der":"dssc","dssc+xml":"xdssc","emma+xml":"emma","epub+zip":"epub",exi:"exi","font-tdpfr":"pfr","gml+xml":"gml","gpx+xml":"gpx",gxf:"gxf",hyperstudio:"stk","inkml+xml":["ink","inkml"],ipfix:"ipfix","jsonml+json":"jsonml","lost+xml":"lostxml","mads+xml":"mads",marc:"mrc","marcxml+xml":"mrcx","mathml+xml":["mathml","mml"],mbox:"mbox","mediaservercontrol+xml":"mscml","metalink+xml":"metalink","metalink4+xml":"meta4","mets+xml":"mets","mods+xml":"mods",mp21:["m21","mp21"],mp4:"mp4s","oebps-package+xml":"opf","omdoc+xml":"omdoc",onenote:["onetoc","onetoc2","onetmp","onepkg"],oxps:"oxps","patch-ops-error+xml":"xer","pgp-encrypted":"pgp",pkcs10:"p10","pkcs7-mime":["p7m","p7c"],"pkcs7-signature":"p7s",pkcs8:"p8","pkix-attr-cert":"ac","pkix-crl":"crl","pkix-pkipath":"pkipath",pkixcmp:"pki","pls+xml":"pls","prs.cww":"cww","pskc+xml":"pskcxml","reginfo+xml":"rif","relax-ng-compact-syntax":"rnc","resource-lists+xml":"rl","resource-lists-diff+xml":"rld","rls-services+xml":"rs","rpki-ghostbusters":"gbr","rpki-manifest":"mft","rpki-roa":"roa","rsd+xml":"rsd","sbml+xml":"sbml","scvp-cv-request":"scq","scvp-cv-response":"scs","scvp-vp-request":"spq","scvp-vp-response":"spp",sdp:"sdp","set-payment-initiation":"setpay","set-registration-initiation":"setreg","shf+xml":"shf","sparql-query":"rq","sparql-results+xml":"srx",srgs:"gram","srgs+xml":"grxml","sru+xml":"sru","ssdl+xml":"ssdl","ssml+xml":"ssml","tei+xml":["tei","teicorpus"],"thraud+xml":"tfi","timestamped-data":"tsd","vnd.3gpp.pic-bw-large":"plb","vnd.3gpp.pic-bw-small":"psb","vnd.3gpp.pic-bw-var":"pvb","vnd.3gpp2.tcap":"tcap","vnd.3m.post-it-notes":"pwn","vnd.accpac.simply.aso":"aso","vnd.accpac.simply.imp":"imp","vnd.acucobol":"acu","vnd.acucorp":["atc","acutc"],"vnd.adobe.air-application-installer-package+zip":"air","vnd.adobe.formscentral.fcdt":"fcdt","vnd.adobe.fxp":["fxp","fxpl"],"vnd.adobe.xdp+xml":"xdp","vnd.adobe.xfdf":"xfdf","vnd.ahead.space":"ahead","vnd.airzip.filesecure.azf":"azf","vnd.airzip.filesecure.azs":"azs","vnd.amazon.ebook":"azw","vnd.americandynamics.acc":"acc","vnd.amiga.ami":"ami","vnd.anser-web-certificate-issue-initiation":"cii","vnd.anser-web-funds-transfer-initiation":"fti","vnd.antix.game-component":"atx","vnd.apple.installer+xml":"mpkg","vnd.apple.mpegurl":"m3u8","vnd.aristanetworks.swi":"swi","vnd.astraea-software.iota":"iota","vnd.audiograph":"aep","vnd.blueice.multipass":"mpm","vnd.bmi":"bmi","vnd.businessobjects":"rep","vnd.chemdraw+xml":"cdxml","vnd.chipnuts.karaoke-mmd":"mmd","vnd.claymore":"cla","vnd.cloanto.rp9":"rp9","vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"vnd.cluetrust.cartomobile-config":"c11amc","vnd.cluetrust.cartomobile-config-pkg":"c11amz","vnd.commonspace":"csp","vnd.contact.cmsg":"cdbcmsg","vnd.cosmocaller":"cmc","vnd.crick.clicker":"clkx","vnd.crick.clicker.keyboard":"clkk","vnd.crick.clicker.palette":"clkp","vnd.crick.clicker.template":"clkt","vnd.crick.clicker.wordbank":"clkw","vnd.criticaltools.wbs+xml":"wbs","vnd.ctc-posml":"pml","vnd.cups-ppd":"ppd","vnd.curl.car":"car","vnd.curl.pcurl":"pcurl","vnd.dart":"dart","vnd.data-vision.rdz":"rdz","vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"vnd.dece.ttml+xml":["uvt","uvvt"],"vnd.dece.unspecified":["uvx","uvvx"],"vnd.dece.zip":["uvz","uvvz"],"vnd.denovo.fcselayout-link":"fe_launch","vnd.dna":"dna","vnd.dolby.mlp":"mlp","vnd.dpgraph":"dpg","vnd.dreamfactory":"dfac","vnd.ds-keypoint":"kpxx","vnd.dvb.ait":"ait","vnd.dvb.service":"svc","vnd.dynageo":"geo","vnd.ecowin.chart":"mag","vnd.enliven":"nml","vnd.epson.esf":"esf","vnd.epson.msf":"msf","vnd.epson.quickanime":"qam","vnd.epson.salt":"slt","vnd.epson.ssf":"ssf","vnd.eszigno3+xml":["es3","et3"],"vnd.ezpix-album":"ez2","vnd.ezpix-package":"ez3","vnd.fdf":"fdf","vnd.fdsn.mseed":"mseed","vnd.fdsn.seed":["seed","dataless"],"vnd.flographit":"gph","vnd.fluxtime.clip":"ftc","vnd.framemaker":["fm","frame","maker","book"],"vnd.frogans.fnc":"fnc","vnd.frogans.ltf":"ltf","vnd.fsc.weblaunch":"fsc","vnd.fujitsu.oasys":"oas","vnd.fujitsu.oasys2":"oa2","vnd.fujitsu.oasys3":"oa3","vnd.fujitsu.oasysgp":"fg5","vnd.fujitsu.oasysprs":"bh2","vnd.fujixerox.ddd":"ddd","vnd.fujixerox.docuworks":"xdw","vnd.fujixerox.docuworks.binder":"xbd","vnd.fuzzysheet":"fzs","vnd.genomatix.tuxedo":"txd","vnd.geogebra.file":"ggb","vnd.geogebra.tool":"ggt","vnd.geometry-explorer":["gex","gre"],"vnd.geonext":"gxt","vnd.geoplan":"g2w","vnd.geospace":"g3w","vnd.gmx":"gmx","vnd.grafeq":["gqf","gqs"],"vnd.groove-account":"gac","vnd.groove-help":"ghf","vnd.groove-identity-message":"gim","vnd.groove-injector":"grv","vnd.groove-tool-message":"gtm","vnd.groove-tool-template":"tpl","vnd.groove-vcard":"vcg","vnd.hal+xml":"hal","vnd.handheld-entertainment+xml":"zmm","vnd.hbci":"hbci","vnd.hhe.lesson-player":"les","vnd.hp-hpgl":"hpgl","vnd.hp-hpid":"hpid","vnd.hp-hps":"hps","vnd.hp-jlyt":"jlt","vnd.hp-pcl":"pcl","vnd.hp-pclxl":"pclxl","vnd.hydrostatix.sof-data":"sfd-hdstx","vnd.ibm.minipay":"mpy","vnd.ibm.modcap":["afp","listafp","list3820"],"vnd.ibm.rights-management":"irm","vnd.ibm.secure-container":"sc","vnd.iccprofile":["icc","icm"],"vnd.igloader":"igl","vnd.immervision-ivp":"ivp","vnd.immervision-ivu":"ivu","vnd.insors.igm":"igm","vnd.intercon.formnet":["xpw","xpx"],"vnd.intergeo":"i2g","vnd.intu.qbo":"qbo","vnd.intu.qfx":"qfx","vnd.ipunplugged.rcprofile":"rcprofile","vnd.irepository.package+xml":"irp","vnd.is-xpr":"xpr","vnd.isac.fcs":"fcs","vnd.jam":"jam","vnd.jcp.javame.midlet-rms":"rms","vnd.jisp":"jisp","vnd.joost.joda-archive":"joda","vnd.kahootz":["ktz","ktr"],"vnd.kde.karbon":"karbon","vnd.kde.kchart":"chrt","vnd.kde.kformula":"kfo","vnd.kde.kivio":"flw","vnd.kde.kontour":"kon","vnd.kde.kpresenter":["kpr","kpt"],"vnd.kde.kspread":"ksp","vnd.kde.kword":["kwd","kwt"],"vnd.kenameaapp":"htke","vnd.kidspiration":"kia","vnd.kinar":["kne","knp"],"vnd.koan":["skp","skd","skt","skm"],"vnd.kodak-descriptor":"sse","vnd.las.las+xml":"lasxml","vnd.llamagraphics.life-balance.desktop":"lbd","vnd.llamagraphics.life-balance.exchange+xml":"lbe","vnd.lotus-1-2-3":"123","vnd.lotus-approach":"apr","vnd.lotus-freelance":"pre","vnd.lotus-notes":"nsf","vnd.lotus-organizer":"org","vnd.lotus-screencam":"scm","vnd.lotus-wordpro":"lwp","vnd.macports.portpkg":"portpkg","vnd.mcd":"mcd","vnd.medcalcdata":"mc1","vnd.mediastation.cdkey":"cdkey","vnd.mfer":"mwf","vnd.mfmp":"mfm","vnd.micrografx.flo":"flo","vnd.micrografx.igx":"igx","vnd.mif":"mif","vnd.mobius.daf":"daf","vnd.mobius.dis":"dis","vnd.mobius.mbk":"mbk","vnd.mobius.mqy":"mqy","vnd.mobius.msl":"msl","vnd.mobius.plc":"plc","vnd.mobius.txf":"txf","vnd.mophun.application":"mpn","vnd.mophun.certificate":"mpc","vnd.ms-artgalry":"cil","vnd.ms-cab-compressed":"cab","vnd.ms-excel.addin.macroenabled.12":"xlam","vnd.ms-excel.sheet.binary.macroenabled.12":"xlsb","vnd.ms-excel.sheet.macroenabled.12":"xlsm","vnd.ms-excel.template.macroenabled.12":"xltm","vnd.ms-fontobject":"eot","vnd.ms-htmlhelp":"chm","vnd.ms-ims":"ims","vnd.ms-lrm":"lrm","vnd.ms-officetheme":"thmx","vnd.ms-powerpoint.addin.macroenabled.12":"ppam","vnd.ms-powerpoint.presentation.macroenabled.12":"pptm","vnd.ms-powerpoint.slide.macroenabled.12":"sldm","vnd.ms-powerpoint.slideshow.macroenabled.12":"ppsm","vnd.ms-powerpoint.template.macroenabled.12":"potm","vnd.ms-project":["mpp","mpt"],"vnd.ms-word.document.macroenabled.12":"docm","vnd.ms-word.template.macroenabled.12":"dotm","vnd.ms-works":["wps","wks","wcm","wdb"],"vnd.ms-wpl":"wpl","vnd.ms-xpsdocument":"xps","vnd.mseq":"mseq","vnd.musician":"mus","vnd.muvee.style":"msty","vnd.mynfc":"taglet","vnd.neurolanguage.nlu":"nlu","vnd.nitf":["ntf","nitf"],"vnd.noblenet-directory":"nnd","vnd.noblenet-sealer":"nns","vnd.noblenet-web":"nnw","vnd.nokia.n-gage.data":"ngdat","vnd.nokia.n-gage.symbian.install":"n-gage","vnd.nokia.radio-preset":"rpst","vnd.nokia.radio-presets":"rpss","vnd.novadigm.edm":"edm","vnd.novadigm.edx":"edx","vnd.novadigm.ext":"ext","vnd.oasis.opendocument.chart-template":"otc","vnd.oasis.opendocument.formula-template":"odft","vnd.oasis.opendocument.image-template":"oti","vnd.olpc-sugar":"xo","vnd.oma.dd2+xml":"dd2","vnd.openofficeorg.extension":"oxt","vnd.openxmlformats-officedocument.presentationml.slide":"sldx","vnd.osgeo.mapguide.package":"mgp","vnd.osgi.dp":"dp","vnd.osgi.subsystem":"esa","vnd.palm":["pdb","pqa","oprc"],"vnd.pawaafile":"paw","vnd.pg.format":"str","vnd.pg.osasli":"ei6","vnd.picsel":"efif","vnd.pmi.widget":"wg","vnd.pocketlearn":"plf","vnd.powerbuilder6":"pbd","vnd.previewsystems.box":"box","vnd.proteus.magazine":"mgz","vnd.publishare-delta-tree":"qps","vnd.pvi.ptid1":"ptid","vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"vnd.realvnc.bed":"bed","vnd.recordare.musicxml":"mxl","vnd.recordare.musicxml+xml":"musicxml","vnd.rig.cryptonote":"cryptonote","vnd.rn-realmedia":"rm","vnd.rn-realmedia-vbr":"rmvb","vnd.route66.link66+xml":"link66","vnd.sailingtracker.track":"st","vnd.seemail":"see","vnd.sema":"sema","vnd.semd":"semd","vnd.semf":"semf","vnd.shana.informed.formdata":"ifm","vnd.shana.informed.formtemplate":"itp","vnd.shana.informed.interchange":"iif","vnd.shana.informed.package":"ipk","vnd.simtech-mindmapper":["twd","twds"],"vnd.smart.teacher":"teacher","vnd.solent.sdkm+xml":["sdkm","sdkd"],"vnd.spotfire.dxp":"dxp","vnd.spotfire.sfs":"sfs","vnd.stepmania.package":"smzip","vnd.stepmania.stepchart":"sm","vnd.sus-calendar":["sus","susp"],"vnd.svd":"svd","vnd.syncml+xml":"xsm","vnd.syncml.dm+wbxml":"bdm","vnd.syncml.dm+xml":"xdm","vnd.tao.intent-module-archive":"tao","vnd.tcpdump.pcap":["pcap","cap","dmp"],"vnd.tmobile-livetv":"tmo","vnd.trid.tpt":"tpt","vnd.triscape.mxs":"mxs","vnd.trueapp":"tra","vnd.ufdl":["ufd","ufdl"],"vnd.uiq.theme":"utz","vnd.umajin":"umj","vnd.unity":"unityweb","vnd.uoml+xml":"uoml","vnd.vcx":"vcx","vnd.visionary":"vis","vnd.vsf":"vsf","vnd.webturbo":"wtb","vnd.wolfram.player":"nbp","vnd.wqd":"wqd","vnd.wt.stf":"stf","vnd.xara":"xar","vnd.xfdl":"xfdl","vnd.yamaha.hv-dic":"hvd","vnd.yamaha.hv-script":"hvs","vnd.yamaha.hv-voice":"hvp","vnd.yamaha.openscoreformat":"osf","vnd.yamaha.openscoreformat.osfpvg+xml":"osfpvg","vnd.yamaha.smaf-audio":"saf","vnd.yamaha.smaf-phrase":"spf","vnd.yellowriver-custom-menu":"cmp","vnd.zul":["zir","zirz"],"vnd.zzazz.deck+xml":"zaz","voicexml+xml":"vxml",widget:"wgt",winhlp:"hlp","wsdl+xml":"wsdl","wspolicy+xml":"wspolicy","x-ace-compressed":"ace","x-authorware-bin":["aab","x32","u32","vox"],"x-authorware-map":"aam","x-authorware-seg":"aas","x-blorb":["blb","blorb"],"x-bzip":"bz","x-bzip2":["bz2","boz"],"x-cfs-compressed":"cfs","x-chat":"chat","x-conference":"nsc","x-dgc-compressed":"dgc","x-dtbncx+xml":"ncx","x-dtbook+xml":"dtb","x-dtbresource+xml":"res","x-eva":"eva","x-font-bdf":"bdf","x-font-ghostscript":"gsf","x-font-linux-psf":"psf","x-font-pcf":"pcf","x-font-snf":"snf","x-font-ttf":["ttf","ttc"],"x-font-type1":["pfa","pfb","pfm","afm"],"x-freearc":"arc","x-gca-compressed":"gca","x-glulx":"ulx","x-gramps-xml":"gramps","x-install-instructions":"install","x-lzh-compressed":["lzh","lha"],"x-mie":"mie","x-mobipocket-ebook":["prc","mobi"],"x-ms-application":"application","x-ms-shortcut":"lnk","x-ms-xbap":"xbap","x-msbinder":"obd","x-mscardfile":"crd","x-msclip":"clp","application/x-ms-installer":"msi","x-msmediaview":["mvb","m13","m14"],"x-msmetafile":["wmf","wmz","emf","emz"],"x-msmoney":"mny","x-mspublisher":"pub","x-msschedule":"scd","x-msterminal":"trm","x-mswrite":"wri","x-nzb":"nzb","x-pkcs12":["p12","pfx"],"x-pkcs7-certificates":["p7b","spc"],"x-research-info-systems":"ris","x-silverlight-app":"xap","x-sql":"sql","x-stuffitx":"sitx","x-subrip":"srt","x-t3vm-image":"t3","x-tex-tfm":"tfm","x-tgif":"obj","x-xliff+xml":"xlf","x-xz":"xz","x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"xaml+xml":"xaml","xcap-diff+xml":"xdf","xenc+xml":"xenc","xml-dtd":"dtd","xop+xml":"xop","xproc+xml":"xpl","xslt+xml":"xslt","xv+xml":["mxml","xhvml","xvml","xvm"],yang:"yang","yin+xml":"yin",envoy:"evy",fractals:"fif","internet-property-stream":"acx",olescript:"axs","vnd.ms-outlook":"msg","vnd.ms-pkicertstore":"sst","x-compress":"z","x-perfmon":["pma","pmc","pmr","pmw"],"ynd.ms-pkipko":"pko",gzip:["gz","tgz"],"smil+xml":["smi","smil"],"vnd.debian.binary-package":["deb","udeb"],"vnd.hzn-3d-crossword":"x3d","vnd.sqlite3":["db","sqlite","sqlite3","db-wal","sqlite-wal","db-shm","sqlite-shm"],"vnd.wap.sic":"sic","vnd.wap.slc":"slc","x-krita":["kra","krz"],"x-perl":["pm","pl"],yaml:["yaml","yml"]},audio:{amr:"amr","amr-wb":"awb",annodex:"axa",basic:["au","snd"],flac:"flac",midi:["mid","midi","kar","rmi"],mpeg:["mpga","mpega","mp3","m4a","mp2a","m2a","m3a"],mpegurl:"m3u",ogg:["oga","ogg","spx"],"prs.sid":"sid","x-aiff":"aifc","x-gsm":"gsm","x-ms-wma":"wma","x-ms-wax":"wax","x-pn-realaudio":"ram","x-realaudio":"ra","x-sd2":"sd2",adpcm:"adp",mp4:"mp4a",s3m:"s3m",silk:"sil","vnd.dece.audio":["uva","uvva"],"vnd.digital-winds":"eol","vnd.dra":"dra","vnd.dts":"dts","vnd.dts.hd":"dtshd","vnd.lucent.voice":"lvp","vnd.ms-playready.media.pya":"pya","vnd.nuera.ecelp4800":"ecelp4800","vnd.nuera.ecelp7470":"ecelp7470","vnd.nuera.ecelp9600":"ecelp9600","vnd.rip":"rip",webm:"weba","x-caf":"caf","x-matroska":"mka","x-pn-realaudio-plugin":"rmp",xm:"xm",aac:"aac",aiff:["aiff","aif","aff"],opus:"opus",wav:"wav"},chemical:{"x-alchemy":"alc","x-cache":["cac","cache"],"x-cache-csf":"csf","x-cactvs-binary":["cbin","cascii","ctab"],"x-cdx":"cdx","x-chem3d":"c3d","x-cif":"cif","x-cmdf":"cmdf","x-cml":"cml","x-compass":"cpa","x-crossfire":"bsd","x-csml":["csml","csm"],"x-ctx":"ctx","x-cxf":["cxf","cef"],"x-embl-dl-nucleotide":["emb","embl"],"x-gamess-input":["inp","gam","gamin"],"x-gaussian-checkpoint":["fch","fchk"],"x-gaussian-cube":"cub","x-gaussian-input":["gau","gjc","gjf"],"x-gaussian-log":"gal","x-gcg8-sequence":"gcg","x-genbank":"gen","x-hin":"hin","x-isostar":["istr","ist"],"x-jcamp-dx":["jdx","dx"],"x-kinemage":"kin","x-macmolecule":"mcm","x-macromodel-input":"mmod","x-mdl-molfile":"mol","x-mdl-rdfile":"rd","x-mdl-rxnfile":"rxn","x-mdl-sdfile":"sd","x-mdl-tgf":"tgf","x-mmcif":"mcif","x-mol2":"mol2","x-molconn-Z":"b","x-mopac-graph":"gpt","x-mopac-input":["mop","mopcrt","zmt"],"x-mopac-out":"moo","x-ncbi-asn1":"asn","x-ncbi-asn1-ascii":["prt","ent"],"x-ncbi-asn1-binary":"val","x-rosdal":"ros","x-swissprot":"sw","x-vamas-iso14976":"vms","x-vmd":"vmd","x-xtel":"xtel","x-xyz":"xyz"},font:{otf:"otf",woff:"woff",woff2:"woff2"},image:{gif:"gif",ief:"ief",jpeg:["jpeg","jpg","jpe","jfif","jfif-tbnl","jif"],pcx:"pcx",png:"png","svg+xml":["svg","svgz"],tiff:["tiff","tif"],"vnd.djvu":["djvu","djv"],"vnd.wap.wbmp":"wbmp","x-canon-cr2":"cr2","x-canon-crw":"crw","x-cmu-raster":"ras","x-coreldraw":"cdr","x-coreldrawpattern":"pat","x-coreldrawtemplate":"cdt","x-corelphotopaint":"cpt","x-epson-erf":"erf","x-icon":"ico","x-jg":"art","x-jng":"jng","x-nikon-nef":"nef","x-olympus-orf":"orf","x-portable-anymap":"pnm","x-portable-bitmap":"pbm","x-portable-graymap":"pgm","x-portable-pixmap":"ppm","x-rgb":"rgb","x-xbitmap":"xbm","x-xpixmap":"xpm","x-xwindowdump":"xwd",bmp:"bmp",cgm:"cgm",g3fax:"g3",ktx:"ktx","prs.btif":"btif",sgi:"sgi","vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"vnd.dwg":"dwg","vnd.dxf":"dxf","vnd.fastbidsheet":"fbs","vnd.fpx":"fpx","vnd.fst":"fst","vnd.fujixerox.edmics-mmr":"mmr","vnd.fujixerox.edmics-rlc":"rlc","vnd.ms-modi":"mdi","vnd.ms-photo":"wdp","vnd.net-fpx":"npx","vnd.xiff":"xif",webp:"webp","x-3ds":"3ds","x-cmx":"cmx","x-freehand":["fh","fhc","fh4","fh5","fh7"],"x-pict":["pic","pct"],"x-tga":"tga","cis-cod":"cod",avif:"avifs",heic:["heif","heic"],pjpeg:["pjpg"],"vnd.adobe.photoshop":"psd","x-adobe-dng":"dng","x-fuji-raf":"raf","x-icns":"icns","x-kodak-dcr":"dcr","x-kodak-k25":"k25","x-kodak-kdc":"kdc","x-minolta-mrw":"mrw","x-panasonic-raw":["raw","rw2","rwl"],"x-pentax-pef":["pef","ptx"],"x-sigma-x3f":"x3f","x-sony-arw":"arw","x-sony-sr2":"sr2","x-sony-srf":"srf"},message:{rfc822:["eml","mime","mht","mhtml","nws"]},model:{iges:["igs","iges"],mesh:["msh","mesh","silo"],vrml:["wrl","vrml"],"x3d+vrml":["x3dv","x3dvz"],"x3d+xml":"x3dz","x3d+binary":["x3db","x3dbz"],"vnd.collada+xml":"dae","vnd.dwf":"dwf","vnd.gdl":"gdl","vnd.gtw":"gtw","vnd.mts":"mts","vnd.usdz+zip":"usdz","vnd.vtu":"vtu"},text:{"cache-manifest":["manifest","appcache"],calendar:["ics","icz","ifb"],css:"css",csv:"csv",h323:"323",html:["html","htm","shtml","stm"],iuls:"uls",plain:["txt","text","brf","conf","def","list","log","in","bas","diff","ksh"],richtext:"rtx",scriptlet:["sct","wsc"],texmacs:"tm","tab-separated-values":"tsv","vnd.sun.j2me.app-descriptor":"jad","vnd.wap.wml":"wml","vnd.wap.wmlscript":"wmls","x-bibtex":"bib","x-boo":"boo","x-c++hdr":["h++","hpp","hxx","hh"],"x-c++src":["c++","cpp","cxx","cc"],"x-component":"htc","x-dsrc":"d","x-diff":"patch","x-haskell":"hs","x-java":"java","x-literate-haskell":"lhs","x-moc":"moc","x-pascal":["p","pas","pp","inc"],"x-pcs-gcd":"gcd","x-python":"py","x-scala":"scala","x-setext":"etx","x-tcl":["tcl","tk"],"x-tex":["tex","ltx","sty","cls"],"x-vcalendar":"vcs","x-vcard":"vcf",n3:"n3","prs.lines.tag":"dsc",sgml:["sgml","sgm"],troff:["t","tr","roff","man","me","ms"],turtle:"ttl","uri-list":["uri","uris","urls"],vcard:"vcard","vnd.curl":"curl","vnd.curl.dcurl":"dcurl","vnd.curl.scurl":"scurl","vnd.curl.mcurl":"mcurl","vnd.dvb.subtitle":"sub","vnd.fly":"fly","vnd.fmi.flexstor":"flx","vnd.graphviz":"gv","vnd.in3d.3dml":"3dml","vnd.in3d.spot":"spot","x-asm":["s","asm"],"x-c":["c","h","dic"],"x-fortran":["f","for","f77","f90"],"x-opml":"opml","x-nfo":"nfo","x-sfv":"sfv","x-uuencode":"uu",webviewhtml:"htt",javascript:"js",json:"json",markdown:["md","markdown","mdown","markdn"],"vnd.wap.si":"si","vnd.wap.sl":"sl"},video:{avif:"avif","3gpp":"3gp",annodex:"axv",dl:"dl",dv:["dif","dv"],fli:"fli",gl:"gl",mpeg:["mpeg","mpg","mpe","m1v","m2v","mp2","mpa","mpv2"],mp4:["mp4","mp4v","mpg4"],quicktime:["qt","mov"],ogg:"ogv","vnd.mpegurl":["mxu","m4u"],"x-flv":"flv","x-la-asf":["lsf","lsx"],"x-mng":"mng","x-ms-asf":["asf","asx","asr"],"x-ms-wm":"wm","x-ms-wmv":"wmv","x-ms-wmx":"wmx","x-ms-wvx":"wvx","x-msvideo":"avi","x-sgi-movie":"movie","x-matroska":["mpv","mkv","mk3d","mks"],"3gpp2":"3g2",h261:"h261",h263:"h263",h264:"h264",jpeg:"jpgv",jpm:["jpm","jpgm"],mj2:["mj2","mjp2"],"vnd.dece.hd":["uvh","uvvh"],"vnd.dece.mobile":["uvm","uvvm"],"vnd.dece.pd":["uvp","uvvp"],"vnd.dece.sd":["uvs","uvvs"],"vnd.dece.video":["uvv","uvvv"],"vnd.dvb.file":"dvb","vnd.fvt":"fvt","vnd.ms-playready.media.pyv":"pyv","vnd.uvvu.mp4":["uvu","uvvu"],"vnd.vivo":"viv",webm:"webm","x-f4v":"f4v","x-m4v":"m4v","x-ms-vob":"vob","x-smv":"smv",mp2t:"ts"},"x-conference":{"x-cooltalk":"ice"},"x-world":{"x-vrml":["vrm","flr","wrz","xaf","xof"]}};(()=>{const i={};for(const e of Object.keys(kg))for(const t of Object.keys(kg[e])){const s=kg[e][t];if(typeof s=="string")i[s]=e+"/"+t;else for(let r=0;r<s.length;r++)i[s[r]]=e+"/"+t}return i})();const JE=[];for(let i=0;i<256;i++){let e=i;for(let t=0;t<8;t++)e&1?e=e>>>1^3988292384:e=e>>>1;JE[i]=e}class Og{constructor(e){this.crc=e||-1}append(e){let t=this.crc|0;for(let s=0,r=e.length|0;s<r;s++)t=t>>>8^JE[(t^e[s])&255];this.crc=t}get(){return~this.crc}}class YE extends TransformStream{constructor(){let e;const t=new Og;super({transform(s,r){t.append(s),r.enqueue(s)},flush(){const s=new Uint8Array(4);new DataView(s.buffer).setUint32(0,t.get()),e.value=s}}),e=this}}function pd(i){if(typeof TextEncoder==Bn){i=unescape(encodeURIComponent(i));const e=new Uint8Array(i.length);for(let t=0;t<e.length;t++)e[t]=i.charCodeAt(t);return e}else return new TextEncoder().encode(i)}const zs={concat(i,e){if(i.length===0||e.length===0)return i.concat(e);const t=i[i.length-1],s=zs.getPartial(t);return s===32?i.concat(e):zs._shiftRight(e,s,t|0,i.slice(0,i.length-1))},bitLength(i){const e=i.length;if(e===0)return 0;const t=i[e-1];return(e-1)*32+zs.getPartial(t)},clamp(i,e){if(i.length*32<e)return i;i=i.slice(0,Math.ceil(e/32));const t=i.length;return e=e&31,t>0&&e&&(i[t-1]=zs.partial(e,i[t-1]&2147483648>>e-1,1)),i},partial(i,e,t){return i===32?e:(t?e|0:e<<32-i)+i*1099511627776},getPartial(i){return Math.round(i/1099511627776)||32},_shiftRight(i,e,t,s){for(s===void 0&&(s=[]);e>=32;e-=32)s.push(t),t=0;if(e===0)return s.concat(i);for(let a=0;a<i.length;a++)s.push(t|i[a]>>>e),t=i[a]<<32-e;const r=i.length?i[i.length-1]:0,n=zs.getPartial(r);return s.push(zs.partial(e+n&31,e+n>32?t:s.pop(),1)),s}},fd={bytes:{fromBits(i){const t=zs.bitLength(i)/8,s=new Uint8Array(t);let r;for(let n=0;n<t;n++)n&3||(r=i[n/4]),s[n]=r>>>24,r<<=8;return s},toBits(i){const e=[];let t,s=0;for(t=0;t<i.length;t++)s=s<<8|i[t],(t&3)===3&&(e.push(s),s=0);return t&3&&e.push(zs.partial(8*(t&3),s)),e}}},XE={};XE.sha1=class{constructor(i){const e=this;e.blockSize=512,e._init=[1732584193,4023233417,2562383102,271733878,3285377520],e._key=[1518500249,1859775393,2400959708,3395469782],i?(e._h=i._h.slice(0),e._buffer=i._buffer.slice(0),e._length=i._length):e.reset()}reset(){const i=this;return i._h=i._init.slice(0),i._buffer=[],i._length=0,i}update(i){const e=this;typeof i=="string"&&(i=fd.utf8String.toBits(i));const t=e._buffer=zs.concat(e._buffer,i),s=e._length,r=e._length=s+zs.bitLength(i);if(r>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const n=new Uint32Array(t);let a=0;for(let o=e.blockSize+s-(e.blockSize+s&e.blockSize-1);o<=r;o+=e.blockSize)e._block(n.subarray(16*a,16*(a+1))),a+=1;return t.splice(0,16*a),e}finalize(){const i=this;let e=i._buffer;const t=i._h;e=zs.concat(e,[zs.partial(1,1)]);for(let s=e.length+2;s&15;s++)e.push(0);for(e.push(Math.floor(i._length/4294967296)),e.push(i._length|0);e.length;)i._block(e.splice(0,16));return i.reset(),t}_f(i,e,t,s){if(i<=19)return e&t|~e&s;if(i<=39)return e^t^s;if(i<=59)return e&t|e&s|t&s;if(i<=79)return e^t^s}_S(i,e){return e<<i|e>>>32-i}_block(i){const e=this,t=e._h,s=Array(80);for(let u=0;u<16;u++)s[u]=i[u];let r=t[0],n=t[1],a=t[2],o=t[3],l=t[4];for(let u=0;u<=79;u++){u>=16&&(s[u]=e._S(1,s[u-3]^s[u-8]^s[u-14]^s[u-16]));const h=e._S(5,r)+e._f(u,n,a,o)+l+s[u]+e._key[Math.floor(u/20)]|0;l=o,o=a,a=e._S(30,n),n=r,r=h}t[0]=t[0]+r|0,t[1]=t[1]+n|0,t[2]=t[2]+a|0,t[3]=t[3]+o|0,t[4]=t[4]+l|0}};const eV={};eV.aes=class{constructor(i){const e=this;e._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],e._tables[0][0][0]||e._precompute();const t=e._tables[0][4],s=e._tables[1],r=i.length;let n,a,o,l=1;if(r!==4&&r!==6&&r!==8)throw new Error("invalid aes key size");for(e._key=[a=i.slice(0),o=[]],n=r;n<4*r+28;n++){let u=a[n-1];(n%r===0||r===8&&n%r===4)&&(u=t[u>>>24]<<24^t[u>>16&255]<<16^t[u>>8&255]<<8^t[u&255],n%r===0&&(u=u<<8^u>>>24^l<<24,l=l<<1^(l>>7)*283)),a[n]=a[n-r]^u}for(let u=0;n;u++,n--){const h=a[u&3?n:n-4];n<=4||u<4?o[u]=h:o[u]=s[0][t[h>>>24]]^s[1][t[h>>16&255]]^s[2][t[h>>8&255]]^s[3][t[h&255]]}}encrypt(i){return this._crypt(i,0)}decrypt(i){return this._crypt(i,1)}_precompute(){const i=this._tables[0],e=this._tables[1],t=i[4],s=e[4],r=[],n=[];let a,o,l,u;for(let h=0;h<256;h++)n[(r[h]=h<<1^(h>>7)*283)^h]=h;for(let h=a=0;!t[h];h^=o||1,a=n[a]||1){let c=a^a<<1^a<<2^a<<3^a<<4;c=c>>8^c&255^99,t[h]=c,s[c]=h,u=r[l=r[o=r[h]]];let d=u*16843009^l*65537^o*257^h*16843008,f=r[c]*257^c*16843008;for(let y=0;y<4;y++)i[y][h]=f=f<<24^f>>>8,e[y][c]=d=d<<24^d>>>8}for(let h=0;h<5;h++)i[h]=i[h].slice(0),e[h]=e[h].slice(0)}_crypt(i,e){if(i.length!==4)throw new Error("invalid aes block size");const t=this._key[e],s=t.length/4-2,r=[0,0,0,0],n=this._tables[e],a=n[0],o=n[1],l=n[2],u=n[3],h=n[4];let c=i[0]^t[0],d=i[e?3:1]^t[1],f=i[2]^t[2],y=i[e?1:3]^t[3],v=4,m,g,b;for(let x=0;x<s;x++)m=a[c>>>24]^o[d>>16&255]^l[f>>8&255]^u[y&255]^t[v],g=a[d>>>24]^o[f>>16&255]^l[y>>8&255]^u[c&255]^t[v+1],b=a[f>>>24]^o[y>>16&255]^l[c>>8&255]^u[d&255]^t[v+2],y=a[y>>>24]^o[c>>16&255]^l[d>>8&255]^u[f&255]^t[v+3],v+=4,c=m,d=g,f=b;for(let x=0;x<4;x++)r[e?3&-x:x]=h[c>>>24]<<24^h[d>>16&255]<<16^h[f>>8&255]<<8^h[y&255]^t[v++],m=c,c=d,d=f,f=y,y=m;return r}};const ide={getRandomValues(i){const e=new Uint32Array(i.buffer),t=s=>{let r=987654321;const n=4294967295;return function(){return r=36969*(r&65535)+(r>>16)&n,s=18e3*(s&65535)+(s>>16)&n,(((r<<16)+s&n)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let s=0,r;s<i.length;s+=4){const n=t((r||Math.random())*4294967296);r=n()*987654071,e[s/4]=n()*4294967296|0}return i}},tV={};tV.ctrGladman=class{constructor(i,e){this._prf=i,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(i){return this.calculate(this._prf,i,this._iv)}incWord(i){if((i>>24&255)===255){let e=i>>16&255,t=i>>8&255,s=i&255;e===255?(e=0,t===255?(t=0,s===255?s=0:++s):++t):++e,i=0,i+=e<<16,i+=t<<8,i+=s}else i+=1<<24;return i}incCounter(i){(i[0]=this.incWord(i[0]))===0&&(i[1]=this.incWord(i[1]))}calculate(i,e,t){let s;if(!(s=e.length))return[];const r=zs.bitLength(e);for(let n=0;n<s;n+=4){this.incCounter(t);const a=i.encrypt(t);e[n]^=a[0],e[n+1]^=a[1],e[n+2]^=a[2],e[n+3]^=a[3]}return zs.clamp(e,r)}};const Ta={importKey(i){return new Ta.hmacSha1(fd.bytes.toBits(i))},pbkdf2(i,e,t,s){if(t=t||1e4,s<0||t<0)throw new Error("invalid params to pbkdf2");const r=(s>>5)+1<<2;let n,a,o,l,u;const h=new ArrayBuffer(r),c=new DataView(h);let d=0;const f=zs;for(e=fd.bytes.toBits(e),u=1;d<(r||1);u++){for(n=a=i.encrypt(f.concat(e,[u])),o=1;o<t;o++)for(a=i.encrypt(a),l=0;l<a.length;l++)n[l]^=a[l];for(o=0;d<(r||1)&&o<n.length;o++)c.setInt32(d,n[o]),d+=4}return h.slice(0,s/8)}};Ta.hmacSha1=class{constructor(i){const e=this,t=e._hash=XE.sha1,s=[[],[]];e._baseHash=[new t,new t];const r=e._baseHash[0].blockSize/32;i.length>r&&(i=new t().update(i).finalize());for(let n=0;n<r;n++)s[0][n]=i[n]^909522486,s[1][n]=i[n]^1549556828;e._baseHash[0].update(s[0]),e._baseHash[1].update(s[1]),e._resultHash=new t(e._baseHash[0])}reset(){const i=this;i._resultHash=new i._hash(i._baseHash[0]),i._updated=!1}update(i){const e=this;e._updated=!0,e._resultHash.update(i)}digest(){const i=this,e=i._resultHash.finalize(),t=new i._hash(i._baseHash[1]).update(e).finalize();return i.reset(),t}encrypt(i){if(this._updated)throw new Error("encrypt on already updated hmac called!");return this.update(i),this.digest(i)}};const rde=typeof crypto!=Bn&&typeof crypto.getRandomValues==ou,sV="Invalid password",iV="Invalid signature",rV="zipjs-abort-check-password";function nV(i){return rde?crypto.getRandomValues(i):ide.getRandomValues(i)}const ko=16,nde="raw",aV={name:"PBKDF2"},ade={name:"HMAC"},ode="SHA-1",lde=Object.assign({hash:ade},aV),Mg=Object.assign({iterations:1e3,hash:{name:ode}},aV),ude=["deriveBits"],lu=[8,12,16],uu=[16,24,32],Qn=10,hde=[0,0,0,0],md=typeof crypto!=Bn,hu=md&&crypto.subtle,oV=md&&typeof hu!=Bn,Ir=fd.bytes,cde=eV.aes,dde=tV.ctrGladman,pde=Ta.hmacSha1;let lV=md&&oV&&typeof hu.importKey==ou,uV=md&&oV&&typeof hu.deriveBits==ou;class fde extends TransformStream{constructor({password:e,rawPassword:t,signed:s,encryptionStrength:r,checkPasswordOnly:n}){super({start(){Object.assign(this,{ready:new Promise(a=>this.resolveReady=a),password:dV(e,t),signed:s,strength:r-1,pending:new Uint8Array})},async transform(a,o){const l=this,{password:u,strength:h,resolveReady:c,ready:d}=l;u?(await gde(l,h,u,$i(a,0,lu[h]+2)),a=$i(a,lu[h]+2),n?o.error(new Error(rV)):c()):await d;const f=new Uint8Array(a.length-Qn-(a.length-Qn)%ko);o.enqueue(hV(l,a,f,0,Qn,!0))},async flush(a){const{signed:o,ctr:l,hmac:u,pending:h,ready:c}=this;if(u&&l){await c;const d=$i(h,0,h.length-Qn),f=$i(h,h.length-Qn);let y=new Uint8Array;if(d.length){const v=du(Ir,d);u.update(v);const m=l.update(v);y=cu(Ir,m)}if(o){const v=$i(cu(Ir,u.digest()),0,Qn);for(let m=0;m<Qn;m++)if(v[m]!=f[m])throw new Error(iV)}a.enqueue(y)}}})}}class mde extends TransformStream{constructor({password:e,rawPassword:t,encryptionStrength:s}){let r;super({start(){Object.assign(this,{ready:new Promise(n=>this.resolveReady=n),password:dV(e,t),strength:s-1,pending:new Uint8Array})},async transform(n,a){const o=this,{password:l,strength:u,resolveReady:h,ready:c}=o;let d=new Uint8Array;l?(d=await vde(o,u,l),h()):await c;const f=new Uint8Array(d.length+n.length-n.length%ko);f.set(d,0),a.enqueue(hV(o,n,f,d.length,0))},async flush(n){const{ctr:a,hmac:o,pending:l,ready:u}=this;if(o&&a){await u;let h=new Uint8Array;if(l.length){const c=a.update(du(Ir,l));o.update(c),h=cu(Ir,c)}r.signature=cu(Ir,o.digest()).slice(0,Qn),n.enqueue(Ng(h,r.signature))}}}),r=this}}function hV(i,e,t,s,r,n){const{ctr:a,hmac:o,pending:l}=i,u=e.length-r;l.length&&(e=Ng(l,e),t=bde(t,u-u%ko));let h;for(h=0;h<=u-ko;h+=ko){const c=du(Ir,$i(e,h,h+ko));n&&o.update(c);const d=a.update(c);n||o.update(d),t.set(cu(Ir,d),h+s)}return i.pending=$i(e,h),t}async function gde(i,e,t,s){const r=await cV(i,e,t,$i(s,0,lu[e])),n=$i(s,lu[e]);if(r[0]!=n[0]||r[1]!=n[1])throw new Error(sV)}async function vde(i,e,t){const s=nV(new Uint8Array(lu[e])),r=await cV(i,e,t,s);return Ng(s,r)}async function cV(i,e,t,s){i.password=null;const r=await yde(nde,t,lde,!1,ude),n=await Cde(Object.assign({salt:s},Mg),r,8*(uu[e]*2+2)),a=new Uint8Array(n),o=du(Ir,$i(a,0,uu[e])),l=du(Ir,$i(a,uu[e],uu[e]*2)),u=$i(a,uu[e]*2);return Object.assign(i,{keys:{key:o,authentication:l,passwordVerification:u},ctr:new dde(new cde(o),Array.from(hde)),hmac:new pde(l)}),u}async function yde(i,e,t,s,r){if(lV)try{return await hu.importKey(i,e,t,s,r)}catch{return lV=!1,Ta.importKey(e)}else return Ta.importKey(e)}async function Cde(i,e,t){if(uV)try{return await hu.deriveBits(i,e,t)}catch{return uV=!1,Ta.pbkdf2(e,i.salt,Mg.iterations,t)}else return Ta.pbkdf2(e,i.salt,Mg.iterations,t)}function dV(i,e){return e===Ft?pd(i):e}function Ng(i,e){let t=i;return i.length+e.length&&(t=new Uint8Array(i.length+e.length),t.set(i,0),t.set(e,i.length)),t}function bde(i,e){if(e&&e>i.length){const t=i;i=new Uint8Array(e),i.set(t,0)}return i}function $i(i,e,t){return i.subarray(e,t)}function cu(i,e){return i.fromBits(e)}function du(i,e){return i.toBits(e)}const Oo=12;class wde extends TransformStream{constructor({password:e,passwordVerification:t,checkPasswordOnly:s}){super({start(){Object.assign(this,{password:e,passwordVerification:t}),mV(this,e)},transform(r,n){const a=this;if(a.password){const o=pV(a,r.subarray(0,Oo));if(a.password=null,o[Oo-1]!=a.passwordVerification)throw new Error(sV);r=r.subarray(Oo)}s?n.error(new Error(rV)):n.enqueue(pV(a,r))}})}}class xde extends TransformStream{constructor({password:e,passwordVerification:t}){super({start(){Object.assign(this,{password:e,passwordVerification:t}),mV(this,e)},transform(s,r){const n=this;let a,o;if(n.password){n.password=null;const l=nV(new Uint8Array(Oo));l[Oo-1]=n.passwordVerification,a=new Uint8Array(s.length+l.length),a.set(fV(n,l),0),o=Oo}else a=new Uint8Array(s.length),o=0;a.set(fV(n,s),o),r.enqueue(a)}})}}function pV(i,e){const t=new Uint8Array(e.length);for(let s=0;s<e.length;s++)t[s]=gV(i)^e[s],Fg(i,t[s]);return t}function fV(i,e){const t=new Uint8Array(e.length);for(let s=0;s<e.length;s++)t[s]=gV(i)^e[s],Fg(i,e[s]);return t}function mV(i,e){const t=[305419896,591751049,878082192];Object.assign(i,{keys:t,crcKey0:new Og(t[0]),crcKey2:new Og(t[2])});for(let s=0;s<e.length;s++)Fg(i,e.charCodeAt(s))}function Fg(i,e){let[t,s,r]=i.keys;i.crcKey0.append([e]),t=~i.crcKey0.get(),s=yV(Math.imul(yV(s+vV(t)),134775813)+1),i.crcKey2.append([s>>>24]),r=~i.crcKey2.get(),i.keys=[t,s,r]}function gV(i){const e=i.keys[2]|2;return vV(Math.imul(e,e^1)>>>8)}function vV(i){return i&255}function yV(i){return i&4294967295}const CV="deflate-raw";class Ede extends TransformStream{constructor(e,{chunkSize:t,CompressionStream:s,CompressionStreamNative:r}){super({});const{compressed:n,encrypted:a,useCompressionStream:o,zipCrypto:l,signed:u,level:h}=e,c=this;let d,f,y=bV(super.readable);(!a||l)&&u&&(d=new YE,y=Rr(y,d)),n&&(y=xV(y,o,{level:h,chunkSize:t},r,s)),a&&(l?y=Rr(y,new xde(e)):(f=new mde(e),y=Rr(y,f))),wV(c,y,()=>{let v;a&&!l&&(v=f.signature),(!a||l)&&u&&(v=new DataView(d.value.buffer).getUint32(0)),c.signature=v})}}class Vde extends TransformStream{constructor(e,{chunkSize:t,DecompressionStream:s,DecompressionStreamNative:r}){super({});const{zipCrypto:n,encrypted:a,signed:o,signature:l,compressed:u,useCompressionStream:h}=e;let c,d,f=bV(super.readable);a&&(n?f=Rr(f,new wde(e)):(d=new fde(e),f=Rr(f,d))),u&&(f=xV(f,h,{chunkSize:t},r,s)),(!a||n)&&o&&(c=new YE,f=Rr(f,c)),wV(this,f,()=>{if((!a||n)&&o){const y=new DataView(c.value.buffer);if(l!=y.getUint32(0,!1))throw new Error(iV)}})}}function bV(i){return Rr(i,new TransformStream({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function wV(i,e,t){e=Rr(e,new TransformStream({flush:t})),Object.defineProperty(i,"readable",{get(){return e}})}function xV(i,e,t,s,r){try{const n=e&&s?s:r;i=Rr(i,new n(CV,t))}catch{if(e)try{i=Rr(i,new r(CV,t))}catch{return i}else return i}return i}function Rr(i,e){return i.pipeThrough(e)}const Sde="message",Tde="start",Pde="pull",EV="data",Ide="ack",VV="close",SV="deflate",Rde="inflate";class Ade extends TransformStream{constructor(e,t){super({});const s=this,{codecType:r}=e;let n;r.startsWith(SV)?n=Ede:r.startsWith(Rde)&&(n=Vde);let a=0,o=0;const l=new n(e,t),u=super.readable,h=new TransformStream({transform(d,f){d&&d.length&&(o+=d.length,f.enqueue(d))},flush(){Object.assign(s,{inputSize:o})}}),c=new TransformStream({transform(d,f){d&&d.length&&(a+=d.length,f.enqueue(d))},flush(){const{signature:d}=l;Object.assign(s,{signature:d,outputSize:a,inputSize:o})}});Object.defineProperty(s,"readable",{get(){return u.pipeThrough(h).pipeThrough(l).pipeThrough(c)}})}}class Lde extends TransformStream{constructor(e){let t;super({transform:s,flush(r){t&&t.length&&r.enqueue(t)}});function s(r,n){if(t){const a=new Uint8Array(t.length+r.length);a.set(t),a.set(r,t.length),r=a,t=null}r.length>e?(n.enqueue(r.slice(0,e)),s(r.slice(e),n)):t=r}}}let TV=typeof Worker!=Bn;class qg{constructor(e,{readable:t,writable:s},{options:r,config:n,streamOptions:a,useWebWorkers:o,transferStreams:l,scripts:u},h){const{signal:c}=a;return Object.assign(e,{busy:!0,readable:t.pipeThrough(new Lde(n.chunkSize)).pipeThrough(new _de(t,a),{signal:c}),writable:s,options:Object.assign({},r),scripts:u,transferStreams:l,terminate(){return new Promise(d=>{const{worker:f,busy:y}=e;f?(y?e.resolveTerminated=d:(f.terminate(),d()),e.interface=null):d()})},onTaskFinished(){const{resolveTerminated:d}=e;d&&(e.resolveTerminated=null,e.terminated=!0,e.worker.terminate(),d()),e.busy=!1,h(e)}}),(o&&TV?Dde:PV)(e,n)}}class _de extends TransformStream{constructor(e,{onstart:t,onprogress:s,size:r,onend:n}){let a=0;super({async start(){t&&await Bg(t,r)},async transform(o,l){a+=o.length,s&&await Bg(s,a,r),l.enqueue(o)},async flush(){e.size=a,n&&await Bg(n,a)}})}}async function Bg(i,...e){try{await i(...e)}catch{}}function PV(i,e){return{run:()=>kde(i,e)}}function Dde(i,e){const{baseURL:t,chunkSize:s}=e;if(!i.interface){let r;try{r=Nde(i.scripts[0],t,i)}catch{return TV=!1,PV(i,e)}Object.assign(i,{worker:r,interface:{run:()=>Ode(i,{chunkSize:s})}})}return i.interface}async function kde({options:i,readable:e,writable:t,onTaskFinished:s},r){try{const n=new Ade(i,r);await e.pipeThrough(n).pipeTo(t,{preventClose:!0,preventAbort:!0});const{signature:a,inputSize:o,outputSize:l}=n;return{signature:a,inputSize:o,outputSize:l}}finally{s()}}async function Ode(i,e){let t,s;const r=new Promise((d,f)=>{t=d,s=f});Object.assign(i,{reader:null,writer:null,resolveResult:t,rejectResult:s,result:r});const{readable:n,options:a,scripts:o}=i,{writable:l,closed:u}=Mde(i.writable),h=gd({type:Tde,scripts:o.slice(1),options:a,config:e,readable:n,writable:l},i);h||Object.assign(i,{reader:n.getReader(),writer:l.getWriter()});const c=await r;return h||await l.getWriter().close(),await u,c}function Mde(i){let e;const t=new Promise(r=>e=r);return{writable:new WritableStream({async write(r){const n=i.getWriter();await n.ready,await n.write(r),n.releaseLock()},close(){e()},abort(r){return i.getWriter().abort(r)}}),closed:t}}let IV=!0,RV=!0;function Nde(i,e,t){const s={type:"module"};let r,n;typeof i==ou&&(i=i());try{r=new URL(i,e)}catch{r=i}if(IV)try{n=new Worker(r)}catch{IV=!1,n=new Worker(r,s)}else n=new Worker(r,s);return n.addEventListener(Sde,a=>Fde(a,t)),n}function gd(i,{worker:e,writer:t,onTaskFinished:s,transferStreams:r}){try{let{value:n,readable:a,writable:o}=i;const l=[];if(n&&(n.byteLength<n.buffer.byteLength?i.value=n.buffer.slice(0,n.byteLength):i.value=n.buffer,l.push(i.value)),r&&RV?(a&&l.push(a),o&&l.push(o)):i.readable=i.writable=null,l.length)try{return e.postMessage(i,l),!0}catch{RV=!1,i.readable=i.writable=null,e.postMessage(i)}else e.postMessage(i)}catch(n){throw t&&t.releaseLock(),s(),n}}async function Fde({data:i},e){const{type:t,value:s,messageId:r,result:n,error:a}=i,{reader:o,writer:l,resolveResult:u,rejectResult:h,onTaskFinished:c}=e;try{if(a){const{message:f,stack:y,code:v,name:m}=a,g=new Error(f);Object.assign(g,{stack:y,code:v,name:m}),d(g)}else{if(t==Pde){const{value:f,done:y}=await o.read();gd({type:EV,value:f,done:y,messageId:r},e)}t==EV&&(await l.ready,await l.write(new Uint8Array(s)),gd({type:Ide,messageId:r},e)),t==VV&&d(null,n)}}catch(f){gd({type:VV,messageId:r},e),d(f)}function d(f,y){f?h(f):u(y),l&&l.releaseLock(),c()}}let Pa=[];const $g=[];let AV=0;async function qde(i,e){const{options:t,config:s}=e,{transferStreams:r,useWebWorkers:n,useCompressionStream:a,codecType:o,compressed:l,signed:u,encrypted:h}=t,{workerScripts:c,maxWorkers:d}=s;e.transferStreams=r||r===Ft;const f=!l&&!u&&!h&&!e.transferStreams;return e.useWebWorkers=!f&&(n||n===Ft&&s.useWebWorkers),e.scripts=e.useWebWorkers&&c?c[o]:[],t.useCompressionStream=a||a===Ft&&s.useCompressionStream,(await y()).run();async function y(){const m=Pa.find(g=>!g.busy);if(m)return LV(m),new qg(m,i,e,v);if(Pa.length<d){const g={indexWorker:AV};return AV++,Pa.push(g),new qg(g,i,e,v)}else return new Promise(g=>$g.push({resolve:g,stream:i,workerOptions:e}))}function v(m){if($g.length){const[{resolve:g,stream:b,workerOptions:x}]=$g.splice(0,1);g(new qg(m,b,x,v))}else m.worker?(LV(m),Bde(m,e)):Pa=Pa.filter(g=>g!=m)}}function Bde(i,e){const{config:t}=e,{terminateWorkerTimeout:s}=t;Number.isFinite(s)&&s>=0&&(i.terminated?i.terminated=!1:i.terminateTimeout=setTimeout(async()=>{Pa=Pa.filter(r=>r!=i);try{await i.terminate()}catch{}},s))}function LV(i){const{terminateTimeout:e}=i;e&&(clearTimeout(e),i.terminateTimeout=null)}function $de(i,e={}){const t=`const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self,k=void 0,v="undefined",S="function";class z{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const C=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;C[e]=t}class x{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^C[255&(t^e[n])];this.t=t}get(){return~this.t}}class A extends p{constructor(){let e;const t=new x;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new i(4);new l(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,r.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s<e.length;s++)r.push(n|e[s]>>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},I={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)3&s||(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},k(e){const t=[];let n,r=0;for(n=0;n<e.length;n++)r=r<<8|e[n],3&~n||(t.push(r),r=0);return 3&n&&t.push(_.h(8*(3&n),r)),t}}},P=class{constructor(e){const t=this;t.blockSize=512,t.v=[1732584193,4023233417,2562383102,271733878,3285377520],t.S=[1518500249,1859775393,2400959708,3395469782],e?(t.C=e.C.slice(0),t.A=e.A.slice(0),t._=e._):t.reset()}reset(){const e=this;return e.C=e.v.slice(0),e.A=[],e._=0,e}update(e){const t=this;"string"==typeof e&&(e=I.I.k(e));const n=t.A=_.concat(t.A,e),r=t._,i=t._=r+_.l(e);if(i>9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.P(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t}D(){const e=this;let t=e.A;const n=e.C;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.P(t.splice(0,16));return e.reset(),n}V(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}R(e,t){return t<<e|t>>>32-e}P(t){const n=this,s=n.C,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.R(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.R(5,o)+n.V(e,c,f,a)+l+i[e]+n.S[r.floor(e/20)]|0;l=a,a=f,f=n.R(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}},D={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;i<e.length;i+=4){const e=n(4294967296*(s||r.random()));s=987654071*e(),t[i/4]=4294967296*e()|0}return e}},V={importKey:e=>new V.B(I.p.k(e)),M(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=I.p.k(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;a<c.length;a++)o[a]^=c[a];for(f=0;(i||1)>d&&f<o.length;f++)h.setInt32(d,o[f]),d+=4}return w.slice(0,r/8)},B:class{constructor(e){const t=this,n=t.U=P,r=[[],[]];t.K=[new n,new n];const s=t.K[0].blockSize/32;e.length>s&&(e=(new n).update(e).D());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.K[0].update(r[0]),t.K[1].update(r[1]),t.N=new n(t.K[0])}reset(){const e=this;e.N=new e.U(e.K[0]),e.O=!1}update(e){this.O=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.U(e.K[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.O)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},R=typeof h!=v&&typeof h.getRandomValues==S,B="Invalid password",E="Invalid signature",M="zipjs-abort-check-password";function U(e){return R?h.getRandomValues(e):D.getRandomValues(e)}const K=16,N={name:"PBKDF2"},O=t.assign({hash:{name:"HMAC"}},N),T=t.assign({iterations:1e3,hash:{name:"SHA-1"}},N),W=["deriveBits"],j=[8,12,16],H=[16,24,32],L=10,F=[0,0,0,0],q=typeof h!=v,G=q&&h.subtle,J=q&&typeof G!=v,Q=I.p,X=class{constructor(e){const t=this;t.T=[[[],[],[],[],[]],[[],[],[],[],[]]],t.T[0][0][0]||t.W();const n=t.T[0][4],r=t.T[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.S=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.j(e,0)}decrypt(e){return this.j(e,1)}W(){const e=this.T[0],t=this.T[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}j(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.S[t],r=n.length/4-2,i=[0,0,0,0],o=this.T[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},Y=class{constructor(e,t){this.H=e,this.L=t,this.F=t}reset(){this.F=this.L}update(e){return this.q(this.H,e,this.F)}G(e){if(255&~(e>>24))e+=1<<24;else{let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},Z=V.B;let $=q&&J&&typeof G.importKey==S,ee=q&&J&&typeof G.deriveBits==S;class te extends p{constructor({password:e,rawPassword:n,signed:r,encryptionStrength:o,checkPasswordOnly:c}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:ie(e,n),signed:r,Y:o-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:f,ready:a}=n;r?(await(async(e,t,n,r)=>{const i=await se(e,t,n,ce(r,0,j[t])),o=ce(r,j[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(B)})(n,o,r,ce(e,0,j[o]+2)),e=ce(e,j[o]+2),c?t.error(new s(M)):f()):await a;const l=new i(e.length-L-(e.length-L)%K);t.enqueue(re(n,e,l,0,L,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;if(r&&n){await c;const f=ce(o,0,o.length-L),a=ce(o,o.length-L);let l=new i;if(f.length){const e=ae(Q,f);r.update(e);const t=n.update(e);l=fe(Q,t)}if(t){const e=ce(fe(Q,r.digest()),0,L);for(let t=0;L>t;t++)if(e[t]!=a[t])throw new s(E)}e.enqueue(l)}}})}}class ne extends p{constructor({password:e,rawPassword:n,encryptionStrength:r}){let s;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:ie(e,n),Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=U(new i(j[t]));return oe(r,await se(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%K);a.set(f,0),t.enqueue(re(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:r,ready:o}=this;if(n&&t){await o;let c=new i;if(r.length){const e=t.update(ae(Q,r));n.update(e),c=fe(Q,e)}s.signature=fe(Q,n.digest()).slice(0,L),e.enqueue(oe(c,s.signature))}}}),s=this}}function re(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=oe(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%K)),u=0;l-K>=u;u+=K){const e=ae(Q,ce(t,u,u+K));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set(fe(Q,s),u+r)}return e.pending=ce(t,u),n}async function se(n,r,s,o){n.password=null;const c=await(async(e,t,n,r,s)=>{if(!$)return V.importKey(t);try{return await G.importKey("raw",t,n,!1,s)}catch(e){return $=!1,V.importKey(t)}})(0,s,O,0,W),f=await(async(e,t,n)=>{if(!ee)return V.M(t,e.salt,T.iterations,n);try{return await G.deriveBits(e,t,n)}catch(r){return ee=!1,V.M(t,e.salt,T.iterations,n)}})(t.assign({salt:o},T),c,8*(2*H[r]+2)),a=new i(f),l=ae(Q,ce(a,0,H[r])),u=ae(Q,ce(a,H[r],2*H[r])),w=ce(a,2*H[r]);return t.assign(n,{keys:{key:l,ee:u,passwordVerification:w},Z:new Y(new X(l),e.from(F)),$:new Z(u)}),w}function ie(e,t){return t===k?(e=>{if(typeof w==v){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new w).encode(e)})(e):t}function oe(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function ce(e,t,n){return e.subarray(t,n)}function fe(e,t){return e.m(t)}function ae(e,t){return e.k(t)}class le extends p{constructor({password:e,passwordVerification:n,checkPasswordOnly:r}){super({start(){t.assign(this,{password:e,passwordVerification:n}),de(this,e)},transform(e,t){const n=this;if(n.password){const t=we(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(B);e=e.subarray(12)}r?t.error(new s(M)):t.enqueue(we(n,e))}})}}class ue extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),de(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=U(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(he(n,t),0),s=12}else r=new i(e.length),s=0;r.set(he(n,e),s),t.enqueue(r)}})}}function we(e,t){const n=new i(t.length);for(let r=0;r<t.length;r++)n[r]=ye(e)^t[r],pe(e,n[r]);return n}function he(e,t){const n=new i(t.length);for(let r=0;r<t.length;r++)n[r]=ye(e)^t[r],pe(e,t[r]);return n}function de(e,n){const r=[305419896,591751049,878082192];t.assign(e,{keys:r,te:new x(r[0]),ne:new x(r[2])});for(let t=0;t<n.length;t++)pe(e,n.charCodeAt(t))}function pe(e,t){let[n,s,i]=e.keys;e.te.append([t]),n=~e.te.get(),s=be(r.imul(be(s+me(n)),134775813)+1),e.ne.append([s>>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ye(e){const t=2|e.keys[2];return me(r.imul(t,1^t)>>>8)}function me(e){return 255&e}function be(e){return 4294967295&e}const ge="deflate-raw";class ke extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=Se(super.readable);i&&!c||!f||(w=new A,d=xe(d,w)),s&&(d=Ce(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=xe(d,new ue(e)):(h=new ne(e),d=xe(d,h))),ze(u,d,(()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=new l(w.value.buffer).getUint32(0)),u.signature=e}))}}class ve extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=Se(super.readable);o&&(i?d=xe(d,new le(e)):(h=new te(e),d=xe(d,h))),a&&(d=Ce(d,u,{chunkSize:t},r,n)),o&&!i||!c||(w=new A,d=xe(d,w)),ze(this,d,(()=>{if((!o||i)&&c){const e=new l(w.value.buffer);if(f!=e.getUint32(0,!1))throw new s(E)}}))}}function Se(e){return xe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ze(e,n,r){n=xe(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function Ce(e,t,n,r,s){try{e=xe(e,new(t&&r?r:s)(ge,n))}catch(r){if(!t)return e;try{e=xe(e,new s(ge,n))}catch(t){return e}}return e}function xe(e,t){return e.pipeThrough(t)}const Ae="data",_e="close";class Ie extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=ke:s.startsWith("inflate")&&(i=ve);let o=0,c=0;const f=new i(e,n),a=super.readable,l=new p({transform(e,t){e&&e.length&&(c+=e.length,t.enqueue(e))},flush(){t.assign(r,{inputSize:c})}}),u=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=f;t.assign(r,{signature:e,outputSize:o,inputSize:c})}});t.defineProperty(r,"readable",{get:()=>a.pipeThrough(l).pipeThrough(f).pipeThrough(u)})}}class Pe extends p{constructor(e){let t;super({transform:function n(r,s){if(t){const e=new i(t.length+r.length);e.set(t),e.set(r,t.length),r=e,t=null}r.length>e?(s.enqueue(r.slice(0,e)),n(r.slice(e),s)):t=r},flush(e){t&&t.length&&e.enqueue(t)}})}}const De=new a,Ve=new a;let Re,Be=0,Ee=!0;async function Me(e){try{const{options:t,scripts:r,config:s}=e;if(r&&r.length)try{Ee?importScripts.apply(k,r):await Ue(r)}catch(e){Ee=!1,await Ue(r)}self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new z(self.Deflate)),self.Inflate&&(s.DecompressionStream=new z(self.Inflate));const i={highWaterMark:1},o=e.readable||new y({async pull(e){const t=new u((e=>De.set(Be,e)));Ke({type:"pull",messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));Ve.set(Be,t),Ke({type:Ae,value:e,messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new Ie(t,s);Re=new AbortController;const{signal:a}=Re;await o.pipeThrough(f).pipeThrough(new Pe(s.chunkSize)).pipeTo(c,{signal:a,preventClose:!0,preventAbort:!0}),await c.getWriter().close();const{signature:l,inputSize:w,outputSize:h}=f;Ke({type:_e,result:{signature:l,inputSize:w,outputSize:h}})}catch(e){Ne(e)}}async function Ue(e){for(const t of e)await import(t)}function Ke(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Ne(e=new s("Unknown error")){const{message:t,stack:n,code:r,name:i}=e;d({error:{message:t,stack:n,code:r,name:i}})}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&Me(e),t==Ae){const e=De.get(n);De.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=Ve.get(n);Ve.delete(n),e()}t==_e&&Re.abort()}catch(e){Ne(e)}}));const Oe=-2;function Te(t){return We(t.map((([t,n])=>new e(t).fill(n,0,t))))}function We(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?We(n):n)),[])}const je=[0,1,2,3].concat(...Te([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function He(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=573,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;573>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function Le(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}He.ke=[0,1,2,3,4,5,6,7].concat(...Te([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),He.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],He.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],He.ze=e=>256>e?je[e]:je[256+(e>>>7)],He.Ce=[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],He.xe=[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],He.Ae=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],He._e=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Fe=Te([[144,8],[112,9],[24,7],[8,8]]);Le.Ie=We([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Fe[t]])));const qe=Te([[30,5]]);function Ge(e,t,n,r,s){const i=this;i.Pe=e,i.De=t,i.Ve=n,i.Re=r,i.Be=s}Le.Ee=We([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,qe[t]]))),Le.Me=new Le(Le.Ie,He.Ce,257,286,15),Le.Ue=new Le(Le.Ee,He.xe,0,30,15),Le.Ke=new Le(null,He.Ae,0,19,7);const Je=[new Ge(0,0,0,0,0),new Ge(4,4,8,4,1),new Ge(4,5,16,8,1),new Ge(4,6,32,32,1),new Ge(4,4,16,16,2),new Ge(8,16,32,32,2),new Ge(8,16,128,128,2),new Ge(8,32,128,256,2),new Ge(32,128,258,1024,2),new Ge(32,258,258,4096,2)],Qe=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Xe=113,Ye=666,Ze=262;function $e(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function et(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,C,x,A,_,I,P,D,V,R,B,E,M,U;const K=new He,N=new He,O=new He;let T,W,j,H,L,F;function q(){let t;for(t=0;286>t;t++)E[2*t]=0;for(t=0;30>t;t++)M[2*t]=0;for(t=0;19>t;t++)U[2*t]=0;E[512]=1,e.we=e.he=0,W=j=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++i<o&&n==s||(c>i?U[2*n]+=i:0!==n?(n!=r&&U[2*n]++,U[32]++):i>10?U[36]++:U[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;F>16-r?(n=e,L|=n<<F&65535,Q(L),L=n>>>16-F,F+=r-16):(L|=e<<F&65535,F+=r)}function Y(e,t){const n=2*e;X(65535&t[n],65535&t[n+1])}function Z(e,t){let n,r,s=-1,i=e[1],o=0,c=7,f=4;for(0===i&&(c=138,f=3),n=0;t>=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,U)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,U),o--),Y(16,U),X(o-3,2)):o>10?(Y(18,U),X(o-11,7)):(Y(17,U),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==F?(Q(L),L=0,F=0):8>F||(J(255&L),L>>>=8,F-=8)}function ee(t,n){let s,i,o;if(e.Oe[W]=t,e.Te[W]=255&n,W++,0===t?E[2*n]++:(j++,t--,E[2*(He.ke[n]+256+1)]++,M[2*He.ze(t)]++),!(8191&W)&&D>2){for(s=8*W,i=C-k,o=0;30>o;o++)s+=M[2*o]*(5+He.xe[o]);if(s>>>=3,j<r.floor(W/2)&&s<r.floor(i/2))return!0}return W==T-1}function te(t,n){let r,s,i,o,c=0;if(0!==W)do{r=e.Oe[c],s=e.Te[c],c++,0===r?Y(s,t):(i=He.ke[s],Y(i+256+1,t),o=He.Ce[i],0!==o&&(s-=He.ve[i],X(s,o)),r--,i=He.ze(r),Y(i,n),o=He.xe[i],0!==o&&(r-=He.Se[i],X(r,o)))}while(W>c);Y(256,t),H=t[513]}function ne(){F>8?Q(L):F>0&&J(255&L),L=0,F=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),H=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;D>0?(K.re(e),N.re(e),o=(()=>{let t;for(G(E,K.de),G(M,N.de),O.re(e),t=18;t>=3&&0===U[2*He._e[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(Le.Ie,Le.Ee)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(U[2*He._e[r]+1],3);Z(E,e-1),Z(M,t-1)})(K.de+1,N.de+1,o+1),te(E,M)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,C-k,n),k=C,t.We()}function ie(){let e,n,r,s;do{if(s=w-A-C,0===s&&0===C&&0===A)s=f;else if(-1==s)s--;else if(C>=f+f-Ze){u.set(u.subarray(f,f+f),0),x-=f,C-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.je)return;e=t.He(u,C+A,s),A+=e,3>A||(p=255&u[C],p=(p<<g^255&u[C+1])&b)}while(Ze>A&&0!==t.je)}function oe(e){let t,n,r=I,s=C,i=_;const o=C>f-Ze?C-(f-Ze):0;let c=B;const a=l,w=C+258;let d=u[s+i-1],p=u[s+i];R>_||(r>>=2),c>A&&(c=A);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(x=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>A?A:i}e.ue=[],e.ge=[],e.le=[],E=[],M=[],U=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i<e.fe&&$e(t,r[i+1],r[i],e.ue)&&i++,!$e(t,s,r[i],e.ue));)r[n]=r[i],n=i,i<<=1;r[n]=s},e.Le=(t,S,x,W,j,G)=>(W||(W=8),j||(j=8),G||(G=0),t.Fe=null,-1==S&&(S=6),1>j||j>9||8!=W||9>x||x>15||0>S||S>9||0>G||G>2?Oe:(t.qe=e,a=x,f=1<<a,l=f-1,m=j+7,y=1<<m,b=y-1,g=r.floor((m+3-1)/3),u=new i(2*f),h=[],d=[],T=1<<j+6,e.Ne=new i(4*T),s=4*T,e.Oe=new o(T),e.Te=new i(T),D=S,V=G,(t=>(t.Ge=t.Je=0,t.Fe=null,e.pending=0,e.Qe=0,n=Xe,c=0,K.se=E,K.oe=Le.Me,N.se=M,N.oe=Le.Ue,O.se=U,O.oe=Le.Ke,L=0,F=0,H=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;P=Je[D].De,R=Je[D].Pe,B=Je[D].Ve,I=Je[D].Re,C=0,k=0,A=0,v=_=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&n!=Xe&&n!=Ye?Oe:(e.Te=null,e.Oe=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,n==Xe?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?Oe:(Je[D].Be!=Je[t].Be&&0!==e.Ge&&(r=e.Ze(1)),D!=t&&(D=t,P=Je[D].De,R=Je[D].Pe,B=Je[D].Ve,I=Je[D].Re),V=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return Oe;if(3>i)return 0;for(i>f-Ze&&(i=f-Ze,o=r-i),u.set(t.subarray(o,o+i),0),C=i,k=i,p=255&u[0],p=(p<<g^255&u[1])&b,s=0;i-3>=s;s++)p=(p<<g^255&u[s+2])&b,h[s&l]=d[p],d[p]=s;return 0},e.Ze=(r,i)=>{let o,w,m,I,R;if(i>4||0>i)return Oe;if(!r.et||!r.tt&&0!==r.je||n==Ye&&4!=i)return r.Fe=Qe[4],Oe;if(0===r.nt)return r.Fe=Qe[7],-5;var B;if(t=r,I=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(D-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==C&&(w|=32),w+=31-w%31,n=Xe,J((B=w)>>8&255),J(255&B)),0!==e.pending){if(t.We(),0===t.nt)return c=-1,0}else if(0===t.je&&I>=i&&4!=i)return t.Fe=Qe[7],-5;if(n==Ye&&0!==t.je)return r.Fe=Qe[7],-5;if(0!==t.je||0!==A||0!=i&&n!=Ye){switch(R=-1,Je[D].Be){case 0:R=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=A){if(ie(),0===A&&0==e)return 0;if(0===A)break}if(C+=A,A=0,n=k+r,(0===C||C>=n)&&(A=C-n,C=n,se(!1),0===t.nt))return 0;if(C-k>=f-Ze&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:R=(e=>{let n,r=0;for(;;){if(Ze>A){if(ie(),Ze>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<<g^255&u[C+2])&b,r=65535&d[p],h[C&l]=d[p],d[p]=C),0===r||(C-r&65535)>f-Ze||2!=V&&(v=oe(r)),3>v)n=ee(0,255&u[C]),A--,C++;else if(n=ee(C-x,v-3),A-=v,v>P||3>A)C+=v,v=0,p=255&u[C],p=(p<<g^255&u[C+1])&b;else{v--;do{C++,p=(p<<g^255&u[C+2])&b,r=65535&d[p],h[C&l]=d[p],d[p]=C}while(0!=--v);C++}if(n&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 2:R=(e=>{let n,r,s=0;for(;;){if(Ze>A){if(ie(),Ze>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<<g^255&u[C+2])&b,s=65535&d[p],h[C&l]=d[p],d[p]=C),_=v,S=x,v=2,0!==s&&P>_&&f-Ze>=(C-s&65535)&&(2!=V&&(v=oe(s)),5>=v&&(1==V||3==v&&C-x>4096)&&(v=2)),3>_||v>_)if(0!==z){if(n=ee(0,255&u[C-1]),n&&se(!1),C++,A--,0===t.nt)return 0}else z=1,C++,A--;else{r=C+A-3,n=ee(C-1-S,_-3),A-=_-1,_-=2;do{++C>r||(p=(p<<g^255&u[C+2])&b,s=65535&d[p],h[C&l]=d[p],d[p]=C)}while(0!=--_);if(z=0,v=2,C++,n&&(se(!1),0===t.nt))return 0}}return 0!==z&&(n=ee(0,255&u[C-1]),z=0),se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i)}if(2!=R&&3!=R||(n=Ye),0==R||2==R)return 0===t.nt&&(c=-1),0;if(1==R){if(1==i)X(2,3),Y(256,Le.Ie),$(),9>1+H+10-F&&(X(2,3),Y(256,Le.Ie),$()),H=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.We(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function tt(){const e=this;e.rt=0,e.st=0,e.je=0,e.Ge=0,e.nt=0,e.Je=0}function nt(e){const t=new tt,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Le(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.je=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s("deflating: "+t.Fe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.subarray(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.je>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]?new i(w[0]):new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s("deflating: "+t.Fe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.je>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}tt.prototype={Le(e,t){const n=this;return n.qe=new et,t||(t=15),n.qe.Le(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):Oe},Xe(){const e=this;if(!e.qe)return Oe;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):Oe},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):Oe},He(e,t,n){const r=this;let s=r.je;return s>n&&(s=n),0===s?0:(r.je-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},We(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const rt=-2,st=-3,it=-5,ot=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],ct=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],ft=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],at=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],lt=[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,112,112],ut=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],wt=[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];function ht(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,C,x,A,_,I,P;C=0,g=o;do{n[e[t+C]]++,C++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,I=1<<k;g>k;k++,I<<=1)if(0>(I-=n[k]))return st;if(0>(I-=n[g]))return st;for(n[g]+=I,i[1]=k=0,C=1,_=2;0!=--g;)i[_]=k+=n[C],_++,C++;g=0,C=0;do{0!==(k=e[t+C])&&(d[i[k]++]=g),C++}while(++g<o);for(o=i[m],i[0]=g=0,C=0,b=-1,A=-S,s[0]=0,x=0,P=0;m>=v;v++)for(p=n[v];0!=p--;){for(;v>A+S;){if(b++,A+=S,P=m-A,P=P>S?S:P,(y=1<<(k=v-A))>p+1&&(y-=p+1,_=v,P>k))for(;++k<P&&(y<<=1)>n[++_];)y-=n[_];if(P=1<<k,h[0]+P>1440)return st;s[b]=x=h[0],h[0]+=P,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>A-S,r[2]=x-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=x}for(r[1]=v-A,o>C?d[C]<c?(r[0]=256>d[C]?0:96,r[2]=d[C++]):(r[0]=a[d[C]-c]+16+64,r[2]=f[d[C++]-c]):r[0]=192,y=1<<v-A,k=g>>>A;P>k;k+=y)w.set(r,3*(x+k));for(k=1<<v-1;g&k;k>>>=1)g^=k;for(g^=k,z=(1<<A)-1;(g&z)!=i[b];)b--,A-=S,z=(1<<A)-1}return 0!==I&&1!=m?it:0}function c(o){let c;for(e||(e=[],t=[],n=new f(16),r=[],s=new f(15),i=new f(16)),t.length<o&&(t=[]),c=0;o>c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),a==st?f.Fe="oversubscribed dynamic bit lengths tree":a!=it&&0!==r[0]||(f.Fe="incomplete dynamic bit lengths tree",a=st),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,at,lt,a,i,u,e,t),0!=h||0===i[0]?(h==st?w.Fe="oversubscribed literal/length tree":-4!=h&&(w.Fe="incomplete literal/length tree",h=st),h):(c(288),h=o(s,n,r,0,ut,wt,l,f,u,e,t),0!=h||0===f[0]&&n>257?(h==st?w.Fe="oversubscribed distance tree":h==it?(w.Fe="incomplete distance tree",h=st):-4!=h&&(w.Fe="empty distance tree with lengths",h=st),h):0)}}function dt(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.je,w=o.ct,h=o.ft,y=o.write,m=y<o.read?o.read-y-1:o.end-y,b=ot[e],g=ot[t];do{for(;20>h;)p--,w|=(255&c.lt(d++))<<h,h+=8;if(f=w&b,a=n,l=r,z=3*(l+f),0!==(u=a[z]))for(;;){if(w>>=a[z+1],h-=a[z+1],16&u){for(u&=15,k=a[z+2]+(w&ot[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.lt(d++))<<h,h+=8;for(f=w&g,a=s,l=i,z=3*(l+f),u=a[z];;){if(w>>=a[z+1],h-=a[z+1],16&u){for(u&=15;u>h;)p--,w|=(255&c.lt(d++))<<h,h+=8;if(v=a[z+2]+(w&ot[u]),w>>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--u);else o.ut.set(o.ut.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.ut[y++]=o.ut[S++],o.ut[y++]=o.ut[S++],k-=2):(o.ut.set(o.ut.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.ut[y++]=o.ut[S++]}while(0!=--k);else o.ut.set(o.ut.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(64&u)return c.Fe="invalid distance code",k=c.je-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.je=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,st;f+=a[z+2],f+=w&ot[u],z=3*(l+f),u=a[z]}break}if(64&u)return 32&u?(k=c.je-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.je=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,1):(c.Fe="invalid literal/length code",k=c.je-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.je=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,st);if(f+=a[z+2],f+=w&ot[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.ut[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.je-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ct=w,o.ft=h,c.je=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.wt=(e,y,m)=>{let b,g,k,v,S,z,C,x=0,A=0,_=0;for(_=y.rt,v=y.je,x=e.ct,A=e.ft,S=e.write,z=S<e.read?e.read-S-1:e.end-S;;)switch(t){case 0:if(z>=258&&v>=10&&(e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,m=p(u,w,r,h,s,d,e,y),_=y.rt,v=y.je,x=e.ct,A=e.ft,S=e.write,z=S<e.read?e.read-S-1:e.end-S,0!=m)){t=1==m?7:9;break}c=u,n=r,o=h,t=1;case 1:for(b=c;b>A;){if(0===v)return e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.ht(y,m);m=0,v--,x|=(255&y.lt(_++))<<A,A+=8}if(g=3*(o+(x&ot[b])),x>>>=n[g+1],A-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(16&k){a=15&k,i=n[g+2],t=2;break}if(!(64&k)){c=k,o=g/3+n[g+2];break}if(32&k){t=7;break}return t=9,y.Fe="invalid literal/length code",m=st,e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.ht(y,m);case 2:for(b=a;b>A;){if(0===v)return e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.ht(y,m);m=0,v--,x|=(255&y.lt(_++))<<A,A+=8}i+=x&ot[b],x>>=b,A-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>A;){if(0===v)return e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.ht(y,m);m=0,v--,x|=(255&y.lt(_++))<<A,A+=8}if(g=3*(o+(x&ot[b])),x>>=n[g+1],A-=n[g+1],k=n[g],16&k){a=15&k,l=n[g+2],t=4;break}if(!(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Fe="invalid distance code",m=st,e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.ht(y,m);case 4:for(b=a;b>A;){if(0===v)return e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.ht(y,m);m=0,v--,x|=(255&y.lt(_++))<<A,A+=8}l+=x&ot[b],x>>=b,A-=b,t=5;case 5:for(C=S-l;0>C;)C+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z&&(e.write=S,m=e.ht(y,m),S=e.write,z=S<e.read?e.read-S-1:e.end-S,S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z)))return e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.ht(y,m);e.ut[S++]=e.ut[C++],z--,C==e.end&&(C=0),i--}t=0;break;case 6:if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z&&(e.write=S,m=e.ht(y,m),S=e.write,z=S<e.read?e.read-S-1:e.end-S,S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z)))return e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.ht(y,m);m=0,e.ut[S++]=f,z--,t=0;break;case 7:if(A>7&&(A-=8,v++,_--),e.write=S,m=e.ht(y,m),S=e.write,z=S<e.read?e.read-S-1:e.end-S,e.read!=e.write)return e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.ht(y,m);t=8;case 8:return m=1,e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.ht(y,m);case 9:return m=st,e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.ht(y,m);default:return m=rt,e.ct=x,e.ft=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.ht(y,m)}},e.dt=()=>{}}ht.yt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=ct,r[0]=ft,0);const pt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function yt(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new dt;let h=0,d=new f(4320);const p=new ht;n.ft=0,n.ct=0,n.ut=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.dt(e),s=0,n.ft=0,n.ct=0,n.read=n.write=0},n.reset(e,null),n.ht=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&t==it&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&t==it&&(t=0),e.nt-=r,e.Je+=r,e.et.set(n.ut.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.wt=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.je,f=n.ct,y=n.ft,g=n.write,k=g<n.read?n.read-g-1:n.end-g;;){let S,z,C,x,A,_,I,P;switch(s){case 0:for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<<y,y+=8}switch(i=7&f,h=1&i,i>>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],C=[[]],x=[[]],ht.yt(S,z,C,x),w.init(S[0],z[0],C[0],0,x[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Fe="invalid block type",t=st,n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<<y,y+=8}if((~f>>>16&65535)!=(65535&f))return s=9,e.Fe="invalid stored block lengths",t=st,n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=g<n.read?n.read-g-1:n.end-g),0===k&&(n.write=g,t=n.ht(e,t),g=n.write,k=g<n.read?n.read-g-1:n.end-g,g==n.end&&0!==n.read&&(g=0,k=g<n.read?n.read-g-1:n.end-g),0===k)))return n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(t=0,i=o,i>b&&(i=b),i>k&&(i=k),n.ut.set(e.He(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<<y,y+=8}if(c=i=16383&f,(31&i)>29||(i>>5&31)>29)return s=9,e.Fe="too many length or distance symbols",t=st,n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.length<i)r=[];else for(v=0;i>v;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<<y,y+=8}r[pt[a++]]=7&f,f>>>=3,y-=3}for(;19>a;)r[pt[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),0!=i)return(t=i)==st&&(r=null,s=9),n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<<y,y+=8}if(i=d[3*(u[0]+(f&ot[i]))+1],w=d[3*(u[0]+(f&ot[i]))+2],16>w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);t=0,b--,f|=(255&e.lt(m++))<<y,y+=8}if(f>>>=i,y-=i,o+=f&ot[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Fe="invalid bit length repeat",t=st,n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,A=[],_=[],I=[],P=[],A[0]=9,_[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,A,_,I,P,d,e),0!=i)return i==st&&(r=null,s=9),t=i,n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);w.init(A[0],_[0],d,I[0],d,P[0]),s=6;case 6:if(n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,1!=(t=w.wt(n,e,t)))return n.ht(e,t);if(t=0,w.dt(e),m=e.rt,b=e.je,f=n.ct,y=n.ft,g=n.write,k=g<n.read?n.read-g-1:n.end-g,0===h){s=0;break}s=7;case 7:if(n.write=g,t=n.ht(e,t),g=n.write,k=g<n.read?n.read-g-1:n.end-g,n.read!=n.write)return n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);s=8;case 8:return t=1,n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);case 9:return t=st,n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t);default:return t=rt,n.ct=f,n.ft=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.ht(e,t)}}},n.dt=e=>{n.reset(e,null),n.ut=null,d=null},n.bt=(e,t,r)=>{n.ut.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>1==s?1:0}const mt=13,bt=[0,0,255,255];function gt(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Fe=null,e.kt.mode=7,e.kt.vt.reset(e,null),0):rt}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e.Ct=0,e.xt=t=>(e.vt&&e.vt.dt(t),e.vt=null,0),e.At=(n,r)=>(n.Fe=null,e.vt=null,8>r||r>15?(e.xt(n),rt):(e.Ct=r,n.kt.vt=new yt(n,1<<r),t(n),0)),e._t=(e,t)=>{let n,r;if(!e||!e.kt||!e.tt)return rt;const s=e.kt;for(t=4==t?it:0,n=it;;)switch(s.mode){case 0:if(0===e.je)return n;if(n=t,e.je--,e.Ge++,8!=(15&(s.method=e.lt(e.rt++)))){s.mode=mt,e.Fe="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s.Ct){s.mode=mt,e.Fe="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.je)return n;if(n=t,e.je--,e.Ge++,r=255&e.lt(e.rt++),((s.method<<8)+r)%31!=0){s.mode=mt,e.Fe="incorrect header check",s.marker=5;break}if(!(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.je)return n;n=t,e.je--,e.Ge++,s.zt=(255&e.lt(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.je)return n;n=t,e.je--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.je)return n;n=t,e.je--,e.Ge++,s.zt+=(255&e.lt(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.je?n:(n=t,e.je--,e.Ge++,s.zt+=255&e.lt(e.rt++),s.mode=6,2);case 6:return s.mode=mt,e.Fe="need dictionary",s.marker=0,rt;case 7:if(n=s.vt.wt(e,n),n==st){s.mode=mt,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.je=0,1;case mt:return st;default:return rt}},e.It=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return rt;const i=e.kt;return s<1<<i.Ct||(s=(1<<i.Ct)-1,r=n-s),i.vt.bt(t,r,s),i.mode=7,0},e.Pt=e=>{let n,r,s,i,o;if(!e||!e.kt)return rt;const c=e.kt;if(c.mode!=mt&&(c.mode=mt,c.marker=0),0===(n=e.je))return it;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.lt(r)==bt[s]?s++:s=0!==e.lt(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.je=n,c.marker=s,4!=s?st:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,0)},e.Dt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():rt}function kt(){}function vt(e){const t=new kt,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.At(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.je=e.length;do{if(t.st=0,t.nt=n,0!==t.je||c||(t.rt=0,c=!0),a=t._t(0),c&&a===it){if(0!==t.je)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Fe);if((c||1===a)&&t.je===e.length)throw new s("inflating: bad input");t.st&&(t.st===n?f.push(new i(o)):f.push(o.subarray(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.je>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]?new i(f[0]):new i,l}},this.flush=()=>{t.xt()}}kt.prototype={At(e){const t=this;return t.kt=new gt,e||(e=15),t.kt.At(t,e)},_t(e){const t=this;return t.kt?t.kt._t(t,e):rt},xt(){const e=this;if(!e.kt)return rt;const t=e.kt.xt(e);return e.kt=null,t},Pt(){const e=this;return e.kt?e.kt.Pt(e):rt},It(e,t){const n=this;return n.kt?n.kt.It(n,e,t):rt},lt(e){return this.tt[e]},He(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=nt,self.Inflate=vt};
|
|
10273
10273
|
`,s=()=>e.useDataURI?"data:text/javascript,"+encodeURIComponent(t):URL.createObjectURL(new Blob([t],{type:"text/javascript"}));i({workerScripts:{inflate:[s],deflate:[s]}})}const Hde="Writer iterator completed too soon",Qde="text/plain",Ude="Content-Type",zde=64*1024,_V="writable";class Hg{constructor(){this.size=0}init(){this.initialized=!0}}class DV extends Hg{get readable(){const e=this,{chunkSize:t=zde}=e,s=new ReadableStream({start(){this.chunkOffset=0},async pull(r){const{offset:n=0,size:a,diskNumberStart:o}=s,{chunkOffset:l}=this;r.enqueue(await Qg(e,n+l,Math.min(t,a-l),o)),l+t>a?r.close():this.chunkOffset+=t}});return s}}class jde extends DV{constructor(e){super(),Object.assign(this,{blob:e,size:e.size})}async readUint8Array(e,t){const s=this,r=e+t;let a=await(e||r<s.size?s.blob.slice(e,r):s.blob).arrayBuffer();return a.byteLength>t&&(a=a.slice(e,r)),new Uint8Array(a)}}class Wde extends Hg{constructor(e){super();const t=this,s=new TransformStream,r=[];e&&r.push([Ude,e]),Object.defineProperty(t,_V,{get(){return s.writable}}),t.blob=new Response(s.readable,{headers:r}).blob()}getData(){return this.blob}}class Gde extends jde{constructor(e){super(new Blob([e],{type:Qde}))}}class Kde extends DV{constructor(e){super(),this.readers=e}async init(){const e=this,{readers:t}=e;e.lastDiskNumber=0,e.lastDiskOffset=0,await Promise.all(t.map(async(s,r)=>{await s.init(),r!=t.length-1&&(e.lastDiskOffset+=s.size),e.size+=s.size})),super.init()}async readUint8Array(e,t,s=0){const r=this,{readers:n}=this;let a,o=s;o==-1&&(o=n.length-1);let l=e;for(;l>=n[o].size;)l-=n[o].size,o++;const u=n[o],h=u.size;if(l+t<=h)a=await Qg(u,l,t);else{const c=h-l;a=new Uint8Array(t),a.set(await Qg(u,l,c)),a.set(await r.readUint8Array(e+c,t-c,s),c)}return r.lastDiskNumber=Math.max(o,r.lastDiskNumber),a}}class kV extends Hg{constructor(e,t=4294967295){super();const s=this;Object.assign(s,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});let r,n,a;const o=new WritableStream({async write(h){const{availableSize:c}=s;if(a)h.length>=c?(await l(h.slice(0,c)),await u(),s.diskOffset+=r.size,s.diskNumber++,a=null,await this.write(h.slice(c))):await l(h);else{const{value:d,done:f}=await e.next();if(f&&!d)throw new Error(Hde);r=d,r.size=0,r.maxSize&&(s.maxSize=r.maxSize),s.availableSize=s.maxSize,await pu(r),n=d.writable,a=n.getWriter(),await this.write(h)}},async close(){await a.ready,await u()}});Object.defineProperty(s,_V,{get(){return o}});async function l(h){const c=h.length;c&&(await a.ready,await a.write(h),r.size+=c,s.size+=c,s.availableSize-=c)}async function u(){n.size=r.size,await a.close()}}}async function pu(i,e){if(i.init&&!i.initialized)await i.init(e);else return Promise.resolve()}function Zde(i){return Array.isArray(i)&&(i=new Kde(i)),i instanceof ReadableStream&&(i={readable:i}),i}function Jde(i){i.writable===Ft&&typeof i.next==ou&&(i=new kV(i)),i instanceof WritableStream&&(i={writable:i});const{writable:e}=i;return e.size===Ft&&(e.size=0),i instanceof kV||Object.assign(i,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),i}function Qg(i,e,t,s){return i.readUint8Array(e,t,s)}"\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("").length==256;const Yde="filename",Xde="rawFilename",epe="comment",tpe="rawComment",spe="uncompressedSize",ipe="compressedSize",rpe="offset",OV="diskNumberStart",MV="lastModDate",npe="rawLastModDate",NV="lastAccessDate",FV="creationDate",qV="internalFileAttribute",BV="externalFileAttribute",$V="msDosCompatible",Ug="zip64",HV="encrypted",QV="version",UV="versionMadeBy",zV="zipCrypto",ape=[Yde,Xde,ipe,spe,MV,npe,epe,tpe,NV,FV,rpe,OV,OV,qV,BV,$V,Ug,HV,QV,UV,zV,"directory","bitFlag","signature","filenameUTF8","commentUTF8","compressionMethod","extraField","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp"];class jV{constructor(e){ape.forEach(t=>this[t]=e[t])}}const ope="File already exists",lpe="Zip file comment exceeds 64KB",upe="File entry comment exceeds 64KB",hpe="File entry name exceeds 64KB",WV="Version exceeds 65535",cpe="The strength must equal 1, 2, or 3",dpe="Extra field type exceeds 65535",ppe="Extra field data exceeds 64KB",zg="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",fpe="Undefined uncompressed size",GV=new Uint8Array([7,0,2,0,65,69,3,0,0]);let jg=0;const KV=[];class mpe{constructor(e,t={}){e=Jde(e);const s=e.availableSize!==Ft&&e.availableSize>0&&e.availableSize!==1/0&&e.maxSize!==Ft&&e.maxSize>0&&e.maxSize!==1/0;Object.assign(this,{writer:e,addSplitZipSignature:s,options:t,config:tde(),files:new Map,filenames:new Set,offset:t.offset===Ft?e.writable.size:t.offset,pendingEntriesSize:0,pendingAddFileCalls:new Set,bufferedWrites:0})}async add(e="",t,s={}){const r=this,{pendingAddFileCalls:n,config:a}=r;jg<a.maxWorkers?jg++:await new Promise(l=>KV.push(l));let o;try{if(e=e.trim(),r.filenames.has(e))throw new Error(ope);return r.filenames.add(e),o=gpe(r,e,t,s),n.add(o),await o}catch(l){throw r.filenames.delete(e),l}finally{n.delete(o);const l=KV.shift();l?l():jg--}}async close(e=new Uint8Array,t={}){const s=this,{pendingAddFileCalls:r,writer:n}=this,{writable:a}=n;for(;r.size;)await Promise.allSettled(Array.from(r));return await Spe(this,e,t),yt(s,t,"preventClose")||await a.getWriter().close(),n.getData?n.getData():a}}async function gpe(i,e,t,s){e=e.trim(),s.directory&&!e.endsWith(_g)?e+=_g:s.directory=e.endsWith(_g);const r=yt(i,s,"encodeText",pd);let n=r(e);if(n===Ft&&(n=pd(e)),at(n)>hi)throw new Error(hpe);const a=s.comment||"";let o=r(a);if(o===Ft&&(o=pd(a)),at(o)>hi)throw new Error(upe);const l=yt(i,s,QV,Yce);if(l>hi)throw new Error(WV);const u=yt(i,s,UV,20);if(u>hi)throw new Error(WV);const h=yt(i,s,MV,new Date),c=yt(i,s,NV),d=yt(i,s,FV),f=yt(i,s,$V,!0),y=yt(i,s,qV,0),v=yt(i,s,BV,0),m=yt(i,s,"passThrough");let g,b;m||(g=yt(i,s,"password"),b=yt(i,s,"rawPassword"));const x=yt(i,s,"encryptionStrength",3),P=yt(i,s,zV),L=yt(i,s,"extendedTimestamp",!0),_=yt(i,s,"keepOrder",!0),k=yt(i,s,"level"),S=yt(i,s,"useWebWorkers"),A=yt(i,s,"bufferedWrite"),N=yt(i,s,"dataDescriptorSignature",!1),B=yt(i,s,"signal"),U=yt(i,s,"useUnicodeFileNames",!0),D=yt(i,s,"useCompressionStream"),$=yt(i,s,"compressionMethod");let Q=yt(i,s,"dataDescriptor",!0),H=yt(i,s,Ug);if(!P&&(g!==Ft||b!==Ft)&&!(x>=1&&x<=3))throw new Error(cpe);let W=new Uint8Array;const{extraField:K}=s;if(K){let Bt=0,Ht=0;K.forEach(gt=>Bt+=4+at(gt)),W=new Uint8Array(Bt),K.forEach((gt,Oe)=>{if(Oe>hi)throw new Error(dpe);if(at(gt)>hi)throw new Error(ppe);ds(W,new Uint16Array([Oe]),Ht),ds(W,new Uint16Array([at(gt)]),Ht+2),ds(W,gt,Ht+4),Ht+=4+at(gt)})}let oe=0,ee=0,ue=0;if(m&&({uncompressedSize:ue}=s,ue===Ft))throw new Error(fpe);const ae=H===!0;t&&(t=Zde(t),await pu(t),m?oe=ZV(ue):t.size===Ft?(Q=!0,(H||H===Ft)&&(H=!0,ue=oe=ui+1)):(ue=t.size,oe=ZV(ue)));const{diskOffset:ce,diskNumber:Ae,maxSize:ve}=i.writer,ie=ae||ue>ui,xe=ae||oe>ui,et=ae||i.offset+i.pendingEntriesSize-ce>ui,jt=yt(i,s,"supportZip64SplitFile",!0)&&ae||Ae+Math.ceil(i.pendingEntriesSize/ve)>hi;if(et||ie||xe||jt){if(H===!1||!_)throw new Error(zg);H=!0}H=H||!1;const Os=yt(i,s,HV),{signature:Et}=s;s=Object.assign({},s,{rawFilename:n,rawComment:o,version:l,versionMadeBy:u,lastModDate:h,lastAccessDate:c,creationDate:d,rawExtraField:W,zip64:H,zip64UncompressedSize:ie,zip64CompressedSize:xe,zip64Offset:et,zip64DiskNumberStart:jt,password:g,rawPassword:b,level:!D&&i.config.CompressionStream===Ft&&i.config.CompressionStreamNative===Ft?0:k,useWebWorkers:S,encryptionStrength:x,extendedTimestamp:L,zipCrypto:P,bufferedWrite:A,keepOrder:_,useUnicodeFileNames:U,dataDescriptor:Q,dataDescriptorSignature:N,signal:B,msDosCompatible:f,internalFileAttribute:y,externalFileAttribute:v,useCompressionStream:D,passThrough:m,encrypted:!!(g&&at(g)||b&&at(b))||m&&Os,signature:Et,compressionMethod:$});const fs=Cpe(s),is=wpe(s),_e=at(fs.localHeaderArray,is.dataDescriptorArray);ee=_e+oe,i.options.usdz&&(ee+=ee+64),i.pendingEntriesSize+=ee;let tt;try{tt=await vpe(i,e,t,{headerInfo:fs,dataDescriptorInfo:is,metadataSize:_e},s)}finally{i.pendingEntriesSize-=ee}return Object.assign(tt,{name:e,comment:a,extraField:K}),new jV(tt)}async function vpe(i,e,t,s,r){const{files:n,writer:a}=i,{keepOrder:o,dataDescriptor:l,signal:u}=r,{headerInfo:h}=s,{usdz:c}=i.options,d=Array.from(n.values()).pop();let f={},y,v,m,g,b,x,P;n.set(e,f);try{let S;o&&(S=d&&d.lock,L()),(r.bufferedWrite||i.writerLocked||i.bufferedWrites&&o||!l)&&!c?(x=new TransformStream,P=new Response(x.readable).blob(),x.writable.size=0,y=!0,i.bufferedWrites++,await pu(a)):(x=a,await _()),await pu(x);const{writable:A}=a;let{diskOffset:N}=a;if(i.addSplitZipSignature){delete i.addSplitZipSignature;const U=new Uint8Array(4),D=_s(U);nt(D,0,$E),await Ar(A,U),i.offset+=4}c&&bpe(s,i.offset-N),y||(await S,await k(A));const{diskNumber:B}=a;if(b=!0,f.diskNumberStart=B,f=await ype(t,x,f,s,i.config,r),b=!1,n.set(e,f),f.filename=e,y){await x.writable.getWriter().close();let U=await P;await S,await _(),g=!0,l||(U=await Epe(f,U,A,r)),await k(A),f.diskNumberStart=a.diskNumber,N=a.diskOffset,await U.stream().pipeTo(A,{preventClose:!0,preventAbort:!0,signal:u}),A.size+=U.size,g=!1}if(f.offset=i.offset-N,f.zip64)Vpe(f,r);else if(f.offset>ui)throw new Error(zg);return i.offset+=f.size,f}catch(S){if(y&&g||!y&&b){if(i.hasCorruptedEntries=!0,S)try{S.corruptedEntry=!0}catch{}y?i.offset+=x.writable.size:i.offset=x.writable.size}throw n.delete(e),S}finally{y&&i.bufferedWrites--,m&&m(),v&&v()}function L(){f.lock=new Promise(S=>m=S)}async function _(){i.writerLocked=!0;const{lockWriter:S}=i;i.lockWriter=new Promise(A=>v=()=>{i.writerLocked=!1,A()}),await S}async function k(S){at(h.localHeaderArray)>a.availableSize&&(a.availableSize=0,await Ar(S,new Uint8Array))}}async function ype(i,e,{diskNumberStart:t,lock:s},r,n,a){const{headerInfo:o,dataDescriptorInfo:l,metadataSize:u}=r,{localHeaderArray:h,headerArray:c,lastModDate:d,rawLastModDate:f,encrypted:y,compressed:v,version:m,compressionMethod:g,rawExtraFieldExtendedTimestamp:b,extraFieldExtendedTimestampFlag:x,rawExtraFieldNTFS:P,rawExtraFieldAES:L}=o,{dataDescriptorArray:_}=l,{rawFilename:k,lastAccessDate:S,creationDate:A,password:N,rawPassword:B,level:U,zip64:D,zip64UncompressedSize:$,zip64CompressedSize:Q,zip64Offset:H,zip64DiskNumberStart:W,zipCrypto:K,dataDescriptor:oe,directory:ee,versionMadeBy:ue,rawComment:ae,rawExtraField:ce,useWebWorkers:Ae,onstart:ve,onprogress:ie,onend:xe,signal:et,encryptionStrength:Xt,extendedTimestamp:jt,msDosCompatible:Os,internalFileAttribute:Et,externalFileAttribute:fs,useCompressionStream:is,passThrough:_e}=a,tt={lock:s,versionMadeBy:ue,zip64:D,directory:!!ee,filenameUTF8:!0,rawFilename:k,commentUTF8:!0,rawComment:ae,rawExtraFieldExtendedTimestamp:b,rawExtraFieldNTFS:P,rawExtraFieldAES:L,rawExtraField:ce,extendedTimestamp:jt,msDosCompatible:Os,internalFileAttribute:Et,externalFileAttribute:fs,diskNumberStart:t};let{signature:Bt,uncompressedSize:Ht}=a,gt=0;_e||(Ht=0);const{writable:Oe}=e;if(i){i.chunkSize=sde(n),await Ar(Oe,h);const Pe=i.readable,rs=Pe.size=i.size,Cs={options:{codecType:SV,level:U,rawPassword:B,password:N,encryptionStrength:Xt,zipCrypto:y&&K,passwordVerification:y&&K&&f>>8&255,signed:!_e,compressed:v&&!_e,encrypted:y&&!_e,useWebWorkers:Ae,useCompressionStream:is,transferStreams:!1},config:n,streamOptions:{signal:et,size:rs,onstart:ve,onprogress:ie,onend:xe}},bs=await qde({readable:Pe,writable:Oe},Cs);gt=bs.outputSize,_e||(Ht=bs.inputSize,Bt=bs.signature),Oe.size+=Ht}else await Ar(Oe,h);let Ke;if(D){let Pe=4;$&&(Pe+=8),Q&&(Pe+=8),H&&(Pe+=8),W&&(Pe+=4),Ke=new Uint8Array(Pe)}else Ke=new Uint8Array;return xpe({signature:Bt,rawExtraFieldZip64:Ke,compressedSize:gt,uncompressedSize:Ht,headerInfo:o,dataDescriptorInfo:l},a),oe&&await Ar(Oe,_),Object.assign(tt,{uncompressedSize:Ht,compressedSize:gt,lastModDate:d,rawLastModDate:f,creationDate:A,lastAccessDate:S,encrypted:y,zipCrypto:K,size:u+gt,compressionMethod:g,version:m,headerArray:c,signature:Bt,rawExtraFieldZip64:Ke,extraFieldExtendedTimestampFlag:x,zip64UncompressedSize:$,zip64CompressedSize:Q,zip64Offset:H,zip64DiskNumberStart:W}),tt}function Cpe(i){const{rawFilename:e,lastModDate:t,lastAccessDate:s,creationDate:r,level:n,zip64:a,zipCrypto:o,useUnicodeFileNames:l,dataDescriptor:u,directory:h,rawExtraField:c,encryptionStrength:d,extendedTimestamp:f,encrypted:y}=i,v=n!==0&&!h;let{version:m,compressionMethod:g}=i,b;if(y&&!o){b=new Uint8Array(at(GV)+2);const H=_s(b);mt(H,0,Uce),ds(b,GV,2),vd(H,8,d)}else b=new Uint8Array;let x,P,L;if(f){P=new Uint8Array(9+(s?4:0)+(r?4:0));const H=_s(P);mt(H,0,UE),mt(H,2,at(P)-4),L=1+(s?2:0)+(r?4:0),vd(H,4,L);let W=5;nt(H,W,Math.floor(t.getTime()/1e3)),W+=4,s&&(nt(H,W,Math.floor(s.getTime()/1e3)),W+=4),r&&nt(H,W,Math.floor(r.getTime()/1e3));try{x=new Uint8Array(36);const K=_s(x),oe=Wg(t);mt(K,0,zce),mt(K,2,32),mt(K,8,jce),mt(K,10,24),ci(K,12,oe),ci(K,20,Wg(s)||oe),ci(K,28,Wg(r)||oe)}catch{x=new Uint8Array}}else x=P=new Uint8Array;let _=0;l&&(_=_|Zce),u&&(_=_|Kce),g===Ft&&(g=v?BE:kce),g==BE&&(n>=1&&n<3&&(_=_|6),n>=3&&n<5&&(_=_|1),n===9&&(_=_|2)),a&&(m=m>zE?m:zE),y&&(_=_|Gce,o||(m=m>jE?m:jE,b[9]=g,g=Oce));const k=new Uint8Array(26),S=_s(k);mt(S,0,m),mt(S,2,_),mt(S,4,g);const A=new Uint32Array(1),N=_s(A);let B;t<GE?B=GE:t>WE?B=WE:B=t,mt(N,0,(B.getHours()<<6|B.getMinutes())<<5|B.getSeconds()/2),mt(N,2,(B.getFullYear()-1980<<4|B.getMonth()+1)<<5|B.getDate());const U=A[0];nt(S,6,U),mt(S,22,at(e));const D=at(b,P,x,c);mt(S,24,D);const $=new Uint8Array(30+at(e)+D),Q=_s($);return nt(Q,0,Mce),ds($,k,4),ds($,e,30),ds($,b,30+at(e)),ds($,P,30+at(e,b)),ds($,x,30+at(e,b,P)),ds($,c,30+at(e,b,P,x)),{localHeaderArray:$,headerArray:k,headerView:S,lastModDate:t,rawLastModDate:U,encrypted:y,compressed:v,version:m,compressionMethod:g,extraFieldExtendedTimestampFlag:L,rawExtraFieldExtendedTimestamp:P,rawExtraFieldNTFS:x,rawExtraFieldAES:b,extraFieldLength:D}}function bpe(i,e){const{headerInfo:t}=i;let{localHeaderArray:s,extraFieldLength:r}=t,n=_s(s),a=64-(e+at(s))%64;a<4&&(a+=64);const o=new Uint8Array(a),l=_s(o);mt(l,0,Wce),mt(l,2,a-2);const u=s;t.localHeaderArray=s=new Uint8Array(at(u)+a),ds(s,u),ds(s,o,at(u)),n=_s(s),mt(n,28,r+a),i.metadataSize+=a}function wpe(i){const{zip64:e,dataDescriptor:t,dataDescriptorSignature:s}=i;let r=new Uint8Array,n,a=0;return t&&(r=new Uint8Array(e?s?24:20:s?16:12),n=_s(r),s&&(a=4,nt(n,0,Nce))),{dataDescriptorArray:r,dataDescriptorView:n,dataDescriptorOffset:a}}function xpe(i,e){const{signature:t,rawExtraFieldZip64:s,compressedSize:r,uncompressedSize:n,headerInfo:a,dataDescriptorInfo:o}=i,{headerView:l,encrypted:u}=a,{dataDescriptorView:h,dataDescriptorOffset:c}=o,{zip64:d,zip64UncompressedSize:f,zip64CompressedSize:y,zipCrypto:v,dataDescriptor:m}=e;if((!u||v)&&t!==Ft&&(nt(l,10,t),m&&nt(h,c,t)),d){const g=_s(s);mt(g,0,Qce),mt(g,2,at(s)-4);let b=4;f&&(nt(l,18,ui),ci(g,b,BigInt(n)),b+=8),y&&(nt(l,14,ui),ci(g,b,BigInt(r))),m&&(ci(h,c+4,BigInt(r)),ci(h,c+12,BigInt(n)))}else nt(l,14,r),nt(l,18,n),m&&(nt(h,c+4,r),nt(h,c+8,n))}async function Epe(i,e,t,{zipCrypto:s}){let r;r=await e.slice(0,26).arrayBuffer(),r.byteLength!=26&&(r=r.slice(0,26));const n=new DataView(r);return(!i.encrypted||s)&&nt(n,14,i.signature),i.zip64?(nt(n,18,ui),nt(n,22,ui)):(nt(n,18,i.compressedSize),nt(n,22,i.uncompressedSize)),await Ar(t,new Uint8Array(r)),e.slice(r.byteLength)}function Vpe(i,e){const{rawExtraFieldZip64:t,offset:s,diskNumberStart:r}=i,{zip64UncompressedSize:n,zip64CompressedSize:a,zip64Offset:o,zip64DiskNumberStart:l}=e,u=_s(t);let h=4;n&&(h+=8),a&&(h+=8),o&&(ci(u,h,BigInt(s)),h+=8),l&&nt(u,h,r)}async function Spe(i,e,t){const{files:s,writer:r}=i,{diskOffset:n,writable:a}=r;let{diskNumber:o}=r,l=0,u=0,h=i.offset-n,c=s.size;for(const[,L]of s){const{rawFilename:_,rawExtraFieldZip64:k,rawExtraFieldAES:S,rawComment:A,rawExtraFieldNTFS:N,rawExtraField:B,extendedTimestamp:U,extraFieldExtendedTimestampFlag:D,lastModDate:$}=L;let Q;if(U){Q=new Uint8Array(9);const H=_s(Q);mt(H,0,UE),mt(H,2,5),vd(H,4,D),nt(H,5,Math.floor($.getTime()/1e3))}else Q=new Uint8Array;L.rawExtraFieldCDExtendedTimestamp=Q,u+=46+at(_,A,k,S,N,Q,B)}const d=new Uint8Array(u),f=_s(d);await pu(r);let y=0;for(const[L,_]of Array.from(s.values()).entries()){const{offset:k,rawFilename:S,rawExtraFieldZip64:A,rawExtraFieldAES:N,rawExtraFieldCDExtendedTimestamp:B,rawExtraFieldNTFS:U,rawExtraField:D,rawComment:$,versionMadeBy:Q,headerArray:H,directory:W,zip64:K,zip64UncompressedSize:oe,zip64CompressedSize:ee,zip64DiskNumberStart:ue,zip64Offset:ae,msDosCompatible:ce,internalFileAttribute:Ae,externalFileAttribute:ve,diskNumberStart:ie,uncompressedSize:xe,compressedSize:et}=_,Xt=at(A,N,B,U,D);nt(f,l,Fce),mt(f,l+4,Q);const jt=_s(H);oe||nt(jt,18,xe),ee||nt(jt,14,et),ds(d,H,l+6),mt(f,l+30,Xt),mt(f,l+32,at($)),mt(f,l+34,K&&ue?hi:ie),mt(f,l+36,Ae),ve?nt(f,l+38,ve):W&&ce&&vd(f,l+38,Jce),nt(f,l+42,K&&ae?ui:k),ds(d,S,l+46),ds(d,A,l+46+at(S)),ds(d,N,l+46+at(S,A)),ds(d,B,l+46+at(S,A,N)),ds(d,U,l+46+at(S,A,N,B)),ds(d,D,l+46+at(S,A,N,B,U)),ds(d,$,l+46+at(S)+Xt);const Os=46+at(S,$)+Xt;if(l-y>r.availableSize&&(r.availableSize=0,await Ar(a,d.slice(y,l)),y=l),l+=Os,t.onprogress)try{await t.onprogress(L+1,s.size,new jV(_))}catch{}}await Ar(a,y?d.slice(y):d);let v=r.diskNumber;const{availableSize:m}=r;m<Lg&&v++;let g=yt(i,t,Ug);if(h>ui||u>ui||c>hi||v>hi){if(g===!1)throw new Error(zg);g=!0}const b=new Uint8Array(g?Hce:Lg),x=_s(b);l=0,g&&(nt(x,0,Bce),ci(x,4,BigInt(44)),mt(x,12,45),mt(x,14,45),nt(x,16,v),nt(x,20,o),ci(x,24,BigInt(c)),ci(x,32,BigInt(c)),ci(x,40,BigInt(u)),ci(x,48,BigInt(h)),nt(x,56,$ce),ci(x,64,BigInt(h)+BigInt(u)),nt(x,72,v+1),yt(i,t,"supportZip64SplitFile",!0)&&(v=hi,o=hi),c=hi,h=ui,u=ui,l+=QE+HE),nt(x,l,qce),mt(x,l+4,v),mt(x,l+6,o),mt(x,l+8,c),mt(x,l+10,c),nt(x,l+12,u),nt(x,l+16,h);const P=at(e);if(P)if(P<=hi)mt(x,l+20,P);else throw new Error(lpe);await Ar(a,b),P&&await Ar(a,e)}async function Ar(i,e){const t=i.getWriter();try{await t.ready,i.size+=at(e),await t.write(e)}finally{t.releaseLock()}}function Wg(i){if(i)return(BigInt(i.getTime())+BigInt(116444736e5))*BigInt(1e4)}function yt(i,e,t,s){const r=e[t]===Ft?i.options[t]:e[t];return r===Ft?s:r}function ZV(i){return i+5*(Math.floor(i/16383)+1)}function vd(i,e,t){i.setUint8(e,t)}function mt(i,e,t){i.setUint16(e,t,!0)}function nt(i,e,t){i.setUint32(e,t,!0)}function ci(i,e,t){i.setBigUint64(e,t,!0)}function ds(i,e,t){i.set(e,t)}function _s(i){return new DataView(i.buffer)}function at(...i){let e=0;return i.forEach(t=>t&&(e+=t.length)),e}let JV;try{JV=typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:pn&&pn.tagName.toUpperCase()==="SCRIPT"&&pn.src||new URL("reactive.umd.js",document.baseURI).href}catch{}Dg({baseURL:JV}),$de(Dg),Dg({Deflate:dce,Inflate:Dce});var nn;(function(i){i.Documents="DOCUMENTS",i.Data="DATA",i.Library="LIBRARY",i.Cache="CACHE",i.External="EXTERNAL",i.ExternalStorage="EXTERNAL_STORAGE"})(nn||(nn={}));var yd;(function(i){i.UTF8="utf8",i.ASCII="ascii",i.UTF16="utf16"})(yd||(yd={}));const Ia=_l("Filesystem",{web:()=>Promise.resolve().then(()=>r1e).then(i=>new i.FilesystemWeb)});Qs("Upload",async(i,e,t,s)=>{const r=i.sessionID||`sim_${Date.now()}_${Math.floor(X.uniform(0,2176782336)).toString(36)}`,n=O2({sessionID:r,data:e.data||[],store:e.store,generateFiles:i.generateFiles,sessionData:i.sessionData,uploadRaw:i.uploadRaw??!0}),a=L2();a&&(n.push({filename:`${r}_participant_initial.csv`,content:sc([a]),encoding:"utf8"}),n.push({filename:`${r}_participant_final.csv`,content:sc([s]),encoding:"utf8"}));const o=R2();if(o){const l={sessionId:r,files:n.map(h=>({...h,encoding:h.encoding??"utf8"}))},u=await fetch(`${o}/data`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)});u.ok||console.error(`Simulation upload failed: ${u.status} ${u.statusText}`)}return{responseData:{files:n},participantState:s}},{});const Gg=[{name:"upload",defaultValue:!0,type:"boolean",description:"Upload the data at the end of the experiment?"},{name:"download",defaultValue:!1,type:"boolean",description:"Locally download the data at the end of the experiment?"}];vm("Upload",Gg);const Tpe=()=>{const i=window.electronAPI;return{directoryExists:async e=>{const t=await i.directoryExists(e);return t.success&&t.exists},createDirectory:async e=>{await i.createDirectory(e)},saveFile:async(e,t,s)=>{await i.saveFile(e,t,s)}}},Ppe=i=>{const e=t=>i?t?`${i}/${t}`:i:t;return{directoryExists:async t=>{try{if(i)try{await Ia.readdir({path:i,directory:nn.Documents})}catch{return!1}const s=e(t);return(await Ia.readdir({path:s,directory:nn.Documents})).files.length>=0}catch{return!1}},createDirectory:async t=>{try{if(i)try{await Ia.mkdir({path:i,directory:nn.Documents,recursive:!1})}catch{}const s=e(t);await Ia.mkdir({path:s,directory:nn.Documents,recursive:!0})}catch(s){throw console.error("Error creating directory:",s),s}},saveFile:async(t,s,r)=>{const n=e(r);await Ia.writeFile({path:`${n}/${t}`,data:s,directory:nn.Documents,encoding:"utf8"})}}},Ipe=i=>{const e=kl();switch(e){case"desktop":return{backend:Tpe(),type:e};case"mobile":return{backend:Ppe(i),type:e};case"web":return{backend:null,type:e}}},Rpe=async(i,e)=>{let t=e;if(await i.directoryExists(t)){let s=1;for(t=`${e}_${s}`;await i.directoryExists(t);)s++,t=`${e}_${s}`}return t};function YV({data:i,next:e,store:t,sessionID:s,generateFiles:r,sessionData:n,uploadRaw:a=!0,autoUpload:o=!1,androidFolderName:l,className:u,containerClass:h,content:c,uploadingContent:d,errorContent:f}){const[y,v]=T.useState("initial"),m=T.useRef(!1),g=Gg.find(S=>S.name==="upload"),b=Gg.find(S=>S.name==="download"),x=ma(g.name,g.defaultValue,g.type),P=ma(b.name,b.defaultValue,b.type),L=Uhe({mutationFn:async S=>await Khe("/data",S),onSuccess:S=>{S.status===200?(v("success"),e({})):v("error")},onError:()=>{v("error")}}),_=T.useCallback(async S=>{const A=new mpe(new Wde);for(const D of S)await A.add(D.filename,new Gde(D.content));const N=await A.close(),B=URL.createObjectURL(N),U=document.createElement("a");U.href=B,U.download="study-data.zip",document.body.appendChild(U),U.click(),document.body.removeChild(U),URL.revokeObjectURL(B)},[]),k=T.useCallback(async()=>{if(v("uploading"),m.current)return;m.current=!0;const S=s??Ghe(),A=O2({sessionID:S,data:i,store:t,generateFiles:r,sessionData:n,uploadRaw:a});try{const N={sessionId:S,files:A.map(D=>({...D,encoding:D.encoding??"utf8"}))};if(P&&await _(A),!x){e({});return}const{backend:B,type:U}=Ipe(l);if(U==="web")L.mutate(N);else if(B)try{const D=await Rpe(B,S);await B.createDirectory(D);for(const $ of A)await B.saveFile($.filename,$.content,D);v("success"),e({})}catch(D){console.error(`Error saving files with ${U}:`,D),v("error")}}catch(N){console.error("Error uploading:",N),v("error")}},[s,r,i,a,P,x,_,e,L]);return T.useEffect(()=>{o&&!m.current&&k&&k()},[o,k]),T.useEffect(()=>{y==="error"&&(m.current=!1)},[y]),R.jsx("div",{className:h??"",style:{position:"fixed",inset:0},children:R.jsxs("div",{className:`flex flex-col items-center justify-center gap-4 p-6 text-xl mt-16 px-10 h-full ${u??""}`,children:[y=="initial"&&!o&&R.jsxs(R.Fragment,{children:[c??R.jsx("p",{children:"Thank you for participating! Please click the button below to submit your data."}),R.jsx("button",{onClick:k,className:"mt-8 cursor-pointer bg-white px-8 py-3 border-2 border-black font-bold text-black text-lg rounded-xl shadow-[2px_2px_0px_rgba(0,0,0,1)] hover:translate-x-[2px] hover:translate-y-[2px] hover:shadow-none",children:"Submit Data"})]}),y=="uploading"&&R.jsx(R.Fragment,{children:d??R.jsxs(R.Fragment,{children:[R.jsx("div",{className:"w-8 h-8 border-4 border-blue-500 border-t-transparent rounded-full animate-spin"}),R.jsx("p",{children:"Uploading your data..."})]})}),y=="success"&&R.jsx(R.Fragment,{}),y=="error"&&R.jsxs(R.Fragment,{children:[f??R.jsxs("div",{className:"text-red-500 mb-4",children:[R.jsx("p",{children:"Sorry, there was an error uploading your data."}),R.jsx("p",{children:"Please try again or contact the researcher."})]}),R.jsx("button",{onClick:k,className:"cursor-pointer bg-white px-8 py-3 border-2 border-black font-bold text-black text-lg rounded-xl shadow-[2px_2px_0px_rgba(0,0,0,1)] hover:translate-x-[2px] hover:translate-y-[2px] hover:shadow-none",children:"Try Again"})]})]})})}var XV;(function(i){i.Dark="DARK",i.Light="LIGHT",i.Default="DEFAULT"})(XV||(XV={}));var eS;(function(i){i.None="NONE",i.Slide="SLIDE",i.Fade="FADE"})(eS||(eS={}));const tS=_l("StatusBar"),sS=_l("ImmersiveMode",{web:()=>Promise.resolve().then(()=>a1e).then(i=>new i.ImmersiveModeWeb)});ni("EnterFullscreen","session"),Qs("EnterFullscreen",ho,{});function iS({content:i,buttonText:e,className:t,containerClass:s,animate:r,next:n,data:a,updateStore:o,delayMs:l=0}){const u=R.jsxs("div",{className:"flex flex-col items-center",children:[!!i&&i,!i&&R.jsx("p",{className:"",children:"Please click the Button below to enter Fullscreen mode."})]}),[h,c]=T.useState(!1),d=T.useRef(!1),f=T.useRef(null),y=T.useCallback(()=>{f.current&&(clearTimeout(f.current),f.current=null)},[]),v=T.useCallback(()=>{document.removeEventListener("fullscreenchange",g),document.removeEventListener("webkitfullscreenchange",g),document.removeEventListener("mozfullscreenchange",g),document.removeEventListener("MSFullscreenChange",g),y(),d.current=!1},[y]),m=T.useCallback(()=>{y(),c(!0),f.current=setTimeout(()=>{f.current=null,n({})},l)},[n,l,y]),g=T.useCallback(()=>{if(!d.current)return;const P=uo();v(),P?m():c(!1)},[m,v]),b=T.useCallback(()=>{v(),d.current=!0,document.addEventListener("fullscreenchange",g),document.addEventListener("webkitfullscreenchange",g),document.addEventListener("mozfullscreenchange",g),document.addEventListener("MSFullscreenChange",g)},[g,v]),x=T.useCallback(async()=>{c(!0),v();const P=document.documentElement;if(kl()==="mobile"&&fa.getPlatform()==="android"&&(tS.hide(),sS.enable()),P.requestFullscreen)try{await P.requestFullscreen(),m();return}catch(L){console.error("Fullscreen request failed:",L);return}P.mozRequestFullScreen?(P.mozRequestFullScreen(),b()):P.webkitRequestFullscreen?(P.webkitRequestFullscreen(),b()):P.msRequestFullscreen?(P.msRequestFullscreen(),b()):console.warn("Fullscreen API is not supported by this browser.")},[m,b,v]);return T.useEffect(()=>()=>{v()},[v]),h?R.jsx("div",{className:`min-h-screen ${s??""}`}):R.jsx(rc,{data:a,updateStore:o,className:t,containerClass:s,animate:r,content:u,buttonText:e??"Enter Fullscreen Mode",next:x})}ni("ExitFullscreen","session"),Qs("ExitFullscreen",ho,{});function rS({next:i,delayMs:e=0}){const t=T.useRef(!1),s=T.useRef(null),r=T.useCallback(()=>{s.current&&(clearTimeout(s.current),s.current=null)},[]),n=T.useCallback(()=>{document.removeEventListener("fullscreenchange",o),document.removeEventListener("webkitfullscreenchange",o),document.removeEventListener("mozfullscreenchange",o),document.removeEventListener("MSFullscreenChange",o),r(),t.current=!1},[r]),a=T.useCallback(()=>{r(),s.current=setTimeout(()=>{s.current=null,i({})},e)},[i,e,r]),o=T.useCallback(()=>{if(!t.current)return;const u=uo();n(),u||a()},[a,n]),l=T.useCallback(()=>{n(),t.current=!0,document.addEventListener("fullscreenchange",o),document.addEventListener("webkitfullscreenchange",o),document.addEventListener("mozfullscreenchange",o),document.addEventListener("MSFullscreenChange",o)},[o,n]);return T.useEffect(()=>((async()=>{if(!uo()){i({});return}if(kl()==="mobile"&&fa.getPlatform()==="android"&&(tS.show(),sS.disable()),document.exitFullscreen)try{await document.exitFullscreen(),a();return}catch(h){console.error("Exiting fullscreen failed:",h),i({});return}document.mozCancelFullScreen?(document.mozCancelFullScreen(),l()):document.webkitExitFullscreen?(document.webkitExitFullscreen(),l()):document.msExitFullscreen?(document.msExitFullscreen(),l()):(console.warn("Fullscreen API is not supported by this browser."),i({}))})(),()=>{n()}),[a,l,n]),null}function nS(i){var e,t,s="";if(typeof i=="string"||typeof i=="number")s+=i;else if(typeof i=="object")if(Array.isArray(i)){var r=i.length;for(e=0;e<r;e++)i[e]&&(t=nS(i[e]))&&(s&&(s+=" "),s+=t)}else for(t in i)i[t]&&(s&&(s+=" "),s+=t);return s}function Un(){for(var i,e,t=0,s="",r=arguments.length;t<r;t++)(i=arguments[t])&&(e=nS(i))&&(s&&(s+=" "),s+=e);return s}const fu=i=>typeof i=="number"&&!isNaN(i),Ra=i=>typeof i=="string",Si=i=>typeof i=="function",Cd=i=>Ra(i)||Si(i)?i:null,Kg=i=>T.isValidElement(i)||Ra(i)||Si(i)||fu(i);function aS(i,e,t){t===void 0&&(t=300);const{scrollHeight:s,style:r}=i;requestAnimationFrame(()=>{r.minHeight="initial",r.height=s+"px",r.transition=`all ${t}ms`,requestAnimationFrame(()=>{r.height="0",r.padding="0",r.margin="0",setTimeout(e,t)})})}function mu(i){let{enter:e,exit:t,appendPosition:s=!1,collapse:r=!0,collapseDuration:n=300}=i;return function(a){let{children:o,position:l,preventExitTransition:u,done:h,nodeRef:c,isIn:d,playToast:f}=a;const y=s?`${e}--${l}`:e,v=s?`${t}--${l}`:t,m=T.useRef(0);return T.useLayoutEffect(()=>{const g=c.current,b=y.split(" "),x=P=>{P.target===c.current&&(f(),g.removeEventListener("animationend",x),g.removeEventListener("animationcancel",x),m.current===0&&P.type!=="animationcancel"&&g.classList.remove(...b))};g.classList.add(...b),g.addEventListener("animationend",x),g.addEventListener("animationcancel",x)},[]),T.useEffect(()=>{const g=c.current,b=()=>{g.removeEventListener("animationend",b),r?aS(g,h,n):h()};d||(u?b():(m.current=1,g.className+=` ${v}`,g.addEventListener("animationend",b)))},[d]),T.createElement(T.Fragment,null,o)}}function oS(i,e){return i!=null?{content:i.content,containerId:i.props.containerId,id:i.props.toastId,theme:i.props.theme,type:i.props.type,data:i.props.data||{},isLoading:i.props.isLoading,icon:i.props.icon,status:e}:{}}const js=new Map;let gu=[];const Zg=new Set,Ape=i=>Zg.forEach(e=>e(i)),lS=()=>js.size>0;function uS(i,e){var t;if(e)return!((t=js.get(e))==null||!t.isToastActive(i));let s=!1;return js.forEach(r=>{r.isToastActive(i)&&(s=!0)}),s}function hS(i,e){Kg(i)&&(lS()||gu.push({content:i,options:e}),js.forEach(t=>{t.buildToast(i,e)}))}function cS(i,e){js.forEach(t=>{e!=null&&e!=null&&e.containerId?(e==null?void 0:e.containerId)===t.id&&t.toggle(i,e==null?void 0:e.id):t.toggle(i,e==null?void 0:e.id)})}function dS(i){const{subscribe:e,getSnapshot:t,setProps:s}=T.useRef(function(n){const a=n.containerId||1;return{subscribe(o){const l=function(h,c,d){let f=1,y=0,v=[],m=[],g=[],b=c;const x=new Map,P=new Set,L=()=>{g=Array.from(x.values()),P.forEach(S=>S())},_=S=>{m=S==null?[]:m.filter(A=>A!==S),L()},k=S=>{const{toastId:A,onOpen:N,updateId:B,children:U}=S.props,D=B==null;S.staleId&&x.delete(S.staleId),x.set(A,S),m=[...m,S.props.toastId].filter($=>$!==S.staleId),L(),d(oS(S,D?"added":"updated")),D&&Si(N)&&N(T.isValidElement(U)&&U.props)};return{id:h,props:b,observe:S=>(P.add(S),()=>P.delete(S)),toggle:(S,A)=>{x.forEach(N=>{A!=null&&A!==N.props.toastId||Si(N.toggle)&&N.toggle(S)})},removeToast:_,toasts:x,clearQueue:()=>{y-=v.length,v=[]},buildToast:(S,A)=>{if((ae=>{let{containerId:ce,toastId:Ae,updateId:ve}=ae;const ie=ce?ce!==h:h!==1,xe=x.has(Ae)&&ve==null;return ie||xe})(A))return;const{toastId:N,updateId:B,data:U,staleId:D,delay:$}=A,Q=()=>{_(N)},H=B==null;H&&y++;const W={...b,style:b.toastStyle,key:f++,...Object.fromEntries(Object.entries(A).filter(ae=>{let[ce,Ae]=ae;return Ae!=null})),toastId:N,updateId:B,data:U,closeToast:Q,isIn:!1,className:Cd(A.className||b.toastClassName),bodyClassName:Cd(A.bodyClassName||b.bodyClassName),progressClassName:Cd(A.progressClassName||b.progressClassName),autoClose:!A.isLoading&&(K=A.autoClose,oe=b.autoClose,K===!1||fu(K)&&K>0?K:oe),deleteToast(){const ae=x.get(N),{onClose:ce,children:Ae}=ae.props;Si(ce)&&ce(T.isValidElement(Ae)&&Ae.props),d(oS(ae,"removed")),x.delete(N),y--,y<0&&(y=0),v.length>0?k(v.shift()):L()}};var K,oe;W.closeButton=b.closeButton,A.closeButton===!1||Kg(A.closeButton)?W.closeButton=A.closeButton:A.closeButton===!0&&(W.closeButton=!Kg(b.closeButton)||b.closeButton);let ee=S;T.isValidElement(S)&&!Ra(S.type)?ee=T.cloneElement(S,{closeToast:Q,toastProps:W,data:U}):Si(S)&&(ee=S({closeToast:Q,toastProps:W,data:U}));const ue={content:ee,props:W,staleId:D};b.limit&&b.limit>0&&y>b.limit&&H?v.push(ue):fu($)?setTimeout(()=>{k(ue)},$):k(ue)},setProps(S){b=S},setToggle:(S,A)=>{x.get(S).toggle=A},isToastActive:S=>m.some(A=>A===S),getSnapshot:()=>g}}(a,n,Ape);js.set(a,l);const u=l.observe(o);return gu.forEach(h=>hS(h.content,h.options)),gu=[],()=>{u(),js.delete(a)}},setProps(o){var l;(l=js.get(a))==null||l.setProps(o)},getSnapshot(){var o;return(o=js.get(a))==null?void 0:o.getSnapshot()}}}(i)).current;s(i);const r=T.useSyncExternalStore(e,t,t);return{getToastToRender:function(n){if(!r)return[];const a=new Map;return i.newestOnTop&&r.reverse(),r.forEach(o=>{const{position:l}=o.props;a.has(l)||a.set(l,[]),a.get(l).push(o)}),Array.from(a,o=>n(o[0],o[1]))},isToastActive:uS,count:r==null?void 0:r.length}}function pS(i){const[e,t]=T.useState(!1),[s,r]=T.useState(!1),n=T.useRef(null),a=T.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:o,pauseOnHover:l,closeToast:u,onClick:h,closeOnClick:c}=i;var d,f;function y(){t(!0)}function v(){t(!1)}function m(x){const P=n.current;a.canDrag&&P&&(a.didMove=!0,e&&v(),a.delta=i.draggableDirection==="x"?x.clientX-a.start:x.clientY-a.start,a.start!==x.clientX&&(a.canCloseOnClick=!1),P.style.transform=`translate3d(${i.draggableDirection==="x"?`${a.delta}px, var(--y)`:`0, calc(${a.delta}px + var(--y))`},0)`,P.style.opacity=""+(1-Math.abs(a.delta/a.removalDistance)))}function g(){document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",g);const x=n.current;if(a.canDrag&&a.didMove&&x){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance)return r(!0),i.closeToast(),void i.collapseAll();x.style.transition="transform 0.2s, opacity 0.2s",x.style.removeProperty("transform"),x.style.removeProperty("opacity")}}(f=js.get((d={id:i.toastId,containerId:i.containerId,fn:t}).containerId||1))==null||f.setToggle(d.id,d.fn),T.useEffect(()=>{if(i.pauseOnFocusLoss)return document.hasFocus()||v(),window.addEventListener("focus",y),window.addEventListener("blur",v),()=>{window.removeEventListener("focus",y),window.removeEventListener("blur",v)}},[i.pauseOnFocusLoss]);const b={onPointerDown:function(x){if(i.draggable===!0||i.draggable===x.pointerType){a.didMove=!1,document.addEventListener("pointermove",m),document.addEventListener("pointerup",g);const P=n.current;a.canCloseOnClick=!0,a.canDrag=!0,P.style.transition="none",i.draggableDirection==="x"?(a.start=x.clientX,a.removalDistance=P.offsetWidth*(i.draggablePercent/100)):(a.start=x.clientY,a.removalDistance=P.offsetHeight*(i.draggablePercent===80?1.5*i.draggablePercent:i.draggablePercent)/100)}},onPointerUp:function(x){const{top:P,bottom:L,left:_,right:k}=n.current.getBoundingClientRect();x.nativeEvent.type!=="touchend"&&i.pauseOnHover&&x.clientX>=_&&x.clientX<=k&&x.clientY>=P&&x.clientY<=L?v():y()}};return o&&l&&(b.onMouseEnter=v,i.stacked||(b.onMouseLeave=y)),c&&(b.onClick=x=>{h&&h(x),a.canCloseOnClick&&u()}),{playToast:y,pauseToast:v,isRunning:e,preventExitTransition:s,toastRef:n,eventHandlers:b}}function Lpe(i){let{delay:e,isRunning:t,closeToast:s,type:r="default",hide:n,className:a,style:o,controlledProgress:l,progress:u,rtl:h,isIn:c,theme:d}=i;const f=n||l&&u===0,y={...o,animationDuration:`${e}ms`,animationPlayState:t?"running":"paused"};l&&(y.transform=`scaleX(${u})`);const v=Un("Toastify__progress-bar",l?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${d}`,`Toastify__progress-bar--${r}`,{"Toastify__progress-bar--rtl":h}),m=Si(a)?a({rtl:h,type:r,defaultClassName:v}):Un(v,a),g={[l&&u>=1?"onTransitionEnd":"onAnimationEnd"]:l&&u<1?null:()=>{c&&s()}};return T.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":f},T.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${d} Toastify__progress-bar--${r}`}),T.createElement("div",{role:"progressbar","aria-hidden":f?"true":"false","aria-label":"notification timer",className:m,style:y,...g}))}let _pe=1;const fS=()=>""+_pe++;function Dpe(i){return i&&(Ra(i.toastId)||fu(i.toastId))?i.toastId:fS()}function vu(i,e){return hS(i,e),e.toastId}function bd(i,e){return{...e,type:e&&e.type||i,toastId:Dpe(e)}}function wd(i){return(e,t)=>vu(e,bd(i,t))}function _t(i,e){return vu(i,bd("default",e))}_t.loading=(i,e)=>vu(i,bd("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...e})),_t.promise=function(i,e,t){let s,{pending:r,error:n,success:a}=e;r&&(s=Ra(r)?_t.loading(r,t):_t.loading(r.render,{...t,...r}));const o={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=(h,c,d)=>{if(c==null)return void _t.dismiss(s);const f={type:h,...o,...t,data:d},y=Ra(c)?{render:c}:c;return s?_t.update(s,{...f,...y}):_t(y.render,{...f,...y}),d},u=Si(i)?i():i;return u.then(h=>l("success",a,h)).catch(h=>l("error",n,h)),u},_t.success=wd("success"),_t.info=wd("info"),_t.error=wd("error"),_t.warning=wd("warning"),_t.warn=_t.warning,_t.dark=(i,e)=>vu(i,bd("default",{theme:"dark",...e})),_t.dismiss=function(i){(function(e){var t;if(lS()){if(e==null||Ra(t=e)||fu(t))js.forEach(s=>{s.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){const s=js.get(e.containerId);s?s.removeToast(e.id):js.forEach(r=>{r.removeToast(e.id)})}}else gu=gu.filter(s=>e!=null&&s.options.toastId!==e)})(i)},_t.clearWaitingQueue=function(i){i===void 0&&(i={}),js.forEach(e=>{!e.props.limit||i.containerId&&e.id!==i.containerId||e.clearQueue()})},_t.isActive=uS,_t.update=function(i,e){e===void 0&&(e={});const t=((s,r)=>{var n;let{containerId:a}=r;return(n=js.get(a||1))==null?void 0:n.toasts.get(s)})(i,e);if(t){const{props:s,content:r}=t,n={delay:100,...s,...e,toastId:e.toastId||i,updateId:fS()};n.toastId!==i&&(n.staleId=i);const a=n.render||r;delete n.render,vu(a,n)}},_t.done=i=>{_t.update(i,{progress:1})},_t.onChange=function(i){return Zg.add(i),()=>{Zg.delete(i)}},_t.play=i=>cS(!0,i),_t.pause=i=>cS(!1,i);const kpe=typeof window<"u"?T.useLayoutEffect:T.useEffect,xd=i=>{let{theme:e,type:t,isLoading:s,...r}=i;return T.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:e==="colored"?"currentColor":`var(--toastify-icon-color-${t})`,...r})},Ed={info:function(i){return T.createElement(xd,{...i},T.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(i){return T.createElement(xd,{...i},T.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(i){return T.createElement(xd,{...i},T.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(i){return T.createElement(xd,{...i},T.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return T.createElement("div",{className:"Toastify__spinner"})}},Ope=i=>{const{isRunning:e,preventExitTransition:t,toastRef:s,eventHandlers:r,playToast:n}=pS(i),{closeButton:a,children:o,autoClose:l,onClick:u,type:h,hideProgressBar:c,closeToast:d,transition:f,position:y,className:v,style:m,bodyClassName:g,bodyStyle:b,progressClassName:x,progressStyle:P,updateId:L,role:_,progress:k,rtl:S,toastId:A,deleteToast:N,isIn:B,isLoading:U,closeOnClick:D,theme:$}=i,Q=Un("Toastify__toast",`Toastify__toast-theme--${$}`,`Toastify__toast--${h}`,{"Toastify__toast--rtl":S},{"Toastify__toast--close-on-click":D}),H=Si(v)?v({rtl:S,position:y,type:h,defaultClassName:Q}):Un(Q,v),W=function(ue){let{theme:ae,type:ce,isLoading:Ae,icon:ve}=ue,ie=null;const xe={theme:ae,type:ce};return ve===!1||(Si(ve)?ie=ve({...xe,isLoading:Ae}):T.isValidElement(ve)?ie=T.cloneElement(ve,xe):Ae?ie=Ed.spinner():(et=>et in Ed)(ce)&&(ie=Ed[ce](xe))),ie}(i),K=!!k||!l,oe={closeToast:d,type:h,theme:$};let ee=null;return a===!1||(ee=Si(a)?a(oe):T.isValidElement(a)?T.cloneElement(a,oe):function(ue){let{closeToast:ae,theme:ce,ariaLabel:Ae="close"}=ue;return T.createElement("button",{className:`Toastify__close-button Toastify__close-button--${ce}`,type:"button",onClick:ve=>{ve.stopPropagation(),ae(ve)},"aria-label":Ae},T.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},T.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(oe)),T.createElement(f,{isIn:B,done:N,position:y,preventExitTransition:t,nodeRef:s,playToast:n},T.createElement("div",{id:A,onClick:u,"data-in":B,className:H,...r,style:m,ref:s},T.createElement("div",{...B&&{role:_},className:Si(g)?g({type:h}):Un("Toastify__toast-body",g),style:b},W!=null&&T.createElement("div",{className:Un("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!U})},W),T.createElement("div",null,o)),ee,T.createElement(Lpe,{...L&&!K?{key:`pb-${L}`}:{},rtl:S,theme:$,delay:l,isRunning:e,isIn:B,closeToast:d,hide:c,type:h,style:P,className:x,controlledProgress:K,progress:k||0})))},Vd=function(i,e){return e===void 0&&(e=!1),{enter:`Toastify--animate Toastify__${i}-enter`,exit:`Toastify--animate Toastify__${i}-exit`,appendPosition:e}},mS=mu(Vd("bounce",!0)),Mpe=mu(Vd("slide",!0)),Npe=mu(Vd("zoom")),Fpe=mu(Vd("flip")),qpe={position:"top-right",transition:mS,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function gS(i){let e={...qpe,...i};const t=i.stacked,[s,r]=T.useState(!0),n=T.useRef(null),{getToastToRender:a,isToastActive:o,count:l}=dS(e),{className:u,style:h,rtl:c,containerId:d}=e;function f(v){const m=Un("Toastify__toast-container",`Toastify__toast-container--${v}`,{"Toastify__toast-container--rtl":c});return Si(u)?u({position:v,rtl:c,defaultClassName:m}):Un(m,Cd(u))}function y(){t&&(r(!0),_t.play())}return kpe(()=>{if(t){var v;const m=n.current.querySelectorAll('[data-in="true"]'),g=12,b=(v=e.position)==null?void 0:v.includes("top");let x=0,P=0;Array.from(m).reverse().forEach((L,_)=>{const k=L;k.classList.add("Toastify__toast--stacked"),_>0&&(k.dataset.collapsed=`${s}`),k.dataset.pos||(k.dataset.pos=b?"top":"bot");const S=x*(s?.2:1)+(s?0:g*_);k.style.setProperty("--y",`${b?S:-1*S}px`),k.style.setProperty("--g",`${g}`),k.style.setProperty("--s",""+(1-(s?P:0))),x+=k.offsetHeight,P+=.025})}},[s,l,t]),T.createElement("div",{ref:n,className:"Toastify",id:d,onMouseEnter:()=>{t&&(r(!1),_t.pause())},onMouseLeave:y},a((v,m)=>{const g=m.length?{...h}:{...h,pointerEvents:"none"};return T.createElement("div",{className:f(v),style:g,key:`container-${v}`},m.map(b=>{let{content:x,props:P}=b;return T.createElement(Ope,{...P,stacked:t,collapseAll:y,isIn:o(P.toastId,P.containerId),style:P.style,key:`toast-${P.key}`},x)}))}))}const Bpe=({paramRegistry:i,timelineRepresentation:e})=>{const[t,s]=T.useState({}),[r,n]=T.useState([]),[a,o]=T.useState(""),[l,u]=T.useState("Copy URL"),[h,c]=T.useState(!1),[d,f]=T.useState(!1),[y,v]=T.useState([]),m=T.useRef(null),g=[...i].filter(D=>D.name!=="includeSubset"&&D.name!=="excludeSubset").sort((D,$)=>D.name.localeCompare($.name));T.useEffect(()=>{const D=new URLSearchParams(window.location.search),$={},Q=[];let H=[],W=!1;const K=D.get("includeSubset"),oe=D.get("excludeSubset"),ee=D.get("_b");if(ee)try{const ce=atob(ee),Ae=JSON.parse(ce);Ae.excludeSubset?(W=!0,H=Ae.excludeSubset.split(",")):Ae.includeSubset&&(W=!1,H=Ae.includeSubset.split(","))}catch{oe?(W=!0,H=oe.split(",")):K&&(W=!1,H=K.split(","))}else oe?(W=!0,H=oe.split(",")):K&&(W=!1,H=K.split(","));f(W),oe||K?v(H):e.length>0&&v(W?[]:Array.from({length:e.length},(ce,Ae)=>(Ae+1).toString()));const ue=D.get("_b");if(ue)try{const ce=atob(ue),Ae=JSON.parse(ce),ve=i.map(ie=>ie.name);Object.entries(Ae).forEach(([ie,xe])=>{ve.includes(ie)?$[ie]=String(xe):ie!=="_b"&&Q.push({name:ie,value:typeof xe=="object"?JSON.stringify(xe):String(xe),type:typeof xe=="boolean"?"boolean":typeof xe=="number"?"number":Array.isArray(xe)?"array":typeof xe=="object"?"json":"string"})}),i.forEach(ie=>{ie.name in $||(ie.type==="boolean"&&ie.defaultValue!==void 0?$[ie.name]=String(ie.defaultValue):$[ie.name]="")}),c(!0)}catch{ae(D)}else ae(D);function ae(ce){i.forEach(ve=>{const ie=ce.get(ve.name);ie!==null?$[ve.name]=ie:ve.type==="boolean"&&ve.defaultValue!==void 0&&($[ve.name]=String(ve.defaultValue))});const Ae=i.map(ve=>ve.name);ce.forEach((ve,ie)=>{if(!Ae.includes(ie)&&ie!=="_b"){let xe="string";if(ve==="true"||ve==="false")xe="boolean";else if(!isNaN(Number(ve)))xe="number";else try{const et=JSON.parse(ve);xe=Array.isArray(et)?"array":"json"}catch{}Q.push({name:ie,value:ve,type:xe})}})}s($),n(Q)},[i]),T.useEffect(()=>{const D=window.location.pathname.replace(/\/settings$/,"");let $="";const Q={...t};if(y.length>0?d?(Q.excludeSubset=y.sort().join(","),delete Q.includeSubset):y.length!=e.length&&(Q.includeSubset=y.sort().join(","),delete Q.excludeSubset):(delete Q.includeSubset,delete Q.excludeSubset),r.forEach(W=>{W.name&&W.value!==""&&W.name!=="includeSubset"&&W.name!=="excludeSubset"&&(Q[W.name]=W.value)}),h){const W={};Object.entries(Q).forEach(([ee,ue])=>{if(ue!==""){const ae=i.find(ve=>ve.name===ee),ce=r.find(ve=>ve.name===ee),Ae=(ae==null?void 0:ae.type)||(ce==null?void 0:ce.type)||"string";if(Ae==="boolean"&&(ae==null?void 0:ae.defaultValue)!==void 0&&String(ae.defaultValue)===ue)return;switch(Ae){case"number":W[ee]=Number(ue);break;case"boolean":W[ee]=ue==="true";break;case"array":case"json":try{W[ee]=JSON.parse(ue)}catch{W[ee]=ue}break;default:W[ee]=ue}}});const K=JSON.stringify(W);$=`?_b=${btoa(K)}`}else{const W=new URLSearchParams;Object.entries(Q).forEach(([K,oe])=>{if(oe!==""){const ee=i.find(ue=>ue.name===K);if((ee==null?void 0:ee.type)==="boolean"&&ee.defaultValue!==void 0&&String(ee.defaultValue)===oe)return;W.set(K,String(oe))}}),$=W.toString()?`?${W.toString()}`:""}const H=`${window.location.origin}${D}${$}`;o(H)},[t,r,h,i,y,d]);const b=(D,$)=>{s(Q=>({...Q,[D]:$}))},x=(D,$,Q)=>{n(H=>{const W=[...H];return W[D]={...W[D],[$]:Q},W})},P=D=>{const $=`${D+1}`;v(Q=>Q.includes($)?Q.filter(W=>W!==$):[...Q,$])},L=()=>{f(D=>!D)},_=()=>{n(D=>[...D,{name:"",value:"",type:"string"}])},k=r.filter(D=>D.name!=="includeSubset"&&D.name!=="excludeSubset"),S=D=>{n($=>$.filter((Q,H)=>H!==D))},A=()=>{m.current&&(m.current.select(),document.execCommand("copy"),u("Copied!"),setTimeout(()=>u("Copy URL"),2e3))},N=()=>{c(!h)},B=D=>{const{name:$,type:Q,defaultValue:H}=D;if($==="includeSubset"||$==="excludeSubset")return null;const W=t[$]||"";switch(Q){case"boolean":return R.jsxs(R.Fragment,{children:[R.jsx("button",{onClick:()=>b($,W==="true"?"false":"true"),className:`relative inline-flex flex-shrink-0 h-6 w-11 border-2 border-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 ${W==="true"?"bg-blue-600":"bg-gray-200"}`,role:"switch","aria-checked":W==="true",children:R.jsx("span",{className:`pointer-events-none inline-block h-5 w-5 rounded-full bg-white shadow transform ring-0 transition ease-in-out duration-200 ${W==="true"?"translate-x-5":"translate-x-0"}`})}),R.jsx("span",{className:"ml-4 text-gray-500",children:W==="true"?"True":"False"})]});case"number":return R.jsx("input",{type:"number",className:"mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm",value:W,onChange:K=>b($,K.target.value),placeholder:H!==void 0?`Default: ${H}`:"Enter number..."});case"array":case"json":return R.jsx("textarea",{className:"mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm",value:W,onChange:K=>b($,K.target.value),placeholder:Q==="array"?"Enter comma-separated values or JSON array":"Enter JSON object",rows:3});case"string":default:return R.jsx("input",{type:"text",className:"mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm",value:W,onChange:K=>b($,K.target.value),placeholder:H!==void 0&&H!==""?`Default: ${H}`:"Enter value..."})}},U=(D,$)=>D.name==="includeSubset"||D.name==="excludeSubset"?null:R.jsxs("div",{className:"grid grid-cols-12 gap-2 items-center mb-2",children:[R.jsx("div",{className:"col-span-3",children:R.jsx("input",{type:"text",className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm",value:D.name,onChange:Q=>x($,"name",Q.target.value),placeholder:"Parameter name"})}),R.jsx("div",{className:"col-span-2",children:R.jsxs("select",{className:"block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded-md",value:D.type,onChange:Q=>x($,"type",Q.target.value),children:[R.jsx("option",{value:"string",children:"String"}),R.jsx("option",{value:"number",children:"Number"}),R.jsx("option",{value:"boolean",children:"Boolean"}),R.jsx("option",{value:"array",children:"Array"}),R.jsx("option",{value:"json",children:"JSON"})]})}),R.jsx("div",{className:"col-span-6",children:D.type==="boolean"?R.jsx(R.Fragment,{children:R.jsx("button",{onClick:()=>x($,"value",D.value==="true"?"false":"true"),className:`relative inline-flex flex-shrink-0 h-6 w-11 border-2 border-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 ${D.value==="true"?"bg-blue-600":"bg-gray-200"}`,role:"switch","aria-checked":D.value==="true",children:R.jsx("span",{className:`pointer-events-none inline-block h-5 w-5 rounded-full bg-white shadow transform ring-0 transition ease-in-out duration-200 ${D.value==="true"?"translate-x-5":"translate-x-0"}`})})}):D.type==="array"||D.type==="json"?R.jsx("textarea",{className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm",value:D.value,onChange:Q=>x($,"value",Q.target.value),placeholder:D.type==="array"?"Enter JSON array [1,2,3]":'Enter JSON object {"key":"value"}',rows:1}):D.type==="number"?R.jsx("input",{type:"number",className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm",value:D.value,onChange:Q=>x($,"value",Q.target.value),placeholder:"Enter number..."}):R.jsx("input",{type:"text",className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm",value:D.value,onChange:Q=>x($,"value",Q.target.value),placeholder:"Enter value..."})}),R.jsx("div",{className:"col-span-1",children:R.jsx("button",{onClick:()=>S($),className:"inline-flex cursor-pointer items-center justify-center p-2 border border-transparent rounded-md text-red-700 bg-red-100 hover:bg-red-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500","aria-label":"Remove parameter",children:R.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:R.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})})]});return R.jsxs("div",{className:"max-w-4xl mx-auto p-6",children:[R.jsx("h1",{className:"text-3xl font-bold mb-4",children:"Experiment Parameters"}),R.jsx("p",{className:"text-gray-700 mb-6",children:"Configure the experiment by setting parameter values below. Fields left empty will be assigned their default value. Once configured, you can copy the URL to run the experiment with these settings."}),R.jsxs("div",{className:"bg-white shadow overflow-hidden sm:rounded-md mb-8",children:[R.jsxs("div",{className:"px-4 py-5 border-b border-gray-200 sm:px-6",children:[R.jsx("h2",{className:"text-lg font-medium text-gray-900",children:"Registered Parameters"}),R.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"Parameters defined in the experiment configuration."})]}),R.jsx("ul",{className:"divide-y divide-gray-200",children:g.map(D=>R.jsx("li",{className:"px-4 py-4 sm:px-6",children:R.jsxs("div",{className:"grid grid-cols-3 gap-6",children:[R.jsx("div",{className:"col-span-2",children:R.jsxs("div",{className:"flex flex-col h-full",children:[R.jsxs("div",{className:"flex items-center",children:[R.jsx("label",{className:"text-base font-medium text-gray-900",children:D.name}),R.jsx("span",{className:"ml-2 inline-flex items-center px-2 py-0.5 rounded-lg text-xs font-medium bg-gray-100 text-gray-600",children:D.type})]}),D.description&&R.jsx("p",{className:"mt-1 text-sm text-gray-500 flex-grow",children:D.description}),D.defaultValue!==void 0&&R.jsxs("p",{className:"mt-auto pt-2 text-xs text-gray-500",children:["Default: ",R.jsxs("code",{children:[" ",JSON.stringify(D.defaultValue)]})]})]})}),R.jsx("div",{className:"col-span-1 flex items-center",children:B(D)})]})},D.name))})]}),R.jsxs("div",{className:"bg-white shadow overflow-hidden sm:rounded-md mb-8",children:[R.jsx("div",{className:"px-4 py-5 border-b border-gray-200 sm:px-6",children:R.jsxs("div",{className:"flex justify-between items-center",children:[R.jsxs("div",{children:[R.jsx("h2",{className:"text-lg font-medium text-gray-900",children:"Custom Parameters"}),R.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"Add any additional parameters to be stored in the data for this run."})]}),R.jsxs("button",{onClick:_,className:"inline-flex cursor-pointer items-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",children:[R.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"-ml-1 mr-2 h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:R.jsx("path",{fillRule:"evenodd",d:"M10 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H6a1 1 0 110-2h3V6a1 1 0 011-1z",clipRule:"evenodd"})}),"Add Parameter"]})]})}),R.jsx("div",{className:"px-4 py-5 sm:px-6",children:k.length===0?R.jsx("p",{className:"text-sm text-gray-500 italic",children:'No custom parameters added. Click "Add Parameter" to create one.'}):R.jsxs("div",{children:[R.jsxs("div",{className:"grid grid-cols-12 gap-2 mb-2",children:[R.jsx("div",{className:"col-span-3",children:R.jsx("label",{className:"block text-xs font-medium text-gray-500",children:"PARAMETER NAME"})}),R.jsx("div",{className:"col-span-2",children:R.jsx("label",{className:"block text-xs font-medium text-gray-500",children:"TYPE"})}),R.jsx("div",{className:"col-span-6",children:R.jsx("label",{className:"block text-xs font-medium text-gray-500",children:"VALUE"})}),R.jsx("div",{className:"col-span-1"})]}),k.map((D,$)=>R.jsx("div",{children:U(D,$)},$))]})})]}),e.length>0&&R.jsxs("div",{className:"bg-white shadow overflow-hidden sm:rounded-md mb-8",children:[R.jsx("div",{className:"px-4 py-5 border-b border-gray-200 sm:px-6",children:R.jsxs("div",{className:"flex justify-between items-center",children:[R.jsxs("div",{children:[R.jsx("h2",{className:"text-lg font-medium text-gray-900",children:"Trial Selection"}),R.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"Select which trials to include or exclude from the experiment."})]}),R.jsxs("div",{className:"flex items-center",children:[R.jsx("button",{onClick:L,className:`relative inline-flex flex-shrink-0 h-6 w-11 border-2 border-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 ${d?"bg-red-600":"bg-green-600"}`,role:"switch","aria-checked":d,children:R.jsx("span",{className:`pointer-events-none inline-block h-5 w-5 rounded-full bg-white shadow transform ring-0 transition ease-in-out duration-200 ${d?"translate-x-5":"translate-x-0"}`})}),R.jsx("span",{className:"ml-2 text-sm text-gray-600",children:d?"Exclude mode":"Include mode"})]})]})}),R.jsxs("div",{className:"px-4 py-5 sm:px-6",children:[R.jsx("p",{className:"mb-4 text-sm font-medium text-gray-500",children:d?"Check trials you want to EXCLUDE from the experiment":"Check trials you want to INCLUDE in the experiment"}),R.jsx("div",{className:"border border-gray-200 rounded-md overflow-hidden",children:R.jsx("ul",{className:"divide-y divide-gray-200",children:e.map((D,$)=>R.jsx("li",{className:"cursor-pointer px-4 py-3 hover:bg-gray-50",onClick:Q=>{Q.target.type!=="checkbox"&&!Q.target.closest("label")&&P($)},children:R.jsx("div",{className:"flex items-center",children:R.jsxs("div",{className:"flex items-center flex-grow",children:[R.jsx("input",{id:`trial-${$}`,type:"checkbox",className:"h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded cursor-pointer",checked:y.includes(`${$+1}`),onChange:()=>P($)}),R.jsxs("label",{htmlFor:`trial-${$}`,className:"ml-3 flex-grow flex items-center cursor-pointer",children:[R.jsxs("div",{className:"w-8 text-center text-xs text-gray-500 font-medium",children:["#",$+1]}),R.jsx("div",{className:"flex-grow",children:D.name?R.jsx("span",{className:"font-medium text-gray-900",children:D.name}):R.jsx("span",{className:"font-medium text-gray-500",children:D.type})}),R.jsx("div",{className:"ml-2",children:R.jsx("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-gray-100 text-gray-800",children:D.type})})]})]})})},$))})})]})]}),R.jsxs("div",{className:"bg-white shadow sm:rounded-md p-6 mb-8",children:[R.jsxs("div",{className:"flex justify-between items-center mb-4",children:[R.jsx("h2",{className:"text-lg font-medium",children:"Generated URL"}),R.jsxs("div",{className:"flex items-center",children:[R.jsx("button",{onClick:N,className:`relative inline-flex flex-shrink-0 h-6 w-11 border-2 border-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 ${h?"bg-blue-600":"bg-gray-200"}`,role:"switch","aria-checked":h,children:R.jsx("span",{className:`pointer-events-none inline-block h-5 w-5 rounded-full bg-white shadow transform ring-0 transition ease-in-out duration-200 ${h?"translate-x-5":"translate-x-0"}`})}),R.jsx("span",{className:"ml-2 text-sm text-gray-600",children:h?"Base64 Encoded":"Plain Parameters"})]})]}),R.jsxs("div",{className:"flex flex-col md:flex-row gap-3",children:[R.jsx("input",{ref:m,type:"text",className:"flex-grow px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm",value:a,readOnly:!0}),R.jsx("button",{onClick:A,className:"inline-flex cursor-pointer justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",children:l})]}),h&&R.jsxs("p",{className:"mt-4 text-sm text-gray-600",children:[R.jsx("span",{className:"font-medium",children:"Note:"}),' Base64 encoding combines all parameters into a single "_b" parameter, creating shorter URLs that hide parameter details.']})]}),R.jsx("div",{className:"flex justify-center",children:R.jsx("a",{href:a,className:"inline-flex justify-center py-4 px-5 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-green-600 hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500",children:"Launch Experiment with these Settings"})})]})},$pe=new Fhe,vS=T.createContext(!1),Hpe=()=>T.useContext(vS);function yS(i){if(typeof i=="boolean")return i;if(typeof i=="string"){const e=i.trim().toLowerCase();return e!==""&&e!=="false"&&e!=="0"}return!!i}function Qpe({children:i,disableSettings:e,disableHybridSimulation:t}){return T.useEffect(()=>{const s=r=>{r.key===" "&&!(r.target instanceof HTMLInputElement)&&!(r.target instanceof HTMLTextAreaElement)&&!r.target.isContentEditable&&r.preventDefault()};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[]),window.location.pathname.endsWith("/settings")&&!yS(e)?R.jsx(Bpe,{paramRegistry:Dl.getRegistry(),timelineRepresentation:Dl.getTimelineRepresentation()}):R.jsxs($he,{client:$pe,children:[R.jsx(vS.Provider,{value:yS(t),children:i}),R.jsx(gS,{position:"top-center",autoClose:3e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,pauseOnFocusLoss:!0,draggable:!1,pauseOnHover:!0,theme:"light",toastClassName:()=>"relative flex p-4 min-h-10 rounded-none justify-between overflow-hidden cursor-pointer border-2 border-black shadow-[2px_2px_0px_rgba(0,0,0,1)] bg-white",bodyClassName:"text-black font-sans"})]})}ni("RequestFilePermission",null),Qs("RequestFilePermission",ho,{});function CS({next:i}){const[e,t]=T.useState("checking");return T.useEffect(()=>{if(e!=="checking")return;(async()=>{if(kl()!=="mobile"||fa.getPlatform()!=="android"){i({});return}try{await Ia.writeFile({path:"permission_check.txt",data:"Testing permissions",directory:nn.Documents,encoding:yd.UTF8});try{await Ia.deleteFile({path:"permission_check.txt",directory:nn.Documents})}catch(r){console.log("Cleanup error:",r)}t("granted"),i({})}catch(r){console.error("Permission denied or error:",r),t("denied")}})()},[i,e]),e==="checking"?null:R.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 p-6 text-xl mt-16 px-10",children:[R.jsx("p",{children:"Storage permission is required to save your data."}),R.jsx("p",{children:"Please grant permission when prompted."}),R.jsxs("p",{children:['If there is no popup, go to "Settings" ',">",' "Apps" ',">",' "Name of the App" ',">",' "Permissions" ',">",' "Storage" ',">",' "Allow"']}),R.jsx("button",{onClick:()=>t("checking"),className:"mt-8 bg-white px-8 py-3 border-2 border-black font-bold text-black text-lg rounded-xl shadow-[2px_2px_0px_rgba(0,0,0,1)] hover:translate-x-[2px] hover:translate-y-[2px] hover:shadow-none",children:"Try Again"})]})}ni("CanvasBlock","canvas",_2);function Upe(i){return typeof i=="function"}function zpe(i){return typeof i=="object"&&i!==null&&typeof i.draw=="function"}function bS({next:i,updateStore:e,timeline:t,width:s,height:r,store:n,styleCanvas:a,initCanvas:o}){const{instructions:l,markers:u}=T.useMemo(()=>Xh(t),[t]),h=T.useRef(0),c=T.useRef(0),d=T.useRef(!0),f=T.useRef(null),y=T.useRef(null),v=T.useRef([]),m=T.useRef(n??{}),g=T.useRef(null),b=T.useRef(0),x=T.useRef(null);T.useEffect(()=>{const U=m.current._reactiveScreenRefreshRate,D=typeof U=="number"&&U>=20&&U<=300;x.current=D?1e3/U:null},[n]);const P=T.useCallback(U=>{if(U.type!=="ExecuteContent")return null;const D=U.content;if(Upe(D))try{return D(v.current,m.current)}catch($){return console.error("Error executing dynamic canvas slide generator:",$),null}else if(zpe(D))return D;return console.warn("ExecuteContent instruction content is not a valid CanvasSlide or Generator:",D),null},[]),L=T.useCallback(()=>{const U=y.current;if(!U)return{};const D=U.getContext("2d");if(!D)return{};const $=window.devicePixelRatio||1,Q=U.width/$,H=U.height/$;return{ctx:D,canvasWidth:Q,canvasHeight:H}},[]),_=T.useCallback(()=>{const{ctx:U,canvasWidth:D,canvasHeight:$}=L();U&&(U.fillStyle="white",U.fillRect(0,0,D,$),d.current=!1)},[L]),k=T.useCallback(U=>{const{ctx:D,canvasWidth:$,canvasHeight:Q}=L();if(D){if(D.fillStyle="white",D.fillRect(0,0,$,Q),a)try{a(D,$,Q)}catch(H){console.error("Error during styleCanvas function:",H)}else D.fillStyle="black";try{U.draw(D,$,Q)}catch(H){console.error("Error during slide draw function:",H)}c.current=Ps(),d.current=!0,f.current=null,b.current+=1}},[L]);let S;const A=T.useCallback(()=>{const U=Ps(),D=h.current;if(D<0||D>=l.length){g.current&&cancelAnimationFrame(g.current),g.current=null;return}const $=l[D],Q=P($);if(!Q){g.current&&cancelAnimationFrame(g.current),g.current=null;return}const H=Q.displayDuration??1/0,W=Q.responseTimeLimit??1/0,K=Q.allowedKeys??!1,oe=K===!1||Array.isArray(K)&&K.length===0;let ee=!1;const ue=U-c.current+(x.current!==null?x.current*.5:0);d.current&&H!==1/0&&ue>=H&&(_(),(oe||W===1/0)&&(ee=!0)),!ee&&W!==1/0&&ue>=W&&(ee=!0,d.current&&H!==1/0&&ue<H&&_()),ee?S():d.current&&H!==1/0&&ue<H||W!==1/0&&ue<W?g.current=requestAnimationFrame(A):(g.current&&cancelAnimationFrame(g.current),g.current=null)},[l,P,_]),N=T.useCallback(()=>{g.current&&cancelAnimationFrame(g.current),g.current=null;const U=In({instructions:l,markers:u},h.current,()=>m.current,()=>v.current,$=>{m.current=$});if(h.current=U,U>=l.length){e(m.current),i(v.current);return}if(!y.current){console.error("Canvas element not found during control flow.");return}const D=P(l[U]);if(D){k(D);const $=D.displayDuration??1/0,Q=D.responseTimeLimit??1/0;($!==1/0||Q!==1/0)&&(g.current=requestAnimationFrame(A))}else console.error("Failed to resolve slide content during control flow:",l[U]),h.current++,N()},[l,u,P,k,A,i]);S=T.useCallback(()=>{const U=f.current,D=Ps();g.current&&cancelAnimationFrame(g.current),g.current=null;const $=h.current;if($>=l.length||l[$].type!=="ExecuteContent"){h.current++,N();return}const Q=l[$],H=P(Q);if(H&&!H.ignoreData){let W={index:h.current,trialNumber:b.current-1,start:c.current,end:D,duration:D-c.current,key:U?U.key:null,reactionTime:U?U.reactionTime:null};W=ec(W,H,v.current,m.current),v.current.push(W)}h.current++,f.current=null,N()},[l,P,N]);const B=T.useCallback(U=>{const D=Ps(),$=h.current;if($>=l.length||!d.current)return;const Q=l[$];if(Q.type!=="ExecuteContent")return;const H=P(Q);if(!H)return;const W=H.responseTimeLimit??1/0,K=D-c.current<W,oe=H.allowedKeys??!1;if((oe===!0||Array.isArray(oe)&&oe.includes(U.key))&&K){const ue=H.endSlideOnResponse??!0,ae=H.hideOnResponse??!1,ce=H.ignoreData??!1;(!f.current||!ue)&&(!f.current&&!ce&&(f.current={key:U.key,time:D,reactionTime:D-c.current}),ae&&_(),ue&&S())}},[l,P,S,_]);return T.useEffect(()=>{const U=y.current;if(!U)return;const D=uo()?window.screen.width:window.innerWidth,$=uo()?window.screen.height:window.innerHeight;let Q,H;const W=(ie,xe)=>{if(typeof ie=="number")return ie;if(typeof ie=="string"&&ie.includes("%")){const et=parseFloat(ie);if(!isNaN(et))return xe*et/100}return null};let K=W(s,D),oe=W(r,$);const ee=typeof s=="string"&&/^\d+(?:\.\d+)?:\d+(?:\.\d+)?$/.test(s),ue=typeof r=="string"&&/^\d+(?:\.\d+)?:\d+(?:\.\d+)?$/.test(r);if(K!==null&&oe!==null)Q=K,H=oe;else if(K!==null&&oe===null&&!ue)Q=K,H=K;else if(oe!==null&&K===null&&!ee)H=oe,Q=oe;else if(K===null&&oe===null&&!ee&&!ue){const ie=Math.min(D,$);Q=ie,H=ie}else{let ie=K,xe=oe;if(ue&&ie===null&&(ie=xe??$),ee&&xe===null&&(xe=ie??D),ie===null&&xe===null){const et=Math.min(D,$);ie=et,xe=et}else ie===null?ie=xe:xe===null&&(xe=ie);Q=ie,H=xe??0}if(ee&&!ue)try{const ie=s.match(/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?)$/);ie&&(Q=H/parseFloat(ie[2])*parseFloat(ie[1]))}catch{console.error("Invalid width ratio string:",s)}else if(ue&&!ee)try{const ie=r.match(/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?)$/);ie&&(H=Q/parseFloat(ie[1])*parseFloat(ie[2]))}catch{console.error("Invalid height ratio string:",r)}else if(ee&&ue){console.warn(`Both width (${s}) and height (${r}) are ratios. Prioritizing width.`);try{const ie=s.match(/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?)$/);if(ie){Q=$/parseFloat(ie[2])*parseFloat(ie[1]);const xe=r.match(/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?)$/);xe?H=Q/parseFloat(xe[1])*parseFloat(xe[2]):H=Q}else{const xe=Math.min(D,$);Q=xe,H=xe}}catch(ie){console.error("Error parsing ratios:",ie);const xe=Math.min(D,$);Q=xe,H=xe}}const ae=window.devicePixelRatio||1,ce=Math.round(Q),Ae=Math.round(H);U.width=Math.round(ce*ae),U.height=Math.round(Ae*ae),U.style.width=ce+"px",U.style.height=Ae+"px";const ve=U.getContext("2d");if(ve&&ve.scale(ae,ae),o&&ve)try{o(ve,ce,Ae)}catch(ie){console.error("Error during canvas initialization:",ie)}return window.addEventListener("keydown",B),N(),()=>{window.removeEventListener("keydown",B),g.current&&cancelAnimationFrame(g.current)}},[t,s,r,B,N]),R.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"},children:R.jsx("canvas",{ref:y})})}Qs("CanvasBlock",(i,e,t,s)=>{const r=i.timeline;if(!r)return{responseData:[],participantState:s};const n=Xh(r),a=[];let o={...e.store||{}},l=0,u=0;const h=()=>o,c=()=>a,d=y=>{o=y};let f=In(n,0,h,c,d);for(;f<n.instructions.length;){let y=n.instructions[f].content;typeof y=="function"&&(y=y(a,o));const m=(y.simulate||t.respondToSlide)(y,s);if(s=m.participantState,!y.ignoreData){const g=y.displayDuration||m.reactionTime||1e3;let b={index:f,trialNumber:u,start:l,end:l+g,duration:g,key:m.key,reactionTime:m.reactionTime};b=ec(b,y,a,o),a.push(b),l+=g}u++,f=In(n,f+1,h,c,d)}return{responseData:a,participantState:s,storeUpdates:o,duration:l}},{respondToSlide:(i,e)=>{const t=i.allowedKeys;return t===!0?{key:" ",reactionTime:X.uniform(200,800),participantState:e}:Array.isArray(t)&&t.length>0?{key:t[Math.floor(X.uniform(0,t.length))],reactionTime:X.uniform(200,800),participantState:e}:{key:null,reactionTime:null,participantState:e}}}),ni("CheckDevice","session"),Qs("CheckDevice",(i,e,t,s)=>{const r={windowWidth:1920,windowHeight:1080,screenWidth:1920,screenHeight:1080,browser:"Simulated",browserVersion:"1.0",isMobile:!1,operatingSystem:"Simulated",hasWebAudio:!0,hasFullscreen:!0,hasWebcam:!0,hasMicrophone:!0};return{responseData:r,participantState:s,storeUpdates:{_reactiveDeviceInfo:r}}},{});function wS({check:i,content:e=R.jsx("div",{children:"Your device doesn't meet the requirements for this experiment."}),data:t,store:s,updateStore:r,next:n}){const[a,o]=T.useState(!1),l=T.useRef(!1);return T.useEffect(()=>{if(l.current)return;(async()=>{const h=window.innerWidth,c=window.innerHeight,d=window.screen.width,f=window.screen.height,y=navigator.userAgent;let v="Unknown",m="Unknown";if(y.indexOf("Chrome")>-1){v="Chrome";const A=y.match(/Chrome\/(\d+\.\d+)/);m=A?A[1]:"Unknown"}else if(y.indexOf("Firefox")>-1){v="Firefox";const A=y.match(/Firefox\/(\d+\.\d+)/);m=A?A[1]:"Unknown"}else if(y.indexOf("Safari")>-1){v="Safari";const A=y.match(/Version\/(\d+\.\d+)/);m=A?A[1]:"Unknown"}else if(y.indexOf("Edge")>-1){v="Edge";const A=y.match(/Edge\/(\d+\.\d+)/);m=A?A[1]:"Unknown"}else if(y.indexOf("MSIE")>-1||y.indexOf("Trident/")>-1){v="Internet Explorer";const A=y.match(/(?:MSIE |rv:)(\d+\.\d+)/);m=A?A[1]:"Unknown"}const g=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(y);let b="Unknown";/Windows/.test(y)?b="Windows":/Macintosh|Mac OS X/.test(y)?b="MacOS":/Linux/.test(y)?b="Linux":/Android/.test(y)?b="Android":/iOS|iPhone|iPad|iPod/.test(y)&&(b="iOS");const x=!!(window.AudioContext||window.webkitAudioContext||window.mozAudioContext||window.oAudioContext||window.msAudioContext),P=!!(document.exitFullscreen||document.webkitExitFullscreen||document.mozCancelFullScreen||document.msExitFullscreen||document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled);let L=!1,_=!1;try{const A=await navigator.mediaDevices.enumerateDevices();L=A.some(N=>N.kind==="videoinput"),_=A.some(N=>N.kind==="audioinput")}catch(A){console.error("Error checking media devices:",A)}const k={windowWidth:h,windowHeight:c,screenWidth:d,screenHeight:f,browser:v,browserVersion:m,isMobile:g,operatingSystem:b,hasWebAudio:x,hasFullscreen:P,hasWebcam:L,hasMicrophone:_};r({_reactiveDeviceInfo:k}),(i?i(k,t,s):!0)&&!l.current?(l.current=!0,n(k)):o(!0)})()},[i,t,r,n]),a?R.jsx("div",{className:"max-w-prose mx-auto mt-20 mb-20 px-4",children:R.jsx("article",{className:"prose prose-2xl prose-slate text-xl prose-a:text-blue-600 prose-a:underline prose-h1:text-4xl prose-h1:mb-10 prose-h1:font-bold prose-p:mb-4 prose-strong:font-bold text-black leading-relaxed",children:e})}):null}ni("StoreUI","storeui");function xS(i,e){const t={};return i.forEach(s=>{t[s.storeKey]=(e==null?void 0:e[s.storeKey])!==void 0?e[s.storeKey]:s.defaultValue}),t}Qs("StoreUI",(i,e,t,s)=>{const r=xS(i.fields||[],e.store);return{responseData:r,participantState:s,storeUpdates:r}},{});function jpe({next:i,updateStore:e,store:t,title:s="Settings",description:r,fields:n,saveButtonText:a="Save Configuration"}){const[o,l]=T.useState({}),[u,h]=T.useState({}),[c,d]=T.useState({});T.useEffect(()=>{l(xS(n,t));const g={};n.forEach(b=>{g[b.storeKey]=!1}),d(g)},[t,n]);const f=(g,b)=>{if(g.type==="integer"||g.type==="float"){if(b==null||b==="")return"This field is required";if(g.min!==void 0&&b<g.min)return`Value must be at least ${g.min}`;if(g.max!==void 0&&b>g.max)return`Value must be at most ${g.max}`}else if(g.type==="string"){if(g.minLength!==void 0&&b.length<g.minLength)return`Must be at least ${g.minLength} characters`;if(g.maxLength!==void 0&&b.length>g.maxLength)return`Must be at most ${g.maxLength} characters`}if(g.validate){const x=g.validate(b);if(x!==!0&&x!=="")return typeof x=="string"?x:"Invalid value"}return null};T.useEffect(()=>{const g={};n.forEach(b=>{const x=o[b.storeKey];if(!c[b.storeKey])return;const P=f(b,x);P&&(g[b.storeKey]=P)}),h(g)},[o,n,c]);const y=(g,b)=>{l(x=>({...x,[g]:b})),d(x=>({...x,[g]:!0}))},v=()=>{const g={};n.forEach(x=>{g[x.storeKey]=!0}),d(g);const b={};n.forEach(x=>{const P=o[x.storeKey];if(x.type==="integer"||x.type==="float"?P==null||P===""?b[x.storeKey]="This field is required":x.min!==void 0&&P<x.min?b[x.storeKey]=`Value must be at least ${x.min}`:x.max!==void 0&&P>x.max&&(b[x.storeKey]=`Value must be at most ${x.max}`):x.type==="string"&&(x.minLength!==void 0&&P.length<x.minLength?b[x.storeKey]=`Must be at least ${x.minLength} characters`:x.maxLength!==void 0&&P.length>x.maxLength&&(b[x.storeKey]=`Must be at most ${x.maxLength} characters`)),x.validate&&!b[x.storeKey]){const L=x.validate(P);L!==!0&&L!==""&&(b[x.storeKey]=typeof L=="string"?L:"Invalid value")}}),h(b),Object.keys(b).length===0&&(e(o),i(o))},m=Object.keys(u).length>0;return R.jsxs("div",{className:"max-w-prose mx-auto mt-20 mb-20 px-4",children:[R.jsx("h1",{className:"text-4xl font-bold mb-6",children:s}),r&&R.jsx("article",{className:"prose prose-lg mb-10",children:r}),R.jsx("div",{className:"mt-12 space-y-12",children:n.map(g=>R.jsxs("div",{className:"space-y-2",children:[R.jsxs("label",{className:"block text-xl font-medium text-gray-900",children:[g.label,g.type==="integer"&&g.min!==void 0&&g.max!==void 0&&` (${g.min}-${g.max})`,g.type==="float"&&g.min!==void 0&&g.max!==void 0&&` (${g.min}-${g.max})`]}),g.prompt&&R.jsx("p",{className:"mb-4 text-base text-gray-700 mb-2",children:g.prompt}),g.type==="boolean"&&R.jsxs("div",{className:"flex items-center",children:[R.jsxs("div",{className:`relative cursor-pointer w-10 h-10 flex items-center justify-center border-2 border-black rounded-xl shadow-[2px_2px_0px_rgba(0,0,0,1)] hover:translate-x-[2px] hover:translate-y-[2px] hover:shadow-none ${o[g.storeKey]?"bg-blue-600 text-white":"bg-white"}`,onClick:()=>y(g.storeKey,!o[g.storeKey]),children:[R.jsx("input",{type:"checkbox",checked:!!o[g.storeKey],onChange:b=>y(g.storeKey,b.target.checked),className:"absolute opacity-0 h-0 w-0"}),o[g.storeKey]&&R.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:R.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})})]}),R.jsx("span",{className:"ml-3 text-lg",children:"Enabled"})]}),(g.type==="integer"||g.type==="float")&&R.jsxs("div",{className:"flex items-center space-x-4",children:[g.min!==void 0&&g.max!==void 0&&R.jsx("button",{onClick:()=>y(g.storeKey,Math.max(g.min||0,(o[g.storeKey]||0)-(g.step||1))),className:"cursor-pointer bg-white h-10 w-10 flex items-center justify-center border-2 border-black font-bold text-black text-lg rounded-full shadow-[2px_2px_0px_rgba(0,0,0,1)] hover:translate-x-[2px] hover:translate-y-[2px] hover:shadow-none",children:"-"}),R.jsx("input",{type:"text",value:o[g.storeKey]||"",onChange:b=>{const x=b.target.value;let P;g.type==="integer"?P=x===""?"":parseInt(x,10):g.type==="float"&&(P=x===""?"":parseFloat(x)),(x===""||!isNaN(P))&&y(g.storeKey,P)},step:g.step||(g.type==="integer"?1:.1),min:g.min,max:g.max,className:"w-24 px-4 py-2 text-center border-2 border-black rounded-xl text-lg focus:outline-none focus:ring-2 focus:ring-blue-500"}),g.min!==void 0&&g.max!==void 0&&R.jsx("button",{onClick:()=>y(g.storeKey,Math.min(g.max||1/0,(o[g.storeKey]||0)+(g.step||1))),className:"cursor-pointer bg-white h-10 w-10 flex items-center justify-center border-2 border-black font-bold text-black text-lg rounded-full shadow-[2px_2px_0px_rgba(0,0,0,1)] hover:translate-x-[2px] hover:translate-y-[2px] hover:shadow-none",children:"+"})]}),g.type==="string"&&R.jsx("input",{type:"text",value:o[g.storeKey]||"",onChange:b=>y(g.storeKey,b.target.value),className:"w-full px-4 py-2 border-2 border-black rounded-xl text-lg focus:outline-none focus:ring-2 focus:ring-blue-500"}),u[g.storeKey]&&c[g.storeKey]&&R.jsx("div",{className:"text-red-500 text-sm mt-1",children:u[g.storeKey]}),g.component&&R.jsx("div",{className:"mt-4",children:T.createElement(g.component,{value:o[g.storeKey]})})]},g.storeKey))}),R.jsx("div",{className:"mt-12 flex justify-center",children:R.jsx("button",{onClick:v,disabled:m,className:`bg-white cursor-pointer px-8 py-3 border-2 border-black font-bold text-black text-lg rounded-xl shadow-[2px_2px_0px_rgba(0,0,0,1)] hover:translate-x-[2px] hover:translate-y-[2px] hover:shadow-none ${m?"opacity-50 cursor-not-allowed":""}`,children:a})})]})}const yu=T.createContext({});function Jg(i){const e=T.useRef(null);return e.current===null&&(e.current=i()),e.current}const Yg=typeof window<"u"?T.useLayoutEffect:T.useEffect,Sd=T.createContext(null);function Xg(i,e){i.indexOf(e)===-1&&i.push(e)}function Td(i,e){const t=i.indexOf(e);t>-1&&i.splice(t,1)}const Lr=(i,e,t)=>t>e?e:t<i?i:t;function ev(i,e){return e?`${i}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:i}let Mo=()=>{},an=()=>{};typeof process<"u"&&((j4=process.env)==null?void 0:j4.NODE_ENV)!=="production"&&(Mo=(i,e,t)=>{!i&&typeof console<"u"&&console.warn(ev(e,t))},an=(i,e,t)=>{if(!i)throw new Error(ev(e,t))});const zn={},ES=i=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(i);function VS(i){return typeof i=="object"&&i!==null}const SS=i=>/^0[^.\s]+$/u.test(i);function TS(i){let e;return()=>(e===void 0&&(e=i()),e)}const Hi=i=>i,Wpe=(i,e)=>t=>e(i(t)),Cu=(...i)=>i.reduce(Wpe),bu=(i,e,t)=>{const s=e-i;return s===0?1:(t-i)/s};class tv{constructor(){this.subscriptions=[]}add(e){return Xg(this.subscriptions,e),()=>Td(this.subscriptions,e)}notify(e,t,s){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,s);else for(let n=0;n<r;n++){const a=this.subscriptions[n];a&&a(e,t,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const di=i=>i*1e3,Qi=i=>i/1e3;function PS(i,e){return e?i*(1e3/e):0}const IS=new Set;function sv(i,e,t){i||IS.has(e)||(console.warn(ev(e,t)),IS.add(e))}const RS=(i,e,t)=>(((1-3*t+3*e)*i+(3*t-6*e))*i+3*e)*i,Gpe=1e-7,Kpe=12;function Zpe(i,e,t,s,r){let n,a,o=0;do a=e+(t-e)/2,n=RS(a,s,r)-i,n>0?t=a:e=a;while(Math.abs(n)>Gpe&&++o<Kpe);return a}function wu(i,e,t,s){if(i===e&&t===s)return Hi;const r=n=>Zpe(n,0,1,i,t);return n=>n===0||n===1?n:RS(r(n),e,s)}const AS=i=>e=>e<=.5?i(2*e)/2:(2-i(2*(1-e)))/2,LS=i=>e=>1-i(1-e),_S=wu(.33,1.53,.69,.99),iv=LS(_S),DS=AS(iv),kS=i=>i>=1?1:(i*=2)<1?.5*iv(i):.5*(2-Math.pow(2,-10*(i-1))),rv=i=>1-Math.sin(Math.acos(i)),OS=LS(rv),MS=AS(rv),Jpe=wu(.42,0,1,1),Ype=wu(0,0,.58,1),NS=wu(.42,0,.58,1),Xpe=i=>Array.isArray(i)&&typeof i[0]!="number",FS=i=>Array.isArray(i)&&typeof i[0]=="number",qS={linear:Hi,easeIn:Jpe,easeInOut:NS,easeOut:Ype,circIn:rv,circInOut:MS,circOut:OS,backIn:iv,backInOut:DS,backOut:_S,anticipate:kS},efe=i=>typeof i=="string",BS=i=>{if(FS(i)){an(i.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,t,s,r]=i;return wu(e,t,s,r)}else if(efe(i))return an(qS[i]!==void 0,`Invalid easing type '${i}'`,"invalid-easing-type"),qS[i];return i},Pd=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function tfe(i,e){let t=new Set,s=new Set,r=!1,n=!1;const a=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function l(h){a.has(h)&&(u.schedule(h),i()),h(o)}const u={schedule:(h,c=!1,d=!1)=>{const y=d&&r?t:s;return c&&a.add(h),y.add(h),h},cancel:h=>{s.delete(h),a.delete(h)},process:h=>{if(o=h,r){n=!0;return}r=!0;const c=t;t=s,s=c,t.forEach(l),t.clear(),r=!1,n&&(n=!1,u.process(h))}};return u}const sfe=40;function $S(i,e){let t=!1,s=!0;const r={delta:0,timestamp:0,isProcessing:!1},n=()=>t=!0,a=Pd.reduce((x,P)=>(x[P]=tfe(n),x),{}),{setup:o,read:l,resolveKeyframes:u,preUpdate:h,update:c,preRender:d,render:f,postRender:y}=a,v=()=>{const x=zn.useManualTiming,P=x?r.timestamp:performance.now();t=!1,x||(r.delta=s?1e3/60:Math.max(Math.min(P-r.timestamp,sfe),1)),r.timestamp=P,r.isProcessing=!0,o.process(r),l.process(r),u.process(r),h.process(r),c.process(r),d.process(r),f.process(r),y.process(r),r.isProcessing=!1,t&&e&&(s=!1,i(v))},m=()=>{t=!0,s=!0,r.isProcessing||i(v)};return{schedule:Pd.reduce((x,P)=>{const L=a[P];return x[P]=(_,k=!1,S=!1)=>(t||m(),L.schedule(_,k,S)),x},{}),cancel:x=>{for(let P=0;P<Pd.length;P++)a[Pd[P]].cancel(x)},state:r,steps:a}}const{schedule:Tt,cancel:jn,state:Ds,steps:nv}=$S(typeof requestAnimationFrame<"u"?requestAnimationFrame:Hi,!0);let Id;function ife(){Id=void 0}const Ws={now:()=>(Id===void 0&&Ws.set(Ds.isProcessing||zn.useManualTiming?Ds.timestamp:performance.now()),Id),set:i=>{Id=i,queueMicrotask(ife)}},HS=i=>e=>typeof e=="string"&&e.startsWith(i),QS=HS("--"),rfe=HS("var(--"),av=i=>rfe(i)?nfe.test(i.split("/*")[0].trim()):!1,nfe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function US(i){return typeof i!="string"?!1:i.split("/*")[0].includes("var(--")}const No={test:i=>typeof i=="number",parse:parseFloat,transform:i=>i},xu={...No,transform:i=>Lr(0,1,i)},Rd={...No,default:1},Eu=i=>Math.round(i*1e5)/1e5,ov=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function afe(i){return i==null}const ofe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,lv=(i,e)=>t=>!!(typeof t=="string"&&ofe.test(t)&&t.startsWith(i)||e&&!afe(t)&&Object.prototype.hasOwnProperty.call(t,e)),zS=(i,e,t)=>s=>{if(typeof s!="string")return s;const[r,n,a,o]=s.match(ov);return{[i]:parseFloat(r),[e]:parseFloat(n),[t]:parseFloat(a),alpha:o!==void 0?parseFloat(o):1}},lfe=i=>Lr(0,255,i),uv={...No,transform:i=>Math.round(lfe(i))},Aa={test:lv("rgb","red"),parse:zS("red","green","blue"),transform:({red:i,green:e,blue:t,alpha:s=1})=>"rgba("+uv.transform(i)+", "+uv.transform(e)+", "+uv.transform(t)+", "+Eu(xu.transform(s))+")"};function ufe(i){let e="",t="",s="",r="";return i.length>5?(e=i.substring(1,3),t=i.substring(3,5),s=i.substring(5,7),r=i.substring(7,9)):(e=i.substring(1,2),t=i.substring(2,3),s=i.substring(3,4),r=i.substring(4,5),e+=e,t+=t,s+=s,r+=r),{red:parseInt(e,16),green:parseInt(t,16),blue:parseInt(s,16),alpha:r?parseInt(r,16)/255:1}}const hv={test:lv("#"),parse:ufe,transform:Aa.transform},Vu=i=>({test:e=>typeof e=="string"&&e.endsWith(i)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${i}`}),Wn=Vu("deg"),_r=Vu("%"),be=Vu("px"),hfe=Vu("vh"),cfe=Vu("vw"),jS={..._r,parse:i=>_r.parse(i)/100,transform:i=>_r.transform(i*100)},Fo={test:lv("hsl","hue"),parse:zS("hue","saturation","lightness"),transform:({hue:i,saturation:e,lightness:t,alpha:s=1})=>"hsla("+Math.round(i)+", "+_r.transform(Eu(e))+", "+_r.transform(Eu(t))+", "+Eu(xu.transform(s))+")"},ps={test:i=>Aa.test(i)||hv.test(i)||Fo.test(i),parse:i=>Aa.test(i)?Aa.parse(i):Fo.test(i)?Fo.parse(i):hv.parse(i),transform:i=>typeof i=="string"?i:i.hasOwnProperty("red")?Aa.transform(i):Fo.transform(i),getAnimatableNone:i=>{const e=ps.parse(i);return e.alpha=0,ps.transform(e)}},dfe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function pfe(i){var e,t;return isNaN(i)&&typeof i=="string"&&(((e=i.match(ov))==null?void 0:e.length)||0)+(((t=i.match(dfe))==null?void 0:t.length)||0)>0}const WS="number",GS="color",ffe="var",mfe="var(",KS="${}",gfe=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function qo(i){const e=i.toString(),t=[],s={color:[],number:[],var:[]},r=[];let n=0;const o=e.replace(gfe,l=>(ps.test(l)?(s.color.push(n),r.push(GS),t.push(ps.parse(l))):l.startsWith(mfe)?(s.var.push(n),r.push(ffe),t.push(l)):(s.number.push(n),r.push(WS),t.push(parseFloat(l))),++n,KS)).split(KS);return{values:t,split:o,indexes:s,types:r}}function vfe(i){return qo(i).values}function ZS({split:i,types:e}){const t=i.length;return s=>{let r="";for(let n=0;n<t;n++)if(r+=i[n],s[n]!==void 0){const a=e[n];a===WS?r+=Eu(s[n]):a===GS?r+=ps.transform(s[n]):r+=s[n]}return r}}function yfe(i){return ZS(qo(i))}const Cfe=i=>typeof i=="number"?0:ps.test(i)?ps.getAnimatableNone(i):i,bfe=(i,e)=>typeof i=="number"?e!=null&&e.trim().endsWith("/")?i:0:Cfe(i);function wfe(i){const e=qo(i);return ZS(e)(e.values.map((s,r)=>bfe(s,e.split[r])))}const lr={test:pfe,parse:vfe,createTransformer:yfe,getAnimatableNone:wfe};function cv(i,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?i+(e-i)*6*t:t<1/2?e:t<2/3?i+(e-i)*(2/3-t)*6:i}function xfe({hue:i,saturation:e,lightness:t,alpha:s}){i/=360,e/=100,t/=100;let r=0,n=0,a=0;if(!e)r=n=a=t;else{const o=t<.5?t*(1+e):t+e-t*e,l=2*t-o;r=cv(l,o,i+1/3),n=cv(l,o,i),a=cv(l,o,i-1/3)}return{red:Math.round(r*255),green:Math.round(n*255),blue:Math.round(a*255),alpha:s}}function Ad(i,e){return t=>t>0?e:i}const qt=(i,e,t)=>i+(e-i)*t,dv=(i,e,t)=>{const s=i*i,r=t*(e*e-s)+s;return r<0?0:Math.sqrt(r)},Efe=[hv,Aa,Fo],Vfe=i=>Efe.find(e=>e.test(i));function JS(i){const e=Vfe(i);if(Mo(!!e,`'${i}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let t=e.parse(i);return e===Fo&&(t=xfe(t)),t}const YS=(i,e)=>{const t=JS(i),s=JS(e);if(!t||!s)return Ad(i,e);const r={...t};return n=>(r.red=dv(t.red,s.red,n),r.green=dv(t.green,s.green,n),r.blue=dv(t.blue,s.blue,n),r.alpha=qt(t.alpha,s.alpha,n),Aa.transform(r))},pv=new Set(["none","hidden"]);function Sfe(i,e){return pv.has(i)?t=>t<=0?i:e:t=>t>=1?e:i}function Tfe(i,e){return t=>qt(i,e,t)}function fv(i){return typeof i=="number"?Tfe:typeof i=="string"?av(i)?Ad:ps.test(i)?YS:Rfe:Array.isArray(i)?XS:typeof i=="object"?ps.test(i)?YS:Pfe:Ad}function XS(i,e){const t=[...i],s=t.length,r=i.map((n,a)=>fv(n)(n,e[a]));return n=>{for(let a=0;a<s;a++)t[a]=r[a](n);return t}}function Pfe(i,e){const t={...i,...e},s={};for(const r in t)i[r]!==void 0&&e[r]!==void 0&&(s[r]=fv(i[r])(i[r],e[r]));return r=>{for(const n in s)t[n]=s[n](r);return t}}function Ife(i,e){const t=[],s={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const n=e.types[r],a=i.indexes[n][s[n]],o=i.values[a]??0;t[r]=o,s[n]++}return t}const Rfe=(i,e)=>{const t=lr.createTransformer(e),s=qo(i),r=qo(e);return s.indexes.var.length===r.indexes.var.length&&s.indexes.color.length===r.indexes.color.length&&s.indexes.number.length>=r.indexes.number.length?pv.has(i)&&!r.values.length||pv.has(e)&&!s.values.length?Sfe(i,e):Cu(XS(Ife(s,r),r.values),t):(Mo(!0,`Complex values '${i}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Ad(i,e))};function e3(i,e,t){return typeof i=="number"&&typeof e=="number"&&typeof t=="number"?qt(i,e,t):fv(i)(i,e)}const Afe=i=>{const e=({timestamp:t})=>i(t);return{start:(t=!0)=>Tt.update(e,t),stop:()=>jn(e),now:()=>Ds.isProcessing?Ds.timestamp:Ws.now()}},t3=(i,e,t=10)=>{let s="";const r=Math.max(Math.round(e/t),2);for(let n=0;n<r;n++)s+=Math.round(i(n/(r-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Ld=2e4;function mv(i){let e=0;const t=50;let s=i.next(e);for(;!s.done&&e<Ld;)e+=t,s=i.next(e);return e>=Ld?1/0:e}function Lfe(i,e=100,t){const s=t({...i,keyframes:[0,e]}),r=Math.min(mv(s),Ld);return{type:"keyframes",ease:n=>s.next(r*n).value/e,duration:Qi(r)}}const zt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function gv(i,e){return i*Math.sqrt(1-e*e)}const _fe=12;function Dfe(i,e,t){let s=t;for(let r=1;r<_fe;r++)s=s-i(s)/e(s);return s}const vv=.001;function kfe({duration:i=zt.duration,bounce:e=zt.bounce,velocity:t=zt.velocity,mass:s=zt.mass}){let r,n;Mo(i<=di(zt.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-e;a=Lr(zt.minDamping,zt.maxDamping,a),i=Lr(zt.minDuration,zt.maxDuration,Qi(i)),a<1?(r=u=>{const h=u*a,c=h*i,d=h-t,f=gv(u,a),y=Math.exp(-c);return vv-d/f*y},n=u=>{const c=u*a*i,d=c*t+t,f=Math.pow(a,2)*Math.pow(u,2)*i,y=Math.exp(-c),v=gv(Math.pow(u,2),a);return(-r(u)+vv>0?-1:1)*((d-f)*y)/v}):(r=u=>{const h=Math.exp(-u*i),c=(u-t)*i+1;return-vv+h*c},n=u=>{const h=Math.exp(-u*i),c=(t-u)*(i*i);return h*c});const o=5/i,l=Dfe(r,n,o);if(i=di(i),isNaN(l))return{stiffness:zt.stiffness,damping:zt.damping,duration:i};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:a*2*Math.sqrt(s*u),duration:i}}}const Ofe=["duration","bounce"],Mfe=["stiffness","damping","mass"];function s3(i,e){return e.some(t=>i[t]!==void 0)}function Nfe(i){let e={velocity:zt.velocity,stiffness:zt.stiffness,damping:zt.damping,mass:zt.mass,isResolvedFromDuration:!1,...i};if(!s3(i,Mfe)&&s3(i,Ofe))if(e.velocity=0,i.visualDuration){const t=i.visualDuration,s=2*Math.PI/(t*1.2),r=s*s,n=2*Lr(.05,1,1-(i.bounce||0))*Math.sqrt(r);e={...e,mass:zt.mass,stiffness:r,damping:n}}else{const t=kfe({...i,velocity:0});e={...e,...t,mass:zt.mass},e.isResolvedFromDuration=!0}return e}function _d(i=zt.visualDuration,e=zt.bounce){const t=typeof i!="object"?{visualDuration:i,keyframes:[0,1],bounce:e}:i;let{restSpeed:s,restDelta:r}=t;const n=t.keyframes[0],a=t.keyframes[t.keyframes.length-1],o={done:!1,value:n},{stiffness:l,damping:u,mass:h,duration:c,velocity:d,isResolvedFromDuration:f}=Nfe({...t,velocity:-Qi(t.velocity||0)}),y=d||0,v=u/(2*Math.sqrt(l*h)),m=a-n,g=Qi(Math.sqrt(l/h)),b=Math.abs(m)<5;s||(s=b?zt.restSpeed.granular:zt.restSpeed.default),r||(r=b?zt.restDelta.granular:zt.restDelta.default);let x,P,L,_,k,S;if(v<1)L=gv(g,v),_=(y+v*g*m)/L,x=N=>{const B=Math.exp(-v*g*N);return a-B*(_*Math.sin(L*N)+m*Math.cos(L*N))},k=v*g*_+m*L,S=v*g*m-_*L,P=N=>Math.exp(-v*g*N)*(k*Math.sin(L*N)+S*Math.cos(L*N));else if(v===1){x=B=>a-Math.exp(-g*B)*(m+(y+g*m)*B);const N=y+g*m;P=B=>Math.exp(-g*B)*(g*N*B-y)}else{const N=g*Math.sqrt(v*v-1);x=$=>{const Q=Math.exp(-v*g*$),H=Math.min(N*$,300);return a-Q*((y+v*g*m)*Math.sinh(H)+N*m*Math.cosh(H))/N};const B=(y+v*g*m)/N,U=v*g*B-m*N,D=v*g*m-B*N;P=$=>{const Q=Math.exp(-v*g*$),H=Math.min(N*$,300);return Q*(U*Math.sinh(H)+D*Math.cosh(H))}}const A={calculatedDuration:f&&c||null,velocity:N=>di(P(N)),next:N=>{if(!f&&v<1){const U=Math.exp(-v*g*N),D=Math.sin(L*N),$=Math.cos(L*N),Q=a-U*(_*D+m*$),H=di(U*(k*D+S*$));return o.done=Math.abs(H)<=s&&Math.abs(a-Q)<=r,o.value=o.done?a:Q,o}const B=x(N);if(f)o.done=N>=c;else{const U=di(P(N));o.done=Math.abs(U)<=s&&Math.abs(a-B)<=r}return o.value=o.done?a:B,o},toString:()=>{const N=Math.min(mv(A),Ld),B=t3(U=>A.next(N*U).value,N,30);return N+"ms "+B},toTransition:()=>{}};return A}_d.applyToOptions=i=>{const e=Lfe(i,100,_d);return i.ease=e.ease,i.duration=di(e.duration),i.type="keyframes",i};const Ffe=5;function i3(i,e,t){const s=Math.max(e-Ffe,0);return PS(t-i(s),e-s)}function yv({keyframes:i,velocity:e=0,power:t=.8,timeConstant:s=325,bounceDamping:r=10,bounceStiffness:n=500,modifyTarget:a,min:o,max:l,restDelta:u=.5,restSpeed:h}){const c=i[0],d={done:!1,value:c},f=S=>o!==void 0&&S<o||l!==void 0&&S>l,y=S=>o===void 0?l:l===void 0||Math.abs(o-S)<Math.abs(l-S)?o:l;let v=t*e;const m=c+v,g=a===void 0?m:a(m);g!==m&&(v=g-c);const b=S=>-v*Math.exp(-S/s),x=S=>g+b(S),P=S=>{const A=b(S),N=x(S);d.done=Math.abs(A)<=u,d.value=d.done?g:N};let L,_;const k=S=>{f(d.value)&&(L=S,_=_d({keyframes:[d.value,y(d.value)],velocity:i3(x,S,d.value),damping:r,stiffness:n,restDelta:u,restSpeed:h}))};return k(0),{calculatedDuration:null,next:S=>{let A=!1;return!_&&L===void 0&&(A=!0,P(S),k(S)),L!==void 0&&S>=L?_.next(S-L):(!A&&P(S),d)}}}function qfe(i,e,t){const s=[],r=t||zn.mix||e3,n=i.length-1;for(let a=0;a<n;a++){let o=r(i[a],i[a+1]);if(e){const l=Array.isArray(e)?e[a]||Hi:e;o=Cu(l,o)}s.push(o)}return s}function Bfe(i,e,{clamp:t=!0,ease:s,mixer:r}={}){const n=i.length;if(an(n===e.length,"Both input and output ranges must be the same length","range-length"),n===1)return()=>e[0];if(n===2&&e[0]===e[1])return()=>e[1];const a=i[0]===i[1];i[0]>i[n-1]&&(i=[...i].reverse(),e=[...e].reverse());const o=qfe(e,s,r),l=o.length,u=h=>{if(a&&h<i[0])return e[0];let c=0;if(l>1)for(;c<i.length-2&&!(h<i[c+1]);c++);const d=bu(i[c],i[c+1],h);return o[c](d)};return t?h=>u(Lr(i[0],i[n-1],h)):u}function $fe(i,e){const t=i[i.length-1];for(let s=1;s<=e;s++){const r=bu(0,e,s);i.push(qt(t,1,r))}}function Hfe(i){const e=[0];return $fe(e,i.length-1),e}function Qfe(i,e){return i.map(t=>t*e)}function Ufe(i,e){return i.map(()=>e||NS).splice(0,i.length-1)}function Bo({duration:i=300,keyframes:e,times:t,ease:s="easeInOut"}){const r=Xpe(s)?s.map(BS):BS(s),n={done:!1,value:e[0]},a=Qfe(t&&t.length===e.length?t:Hfe(e),i),o=Bfe(a,e,{ease:Array.isArray(r)?r:Ufe(e,r)});return{calculatedDuration:i,next:l=>(n.value=o(l),n.done=l>=i,n)}}const zfe=i=>i!==null;function Dd(i,{repeat:e,repeatType:t="loop"},s,r=1){const n=i.filter(zfe),o=r<0||e&&t!=="loop"&&e%2===1?0:n.length-1;return!o||s===void 0?n[o]:s}const jfe={decay:yv,inertia:yv,tween:Bo,keyframes:Bo,spring:_d};function r3(i){typeof i.type=="string"&&(i.type=jfe[i.type])}class Cv{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}const Wfe=i=>i/100;class kd extends Cv{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var s,r;const{motionValue:t}=this.options;t&&t.updatedAt!==Ws.now()&&this.tick(Ws.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(r=(s=this.options).onStop)==null||r.call(s))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;r3(e);const{type:t=Bo,repeat:s=0,repeatDelay:r=0,repeatType:n,velocity:a=0}=e;let{keyframes:o}=e;const l=t||Bo;process.env.NODE_ENV!=="production"&&l!==Bo&&an(o.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`,"spring-two-frames"),l!==Bo&&typeof o[0]!="number"&&(this.mixKeyframes=Cu(Wfe,e3(o[0],o[1])),o=[0,100]);const u=l({...e,keyframes:o});n==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...o].reverse(),velocity:-a})),u.calculatedDuration===null&&(u.calculatedDuration=mv(u));const{calculatedDuration:h}=u;this.calculatedDuration=h,this.resolvedDuration=h+r,this.totalDuration=this.resolvedDuration*(s+1)-r,this.generator=u}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:s,totalDuration:r,mixKeyframes:n,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:h,repeat:c,repeatType:d,repeatDelay:f,type:y,onUpdate:v,finalKeyframe:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);const g=this.currentTime-u*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let x=this.currentTime,P=s;if(c){const S=Math.min(this.currentTime,r)/o;let A=Math.floor(S),N=S%1;!N&&S>=1&&(N=1),N===1&&A--,A=Math.min(A,c+1),!!(A%2)&&(d==="reverse"?(N=1-N,f&&(N-=f/o)):d==="mirror"&&(P=a)),x=Lr(0,1,N)*o}let L;b?(this.delayState.value=h[0],L=this.delayState):L=P.next(x),n&&!b&&(L.value=n(L.value));let{done:_}=L;!b&&l!==null&&(_=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&_);return k&&y!==yv&&(L.value=Dd(h,this.options,m,this.speed)),v&&v(L.value),k&&this.finish(),L}then(e,t){return this.finished.then(e,t)}get duration(){return Qi(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Qi(e)}get time(){return Qi(this.currentTime)}set time(e){e=di(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const t=this.generator.next(e).value;return i3(s=>this.generator.next(s).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(Ws.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=Qi(this.currentTime))}play(){var r,n;if(this.isStopped)return;const{driver:e=Afe,startTime:t}=this.options;this.driver||(this.driver=e(a=>this.tick(a))),(n=(r=this.options).onPlay)==null||n.call(r);const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=t??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ws.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,t;this.notifyFinished(),this.teardown(),this.state="finished",(t=(e=this.options).onComplete)==null||t.call(e)}cancel(){var e,t;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(t=(e=this.options).onCancel)==null||t.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var t;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(t=this.driver)==null||t.stop(),e.observe(this)}}function Gfe(i){for(let e=1;e<i.length;e++)i[e]??(i[e]=i[e-1])}const La=i=>i*180/Math.PI,bv=i=>{const e=La(Math.atan2(i[1],i[0]));return wv(e)},Kfe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:i=>(Math.abs(i[0])+Math.abs(i[3]))/2,rotate:bv,rotateZ:bv,skewX:i=>La(Math.atan(i[1])),skewY:i=>La(Math.atan(i[2])),skew:i=>(Math.abs(i[1])+Math.abs(i[2]))/2},wv=i=>(i=i%360,i<0&&(i+=360),i),n3=bv,a3=i=>Math.sqrt(i[0]*i[0]+i[1]*i[1]),o3=i=>Math.sqrt(i[4]*i[4]+i[5]*i[5]),Zfe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:a3,scaleY:o3,scale:i=>(a3(i)+o3(i))/2,rotateX:i=>wv(La(Math.atan2(i[6],i[5]))),rotateY:i=>wv(La(Math.atan2(-i[2],i[0]))),rotateZ:n3,rotate:n3,skewX:i=>La(Math.atan(i[4])),skewY:i=>La(Math.atan(i[1])),skew:i=>(Math.abs(i[1])+Math.abs(i[4]))/2};function xv(i){return i.includes("scale")?1:0}function Ev(i,e){if(!i||i==="none")return xv(e);const t=i.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,r;if(t)s=Zfe,r=t;else{const o=i.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Kfe,r=o}if(!r)return xv(e);const n=s[e],a=r[1].split(",").map(Yfe);return typeof n=="function"?n(a):a[n]}const Jfe=(i,e)=>{const{transform:t="none"}=getComputedStyle(i);return Ev(t,e)};function Yfe(i){return parseFloat(i.trim())}const $o=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ho=new Set($o),l3=i=>i===No||i===be,Xfe=new Set(["x","y","z"]),eme=$o.filter(i=>!Xfe.has(i));function tme(i){const e=[];return eme.forEach(t=>{const s=i.getValue(t);s!==void 0&&(e.push([t,s.get()]),s.set(t.startsWith("scale")?1:0))}),e}const Gn={width:({x:i},{paddingLeft:e="0",paddingRight:t="0",boxSizing:s})=>{const r=i.max-i.min;return s==="border-box"?r:r-parseFloat(e)-parseFloat(t)},height:({y:i},{paddingTop:e="0",paddingBottom:t="0",boxSizing:s})=>{const r=i.max-i.min;return s==="border-box"?r:r-parseFloat(e)-parseFloat(t)},top:(i,{top:e})=>parseFloat(e),left:(i,{left:e})=>parseFloat(e),bottom:({y:i},{top:e})=>parseFloat(e)+(i.max-i.min),right:({x:i},{left:e})=>parseFloat(e)+(i.max-i.min),x:(i,{transform:e})=>Ev(e,"x"),y:(i,{transform:e})=>Ev(e,"y")};Gn.translateX=Gn.x,Gn.translateY=Gn.y;const _a=new Set;let Vv=!1,Sv=!1,Tv=!1;function u3(){if(Sv){const i=Array.from(_a).filter(s=>s.needsMeasurement),e=new Set(i.map(s=>s.element)),t=new Map;e.forEach(s=>{const r=tme(s);r.length&&(t.set(s,r),s.render())}),i.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const r=t.get(s);r&&r.forEach(([n,a])=>{var o;(o=s.getValue(n))==null||o.set(a)})}),i.forEach(s=>s.measureEndState()),i.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Sv=!1,Vv=!1,_a.forEach(i=>i.complete(Tv)),_a.clear()}function h3(){_a.forEach(i=>{i.readKeyframes(),i.needsMeasurement&&(Sv=!0)})}function sme(){Tv=!0,h3(),u3(),Tv=!1}class Pv{constructor(e,t,s,r,n,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=s,this.motionValue=r,this.element=n,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(_a.add(this),Vv||(Vv=!0,Tt.read(h3),Tt.resolveKeyframes(u3))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:s,motionValue:r}=this;if(e[0]===null){const n=r==null?void 0:r.get(),a=e[e.length-1];if(n!==void 0)e[0]=n;else if(s&&t){const o=s.readValue(t,a);o!=null&&(e[0]=o)}e[0]===void 0&&(e[0]=a),r&&n===void 0&&r.set(e[0])}Gfe(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),_a.delete(this)}cancel(){this.state==="scheduled"&&(_a.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const ime=i=>i.startsWith("--");function c3(i,e,t){ime(e)?i.style.setProperty(e,t):i.style[e]=t}const rme={};function d3(i,e){const t=TS(i);return()=>rme[e]??t()}const nme=d3(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),p3=d3(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Su=([i,e,t,s])=>`cubic-bezier(${i}, ${e}, ${t}, ${s})`,f3={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Su([0,.65,.55,1]),circOut:Su([.55,0,1,.45]),backIn:Su([.31,.01,.66,-.59]),backOut:Su([.33,1.53,.69,.99])};function m3(i,e){if(i)return typeof i=="function"?p3()?t3(i,e):"ease-out":FS(i)?Su(i):Array.isArray(i)?i.map(t=>m3(t,e)||f3.easeOut):f3[i]}function ame(i,e,t,{delay:s=0,duration:r=300,repeat:n=0,repeatType:a="loop",ease:o="easeOut",times:l}={},u=void 0){const h={[e]:t};l&&(h.offset=l);const c=m3(o,r);Array.isArray(c)&&(h.easing=c);const d={delay:s,duration:r,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:n+1,direction:a==="reverse"?"alternate":"normal"};return u&&(d.pseudoElement=u),i.animate(h,d)}function g3(i){return typeof i=="function"&&"applyToOptions"in i}function ome({type:i,...e}){return g3(i)&&p3()?i.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class v3 extends Cv{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:t,name:s,keyframes:r,pseudoElement:n,allowFlatten:a=!1,finalKeyframe:o,onComplete:l}=e;this.isPseudoElement=!!n,this.allowFlatten=a,this.options=e,an(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=ome(e);this.animation=ame(t,s,r,u,n),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!n){const h=Dd(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(h),c3(t,s,h),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,t;(t=(e=this.animation).finish)==null||t.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,s,r;const e=(t=this.options)==null?void 0:t.element;!this.isPseudoElement&&(e!=null&&e.isConnected)&&((r=(s=this.animation).commitStyles)==null||r.call(s))}get duration(){var t,s;const e=((s=(t=this.animation.effect)==null?void 0:t.getComputedTiming)==null?void 0:s.call(t).duration)||0;return Qi(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Qi(e)}get time(){return Qi(Number(this.animation.currentTime)||0)}set time(e){const t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=di(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:s,observe:r}){var n;return this.allowFlatten&&((n=this.animation.effect)==null||n.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&nme()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),s&&(this.animation.rangeEnd=s),Hi):r(this)}}const y3={anticipate:kS,backInOut:DS,circInOut:MS};function lme(i){return i in y3}function ume(i){typeof i.ease=="string"&&lme(i.ease)&&(i.ease=y3[i.ease])}const Iv=10;class hme extends v3{constructor(e){ume(e),r3(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:t,onUpdate:s,onComplete:r,element:n,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}const o=new kd({...a,autoplay:!1}),l=Math.max(Iv,Ws.now()-this.startTime),u=Lr(0,Iv,l-Iv),h=o.sample(l).value,{name:c}=this.options;n&&c&&c3(n,c,h),t.setWithVelocity(o.sample(Math.max(0,l-u)).value,h,u),o.stop()}}const C3=(i,e)=>e==="zIndex"?!1:!!(typeof i=="number"||Array.isArray(i)||typeof i=="string"&&(lr.test(i)||i==="0")&&!i.startsWith("url("));function cme(i){const e=i[0];if(i.length===1)return!0;for(let t=0;t<i.length;t++)if(i[t]!==e)return!0}function dme(i,e,t,s){const r=i[0];if(r===null)return!1;if(e==="display"||e==="visibility")return!0;const n=i[i.length-1],a=C3(r,e),o=C3(n,e);return Mo(a===o,`You are trying to animate ${e} from "${r}" to "${n}". "${a?n:r}" is not an animatable value.`,"value-not-animatable"),!a||!o?!1:cme(i)||(t==="spring"||g3(t))&&s}function Rv(i){i.duration=0,i.type="keyframes"}const b3=new Set(["opacity","clipPath","filter","transform"]),pme=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function fme(i){for(let e=0;e<i.length;e++)if(typeof i[e]=="string"&&pme.test(i[e]))return!0;return!1}const mme=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),gme=TS(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function vme(i){var c;const{motionValue:e,name:t,repeatDelay:s,repeatType:r,damping:n,type:a,keyframes:o}=i;if(!(((c=e==null?void 0:e.owner)==null?void 0:c.current)instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:h}=e.owner.getProps();return gme()&&t&&(b3.has(t)||mme.has(t)&&fme(o))&&(t!=="transform"||!h)&&!u&&!s&&r!=="mirror"&&n!==0&&a!=="inertia"}const yme=40;class Cme extends Cv{constructor({autoplay:e=!0,delay:t=0,type:s="keyframes",repeat:r=0,repeatDelay:n=0,repeatType:a="loop",keyframes:o,name:l,motionValue:u,element:h,...c}){var y;super(),this.stop=()=>{var v,m;this._animation&&(this._animation.stop(),(v=this.stopTimeline)==null||v.call(this)),(m=this.keyframeResolver)==null||m.cancel()},this.createdAt=Ws.now();const d={autoplay:e,delay:t,type:s,repeat:r,repeatDelay:n,repeatType:a,name:l,motionValue:u,element:h,...c},f=(h==null?void 0:h.KeyframeResolver)||Pv;this.keyframeResolver=new f(o,(v,m,g)=>this.onKeyframesResolved(v,m,d,!g),l,u,h),(y=this.keyframeResolver)==null||y.scheduleResolve()}onKeyframesResolved(e,t,s,r){var g,b;this.keyframeResolver=void 0;const{name:n,type:a,velocity:o,delay:l,isHandoff:u,onUpdate:h}=s;this.resolvedAt=Ws.now();let c=!0;dme(e,n,a,o)||(c=!1,(zn.instantAnimations||!l)&&(h==null||h(Dd(e,s,t))),e[0]=e[e.length-1],Rv(s),s.repeat=0);const f={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>yme?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:t,...s,keyframes:e},y=c&&!u&&vme(f),v=(b=(g=f.motionValue)==null?void 0:g.owner)==null?void 0:b.current;let m;if(y)try{m=new hme({...f,element:v})}catch{m=new kd(f)}else m=new kd(f);m.finished.then(()=>{this.notifyFinished()}).catch(Hi),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),sme()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}function w3(i,e,t,s=0,r=1){const n=Array.from(i).sort((u,h)=>u.sortNodePosition(h)).indexOf(e),a=i.size,o=(a-1)*s;return typeof t=="function"?t(n,a):r===1?n*s:o-n*s}const bme=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function wme(i){const e=bme.exec(i);if(!e)return[,];const[,t,s,r]=e;return[`--${t??s}`,r]}const xme=4;function x3(i,e,t=1){an(t<=xme,`Max CSS variable fallback depth detected in property "${i}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,r]=wme(i);if(!s)return;const n=window.getComputedStyle(e).getPropertyValue(s);if(n){const a=n.trim();return ES(a)?parseFloat(a):a}return av(r)?x3(r,e,t+1):r}const Eme={type:"spring",stiffness:500,damping:25,restSpeed:10},Vme=i=>({type:"spring",stiffness:550,damping:i===0?2*Math.sqrt(550):30,restSpeed:10}),Sme={type:"keyframes",duration:.8},Tme={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Pme=(i,{keyframes:e})=>e.length>2?Sme:Ho.has(i)?i.startsWith("scale")?Vme(e[1]):Eme:Tme;function E3(i,e){if(i!=null&&i.inherit&&e){const{inherit:t,...s}=i;return{...e,...s}}return i}function Av(i,e){const t=(i==null?void 0:i[e])??(i==null?void 0:i.default)??i;return t!==i?E3(t,i):t}const Ime=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Rme(i){for(const e in i)if(!Ime.has(e))return!0;return!1}const Lv=(i,e,t,s={},r,n)=>a=>{const o=Av(s,i)||{},l=o.delay||s.delay||0;let{elapsed:u=0}=s;u=u-di(l);const h={keyframes:Array.isArray(t)?t:[null,t],ease:"easeOut",velocity:e.getVelocity(),...o,delay:-u,onUpdate:d=>{e.set(d),o.onUpdate&&o.onUpdate(d)},onComplete:()=>{a(),o.onComplete&&o.onComplete()},name:i,motionValue:e,element:n?void 0:r};Rme(o)||Object.assign(h,Pme(i,h)),h.duration&&(h.duration=di(h.duration)),h.repeatDelay&&(h.repeatDelay=di(h.repeatDelay)),h.from!==void 0&&(h.keyframes[0]=h.from);let c=!1;if((h.type===!1||h.duration===0&&!h.repeatDelay)&&(Rv(h),h.delay===0&&(c=!0)),(zn.instantAnimations||zn.skipAnimations||r!=null&&r.shouldSkipAnimations)&&(c=!0,Rv(h),h.delay=0),h.allowFlatten=!o.type&&!o.ease,c&&!n&&e.get()!==void 0){const d=Dd(h.keyframes,o);if(d!==void 0){Tt.update(()=>{h.onUpdate(d),h.onComplete()});return}}return o.isSync?new kd(h):new Cme(h)};function V3(i){const e=[{},{}];return i==null||i.values.forEach((t,s)=>{e[0][s]=t.get(),e[1][s]=t.getVelocity()}),e}function _v(i,e,t,s){if(typeof e=="function"){const[r,n]=V3(s);e=e(t!==void 0?t:i.custom,r,n)}if(typeof e=="string"&&(e=i.variants&&i.variants[e]),typeof e=="function"){const[r,n]=V3(s);e=e(t!==void 0?t:i.custom,r,n)}return e}function Da(i,e,t){const s=i.getProps();return _v(s,e,t!==void 0?t:s.custom,i)}const S3=new Set(["width","height","top","left","right","bottom",...$o]),T3=30,Ame=i=>!isNaN(parseFloat(i));class Lme{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var n;const r=Ws.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((n=this.events.change)==null||n.notify(this.current),this.dependents))for(const a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=Ws.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Ame(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&sv(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new tv);const s=this.events[e].add(t);return e==="change"?()=>{s(),Tt.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,s){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Ws.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>T3)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,T3);return PS(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,t;(e=this.dependents)==null||e.clear(),(t=this.events.destroy)==null||t.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Qo(i,e){return new Lme(i,e)}const Dv=i=>Array.isArray(i);function _me(i,e,t){i.hasValue(e)?i.getValue(e).set(t):i.addValue(e,Qo(t))}function Dme(i){return Dv(i)?i[i.length-1]||0:i}function kme(i,e){const t=Da(i,e);let{transitionEnd:s={},transition:r={},...n}=t||{};n={...n,...s};for(const a in n){const o=Dme(n[a]);_me(i,a,o)}}const ks=i=>!!(i&&i.getVelocity);function Ome(i){return!!(ks(i)&&i.add)}function kv(i,e){const t=i.getValue("willChange");if(Ome(t))return t.add(e);if(!t&&zn.WillChange){const s=new zn.WillChange("auto");i.addValue("willChange",s),s.add(e)}}function Ov(i){return i.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const P3="data-"+Ov("framerAppearId");function I3(i){return i.props[P3]}function Mme({protectedKeys:i,needsAnimating:e},t){const s=i.hasOwnProperty(t)&&e[t]!==!0;return e[t]=!1,s}function R3(i,e,{delay:t=0,transitionOverride:s,type:r}={}){let{transition:n,transitionEnd:a,...o}=e;const l=i.getDefaultTransition();n=n?E3(n,l):l;const u=n==null?void 0:n.reduceMotion;s&&(n=s);const h=[],c=r&&i.animationState&&i.animationState.getState()[r];for(const d in o){const f=i.getValue(d,i.latestValues[d]??null),y=o[d];if(y===void 0||c&&Mme(c,d))continue;const v={delay:t,...Av(n||{},d)},m=f.get();if(m!==void 0&&!f.isAnimating()&&!Array.isArray(y)&&y===m&&!v.velocity){Tt.update(()=>f.set(y));continue}let g=!1;if(window.MotionHandoffAnimation){const P=I3(i);if(P){const L=window.MotionHandoffAnimation(P,d,Tt);L!==null&&(v.startTime=L,g=!0)}}kv(i,d);const b=u??i.shouldReduceMotion;f.start(Lv(d,f,y,b&&S3.has(d)?{type:!1}:v,i,g));const x=f.animation;x&&h.push(x)}if(a){const d=()=>Tt.update(()=>{a&&kme(i,a)});h.length?Promise.all(h).then(d):d()}return h}function Mv(i,e,t={}){var l;const s=Da(i,e,t.type==="exit"?(l=i.presenceContext)==null?void 0:l.custom:void 0);let{transition:r=i.getDefaultTransition()||{}}=s||{};t.transitionOverride&&(r=t.transitionOverride);const n=s?()=>Promise.all(R3(i,s,t)):()=>Promise.resolve(),a=i.variantChildren&&i.variantChildren.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:c,staggerDirection:d}=r;return Nme(i,e,u,h,c,d,t)}:()=>Promise.resolve(),{when:o}=r;if(o){const[u,h]=o==="beforeChildren"?[n,a]:[a,n];return u().then(()=>h())}else return Promise.all([n(),a(t.delay)])}function Nme(i,e,t=0,s=0,r=0,n=1,a){const o=[];for(const l of i.variantChildren)l.notify("AnimationStart",e),o.push(Mv(l,e,{...a,delay:t+(typeof s=="function"?0:s)+w3(i.variantChildren,l,s,r,n)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(o)}function Fme(i,e,t={}){i.notify("AnimationStart",e);let s;if(Array.isArray(e)){const r=e.map(n=>Mv(i,n,t));s=Promise.all(r)}else if(typeof e=="string")s=Mv(i,e,t);else{const r=typeof e=="function"?Da(i,e,t.custom):e;s=Promise.all(R3(i,r,t))}return s.then(()=>{i.notify("AnimationComplete",e)})}const qme={test:i=>i==="auto",parse:i=>i},A3=i=>e=>e.test(i),L3=[No,be,_r,Wn,cfe,hfe,qme],_3=i=>L3.find(A3(i));function Bme(i){return typeof i=="number"?i===0:i!==null?i==="none"||i==="0"||SS(i):!0}const $me=new Set(["brightness","contrast","saturate","opacity"]);function Hme(i){const[e,t]=i.slice(0,-1).split("(");if(e==="drop-shadow")return i;const[s]=t.match(ov)||[];if(!s)return i;const r=t.replace(s,"");let n=$me.has(e)?1:0;return s!==t&&(n*=100),e+"("+n+r+")"}const Qme=/\b([a-z-]*)\(.*?\)/gu,Nv={...lr,getAnimatableNone:i=>{const e=i.match(Qme);return e?e.map(Hme).join(" "):i}},Fv={...lr,getAnimatableNone:i=>{const e=lr.parse(i);return lr.createTransformer(i)(e.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},D3={...No,transform:Math.round},qv={borderWidth:be,borderTopWidth:be,borderRightWidth:be,borderBottomWidth:be,borderLeftWidth:be,borderRadius:be,borderTopLeftRadius:be,borderTopRightRadius:be,borderBottomRightRadius:be,borderBottomLeftRadius:be,width:be,maxWidth:be,height:be,maxHeight:be,top:be,right:be,bottom:be,left:be,inset:be,insetBlock:be,insetBlockStart:be,insetBlockEnd:be,insetInline:be,insetInlineStart:be,insetInlineEnd:be,padding:be,paddingTop:be,paddingRight:be,paddingBottom:be,paddingLeft:be,paddingBlock:be,paddingBlockStart:be,paddingBlockEnd:be,paddingInline:be,paddingInlineStart:be,paddingInlineEnd:be,margin:be,marginTop:be,marginRight:be,marginBottom:be,marginLeft:be,marginBlock:be,marginBlockStart:be,marginBlockEnd:be,marginInline:be,marginInlineStart:be,marginInlineEnd:be,fontSize:be,backgroundPositionX:be,backgroundPositionY:be,...{rotate:Wn,rotateX:Wn,rotateY:Wn,rotateZ:Wn,scale:Rd,scaleX:Rd,scaleY:Rd,scaleZ:Rd,skew:Wn,skewX:Wn,skewY:Wn,distance:be,translateX:be,translateY:be,translateZ:be,x:be,y:be,z:be,perspective:be,transformPerspective:be,opacity:xu,originX:jS,originY:jS,originZ:be},zIndex:D3,fillOpacity:xu,strokeOpacity:xu,numOctaves:D3},Ume={...qv,color:ps,backgroundColor:ps,outlineColor:ps,fill:ps,stroke:ps,borderColor:ps,borderTopColor:ps,borderRightColor:ps,borderBottomColor:ps,borderLeftColor:ps,filter:Nv,WebkitFilter:Nv,mask:Fv,WebkitMask:Fv},k3=i=>Ume[i],zme=new Set([Nv,Fv]);function O3(i,e){let t=k3(i);return zme.has(t)||(t=lr),t.getAnimatableNone?t.getAnimatableNone(e):void 0}const jme=new Set(["auto","none","0"]);function Wme(i,e,t){let s=0,r;for(;s<i.length&&!r;){const n=i[s];typeof n=="string"&&!jme.has(n)&&qo(n).values.length&&(r=i[s]),s++}if(r&&t)for(const n of e)i[n]=O3(t,r)}class Gme extends Pv{constructor(e,t,s,r,n){super(e,t,s,r,n,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:s}=this;if(!t||!t.current)return;super.readKeyframes();for(let h=0;h<e.length;h++){let c=e[h];if(typeof c=="string"&&(c=c.trim(),av(c))){const d=x3(c,t.current);d!==void 0&&(e[h]=d),h===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!S3.has(s)||e.length!==2)return;const[r,n]=e,a=_3(r),o=_3(n),l=US(r),u=US(n);if(l!==u&&Gn[s]){this.needsMeasurement=!0;return}if(a!==o)if(l3(a)&&l3(o))for(let h=0;h<e.length;h++){const c=e[h];typeof c=="string"&&(e[h]=parseFloat(c))}else Gn[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,s=[];for(let r=0;r<e.length;r++)(e[r]===null||Bme(e[r]))&&s.push(r);s.length&&Wme(e,s,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Gn[s](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];r!==void 0&&e.getValue(s,r).jump(r,!1)}measureEndState(){var o;const{element:e,name:t,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);const n=s.length-1,a=s[n];s[n]=Gn[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),(o=this.removedTransforms)!=null&&o.length&&this.removedTransforms.forEach(([l,u])=>{e.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function M3(i,e,t){if(i==null)return[];if(i instanceof EventTarget)return[i];if(typeof i=="string"){let s=document;const r=(t==null?void 0:t[i])??s.querySelectorAll(i);return r?Array.from(r):[]}return Array.from(i).filter(s=>s!=null)}const N3=(i,e)=>e&&typeof i=="number"?e.transform(i):i;function Od(i){return VS(i)&&"offsetHeight"in i&&!("ownerSVGElement"in i)}const{schedule:Bv}=$S(queueMicrotask,!1),ur={x:!1,y:!1};function F3(){return ur.x||ur.y}function Kme(i){return i==="x"||i==="y"?ur[i]?null:(ur[i]=!0,()=>{ur[i]=!1}):ur.x||ur.y?null:(ur.x=ur.y=!0,()=>{ur.x=ur.y=!1})}function q3(i,e){const t=M3(i),s=new AbortController,r={passive:!0,...e,signal:s.signal};return[t,r,()=>s.abort()]}function Zme(i){return!(i.pointerType==="touch"||F3())}function Jme(i,e,t={}){const[s,r,n]=q3(i,t);return s.forEach(a=>{let o=!1,l=!1,u;const h=()=>{a.removeEventListener("pointerleave",y)},c=m=>{u&&(u(m),u=void 0),h()},d=m=>{o=!1,window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",d),l&&(l=!1,c(m))},f=()=>{o=!0,window.addEventListener("pointerup",d,r),window.addEventListener("pointercancel",d,r)},y=m=>{if(m.pointerType!=="touch"){if(o){l=!0;return}c(m)}},v=m=>{if(!Zme(m))return;l=!1;const g=e(a,m);typeof g=="function"&&(u=g,a.addEventListener("pointerleave",y,r))};a.addEventListener("pointerenter",v,r),a.addEventListener("pointerdown",f,r)}),n}const B3=(i,e)=>e?i===e?!0:B3(i,e.parentElement):!1,$v=i=>i.pointerType==="mouse"?typeof i.button!="number"||i.button<=0:i.isPrimary!==!1,Yme=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Xme(i){return Yme.has(i.tagName)||i.isContentEditable===!0}const ege=new Set(["INPUT","SELECT","TEXTAREA"]);function tge(i){return ege.has(i.tagName)||i.isContentEditable===!0}const Md=new WeakSet;function $3(i){return e=>{e.key==="Enter"&&i(e)}}function Hv(i,e){i.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const sge=(i,e)=>{const t=i.currentTarget;if(!t)return;const s=$3(()=>{if(Md.has(t))return;Hv(t,"down");const r=$3(()=>{Hv(t,"up")}),n=()=>Hv(t,"cancel");t.addEventListener("keyup",r,e),t.addEventListener("blur",n,e)});t.addEventListener("keydown",s,e),t.addEventListener("blur",()=>t.removeEventListener("keydown",s),e)};function H3(i){return $v(i)&&!F3()}const Q3=new WeakSet;function ige(i,e,t={}){const[s,r,n]=q3(i,t),a=o=>{const l=o.currentTarget;if(!H3(o)||Q3.has(o))return;Md.add(l),t.stopPropagation&&Q3.add(o);const u=e(l,o),h=(f,y)=>{window.removeEventListener("pointerup",c),window.removeEventListener("pointercancel",d),Md.has(l)&&Md.delete(l),H3(f)&&typeof u=="function"&&u(f,{success:y})},c=f=>{h(f,l===window||l===document||t.useGlobalTarget||B3(l,f.target))},d=f=>{h(f,!1)};window.addEventListener("pointerup",c,r),window.addEventListener("pointercancel",d,r)};return s.forEach(o=>{(t.useGlobalTarget?window:o).addEventListener("pointerdown",a,r),Od(o)&&(o.addEventListener("focus",u=>sge(u,r)),!Xme(o)&&!o.hasAttribute("tabindex")&&(o.tabIndex=0))}),n}function Qv(i){return VS(i)&&"ownerSVGElement"in i}const Nd=new WeakMap;let Kn;const U3=(i,e,t)=>(s,r)=>r&&r[0]?r[0][i+"Size"]:Qv(s)&&"getBBox"in s?s.getBBox()[e]:s[t],rge=U3("inline","width","offsetWidth"),nge=U3("block","height","offsetHeight");function age({target:i,borderBoxSize:e}){var t;(t=Nd.get(i))==null||t.forEach(s=>{s(i,{get width(){return rge(i,e)},get height(){return nge(i,e)}})})}function oge(i){i.forEach(age)}function lge(){typeof ResizeObserver>"u"||(Kn=new ResizeObserver(oge))}function uge(i,e){Kn||lge();const t=M3(i);return t.forEach(s=>{let r=Nd.get(s);r||(r=new Set,Nd.set(s,r)),r.add(e),Kn==null||Kn.observe(s)}),()=>{t.forEach(s=>{const r=Nd.get(s);r==null||r.delete(e),r!=null&&r.size||Kn==null||Kn.unobserve(s)})}}const Fd=new Set;let Uo;function hge(){Uo=()=>{const i={get width(){return window.innerWidth},get height(){return window.innerHeight}};Fd.forEach(e=>e(i))},window.addEventListener("resize",Uo)}function cge(i){return Fd.add(i),Uo||hge(),()=>{Fd.delete(i),!Fd.size&&typeof Uo=="function"&&(window.removeEventListener("resize",Uo),Uo=void 0)}}function z3(i,e){return typeof i=="function"?cge(i):uge(i,e)}function dge(i){return Qv(i)&&i.tagName==="svg"}const pge=[...L3,ps,lr],fge=i=>pge.find(A3(i)),j3=()=>({translate:0,scale:1,origin:0,originPoint:0}),zo=()=>({x:j3(),y:j3()}),W3=()=>({min:0,max:0}),ys=()=>({x:W3(),y:W3()}),mge=new WeakMap;function qd(i){return i!==null&&typeof i=="object"&&typeof i.start=="function"}function Tu(i){return typeof i=="string"||Array.isArray(i)}const Uv=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],zv=["initial",...Uv];function Bd(i){return qd(i.animate)||zv.some(e=>Tu(i[e]))}function G3(i){return!!(Bd(i)||i.variants)}function gge(i,e,t){for(const s in e){const r=e[s],n=t[s];if(ks(r))i.addValue(s,r);else if(ks(n))i.addValue(s,Qo(r,{owner:i}));else if(n!==r)if(i.hasValue(s)){const a=i.getValue(s);a.liveStyle===!0?a.jump(r):a.hasAnimated||a.set(r)}else{const a=i.getStaticValue(s);i.addValue(s,Qo(a!==void 0?a:r,{owner:i}))}}for(const s in t)e[s]===void 0&&i.removeValue(s);return e}const jv={current:null},K3={current:!1},vge=typeof window<"u";function yge(){if(K3.current=!0,!!vge)if(window.matchMedia){const i=window.matchMedia("(prefers-reduced-motion)"),e=()=>jv.current=i.matches;i.addEventListener("change",e),e()}else jv.current=!1}const Z3=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let $d={};function J3(i){$d=i}function Cge(){return $d}class bge{scrapeMotionValuesFromProps(e,t,s){return{}}constructor({parent:e,props:t,presenceContext:s,reducedMotionConfig:r,skipAnimations:n,blockInitialAnimation:a,visualState:o},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Pv,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=Ws.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Tt.render(this.render,!1,!0))};const{latestValues:u,renderState:h}=o;this.latestValues=u,this.baseTarget={...u},this.initialValues=t.initial?{...u}:{},this.renderState=h,this.parent=e,this.props=t,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=n,this.options=l,this.blockInitialAnimation=!!a,this.isControllingVariants=Bd(t),this.isVariantNode=G3(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const f in d){const y=d[f];u[f]!==void 0&&ks(y)&&y.set(u[f])}}mount(e){var t,s;if(this.hasBeenMounted)for(const r in this.initialValues)(t=this.values.get(r))==null||t.jump(this.initialValues[r]),this.latestValues[r]=this.initialValues[r];this.current=e,mge.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,n)=>this.bindToMotionValue(n,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(K3.current||yge(),this.shouldReduceMotion=jv.current),process.env.NODE_ENV!=="production"&&sv(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(s=this.parent)==null||s.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var e;this.projection&&this.projection.unmount(),jn(this.notifyUpdate),jn(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const s=this.features[t];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&b3.has(e)&&this.current instanceof HTMLElement){const{factory:a,keyframes:o,times:l,ease:u,duration:h}=t.accelerate,c=new v3({element:this.current,name:e,keyframes:o,times:l,ease:u,duration:di(h)}),d=a(c);this.valueSubscriptions.set(e,()=>{d(),c.cancel()});return}const s=Ho.has(e);s&&this.onBindTransform&&this.onBindTransform();const r=t.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&Tt.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let n;typeof window<"u"&&window.MotionCheckAppearSync&&(n=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),n&&n(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in $d){const t=$d[e];if(!t)continue;const{isEnabled:s,Feature:r}=t;if(!this.features[e]&&r&&s(this.props)&&(this.features[e]=new r(this)),this.features[e]){const n=this.features[e];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ys()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let s=0;s<Z3.length;s++){const r=Z3[s];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const n="on"+r,a=e[n];a&&(this.propEventSubscriptions[r]=this.on(r,a))}this.prevMotionValues=gge(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const s=this.values.get(e);t!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&t!==void 0&&(s=Qo(t===null?void 0:t,{owner:this}),this.addValue(e,s)),s}readValue(e,t){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(ES(s)||SS(s))?s=parseFloat(s):!fge(s)&&lr.test(t)&&(s=O3(e,t)),this.setBaseTarget(e,ks(s)?s.get():s)),ks(s)?s.get():s}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var n;const{initial:t}=this.props;let s;if(typeof t=="string"||typeof t=="object"){const a=_v(this.props,t,(n=this.presenceContext)==null?void 0:n.custom);a&&(s=a[e])}if(t&&s!==void 0)return s;const r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!ks(r)?r:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new tv),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Bv.render(this.render)}}class Y3 extends bge{constructor(){super(...arguments),this.KeyframeResolver=Gme}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){const s=e.style;return s?s[t]:void 0}removeValueFromRenderState(e,{vars:t,style:s}){delete t[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;ks(e)&&(this.childSubscription=e.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}class Zn{constructor(e){this.isMounted=!1,this.node=e}update(){}}function X3({top:i,left:e,right:t,bottom:s}){return{x:{min:e,max:t},y:{min:i,max:s}}}function wge({x:i,y:e}){return{top:e.min,right:i.max,bottom:e.max,left:i.min}}function xge(i,e){if(!e)return i;const t=e({x:i.left,y:i.top}),s=e({x:i.right,y:i.bottom});return{top:t.y,left:t.x,bottom:s.y,right:s.x}}function Wv(i){return i===void 0||i===1}function Gv({scale:i,scaleX:e,scaleY:t}){return!Wv(i)||!Wv(e)||!Wv(t)}function ka(i){return Gv(i)||e7(i)||i.z||i.rotate||i.rotateX||i.rotateY||i.skewX||i.skewY}function e7(i){return t7(i.x)||t7(i.y)}function t7(i){return i&&i!=="0%"}function Hd(i,e,t){const s=i-t,r=e*s;return t+r}function s7(i,e,t,s,r){return r!==void 0&&(i=Hd(i,r,s)),Hd(i,t,s)+e}function Kv(i,e=0,t=1,s,r){i.min=s7(i.min,e,t,s,r),i.max=s7(i.max,e,t,s,r)}function i7(i,{x:e,y:t}){Kv(i.x,e.translate,e.scale,e.originPoint),Kv(i.y,t.translate,t.scale,t.originPoint)}const r7=.999999999999,n7=1.0000000000001;function Ege(i,e,t,s=!1){var o;const r=t.length;if(!r)return;e.x=e.y=1;let n,a;for(let l=0;l<r;l++){n=t[l],a=n.projectionDelta;const{visualElement:u}=n.options;u&&u.props.style&&u.props.style.display==="contents"||(s&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(Dr(i.x,-n.scroll.offset.x),Dr(i.y,-n.scroll.offset.y)),a&&(e.x*=a.x.scale,e.y*=a.y.scale,i7(i,a)),s&&ka(n.latestValues)&&Qd(i,n.latestValues,(o=n.layout)==null?void 0:o.layoutBox))}e.x<n7&&e.x>r7&&(e.x=1),e.y<n7&&e.y>r7&&(e.y=1)}function Dr(i,e){i.min+=e,i.max+=e}function a7(i,e,t,s,r=.5){const n=qt(i.min,i.max,r);Kv(i,e,t,n,s)}function o7(i,e){return typeof i=="string"?parseFloat(i)/100*(e.max-e.min):i}function Qd(i,e,t){const s=t??i;a7(i.x,o7(e.x,s.x),e.scaleX,e.scale,e.originX),a7(i.y,o7(e.y,s.y),e.scaleY,e.scale,e.originY)}function l7(i,e){return X3(xge(i.getBoundingClientRect(),e))}function Vge(i,e,t){const s=l7(i,t),{scroll:r}=e;return r&&(Dr(s.x,r.offset.x),Dr(s.y,r.offset.y)),s}const Sge={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Tge=$o.length;function Pge(i,e,t){let s="",r=!0;for(let n=0;n<Tge;n++){const a=$o[n],o=i[a];if(o===void 0)continue;let l=!0;if(typeof o=="number")l=o===(a.startsWith("scale")?1:0);else{const u=parseFloat(o);l=a.startsWith("scale")?u===1:u===0}if(!l||t){const u=N3(o,qv[a]);if(!l){r=!1;const h=Sge[a]||a;s+=`${h}(${u}) `}t&&(e[a]=u)}}return s=s.trim(),t?s=t(e,r?"":s):r&&(s="none"),s}function Zv(i,e,t){const{style:s,vars:r,transformOrigin:n}=i;let a=!1,o=!1;for(const l in e){const u=e[l];if(Ho.has(l)){a=!0;continue}else if(QS(l)){r[l]=u;continue}else{const h=N3(u,qv[l]);l.startsWith("origin")?(o=!0,n[l]=h):s[l]=h}}if(e.transform||(a||t?s.transform=Pge(e,i.transform,t):s.transform&&(s.transform="none")),o){const{originX:l="50%",originY:u="50%",originZ:h=0}=n;s.transformOrigin=`${l} ${u} ${h}`}}function u7(i,{style:e,vars:t},s,r){const n=i.style;let a;for(a in e)n[a]=e[a];r==null||r.applyProjectionStyles(n,s);for(a in t)n.setProperty(a,t[a])}function h7(i,e){return e.max===e.min?0:i/(e.max-e.min)*100}const Pu={correct:(i,e)=>{if(!e.target)return i;if(typeof i=="string")if(be.test(i))i=parseFloat(i);else return i;const t=h7(i,e.target.x),s=h7(i,e.target.y);return`${t}% ${s}%`}},Ige={correct:(i,{treeScale:e,projectionDelta:t})=>{const s=i,r=lr.parse(i);if(r.length>5)return s;const n=lr.createTransformer(i),a=typeof r[0]!="number"?1:0,o=t.x.scale*e.x,l=t.y.scale*e.y;r[0+a]/=o,r[1+a]/=l;const u=qt(o,l,.5);return typeof r[2+a]=="number"&&(r[2+a]/=u),typeof r[3+a]=="number"&&(r[3+a]/=u),n(r)}},Jv={borderRadius:{...Pu,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Pu,borderTopRightRadius:Pu,borderBottomLeftRadius:Pu,borderBottomRightRadius:Pu,boxShadow:Ige};function c7(i,{layout:e,layoutId:t}){return Ho.has(i)||i.startsWith("origin")||(e||t!==void 0)&&(!!Jv[i]||i==="opacity")}function Yv(i,e,t){var a;const s=i.style,r=e==null?void 0:e.style,n={};if(!s)return n;for(const o in s)(ks(s[o])||r&&ks(r[o])||c7(o,i)||((a=t==null?void 0:t.getValue(o))==null?void 0:a.liveStyle)!==void 0)&&(n[o]=s[o]);return n}function Rge(i){return window.getComputedStyle(i)}class Age extends Y3{constructor(){super(...arguments),this.type="html",this.renderInstance=u7}readValueFromInstance(e,t){var s;if(Ho.has(t))return(s=this.projection)!=null&&s.isProjecting?xv(t):Jfe(e,t);{const r=Rge(e),n=(QS(t)?r.getPropertyValue(t):r[t])||0;return typeof n=="string"?n.trim():n}}measureInstanceViewportBox(e,{transformPagePoint:t}){return l7(e,t)}build(e,t,s){Zv(e,t,s.transformTemplate)}scrapeMotionValuesFromProps(e,t,s){return Yv(e,t,s)}}const Lge={offset:"stroke-dashoffset",array:"stroke-dasharray"},_ge={offset:"strokeDashoffset",array:"strokeDasharray"};function Dge(i,e,t=1,s=0,r=!0){i.pathLength=1;const n=r?Lge:_ge;i[n.offset]=`${-s}`,i[n.array]=`${e} ${t}`}const kge=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function d7(i,{attrX:e,attrY:t,attrScale:s,pathLength:r,pathSpacing:n=1,pathOffset:a=0,...o},l,u,h){if(Zv(i,o,u),l){i.style.viewBox&&(i.attrs.viewBox=i.style.viewBox);return}i.attrs=i.style,i.style={};const{attrs:c,style:d}=i;c.transform&&(d.transform=c.transform,delete c.transform),(d.transform||c.transformOrigin)&&(d.transformOrigin=c.transformOrigin??"50% 50%",delete c.transformOrigin),d.transform&&(d.transformBox=(h==null?void 0:h.transformBox)??"fill-box",delete c.transformBox);for(const f of kge)c[f]!==void 0&&(d[f]=c[f],delete c[f]);e!==void 0&&(c.x=e),t!==void 0&&(c.y=t),s!==void 0&&(c.scale=s),r!==void 0&&Dge(c,r,n,a,!1)}const p7=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),f7=i=>typeof i=="string"&&i.toLowerCase()==="svg";function Oge(i,e,t,s){u7(i,e,void 0,s);for(const r in e.attrs)i.setAttribute(p7.has(r)?r:Ov(r),e.attrs[r])}function m7(i,e,t){const s=Yv(i,e,t);for(const r in i)if(ks(i[r])||ks(e[r])){const n=$o.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;s[n]=i[r]}return s}class Mge extends Y3{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ys}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Ho.has(t)){const s=k3(t);return s&&s.default||0}return t=p7.has(t)?t:Ov(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,s){return m7(e,t,s)}build(e,t,s){d7(e,t,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,t,s,r){Oge(e,t,s,r)}mount(e){this.isSVGTag=f7(e.tagName),super.mount(e)}}const Nge=zv.length;function g7(i){if(!i)return;if(!i.isControllingVariants){const t=i.parent?g7(i.parent)||{}:{};return i.props.initial!==void 0&&(t.initial=i.props.initial),t}const e={};for(let t=0;t<Nge;t++){const s=zv[t],r=i.props[s];(Tu(r)||r===!1)&&(e[s]=r)}return e}function v7(i,e){if(!Array.isArray(e))return!1;const t=e.length;if(t!==i.length)return!1;for(let s=0;s<t;s++)if(e[s]!==i[s])return!1;return!0}const Fge=[...Uv].reverse(),qge=Uv.length;function Bge(i){return e=>Promise.all(e.map(({animation:t,options:s})=>Fme(i,t,s)))}function $ge(i){let e=Bge(i),t=y7(),s=!0,r=!1;const n=u=>(h,c)=>{var f;const d=Da(i,c,u==="exit"?(f=i.presenceContext)==null?void 0:f.custom:void 0);if(d){const{transition:y,transitionEnd:v,...m}=d;h={...h,...m,...v}}return h};function a(u){e=u(i)}function o(u){const{props:h}=i,c=g7(i.parent)||{},d=[],f=new Set;let y={},v=1/0;for(let g=0;g<qge;g++){const b=Fge[g],x=t[b],P=h[b]!==void 0?h[b]:c[b],L=Tu(P),_=b===u?x.isActive:null;_===!1&&(v=g);let k=P===c[b]&&P!==h[b]&&L;if(k&&(s||r)&&i.manuallyAnimateOnMount&&(k=!1),x.protectedKeys={...y},!x.isActive&&_===null||!P&&!x.prevProp||qd(P)||typeof P=="boolean")continue;if(b==="exit"&&x.isActive&&_!==!0){x.prevResolvedValues&&(y={...y,...x.prevResolvedValues});continue}const S=Hge(x.prevProp,P);let A=S||b===u&&x.isActive&&!k&&L||g>v&&L,N=!1;const B=Array.isArray(P)?P:[P];let U=B.reduce(n(b),{});_===!1&&(U={});const{prevResolvedValues:D={}}=x,$={...D,...U},Q=K=>{A=!0,f.has(K)&&(N=!0,f.delete(K)),x.needsAnimating[K]=!0;const oe=i.getValue(K);oe&&(oe.liveStyle=!1)};for(const K in $){const oe=U[K],ee=D[K];if(y.hasOwnProperty(K))continue;let ue=!1;Dv(oe)&&Dv(ee)?ue=!v7(oe,ee):ue=oe!==ee,ue?oe!=null?Q(K):f.add(K):oe!==void 0&&f.has(K)?Q(K):x.protectedKeys[K]=!0}x.prevProp=P,x.prevResolvedValues=U,x.isActive&&(y={...y,...U}),(s||r)&&i.blockInitialAnimation&&(A=!1);const H=k&&S;A&&(!H||N)&&d.push(...B.map(K=>{const oe={type:b};if(typeof K=="string"&&(s||r)&&!H&&i.manuallyAnimateOnMount&&i.parent){const{parent:ee}=i,ue=Da(ee,K);if(ee.enteringChildren&&ue){const{delayChildren:ae}=ue.transition||{};oe.delay=w3(ee.enteringChildren,i,ae)}}return{animation:K,options:oe}}))}if(f.size){const g={};if(typeof h.initial!="boolean"){const b=Da(i,Array.isArray(h.initial)?h.initial[0]:h.initial);b&&b.transition&&(g.transition=b.transition)}f.forEach(b=>{const x=i.getBaseTarget(b),P=i.getValue(b);P&&(P.liveStyle=!0),g[b]=x??null}),d.push({animation:g})}let m=!!d.length;return s&&(h.initial===!1||h.initial===h.animate)&&!i.manuallyAnimateOnMount&&(m=!1),s=!1,r=!1,m?e(d):Promise.resolve()}function l(u,h){var d;if(t[u].isActive===h)return Promise.resolve();(d=i.variantChildren)==null||d.forEach(f=>{var y;return(y=f.animationState)==null?void 0:y.setActive(u,h)}),t[u].isActive=h;const c=o(u);for(const f in t)t[f].protectedKeys={};return c}return{animateChanges:o,setActive:l,setAnimateFunction:a,getState:()=>t,reset:()=>{t=y7(),r=!0}}}function Hge(i,e){return typeof e=="string"?e!==i:Array.isArray(e)?!v7(e,i):!1}function Oa(i=!1){return{isActive:i,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function y7(){return{animate:Oa(!0),whileInView:Oa(),whileHover:Oa(),whileTap:Oa(),whileDrag:Oa(),whileFocus:Oa(),exit:Oa()}}function Xv(i,e){i.min=e.min,i.max=e.max}function hr(i,e){Xv(i.x,e.x),Xv(i.y,e.y)}function C7(i,e){i.translate=e.translate,i.scale=e.scale,i.originPoint=e.originPoint,i.origin=e.origin}const b7=1e-4,Qge=1-b7,Uge=1+b7,w7=.01,zge=0-w7,jge=0+w7;function Gs(i){return i.max-i.min}function Wge(i,e,t){return Math.abs(i-e)<=t}function x7(i,e,t,s=.5){i.origin=s,i.originPoint=qt(e.min,e.max,i.origin),i.scale=Gs(t)/Gs(e),i.translate=qt(t.min,t.max,i.origin)-i.originPoint,(i.scale>=Qge&&i.scale<=Uge||isNaN(i.scale))&&(i.scale=1),(i.translate>=zge&&i.translate<=jge||isNaN(i.translate))&&(i.translate=0)}function Iu(i,e,t,s){x7(i.x,e.x,t.x,s?s.originX:void 0),x7(i.y,e.y,t.y,s?s.originY:void 0)}function E7(i,e,t,s=0){const r=s?qt(t.min,t.max,s):t.min;i.min=r+e.min,i.max=i.min+Gs(e)}function Gge(i,e,t,s){E7(i.x,e.x,t.x,s==null?void 0:s.x),E7(i.y,e.y,t.y,s==null?void 0:s.y)}function V7(i,e,t,s=0){const r=s?qt(t.min,t.max,s):t.min;i.min=e.min-r,i.max=i.min+Gs(e)}function Ud(i,e,t,s){V7(i.x,e.x,t.x,s==null?void 0:s.x),V7(i.y,e.y,t.y,s==null?void 0:s.y)}function S7(i,e,t,s,r){return i-=e,i=Hd(i,1/t,s),r!==void 0&&(i=Hd(i,1/r,s)),i}function Kge(i,e=0,t=1,s=.5,r,n=i,a=i){if(_r.test(e)&&(e=parseFloat(e),e=qt(a.min,a.max,e/100)-a.min),typeof e!="number")return;let o=qt(n.min,n.max,s);i===n&&(o-=e),i.min=S7(i.min,e,t,o,r),i.max=S7(i.max,e,t,o,r)}function T7(i,e,[t,s,r],n,a){Kge(i,e[t],e[s],e[r],e.scale,n,a)}const Zge=["x","scaleX","originX"],Jge=["y","scaleY","originY"];function P7(i,e,t,s){T7(i.x,e,Zge,t?t.x:void 0,s?s.x:void 0),T7(i.y,e,Jge,t?t.y:void 0,s?s.y:void 0)}function I7(i){return i.translate===0&&i.scale===1}function R7(i){return I7(i.x)&&I7(i.y)}function A7(i,e){return i.min===e.min&&i.max===e.max}function Yge(i,e){return A7(i.x,e.x)&&A7(i.y,e.y)}function L7(i,e){return Math.round(i.min)===Math.round(e.min)&&Math.round(i.max)===Math.round(e.max)}function _7(i,e){return L7(i.x,e.x)&&L7(i.y,e.y)}function D7(i){return Gs(i.x)/Gs(i.y)}function k7(i,e){return i.translate===e.translate&&i.scale===e.scale&&i.originPoint===e.originPoint}function kr(i){return[i("x"),i("y")]}function Xge(i,e,t){let s="";const r=i.x.translate/e.x,n=i.y.translate/e.y,a=(t==null?void 0:t.z)||0;if((r||n||a)&&(s=`translate3d(${r}px, ${n}px, ${a}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),t){const{transformPerspective:u,rotate:h,rotateX:c,rotateY:d,skewX:f,skewY:y}=t;u&&(s=`perspective(${u}px) ${s}`),h&&(s+=`rotate(${h}deg) `),c&&(s+=`rotateX(${c}deg) `),d&&(s+=`rotateY(${d}deg) `),f&&(s+=`skewX(${f}deg) `),y&&(s+=`skewY(${y}deg) `)}const o=i.x.scale*e.x,l=i.y.scale*e.y;return(o!==1||l!==1)&&(s+=`scale(${o}, ${l})`),s||"none"}const O7=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],eve=O7.length,M7=i=>typeof i=="string"?parseFloat(i):i,N7=i=>typeof i=="number"||be.test(i);function tve(i,e,t,s,r,n){r?(i.opacity=qt(0,t.opacity??1,sve(s)),i.opacityExit=qt(e.opacity??1,0,ive(s))):n&&(i.opacity=qt(e.opacity??1,t.opacity??1,s));for(let a=0;a<eve;a++){const o=O7[a];let l=F7(e,o),u=F7(t,o);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||N7(l)===N7(u)?(i[o]=Math.max(qt(M7(l),M7(u),s),0),(_r.test(u)||_r.test(l))&&(i[o]+="%")):i[o]=u}(e.rotate||t.rotate)&&(i.rotate=qt(e.rotate||0,t.rotate||0,s))}function F7(i,e){return i[e]!==void 0?i[e]:i.borderRadius}const sve=q7(0,.5,OS),ive=q7(.5,.95,Hi);function q7(i,e,t){return s=>s<i?0:s>e?1:t(bu(i,e,s))}function rve(i,e,t){const s=ks(i)?i:Qo(i);return s.start(Lv("",s,e,t)),s.animation}function Ru(i,e,t,s={passive:!0}){return i.addEventListener(e,t,s),()=>i.removeEventListener(e,t)}const nve=(i,e)=>i.depth-e.depth;class ave{constructor(){this.children=[],this.isDirty=!1}add(e){Xg(this.children,e),this.isDirty=!0}remove(e){Td(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(nve),this.isDirty=!1,this.children.forEach(e)}}function ove(i,e){const t=Ws.now(),s=({timestamp:r})=>{const n=r-t;n>=e&&(jn(s),i(n-e))};return Tt.setup(s,!0),()=>jn(s)}function zd(i){return ks(i)?i.get():i}class lve{constructor(){this.members=[]}add(e){Xg(this.members,e);for(let t=this.members.length-1;t>=0;t--){const s=this.members[t];if(s===e||s===this.lead||s===this.prevLead)continue;const r=s.instance;(!r||r.isConnected===!1)&&!s.snapshot&&(Td(this.members,s),s.unmount())}e.scheduleRender()}remove(e){if(Td(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(e){var t;for(let s=this.members.indexOf(e)-1;s>=0;s--){const r=this.members[s];if(r.isPresent!==!1&&((t=r.instance)==null?void 0:t.isConnected)!==!1)return this.promote(r),!0}return!1}promote(e,t){var r;const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.updateSnapshot(),e.scheduleRender();const{layoutDependency:n}=s.options,{layoutDependency:a}=e.options;(n===void 0||n!==a)&&(e.resumeFrom=s,t&&(s.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),(r=e.root)!=null&&r.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var t,s,r,n,a;(s=(t=e.options).onExitComplete)==null||s.call(t),(a=(r=e.resumingFrom)==null?void 0:(n=r.options).onExitComplete)==null||a.call(n)})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){var e;(e=this.lead)!=null&&e.snapshot&&(this.lead.snapshot=void 0)}}const jd={hasAnimatedSinceResize:!0,hasEverUpdated:!1},e0=["","X","Y","Z"],uve=1e3;let hve=0;function t0(i,e,t,s){const{latestValues:r}=e;r[i]&&(t[i]=r[i],e.setStaticValue(i,0),s&&(s[i]=0))}function B7(i){if(i.hasCheckedOptimisedAppear=!0,i.root===i)return;const{visualElement:e}=i.options;if(!e)return;const t=I3(e);if(window.MotionHasOptimisedAnimation(t,"transform")){const{layout:r,layoutId:n}=i.options;window.MotionCancelOptimisedAnimation(t,"transform",Tt,!(r||n))}const{parent:s}=i;s&&!s.hasCheckedOptimisedAppear&&B7(s)}function $7({attachResizeListener:i,defaultParent:e,measureScroll:t,checkIsScrollRoot:s,resetTransform:r}){return class{constructor(a={},o=e==null?void 0:e()){this.id=hve++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(pve),this.nodes.forEach(Cve),this.nodes.forEach(bve),this.nodes.forEach(fve)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new ave)}addEventListener(a,o){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new tv),this.eventHandlers.get(a).add(o)}notifyListeners(a,...o){const l=this.eventHandlers.get(a);l&&l.notify(...o)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=Qv(a)&&!dge(a),this.instance=a;const{layoutId:o,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||o)&&(this.isLayoutDirty=!0),i){let h,c=0;const d=()=>this.root.updateBlockedByResize=!1;Tt.read(()=>{c=window.innerWidth}),i(a,()=>{const f=window.innerWidth;f!==c&&(c=f,this.root.updateBlockedByResize=!0,h&&h(),h=ove(d,250),jd.hasAnimatedSinceResize&&(jd.hasAnimatedSinceResize=!1,this.nodes.forEach(U7)))})}o&&this.root.registerSharedNode(o,this),this.options.animate!==!1&&u&&(o||l)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:c,hasRelativeLayoutChanged:d,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||u.getDefaultTransition()||Sve,{onLayoutAnimationStart:v,onLayoutAnimationComplete:m}=u.getProps(),g=!this.targetLayout||!_7(this.targetLayout,f),b=!c&&d;if(this.options.layoutRoot||this.resumeFrom||b||c&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...Av(y,"layout"),onPlay:v,onComplete:m};(u.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(h,b)}else c||U7(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),jn(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(wve),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&B7(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h<this.path.length;h++){const c=this.path[h];c.shouldResetTransform=!0,(typeof c.latestValues.x=="string"||typeof c.latestValues.y=="string")&&(c.isLayoutDirty=!0),c.updateScroll("snapshot"),c.options.layoutRoot&&c.willUpdate(!1)}const{layoutId:o,layout:l}=this.options;if(o===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const l=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),l&&this.nodes.forEach(gve),this.nodes.forEach(H7);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Q7);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(vve),this.nodes.forEach(yve),this.nodes.forEach(cve),this.nodes.forEach(dve)):this.nodes.forEach(Q7),this.clearAllSnapshots();const o=Ws.now();Ds.delta=Lr(0,1e3/60,o-Ds.timestamp),Ds.timestamp=o,Ds.isProcessing=!0,nv.update.process(Ds),nv.preRender.process(Ds),nv.render.process(Ds),Ds.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Bv.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(mve),this.sharedNodes.forEach(xve)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Tt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Tt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Gs(this.snapshot.measuredBox.x)&&!Gs(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=ys()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:o}=this.options;o&&o.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let o=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(o=!1),o&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:l,offset:t(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!r)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,o=this.projectionDelta&&!R7(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,h=u!==this.prevTransformTemplateValue;a&&this.instance&&(o||ka(this.latestValues)||h)&&(r(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const o=this.measurePageBox();let l=this.removeElementScroll(o);return a&&(l=this.removeTransform(l)),Tve(l),{animationId:this.root.animationId,measuredBox:o,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:a}=this.options;if(!a)return ys();const o=a.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(Pve))){const{scroll:h}=this.root;h&&(Dr(o.x,h.offset.x),Dr(o.y,h.offset.y))}return o}removeElementScroll(a){var l;const o=ys();if(hr(o,a),(l=this.scroll)!=null&&l.wasRoot)return o;for(let u=0;u<this.path.length;u++){const h=this.path[u],{scroll:c,options:d}=h;h!==this.root&&c&&d.layoutScroll&&(c.wasRoot&&hr(o,a),Dr(o.x,c.offset.x),Dr(o.y,c.offset.y))}return o}applyTransform(a,o=!1,l){var h,c;const u=l||ys();hr(u,a);for(let d=0;d<this.path.length;d++){const f=this.path[d];!o&&f.options.layoutScroll&&f.scroll&&f!==f.root&&(Dr(u.x,-f.scroll.offset.x),Dr(u.y,-f.scroll.offset.y)),ka(f.latestValues)&&Qd(u,f.latestValues,(h=f.layout)==null?void 0:h.layoutBox)}return ka(this.latestValues)&&Qd(u,this.latestValues,(c=this.layout)==null?void 0:c.layoutBox),u}removeTransform(a){var l;const o=ys();hr(o,a);for(let u=0;u<this.path.length;u++){const h=this.path[u];if(!ka(h.latestValues))continue;let c;h.instance&&(Gv(h.latestValues)&&h.updateSnapshot(),c=ys(),hr(c,h.measurePageBox())),P7(o,h.latestValues,(l=h.snapshot)==null?void 0:l.layoutBox,c)}return ka(this.latestValues)&&P7(o,this.latestValues),o}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ds.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var f;const o=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=o.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=o.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=o.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==o;if(!(a||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:c}=this.options;if(!this.layout||!(h||c))return;this.resolvedRelativeTargetAt=Ds.timestamp;const d=this.getClosestProjectingParent();d&&this.linkedParentVersion!==d.layoutVersion&&!d.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&d&&d.layout?this.createRelativeTarget(d,this.layout.layoutBox,d.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=ys(),this.targetWithTransforms=ys()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Gge(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):hr(this.target,this.layout.layoutBox),i7(this.target,this.targetDelta)):hr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?this.createRelativeTarget(d,this.target,d.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Gv(this.parent.latestValues)||e7(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,o,l){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ys(),this.relativeTargetOrigin=ys(),Ud(this.relativeTargetOrigin,o,l,this.options.layoutAnchor||void 0),hr(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var y;const a=this.getLead(),o=!!this.resumingFrom||this!==a;let l=!0;if((this.isProjectionDirty||(y=this.parent)!=null&&y.isProjectionDirty)&&(l=!1),o&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Ds.timestamp&&(l=!1),l)return;const{layout:u,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||h))return;hr(this.layoutCorrected,this.layout.layoutBox);const c=this.treeScale.x,d=this.treeScale.y;Ege(this.layoutCorrected,this.treeScale,this.path,o),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=ys());const{target:f}=a;if(!f){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(C7(this.prevProjectionDelta.x,this.projectionDelta.x),C7(this.prevProjectionDelta.y,this.projectionDelta.y)),Iu(this.projectionDelta,this.layoutCorrected,f,this.latestValues),(this.treeScale.x!==c||this.treeScale.y!==d||!k7(this.projectionDelta.x,this.prevProjectionDelta.x)||!k7(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",f))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var o;if((o=this.options.visualElement)==null||o.scheduleRender(),a){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=zo(),this.projectionDelta=zo(),this.projectionDeltaWithTransform=zo()}setAnimationOrigin(a,o=!1){const l=this.snapshot,u=l?l.latestValues:{},h={...this.latestValues},c=zo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!o;const d=ys(),f=l?l.source:void 0,y=this.layout?this.layout.source:void 0,v=f!==y,m=this.getStack(),g=!m||m.members.length<=1,b=!!(v&&!g&&this.options.crossfade===!0&&!this.path.some(Vve));this.animationProgress=0;let x;this.mixTargetDelta=P=>{const L=P/1e3;z7(c.x,a.x,L),z7(c.y,a.y,L),this.setTargetDelta(c),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ud(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Eve(this.relativeTarget,this.relativeTargetOrigin,d,L),x&&Yge(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=ys()),hr(x,this.relativeTarget)),v&&(this.animationValues=h,tve(h,u,this.latestValues,L,b,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=L},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){var o,l,u;this.notifyListeners("animationStart"),(o=this.currentAnimation)==null||o.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(jn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Tt.update(()=>{jd.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Qo(0)),this.motionValue.jump(0,!1),this.currentAnimation=rve(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:h=>{this.mixTargetDelta(h),a.onUpdate&&a.onUpdate(h)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(uve),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:o,target:l,layout:u,latestValues:h}=a;if(!(!o||!l||!u)){if(this!==a&&this.layout&&u&&Z7(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||ys();const c=Gs(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+c;const d=Gs(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+d}hr(o,l),Qd(o,h),Iu(this.projectionDeltaWithTransform,this.layoutCorrected,o,h)}}registerSharedNode(a,o){this.sharedNodes.has(a)||this.sharedNodes.set(a,new lve),this.sharedNodes.get(a).add(o);const u=o.options.initialPromotionConfig;o.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(o):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())==null?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())==null?void 0:o.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:o,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let o=!1;const{latestValues:l}=a;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(o=!0),!o)return;const u={};l.z&&t0("z",a,u,this.animationValues);for(let h=0;h<e0.length;h++)t0(`rotate${e0[h]}`,a,u,this.animationValues),t0(`skew${e0[h]}`,a,u,this.animationValues);a.render();for(const h in u)a.setStaticValue(h,u[h]),this.animationValues&&(this.animationValues[h]=u[h]);a.scheduleRender()}applyProjectionStyles(a,o){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=zd(o==null?void 0:o.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=zd(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!ka(this.latestValues)&&(a.transform=l?l({},""):"none",this.hasProjected=!1);return}a.visibility="";const h=u.animationValues||u.latestValues;this.applyTransformsToTarget();let c=Xge(this.projectionDeltaWithTransform,this.treeScale,h);l&&(c=l(h,c)),a.transform=c;const{x:d,y:f}=this.projectionDelta;a.transformOrigin=`${d.origin*100}% ${f.origin*100}% 0`,u.animationValues?a.opacity=u===this?h.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:a.opacity=u===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const y in Jv){if(h[y]===void 0)continue;const{correct:v,applyTo:m,isCSSVariable:g}=Jv[y],b=c==="none"?h[y]:v(h[y],u);if(m){const x=m.length;for(let P=0;P<x;P++)a[m[P]]=b}else g?this.options.visualElement.renderState.vars[y]=b:a[y]=b}this.options.layoutId&&(a.pointerEvents=u===this?zd(o==null?void 0:o.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var o;return(o=a.currentAnimation)==null?void 0:o.stop()}),this.root.nodes.forEach(H7),this.root.sharedNodes.clear()}}}function cve(i){i.updateLayout()}function dve(i){var t;const e=((t=i.resumeFrom)==null?void 0:t.snapshot)||i.snapshot;if(i.isLead()&&i.layout&&e&&i.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:r}=i.layout,{animationType:n}=i.options,a=e.source!==i.layout.source;if(n==="size")kr(c=>{const d=a?e.measuredBox[c]:e.layoutBox[c],f=Gs(d);d.min=s[c].min,d.max=d.min+f});else if(n==="x"||n==="y"){const c=n==="x"?"y":"x";Xv(a?e.measuredBox[c]:e.layoutBox[c],s[c])}else Z7(n,e.layoutBox,s)&&kr(c=>{const d=a?e.measuredBox[c]:e.layoutBox[c],f=Gs(s[c]);d.max=d.min+f,i.relativeTarget&&!i.currentAnimation&&(i.isProjectionDirty=!0,i.relativeTarget[c].max=i.relativeTarget[c].min+f)});const o=zo();Iu(o,s,e.layoutBox);const l=zo();a?Iu(l,i.applyTransform(r,!0),e.measuredBox):Iu(l,s,e.layoutBox);const u=!R7(o);let h=!1;if(!i.resumeFrom){const c=i.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:d,layout:f}=c;if(d&&f){const y=i.options.layoutAnchor||void 0,v=ys();Ud(v,e.layoutBox,d.layoutBox,y);const m=ys();Ud(m,s,f.layoutBox,y),_7(v,m)||(h=!0),c.options.layoutRoot&&(i.relativeTarget=m,i.relativeTargetOrigin=v,i.relativeParent=c)}}}i.notifyListeners("didUpdate",{layout:s,snapshot:e,delta:l,layoutDelta:o,hasLayoutChanged:u,hasRelativeLayoutChanged:h})}else if(i.isLead()){const{onExitComplete:s}=i.options;s&&s()}i.options.transition=void 0}function pve(i){i.parent&&(i.isProjecting()||(i.isProjectionDirty=i.parent.isProjectionDirty),i.isSharedProjectionDirty||(i.isSharedProjectionDirty=!!(i.isProjectionDirty||i.parent.isProjectionDirty||i.parent.isSharedProjectionDirty)),i.isTransformDirty||(i.isTransformDirty=i.parent.isTransformDirty))}function fve(i){i.isProjectionDirty=i.isSharedProjectionDirty=i.isTransformDirty=!1}function mve(i){i.clearSnapshot()}function H7(i){i.clearMeasurements()}function gve(i){i.isLayoutDirty=!0,i.updateLayout()}function Q7(i){i.isLayoutDirty=!1}function vve(i){i.isAnimationBlocked&&i.layout&&!i.isLayoutDirty&&(i.snapshot=i.layout,i.isLayoutDirty=!0)}function yve(i){const{visualElement:e}=i.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),i.resetTransform()}function U7(i){i.finishAnimation(),i.targetDelta=i.relativeTarget=i.target=void 0,i.isProjectionDirty=!0}function Cve(i){i.resolveTargetDelta()}function bve(i){i.calcProjection()}function wve(i){i.resetSkewAndRotation()}function xve(i){i.removeLeadSnapshot()}function z7(i,e,t){i.translate=qt(e.translate,0,t),i.scale=qt(e.scale,1,t),i.origin=e.origin,i.originPoint=e.originPoint}function j7(i,e,t,s){i.min=qt(e.min,t.min,s),i.max=qt(e.max,t.max,s)}function Eve(i,e,t,s){j7(i.x,e.x,t.x,s),j7(i.y,e.y,t.y,s)}function Vve(i){return i.animationValues&&i.animationValues.opacityExit!==void 0}const Sve={duration:.45,ease:[.4,0,.1,1]},W7=i=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(i),G7=W7("applewebkit/")&&!W7("chrome/")?Math.round:Hi;function K7(i){i.min=G7(i.min),i.max=G7(i.max)}function Tve(i){K7(i.x),K7(i.y)}function Z7(i,e,t){return i==="position"||i==="preserve-aspect"&&!Wge(D7(e),D7(t),.2)}function Pve(i){var e;return i!==i.root&&((e=i.scroll)==null?void 0:e.wasRoot)}const Ive=$7({attachResizeListener:(i,e)=>Ru(i,"resize",e),measureScroll:()=>{var i,e;return{x:document.documentElement.scrollLeft||((i=document.body)==null?void 0:i.scrollLeft)||0,y:document.documentElement.scrollTop||((e=document.body)==null?void 0:e.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Rve=i=>!i.isLayoutDirty&&i.willUpdate(!1);function J7(){const i=new Set,e=new WeakMap,t=()=>i.forEach(Rve);return{add:s=>{i.add(s),e.set(s,s.addEventListener("willUpdate",t))},remove:s=>{i.delete(s);const r=e.get(s);r&&(r(),e.delete(s)),t()},dirty:t}}const s0={current:void 0},Y7=$7({measureScroll:i=>({x:i.scrollLeft,y:i.scrollTop}),defaultParent:()=>{if(!s0.current){const i=new Ive({});i.mount(window),i.setOptions({layoutScroll:!0}),s0.current=i}return s0.current},resetTransform:(i,e)=>{i.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:i=>window.getComputedStyle(i).position==="fixed"}),i0=T.createContext({transformPagePoint:i=>i,isStatic:!1,reducedMotion:"never"});function X7(i,e){if(typeof i=="function")return i(e);i!=null&&(i.current=e)}function Ave(...i){return e=>{let t=!1;const s=i.map(r=>{const n=X7(r,e);return!t&&typeof n=="function"&&(t=!0),n});if(t)return()=>{for(let r=0;r<s.length;r++){const n=s[r];typeof n=="function"?n():X7(i[r],null)}}}}function Lve(...i){return p.useCallback(Ave(...i),i)}class _ve extends p.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(Od(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const s=t.offsetParent,r=Od(s)&&s.offsetWidth||0,n=Od(s)&&s.offsetHeight||0,a=getComputedStyle(t),o=this.props.sizeRef.current;o.height=parseFloat(a.height),o.width=parseFloat(a.width),o.top=t.offsetTop,o.left=t.offsetLeft,o.right=r-o.width-o.left,o.bottom=n-o.height-o.top}return null}componentDidUpdate(){}render(){return this.props.children}}function Dve({children:i,isPresent:e,anchorX:t,anchorY:s,root:r,pop:n}){var d;const a=T.useId(),o=T.useRef(null),l=T.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=T.useContext(i0),h=((d=i.props)==null?void 0:d.ref)??(i==null?void 0:i.ref),c=Lve(o,h);return T.useInsertionEffect(()=>{const{width:f,height:y,top:v,left:m,right:g,bottom:b}=l.current;if(e||n===!1||!o.current||!f||!y)return;const x=t==="left"?`left: ${m}`:`right: ${g}`,P=s==="bottom"?`bottom: ${b}`:`top: ${v}`;o.current.dataset.motionPopId=a;const L=document.createElement("style");u&&(L.nonce=u);const _=r??document.head;return _.appendChild(L),L.sheet&&L.sheet.insertRule(`
|
|
10274
10274
|
[data-motion-pop-id="${a}"] {
|
|
10275
10275
|
position: absolute !important;
|