@nizza/core 0.7.0-beta.4 → 0.7.0-beta.5
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/dist/index.cjs +45 -45
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +5209 -4759
- package/dist/index.mjs.map +1 -1
- package/dist/lib/dependency-injector/helpers.d.ts +32 -0
- package/dist/lib/dependency-injector/helpers.d.ts.map +1 -0
- package/dist/lib/dependency-injector/index.d.ts +6 -0
- package/dist/lib/dependency-injector/index.d.ts.map +1 -0
- package/dist/lib/dependency-injector/injector.d.ts +134 -0
- package/dist/lib/dependency-injector/injector.d.ts.map +1 -0
- package/dist/lib/dependency-injector/typeguards.d.ts +22 -0
- package/dist/lib/dependency-injector/typeguards.d.ts.map +1 -0
- package/dist/lib/dependency-injector/types.d.ts +48 -0
- package/dist/lib/dependency-injector/types.d.ts.map +1 -0
- package/dist/lib/dependency-injector/utils.d.ts +50 -0
- package/dist/lib/dependency-injector/utils.d.ts.map +1 -0
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/types/api-graphql-types.d.ts +1 -0
- package/dist/lib/types/api-graphql-types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";var qm=Object.defineProperty;var Km=(t,e,n)=>e in t?qm(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var ge=(t,e,n)=>Km(t,typeof e!="symbol"?e+"":e,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const je=require("react"),zm=require("react/jsx-runtime"),Gm=require("react-dom");function Wm(t,e){for(var n=0;n<e.length;n++){const i=e[n];if(typeof i!="string"&&!Array.isArray(i)){for(const r in i)if(r!=="default"&&!(r in t)){const a=Object.getOwnPropertyDescriptor(i,r);a&&Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:()=>i[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}const Zt={};let Jm=0;function xs(t,e){const n=`atom${++Jm}`,i={toString(){return(Zt?"production":void 0)!=="production"&&this.debugLabel?n+":"+this.debugLabel:n}};return typeof t=="function"?i.read=t:(i.init=t,i.read=Ym,i.write=Xm),i}function Ym(t){return t(this)}function Xm(t,e,n){return e(this,typeof n=="function"?n(t(this)):n)}const Nc=(t,e)=>t.unstable_is?t.unstable_is(e):e===t,Ko=t=>"init"in t,zo=t=>!!t.write,as=new WeakMap,Pu=t=>{var e;return Lu(t)&&!((e=as.get(t))!=null&&e[1])},Qm=(t,e)=>{const n=as.get(t);if(n)n[1]=!0,n[0].forEach(i=>i(e));else if((Zt?"production":void 0)!=="production")throw new Error("[Bug] cancelable promise not found")},Zm=t=>{if(as.has(t))return;const e=[new Set,!1];as.set(t,e);const n=()=>{e[1]=!0};t.then(n,n),t.onCancel=i=>{e[0].add(i)}},Lu=t=>typeof(t==null?void 0:t.then)=="function",Ac=t=>"v"in t||"e"in t,Ma=t=>{if("e"in t)throw t.e;if((Zt?"production":void 0)!=="production"&&!("v"in t))throw new Error("[Bug] atom state is not initialized");return t.v},Sf=(t,e,n)=>{n.p.has(t)||(n.p.add(t),e.then(()=>{n.p.delete(t)},()=>{n.p.delete(t)}))},Oc=(t,e,n,i,r)=>{var a;if((Zt?"production":void 0)!=="production"&&i===e)throw new Error("[Bug] atom cannot depend on itself");n.d.set(i,r.n),Pu(n.v)&&Sf(e,n.v,r),(a=r.m)==null||a.t.add(e),t&&eg(t,i,e)},Ii=()=>[new Map,new Map,new Set],Go=(t,e,n)=>{t[0].has(e)||t[0].set(e,new Set),t[1].set(e,n)},eg=(t,e,n)=>{const i=t[0].get(e);i&&i.add(n)},tg=(t,e)=>t[0].get(e),xc=(t,e)=>{t[2].add(e)},oi=t=>{for(;t[1].size||t[2].size;){t[0].clear();const e=new Set(t[1].values());t[1].clear();const n=new Set(t[2]);t[2].clear(),e.forEach(i=>{var r;return(r=i.m)==null?void 0:r.l.forEach(a=>a())}),n.forEach(i=>i())}},Ef=t=>{let e;(Zt?"production":void 0)!=="production"&&(e=new Set);const n=(S,E,R)=>{const j="v"in E,J=E.v,K=Pu(E.v)?E.v:null;if(Lu(R)){Zm(R);for(const X of E.d.keys())Sf(S,R,t(X,E));E.v=R,delete E.e}else E.v=R,delete E.e;(!j||!Object.is(J,E.v))&&(++E.n,K&&Qm(K,R))},i=(S,E,R,j)=>{var J;if(!(j!=null&&j(E))&&Ac(R)&&(R.m||Array.from(R.d).every(([ve,Ke])=>i(S,ve,t(ve,R),j).n===Ke)))return R;R.d.clear();let K=!0;const X=ve=>{if(Nc(E,ve)){const Ne=t(ve,R);if(!Ac(Ne))if(Ko(ve))n(ve,Ne,ve.init);else throw new Error("no atom init");return Ma(Ne)}const Ke=i(S,ve,t(ve,R),j);if(K)Oc(S,E,R,ve,Ke);else{const Ne=Ii();Oc(Ne,E,R,ve,Ke),h(Ne,E,R),oi(Ne)}return Ma(Ke)};let ne,oe;const Se={get signal(){return ne||(ne=new AbortController),ne.signal},get setSelf(){return(Zt?"production":void 0)!=="production"&&!zo(E)&&console.warn("setSelf function cannot be used with read-only atom"),!oe&&zo(E)&&(oe=(...ve)=>{if((Zt?"production":void 0)!=="production"&&K&&console.warn("setSelf function cannot be called in sync"),!K)return d(E,...ve)}),oe}};try{const ve=E.read(X,Se);if(n(E,R,ve),Lu(ve)){(J=ve.onCancel)==null||J.call(ve,()=>ne==null?void 0:ne.abort());const Ke=()=>{if(R.m){const Ne=Ii();h(Ne,E,R),oi(Ne)}};ve.then(Ke,Ke)}return R}catch(ve){return delete R.v,R.e=ve,++R.n,R}finally{K=!1}},r=S=>Ma(i(void 0,S,t(S))),a=(S,E,R)=>{var j,J;const K=new Map;for(const X of((j=R.m)==null?void 0:j.t)||[])K.set(X,t(X,R));for(const X of R.p)K.set(X,t(X,R));return(J=tg(S,E))==null||J.forEach(X=>{K.set(X,t(X,R))}),K},o=(S,E,R)=>{const j=[],J=new Set,K=(oe,Se)=>{if(!J.has(oe)){J.add(oe);for(const[ve,Ke]of a(S,oe,Se))oe!==ve&&K(ve,Ke);j.push([oe,Se,Se.n])}};K(E,R);const X=new Set([E]),ne=oe=>J.has(oe);for(let oe=j.length-1;oe>=0;--oe){const[Se,ve,Ke]=j[oe];let Ne=!1;for(const Re of ve.d.keys())if(Re!==Se&&X.has(Re)){Ne=!0;break}Ne&&(i(S,Se,ve,ne),h(S,Se,ve),Ke!==ve.n&&(Go(S,Se,ve),X.add(Se))),J.delete(Se)}},l=(S,E,R,...j)=>{const J=ne=>Ma(i(S,ne,t(ne,R))),K=(ne,...oe)=>{const Se=t(ne,R);let ve;if(Nc(E,ne)){if(!Ko(ne))throw new Error("atom not writable");const Ke="v"in Se,Ne=Se.v,Re=oe[0];n(ne,Se,Re),h(S,ne,Se),(!Ke||!Object.is(Ne,Se.v))&&(Go(S,ne,Se),o(S,ne,Se))}else ve=l(S,ne,Se,...oe);return oi(S),ve};return E.write(J,K,...j)},d=(S,...E)=>{const R=Ii(),j=l(R,S,t(S),...E);return oi(R),j},h=(S,E,R)=>{if(R.m&&!Pu(R.v)){for(const j of R.d.keys())R.m.d.has(j)||(m(S,j,t(j,R)).t.add(E),R.m.d.add(j));for(const j of R.m.d||[])if(!R.d.has(j)){R.m.d.delete(j);const J=y(S,j,t(j,R));J==null||J.t.delete(E)}}},m=(S,E,R)=>{if(!R.m){i(S,E,R);for(const j of R.d.keys())m(S,j,t(j,R)).t.add(E);if(R.m={l:new Set,d:new Set(R.d.keys()),t:new Set},(Zt?"production":void 0)!=="production"&&e.add(E),zo(E)&&E.onMount){const j=R.m,{onMount:J}=E;xc(S,()=>{const K=J((...X)=>l(S,E,R,...X));K&&(j.u=K)})}}return R.m},y=(S,E,R)=>{if(R.m&&!R.m.l.size&&!Array.from(R.m.t).some(j=>{var J;return(J=t(j,R).m)==null?void 0:J.d.has(E)})){const j=R.m.u;j&&xc(S,j),delete R.m,(Zt?"production":void 0)!=="production"&&e.delete(E);for(const J of R.d.keys()){const K=y(S,J,t(J,R));K==null||K.t.delete(E)}return}return R.m},_={get:r,set:d,sub:(S,E)=>{const R=Ii(),j=t(S),J=m(R,S,j);oi(R);const K=J.l;return K.add(E),()=>{K.delete(E);const X=Ii();y(X,S,j),oi(X)}},unstable_derive:S=>Ef(...S(t))};return(Zt?"production":void 0)!=="production"&&Object.assign(_,{dev4_get_internal_weak_map:()=>({get:E=>{const R=t(E);if(R.n!==0)return R}}),dev4_get_mounted_atoms:()=>e,dev4_restore_atoms:E=>{const R=Ii();for(const[j,J]of E)if(Ko(j)){const K=t(j),X="v"in K,ne=K.v;n(j,K,J),h(R,j,K),(!X||!Object.is(ne,K.v))&&(Go(R,j,K),o(R,j,K))}oi(R)}}),_},ng=()=>{const t=new WeakMap;return Ef(n=>{let i=t.get(n);return i||(i={d:new Map,p:new Set,n:0},t.set(n,i)),i})};let _r;const ig=()=>(_r||(_r=ng(),(Zt?"production":void 0)!=="production"&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=_r),globalThis.__JOTAI_DEFAULT_STORE__!==_r&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),_r),Nf={},rg=je.createContext(void 0),Af=t=>je.useContext(rg)||ig(),Of=t=>typeof(t==null?void 0:t.then)=="function",ag=t=>{t.status="pending",t.then(e=>{t.status="fulfilled",t.value=e},e=>{t.status="rejected",t.reason=e})},sg=je.use||(t=>{if(t.status==="pending")throw t;if(t.status==="fulfilled")return t.value;throw t.status==="rejected"?t.reason:(ag(t),t)}),Wo=new WeakMap,og=t=>{let e=Wo.get(t);return e||(e=new Promise((n,i)=>{let r=t;const a=d=>h=>{r===d&&n(h)},o=d=>h=>{r===d&&i(h)},l=d=>{"onCancel"in d&&typeof d.onCancel=="function"&&d.onCancel(h=>{if((Nf?"production":void 0)!=="production"&&h===d)throw new Error("[Bug] p is not updated even after cancelation");Of(h)?(Wo.set(h,e),r=h,h.then(a(h),o(h)),l(h)):n(h)})};t.then(a(t),o(t)),l(t)}),Wo.set(t,e)),e};function $u(t,e){const n=Af(),[[i,r,a],o]=je.useReducer(h=>{const m=n.get(t);return Object.is(h[0],m)&&h[1]===n&&h[2]===t?h:[m,n,t]},void 0,()=>[n.get(t),n,t]);let l=i;if((r!==n||a!==t)&&(o(),l=n.get(t)),je.useEffect(()=>{const h=n.sub(t,()=>{o()});return o(),h},[n,t,void 0]),je.useDebugValue(l),Of(l)){const h=og(l);return sg(h)}return l}function yl(t,e){const n=Af();return je.useCallback((...r)=>{if((Nf?"production":void 0)!=="production"&&!("write"in t))throw new Error("not writable atom");return n.set(t,...r)},[n,t])}function Jo(t,e){return[$u(t),yl(t)]}const xf=xs(null);xf.debugLabel="accountAtom";const ug={},{NZ_BACKOFFICE_BACK_URL:lg,NZ_CORE_SERVICES_GRAPHQL_URL:cg,NZ_CORE_SERVICES_REST_URL:dg}=ug,er={apiUrls:{restV1:lg||"https://pabprg32bj.execute-api.us-east-1.amazonaws.com",restV2:dg||"https://core-services-dev.nizza.com/api",graphql:cg||"https://core-services-dev.nizza.com/graphql"},publicUrls:{wssIVSChat:"wss://edge.ivschat.us-east-1.amazonaws.com"}};async function mi(t){const{url:e,method:n="GET",body:i,raw:r=!1,contentTypeJson:a=!0,timeout:o,...l}=t,d=new Headers({...a?{"content-type":"application/json"}:{},...t.headers}),h=new AbortController,{signal:m}=h;let y;const g=fetch(e,{method:n,headers:d,body:i,signal:m,...l});o&&(y=setTimeout(()=>{h.abort()},o));const O=await g;if(r)return O;const _=await O.json();if(clearTimeout(y),!O.ok){const S=_?JSON.stringify(_):O.statusText;throw new Error(S)}return _}const fg=t=>mi({...t,contentTypeJson:!1,raw:!1});function hg(t,e,n){fetch(e).then(i=>i.blob()).then(i=>Tf(i,`${t}.${n}`))}const Tf=(t,e,n)=>{const i=[t],r=new Blob(i,{type:n!=null?n:"application/octet-stream"});if(typeof window.navigator.msSaveBlob!="undefined")return window.navigator.msSaveBlob(r,e);const a=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(r):window.webkitURL.createObjectURL(r),o=document.createElement("a");return o.style.display="none",o.href=a,o.setAttribute("download",e),typeof o.download=="undefined"&&o.setAttribute("target","_blank"),document.body.appendChild(o),o.click(),setTimeout(()=>{document.body.removeChild(o),window.URL.revokeObjectURL(a)},200)};var pg="2.0.3",Mu=500,Tc="user-agent",Gi="",Cc="?",ss="function",Hn="undefined",Wi="object",Bu="string",Ft="browser",kn="cpu",dn="device",en="engine",Gt="os",Ki="result",ee="name",W="type",Z="vendor",te="version",It="architecture",Gr="major",Q="model",Pr="console",Pe="mobile",Qe="tablet",gt="smarttv",cn="wearable",Yo="xr",Lr="embedded",wr="inapp",bl="brands",ci="formFactors",kl="fullVersionList",zi="platform",_l="platformVersion",Ts="bitness",Yn="sec-ch-ua",mg=Yn+"-full-version-list",gg=Yn+"-arch",vg=Yn+"-"+Ts,yg=Yn+"-form-factors",bg=Yn+"-"+Pe,kg=Yn+"-"+Q,Cf=Yn+"-"+zi,_g=Cf+"-version",Rf=[bl,kl,Pe,Q,zi,_l,It,ci,Ts],Ba="Amazon",Di="Apple",Rc="ASUS",Fc="BlackBerry",ui="Google",Ic="Huawei",Dc="Lenovo",Pc="Honor",Ua="LG",Xo="Microsoft",Qo="Motorola",Zo="Nvidia",Lc="OnePlus",eu="OPPO",Sr="Samsung",$c="Sharp",Er="Sony",tu="Xiaomi",nu="Zebra",Mc="Chrome",Bc="Chromium",Mn="Chromecast",wg="Edge",Nr="Firefox",Ar="Opera",iu="Facebook",Uc="Sogou",Pi="Mobile ",Or=" Browser",Uu="Windows",Sg=typeof window!==Hn,Dt=Sg&&window.navigator?window.navigator:void 0,Un=Dt&&Dt.userAgentData?Dt.userAgentData:void 0,Eg=function(t,e){var n={},i=e;if(!os(e)){i={};for(var r in e)for(var a in e[r])i[a]=e[r][a].concat(i[a]?i[a]:[])}for(var o in t)n[o]=i[o]&&i[o].length%2===0?i[o].concat(t[o]):t[o];return n},Cs=function(t){for(var e={},n=0;n<t.length;n++)e[t[n].toUpperCase()]=t[n];return e},ju=function(t,e){if(typeof t===Wi&&t.length>0){for(var n in t)if(Sn(t[n])==Sn(e))return!0;return!1}return tr(t)?Sn(e).indexOf(Sn(t))!==-1:!1},os=function(t,e){for(var n in t)return/^(browser|cpu|device|engine|os)$/.test(n)||(e?os(t[n]):!1)},tr=function(t){return typeof t===Bu},ru=function(t){if(t){for(var e=[],n=Ji(/\\?\"/g,t).split(","),i=0;i<n.length;i++)if(n[i].indexOf(";")>-1){var r=Wr(n[i]).split(";v=");e[i]={brand:r[0],version:r[1]}}else e[i]=Wr(n[i]);return e}},Sn=function(t){return tr(t)?t.toLowerCase():t},au=function(t){return tr(t)?Ji(/[^\d\.]/g,t).split(".")[0]:void 0},En=function(t){for(var e in t){var n=t[e];typeof n==Wi&&n.length==2?this[n[0]]=n[1]:this[n]=void 0}return this},Ji=function(t,e){return tr(e)?e.replace(t,Gi):e},xr=function(t){return Ji(/\\?\"/g,t)},Wr=function(t,e){if(tr(t))return t=Ji(/^\s\s*/,t),typeof e===Hn?t:t.substring(0,Mu)},su=function(t,e){if(!(!t||!e))for(var n=0,i,r,a,o,l,d;n<e.length&&!l;){var h=e[n],m=e[n+1];for(i=r=0;i<h.length&&!l&&h[i];)if(l=h[i++].exec(t),l)for(a=0;a<m.length;a++)d=l[++r],o=m[a],typeof o===Wi&&o.length>0?o.length===2?typeof o[1]==ss?this[o[0]]=o[1].call(this,d):this[o[0]]=o[1]:o.length===3?typeof o[1]===ss&&!(o[1].exec&&o[1].test)?this[o[0]]=d?o[1].call(this,d,o[2]):void 0:this[o[0]]=d?d.replace(o[1],o[2]):void 0:o.length===4&&(this[o[0]]=d?o[3].call(this,d.replace(o[1],o[2])):void 0):this[o]=d||void 0;n+=2}},jn=function(t,e){for(var n in e)if(typeof e[n]===Wi&&e[n].length>0){for(var i=0;i<e[n].length;i++)if(ju(e[n][i],t))return n===Cc?void 0:n}else if(ju(e[n],t))return n===Cc?void 0:n;return e.hasOwnProperty("*")?e["*"]:t},jc={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Vc={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},Hc={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[te,[ee,Pi+"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[te,[ee,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[ee,te],[/opios[\/ ]+([\w\.]+)/i],[te,[ee,Ar+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[te,[ee,Ar+" GX"]],[/\bopr\/([\w\.]+)/i],[te,[ee,Ar]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[te,[ee,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[te,[ee,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser)\/([-\w\.]+)/i,/(heytap|ovi|115|surf)browser\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[ee,te],[/quark(?:pc)?\/([-\w\.]+)/i],[te,[ee,"Quark"]],[/\bddg\/([\w\.]+)/i],[te,[ee,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[te,[ee,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[te,[ee,"WeChat"]],[/konqueror\/([\w\.]+)/i],[te,[ee,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[te,[ee,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[te,[ee,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[te,[ee,"Smart "+Dc+Or]],[/(avast|avg)\/([\w\.]+)/i],[[ee,/(.+)/,"$1 Secure"+Or],te],[/\bfocus\/([\w\.]+)/i],[te,[ee,Nr+" Focus"]],[/\bopt\/([\w\.]+)/i],[te,[ee,Ar+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[te,[ee,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[te,[ee,"Dolphin"]],[/coast\/([\w\.]+)/i],[te,[ee,Ar+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[te,[ee,"MIUI"+Or]],[/fxios\/([\w\.-]+)/i],[te,[ee,Pi+Nr]],[/\bqihoobrowser\/?([\w\.]*)/i],[te,[ee,"360"]],[/\b(qq)\/([\w\.]+)/i],[[ee,/(.+)/,"$1Browser"],te],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[ee,/(.+)/,"$1"+Or],te],[/samsungbrowser\/([\w\.]+)/i],[te,[ee,Sr+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[te,[ee,Uc+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[ee,Uc+" Mobile"],te],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[ee,te],[/(lbbrowser|rekonq)/i],[ee],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[te,ee],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[ee,iu],te,[W,wr]],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(instagram|snapchat)[\/ ]([-\w\.]+)/i],[ee,te,[W,wr]],[/\bgsa\/([\w\.]+) .*safari\//i],[te,[ee,"GSA"],[W,wr]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[te,[ee,"TikTok"],[W,wr]],[/\[(linkedin)app\]/i],[ee,[W,wr]],[/(chromium)[\/ ]([-\w\.]+)/i],[ee,te],[/headlesschrome(?:\/([\w\.]+)| )/i],[te,[ee,Mc+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[ee,Mc+" WebView"],te],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[te,[ee,"Android"+Or]],[/chrome\/([\w\.]+) mobile/i],[te,[ee,Pi+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[ee,te],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[te,[ee,Pi+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[ee,Pi+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[te,ee],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[ee,[te,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[ee,te],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[ee,Pi+Nr],te],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[ee,"Netscape"],te],[/(wolvic|librewolf)\/([\w\.]+)/i],[ee,te],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[te,[ee,Nr+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[ee,[te,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[ee,[te,/[^\d\.]+./,Gi]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[It,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[It,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[It,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[It,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[It,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[It,/ower/,Gi,Sn]],[/ sun4\w[;\)]/i],[[It,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[It,Sn]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[Q,[Z,Sr],[W,Qe]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[Q,[Z,Sr],[W,Pe]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[Q,[Z,Di],[W,Pe]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[Q,[Z,Di],[W,Qe]],[/(macintosh);/i],[Q,[Z,Di]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[Q,[Z,$c],[W,Pe]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[Q,[Z,Pc],[W,Qe]],[/honor([-\w ]+)[;\)]/i],[Q,[Z,Pc],[W,Pe]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[Q,[Z,Ic],[W,Qe]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[Q,[Z,Ic],[W,Pe]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[Q,/_/g," "],[Z,tu],[W,Qe]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[Q,/_/g," "],[Z,tu],[W,Pe]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[Q,[Z,eu],[W,Pe]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[Q,[Z,jn,{OnePlus:["304","403","203"],"*":eu}],[W,Qe]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[Q,[Z,"BLU"],[W,Pe]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[Q,[Z,"Vivo"],[W,Pe]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[Q,[Z,"Realme"],[W,Pe]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[Q,[Z,Qo],[W,Pe]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[Q,[Z,Qo],[W,Qe]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[Q,[Z,Ua],[W,Qe]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch))(\w+)/i,/\blg-?([\d\w]+) bui/i],[Q,[Z,Ua],[W,Pe]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[Q,[Z,Dc],[W,Qe]],[/(nokia) (t[12][01])/i],[Z,Q,[W,Qe]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[Q,/_/g," "],[W,Pe],[Z,"Nokia"]],[/(pixel (c|tablet))\b/i],[Q,[Z,ui],[W,Qe]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[Q,[Z,ui],[W,Pe]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[Q,[Z,Er],[W,Pe]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[Q,"Xperia Tablet"],[Z,Er],[W,Qe]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[Q,[Z,Lc],[W,Pe]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[Q,[Z,Ba],[W,Qe]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[Q,/(.+)/g,"Fire Phone $1"],[Z,Ba],[W,Pe]],[/(playbook);[-\w\),; ]+(rim)/i],[Q,Z,[W,Qe]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[Q,[Z,Fc],[W,Pe]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[Q,[Z,Rc],[W,Qe]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[Q,[Z,Rc],[W,Pe]],[/(nexus 9)/i],[Q,[Z,"HTC"],[W,Qe]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[Z,[Q,/_/g," "],[W,Pe]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[Q,[Z,"TCL"],[W,Qe]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[Q,[Z,"TCL"],[W,Pe]],[/(itel) ((\w+))/i],[[Z,Sn],Q,[W,jn,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[Q,[Z,"Acer"],[W,Qe]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[Q,[Z,"Meizu"],[W,Pe]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[Q,[Z,"Ulefone"],[W,Pe]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[Q,[Z,"Energizer"],[W,Pe]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[Q,[Z,"Cat"],[W,Pe]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[Q,[Z,"Smartfren"],[W,Pe]],[/droid.+; (a(?:015|06[35]|142p?))/i],[Q,[Z,"Nothing"],[W,Pe]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[Q,[Z,"Archos"],[W,Qe]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[Q,[Z,"Archos"],[W,Pe]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[Z,Q,[W,Qe]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|tcl)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[Z,Q,[W,Pe]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[Z,Q,[W,Qe]],[/(surface duo)/i],[Q,[Z,Xo],[W,Qe]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[Q,[Z,"Fairphone"],[W,Pe]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[Q,[Z,Zo],[W,Qe]],[/(sprint) (\w+)/i],[Z,Q,[W,Pe]],[/(kin\.[onetw]{3})/i],[[Q,/\./g," "],[Z,Xo],[W,Pe]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[Q,[Z,nu],[W,Qe]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[Q,[Z,nu],[W,Pe]],[/smart-tv.+(samsung)/i],[Z,[W,gt]],[/hbbtv.+maple;(\d+)/i],[[Q,/^/,"SmartTV"],[Z,Sr],[W,gt]],[/tcast.+(lg)e?. ([-\w]+)/i],[Z,Q,[W,gt]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[Z,Ua],[W,gt]],[/(apple) ?tv/i],[Z,[Q,Di+" TV"],[W,gt]],[/crkey.*devicetype\/chromecast/i],[[Q,Mn+" Third Generation"],[Z,ui],[W,gt]],[/crkey.*devicetype\/([^/]*)/i],[[Q,/^/,"Chromecast "],[Z,ui],[W,gt]],[/fuchsia.*crkey/i],[[Q,Mn+" Nest Hub"],[Z,ui],[W,gt]],[/crkey/i],[[Q,Mn],[Z,ui],[W,gt]],[/(portaltv)/i],[Q,[Z,iu],[W,gt]],[/droid.+aft(\w+)( bui|\))/i],[Q,[Z,Ba],[W,gt]],[/(shield \w+ tv)/i],[Q,[Z,Zo],[W,gt]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[Q,[Z,$c],[W,gt]],[/(bravia[\w ]+)( bui|\))/i],[Q,[Z,Er],[W,gt]],[/(mi(tv|box)-?\w+) bui/i],[Q,[Z,tu],[W,gt]],[/Hbbtv.*(technisat) (.*);/i],[Z,Q,[W,gt]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[Z,Wr],[Q,Wr],[W,gt]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[Q,[W,gt]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[W,gt]],[/(ouya)/i,/(nintendo) (\w+)/i],[Z,Q,[W,Pr]],[/droid.+; (shield)( bui|\))/i],[Q,[Z,Zo],[W,Pr]],[/(playstation \w+)/i],[Q,[Z,Er],[W,Pr]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[Q,[Z,Xo],[W,Pr]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[Q,[Z,Sr],[W,cn]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[Z,Q,[W,cn]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[Q,[Z,eu],[W,cn]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[Q,[Z,Di],[W,cn]],[/(opwwe\d{3})/i],[Q,[Z,Lc],[W,cn]],[/(moto 360)/i],[Q,[Z,Qo],[W,cn]],[/(smartwatch 3)/i],[Q,[Z,Er],[W,cn]],[/(g watch r)/i],[Q,[Z,Ua],[W,cn]],[/droid.+; (wt63?0{2,3})\)/i],[Q,[Z,nu],[W,cn]],[/droid.+; (glass) \d/i],[Q,[Z,ui],[W,Yo]],[/(pico) (4|neo3(?: link|pro)?)/i],[Z,Q,[W,Yo]],[/(quest( \d| pro)?s?).+vr/i],[Q,[Z,iu],[W,Yo]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[Z,[W,Lr]],[/(aeobc)\b/i],[Q,[Z,Ba],[W,Lr]],[/(homepod).+mac os/i],[Q,[Z,Di],[W,Lr]],[/windows iot/i],[[W,Lr]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[Q,[W,jn,{mobile:"Mobile",xr:"VR","*":Qe}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[W,Qe]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[W,Pe]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[Q,[Z,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[te,[ee,wg+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[ee,te],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[te,[ee,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[ee,te],[/ladybird\//i],[[ee,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[te,ee]],os:[[/microsoft (windows) (vista|xp)/i],[ee,te],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[ee,[te,jn,jc]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[te,jn,jc],[ee,Uu]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[te,/_/g,"."],[ee,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[ee,"macOS"],[te,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[te,[ee,Mn+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[te,[ee,Mn+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[te,[ee,Mn+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[te,[ee,Mn+" Linux"]],[/crkey\/([\d\.]+)/i],[te,[ee,Mn]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[te,ee],[/(ubuntu) ([\w\.]+) like android/i],[[ee,/(.+)/,"$1 Touch"],te],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/\.; ]?([\d\.]*)/i],[ee,te],[/\(bb(10);/i],[te,[ee,Fc]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[te,[ee,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[te,[ee,Nr+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[te,[ee,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[te,[ee,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[ee,"Chrome OS"],te],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[ee,te],[/(sunos) ?([\w\.\d]*)/i],[[ee,"Solaris"],te],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[ee,te]]},ja=function(){var t={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return En.call(t.init,[[Ft,[ee,te,Gr,W]],[kn,[It]],[dn,[W,Q,Z]],[en,[ee,te]],[Gt,[ee,te]]]),En.call(t.isIgnore,[[Ft,[te,Gr]],[en,[te]],[Gt,[te]]]),En.call(t.isIgnoreRgx,[[Ft,/ ?browser$/i],[Gt,/ ?os$/i]]),En.call(t.toString,[[Ft,[ee,te]],[kn,[It]],[dn,[Z,Q]],[en,[ee,te]],[Gt,[ee,te]]]),t}(),Ng=function(t,e){var n=ja.init[e],i=ja.isIgnore[e]||0,r=ja.isIgnoreRgx[e]||0,a=ja.toString[e]||0;function o(){En.call(this,n)}return o.prototype.getItem=function(){return t},o.prototype.withClientHints=function(){return Un?Un.getHighEntropyValues(Rf).then(function(l){return t.setCH(new Ff(l,!1)).parseCH().get()}):t.parseCH().get()},o.prototype.withFeatureCheck=function(){return t.detectFeature().get()},e!=Ki&&(o.prototype.is=function(l){var d=!1;for(var h in this)if(this.hasOwnProperty(h)&&!ju(i,h)&&Sn(r?Ji(r,this[h]):this[h])==Sn(r?Ji(r,l):l)){if(d=!0,l!=Hn)break}else if(l==Hn&&d){d=!d;break}return d},o.prototype.toString=function(){var l=Gi;for(var d in a)typeof this[a[d]]!==Hn&&(l+=(l?" ":Gi)+this[a[d]]);return l||Hn}),Un||(o.prototype.then=function(l){var d=this,h=function(){for(var y in d)d.hasOwnProperty(y)&&(this[y]=d[y])};h.prototype={is:o.prototype.is,toString:o.prototype.toString};var m=new h;return l(m),m}),new o};function Ff(t,e){if(t=t||{},En.call(this,Rf),e)En.call(this,[[bl,ru(t[Yn])],[kl,ru(t[mg])],[Pe,/\?1/.test(t[bg])],[Q,xr(t[kg])],[zi,xr(t[Cf])],[_l,xr(t[_g])],[It,xr(t[gg])],[ci,ru(t[yg])],[Ts,xr(t[vg])]]);else for(var n in t)this.hasOwnProperty(n)&&typeof t[n]!==Hn&&(this[n]=t[n])}function qc(t,e,n,i){return this.get=function(r){return r?this.data.hasOwnProperty(r)?this.data[r]:void 0:this.data},this.set=function(r,a){return this.data[r]=a,this},this.setCH=function(r){return this.uaCH=r,this},this.detectFeature=function(){if(Dt&&Dt.userAgent==this.ua)switch(this.itemType){case Ft:Dt.brave&&typeof Dt.brave.isBrave==ss&&this.set(ee,"Brave");break;case dn:!this.get(W)&&Un&&Un[Pe]&&this.set(W,Pe),this.get(Q)=="Macintosh"&&Dt&&typeof Dt.standalone!==Hn&&Dt.maxTouchPoints&&Dt.maxTouchPoints>2&&this.set(Q,"iPad").set(W,Qe);break;case Gt:!this.get(ee)&&Un&&Un[zi]&&this.set(ee,Un[zi]);break;case Ki:var r=this.data,a=function(o){return r[o].getItem().detectFeature().get()};this.set(Ft,a(Ft)).set(kn,a(kn)).set(dn,a(dn)).set(en,a(en)).set(Gt,a(Gt))}return this},this.parseUA=function(){return this.itemType!=Ki&&su.call(this.data,this.ua,this.rgxMap),this.itemType==Ft&&this.set(Gr,au(this.get(te))),this},this.parseCH=function(){var r=this.uaCH,a=this.rgxMap;switch(this.itemType){case Ft:case en:var o=r[kl]||r[bl],l;if(o)for(var d in o){var h=o[d].brand||o[d],m=o[d].version;this.itemType==Ft&&!/not.a.brand/i.test(h)&&(!l||/chrom/i.test(l)&&h!=Bc)&&(h=jn(h,{Chrome:"Google Chrome",Edge:"Microsoft Edge","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"}),this.set(ee,h).set(te,m).set(Gr,au(m)),l=h),this.itemType==en&&h==Bc&&this.set(te,m)}break;case kn:var y=r[It];y&&(y&&r[Ts]=="64"&&(y+="64"),su.call(this.data,y+";",a));break;case dn:if(r[Pe]&&this.set(W,Pe),r[Q]&&(this.set(Q,r[Q]),!this.get(W)||!this.get(Z))){var g={};su.call(g,"droid 9; "+r[Q]+")",a),!this.get(W)&&g.type&&this.set(W,g.type),!this.get(Z)&&g.vendor&&this.set(Z,g.vendor)}if(r[ci]){var O;if(typeof r[ci]!="string")for(var _=0;!O&&_<r[ci].length;)O=jn(r[ci][_++],Vc);else O=jn(r[ci],Vc);this.set(W,O)}break;case Gt:var S=r[zi];if(S){var E=r[_l];S==Uu&&(E=parseInt(au(E),10)>=13?"11":"10"),this.set(ee,S).set(te,E)}this.get(ee)==Uu&&r[Q]=="Xbox"&&this.set(ee,"Xbox").set(te,void 0);break;case Ki:var R=this.data,j=function(J){return R[J].getItem().setCH(r).parseCH().get()};this.set(Ft,j(Ft)).set(kn,j(kn)).set(dn,j(dn)).set(en,j(en)).set(Gt,j(Gt))}return this},En.call(this,[["itemType",t],["ua",e],["uaCH",i],["rgxMap",n],["data",Ng(this,t)]]),this}function On(t,e,n){if(typeof t===Wi?(os(t,!0)?(typeof e===Wi&&(n=e),e=t):(n=t,e=void 0),t=void 0):typeof t===Bu&&!os(e,!0)&&(n=e,e=void 0),n&&typeof n.append===ss){var i={};n.forEach(function(d,h){i[h]=d}),n=i}if(!(this instanceof On))return new On(t,e,n).getResult();var r=typeof t===Bu?t:n&&n[Tc]?n[Tc]:Dt&&Dt.userAgent?Dt.userAgent:Gi,a=new Ff(n,!0),o=e?Eg(Hc,e):Hc,l=function(d){return d==Ki?function(){return new qc(d,r,o,a).set("ua",r).set(Ft,this.getBrowser()).set(kn,this.getCPU()).set(dn,this.getDevice()).set(en,this.getEngine()).set(Gt,this.getOS()).get()}:function(){return new qc(d,r,o[d],a).parseUA().get()}};return En.call(this,[["getBrowser",l(Ft)],["getCPU",l(kn)],["getDevice",l(dn)],["getEngine",l(en)],["getOS",l(Gt)],["getResult",l(Ki)],["getUA",function(){return r}],["setUA",function(d){return tr(d)&&(r=d.length>Mu?Wr(d,Mu):d),this}]]).setUA(r),this}On.VERSION=pg;On.BROWSER=Cs([ee,te,Gr,W]);On.CPU=Cs([It]);On.DEVICE=Cs([Q,Z,W,Pr,Pe,gt,Qe,cn,Lr]);On.ENGINE=On.OS=Cs([ee,te]);function Ui(t){return t!=null&&typeof t=="object"&&t["@@functional/placeholder"]===!0}function Ya(t){return function e(n){return arguments.length===0||Ui(n)?e:t.apply(this,arguments)}}function Ag(t){return function e(n,i){switch(arguments.length){case 0:return e;case 1:return Ui(n)?e:Ya(function(r){return t(n,r)});default:return Ui(n)&&Ui(i)?e:Ui(n)?Ya(function(r){return t(r,i)}):Ui(i)?Ya(function(r){return t(n,r)}):t(n,i)}}}const Og=Number.isInteger||function(e){return e<<0===e};function xg(t){return Object.prototype.toString.call(t)==="[object String]"}function Tg(t,e){var n=t<0?e.length+t:t;return xg(e)?e.charAt(n):e[n]}var Cg=Ya(function(e){return e==null});function Rg(t,e){for(var n=e,i=0;i<t.length;i+=1){if(n==null)return;var r=t[i];Og(r)?n=Tg(r,n):n=n[r]}return n}var Fg=Ag(Rg);class Tn extends Error{constructor(e,n,i){super(n),this.value=i,this.name=e,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toDTO(){return{name:this.name,message:this.message,...this.value&&{value:this.value},...this.stack&&{stack:this.formatStack()}}}formatStack(){return this.stack?this.stack.split(`
|
|
2
|
-
`).map(e=>e.trim()).join(" | "):""}}class
|
|
1
|
+
"use strict";var hg=Object.defineProperty;var pg=(t,e,n)=>e in t?hg(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var me=(t,e,n)=>pg(t,typeof e!="symbol"?e+"":e,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const je=require("react"),mg=require("react/jsx-runtime"),gg=require("react-dom");function vg(t,e){for(var n=0;n<e.length;n++){const i=e[n];if(typeof i!="string"&&!Array.isArray(i)){for(const r in i)if(r!=="default"&&!(r in t)){const s=Object.getOwnPropertyDescriptor(i,r);s&&Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>i[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}const Zt={};let yg=0;function Da(t,e){const n=`atom${++yg}`,i={toString(){return(Zt?"production":void 0)!=="production"&&this.debugLabel?n+":"+this.debugLabel:n}};return typeof t=="function"?i.read=t:(i.init=t,i.read=bg,i.write=kg),i}function bg(t){return t(this)}function kg(t,e,n){return e(this,typeof n=="function"?n(t(this)):n)}const Mc=(t,e)=>t.unstable_is?t.unstable_is(e):e===t,Qo=t=>"init"in t,Zo=t=>!!t.write,da=new WeakMap,Hu=t=>{var e;return qu(t)&&!((e=da.get(t))!=null&&e[1])},_g=(t,e)=>{const n=da.get(t);if(n)n[1]=!0,n[0].forEach(i=>i(e));else if((Zt?"production":void 0)!=="production")throw new Error("[Bug] cancelable promise not found")},wg=t=>{if(da.has(t))return;const e=[new Set,!1];da.set(t,e);const n=()=>{e[1]=!0};t.then(n,n),t.onCancel=i=>{e[0].add(i)}},qu=t=>typeof(t==null?void 0:t.then)=="function",Bc=t=>"v"in t||"e"in t,Hs=t=>{if("e"in t)throw t.e;if((Zt?"production":void 0)!=="production"&&!("v"in t))throw new Error("[Bug] atom state is not initialized");return t.v},$f=(t,e,n)=>{n.p.has(t)||(n.p.add(t),e.then(()=>{n.p.delete(t)},()=>{n.p.delete(t)}))},Uc=(t,e,n,i,r)=>{var s;if((Zt?"production":void 0)!=="production"&&i===e)throw new Error("[Bug] atom cannot depend on itself");n.d.set(i,r.n),Hu(n.v)&&$f(e,n.v,r),(s=r.m)==null||s.t.add(e),t&&Sg(t,i,e)},Li=()=>[new Map,new Map,new Set],eu=(t,e,n)=>{t[0].has(e)||t[0].set(e,new Set),t[1].set(e,n)},Sg=(t,e,n)=>{const i=t[0].get(e);i&&i.add(n)},Eg=(t,e)=>t[0].get(e),jc=(t,e)=>{t[2].add(e)},ui=t=>{for(;t[1].size||t[2].size;){t[0].clear();const e=new Set(t[1].values());t[1].clear();const n=new Set(t[2]);t[2].clear(),e.forEach(i=>{var r;return(r=i.m)==null?void 0:r.l.forEach(s=>s())}),n.forEach(i=>i())}},Mf=t=>{let e;(Zt?"production":void 0)!=="production"&&(e=new Set);const n=(S,E,R)=>{const j="v"in E,J=E.v,z=Hu(E.v)?E.v:null;if(qu(R)){wg(R);for(const X of E.d.keys())$f(S,R,t(X,E));E.v=R,delete E.e}else E.v=R,delete E.e;(!j||!Object.is(J,E.v))&&(++E.n,z&&_g(z,R))},i=(S,E,R,j)=>{var J;if(!(j!=null&&j(E))&&Bc(R)&&(R.m||Array.from(R.d).every(([ve,ze])=>i(S,ve,t(ve,R),j).n===ze)))return R;R.d.clear();let z=!0;const X=ve=>{if(Mc(E,ve)){const Ne=t(ve,R);if(!Bc(Ne))if(Qo(ve))n(ve,Ne,ve.init);else throw new Error("no atom init");return Hs(Ne)}const ze=i(S,ve,t(ve,R),j);if(z)Uc(S,E,R,ve,ze);else{const Ne=Li();Uc(Ne,E,R,ve,ze),h(Ne,E,R),ui(Ne)}return Hs(ze)};let ne,oe;const Se={get signal(){return ne||(ne=new AbortController),ne.signal},get setSelf(){return(Zt?"production":void 0)!=="production"&&!Zo(E)&&console.warn("setSelf function cannot be used with read-only atom"),!oe&&Zo(E)&&(oe=(...ve)=>{if((Zt?"production":void 0)!=="production"&&z&&console.warn("setSelf function cannot be called in sync"),!z)return d(E,...ve)}),oe}};try{const ve=E.read(X,Se);if(n(E,R,ve),qu(ve)){(J=ve.onCancel)==null||J.call(ve,()=>ne==null?void 0:ne.abort());const ze=()=>{if(R.m){const Ne=Li();h(Ne,E,R),ui(Ne)}};ve.then(ze,ze)}return R}catch(ve){return delete R.v,R.e=ve,++R.n,R}finally{z=!1}},r=S=>Hs(i(void 0,S,t(S))),s=(S,E,R)=>{var j,J;const z=new Map;for(const X of((j=R.m)==null?void 0:j.t)||[])z.set(X,t(X,R));for(const X of R.p)z.set(X,t(X,R));return(J=Eg(S,E))==null||J.forEach(X=>{z.set(X,t(X,R))}),z},o=(S,E,R)=>{const j=[],J=new Set,z=(oe,Se)=>{if(!J.has(oe)){J.add(oe);for(const[ve,ze]of s(S,oe,Se))oe!==ve&&z(ve,ze);j.push([oe,Se,Se.n])}};z(E,R);const X=new Set([E]),ne=oe=>J.has(oe);for(let oe=j.length-1;oe>=0;--oe){const[Se,ve,ze]=j[oe];let Ne=!1;for(const Re of ve.d.keys())if(Re!==Se&&X.has(Re)){Ne=!0;break}Ne&&(i(S,Se,ve,ne),h(S,Se,ve),ze!==ve.n&&(eu(S,Se,ve),X.add(Se))),J.delete(Se)}},l=(S,E,R,...j)=>{const J=ne=>Hs(i(S,ne,t(ne,R))),z=(ne,...oe)=>{const Se=t(ne,R);let ve;if(Mc(E,ne)){if(!Qo(ne))throw new Error("atom not writable");const ze="v"in Se,Ne=Se.v,Re=oe[0];n(ne,Se,Re),h(S,ne,Se),(!ze||!Object.is(Ne,Se.v))&&(eu(S,ne,Se),o(S,ne,Se))}else ve=l(S,ne,Se,...oe);return ui(S),ve};return E.write(J,z,...j)},d=(S,...E)=>{const R=Li(),j=l(R,S,t(S),...E);return ui(R),j},h=(S,E,R)=>{if(R.m&&!Hu(R.v)){for(const j of R.d.keys())R.m.d.has(j)||(m(S,j,t(j,R)).t.add(E),R.m.d.add(j));for(const j of R.m.d||[])if(!R.d.has(j)){R.m.d.delete(j);const J=y(S,j,t(j,R));J==null||J.t.delete(E)}}},m=(S,E,R)=>{if(!R.m){i(S,E,R);for(const j of R.d.keys())m(S,j,t(j,R)).t.add(E);if(R.m={l:new Set,d:new Set(R.d.keys()),t:new Set},(Zt?"production":void 0)!=="production"&&e.add(E),Zo(E)&&E.onMount){const j=R.m,{onMount:J}=E;jc(S,()=>{const z=J((...X)=>l(S,E,R,...X));z&&(j.u=z)})}}return R.m},y=(S,E,R)=>{if(R.m&&!R.m.l.size&&!Array.from(R.m.t).some(j=>{var J;return(J=t(j,R).m)==null?void 0:J.d.has(E)})){const j=R.m.u;j&&jc(S,j),delete R.m,(Zt?"production":void 0)!=="production"&&e.delete(E);for(const J of R.d.keys()){const z=y(S,J,t(J,R));z==null||z.t.delete(E)}return}return R.m},_={get:r,set:d,sub:(S,E)=>{const R=Li(),j=t(S),J=m(R,S,j);ui(R);const z=J.l;return z.add(E),()=>{z.delete(E);const X=Li();y(X,S,j),ui(X)}},unstable_derive:S=>Mf(...S(t))};return(Zt?"production":void 0)!=="production"&&Object.assign(_,{dev4_get_internal_weak_map:()=>({get:E=>{const R=t(E);if(R.n!==0)return R}}),dev4_get_mounted_atoms:()=>e,dev4_restore_atoms:E=>{const R=Li();for(const[j,J]of E)if(Qo(j)){const z=t(j),X="v"in z,ne=z.v;n(j,z,J),h(R,j,z),(!X||!Object.is(ne,z.v))&&(eu(R,j,z),o(R,j,z))}ui(R)}}),_},Ng=()=>{const t=new WeakMap;return Mf(n=>{let i=t.get(n);return i||(i={d:new Map,p:new Set,n:0},t.set(n,i)),i})};let Nr;const Ag=()=>(Nr||(Nr=Ng(),(Zt?"production":void 0)!=="production"&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=Nr),globalThis.__JOTAI_DEFAULT_STORE__!==Nr&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),Nr),Bf={},Og=je.createContext(void 0),Uf=t=>je.useContext(Og)||Ag(),jf=t=>typeof(t==null?void 0:t.then)=="function",xg=t=>{t.status="pending",t.then(e=>{t.status="fulfilled",t.value=e},e=>{t.status="rejected",t.reason=e})},Tg=je.use||(t=>{if(t.status==="pending")throw t;if(t.status==="fulfilled")return t.value;throw t.status==="rejected"?t.reason:(xg(t),t)}),tu=new WeakMap,Cg=t=>{let e=tu.get(t);return e||(e=new Promise((n,i)=>{let r=t;const s=d=>h=>{r===d&&n(h)},o=d=>h=>{r===d&&i(h)},l=d=>{"onCancel"in d&&typeof d.onCancel=="function"&&d.onCancel(h=>{if((Bf?"production":void 0)!=="production"&&h===d)throw new Error("[Bug] p is not updated even after cancelation");jf(h)?(tu.set(h,e),r=h,h.then(s(h),o(h)),l(h)):n(h)})};t.then(s(t),o(t)),l(t)}),tu.set(t,e)),e};function zu(t,e){const n=Uf(),[[i,r,s],o]=je.useReducer(h=>{const m=n.get(t);return Object.is(h[0],m)&&h[1]===n&&h[2]===t?h:[m,n,t]},void 0,()=>[n.get(t),n,t]);let l=i;if((r!==n||s!==t)&&(o(),l=n.get(t)),je.useEffect(()=>{const h=n.sub(t,()=>{o()});return o(),h},[n,t,void 0]),je.useDebugValue(l),jf(l)){const h=Cg(l);return Tg(h)}return l}function xl(t,e){const n=Uf();return je.useCallback((...r)=>{if((Bf?"production":void 0)!=="production"&&!("write"in t))throw new Error("not writable atom");return n.set(t,...r)},[n,t])}function nu(t,e){return[zu(t),xl(t)]}const Vf=Da(null);Vf.debugLabel="accountAtom";const Rg={},{NZ_BACKOFFICE_BACK_URL:Fg,NZ_CORE_SERVICES_GRAPHQL_URL:Ig,NZ_CORE_SERVICES_REST_URL:Dg}=Rg,rr={apiUrls:{restV1:Fg||"https://pabprg32bj.execute-api.us-east-1.amazonaws.com",restV2:Dg||"https://core-services-dev.nizza.com/api",graphql:Ig||"https://core-services-dev.nizza.com/graphql"},publicUrls:{wssIVSChat:"wss://edge.ivschat.us-east-1.amazonaws.com"}};async function vi(t){const{url:e,method:n="GET",body:i,raw:r=!1,contentTypeJson:s=!0,timeout:o,...l}=t,d=new Headers({...s?{"content-type":"application/json"}:{},...t.headers}),h=new AbortController,{signal:m}=h;let y;const g=fetch(e,{method:n,headers:d,body:i,signal:m,...l});o&&(y=setTimeout(()=>{h.abort()},o));const O=await g;if(r)return O;const _=await O.json();if(clearTimeout(y),!O.ok){const S=_?JSON.stringify(_):O.statusText;throw new Error(S)}return _}const Pg=t=>vi({...t,contentTypeJson:!1,raw:!1});function Lg(t,e,n){fetch(e).then(i=>i.blob()).then(i=>Hf(i,`${t}.${n}`))}const Hf=(t,e,n)=>{const i=[t],r=new Blob(i,{type:n!=null?n:"application/octet-stream"});if(typeof window.navigator.msSaveBlob!="undefined")return window.navigator.msSaveBlob(r,e);const s=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(r):window.webkitURL.createObjectURL(r),o=document.createElement("a");return o.style.display="none",o.href=s,o.setAttribute("download",e),typeof o.download=="undefined"&&o.setAttribute("target","_blank"),document.body.appendChild(o),o.click(),setTimeout(()=>{document.body.removeChild(o),window.URL.revokeObjectURL(s)},200)};var $g="2.0.3",Ku=500,Vc="user-agent",Xi="",Hc="?",fa="function",qn="undefined",Qi="object",Gu="string",Ft="browser",kn="cpu",dn="device",en="engine",Gt="os",Ji="result",ee="name",W="type",Z="vendor",te="version",It="architecture",Qr="major",Q="model",Br="console",Pe="mobile",Qe="tablet",gt="smarttv",cn="wearable",iu="xr",Ur="embedded",Ar="inapp",Tl="brands",di="formFactors",Cl="fullVersionList",Yi="platform",Rl="platformVersion",Pa="bitness",Xn="sec-ch-ua",Mg=Xn+"-full-version-list",Bg=Xn+"-arch",Ug=Xn+"-"+Pa,jg=Xn+"-form-factors",Vg=Xn+"-"+Pe,Hg=Xn+"-"+Q,qf=Xn+"-"+Yi,qg=qf+"-version",zf=[Tl,Cl,Pe,Q,Yi,Rl,It,di,Pa],qs="Amazon",$i="Apple",qc="ASUS",zc="BlackBerry",li="Google",Kc="Huawei",Gc="Lenovo",Wc="Honor",zs="LG",ru="Microsoft",su="Motorola",au="Nvidia",Jc="OnePlus",ou="OPPO",Or="Samsung",Yc="Sharp",xr="Sony",uu="Xiaomi",lu="Zebra",Xc="Chrome",Qc="Chromium",Bn="Chromecast",zg="Edge",Tr="Firefox",Cr="Opera",cu="Facebook",Zc="Sogou",Mi="Mobile ",Rr=" Browser",Wu="Windows",Kg=typeof window!==qn,Dt=Kg&&window.navigator?window.navigator:void 0,jn=Dt&&Dt.userAgentData?Dt.userAgentData:void 0,Gg=function(t,e){var n={},i=e;if(!ha(e)){i={};for(var r in e)for(var s in e[r])i[s]=e[r][s].concat(i[s]?i[s]:[])}for(var o in t)n[o]=i[o]&&i[o].length%2===0?i[o].concat(t[o]):t[o];return n},La=function(t){for(var e={},n=0;n<t.length;n++)e[t[n].toUpperCase()]=t[n];return e},Ju=function(t,e){if(typeof t===Qi&&t.length>0){for(var n in t)if(Sn(t[n])==Sn(e))return!0;return!1}return sr(t)?Sn(e).indexOf(Sn(t))!==-1:!1},ha=function(t,e){for(var n in t)return/^(browser|cpu|device|engine|os)$/.test(n)||(e?ha(t[n]):!1)},sr=function(t){return typeof t===Gu},du=function(t){if(t){for(var e=[],n=Zi(/\\?\"/g,t).split(","),i=0;i<n.length;i++)if(n[i].indexOf(";")>-1){var r=Zr(n[i]).split(";v=");e[i]={brand:r[0],version:r[1]}}else e[i]=Zr(n[i]);return e}},Sn=function(t){return sr(t)?t.toLowerCase():t},fu=function(t){return sr(t)?Zi(/[^\d\.]/g,t).split(".")[0]:void 0},En=function(t){for(var e in t){var n=t[e];typeof n==Qi&&n.length==2?this[n[0]]=n[1]:this[n]=void 0}return this},Zi=function(t,e){return sr(e)?e.replace(t,Xi):e},Fr=function(t){return Zi(/\\?\"/g,t)},Zr=function(t,e){if(sr(t))return t=Zi(/^\s\s*/,t),typeof e===qn?t:t.substring(0,Ku)},hu=function(t,e){if(!(!t||!e))for(var n=0,i,r,s,o,l,d;n<e.length&&!l;){var h=e[n],m=e[n+1];for(i=r=0;i<h.length&&!l&&h[i];)if(l=h[i++].exec(t),l)for(s=0;s<m.length;s++)d=l[++r],o=m[s],typeof o===Qi&&o.length>0?o.length===2?typeof o[1]==fa?this[o[0]]=o[1].call(this,d):this[o[0]]=o[1]:o.length===3?typeof o[1]===fa&&!(o[1].exec&&o[1].test)?this[o[0]]=d?o[1].call(this,d,o[2]):void 0:this[o[0]]=d?d.replace(o[1],o[2]):void 0:o.length===4&&(this[o[0]]=d?o[3].call(this,d.replace(o[1],o[2])):void 0):this[o]=d||void 0;n+=2}},Vn=function(t,e){for(var n in e)if(typeof e[n]===Qi&&e[n].length>0){for(var i=0;i<e[n].length;i++)if(Ju(e[n][i],t))return n===Hc?void 0:n}else if(Ju(e[n],t))return n===Hc?void 0:n;return e.hasOwnProperty("*")?e["*"]:t},ed={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},td={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},nd={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[te,[ee,Mi+"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[te,[ee,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[ee,te],[/opios[\/ ]+([\w\.]+)/i],[te,[ee,Cr+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[te,[ee,Cr+" GX"]],[/\bopr\/([\w\.]+)/i],[te,[ee,Cr]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[te,[ee,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[te,[ee,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser)\/([-\w\.]+)/i,/(heytap|ovi|115|surf)browser\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[ee,te],[/quark(?:pc)?\/([-\w\.]+)/i],[te,[ee,"Quark"]],[/\bddg\/([\w\.]+)/i],[te,[ee,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[te,[ee,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[te,[ee,"WeChat"]],[/konqueror\/([\w\.]+)/i],[te,[ee,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[te,[ee,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[te,[ee,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[te,[ee,"Smart "+Gc+Rr]],[/(avast|avg)\/([\w\.]+)/i],[[ee,/(.+)/,"$1 Secure"+Rr],te],[/\bfocus\/([\w\.]+)/i],[te,[ee,Tr+" Focus"]],[/\bopt\/([\w\.]+)/i],[te,[ee,Cr+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[te,[ee,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[te,[ee,"Dolphin"]],[/coast\/([\w\.]+)/i],[te,[ee,Cr+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[te,[ee,"MIUI"+Rr]],[/fxios\/([\w\.-]+)/i],[te,[ee,Mi+Tr]],[/\bqihoobrowser\/?([\w\.]*)/i],[te,[ee,"360"]],[/\b(qq)\/([\w\.]+)/i],[[ee,/(.+)/,"$1Browser"],te],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[ee,/(.+)/,"$1"+Rr],te],[/samsungbrowser\/([\w\.]+)/i],[te,[ee,Or+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[te,[ee,Zc+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[ee,Zc+" Mobile"],te],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[ee,te],[/(lbbrowser|rekonq)/i],[ee],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[te,ee],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[ee,cu],te,[W,Ar]],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(instagram|snapchat)[\/ ]([-\w\.]+)/i],[ee,te,[W,Ar]],[/\bgsa\/([\w\.]+) .*safari\//i],[te,[ee,"GSA"],[W,Ar]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[te,[ee,"TikTok"],[W,Ar]],[/\[(linkedin)app\]/i],[ee,[W,Ar]],[/(chromium)[\/ ]([-\w\.]+)/i],[ee,te],[/headlesschrome(?:\/([\w\.]+)| )/i],[te,[ee,Xc+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[ee,Xc+" WebView"],te],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[te,[ee,"Android"+Rr]],[/chrome\/([\w\.]+) mobile/i],[te,[ee,Mi+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[ee,te],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[te,[ee,Mi+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[ee,Mi+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[te,ee],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[ee,[te,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[ee,te],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[ee,Mi+Tr],te],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[ee,"Netscape"],te],[/(wolvic|librewolf)\/([\w\.]+)/i],[ee,te],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[te,[ee,Tr+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[ee,[te,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[ee,[te,/[^\d\.]+./,Xi]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[It,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[It,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[It,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[It,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[It,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[It,/ower/,Xi,Sn]],[/ sun4\w[;\)]/i],[[It,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[It,Sn]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[Q,[Z,Or],[W,Qe]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[Q,[Z,Or],[W,Pe]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[Q,[Z,$i],[W,Pe]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[Q,[Z,$i],[W,Qe]],[/(macintosh);/i],[Q,[Z,$i]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[Q,[Z,Yc],[W,Pe]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[Q,[Z,Wc],[W,Qe]],[/honor([-\w ]+)[;\)]/i],[Q,[Z,Wc],[W,Pe]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[Q,[Z,Kc],[W,Qe]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[Q,[Z,Kc],[W,Pe]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[Q,/_/g," "],[Z,uu],[W,Qe]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[Q,/_/g," "],[Z,uu],[W,Pe]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[Q,[Z,ou],[W,Pe]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[Q,[Z,Vn,{OnePlus:["304","403","203"],"*":ou}],[W,Qe]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[Q,[Z,"BLU"],[W,Pe]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[Q,[Z,"Vivo"],[W,Pe]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[Q,[Z,"Realme"],[W,Pe]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[Q,[Z,su],[W,Pe]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[Q,[Z,su],[W,Qe]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[Q,[Z,zs],[W,Qe]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch))(\w+)/i,/\blg-?([\d\w]+) bui/i],[Q,[Z,zs],[W,Pe]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[Q,[Z,Gc],[W,Qe]],[/(nokia) (t[12][01])/i],[Z,Q,[W,Qe]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[Q,/_/g," "],[W,Pe],[Z,"Nokia"]],[/(pixel (c|tablet))\b/i],[Q,[Z,li],[W,Qe]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[Q,[Z,li],[W,Pe]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[Q,[Z,xr],[W,Pe]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[Q,"Xperia Tablet"],[Z,xr],[W,Qe]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[Q,[Z,Jc],[W,Pe]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[Q,[Z,qs],[W,Qe]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[Q,/(.+)/g,"Fire Phone $1"],[Z,qs],[W,Pe]],[/(playbook);[-\w\),; ]+(rim)/i],[Q,Z,[W,Qe]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[Q,[Z,zc],[W,Pe]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[Q,[Z,qc],[W,Qe]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[Q,[Z,qc],[W,Pe]],[/(nexus 9)/i],[Q,[Z,"HTC"],[W,Qe]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[Z,[Q,/_/g," "],[W,Pe]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[Q,[Z,"TCL"],[W,Qe]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[Q,[Z,"TCL"],[W,Pe]],[/(itel) ((\w+))/i],[[Z,Sn],Q,[W,Vn,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[Q,[Z,"Acer"],[W,Qe]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[Q,[Z,"Meizu"],[W,Pe]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[Q,[Z,"Ulefone"],[W,Pe]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[Q,[Z,"Energizer"],[W,Pe]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[Q,[Z,"Cat"],[W,Pe]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[Q,[Z,"Smartfren"],[W,Pe]],[/droid.+; (a(?:015|06[35]|142p?))/i],[Q,[Z,"Nothing"],[W,Pe]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[Q,[Z,"Archos"],[W,Qe]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[Q,[Z,"Archos"],[W,Pe]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[Z,Q,[W,Qe]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|tcl)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[Z,Q,[W,Pe]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[Z,Q,[W,Qe]],[/(surface duo)/i],[Q,[Z,ru],[W,Qe]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[Q,[Z,"Fairphone"],[W,Pe]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[Q,[Z,au],[W,Qe]],[/(sprint) (\w+)/i],[Z,Q,[W,Pe]],[/(kin\.[onetw]{3})/i],[[Q,/\./g," "],[Z,ru],[W,Pe]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[Q,[Z,lu],[W,Qe]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[Q,[Z,lu],[W,Pe]],[/smart-tv.+(samsung)/i],[Z,[W,gt]],[/hbbtv.+maple;(\d+)/i],[[Q,/^/,"SmartTV"],[Z,Or],[W,gt]],[/tcast.+(lg)e?. ([-\w]+)/i],[Z,Q,[W,gt]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[Z,zs],[W,gt]],[/(apple) ?tv/i],[Z,[Q,$i+" TV"],[W,gt]],[/crkey.*devicetype\/chromecast/i],[[Q,Bn+" Third Generation"],[Z,li],[W,gt]],[/crkey.*devicetype\/([^/]*)/i],[[Q,/^/,"Chromecast "],[Z,li],[W,gt]],[/fuchsia.*crkey/i],[[Q,Bn+" Nest Hub"],[Z,li],[W,gt]],[/crkey/i],[[Q,Bn],[Z,li],[W,gt]],[/(portaltv)/i],[Q,[Z,cu],[W,gt]],[/droid.+aft(\w+)( bui|\))/i],[Q,[Z,qs],[W,gt]],[/(shield \w+ tv)/i],[Q,[Z,au],[W,gt]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[Q,[Z,Yc],[W,gt]],[/(bravia[\w ]+)( bui|\))/i],[Q,[Z,xr],[W,gt]],[/(mi(tv|box)-?\w+) bui/i],[Q,[Z,uu],[W,gt]],[/Hbbtv.*(technisat) (.*);/i],[Z,Q,[W,gt]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[Z,Zr],[Q,Zr],[W,gt]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[Q,[W,gt]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[W,gt]],[/(ouya)/i,/(nintendo) (\w+)/i],[Z,Q,[W,Br]],[/droid.+; (shield)( bui|\))/i],[Q,[Z,au],[W,Br]],[/(playstation \w+)/i],[Q,[Z,xr],[W,Br]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[Q,[Z,ru],[W,Br]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[Q,[Z,Or],[W,cn]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[Z,Q,[W,cn]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[Q,[Z,ou],[W,cn]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[Q,[Z,$i],[W,cn]],[/(opwwe\d{3})/i],[Q,[Z,Jc],[W,cn]],[/(moto 360)/i],[Q,[Z,su],[W,cn]],[/(smartwatch 3)/i],[Q,[Z,xr],[W,cn]],[/(g watch r)/i],[Q,[Z,zs],[W,cn]],[/droid.+; (wt63?0{2,3})\)/i],[Q,[Z,lu],[W,cn]],[/droid.+; (glass) \d/i],[Q,[Z,li],[W,iu]],[/(pico) (4|neo3(?: link|pro)?)/i],[Z,Q,[W,iu]],[/(quest( \d| pro)?s?).+vr/i],[Q,[Z,cu],[W,iu]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[Z,[W,Ur]],[/(aeobc)\b/i],[Q,[Z,qs],[W,Ur]],[/(homepod).+mac os/i],[Q,[Z,$i],[W,Ur]],[/windows iot/i],[[W,Ur]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[Q,[W,Vn,{mobile:"Mobile",xr:"VR","*":Qe}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[W,Qe]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[W,Pe]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[Q,[Z,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[te,[ee,zg+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[ee,te],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[te,[ee,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[ee,te],[/ladybird\//i],[[ee,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[te,ee]],os:[[/microsoft (windows) (vista|xp)/i],[ee,te],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[ee,[te,Vn,ed]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[te,Vn,ed],[ee,Wu]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[te,/_/g,"."],[ee,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[ee,"macOS"],[te,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[te,[ee,Bn+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[te,[ee,Bn+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[te,[ee,Bn+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[te,[ee,Bn+" Linux"]],[/crkey\/([\d\.]+)/i],[te,[ee,Bn]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[te,ee],[/(ubuntu) ([\w\.]+) like android/i],[[ee,/(.+)/,"$1 Touch"],te],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/\.; ]?([\d\.]*)/i],[ee,te],[/\(bb(10);/i],[te,[ee,zc]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[te,[ee,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[te,[ee,Tr+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[te,[ee,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[te,[ee,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[ee,"Chrome OS"],te],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[ee,te],[/(sunos) ?([\w\.\d]*)/i],[[ee,"Solaris"],te],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[ee,te]]},Ks=function(){var t={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return En.call(t.init,[[Ft,[ee,te,Qr,W]],[kn,[It]],[dn,[W,Q,Z]],[en,[ee,te]],[Gt,[ee,te]]]),En.call(t.isIgnore,[[Ft,[te,Qr]],[en,[te]],[Gt,[te]]]),En.call(t.isIgnoreRgx,[[Ft,/ ?browser$/i],[Gt,/ ?os$/i]]),En.call(t.toString,[[Ft,[ee,te]],[kn,[It]],[dn,[Z,Q]],[en,[ee,te]],[Gt,[ee,te]]]),t}(),Wg=function(t,e){var n=Ks.init[e],i=Ks.isIgnore[e]||0,r=Ks.isIgnoreRgx[e]||0,s=Ks.toString[e]||0;function o(){En.call(this,n)}return o.prototype.getItem=function(){return t},o.prototype.withClientHints=function(){return jn?jn.getHighEntropyValues(zf).then(function(l){return t.setCH(new Kf(l,!1)).parseCH().get()}):t.parseCH().get()},o.prototype.withFeatureCheck=function(){return t.detectFeature().get()},e!=Ji&&(o.prototype.is=function(l){var d=!1;for(var h in this)if(this.hasOwnProperty(h)&&!Ju(i,h)&&Sn(r?Zi(r,this[h]):this[h])==Sn(r?Zi(r,l):l)){if(d=!0,l!=qn)break}else if(l==qn&&d){d=!d;break}return d},o.prototype.toString=function(){var l=Xi;for(var d in s)typeof this[s[d]]!==qn&&(l+=(l?" ":Xi)+this[s[d]]);return l||qn}),jn||(o.prototype.then=function(l){var d=this,h=function(){for(var y in d)d.hasOwnProperty(y)&&(this[y]=d[y])};h.prototype={is:o.prototype.is,toString:o.prototype.toString};var m=new h;return l(m),m}),new o};function Kf(t,e){if(t=t||{},En.call(this,zf),e)En.call(this,[[Tl,du(t[Xn])],[Cl,du(t[Mg])],[Pe,/\?1/.test(t[Vg])],[Q,Fr(t[Hg])],[Yi,Fr(t[qf])],[Rl,Fr(t[qg])],[It,Fr(t[Bg])],[di,du(t[jg])],[Pa,Fr(t[Ug])]]);else for(var n in t)this.hasOwnProperty(n)&&typeof t[n]!==qn&&(this[n]=t[n])}function id(t,e,n,i){return this.get=function(r){return r?this.data.hasOwnProperty(r)?this.data[r]:void 0:this.data},this.set=function(r,s){return this.data[r]=s,this},this.setCH=function(r){return this.uaCH=r,this},this.detectFeature=function(){if(Dt&&Dt.userAgent==this.ua)switch(this.itemType){case Ft:Dt.brave&&typeof Dt.brave.isBrave==fa&&this.set(ee,"Brave");break;case dn:!this.get(W)&&jn&&jn[Pe]&&this.set(W,Pe),this.get(Q)=="Macintosh"&&Dt&&typeof Dt.standalone!==qn&&Dt.maxTouchPoints&&Dt.maxTouchPoints>2&&this.set(Q,"iPad").set(W,Qe);break;case Gt:!this.get(ee)&&jn&&jn[Yi]&&this.set(ee,jn[Yi]);break;case Ji:var r=this.data,s=function(o){return r[o].getItem().detectFeature().get()};this.set(Ft,s(Ft)).set(kn,s(kn)).set(dn,s(dn)).set(en,s(en)).set(Gt,s(Gt))}return this},this.parseUA=function(){return this.itemType!=Ji&&hu.call(this.data,this.ua,this.rgxMap),this.itemType==Ft&&this.set(Qr,fu(this.get(te))),this},this.parseCH=function(){var r=this.uaCH,s=this.rgxMap;switch(this.itemType){case Ft:case en:var o=r[Cl]||r[Tl],l;if(o)for(var d in o){var h=o[d].brand||o[d],m=o[d].version;this.itemType==Ft&&!/not.a.brand/i.test(h)&&(!l||/chrom/i.test(l)&&h!=Qc)&&(h=Vn(h,{Chrome:"Google Chrome",Edge:"Microsoft Edge","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"}),this.set(ee,h).set(te,m).set(Qr,fu(m)),l=h),this.itemType==en&&h==Qc&&this.set(te,m)}break;case kn:var y=r[It];y&&(y&&r[Pa]=="64"&&(y+="64"),hu.call(this.data,y+";",s));break;case dn:if(r[Pe]&&this.set(W,Pe),r[Q]&&(this.set(Q,r[Q]),!this.get(W)||!this.get(Z))){var g={};hu.call(g,"droid 9; "+r[Q]+")",s),!this.get(W)&&g.type&&this.set(W,g.type),!this.get(Z)&&g.vendor&&this.set(Z,g.vendor)}if(r[di]){var O;if(typeof r[di]!="string")for(var _=0;!O&&_<r[di].length;)O=Vn(r[di][_++],td);else O=Vn(r[di],td);this.set(W,O)}break;case Gt:var S=r[Yi];if(S){var E=r[Rl];S==Wu&&(E=parseInt(fu(E),10)>=13?"11":"10"),this.set(ee,S).set(te,E)}this.get(ee)==Wu&&r[Q]=="Xbox"&&this.set(ee,"Xbox").set(te,void 0);break;case Ji:var R=this.data,j=function(J){return R[J].getItem().setCH(r).parseCH().get()};this.set(Ft,j(Ft)).set(kn,j(kn)).set(dn,j(dn)).set(en,j(en)).set(Gt,j(Gt))}return this},En.call(this,[["itemType",t],["ua",e],["uaCH",i],["rgxMap",n],["data",Wg(this,t)]]),this}function On(t,e,n){if(typeof t===Qi?(ha(t,!0)?(typeof e===Qi&&(n=e),e=t):(n=t,e=void 0),t=void 0):typeof t===Gu&&!ha(e,!0)&&(n=e,e=void 0),n&&typeof n.append===fa){var i={};n.forEach(function(d,h){i[h]=d}),n=i}if(!(this instanceof On))return new On(t,e,n).getResult();var r=typeof t===Gu?t:n&&n[Vc]?n[Vc]:Dt&&Dt.userAgent?Dt.userAgent:Xi,s=new Kf(n,!0),o=e?Gg(nd,e):nd,l=function(d){return d==Ji?function(){return new id(d,r,o,s).set("ua",r).set(Ft,this.getBrowser()).set(kn,this.getCPU()).set(dn,this.getDevice()).set(en,this.getEngine()).set(Gt,this.getOS()).get()}:function(){return new id(d,r,o[d],s).parseUA().get()}};return En.call(this,[["getBrowser",l(Ft)],["getCPU",l(kn)],["getDevice",l(dn)],["getEngine",l(en)],["getOS",l(Gt)],["getResult",l(Ji)],["getUA",function(){return r}],["setUA",function(d){return sr(d)&&(r=d.length>Ku?Zr(d,Ku):d),this}]]).setUA(r),this}On.VERSION=$g;On.BROWSER=La([ee,te,Qr,W]);On.CPU=La([It]);On.DEVICE=La([Q,Z,W,Br,Pe,gt,Qe,cn,Ur]);On.ENGINE=On.OS=La([ee,te]);function Hi(t){return t!=null&&typeof t=="object"&&t["@@functional/placeholder"]===!0}function ta(t){return function e(n){return arguments.length===0||Hi(n)?e:t.apply(this,arguments)}}function Jg(t){return function e(n,i){switch(arguments.length){case 0:return e;case 1:return Hi(n)?e:ta(function(r){return t(n,r)});default:return Hi(n)&&Hi(i)?e:Hi(n)?ta(function(r){return t(r,i)}):Hi(i)?ta(function(r){return t(n,r)}):t(n,i)}}}const Yg=Number.isInteger||function(e){return e<<0===e};function Xg(t){return Object.prototype.toString.call(t)==="[object String]"}function Qg(t,e){var n=t<0?e.length+t:t;return Xg(e)?e.charAt(n):e[n]}var Zg=ta(function(e){return e==null});function ev(t,e){for(var n=e,i=0;i<t.length;i+=1){if(n==null)return;var r=t[i];Yg(r)?n=Qg(r,n):n=n[r]}return n}var tv=Jg(ev);class Cn extends Error{constructor(e,n,i){super(n),this.value=i,this.name=e,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toDTO(){return{name:this.name,message:this.message,...this.value&&{value:this.value},...this.stack&&{stack:this.formatStack()}}}formatStack(){return this.stack?this.stack.split(`
|
|
2
|
+
`).map(e=>e.trim()).join(" | "):""}}class nv extends Cn{constructor(e){super("RESOURCE_NOT_FOUND_ERROR",`Resource with id '${e}' not found.`,e)}}class Fl extends Cn{constructor(e){var n;super("APP_UNEXPECTED_ERROR",(n=e.message)!=null?n:"An unexpected error occurred.",e)}}class Gf extends Cn{constructor(){super("APP_ACCOUNT_INVALID_ERROR","Account not defined")}}class Wf extends Cn{constructor(e){super("INVALID_NIZZA_GLOBAL_OBJECT_ERROR",`
|
|
3
3
|
Configuration property invalid: "${e}".
|
|
4
4
|
|
|
5
5
|
It looks like you are trying to use a configuration property that is required but is "undefined", make sure you have initialized the global object "nizza".
|
|
@@ -21,29 +21,29 @@
|
|
|
21
21
|
account: env.account,
|
|
22
22
|
...
|
|
23
23
|
});
|
|
24
|
-
`)}}function
|
|
25
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
26
|
-
'`+a.annotationType_+"' can only be used on properties with a function value."))}function tv(t,e,n,i){e.annotationType_,i.value}function Kf(t,e,n,i,r){var a,o,l,d,h,m,y;r===void 0&&(r=ke.safeDescriptors),tv(t,e,n,i);var g=i.value;if((a=e.options_)!=null&&a.bound){var O;g=g.bind((O=t.proxy_)!=null?O:t.target_)}return{value:Jn((o=(l=e.options_)==null?void 0:l.name)!=null?o:n.toString(),g,(d=(h=e.options_)==null?void 0:h.autoAction)!=null?d:!1,(m=e.options_)!=null&&m.bound?(y=t.proxy_)!=null?y:t.target_:void 0),configurable:r?t.isPlainObject_:!0,enumerable:!1,writable:!r}}function zf(t,e){return{annotationType_:t,options_:e,make_:nv,extend_:iv,decorate_20223_:rv}}function nv(t,e,n,i){var r;if(i===t.target_)return this.extend_(t,e,n,!1)===null?0:2;if((r=this.options_)!=null&&r.bound&&(!Nn(t.target_,e)||!Yr(t.target_[e]))&&this.extend_(t,e,n,!1)===null)return 0;if(Yr(n.value))return 1;var a=Gf(t,this,e,n,!1,!1);return pn(i,e,a),2}function iv(t,e,n,i){var r,a=Gf(t,this,e,n,(r=this.options_)==null?void 0:r.bound);return t.defineProperty_(e,a,i)}function rv(t,e){var n,i=e.name,r=e.addInitializer;return Yr(t)||(t=Xi(t)),(n=this.options_)!=null&&n.bound&&r(function(){var a=this,o=a[i].bind(a);o.isMobXFlow=!0,a[i]=o}),t}function av(t,e,n,i){e.annotationType_,i.value}function Gf(t,e,n,i,r,a){a===void 0&&(a=ke.safeDescriptors),av(t,e,n,i);var o=i.value;if(Yr(o)||(o=Xi(o)),r){var l;o=o.bind((l=t.proxy_)!=null?l:t.target_),o.isMobXFlow=!0}return{value:o,configurable:a?t.isPlainObject_:!0,enumerable:!1,writable:!a}}function Nl(t,e){return{annotationType_:t,options_:e,make_:sv,extend_:ov,decorate_20223_:uv}}function sv(t,e,n){return this.extend_(t,e,n,!1)===null?0:1}function ov(t,e,n,i){return lv(t,this,e,n),t.defineComputedProperty_(e,Wn({},this.options_,{get:n.get,set:n.set}),i)}function uv(t,e){var n=this,i=e.name,r=e.addInitializer;return r(function(){var a=sr(this)[Ce],o=Wn({},n.options_,{get:t,context:this});o.name||(o.name="ObservableObject."+i.toString()),a.values_.set(i,new an(o))}),function(){return this[Ce].getObservablePropValue_(i)}}function lv(t,e,n,i){e.annotationType_,i.get}function Ls(t,e){return{annotationType_:t,options_:e,make_:cv,extend_:dv,decorate_20223_:fv}}function cv(t,e,n){return this.extend_(t,e,n,!1)===null?0:1}function dv(t,e,n,i){var r,a;return hv(t,this),t.defineObservableProperty_(e,n.value,(r=(a=this.options_)==null?void 0:a.enhancer)!=null?r:vi,i)}function fv(t,e){var n=this,i=e.kind,r=e.name,a=new WeakSet;function o(l,d){var h,m,y=sr(l)[Ce],g=new hi(d,(h=(m=n.options_)==null?void 0:m.enhancer)!=null?h:vi,"ObservableObject."+r.toString(),!1);y.values_.set(r,g),a.add(l)}if(i=="accessor")return{get:function(){return a.has(this)||o(this,t.get.call(this)),this[Ce].getObservablePropValue_(r)},set:function(d){return a.has(this)||o(this,d),this[Ce].setObservablePropValue_(r,d)},init:function(d){return a.has(this)||o(this,d),d}}}function hv(t,e,n,i){e.annotationType_}var pv="true",mv=Wf();function Wf(t){return{annotationType_:pv,options_:t,make_:gv,extend_:vv,decorate_20223_:yv}}function gv(t,e,n,i){var r,a;if(n.get)return qn.make_(t,e,n,i);if(n.set){var o=Jn(e.toString(),n.set);return i===t.target_?t.defineProperty_(e,{configurable:ke.safeDescriptors?t.isPlainObject_:!0,set:o})===null?0:2:(pn(i,e,{configurable:!0,set:o}),2)}if(i!==t.target_&&typeof n.value=="function"){var l;if(Bf(n.value)){var d,h=(d=this.options_)!=null&&d.autoBind?Xi.bound:Xi;return h.make_(t,e,n,i)}var m=(l=this.options_)!=null&&l.autoBind?Jr.bound:Jr;return m.make_(t,e,n,i)}var y=((r=this.options_)==null?void 0:r.deep)===!1?ht.ref:ht;if(typeof n.value=="function"&&(a=this.options_)!=null&&a.autoBind){var g;n.value=n.value.bind((g=t.proxy_)!=null?g:t.target_)}return y.make_(t,e,n,i)}function vv(t,e,n,i){var r,a;if(n.get)return qn.extend_(t,e,n,i);if(n.set)return t.defineProperty_(e,{configurable:ke.safeDescriptors?t.isPlainObject_:!0,set:Jn(e.toString(),n.set)},i);if(typeof n.value=="function"&&(r=this.options_)!=null&&r.autoBind){var o;n.value=n.value.bind((o=t.proxy_)!=null?o:t.target_)}var l=((a=this.options_)==null?void 0:a.deep)===!1?ht.ref:ht;return l.extend_(t,e,n,i)}function yv(t,e){We("'"+this.annotationType_+"' cannot be used as a decorator")}var bv="observable",kv="observable.ref",_v="observable.shallow",wv="observable.struct",Jf={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(Jf);function Va(t){return t||Jf}var qu=Ls(bv),Sv=Ls(kv,{enhancer:Ps}),Ev=Ls(_v,{enhancer:Wg}),Nv=Ls(wv,{enhancer:Jg}),Yf=mn(qu);function Ha(t){return t.deep===!0?vi:t.deep===!1?Ps:Ov(t.defaultDecorator)}function Av(t){var e;return t?(e=t.defaultDecorator)!=null?e:Wf(t):void 0}function Ov(t){var e,n;return t&&(e=(n=t.options_)==null?void 0:n.enhancer)!=null?e:vi}function Xf(t,e,n){if(ra(e))return qu.decorate_20223_(t,e);if(gi(e)){rr(t,e,qu);return}return mh(t)?t:Gn(t)?ht.object(t,e,n):Array.isArray(t)?ht.array(t,e):nr(t)?ht.map(t,e):_n(t)?ht.set(t,e):typeof t=="object"&&t!==null?t:ht.box(t,e)}Lf(Xf,Yf);var xv={box:function(e,n){var i=Va(n);return new hi(e,Ha(i),i.name,!0,i.equals)},array:function(e,n){var i=Va(n);return(ke.useProxies===!1||i.proxy===!1?wy:fy)(e,Ha(i),i.name)},map:function(e,n){var i=Va(n);return new yh(e,Ha(i),i.name)},set:function(e,n){var i=Va(n);return new bh(e,Ha(i),i.name)},object:function(e,n,i){return Ei(function(){return ty(ke.useProxies===!1||(i==null?void 0:i.proxy)===!1?sr({},i):uy({},i),e,n)})},ref:mn(Sv),shallow:mn(Ev),deep:Yf,struct:mn(Nv)},ht=Lf(Xf,xv),Qf="computed",Tv="computed.struct",Ku=Nl(Qf),Cv=Nl(Tv,{equals:Yi.structural}),qn=function(e,n){if(ra(n))return Ku.decorate_20223_(e,n);if(gi(n))return rr(e,n,Ku);if(Gn(e))return mn(Nl(Qf,e));var i=Gn(n)?n:{};return i.get=e,i.name||(i.name=e.name||""),new an(i)};Object.assign(qn,Ku);qn.struct=mn(Cv);var zc,Gc,ls=0,Rv=1,Fv=(zc=(Gc=us(function(){},"name"))==null?void 0:Gc.configurable)!=null?zc:!1,Wc={value:"action",configurable:!0,writable:!1,enumerable:!1};function Jn(t,e,n,i){n===void 0&&(n=!1);function r(){return Iv(t,n,e,i||this,arguments)}return r.isMobxAction=!0,r.toString=function(){return e.toString()},Fv&&(Wc.value=t,pn(r,"name",Wc)),r}function Iv(t,e,n,i,r){var a=Dv(t,e);try{return n.apply(i,r)}catch(o){throw a.error_=o,o}finally{Pv(a)}}function Dv(t,e,n,i){var r=!1,a=0,o=ke.trackingDerivation,l=!e||!o;Yt();var d=ke.allowStateChanges;l&&(wi(),d=$s(!0));var h=Al(!0),m={runAsAction_:l,prevDerivation_:o,prevAllowStateChanges_:d,prevAllowStateReads_:h,notifySpy_:r,startTime_:a,actionId_:Rv++,parentActionId_:ls};return ls=m.actionId_,m}function Pv(t){ls!==t.actionId_&&We(30),ls=t.parentActionId_,t.error_!==void 0&&(ke.suppressReactionErrors=!0),Ms(t.prevAllowStateChanges_),Br(t.prevAllowStateReads_),Xt(),t.runAsAction_&&An(t.prevDerivation_),ke.suppressReactionErrors=!1}function Zf(t,e){var n=$s(t);try{return e()}finally{Ms(n)}}function $s(t){var e=ke.allowStateChanges;return ke.allowStateChanges=t,e}function Ms(t){ke.allowStateChanges=t}var hi=function(t){function e(i,r,a,o,l){var d;return a===void 0&&(a="ObservableValue"),l===void 0&&(l=Yi.default),d=t.call(this,a)||this,d.enhancer=void 0,d.name_=void 0,d.equals=void 0,d.hasUnreportedChange_=!1,d.interceptors_=void 0,d.changeListeners_=void 0,d.value_=void 0,d.dehancer=void 0,d.enhancer=r,d.name_=a,d.equals=l,d.value_=r(i,void 0,a),d}Hf(e,t);var n=e.prototype;return n.dehanceValue=function(r){return this.dehancer!==void 0?this.dehancer(r):r},n.set=function(r){this.value_,r=this.prepareNewValue_(r),r!==ke.UNCHANGED&&this.setNewValue_(r)},n.prepareNewValue_=function(r){if(Wt(this)){var a=Jt(this,{object:this,type:gn,newValue:r});if(!a)return ke.UNCHANGED;r=a.newValue}return r=this.enhancer(r,this.value_,this.name_),this.equals(this.value_,r)?ke.UNCHANGED:r},n.setNewValue_=function(r){var a=this.value_;this.value_=r,this.reportChanged(),tn(this)&&nn(this,{type:gn,object:this,newValue:r,oldValue:a})},n.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(r){return sa(this,r)},n.observe_=function(r,a){return a&&r({observableKind:"value",debugObjectName:this.name_,object:this,type:gn,newValue:this.value_,oldValue:void 0}),oa(this,r)},n.raw=function(){return this.value_},n.toJSON=function(){return this.get()},n.toString=function(){return this.name_+"["+this.value_+"]"},n.valueOf=function(){return Vf(this.get())},n[Symbol.toPrimitive]=function(){return this.valueOf()},e}(Xn),an=function(){function t(n){this.dependenciesState_=Ge.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Ge.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new ds(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.isTracing_=cs.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,n.get||We(31),this.derivation=n.get,this.name_=n.name||"ComputedValue",n.set&&(this.setter_=Jn("ComputedValue-setter",n.set)),this.equals_=n.equals||(n.compareStructural||n.struct?Yi.structural:Yi.default),this.scope_=n.context,this.requiresReaction_=n.requiresReaction,this.keepAlive_=!!n.keepAlive}var e=t.prototype;return e.onBecomeStale_=function(){Bv(this)},e.onBO=function(){this.onBOL&&this.onBOL.forEach(function(i){return i()})},e.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(i){return i()})},e.get=function(){if(this.isComputing&&We(32,this.name_,this.derivation),ke.inBatch===0&&this.observers_.size===0&&!this.keepAlive_)zu(this)&&(this.warnAboutUntrackedRead_(),Yt(),this.value_=this.computeValue_(!1),Xt());else if(ah(this),zu(this)){var i=ke.trackingContext;this.keepAlive_&&!i&&(ke.trackingContext=this),this.trackAndCompute()&&Mv(this),ke.trackingContext=i}var r=this.value_;if(Xa(r))throw r.cause;return r},e.set=function(i){if(this.setter_){this.isRunningSetter&&We(33,this.name_),this.isRunningSetter=!0;try{this.setter_.call(this.scope_,i)}finally{this.isRunningSetter=!1}}else We(34,this.name_)},e.trackAndCompute=function(){var i=this.value_,r=this.dependenciesState_===Ge.NOT_TRACKING_,a=this.computeValue_(!0),o=r||Xa(i)||Xa(a)||!this.equals_(i,a);return o&&(this.value_=a),o},e.computeValue_=function(i){this.isComputing=!0;var r=$s(!1),a;if(i)a=eh(this,this.derivation,this.scope_);else if(ke.disableErrorBoundaries===!0)a=this.derivation.call(this.scope_);else try{a=this.derivation.call(this.scope_)}catch(o){a=new ds(o)}return Ms(r),this.isComputing=!1,a},e.suspend_=function(){this.keepAlive_||(Gu(this),this.value_=void 0)},e.observe_=function(i,r){var a=this,o=!0,l=void 0;return js(function(){var d=a.get();if(!o||r){var h=wi();i({observableKind:"computed",debugObjectName:a.name_,type:gn,object:a,newValue:d,oldValue:l}),An(h)}o=!1,l=d})},e.warnAboutUntrackedRead_=function(){},e.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},e.valueOf=function(){return Vf(this.get())},e[Symbol.toPrimitive]=function(){return this.valueOf()},ir(t,[{key:"isComputing",get:function(){return Ut(this.flags_,t.isComputingMask_)},set:function(i){this.flags_=jt(this.flags_,t.isComputingMask_,i)}},{key:"isRunningSetter",get:function(){return Ut(this.flags_,t.isRunningSetterMask_)},set:function(i){this.flags_=jt(this.flags_,t.isRunningSetterMask_,i)}},{key:"isBeingObserved",get:function(){return Ut(this.flags_,t.isBeingObservedMask_)},set:function(i){this.flags_=jt(this.flags_,t.isBeingObservedMask_,i)}},{key:"isPendingUnobservation",get:function(){return Ut(this.flags_,t.isPendingUnobservationMask_)},set:function(i){this.flags_=jt(this.flags_,t.isPendingUnobservationMask_,i)}},{key:"diffValue",get:function(){return Ut(this.flags_,t.diffValueMask_)?1:0},set:function(i){this.flags_=jt(this.flags_,t.diffValueMask_,i===1)}}])}();an.isComputingMask_=1;an.isRunningSetterMask_=2;an.isBeingObservedMask_=4;an.isPendingUnobservationMask_=8;an.diffValueMask_=16;var Bs=_i("ComputedValue",an),Ge;(function(t){t[t.NOT_TRACKING_=-1]="NOT_TRACKING_",t[t.UP_TO_DATE_=0]="UP_TO_DATE_",t[t.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",t[t.STALE_=2]="STALE_"})(Ge||(Ge={}));var cs;(function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK"})(cs||(cs={}));var ds=function(e){this.cause=void 0,this.cause=e};function Xa(t){return t instanceof ds}function zu(t){switch(t.dependenciesState_){case Ge.UP_TO_DATE_:return!1;case Ge.NOT_TRACKING_:case Ge.STALE_:return!0;case Ge.POSSIBLY_STALE_:{for(var e=Al(!0),n=wi(),i=t.observing_,r=i.length,a=0;a<r;a++){var o=i[a];if(Bs(o)){if(ke.disableErrorBoundaries)o.get();else try{o.get()}catch{return An(n),Br(e),!0}if(t.dependenciesState_===Ge.STALE_)return An(n),Br(e),!0}}return nh(t),An(n),Br(e),!1}}}function eh(t,e,n){var i=Al(!0);nh(t),t.newObserving_=new Array(t.runId_===0?100:t.observing_.length),t.unboundDepsCount_=0,t.runId_=++ke.runId;var r=ke.trackingDerivation;ke.trackingDerivation=t,ke.inBatch++;var a;if(ke.disableErrorBoundaries===!0)a=e.call(n);else try{a=e.call(n)}catch(o){a=new ds(o)}return ke.inBatch--,ke.trackingDerivation=r,Lv(t),Br(i),a}function Lv(t){for(var e=t.observing_,n=t.observing_=t.newObserving_,i=Ge.UP_TO_DATE_,r=0,a=t.unboundDepsCount_,o=0;o<a;o++){var l=n[o];l.diffValue===0&&(l.diffValue=1,r!==o&&(n[r]=l),r++),l.dependenciesState_>i&&(i=l.dependenciesState_)}for(n.length=r,t.newObserving_=null,a=e.length;a--;){var d=e[a];d.diffValue===0&&ih(d,t),d.diffValue=0}for(;r--;){var h=n[r];h.diffValue===1&&(h.diffValue=0,$v(h,t))}i!==Ge.UP_TO_DATE_&&(t.dependenciesState_=i,t.onBecomeStale_())}function Gu(t){var e=t.observing_;t.observing_=[];for(var n=e.length;n--;)ih(e[n],t);t.dependenciesState_=Ge.NOT_TRACKING_}function th(t){var e=wi();try{return t()}finally{An(e)}}function wi(){var t=ke.trackingDerivation;return ke.trackingDerivation=null,t}function An(t){ke.trackingDerivation=t}function Al(t){var e=ke.allowStateReads;return ke.allowStateReads=t,e}function Br(t){ke.allowStateReads=t}function nh(t){if(t.dependenciesState_!==Ge.UP_TO_DATE_){t.dependenciesState_=Ge.UP_TO_DATE_;for(var e=t.observing_,n=e.length;n--;)e[n].lowestObserverState_=Ge.UP_TO_DATE_}}var ou=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},uu=!0,ke=function(){var t=Pf();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(uu=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==new ou().version&&(uu=!1),uu?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new ou):(setTimeout(function(){We(35)},1),new ou)}();function $v(t,e){t.observers_.add(e),t.lowestObserverState_>e.dependenciesState_&&(t.lowestObserverState_=e.dependenciesState_)}function ih(t,e){t.observers_.delete(e),t.observers_.size===0&&rh(t)}function rh(t){t.isPendingUnobservation===!1&&(t.isPendingUnobservation=!0,ke.pendingUnobservations.push(t))}function Yt(){ke.inBatch++}function Xt(){if(--ke.inBatch===0){oh();for(var t=ke.pendingUnobservations,e=0;e<t.length;e++){var n=t[e];n.isPendingUnobservation=!1,n.observers_.size===0&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBUO()),n instanceof an&&n.suspend_())}ke.pendingUnobservations=[]}}function ah(t){var e=ke.trackingDerivation;return e!==null?(e.runId_!==t.lastAccessedBy_&&(t.lastAccessedBy_=e.runId_,e.newObserving_[e.unboundDepsCount_++]=t,!t.isBeingObserved&&ke.trackingContext&&(t.isBeingObserved=!0,t.onBO())),t.isBeingObserved):(t.observers_.size===0&&ke.inBatch>0&&rh(t),!1)}function sh(t){t.lowestObserverState_!==Ge.STALE_&&(t.lowestObserverState_=Ge.STALE_,t.observers_.forEach(function(e){e.dependenciesState_===Ge.UP_TO_DATE_&&e.onBecomeStale_(),e.dependenciesState_=Ge.STALE_}))}function Mv(t){t.lowestObserverState_!==Ge.STALE_&&(t.lowestObserverState_=Ge.STALE_,t.observers_.forEach(function(e){e.dependenciesState_===Ge.POSSIBLY_STALE_?e.dependenciesState_=Ge.STALE_:e.dependenciesState_===Ge.UP_TO_DATE_&&(t.lowestObserverState_=Ge.UP_TO_DATE_)}))}function Bv(t){t.lowestObserverState_===Ge.UP_TO_DATE_&&(t.lowestObserverState_=Ge.POSSIBLY_STALE_,t.observers_.forEach(function(e){e.dependenciesState_===Ge.UP_TO_DATE_&&(e.dependenciesState_=Ge.POSSIBLY_STALE_,e.onBecomeStale_())}))}var xn=function(){function t(n,i,r,a){n===void 0&&(n="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=Ge.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=cs.NONE,this.name_=n,this.onInvalidate_=i,this.errorHandler_=r,this.requiresObservable_=a}var e=t.prototype;return e.onBecomeStale_=function(){this.schedule_()},e.schedule_=function(){this.isScheduled||(this.isScheduled=!0,ke.pendingReactions.push(this),oh())},e.runReaction_=function(){if(!this.isDisposed){Yt(),this.isScheduled=!1;var i=ke.trackingContext;if(ke.trackingContext=this,zu(this)){this.isTrackPending=!0;try{this.onInvalidate_()}catch(r){this.reportExceptionInDerivation_(r)}}ke.trackingContext=i,Xt()}},e.track=function(i){if(!this.isDisposed){Yt(),this.isRunning=!0;var r=ke.trackingContext;ke.trackingContext=this;var a=eh(this,i,void 0);ke.trackingContext=r,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&Gu(this),Xa(a)&&this.reportExceptionInDerivation_(a.cause),Xt()}},e.reportExceptionInDerivation_=function(i){var r=this;if(this.errorHandler_){this.errorHandler_(i,this);return}if(ke.disableErrorBoundaries)throw i;var a="[mobx] uncaught error in '"+this+"'";ke.suppressReactionErrors||console.error(a,i),ke.globalReactionErrorHandlers.forEach(function(o){return o(i,r)})},e.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(Yt(),Gu(this),Xt()))},e.getDisposer_=function(i){var r=this,a=function o(){r.dispose(),i==null||i.removeEventListener==null||i.removeEventListener("abort",o)};return i==null||i.addEventListener==null||i.addEventListener("abort",a),a[Ce]=this,a},e.toString=function(){return"Reaction["+this.name_+"]"},e.trace=function(i){},ir(t,[{key:"isDisposed",get:function(){return Ut(this.flags_,t.isDisposedMask_)},set:function(i){this.flags_=jt(this.flags_,t.isDisposedMask_,i)}},{key:"isScheduled",get:function(){return Ut(this.flags_,t.isScheduledMask_)},set:function(i){this.flags_=jt(this.flags_,t.isScheduledMask_,i)}},{key:"isTrackPending",get:function(){return Ut(this.flags_,t.isTrackPendingMask_)},set:function(i){this.flags_=jt(this.flags_,t.isTrackPendingMask_,i)}},{key:"isRunning",get:function(){return Ut(this.flags_,t.isRunningMask_)},set:function(i){this.flags_=jt(this.flags_,t.isRunningMask_,i)}},{key:"diffValue",get:function(){return Ut(this.flags_,t.diffValueMask_)?1:0},set:function(i){this.flags_=jt(this.flags_,t.diffValueMask_,i===1)}}])}();xn.isDisposedMask_=1;xn.isScheduledMask_=2;xn.isTrackPendingMask_=4;xn.isRunningMask_=8;xn.diffValueMask_=16;var Uv=100,jv=function(e){return e()};function oh(){ke.inBatch>0||ke.isRunningReactions||jv(Vv)}function Vv(){ke.isRunningReactions=!0;for(var t=ke.pendingReactions,e=0;t.length>0;){++e===Uv&&(console.error("[mobx] cycle in reaction: "+t[0]),t.splice(0));for(var n=t.splice(0),i=0,r=n.length;i<r;i++)n[i].runReaction_()}ke.isRunningReactions=!1}var fs=_i("Reaction",xn);function Ur(){return!1}function Hv(t){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}var uh="action",qv="action.bound",lh="autoAction",Kv="autoAction.bound",zv="<unnamed action>",Wu=aa(uh),Gv=aa(qv,{bound:!0}),Ju=aa(lh,{autoAction:!0}),Wv=aa(Kv,{autoAction:!0,bound:!0});function ch(t){var e=function(i,r){if(rn(i))return Jn(i.name||zv,i,t);if(rn(r))return Jn(i,r,t);if(ra(r))return(t?Ju:Wu).decorate_20223_(i,r);if(gi(r))return rr(i,r,t?Ju:Wu);if(gi(i))return mn(aa(t?lh:uh,{name:i,autoAction:t}))};return e}var Bt=ch(!1);Object.assign(Bt,Wu);var Jr=ch(!0);Object.assign(Jr,Ju);Bt.bound=mn(Gv);Jr.bound=mn(Wv);function Us(t){return rn(t)&&t.isMobxAction===!0}function js(t,e){var n,i,r,a;e===void 0&&(e=Sl);var o=(n=(i=e)==null?void 0:i.name)!=null?n:"Autorun",l=!e.scheduler&&!e.delay,d;if(l)d=new xn(o,function(){this.track(y)},e.onError,e.requiresObservable);else{var h=dh(e),m=!1;d=new xn(o,function(){m||(m=!0,h(function(){m=!1,d.isDisposed||d.track(y)}))},e.onError,e.requiresObservable)}function y(){t(d)}return(r=e)!=null&&(r=r.signal)!=null&&r.aborted||d.schedule_(),d.getDisposer_((a=e)==null?void 0:a.signal)}var Jv=function(e){return e()};function dh(t){return t.scheduler?t.scheduler:t.delay?function(e){return setTimeout(e,t.delay)}:Jv}function Yv(t,e,n){var i,r,a;n===void 0&&(n=Sl);var o=(i=n.name)!=null?i:"Reaction",l=Bt(o,n.onError?Xv(n.onError,e):e),d=!n.scheduler&&!n.delay,h=dh(n),m=!0,y=!1,g,O=n.compareStructural?Yi.structural:n.equals||Yi.default,_=new xn(o,function(){m||d?S():y||(y=!0,h(S))},n.onError,n.requiresObservable);function S(){if(y=!1,!_.isDisposed){var E=!1,R=g;_.track(function(){var j=Zf(!1,function(){return t(_)});E=m||!O(g,j),g=j}),(m&&n.fireImmediately||!m&&E)&&l(g,R,_),m=!1}}return(r=n)!=null&&(r=r.signal)!=null&&r.aborted||_.schedule_(),_.getDisposer_((a=n)==null?void 0:a.signal)}function Xv(t,e){return function(){try{return e.apply(this,arguments)}catch(n){t.call(this,n)}}}var Qv="onBO",Zv="onBUO";function ey(t,e,n){return hh(Qv,t,e,n)}function fh(t,e,n){return hh(Zv,t,e,n)}function hh(t,e,n,i){var r=Yu(e),a=rn(i)?i:n,o=t+"L";return r[o]?r[o].add(a):r[o]=new Set([a]),function(){var l=r[o];l&&(l.delete(a),l.size===0&&delete r[o])}}function ty(t,e,n,i){var r=Ug(e);return Ei(function(){var a=sr(t,i)[Ce];Ds(r).forEach(function(o){a.extend_(o,r[o],n&&o in n?n[o]:!0)})}),t}var ny=0;function ph(){this.message="FLOW_CANCELLED"}ph.prototype=Object.create(Error.prototype);var lu=zf("flow"),iy=zf("flow.bound",{bound:!0}),Xi=Object.assign(function(e,n){if(ra(n))return lu.decorate_20223_(e,n);if(gi(n))return rr(e,n,lu);var i=e,r=i.name||"<unnamed flow>",a=function(){var l=this,d=arguments,h=++ny,m=Bt(r+" - runid: "+h+" - init",i).apply(l,d),y,g=void 0,O=new Promise(function(_,S){var E=0;y=S;function R(K){g=void 0;var X;try{X=Bt(r+" - runid: "+h+" - yield "+E++,m.next).call(m,K)}catch(ne){return S(ne)}J(X)}function j(K){g=void 0;var X;try{X=Bt(r+" - runid: "+h+" - yield "+E++,m.throw).call(m,K)}catch(ne){return S(ne)}J(X)}function J(K){if(rn(K==null?void 0:K.then)){K.then(J,S);return}return K.done?_(K.value):(g=Promise.resolve(K.value),g.then(R,j))}R(void 0)});return O.cancel=Bt(r+" - runid: "+h+" - cancel",function(){try{g&&Jc(g);var _=m.return(void 0),S=Promise.resolve(_.value);S.then(Vi,Vi),Jc(S),y(new ph)}catch(E){y(E)}}),O};return a.isMobXFlow=!0,a},lu);Xi.bound=mn(iy);function Jc(t){rn(t.cancel)&&t.cancel()}function Yr(t){return(t==null?void 0:t.isMobXFlow)===!0}function ry(t,e){return t?Hs(t)||!!t[Ce]||El(t)||fs(t)||Bs(t):!1}function mh(t){return ry(t)}function wn(t,e){e===void 0&&(e=void 0),Yt();try{return t.apply(e)}finally{Xt()}}function ay(t,e,n){return arguments.length===1||e&&typeof e=="object"?sy(t,e):gh(t,e,{})}function gh(t,e,n){var i;if(typeof n.timeout=="number"){var r=new Error("WHEN_TIMEOUT");i=setTimeout(function(){if(!o[Ce].isDisposed)if(o(),n.onError)n.onError(r);else throw r},n.timeout)}n.name="When";var a=Jn("When-effect",e),o=js(function(l){var d=Zf(!1,t);d&&(l.dispose(),i&&clearTimeout(i),a())},n);return o}function sy(t,e){var n;if(e!=null&&(n=e.signal)!=null&&n.aborted)return Object.assign(Promise.reject(new Error("WHEN_ABORTED")),{cancel:function(){return null}});var i,r,a=new Promise(function(o,l){var d,h=gh(t,o,Wn({},e,{onError:l}));i=function(){h(),l(new Error("WHEN_CANCELLED"))},r=function(){h(),l(new Error("WHEN_ABORTED"))},e==null||(d=e.signal)==null||d.addEventListener==null||d.addEventListener("abort",r)}).finally(function(){var o;return e==null||(o=e.signal)==null||o.removeEventListener==null?void 0:o.removeEventListener("abort",r)});return a.cancel=i,a}function Li(t){return t[Ce]}var oy={has:function(e,n){return Li(e).has_(n)},get:function(e,n){return Li(e).get_(n)},set:function(e,n,i){var r;return gi(n)?(r=Li(e).set_(n,i,!0))!=null?r:!0:!1},deleteProperty:function(e,n){var i;return gi(n)?(i=Li(e).delete_(n,!0))!=null?i:!0:!1},defineProperty:function(e,n,i){var r;return(r=Li(e).defineProperty_(n,i))!=null?r:!0},ownKeys:function(e){return Li(e).ownKeys_()},preventExtensions:function(e){We(13)}};function uy(t,e){var n,i;return $f(),t=sr(t,e),(i=(n=t[Ce]).proxy_)!=null?i:n.proxy_=new Proxy(t,oy)}function Wt(t){return t.interceptors_!==void 0&&t.interceptors_.length>0}function sa(t,e){var n=t.interceptors_||(t.interceptors_=[]);return n.push(e),Mf(function(){var i=n.indexOf(e);i!==-1&&n.splice(i,1)})}function Jt(t,e){var n=wi();try{for(var i=[].concat(t.interceptors_||[]),r=0,a=i.length;r<a&&(e=i[r](e),e&&!e.type&&We(14),!!e);r++);return e}finally{An(n)}}function tn(t){return t.changeListeners_!==void 0&&t.changeListeners_.length>0}function oa(t,e){var n=t.changeListeners_||(t.changeListeners_=[]);return n.push(e),Mf(function(){var i=n.indexOf(e);i!==-1&&n.splice(i,1)})}function nn(t,e){var n=wi(),i=t.changeListeners_;if(i){i=i.slice();for(var r=0,a=i.length;r<a;r++)i[r](e);An(n)}}function ly(t,e,n){return Ei(function(){var i,r=sr(t,n)[Ce];(i=e)!=null||(e=Kg(t)),Ds(e).forEach(function(a){return r.make_(a,e[a])})}),t}var Yc="splice",gn="update",cy=1e4,dy={get:function(e,n){var i=e[Ce];return n===Ce?i:n==="length"?i.getArrayLength_():typeof n=="string"&&!isNaN(n)?i.get_(parseInt(n)):Nn(hs,n)?hs[n]:e[n]},set:function(e,n,i){var r=e[Ce];return n==="length"&&r.setArrayLength_(i),typeof n=="symbol"||isNaN(n)?e[n]=i:r.set_(parseInt(n),i),!0},preventExtensions:function(){We(15)}},Ol=function(){function t(n,i,r,a){n===void 0&&(n="ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=r,this.legacyMode_=a,this.atom_=new Xn(n),this.enhancer_=function(o,l){return i(o,l,"ObservableArray[..]")}}var e=t.prototype;return e.dehanceValue_=function(i){return this.dehancer!==void 0?this.dehancer(i):i},e.dehanceValues_=function(i){return this.dehancer!==void 0&&i.length>0?i.map(this.dehancer):i},e.intercept_=function(i){return sa(this,i)},e.observe_=function(i,r){return r===void 0&&(r=!1),r&&i({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),oa(this,i)},e.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},e.setArrayLength_=function(i){(typeof i!="number"||isNaN(i)||i<0)&&We("Out of range: "+i);var r=this.values_.length;if(i!==r)if(i>r){for(var a=new Array(i-r),o=0;o<i-r;o++)a[o]=void 0;this.spliceWithArray_(r,0,a)}else this.spliceWithArray_(i,r-i)},e.updateArrayLength_=function(i,r){i!==this.lastKnownLength_&&We(16),this.lastKnownLength_+=r,this.legacyMode_&&r>0&&Sh(i+r+1)},e.spliceWithArray_=function(i,r,a){var o=this;this.atom_;var l=this.values_.length;if(i===void 0?i=0:i>l?i=l:i<0&&(i=Math.max(0,l+i)),arguments.length===1?r=l-i:r==null?r=0:r=Math.max(0,Math.min(r,l-i)),a===void 0&&(a=Vu),Wt(this)){var d=Jt(this,{object:this.proxy_,type:Yc,index:i,removedCount:r,added:a});if(!d)return Vu;r=d.removedCount,a=d.added}if(a=a.length===0?a:a.map(function(y){return o.enhancer_(y,void 0)}),this.legacyMode_){var h=a.length-r;this.updateArrayLength_(l,h)}var m=this.spliceItemsIntoValues_(i,r,a);return(r!==0||a.length!==0)&&this.notifyArraySplice_(i,a,m),this.dehanceValues_(m)},e.spliceItemsIntoValues_=function(i,r,a){if(a.length<cy){var o;return(o=this.values_).splice.apply(o,[i,r].concat(a))}else{var l=this.values_.slice(i,i+r),d=this.values_.slice(i+r);this.values_.length+=a.length-r;for(var h=0;h<a.length;h++)this.values_[i+h]=a[h];for(var m=0;m<d.length;m++)this.values_[i+a.length+m]=d[m];return l}},e.notifyArrayChildUpdate_=function(i,r,a){var o=!this.owned_&&Ur(),l=tn(this),d=l||o?{observableKind:"array",object:this.proxy_,type:gn,debugObjectName:this.atom_.name_,index:i,newValue:r,oldValue:a}:null;this.atom_.reportChanged(),l&&nn(this,d)},e.notifyArraySplice_=function(i,r,a){var o=!this.owned_&&Ur(),l=tn(this),d=l||o?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:Yc,index:i,removed:a,added:r,removedCount:a.length,addedCount:r.length}:null;this.atom_.reportChanged(),l&&nn(this,d)},e.get_=function(i){if(this.legacyMode_&&i>=this.values_.length){console.warn("[mobx] Out of bounds read: "+i);return}return this.atom_.reportObserved(),this.dehanceValue_(this.values_[i])},e.set_=function(i,r){var a=this.values_;if(this.legacyMode_&&i>a.length&&We(17,i,a.length),i<a.length){this.atom_;var o=a[i];if(Wt(this)){var l=Jt(this,{type:gn,object:this.proxy_,index:i,newValue:r});if(!l)return;r=l.newValue}r=this.enhancer_(r,o);var d=r!==o;d&&(a[i]=r,this.notifyArrayChildUpdate_(i,r,o))}else{for(var h=new Array(i+1-a.length),m=0;m<h.length-1;m++)h[m]=void 0;h[h.length-1]=r,this.spliceWithArray_(a.length,0,h)}},t}();function fy(t,e,n,i){return n===void 0&&(n="ObservableArray"),i===void 0&&(i=!1),$f(),Ei(function(){var r=new Ol(n,e,i,!1);Uf(r.values_,Ce,r);var a=new Proxy(r.values_,dy);return r.proxy_=a,t&&t.length&&r.spliceWithArray_(0,0,t),a})}var hs={clear:function(){return this.splice(0)},replace:function(e){var n=this[Ce];return n.spliceWithArray_(0,n.values_.length,e)},toJSON:function(){return this.slice()},splice:function(e,n){for(var i=arguments.length,r=new Array(i>2?i-2:0),a=2;a<i;a++)r[a-2]=arguments[a];var o=this[Ce];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray_(e);case 2:return o.spliceWithArray_(e,n)}return o.spliceWithArray_(e,n,r)},spliceWithArray:function(e,n,i){return this[Ce].spliceWithArray_(e,n,i)},push:function(){for(var e=this[Ce],n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return e.spliceWithArray_(e.values_.length,0,i),e.values_.length},pop:function(){return this.splice(Math.max(this[Ce].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=this[Ce],n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return e.spliceWithArray_(0,0,i),e.values_.length},reverse:function(){return ke.trackingDerivation&&We(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){ke.trackingDerivation&&We(37,"sort");var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var n=this[Ce],i=n.dehanceValues_(n.values_).indexOf(e);return i>-1?(this.splice(i,1),!0):!1}};nt("at",Ht);nt("concat",Ht);nt("flat",Ht);nt("includes",Ht);nt("indexOf",Ht);nt("join",Ht);nt("lastIndexOf",Ht);nt("slice",Ht);nt("toString",Ht);nt("toLocaleString",Ht);nt("toSorted",Ht);nt("toSpliced",Ht);nt("with",Ht);nt("every",sn);nt("filter",sn);nt("find",sn);nt("findIndex",sn);nt("findLast",sn);nt("findLastIndex",sn);nt("flatMap",sn);nt("forEach",sn);nt("map",sn);nt("some",sn);nt("toReversed",sn);nt("reduce",vh);nt("reduceRight",vh);function nt(t,e){typeof Array.prototype[t]=="function"&&(hs[t]=e(t))}function Ht(t){return function(){var e=this[Ce];e.atom_.reportObserved();var n=e.dehanceValues_(e.values_);return n[t].apply(n,arguments)}}function sn(t){return function(e,n){var i=this,r=this[Ce];r.atom_.reportObserved();var a=r.dehanceValues_(r.values_);return a[t](function(o,l){return e.call(n,o,l,i)})}}function vh(t){return function(){var e=this,n=this[Ce];n.atom_.reportObserved();var i=n.dehanceValues_(n.values_),r=arguments[0];return arguments[0]=function(a,o,l){return r(a,o,l,e)},i[t].apply(i,arguments)}}var hy=_i("ObservableArrayAdministration",Ol);function Vs(t){return Fs(t)&&hy(t[Ce])}var py={},Kn="add",ps="delete",yh=function(){function t(n,i,r){var a=this;i===void 0&&(i=vi),r===void 0&&(r="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[Ce]=py,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=i,this.name_=r,rn(Map)||We(18),Ei(function(){a.keysAtom_=qf("ObservableMap.keys()"),a.data_=new Map,a.hasMap_=new Map,n&&a.merge(n)})}var e=t.prototype;return e.has_=function(i){return this.data_.has(i)},e.has=function(i){var r=this;if(!ke.trackingDerivation)return this.has_(i);var a=this.hasMap_.get(i);if(!a){var o=a=new hi(this.has_(i),Ps,"ObservableMap.key?",!1);this.hasMap_.set(i,o),fh(o,function(){return r.hasMap_.delete(i)})}return a.get()},e.set=function(i,r){var a=this.has_(i);if(Wt(this)){var o=Jt(this,{type:a?gn:Kn,object:this,newValue:r,name:i});if(!o)return this;r=o.newValue}return a?this.updateValue_(i,r):this.addValue_(i,r),this},e.delete=function(i){var r=this;if(this.keysAtom_,Wt(this)){var a=Jt(this,{type:ps,object:this,name:i});if(!a)return!1}if(this.has_(i)){var o=Ur(),l=tn(this),d=l||o?{observableKind:"map",debugObjectName:this.name_,type:ps,object:this,oldValue:this.data_.get(i).value_,name:i}:null;return wn(function(){var h;r.keysAtom_.reportChanged(),(h=r.hasMap_.get(i))==null||h.setNewValue_(!1);var m=r.data_.get(i);m.setNewValue_(void 0),r.data_.delete(i)}),l&&nn(this,d),!0}return!1},e.updateValue_=function(i,r){var a=this.data_.get(i);if(r=a.prepareNewValue_(r),r!==ke.UNCHANGED){var o=Ur(),l=tn(this),d=l||o?{observableKind:"map",debugObjectName:this.name_,type:gn,object:this,oldValue:a.value_,name:i,newValue:r}:null;a.setNewValue_(r),l&&nn(this,d)}},e.addValue_=function(i,r){var a=this;this.keysAtom_,wn(function(){var h,m=new hi(r,a.enhancer_,"ObservableMap.key",!1);a.data_.set(i,m),r=m.value_,(h=a.hasMap_.get(i))==null||h.setNewValue_(!0),a.keysAtom_.reportChanged()});var o=Ur(),l=tn(this),d=l||o?{observableKind:"map",debugObjectName:this.name_,type:Kn,object:this,name:i,newValue:r}:null;l&&nn(this,d)},e.get=function(i){return this.has(i)?this.dehanceValue_(this.data_.get(i).get()):this.dehanceValue_(void 0)},e.dehanceValue_=function(i){return this.dehancer!==void 0?this.dehancer(i):i},e.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},e.values=function(){var i=this,r=this.keys();return Xr({next:function(){var o=r.next(),l=o.done,d=o.value;return{done:l,value:l?void 0:i.get(d)}}})},e.entries=function(){var i=this,r=this.keys();return Xr({next:function(){var o=r.next(),l=o.done,d=o.value;return{done:l,value:l?void 0:[d,i.get(d)]}}})},e[Symbol.iterator]=function(){return this.entries()},e.forEach=function(i,r){for(var a=Hi(this),o;!(o=a()).done;){var l=o.value,d=l[0],h=l[1];i.call(r,h,d,this)}},e.merge=function(i){var r=this;return Si(i)&&(i=new Map(i)),wn(function(){Gn(i)?Bg(i).forEach(function(a){return r.set(a,i[a])}):Array.isArray(i)?i.forEach(function(a){var o=a[0],l=a[1];return r.set(o,l)}):nr(i)?(Mg(i)||We(19,i),i.forEach(function(a,o){return r.set(o,a)})):i!=null&&We(20,i)}),this},e.clear=function(){var i=this;wn(function(){th(function(){for(var r=Hi(i.keys()),a;!(a=r()).done;){var o=a.value;i.delete(o)}})})},e.replace=function(i){var r=this;return wn(function(){for(var a=my(i),o=new Map,l=!1,d=Hi(r.data_.keys()),h;!(h=d()).done;){var m=h.value;if(!a.has(m)){var y=r.delete(m);if(y)l=!0;else{var g=r.data_.get(m);o.set(m,g)}}}for(var O=Hi(a.entries()),_;!(_=O()).done;){var S=_.value,E=S[0],R=S[1],j=r.data_.has(E);if(r.set(E,R),r.data_.has(E)){var J=r.data_.get(E);o.set(E,J),j||(l=!0)}}if(!l)if(r.data_.size!==o.size)r.keysAtom_.reportChanged();else for(var K=r.data_.keys(),X=o.keys(),ne=K.next(),oe=X.next();!ne.done;){if(ne.value!==oe.value){r.keysAtom_.reportChanged();break}ne=K.next(),oe=X.next()}r.data_=o}),this},e.toString=function(){return"[object ObservableMap]"},e.toJSON=function(){return Array.from(this)},e.observe_=function(i,r){return oa(this,i)},e.intercept_=function(i){return sa(this,i)},ir(t,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Map"}}])}(),Si=_i("ObservableMap",yh);function my(t){if(nr(t)||Si(t))return t;if(Array.isArray(t))return new Map(t);if(Gn(t)){var e=new Map;for(var n in t)e.set(n,t[n]);return e}else return We(21,t)}var gy={},bh=function(){function t(n,i,r){var a=this;i===void 0&&(i=vi),r===void 0&&(r="ObservableSet"),this.name_=void 0,this[Ce]=gy,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=r,rn(Set)||We(22),this.enhancer_=function(o,l){return i(o,l,r)},Ei(function(){a.atom_=qf(a.name_),n&&a.replace(n)})}var e=t.prototype;return e.dehanceValue_=function(i){return this.dehancer!==void 0?this.dehancer(i):i},e.clear=function(){var i=this;wn(function(){th(function(){for(var r=Hi(i.data_.values()),a;!(a=r()).done;){var o=a.value;i.delete(o)}})})},e.forEach=function(i,r){for(var a=Hi(this),o;!(o=a()).done;){var l=o.value;i.call(r,l,l,this)}},e.add=function(i){var r=this;if(this.atom_,Wt(this)){var a=Jt(this,{type:Kn,object:this,newValue:i});if(!a)return this}if(!this.has(i)){wn(function(){r.data_.add(r.enhancer_(i,void 0)),r.atom_.reportChanged()});var o=!1,l=tn(this),d=l||o?{observableKind:"set",debugObjectName:this.name_,type:Kn,object:this,newValue:i}:null;l&&nn(this,d)}return this},e.delete=function(i){var r=this;if(Wt(this)){var a=Jt(this,{type:ps,object:this,oldValue:i});if(!a)return!1}if(this.has(i)){var o=!1,l=tn(this),d=l||o?{observableKind:"set",debugObjectName:this.name_,type:ps,object:this,oldValue:i}:null;return wn(function(){r.atom_.reportChanged(),r.data_.delete(i)}),l&&nn(this,d),!0}return!1},e.has=function(i){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(i))},e.entries=function(){var i=0,r=Array.from(this.keys()),a=Array.from(this.values());return Xr({next:function(){var l=i;return i+=1,l<a.length?{value:[r[l],a[l]],done:!1}:{done:!0}}})},e.keys=function(){return this.values()},e.values=function(){this.atom_.reportObserved();var i=this,r=0,a=Array.from(this.data_.values());return Xr({next:function(){return r<a.length?{value:i.dehanceValue_(a[r++]),done:!1}:{done:!0}}})},e.intersection=function(i){if(_n(i))return i.intersection(this);var r=new Set(this);return r.intersection(i)},e.union=function(i){if(_n(i))return i.union(this);var r=new Set(this);return r.union(i)},e.difference=function(i){return new Set(this).difference(i)},e.symmetricDifference=function(i){if(_n(i))return i.symmetricDifference(this);var r=new Set(this);return r.symmetricDifference(i)},e.isSubsetOf=function(i){return new Set(this).isSubsetOf(i)},e.isSupersetOf=function(i){return new Set(this).isSupersetOf(i)},e.isDisjointFrom=function(i){if(_n(i))return i.isDisjointFrom(this);var r=new Set(this);return r.isDisjointFrom(i)},e.replace=function(i){var r=this;return ar(i)&&(i=new Set(i)),wn(function(){Array.isArray(i)?(r.clear(),i.forEach(function(a){return r.add(a)})):_n(i)?(r.clear(),i.forEach(function(a){return r.add(a)})):i!=null&&We("Cannot initialize set from "+i)}),this},e.observe_=function(i,r){return oa(this,i)},e.intercept_=function(i){return sa(this,i)},e.toJSON=function(){return Array.from(this)},e.toString=function(){return"[object ObservableSet]"},e[Symbol.iterator]=function(){return this.values()},ir(t,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Set"}}])}(),ar=_i("ObservableSet",bh),Xc=Object.create(null),Qc="remove",kh=function(){function t(n,i,r,a){i===void 0&&(i=new Map),a===void 0&&(a=mv),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=n,this.values_=i,this.name_=r,this.defaultAnnotation_=a,this.keysAtom_=new Xn("ObservableObject.keys"),this.isPlainObject_=Gn(this.target_)}var e=t.prototype;return e.getObservablePropValue_=function(i){return this.values_.get(i).get()},e.setObservablePropValue_=function(i,r){var a=this.values_.get(i);if(a instanceof an)return a.set(r),!0;if(Wt(this)){var o=Jt(this,{type:gn,object:this.proxy_||this.target_,name:i,newValue:r});if(!o)return null;r=o.newValue}if(r=a.prepareNewValue_(r),r!==ke.UNCHANGED){var l=tn(this),d=!1,h=l||d?{type:gn,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:a.value_,name:i,newValue:r}:null;a.setNewValue_(r),l&&nn(this,h)}return!0},e.get_=function(i){return ke.trackingDerivation&&!Nn(this.target_,i)&&this.has_(i),this.target_[i]},e.set_=function(i,r,a){return a===void 0&&(a=!1),Nn(this.target_,i)?this.values_.has(i)?this.setObservablePropValue_(i,r):a?Reflect.set(this.target_,i,r):(this.target_[i]=r,!0):this.extend_(i,{value:r,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,a)},e.has_=function(i){if(!ke.trackingDerivation)return i in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var r=this.pendingKeys_.get(i);return r||(r=new hi(i in this.target_,Ps,"ObservableObject.key?",!1),this.pendingKeys_.set(i,r)),r.get()},e.make_=function(i,r){if(r===!0&&(r=this.defaultAnnotation_),r!==!1){if(!(i in this.target_)){var a;if((a=this.target_[fn])!=null&&a[i])return;We(1,r.annotationType_,this.name_+"."+i.toString())}for(var o=this.target_;o&&o!==Rs;){var l=us(o,i);if(l){var d=r.make_(this,i,l,o);if(d===0)return;if(d===1)break}o=Object.getPrototypeOf(o)}ed(this,r,i)}},e.extend_=function(i,r,a,o){if(o===void 0&&(o=!1),a===!0&&(a=this.defaultAnnotation_),a===!1)return this.defineProperty_(i,r,o);var l=a.extend_(this,i,r,o);return l&&ed(this,a,i),l},e.defineProperty_=function(i,r,a){a===void 0&&(a=!1),this.keysAtom_;try{Yt();var o=this.delete_(i);if(!o)return o;if(Wt(this)){var l=Jt(this,{object:this.proxy_||this.target_,name:i,type:Kn,newValue:r.value});if(!l)return null;var d=l.newValue;r.value!==d&&(r=Wn({},r,{value:d}))}if(a){if(!Reflect.defineProperty(this.target_,i,r))return!1}else pn(this.target_,i,r);this.notifyPropertyAddition_(i,r.value)}finally{Xt()}return!0},e.defineObservableProperty_=function(i,r,a,o){o===void 0&&(o=!1),this.keysAtom_;try{Yt();var l=this.delete_(i);if(!l)return l;if(Wt(this)){var d=Jt(this,{object:this.proxy_||this.target_,name:i,type:Kn,newValue:r});if(!d)return null;r=d.newValue}var h=Zc(i),m={configurable:ke.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:h.get,set:h.set};if(o){if(!Reflect.defineProperty(this.target_,i,m))return!1}else pn(this.target_,i,m);var y=new hi(r,a,"ObservableObject.key",!1);this.values_.set(i,y),this.notifyPropertyAddition_(i,y.value_)}finally{Xt()}return!0},e.defineComputedProperty_=function(i,r,a){a===void 0&&(a=!1),this.keysAtom_;try{Yt();var o=this.delete_(i);if(!o)return o;if(Wt(this)){var l=Jt(this,{object:this.proxy_||this.target_,name:i,type:Kn,newValue:void 0});if(!l)return null}r.name||(r.name="ObservableObject.key"),r.context=this.proxy_||this.target_;var d=Zc(i),h={configurable:ke.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:d.get,set:d.set};if(a){if(!Reflect.defineProperty(this.target_,i,h))return!1}else pn(this.target_,i,h);this.values_.set(i,new an(r)),this.notifyPropertyAddition_(i,void 0)}finally{Xt()}return!0},e.delete_=function(i,r){if(r===void 0&&(r=!1),this.keysAtom_,!Nn(this.target_,i))return!0;if(Wt(this)){var a=Jt(this,{object:this.proxy_||this.target_,name:i,type:Qc});if(!a)return null}try{var o;Yt();var l=tn(this),d=!1,h=this.values_.get(i),m=void 0;if(!h&&(l||d)){var y;m=(y=us(this.target_,i))==null?void 0:y.value}if(r){if(!Reflect.deleteProperty(this.target_,i))return!1}else delete this.target_[i];if(h&&(this.values_.delete(i),h instanceof hi&&(m=h.value_),sh(h)),this.keysAtom_.reportChanged(),(o=this.pendingKeys_)==null||(o=o.get(i))==null||o.set(i in this.target_),l||d){var g={type:Qc,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:m,name:i};l&&nn(this,g)}}finally{Xt()}return!0},e.observe_=function(i,r){return oa(this,i)},e.intercept_=function(i){return sa(this,i)},e.notifyPropertyAddition_=function(i,r){var a,o=tn(this),l=!1;if(o||l){var d=o||l?{type:Kn,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:i,newValue:r}:null;o&&nn(this,d)}(a=this.pendingKeys_)==null||(a=a.get(i))==null||a.set(!0),this.keysAtom_.reportChanged()},e.ownKeys_=function(){return this.keysAtom_.reportObserved(),Ds(this.target_)},e.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},t}();function sr(t,e){var n;if(Nn(t,Ce))return t;var i=(n=e==null?void 0:e.name)!=null?n:"ObservableObject",r=new kh(t,new Map,String(i),Av(e));return Is(t,Ce,r),t}var vy=_i("ObservableObjectAdministration",kh);function Zc(t){return Xc[t]||(Xc[t]={get:function(){return this[Ce].getObservablePropValue_(t)},set:function(n){return this[Ce].setObservablePropValue_(t,n)}})}function Hs(t){return Fs(t)?vy(t[Ce]):!1}function ed(t,e,n){var i;(i=t.target_[fn])==null||delete i[n]}var yy=wh(0),by=function(){var t=!1,e={};return Object.defineProperty(e,"0",{set:function(){t=!0}}),Object.create(e)[0]=1,t===!1}(),cu=0,_h=function(){};function ky(t,e){Object.setPrototypeOf?Object.setPrototypeOf(t.prototype,e):t.prototype.__proto__!==void 0?t.prototype.__proto__=e:t.prototype=e}ky(_h,Array.prototype);var xl=function(t){function e(i,r,a,o){var l;return a===void 0&&(a="ObservableArray"),o===void 0&&(o=!1),l=t.call(this)||this,Ei(function(){var d=new Ol(a,r,o,!0);d.proxy_=l,Uf(l,Ce,d),i&&i.length&&l.spliceWithArray(0,0,i),by&&Object.defineProperty(l,"0",yy)}),l}Hf(e,t);var n=e.prototype;return n.concat=function(){this[Ce].atom_.reportObserved();for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return Array.prototype.concat.apply(this.slice(),a.map(function(l){return Vs(l)?l.slice():l}))},n[Symbol.iterator]=function(){var i=this,r=0;return Xr({next:function(){return r<i.length?{value:i[r++],done:!1}:{done:!0,value:void 0}}})},ir(e,[{key:"length",get:function(){return this[Ce].getArrayLength_()},set:function(r){this[Ce].setArrayLength_(r)}},{key:Symbol.toStringTag,get:function(){return"Array"}}])}(_h);Object.entries(hs).forEach(function(t){var e=t[0],n=t[1];e!=="concat"&&Is(xl.prototype,e,n)});function wh(t){return{enumerable:!1,configurable:!0,get:function(){return this[Ce].get_(t)},set:function(n){this[Ce].set_(t,n)}}}function _y(t){pn(xl.prototype,""+t,wh(t))}function Sh(t){if(t>cu){for(var e=cu;e<t+100;e++)_y(e);cu=t}}Sh(1e3);function wy(t,e,n){return new xl(t,e,n)}function Yu(t,e){if(typeof t=="object"&&t!==null){if(Vs(t))return e!==void 0&&We(23),t[Ce].atom_;if(ar(t))return t.atom_;if(Si(t)){if(e===void 0)return t.keysAtom_;var n=t.data_.get(e)||t.hasMap_.get(e);return n||We(25,e,Xu(t)),n}if(Hs(t)){if(!e)return We(26);var i=t[Ce].values_.get(e);return i||We(27,e,Xu(t)),i}if(El(t)||Bs(t)||fs(t))return t}else if(rn(t)&&fs(t[Ce]))return t[Ce];We(28)}function Sy(t,e){if(t||We(29),El(t)||Bs(t)||fs(t)||Si(t)||ar(t))return t;if(t[Ce])return t[Ce];We(24,t)}function Xu(t,e){var n;if(e!==void 0)n=Yu(t,e);else{if(Us(t))return t.name;Hs(t)||Si(t)||ar(t)?n=Sy(t):n=Yu(t)}return n.name_}function Ei(t){var e=wi(),n=$s(!0);Yt();try{return t()}finally{Xt(),Ms(n),An(e)}}var td=Rs.toString;function Eh(t,e,n){return n===void 0&&(n=-1),Qu(t,e,n)}function Qu(t,e,n,i,r){if(t===e)return t!==0||1/t===1/e;if(t==null||e==null)return!1;if(t!==t)return e!==e;var a=typeof t;if(a!=="function"&&a!=="object"&&typeof e!="object")return!1;var o=td.call(t);if(o!==td.call(e))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:+t==0?1/+t===1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e;case"[object Symbol]":return typeof Symbol!="undefined"&&Symbol.valueOf.call(t)===Symbol.valueOf.call(e);case"[object Map]":case"[object Set]":n>=0&&n++;break}t=nd(t),e=nd(e);var l=o==="[object Array]";if(!l){if(typeof t!="object"||typeof e!="object")return!1;var d=t.constructor,h=e.constructor;if(d!==h&&!(rn(d)&&d instanceof d&&rn(h)&&h instanceof h)&&"constructor"in t&&"constructor"in e)return!1}if(n===0)return!1;n<0&&(n=-1),i=i||[],r=r||[];for(var m=i.length;m--;)if(i[m]===t)return r[m]===e;if(i.push(t),r.push(e),l){if(m=t.length,m!==e.length)return!1;for(;m--;)if(!Qu(t[m],e[m],n-1,i,r))return!1}else{var y=Object.keys(t),g;if(m=y.length,Object.keys(e).length!==m)return!1;for(;m--;)if(g=y[m],!(Nn(e,g)&&Qu(t[g],e[g],n-1,i,r)))return!1}return i.pop(),r.pop(),!0}function nd(t){return Vs(t)?t.slice():nr(t)||Si(t)||_n(t)||ar(t)?Array.from(t.entries()):t}function Xr(t){return t[Symbol.iterator]=Ey,t}function Ey(){return this}["Symbol","Map","Set"].forEach(function(t){var e=Pf();typeof e[t]=="undefined"&&We("MobX requires global '"+t+"' to be available or polyfilled")});typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Hv,extras:{getDebugName:Xu},$mobx:Ce});function Ny(t,e=[]){je.useEffect(()=>{const n=js(t);return()=>n()},e)}function Nh(t,e={}){const{defaultValue:n,deps:i=[]}=e,r=je.useMemo(()=>t,i),[a,o]=je.useState(()=>r()||n);return je.useEffect(()=>{const l=js(()=>o(r()));return()=>l()},[r,...i]),a}function Ay(t,e,n=[]){const i=je.useMemo(()=>t,n),r=je.useMemo(()=>e,n);je.useEffect(()=>{const a=Yv(i,r);return()=>a()},[i,r])}let Tl=new Map;const Zu=je.createContext(Tl),Oy=({children:t,stores:e})=>{const n=je.useContext(Zu),i=je.useMemo(()=>{const r=new Map;return e.forEach(a=>r.set(a.class,a.value)),Tl=new Map([...n,...r])},[]);return zm.jsx(Zu.Provider,{value:i,children:t})};function xy(t){return je.useContext(Zu).get(t)}function Ty(t){return Tl.get(t)}var Cy=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function qs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Qa={exports:{}},Ry=Qa.exports,id;function Fy(){return id||(id=1,function(t,e){(function(n,i){t.exports=i()})(Ry,function(){var n=function(s,u){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,f){c.__proto__=f}||function(c,f){for(var p in f)Object.prototype.hasOwnProperty.call(f,p)&&(c[p]=f[p])})(s,u)},i=function(){return(i=Object.assign||function(s){for(var u,c=1,f=arguments.length;c<f;c++)for(var p in u=arguments[c])Object.prototype.hasOwnProperty.call(u,p)&&(s[p]=u[p]);return s}).apply(this,arguments)};function r(s,u,c){for(var f,p=0,v=u.length;p<v;p++)!f&&p in u||((f=f||Array.prototype.slice.call(u,0,p))[p]=u[p]);return s.concat(f||Array.prototype.slice.call(u))}var a=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:Cy,o=Object.keys,l=Array.isArray;function d(s,u){return typeof u!="object"||o(u).forEach(function(c){s[c]=u[c]}),s}typeof Promise=="undefined"||a.Promise||(a.Promise=Promise);var h=Object.getPrototypeOf,m={}.hasOwnProperty;function y(s,u){return m.call(s,u)}function g(s,u){typeof u=="function"&&(u=u(h(s))),(typeof Reflect=="undefined"?o:Reflect.ownKeys)(u).forEach(function(c){_(s,c,u[c])})}var O=Object.defineProperty;function _(s,u,c,f){O(s,u,d(c&&y(c,"get")&&typeof c.get=="function"?{get:c.get,set:c.set,configurable:!0}:{value:c,configurable:!0,writable:!0},f))}function S(s){return{from:function(u){return s.prototype=Object.create(u.prototype),_(s.prototype,"constructor",s),{extend:g.bind(null,s.prototype)}}}}var E=Object.getOwnPropertyDescriptor,R=[].slice;function j(s,u,c){return R.call(s,u,c)}function J(s,u){return u(s)}function K(s){if(!s)throw new Error("Assertion Failed")}function X(s){a.setImmediate?setImmediate(s):setTimeout(s,0)}function ne(s,u){if(typeof u=="string"&&y(s,u))return s[u];if(!u)return s;if(typeof u!="string"){for(var c=[],f=0,p=u.length;f<p;++f){var v=ne(s,u[f]);c.push(v)}return c}var b=u.indexOf(".");if(b!==-1){var k=s[u.substr(0,b)];return k==null?void 0:ne(k,u.substr(b+1))}}function oe(s,u,c){if(s&&u!==void 0&&!("isFrozen"in Object&&Object.isFrozen(s)))if(typeof u!="string"&&"length"in u){K(typeof c!="string"&&"length"in c);for(var f=0,p=u.length;f<p;++f)oe(s,u[f],c[f])}else{var v,b,k=u.indexOf(".");k!==-1?(v=u.substr(0,k),(b=u.substr(k+1))===""?c===void 0?l(s)&&!isNaN(parseInt(v))?s.splice(v,1):delete s[v]:s[v]=c:oe(k=!(k=s[v])||!y(s,v)?s[v]={}:k,b,c)):c===void 0?l(s)&&!isNaN(parseInt(u))?s.splice(u,1):delete s[u]:s[u]=c}}function Se(s){var u,c={};for(u in s)y(s,u)&&(c[u]=s[u]);return c}var ve=[].concat;function Ke(s){return ve.apply([],s)}var qt="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(Ke([8,16,32,64].map(function(s){return["Int","Uint","Float"].map(function(u){return u+s+"Array"})}))).filter(function(s){return a[s]}),Ne=new Set(qt.map(function(s){return a[s]})),Re=null;function Ve(s){return Re=new WeakMap,s=function u(c){if(!c||typeof c!="object")return c;var f=Re.get(c);if(f)return f;if(l(c)){f=[],Re.set(c,f);for(var p=0,v=c.length;p<v;++p)f.push(u(c[p]))}else if(Ne.has(c.constructor))f=c;else{var b,k=h(c);for(b in f=k===Object.prototype?{}:Object.create(k),Re.set(c,f),c)y(c,b)&&(f[b]=u(c[b]))}return f}(s),Re=null,s}var M={}.toString;function N(s){return M.call(s).slice(8,-1)}var z=typeof Symbol!="undefined"?Symbol.iterator:"@@iterator",ie=typeof z=="symbol"?function(s){var u;return s!=null&&(u=s[z])&&u.apply(s)}:function(){return null};function ce(s,u){return u=s.indexOf(u),0<=u&&s.splice(u,1),0<=u}var se={};function B(s){var u,c,f,p;if(arguments.length===1){if(l(s))return s.slice();if(this===se&&typeof s=="string")return[s];if(p=ie(s)){for(c=[];!(f=p.next()).done;)c.push(f.value);return c}if(s==null)return[s];if(typeof(u=s.length)!="number")return[s];for(c=new Array(u);u--;)c[u]=s[u];return c}for(u=arguments.length,c=new Array(u);u--;)c[u]=arguments[u];return c}var Fe=typeof Symbol!="undefined"?function(s){return s[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},vn=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Kt=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(vn),$e={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function Xe(s,u){this.name=s,this.message=u}function D(s,u){return s+". Errors: "+Object.keys(u).map(function(c){return u[c].toString()}).filter(function(c,f,p){return p.indexOf(c)===f}).join(`
|
|
27
|
-
`)}function H(
|
|
28
|
-
`+v:""),this.inner=v||null):typeof p=="object"&&(this.message="".concat(p.name," ").concat(p.message),this.inner=p):(this.message=$e[u]||c,this.inner=null)}return S(f).from(Me),s[u]=f,s},{});ye.Syntax=SyntaxError,ye.Type=TypeError,ye.Range=RangeError;var et=vn.reduce(function(s,u){return s[u+"Error"]=ye[u],s},{}),Je=Kt.reduce(function(s,u){return["Syntax","Type","Range"].indexOf(u)===-1&&(s[u+"Error"]=ye[u]),s},{});function Oe(){}function wt(s){return s}function lt(s,u){return s==null||s===wt?u:function(c){return u(s(c))}}function Ae(s,u){return function(){s.apply(this,arguments),u.apply(this,arguments)}}function mt(s,u){return s===Oe?u:function(){var c=s.apply(this,arguments);c!==void 0&&(arguments[0]=c);var f=this.onsuccess,p=this.onerror;this.onsuccess=null,this.onerror=null;var v=u.apply(this,arguments);return f&&(this.onsuccess=this.onsuccess?Ae(f,this.onsuccess):f),p&&(this.onerror=this.onerror?Ae(p,this.onerror):p),v!==void 0?v:c}}function rt(s,u){return s===Oe?u:function(){s.apply(this,arguments);var c=this.onsuccess,f=this.onerror;this.onsuccess=this.onerror=null,u.apply(this,arguments),c&&(this.onsuccess=this.onsuccess?Ae(c,this.onsuccess):c),f&&(this.onerror=this.onerror?Ae(f,this.onerror):f)}}function he(s,u){return s===Oe?u:function(c){var f=s.apply(this,arguments);d(c,f);var p=this.onsuccess,v=this.onerror;return this.onsuccess=null,this.onerror=null,c=u.apply(this,arguments),p&&(this.onsuccess=this.onsuccess?Ae(p,this.onsuccess):p),v&&(this.onerror=this.onerror?Ae(v,this.onerror):v),f===void 0?c===void 0?void 0:c:d(f,c)}}function Ye(s,u){return s===Oe?u:function(){return u.apply(this,arguments)!==!1&&s.apply(this,arguments)}}function ue(s,u){return s===Oe?u:function(){var c=s.apply(this,arguments);if(c&&typeof c.then=="function"){for(var f=this,p=arguments.length,v=new Array(p);p--;)v[p]=arguments[p];return c.then(function(){return u.apply(f,v)})}return u.apply(this,arguments)}}Je.ModifyError=H,Je.DexieError=Xe,Je.BulkError=pt;var Te=typeof location!="undefined"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function tt(s){Te=s}var ct={},ut=100,qt=typeof Promise=="undefined"?[]:function(){var s=Promise.resolve();if(typeof crypto=="undefined"||!crypto.subtle)return[s,h(s),s];var u=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[u,h(u),s]}(),vn=qt[0],Kt=qt[1],qt=qt[2],Kt=Kt&&Kt.then,Qn=vn&&vn.constructor,lo=!!qt,cr=function(s,u){dr.push([s,u]),fa&&(queueMicrotask(km),fa=!1)},co=!0,fa=!0,Zn=[],ha=[],fo=wt,Rn={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Oe,pgp:!1,env:{},finalize:Oe},Ee=Rn,dr=[],ei=0,pa=[];function me(s){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var u=this._PSD=Ee;if(typeof s!="function"){if(s!==ct)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&po(this,this._value))}this._state=null,this._value=null,++u.ref,function c(f,p){try{p(function(v){if(f._state===null){if(v===f)throw new TypeError("A promise cannot be resolved with itself.");var b=f._lib&&Ai();v&&typeof v.then=="function"?c(f,function(k,A){v instanceof me?v._then(k,A):v.then(k,A)}):(f._state=!0,f._value=v,Jl(f)),b&&Oi()}},po.bind(null,f))}catch(v){po(f,v)}}(this,s)}var ho={get:function(){var s=Ee,u=ya;function c(f,p){var v=this,b=!s.global&&(s!==Ee||u!==ya),k=b&&!In(),A=new me(function(T,I){mo(v,new Wl(Xl(f,s,b,k),Xl(p,s,b,k),T,I,s))});return this._consoleTask&&(A._consoleTask=this._consoleTask),A}return c.prototype=ct,c},set:function(s){_(this,"then",s&&s.prototype===ct?ho:{get:function(){return s},set:ho.set})}};function Wl(s,u,c,f,p){this.onFulfilled=typeof s=="function"?s:null,this.onRejected=typeof u=="function"?u:null,this.resolve=c,this.reject=f,this.psd=p}function po(s,u){var c,f;ha.push(u),s._state===null&&(c=s._lib&&Ai(),u=fo(u),s._state=!1,s._value=u,f=s,Zn.some(function(p){return p._value===f._value})||Zn.push(f),Jl(s),c&&Oi())}function Jl(s){var u=s._listeners;s._listeners=[];for(var c=0,f=u.length;c<f;++c)mo(s,u[c]);var p=s._PSD;--p.ref||p.finalize(),ei===0&&(++ei,cr(function(){--ei==0&&go()},[]))}function mo(s,u){if(s._state!==null){var c=s._state?u.onFulfilled:u.onRejected;if(c===null)return(s._state?u.resolve:u.reject)(s._value);++u.psd.ref,++ei,cr(bm,[c,s,u])}else s._listeners.push(u)}function bm(s,u,c){try{var f,p=u._value;!u._state&&ha.length&&(ha=[]),f=Te&&u._consoleTask?u._consoleTask.run(function(){return s(p)}):s(p),u._state||ha.indexOf(p)!==-1||function(v){for(var b=Zn.length;b;)if(Zn[--b]._value===v._value)return Zn.splice(b,1)}(u),c.resolve(f)}catch(v){c.reject(v)}finally{--ei==0&&go(),--c.psd.ref||c.psd.finalize()}}function km(){ti(Rn,function(){Ai()&&Oi()})}function Ai(){var s=co;return fa=co=!1,s}function Oi(){var s,u,c;do for(;0<dr.length;)for(s=dr,dr=[],c=s.length,u=0;u<c;++u){var f=s[u];f[0].apply(null,f[1])}while(0<dr.length);fa=co=!0}function go(){var s=Zn;Zn=[],s.forEach(function(f){f._PSD.onunhandled.call(null,f._value,f)});for(var u=pa.slice(0),c=u.length;c;)u[--c]()}function ma(s){return new me(ct,!1,s)}function at(s,u){var c=Ee;return function(){var f=Ai(),p=Ee;try{return Dn(c,!0),s.apply(this,arguments)}catch(v){u&&u(v)}finally{Dn(p,!1),f&&Oi()}}}g(me.prototype,{then:ho,_then:function(s,u){mo(this,new Wl(null,null,s,u,Ee))},catch:function(s){if(arguments.length===1)return this.then(null,s);var u=s,c=arguments[1];return typeof u=="function"?this.then(null,function(f){return(f instanceof u?c:ma)(f)}):this.then(null,function(f){return(f&&f.name===u?c:ma)(f)})},finally:function(s){return this.then(function(u){return me.resolve(s()).then(function(){return u})},function(u){return me.resolve(s()).then(function(){return ma(u)})})},timeout:function(s,u){var c=this;return s<1/0?new me(function(f,p){var v=setTimeout(function(){return p(new ye.Timeout(u))},s);c.then(f,p).finally(clearTimeout.bind(null,v))}):this}}),typeof Symbol!="undefined"&&Symbol.toStringTag&&_(me.prototype,Symbol.toStringTag,"Dexie.Promise"),Rn.env=Yl(),g(me,{all:function(){var s=B.apply(null,arguments).map(ba);return new me(function(u,c){s.length===0&&u([]);var f=s.length;s.forEach(function(p,v){return me.resolve(p).then(function(b){s[v]=b,--f||u(s)},c)})})},resolve:function(s){return s instanceof me?s:s&&typeof s.then=="function"?new me(function(u,c){s.then(u,c)}):new me(ct,!0,s)},reject:ma,race:function(){var s=B.apply(null,arguments).map(ba);return new me(function(u,c){s.map(function(f){return me.resolve(f).then(u,c)})})},PSD:{get:function(){return Ee},set:function(s){return Ee=s}},totalEchoes:{get:function(){return ya}},newPSD:Fn,usePSD:ti,scheduler:{get:function(){return cr},set:function(s){cr=s}},rejectionMapper:{get:function(){return fo},set:function(s){fo=s}},follow:function(s,u){return new me(function(c,f){return Fn(function(p,v){var b=Ee;b.unhandleds=[],b.onunhandled=v,b.finalize=Ae(function(){var k,A=this;k=function(){A.unhandleds.length===0?p():v(A.unhandleds[0])},pa.push(function T(){k(),pa.splice(pa.indexOf(T),1)}),++ei,cr(function(){--ei==0&&go()},[])},b.finalize),s()},u,c,f)})}}),Qn&&(Qn.allSettled&&_(me,"allSettled",function(){var s=B.apply(null,arguments).map(ba);return new me(function(u){s.length===0&&u([]);var c=s.length,f=new Array(c);s.forEach(function(p,v){return me.resolve(p).then(function(b){return f[v]={status:"fulfilled",value:b}},function(b){return f[v]={status:"rejected",reason:b}}).then(function(){return--c||u(f)})})})}),Qn.any&&typeof AggregateError!="undefined"&&_(me,"any",function(){var s=B.apply(null,arguments).map(ba);return new me(function(u,c){s.length===0&&c(new AggregateError([]));var f=s.length,p=new Array(f);s.forEach(function(v,b){return me.resolve(v).then(function(k){return u(k)},function(k){p[b]=k,--f||c(new AggregateError(p))})})})}),Qn.withResolvers&&(me.withResolvers=Qn.withResolvers));var bt={awaits:0,echoes:0,id:0},_m=0,ga=[],va=0,ya=0,wm=0;function Fn(s,u,c,f){var p=Ee,v=Object.create(p);return v.parent=p,v.ref=0,v.global=!1,v.id=++wm,Rn.env,v.env=lo?{Promise:me,PromiseProp:{value:me,configurable:!0,writable:!0},all:me.all,race:me.race,allSettled:me.allSettled,any:me.any,resolve:me.resolve,reject:me.reject}:{},u&&d(v,u),++p.ref,v.finalize=function(){--this.parent.ref||this.parent.finalize()},f=ti(v,s,c,f),v.ref===0&&v.finalize(),f}function xi(){return bt.id||(bt.id=++_m),++bt.awaits,bt.echoes+=ut,bt.id}function In(){return!!bt.awaits&&(--bt.awaits==0&&(bt.id=0),bt.echoes=bt.awaits*ut,!0)}function ba(s){return bt.echoes&&s&&s.constructor===Qn?(xi(),s.then(function(u){return In(),u},function(u){return In(),dt(u)})):s}function Sm(){var s=ga[ga.length-1];ga.pop(),Dn(s,!1)}function Dn(s,u){var c,f=Ee;(u?!bt.echoes||va++&&s===Ee:!va||--va&&s===Ee)||queueMicrotask(u?function(p){++ya,bt.echoes&&--bt.echoes!=0||(bt.echoes=bt.awaits=bt.id=0),ga.push(Ee),Dn(p,!0)}.bind(null,s):Sm),s!==Ee&&(Ee=s,f===Rn&&(Rn.env=Yl()),lo&&(c=Rn.env.Promise,u=s.env,(f.global||s.global)&&(Object.defineProperty(a,"Promise",u.PromiseProp),c.all=u.all,c.race=u.race,c.resolve=u.resolve,c.reject=u.reject,u.allSettled&&(c.allSettled=u.allSettled),u.any&&(c.any=u.any))))}function Yl(){var s=a.Promise;return lo?{Promise:s,PromiseProp:Object.getOwnPropertyDescriptor(a,"Promise"),all:s.all,race:s.race,allSettled:s.allSettled,any:s.any,resolve:s.resolve,reject:s.reject}:{}}function ti(s,u,c,f,p){var v=Ee;try{return Dn(s,!0),u(c,f,p)}finally{Dn(v,!1)}}function Xl(s,u,c,f){return typeof s!="function"?s:function(){var p=Ee;c&&xi(),Dn(u,!0);try{return s.apply(this,arguments)}finally{Dn(p,!1),f&&queueMicrotask(In)}}}function vo(s){Promise===Qn&&bt.echoes===0?va===0?s():enqueueNativeMicroTask(s):setTimeout(s,0)}(""+Kt).indexOf("[native code]")===-1&&(xi=In=Oe);var dt=me.reject,ni="",yn="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Ql="String expected.",Ti=[],ka="__dbnames",yo="readonly",bo="readwrite";function ii(s,u){return s?u?function(){return s.apply(this,arguments)&&u.apply(this,arguments)}:s:u}var Zl={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function _a(s){return typeof s!="string"||/\./.test(s)?function(u){return u}:function(u){return u[s]===void 0&&s in u&&delete(u=Ve(u))[s],u}}function ec(){throw ye.Type()}function qe(s,u){try{var c=tc(s),f=tc(u);if(c!==f)return c==="Array"?1:f==="Array"?-1:c==="binary"?1:f==="binary"?-1:c==="string"?1:f==="string"?-1:c==="Date"?1:f!=="Date"?NaN:-1;switch(c){case"number":case"Date":case"string":return u<s?1:s<u?-1:0;case"binary":return function(p,v){for(var b=p.length,k=v.length,A=b<k?b:k,T=0;T<A;++T)if(p[T]!==v[T])return p[T]<v[T]?-1:1;return b===k?0:b<k?-1:1}(nc(s),nc(u));case"Array":return function(p,v){for(var b=p.length,k=v.length,A=b<k?b:k,T=0;T<A;++T){var I=qe(p[T],v[T]);if(I!==0)return I}return b===k?0:b<k?-1:1}(s,u)}}catch{}return NaN}function tc(s){var u=typeof s;return u!="object"?u:ArrayBuffer.isView(s)?"binary":(s=N(s),s==="ArrayBuffer"?"binary":s)}function nc(s){return s instanceof Uint8Array?s:ArrayBuffer.isView(s)?new Uint8Array(s.buffer,s.byteOffset,s.byteLength):new Uint8Array(s)}var ic=(it.prototype._trans=function(s,u,c){var f=this._tx||Ee.trans,p=this.name,v=Te&&typeof console!="undefined"&&console.createTask&&console.createTask("Dexie: ".concat(s==="readonly"?"read":"write"," ").concat(this.name));function b(T,I,w){if(!w.schema[p])throw new ye.NotFound("Table "+p+" not part of transaction");return u(w.idbtrans,w)}var k=Ai();try{var A=f&&f.db._novip===this.db._novip?f===Ee.trans?f._promise(s,b,c):Fn(function(){return f._promise(s,b,c)},{trans:f,transless:Ee.transless||Ee}):function T(I,w,L,x){if(I.idbdb&&(I._state.openComplete||Ee.letThrough||I._vip)){var F=I._createTransaction(w,L,I._dbSchema);try{F.create(),I._state.PR1398_maxLoop=3}catch(P){return P.name===_e.InvalidState&&I.isOpen()&&0<--I._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),I.close({disableAutoOpen:!1}),I.open().then(function(){return T(I,w,L,x)})):dt(P)}return F._promise(w,function(P,C){return Fn(function(){return Ee.trans=F,x(P,C,F)})}).then(function(P){if(w==="readwrite")try{F.idbtrans.commit()}catch{}return w==="readonly"?P:F._completion.then(function(){return P})})}if(I._state.openComplete)return dt(new ye.DatabaseClosed(I._state.dbOpenError));if(!I._state.isBeingOpened){if(!I._state.autoOpen)return dt(new ye.DatabaseClosed);I.open().catch(Oe)}return I._state.dbReadyPromise.then(function(){return T(I,w,L,x)})}(this.db,s,[this.name],b);return v&&(A._consoleTask=v,A=A.catch(function(T){return console.trace(T),dt(T)})),A}finally{k&&Oi()}},it.prototype.get=function(s,u){var c=this;return s&&s.constructor===Object?this.where(s).first(u):s==null?dt(new ye.Type("Invalid argument to Table.get()")):this._trans("readonly",function(f){return c.core.get({trans:f,key:s}).then(function(p){return c.hook.reading.fire(p)})}).then(u)},it.prototype.where=function(s){if(typeof s=="string")return new this.db.WhereClause(this,s);if(l(s))return new this.db.WhereClause(this,"[".concat(s.join("+"),"]"));var u=o(s);if(u.length===1)return this.where(u[0]).equals(s[u[0]]);var c=this.schema.indexes.concat(this.schema.primKey).filter(function(k){if(k.compound&&u.every(function(T){return 0<=k.keyPath.indexOf(T)})){for(var A=0;A<u.length;++A)if(u.indexOf(k.keyPath[A])===-1)return!1;return!0}return!1}).sort(function(k,A){return k.keyPath.length-A.keyPath.length})[0];if(c&&this.db._maxKey!==ni){var v=c.keyPath.slice(0,u.length);return this.where(v).equals(v.map(function(A){return s[A]}))}!c&&Te&&console.warn("The query ".concat(JSON.stringify(s)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(u.join("+"),"]"));var f=this.schema.idxByName;function p(k,A){return qe(k,A)===0}var b=u.reduce(function(w,A){var T=w[0],I=w[1],w=f[A],L=s[A];return[T||w,T||!w?ii(I,w&&w.multi?function(x){return x=ne(x,A),l(x)&&x.some(function(F){return p(L,F)})}:function(x){return p(L,ne(x,A))}):I]},[null,null]),v=b[0],b=b[1];return v?this.where(v.name).equals(s[v.keyPath]).filter(b):c?this.filter(b):this.where(u).equals("")},it.prototype.filter=function(s){return this.toCollection().and(s)},it.prototype.count=function(s){return this.toCollection().count(s)},it.prototype.offset=function(s){return this.toCollection().offset(s)},it.prototype.limit=function(s){return this.toCollection().limit(s)},it.prototype.each=function(s){return this.toCollection().each(s)},it.prototype.toArray=function(s){return this.toCollection().toArray(s)},it.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},it.prototype.orderBy=function(s){return new this.db.Collection(new this.db.WhereClause(this,l(s)?"[".concat(s.join("+"),"]"):s))},it.prototype.reverse=function(){return this.toCollection().reverse()},it.prototype.mapToClass=function(s){var u,c=this.db,f=this.name;function p(){return u!==null&&u.apply(this,arguments)||this}(this.schema.mappedClass=s).prototype instanceof ec&&(function(A,T){if(typeof T!="function"&&T!==null)throw new TypeError("Class extends value "+String(T)+" is not a constructor or null");function I(){this.constructor=A}n(A,T),A.prototype=T===null?Object.create(T):(I.prototype=T.prototype,new I)}(p,u=s),Object.defineProperty(p.prototype,"db",{get:function(){return c},enumerable:!1,configurable:!0}),p.prototype.table=function(){return f},s=p);for(var v=new Set,b=s.prototype;b;b=h(b))Object.getOwnPropertyNames(b).forEach(function(A){return v.add(A)});function k(A){if(!A)return A;var T,I=Object.create(s.prototype);for(T in A)if(!v.has(T))try{I[T]=A[T]}catch{}return I}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=k,this.hook("reading",k),s},it.prototype.defineClass=function(){return this.mapToClass(function(s){d(this,s)})},it.prototype.add=function(s,u){var c=this,f=this.schema.primKey,p=f.auto,v=f.keyPath,b=s;return v&&p&&(b=_a(v)(s)),this._trans("readwrite",function(k){return c.core.mutate({trans:k,type:"add",keys:u!=null?[u]:null,values:[b]})}).then(function(k){return k.numFailures?me.reject(k.failures[0]):k.lastResult}).then(function(k){if(v)try{oe(s,v,k)}catch{}return k})},it.prototype.update=function(s,u){return typeof s!="object"||l(s)?this.where(":id").equals(s).modify(u):(s=ne(s,this.schema.primKey.keyPath),s===void 0?dt(new ye.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(s).modify(u))},it.prototype.put=function(s,u){var c=this,f=this.schema.primKey,p=f.auto,v=f.keyPath,b=s;return v&&p&&(b=_a(v)(s)),this._trans("readwrite",function(k){return c.core.mutate({trans:k,type:"put",values:[b],keys:u!=null?[u]:null})}).then(function(k){return k.numFailures?me.reject(k.failures[0]):k.lastResult}).then(function(k){if(v)try{oe(s,v,k)}catch{}return k})},it.prototype.delete=function(s){var u=this;return this._trans("readwrite",function(c){return u.core.mutate({trans:c,type:"delete",keys:[s]})}).then(function(c){return c.numFailures?me.reject(c.failures[0]):void 0})},it.prototype.clear=function(){var s=this;return this._trans("readwrite",function(u){return s.core.mutate({trans:u,type:"deleteRange",range:Zl})}).then(function(u){return u.numFailures?me.reject(u.failures[0]):void 0})},it.prototype.bulkGet=function(s){var u=this;return this._trans("readonly",function(c){return u.core.getMany({keys:s,trans:c}).then(function(f){return f.map(function(p){return u.hook.reading.fire(p)})})})},it.prototype.bulkAdd=function(s,u,c){var f=this,p=Array.isArray(u)?u:void 0,v=(c=c||(p?void 0:u))?c.allKeys:void 0;return this._trans("readwrite",function(b){var T=f.schema.primKey,k=T.auto,T=T.keyPath;if(T&&p)throw new ye.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(p&&p.length!==s.length)throw new ye.InvalidArgument("Arguments objects and keys must have the same length");var A=s.length,T=T&&k?s.map(_a(T)):s;return f.core.mutate({trans:b,type:"add",keys:p,values:T,wantResults:v}).then(function(F){var w=F.numFailures,L=F.results,x=F.lastResult,F=F.failures;if(w===0)return v?L:x;throw new pt("".concat(f.name,".bulkAdd(): ").concat(w," of ").concat(A," operations failed"),F)})})},it.prototype.bulkPut=function(s,u,c){var f=this,p=Array.isArray(u)?u:void 0,v=(c=c||(p?void 0:u))?c.allKeys:void 0;return this._trans("readwrite",function(b){var T=f.schema.primKey,k=T.auto,T=T.keyPath;if(T&&p)throw new ye.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(p&&p.length!==s.length)throw new ye.InvalidArgument("Arguments objects and keys must have the same length");var A=s.length,T=T&&k?s.map(_a(T)):s;return f.core.mutate({trans:b,type:"put",keys:p,values:T,wantResults:v}).then(function(F){var w=F.numFailures,L=F.results,x=F.lastResult,F=F.failures;if(w===0)return v?L:x;throw new pt("".concat(f.name,".bulkPut(): ").concat(w," of ").concat(A," operations failed"),F)})})},it.prototype.bulkUpdate=function(s){var u=this,c=this.core,f=s.map(function(b){return b.key}),p=s.map(function(b){return b.changes}),v=[];return this._trans("readwrite",function(b){return c.getMany({trans:b,keys:f,cache:"clone"}).then(function(k){var A=[],T=[];s.forEach(function(w,L){var x=w.key,F=w.changes,P=k[L];if(P){for(var C=0,$=Object.keys(F);C<$.length;C++){var U=$[C],V=F[U];if(U===u.schema.primKey.keyPath){if(qe(V,x)!==0)throw new ye.Constraint("Cannot update primary key in bulkUpdate()")}else oe(P,U,V)}v.push(L),A.push(x),T.push(P)}});var I=A.length;return c.mutate({trans:b,type:"put",keys:A,values:T,updates:{keys:f,changeSpecs:p}}).then(function(w){var L=w.numFailures,x=w.failures;if(L===0)return I;for(var F=0,P=Object.keys(x);F<P.length;F++){var C,$=P[F],U=v[Number($)];U!=null&&(C=x[$],delete x[$],x[U]=C)}throw new pt("".concat(u.name,".bulkUpdate(): ").concat(L," of ").concat(I," operations failed"),x)})})})},it.prototype.bulkDelete=function(s){var u=this,c=s.length;return this._trans("readwrite",function(f){return u.core.mutate({trans:f,type:"delete",keys:s})}).then(function(b){var p=b.numFailures,v=b.lastResult,b=b.failures;if(p===0)return v;throw new pt("".concat(u.name,".bulkDelete(): ").concat(p," of ").concat(c," operations failed"),b)})},it);function it(){}function fr(s){function u(b,k){if(k){for(var A=arguments.length,T=new Array(A-1);--A;)T[A-1]=arguments[A];return c[b].subscribe.apply(null,T),s}if(typeof b=="string")return c[b]}var c={};u.addEventType=v;for(var f=1,p=arguments.length;f<p;++f)v(arguments[f]);return u;function v(b,k,A){if(typeof b!="object"){var T;k=k||Ye;var I={subscribers:[],fire:A=A||Oe,subscribe:function(w){I.subscribers.indexOf(w)===-1&&(I.subscribers.push(w),I.fire=k(I.fire,w))},unsubscribe:function(w){I.subscribers=I.subscribers.filter(function(L){return L!==w}),I.fire=I.subscribers.reduce(k,A)}};return c[b]=u[b]=I}o(T=b).forEach(function(w){var L=T[w];if(l(L))v(w,T[w][0],T[w][1]);else{if(L!=="asap")throw new ye.InvalidArgument("Invalid event config");var x=v(w,wt,function(){for(var F=arguments.length,P=new Array(F);F--;)P[F]=arguments[F];x.subscribers.forEach(function(C){X(function(){C.apply(null,P)})})})}})}}function hr(s,u){return S(u).from({prototype:s}),u}function Ci(s,u){return!(s.filter||s.algorithm||s.or)&&(u?s.justLimit:!s.replayFilter)}function ko(s,u){s.filter=ii(s.filter,u)}function _o(s,u,c){var f=s.replayFilter;s.replayFilter=f?function(){return ii(f(),u())}:u,s.justLimit=c&&!f}function wa(s,u){if(s.isPrimKey)return u.primaryKey;var c=u.getIndexByKeyPath(s.index);if(!c)throw new ye.Schema("KeyPath "+s.index+" on object store "+u.name+" is not indexed");return c}function rc(s,u,c){var f=wa(s,u.schema);return u.openCursor({trans:c,values:!s.keysOnly,reverse:s.dir==="prev",unique:!!s.unique,query:{index:f,range:s.range}})}function Sa(s,u,c,f){var p=s.replayFilter?ii(s.filter,s.replayFilter()):s.filter;if(s.or){var v={},b=function(k,A,T){var I,w;p&&!p(A,T,function(L){return A.stop(L)},function(L){return A.fail(L)})||((w=""+(I=A.primaryKey))=="[object ArrayBuffer]"&&(w=""+new Uint8Array(I)),y(v,w)||(v[w]=!0,u(k,A,T)))};return Promise.all([s.or._iterate(b,c),ac(rc(s,f,c),s.algorithm,b,!s.keysOnly&&s.valueMapper)])}return ac(rc(s,f,c),ii(s.algorithm,p),u,!s.keysOnly&&s.valueMapper)}function ac(s,u,c,f){var p=at(f?function(v,b,k){return c(f(v),b,k)}:c);return s.then(function(v){if(v)return v.start(function(){var b=function(){return v.continue()};u&&!u(v,function(k){return b=k},function(k){v.stop(k),b=Oe},function(k){v.fail(k),b=Oe})||p(v.value,v,function(k){return b=k}),b()})})}var pr=(sc.prototype.execute=function(s){var u=this["@@propmod"];if(u.add!==void 0){var c=u.add;if(l(c))return r(r([],l(s)?s:[],!0),c).sort();if(typeof c=="number")return(Number(s)||0)+c;if(typeof c=="bigint")try{return BigInt(s)+c}catch{return BigInt(0)+c}throw new TypeError("Invalid term ".concat(c))}if(u.remove!==void 0){var f=u.remove;if(l(f))return l(s)?s.filter(function(p){return!f.includes(p)}).sort():[];if(typeof f=="number")return Number(s)-f;if(typeof f=="bigint")try{return BigInt(s)-f}catch{return BigInt(0)-f}throw new TypeError("Invalid subtrahend ".concat(f))}return c=(c=u.replacePrefix)===null||c===void 0?void 0:c[0],c&&typeof s=="string"&&s.startsWith(c)?u.replacePrefix[1]+s.substring(c.length):s},sc);function sc(s){this["@@propmod"]=s}var Em=(ze.prototype._read=function(s,u){var c=this._ctx;return c.error?c.table._trans(null,dt.bind(null,c.error)):c.table._trans("readonly",s).then(u)},ze.prototype._write=function(s){var u=this._ctx;return u.error?u.table._trans(null,dt.bind(null,u.error)):u.table._trans("readwrite",s,"locked")},ze.prototype._addAlgorithm=function(s){var u=this._ctx;u.algorithm=ii(u.algorithm,s)},ze.prototype._iterate=function(s,u){return Sa(this._ctx,s,u,this._ctx.table.core)},ze.prototype.clone=function(s){var u=Object.create(this.constructor.prototype),c=Object.create(this._ctx);return s&&d(c,s),u._ctx=c,u},ze.prototype.raw=function(){return this._ctx.valueMapper=null,this},ze.prototype.each=function(s){var u=this._ctx;return this._read(function(c){return Sa(u,s,c,u.table.core)})},ze.prototype.count=function(s){var u=this;return this._read(function(c){var f=u._ctx,p=f.table.core;if(Ci(f,!0))return p.count({trans:c,query:{index:wa(f,p.schema),range:f.range}}).then(function(b){return Math.min(b,f.limit)});var v=0;return Sa(f,function(){return++v,!1},c,p).then(function(){return v})}).then(s)},ze.prototype.sortBy=function(s,u){var c=s.split(".").reverse(),f=c[0],p=c.length-1;function v(A,T){return T?v(A[c[T]],T-1):A[f]}var b=this._ctx.dir==="next"?1:-1;function k(A,T){return qe(v(A,p),v(T,p))*b}return this.toArray(function(A){return A.sort(k)}).then(u)},ze.prototype.toArray=function(s){var u=this;return this._read(function(c){var f=u._ctx;if(f.dir==="next"&&Ci(f,!0)&&0<f.limit){var p=f.valueMapper,v=wa(f,f.table.core.schema);return f.table.core.query({trans:c,limit:f.limit,values:!0,query:{index:v,range:f.range}}).then(function(k){return k=k.result,p?k.map(p):k})}var b=[];return Sa(f,function(k){return b.push(k)},c,f.table.core).then(function(){return b})},s)},ze.prototype.offset=function(s){var u=this._ctx;return s<=0||(u.offset+=s,Ci(u)?_o(u,function(){var c=s;return function(f,p){return c===0||(c===1?--c:p(function(){f.advance(c),c=0}),!1)}}):_o(u,function(){var c=s;return function(){return--c<0}})),this},ze.prototype.limit=function(s){return this._ctx.limit=Math.min(this._ctx.limit,s),_o(this._ctx,function(){var u=s;return function(c,f,p){return--u<=0&&f(p),0<=u}},!0),this},ze.prototype.until=function(s,u){return ko(this._ctx,function(c,f,p){return!s(c.value)||(f(p),u)}),this},ze.prototype.first=function(s){return this.limit(1).toArray(function(u){return u[0]}).then(s)},ze.prototype.last=function(s){return this.reverse().first(s)},ze.prototype.filter=function(s){var u;return ko(this._ctx,function(c){return s(c.value)}),(u=this._ctx).isMatch=ii(u.isMatch,s),this},ze.prototype.and=function(s){return this.filter(s)},ze.prototype.or=function(s){return new this.db.WhereClause(this._ctx.table,s,this)},ze.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},ze.prototype.desc=function(){return this.reverse()},ze.prototype.eachKey=function(s){var u=this._ctx;return u.keysOnly=!u.isMatch,this.each(function(c,f){s(f.key,f)})},ze.prototype.eachUniqueKey=function(s){return this._ctx.unique="unique",this.eachKey(s)},ze.prototype.eachPrimaryKey=function(s){var u=this._ctx;return u.keysOnly=!u.isMatch,this.each(function(c,f){s(f.primaryKey,f)})},ze.prototype.keys=function(s){var u=this._ctx;u.keysOnly=!u.isMatch;var c=[];return this.each(function(f,p){c.push(p.key)}).then(function(){return c}).then(s)},ze.prototype.primaryKeys=function(s){var u=this._ctx;if(u.dir==="next"&&Ci(u,!0)&&0<u.limit)return this._read(function(f){var p=wa(u,u.table.core.schema);return u.table.core.query({trans:f,values:!1,limit:u.limit,query:{index:p,range:u.range}})}).then(function(f){return f.result}).then(s);u.keysOnly=!u.isMatch;var c=[];return this.each(function(f,p){c.push(p.primaryKey)}).then(function(){return c}).then(s)},ze.prototype.uniqueKeys=function(s){return this._ctx.unique="unique",this.keys(s)},ze.prototype.firstKey=function(s){return this.limit(1).keys(function(u){return u[0]}).then(s)},ze.prototype.lastKey=function(s){return this.reverse().firstKey(s)},ze.prototype.distinct=function(){var s=this._ctx,s=s.index&&s.table.schema.idxByName[s.index];if(!s||!s.multi)return this;var u={};return ko(this._ctx,function(p){var f=p.primaryKey.toString(),p=y(u,f);return u[f]=!0,!p}),this},ze.prototype.modify=function(s){var u=this,c=this._ctx;return this._write(function(f){var p,v,b;b=typeof s=="function"?s:(p=o(s),v=p.length,function(C){for(var $=!1,U=0;U<v;++U){var V=p[U],G=s[V],re=ne(C,V);G instanceof pr?(oe(C,V,G.execute(re)),$=!0):re!==G&&(oe(C,V,G),$=!0)}return $});var k=c.table.core,w=k.schema.primaryKey,A=w.outbound,T=w.extractKey,I=200,w=u.db._options.modifyChunkSize;w&&(I=typeof w=="object"?w[k.name]||w["*"]||200:w);function L(C,V){var U=V.failures,V=V.numFailures;F+=C-V;for(var G=0,re=o(U);G<re.length;G++){var fe=re[G];x.push(U[fe])}}var x=[],F=0,P=[];return u.clone().primaryKeys().then(function(C){function $(V){var G=Math.min(I,C.length-V);return k.getMany({trans:f,keys:C.slice(V,V+G),cache:"immutable"}).then(function(re){for(var fe=[],ae=[],le=A?[]:null,pe=[],de=0;de<G;++de){var be=re[de],De={value:Ve(be),primKey:C[V+de]};b.call(De,De.value,De)!==!1&&(De.value==null?pe.push(C[V+de]):A||qe(T(be),T(De.value))===0?(ae.push(De.value),A&&le.push(C[V+de])):(pe.push(C[V+de]),fe.push(De.value)))}return Promise.resolve(0<fe.length&&k.mutate({trans:f,type:"add",values:fe}).then(function(Be){for(var Ue in Be.failures)pe.splice(parseInt(Ue),1);L(fe.length,Be)})).then(function(){return(0<ae.length||U&&typeof s=="object")&&k.mutate({trans:f,type:"put",keys:le,values:ae,criteria:U,changeSpec:typeof s!="function"&&s,isAdditionalChunk:0<V}).then(function(Be){return L(ae.length,Be)})}).then(function(){return(0<pe.length||U&&s===wo)&&k.mutate({trans:f,type:"delete",keys:pe,criteria:U,isAdditionalChunk:0<V}).then(function(Be){return L(pe.length,Be)})}).then(function(){return C.length>V+G&&$(V+I)})})}var U=Ci(c)&&c.limit===1/0&&(typeof s!="function"||s===wo)&&{index:c.index,range:c.range};return $(0).then(function(){if(0<x.length)throw new H("Error modifying one or more objects",x,F,P);return C.length})})})},ze.prototype.delete=function(){var s=this._ctx,u=s.range;return Ci(s)&&(s.isPrimKey||u.type===3)?this._write(function(c){var f=s.table.core.schema.primaryKey,p=u;return s.table.core.count({trans:c,query:{index:f,range:p}}).then(function(v){return s.table.core.mutate({trans:c,type:"deleteRange",range:p}).then(function(b){var k=b.failures;if(b.lastResult,b.results,b=b.numFailures,b)throw new H("Could not delete some values",Object.keys(k).map(function(A){return k[A]}),v-b);return v-b})})}):this.modify(wo)},ze);function ze(){}var wo=function(s,u){return u.value=null};function Nm(s,u){return s<u?-1:s===u?0:1}function Am(s,u){return u<s?-1:s===u?0:1}function $t(s,u,c){return s=s instanceof uc?new s.Collection(s):s,s._ctx.error=new(c||TypeError)(u),s}function Ri(s){return new s.Collection(s,function(){return oc("")}).limit(0)}function Ea(s,u,c,f){var p,v,b,k,A,T,I,w=c.length;if(!c.every(function(F){return typeof F=="string"}))return $t(s,Ql);function L(F){p=F==="next"?function(C){return C.toUpperCase()}:function(C){return C.toLowerCase()},v=F==="next"?function(C){return C.toLowerCase()}:function(C){return C.toUpperCase()},b=F==="next"?Nm:Am;var P=c.map(function(C){return{lower:v(C),upper:p(C)}}).sort(function(C,$){return b(C.lower,$.lower)});k=P.map(function(C){return C.upper}),A=P.map(function(C){return C.lower}),I=(T=F)==="next"?"":f}L("next"),s=new s.Collection(s,function(){return Pn(k[0],A[w-1]+f)}),s._ondirectionchange=function(F){L(F)};var x=0;return s._addAlgorithm(function(F,P,C){var $=F.key;if(typeof $!="string")return!1;var U=v($);if(u(U,A,x))return!0;for(var V=null,G=x;G<w;++G){var re=function(fe,ae,le,pe,de,be){for(var De=Math.min(fe.length,pe.length),Be=-1,Ue=0;Ue<De;++Ue){var Mt=ae[Ue];if(Mt!==pe[Ue])return de(fe[Ue],le[Ue])<0?fe.substr(0,Ue)+le[Ue]+le.substr(Ue+1):de(fe[Ue],pe[Ue])<0?fe.substr(0,Ue)+pe[Ue]+le.substr(Ue+1):0<=Be?fe.substr(0,Be)+ae[Be]+le.substr(Be+1):null;de(fe[Ue],Mt)<0&&(Be=Ue)}return De<pe.length&&be==="next"?fe+le.substr(fe.length):De<fe.length&&be==="prev"?fe.substr(0,le.length):Be<0?null:fe.substr(0,Be)+pe[Be]+le.substr(Be+1)}($,U,k[G],A[G],b,T);re===null&&V===null?x=G+1:(V===null||0<b(V,re))&&(V=re)}return P(V!==null?function(){F.continue(V+I)}:C),!1}),s}function Pn(s,u,c,f){return{type:2,lower:s,upper:u,lowerOpen:c,upperOpen:f}}function oc(s){return{type:1,lower:s,upper:s}}var uc=(Object.defineProperty(kt.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),kt.prototype.between=function(s,u,c,f){c=c!==!1,f=f===!0;try{return 0<this._cmp(s,u)||this._cmp(s,u)===0&&(c||f)&&(!c||!f)?Ri(this):new this.Collection(this,function(){return Pn(s,u,!c,!f)})}catch{return $t(this,yn)}},kt.prototype.equals=function(s){return s==null?$t(this,yn):new this.Collection(this,function(){return oc(s)})},kt.prototype.above=function(s){return s==null?$t(this,yn):new this.Collection(this,function(){return Pn(s,void 0,!0)})},kt.prototype.aboveOrEqual=function(s){return s==null?$t(this,yn):new this.Collection(this,function(){return Pn(s,void 0,!1)})},kt.prototype.below=function(s){return s==null?$t(this,yn):new this.Collection(this,function(){return Pn(void 0,s,!1,!0)})},kt.prototype.belowOrEqual=function(s){return s==null?$t(this,yn):new this.Collection(this,function(){return Pn(void 0,s)})},kt.prototype.startsWith=function(s){return typeof s!="string"?$t(this,Ql):this.between(s,s+ni,!0,!0)},kt.prototype.startsWithIgnoreCase=function(s){return s===""?this.startsWith(s):Ea(this,function(u,c){return u.indexOf(c[0])===0},[s],ni)},kt.prototype.equalsIgnoreCase=function(s){return Ea(this,function(u,c){return u===c[0]},[s],"")},kt.prototype.anyOfIgnoreCase=function(){var s=B.apply(se,arguments);return s.length===0?Ri(this):Ea(this,function(u,c){return c.indexOf(u)!==-1},s,"")},kt.prototype.startsWithAnyOfIgnoreCase=function(){var s=B.apply(se,arguments);return s.length===0?Ri(this):Ea(this,function(u,c){return c.some(function(f){return u.indexOf(f)===0})},s,ni)},kt.prototype.anyOf=function(){var s=this,u=B.apply(se,arguments),c=this._cmp;try{u.sort(c)}catch{return $t(this,yn)}if(u.length===0)return Ri(this);var f=new this.Collection(this,function(){return Pn(u[0],u[u.length-1])});f._ondirectionchange=function(v){c=v==="next"?s._ascending:s._descending,u.sort(c)};var p=0;return f._addAlgorithm(function(v,b,k){for(var A=v.key;0<c(A,u[p]);)if(++p===u.length)return b(k),!1;return c(A,u[p])===0||(b(function(){v.continue(u[p])}),!1)}),f},kt.prototype.notEqual=function(s){return this.inAnyRange([[-1/0,s],[s,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},kt.prototype.noneOf=function(){var s=B.apply(se,arguments);if(s.length===0)return new this.Collection(this);try{s.sort(this._ascending)}catch{return $t(this,yn)}var u=s.reduce(function(c,f){return c?c.concat([[c[c.length-1][1],f]]):[[-1/0,f]]},null);return u.push([s[s.length-1],this.db._maxKey]),this.inAnyRange(u,{includeLowers:!1,includeUppers:!1})},kt.prototype.inAnyRange=function($,u){var c=this,f=this._cmp,p=this._ascending,v=this._descending,b=this._min,k=this._max;if($.length===0)return Ri(this);if(!$.every(function(U){return U[0]!==void 0&&U[1]!==void 0&&p(U[0],U[1])<=0}))return $t(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",ye.InvalidArgument);var A=!u||u.includeLowers!==!1,T=u&&u.includeUppers===!0,I,w=p;function L(U,V){return w(U[0],V[0])}try{(I=$.reduce(function(U,V){for(var G=0,re=U.length;G<re;++G){var fe=U[G];if(f(V[0],fe[1])<0&&0<f(V[1],fe[0])){fe[0]=b(fe[0],V[0]),fe[1]=k(fe[1],V[1]);break}}return G===re&&U.push(V),U},[])).sort(L)}catch{return $t(this,yn)}var x=0,F=T?function(U){return 0<p(U,I[x][1])}:function(U){return 0<=p(U,I[x][1])},P=A?function(U){return 0<v(U,I[x][0])}:function(U){return 0<=v(U,I[x][0])},C=F,$=new this.Collection(this,function(){return Pn(I[0][0],I[I.length-1][1],!A,!T)});return $._ondirectionchange=function(U){w=U==="next"?(C=F,p):(C=P,v),I.sort(L)},$._addAlgorithm(function(U,V,G){for(var re,fe=U.key;C(fe);)if(++x===I.length)return V(G),!1;return!F(re=fe)&&!P(re)||(c._cmp(fe,I[x][1])===0||c._cmp(fe,I[x][0])===0||V(function(){w===p?U.continue(I[x][0]):U.continue(I[x][1])}),!1)}),$},kt.prototype.startsWithAnyOf=function(){var s=B.apply(se,arguments);return s.every(function(u){return typeof u=="string"})?s.length===0?Ri(this):this.inAnyRange(s.map(function(u){return[u,u+ni]})):$t(this,"startsWithAnyOf() only works with strings")},kt);function kt(){}function un(s){return at(function(u){return mr(u),s(u.target.error),!1})}function mr(s){s.stopPropagation&&s.stopPropagation(),s.preventDefault&&s.preventDefault()}var gr="storagemutated",So="x-storagemutated-1",Ln=fr(null,gr),Om=(ln.prototype._lock=function(){return K(!Ee.global),++this._reculock,this._reculock!==1||Ee.global||(Ee.lockOwnerFor=this),this},ln.prototype._unlock=function(){if(K(!Ee.global),--this._reculock==0)for(Ee.global||(Ee.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var s=this._blockedFuncs.shift();try{ti(s[1],s[0])}catch{}}return this},ln.prototype._locked=function(){return this._reculock&&Ee.lockOwnerFor!==this},ln.prototype.create=function(s){var u=this;if(!this.mode)return this;var c=this.db.idbdb,f=this.db._state.dbOpenError;if(K(!this.idbtrans),!s&&!c)switch(f&&f.name){case"DatabaseClosedError":throw new ye.DatabaseClosed(f);case"MissingAPIError":throw new ye.MissingAPI(f.message,f);default:throw new ye.OpenFailed(f)}if(!this.active)throw new ye.TransactionInactive;return K(this._completion._state===null),(s=this.idbtrans=s||(this.db.core||c).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=at(function(p){mr(p),u._reject(s.error)}),s.onabort=at(function(p){mr(p),u.active&&u._reject(new ye.Abort(s.error)),u.active=!1,u.on("abort").fire(p)}),s.oncomplete=at(function(){u.active=!1,u._resolve(),"mutatedParts"in s&&Ln.storagemutated.fire(s.mutatedParts)}),this},ln.prototype._promise=function(s,u,c){var f=this;if(s==="readwrite"&&this.mode!=="readwrite")return dt(new ye.ReadOnly("Transaction is readonly"));if(!this.active)return dt(new ye.TransactionInactive);if(this._locked())return new me(function(v,b){f._blockedFuncs.push([function(){f._promise(s,u,c).then(v,b)},Ee])});if(c)return Fn(function(){var v=new me(function(b,k){f._lock();var A=u(b,k,f);A&&A.then&&A.then(b,k)});return v.finally(function(){return f._unlock()}),v._lib=!0,v});var p=new me(function(v,b){var k=u(v,b,f);k&&k.then&&k.then(v,b)});return p._lib=!0,p},ln.prototype._root=function(){return this.parent?this.parent._root():this},ln.prototype.waitFor=function(s){var u,c=this._root(),f=me.resolve(s);c._waitingFor?c._waitingFor=c._waitingFor.then(function(){return f}):(c._waitingFor=f,c._waitingQueue=[],u=c.idbtrans.objectStore(c.storeNames[0]),function v(){for(++c._spinCount;c._waitingQueue.length;)c._waitingQueue.shift()();c._waitingFor&&(u.get(-1/0).onsuccess=v)}());var p=c._waitingFor;return new me(function(v,b){f.then(function(k){return c._waitingQueue.push(at(v.bind(null,k)))},function(k){return c._waitingQueue.push(at(b.bind(null,k)))}).finally(function(){c._waitingFor===p&&(c._waitingFor=null)})})},ln.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new ye.Abort))},ln.prototype.table=function(s){var u=this._memoizedTables||(this._memoizedTables={});if(y(u,s))return u[s];var c=this.schema[s];if(!c)throw new ye.NotFound("Table "+s+" not part of transaction");return c=new this.db.Table(s,c,this),c.core=this.db.core.table(s),u[s]=c},ln);function ln(){}function Eo(s,u,c,f,p,v,b){return{name:s,keyPath:u,unique:c,multi:f,auto:p,compound:v,src:(c&&!b?"&":"")+(f?"*":"")+(p?"++":"")+lc(u)}}function lc(s){return typeof s=="string"?s:s?"["+[].join.call(s,"+")+"]":""}function No(s,u,c){return{name:s,primKey:u,indexes:c,mappedClass:null,idxByName:(f=function(p){return[p.name,p]},c.reduce(function(p,v,b){return b=f(v,b),b&&(p[b[0]]=b[1]),p},{}))};var f}var vr=function(s){try{return s.only([[]]),vr=function(){return[[]]},[[]]}catch{return vr=function(){return ni},ni}};function Ao(s){return s==null?function(){}:typeof s=="string"?(u=s).split(".").length===1?function(c){return c[u]}:function(c){return ne(c,u)}:function(c){return ne(c,s)};var u}function cc(s){return[].slice.call(s)}var xm=0;function yr(s){return s==null?":id":typeof s=="string"?s:"[".concat(s.join("+"),"]")}function Tm(s,u,A){function f(C){if(C.type===3)return null;if(C.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var x=C.lower,F=C.upper,P=C.lowerOpen,C=C.upperOpen;return x===void 0?F===void 0?null:u.upperBound(F,!!C):F===void 0?u.lowerBound(x,!!P):u.bound(x,F,!!P,!!C)}function p(L){var x,F=L.name;return{name:F,schema:L,mutate:function(P){var C=P.trans,$=P.type,U=P.keys,V=P.values,G=P.range;return new Promise(function(re,fe){re=at(re);var ae=C.objectStore(F),le=ae.keyPath==null,pe=$==="put"||$==="add";if(!pe&&$!=="delete"&&$!=="deleteRange")throw new Error("Invalid operation type: "+$);var de,be=(U||V||{length:1}).length;if(U&&V&&U.length!==V.length)throw new Error("Given keys array must have same length as given values array.");if(be===0)return re({numFailures:0,failures:{},results:[],lastResult:void 0});function De(Ct){++Mt,mr(Ct)}var Be=[],Ue=[],Mt=0;if($==="deleteRange"){if(G.type===4)return re({numFailures:Mt,failures:Ue,results:[],lastResult:void 0});G.type===3?Be.push(de=ae.clear()):Be.push(de=ae.delete(f(G)))}else{var le=pe?le?[V,U]:[V,null]:[U,null],Ie=le[0],At=le[1];if(pe)for(var Ot=0;Ot<be;++Ot)Be.push(de=At&&At[Ot]!==void 0?ae[$](Ie[Ot],At[Ot]):ae[$](Ie[Ot])),de.onerror=De;else for(Ot=0;Ot<be;++Ot)Be.push(de=ae[$](Ie[Ot])),de.onerror=De}function $a(Ct){Ct=Ct.target.result,Be.forEach(function(si,qo){return si.error!=null&&(Ue[qo]=si.error)}),re({numFailures:Mt,failures:Ue,results:$==="delete"?U:Be.map(function(si){return si.result}),lastResult:Ct})}de.onerror=function(Ct){De(Ct),$a(Ct)},de.onsuccess=$a})},getMany:function(P){var C=P.trans,$=P.keys;return new Promise(function(U,V){U=at(U);for(var G,re=C.objectStore(F),fe=$.length,ae=new Array(fe),le=0,pe=0,de=function(Be){Be=Be.target,ae[Be._pos]=Be.result,++pe===le&&U(ae)},be=un(V),De=0;De<fe;++De)$[De]!=null&&((G=re.get($[De]))._pos=De,G.onsuccess=de,G.onerror=be,++le);le===0&&U(ae)})},get:function(P){var C=P.trans,$=P.key;return new Promise(function(U,V){U=at(U);var G=C.objectStore(F).get($);G.onsuccess=function(re){return U(re.target.result)},G.onerror=un(V)})},query:(x=T,function(P){return new Promise(function(C,$){C=at(C);var U,V,G,le=P.trans,re=P.values,fe=P.limit,de=P.query,ae=fe===1/0?void 0:fe,pe=de.index,de=de.range,le=le.objectStore(F),pe=pe.isPrimaryKey?le:le.index(pe.name),de=f(de);if(fe===0)return C({result:[]});x?((ae=re?pe.getAll(de,ae):pe.getAllKeys(de,ae)).onsuccess=function(be){return C({result:be.target.result})},ae.onerror=un($)):(U=0,V=!re&&"openKeyCursor"in pe?pe.openKeyCursor(de):pe.openCursor(de),G=[],V.onsuccess=function(be){var De=V.result;return De?(G.push(re?De.value:De.primaryKey),++U===fe?C({result:G}):void De.continue()):C({result:G})},V.onerror=un($))})}),openCursor:function(P){var C=P.trans,$=P.values,U=P.query,V=P.reverse,G=P.unique;return new Promise(function(re,fe){re=at(re);var pe=U.index,ae=U.range,le=C.objectStore(F),le=pe.isPrimaryKey?le:le.index(pe.name),pe=V?G?"prevunique":"prev":G?"nextunique":"next",de=!$&&"openKeyCursor"in le?le.openKeyCursor(f(ae),pe):le.openCursor(f(ae),pe);de.onerror=un(fe),de.onsuccess=at(function(be){var De,Be,Ue,Mt,Ie=de.result;Ie?(Ie.___id=++xm,Ie.done=!1,De=Ie.continue.bind(Ie),Be=(Be=Ie.continuePrimaryKey)&&Be.bind(Ie),Ue=Ie.advance.bind(Ie),Mt=function(){throw new Error("Cursor not stopped")},Ie.trans=C,Ie.stop=Ie.continue=Ie.continuePrimaryKey=Ie.advance=function(){throw new Error("Cursor not started")},Ie.fail=at(fe),Ie.next=function(){var At=this,Ot=1;return this.start(function(){return Ot--?At.continue():At.stop()}).then(function(){return At})},Ie.start=function(At){function Ot(){if(de.result)try{At()}catch(Ct){Ie.fail(Ct)}else Ie.done=!0,Ie.start=function(){throw new Error("Cursor behind last entry")},Ie.stop()}var $a=new Promise(function(Ct,si){Ct=at(Ct),de.onerror=un(si),Ie.fail=si,Ie.stop=function(qo){Ie.stop=Ie.continue=Ie.continuePrimaryKey=Ie.advance=Mt,Ct(qo)}});return de.onsuccess=at(function(Ct){de.onsuccess=Ot,Ot()}),Ie.continue=De,Ie.continuePrimaryKey=Be,Ie.advance=Ue,Ot(),$a},re(Ie)):re(null)},fe)})},count:function(P){var C=P.query,$=P.trans,U=C.index,V=C.range;return new Promise(function(G,re){var fe=$.objectStore(F),ae=U.isPrimaryKey?fe:fe.index(U.name),fe=f(V),ae=fe?ae.count(fe):ae.count();ae.onsuccess=at(function(le){return G(le.target.result)}),ae.onerror=un(re)})}}}var v,b,k,I=(b=A,k=cc((v=s).objectStoreNames),{schema:{name:v.name,tables:k.map(function(L){return b.objectStore(L)}).map(function(L){var x=L.keyPath,C=L.autoIncrement,F=l(x),P={},C={name:L.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:x==null,compound:F,keyPath:x,autoIncrement:C,unique:!0,extractKey:Ao(x)},indexes:cc(L.indexNames).map(function($){return L.index($)}).map(function(G){var U=G.name,V=G.unique,re=G.multiEntry,G=G.keyPath,re={name:U,compound:l(G),keyPath:G,unique:V,multiEntry:re,extractKey:Ao(G)};return P[yr(G)]=re}),getIndexByKeyPath:function($){return P[yr($)]}};return P[":id"]=C.primaryKey,x!=null&&(P[yr(x)]=C.primaryKey),C})},hasGetAll:0<k.length&&"getAll"in b.objectStore(k[0])&&!(typeof navigator!="undefined"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),A=I.schema,T=I.hasGetAll,I=A.tables.map(p),w={};return I.forEach(function(L){return w[L.name]=L}),{stack:"dbcore",transaction:s.transaction.bind(s),table:function(L){if(!w[L])throw new Error("Table '".concat(L,"' not found"));return w[L]},MIN_KEY:-1/0,MAX_KEY:vr(u),schema:A}}function Cm(s,u,c,f){var p=c.IDBKeyRange;return c.indexedDB,{dbcore:(f=Tm(u,p,f),s.dbcore.reduce(function(v,b){return b=b.create,i(i({},v),b(v))},f))}}function Na(s,f){var c=f.db,f=Cm(s._middlewares,c,s._deps,f);s.core=f.dbcore,s.tables.forEach(function(p){var v=p.name;s.core.schema.tables.some(function(b){return b.name===v})&&(p.core=s.core.table(v),s[v]instanceof s.Table&&(s[v].core=p.core))})}function Aa(s,u,c,f){c.forEach(function(p){var v=f[p];u.forEach(function(b){var k=function A(T,I){return E(T,I)||(T=h(T))&&A(T,I)}(b,p);(!k||"value"in k&&k.value===void 0)&&(b===s.Transaction.prototype||b instanceof s.Transaction?_(b,p,{get:function(){return this.table(p)},set:function(A){O(this,p,{value:A,writable:!0,configurable:!0,enumerable:!0})}}):b[p]=new s.Table(p,v))})})}function Oo(s,u){u.forEach(function(c){for(var f in c)c[f]instanceof s.Table&&delete c[f]})}function Rm(s,u){return s._cfg.version-u._cfg.version}function Fm(s,u,c,f){var p=s._dbSchema;c.objectStoreNames.contains("$meta")&&!p.$meta&&(p.$meta=No("$meta",fc("")[0],[]),s._storeNames.push("$meta"));var v=s._createTransaction("readwrite",s._storeNames,p);v.create(c),v._completion.catch(f);var b=v._reject.bind(v),k=Ee.transless||Ee;Fn(function(){return Ee.trans=v,Ee.transless=k,u!==0?(Na(s,c),T=u,((A=v).storeNames.includes("$meta")?A.table("$meta").get("version").then(function(I){return I!=null?I:T}):me.resolve(T)).then(function(I){return L=I,x=v,F=c,P=[],I=(w=s)._versions,C=w._dbSchema=xa(0,w.idbdb,F),(I=I.filter(function($){return $._cfg.version>=L})).length!==0?(I.forEach(function($){P.push(function(){var U=C,V=$._cfg.dbschema;Ta(w,U,F),Ta(w,V,F),C=w._dbSchema=V;var G=xo(U,V);G.add.forEach(function(pe){To(F,pe[0],pe[1].primKey,pe[1].indexes)}),G.change.forEach(function(pe){if(pe.recreate)throw new ye.Upgrade("Not yet support for changing primary key");var de=F.objectStore(pe.name);pe.add.forEach(function(be){return Oa(de,be)}),pe.change.forEach(function(be){de.deleteIndex(be.name),Oa(de,be)}),pe.del.forEach(function(be){return de.deleteIndex(be)})});var re=$._cfg.contentUpgrade;if(re&&$._cfg.version>L){Na(w,F),x._memoizedTables={};var fe=Se(V);G.del.forEach(function(pe){fe[pe]=U[pe]}),Oo(w,[w.Transaction.prototype]),Aa(w,[w.Transaction.prototype],o(fe),fe),x.schema=fe;var ae,le=Fe(re);return le&&xi(),G=me.follow(function(){var pe;(ae=re(x))&&le&&(pe=In.bind(null,null),ae.then(pe,pe))}),ae&&typeof ae.then=="function"?me.resolve(ae):G.then(function(){return ae})}}),P.push(function(U){var V,G,re=$._cfg.dbschema;V=re,G=U,[].slice.call(G.db.objectStoreNames).forEach(function(fe){return V[fe]==null&&G.db.deleteObjectStore(fe)}),Oo(w,[w.Transaction.prototype]),Aa(w,[w.Transaction.prototype],w._storeNames,w._dbSchema),x.schema=w._dbSchema}),P.push(function(U){w.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(w.idbdb.version/10)===$._cfg.version?(w.idbdb.deleteObjectStore("$meta"),delete w._dbSchema.$meta,w._storeNames=w._storeNames.filter(function(V){return V!=="$meta"})):U.objectStore("$meta").put($._cfg.version,"version"))})}),function $(){return P.length?me.resolve(P.shift()(x.idbtrans)).then($):me.resolve()}().then(function(){dc(C,F)})):me.resolve();var w,L,x,F,P,C}).catch(b)):(o(p).forEach(function(I){To(c,I,p[I].primKey,p[I].indexes)}),Na(s,c),void me.follow(function(){return s.on.populate.fire(v)}).catch(b));var A,T})}function Im(s,u){dc(s._dbSchema,u),u.db.version%10!=0||u.objectStoreNames.contains("$meta")||u.db.createObjectStore("$meta").add(Math.ceil(u.db.version/10-1),"version");var c=xa(0,s.idbdb,u);Ta(s,s._dbSchema,u);for(var f=0,p=xo(c,s._dbSchema).change;f<p.length;f++){var v=function(b){if(b.change.length||b.recreate)return console.warn("Unable to patch indexes of table ".concat(b.name," because it has changes on the type of index or primary key.")),{value:void 0};var k=u.objectStore(b.name);b.add.forEach(function(A){Te&&console.debug("Dexie upgrade patch: Creating missing index ".concat(b.name,".").concat(A.src)),Oa(k,A)})}(p[f]);if(typeof v=="object")return v.value}}function xo(s,u){var c,f={del:[],add:[],change:[]};for(c in s)u[c]||f.del.push(c);for(c in u){var p=s[c],v=u[c];if(p){var b={name:c,def:v,recreate:!1,del:[],add:[],change:[]};if(""+(p.primKey.keyPath||"")!=""+(v.primKey.keyPath||"")||p.primKey.auto!==v.primKey.auto)b.recreate=!0,f.change.push(b);else{var k=p.idxByName,A=v.idxByName,T=void 0;for(T in k)A[T]||b.del.push(T);for(T in A){var I=k[T],w=A[T];I?I.src!==w.src&&b.change.push(w):b.add.push(w)}(0<b.del.length||0<b.add.length||0<b.change.length)&&f.change.push(b)}}else f.add.push([c,v])}return f}function To(s,u,c,f){var p=s.db.createObjectStore(u,c.keyPath?{keyPath:c.keyPath,autoIncrement:c.auto}:{autoIncrement:c.auto});return f.forEach(function(v){return Oa(p,v)}),p}function dc(s,u){o(s).forEach(function(c){u.db.objectStoreNames.contains(c)||(Te&&console.debug("Dexie: Creating missing table",c),To(u,c,s[c].primKey,s[c].indexes))})}function Oa(s,u){s.createIndex(u.name,u.keyPath,{unique:u.unique,multiEntry:u.multi})}function xa(s,u,c){var f={};return j(u.objectStoreNames,0).forEach(function(p){for(var v=c.objectStore(p),b=Eo(lc(T=v.keyPath),T||"",!0,!1,!!v.autoIncrement,T&&typeof T!="string",!0),k=[],A=0;A<v.indexNames.length;++A){var I=v.index(v.indexNames[A]),T=I.keyPath,I=Eo(I.name,T,!!I.unique,!!I.multiEntry,!1,T&&typeof T!="string",!1);k.push(I)}f[p]=No(p,b,k)}),f}function Ta(s,u,c){for(var f=c.db.objectStoreNames,p=0;p<f.length;++p){var v=f[p],b=c.objectStore(v);s._hasGetAll="getAll"in b;for(var k=0;k<b.indexNames.length;++k){var A=b.indexNames[k],T=b.index(A).keyPath,I=typeof T=="string"?T:"["+j(T).join("+")+"]";!u[v]||(T=u[v].idxByName[I])&&(T.name=A,delete u[v].idxByName[I],u[v].idxByName[A]=T)}}typeof navigator!="undefined"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&a.WorkerGlobalScope&&a instanceof a.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(s._hasGetAll=!1)}function fc(s){return s.split(",").map(function(u,c){var f=(u=u.trim()).replace(/([&*]|\+\+)/g,""),p=/^\[/.test(f)?f.match(/^\[(.*)\]$/)[1].split("+"):f;return Eo(f,p||null,/\&/.test(u),/\*/.test(u),/\+\+/.test(u),l(p),c===0)})}var Dm=(Ca.prototype._parseStoresSpec=function(s,u){o(s).forEach(function(c){if(s[c]!==null){var f=fc(s[c]),p=f.shift();if(p.unique=!0,p.multi)throw new ye.Schema("Primary key cannot be multi-valued");f.forEach(function(v){if(v.auto)throw new ye.Schema("Only primary key can be marked as autoIncrement (++)");if(!v.keyPath)throw new ye.Schema("Index must have a name and cannot be an empty string")}),u[c]=No(c,p,f)}})},Ca.prototype.stores=function(c){var u=this.db;this._cfg.storesSource=this._cfg.storesSource?d(this._cfg.storesSource,c):c;var c=u._versions,f={},p={};return c.forEach(function(v){d(f,v._cfg.storesSource),p=v._cfg.dbschema={},v._parseStoresSpec(f,p)}),u._dbSchema=p,Oo(u,[u._allTables,u,u.Transaction.prototype]),Aa(u,[u._allTables,u,u.Transaction.prototype,this._cfg.tables],o(p),p),u._storeNames=o(p),this},Ca.prototype.upgrade=function(s){return this._cfg.contentUpgrade=ue(this._cfg.contentUpgrade||Oe,s),this},Ca);function Ca(){}function Co(s,u){var c=s._dbNamesDB;return c||(c=s._dbNamesDB=new bn(ka,{addons:[],indexedDB:s,IDBKeyRange:u})).version(1).stores({dbnames:"name"}),c.table("dbnames")}function Ro(s){return s&&typeof s.databases=="function"}function Fo(s){return Fn(function(){return Ee.letThrough=!0,s()})}function Io(s){return!("from"in s)}var Nt=function(s,u){if(!this){var c=new Nt;return s&&"d"in s&&d(c,s),c}d(this,arguments.length?{d:1,from:s,to:1<arguments.length?u:s}:{d:0})};function br(s,u,c){var f=qe(u,c);if(!isNaN(f)){if(0<f)throw RangeError();if(Io(s))return d(s,{from:u,to:c,d:1});var p=s.l,f=s.r;if(qe(c,s.from)<0)return p?br(p,u,c):s.l={from:u,to:c,d:1,l:null,r:null},pc(s);if(0<qe(u,s.to))return f?br(f,u,c):s.r={from:u,to:c,d:1,l:null,r:null},pc(s);qe(u,s.from)<0&&(s.from=u,s.l=null,s.d=f?f.d+1:1),0<qe(c,s.to)&&(s.to=c,s.r=null,s.d=s.l?s.l.d+1:1),c=!s.r,p&&!s.l&&kr(s,p),f&&c&&kr(s,f)}}function kr(s,u){Io(u)||function c(f,A){var v=A.from,b=A.to,k=A.l,A=A.r;br(f,v,b),k&&c(f,k),A&&c(f,A)}(s,u)}function hc(s,u){var c=Ra(u),f=c.next();if(f.done)return!1;for(var p=f.value,v=Ra(s),b=v.next(p.from),k=b.value;!f.done&&!b.done;){if(qe(k.from,p.to)<=0&&0<=qe(k.to,p.from))return!0;qe(p.from,k.from)<0?p=(f=c.next(k.from)).value:k=(b=v.next(p.from)).value}return!1}function Ra(s){var u=Io(s)?null:{s:0,n:s};return{next:function(c){for(var f=0<arguments.length;u;)switch(u.s){case 0:if(u.s=1,f)for(;u.n.l&&qe(c,u.n.from)<0;)u={up:u,n:u.n.l,s:1};else for(;u.n.l;)u={up:u,n:u.n.l,s:1};case 1:if(u.s=2,!f||qe(c,u.n.to)<=0)return{value:u.n,done:!1};case 2:if(u.n.r){u.s=3,u={up:u,n:u.n.r,s:0};continue}case 3:u=u.up}return{done:!0}}}}function pc(s){var u,c,f=(((u=s.r)===null||u===void 0?void 0:u.d)||0)-(((c=s.l)===null||c===void 0?void 0:c.d)||0),p=1<f?"r":f<-1?"l":"";p&&(u=p=="r"?"l":"r",c=i({},s),f=s[p],s.from=f.from,s.to=f.to,s[p]=f[p],c[p]=f[u],(s[u]=c).d=mc(c)),s.d=mc(s)}function mc(c){var u=c.r,c=c.l;return(u?c?Math.max(u.d,c.d):u.d:c?c.d:0)+1}function Fa(s,u){return o(u).forEach(function(c){s[c]?kr(s[c],u[c]):s[c]=function f(p){var v,b,k={};for(v in p)y(p,v)&&(b=p[v],k[v]=!b||typeof b!="object"||Ne.has(b.constructor)?b:f(b));return k}(u[c])}),s}function Do(s,u){return s.all||u.all||Object.keys(s).some(function(c){return u[c]&&hc(u[c],s[c])})}g(Nt.prototype,((Kt={add:function(s){return kr(this,s),this},addKey:function(s){return br(this,s,s),this},addKeys:function(s){var u=this;return s.forEach(function(c){return br(u,c,c)}),this},hasKey:function(s){var u=Ra(this).next(s).value;return u&&qe(u.from,s)<=0&&0<=qe(u.to,s)}})[z]=function(){return Ra(this)},Kt));var ri={},Po={},Lo=!1;function Ia(s){Fa(Po,s),Lo||(Lo=!0,setTimeout(function(){Lo=!1,$o(Po,!(Po={}))},0))}function $o(s,u){u===void 0&&(u=!1);var c=new Set;if(s.all)for(var f=0,p=Object.values(ri);f<p.length;f++)gc(b=p[f],s,c,u);else for(var v in s){var b,k=/^idb\:\/\/(.*)\/(.*)\//.exec(v);k&&(v=k[1],k=k[2],(b=ri["idb://".concat(v,"/").concat(k)])&&gc(b,s,c,u))}c.forEach(function(A){return A()})}function gc(s,u,c,f){for(var p=[],v=0,b=Object.entries(s.queries.query);v<b.length;v++){for(var k=b[v],A=k[0],T=[],I=0,w=k[1];I<w.length;I++){var L=w[I];Do(u,L.obsSet)?L.subscribers.forEach(function(C){return c.add(C)}):f&&T.push(L)}f&&p.push([A,T])}if(f)for(var x=0,F=p;x<F.length;x++){var P=F[x],A=P[0],T=P[1];s.queries.query[A]=T}}function Pm(s){var u=s._state,c=s._deps.indexedDB;if(u.isBeingOpened||s.idbdb)return u.dbReadyPromise.then(function(){return u.dbOpenError?dt(u.dbOpenError):s});u.isBeingOpened=!0,u.dbOpenError=null,u.openComplete=!1;var f=u.openCanceller,p=Math.round(10*s.verno),v=!1;function b(){if(u.openCanceller!==f)throw new ye.DatabaseClosed("db.open() was cancelled")}function k(){return new me(function(L,x){if(b(),!c)throw new ye.MissingAPI;var F=s.name,P=u.autoSchema||!p?c.open(F):c.open(F,p);if(!P)throw new ye.MissingAPI;P.onerror=un(x),P.onblocked=at(s._fireOnBlocked),P.onupgradeneeded=at(function(C){var $;I=P.transaction,u.autoSchema&&!s._options.allowEmptyDB?(P.onerror=mr,I.abort(),P.result.close(),($=c.deleteDatabase(F)).onsuccess=$.onerror=at(function(){x(new ye.NoSuchDatabase("Database ".concat(F," doesnt exist")))})):(I.onerror=un(x),C=C.oldVersion>Math.pow(2,62)?0:C.oldVersion,w=C<1,s.idbdb=P.result,v&&Im(s,I),Fm(s,C/10,I,x))},x),P.onsuccess=at(function(){I=null;var C,$,U,V,G,re=s.idbdb=P.result,fe=j(re.objectStoreNames);if(0<fe.length)try{var ae=re.transaction((V=fe).length===1?V[0]:V,"readonly");if(u.autoSchema)$=re,U=ae,(C=s).verno=$.version/10,U=C._dbSchema=xa(0,$,U),C._storeNames=j($.objectStoreNames,0),Aa(C,[C._allTables],o(U),U);else if(Ta(s,s._dbSchema,ae),((G=xo(xa(0,(G=s).idbdb,ae),G._dbSchema)).add.length||G.change.some(function(le){return le.add.length||le.change.length}))&&!v)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),re.close(),p=re.version+1,v=!0,L(k());Na(s,ae)}catch{}Ti.push(s),re.onversionchange=at(function(le){u.vcFired=!0,s.on("versionchange").fire(le)}),re.onclose=at(function(le){s.on("close").fire(le)}),w&&(G=s._deps,ae=F,re=G.indexedDB,G=G.IDBKeyRange,Ro(re)||ae===ka||Co(re,G).put({name:ae}).catch(Oe)),L()},x)}).catch(function(L){switch(L==null?void 0:L.name){case"UnknownError":if(0<u.PR1398_maxLoop)return u.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),k();break;case"VersionError":if(0<p)return p=0,k()}return me.reject(L)})}var A,T=u.dbReadyResolve,I=null,w=!1;return me.race([f,(typeof navigator=="undefined"?me.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(L){function x(){return indexedDB.databases().finally(L)}A=setInterval(x,100),x()}).finally(function(){return clearInterval(A)}):Promise.resolve()).then(k)]).then(function(){return b(),u.onReadyBeingFired=[],me.resolve(Fo(function(){return s.on.ready.fire(s.vip)})).then(function L(){if(0<u.onReadyBeingFired.length){var x=u.onReadyBeingFired.reduce(ue,Oe);return u.onReadyBeingFired=[],me.resolve(Fo(function(){return x(s.vip)})).then(L)}})}).finally(function(){u.openCanceller===f&&(u.onReadyBeingFired=null,u.isBeingOpened=!1)}).catch(function(L){u.dbOpenError=L;try{I&&I.abort()}catch{}return f===u.openCanceller&&s._close(),dt(L)}).finally(function(){u.openComplete=!0,T()}).then(function(){var L;return w&&(L={},s.tables.forEach(function(x){x.schema.indexes.forEach(function(F){F.name&&(L["idb://".concat(s.name,"/").concat(x.name,"/").concat(F.name)]=new Nt(-1/0,[[[]]]))}),L["idb://".concat(s.name,"/").concat(x.name,"/")]=L["idb://".concat(s.name,"/").concat(x.name,"/:dels")]=new Nt(-1/0,[[[]]])}),Ln(gr).fire(L),$o(L,!0)),s})}function Mo(s){function u(v){return s.next(v)}var c=p(u),f=p(function(v){return s.throw(v)});function p(v){return function(A){var k=v(A),A=k.value;return k.done?A:A&&typeof A.then=="function"?A.then(c,f):l(A)?Promise.all(A).then(c,f):c(A)}}return p(u)()}function Da(s,u,c){for(var f=l(s)?s.slice():[s],p=0;p<c;++p)f.push(u);return f}var Lm={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(s){return i(i({},s),{table:function(u){var c=s.table(u),f=c.schema,p={},v=[];function b(w,L,x){var F=yr(w),P=p[F]=p[F]||[],C=w==null?0:typeof w=="string"?1:w.length,$=0<L,$=i(i({},x),{name:$?"".concat(F,"(virtual-from:").concat(x.name,")"):x.name,lowLevelIndex:x,isVirtual:$,keyTail:L,keyLength:C,extractKey:Ao(w),unique:!$&&x.unique});return P.push($),$.isPrimaryKey||v.push($),1<C&&b(C===2?w[0]:w.slice(0,C-1),L+1,x),P.sort(function(U,V){return U.keyTail-V.keyTail}),$}u=b(f.primaryKey.keyPath,0,f.primaryKey),p[":id"]=[u];for(var k=0,A=f.indexes;k<A.length;k++){var T=A[k];b(T.keyPath,0,T)}function I(w){var L,x=w.query.index;return x.isVirtual?i(i({},w),{query:{index:x.lowLevelIndex,range:(L=w.query.range,x=x.keyTail,{type:L.type===1?2:L.type,lower:Da(L.lower,L.lowerOpen?s.MAX_KEY:s.MIN_KEY,x),lowerOpen:!0,upper:Da(L.upper,L.upperOpen?s.MIN_KEY:s.MAX_KEY,x),upperOpen:!0})}}):w}return i(i({},c),{schema:i(i({},f),{primaryKey:u,indexes:v,getIndexByKeyPath:function(w){return(w=p[yr(w)])&&w[0]}}),count:function(w){return c.count(I(w))},query:function(w){return c.query(I(w))},openCursor:function(w){var L=w.query.index,x=L.keyTail,F=L.isVirtual,P=L.keyLength;return F?c.openCursor(I(w)).then(function($){return $&&C($)}):c.openCursor(w);function C($){return Object.create($,{continue:{value:function(U){U!=null?$.continue(Da(U,w.reverse?s.MAX_KEY:s.MIN_KEY,x)):w.unique?$.continue($.key.slice(0,P).concat(w.reverse?s.MIN_KEY:s.MAX_KEY,x)):$.continue()}},continuePrimaryKey:{value:function(U,V){$.continuePrimaryKey(Da(U,s.MAX_KEY,x),V)}},primaryKey:{get:function(){return $.primaryKey}},key:{get:function(){var U=$.key;return P===1?U[0]:U.slice(0,P)}},value:{get:function(){return $.value}}})}}})}})}};function Bo(s,u,c,f){return c=c||{},f=f||"",o(s).forEach(function(p){var v,b,k;y(u,p)?(v=s[p],b=u[p],typeof v=="object"&&typeof b=="object"&&v&&b?(k=N(v))!==N(b)?c[f+p]=u[p]:k==="Object"?Bo(v,b,c,f+p+"."):v!==b&&(c[f+p]=u[p]):v!==b&&(c[f+p]=u[p])):c[f+p]=void 0}),o(u).forEach(function(p){y(s,p)||(c[f+p]=u[p])}),c}function Uo(s,u){return u.type==="delete"?u.keys:u.keys||u.values.map(s.extractKey)}var $m={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(s){return i(i({},s),{table:function(u){var c=s.table(u),f=c.schema.primaryKey;return i(i({},c),{mutate:function(p){var v=Ee.trans,b=v.table(u).hook,k=b.deleting,A=b.creating,T=b.updating;switch(p.type){case"add":if(A.fire===Oe)break;return v._promise("readwrite",function(){return I(p)},!0);case"put":if(A.fire===Oe&&T.fire===Oe)break;return v._promise("readwrite",function(){return I(p)},!0);case"delete":if(k.fire===Oe)break;return v._promise("readwrite",function(){return I(p)},!0);case"deleteRange":if(k.fire===Oe)break;return v._promise("readwrite",function(){return function w(L,x,F){return c.query({trans:L,values:!1,query:{index:f,range:x},limit:F}).then(function(P){var C=P.result;return I({type:"delete",keys:C,trans:L}).then(function($){return 0<$.numFailures?Promise.reject($.failures[0]):C.length<F?{failures:[],numFailures:0,lastResult:void 0}:w(L,i(i({},x),{lower:C[C.length-1],lowerOpen:!0}),F)})})}(p.trans,p.range,1e4)},!0)}return c.mutate(p);function I(w){var L,x,F,P=Ee.trans,C=w.keys||Uo(f,w);if(!C)throw new Error("Keys missing");return(w=w.type==="add"||w.type==="put"?i(i({},w),{keys:C}):i({},w)).type!=="delete"&&(w.values=r([],w.values)),w.keys&&(w.keys=r([],w.keys)),L=c,F=C,((x=w).type==="add"?Promise.resolve([]):L.getMany({trans:x.trans,keys:F,cache:"immutable"})).then(function($){var U=C.map(function(V,G){var re,fe,ae,le=$[G],pe={onerror:null,onsuccess:null};return w.type==="delete"?k.fire.call(pe,V,le,P):w.type==="add"||le===void 0?(re=A.fire.call(pe,V,w.values[G],P),V==null&&re!=null&&(w.keys[G]=V=re,f.outbound||oe(w.values[G],f.keyPath,V))):(re=Bo(le,w.values[G]),(fe=T.fire.call(pe,re,V,le,P))&&(ae=w.values[G],Object.keys(fe).forEach(function(de){y(ae,de)?ae[de]=fe[de]:oe(ae,de,fe[de])}))),pe});return c.mutate(w).then(function(V){for(var G=V.failures,re=V.results,fe=V.numFailures,V=V.lastResult,ae=0;ae<C.length;++ae){var le=(re||C)[ae],pe=U[ae];le==null?pe.onerror&&pe.onerror(G[ae]):pe.onsuccess&&pe.onsuccess(w.type==="put"&&$[ae]?w.values[ae]:le)}return{failures:G,results:re,numFailures:fe,lastResult:V}}).catch(function(V){return U.forEach(function(G){return G.onerror&&G.onerror(V)}),Promise.reject(V)})})}}})}})}};function vc(s,u,c){try{if(!u||u.keys.length<s.length)return null;for(var f=[],p=0,v=0;p<u.keys.length&&v<s.length;++p)qe(u.keys[p],s[v])===0&&(f.push(c?Ve(u.values[p]):u.values[p]),++v);return f.length===s.length?f:null}catch{return null}}var Mm={stack:"dbcore",level:-1,create:function(s){return{table:function(u){var c=s.table(u);return i(i({},c),{getMany:function(f){if(!f.cache)return c.getMany(f);var p=vc(f.keys,f.trans._cache,f.cache==="clone");return p?me.resolve(p):c.getMany(f).then(function(v){return f.trans._cache={keys:f.keys,values:f.cache==="clone"?Ve(v):v},v})},mutate:function(f){return f.type!=="add"&&(f.trans._cache=null),c.mutate(f)}})}}}};function yc(s,u){return s.trans.mode==="readonly"&&!!s.subscr&&!s.trans.explicit&&s.trans.db._options.cache!=="disabled"&&!u.schema.primaryKey.outbound}function bc(s,u){switch(s){case"query":return u.values&&!u.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var Bm={stack:"dbcore",level:0,name:"Observability",create:function(s){var u=s.schema.name,c=new Nt(s.MIN_KEY,s.MAX_KEY);return i(i({},s),{transaction:function(f,p,v){if(Ee.subscr&&p!=="readonly")throw new ye.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(Ee.querier));return s.transaction(f,p,v)},table:function(f){var p=s.table(f),v=p.schema,b=v.primaryKey,w=v.indexes,k=b.extractKey,A=b.outbound,T=b.autoIncrement&&w.filter(function(x){return x.compound&&x.keyPath.includes(b.keyPath)}),I=i(i({},p),{mutate:function(x){function F(de){return de="idb://".concat(u,"/").concat(f,"/").concat(de),V[de]||(V[de]=new Nt)}var P,C,$,U=x.trans,V=x.mutatedParts||(x.mutatedParts={}),G=F(""),re=F(":dels"),fe=x.type,pe=x.type==="deleteRange"?[x.range]:x.type==="delete"?[x.keys]:x.values.length<50?[Uo(b,x).filter(function(de){return de}),x.values]:[],ae=pe[0],le=pe[1],pe=x.trans._cache;return l(ae)?(G.addKeys(ae),(pe=fe==="delete"||ae.length===le.length?vc(ae,pe):null)||re.addKeys(ae),(pe||le)&&(P=F,C=pe,$=le,v.indexes.forEach(function(de){var be=P(de.name||"");function De(Ue){return Ue!=null?de.extractKey(Ue):null}function Be(Ue){return de.multiEntry&&l(Ue)?Ue.forEach(function(Mt){return be.addKey(Mt)}):be.addKey(Ue)}(C||$).forEach(function(Ue,At){var Ie=C&&De(C[At]),At=$&&De($[At]);qe(Ie,At)!==0&&(Ie!=null&&Be(Ie),At!=null&&Be(At))})}))):ae?(le={from:(le=ae.lower)!==null&&le!==void 0?le:s.MIN_KEY,to:(le=ae.upper)!==null&&le!==void 0?le:s.MAX_KEY},re.add(le),G.add(le)):(G.add(c),re.add(c),v.indexes.forEach(function(de){return F(de.name).add(c)})),p.mutate(x).then(function(de){return!ae||x.type!=="add"&&x.type!=="put"||(G.addKeys(de.results),T&&T.forEach(function(be){for(var De=x.values.map(function(Ie){return be.extractKey(Ie)}),Be=be.keyPath.findIndex(function(Ie){return Ie===b.keyPath}),Ue=0,Mt=de.results.length;Ue<Mt;++Ue)De[Ue][Be]=de.results[Ue];F(be.name).addKeys(De)})),U.mutatedParts=Fa(U.mutatedParts||{},V),de})}}),w=function(F){var P=F.query,F=P.index,P=P.range;return[F,new Nt((F=P.lower)!==null&&F!==void 0?F:s.MIN_KEY,(P=P.upper)!==null&&P!==void 0?P:s.MAX_KEY)]},L={get:function(x){return[b,new Nt(x.key)]},getMany:function(x){return[b,new Nt().addKeys(x.keys)]},count:w,query:w,openCursor:w};return o(L).forEach(function(x){I[x]=function(F){var P=Ee.subscr,C=!!P,$=yc(Ee,p)&&bc(x,F)?F.obsSet={}:P;if(C){var U=function(le){return le="idb://".concat(u,"/").concat(f,"/").concat(le),$[le]||($[le]=new Nt)},V=U(""),G=U(":dels"),P=L[x](F),C=P[0],P=P[1];if((x==="query"&&C.isPrimaryKey&&!F.values?G:U(C.name||"")).add(P),!C.isPrimaryKey){if(x!=="count"){var re=x==="query"&&A&&F.values&&p.query(i(i({},F),{values:!1}));return p[x].apply(this,arguments).then(function(le){if(x==="query"){if(A&&F.values)return re.then(function(De){return De=De.result,V.addKeys(De),le});var pe=F.values?le.result.map(k):le.result;(F.values?V:G).addKeys(pe)}else if(x==="openCursor"){var de=le,be=F.values;return de&&Object.create(de,{key:{get:function(){return G.addKey(de.primaryKey),de.key}},primaryKey:{get:function(){var De=de.primaryKey;return G.addKey(De),De}},value:{get:function(){return be&&V.addKey(de.primaryKey),de.value}}})}return le})}G.add(c)}}return p[x].apply(this,arguments)}}),I}})}};function kc(s,u,c){if(c.numFailures===0)return u;if(u.type==="deleteRange")return null;var f=u.keys?u.keys.length:"values"in u&&u.values?u.values.length:1;return c.numFailures===f?null:(u=i({},u),l(u.keys)&&(u.keys=u.keys.filter(function(p,v){return!(v in c.failures)})),"values"in u&&l(u.values)&&(u.values=u.values.filter(function(p,v){return!(v in c.failures)})),u)}function jo(s,u){return c=s,((f=u).lower===void 0||(f.lowerOpen?0<qe(c,f.lower):0<=qe(c,f.lower)))&&(s=s,(u=u).upper===void 0||(u.upperOpen?qe(s,u.upper)<0:qe(s,u.upper)<=0));var c,f}function _c(s,u,L,f,p,v){if(!L||L.length===0)return s;var b=u.query.index,k=b.multiEntry,A=u.query.range,T=f.schema.primaryKey.extractKey,I=b.extractKey,w=(b.lowLevelIndex||b).extractKey,L=L.reduce(function(x,F){var P=x,C=[];if(F.type==="add"||F.type==="put")for(var $=new Nt,U=F.values.length-1;0<=U;--U){var V,G=F.values[U],re=T(G);$.hasKey(re)||(V=I(G),(k&&l(V)?V.some(function(de){return jo(de,A)}):jo(V,A))&&($.addKey(re),C.push(G)))}switch(F.type){case"add":var fe=new Nt().addKeys(u.values?x.map(function(be){return T(be)}):x),P=x.concat(u.values?C.filter(function(be){return be=T(be),!fe.hasKey(be)&&(fe.addKey(be),!0)}):C.map(function(be){return T(be)}).filter(function(be){return!fe.hasKey(be)&&(fe.addKey(be),!0)}));break;case"put":var ae=new Nt().addKeys(F.values.map(function(be){return T(be)}));P=x.filter(function(be){return!ae.hasKey(u.values?T(be):be)}).concat(u.values?C:C.map(function(be){return T(be)}));break;case"delete":var le=new Nt().addKeys(F.keys);P=x.filter(function(be){return!le.hasKey(u.values?T(be):be)});break;case"deleteRange":var pe=F.range;P=x.filter(function(be){return!jo(T(be),pe)})}return P},s);return L===s?s:(L.sort(function(x,F){return qe(w(x),w(F))||qe(T(x),T(F))}),u.limit&&u.limit<1/0&&(L.length>u.limit?L.length=u.limit:s.length===u.limit&&L.length<u.limit&&(p.dirty=!0)),v?Object.freeze(L):L)}function wc(s,u){return qe(s.lower,u.lower)===0&&qe(s.upper,u.upper)===0&&!!s.lowerOpen==!!u.lowerOpen&&!!s.upperOpen==!!u.upperOpen}function Um(s,u){return function(c,f,p,v){if(c===void 0)return f!==void 0?-1:0;if(f===void 0)return 1;if((f=qe(c,f))===0){if(p&&v)return 0;if(p)return 1;if(v)return-1}return f}(s.lower,u.lower,s.lowerOpen,u.lowerOpen)<=0&&0<=function(c,f,p,v){if(c===void 0)return f!==void 0?1:0;if(f===void 0)return-1;if((f=qe(c,f))===0){if(p&&v)return 0;if(p)return-1;if(v)return 1}return f}(s.upper,u.upper,s.upperOpen,u.upperOpen)}function jm(s,u,c,f){s.subscribers.add(c),f.addEventListener("abort",function(){var p,v;s.subscribers.delete(c),s.subscribers.size===0&&(p=s,v=u,setTimeout(function(){p.subscribers.size===0&&ce(v,p)},3e3))})}var Vm={stack:"dbcore",level:0,name:"Cache",create:function(s){var u=s.schema.name;return i(i({},s),{transaction:function(c,f,p){var v,b,k=s.transaction(c,f,p);return f==="readwrite"&&(b=(v=new AbortController).signal,p=function(A){return function(){if(v.abort(),f==="readwrite"){for(var T=new Set,I=0,w=c;I<w.length;I++){var L=w[I],x=ri["idb://".concat(u,"/").concat(L)];if(x){var F=s.table(L),P=x.optimisticOps.filter(function(be){return be.trans===k});if(k._explicit&&A&&k.mutatedParts)for(var C=0,$=Object.values(x.queries.query);C<$.length;C++)for(var U=0,V=(fe=$[C]).slice();U<V.length;U++)Do((ae=V[U]).obsSet,k.mutatedParts)&&(ce(fe,ae),ae.subscribers.forEach(function(be){return T.add(be)}));else if(0<P.length){x.optimisticOps=x.optimisticOps.filter(function(be){return be.trans!==k});for(var G=0,re=Object.values(x.queries.query);G<re.length;G++)for(var fe,ae,le,pe=0,de=(fe=re[G]).slice();pe<de.length;pe++)(ae=de[pe]).res!=null&&k.mutatedParts&&(A&&!ae.dirty?(le=Object.isFrozen(ae.res),le=_c(ae.res,ae.req,P,F,ae,le),ae.dirty?(ce(fe,ae),ae.subscribers.forEach(function(be){return T.add(be)})):le!==ae.res&&(ae.res=le,ae.promise=me.resolve({result:le}))):(ae.dirty&&ce(fe,ae),ae.subscribers.forEach(function(be){return T.add(be)})))}}}T.forEach(function(be){return be()})}}},k.addEventListener("abort",p(!1),{signal:b}),k.addEventListener("error",p(!1),{signal:b}),k.addEventListener("complete",p(!0),{signal:b})),k},table:function(c){var f=s.table(c),p=f.schema.primaryKey;return i(i({},f),{mutate:function(v){var b=Ee.trans;if(p.outbound||b.db._options.cache==="disabled"||b.explicit||b.idbtrans.mode!=="readwrite")return f.mutate(v);var k=ri["idb://".concat(u,"/").concat(c)];return k?(b=f.mutate(v),v.type!=="add"&&v.type!=="put"||!(50<=v.values.length||Uo(p,v).some(function(A){return A==null}))?(k.optimisticOps.push(v),v.mutatedParts&&Ia(v.mutatedParts),b.then(function(A){0<A.numFailures&&(ce(k.optimisticOps,v),(A=kc(0,v,A))&&k.optimisticOps.push(A),v.mutatedParts&&Ia(v.mutatedParts))}),b.catch(function(){ce(k.optimisticOps,v),v.mutatedParts&&Ia(v.mutatedParts)})):b.then(function(A){var T=kc(0,i(i({},v),{values:v.values.map(function(I,w){var L;return A.failures[w]?I:(I=(L=p.keyPath)!==null&&L!==void 0&&L.includes(".")?Ve(I):i({},I),oe(I,p.keyPath,A.results[w]),I)})}),A);k.optimisticOps.push(T),queueMicrotask(function(){return v.mutatedParts&&Ia(v.mutatedParts)})}),b):f.mutate(v)},query:function(v){if(!yc(Ee,f)||!bc("query",v))return f.query(v);var b=((T=Ee.trans)===null||T===void 0?void 0:T.db._options.cache)==="immutable",w=Ee,k=w.requery,A=w.signal,T=function(F,P,C,$){var U=ri["idb://".concat(F,"/").concat(P)];if(!U)return[];if(!(P=U.queries[C]))return[null,!1,U,null];var V=P[($.query?$.query.index.name:null)||""];if(!V)return[null,!1,U,null];switch(C){case"query":var G=V.find(function(re){return re.req.limit===$.limit&&re.req.values===$.values&&wc(re.req.query.range,$.query.range)});return G?[G,!0,U,V]:[V.find(function(re){return("limit"in re.req?re.req.limit:1/0)>=$.limit&&(!$.values||re.req.values)&&Um(re.req.query.range,$.query.range)}),!1,U,V];case"count":return G=V.find(function(re){return wc(re.req.query.range,$.query.range)}),[G,!!G,U,V]}}(u,c,"query",v),I=T[0],w=T[1],L=T[2],x=T[3];return I&&w?I.obsSet=v.obsSet:(w=f.query(v).then(function(F){var P=F.result;if(I&&(I.res=P),b){for(var C=0,$=P.length;C<$;++C)Object.freeze(P[C]);Object.freeze(P)}else F.result=Ve(P);return F}).catch(function(F){return x&&I&&ce(x,I),Promise.reject(F)}),I={obsSet:v.obsSet,promise:w,subscribers:new Set,type:"query",req:v,dirty:!1},x?x.push(I):(x=[I],(L=L||(ri["idb://".concat(u,"/").concat(c)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[v.query.index.name||""]=x)),jm(I,x,k,A),I.promise.then(function(F){return{result:_c(F.result,v,L==null?void 0:L.optimisticOps,f,I,b)}})}})}})}};function Pa(s,u){return new Proxy(s,{get:function(c,f,p){return f==="db"?u:Reflect.get(c,f,p)}})}var bn=(ft.prototype.version=function(s){if(isNaN(s)||s<.1)throw new ye.Type("Given version is not a positive number");if(s=Math.round(10*s)/10,this.idbdb||this._state.isBeingOpened)throw new ye.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,s);var u=this._versions,c=u.filter(function(f){return f._cfg.version===s})[0];return c||(c=new this.Version(s),u.push(c),u.sort(Rm),c.stores({}),this._state.autoSchema=!1,c)},ft.prototype._whenReady=function(s){var u=this;return this.idbdb&&(this._state.openComplete||Ee.letThrough||this._vip)?s():new me(function(c,f){if(u._state.openComplete)return f(new ye.DatabaseClosed(u._state.dbOpenError));if(!u._state.isBeingOpened){if(!u._state.autoOpen)return void f(new ye.DatabaseClosed);u.open().catch(Oe)}u._state.dbReadyPromise.then(c,f)}).then(s)},ft.prototype.use=function(s){var u=s.stack,c=s.create,f=s.level,p=s.name;return p&&this.unuse({stack:u,name:p}),s=this._middlewares[u]||(this._middlewares[u]=[]),s.push({stack:u,create:c,level:f==null?10:f,name:p}),s.sort(function(v,b){return v.level-b.level}),this},ft.prototype.unuse=function(s){var u=s.stack,c=s.name,f=s.create;return u&&this._middlewares[u]&&(this._middlewares[u]=this._middlewares[u].filter(function(p){return f?p.create!==f:!!c&&p.name!==c})),this},ft.prototype.open=function(){var s=this;return ti(Rn,function(){return Pm(s)})},ft.prototype._close=function(){var s=this._state,u=Ti.indexOf(this);if(0<=u&&Ti.splice(u,1),this.idbdb){try{this.idbdb.close()}catch{}this.idbdb=null}s.isBeingOpened||(s.dbReadyPromise=new me(function(c){s.dbReadyResolve=c}),s.openCanceller=new me(function(c,f){s.cancelOpen=f}))},ft.prototype.close=function(c){var u=(c===void 0?{disableAutoOpen:!0}:c).disableAutoOpen,c=this._state;u?(c.isBeingOpened&&c.cancelOpen(new ye.DatabaseClosed),this._close(),c.autoOpen=!1,c.dbOpenError=new ye.DatabaseClosed):(this._close(),c.autoOpen=this._options.autoOpen||c.isBeingOpened,c.openComplete=!1,c.dbOpenError=null)},ft.prototype.delete=function(s){var u=this;s===void 0&&(s={disableAutoOpen:!0});var c=0<arguments.length&&typeof arguments[0]!="object",f=this._state;return new me(function(p,v){function b(){u.close(s);var k=u._deps.indexedDB.deleteDatabase(u.name);k.onsuccess=at(function(){var A,T,I;A=u._deps,T=u.name,I=A.indexedDB,A=A.IDBKeyRange,Ro(I)||T===ka||Co(I,A).delete(T).catch(Oe),p()}),k.onerror=un(v),k.onblocked=u._fireOnBlocked}if(c)throw new ye.InvalidArgument("Invalid closeOptions argument to db.delete()");f.isBeingOpened?f.dbReadyPromise.then(b):b()})},ft.prototype.backendDB=function(){return this.idbdb},ft.prototype.isOpen=function(){return this.idbdb!==null},ft.prototype.hasBeenClosed=function(){var s=this._state.dbOpenError;return s&&s.name==="DatabaseClosed"},ft.prototype.hasFailed=function(){return this._state.dbOpenError!==null},ft.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(ft.prototype,"tables",{get:function(){var s=this;return o(this._allTables).map(function(u){return s._allTables[u]})},enumerable:!1,configurable:!0}),ft.prototype.transaction=function(){var s=function(u,c,f){var p=arguments.length;if(p<2)throw new ye.InvalidArgument("Too few arguments");for(var v=new Array(p-1);--p;)v[p-1]=arguments[p];return f=v.pop(),[u,Ke(v),f]}.apply(this,arguments);return this._transaction.apply(this,s)},ft.prototype._transaction=function(s,u,c){var f=this,p=Ee.trans;p&&p.db===this&&s.indexOf("!")===-1||(p=null);var v,b,k=s.indexOf("?")!==-1;s=s.replace("!","").replace("?","");try{if(b=u.map(function(T){if(T=T instanceof f.Table?T.name:T,typeof T!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return T}),s=="r"||s===yo)v=yo;else{if(s!="rw"&&s!=bo)throw new ye.InvalidArgument("Invalid transaction mode: "+s);v=bo}if(p){if(p.mode===yo&&v===bo){if(!k)throw new ye.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");p=null}p&&b.forEach(function(T){if(p&&p.storeNames.indexOf(T)===-1){if(!k)throw new ye.SubTransaction("Table "+T+" not included in parent transaction.");p=null}}),k&&p&&!p.active&&(p=null)}}catch(T){return p?p._promise(null,function(I,w){w(T)}):dt(T)}var A=function T(I,w,L,x,F){return me.resolve().then(function(){var P=Ee.transless||Ee,C=I._createTransaction(w,L,I._dbSchema,x);if(C.explicit=!0,P={trans:C,transless:P},x)C.idbtrans=x.idbtrans;else try{C.create(),C.idbtrans._explicit=!0,I._state.PR1398_maxLoop=3}catch(V){return V.name===_e.InvalidState&&I.isOpen()&&0<--I._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),I.close({disableAutoOpen:!1}),I.open().then(function(){return T(I,w,L,null,F)})):dt(V)}var $,U=Fe(F);return U&&xi(),P=me.follow(function(){var V;($=F.call(C,C))&&(U?(V=In.bind(null,null),$.then(V,V)):typeof $.next=="function"&&typeof $.throw=="function"&&($=Mo($)))},P),($&&typeof $.then=="function"?me.resolve($).then(function(V){return C.active?V:dt(new ye.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):P.then(function(){return $})).then(function(V){return x&&C._resolve(),C._completion.then(function(){return V})}).catch(function(V){return C._reject(V),dt(V)})})}.bind(null,this,v,b,p,c);return p?p._promise(v,A,"lock"):Ee.trans?ti(Ee.transless,function(){return f._whenReady(A)}):this._whenReady(A)},ft.prototype.table=function(s){if(!y(this._allTables,s))throw new ye.InvalidTable("Table ".concat(s," does not exist"));return this._allTables[s]},ft);function ft(s,u){var c=this;this._middlewares={},this.verno=0;var f=ft.dependencies;this._options=u=i({addons:ft.addons,autoOpen:!0,indexedDB:f.indexedDB,IDBKeyRange:f.IDBKeyRange,cache:"cloned"},u),this._deps={indexedDB:u.indexedDB,IDBKeyRange:u.IDBKeyRange},f=u.addons,this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var p,v,b,k,A,T={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:Oe,dbReadyPromise:null,cancelOpen:Oe,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:u.autoOpen};T.dbReadyPromise=new me(function(w){T.dbReadyResolve=w}),T.openCanceller=new me(function(w,L){T.cancelOpen=L}),this._state=T,this.name=s,this.on=fr(this,"populate","blocked","versionchange","close",{ready:[ue,Oe]}),this.on.ready.subscribe=J(this.on.ready.subscribe,function(w){return function(L,x){ft.vip(function(){var F,P=c._state;P.openComplete?(P.dbOpenError||me.resolve().then(L),x&&w(L)):P.onReadyBeingFired?(P.onReadyBeingFired.push(L),x&&w(L)):(w(L),F=c,x||w(function C(){F.on.ready.unsubscribe(L),F.on.ready.unsubscribe(C)}))})}}),this.Collection=(p=this,hr(Em.prototype,function($,C){this.db=p;var x=Zl,F=null;if(C)try{x=C()}catch(U){F=U}var P=$._ctx,C=P.table,$=C.hook.reading.fire;this._ctx={table:C,index:P.index,isPrimKey:!P.index||C.schema.primKey.keyPath&&P.index===C.schema.primKey.name,range:x,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:F,or:P.or,valueMapper:$!==wt?$:null}})),this.Table=(v=this,hr(ic.prototype,function(w,L,x){this.db=v,this._tx=x,this.name=w,this.schema=L,this.hook=v._allTables[w]?v._allTables[w].hook:fr(null,{creating:[mt,Oe],reading:[lt,wt],updating:[he,Oe],deleting:[rt,Oe]})})),this.Transaction=(b=this,hr(Om.prototype,function(w,L,x,F,P){var C=this;this.db=b,this.mode=w,this.storeNames=L,this.schema=x,this.chromeTransactionDurability=F,this.idbtrans=null,this.on=fr(this,"complete","error","abort"),this.parent=P||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new me(function($,U){C._resolve=$,C._reject=U}),this._completion.then(function(){C.active=!1,C.on.complete.fire()},function($){var U=C.active;return C.active=!1,C.on.error.fire($),C.parent?C.parent._reject($):U&&C.idbtrans&&C.idbtrans.abort(),dt($)})})),this.Version=(k=this,hr(Dm.prototype,function(w){this.db=k,this._cfg={version:w,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=(A=this,hr(uc.prototype,function(w,L,x){if(this.db=A,this._ctx={table:w,index:L===":id"?null:L,or:x},this._cmp=this._ascending=qe,this._descending=function(F,P){return qe(P,F)},this._max=function(F,P){return 0<qe(F,P)?F:P},this._min=function(F,P){return qe(F,P)<0?F:P},this._IDBKeyRange=A._deps.IDBKeyRange,!this._IDBKeyRange)throw new ye.MissingAPI})),this.on("versionchange",function(w){0<w.newVersion?console.warn("Another connection wants to upgrade database '".concat(c.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(c.name,"'. Closing db now to resume the delete request.")),c.close({disableAutoOpen:!1})}),this.on("blocked",function(w){!w.newVersion||w.newVersion<w.oldVersion?console.warn("Dexie.delete('".concat(c.name,"') was blocked")):console.warn("Upgrade '".concat(c.name,"' blocked by other connection holding version ").concat(w.oldVersion/10))}),this._maxKey=vr(u.IDBKeyRange),this._createTransaction=function(w,L,x,F){return new c.Transaction(w,L,x,c._options.chromeTransactionDurability,F)},this._fireOnBlocked=function(w){c.on("blocked").fire(w),Ti.filter(function(L){return L.name===c.name&&L!==c&&!L._state.vcFired}).map(function(L){return L.on("versionchange").fire(w)})},this.use(Mm),this.use(Vm),this.use(Bm),this.use(Lm),this.use($m);var I=new Proxy(this,{get:function(w,L,x){if(L==="_vip")return!0;if(L==="table")return function(P){return Pa(c.table(P),I)};var F=Reflect.get(w,L,x);return F instanceof ic?Pa(F,I):L==="tables"?F.map(function(P){return Pa(P,I)}):L==="_createTransaction"?function(){return Pa(F.apply(this,arguments),I)}:F}});this.vip=I,f.forEach(function(w){return w(c)})}var La,Kt=typeof Symbol!="undefined"&&"observable"in Symbol?Symbol.observable:"@@observable",Hm=(Vo.prototype.subscribe=function(s,u,c){return this._subscribe(s&&typeof s!="function"?s:{next:s,error:u,complete:c})},Vo.prototype[Kt]=function(){return this},Vo);function Vo(s){this._subscribe=s}try{La={indexedDB:a.indexedDB||a.mozIndexedDB||a.webkitIndexedDB||a.msIndexedDB,IDBKeyRange:a.IDBKeyRange||a.webkitIDBKeyRange}}catch{La={indexedDB:null,IDBKeyRange:null}}function Sc(s){var u,c=!1,f=new Hm(function(p){var v=Fe(s),b,k=!1,A={},T={},I={get closed(){return k},unsubscribe:function(){k||(k=!0,b&&b.abort(),w&&Ln.storagemutated.unsubscribe(x))}};p.start&&p.start(I);var w=!1,L=function(){return vo(F)},x=function(P){Fa(A,P),Do(T,A)&&L()},F=function(){var P,C,$;!k&&La.indexedDB&&(A={},P={},b&&b.abort(),b=new AbortController,$=function(U){var V=Ai();try{v&&xi();var G=Fn(s,U);return G=v?G.finally(In):G}finally{V&&Oi()}}(C={subscr:P,signal:b.signal,requery:L,querier:s,trans:null}),Promise.resolve($).then(function(U){c=!0,u=U,k||C.signal.aborted||(A={},function(V){for(var G in V)if(y(V,G))return;return 1}(T=P)||w||(Ln(gr,x),w=!0),vo(function(){return!k&&p.next&&p.next(U)}))},function(U){c=!1,["DatabaseClosedError","AbortError"].includes(U==null?void 0:U.name)||k||vo(function(){k||p.error&&p.error(U)})}))};return setTimeout(L,0),I});return f.hasValue=function(){return c},f.getValue=function(){return u},f}var ai=bn;function Ho(s){var u=$n;try{$n=!0,Ln.storagemutated.fire(s),$o(s,!0)}finally{$n=u}}g(ai,i(i({},Je),{delete:function(s){return new ai(s,{addons:[]}).delete()},exists:function(s){return new ai(s,{addons:[]}).open().then(function(u){return u.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(s){try{return u=ai.dependencies,c=u.indexedDB,u=u.IDBKeyRange,(Ro(c)?Promise.resolve(c.databases()).then(function(f){return f.map(function(p){return p.name}).filter(function(p){return p!==ka})}):Co(c,u).toCollection().primaryKeys()).then(s)}catch{return dt(new ye.MissingAPI)}var u,c},defineClass:function(){return function(s){d(this,s)}},ignoreTransaction:function(s){return Ee.trans?ti(Ee.transless,s):s()},vip:Fo,async:function(s){return function(){try{var u=Mo(s.apply(this,arguments));return u&&typeof u.then=="function"?u:me.resolve(u)}catch(c){return dt(c)}}},spawn:function(s,u,c){try{var f=Mo(s.apply(c,u||[]));return f&&typeof f.then=="function"?f:me.resolve(f)}catch(p){return dt(p)}},currentTransaction:{get:function(){return Ee.trans||null}},waitFor:function(s,u){return u=me.resolve(typeof s=="function"?ai.ignoreTransaction(s):s).timeout(u||6e4),Ee.trans?Ee.trans.waitFor(u):u},Promise:me,debug:{get:function(){return Te},set:function(s){tt(s)}},derive:S,extend:d,props:g,override:J,Events:fr,on:Ln,liveQuery:Sc,extendObservabilitySet:Fa,getByKeyPath:ne,setByKeyPath:oe,delByKeyPath:function(s,u){typeof u=="string"?oe(s,u,void 0):"length"in u&&[].map.call(u,function(c){oe(s,c,void 0)})},shallowClone:Se,deepClone:Ve,getObjectDiff:Bo,cmp:qe,asap:X,minKey:-1/0,addons:[],connections:Ti,errnames:_e,dependencies:La,cache:ri,semVer:"4.0.11",version:"4.0.11".split(".").map(function(s){return parseInt(s)}).reduce(function(s,u,c){return s+u/Math.pow(10,2*c)})})),ai.maxKey=vr(ai.dependencies.IDBKeyRange),typeof dispatchEvent!="undefined"&&typeof addEventListener!="undefined"&&(Ln(gr,function(s){$n||(s=new CustomEvent(So,{detail:s}),$n=!0,dispatchEvent(s),$n=!1)}),addEventListener(So,function(s){s=s.detail,$n||Ho(s)}));var Fi,$n=!1,Ec=function(){};return typeof BroadcastChannel!="undefined"&&((Ec=function(){(Fi=new BroadcastChannel(So)).onmessage=function(s){return s.data&&Ho(s.data)}})(),typeof Fi.unref=="function"&&Fi.unref(),Ln(gr,function(s){$n||Fi.postMessage(s)})),typeof addEventListener!="undefined"&&(addEventListener("pagehide",function(s){if(!bn.disableBfCache&&s.persisted){Te&&console.debug("Dexie: handling persisted pagehide"),Fi!=null&&Fi.close();for(var u=0,c=Ti;u<c.length;u++)c[u].close({disableAutoOpen:!1})}}),addEventListener("pageshow",function(s){!bn.disableBfCache&&s.persisted&&(Te&&console.debug("Dexie: handling persisted pageshow"),Ec(),Ho({all:new Nt(-1/0,[[]])}))})),me.rejectionMapper=function(s,u){return!s||s instanceof Xe||s instanceof TypeError||s instanceof SyntaxError||!s.name||!et[s.name]?s:(u=new et[s.name](u||s.message,s),"stack"in s&&_(u,"stack",{get:function(){return this.inner.stack}}),u)},tt(Te),i(bn,Object.freeze({__proto__:null,Dexie:bn,liveQuery:Sc,Entity:ec,cmp:qe,PropModification:pr,replacePrefix:function(s,u){return new pr({replacePrefix:[s,u]})},add:function(s){return new pr({add:s})},remove:function(s){return new pr({remove:s})},default:bn,RangeSet:Nt,mergeRanges:kr,rangesOverlap:hc}),{default:bn}),bn})}(Qa)),Qa.exports}var Iy=Fy();const el=qs(Iy),rd=Symbol.for("Dexie"),ms=globalThis[rd]||(globalThis[rd]=el);if(el.semVer!==ms.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${el.semVer} and ${ms.semVer}`);const{liveQuery:NE,mergeRanges:AE,rangesOverlap:OE,RangeSet:xE,cmp:TE,Entity:CE,PropModification:RE,replacePrefix:FE,add:IE,remove:DE}=ms;class Ah extends ms{constructor(n,i,r={}){super(n);ge(this,"logs");const a={logs:"id, level, time, source, account"};this.version(i).stores({...a,...r})}}class Dy extends Ah{constructor(){super("nizza",1)}}class Oh{constructor(e,n){ge(this,"logger");ge(this,"channel");ge(this,"listeners",new Map);ge(this,"eventQueue",new Map);this.logger=n.child("EventBus");try{this.logger.debug(`Creating BroadcastChannel with name "${e}"`),this.channel=new BroadcastChannel(e),this.channel.onmessage=i=>this.handleMessage(i),this.channel.onmessageerror=i=>this.logger.error("NizzaBroadcastChannel error:",i)}catch(i){throw this.logger.error("Failed to create NizzaBroadcastChannel:",i),i}}on(e,n){return this.logger.debug(`Subscribing to pattern "${e}"`),this.subscribeToEvent(e,n),{off:()=>this.unsubscribeFromEvent(e,n)}}emit(e,n,i={}){this.logger.debug(`Emitting event "${e}" with data`,n),this.emitEvent(e,n,i)}handleMessage(e){const n=e.data,{name:i}=n;this.logger.debug(`Received message "${i}" with data`,n);for(const[r,a]of this.listeners.entries())this.matchWildcard(r,i)&&(this.logger.debug(`Matching pattern "${r}" for event "${i}"`),a.forEach(o=>o({...n,wildcard:r})))}subscribeToEvent(e,n){if(typeof e!="string"||typeof n!="function"){const r=new Error("Invalid arguments");throw this.logger.error(r),r}this.listeners.has(e)||(this.logger.debug(`Adding new pattern "${e}"`),this.listeners.set(e,new Set));const i=Array.from(this.eventQueue).filter(([r])=>{const a=this.matchWildcard(e,r);return a&&(this.eventQueue.delete(r),this.logger.debug(`Dequeued pending events for "${r}".`)),a}).flatMap(([,r])=>r);for(const[r,a]of this.listeners.entries())this.matchWildcard(r,e)&&(this.logger.debug(`Adding listener to pattern "${r}"`),a.add(n),i.length&&(this.logger.debug(`Delivering pending events for "${e}".`),i.forEach(o=>{n({...o,wildcard:r})})))}emitEvent(e,n,i){if(typeof e!="string"){const o=new Error("Invalid arguments");throw this.logger.error(o),o}const r={name:e,data:n,attrs:i},a=Array.from(this.getMatchingListeners(e));if(a.length){this.logger.debug(`Delivering event "${e}" to listeners`);for(const[o,l]of a)l({...r,wildcard:o})}else this.logger.debug(`No listeners for event "${e}", enqueuing`),this.eventQueue.has(e)||this.eventQueue.set(e,[]),this.eventQueue.get(e).push(r);this.logger.debug("Posting message to channel",r),this.channel.postMessage(r)}*getMatchingListeners(e){this.logger.debug(`Getting matching listeners for event "${e}"`);for(const[n,i]of this.listeners.entries())if(this.matchWildcard(n,e))for(const r of i)yield[n,r]}unsubscribeFromEvent(e,n){if(this.listeners.has(e)){this.logger.debug(`Unsubscribing from event "${e}"`);const i=this.listeners.get(e);i.delete(n),i.size===0&&(this.logger.debug(`No more listeners for event "${e}", deleting`),this.listeners.delete(e))}}matchWildcard(e,n){const i=e.replace(/\*/g,"[^:]*").replace(/\*\*/g,".*"),a=new RegExp(`^${i}$`).test(n);return this.logger.debug(`Wildcard "${e}" matches with pattern "${n}": ${a}`),a}}var Tr={exports:{}},du,ad;function Py(){if(ad)return du;ad=1;function t(n){try{return JSON.stringify(n)}catch{return'"[Circular]"'}}du=e;function e(n,i,r){var a=r&&r.stringify||t,o=1;if(typeof n=="object"&&n!==null){var l=i.length+o;if(l===1)return n;var d=new Array(l);d[0]=a(n);for(var h=1;h<l;h++)d[h]=a(i[h]);return d.join(" ")}if(typeof n!="string")return n;var m=i.length;if(m===0)return n;for(var y="",g=1-o,O=-1,_=n&&n.length||0,S=0;S<_;){if(n.charCodeAt(S)===37&&S+1<_){switch(O=O>-1?O:0,n.charCodeAt(S+1)){case 100:case 102:if(g>=m||i[g]==null)break;O<S&&(y+=n.slice(O,S)),y+=Number(i[g]),O=S+2,S++;break;case 105:if(g>=m||i[g]==null)break;O<S&&(y+=n.slice(O,S)),y+=Math.floor(Number(i[g])),O=S+2,S++;break;case 79:case 111:case 106:if(g>=m||i[g]===void 0)break;O<S&&(y+=n.slice(O,S));var E=typeof i[g];if(E==="string"){y+="'"+i[g]+"'",O=S+2,S++;break}if(E==="function"){y+=i[g].name||"<anonymous>",O=S+2,S++;break}y+=a(i[g]),O=S+2,S++;break;case 115:if(g>=m)break;O<S&&(y+=n.slice(O,S)),y+=String(i[g]),O=S+2,S++;break;case 37:O<S&&(y+=n.slice(O,S)),y+="%",O=S+2,S++,g--;break}++g}++S}return O===-1?n:(O<_&&(y+=n.slice(O)),y)}return du}var sd;function Ly(){if(sd)return Tr.exports;sd=1;const t=Py();Tr.exports=m;const e=M().console||{},n={mapHttpRequest:oe,mapHttpResponse:oe,wrapRequestSerializer:Se,wrapResponseSerializer:Se,wrapErrorSerializer:Se,req:oe,res:oe,err:X,errWithCause:X};function i(N,z){return N==="silent"?1/0:z.levels.values[N]}const r=Symbol("pino.logFuncs"),a=Symbol("pino.hierarchy"),o={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function l(N,z){const ie={logger:z,parent:N[a]};z[a]=ie}function d(N,z,ie){const ce={};z.forEach(se=>{ce[se]=ie[se]?ie[se]:e[se]||e[o[se]||"log"]||ve}),N[r]=ce}function h(N,z){return Array.isArray(N)?N.filter(function(ce){return ce!=="!stdSerializers.err"}):N===!0?Object.keys(z):!1}function m(N){N=N||{},N.browser=N.browser||{};const z=N.browser.transmit;if(z&&typeof z.send!="function")throw Error("pino: transmit option must have a send function");const ie=N.browser.write||e;N.browser.write&&(N.browser.asObject=!0);const ce=N.serializers||{},se=h(N.browser.serialize,ce);let B=N.browser.serialize;Array.isArray(N.browser.serialize)&&N.browser.serialize.indexOf("!stdSerializers.err")>-1&&(B=!1);const Fe=Object.keys(N.customLevels||{}),$e=["error","fatal","warn","info","debug","trace"].concat(Fe);typeof ie=="function"&&$e.forEach(function(et){ie[et]=ie}),(N.enabled===!1||N.browser.disabled)&&(N.level="silent");const Xe=N.level||"info",D=Object.create(ie);D.log||(D.log=ve),d(D,$e,ie),l({},D),Object.defineProperty(D,"levelVal",{get:pt}),Object.defineProperty(D,"level",{get:_e,set:Me});const H={transmit:z,serialize:se,asObject:N.browser.asObject,formatters:N.browser.formatters,levels:$e,timestamp:ne(N),messageKey:N.messageKey||"msg",onChild:N.onChild||ve};D.levels=y(N),D.level=Xe,D.setMaxListeners=D.getMaxListeners=D.emit=D.addListener=D.on=D.prependListener=D.once=D.prependOnceListener=D.removeListener=D.removeAllListeners=D.listeners=D.listenerCount=D.eventNames=D.write=D.flush=ve,D.serializers=ce,D._serialize=se,D._stdErrSerialize=B,D.child=function(...et){return ye.call(this,H,...et)},z&&(D._logEvent=K());function pt(){return i(this.level,this)}function _e(){return this._level}function Me(et){if(et!=="silent"&&!this.levels.values[et])throw Error("unknown level "+et);this._level=et,_(this,H,D,"error"),_(this,H,D,"fatal"),_(this,H,D,"warn"),_(this,H,D,"info"),_(this,H,D,"debug"),_(this,H,D,"trace"),Fe.forEach(Je=>{_(this,H,D,Je)})}function ye(et,Je,Oe){if(!Je)throw new Error("missing bindings for child Pino");Oe=Oe||{},se&&Je.serializers&&(Oe.serializers=Je.serializers);const wt=Oe.serializers;if(se&&wt){var lt=Object.assign({},ce,wt),Ae=N.browser.serialize===!0?Object.keys(lt):se;delete Je.serializers,j([Je],Ae,lt,this._stdErrSerialize)}function mt(he){this._childLevel=(he._childLevel|0)+1,this.bindings=Je,lt&&(this.serializers=lt,this._serialize=Ae),z&&(this._logEvent=K([].concat(he._logEvent.bindings,Je)))}mt.prototype=this;const rt=new mt(this);return l(this,rt),rt.child=function(...he){return ye.call(this,et,...he)},rt.level=Oe.level||this.level,et.onChild(rt),rt}return D}function y(N){const z=N.customLevels||{},ie=Object.assign({},m.levels.values,z),ce=Object.assign({},m.levels.labels,g(z));return{values:ie,labels:ce}}function g(N){const z={};return Object.keys(N).forEach(function(ie){z[N[ie]]=ie}),z}m.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},m.stdSerializers=n,m.stdTimeFunctions=Object.assign({},{nullTime:Ke,epochTime:Ne,unixTime:Re,isoTime:Ve});function O(N){const z=[];N.bindings&&z.push(N.bindings);let ie=N[a];for(;ie.parent;)ie=ie.parent,ie.logger.bindings&&z.push(ie.logger.bindings);return z.reverse()}function _(N,z,ie,ce){if(Object.defineProperty(N,ce,{value:i(N.level,ie)>i(ce,ie)?ve:ie[r][ce],writable:!0,enumerable:!0,configurable:!0}),N[ce]===ve){if(!z.transmit)return;const B=z.transmit.level||N.level,Fe=i(B,ie);if(i(ce,ie)<Fe)return}N[ce]=E(N,z,ie,ce);const se=O(N);se.length!==0&&(N[ce]=S(se,N[ce]))}function S(N,z){return function(){return z.apply(this,[...N,...arguments])}}function E(N,z,ie,ce){return function(se){return function(){const Fe=z.timestamp(),$e=new Array(arguments.length),Xe=Object.getPrototypeOf&&Object.getPrototypeOf(this)===e?e:this;for(var D=0;D<$e.length;D++)$e[D]=arguments[D];var H=!1;if(z.serialize&&(j($e,this._serialize,this.serializers,this._stdErrSerialize),H=!0),z.asObject||z.formatters?se.call(Xe,R(this,ce,$e,Fe,z)):se.apply(Xe,$e),z.transmit){const pt=z.transmit.level||N._level,_e=i(pt,ie),Me=i(ce,ie);if(Me<_e)return;J(this,{ts:Fe,methodLevel:ce,methodValue:Me,transmitValue:ie.levels.values[z.transmit.level||N._level],send:z.transmit.send,val:i(N._level,ie)},$e,H)}}}(N[r][ce])}function R(N,z,ie,ce,se){const{level:B,log:Fe=_e=>_e}=se.formatters||{},$e=ie.slice();let Xe=$e[0];const D={};if(ce&&(D.time=ce),B){const _e=B(z,N.levels.values[z]);Object.assign(D,_e)}else D.level=N.levels.values[z];let H=(N._childLevel|0)+1;if(H<1&&(H=1),Xe!==null&&typeof Xe=="object"){for(;H--&&typeof $e[0]=="object";)Object.assign(D,$e.shift());Xe=$e.length?t($e.shift(),$e):void 0}else typeof Xe=="string"&&(Xe=t($e.shift(),$e));return Xe!==void 0&&(D[se.messageKey]=Xe),Fe(D)}function j(N,z,ie,ce){for(const se in N)if(ce&&N[se]instanceof Error)N[se]=m.stdSerializers.err(N[se]);else if(typeof N[se]=="object"&&!Array.isArray(N[se])&&z)for(const B in N[se])z.indexOf(B)>-1&&B in ie&&(N[se][B]=ie[B](N[se][B]))}function J(N,z,ie,ce=!1){const se=z.send,B=z.ts,Fe=z.methodLevel,$e=z.methodValue,Xe=z.val,D=N._logEvent.bindings;ce||j(ie,N._serialize||Object.keys(N.serializers),N.serializers,N._stdErrSerialize===void 0?!0:N._stdErrSerialize),N._logEvent.ts=B,N._logEvent.messages=ie.filter(function(H){return D.indexOf(H)===-1}),N._logEvent.level.label=Fe,N._logEvent.level.value=$e,se(Fe,N._logEvent,Xe),N._logEvent=K(D)}function K(N){return{ts:0,messages:[],bindings:N||[],level:{label:"",value:0}}}function X(N){const z={type:N.constructor.name,msg:N.message,stack:N.stack};for(const ie in N)z[ie]===void 0&&(z[ie]=N[ie]);return z}function ne(N){return typeof N.timestamp=="function"?N.timestamp:N.timestamp===!1?Ke:Ne}function oe(){return{}}function Se(N){return N}function ve(){}function Ke(){return!1}function Ne(){return Date.now()}function Re(){return Math.round(Date.now()/1e3)}function Ve(){return new Date(Date.now()).toISOString()}function M(){function N(z){return typeof z!="undefined"&&z}try{return typeof globalThis!="undefined"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return N(self)||N(window)||N(this)||{}}}return Tr.exports.default=m,Tr.exports.pino=m,Tr.exports}var $y=Ly();const My=qs($y),St=[];for(let t=0;t<256;++t)St.push((t+256).toString(16).slice(1));function By(t,e=0){return(St[t[e+0]]+St[t[e+1]]+St[t[e+2]]+St[t[e+3]]+"-"+St[t[e+4]]+St[t[e+5]]+"-"+St[t[e+6]]+St[t[e+7]]+"-"+St[t[e+8]]+St[t[e+9]]+"-"+St[t[e+10]]+St[t[e+11]]+St[t[e+12]]+St[t[e+13]]+St[t[e+14]]+St[t[e+15]]).toLowerCase()}let fu;const Uy=new Uint8Array(16);function jy(){if(!fu){if(typeof crypto=="undefined"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");fu=crypto.getRandomValues.bind(crypto)}return fu(Uy)}const Vy=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),od={randomUUID:Vy};function Hy(t,e,n){var r,a,o;if(od.randomUUID&&!t)return od.randomUUID();t=t||{};const i=(o=(a=t.random)!=null?a:(r=t.rng)==null?void 0:r.call(t))!=null?o:jy();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,By(i)}const qy=4;var xh=(t=>(t.CREATED="CREATED",t.STARTING="STARTING",t.LIVE="LIVE",t.FINALIZED="FINALIZED",t))(xh||{});const Ky={ALL:"*",CORE:"core:**",ADD_TO_CART_HOOKS:"core:addToCartHooks:**",LIVE_STREAMING_EVENT:"event:**",EVENT_CHAT:"event:chat:**",EVENT_PRODUCTS:"event:products:**",CUSTOMIZE_LIVE:"customize-live:**",PLAYER:"player:**",SNACK_SIZE_VIDEO:"ssv:**",SNACK_SIZE_VIDEO_ADMIN:"ssv-admin:**",UI:"ui:**",UTILS:"utils:**"},Th={EVENT_STATUS_CHANGED:"event:statusChanged",ATCH_ACTION_EXECUTED:"core:addToCartHooks:actionExecuted"};var Ch=(t=>(t.English="en",t.Spanish="es",t.Portuguese="pt",t))(Ch||{}),ot=(t=>(t.TRACE="trace",t.DEBUG="debug",t.INFO="info",t.WARN="warn",t.ERROR="error",t.FATAL="fatal",t))(ot||{});const Ze={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},Rh={[Ze.trace]:"trace",[Ze.debug]:"debug",[Ze.info]:"info",[Ze.warn]:"warn",[Ze.error]:"error",[Ze.fatal]:"fatal"};var Fh=(t=>(t.COMBO="Combo",t.BADGE="Badged",t))(Fh||{}),Ih=(t=>(t.VTEX="VTEX",t.PLATFORM="platform",t.CACE="CACE",t.GLOBAL_PAGE="globalPage",t.CUSTOMIZATION="customization",t.FAST_STORE="faststore",t.UNKNOWN="unknown",t))(Ih||{});function Dh(t){return Object.values(ot).includes(String(t).toLowerCase())}class Cl extends Error{constructor(e){super(`Invalid log level: ${e}`),this.name="InvalidLogLevelError"}}const Tt=class Tt{constructor(e){ge(this,"instance");ge(this,"httpLogger");ge(this,"consoleLogger");ge(this,"config");var l;this.config=e;const{source:n,levelService:i,metadata:r={},consoleLogger:a,httpLogger:o}=e;(l=Tt.root)!=null||(Tt.root=Tt.createRootLogger(a,o)),Tt.mergeGlobalMetadata(r),this.instance=Tt.root.child({source:n}),this.consoleLogger=a,this.httpLogger=o,this.setLevel(i.getLevel(n))}static createRootLogger(e,n){return My({customLevels:Ze,browser:{write:i=>{const{payload:r,options:a,stack:o,...l}=i,d={...l,...r};a.silent||e.print(d,o),d.level>=Ze[ot.WARN]&&n.save(d)}}})}static mergeGlobalMetadata(e={}){Tt.globalMetadata={...Tt.globalMetadata,...e}}child(e,n={}){return Tt.mergeGlobalMetadata(n),new Tt({source:`${this.config.source}:${e}`,levelService:this.config.levelService,consoleLogger:this.consoleLogger,httpLogger:this.httpLogger})}setLevel(e){this.instance.level=e}setMetadata(e){Tt.mergeGlobalMetadata(e)}formatLogEntry(e){const{content:n,stack:i,options:r={}}=e,{message:a,args:o=[]}=n,l=Hy(),d={};let h;return a instanceof Error?(d.error={name:a.name,message:a.message,stack:a.stack},h=a.message):h=typeof a=="object"?JSON.stringify(a):String(a),o.forEach((y,g)=>this.formatArg(y,g,d)),{payload:{id:l,msg:h,data:d,...Tt.globalMetadata},options:r,stack:i}}formatArg(e,n,i){if(e instanceof Error){const r=i.error?`error${n+1}`:"error";i[r]={message:e.message,stack:e.stack,name:e.name}}else typeof e=="object"&&e!==null?Object.assign(i,e):i[`$${n}`]=String(e)}log(e,n){if(typeof this.instance[e]!="function")throw new Cl(e);const i=this.formatLogEntry(n);this.instance[e](i)}trace(e){this.log("trace",e)}debug(e){this.log("debug",e)}info(e){this.log("info",e)}warn(e){this.log("warn",e)}error(e){this.log("error",e)}fatal(e){this.log("fatal",e)}get source(){return this.config.source}};ge(Tt,"globalMetadata",{}),ge(Tt,"root",null);let tl=Tt;const ud={stackExclusionPatterns:/\b(PinoAdapter|ConsoleLogger|LoggerChain|Logger|Proxy|Child|pino\.js)\b/,themes:{dark:{baseStyles:{timestamp:"color: #A9A9A9; font-weight: normal;",source:"color: #B0B0B0; font-weight: normal;",context:"color: #FFFFFF; font-weight: bold;",defaultMessage:"color: #E5E5E5; font-weight: normal;"},levels:{[Ze[ot.TRACE]]:"color: #778899; font-weight: bold;",[Ze[ot.DEBUG]]:"color: #008B8B; font-weight: bold;",[Ze[ot.INFO]]:"color: #00FFFF; font-weight: bold;",[Ze[ot.WARN]]:"color: #FFD700; font-weight: bold;",[Ze[ot.ERROR]]:"color: #FF4500; font-weight: bold;",[Ze[ot.FATAL]]:"color: #FF0000; font-weight: bold; text-shadow: 1px 1px 1px black;"},messages:{[Ze[ot.WARN]]:"color: #FFD700; font-weight: normal;",[Ze[ot.ERROR]]:"color: #FF4500; font-weight: normal;",[Ze[ot.FATAL]]:"color: #FF0000; font-weight: bold;"}},light:{baseStyles:{timestamp:"color: #4D4D4D; font-weight: normal;",source:"color: #666666; font-weight: normal;",context:"color: #000000; font-weight: bold;",defaultMessage:"color: #333333; font-weight: normal;"},levels:{[Ze[ot.TRACE]]:"color: #6A5ACD; font-weight: bold;",[Ze[ot.DEBUG]]:"color: #00509E; font-weight: bold;",[Ze[ot.INFO]]:"color: #1E90FF; font-weight: bold;",[Ze[ot.WARN]]:"color: #FFA500; font-weight: bold;",[Ze[ot.ERROR]]:"color: #ff0033; font-weight: bold;",[Ze[ot.FATAL]]:"color: #D80000; font-weight: bold; text-shadow: 1px 1px 1px #660000;"},messages:{[Ze[ot.WARN]]:"color: #FFA500; font-weight: normal;",[Ze[ot.ERROR]]:"color: #ff0033; font-weight: normal;",[Ze[ot.FATAL]]:"color: #D80000; font-weight: bold;"}}}};class zy{constructor(){ge(this,"theme");this.theme=this.initializeTheme(),this.setupThemeChangeListener()}initializeTheme(){const e=localStorage.getItem("log-theme");return e==="light"||e==="dark"?e:this.detectTheme()}detectTheme(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}setupThemeChangeListener(){window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",e=>{this.theme=e.matches?"dark":"light"})}static setTheme(e){localStorage.setItem("consoleLoggerTheme",e)}formatStack(e){return e.split(`
|
|
29
|
-
`).filter(n=>!
|
|
30
|
-
`)),console.groupEnd()}}const Gy={endpoint:`${er.apiUrls.restV2}/v1/telemetry/logs`,batchSize:500,flushInterval:10,maxRetries:5,retryBackoffFactor:2,maxPayloadSize:500};class Rl{constructor(e){ge(this,"config");ge(this,"isFlushing",!1);ge(this,"retryCount",0);ge(this,"isFlushScheduled",!1);this.config=e,this.setupUnloadListener()}static create(e){const n={...Gy,...e};if(!n.db)throw new Error("Invalid Dixie DB");if(!n.project)throw new Error("Project name is required");return new Rl(n)}async save(e){const n=JSON.parse(JSON.stringify(e));await this.config.db.logs.add(n),this.scheduleFlush()}scheduleFlush(e=this.config.flushInterval*1e3){this.isFlushScheduled||this.isFlushing||(this.isFlushScheduled=!0,setTimeout(()=>{this.isFlushScheduled=!1,this.flush()},e))}async flush(){if(this.isFlushing)return;this.isFlushing=!0;let e=!1;try{await this.processLogsBatch(async i=>{await this.sendLogs(i),await this.deleteLogs(i)}),this.retryCount=0,e=!0}catch(i){this.logError("flush",i)}this.isFlushing=!1;const n=await this.hasPendingLogs();!e&&n?this.handleRetry():e&&n&&this.scheduleFlush()}async processLogsBatch(e){const n=await this.getLogsBatch(),i=this.splitLogsByPayloadSize(n);for(const r of i)await e(r)}async getLogsBatch(e=this.config.batchSize){return this.config.db.logs.orderBy("time").limit(e).toArray()}splitLogsByPayloadSize(e){let n=[],i=0;const r=[];return e.forEach(a=>{const o=JSON.stringify(a).length/1024;i+o>this.config.maxPayloadSize&&(r.push(n),n=[],i=0),n.push(a),i+=o}),n.length>0&&r.push(n),r}async sendLogs(e){const n=this.buildPayload(e);await mi({url:this.config.endpoint,method:"POST",body:n})}buildPayload(e){return JSON.stringify({project:this.config.project,logs:e})}async deleteLogs(e){const n=e.map(i=>i.id);await this.config.db.logs.bulkDelete(n)}logError(e,n){console.error(`[${e}]`,n)}handleRetry(){if(this.retryCount>=this.config.maxRetries)return;this.retryCount++;const e=this.config.flushInterval*Math.pow(this.config.retryBackoffFactor,this.retryCount)*1e3;this.scheduleFlush(e)}async hasPendingLogs(){return await this.config.db.logs.count()>0}setupUnloadListener(){window.addEventListener("beforeunload",async()=>{this.isFlushing||!await this.hasPendingLogs()||await this.processLogsBatch(async e=>{const n=this.buildPayload(e);navigator.sendBeacon(this.config.endpoint,n)?await this.deleteLogs(e):console.warn("Failed to send logs via sendBeacon; logs will remain in the database.")})})}}var hu={},pu,ld;function Ks(){if(ld)return pu;ld=1;const t="\\\\/",e=`[^${t}]`,n="\\.",i="\\+",r="\\?",a="\\/",o="(?=.)",l="[^/]",d=`(?:${a}|$)`,h=`(?:^|${a})`,m=`${n}{1,2}${d}`,y=`(?!${n})`,g=`(?!${h}${m})`,O=`(?!${n}{0,1}${d})`,_=`(?!${m})`,S=`[^.${a}]`,E=`${l}*?`,j={DOT_LITERAL:n,PLUS_LITERAL:i,QMARK_LITERAL:r,SLASH_LITERAL:a,ONE_CHAR:o,QMARK:l,END_ANCHOR:d,DOTS_SLASH:m,NO_DOT:y,NO_DOTS:g,NO_DOT_SLASH:O,NO_DOTS_SLASH:_,QMARK_NO_DOT:S,STAR:E,START_ANCHOR:h,SEP:"/"},J={...j,SLASH_LITERAL:`[${t}]`,QMARK:e,STAR:`${e}*?`,DOTS_SLASH:`${n}{1,2}(?:[${t}]|$)`,NO_DOT:`(?!${n})`,NO_DOTS:`(?!(?:^|[${t}])${n}{1,2}(?:[${t}]|$))`,NO_DOT_SLASH:`(?!${n}{0,1}(?:[${t}]|$))`,NO_DOTS_SLASH:`(?!${n}{1,2}(?:[${t}]|$))`,QMARK_NO_DOT:`[^.${t}]`,START_ANCHOR:`(?:^|[${t}])`,END_ANCHOR:`(?:[${t}]|$)`,SEP:"\\"},K={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};return pu={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:K,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(X){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${X.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(X){return X===!0?J:j}},pu}var cd;function zs(){return cd||(cd=1,function(t){const{REGEX_BACKSLASH:e,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_GLOBAL:r}=Ks();t.isObject=a=>a!==null&&typeof a=="object"&&!Array.isArray(a),t.hasRegexChars=a=>i.test(a),t.isRegexChar=a=>a.length===1&&t.hasRegexChars(a),t.escapeRegex=a=>a.replace(r,"\\$1"),t.toPosixSlashes=a=>a.replace(e,"/"),t.isWindows=()=>{if(typeof navigator!="undefined"&&navigator.platform){const a=navigator.platform.toLowerCase();return a==="win32"||a==="windows"}return typeof process!="undefined"&&process.platform?process.platform==="win32":!1},t.removeBackslashes=a=>a.replace(n,o=>o==="\\"?"":o),t.escapeLast=(a,o,l)=>{const d=a.lastIndexOf(o,l);return d===-1?a:a[d-1]==="\\"?t.escapeLast(a,o,d-1):`${a.slice(0,d)}\\${a.slice(d)}`},t.removePrefix=(a,o={})=>{let l=a;return l.startsWith("./")&&(l=l.slice(2),o.prefix="./"),l},t.wrapOutput=(a,o={},l={})=>{const d=l.contains?"":"^",h=l.contains?"":"$";let m=`${d}(?:${a})${h}`;return o.negated===!0&&(m=`(?:^(?!${m}).*$)`),m},t.basename=(a,{windows:o}={})=>{const l=a.split(o?/[\\/]/:"/"),d=l[l.length-1];return d===""?l[l.length-2]:d}}(hu)),hu}var mu,dd;function Wy(){if(dd)return mu;dd=1;const t=zs(),{CHAR_ASTERISK:e,CHAR_AT:n,CHAR_BACKWARD_SLASH:i,CHAR_COMMA:r,CHAR_DOT:a,CHAR_EXCLAMATION_MARK:o,CHAR_FORWARD_SLASH:l,CHAR_LEFT_CURLY_BRACE:d,CHAR_LEFT_PARENTHESES:h,CHAR_LEFT_SQUARE_BRACKET:m,CHAR_PLUS:y,CHAR_QUESTION_MARK:g,CHAR_RIGHT_CURLY_BRACE:O,CHAR_RIGHT_PARENTHESES:_,CHAR_RIGHT_SQUARE_BRACKET:S}=Ks(),E=J=>J===l||J===i,R=J=>{J.isPrefix!==!0&&(J.depth=J.isGlobstar?1/0:1)};return mu=(J,K)=>{const X=K||{},ne=J.length-1,oe=X.parts===!0||X.scanToEnd===!0,Se=[],ve=[],Ke=[];let Ne=J,Re=-1,Ve=0,M=0,N=!1,z=!1,ie=!1,ce=!1,se=!1,B=!1,Fe=!1,$e=!1,Xe=!1,D=!1,H=0,pt,_e,Me={value:"",depth:0,isGlob:!1};const ye=()=>Re>=ne,et=()=>Ne.charCodeAt(Re+1),Je=()=>(pt=_e,Ne.charCodeAt(++Re));for(;Re<ne;){_e=Je();let mt;if(_e===i){Fe=Me.backslashes=!0,_e=Je(),_e===d&&(B=!0);continue}if(B===!0||_e===d){for(H++;ye()!==!0&&(_e=Je());){if(_e===i){Fe=Me.backslashes=!0,Je();continue}if(_e===d){H++;continue}if(B!==!0&&_e===a&&(_e=Je())===a){if(N=Me.isBrace=!0,ie=Me.isGlob=!0,D=!0,oe===!0)continue;break}if(B!==!0&&_e===r){if(N=Me.isBrace=!0,ie=Me.isGlob=!0,D=!0,oe===!0)continue;break}if(_e===O&&(H--,H===0)){B=!1,N=Me.isBrace=!0,D=!0;break}}if(oe===!0)continue;break}if(_e===l){if(Se.push(Re),ve.push(Me),Me={value:"",depth:0,isGlob:!1},D===!0)continue;if(pt===a&&Re===Ve+1){Ve+=2;continue}M=Re+1;continue}if(X.noext!==!0&&(_e===y||_e===n||_e===e||_e===g||_e===o)===!0&&et()===h){if(ie=Me.isGlob=!0,ce=Me.isExtglob=!0,D=!0,_e===o&&Re===Ve&&(Xe=!0),oe===!0){for(;ye()!==!0&&(_e=Je());){if(_e===i){Fe=Me.backslashes=!0,_e=Je();continue}if(_e===_){ie=Me.isGlob=!0,D=!0;break}}continue}break}if(_e===e){if(pt===e&&(se=Me.isGlobstar=!0),ie=Me.isGlob=!0,D=!0,oe===!0)continue;break}if(_e===g){if(ie=Me.isGlob=!0,D=!0,oe===!0)continue;break}if(_e===m){for(;ye()!==!0&&(mt=Je());){if(mt===i){Fe=Me.backslashes=!0,Je();continue}if(mt===S){z=Me.isBracket=!0,ie=Me.isGlob=!0,D=!0;break}}if(oe===!0)continue;break}if(X.nonegate!==!0&&_e===o&&Re===Ve){$e=Me.negated=!0,Ve++;continue}if(X.noparen!==!0&&_e===h){if(ie=Me.isGlob=!0,oe===!0){for(;ye()!==!0&&(_e=Je());){if(_e===h){Fe=Me.backslashes=!0,_e=Je();continue}if(_e===_){D=!0;break}}continue}break}if(ie===!0){if(D=!0,oe===!0)continue;break}}X.noext===!0&&(ce=!1,ie=!1);let Oe=Ne,wt="",lt="";Ve>0&&(wt=Ne.slice(0,Ve),Ne=Ne.slice(Ve),M-=Ve),Oe&&ie===!0&&M>0?(Oe=Ne.slice(0,M),lt=Ne.slice(M)):ie===!0?(Oe="",lt=Ne):Oe=Ne,Oe&&Oe!==""&&Oe!=="/"&&Oe!==Ne&&E(Oe.charCodeAt(Oe.length-1))&&(Oe=Oe.slice(0,-1)),X.unescape===!0&&(lt&&(lt=t.removeBackslashes(lt)),Oe&&Fe===!0&&(Oe=t.removeBackslashes(Oe)));const Ae={prefix:wt,input:J,start:Ve,base:Oe,glob:lt,isBrace:N,isBracket:z,isGlob:ie,isExtglob:ce,isGlobstar:se,negated:$e,negatedExtglob:Xe};if(X.tokens===!0&&(Ae.maxDepth=0,E(_e)||ve.push(Me),Ae.tokens=ve),X.parts===!0||X.tokens===!0){let mt;for(let rt=0;rt<Se.length;rt++){const he=mt?mt+1:Ve,Ye=Se[rt],ue=J.slice(he,Ye);X.tokens&&(rt===0&&Ve!==0?(ve[rt].isPrefix=!0,ve[rt].value=wt):ve[rt].value=ue,R(ve[rt]),Ae.maxDepth+=ve[rt].depth),(rt!==0||ue!=="")&&Ke.push(ue),mt=Ye}if(mt&&mt+1<J.length){const rt=J.slice(mt+1);Ke.push(rt),X.tokens&&(ve[ve.length-1].value=rt,R(ve[ve.length-1]),Ae.maxDepth+=ve[ve.length-1].depth)}Ae.slashes=Se,Ae.parts=Ke}return Ae},mu}var gu,fd;function Jy(){if(fd)return gu;fd=1;const t=Ks(),e=zs(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:i,REGEX_NON_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_BACKREF:a,REPLACEMENTS:o}=t,l=(m,y)=>{if(typeof y.expandRange=="function")return y.expandRange(...m,y);m.sort();const g=`[${m.join("-")}]`;try{new RegExp(g)}catch{return m.map(_=>e.escapeRegex(_)).join("..")}return g},d=(m,y)=>`Missing ${m}: "${y}" - use "\\\\${y}" to match literal characters`,h=(m,y)=>{if(typeof m!="string")throw new TypeError("Expected a string");m=o[m]||m;const g={...y},O=typeof g.maxLength=="number"?Math.min(n,g.maxLength):n;let _=m.length;if(_>O)throw new SyntaxError(`Input length: ${_}, exceeds maximum allowed length: ${O}`);const S={type:"bos",value:"",output:g.prepend||""},E=[S],R=g.capture?"":"?:",j=t.globChars(g.windows),J=t.extglobChars(j),{DOT_LITERAL:K,PLUS_LITERAL:X,SLASH_LITERAL:ne,ONE_CHAR:oe,DOTS_SLASH:Se,NO_DOT:ve,NO_DOT_SLASH:Ke,NO_DOTS_SLASH:Ne,QMARK:Re,QMARK_NO_DOT:Ve,STAR:M,START_ANCHOR:N}=j,z=he=>`(${R}(?:(?!${N}${he.dot?Se:K}).)*?)`,ie=g.dot?"":ve,ce=g.dot?Re:Ve;let se=g.bash===!0?z(g):M;g.capture&&(se=`(${se})`),typeof g.noext=="boolean"&&(g.noextglob=g.noext);const B={input:m,index:-1,start:0,dot:g.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:E};m=e.removePrefix(m,B),_=m.length;const Fe=[],$e=[],Xe=[];let D=S,H;const pt=()=>B.index===_-1,_e=B.peek=(he=1)=>m[B.index+he],Me=B.advance=()=>m[++B.index]||"",ye=()=>m.slice(B.index+1),et=(he="",Ye=0)=>{B.consumed+=he,B.index+=Ye},Je=he=>{B.output+=he.output!=null?he.output:he.value,et(he.value)},Oe=()=>{let he=1;for(;_e()==="!"&&(_e(2)!=="("||_e(3)==="?");)Me(),B.start++,he++;return he%2===0?!1:(B.negated=!0,B.start++,!0)},wt=he=>{B[he]++,Xe.push(he)},lt=he=>{B[he]--,Xe.pop()},Ae=he=>{if(D.type==="globstar"){const Ye=B.braces>0&&(he.type==="comma"||he.type==="brace"),ue=he.extglob===!0||Fe.length&&(he.type==="pipe"||he.type==="paren");he.type!=="slash"&&he.type!=="paren"&&!Ye&&!ue&&(B.output=B.output.slice(0,-D.output.length),D.type="star",D.value="*",D.output=se,B.output+=D.output)}if(Fe.length&&he.type!=="paren"&&(Fe[Fe.length-1].inner+=he.value),(he.value||he.output)&&Je(he),D&&D.type==="text"&&he.type==="text"){D.output=(D.output||D.value)+he.value,D.value+=he.value;return}he.prev=D,E.push(he),D=he},mt=(he,Ye)=>{const ue={...J[Ye],conditions:1,inner:""};ue.prev=D,ue.parens=B.parens,ue.output=B.output;const Te=(g.capture?"(":"")+ue.open;wt("parens"),Ae({type:he,value:Ye,output:B.output?"":oe}),Ae({type:"paren",extglob:!0,value:Me(),output:Te}),Fe.push(ue)},rt=he=>{let Ye=he.close+(g.capture?")":""),ue;if(he.type==="negate"){let Te=se;if(he.inner&&he.inner.length>1&&he.inner.includes("/")&&(Te=z(g)),(Te!==se||pt()||/^\)+$/.test(ye()))&&(Ye=he.close=`)$))${Te}`),he.inner.includes("*")&&(ue=ye())&&/^\.[^\\/.]+$/.test(ue)){const tt=h(ue,{...y,fastpaths:!1}).output;Ye=he.close=`)${tt})${Te})`}he.prev.type==="bos"&&(B.negatedExtglob=!0)}Ae({type:"paren",extglob:!0,value:H,output:Ye}),lt("parens")};if(g.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(m)){let he=!1,Ye=m.replace(a,(ue,Te,tt,ct,ut,vn)=>ct==="\\"?(he=!0,ue):ct==="?"?Te?Te+ct+(ut?Re.repeat(ut.length):""):vn===0?ce+(ut?Re.repeat(ut.length):""):Re.repeat(tt.length):ct==="."?K.repeat(tt.length):ct==="*"?Te?Te+ct+(ut?se:""):se:Te?ue:`\\${ue}`);return he===!0&&(g.unescape===!0?Ye=Ye.replace(/\\/g,""):Ye=Ye.replace(/\\+/g,ue=>ue.length%2===0?"\\\\":ue?"\\":"")),Ye===m&&g.contains===!0?(B.output=m,B):(B.output=e.wrapOutput(Ye,B,y),B)}for(;!pt();){if(H=Me(),H==="\0")continue;if(H==="\\"){const ue=_e();if(ue==="/"&&g.bash!==!0||ue==="."||ue===";")continue;if(!ue){H+="\\",Ae({type:"text",value:H});continue}const Te=/^\\+/.exec(ye());let tt=0;if(Te&&Te[0].length>2&&(tt=Te[0].length,B.index+=tt,tt%2!==0&&(H+="\\")),g.unescape===!0?H=Me():H+=Me(),B.brackets===0){Ae({type:"text",value:H});continue}}if(B.brackets>0&&(H!=="]"||D.value==="["||D.value==="[^")){if(g.posix!==!1&&H===":"){const ue=D.value.slice(1);if(ue.includes("[")&&(D.posix=!0,ue.includes(":"))){const Te=D.value.lastIndexOf("["),tt=D.value.slice(0,Te),ct=D.value.slice(Te+2),ut=i[ct];if(ut){D.value=tt+ut,B.backtrack=!0,Me(),!S.output&&E.indexOf(D)===1&&(S.output=oe);continue}}}(H==="["&&_e()!==":"||H==="-"&&_e()==="]")&&(H=`\\${H}`),H==="]"&&(D.value==="["||D.value==="[^")&&(H=`\\${H}`),g.posix===!0&&H==="!"&&D.value==="["&&(H="^"),D.value+=H,Je({value:H});continue}if(B.quotes===1&&H!=='"'){H=e.escapeRegex(H),D.value+=H,Je({value:H});continue}if(H==='"'){B.quotes=B.quotes===1?0:1,g.keepQuotes===!0&&Ae({type:"text",value:H});continue}if(H==="("){wt("parens"),Ae({type:"paren",value:H});continue}if(H===")"){if(B.parens===0&&g.strictBrackets===!0)throw new SyntaxError(d("opening","("));const ue=Fe[Fe.length-1];if(ue&&B.parens===ue.parens+1){rt(Fe.pop());continue}Ae({type:"paren",value:H,output:B.parens?")":"\\)"}),lt("parens");continue}if(H==="["){if(g.nobracket===!0||!ye().includes("]")){if(g.nobracket!==!0&&g.strictBrackets===!0)throw new SyntaxError(d("closing","]"));H=`\\${H}`}else wt("brackets");Ae({type:"bracket",value:H});continue}if(H==="]"){if(g.nobracket===!0||D&&D.type==="bracket"&&D.value.length===1){Ae({type:"text",value:H,output:`\\${H}`});continue}if(B.brackets===0){if(g.strictBrackets===!0)throw new SyntaxError(d("opening","["));Ae({type:"text",value:H,output:`\\${H}`});continue}lt("brackets");const ue=D.value.slice(1);if(D.posix!==!0&&ue[0]==="^"&&!ue.includes("/")&&(H=`/${H}`),D.value+=H,Je({value:H}),g.literalBrackets===!1||e.hasRegexChars(ue))continue;const Te=e.escapeRegex(D.value);if(B.output=B.output.slice(0,-D.value.length),g.literalBrackets===!0){B.output+=Te,D.value=Te;continue}D.value=`(${R}${Te}|${D.value})`,B.output+=D.value;continue}if(H==="{"&&g.nobrace!==!0){wt("braces");const ue={type:"brace",value:H,output:"(",outputIndex:B.output.length,tokensIndex:B.tokens.length};$e.push(ue),Ae(ue);continue}if(H==="}"){const ue=$e[$e.length-1];if(g.nobrace===!0||!ue){Ae({type:"text",value:H,output:H});continue}let Te=")";if(ue.dots===!0){const tt=E.slice(),ct=[];for(let ut=tt.length-1;ut>=0&&(E.pop(),tt[ut].type!=="brace");ut--)tt[ut].type!=="dots"&&ct.unshift(tt[ut].value);Te=l(ct,g),B.backtrack=!0}if(ue.comma!==!0&&ue.dots!==!0){const tt=B.output.slice(0,ue.outputIndex),ct=B.tokens.slice(ue.tokensIndex);ue.value=ue.output="\\{",H=Te="\\}",B.output=tt;for(const ut of ct)B.output+=ut.output||ut.value}Ae({type:"brace",value:H,output:Te}),lt("braces"),$e.pop();continue}if(H==="|"){Fe.length>0&&Fe[Fe.length-1].conditions++,Ae({type:"text",value:H});continue}if(H===","){let ue=H;const Te=$e[$e.length-1];Te&&Xe[Xe.length-1]==="braces"&&(Te.comma=!0,ue="|"),Ae({type:"comma",value:H,output:ue});continue}if(H==="/"){if(D.type==="dot"&&B.index===B.start+1){B.start=B.index+1,B.consumed="",B.output="",E.pop(),D=S;continue}Ae({type:"slash",value:H,output:ne});continue}if(H==="."){if(B.braces>0&&D.type==="dot"){D.value==="."&&(D.output=K);const ue=$e[$e.length-1];D.type="dots",D.output+=H,D.value+=H,ue.dots=!0;continue}if(B.braces+B.parens===0&&D.type!=="bos"&&D.type!=="slash"){Ae({type:"text",value:H,output:K});continue}Ae({type:"dot",value:H,output:K});continue}if(H==="?"){if(!(D&&D.value==="(")&&g.noextglob!==!0&&_e()==="("&&_e(2)!=="?"){mt("qmark",H);continue}if(D&&D.type==="paren"){const Te=_e();let tt=H;(D.value==="("&&!/[!=<:]/.test(Te)||Te==="<"&&!/<([!=]|\w+>)/.test(ye()))&&(tt=`\\${H}`),Ae({type:"text",value:H,output:tt});continue}if(g.dot!==!0&&(D.type==="slash"||D.type==="bos")){Ae({type:"qmark",value:H,output:Ve});continue}Ae({type:"qmark",value:H,output:Re});continue}if(H==="!"){if(g.noextglob!==!0&&_e()==="("&&(_e(2)!=="?"||!/[!=<:]/.test(_e(3)))){mt("negate",H);continue}if(g.nonegate!==!0&&B.index===0){Oe();continue}}if(H==="+"){if(g.noextglob!==!0&&_e()==="("&&_e(2)!=="?"){mt("plus",H);continue}if(D&&D.value==="("||g.regex===!1){Ae({type:"plus",value:H,output:X});continue}if(D&&(D.type==="bracket"||D.type==="paren"||D.type==="brace")||B.parens>0){Ae({type:"plus",value:H});continue}Ae({type:"plus",value:X});continue}if(H==="@"){if(g.noextglob!==!0&&_e()==="("&&_e(2)!=="?"){Ae({type:"at",extglob:!0,value:H,output:""});continue}Ae({type:"text",value:H});continue}if(H!=="*"){(H==="$"||H==="^")&&(H=`\\${H}`);const ue=r.exec(ye());ue&&(H+=ue[0],B.index+=ue[0].length),Ae({type:"text",value:H});continue}if(D&&(D.type==="globstar"||D.star===!0)){D.type="star",D.star=!0,D.value+=H,D.output=se,B.backtrack=!0,B.globstar=!0,et(H);continue}let he=ye();if(g.noextglob!==!0&&/^\([^?]/.test(he)){mt("star",H);continue}if(D.type==="star"){if(g.noglobstar===!0){et(H);continue}const ue=D.prev,Te=ue.prev,tt=ue.type==="slash"||ue.type==="bos",ct=Te&&(Te.type==="star"||Te.type==="globstar");if(g.bash===!0&&(!tt||he[0]&&he[0]!=="/")){Ae({type:"star",value:H,output:""});continue}const ut=B.braces>0&&(ue.type==="comma"||ue.type==="brace"),vn=Fe.length&&(ue.type==="pipe"||ue.type==="paren");if(!tt&&ue.type!=="paren"&&!ut&&!vn){Ae({type:"star",value:H,output:""});continue}for(;he.slice(0,3)==="/**";){const qt=m[B.index+4];if(qt&&qt!=="/")break;he=he.slice(3),et("/**",3)}if(ue.type==="bos"&&pt()){D.type="globstar",D.value+=H,D.output=z(g),B.output=D.output,B.globstar=!0,et(H);continue}if(ue.type==="slash"&&ue.prev.type!=="bos"&&!ct&&pt()){B.output=B.output.slice(0,-(ue.output+D.output).length),ue.output=`(?:${ue.output}`,D.type="globstar",D.output=z(g)+(g.strictSlashes?")":"|$)"),D.value+=H,B.globstar=!0,B.output+=ue.output+D.output,et(H);continue}if(ue.type==="slash"&&ue.prev.type!=="bos"&&he[0]==="/"){const qt=he[1]!==void 0?"|$":"";B.output=B.output.slice(0,-(ue.output+D.output).length),ue.output=`(?:${ue.output}`,D.type="globstar",D.output=`${z(g)}${ne}|${ne}${qt})`,D.value+=H,B.output+=ue.output+D.output,B.globstar=!0,et(H+Me()),Ae({type:"slash",value:"/",output:""});continue}if(ue.type==="bos"&&he[0]==="/"){D.type="globstar",D.value+=H,D.output=`(?:^|${ne}|${z(g)}${ne})`,B.output=D.output,B.globstar=!0,et(H+Me()),Ae({type:"slash",value:"/",output:""});continue}B.output=B.output.slice(0,-D.output.length),D.type="globstar",D.output=z(g),D.value+=H,B.output+=D.output,B.globstar=!0,et(H);continue}const Ye={type:"star",value:H,output:se};if(g.bash===!0){Ye.output=".*?",(D.type==="bos"||D.type==="slash")&&(Ye.output=ie+Ye.output),Ae(Ye);continue}if(D&&(D.type==="bracket"||D.type==="paren")&&g.regex===!0){Ye.output=H,Ae(Ye);continue}(B.index===B.start||D.type==="slash"||D.type==="dot")&&(D.type==="dot"?(B.output+=Ke,D.output+=Ke):g.dot===!0?(B.output+=Ne,D.output+=Ne):(B.output+=ie,D.output+=ie),_e()!=="*"&&(B.output+=oe,D.output+=oe)),Ae(Ye)}for(;B.brackets>0;){if(g.strictBrackets===!0)throw new SyntaxError(d("closing","]"));B.output=e.escapeLast(B.output,"["),lt("brackets")}for(;B.parens>0;){if(g.strictBrackets===!0)throw new SyntaxError(d("closing",")"));B.output=e.escapeLast(B.output,"("),lt("parens")}for(;B.braces>0;){if(g.strictBrackets===!0)throw new SyntaxError(d("closing","}"));B.output=e.escapeLast(B.output,"{"),lt("braces")}if(g.strictSlashes!==!0&&(D.type==="star"||D.type==="bracket")&&Ae({type:"maybe_slash",value:"",output:`${ne}?`}),B.backtrack===!0){B.output="";for(const he of B.tokens)B.output+=he.output!=null?he.output:he.value,he.suffix&&(B.output+=he.suffix)}return B};return h.fastpaths=(m,y)=>{const g={...y},O=typeof g.maxLength=="number"?Math.min(n,g.maxLength):n,_=m.length;if(_>O)throw new SyntaxError(`Input length: ${_}, exceeds maximum allowed length: ${O}`);m=o[m]||m;const{DOT_LITERAL:S,SLASH_LITERAL:E,ONE_CHAR:R,DOTS_SLASH:j,NO_DOT:J,NO_DOTS:K,NO_DOTS_SLASH:X,STAR:ne,START_ANCHOR:oe}=t.globChars(g.windows),Se=g.dot?K:J,ve=g.dot?X:J,Ke=g.capture?"":"?:",Ne={negated:!1,prefix:""};let Re=g.bash===!0?".*?":ne;g.capture&&(Re=`(${Re})`);const Ve=ie=>ie.noglobstar===!0?Re:`(${Ke}(?:(?!${oe}${ie.dot?j:S}).)*?)`,M=ie=>{switch(ie){case"*":return`${Se}${R}${Re}`;case".*":return`${S}${R}${Re}`;case"*.*":return`${Se}${Re}${S}${R}${Re}`;case"*/*":return`${Se}${Re}${E}${R}${ve}${Re}`;case"**":return Se+Ve(g);case"**/*":return`(?:${Se}${Ve(g)}${E})?${ve}${R}${Re}`;case"**/*.*":return`(?:${Se}${Ve(g)}${E})?${ve}${Re}${S}${R}${Re}`;case"**/.*":return`(?:${Se}${Ve(g)}${E})?${S}${R}${Re}`;default:{const ce=/^(.*?)\.(\w+)$/.exec(ie);if(!ce)return;const se=M(ce[1]);return se?se+S+ce[2]:void 0}}},N=e.removePrefix(m,Ne);let z=M(N);return z&&g.strictSlashes!==!0&&(z+=`${E}?`),z},gu=h,gu}var vu,hd;function Yy(){if(hd)return vu;hd=1;const t=Wy(),e=Jy(),n=zs(),i=Ks(),r=o=>o&&typeof o=="object"&&!Array.isArray(o),a=(o,l,d=!1)=>{if(Array.isArray(o)){const E=o.map(j=>a(j,l,d));return j=>{for(const J of E){const K=J(j);if(K)return K}return!1}}const h=r(o)&&o.tokens&&o.input;if(o===""||typeof o!="string"&&!h)throw new TypeError("Expected pattern to be a non-empty string");const m=l||{},y=m.windows,g=h?a.compileRe(o,l):a.makeRe(o,l,!1,!0),O=g.state;delete g.state;let _=()=>!1;if(m.ignore){const E={...l,ignore:null,onMatch:null,onResult:null};_=a(m.ignore,E,d)}const S=(E,R=!1)=>{const{isMatch:j,match:J,output:K}=a.test(E,g,l,{glob:o,posix:y}),X={glob:o,state:O,regex:g,posix:y,input:E,output:K,match:J,isMatch:j};return typeof m.onResult=="function"&&m.onResult(X),j===!1?(X.isMatch=!1,R?X:!1):_(E)?(typeof m.onIgnore=="function"&&m.onIgnore(X),X.isMatch=!1,R?X:!1):(typeof m.onMatch=="function"&&m.onMatch(X),R?X:!0)};return d&&(S.state=O),S};return a.test=(o,l,d,{glob:h,posix:m}={})=>{if(typeof o!="string")throw new TypeError("Expected input to be a string");if(o==="")return{isMatch:!1,output:""};const y=d||{},g=y.format||(m?n.toPosixSlashes:null);let O=o===h,_=O&&g?g(o):o;return O===!1&&(_=g?g(o):o,O=_===h),(O===!1||y.capture===!0)&&(y.matchBase===!0||y.basename===!0?O=a.matchBase(o,l,d,m):O=l.exec(_)),{isMatch:!!O,match:O,output:_}},a.matchBase=(o,l,d)=>(l instanceof RegExp?l:a.makeRe(l,d)).test(n.basename(o)),a.isMatch=(o,l,d)=>a(l,d)(o),a.parse=(o,l)=>Array.isArray(o)?o.map(d=>a.parse(d,l)):e(o,{...l,fastpaths:!1}),a.scan=(o,l)=>t(o,l),a.compileRe=(o,l,d=!1,h=!1)=>{if(d===!0)return o.output;const m=l||{},y=m.contains?"":"^",g=m.contains?"":"$";let O=`${y}(?:${o.output})${g}`;o&&o.negated===!0&&(O=`^(?!${O}).*$`);const _=a.toRegex(O,l);return h===!0&&(_.state=o),_},a.makeRe=(o,l={},d=!1,h=!1)=>{if(!o||typeof o!="string")throw new TypeError("Expected a non-empty string");let m={negated:!1,fastpaths:!0};return l.fastpaths!==!1&&(o[0]==="."||o[0]==="*")&&(m.output=e.fastpaths(o,l)),m.output||(m=e(o,l)),a.compileRe(m,l,d,h)},a.toRegex=(o,l)=>{try{const d=l||{};return new RegExp(o,d.flags||(d.nocase?"i":""))}catch(d){if(l&&l.debug===!0)throw d;return/$^/}},a.constants=i,vu=a,vu}var yu,pd;function Xy(){if(pd)return yu;pd=1;const t=Yy(),e=zs();function n(i,r,a=!1){return r&&(r.windows===null||r.windows===void 0)&&(r={...r,windows:e.isWindows()}),t(i,r,a)}return Object.assign(n,t),yu=n,yu}var Qy=Xy();const md=qs(Qy),gd="loglevel-patterns",qa="loglevel:",bu="!",Zy=ot.INFO;class eb{constructor(e){ge(this,"projectPrefix");ge(this,"patternsCache",null);this.projectPrefix=`${qa}${e}:`}getLevel(e){const n=this.loadAndUnifyPatterns();return this.resolveLogLevelFromPatterns(e,n)||Zy}setLevel(e,n){const{level:i,override:r}=this.parseLogLevel(n),a=`${qa}${e}`,o=r?`${i}${bu}`:i;localStorage.setItem(a,o),this.patternsCache=null}loadAndUnifyPatterns(){if(this.patternsCache)return this.patternsCache;const e=this.readPatternsFromJSON(),n=this.unifyWithIndividualKeys(e);return this.patternsCache=n,n}resolveLogLevelFromPatterns(e,n){let i;for(const[r,{level:a,override:o}]of Object.entries(n))if(md(r.toLowerCase())(e.toLowerCase())){if(o)return a;(!i||md(r)(e))&&(i=a)}return i}readPatternsFromJSON(){try{const e=localStorage.getItem(gd);return e?JSON.parse(e):{}}catch{return console.error("Failed to parse loglevel-patterns from localStorage"),{}}}unifyWithIndividualKeys(e){const n={...e};for(let i=0;i<localStorage.length;i++){const r=localStorage.key(i);if(!r||!r.startsWith(qa)||r===gd)continue;const a=r.replace(qa,"").toLowerCase(),o=localStorage.getItem(r);if(!o)continue;const{level:l,override:d}=this.parseLogLevel(o);n[a]={level:l,override:d}}return n}parseLogLevel(e){const n=e.endsWith(bu),i=n?e.slice(0,-bu.length):e;if(!Dh(i))throw new Cl(i);return{level:i,override:n}}}class tb{constructor(e,n){ge(this,"committed",!1);ge(this,"chainOptions",{});ge(this,"method",null);ge(this,"stack","");ge(this,"args",[]);this.adapter=e,n&&(this.chainOptions={...n}),Promise.resolve().then(()=>this.commit())}options(e){return this.chainOptions={...this.chainOptions,...e},this}trace(...e){return this.log("trace",e)}debug(...e){return this.log("debug",e)}info(...e){return this.log("info",e)}warn(...e){return this.log("warn",e)}error(...e){return this.log("error",e)}fatal(...e){return this.log("fatal",e)}log(e,n){var i;return this.method=e,this.args=n,this.stack=(i=new Error().stack)!=null?i:"",this}commit(){if(!this.committed&&(this.committed=!0,this.method)){const e=this.args[0],n=this.args.slice(1),i={stack:this.stack,content:{message:e,args:n},options:this.chainOptions};this.adapter[this.method](i)}}}let Ph=class nl{constructor(e){ge(this,"adapter");this.adapter=e}static create(e){const n=new nl(e);return n.setMetadata({account:null,client:Vh()}),n}child(e,n={}){return new nl(this.adapter.child(e,n))}lazyChild(e,n={}){let i;return new Proxy({},{get:(r,a,o)=>(i||(i=this.child(e,n)),Reflect.get(i,a,o))})}setMetadata(e){this.adapter.setMetadata(e)}setLevel(e){if(!Dh(e))throw new Cl(e);this.adapter.setLevel(e)}createChain(e){return new tb(this.adapter,e)}trace(...e){return this.createChain().trace(...e)}debug(...e){return this.createChain().debug(...e)}info(...e){return this.createChain().info(...e)}warn(...e){return this.createChain().warn(...e)}error(...e){return this.createChain().error(...e)}fatal(...e){return this.createChain().fatal(...e)}options(e){return this.createChain(e)}};function nb(t){return Ni().logger.lazyChild(t)}function Lh(t,e){return Ph.create(new tl({source:t,levelService:new eb(t),consoleLogger:new zy,httpLogger:Rl.create({db:e,project:t})}))}const ib="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let rb=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t));for(;t--;)e+=ib[n[t]&63];return e};const gs=(t=8)=>rb(t),$h=(t,e=!1)=>{const n=Object.entries(t).reduce((i,[r,a])=>a!==void 0&&(!e||a!==null)?`${i}${i?"&":""}${r}=${a}`:i,"");return n?`?${n}`:""},Mh=t=>{const e=document.getElementById(t);return e?new URL(e.src).searchParams:new URLSearchParams};function ab(){const t=new Error().stack.split(`
|
|
31
|
-
`);return t.length<3?"":t[2].trim().substring(3)}function sb(t){return new Promise(e=>setTimeout(e,t))}const zt=class zt{constructor(){ge(this,"projectName","nizza");ge(this,"instanceId",gs());ge(this,"nizzaDB",new Dy);ge(this,"logger",Lh(this.projectName,this.nizzaDB));ge(this,"coreLogger",this.logger.child("core"));ge(this,"_logger",this.coreLogger.child("NizzaStore"));ge(this,"_config",null);ge(this,"_account");ge(this,"_accountStatus","idle");ge(this,"_productDataSource");ge(this,"_eventBus",new Oh("nizza",this.coreLogger));ge(this,"activeAccountFetchId",null);ly(this,{_config:ht,_account:ht,_productDataSource:ht,_accountStatus:ht,config:qn,account:qn,accountName:qn,accountStatus:qn,setAccount:Bt,configure:Bt,refetchAccount:Bt,setProductDataSource:Bt,setAddToCartConfig:Bt,setProductId:Bt},{name:"NizzaStore",autoBind:!0}),this.refetchAccount=this.refetchAccount.bind(this)}static instance(){var n;if(!!((n=window==null?void 0:window.nizza)!=null&&n.store))zt._instance=window.nizza.store;else{const i=new zt;zt._instance=i,zt._instance._logger.debug("Created new NizzaStore instance")}return window.nizza||(window.nizza={},window.nz={},zt._instance._logger.debug("Initialized nizza window object")),window.nizza.store=zt._instance,window.nz=window.nizza,zt._instance}async configure(e){try{this._logger.debug("Running configure with config:",e),await this.updateConfig(e)}catch(n){this.setAccountStatus("error"),this._logger.error("Error running configure",n)}}async updateConfig(e={}){var r,a;const{account:n,authToken:i}=(r=this._config)!=null?r:{};this._config={...this._config,...e},(a=this._config)!=null&&a.account&&(n!==this._config.account||i!==this._config.authToken)?(this._logger.debug(`Fetching account data for account: ${this._config.account}, authToken provided: ${!!this._config.authToken}`),this.logger.setMetadata({account:this._config.account}),await this.fetchAccount(this._config.account,this._config.authToken)):this._logger.debug("Skipped fetching account data as the account or authToken did not change"),e.getProductDataSource&&this.setProductDataSource(await e.getProductDataSource())}async fetchAccount(e,n){this.setAccountStatus("loading");const i=gs();this.activeAccountFetchId=i;try{const r=await np(e,n);if(this.activeAccountFetchId!==i){this._logger.debug("Fetch account request was superseded by a newer request");return}this.setAccount(r),this.setAccountStatus("success"),this._logger.debug("Account fetched and set successfully:",r)}catch(r){this.activeAccountFetchId===i&&(this.setAccountStatus("error"),r instanceof Fl?this._logger.fatal("Nizza account not found",e).options({silent:!0}):this._logger.fatal("Unexpected error fetching account",r))}}setAccount(e){this._account=e}setAccountStatus(e){this._accountStatus=e}setProductDataSource(e){this._productDataSource=e}setProductId(e){this._config&&(this._config.productId=e)}setOrderFormId(e){this._config&&(this._config.orderFormId=e)}setAddToCartConfig(e){if(!this._config){const n="You cannot set addToCartConfig before running configure()";throw this._logger.error(n),new Error(n)}this._config.addToCartConfig=e}setAuthToken(e){this.updateConfig({authToken:e})}async refetchAccount(){var e;(e=this._config)!=null&&e.account&&await this.fetchAccount(this._config.account,this._config.authToken)}get version(){return zt.version}get config(){return this._config}get account(){return this._account}get accountStatus(){return this._accountStatus}get accountName(){var e;return(e=this._config)==null?void 0:e.account}isPvtAccount(e){var n;return!!(e&&((n=this._config)!=null&&n.authToken))}isPubAccount(e){var n;return!!(e&&!((n=this._config)!=null&&n.authToken))}get productDataSource(){return this._productDataSource}get eventBus(){return this._eventBus}};ge(zt,"version","9"),ge(zt,"_instance");let vs=zt;const Ni=t=>{const e=vs.instance();return ay(()=>!!e.account,()=>t==null?void 0:t(e)),e};function Bh(){return je.useMemo(()=>Ni(),[])}function Uh(t,e){const n=Bh();return Nh(()=>t(n),e)}const{coreLogger:ob}=Ni(),ub=ob.child("getClientTimeZone");function jh(t=!1){var a,o,l;let e=null,n=null,i=null;try{e=(l=(o=(a=Intl.DateTimeFormat())==null?void 0:a.resolvedOptions())==null?void 0:o.timeZone)!=null?l:null;const d=-new Date().getTimezoneOffset();i=d;const h=d>=0?"+":"-",m=String(Math.floor(Math.abs(d)/60)).padStart(2,"0"),y=String(Math.abs(d)%60).padStart(2,"0");n=`${h}${m}:${y}`}catch(d){ub.error("Error obtaining time zone or offset",d)}const r={offset:n,offsetValue:i,value:e,country:null,included:null,label:null};if(t){const{country:d,included:h,label:m,...y}=r;return y}return r}function Vh(){const e=typeof navigator!="undefined"?navigator.userAgent:"server",n=lb(e),{language:i,languages:r}=cb(),a=db(),o=fb(),{hardwareConcurrency:l,deviceMemory:d}=hb(),h=pb();return{userAgent:e,browser:n.browser,os:n.os,device:n.device,language:i,languages:r,screen:a,connection:o,hardwareConcurrency:l,deviceMemory:d,timezone:h}}function lb(t){try{const n=new On(t).getResult();return{browser:{name:n.browser.name||"Unknown",version:n.browser.version||"Unknown"},os:{name:n.os.name||"Unknown",version:n.os.version||"Unknown"},device:{model:n.device.model||"Unknown",type:n.device.type||"Desktop",vendor:n.device.vendor||"Unknown"}}}catch(e){return console.error("Error parsing user agent:",e),{browser:{name:"Unknown",version:"Unknown"},os:{name:"Unknown",version:"Unknown"},device:{model:"Unknown",type:"Desktop",vendor:"Unknown"}}}}function cb(){return typeof navigator!="undefined"?{language:navigator.language||"Unknown",languages:navigator.languages?[...navigator.languages]:[]}:{language:"Unknown",languages:[]}}function db(){return typeof window!="undefined"&&window.screen?{width:window.screen.width,height:window.screen.height,colorDepth:window.screen.colorDepth}:null}function fb(){var t,e,n,i;if(typeof navigator!="undefined"&&"connection"in navigator){const r=navigator.connection;return{downlink:(t=r==null?void 0:r.downlink)!=null?t:0,effectiveType:(e=r==null?void 0:r.effectiveType)!=null?e:"Unknown",rtt:(n=r==null?void 0:r.rtt)!=null?n:0,saveData:(i=r==null?void 0:r.saveData)!=null?i:!1}}return null}function hb(){return typeof navigator!="undefined"?{hardwareConcurrency:navigator.hardwareConcurrency||null,deviceMemory:navigator.deviceMemory||null}:{hardwareConcurrency:null,deviceMemory:null}}function pb(){try{return jh(!0)}catch(t){return console.error("Error retrieving client timezone:",t),{offset:null,offsetValue:null,value:"Unknown",country:null,included:null,label:null}}}var Hh=(t=>(t.VTEX="VTEX",t.VTEX_IO="VTEX-IO",t.VTEX_CMS="PORTAL-VTEX",t.PLATFORM="PLATFORM",t.UNKNOWN="UNKNOWN",t))(Hh||{}),qh=(t=>(t.PLATFORM="platform_module",t.ADENDA="subscription_module",t.APP_STORE="app_store",t))(qh||{}),Kh=(t=>(t.ACTIVE="active_contract",t.INACTIVE="inactive_contract",t))(Kh||{}),zh=(t=>(t.LITE="lite",t.STANDARD="standard",t.PRO="pro",t))(zh||{}),Gh=(t=>(t.LITE="PLAN_LITE",t.STANDARD="PLAN_ESTANDAR",t.PRO="PLAN_PRO",t.NONE="NO_PLAN",t))(Gh||{}),Wh=(t=>(t.PAST="past",t.LIVE="live",t.FUTURE="future",t))(Wh||{});class Fl extends Tn{constructor(e){super("NIZZA_ACCOUNT_NOT_FOUND_ERROR",`Error finding account: ${e}`)}}class Jh extends Tn{constructor(e){super("NIZZA_PLAN_NOT_FOUND_ERROR",`Error finding plan: ${e}`)}}class Yh extends Tn{constructor(e){super("NIZZA_CREATE_PLAN_ERROR",`Error creating plan: ${e.plan}`,e)}}const vd=`${er.apiUrls.restV1}/plans`;class Xh{async get(e){const i=`/info${$h({planType:e})}`,r=vd+i,{data:a}=await mi({url:r});return a}async create(e){const n=`${vd}/create`,{success:i}=await mi({url:n,method:"POST",body:JSON.stringify(e)});if(!i)throw new Yh(e)}}function mb(t){const{host:e,account:n,username:i,createdAt:r,subscriptionType:a,installationDateApp:o,...l}=t;return{...l,account:n,host:e!=null?e:null,username:i!=null?i:n,createdAt:new Date(r),subscriptionType:a!=null?a:null,installationDateApp:new Date(o)}}function gb(t){const{host:e,...n}=t;return{...n,host:e!=null?e:null,plan:{}}}const vb=`${er.apiUrls.restV1}/accounts/v2`;class Qh{async get(e){const n=`${vb}/${e}`,{data:i}=await mi({url:n});return i?gb(i):null}}const yb=`${er.apiUrls.restV1}/accounts/v2/pvt`;class bb{async get(e,n){const i=`${yb}/${e}`,{data:r}=await mi({url:i,headers:{authorization:`Bearer ${n}`}});return r?mb(r):null}}class Zh{constructor(e,n,i){this.publicAccountRepo=e,this.privateAccountRepo=n,this.accountPlanRepo=i}async get(e,n){try{const i=n?await this.privateAccountRepo.get(e,n):await this.publicAccountRepo.get(e);if(!i)throw new Fl(e);const r=await this.accountPlanRepo.get(i.descriptionPlan);if(!r)throw new Jh(i.descriptionPlan);return{...i,plan:r}}catch(i){throw new wl(i)}}}const kb=new Qh,_b=new bb,wb=new Xh,ep=new Zh(kb,_b,wb),tp=()=>{const{account:t,accountName:e,accountStatus:n,refetchAccount:i,isPvtAccount:r,isPubAccount:a}=Uh(h=>({account:h.account,accountName:h.accountName,accountStatus:h.accountStatus,refetchAccount:h.refetchAccount,isPvtAccount:h.isPvtAccount,isPubAccount:h.isPubAccount})),o=["idle","loading"].includes(n);return{account:t,accountName:e,isLoading:o,isError:n==="error",isSuccess:n==="success",accountStatus:n,refetchAccount:i,isPvtAccount:r,isPubAccount:a}};async function np(t,e){return ep.get(t,e)}var ip=(t=>(t.Created="CREATED",t.Finalized="FINALIZED",t.Live="LIVE",t.Starting="STARTING",t))(ip||{}),rp=(t=>(t.Add="add",t.Remove="remove",t))(rp||{}),ap=(t=>(t.Vtex="VTEX",t))(ap||{}),sp=(t=>(t.Active="active",t.Inactive="inactive",t))(sp||{});const Sb={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AddCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateCollectionInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Eb={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Nb={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}},{kind:"Field",name:{kind:"Name",value:"products"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"pictures"}},{kind:"Field",name:{kind:"Name",value:"price"}},{kind:"Field",name:{kind:"Name",value:"salesprice"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Ab={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllCollections"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccessArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}},{kind:"Field",name:{kind:"Name",value:"products"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"pictures"}},{kind:"Field",name:{kind:"Name",value:"price"}},{kind:"Field",name:{kind:"Name",value:"salesprice"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Ob={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ManageCollectionProduct"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ManageCollectionProductInInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"manageCollectionProduct"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},xb={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchCollections"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccessArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}},{kind:"Field",name:{kind:"Name",value:"products"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"pictures"}},{kind:"Field",name:{kind:"Name",value:"price"}},{kind:"Field",name:{kind:"Name",value:"salesprice"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Tb={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateCollectionInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Cb={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindMinimalEvent"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FindEventInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findEvent"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EventData"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"thumbnailsPath"}},{kind:"Field",name:{kind:"Name",value:"recordVideoPath"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"thumbnails"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Rb={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchMinimalEvents"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SearchEventInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchEvent"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EventArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"thumbnailsPath"}},{kind:"Field",name:{kind:"Name",value:"recordVideoPath"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"status"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Fb={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BlockUser"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BlockUserInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"blockUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BlockUserSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Ib={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ChangeAccountUsername"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ChangeUsernameInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"changeAccountUsername"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ChangeUsernameSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Db={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteChatMessage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteChatInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteChatMessage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"DeleteChatMessageSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Pb={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllChatMessage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetAllChatMessageInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllChatMessage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ChatMessageArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"connectionId"}},{kind:"Field",name:{kind:"Name",value:"data"}},{kind:"Field",name:{kind:"Name",value:"email"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"idEvent"}},{kind:"Field",name:{kind:"Name",value:"sendDate"}},{kind:"Field",name:{kind:"Name",value:"sessionId"}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"username"}},{kind:"Field",name:{kind:"Name",value:"isAdmin"}},{kind:"Field",name:{kind:"Name",value:"urlGif"}},{kind:"Field",name:{kind:"Name",value:"second"}},{kind:"Field",name:{kind:"Name",value:"ip"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},op={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetChatRoomToken"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetChatRoomInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getChatRoomToken"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ChatRoomTokenData"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"token"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Lb={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"PinChatMessage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"PinChatInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pinChatMessage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PinChatMessageSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},$b={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"highlightProduct"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"HighlightProductInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"highlightProduct"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"HighlightProductSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Mb={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"deleteAllCustomization"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CustomPlayerInputAccount"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteAllCustomPlayer"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Bb={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getAllCustomization"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllCustomPlayer"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CustomPlayerSuccessArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"data"}},{kind:"Field",name:{kind:"Name",value:"section"}},{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Ub={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"updateCustomization"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CustomPlayerInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCustomPlayer"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},jb={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"sendAddToCart"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"AddToCartInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sendAddToCart"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AddToCartSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Vb={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetTimeLine"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetTimeLineInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getTimeLine"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TimeLineArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"time"}},{kind:"Field",name:{kind:"Name",value:"likes"}},{kind:"Field",name:{kind:"Name",value:"comments"}},{kind:"Field",name:{kind:"Name",value:"viewers"}},{kind:"Field",name:{kind:"Name",value:"orders"}},{kind:"Field",name:{kind:"Name",value:"minute"}},{kind:"Field",name:{kind:"Name",value:"hour"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Hb={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AppendProductsToSnackVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"RelateToProductsSnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"appendProductsSnackVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ActionSnackVideoSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},qb={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreatePlayList"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreatePlayListInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createPlayList"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreatePlayListSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Kb={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateSnackVideoBatch"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateSnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createSnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},zb={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteRelationshipWithSnackVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoRelationshipKeys"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteRelationshipSnackVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ActionSnackVideoSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}}]}}]}}]}}]},Gb={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteSnackVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteSnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteSnackVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ActionSnackVideoSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Wb={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindManySnackVideos"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FindManySnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findManySnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"uploadProgress"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"eventId"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Jb={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllSnackVideos"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllSnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoCreatedArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"snackVideos"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"uploadProgress"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"eventId"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"created"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}}]}},{kind:"Field",name:{kind:"Name",value:"cursor"}},{kind:"Field",name:{kind:"Name",value:"totalItems"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Yb={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetPlayLists"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getPlayLists"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PlayListArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"created"}},{kind:"Field",name:{kind:"Name",value:"videoAmount"}},{kind:"Field",name:{kind:"Name",value:"productAmount"}},{kind:"Field",name:{kind:"Name",value:"updated"}},{kind:"Field",name:{kind:"Name",value:"videos"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"order"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Xb={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetSnackVideoRelationships"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoRelationshipInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getRelationshipSnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"RelationshipSnackVideoArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sourceEntity"}},{kind:"Field",name:{kind:"Name",value:"attributeId"}}]}}]}}]}}]}}]},Qb={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchSnackVideos"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SearchInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchSnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoCreatedArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"snackVideos"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"uploadProgress"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"eventId"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"created"}}]}},{kind:"Field",name:{kind:"Name",value:"cursor"}},{kind:"Field",name:{kind:"Name",value:"totalItems"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Zb={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdatePlayList"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdatePlayListInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updatePlayList"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"UpdatePlayListSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},ek={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindByProductSnackVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FindByProductSnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findByProductSnackVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},tk={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetPlayList"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetPlayListQueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getPlayList"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PlayListData"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"videos"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"productId"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}},{kind:"Field",name:{kind:"Name",value:"order"}},{kind:"Field",name:{kind:"Name",value:"productName"}},{kind:"Field",name:{kind:"Name",value:"productImageUrl"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},nk=Object.freeze(Object.defineProperty({__proto__:null,AddCollectionDocument:Sb,AppendProductsToSnackVideoDocument:Hb,BlockUserDocument:Fb,ChangeAccountUsernameDocument:Ib,CreatePlayListDocument:qb,CreateSnackVideoBatchDocument:Kb,DeleteAllCustomizationDocument:Mb,DeleteChatMessageDocument:Db,DeleteCollectionDocument:Eb,DeleteRelationshipWithSnackVideoDocument:zb,DeleteSnackVideoDocument:Gb,EventStatus:ip,FindByProductSnackVideoDocument:ek,FindCollectionDocument:Nb,FindManySnackVideosDocument:Wb,FindMinimalEventDocument:Cb,GetAllChatMessageDocument:Pb,GetAllCollectionsDocument:Ab,GetAllCustomizationDocument:Bb,GetAllSnackVideosDocument:Jb,GetChatRoomTokenDocument:op,GetPlayListDocument:tk,GetPlayListsDocument:Yb,GetSnackVideoRelationshipsDocument:Xb,GetTimeLineDocument:Vb,HighlightProductDocument:$b,ManageCollectionProductDocument:Ob,Methods:rp,PinChatMessageDocument:Lb,SearchCollectionsDocument:xb,SearchMinimalEventsDocument:Rb,SearchSnackVideosDocument:Qb,SendAddToCartDocument:jb,SignProvider:ap,Status:sp,UpdateCollectionDocument:Tb,UpdateCustomizationDocument:Ub,UpdatePlayListDocument:Zb},Symbol.toStringTag,{value:"Module"}));var Gs=(t=>(t.OPEN_TAB="openTab",t.OPEN_VARIATION_SELECTOR="openVariationSelector",t.ADD_TO_CART="addToCart",t))(Gs||{});function ik(t){return{class:t,_value:null,get value(){return this._value||(this._value=new t,Object.freeze(this)),this._value}}}var Cn=(t=>(t.Local="local",t.VtexLegacy="vtexlegacy",t.VtexIO="vtexio",t.VtexFastStore="faststore",t.Platform="platform",t.External="external",t))(Cn||{}),Il=(t=>(t.PROD="prod",t.DEV="dev",t.LOCAL="local",t))(Il||{});const{coreLogger:rk}=Ni(),il=rk.child("addToCartHooks"),rl={errorAddingToCart:"addToCartHooks.notification.error",errorOpeningVariationSelector:"addToCartHooks.notification.error",errorOpeningNewTab:"addToCartHooks.notification.error",successAddingToCart:"addToCartHooks.notification.success"};async function ak(t){const e={...t,action:{type:Gs.ADD_TO_CART,exec:()=>il.error("action no implemented in validate hook")}};try{const n=await sk(e),i=await ok(n);await uk(i)}catch(n){il.error("error unhandled",n)}}async function sk(t){var a,o;const{context:e,userAddToCartConfig:n}=t,i=(a=n==null?void 0:n.hooks)==null?void 0:a.transform;let r=t.product;if(i)try{r=await i({product:{...r},data:(o=e.data)!=null?o:{}})}catch(l){ys("transform",l)}return{...t,product:r}}async function ok(t){var d,h;const{context:e,hookStrategy:n,userAddToCartConfig:i,product:r}=t,a=up(t),o=(d=i==null?void 0:i.hooks)==null?void 0:d.validate;let l=n.validate({...t,actionFactory:a});if(o)try{l=await o({product:{...r},defaultAction:{...l},action:a,data:(h=e.data)!=null?h:{}})}catch(m){ys("validate",m)}return{...t,action:l,actionFactory:a}}async function uk(t){var E;const{eventBus:e}=Ni(),{product:n,userAddToCartConfig:i,notifyFactory:r,action:a,actionFactory:o}=t,{isVariationSelectorOpen:l,data:d={}}=t.context,h=(E=i==null?void 0:i.hooks)==null?void 0:E.end,m=a.type===Gs.ADD_TO_CART;let y=null,g=!1;const O=()=>{!m||!l||o.openVariationSelector(!1).exec()},_=()=>{!m||g||(y?r.error(rl.errorAddingToCart):r.success(rl.successAddingToCart))},S=()=>{const R={product:n,actionType:a.type,success:!y,error:y};e.emit(Th.ATCH_ACTION_EXECUTED,R)};try{if(!a.type||!a.exec)throw new Error("Invalid action object, missing keys 'type' or 'exec'");await a.exec()}catch(R){ys("end",R),y=R}if(h)try{g=!!await h({data:d,error:y,notify:r,actionExecuted:a})}catch(R){ys("end",R)}O(),_(),S()}function up(t){const{actionFactory:e,userAddToCartConfig:n}=t,i=r=>Object.entries(r!=null?r:{}).reduce((a,[o,l])=>({...a,[o]:d=>({type:o,exec:()=>l(d)})}),{});return{...i(e),...i(n==null?void 0:n.actionFactory)}}function ys(t,e){il.error(`addToCartHooks error running ${t}: `,e)}class lp{constructor(e){ge(this,"aggregate");ge(this,"_numSetPropsApplied",0);this.aggregate=e}setProps(e){for(const[n,i]of Object.entries(e))n in this.aggregate&&(this.aggregate[n]=i);this._numSetPropsApplied++}get isFirstSetProps(){return this._numSetPropsApplied===1}}function cp(t){return new lp(t)}class lk{constructor(e){ge(this,"_value");e!==void 0&&(this._value=e)}get value(){return this._value}}var xt=(t=>(t.GENERAL_ERROR="GENERAL_ERROR",t.AXIOS_ERROR="AXIOS_ERROR",t.NETWORK_ERROR="NETWORK_ERROR",t.CONFIG_ERROR="CONFIG_ERROR",t.TIMEOUT_ERROR="TIMEOUT_ERROR",t.AUTH_ERROR="AUTH_ERROR",t.NOT_FOUND="NOT_FOUND",t.VALIDATION_ERROR="VALIDATION_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.BAD_REQUEST="BAD_REQUEST",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.CONFLICT="CONFLICT",t.GONE="GONE",t.UNSUPPORTED_MEDIA_TYPE="UNSUPPORTED_MEDIA_TYPE",t.TOO_MANY_REQUESTS="TOO_MANY_REQUESTS",t.INTERNAL_SERVER_ERROR="INTERNAL_SERVER_ERROR",t.SERVICE_UNAVAILABLE="SERVICE_UNAVAILABLE",t))(xt||{});function dp(t,e){return function(){return t.apply(e,arguments)}}const{toString:ck}=Object.prototype,{getPrototypeOf:Dl}=Object,Ws=(t=>e=>{const n=ck.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),on=t=>(t=t.toLowerCase(),e=>Ws(e)===t),Js=t=>e=>typeof e===t,{isArray:or}=Array,Qr=Js("undefined");function dk(t){return t!==null&&!Qr(t)&&t.constructor!==null&&!Qr(t.constructor)&&Vt(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const fp=on("ArrayBuffer");function fk(t){let e;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&fp(t.buffer),e}const hk=Js("string"),Vt=Js("function"),hp=Js("number"),Ys=t=>t!==null&&typeof t=="object",pk=t=>t===!0||t===!1,Za=t=>{if(Ws(t)!=="object")return!1;const e=Dl(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},mk=on("Date"),gk=on("File"),vk=on("Blob"),yk=on("FileList"),bk=t=>Ys(t)&&Vt(t.pipe),kk=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Vt(t.append)&&((e=Ws(t))==="formdata"||e==="object"&&Vt(t.toString)&&t.toString()==="[object FormData]"))},_k=on("URLSearchParams"),[wk,Sk,Ek,Nk]=["ReadableStream","Request","Response","Headers"].map(on),Ak=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ua(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t=="undefined")return;let i,r;if(typeof t!="object"&&(t=[t]),or(t))for(i=0,r=t.length;i<r;i++)e.call(null,t[i],i,t);else{const a=n?Object.getOwnPropertyNames(t):Object.keys(t),o=a.length;let l;for(i=0;i<o;i++)l=a[i],e.call(null,t[l],l,t)}}function pp(t,e){e=e.toLowerCase();const n=Object.keys(t);let i=n.length,r;for(;i-- >0;)if(r=n[i],e===r.toLowerCase())return r;return null}const di=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,mp=t=>!Qr(t)&&t!==di;function al(){const{caseless:t}=mp(this)&&this||{},e={},n=(i,r)=>{const a=t&&pp(e,r)||r;Za(e[a])&&Za(i)?e[a]=al(e[a],i):Za(i)?e[a]=al({},i):or(i)?e[a]=i.slice():e[a]=i};for(let i=0,r=arguments.length;i<r;i++)arguments[i]&&ua(arguments[i],n);return e}const Ok=(t,e,n,{allOwnKeys:i}={})=>(ua(e,(r,a)=>{n&&Vt(r)?t[a]=dp(r,n):t[a]=r},{allOwnKeys:i}),t),xk=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Tk=(t,e,n,i)=>{t.prototype=Object.create(e.prototype,i),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},Ck=(t,e,n,i)=>{let r,a,o;const l={};if(e=e||{},t==null)return e;do{for(r=Object.getOwnPropertyNames(t),a=r.length;a-- >0;)o=r[a],(!i||i(o,t,e))&&!l[o]&&(e[o]=t[o],l[o]=!0);t=n!==!1&&Dl(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Rk=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const i=t.indexOf(e,n);return i!==-1&&i===n},Fk=t=>{if(!t)return null;if(or(t))return t;let e=t.length;if(!hp(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Ik=(t=>e=>t&&e instanceof t)(typeof Uint8Array!="undefined"&&Dl(Uint8Array)),Dk=(t,e)=>{const i=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=i.next())&&!r.done;){const a=r.value;e.call(t,a[0],a[1])}},Pk=(t,e)=>{let n;const i=[];for(;(n=t.exec(e))!==null;)i.push(n);return i},Lk=on("HTMLFormElement"),$k=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,r){return i.toUpperCase()+r}),yd=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Mk=on("RegExp"),gp=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),i={};ua(n,(r,a)=>{let o;(o=e(r,a,t))!==!1&&(i[a]=o||r)}),Object.defineProperties(t,i)},Bk=t=>{gp(t,(e,n)=>{if(Vt(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const i=t[n];if(Vt(i)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Uk=(t,e)=>{const n={},i=r=>{r.forEach(a=>{n[a]=!0})};return or(t)?i(t):i(String(t).split(e)),n},jk=()=>{},Vk=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,ku="abcdefghijklmnopqrstuvwxyz",bd="0123456789",vp={DIGIT:bd,ALPHA:ku,ALPHA_DIGIT:ku+ku.toUpperCase()+bd},Hk=(t=16,e=vp.ALPHA_DIGIT)=>{let n="";const{length:i}=e;for(;t--;)n+=e[Math.random()*i|0];return n};function qk(t){return!!(t&&Vt(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Kk=t=>{const e=new Array(10),n=(i,r)=>{if(Ys(i)){if(e.indexOf(i)>=0)return;if(!("toJSON"in i)){e[r]=i;const a=or(i)?[]:{};return ua(i,(o,l)=>{const d=n(o,r+1);!Qr(d)&&(a[l]=d)}),e[r]=void 0,a}}return i};return n(t,0)},zk=on("AsyncFunction"),Gk=t=>t&&(Ys(t)||Vt(t))&&Vt(t.then)&&Vt(t.catch),yp=((t,e)=>t?setImmediate:e?((n,i)=>(di.addEventListener("message",({source:r,data:a})=>{r===di&&a===n&&i.length&&i.shift()()},!1),r=>{i.push(r),di.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Vt(di.postMessage)),Wk=typeof queueMicrotask!="undefined"?queueMicrotask.bind(di):typeof process!="undefined"&&process.nextTick||yp,q={isArray:or,isArrayBuffer:fp,isBuffer:dk,isFormData:kk,isArrayBufferView:fk,isString:hk,isNumber:hp,isBoolean:pk,isObject:Ys,isPlainObject:Za,isReadableStream:wk,isRequest:Sk,isResponse:Ek,isHeaders:Nk,isUndefined:Qr,isDate:mk,isFile:gk,isBlob:vk,isRegExp:Mk,isFunction:Vt,isStream:bk,isURLSearchParams:_k,isTypedArray:Ik,isFileList:yk,forEach:ua,merge:al,extend:Ok,trim:Ak,stripBOM:xk,inherits:Tk,toFlatObject:Ck,kindOf:Ws,kindOfTest:on,endsWith:Rk,toArray:Fk,forEachEntry:Dk,matchAll:Pk,isHTMLForm:Lk,hasOwnProperty:yd,hasOwnProp:yd,reduceDescriptors:gp,freezeMethods:Bk,toObjectSet:Uk,toCamelCase:$k,noop:jk,toFiniteNumber:Vk,findKey:pp,global:di,isContextDefined:mp,ALPHABET:vp,generateString:Hk,isSpecCompliantForm:qk,toJSONObject:Kk,isAsyncFn:zk,isThenable:Gk,setImmediate:yp,asap:Wk};function Le(t,e,n,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r,this.status=r.status?r.status:null)}q.inherits(Le,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:q.toJSONObject(this.config),code:this.code,status:this.status}}});const bp=Le.prototype,kp={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{kp[t]={value:t}});Object.defineProperties(Le,kp);Object.defineProperty(bp,"isAxiosError",{value:!0});Le.from=(t,e,n,i,r,a)=>{const o=Object.create(bp);return q.toFlatObject(t,o,function(d){return d!==Error.prototype},l=>l!=="isAxiosError"),Le.call(o,t.message,e,n,i,r),o.cause=t,o.name=t.name,a&&Object.assign(o,a),o};const Jk=null;function sl(t){return q.isPlainObject(t)||q.isArray(t)}function _p(t){return q.endsWith(t,"[]")?t.slice(0,-2):t}function kd(t,e,n){return t?t.concat(e).map(function(r,a){return r=_p(r),!n&&a?"["+r+"]":r}).join(n?".":""):e}function Yk(t){return q.isArray(t)&&!t.some(sl)}const Xk=q.toFlatObject(q,{},null,function(e){return/^is[A-Z]/.test(e)});function Xs(t,e,n){if(!q.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=q.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,E){return!q.isUndefined(E[S])});const i=n.metaTokens,r=n.visitor||m,a=n.dots,o=n.indexes,d=(n.Blob||typeof Blob!="undefined"&&Blob)&&q.isSpecCompliantForm(e);if(!q.isFunction(r))throw new TypeError("visitor must be a function");function h(_){if(_===null)return"";if(q.isDate(_))return _.toISOString();if(!d&&q.isBlob(_))throw new Le("Blob is not supported. Use a Buffer instead.");return q.isArrayBuffer(_)||q.isTypedArray(_)?d&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}function m(_,S,E){let R=_;if(_&&!E&&typeof _=="object"){if(q.endsWith(S,"{}"))S=i?S:S.slice(0,-2),_=JSON.stringify(_);else if(q.isArray(_)&&Yk(_)||(q.isFileList(_)||q.endsWith(S,"[]"))&&(R=q.toArray(_)))return S=_p(S),R.forEach(function(J,K){!(q.isUndefined(J)||J===null)&&e.append(o===!0?kd([S],K,a):o===null?S:S+"[]",h(J))}),!1}return sl(_)?!0:(e.append(kd(E,S,a),h(_)),!1)}const y=[],g=Object.assign(Xk,{defaultVisitor:m,convertValue:h,isVisitable:sl});function O(_,S){if(!q.isUndefined(_)){if(y.indexOf(_)!==-1)throw Error("Circular reference detected in "+S.join("."));y.push(_),q.forEach(_,function(R,j){(!(q.isUndefined(R)||R===null)&&r.call(e,R,q.isString(j)?j.trim():j,S,g))===!0&&O(R,S?S.concat(j):[j])}),y.pop()}}if(!q.isObject(t))throw new TypeError("data must be an object");return O(t),e}function _d(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(i){return e[i]})}function Pl(t,e){this._pairs=[],t&&Xs(t,this,e)}const wp=Pl.prototype;wp.append=function(e,n){this._pairs.push([e,n])};wp.toString=function(e){const n=e?function(i){return e.call(this,i,_d)}:_d;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function Qk(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Sp(t,e,n){if(!e)return t;const i=n&&n.encode||Qk,r=n&&n.serialize;let a;if(r?a=r(e,n):a=q.isURLSearchParams(e)?e.toString():new Pl(e,n).toString(i),a){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+a}return t}class wd{constructor(){this.handlers=[]}use(e,n,i){return this.handlers.push({fulfilled:e,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){q.forEach(this.handlers,function(i){i!==null&&e(i)})}}const Ep={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Zk=typeof URLSearchParams!="undefined"?URLSearchParams:Pl,e_=typeof FormData!="undefined"?FormData:null,t_=typeof Blob!="undefined"?Blob:null,n_={isBrowser:!0,classes:{URLSearchParams:Zk,FormData:e_,Blob:t_},protocols:["http","https","file","blob","url","data"]},Ll=typeof window!="undefined"&&typeof document!="undefined",ol=typeof navigator=="object"&&navigator||void 0,i_=Ll&&(!ol||["ReactNative","NativeScript","NS"].indexOf(ol.product)<0),r_=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",a_=Ll&&window.location.href||"http://localhost",s_=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ll,hasStandardBrowserEnv:i_,hasStandardBrowserWebWorkerEnv:r_,navigator:ol,origin:a_},Symbol.toStringTag,{value:"Module"})),Pt={...s_,...n_};function o_(t,e){return Xs(t,new Pt.classes.URLSearchParams,Object.assign({visitor:function(n,i,r,a){return Pt.isNode&&q.isBuffer(n)?(this.append(i,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},e))}function u_(t){return q.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function l_(t){const e={},n=Object.keys(t);let i;const r=n.length;let a;for(i=0;i<r;i++)a=n[i],e[a]=t[a];return e}function Np(t){function e(n,i,r,a){let o=n[a++];if(o==="__proto__")return!0;const l=Number.isFinite(+o),d=a>=n.length;return o=!o&&q.isArray(r)?r.length:o,d?(q.hasOwnProp(r,o)?r[o]=[r[o],i]:r[o]=i,!l):((!r[o]||!q.isObject(r[o]))&&(r[o]=[]),e(n,i,r[o],a)&&q.isArray(r[o])&&(r[o]=l_(r[o])),!l)}if(q.isFormData(t)&&q.isFunction(t.entries)){const n={};return q.forEachEntry(t,(i,r)=>{e(u_(i),r,n,0)}),n}return null}function c_(t,e,n){if(q.isString(t))try{return(e||JSON.parse)(t),q.trim(t)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(t)}const la={transitional:Ep,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const i=n.getContentType()||"",r=i.indexOf("application/json")>-1,a=q.isObject(e);if(a&&q.isHTMLForm(e)&&(e=new FormData(e)),q.isFormData(e))return r?JSON.stringify(Np(e)):e;if(q.isArrayBuffer(e)||q.isBuffer(e)||q.isStream(e)||q.isFile(e)||q.isBlob(e)||q.isReadableStream(e))return e;if(q.isArrayBufferView(e))return e.buffer;if(q.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let l;if(a){if(i.indexOf("application/x-www-form-urlencoded")>-1)return o_(e,this.formSerializer).toString();if((l=q.isFileList(e))||i.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return Xs(l?{"files[]":e}:e,d&&new d,this.formSerializer)}}return a||r?(n.setContentType("application/json",!1),c_(e)):e}],transformResponse:[function(e){const n=this.transitional||la.transitional,i=n&&n.forcedJSONParsing,r=this.responseType==="json";if(q.isResponse(e)||q.isReadableStream(e))return e;if(e&&q.isString(e)&&(i&&!this.responseType||r)){const o=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(l){if(o)throw l.name==="SyntaxError"?Le.from(l,Le.ERR_BAD_RESPONSE,this,null,this.response):l}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Pt.classes.FormData,Blob:Pt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};q.forEach(["delete","get","head","post","put","patch"],t=>{la.headers[t]={}});const d_=q.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),f_=t=>{const e={};let n,i,r;return t&&t.split(`
|
|
32
|
-
`).forEach(function(o){r=o.indexOf(":"),n=o.substring(0,r).trim().toLowerCase(),i=o.substring(r+1).trim(),!(!n||e[n]&&
|
|
33
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const i=new this(e);return n.forEach(r=>i.set(r)),i}static accessor(e){const i=(this[Sd]=this[Sd]={accessors:{}}).accessors,r=this.prototype;function a(o){const l=Cr(o);i[l]||(g_(r,o),i[l]=!0)}return q.isArray(e)?e.forEach(a):a(e),this}};Lt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);q.reduceDescriptors(Lt.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(i){this[n]=i}}});q.freezeMethods(Lt);function wu(t,e){const n=this||la,i=e||n,r=Lt.from(i.headers);let a=i.data;return q.forEach(t,function(l){a=l.call(n,a,r.normalize(),e?e.status:void 0)}),r.normalize(),a}function Ap(t){return!!(t&&t.__CANCEL__)}function ur(t,e,n){Le.call(this,t==null?"canceled":t,Le.ERR_CANCELED,e,n),this.name="CanceledError"}q.inherits(ur,Le,{__CANCEL__:!0});function Op(t,e,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?t(n):e(new Le("Request failed with status code "+n.status,[Le.ERR_BAD_REQUEST,Le.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function v_(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function y_(t,e){t=t||10;const n=new Array(t),i=new Array(t);let r=0,a=0,o;return e=e!==void 0?e:1e3,function(d){const h=Date.now(),m=i[a];o||(o=h),n[r]=d,i[r]=h;let y=a,g=0;for(;y!==r;)g+=n[y++],y=y%t;if(r=(r+1)%t,r===a&&(a=(a+1)%t),h-o<e)return;const O=m&&h-m;return O?Math.round(g*1e3/O):void 0}}function b_(t,e){let n=0,i=1e3/e,r,a;const o=(h,m=Date.now())=>{n=m,r=null,a&&(clearTimeout(a),a=null),t.apply(null,h)};return[(...h)=>{const m=Date.now(),y=m-n;y>=i?o(h,m):(r=h,a||(a=setTimeout(()=>{a=null,o(r)},i-y)))},()=>r&&o(r)]}const bs=(t,e,n=3)=>{let i=0;const r=y_(50,250);return b_(a=>{const o=a.loaded,l=a.lengthComputable?a.total:void 0,d=o-i,h=r(d),m=o<=l;i=o;const y={loaded:o,total:l,progress:l?o/l:void 0,bytes:d,rate:h||void 0,estimated:h&&l&&m?(l-o)/h:void 0,event:a,lengthComputable:l!=null,[e?"download":"upload"]:!0};t(y)},n)},Ed=(t,e)=>{const n=t!=null;return[i=>e[0]({lengthComputable:n,total:t,loaded:i}),e[1]]},Nd=t=>(...e)=>q.asap(()=>t(...e)),k_=Pt.hasStandardBrowserEnv?function(){const e=Pt.navigator&&/(msie|trident)/i.test(Pt.navigator.userAgent),n=document.createElement("a");let i;function r(a){let o=a;return e&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return i=r(window.location.href),function(o){const l=q.isString(o)?r(o):o;return l.protocol===i.protocol&&l.host===i.host}}():function(){return function(){return!0}}(),__=Pt.hasStandardBrowserEnv?{write(t,e,n,i,r,a){const o=[t+"="+encodeURIComponent(e)];q.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),q.isString(i)&&o.push("path="+i),q.isString(r)&&o.push("domain="+r),a===!0&&o.push("secure"),document.cookie=o.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function w_(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function S_(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function xp(t,e){return t&&!w_(e)?S_(t,e):e}const Ad=t=>t instanceof Lt?{...t}:t;function yi(t,e){e=e||{};const n={};function i(h,m,y){return q.isPlainObject(h)&&q.isPlainObject(m)?q.merge.call({caseless:y},h,m):q.isPlainObject(m)?q.merge({},m):q.isArray(m)?m.slice():m}function r(h,m,y){if(q.isUndefined(m)){if(!q.isUndefined(h))return i(void 0,h,y)}else return i(h,m,y)}function a(h,m){if(!q.isUndefined(m))return i(void 0,m)}function o(h,m){if(q.isUndefined(m)){if(!q.isUndefined(h))return i(void 0,h)}else return i(void 0,m)}function l(h,m,y){if(y in e)return i(h,m);if(y in t)return i(void 0,h)}const d={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:l,headers:(h,m)=>r(Ad(h),Ad(m),!0)};return q.forEach(Object.keys(Object.assign({},t,e)),function(m){const y=d[m]||r,g=y(t[m],e[m],m);q.isUndefined(g)&&y!==l||(n[m]=g)}),n}const Tp=t=>{const e=yi({},t);let{data:n,withXSRFToken:i,xsrfHeaderName:r,xsrfCookieName:a,headers:o,auth:l}=e;e.headers=o=Lt.from(o),e.url=Sp(xp(e.baseURL,e.url),t.params,t.paramsSerializer),l&&o.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let d;if(q.isFormData(n)){if(Pt.hasStandardBrowserEnv||Pt.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((d=o.getContentType())!==!1){const[h,...m]=d?d.split(";").map(y=>y.trim()).filter(Boolean):[];o.setContentType([h||"multipart/form-data",...m].join("; "))}}if(Pt.hasStandardBrowserEnv&&(i&&q.isFunction(i)&&(i=i(e)),i||i!==!1&&k_(e.url))){const h=r&&a&&__.read(a);h&&o.set(r,h)}return e},E_=typeof XMLHttpRequest!="undefined",N_=E_&&function(t){return new Promise(function(n,i){const r=Tp(t);let a=r.data;const o=Lt.from(r.headers).normalize();let{responseType:l,onUploadProgress:d,onDownloadProgress:h}=r,m,y,g,O,_;function S(){O&&O(),_&&_(),r.cancelToken&&r.cancelToken.unsubscribe(m),r.signal&&r.signal.removeEventListener("abort",m)}let E=new XMLHttpRequest;E.open(r.method.toUpperCase(),r.url,!0),E.timeout=r.timeout;function R(){if(!E)return;const J=Lt.from("getAllResponseHeaders"in E&&E.getAllResponseHeaders()),X={data:!l||l==="text"||l==="json"?E.responseText:E.response,status:E.status,statusText:E.statusText,headers:J,config:t,request:E};Op(function(oe){n(oe),S()},function(oe){i(oe),S()},X),E=null}"onloadend"in E?E.onloadend=R:E.onreadystatechange=function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.indexOf("file:")===0)||setTimeout(R)},E.onabort=function(){E&&(i(new Le("Request aborted",Le.ECONNABORTED,t,E)),E=null)},E.onerror=function(){i(new Le("Network Error",Le.ERR_NETWORK,t,E)),E=null},E.ontimeout=function(){let K=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const X=r.transitional||Ep;r.timeoutErrorMessage&&(K=r.timeoutErrorMessage),i(new Le(K,X.clarifyTimeoutError?Le.ETIMEDOUT:Le.ECONNABORTED,t,E)),E=null},a===void 0&&o.setContentType(null),"setRequestHeader"in E&&q.forEach(o.toJSON(),function(K,X){E.setRequestHeader(X,K)}),q.isUndefined(r.withCredentials)||(E.withCredentials=!!r.withCredentials),l&&l!=="json"&&(E.responseType=r.responseType),h&&([g,_]=bs(h,!0),E.addEventListener("progress",g)),d&&E.upload&&([y,O]=bs(d),E.upload.addEventListener("progress",y),E.upload.addEventListener("loadend",O)),(r.cancelToken||r.signal)&&(m=J=>{E&&(i(!J||J.type?new ur(null,t,E):J),E.abort(),E=null)},r.cancelToken&&r.cancelToken.subscribe(m),r.signal&&(r.signal.aborted?m():r.signal.addEventListener("abort",m)));const j=v_(r.url);if(j&&Pt.protocols.indexOf(j)===-1){i(new Le("Unsupported protocol "+j+":",Le.ERR_BAD_REQUEST,t));return}E.send(a||null)})},A_=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let i=new AbortController,r;const a=function(h){if(!r){r=!0,l();const m=h instanceof Error?h:this.reason;i.abort(m instanceof Le?m:new ur(m instanceof Error?m.message:m))}};let o=e&&setTimeout(()=>{o=null,a(new Le(`timeout ${e} of ms exceeded`,Le.ETIMEDOUT))},e);const l=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(h=>{h.unsubscribe?h.unsubscribe(a):h.removeEventListener("abort",a)}),t=null)};t.forEach(h=>h.addEventListener("abort",a));const{signal:d}=i;return d.unsubscribe=()=>q.asap(l),d}},O_=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let i=0,r;for(;i<n;)r=i+e,yield t.slice(i,r),i=r},x_=async function*(t,e){for await(const n of T_(t))yield*O_(n,e)},T_=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:i}=await e.read();if(n)break;yield i}}finally{await e.cancel()}},Od=(t,e,n,i)=>{const r=x_(t,e);let a=0,o,l=d=>{o||(o=!0,i&&i(d))};return new ReadableStream({async pull(d){try{const{done:h,value:m}=await r.next();if(h){l(),d.close();return}let y=m.byteLength;if(n){let g=a+=y;n(g)}d.enqueue(new Uint8Array(m))}catch(h){throw l(h),h}},cancel(d){return l(d),r.return()}},{highWaterMark:2})},Qs=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Cp=Qs&&typeof ReadableStream=="function",C_=Qs&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Rp=(t,...e)=>{try{return!!t(...e)}catch{return!1}},R_=Cp&&Rp(()=>{let t=!1;const e=new Request(Pt.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),xd=64*1024,ul=Cp&&Rp(()=>q.isReadableStream(new Response("").body)),ks={stream:ul&&(t=>t.body)};Qs&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!ks[e]&&(ks[e]=q.isFunction(t[e])?n=>n[e]():(n,i)=>{throw new Le(`Response type '${e}' is not supported`,Le.ERR_NOT_SUPPORT,i)})})})(new Response);const F_=async t=>{if(t==null)return 0;if(q.isBlob(t))return t.size;if(q.isSpecCompliantForm(t))return(await new Request(Pt.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(q.isArrayBufferView(t)||q.isArrayBuffer(t))return t.byteLength;if(q.isURLSearchParams(t)&&(t=t+""),q.isString(t))return(await C_(t)).byteLength},I_=async(t,e)=>{const n=q.toFiniteNumber(t.getContentLength());return n==null?F_(e):n},D_=Qs&&(async t=>{let{url:e,method:n,data:i,signal:r,cancelToken:a,timeout:o,onDownloadProgress:l,onUploadProgress:d,responseType:h,headers:m,withCredentials:y="same-origin",fetchOptions:g}=Tp(t);h=h?(h+"").toLowerCase():"text";let O=A_([r,a&&a.toAbortSignal()],o),_;const S=O&&O.unsubscribe&&(()=>{O.unsubscribe()});let E;try{if(d&&R_&&n!=="get"&&n!=="head"&&(E=await I_(m,i))!==0){let X=new Request(e,{method:"POST",body:i,duplex:"half"}),ne;if(q.isFormData(i)&&(ne=X.headers.get("content-type"))&&m.setContentType(ne),X.body){const[oe,Se]=Ed(E,bs(Nd(d)));i=Od(X.body,xd,oe,Se)}}q.isString(y)||(y=y?"include":"omit");const R="credentials"in Request.prototype;_=new Request(e,{...g,signal:O,method:n.toUpperCase(),headers:m.normalize().toJSON(),body:i,duplex:"half",credentials:R?y:void 0});let j=await fetch(_);const J=ul&&(h==="stream"||h==="response");if(ul&&(l||J&&S)){const X={};["status","statusText","headers"].forEach(ve=>{X[ve]=j[ve]});const ne=q.toFiniteNumber(j.headers.get("content-length")),[oe,Se]=l&&Ed(ne,bs(Nd(l),!0))||[];j=new Response(Od(j.body,xd,oe,()=>{Se&&Se(),S&&S()}),X)}h=h||"text";let K=await ks[q.findKey(ks,h)||"text"](j,t);return!J&&S&&S(),await new Promise((X,ne)=>{Op(X,ne,{data:K,headers:Lt.from(j.headers),status:j.status,statusText:j.statusText,config:t,request:_})})}catch(R){throw S&&S(),R&&R.name==="TypeError"&&/fetch/i.test(R.message)?Object.assign(new Le("Network Error",Le.ERR_NETWORK,t,_),{cause:R.cause||R}):Le.from(R,R&&R.code,t,_)}}),ll={http:Jk,xhr:N_,fetch:D_};q.forEach(ll,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Td=t=>`- ${t}`,P_=t=>q.isFunction(t)||t===null||t===!1,Fp={getAdapter:t=>{t=q.isArray(t)?t:[t];const{length:e}=t;let n,i;const r={};for(let a=0;a<e;a++){n=t[a];let o;if(i=n,!P_(n)&&(i=ll[(o=String(n)).toLowerCase()],i===void 0))throw new Le(`Unknown adapter '${o}'`);if(i)break;r[o||"#"+a]=i}if(!i){const a=Object.entries(r).map(([l,d])=>`adapter ${l} `+(d===!1?"is not supported by the environment":"is not available in the build"));let o=e?a.length>1?`since :
|
|
34
|
-
`+
|
|
35
|
-
`):" "+
|
|
36
|
-
`+a):i.stack=a}catch{}}throw i}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=yi(this.defaults,n);const{transitional:i,paramsSerializer:r,headers:a}=n;i!==void 0&&cl.assertOptions(i,{silentJSONParsing:Bn.transitional(Bn.boolean),forcedJSONParsing:Bn.transitional(Bn.boolean),clarifyTimeoutError:Bn.transitional(Bn.boolean)},!1),r!=null&&(q.isFunction(r)?n.paramsSerializer={serialize:r}:cl.assertOptions(r,{encode:Bn.function,serialize:Bn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=a&&q.merge(a.common,a[n.method]);a&&q.forEach(["delete","get","head","post","put","patch","common"],_=>{delete a[_]}),n.headers=Lt.concat(o,a);const l=[];let d=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(n)===!1||(d=d&&S.synchronous,l.unshift(S.fulfilled,S.rejected))});const h=[];this.interceptors.response.forEach(function(S){h.push(S.fulfilled,S.rejected)});let m,y=0,g;if(!d){const _=[Cd.bind(this),void 0];for(_.unshift.apply(_,l),_.push.apply(_,h),g=_.length,m=Promise.resolve(n);y<g;)m=m.then(_[y++],_[y++]);return m}g=l.length;let O=n;for(y=0;y<g;){const _=l[y++],S=l[y++];try{O=_(O)}catch(E){S.call(this,E);break}}try{m=Cd.call(this,O)}catch(_){return Promise.reject(_)}for(y=0,g=h.length;y<g;)m=m.then(h[y++],h[y++]);return m}getUri(e){e=yi(this.defaults,e);const n=xp(e.baseURL,e.url);return Sp(n,e.params,e.paramsSerializer)}};q.forEach(["delete","get","head","options"],function(e){pi.prototype[e]=function(n,i){return this.request(yi(i||{},{method:e,url:n,data:(i||{}).data}))}});q.forEach(["post","put","patch"],function(e){function n(i){return function(a,o,l){return this.request(yi(l||{},{method:e,headers:i?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}pi.prototype[e]=n(),pi.prototype[e+"Form"]=n(!0)});let $_=class Dp{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const i=this;this.promise.then(r=>{if(!i._listeners)return;let a=i._listeners.length;for(;a-- >0;)i._listeners[a](r);i._listeners=null}),this.promise.then=r=>{let a;const o=new Promise(l=>{i.subscribe(l),a=l}).then(r);return o.cancel=function(){i.unsubscribe(a)},o},e(function(a,o,l){i.reason||(i.reason=new ur(a,o,l),n(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=i=>{e.abort(i)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Dp(function(r){e=r}),cancel:e}}};function M_(t){return function(n){return t.apply(null,n)}}function B_(t){return q.isObject(t)&&t.isAxiosError===!0}const dl={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(dl).forEach(([t,e])=>{dl[e]=t});function Pp(t){const e=new pi(t),n=dp(pi.prototype.request,e);return q.extend(n,pi.prototype,e,{allOwnKeys:!0}),q.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return Pp(yi(t,r))},n}const st=Pp(la);st.Axios=pi;st.CanceledError=ur;st.CancelToken=$_;st.isCancel=Ap;st.VERSION=Ip;st.toFormData=Xs;st.AxiosError=Le;st.Cancel=st.CanceledError;st.all=function(e){return Promise.all(e)};st.spread=M_;st.isAxiosError=B_;st.mergeConfig=yi;st.AxiosHeaders=Lt;st.formToJSON=t=>Np(q.isHTMLForm(t)?new FormData(t):t);st.getAdapter=Fp.getAdapter;st.HttpStatusCode=dl;st.default=st;const{Axios:$E,AxiosError:ME,CanceledError:BE,isCancel:UE,CancelToken:jE,VERSION:VE,all:HE,Cancel:qE,isAxiosError:KE,spread:zE,toFormData:GE,AxiosHeaders:WE,HttpStatusCode:JE,formToJSON:YE,getAdapter:XE,mergeConfig:QE}=st,U_={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}};class _s{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,n)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=e||U_,this.options=n,this.debug=n.debug}log(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"log","",!0)}warn(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"warn","",!0)}error(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"error","")}deprecate(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,i,r){return r&&!this.debug?null:(typeof e[0]=="string"&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new _s(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new _s(this.logger,e)}}var hn=new _s;class Zs{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const r=this.observers[i].get(n)||0;this.observers[i].set(n,r+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(o=>{let[l,d]=o;for(let h=0;h<d;h++)l(...i)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(o=>{let[l,d]=o;for(let h=0;h<d;h++)l.apply(l,[e,...i])})}}const Rr=()=>{let t,e;const n=new Promise((i,r)=>{t=i,e=r});return n.resolve=t,n.reject=e,n},Fd=t=>t==null?"":""+t,j_=(t,e,n)=>{t.forEach(i=>{e[i]&&(n[i]=e[i])})},V_=/###/g,Id=t=>t&&t.indexOf("###")>-1?t.replace(V_,"."):t,Dd=t=>!t||typeof t=="string",jr=(t,e,n)=>{const i=typeof e!="string"?e:e.split(".");let r=0;for(;r<i.length-1;){if(Dd(t))return{};const a=Id(i[r]);!t[a]&&n&&(t[a]=new n),Object.prototype.hasOwnProperty.call(t,a)?t=t[a]:t={},++r}return Dd(t)?{}:{obj:t,k:Id(i[r])}},Pd=(t,e,n)=>{const{obj:i,k:r}=jr(t,e,Object);if(i!==void 0||e.length===1){i[r]=n;return}let a=e[e.length-1],o=e.slice(0,e.length-1),l=jr(t,o,Object);for(;l.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),l=jr(t,o,Object),l&&l.obj&&typeof l.obj[`${l.k}.${a}`]!="undefined"&&(l.obj=void 0);l.obj[`${l.k}.${a}`]=n},H_=(t,e,n,i)=>{const{obj:r,k:a}=jr(t,e,Object);r[a]=r[a]||[],r[a].push(n)},ws=(t,e)=>{const{obj:n,k:i}=jr(t,e);if(n)return n[i]},q_=(t,e,n)=>{const i=ws(t,n);return i!==void 0?i:ws(e,n)},Lp=(t,e,n)=>{for(const i in e)i!=="__proto__"&&i!=="constructor"&&(i in t?typeof t[i]=="string"||t[i]instanceof String||typeof e[i]=="string"||e[i]instanceof String?n&&(t[i]=e[i]):Lp(t[i],e[i],n):t[i]=e[i]);return t},$i=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var K_={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const z_=t=>typeof t=="string"?t.replace(/[&<>"'\/]/g,e=>K_[e]):t;class G_{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}const W_=[" ",",","?","!",";"],J_=new G_(20),Y_=(t,e,n)=>{e=e||"",n=n||"";const i=W_.filter(o=>e.indexOf(o)<0&&n.indexOf(o)<0);if(i.length===0)return!0;const r=J_.getRegExp(`(${i.map(o=>o==="?"?"\\?":o).join("|")})`);let a=!r.test(t);if(!a){const o=t.indexOf(n);o>0&&!r.test(t.substring(0,o))&&(a=!0)}return a},fl=function(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];const i=e.split(n);let r=t;for(let a=0;a<i.length;){if(!r||typeof r!="object")return;let o,l="";for(let d=a;d<i.length;++d)if(d!==a&&(l+=n),l+=i[d],o=r[l],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&d<i.length-1)continue;a+=d-a+1;break}r=o}return r},Ss=t=>t&&t.indexOf("_")>0?t.replace("_","-"):t;class Ld extends Zs{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,o=r.ignoreJSONStructure!==void 0?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;e.indexOf(".")>-1?l=e.split("."):(l=[e,n],i&&(Array.isArray(i)?l.push(...i):typeof i=="string"&&a?l.push(...i.split(a)):l.push(i)));const d=ws(this.data,l);return!d&&!n&&!i&&e.indexOf(".")>-1&&(e=l[0],n=l[1],i=l.slice(2).join(".")),d||!o||typeof i!="string"?d:fl(this.data&&this.data[e]&&this.data[e][n],i,a)}addResource(e,n,i,r){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let l=[e,n];i&&(l=l.concat(o?i.split(o):i)),e.indexOf(".")>-1&&(l=e.split("."),r=n,n=l[1]),this.addNamespaces(n),Pd(this.data,l,r),a.silent||this.emit("added",e,n,i,r)}addResources(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in i)(typeof i[a]=="string"||Array.isArray(i[a]))&&this.addResource(e,n,a,i[a],{silent:!0});r.silent||this.emit("added",e,n,i)}addResourceBundle(e,n,i,r,a){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},l=[e,n];e.indexOf(".")>-1&&(l=e.split("."),r=i,i=n,n=l[1]),this.addNamespaces(n);let d=ws(this.data,l)||{};o.skipCopy||(i=JSON.parse(JSON.stringify(i))),r?Lp(d,i,a):d={...d,...i},Pd(this.data,l,d),o.silent||this.emit("added",e,n,i)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,n)}:this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(r=>n[r]&&Object.keys(n[r]).length>0)}toJSON(){return this.data}}var $p={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,i,r){return t.forEach(a=>{this.processors[a]&&(e=this.processors[a].process(e,n,i,r))}),e}};const $d={};class Es extends Zs{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),j_(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=hn.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const i=this.resolve(e,n);return i&&i.res!==void 0}extractFromKey(e,n){let i=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const r=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let a=n.ns||this.options.defaultNS||[];const o=i&&e.indexOf(i)>-1,l=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!Y_(e,i,r);if(o&&!l){const d=e.match(this.interpolator.nestingRegexp);if(d&&d.length>0)return{key:e,namespaces:a};const h=e.split(i);(i!==r||i===r&&this.options.ns.indexOf(h[0])>-1)&&(a=h.shift()),e=h.join(r)}return typeof a=="string"&&(a=[a]),{key:e,namespaces:a}}translate(e,n,i){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const r=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:o,namespaces:l}=this.extractFromKey(e[e.length-1],n),d=l[l.length-1],h=n.lng||this.language,m=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h&&h.toLowerCase()==="cimode"){if(m){const K=n.nsSeparator||this.options.nsSeparator;return r?{res:`${d}${K}${o}`,usedKey:o,exactUsedKey:o,usedLng:h,usedNS:d,usedParams:this.getUsedParamsDetails(n)}:`${d}${K}${o}`}return r?{res:o,usedKey:o,exactUsedKey:o,usedLng:h,usedNS:d,usedParams:this.getUsedParamsDetails(n)}:o}const y=this.resolve(e,n);let g=y&&y.res;const O=y&&y.usedKey||o,_=y&&y.exactUsedKey||o,S=Object.prototype.toString.apply(g),E=["[object Number]","[object Function]","[object RegExp]"],R=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,j=!this.i18nFormat||this.i18nFormat.handleAsObject;if(j&&g&&(typeof g!="string"&&typeof g!="boolean"&&typeof g!="number")&&E.indexOf(S)<0&&!(typeof R=="string"&&Array.isArray(g))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const K=this.options.returnedObjectHandler?this.options.returnedObjectHandler(O,g,{...n,ns:l}):`key '${o} (${this.language})' returned an object instead of string.`;return r?(y.res=K,y.usedParams=this.getUsedParamsDetails(n),y):K}if(a){const K=Array.isArray(g),X=K?[]:{},ne=K?_:O;for(const oe in g)if(Object.prototype.hasOwnProperty.call(g,oe)){const Se=`${ne}${a}${oe}`;X[oe]=this.translate(Se,{...n,joinArrays:!1,ns:l}),X[oe]===Se&&(X[oe]=g[oe])}g=X}}else if(j&&typeof R=="string"&&Array.isArray(g))g=g.join(R),g&&(g=this.extendTranslation(g,e,n,i));else{let K=!1,X=!1;const ne=n.count!==void 0&&typeof n.count!="string",oe=Es.hasDefaultValue(n),Se=ne?this.pluralResolver.getSuffix(h,n.count,n):"",ve=n.ordinal&&ne?this.pluralResolver.getSuffix(h,n.count,{ordinal:!1}):"",Ke=ne&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),Ne=Ke&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${Se}`]||n[`defaultValue${ve}`]||n.defaultValue;!this.isValidLookup(g)&&oe&&(K=!0,g=Ne),this.isValidLookup(g)||(X=!0,g=o);const Ve=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&X?void 0:g,M=oe&&Ne!==g&&this.options.updateMissing;if(X||K||M){if(this.logger.log(M?"updateKey":"missingKey",h,d,o,M?Ne:g),a){const ce=this.resolve(o,{...n,keySeparator:!1});ce&&ce.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let N=[];const z=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&z&&z[0])for(let ce=0;ce<z.length;ce++)N.push(z[ce]);else this.options.saveMissingTo==="all"?N=this.languageUtils.toResolveHierarchy(n.lng||this.language):N.push(n.lng||this.language);const ie=(ce,se,B)=>{const Fe=oe&&B!==g?B:Ve;this.options.missingKeyHandler?this.options.missingKeyHandler(ce,d,se,Fe,M,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(ce,d,se,Fe,M,n),this.emit("missingKey",ce,d,se,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&ne?N.forEach(ce=>{const se=this.pluralResolver.getSuffixes(ce,n);Ke&&n[`defaultValue${this.options.pluralSeparator}zero`]&&se.indexOf(`${this.options.pluralSeparator}zero`)<0&&se.push(`${this.options.pluralSeparator}zero`),se.forEach(B=>{ie([ce],o+B,n[`defaultValue${B}`]||Ne)})}):ie(N,o,Ne))}g=this.extendTranslation(g,e,n,y,i),X&&g===o&&this.options.appendNamespaceToMissingKey&&(g=`${d}:${o}`),(X||K)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${d}:${o}`:o,K?g:void 0):g=this.options.parseMissingKeyHandler(g))}return r?(y.res=g,y.usedParams=this.getUsedParamsDetails(n),y):g}extendTranslation(e,n,i,r,a){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const h=typeof e=="string"&&(i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let m;if(h){const g=e.match(this.interpolator.nestingRegexp);m=g&&g.length}let y=i.replace&&typeof i.replace!="string"?i.replace:i;if(this.options.interpolation.defaultVariables&&(y={...this.options.interpolation.defaultVariables,...y}),e=this.interpolator.interpolate(e,y,i.lng||this.language||r.usedLng,i),h){const g=e.match(this.interpolator.nestingRegexp),O=g&&g.length;m<O&&(i.nest=!1)}!i.lng&&this.options.compatibilityAPI!=="v1"&&r&&r.res&&(i.lng=this.language||r.usedLng),i.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var g=arguments.length,O=new Array(g),_=0;_<g;_++)O[_]=arguments[_];return a&&a[0]===O[0]&&!i.context?(o.logger.warn(`It seems you are nesting recursively key: ${O[0]} in key: ${n[0]}`),null):o.translate(...O,n)},i)),i.interpolation&&this.interpolator.reset()}const l=i.postProcess||this.options.postProcess,d=typeof l=="string"?[l]:l;return e!=null&&d&&d.length&&i.applyPostProcessor!==!1&&(e=$p.handle(d,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,r,a,o,l;return typeof e=="string"&&(e=[e]),e.forEach(d=>{if(this.isValidLookup(i))return;const h=this.extractFromKey(d,n),m=h.key;r=m;let y=h.namespaces;this.options.fallbackNS&&(y=y.concat(this.options.fallbackNS));const g=n.count!==void 0&&typeof n.count!="string",O=g&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),_=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",S=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);y.forEach(E=>{this.isValidLookup(i)||(l=E,!$d[`${S[0]}-${E}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(l)&&($d[`${S[0]}-${E}`]=!0,this.logger.warn(`key "${r}" for languages "${S.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),S.forEach(R=>{if(this.isValidLookup(i))return;o=R;const j=[m];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(j,m,R,E,n);else{let K;g&&(K=this.pluralResolver.getSuffix(R,n.count,n));const X=`${this.options.pluralSeparator}zero`,ne=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(g&&(j.push(m+K),n.ordinal&&K.indexOf(ne)===0&&j.push(m+K.replace(ne,this.options.pluralSeparator)),O&&j.push(m+X)),_){const oe=`${m}${this.options.contextSeparator}${n.context}`;j.push(oe),g&&(j.push(oe+K),n.ordinal&&K.indexOf(ne)===0&&j.push(oe+K.replace(ne,this.options.pluralSeparator)),O&&j.push(oe+X))}}let J;for(;J=j.pop();)this.isValidLookup(i)||(a=J,i=this.getResource(R,E,J,n))}))})}),{res:i,usedKey:r,exactUsedKey:a,usedLng:o,usedNS:l}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,n,i,r):this.resourceStore.getResource(e,n,i,r)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=e.replace&&typeof e.replace!="string";let r=i?e.replace:e;if(i&&typeof e.count!="undefined"&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!i){r={...r};for(const a of n)delete r[a]}return r}static hasDefaultValue(e){const n="defaultValue";for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&n===i.substring(0,n.length)&&e[i]!==void 0)return!0;return!1}}const Eu=t=>t.charAt(0).toUpperCase()+t.slice(1);class Md{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=hn.create("languageUtils")}getScriptPartFromCode(e){if(e=Ss(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=Ss(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let i=e.split("-");return this.options.lowerCaseLng?i=i.map(r=>r.toLowerCase()):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=Eu(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=Eu(i[1].toLowerCase())),n.indexOf(i[2].toLowerCase())>-1&&(i[2]=Eu(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(i=>{if(n)return;const r=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(r))&&(n=r)}),!n&&this.options.supportedLngs&&e.forEach(i=>{if(n)return;const r=this.getLanguagePartFromCode(i);if(this.isSupportedCode(r))return n=r;n=this.options.supportedLngs.find(a=>{if(a===r)return a;if(!(a.indexOf("-")<0&&r.indexOf("-")<0)&&(a.indexOf("-")>0&&r.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===r||a.indexOf(r)===0&&r.length>1))return a})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),typeof e=="string"&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let i=e[n];return i||(i=e[this.getScriptPartFromCode(n)]),i||(i=e[this.formatLanguageCode(n)]),i||(i=e[this.getLanguagePartFromCode(n)]),i||(i=e.default),i||[]}toResolveHierarchy(e,n){const i=this.getFallbackCodes(n||this.options.fallbackLng||[],e),r=[],a=o=>{o&&(this.isSupportedCode(o)?r.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):typeof e=="string"&&a(this.formatLanguageCode(e)),i.forEach(o=>{r.indexOf(o)<0&&a(this.formatLanguageCode(o))}),r}}let X_=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Q_={1:t=>+(t>1),2:t=>+(t!=1),3:t=>0,4:t=>t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,5:t=>t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5,6:t=>t==1?0:t>=2&&t<=4?1:2,7:t=>t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,8:t=>t==1?0:t==2?1:t!=8&&t!=11?2:3,9:t=>+(t>=2),10:t=>t==1?0:t==2?1:t<7?2:t<11?3:4,11:t=>t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3,12:t=>+(t%10!=1||t%100==11),13:t=>+(t!==0),14:t=>t==1?0:t==2?1:t==3?2:3,15:t=>t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2,16:t=>t%10==1&&t%100!=11?0:t!==0?1:2,17:t=>t==1||t%10==1&&t%100!=11?0:1,18:t=>t==0?0:t==1?1:2,19:t=>t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3,20:t=>t==1?0:t==0||t%100>0&&t%100<20?1:2,21:t=>t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0,22:t=>t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3};const Z_=["v1","v2","v3"],ew=["v4"],Bd={zero:0,one:1,two:2,few:3,many:4,other:5},tw=()=>{const t={};return X_.forEach(e=>{e.lngs.forEach(n=>{t[n]={numbers:e.nr,plurals:Q_[e.fc]}})}),t};class nw{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=n,this.logger=hn.create("pluralResolver"),(!this.options.compatibilityJSON||ew.includes(this.options.compatibilityJSON))&&(typeof Intl=="undefined"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=tw(),this.pluralRulesCache={}}addRule(e,n){this.rules[e]=n}clearCache(){this.pluralRulesCache={}}getRule(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const i=Ss(e==="dev"?"en":e),r=n.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:i,type:r});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];const o=new Intl.PluralRules(i,{type:r});return this.pluralRulesCache[a]=o,o}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,n);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}getPluralFormsOfKey(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,i).map(r=>`${n}${r}`)}getSuffixes(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,n);return i?this.shouldUseIntlApi()?i.resolvedOptions().pluralCategories.sort((r,a)=>Bd[r]-Bd[a]).map(r=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r}`):i.numbers.map(r=>this.getSuffix(e,r,n)):[]}getSuffix(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=this.getRule(e,i);return r?this.shouldUseIntlApi()?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${r.select(n)}`:this.getSuffixRetroCompatible(r,n):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,n){const i=e.noAbs?e.plurals(n):e.plurals(Math.abs(n));let r=e.numbers[i];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(r===2?r="plural":r===1&&(r=""));const a=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return this.options.compatibilityJSON==="v1"?r===1?"":typeof r=="number"?`_plural_${r.toString()}`:a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?a():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}shouldUseIntlApi(){return!Z_.includes(this.options.compatibilityJSON)}}const Ud=function(t,e,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=q_(t,e,n);return!a&&r&&typeof n=="string"&&(a=fl(t,n,i),a===void 0&&(a=fl(e,n,i))),a},Nu=t=>t.replace(/\$/g,"$$$$");class iw{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=hn.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(n=>n),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:n,escapeValue:i,useRawValueToEscape:r,prefix:a,prefixEscaped:o,suffix:l,suffixEscaped:d,formatSeparator:h,unescapeSuffix:m,unescapePrefix:y,nestingPrefix:g,nestingPrefixEscaped:O,nestingSuffix:_,nestingSuffixEscaped:S,nestingOptionsSeparator:E,maxReplaces:R,alwaysFormat:j}=e.interpolation;this.escape=n!==void 0?n:z_,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=r!==void 0?r:!1,this.prefix=a?$i(a):o||"{{",this.suffix=l?$i(l):d||"}}",this.formatSeparator=h||",",this.unescapePrefix=m?"":y||"-",this.unescapeSuffix=this.unescapePrefix?"":m||"",this.nestingPrefix=g?$i(g):O||$i("$t("),this.nestingSuffix=_?$i(_):S||$i(")"),this.nestingOptionsSeparator=E||",",this.maxReplaces=R||1e3,this.alwaysFormat=j!==void 0?j:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,i)=>n&&n.source===i?(n.lastIndex=0,n):new RegExp(i,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,n,i,r){let a,o,l;const d=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},h=O=>{if(O.indexOf(this.formatSeparator)<0){const R=Ud(n,d,O,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(R,void 0,i,{...r,...n,interpolationkey:O}):R}const _=O.split(this.formatSeparator),S=_.shift().trim(),E=_.join(this.formatSeparator).trim();return this.format(Ud(n,d,S,this.options.keySeparator,this.options.ignoreJSONStructure),E,i,{...r,...n,interpolationkey:S})};this.resetRegExp();const m=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,y=r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:O=>Nu(O)},{regex:this.regexp,safeValue:O=>this.escapeValue?Nu(this.escape(O)):Nu(O)}].forEach(O=>{for(l=0;a=O.regex.exec(e);){const _=a[1].trim();if(o=h(_),o===void 0)if(typeof m=="function"){const E=m(e,a,r);o=typeof E=="string"?E:""}else if(r&&Object.prototype.hasOwnProperty.call(r,_))o="";else if(y){o=a[0];continue}else this.logger.warn(`missed to pass in variable ${_} for interpolating ${e}`),o="";else typeof o!="string"&&!this.useRawValueToEscape&&(o=Fd(o));const S=O.safeValue(o);if(e=e.replace(a[0],S),y?(O.regex.lastIndex+=o.length,O.regex.lastIndex-=a[0].length):O.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),e}nest(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,a,o;const l=(d,h)=>{const m=this.nestingOptionsSeparator;if(d.indexOf(m)<0)return d;const y=d.split(new RegExp(`${m}[ ]*{`));let g=`{${y[1]}`;d=y[0],g=this.interpolate(g,o);const O=g.match(/'/g),_=g.match(/"/g);(O&&O.length%2===0&&!_||_.length%2!==0)&&(g=g.replace(/'/g,'"'));try{o=JSON.parse(g),h&&(o={...h,...o})}catch(S){return this.logger.warn(`failed parsing options string in nesting for key ${d}`,S),`${d}${m}${g}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,d};for(;r=this.nestingRegexp.exec(e);){let d=[];o={...i},o=o.replace&&typeof o.replace!="string"?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let h=!1;if(r[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(r[1])){const m=r[1].split(this.formatSeparator).map(y=>y.trim());r[1]=m.shift(),d=m,h=!0}if(a=n(l.call(this,r[1].trim(),o),o),a&&r[0]===e&&typeof a!="string")return a;typeof a!="string"&&(a=Fd(a)),a||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),a=""),h&&(a=d.reduce((m,y)=>this.format(m,y,i.lng,{...i,interpolationkey:r[1].trim()}),a.trim())),e=e.replace(r[0],a),this.regexp.lastIndex=0}return e}}const rw=t=>{let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const i=t.split("(");e=i[0].toLowerCase().trim();const r=i[1].substring(0,i[1].length-1);e==="currency"&&r.indexOf(":")<0?n.currency||(n.currency=r.trim()):e==="relativetime"&&r.indexOf(":")<0?n.range||(n.range=r.trim()):r.split(";").forEach(o=>{if(o){const[l,...d]=o.split(":"),h=d.join(":").trim().replace(/^'+|'+$/g,""),m=l.trim();n[m]||(n[m]=h),h==="false"&&(n[m]=!1),h==="true"&&(n[m]=!0),isNaN(h)||(n[m]=parseInt(h,10))}})}return{formatName:e,formatOptions:n}},Mi=t=>{const e={};return(n,i,r)=>{let a=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(a={...a,[r.interpolationkey]:void 0});const o=i+JSON.stringify(a);let l=e[o];return l||(l=t(Ss(i),r),e[o]=l),l(n)}};class aw{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=hn.create("formatter"),this.options=e,this.formats={number:Mi((n,i)=>{const r=new Intl.NumberFormat(n,{...i});return a=>r.format(a)}),currency:Mi((n,i)=>{const r=new Intl.NumberFormat(n,{...i,style:"currency"});return a=>r.format(a)}),datetime:Mi((n,i)=>{const r=new Intl.DateTimeFormat(n,{...i});return a=>r.format(a)}),relativetime:Mi((n,i)=>{const r=new Intl.RelativeTimeFormat(n,{...i});return a=>r.format(a,i.range||"day")}),list:Mi((n,i)=>{const r=new Intl.ListFormat(n,{...i});return a=>r.format(a)})},this.init(e)}init(e){const i=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=Mi(n)}format(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=n.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(l=>l.indexOf(")")>-1)){const l=a.findIndex(d=>d.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,l)].join(this.formatSeparator)}return a.reduce((l,d)=>{const{formatName:h,formatOptions:m}=rw(d);if(this.formats[h]){let y=l;try{const g=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},O=g.locale||g.lng||r.locale||r.lng||i;y=this.formats[h](l,O,{...m,...r,...g})}catch(g){this.logger.warn(g)}return y}else this.logger.warn(`there was no format function for ${h}`);return l},e)}}const sw=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class ow extends Zs{constructor(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=n,this.services=i,this.languageUtils=i.languageUtils,this.options=r,this.logger=hn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(i,r.backend,r)}queueLoad(e,n,i,r){const a={},o={},l={},d={};return e.forEach(h=>{let m=!0;n.forEach(y=>{const g=`${h}|${y}`;!i.reload&&this.store.hasResourceBundle(h,y)?this.state[g]=2:this.state[g]<0||(this.state[g]===1?o[g]===void 0&&(o[g]=!0):(this.state[g]=1,m=!1,o[g]===void 0&&(o[g]=!0),a[g]===void 0&&(a[g]=!0),d[y]===void 0&&(d[y]=!0)))}),m||(l[h]=!0)}),(Object.keys(a).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(a),pending:Object.keys(o),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(d)}}loaded(e,n,i){const r=e.split("|"),a=r[0],o=r[1];n&&this.emit("failedLoading",a,o,n),!n&&i&&this.store.addResourceBundle(a,o,i,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2,n&&i&&(this.state[e]=0);const l={};this.queue.forEach(d=>{H_(d.loaded,[a],o),sw(d,e),n&&d.errors.push(n),d.pendingCount===0&&!d.done&&(Object.keys(d.loaded).forEach(h=>{l[h]||(l[h]={});const m=d.loaded[h];m.length&&m.forEach(y=>{l[h][y]===void 0&&(l[h][y]=!0)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(d=>!d.done)}read(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:i,tried:r,wait:a,callback:o});return}this.readingCalls++;const l=(h,m)=>{if(this.readingCalls--,this.waitingReads.length>0){const y=this.waitingReads.shift();this.read(y.lng,y.ns,y.fcName,y.tried,y.wait,y.callback)}if(h&&m&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,i,r+1,a*2,o)},a);return}o(h,m)},d=this.backend[i].bind(this.backend);if(d.length===2){try{const h=d(e,n);h&&typeof h.then=="function"?h.then(m=>l(null,m)).catch(l):l(null,h)}catch(h){l(h)}return}return d(e,n,l)}prepareLoading(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof n=="string"&&(n=[n]);const a=this.queueLoad(e,n,i,r);if(!a.toLoad.length)return a.pending.length||r(),null;a.toLoad.forEach(o=>{this.loadOne(o)})}load(e,n,i){this.prepareLoading(e,n,{},i)}reload(e,n,i){this.prepareLoading(e,n,{reload:!0},i)}loadOne(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const i=e.split("|"),r=i[0],a=i[1];this.read(r,a,"read",void 0,void 0,(o,l)=>{o&&this.logger.warn(`${n}loading namespace ${a} for language ${r} failed`,o),!o&&l&&this.logger.log(`${n}loaded namespace ${a} for language ${r}`,l),this.loaded(e,o,l)})}saveMissing(e,n,i,r,a){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${i}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if(this.backend&&this.backend.create){const d={...o,isUpdate:a},h=this.backend.create.bind(this.backend);if(h.length<6)try{let m;h.length===5?m=h(e,n,i,r,d):m=h(e,n,i,r),m&&typeof m.then=="function"?m.then(y=>l(null,y)).catch(l):l(null,m)}catch(m){l(m)}else h(e,n,i,r,l,d)}!e||!e[0]||this.store.addResource(e[0],n,i,r)}}}const jd=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),typeof t[1]=="string"&&(e.defaultValue=t[1]),typeof t[2]=="string"&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const n=t[3]||t[2];Object.keys(n).forEach(i=>{e[i]=n[i]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Vd=t=>(typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t),Ka=()=>{},uw=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})};class Zr extends Zs{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Vd(e),this.services={},this.logger=hn,this.modules={external:[]},uw(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(){var e=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(i=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const r=jd();this.options={...r,...this.options,...Vd(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const a=m=>m?typeof m=="function"?new m:m:null;if(!this.options.isClone){this.modules.logger?hn.init(a(this.modules.logger),this.options):hn.init(null,this.options);let m;this.modules.formatter?m=this.modules.formatter:typeof Intl!="undefined"&&(m=aw);const y=new Md(this.options);this.store=new Ld(this.options.resources,this.options);const g=this.services;g.logger=hn,g.resourceStore=this.store,g.languageUtils=y,g.pluralResolver=new nw(y,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),m&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(g.formatter=a(m),g.formatter.init(g,this.options),this.options.interpolation.format=g.formatter.format.bind(g.formatter)),g.interpolator=new iw(this.options),g.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},g.backendConnector=new ow(a(this.modules.backend),g.resourceStore,g,this.options),g.backendConnector.on("*",function(O){for(var _=arguments.length,S=new Array(_>1?_-1:0),E=1;E<_;E++)S[E-1]=arguments[E];e.emit(O,...S)}),this.modules.languageDetector&&(g.languageDetector=a(this.modules.languageDetector),g.languageDetector.init&&g.languageDetector.init(g,this.options.detection,this.options)),this.modules.i18nFormat&&(g.i18nFormat=a(this.modules.i18nFormat),g.i18nFormat.init&&g.i18nFormat.init(this)),this.translator=new Es(this.services,this.options),this.translator.on("*",function(O){for(var _=arguments.length,S=new Array(_>1?_-1:0),E=1;E<_;E++)S[E-1]=arguments[E];e.emit(O,...S)}),this.modules.external.forEach(O=>{O.init&&O.init(this)})}if(this.format=this.options.interpolation.format,i||(i=Ka),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&m[0]!=="dev"&&(this.options.lng=m[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(m=>{this[m]=function(){return e.store[m](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(m=>{this[m]=function(){return e.store[m](...arguments),e}});const d=Rr(),h=()=>{const m=(y,g)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),d.resolve(g),i(y,g)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return m(null,this.t.bind(this));this.changeLanguage(this.options.lng,m)};return this.options.resources||!this.options.initImmediate?h():setTimeout(h,0),d}loadResources(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ka;const r=typeof e=="string"?e:this.language;if(typeof e=="function"&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&r.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const a=[],o=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(h=>{h!=="cimode"&&a.indexOf(h)<0&&a.push(h)})};r?o(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(d=>o(d)),this.options.preload&&this.options.preload.forEach(l=>o(l)),this.services.backendConnector.load(a,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(l)})}else i(null)}reloadResources(e,n,i){const r=Rr();return typeof e=="function"&&(i=e,e=void 0),typeof n=="function"&&(i=n,n=void 0),e||(e=this.languages),n||(n=this.options.ns),i||(i=Ka),this.services.backendConnector.reload(e,n,a=>{r.resolve(),i(a)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&$p.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let n=0;n<this.languages.length;n++){const i=this.languages[n];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}}changeLanguage(e,n){var i=this;this.isLanguageChangingTo=e;const r=Rr();this.emit("languageChanging",e);const a=d=>{this.language=d,this.languages=this.services.languageUtils.toResolveHierarchy(d),this.resolvedLanguage=void 0,this.setResolvedLanguage(d)},o=(d,h)=>{h?(a(h),this.translator.changeLanguage(h),this.isLanguageChangingTo=void 0,this.emit("languageChanged",h),this.logger.log("languageChanged",h)):this.isLanguageChangingTo=void 0,r.resolve(function(){return i.t(...arguments)}),n&&n(d,function(){return i.t(...arguments)})},l=d=>{!e&&!d&&this.services.languageDetector&&(d=[]);const h=typeof d=="string"?d:this.services.languageUtils.getBestMatchFromCodes(d);h&&(this.language||a(h),this.translator.language||this.translator.changeLanguage(h),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(h)),this.loadResources(h,m=>{o(m,h)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?l(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(e),r}getFixedT(e,n,i){var r=this;const a=function(o,l){let d;if(typeof l!="object"){for(var h=arguments.length,m=new Array(h>2?h-2:0),y=2;y<h;y++)m[y-2]=arguments[y];d=r.options.overloadTranslationOptionHandler([o,l].concat(m))}else d={...l};d.lng=d.lng||a.lng,d.lngs=d.lngs||a.lngs,d.ns=d.ns||a.ns,d.keyPrefix!==""&&(d.keyPrefix=d.keyPrefix||i||a.keyPrefix);const g=r.options.keySeparator||".";let O;return d.keyPrefix&&Array.isArray(o)?O=o.map(_=>`${d.keyPrefix}${g}${_}`):O=d.keyPrefix?`${d.keyPrefix}${g}${o}`:o,r.t(O,d)};return typeof e=="string"?a.lng=e:a.lngs=e,a.ns=n,a.keyPrefix=i,a}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=n.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const o=(l,d)=>{const h=this.services.backendConnector.state[`${l}|${d}`];return h===-1||h===0||h===2};if(n.precheck){const l=n.precheck(this,o);if(l!==void 0)return l}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(i,e)&&(!r||o(a,e)))}loadNamespaces(e,n){const i=Rr();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(r=>{this.options.ns.indexOf(r)<0&&this.options.ns.push(r)}),this.loadResources(r=>{i.resolve(),n&&n(r)}),i):(n&&n(),Promise.resolve())}loadLanguages(e,n){const i=Rr();typeof e=="string"&&(e=[e]);const r=this.options.preload||[],a=e.filter(o=>r.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return a.length?(this.options.preload=r.concat(a),this.loadResources(o=>{i.resolve(),n&&n(o)}),i):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],i=this.services&&this.services.languageUtils||new Md(jd());return n.indexOf(i.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Zr(e,n)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ka;const i=e.forkResourceStore;i&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},a=new Zr(r);return(e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(l=>{a[l]=this[l]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},i&&(a.store=new Ld(this.store.data,r),a.services.resourceStore=a.store),a.translator=new Es(a.services,r),a.translator.on("*",function(l){for(var d=arguments.length,h=new Array(d>1?d-1:0),m=1;m<d;m++)h[m-1]=arguments[m];a.emit(l,...h)}),a.init(r,n),a.translator.options=r,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Et=Zr.createInstance();Et.createInstance=Zr.createInstance;Et.createInstance;Et.dir;Et.init;Et.loadResources;Et.reloadResources;Et.use;Et.changeLanguage;Et.getFixedT;const Hd=Et.t;Et.exists;Et.setDefaultNamespace;Et.hasLoadedNamespace;Et.loadNamespaces;Et.loadLanguages;const Mp=t=>Hd(t?`errorCodes.${t}`:"errorCodes.DEFAULT");class lw{constructor(e){ge(this,"logger");ge(this,"axiosInstance");this.logger=e.logger,this.axiosInstance=st.create({baseURL:e.baseUrl,headers:e.accessToken?{Authorization:`Bearer ${e.accessToken}`}:{}})}async get(e){try{return(await this.axiosInstance.get(e)).data}catch(n){throw this.handleError(n)}}async post(e,n){var a;const{data:i={},ignoreError:r=!1}=n;try{return(await this.axiosInstance.post(e,i)).data}catch(o){if(r&&st.isAxiosError(o))return(a=o.response)==null?void 0:a.data;throw this.handleError(o)}}async put(e,n){var a;const{data:i={},ignoreError:r=!1}=n;try{return(await this.axiosInstance.put(e,i)).data}catch(o){if(r&&st.isAxiosError(o))return(a=o.response)==null?void 0:a.data;throw this.handleError(o)}}async delete(e){try{return(await this.axiosInstance.delete(e)).data}catch(n){throw this.handleError(n)}}handleError(e){var r;let n=xt.GENERAL_ERROR;if(st.isAxiosError(e))if(e.response)switch(e.response.status){case 400:n=xt.BAD_REQUEST;break;case 401:n=xt.UNAUTHORIZED;break;case 403:n=xt.FORBIDDEN;break;case 404:n=xt.NOT_FOUND;break;case 409:n=xt.CONFLICT;break;case 410:n=xt.GONE;break;case 415:n=xt.UNSUPPORTED_MEDIA_TYPE;break;case 429:n=xt.TOO_MANY_REQUESTS;break;case 500:n=xt.INTERNAL_SERVER_ERROR;break;case 503:n=xt.SERVICE_UNAVAILABLE;break;default:n=xt.SERVER_ERROR}else e.request?n=xt.NETWORK_ERROR:n=xt.CONFIG_ERROR;const i=Mp(n);return this.logger.error("Error Code:",n,"Message:",i),this.logger.error("Result Data:",(r=e.response)==null?void 0:r.data),new Error(i)}}function Bp(t){const e=Object.values(t);return Object.assign({},...e)}function Up(t){return Object.entries(t).reduce((e,[n,i])=>{const r=Bp(i);return{...e,[n]:r}},{})}function jp(t,e){const n=Up(e);Object.entries(n).forEach(([i,r])=>{t.addResourceBundle(i,"translation",r,!0)})}const{slice:cw,forEach:dw}=[];function fw(t){return dw.call(cw.call(arguments,1),e=>{if(e)for(const n in e)t[n]===void 0&&(t[n]=e[n])}),t}const qd=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,hw=(t,e,n)=>{const i=n||{};i.path=i.path||"/";const r=encodeURIComponent(e);let a=`${t}=${r}`;if(i.maxAge>0){const o=i.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");a+=`; Max-Age=${Math.floor(o)}`}if(i.domain){if(!qd.test(i.domain))throw new TypeError("option domain is invalid");a+=`; Domain=${i.domain}`}if(i.path){if(!qd.test(i.path))throw new TypeError("option path is invalid");a+=`; Path=${i.path}`}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+=`; Expires=${i.expires.toUTCString()}`}if(i.httpOnly&&(a+="; HttpOnly"),i.secure&&(a+="; Secure"),i.sameSite)switch(typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return a},Kd={create(t,e,n,i){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(r.expires=new Date,r.expires.setTime(r.expires.getTime()+n*60*1e3)),i&&(r.domain=i),document.cookie=hw(t,encodeURIComponent(e),r)},read(t){const e=`${t}=`,n=document.cookie.split(";");for(let i=0;i<n.length;i++){let r=n[i];for(;r.charAt(0)===" ";)r=r.substring(1,r.length);if(r.indexOf(e)===0)return r.substring(e.length,r.length)}return null},remove(t){this.create(t,"",-1)}};var pw={name:"cookie",lookup(t){let{lookupCookie:e}=t;if(e&&typeof document!="undefined")return Kd.read(e)||void 0},cacheUserLanguage(t,e){let{lookupCookie:n,cookieMinutes:i,cookieDomain:r,cookieOptions:a}=e;n&&typeof document!="undefined"&&Kd.create(n,t,i,r,a)}},mw={name:"querystring",lookup(t){var i;let{lookupQuerystring:e}=t,n;if(typeof window!="undefined"){let{search:r}=window.location;!window.location.search&&((i=window.location.hash)==null?void 0:i.indexOf("?"))>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));const o=r.substring(1).split("&");for(let l=0;l<o.length;l++){const d=o[l].indexOf("=");d>0&&o[l].substring(0,d)===e&&(n=o[l].substring(d+1))}}return n}};let Fr=null;const zd=()=>{if(Fr!==null)return Fr;try{Fr=window!=="undefined"&&window.localStorage!==null;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{Fr=!1}return Fr};var gw={name:"localStorage",lookup(t){let{lookupLocalStorage:e}=t;if(e&&zd())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupLocalStorage:n}=e;n&&zd()&&window.localStorage.setItem(n,t)}};let Ir=null;const Gd=()=>{if(Ir!==null)return Ir;try{Ir=window!=="undefined"&&window.sessionStorage!==null;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{Ir=!1}return Ir};var vw={name:"sessionStorage",lookup(t){let{lookupSessionStorage:e}=t;if(e&&Gd())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupSessionStorage:n}=e;n&&Gd()&&window.sessionStorage.setItem(n,t)}},yw={name:"navigator",lookup(t){const e=[];if(typeof navigator!="undefined"){const{languages:n,userLanguage:i,language:r}=navigator;if(n)for(let a=0;a<n.length;a++)e.push(n[a]);i&&e.push(i),r&&e.push(r)}return e.length>0?e:void 0}},bw={name:"htmlTag",lookup(t){let{htmlTag:e}=t,n;const i=e||(typeof document!="undefined"?document.documentElement:null);return i&&typeof i.getAttribute=="function"&&(n=i.getAttribute("lang")),n}},kw={name:"path",lookup(t){var r;let{lookupFromPathIndex:e}=t;if(typeof window=="undefined")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(r=n[typeof e=="number"?e:0])==null?void 0:r.replace("/",""):void 0}},_w={name:"subdomain",lookup(t){var r,a;let{lookupFromSubdomainIndex:e}=t;const n=typeof e=="number"?e+1:1,i=typeof window!="undefined"&&((a=(r=window.location)==null?void 0:r.hostname)==null?void 0:a.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(i)return i[n]}};function ww(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t}}class Vp{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,n)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e||{languageUtils:{}},this.options=fw(n,this.options||{},ww()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=r=>r.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(pw),this.addDetector(mw),this.addDetector(gw),this.addDetector(vw),this.addDetector(yw),this.addDetector(bw),this.addDetector(kw),this.addDetector(_w)}addDetector(e){return this.detectors[e.name]=e,this}detect(e){e||(e=this.options.order);let n=[];return e.forEach(i=>{if(this.detectors[i]){let r=this.detectors[i].lookup(this.options);r&&typeof r=="string"&&(r=[r]),r&&(n=n.concat(r))}}),n=n.map(i=>this.options.convertDetectedLanguage(i)),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(e,n){n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||n.forEach(i=>{this.detectors[i]&&this.detectors[i].cacheUserLanguage(e,this.options)}))}}Vp.type="languageDetector";function Hp(t,e){t.use(e).use(Vp).init({resources:{},fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1,format:(n,i,r)=>{if(i){const[a,...o]=i.split(",").map(l=>l.trim());if(a==="number")return new Intl.NumberFormat(r).format(n);if(a==="date")return new Intl.DateTimeFormat(r).format(n);if(a==="currency")return new Intl.NumberFormat(r,{style:"currency",currency:o[0]||"USD",currencyDisplay:"narrowSymbol"}).format(n).replace("$","").trim()}return n}},detection:{order:["navigator","cookie","localStorage","sessionStorage","querystring","htmlTag","path","subdomain"]}})}const Sw=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Ew={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Nw=t=>Ew[t],Aw=t=>t.replace(Sw,Nw);let Wd={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Aw};function Ow(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Wd={...Wd,...t}}const xw={type:"3rdParty",init(t){Ow(t.options.react)}};Hp(Et,xw);const Tw=t=>jp(Et,t),Jd={startTime:"UNKNOWN",viewerCount:0,status:"UNKNOWN"},Cw=()=>{const[t,e]=je.useState([]),[n,i]=je.useState(Jd);return{realTimeStreamInfo:n,productsInCart:t,onTextMetadataCue:o=>{const{action:l,data:d,startTime:h,viewerCount:m,status:y}=JSON.parse(o==null?void 0:o.text);switch(l){case"sendivsdatarealtime":{i({startTime:h,viewerCount:m,status:y});break}case"sendaddtocart":{const{id:g,sessionId:O,productId:_,productImageUrl:S,productName:E}=d;e(R=>[...R,{id:g,sessionId:O,productId:_,productImageUrl:S,productName:E}])}break}},resetRealTimeStreamInfo:()=>{i(Jd)},setProductsInCart:e}},Ml=JSON,Rw=t=>t.toUpperCase(),Fw=t=>{const e={};return t.forEach((n,i)=>{e[i]=n}),e},Iw=(t,e,n)=>t.document?t:{document:t,variables:e,requestHeaders:n,signal:void 0},Dw=(t,e,n)=>t.query?t:{query:t,variables:e,requestHeaders:n,signal:void 0},Pw=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0};function ts(t,e){if(!!!t)throw new Error(e)}function Lw(t){return typeof t=="object"&&t!==null}function $w(t,e){if(!!!t)throw new Error("Unexpected invariant triggered.")}const Mw=/\r\n|[\n\r]/g;function hl(t,e){let n=0,i=1;for(const r of t.body.matchAll(Mw)){if(typeof r.index=="number"||$w(!1),r.index>=e)break;n=r.index+r[0].length,i+=1}return{line:i,column:e+1-n}}function Bw(t){return qp(t.source,hl(t.source,t.start))}function qp(t,e){const n=t.locationOffset.column-1,i="".padStart(n)+t.body,r=e.line-1,a=t.locationOffset.line-1,o=e.line+a,l=e.line===1?n:0,d=e.column+l,h=`${t.name}:${o}:${d}
|
|
37
|
-
`,m=i.split(/\r\n|[\n\r]/g),y=m[r];if(y.length>120){const g=Math.floor(d/80),O=d%80,_=[];for(let S=0;S<y.length;S+=80)_.push(y.slice(S,S+80));return h+
|
|
38
|
-
`)}function
|
|
24
|
+
`)}}function iv(t,e){e.forEach(n=>{if(Zg(tv(n.split("."),t)))throw new Wf(n)})}function We(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];throw new Error(typeof t=="number"?"[MobX] minified error nr: "+t+(n.length?" "+n.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+t)}var rv={};function Jf(){return typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:rv}var Yf=Object.assign,pa=Object.getOwnPropertyDescriptor,pn=Object.defineProperty,$a=Object.prototype,Yu=[];Object.freeze(Yu);var Il={};Object.freeze(Il);var sv=typeof Proxy!="undefined",av=Object.toString();function Xf(){sv||We("Proxy not available")}function Qf(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var Ki=function(){};function rn(t){return typeof t=="function"}function yi(t){var e=typeof t;switch(e){case"string":case"symbol":case"number":return!0}return!1}function Ma(t){return t!==null&&typeof t=="object"}function Wn(t){if(!Ma(t))return!1;var e=Object.getPrototypeOf(t);if(e==null)return!0;var n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n.toString()===av}function Zf(t){var e=t==null?void 0:t.constructor;return e?e.name==="GeneratorFunction"||e.displayName==="GeneratorFunction":!1}function Ba(t,e,n){pn(t,e,{enumerable:!1,writable:!0,configurable:!0,value:n})}function eh(t,e,n){pn(t,e,{enumerable:!1,writable:!1,configurable:!0,value:n})}function Ei(t,e){var n="isMobX"+t;return e.prototype[n]=!0,function(i){return Ma(i)&&i[n]===!0}}function ar(t){return t!=null&&Object.prototype.toString.call(t)==="[object Map]"}function ov(t){var e=Object.getPrototypeOf(t),n=Object.getPrototypeOf(e),i=Object.getPrototypeOf(n);return i===null}function _n(t){return t!=null&&Object.prototype.toString.call(t)==="[object Set]"}var th=typeof Object.getOwnPropertySymbols!="undefined";function uv(t){var e=Object.keys(t);if(!th)return e;var n=Object.getOwnPropertySymbols(t);return n.length?[].concat(e,n.filter(function(i){return $a.propertyIsEnumerable.call(t,i)})):e}var Ua=typeof Reflect!="undefined"&&Reflect.ownKeys?Reflect.ownKeys:th?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames;function nh(t){return t===null?null:typeof t=="object"?""+t:t}function Nn(t,e){return $a.hasOwnProperty.call(t,e)}var lv=Object.getOwnPropertyDescriptors||function(e){var n={};return Ua(e).forEach(function(i){n[i]=pa(e,i)}),n};function Ut(t,e){return!!(t&e)}function jt(t,e,n){return n?t|=e:t&=~e,t}function rd(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function cv(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,fv(i.key),i)}}function or(t,e,n){return e&&cv(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Gi(t,e){var n=typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=hv(t))||e){n&&(t=n);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
25
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jn(){return Jn=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Jn.apply(null,arguments)}function ih(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Xu(t,e)}function Xu(t,e){return Xu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Xu(t,e)}function dv(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function fv(t){var e=dv(t,"string");return typeof e=="symbol"?e:e+""}function hv(t,e){if(t){if(typeof t=="string")return rd(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rd(t,e):void 0}}var fn=Symbol("mobx-stored-annotations");function mn(t){function e(n,i){if(ls(i))return t.decorate_20223_(n,i);ur(n,i,t)}return Object.assign(e,t)}function ur(t,e,n){Nn(t,fn)||Ba(t,fn,Jn({},t[fn])),kv(n)||(t[fn][e]=n)}function pv(t){return Nn(t,fn)||Ba(t,fn,Jn({},t[fn])),t[fn]}function ls(t){return typeof t=="object"&&typeof t.kind=="string"}var Ce=Symbol("mobx administration"),Qn=function(){function t(n){n===void 0&&(n="Atom"),this.name_=void 0,this.flags_=0,this.observers_=new Set,this.lastAccessedBy_=0,this.lowestObserverState_=Ge.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=n}var e=t.prototype;return e.onBO=function(){this.onBOL&&this.onBOL.forEach(function(i){return i()})},e.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(i){return i()})},e.reportObserved=function(){return bh(this)},e.reportChanged=function(){Yt(),kh(this),Xt()},e.toString=function(){return this.name_},or(t,[{key:"isBeingObserved",get:function(){return Ut(this.flags_,t.isBeingObservedMask_)},set:function(i){this.flags_=jt(this.flags_,t.isBeingObservedMask_,i)}},{key:"isPendingUnobservation",get:function(){return Ut(this.flags_,t.isPendingUnobservationMask_)},set:function(i){this.flags_=jt(this.flags_,t.isPendingUnobservationMask_,i)}},{key:"diffValue",get:function(){return Ut(this.flags_,t.diffValueMask_)?1:0},set:function(i){this.flags_=jt(this.flags_,t.diffValueMask_,i===1)}}])}();Qn.isBeingObservedMask_=1;Qn.isPendingUnobservationMask_=2;Qn.diffValueMask_=4;var Dl=Ei("Atom",Qn);function rh(t,e,n){e===void 0&&(e=Ki),n===void 0&&(n=Ki);var i=new Qn(t);return e!==Ki&&Sy(i,e),n!==Ki&&Ah(i,n),i}function mv(t,e){return Mh(t,e)}function gv(t,e){return Object.is?Object.is(t,e):t===e?t!==0||1/t===1/e:t!==t&&e!==e}var er={structural:mv,default:gv};function bi(t,e,n){return Th(t)?t:Array.isArray(t)?ht.array(t,{name:n}):Wn(t)?ht.object(t,void 0,{name:n}):ar(t)?ht.map(t,{name:n}):_n(t)?ht.set(t,{name:n}):typeof t=="function"&&!Ka(t)&&!ts(t)?Zf(t)?tr(t):es(n,t):t}function vv(t,e,n){if(t==null||Ja(t)||Wa(t)||Ai(t)||lr(t))return t;if(Array.isArray(t))return ht.array(t,{name:n,deep:!1});if(Wn(t))return ht.object(t,void 0,{name:n,deep:!1});if(ar(t))return ht.map(t,{name:n,deep:!1});if(_n(t))return ht.set(t,{name:n,deep:!1})}function ja(t){return t}function yv(t,e){return Mh(t,e)?e:t}var bv="override";function kv(t){return t.annotationType_===bv}function cs(t,e){return{annotationType_:t,options_:e,make_:_v,extend_:wv,decorate_20223_:Sv}}function _v(t,e,n,i){var r;if((r=this.options_)!=null&&r.bound)return this.extend_(t,e,n,!1)===null?0:1;if(i===t.target_)return this.extend_(t,e,n,!1)===null?0:2;if(Ka(n.value))return 1;var s=sh(t,this,e,n,!1);return pn(i,e,s),2}function wv(t,e,n,i){var r=sh(t,this,e,n);return t.defineProperty_(e,r,i)}function Sv(t,e){var n=e.kind,i=e.name,r=e.addInitializer,s=this,o=function(h){var m,y,g,O;return Yn((m=(y=s.options_)==null?void 0:y.name)!=null?m:i.toString(),h,(g=(O=s.options_)==null?void 0:O.autoAction)!=null?g:!1)};if(n=="field"){r(function(){ur(this,i,s)});return}if(n=="method"){var l;return Ka(t)||(t=o(t)),(l=this.options_)!=null&&l.bound&&r(function(){var d=this,h=d[i].bind(d);h.isMobxAction=!0,d[i]=h}),t}We("Cannot apply '"+s.annotationType_+"' to '"+String(i)+"' (kind: "+n+"):"+(`
|
|
26
|
+
'`+s.annotationType_+"' can only be used on properties with a function value."))}function Ev(t,e,n,i){e.annotationType_,i.value}function sh(t,e,n,i,r){var s,o,l,d,h,m,y;r===void 0&&(r=ke.safeDescriptors),Ev(t,e,n,i);var g=i.value;if((s=e.options_)!=null&&s.bound){var O;g=g.bind((O=t.proxy_)!=null?O:t.target_)}return{value:Yn((o=(l=e.options_)==null?void 0:l.name)!=null?o:n.toString(),g,(d=(h=e.options_)==null?void 0:h.autoAction)!=null?d:!1,(m=e.options_)!=null&&m.bound?(y=t.proxy_)!=null?y:t.target_:void 0),configurable:r?t.isPlainObject_:!0,enumerable:!1,writable:!r}}function ah(t,e){return{annotationType_:t,options_:e,make_:Nv,extend_:Av,decorate_20223_:Ov}}function Nv(t,e,n,i){var r;if(i===t.target_)return this.extend_(t,e,n,!1)===null?0:2;if((r=this.options_)!=null&&r.bound&&(!Nn(t.target_,e)||!ts(t.target_[e]))&&this.extend_(t,e,n,!1)===null)return 0;if(ts(n.value))return 1;var s=oh(t,this,e,n,!1,!1);return pn(i,e,s),2}function Av(t,e,n,i){var r,s=oh(t,this,e,n,(r=this.options_)==null?void 0:r.bound);return t.defineProperty_(e,s,i)}function Ov(t,e){var n,i=e.name,r=e.addInitializer;return ts(t)||(t=tr(t)),(n=this.options_)!=null&&n.bound&&r(function(){var s=this,o=s[i].bind(s);o.isMobXFlow=!0,s[i]=o}),t}function xv(t,e,n,i){e.annotationType_,i.value}function oh(t,e,n,i,r,s){s===void 0&&(s=ke.safeDescriptors),xv(t,e,n,i);var o=i.value;if(ts(o)||(o=tr(o)),r){var l;o=o.bind((l=t.proxy_)!=null?l:t.target_),o.isMobXFlow=!0}return{value:o,configurable:s?t.isPlainObject_:!0,enumerable:!1,writable:!s}}function Pl(t,e){return{annotationType_:t,options_:e,make_:Tv,extend_:Cv,decorate_20223_:Rv}}function Tv(t,e,n){return this.extend_(t,e,n,!1)===null?0:1}function Cv(t,e,n,i){return Fv(t,this,e,n),t.defineComputedProperty_(e,Jn({},this.options_,{get:n.get,set:n.set}),i)}function Rv(t,e){var n=this,i=e.name,r=e.addInitializer;return r(function(){var s=cr(this)[Ce],o=Jn({},n.options_,{get:t,context:this});o.name||(o.name="ObservableObject."+i.toString()),s.values_.set(i,new sn(o))}),function(){return this[Ce].getObservablePropValue_(i)}}function Fv(t,e,n,i){e.annotationType_,i.get}function Va(t,e){return{annotationType_:t,options_:e,make_:Iv,extend_:Dv,decorate_20223_:Pv}}function Iv(t,e,n){return this.extend_(t,e,n,!1)===null?0:1}function Dv(t,e,n,i){var r,s;return Lv(t,this),t.defineObservableProperty_(e,n.value,(r=(s=this.options_)==null?void 0:s.enhancer)!=null?r:bi,i)}function Pv(t,e){var n=this,i=e.kind,r=e.name,s=new WeakSet;function o(l,d){var h,m,y=cr(l)[Ce],g=new mi(d,(h=(m=n.options_)==null?void 0:m.enhancer)!=null?h:bi,"ObservableObject."+r.toString(),!1);y.values_.set(r,g),s.add(l)}if(i=="accessor")return{get:function(){return s.has(this)||o(this,t.get.call(this)),this[Ce].getObservablePropValue_(r)},set:function(d){return s.has(this)||o(this,d),this[Ce].setObservablePropValue_(r,d)},init:function(d){return s.has(this)||o(this,d),d}}}function Lv(t,e,n,i){e.annotationType_}var $v="true",Mv=uh();function uh(t){return{annotationType_:$v,options_:t,make_:Bv,extend_:Uv,decorate_20223_:jv}}function Bv(t,e,n,i){var r,s;if(n.get)return zn.make_(t,e,n,i);if(n.set){var o=Yn(e.toString(),n.set);return i===t.target_?t.defineProperty_(e,{configurable:ke.safeDescriptors?t.isPlainObject_:!0,set:o})===null?0:2:(pn(i,e,{configurable:!0,set:o}),2)}if(i!==t.target_&&typeof n.value=="function"){var l;if(Zf(n.value)){var d,h=(d=this.options_)!=null&&d.autoBind?tr.bound:tr;return h.make_(t,e,n,i)}var m=(l=this.options_)!=null&&l.autoBind?es.bound:es;return m.make_(t,e,n,i)}var y=((r=this.options_)==null?void 0:r.deep)===!1?ht.ref:ht;if(typeof n.value=="function"&&(s=this.options_)!=null&&s.autoBind){var g;n.value=n.value.bind((g=t.proxy_)!=null?g:t.target_)}return y.make_(t,e,n,i)}function Uv(t,e,n,i){var r,s;if(n.get)return zn.extend_(t,e,n,i);if(n.set)return t.defineProperty_(e,{configurable:ke.safeDescriptors?t.isPlainObject_:!0,set:Yn(e.toString(),n.set)},i);if(typeof n.value=="function"&&(r=this.options_)!=null&&r.autoBind){var o;n.value=n.value.bind((o=t.proxy_)!=null?o:t.target_)}var l=((s=this.options_)==null?void 0:s.deep)===!1?ht.ref:ht;return l.extend_(t,e,n,i)}function jv(t,e){We("'"+this.annotationType_+"' cannot be used as a decorator")}var Vv="observable",Hv="observable.ref",qv="observable.shallow",zv="observable.struct",lh={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(lh);function Gs(t){return t||lh}var Qu=Va(Vv),Kv=Va(Hv,{enhancer:ja}),Gv=Va(qv,{enhancer:vv}),Wv=Va(zv,{enhancer:yv}),ch=mn(Qu);function Ws(t){return t.deep===!0?bi:t.deep===!1?ja:Yv(t.defaultDecorator)}function Jv(t){var e;return t?(e=t.defaultDecorator)!=null?e:uh(t):void 0}function Yv(t){var e,n;return t&&(e=(n=t.options_)==null?void 0:n.enhancer)!=null?e:bi}function dh(t,e,n){if(ls(e))return Qu.decorate_20223_(t,e);if(yi(e)){ur(t,e,Qu);return}return Th(t)?t:Wn(t)?ht.object(t,e,n):Array.isArray(t)?ht.array(t,e):ar(t)?ht.map(t,e):_n(t)?ht.set(t,e):typeof t=="object"&&t!==null?t:ht.box(t,e)}Yf(dh,ch);var Xv={box:function(e,n){var i=Gs(n);return new mi(e,Ws(i),i.name,!0,i.equals)},array:function(e,n){var i=Gs(n);return(ke.useProxies===!1||i.proxy===!1?zy:Py)(e,Ws(i),i.name)},map:function(e,n){var i=Gs(n);return new Fh(e,Ws(i),i.name)},set:function(e,n){var i=Gs(n);return new Ih(e,Ws(i),i.name)},object:function(e,n,i){return Oi(function(){return Ey(ke.useProxies===!1||(i==null?void 0:i.proxy)===!1?cr({},i):Ry({},i),e,n)})},ref:mn(Kv),shallow:mn(Gv),deep:ch,struct:mn(Wv)},ht=Yf(dh,Xv),fh="computed",Qv="computed.struct",Zu=Pl(fh),Zv=Pl(Qv,{equals:er.structural}),zn=function(e,n){if(ls(n))return Zu.decorate_20223_(e,n);if(yi(n))return ur(e,n,Zu);if(Wn(e))return mn(Pl(fh,e));var i=Wn(n)?n:{};return i.get=e,i.name||(i.name=e.name||""),new sn(i)};Object.assign(zn,Zu);zn.struct=mn(Zv);var sd,ad,ma=0,ey=1,ty=(sd=(ad=pa(function(){},"name"))==null?void 0:ad.configurable)!=null?sd:!1,od={value:"action",configurable:!0,writable:!1,enumerable:!1};function Yn(t,e,n,i){n===void 0&&(n=!1);function r(){return ny(t,n,e,i||this,arguments)}return r.isMobxAction=!0,r.toString=function(){return e.toString()},ty&&(od.value=t,pn(r,"name",od)),r}function ny(t,e,n,i,r){var s=iy(t,e);try{return n.apply(i,r)}catch(o){throw s.error_=o,o}finally{ry(s)}}function iy(t,e,n,i){var r=!1,s=0,o=ke.trackingDerivation,l=!e||!o;Yt();var d=ke.allowStateChanges;l&&(Ni(),d=Ha(!0));var h=Ll(!0),m={runAsAction_:l,prevDerivation_:o,prevAllowStateChanges_:d,prevAllowStateReads_:h,notifySpy_:r,startTime_:s,actionId_:ey++,parentActionId_:ma};return ma=m.actionId_,m}function ry(t){ma!==t.actionId_&&We(30),ma=t.parentActionId_,t.error_!==void 0&&(ke.suppressReactionErrors=!0),qa(t.prevAllowStateChanges_),qr(t.prevAllowStateReads_),Xt(),t.runAsAction_&&An(t.prevDerivation_),ke.suppressReactionErrors=!1}function hh(t,e){var n=Ha(t);try{return e()}finally{qa(n)}}function Ha(t){var e=ke.allowStateChanges;return ke.allowStateChanges=t,e}function qa(t){ke.allowStateChanges=t}var mi=function(t){function e(i,r,s,o,l){var d;return s===void 0&&(s="ObservableValue"),l===void 0&&(l=er.default),d=t.call(this,s)||this,d.enhancer=void 0,d.name_=void 0,d.equals=void 0,d.hasUnreportedChange_=!1,d.interceptors_=void 0,d.changeListeners_=void 0,d.value_=void 0,d.dehancer=void 0,d.enhancer=r,d.name_=s,d.equals=l,d.value_=r(i,void 0,s),d}ih(e,t);var n=e.prototype;return n.dehanceValue=function(r){return this.dehancer!==void 0?this.dehancer(r):r},n.set=function(r){this.value_,r=this.prepareNewValue_(r),r!==ke.UNCHANGED&&this.setNewValue_(r)},n.prepareNewValue_=function(r){if(Wt(this)){var s=Jt(this,{object:this,type:gn,newValue:r});if(!s)return ke.UNCHANGED;r=s.newValue}return r=this.enhancer(r,this.value_,this.name_),this.equals(this.value_,r)?ke.UNCHANGED:r},n.setNewValue_=function(r){var s=this.value_;this.value_=r,this.reportChanged(),tn(this)&&nn(this,{type:gn,object:this,newValue:r,oldValue:s})},n.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(r){return ds(this,r)},n.observe_=function(r,s){return s&&r({observableKind:"value",debugObjectName:this.name_,object:this,type:gn,newValue:this.value_,oldValue:void 0}),fs(this,r)},n.raw=function(){return this.value_},n.toJSON=function(){return this.get()},n.toString=function(){return this.name_+"["+this.value_+"]"},n.valueOf=function(){return nh(this.get())},n[Symbol.toPrimitive]=function(){return this.valueOf()},e}(Qn),sn=function(){function t(n){this.dependenciesState_=Ge.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Ge.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new va(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.isTracing_=ga.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,n.get||We(31),this.derivation=n.get,this.name_=n.name||"ComputedValue",n.set&&(this.setter_=Yn("ComputedValue-setter",n.set)),this.equals_=n.equals||(n.compareStructural||n.struct?er.structural:er.default),this.scope_=n.context,this.requiresReaction_=n.requiresReaction,this.keepAlive_=!!n.keepAlive}var e=t.prototype;return e.onBecomeStale_=function(){uy(this)},e.onBO=function(){this.onBOL&&this.onBOL.forEach(function(i){return i()})},e.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(i){return i()})},e.get=function(){if(this.isComputing&&We(32,this.name_,this.derivation),ke.inBatch===0&&this.observers_.size===0&&!this.keepAlive_)el(this)&&(this.warnAboutUntrackedRead_(),Yt(),this.value_=this.computeValue_(!1),Xt());else if(bh(this),el(this)){var i=ke.trackingContext;this.keepAlive_&&!i&&(ke.trackingContext=this),this.trackAndCompute()&&oy(this),ke.trackingContext=i}var r=this.value_;if(na(r))throw r.cause;return r},e.set=function(i){if(this.setter_){this.isRunningSetter&&We(33,this.name_),this.isRunningSetter=!0;try{this.setter_.call(this.scope_,i)}finally{this.isRunningSetter=!1}}else We(34,this.name_)},e.trackAndCompute=function(){var i=this.value_,r=this.dependenciesState_===Ge.NOT_TRACKING_,s=this.computeValue_(!0),o=r||na(i)||na(s)||!this.equals_(i,s);return o&&(this.value_=s),o},e.computeValue_=function(i){this.isComputing=!0;var r=Ha(!1),s;if(i)s=ph(this,this.derivation,this.scope_);else if(ke.disableErrorBoundaries===!0)s=this.derivation.call(this.scope_);else try{s=this.derivation.call(this.scope_)}catch(o){s=new va(o)}return qa(r),this.isComputing=!1,s},e.suspend_=function(){this.keepAlive_||(tl(this),this.value_=void 0)},e.observe_=function(i,r){var s=this,o=!0,l=void 0;return Ga(function(){var d=s.get();if(!o||r){var h=Ni();i({observableKind:"computed",debugObjectName:s.name_,type:gn,object:s,newValue:d,oldValue:l}),An(h)}o=!1,l=d})},e.warnAboutUntrackedRead_=function(){},e.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},e.valueOf=function(){return nh(this.get())},e[Symbol.toPrimitive]=function(){return this.valueOf()},or(t,[{key:"isComputing",get:function(){return Ut(this.flags_,t.isComputingMask_)},set:function(i){this.flags_=jt(this.flags_,t.isComputingMask_,i)}},{key:"isRunningSetter",get:function(){return Ut(this.flags_,t.isRunningSetterMask_)},set:function(i){this.flags_=jt(this.flags_,t.isRunningSetterMask_,i)}},{key:"isBeingObserved",get:function(){return Ut(this.flags_,t.isBeingObservedMask_)},set:function(i){this.flags_=jt(this.flags_,t.isBeingObservedMask_,i)}},{key:"isPendingUnobservation",get:function(){return Ut(this.flags_,t.isPendingUnobservationMask_)},set:function(i){this.flags_=jt(this.flags_,t.isPendingUnobservationMask_,i)}},{key:"diffValue",get:function(){return Ut(this.flags_,t.diffValueMask_)?1:0},set:function(i){this.flags_=jt(this.flags_,t.diffValueMask_,i===1)}}])}();sn.isComputingMask_=1;sn.isRunningSetterMask_=2;sn.isBeingObservedMask_=4;sn.isPendingUnobservationMask_=8;sn.diffValueMask_=16;var za=Ei("ComputedValue",sn),Ge;(function(t){t[t.NOT_TRACKING_=-1]="NOT_TRACKING_",t[t.UP_TO_DATE_=0]="UP_TO_DATE_",t[t.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",t[t.STALE_=2]="STALE_"})(Ge||(Ge={}));var ga;(function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK"})(ga||(ga={}));var va=function(e){this.cause=void 0,this.cause=e};function na(t){return t instanceof va}function el(t){switch(t.dependenciesState_){case Ge.UP_TO_DATE_:return!1;case Ge.NOT_TRACKING_:case Ge.STALE_:return!0;case Ge.POSSIBLY_STALE_:{for(var e=Ll(!0),n=Ni(),i=t.observing_,r=i.length,s=0;s<r;s++){var o=i[s];if(za(o)){if(ke.disableErrorBoundaries)o.get();else try{o.get()}catch{return An(n),qr(e),!0}if(t.dependenciesState_===Ge.STALE_)return An(n),qr(e),!0}}return gh(t),An(n),qr(e),!1}}}function ph(t,e,n){var i=Ll(!0);gh(t),t.newObserving_=new Array(t.runId_===0?100:t.observing_.length),t.unboundDepsCount_=0,t.runId_=++ke.runId;var r=ke.trackingDerivation;ke.trackingDerivation=t,ke.inBatch++;var s;if(ke.disableErrorBoundaries===!0)s=e.call(n);else try{s=e.call(n)}catch(o){s=new va(o)}return ke.inBatch--,ke.trackingDerivation=r,sy(t),qr(i),s}function sy(t){for(var e=t.observing_,n=t.observing_=t.newObserving_,i=Ge.UP_TO_DATE_,r=0,s=t.unboundDepsCount_,o=0;o<s;o++){var l=n[o];l.diffValue===0&&(l.diffValue=1,r!==o&&(n[r]=l),r++),l.dependenciesState_>i&&(i=l.dependenciesState_)}for(n.length=r,t.newObserving_=null,s=e.length;s--;){var d=e[s];d.diffValue===0&&vh(d,t),d.diffValue=0}for(;r--;){var h=n[r];h.diffValue===1&&(h.diffValue=0,ay(h,t))}i!==Ge.UP_TO_DATE_&&(t.dependenciesState_=i,t.onBecomeStale_())}function tl(t){var e=t.observing_;t.observing_=[];for(var n=e.length;n--;)vh(e[n],t);t.dependenciesState_=Ge.NOT_TRACKING_}function mh(t){var e=Ni();try{return t()}finally{An(e)}}function Ni(){var t=ke.trackingDerivation;return ke.trackingDerivation=null,t}function An(t){ke.trackingDerivation=t}function Ll(t){var e=ke.allowStateReads;return ke.allowStateReads=t,e}function qr(t){ke.allowStateReads=t}function gh(t){if(t.dependenciesState_!==Ge.UP_TO_DATE_){t.dependenciesState_=Ge.UP_TO_DATE_;for(var e=t.observing_,n=e.length;n--;)e[n].lowestObserverState_=Ge.UP_TO_DATE_}}var pu=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},mu=!0,ke=function(){var t=Jf();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(mu=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==new pu().version&&(mu=!1),mu?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new pu):(setTimeout(function(){We(35)},1),new pu)}();function ay(t,e){t.observers_.add(e),t.lowestObserverState_>e.dependenciesState_&&(t.lowestObserverState_=e.dependenciesState_)}function vh(t,e){t.observers_.delete(e),t.observers_.size===0&&yh(t)}function yh(t){t.isPendingUnobservation===!1&&(t.isPendingUnobservation=!0,ke.pendingUnobservations.push(t))}function Yt(){ke.inBatch++}function Xt(){if(--ke.inBatch===0){_h();for(var t=ke.pendingUnobservations,e=0;e<t.length;e++){var n=t[e];n.isPendingUnobservation=!1,n.observers_.size===0&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBUO()),n instanceof sn&&n.suspend_())}ke.pendingUnobservations=[]}}function bh(t){var e=ke.trackingDerivation;return e!==null?(e.runId_!==t.lastAccessedBy_&&(t.lastAccessedBy_=e.runId_,e.newObserving_[e.unboundDepsCount_++]=t,!t.isBeingObserved&&ke.trackingContext&&(t.isBeingObserved=!0,t.onBO())),t.isBeingObserved):(t.observers_.size===0&&ke.inBatch>0&&yh(t),!1)}function kh(t){t.lowestObserverState_!==Ge.STALE_&&(t.lowestObserverState_=Ge.STALE_,t.observers_.forEach(function(e){e.dependenciesState_===Ge.UP_TO_DATE_&&e.onBecomeStale_(),e.dependenciesState_=Ge.STALE_}))}function oy(t){t.lowestObserverState_!==Ge.STALE_&&(t.lowestObserverState_=Ge.STALE_,t.observers_.forEach(function(e){e.dependenciesState_===Ge.POSSIBLY_STALE_?e.dependenciesState_=Ge.STALE_:e.dependenciesState_===Ge.UP_TO_DATE_&&(t.lowestObserverState_=Ge.UP_TO_DATE_)}))}function uy(t){t.lowestObserverState_===Ge.UP_TO_DATE_&&(t.lowestObserverState_=Ge.POSSIBLY_STALE_,t.observers_.forEach(function(e){e.dependenciesState_===Ge.UP_TO_DATE_&&(e.dependenciesState_=Ge.POSSIBLY_STALE_,e.onBecomeStale_())}))}var xn=function(){function t(n,i,r,s){n===void 0&&(n="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=Ge.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=ga.NONE,this.name_=n,this.onInvalidate_=i,this.errorHandler_=r,this.requiresObservable_=s}var e=t.prototype;return e.onBecomeStale_=function(){this.schedule_()},e.schedule_=function(){this.isScheduled||(this.isScheduled=!0,ke.pendingReactions.push(this),_h())},e.runReaction_=function(){if(!this.isDisposed){Yt(),this.isScheduled=!1;var i=ke.trackingContext;if(ke.trackingContext=this,el(this)){this.isTrackPending=!0;try{this.onInvalidate_()}catch(r){this.reportExceptionInDerivation_(r)}}ke.trackingContext=i,Xt()}},e.track=function(i){if(!this.isDisposed){Yt(),this.isRunning=!0;var r=ke.trackingContext;ke.trackingContext=this;var s=ph(this,i,void 0);ke.trackingContext=r,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&tl(this),na(s)&&this.reportExceptionInDerivation_(s.cause),Xt()}},e.reportExceptionInDerivation_=function(i){var r=this;if(this.errorHandler_){this.errorHandler_(i,this);return}if(ke.disableErrorBoundaries)throw i;var s="[mobx] uncaught error in '"+this+"'";ke.suppressReactionErrors||console.error(s,i),ke.globalReactionErrorHandlers.forEach(function(o){return o(i,r)})},e.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(Yt(),tl(this),Xt()))},e.getDisposer_=function(i){var r=this,s=function o(){r.dispose(),i==null||i.removeEventListener==null||i.removeEventListener("abort",o)};return i==null||i.addEventListener==null||i.addEventListener("abort",s),s[Ce]=this,s},e.toString=function(){return"Reaction["+this.name_+"]"},e.trace=function(i){},or(t,[{key:"isDisposed",get:function(){return Ut(this.flags_,t.isDisposedMask_)},set:function(i){this.flags_=jt(this.flags_,t.isDisposedMask_,i)}},{key:"isScheduled",get:function(){return Ut(this.flags_,t.isScheduledMask_)},set:function(i){this.flags_=jt(this.flags_,t.isScheduledMask_,i)}},{key:"isTrackPending",get:function(){return Ut(this.flags_,t.isTrackPendingMask_)},set:function(i){this.flags_=jt(this.flags_,t.isTrackPendingMask_,i)}},{key:"isRunning",get:function(){return Ut(this.flags_,t.isRunningMask_)},set:function(i){this.flags_=jt(this.flags_,t.isRunningMask_,i)}},{key:"diffValue",get:function(){return Ut(this.flags_,t.diffValueMask_)?1:0},set:function(i){this.flags_=jt(this.flags_,t.diffValueMask_,i===1)}}])}();xn.isDisposedMask_=1;xn.isScheduledMask_=2;xn.isTrackPendingMask_=4;xn.isRunningMask_=8;xn.diffValueMask_=16;var ly=100,cy=function(e){return e()};function _h(){ke.inBatch>0||ke.isRunningReactions||cy(dy)}function dy(){ke.isRunningReactions=!0;for(var t=ke.pendingReactions,e=0;t.length>0;){++e===ly&&(console.error("[mobx] cycle in reaction: "+t[0]),t.splice(0));for(var n=t.splice(0),i=0,r=n.length;i<r;i++)n[i].runReaction_()}ke.isRunningReactions=!1}var ya=Ei("Reaction",xn);function zr(){return!1}function fy(t){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}var wh="action",hy="action.bound",Sh="autoAction",py="autoAction.bound",my="<unnamed action>",nl=cs(wh),gy=cs(hy,{bound:!0}),il=cs(Sh,{autoAction:!0}),vy=cs(py,{autoAction:!0,bound:!0});function Eh(t){var e=function(i,r){if(rn(i))return Yn(i.name||my,i,t);if(rn(r))return Yn(i,r,t);if(ls(r))return(t?il:nl).decorate_20223_(i,r);if(yi(r))return ur(i,r,t?il:nl);if(yi(i))return mn(cs(t?Sh:wh,{name:i,autoAction:t}))};return e}var Bt=Eh(!1);Object.assign(Bt,nl);var es=Eh(!0);Object.assign(es,il);Bt.bound=mn(gy);es.bound=mn(vy);function Ka(t){return rn(t)&&t.isMobxAction===!0}function Ga(t,e){var n,i,r,s;e===void 0&&(e=Il);var o=(n=(i=e)==null?void 0:i.name)!=null?n:"Autorun",l=!e.scheduler&&!e.delay,d;if(l)d=new xn(o,function(){this.track(y)},e.onError,e.requiresObservable);else{var h=Nh(e),m=!1;d=new xn(o,function(){m||(m=!0,h(function(){m=!1,d.isDisposed||d.track(y)}))},e.onError,e.requiresObservable)}function y(){t(d)}return(r=e)!=null&&(r=r.signal)!=null&&r.aborted||d.schedule_(),d.getDisposer_((s=e)==null?void 0:s.signal)}var yy=function(e){return e()};function Nh(t){return t.scheduler?t.scheduler:t.delay?function(e){return setTimeout(e,t.delay)}:yy}function by(t,e,n){var i,r,s;n===void 0&&(n=Il);var o=(i=n.name)!=null?i:"Reaction",l=Bt(o,n.onError?ky(n.onError,e):e),d=!n.scheduler&&!n.delay,h=Nh(n),m=!0,y=!1,g,O=n.compareStructural?er.structural:n.equals||er.default,_=new xn(o,function(){m||d?S():y||(y=!0,h(S))},n.onError,n.requiresObservable);function S(){if(y=!1,!_.isDisposed){var E=!1,R=g;_.track(function(){var j=hh(!1,function(){return t(_)});E=m||!O(g,j),g=j}),(m&&n.fireImmediately||!m&&E)&&l(g,R,_),m=!1}}return(r=n)!=null&&(r=r.signal)!=null&&r.aborted||_.schedule_(),_.getDisposer_((s=n)==null?void 0:s.signal)}function ky(t,e){return function(){try{return e.apply(this,arguments)}catch(n){t.call(this,n)}}}var _y="onBO",wy="onBUO";function Sy(t,e,n){return Oh(_y,t,e,n)}function Ah(t,e,n){return Oh(wy,t,e,n)}function Oh(t,e,n,i){var r=rl(e),s=rn(i)?i:n,o=t+"L";return r[o]?r[o].add(s):r[o]=new Set([s]),function(){var l=r[o];l&&(l.delete(s),l.size===0&&delete r[o])}}function Ey(t,e,n,i){var r=lv(e);return Oi(function(){var s=cr(t,i)[Ce];Ua(r).forEach(function(o){s.extend_(o,r[o],n&&o in n?n[o]:!0)})}),t}var Ny=0;function xh(){this.message="FLOW_CANCELLED"}xh.prototype=Object.create(Error.prototype);var gu=ah("flow"),Ay=ah("flow.bound",{bound:!0}),tr=Object.assign(function(e,n){if(ls(n))return gu.decorate_20223_(e,n);if(yi(n))return ur(e,n,gu);var i=e,r=i.name||"<unnamed flow>",s=function(){var l=this,d=arguments,h=++Ny,m=Bt(r+" - runid: "+h+" - init",i).apply(l,d),y,g=void 0,O=new Promise(function(_,S){var E=0;y=S;function R(z){g=void 0;var X;try{X=Bt(r+" - runid: "+h+" - yield "+E++,m.next).call(m,z)}catch(ne){return S(ne)}J(X)}function j(z){g=void 0;var X;try{X=Bt(r+" - runid: "+h+" - yield "+E++,m.throw).call(m,z)}catch(ne){return S(ne)}J(X)}function J(z){if(rn(z==null?void 0:z.then)){z.then(J,S);return}return z.done?_(z.value):(g=Promise.resolve(z.value),g.then(R,j))}R(void 0)});return O.cancel=Bt(r+" - runid: "+h+" - cancel",function(){try{g&&ud(g);var _=m.return(void 0),S=Promise.resolve(_.value);S.then(Ki,Ki),ud(S),y(new xh)}catch(E){y(E)}}),O};return s.isMobXFlow=!0,s},gu);tr.bound=mn(Ay);function ud(t){rn(t.cancel)&&t.cancel()}function ts(t){return(t==null?void 0:t.isMobXFlow)===!0}function Oy(t,e){return t?Ja(t)||!!t[Ce]||Dl(t)||ya(t)||za(t):!1}function Th(t){return Oy(t)}function wn(t,e){e===void 0&&(e=void 0),Yt();try{return t.apply(e)}finally{Xt()}}function xy(t,e,n){return arguments.length===1||e&&typeof e=="object"?Ty(t,e):Ch(t,e,{})}function Ch(t,e,n){var i;if(typeof n.timeout=="number"){var r=new Error("WHEN_TIMEOUT");i=setTimeout(function(){if(!o[Ce].isDisposed)if(o(),n.onError)n.onError(r);else throw r},n.timeout)}n.name="When";var s=Yn("When-effect",e),o=Ga(function(l){var d=hh(!1,t);d&&(l.dispose(),i&&clearTimeout(i),s())},n);return o}function Ty(t,e){var n;if(e!=null&&(n=e.signal)!=null&&n.aborted)return Object.assign(Promise.reject(new Error("WHEN_ABORTED")),{cancel:function(){return null}});var i,r,s=new Promise(function(o,l){var d,h=Ch(t,o,Jn({},e,{onError:l}));i=function(){h(),l(new Error("WHEN_CANCELLED"))},r=function(){h(),l(new Error("WHEN_ABORTED"))},e==null||(d=e.signal)==null||d.addEventListener==null||d.addEventListener("abort",r)}).finally(function(){var o;return e==null||(o=e.signal)==null||o.removeEventListener==null?void 0:o.removeEventListener("abort",r)});return s.cancel=i,s}function Bi(t){return t[Ce]}var Cy={has:function(e,n){return Bi(e).has_(n)},get:function(e,n){return Bi(e).get_(n)},set:function(e,n,i){var r;return yi(n)?(r=Bi(e).set_(n,i,!0))!=null?r:!0:!1},deleteProperty:function(e,n){var i;return yi(n)?(i=Bi(e).delete_(n,!0))!=null?i:!0:!1},defineProperty:function(e,n,i){var r;return(r=Bi(e).defineProperty_(n,i))!=null?r:!0},ownKeys:function(e){return Bi(e).ownKeys_()},preventExtensions:function(e){We(13)}};function Ry(t,e){var n,i;return Xf(),t=cr(t,e),(i=(n=t[Ce]).proxy_)!=null?i:n.proxy_=new Proxy(t,Cy)}function Wt(t){return t.interceptors_!==void 0&&t.interceptors_.length>0}function ds(t,e){var n=t.interceptors_||(t.interceptors_=[]);return n.push(e),Qf(function(){var i=n.indexOf(e);i!==-1&&n.splice(i,1)})}function Jt(t,e){var n=Ni();try{for(var i=[].concat(t.interceptors_||[]),r=0,s=i.length;r<s&&(e=i[r](e),e&&!e.type&&We(14),!!e);r++);return e}finally{An(n)}}function tn(t){return t.changeListeners_!==void 0&&t.changeListeners_.length>0}function fs(t,e){var n=t.changeListeners_||(t.changeListeners_=[]);return n.push(e),Qf(function(){var i=n.indexOf(e);i!==-1&&n.splice(i,1)})}function nn(t,e){var n=Ni(),i=t.changeListeners_;if(i){i=i.slice();for(var r=0,s=i.length;r<s;r++)i[r](e);An(n)}}function Fy(t,e,n){return Oi(function(){var i,r=cr(t,n)[Ce];(i=e)!=null||(e=pv(t)),Ua(e).forEach(function(s){return r.make_(s,e[s])})}),t}var ld="splice",gn="update",Iy=1e4,Dy={get:function(e,n){var i=e[Ce];return n===Ce?i:n==="length"?i.getArrayLength_():typeof n=="string"&&!isNaN(n)?i.get_(parseInt(n)):Nn(ba,n)?ba[n]:e[n]},set:function(e,n,i){var r=e[Ce];return n==="length"&&r.setArrayLength_(i),typeof n=="symbol"||isNaN(n)?e[n]=i:r.set_(parseInt(n),i),!0},preventExtensions:function(){We(15)}},$l=function(){function t(n,i,r,s){n===void 0&&(n="ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=r,this.legacyMode_=s,this.atom_=new Qn(n),this.enhancer_=function(o,l){return i(o,l,"ObservableArray[..]")}}var e=t.prototype;return e.dehanceValue_=function(i){return this.dehancer!==void 0?this.dehancer(i):i},e.dehanceValues_=function(i){return this.dehancer!==void 0&&i.length>0?i.map(this.dehancer):i},e.intercept_=function(i){return ds(this,i)},e.observe_=function(i,r){return r===void 0&&(r=!1),r&&i({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),fs(this,i)},e.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},e.setArrayLength_=function(i){(typeof i!="number"||isNaN(i)||i<0)&&We("Out of range: "+i);var r=this.values_.length;if(i!==r)if(i>r){for(var s=new Array(i-r),o=0;o<i-r;o++)s[o]=void 0;this.spliceWithArray_(r,0,s)}else this.spliceWithArray_(i,r-i)},e.updateArrayLength_=function(i,r){i!==this.lastKnownLength_&&We(16),this.lastKnownLength_+=r,this.legacyMode_&&r>0&&$h(i+r+1)},e.spliceWithArray_=function(i,r,s){var o=this;this.atom_;var l=this.values_.length;if(i===void 0?i=0:i>l?i=l:i<0&&(i=Math.max(0,l+i)),arguments.length===1?r=l-i:r==null?r=0:r=Math.max(0,Math.min(r,l-i)),s===void 0&&(s=Yu),Wt(this)){var d=Jt(this,{object:this.proxy_,type:ld,index:i,removedCount:r,added:s});if(!d)return Yu;r=d.removedCount,s=d.added}if(s=s.length===0?s:s.map(function(y){return o.enhancer_(y,void 0)}),this.legacyMode_){var h=s.length-r;this.updateArrayLength_(l,h)}var m=this.spliceItemsIntoValues_(i,r,s);return(r!==0||s.length!==0)&&this.notifyArraySplice_(i,s,m),this.dehanceValues_(m)},e.spliceItemsIntoValues_=function(i,r,s){if(s.length<Iy){var o;return(o=this.values_).splice.apply(o,[i,r].concat(s))}else{var l=this.values_.slice(i,i+r),d=this.values_.slice(i+r);this.values_.length+=s.length-r;for(var h=0;h<s.length;h++)this.values_[i+h]=s[h];for(var m=0;m<d.length;m++)this.values_[i+s.length+m]=d[m];return l}},e.notifyArrayChildUpdate_=function(i,r,s){var o=!this.owned_&&zr(),l=tn(this),d=l||o?{observableKind:"array",object:this.proxy_,type:gn,debugObjectName:this.atom_.name_,index:i,newValue:r,oldValue:s}:null;this.atom_.reportChanged(),l&&nn(this,d)},e.notifyArraySplice_=function(i,r,s){var o=!this.owned_&&zr(),l=tn(this),d=l||o?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:ld,index:i,removed:s,added:r,removedCount:s.length,addedCount:r.length}:null;this.atom_.reportChanged(),l&&nn(this,d)},e.get_=function(i){if(this.legacyMode_&&i>=this.values_.length){console.warn("[mobx] Out of bounds read: "+i);return}return this.atom_.reportObserved(),this.dehanceValue_(this.values_[i])},e.set_=function(i,r){var s=this.values_;if(this.legacyMode_&&i>s.length&&We(17,i,s.length),i<s.length){this.atom_;var o=s[i];if(Wt(this)){var l=Jt(this,{type:gn,object:this.proxy_,index:i,newValue:r});if(!l)return;r=l.newValue}r=this.enhancer_(r,o);var d=r!==o;d&&(s[i]=r,this.notifyArrayChildUpdate_(i,r,o))}else{for(var h=new Array(i+1-s.length),m=0;m<h.length-1;m++)h[m]=void 0;h[h.length-1]=r,this.spliceWithArray_(s.length,0,h)}},t}();function Py(t,e,n,i){return n===void 0&&(n="ObservableArray"),i===void 0&&(i=!1),Xf(),Oi(function(){var r=new $l(n,e,i,!1);eh(r.values_,Ce,r);var s=new Proxy(r.values_,Dy);return r.proxy_=s,t&&t.length&&r.spliceWithArray_(0,0,t),s})}var ba={clear:function(){return this.splice(0)},replace:function(e){var n=this[Ce];return n.spliceWithArray_(0,n.values_.length,e)},toJSON:function(){return this.slice()},splice:function(e,n){for(var i=arguments.length,r=new Array(i>2?i-2:0),s=2;s<i;s++)r[s-2]=arguments[s];var o=this[Ce];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray_(e);case 2:return o.spliceWithArray_(e,n)}return o.spliceWithArray_(e,n,r)},spliceWithArray:function(e,n,i){return this[Ce].spliceWithArray_(e,n,i)},push:function(){for(var e=this[Ce],n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return e.spliceWithArray_(e.values_.length,0,i),e.values_.length},pop:function(){return this.splice(Math.max(this[Ce].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=this[Ce],n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return e.spliceWithArray_(0,0,i),e.values_.length},reverse:function(){return ke.trackingDerivation&&We(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){ke.trackingDerivation&&We(37,"sort");var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var n=this[Ce],i=n.dehanceValues_(n.values_).indexOf(e);return i>-1?(this.splice(i,1),!0):!1}};nt("at",Ht);nt("concat",Ht);nt("flat",Ht);nt("includes",Ht);nt("indexOf",Ht);nt("join",Ht);nt("lastIndexOf",Ht);nt("slice",Ht);nt("toString",Ht);nt("toLocaleString",Ht);nt("toSorted",Ht);nt("toSpliced",Ht);nt("with",Ht);nt("every",an);nt("filter",an);nt("find",an);nt("findIndex",an);nt("findLast",an);nt("findLastIndex",an);nt("flatMap",an);nt("forEach",an);nt("map",an);nt("some",an);nt("toReversed",an);nt("reduce",Rh);nt("reduceRight",Rh);function nt(t,e){typeof Array.prototype[t]=="function"&&(ba[t]=e(t))}function Ht(t){return function(){var e=this[Ce];e.atom_.reportObserved();var n=e.dehanceValues_(e.values_);return n[t].apply(n,arguments)}}function an(t){return function(e,n){var i=this,r=this[Ce];r.atom_.reportObserved();var s=r.dehanceValues_(r.values_);return s[t](function(o,l){return e.call(n,o,l,i)})}}function Rh(t){return function(){var e=this,n=this[Ce];n.atom_.reportObserved();var i=n.dehanceValues_(n.values_),r=arguments[0];return arguments[0]=function(s,o,l){return r(s,o,l,e)},i[t].apply(i,arguments)}}var Ly=Ei("ObservableArrayAdministration",$l);function Wa(t){return Ma(t)&&Ly(t[Ce])}var $y={},Kn="add",ka="delete",Fh=function(){function t(n,i,r){var s=this;i===void 0&&(i=bi),r===void 0&&(r="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[Ce]=$y,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=i,this.name_=r,rn(Map)||We(18),Oi(function(){s.keysAtom_=rh("ObservableMap.keys()"),s.data_=new Map,s.hasMap_=new Map,n&&s.merge(n)})}var e=t.prototype;return e.has_=function(i){return this.data_.has(i)},e.has=function(i){var r=this;if(!ke.trackingDerivation)return this.has_(i);var s=this.hasMap_.get(i);if(!s){var o=s=new mi(this.has_(i),ja,"ObservableMap.key?",!1);this.hasMap_.set(i,o),Ah(o,function(){return r.hasMap_.delete(i)})}return s.get()},e.set=function(i,r){var s=this.has_(i);if(Wt(this)){var o=Jt(this,{type:s?gn:Kn,object:this,newValue:r,name:i});if(!o)return this;r=o.newValue}return s?this.updateValue_(i,r):this.addValue_(i,r),this},e.delete=function(i){var r=this;if(this.keysAtom_,Wt(this)){var s=Jt(this,{type:ka,object:this,name:i});if(!s)return!1}if(this.has_(i)){var o=zr(),l=tn(this),d=l||o?{observableKind:"map",debugObjectName:this.name_,type:ka,object:this,oldValue:this.data_.get(i).value_,name:i}:null;return wn(function(){var h;r.keysAtom_.reportChanged(),(h=r.hasMap_.get(i))==null||h.setNewValue_(!1);var m=r.data_.get(i);m.setNewValue_(void 0),r.data_.delete(i)}),l&&nn(this,d),!0}return!1},e.updateValue_=function(i,r){var s=this.data_.get(i);if(r=s.prepareNewValue_(r),r!==ke.UNCHANGED){var o=zr(),l=tn(this),d=l||o?{observableKind:"map",debugObjectName:this.name_,type:gn,object:this,oldValue:s.value_,name:i,newValue:r}:null;s.setNewValue_(r),l&&nn(this,d)}},e.addValue_=function(i,r){var s=this;this.keysAtom_,wn(function(){var h,m=new mi(r,s.enhancer_,"ObservableMap.key",!1);s.data_.set(i,m),r=m.value_,(h=s.hasMap_.get(i))==null||h.setNewValue_(!0),s.keysAtom_.reportChanged()});var o=zr(),l=tn(this),d=l||o?{observableKind:"map",debugObjectName:this.name_,type:Kn,object:this,name:i,newValue:r}:null;l&&nn(this,d)},e.get=function(i){return this.has(i)?this.dehanceValue_(this.data_.get(i).get()):this.dehanceValue_(void 0)},e.dehanceValue_=function(i){return this.dehancer!==void 0?this.dehancer(i):i},e.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},e.values=function(){var i=this,r=this.keys();return ns({next:function(){var o=r.next(),l=o.done,d=o.value;return{done:l,value:l?void 0:i.get(d)}}})},e.entries=function(){var i=this,r=this.keys();return ns({next:function(){var o=r.next(),l=o.done,d=o.value;return{done:l,value:l?void 0:[d,i.get(d)]}}})},e[Symbol.iterator]=function(){return this.entries()},e.forEach=function(i,r){for(var s=Gi(this),o;!(o=s()).done;){var l=o.value,d=l[0],h=l[1];i.call(r,h,d,this)}},e.merge=function(i){var r=this;return Ai(i)&&(i=new Map(i)),wn(function(){Wn(i)?uv(i).forEach(function(s){return r.set(s,i[s])}):Array.isArray(i)?i.forEach(function(s){var o=s[0],l=s[1];return r.set(o,l)}):ar(i)?(ov(i)||We(19,i),i.forEach(function(s,o){return r.set(o,s)})):i!=null&&We(20,i)}),this},e.clear=function(){var i=this;wn(function(){mh(function(){for(var r=Gi(i.keys()),s;!(s=r()).done;){var o=s.value;i.delete(o)}})})},e.replace=function(i){var r=this;return wn(function(){for(var s=My(i),o=new Map,l=!1,d=Gi(r.data_.keys()),h;!(h=d()).done;){var m=h.value;if(!s.has(m)){var y=r.delete(m);if(y)l=!0;else{var g=r.data_.get(m);o.set(m,g)}}}for(var O=Gi(s.entries()),_;!(_=O()).done;){var S=_.value,E=S[0],R=S[1],j=r.data_.has(E);if(r.set(E,R),r.data_.has(E)){var J=r.data_.get(E);o.set(E,J),j||(l=!0)}}if(!l)if(r.data_.size!==o.size)r.keysAtom_.reportChanged();else for(var z=r.data_.keys(),X=o.keys(),ne=z.next(),oe=X.next();!ne.done;){if(ne.value!==oe.value){r.keysAtom_.reportChanged();break}ne=z.next(),oe=X.next()}r.data_=o}),this},e.toString=function(){return"[object ObservableMap]"},e.toJSON=function(){return Array.from(this)},e.observe_=function(i,r){return fs(this,i)},e.intercept_=function(i){return ds(this,i)},or(t,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Map"}}])}(),Ai=Ei("ObservableMap",Fh);function My(t){if(ar(t)||Ai(t))return t;if(Array.isArray(t))return new Map(t);if(Wn(t)){var e=new Map;for(var n in t)e.set(n,t[n]);return e}else return We(21,t)}var By={},Ih=function(){function t(n,i,r){var s=this;i===void 0&&(i=bi),r===void 0&&(r="ObservableSet"),this.name_=void 0,this[Ce]=By,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=r,rn(Set)||We(22),this.enhancer_=function(o,l){return i(o,l,r)},Oi(function(){s.atom_=rh(s.name_),n&&s.replace(n)})}var e=t.prototype;return e.dehanceValue_=function(i){return this.dehancer!==void 0?this.dehancer(i):i},e.clear=function(){var i=this;wn(function(){mh(function(){for(var r=Gi(i.data_.values()),s;!(s=r()).done;){var o=s.value;i.delete(o)}})})},e.forEach=function(i,r){for(var s=Gi(this),o;!(o=s()).done;){var l=o.value;i.call(r,l,l,this)}},e.add=function(i){var r=this;if(this.atom_,Wt(this)){var s=Jt(this,{type:Kn,object:this,newValue:i});if(!s)return this}if(!this.has(i)){wn(function(){r.data_.add(r.enhancer_(i,void 0)),r.atom_.reportChanged()});var o=!1,l=tn(this),d=l||o?{observableKind:"set",debugObjectName:this.name_,type:Kn,object:this,newValue:i}:null;l&&nn(this,d)}return this},e.delete=function(i){var r=this;if(Wt(this)){var s=Jt(this,{type:ka,object:this,oldValue:i});if(!s)return!1}if(this.has(i)){var o=!1,l=tn(this),d=l||o?{observableKind:"set",debugObjectName:this.name_,type:ka,object:this,oldValue:i}:null;return wn(function(){r.atom_.reportChanged(),r.data_.delete(i)}),l&&nn(this,d),!0}return!1},e.has=function(i){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(i))},e.entries=function(){var i=0,r=Array.from(this.keys()),s=Array.from(this.values());return ns({next:function(){var l=i;return i+=1,l<s.length?{value:[r[l],s[l]],done:!1}:{done:!0}}})},e.keys=function(){return this.values()},e.values=function(){this.atom_.reportObserved();var i=this,r=0,s=Array.from(this.data_.values());return ns({next:function(){return r<s.length?{value:i.dehanceValue_(s[r++]),done:!1}:{done:!0}}})},e.intersection=function(i){if(_n(i))return i.intersection(this);var r=new Set(this);return r.intersection(i)},e.union=function(i){if(_n(i))return i.union(this);var r=new Set(this);return r.union(i)},e.difference=function(i){return new Set(this).difference(i)},e.symmetricDifference=function(i){if(_n(i))return i.symmetricDifference(this);var r=new Set(this);return r.symmetricDifference(i)},e.isSubsetOf=function(i){return new Set(this).isSubsetOf(i)},e.isSupersetOf=function(i){return new Set(this).isSupersetOf(i)},e.isDisjointFrom=function(i){if(_n(i))return i.isDisjointFrom(this);var r=new Set(this);return r.isDisjointFrom(i)},e.replace=function(i){var r=this;return lr(i)&&(i=new Set(i)),wn(function(){Array.isArray(i)?(r.clear(),i.forEach(function(s){return r.add(s)})):_n(i)?(r.clear(),i.forEach(function(s){return r.add(s)})):i!=null&&We("Cannot initialize set from "+i)}),this},e.observe_=function(i,r){return fs(this,i)},e.intercept_=function(i){return ds(this,i)},e.toJSON=function(){return Array.from(this)},e.toString=function(){return"[object ObservableSet]"},e[Symbol.iterator]=function(){return this.values()},or(t,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Set"}}])}(),lr=Ei("ObservableSet",Ih),cd=Object.create(null),dd="remove",Dh=function(){function t(n,i,r,s){i===void 0&&(i=new Map),s===void 0&&(s=Mv),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=n,this.values_=i,this.name_=r,this.defaultAnnotation_=s,this.keysAtom_=new Qn("ObservableObject.keys"),this.isPlainObject_=Wn(this.target_)}var e=t.prototype;return e.getObservablePropValue_=function(i){return this.values_.get(i).get()},e.setObservablePropValue_=function(i,r){var s=this.values_.get(i);if(s instanceof sn)return s.set(r),!0;if(Wt(this)){var o=Jt(this,{type:gn,object:this.proxy_||this.target_,name:i,newValue:r});if(!o)return null;r=o.newValue}if(r=s.prepareNewValue_(r),r!==ke.UNCHANGED){var l=tn(this),d=!1,h=l||d?{type:gn,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:s.value_,name:i,newValue:r}:null;s.setNewValue_(r),l&&nn(this,h)}return!0},e.get_=function(i){return ke.trackingDerivation&&!Nn(this.target_,i)&&this.has_(i),this.target_[i]},e.set_=function(i,r,s){return s===void 0&&(s=!1),Nn(this.target_,i)?this.values_.has(i)?this.setObservablePropValue_(i,r):s?Reflect.set(this.target_,i,r):(this.target_[i]=r,!0):this.extend_(i,{value:r,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,s)},e.has_=function(i){if(!ke.trackingDerivation)return i in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var r=this.pendingKeys_.get(i);return r||(r=new mi(i in this.target_,ja,"ObservableObject.key?",!1),this.pendingKeys_.set(i,r)),r.get()},e.make_=function(i,r){if(r===!0&&(r=this.defaultAnnotation_),r!==!1){if(!(i in this.target_)){var s;if((s=this.target_[fn])!=null&&s[i])return;We(1,r.annotationType_,this.name_+"."+i.toString())}for(var o=this.target_;o&&o!==$a;){var l=pa(o,i);if(l){var d=r.make_(this,i,l,o);if(d===0)return;if(d===1)break}o=Object.getPrototypeOf(o)}hd(this,r,i)}},e.extend_=function(i,r,s,o){if(o===void 0&&(o=!1),s===!0&&(s=this.defaultAnnotation_),s===!1)return this.defineProperty_(i,r,o);var l=s.extend_(this,i,r,o);return l&&hd(this,s,i),l},e.defineProperty_=function(i,r,s){s===void 0&&(s=!1),this.keysAtom_;try{Yt();var o=this.delete_(i);if(!o)return o;if(Wt(this)){var l=Jt(this,{object:this.proxy_||this.target_,name:i,type:Kn,newValue:r.value});if(!l)return null;var d=l.newValue;r.value!==d&&(r=Jn({},r,{value:d}))}if(s){if(!Reflect.defineProperty(this.target_,i,r))return!1}else pn(this.target_,i,r);this.notifyPropertyAddition_(i,r.value)}finally{Xt()}return!0},e.defineObservableProperty_=function(i,r,s,o){o===void 0&&(o=!1),this.keysAtom_;try{Yt();var l=this.delete_(i);if(!l)return l;if(Wt(this)){var d=Jt(this,{object:this.proxy_||this.target_,name:i,type:Kn,newValue:r});if(!d)return null;r=d.newValue}var h=fd(i),m={configurable:ke.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:h.get,set:h.set};if(o){if(!Reflect.defineProperty(this.target_,i,m))return!1}else pn(this.target_,i,m);var y=new mi(r,s,"ObservableObject.key",!1);this.values_.set(i,y),this.notifyPropertyAddition_(i,y.value_)}finally{Xt()}return!0},e.defineComputedProperty_=function(i,r,s){s===void 0&&(s=!1),this.keysAtom_;try{Yt();var o=this.delete_(i);if(!o)return o;if(Wt(this)){var l=Jt(this,{object:this.proxy_||this.target_,name:i,type:Kn,newValue:void 0});if(!l)return null}r.name||(r.name="ObservableObject.key"),r.context=this.proxy_||this.target_;var d=fd(i),h={configurable:ke.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:d.get,set:d.set};if(s){if(!Reflect.defineProperty(this.target_,i,h))return!1}else pn(this.target_,i,h);this.values_.set(i,new sn(r)),this.notifyPropertyAddition_(i,void 0)}finally{Xt()}return!0},e.delete_=function(i,r){if(r===void 0&&(r=!1),this.keysAtom_,!Nn(this.target_,i))return!0;if(Wt(this)){var s=Jt(this,{object:this.proxy_||this.target_,name:i,type:dd});if(!s)return null}try{var o;Yt();var l=tn(this),d=!1,h=this.values_.get(i),m=void 0;if(!h&&(l||d)){var y;m=(y=pa(this.target_,i))==null?void 0:y.value}if(r){if(!Reflect.deleteProperty(this.target_,i))return!1}else delete this.target_[i];if(h&&(this.values_.delete(i),h instanceof mi&&(m=h.value_),kh(h)),this.keysAtom_.reportChanged(),(o=this.pendingKeys_)==null||(o=o.get(i))==null||o.set(i in this.target_),l||d){var g={type:dd,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:m,name:i};l&&nn(this,g)}}finally{Xt()}return!0},e.observe_=function(i,r){return fs(this,i)},e.intercept_=function(i){return ds(this,i)},e.notifyPropertyAddition_=function(i,r){var s,o=tn(this),l=!1;if(o||l){var d=o||l?{type:Kn,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:i,newValue:r}:null;o&&nn(this,d)}(s=this.pendingKeys_)==null||(s=s.get(i))==null||s.set(!0),this.keysAtom_.reportChanged()},e.ownKeys_=function(){return this.keysAtom_.reportObserved(),Ua(this.target_)},e.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},t}();function cr(t,e){var n;if(Nn(t,Ce))return t;var i=(n=e==null?void 0:e.name)!=null?n:"ObservableObject",r=new Dh(t,new Map,String(i),Jv(e));return Ba(t,Ce,r),t}var Uy=Ei("ObservableObjectAdministration",Dh);function fd(t){return cd[t]||(cd[t]={get:function(){return this[Ce].getObservablePropValue_(t)},set:function(n){return this[Ce].setObservablePropValue_(t,n)}})}function Ja(t){return Ma(t)?Uy(t[Ce]):!1}function hd(t,e,n){var i;(i=t.target_[fn])==null||delete i[n]}var jy=Lh(0),Vy=function(){var t=!1,e={};return Object.defineProperty(e,"0",{set:function(){t=!0}}),Object.create(e)[0]=1,t===!1}(),vu=0,Ph=function(){};function Hy(t,e){Object.setPrototypeOf?Object.setPrototypeOf(t.prototype,e):t.prototype.__proto__!==void 0?t.prototype.__proto__=e:t.prototype=e}Hy(Ph,Array.prototype);var Ml=function(t){function e(i,r,s,o){var l;return s===void 0&&(s="ObservableArray"),o===void 0&&(o=!1),l=t.call(this)||this,Oi(function(){var d=new $l(s,r,o,!0);d.proxy_=l,eh(l,Ce,d),i&&i.length&&l.spliceWithArray(0,0,i),Vy&&Object.defineProperty(l,"0",jy)}),l}ih(e,t);var n=e.prototype;return n.concat=function(){this[Ce].atom_.reportObserved();for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return Array.prototype.concat.apply(this.slice(),s.map(function(l){return Wa(l)?l.slice():l}))},n[Symbol.iterator]=function(){var i=this,r=0;return ns({next:function(){return r<i.length?{value:i[r++],done:!1}:{done:!0,value:void 0}}})},or(e,[{key:"length",get:function(){return this[Ce].getArrayLength_()},set:function(r){this[Ce].setArrayLength_(r)}},{key:Symbol.toStringTag,get:function(){return"Array"}}])}(Ph);Object.entries(ba).forEach(function(t){var e=t[0],n=t[1];e!=="concat"&&Ba(Ml.prototype,e,n)});function Lh(t){return{enumerable:!1,configurable:!0,get:function(){return this[Ce].get_(t)},set:function(n){this[Ce].set_(t,n)}}}function qy(t){pn(Ml.prototype,""+t,Lh(t))}function $h(t){if(t>vu){for(var e=vu;e<t+100;e++)qy(e);vu=t}}$h(1e3);function zy(t,e,n){return new Ml(t,e,n)}function rl(t,e){if(typeof t=="object"&&t!==null){if(Wa(t))return e!==void 0&&We(23),t[Ce].atom_;if(lr(t))return t.atom_;if(Ai(t)){if(e===void 0)return t.keysAtom_;var n=t.data_.get(e)||t.hasMap_.get(e);return n||We(25,e,sl(t)),n}if(Ja(t)){if(!e)return We(26);var i=t[Ce].values_.get(e);return i||We(27,e,sl(t)),i}if(Dl(t)||za(t)||ya(t))return t}else if(rn(t)&&ya(t[Ce]))return t[Ce];We(28)}function Ky(t,e){if(t||We(29),Dl(t)||za(t)||ya(t)||Ai(t)||lr(t))return t;if(t[Ce])return t[Ce];We(24,t)}function sl(t,e){var n;if(e!==void 0)n=rl(t,e);else{if(Ka(t))return t.name;Ja(t)||Ai(t)||lr(t)?n=Ky(t):n=rl(t)}return n.name_}function Oi(t){var e=Ni(),n=Ha(!0);Yt();try{return t()}finally{Xt(),qa(n),An(e)}}var pd=$a.toString;function Mh(t,e,n){return n===void 0&&(n=-1),al(t,e,n)}function al(t,e,n,i,r){if(t===e)return t!==0||1/t===1/e;if(t==null||e==null)return!1;if(t!==t)return e!==e;var s=typeof t;if(s!=="function"&&s!=="object"&&typeof e!="object")return!1;var o=pd.call(t);if(o!==pd.call(e))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:+t==0?1/+t===1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e;case"[object Symbol]":return typeof Symbol!="undefined"&&Symbol.valueOf.call(t)===Symbol.valueOf.call(e);case"[object Map]":case"[object Set]":n>=0&&n++;break}t=md(t),e=md(e);var l=o==="[object Array]";if(!l){if(typeof t!="object"||typeof e!="object")return!1;var d=t.constructor,h=e.constructor;if(d!==h&&!(rn(d)&&d instanceof d&&rn(h)&&h instanceof h)&&"constructor"in t&&"constructor"in e)return!1}if(n===0)return!1;n<0&&(n=-1),i=i||[],r=r||[];for(var m=i.length;m--;)if(i[m]===t)return r[m]===e;if(i.push(t),r.push(e),l){if(m=t.length,m!==e.length)return!1;for(;m--;)if(!al(t[m],e[m],n-1,i,r))return!1}else{var y=Object.keys(t),g;if(m=y.length,Object.keys(e).length!==m)return!1;for(;m--;)if(g=y[m],!(Nn(e,g)&&al(t[g],e[g],n-1,i,r)))return!1}return i.pop(),r.pop(),!0}function md(t){return Wa(t)?t.slice():ar(t)||Ai(t)||_n(t)||lr(t)?Array.from(t.entries()):t}function ns(t){return t[Symbol.iterator]=Gy,t}function Gy(){return this}["Symbol","Map","Set"].forEach(function(t){var e=Jf();typeof e[t]=="undefined"&&We("MobX requires global '"+t+"' to be available or polyfilled")});typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:fy,extras:{getDebugName:sl},$mobx:Ce});function Wy(t,e=[]){je.useEffect(()=>{const n=Ga(t);return()=>n()},e)}function Bh(t,e={}){const{defaultValue:n,deps:i=[]}=e,r=je.useMemo(()=>t,i),[s,o]=je.useState(()=>r()||n);return je.useEffect(()=>{const l=Ga(()=>o(r()));return()=>l()},[r,...i]),s}function Jy(t,e,n=[]){const i=je.useMemo(()=>t,n),r=je.useMemo(()=>e,n);je.useEffect(()=>{const s=by(i,r);return()=>s()},[i,r])}let Bl=new Map;const ol=je.createContext(Bl),Yy=({children:t,stores:e})=>{const n=je.useContext(ol),i=je.useMemo(()=>{const r=new Map;return e.forEach(s=>r.set(s.class,s.value)),Bl=new Map([...n,...r])},[]);return mg.jsx(ol.Provider,{value:i,children:t})};function Xy(t){return je.useContext(ol).get(t)}function Qy(t){return Bl.get(t)}var Zy=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Ya(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ia={exports:{}},eb=ia.exports,gd;function tb(){return gd||(gd=1,function(t,e){(function(n,i){t.exports=i()})(eb,function(){var n=function(a,u){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,f){c.__proto__=f}||function(c,f){for(var p in f)Object.prototype.hasOwnProperty.call(f,p)&&(c[p]=f[p])})(a,u)},i=function(){return(i=Object.assign||function(a){for(var u,c=1,f=arguments.length;c<f;c++)for(var p in u=arguments[c])Object.prototype.hasOwnProperty.call(u,p)&&(a[p]=u[p]);return a}).apply(this,arguments)};function r(a,u,c){for(var f,p=0,v=u.length;p<v;p++)!f&&p in u||((f=f||Array.prototype.slice.call(u,0,p))[p]=u[p]);return a.concat(f||Array.prototype.slice.call(u))}var s=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:Zy,o=Object.keys,l=Array.isArray;function d(a,u){return typeof u!="object"||o(u).forEach(function(c){a[c]=u[c]}),a}typeof Promise=="undefined"||s.Promise||(s.Promise=Promise);var h=Object.getPrototypeOf,m={}.hasOwnProperty;function y(a,u){return m.call(a,u)}function g(a,u){typeof u=="function"&&(u=u(h(a))),(typeof Reflect=="undefined"?o:Reflect.ownKeys)(u).forEach(function(c){_(a,c,u[c])})}var O=Object.defineProperty;function _(a,u,c,f){O(a,u,d(c&&y(c,"get")&&typeof c.get=="function"?{get:c.get,set:c.set,configurable:!0}:{value:c,configurable:!0,writable:!0},f))}function S(a){return{from:function(u){return a.prototype=Object.create(u.prototype),_(a.prototype,"constructor",a),{extend:g.bind(null,a.prototype)}}}}var E=Object.getOwnPropertyDescriptor,R=[].slice;function j(a,u,c){return R.call(a,u,c)}function J(a,u){return u(a)}function z(a){if(!a)throw new Error("Assertion Failed")}function X(a){s.setImmediate?setImmediate(a):setTimeout(a,0)}function ne(a,u){if(typeof u=="string"&&y(a,u))return a[u];if(!u)return a;if(typeof u!="string"){for(var c=[],f=0,p=u.length;f<p;++f){var v=ne(a,u[f]);c.push(v)}return c}var b=u.indexOf(".");if(b!==-1){var k=a[u.substr(0,b)];return k==null?void 0:ne(k,u.substr(b+1))}}function oe(a,u,c){if(a&&u!==void 0&&!("isFrozen"in Object&&Object.isFrozen(a)))if(typeof u!="string"&&"length"in u){z(typeof c!="string"&&"length"in c);for(var f=0,p=u.length;f<p;++f)oe(a,u[f],c[f])}else{var v,b,k=u.indexOf(".");k!==-1?(v=u.substr(0,k),(b=u.substr(k+1))===""?c===void 0?l(a)&&!isNaN(parseInt(v))?a.splice(v,1):delete a[v]:a[v]=c:oe(k=!(k=a[v])||!y(a,v)?a[v]={}:k,b,c)):c===void 0?l(a)&&!isNaN(parseInt(u))?a.splice(u,1):delete a[u]:a[u]=c}}function Se(a){var u,c={};for(u in a)y(a,u)&&(c[u]=a[u]);return c}var ve=[].concat;function ze(a){return ve.apply([],a)}var qt="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(ze([8,16,32,64].map(function(a){return["Int","Uint","Float"].map(function(u){return u+a+"Array"})}))).filter(function(a){return s[a]}),Ne=new Set(qt.map(function(a){return s[a]})),Re=null;function Ve(a){return Re=new WeakMap,a=function u(c){if(!c||typeof c!="object")return c;var f=Re.get(c);if(f)return f;if(l(c)){f=[],Re.set(c,f);for(var p=0,v=c.length;p<v;++p)f.push(u(c[p]))}else if(Ne.has(c.constructor))f=c;else{var b,k=h(c);for(b in f=k===Object.prototype?{}:Object.create(k),Re.set(c,f),c)y(c,b)&&(f[b]=u(c[b]))}return f}(a),Re=null,a}var M={}.toString;function N(a){return M.call(a).slice(8,-1)}var K=typeof Symbol!="undefined"?Symbol.iterator:"@@iterator",ie=typeof K=="symbol"?function(a){var u;return a!=null&&(u=a[K])&&u.apply(a)}:function(){return null};function ce(a,u){return u=a.indexOf(u),0<=u&&a.splice(u,1),0<=u}var ae={};function B(a){var u,c,f,p;if(arguments.length===1){if(l(a))return a.slice();if(this===ae&&typeof a=="string")return[a];if(p=ie(a)){for(c=[];!(f=p.next()).done;)c.push(f.value);return c}if(a==null)return[a];if(typeof(u=a.length)!="number")return[a];for(c=new Array(u);u--;)c[u]=a[u];return c}for(u=arguments.length,c=new Array(u);u--;)c[u]=arguments[u];return c}var Fe=typeof Symbol!="undefined"?function(a){return a[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},vn=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],zt=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(vn),$e={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function Xe(a,u){this.name=a,this.message=u}function D(a,u){return a+". Errors: "+Object.keys(u).map(function(c){return u[c].toString()}).filter(function(c,f,p){return p.indexOf(c)===f}).join(`
|
|
27
|
+
`)}function H(a,u,c,f){this.failures=u,this.failedKeys=f,this.successCount=c,this.message=D(a,u)}function pt(a,u){this.name="BulkError",this.failures=Object.keys(u).map(function(c){return u[c]}),this.failuresByPos=u,this.message=D(a,this.failures)}S(Xe).from(Error).extend({toString:function(){return this.name+": "+this.message}}),S(H).from(Xe),S(pt).from(Xe);var _e=zt.reduce(function(a,u){return a[u]=u+"Error",a},{}),Me=Xe,ye=zt.reduce(function(a,u){var c=u+"Error";function f(p,v){this.name=c,p?typeof p=="string"?(this.message="".concat(p).concat(v?`
|
|
28
|
+
`+v:""),this.inner=v||null):typeof p=="object"&&(this.message="".concat(p.name," ").concat(p.message),this.inner=p):(this.message=$e[u]||c,this.inner=null)}return S(f).from(Me),a[u]=f,a},{});ye.Syntax=SyntaxError,ye.Type=TypeError,ye.Range=RangeError;var et=vn.reduce(function(a,u){return a[u+"Error"]=ye[u],a},{}),Je=zt.reduce(function(a,u){return["Syntax","Type","Range"].indexOf(u)===-1&&(a[u+"Error"]=ye[u]),a},{});function Oe(){}function wt(a){return a}function lt(a,u){return a==null||a===wt?u:function(c){return u(a(c))}}function Ae(a,u){return function(){a.apply(this,arguments),u.apply(this,arguments)}}function mt(a,u){return a===Oe?u:function(){var c=a.apply(this,arguments);c!==void 0&&(arguments[0]=c);var f=this.onsuccess,p=this.onerror;this.onsuccess=null,this.onerror=null;var v=u.apply(this,arguments);return f&&(this.onsuccess=this.onsuccess?Ae(f,this.onsuccess):f),p&&(this.onerror=this.onerror?Ae(p,this.onerror):p),v!==void 0?v:c}}function rt(a,u){return a===Oe?u:function(){a.apply(this,arguments);var c=this.onsuccess,f=this.onerror;this.onsuccess=this.onerror=null,u.apply(this,arguments),c&&(this.onsuccess=this.onsuccess?Ae(c,this.onsuccess):c),f&&(this.onerror=this.onerror?Ae(f,this.onerror):f)}}function he(a,u){return a===Oe?u:function(c){var f=a.apply(this,arguments);d(c,f);var p=this.onsuccess,v=this.onerror;return this.onsuccess=null,this.onerror=null,c=u.apply(this,arguments),p&&(this.onsuccess=this.onsuccess?Ae(p,this.onsuccess):p),v&&(this.onerror=this.onerror?Ae(v,this.onerror):v),f===void 0?c===void 0?void 0:c:d(f,c)}}function Ye(a,u){return a===Oe?u:function(){return u.apply(this,arguments)!==!1&&a.apply(this,arguments)}}function ue(a,u){return a===Oe?u:function(){var c=a.apply(this,arguments);if(c&&typeof c.then=="function"){for(var f=this,p=arguments.length,v=new Array(p);p--;)v[p]=arguments[p];return c.then(function(){return u.apply(f,v)})}return u.apply(this,arguments)}}Je.ModifyError=H,Je.DexieError=Xe,Je.BulkError=pt;var Te=typeof location!="undefined"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function tt(a){Te=a}var ct={},ut=100,qt=typeof Promise=="undefined"?[]:function(){var a=Promise.resolve();if(typeof crypto=="undefined"||!crypto.subtle)return[a,h(a),a];var u=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[u,h(u),a]}(),vn=qt[0],zt=qt[1],qt=qt[2],zt=zt&&zt.then,Zn=vn&&vn.constructor,vo=!!qt,pr=function(a,u){mr.push([a,u]),vs&&(queueMicrotask(Hm),vs=!1)},yo=!0,vs=!0,ei=[],ys=[],bo=wt,Fn={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Oe,pgp:!1,env:{},finalize:Oe},Ee=Fn,mr=[],ti=0,bs=[];function ge(a){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var u=this._PSD=Ee;if(typeof a!="function"){if(a!==ct)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&_o(this,this._value))}this._state=null,this._value=null,++u.ref,function c(f,p){try{p(function(v){if(f._state===null){if(v===f)throw new TypeError("A promise cannot be resolved with itself.");var b=f._lib&&Ti();v&&typeof v.then=="function"?c(f,function(k,A){v instanceof ge?v._then(k,A):v.then(k,A)}):(f._state=!0,f._value=v,uc(f)),b&&Ci()}},_o.bind(null,f))}catch(v){_o(f,v)}}(this,a)}var ko={get:function(){var a=Ee,u=Ss;function c(f,p){var v=this,b=!a.global&&(a!==Ee||u!==Ss),k=b&&!Dn(),A=new ge(function(T,I){wo(v,new oc(cc(f,a,b,k),cc(p,a,b,k),T,I,a))});return this._consoleTask&&(A._consoleTask=this._consoleTask),A}return c.prototype=ct,c},set:function(a){_(this,"then",a&&a.prototype===ct?ko:{get:function(){return a},set:ko.set})}};function oc(a,u,c,f,p){this.onFulfilled=typeof a=="function"?a:null,this.onRejected=typeof u=="function"?u:null,this.resolve=c,this.reject=f,this.psd=p}function _o(a,u){var c,f;ys.push(u),a._state===null&&(c=a._lib&&Ti(),u=bo(u),a._state=!1,a._value=u,f=a,ei.some(function(p){return p._value===f._value})||ei.push(f),uc(a),c&&Ci())}function uc(a){var u=a._listeners;a._listeners=[];for(var c=0,f=u.length;c<f;++c)wo(a,u[c]);var p=a._PSD;--p.ref||p.finalize(),ti===0&&(++ti,pr(function(){--ti==0&&So()},[]))}function wo(a,u){if(a._state!==null){var c=a._state?u.onFulfilled:u.onRejected;if(c===null)return(a._state?u.resolve:u.reject)(a._value);++u.psd.ref,++ti,pr(Vm,[c,a,u])}else a._listeners.push(u)}function Vm(a,u,c){try{var f,p=u._value;!u._state&&ys.length&&(ys=[]),f=Te&&u._consoleTask?u._consoleTask.run(function(){return a(p)}):a(p),u._state||ys.indexOf(p)!==-1||function(v){for(var b=ei.length;b;)if(ei[--b]._value===v._value)return ei.splice(b,1)}(u),c.resolve(f)}catch(v){c.reject(v)}finally{--ti==0&&So(),--c.psd.ref||c.psd.finalize()}}function Hm(){ni(Fn,function(){Ti()&&Ci()})}function Ti(){var a=yo;return vs=yo=!1,a}function Ci(){var a,u,c;do for(;0<mr.length;)for(a=mr,mr=[],c=a.length,u=0;u<c;++u){var f=a[u];f[0].apply(null,f[1])}while(0<mr.length);vs=yo=!0}function So(){var a=ei;ei=[],a.forEach(function(f){f._PSD.onunhandled.call(null,f._value,f)});for(var u=bs.slice(0),c=u.length;c;)u[--c]()}function ks(a){return new ge(ct,!1,a)}function st(a,u){var c=Ee;return function(){var f=Ti(),p=Ee;try{return Pn(c,!0),a.apply(this,arguments)}catch(v){u&&u(v)}finally{Pn(p,!1),f&&Ci()}}}g(ge.prototype,{then:ko,_then:function(a,u){wo(this,new oc(null,null,a,u,Ee))},catch:function(a){if(arguments.length===1)return this.then(null,a);var u=a,c=arguments[1];return typeof u=="function"?this.then(null,function(f){return(f instanceof u?c:ks)(f)}):this.then(null,function(f){return(f&&f.name===u?c:ks)(f)})},finally:function(a){return this.then(function(u){return ge.resolve(a()).then(function(){return u})},function(u){return ge.resolve(a()).then(function(){return ks(u)})})},timeout:function(a,u){var c=this;return a<1/0?new ge(function(f,p){var v=setTimeout(function(){return p(new ye.Timeout(u))},a);c.then(f,p).finally(clearTimeout.bind(null,v))}):this}}),typeof Symbol!="undefined"&&Symbol.toStringTag&&_(ge.prototype,Symbol.toStringTag,"Dexie.Promise"),Fn.env=lc(),g(ge,{all:function(){var a=B.apply(null,arguments).map(Es);return new ge(function(u,c){a.length===0&&u([]);var f=a.length;a.forEach(function(p,v){return ge.resolve(p).then(function(b){a[v]=b,--f||u(a)},c)})})},resolve:function(a){return a instanceof ge?a:a&&typeof a.then=="function"?new ge(function(u,c){a.then(u,c)}):new ge(ct,!0,a)},reject:ks,race:function(){var a=B.apply(null,arguments).map(Es);return new ge(function(u,c){a.map(function(f){return ge.resolve(f).then(u,c)})})},PSD:{get:function(){return Ee},set:function(a){return Ee=a}},totalEchoes:{get:function(){return Ss}},newPSD:In,usePSD:ni,scheduler:{get:function(){return pr},set:function(a){pr=a}},rejectionMapper:{get:function(){return bo},set:function(a){bo=a}},follow:function(a,u){return new ge(function(c,f){return In(function(p,v){var b=Ee;b.unhandleds=[],b.onunhandled=v,b.finalize=Ae(function(){var k,A=this;k=function(){A.unhandleds.length===0?p():v(A.unhandleds[0])},bs.push(function T(){k(),bs.splice(bs.indexOf(T),1)}),++ti,pr(function(){--ti==0&&So()},[])},b.finalize),a()},u,c,f)})}}),Zn&&(Zn.allSettled&&_(ge,"allSettled",function(){var a=B.apply(null,arguments).map(Es);return new ge(function(u){a.length===0&&u([]);var c=a.length,f=new Array(c);a.forEach(function(p,v){return ge.resolve(p).then(function(b){return f[v]={status:"fulfilled",value:b}},function(b){return f[v]={status:"rejected",reason:b}}).then(function(){return--c||u(f)})})})}),Zn.any&&typeof AggregateError!="undefined"&&_(ge,"any",function(){var a=B.apply(null,arguments).map(Es);return new ge(function(u,c){a.length===0&&c(new AggregateError([]));var f=a.length,p=new Array(f);a.forEach(function(v,b){return ge.resolve(v).then(function(k){return u(k)},function(k){p[b]=k,--f||c(new AggregateError(p))})})})}),Zn.withResolvers&&(ge.withResolvers=Zn.withResolvers));var bt={awaits:0,echoes:0,id:0},qm=0,_s=[],ws=0,Ss=0,zm=0;function In(a,u,c,f){var p=Ee,v=Object.create(p);return v.parent=p,v.ref=0,v.global=!1,v.id=++zm,Fn.env,v.env=vo?{Promise:ge,PromiseProp:{value:ge,configurable:!0,writable:!0},all:ge.all,race:ge.race,allSettled:ge.allSettled,any:ge.any,resolve:ge.resolve,reject:ge.reject}:{},u&&d(v,u),++p.ref,v.finalize=function(){--this.parent.ref||this.parent.finalize()},f=ni(v,a,c,f),v.ref===0&&v.finalize(),f}function Ri(){return bt.id||(bt.id=++qm),++bt.awaits,bt.echoes+=ut,bt.id}function Dn(){return!!bt.awaits&&(--bt.awaits==0&&(bt.id=0),bt.echoes=bt.awaits*ut,!0)}function Es(a){return bt.echoes&&a&&a.constructor===Zn?(Ri(),a.then(function(u){return Dn(),u},function(u){return Dn(),dt(u)})):a}function Km(){var a=_s[_s.length-1];_s.pop(),Pn(a,!1)}function Pn(a,u){var c,f=Ee;(u?!bt.echoes||ws++&&a===Ee:!ws||--ws&&a===Ee)||queueMicrotask(u?function(p){++Ss,bt.echoes&&--bt.echoes!=0||(bt.echoes=bt.awaits=bt.id=0),_s.push(Ee),Pn(p,!0)}.bind(null,a):Km),a!==Ee&&(Ee=a,f===Fn&&(Fn.env=lc()),vo&&(c=Fn.env.Promise,u=a.env,(f.global||a.global)&&(Object.defineProperty(s,"Promise",u.PromiseProp),c.all=u.all,c.race=u.race,c.resolve=u.resolve,c.reject=u.reject,u.allSettled&&(c.allSettled=u.allSettled),u.any&&(c.any=u.any))))}function lc(){var a=s.Promise;return vo?{Promise:a,PromiseProp:Object.getOwnPropertyDescriptor(s,"Promise"),all:a.all,race:a.race,allSettled:a.allSettled,any:a.any,resolve:a.resolve,reject:a.reject}:{}}function ni(a,u,c,f,p){var v=Ee;try{return Pn(a,!0),u(c,f,p)}finally{Pn(v,!1)}}function cc(a,u,c,f){return typeof a!="function"?a:function(){var p=Ee;c&&Ri(),Pn(u,!0);try{return a.apply(this,arguments)}finally{Pn(p,!1),f&&queueMicrotask(Dn)}}}function Eo(a){Promise===Zn&&bt.echoes===0?ws===0?a():enqueueNativeMicroTask(a):setTimeout(a,0)}(""+zt).indexOf("[native code]")===-1&&(Ri=Dn=Oe);var dt=ge.reject,ii="",yn="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",dc="String expected.",Fi=[],Ns="__dbnames",No="readonly",Ao="readwrite";function ri(a,u){return a?u?function(){return a.apply(this,arguments)&&u.apply(this,arguments)}:a:u}var fc={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function As(a){return typeof a!="string"||/\./.test(a)?function(u){return u}:function(u){return u[a]===void 0&&a in u&&delete(u=Ve(u))[a],u}}function hc(){throw ye.Type()}function qe(a,u){try{var c=pc(a),f=pc(u);if(c!==f)return c==="Array"?1:f==="Array"?-1:c==="binary"?1:f==="binary"?-1:c==="string"?1:f==="string"?-1:c==="Date"?1:f!=="Date"?NaN:-1;switch(c){case"number":case"Date":case"string":return u<a?1:a<u?-1:0;case"binary":return function(p,v){for(var b=p.length,k=v.length,A=b<k?b:k,T=0;T<A;++T)if(p[T]!==v[T])return p[T]<v[T]?-1:1;return b===k?0:b<k?-1:1}(mc(a),mc(u));case"Array":return function(p,v){for(var b=p.length,k=v.length,A=b<k?b:k,T=0;T<A;++T){var I=qe(p[T],v[T]);if(I!==0)return I}return b===k?0:b<k?-1:1}(a,u)}}catch{}return NaN}function pc(a){var u=typeof a;return u!="object"?u:ArrayBuffer.isView(a)?"binary":(a=N(a),a==="ArrayBuffer"?"binary":a)}function mc(a){return a instanceof Uint8Array?a:ArrayBuffer.isView(a)?new Uint8Array(a.buffer,a.byteOffset,a.byteLength):new Uint8Array(a)}var gc=(it.prototype._trans=function(a,u,c){var f=this._tx||Ee.trans,p=this.name,v=Te&&typeof console!="undefined"&&console.createTask&&console.createTask("Dexie: ".concat(a==="readonly"?"read":"write"," ").concat(this.name));function b(T,I,w){if(!w.schema[p])throw new ye.NotFound("Table "+p+" not part of transaction");return u(w.idbtrans,w)}var k=Ti();try{var A=f&&f.db._novip===this.db._novip?f===Ee.trans?f._promise(a,b,c):In(function(){return f._promise(a,b,c)},{trans:f,transless:Ee.transless||Ee}):function T(I,w,L,x){if(I.idbdb&&(I._state.openComplete||Ee.letThrough||I._vip)){var F=I._createTransaction(w,L,I._dbSchema);try{F.create(),I._state.PR1398_maxLoop=3}catch(P){return P.name===_e.InvalidState&&I.isOpen()&&0<--I._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),I.close({disableAutoOpen:!1}),I.open().then(function(){return T(I,w,L,x)})):dt(P)}return F._promise(w,function(P,C){return In(function(){return Ee.trans=F,x(P,C,F)})}).then(function(P){if(w==="readwrite")try{F.idbtrans.commit()}catch{}return w==="readonly"?P:F._completion.then(function(){return P})})}if(I._state.openComplete)return dt(new ye.DatabaseClosed(I._state.dbOpenError));if(!I._state.isBeingOpened){if(!I._state.autoOpen)return dt(new ye.DatabaseClosed);I.open().catch(Oe)}return I._state.dbReadyPromise.then(function(){return T(I,w,L,x)})}(this.db,a,[this.name],b);return v&&(A._consoleTask=v,A=A.catch(function(T){return console.trace(T),dt(T)})),A}finally{k&&Ci()}},it.prototype.get=function(a,u){var c=this;return a&&a.constructor===Object?this.where(a).first(u):a==null?dt(new ye.Type("Invalid argument to Table.get()")):this._trans("readonly",function(f){return c.core.get({trans:f,key:a}).then(function(p){return c.hook.reading.fire(p)})}).then(u)},it.prototype.where=function(a){if(typeof a=="string")return new this.db.WhereClause(this,a);if(l(a))return new this.db.WhereClause(this,"[".concat(a.join("+"),"]"));var u=o(a);if(u.length===1)return this.where(u[0]).equals(a[u[0]]);var c=this.schema.indexes.concat(this.schema.primKey).filter(function(k){if(k.compound&&u.every(function(T){return 0<=k.keyPath.indexOf(T)})){for(var A=0;A<u.length;++A)if(u.indexOf(k.keyPath[A])===-1)return!1;return!0}return!1}).sort(function(k,A){return k.keyPath.length-A.keyPath.length})[0];if(c&&this.db._maxKey!==ii){var v=c.keyPath.slice(0,u.length);return this.where(v).equals(v.map(function(A){return a[A]}))}!c&&Te&&console.warn("The query ".concat(JSON.stringify(a)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(u.join("+"),"]"));var f=this.schema.idxByName;function p(k,A){return qe(k,A)===0}var b=u.reduce(function(w,A){var T=w[0],I=w[1],w=f[A],L=a[A];return[T||w,T||!w?ri(I,w&&w.multi?function(x){return x=ne(x,A),l(x)&&x.some(function(F){return p(L,F)})}:function(x){return p(L,ne(x,A))}):I]},[null,null]),v=b[0],b=b[1];return v?this.where(v.name).equals(a[v.keyPath]).filter(b):c?this.filter(b):this.where(u).equals("")},it.prototype.filter=function(a){return this.toCollection().and(a)},it.prototype.count=function(a){return this.toCollection().count(a)},it.prototype.offset=function(a){return this.toCollection().offset(a)},it.prototype.limit=function(a){return this.toCollection().limit(a)},it.prototype.each=function(a){return this.toCollection().each(a)},it.prototype.toArray=function(a){return this.toCollection().toArray(a)},it.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},it.prototype.orderBy=function(a){return new this.db.Collection(new this.db.WhereClause(this,l(a)?"[".concat(a.join("+"),"]"):a))},it.prototype.reverse=function(){return this.toCollection().reverse()},it.prototype.mapToClass=function(a){var u,c=this.db,f=this.name;function p(){return u!==null&&u.apply(this,arguments)||this}(this.schema.mappedClass=a).prototype instanceof hc&&(function(A,T){if(typeof T!="function"&&T!==null)throw new TypeError("Class extends value "+String(T)+" is not a constructor or null");function I(){this.constructor=A}n(A,T),A.prototype=T===null?Object.create(T):(I.prototype=T.prototype,new I)}(p,u=a),Object.defineProperty(p.prototype,"db",{get:function(){return c},enumerable:!1,configurable:!0}),p.prototype.table=function(){return f},a=p);for(var v=new Set,b=a.prototype;b;b=h(b))Object.getOwnPropertyNames(b).forEach(function(A){return v.add(A)});function k(A){if(!A)return A;var T,I=Object.create(a.prototype);for(T in A)if(!v.has(T))try{I[T]=A[T]}catch{}return I}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=k,this.hook("reading",k),a},it.prototype.defineClass=function(){return this.mapToClass(function(a){d(this,a)})},it.prototype.add=function(a,u){var c=this,f=this.schema.primKey,p=f.auto,v=f.keyPath,b=a;return v&&p&&(b=As(v)(a)),this._trans("readwrite",function(k){return c.core.mutate({trans:k,type:"add",keys:u!=null?[u]:null,values:[b]})}).then(function(k){return k.numFailures?ge.reject(k.failures[0]):k.lastResult}).then(function(k){if(v)try{oe(a,v,k)}catch{}return k})},it.prototype.update=function(a,u){return typeof a!="object"||l(a)?this.where(":id").equals(a).modify(u):(a=ne(a,this.schema.primKey.keyPath),a===void 0?dt(new ye.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(a).modify(u))},it.prototype.put=function(a,u){var c=this,f=this.schema.primKey,p=f.auto,v=f.keyPath,b=a;return v&&p&&(b=As(v)(a)),this._trans("readwrite",function(k){return c.core.mutate({trans:k,type:"put",values:[b],keys:u!=null?[u]:null})}).then(function(k){return k.numFailures?ge.reject(k.failures[0]):k.lastResult}).then(function(k){if(v)try{oe(a,v,k)}catch{}return k})},it.prototype.delete=function(a){var u=this;return this._trans("readwrite",function(c){return u.core.mutate({trans:c,type:"delete",keys:[a]})}).then(function(c){return c.numFailures?ge.reject(c.failures[0]):void 0})},it.prototype.clear=function(){var a=this;return this._trans("readwrite",function(u){return a.core.mutate({trans:u,type:"deleteRange",range:fc})}).then(function(u){return u.numFailures?ge.reject(u.failures[0]):void 0})},it.prototype.bulkGet=function(a){var u=this;return this._trans("readonly",function(c){return u.core.getMany({keys:a,trans:c}).then(function(f){return f.map(function(p){return u.hook.reading.fire(p)})})})},it.prototype.bulkAdd=function(a,u,c){var f=this,p=Array.isArray(u)?u:void 0,v=(c=c||(p?void 0:u))?c.allKeys:void 0;return this._trans("readwrite",function(b){var T=f.schema.primKey,k=T.auto,T=T.keyPath;if(T&&p)throw new ye.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(p&&p.length!==a.length)throw new ye.InvalidArgument("Arguments objects and keys must have the same length");var A=a.length,T=T&&k?a.map(As(T)):a;return f.core.mutate({trans:b,type:"add",keys:p,values:T,wantResults:v}).then(function(F){var w=F.numFailures,L=F.results,x=F.lastResult,F=F.failures;if(w===0)return v?L:x;throw new pt("".concat(f.name,".bulkAdd(): ").concat(w," of ").concat(A," operations failed"),F)})})},it.prototype.bulkPut=function(a,u,c){var f=this,p=Array.isArray(u)?u:void 0,v=(c=c||(p?void 0:u))?c.allKeys:void 0;return this._trans("readwrite",function(b){var T=f.schema.primKey,k=T.auto,T=T.keyPath;if(T&&p)throw new ye.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(p&&p.length!==a.length)throw new ye.InvalidArgument("Arguments objects and keys must have the same length");var A=a.length,T=T&&k?a.map(As(T)):a;return f.core.mutate({trans:b,type:"put",keys:p,values:T,wantResults:v}).then(function(F){var w=F.numFailures,L=F.results,x=F.lastResult,F=F.failures;if(w===0)return v?L:x;throw new pt("".concat(f.name,".bulkPut(): ").concat(w," of ").concat(A," operations failed"),F)})})},it.prototype.bulkUpdate=function(a){var u=this,c=this.core,f=a.map(function(b){return b.key}),p=a.map(function(b){return b.changes}),v=[];return this._trans("readwrite",function(b){return c.getMany({trans:b,keys:f,cache:"clone"}).then(function(k){var A=[],T=[];a.forEach(function(w,L){var x=w.key,F=w.changes,P=k[L];if(P){for(var C=0,$=Object.keys(F);C<$.length;C++){var U=$[C],V=F[U];if(U===u.schema.primKey.keyPath){if(qe(V,x)!==0)throw new ye.Constraint("Cannot update primary key in bulkUpdate()")}else oe(P,U,V)}v.push(L),A.push(x),T.push(P)}});var I=A.length;return c.mutate({trans:b,type:"put",keys:A,values:T,updates:{keys:f,changeSpecs:p}}).then(function(w){var L=w.numFailures,x=w.failures;if(L===0)return I;for(var F=0,P=Object.keys(x);F<P.length;F++){var C,$=P[F],U=v[Number($)];U!=null&&(C=x[$],delete x[$],x[U]=C)}throw new pt("".concat(u.name,".bulkUpdate(): ").concat(L," of ").concat(I," operations failed"),x)})})})},it.prototype.bulkDelete=function(a){var u=this,c=a.length;return this._trans("readwrite",function(f){return u.core.mutate({trans:f,type:"delete",keys:a})}).then(function(b){var p=b.numFailures,v=b.lastResult,b=b.failures;if(p===0)return v;throw new pt("".concat(u.name,".bulkDelete(): ").concat(p," of ").concat(c," operations failed"),b)})},it);function it(){}function gr(a){function u(b,k){if(k){for(var A=arguments.length,T=new Array(A-1);--A;)T[A-1]=arguments[A];return c[b].subscribe.apply(null,T),a}if(typeof b=="string")return c[b]}var c={};u.addEventType=v;for(var f=1,p=arguments.length;f<p;++f)v(arguments[f]);return u;function v(b,k,A){if(typeof b!="object"){var T;k=k||Ye;var I={subscribers:[],fire:A=A||Oe,subscribe:function(w){I.subscribers.indexOf(w)===-1&&(I.subscribers.push(w),I.fire=k(I.fire,w))},unsubscribe:function(w){I.subscribers=I.subscribers.filter(function(L){return L!==w}),I.fire=I.subscribers.reduce(k,A)}};return c[b]=u[b]=I}o(T=b).forEach(function(w){var L=T[w];if(l(L))v(w,T[w][0],T[w][1]);else{if(L!=="asap")throw new ye.InvalidArgument("Invalid event config");var x=v(w,wt,function(){for(var F=arguments.length,P=new Array(F);F--;)P[F]=arguments[F];x.subscribers.forEach(function(C){X(function(){C.apply(null,P)})})})}})}}function vr(a,u){return S(u).from({prototype:a}),u}function Ii(a,u){return!(a.filter||a.algorithm||a.or)&&(u?a.justLimit:!a.replayFilter)}function Oo(a,u){a.filter=ri(a.filter,u)}function xo(a,u,c){var f=a.replayFilter;a.replayFilter=f?function(){return ri(f(),u())}:u,a.justLimit=c&&!f}function Os(a,u){if(a.isPrimKey)return u.primaryKey;var c=u.getIndexByKeyPath(a.index);if(!c)throw new ye.Schema("KeyPath "+a.index+" on object store "+u.name+" is not indexed");return c}function vc(a,u,c){var f=Os(a,u.schema);return u.openCursor({trans:c,values:!a.keysOnly,reverse:a.dir==="prev",unique:!!a.unique,query:{index:f,range:a.range}})}function xs(a,u,c,f){var p=a.replayFilter?ri(a.filter,a.replayFilter()):a.filter;if(a.or){var v={},b=function(k,A,T){var I,w;p&&!p(A,T,function(L){return A.stop(L)},function(L){return A.fail(L)})||((w=""+(I=A.primaryKey))=="[object ArrayBuffer]"&&(w=""+new Uint8Array(I)),y(v,w)||(v[w]=!0,u(k,A,T)))};return Promise.all([a.or._iterate(b,c),yc(vc(a,f,c),a.algorithm,b,!a.keysOnly&&a.valueMapper)])}return yc(vc(a,f,c),ri(a.algorithm,p),u,!a.keysOnly&&a.valueMapper)}function yc(a,u,c,f){var p=st(f?function(v,b,k){return c(f(v),b,k)}:c);return a.then(function(v){if(v)return v.start(function(){var b=function(){return v.continue()};u&&!u(v,function(k){return b=k},function(k){v.stop(k),b=Oe},function(k){v.fail(k),b=Oe})||p(v.value,v,function(k){return b=k}),b()})})}var yr=(bc.prototype.execute=function(a){var u=this["@@propmod"];if(u.add!==void 0){var c=u.add;if(l(c))return r(r([],l(a)?a:[],!0),c).sort();if(typeof c=="number")return(Number(a)||0)+c;if(typeof c=="bigint")try{return BigInt(a)+c}catch{return BigInt(0)+c}throw new TypeError("Invalid term ".concat(c))}if(u.remove!==void 0){var f=u.remove;if(l(f))return l(a)?a.filter(function(p){return!f.includes(p)}).sort():[];if(typeof f=="number")return Number(a)-f;if(typeof f=="bigint")try{return BigInt(a)-f}catch{return BigInt(0)-f}throw new TypeError("Invalid subtrahend ".concat(f))}return c=(c=u.replacePrefix)===null||c===void 0?void 0:c[0],c&&typeof a=="string"&&a.startsWith(c)?u.replacePrefix[1]+a.substring(c.length):a},bc);function bc(a){this["@@propmod"]=a}var Gm=(Ke.prototype._read=function(a,u){var c=this._ctx;return c.error?c.table._trans(null,dt.bind(null,c.error)):c.table._trans("readonly",a).then(u)},Ke.prototype._write=function(a){var u=this._ctx;return u.error?u.table._trans(null,dt.bind(null,u.error)):u.table._trans("readwrite",a,"locked")},Ke.prototype._addAlgorithm=function(a){var u=this._ctx;u.algorithm=ri(u.algorithm,a)},Ke.prototype._iterate=function(a,u){return xs(this._ctx,a,u,this._ctx.table.core)},Ke.prototype.clone=function(a){var u=Object.create(this.constructor.prototype),c=Object.create(this._ctx);return a&&d(c,a),u._ctx=c,u},Ke.prototype.raw=function(){return this._ctx.valueMapper=null,this},Ke.prototype.each=function(a){var u=this._ctx;return this._read(function(c){return xs(u,a,c,u.table.core)})},Ke.prototype.count=function(a){var u=this;return this._read(function(c){var f=u._ctx,p=f.table.core;if(Ii(f,!0))return p.count({trans:c,query:{index:Os(f,p.schema),range:f.range}}).then(function(b){return Math.min(b,f.limit)});var v=0;return xs(f,function(){return++v,!1},c,p).then(function(){return v})}).then(a)},Ke.prototype.sortBy=function(a,u){var c=a.split(".").reverse(),f=c[0],p=c.length-1;function v(A,T){return T?v(A[c[T]],T-1):A[f]}var b=this._ctx.dir==="next"?1:-1;function k(A,T){return qe(v(A,p),v(T,p))*b}return this.toArray(function(A){return A.sort(k)}).then(u)},Ke.prototype.toArray=function(a){var u=this;return this._read(function(c){var f=u._ctx;if(f.dir==="next"&&Ii(f,!0)&&0<f.limit){var p=f.valueMapper,v=Os(f,f.table.core.schema);return f.table.core.query({trans:c,limit:f.limit,values:!0,query:{index:v,range:f.range}}).then(function(k){return k=k.result,p?k.map(p):k})}var b=[];return xs(f,function(k){return b.push(k)},c,f.table.core).then(function(){return b})},a)},Ke.prototype.offset=function(a){var u=this._ctx;return a<=0||(u.offset+=a,Ii(u)?xo(u,function(){var c=a;return function(f,p){return c===0||(c===1?--c:p(function(){f.advance(c),c=0}),!1)}}):xo(u,function(){var c=a;return function(){return--c<0}})),this},Ke.prototype.limit=function(a){return this._ctx.limit=Math.min(this._ctx.limit,a),xo(this._ctx,function(){var u=a;return function(c,f,p){return--u<=0&&f(p),0<=u}},!0),this},Ke.prototype.until=function(a,u){return Oo(this._ctx,function(c,f,p){return!a(c.value)||(f(p),u)}),this},Ke.prototype.first=function(a){return this.limit(1).toArray(function(u){return u[0]}).then(a)},Ke.prototype.last=function(a){return this.reverse().first(a)},Ke.prototype.filter=function(a){var u;return Oo(this._ctx,function(c){return a(c.value)}),(u=this._ctx).isMatch=ri(u.isMatch,a),this},Ke.prototype.and=function(a){return this.filter(a)},Ke.prototype.or=function(a){return new this.db.WhereClause(this._ctx.table,a,this)},Ke.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},Ke.prototype.desc=function(){return this.reverse()},Ke.prototype.eachKey=function(a){var u=this._ctx;return u.keysOnly=!u.isMatch,this.each(function(c,f){a(f.key,f)})},Ke.prototype.eachUniqueKey=function(a){return this._ctx.unique="unique",this.eachKey(a)},Ke.prototype.eachPrimaryKey=function(a){var u=this._ctx;return u.keysOnly=!u.isMatch,this.each(function(c,f){a(f.primaryKey,f)})},Ke.prototype.keys=function(a){var u=this._ctx;u.keysOnly=!u.isMatch;var c=[];return this.each(function(f,p){c.push(p.key)}).then(function(){return c}).then(a)},Ke.prototype.primaryKeys=function(a){var u=this._ctx;if(u.dir==="next"&&Ii(u,!0)&&0<u.limit)return this._read(function(f){var p=Os(u,u.table.core.schema);return u.table.core.query({trans:f,values:!1,limit:u.limit,query:{index:p,range:u.range}})}).then(function(f){return f.result}).then(a);u.keysOnly=!u.isMatch;var c=[];return this.each(function(f,p){c.push(p.primaryKey)}).then(function(){return c}).then(a)},Ke.prototype.uniqueKeys=function(a){return this._ctx.unique="unique",this.keys(a)},Ke.prototype.firstKey=function(a){return this.limit(1).keys(function(u){return u[0]}).then(a)},Ke.prototype.lastKey=function(a){return this.reverse().firstKey(a)},Ke.prototype.distinct=function(){var a=this._ctx,a=a.index&&a.table.schema.idxByName[a.index];if(!a||!a.multi)return this;var u={};return Oo(this._ctx,function(p){var f=p.primaryKey.toString(),p=y(u,f);return u[f]=!0,!p}),this},Ke.prototype.modify=function(a){var u=this,c=this._ctx;return this._write(function(f){var p,v,b;b=typeof a=="function"?a:(p=o(a),v=p.length,function(C){for(var $=!1,U=0;U<v;++U){var V=p[U],G=a[V],re=ne(C,V);G instanceof yr?(oe(C,V,G.execute(re)),$=!0):re!==G&&(oe(C,V,G),$=!0)}return $});var k=c.table.core,w=k.schema.primaryKey,A=w.outbound,T=w.extractKey,I=200,w=u.db._options.modifyChunkSize;w&&(I=typeof w=="object"?w[k.name]||w["*"]||200:w);function L(C,V){var U=V.failures,V=V.numFailures;F+=C-V;for(var G=0,re=o(U);G<re.length;G++){var fe=re[G];x.push(U[fe])}}var x=[],F=0,P=[];return u.clone().primaryKeys().then(function(C){function $(V){var G=Math.min(I,C.length-V);return k.getMany({trans:f,keys:C.slice(V,V+G),cache:"immutable"}).then(function(re){for(var fe=[],se=[],le=A?[]:null,pe=[],de=0;de<G;++de){var be=re[de],De={value:Ve(be),primKey:C[V+de]};b.call(De,De.value,De)!==!1&&(De.value==null?pe.push(C[V+de]):A||qe(T(be),T(De.value))===0?(se.push(De.value),A&&le.push(C[V+de])):(pe.push(C[V+de]),fe.push(De.value)))}return Promise.resolve(0<fe.length&&k.mutate({trans:f,type:"add",values:fe}).then(function(Be){for(var Ue in Be.failures)pe.splice(parseInt(Ue),1);L(fe.length,Be)})).then(function(){return(0<se.length||U&&typeof a=="object")&&k.mutate({trans:f,type:"put",keys:le,values:se,criteria:U,changeSpec:typeof a!="function"&&a,isAdditionalChunk:0<V}).then(function(Be){return L(se.length,Be)})}).then(function(){return(0<pe.length||U&&a===To)&&k.mutate({trans:f,type:"delete",keys:pe,criteria:U,isAdditionalChunk:0<V}).then(function(Be){return L(pe.length,Be)})}).then(function(){return C.length>V+G&&$(V+I)})})}var U=Ii(c)&&c.limit===1/0&&(typeof a!="function"||a===To)&&{index:c.index,range:c.range};return $(0).then(function(){if(0<x.length)throw new H("Error modifying one or more objects",x,F,P);return C.length})})})},Ke.prototype.delete=function(){var a=this._ctx,u=a.range;return Ii(a)&&(a.isPrimKey||u.type===3)?this._write(function(c){var f=a.table.core.schema.primaryKey,p=u;return a.table.core.count({trans:c,query:{index:f,range:p}}).then(function(v){return a.table.core.mutate({trans:c,type:"deleteRange",range:p}).then(function(b){var k=b.failures;if(b.lastResult,b.results,b=b.numFailures,b)throw new H("Could not delete some values",Object.keys(k).map(function(A){return k[A]}),v-b);return v-b})})}):this.modify(To)},Ke);function Ke(){}var To=function(a,u){return u.value=null};function Wm(a,u){return a<u?-1:a===u?0:1}function Jm(a,u){return u<a?-1:a===u?0:1}function $t(a,u,c){return a=a instanceof _c?new a.Collection(a):a,a._ctx.error=new(c||TypeError)(u),a}function Di(a){return new a.Collection(a,function(){return kc("")}).limit(0)}function Ts(a,u,c,f){var p,v,b,k,A,T,I,w=c.length;if(!c.every(function(F){return typeof F=="string"}))return $t(a,dc);function L(F){p=F==="next"?function(C){return C.toUpperCase()}:function(C){return C.toLowerCase()},v=F==="next"?function(C){return C.toLowerCase()}:function(C){return C.toUpperCase()},b=F==="next"?Wm:Jm;var P=c.map(function(C){return{lower:v(C),upper:p(C)}}).sort(function(C,$){return b(C.lower,$.lower)});k=P.map(function(C){return C.upper}),A=P.map(function(C){return C.lower}),I=(T=F)==="next"?"":f}L("next"),a=new a.Collection(a,function(){return Ln(k[0],A[w-1]+f)}),a._ondirectionchange=function(F){L(F)};var x=0;return a._addAlgorithm(function(F,P,C){var $=F.key;if(typeof $!="string")return!1;var U=v($);if(u(U,A,x))return!0;for(var V=null,G=x;G<w;++G){var re=function(fe,se,le,pe,de,be){for(var De=Math.min(fe.length,pe.length),Be=-1,Ue=0;Ue<De;++Ue){var Mt=se[Ue];if(Mt!==pe[Ue])return de(fe[Ue],le[Ue])<0?fe.substr(0,Ue)+le[Ue]+le.substr(Ue+1):de(fe[Ue],pe[Ue])<0?fe.substr(0,Ue)+pe[Ue]+le.substr(Ue+1):0<=Be?fe.substr(0,Be)+se[Be]+le.substr(Be+1):null;de(fe[Ue],Mt)<0&&(Be=Ue)}return De<pe.length&&be==="next"?fe+le.substr(fe.length):De<fe.length&&be==="prev"?fe.substr(0,le.length):Be<0?null:fe.substr(0,Be)+pe[Be]+le.substr(Be+1)}($,U,k[G],A[G],b,T);re===null&&V===null?x=G+1:(V===null||0<b(V,re))&&(V=re)}return P(V!==null?function(){F.continue(V+I)}:C),!1}),a}function Ln(a,u,c,f){return{type:2,lower:a,upper:u,lowerOpen:c,upperOpen:f}}function kc(a){return{type:1,lower:a,upper:a}}var _c=(Object.defineProperty(kt.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),kt.prototype.between=function(a,u,c,f){c=c!==!1,f=f===!0;try{return 0<this._cmp(a,u)||this._cmp(a,u)===0&&(c||f)&&(!c||!f)?Di(this):new this.Collection(this,function(){return Ln(a,u,!c,!f)})}catch{return $t(this,yn)}},kt.prototype.equals=function(a){return a==null?$t(this,yn):new this.Collection(this,function(){return kc(a)})},kt.prototype.above=function(a){return a==null?$t(this,yn):new this.Collection(this,function(){return Ln(a,void 0,!0)})},kt.prototype.aboveOrEqual=function(a){return a==null?$t(this,yn):new this.Collection(this,function(){return Ln(a,void 0,!1)})},kt.prototype.below=function(a){return a==null?$t(this,yn):new this.Collection(this,function(){return Ln(void 0,a,!1,!0)})},kt.prototype.belowOrEqual=function(a){return a==null?$t(this,yn):new this.Collection(this,function(){return Ln(void 0,a)})},kt.prototype.startsWith=function(a){return typeof a!="string"?$t(this,dc):this.between(a,a+ii,!0,!0)},kt.prototype.startsWithIgnoreCase=function(a){return a===""?this.startsWith(a):Ts(this,function(u,c){return u.indexOf(c[0])===0},[a],ii)},kt.prototype.equalsIgnoreCase=function(a){return Ts(this,function(u,c){return u===c[0]},[a],"")},kt.prototype.anyOfIgnoreCase=function(){var a=B.apply(ae,arguments);return a.length===0?Di(this):Ts(this,function(u,c){return c.indexOf(u)!==-1},a,"")},kt.prototype.startsWithAnyOfIgnoreCase=function(){var a=B.apply(ae,arguments);return a.length===0?Di(this):Ts(this,function(u,c){return c.some(function(f){return u.indexOf(f)===0})},a,ii)},kt.prototype.anyOf=function(){var a=this,u=B.apply(ae,arguments),c=this._cmp;try{u.sort(c)}catch{return $t(this,yn)}if(u.length===0)return Di(this);var f=new this.Collection(this,function(){return Ln(u[0],u[u.length-1])});f._ondirectionchange=function(v){c=v==="next"?a._ascending:a._descending,u.sort(c)};var p=0;return f._addAlgorithm(function(v,b,k){for(var A=v.key;0<c(A,u[p]);)if(++p===u.length)return b(k),!1;return c(A,u[p])===0||(b(function(){v.continue(u[p])}),!1)}),f},kt.prototype.notEqual=function(a){return this.inAnyRange([[-1/0,a],[a,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},kt.prototype.noneOf=function(){var a=B.apply(ae,arguments);if(a.length===0)return new this.Collection(this);try{a.sort(this._ascending)}catch{return $t(this,yn)}var u=a.reduce(function(c,f){return c?c.concat([[c[c.length-1][1],f]]):[[-1/0,f]]},null);return u.push([a[a.length-1],this.db._maxKey]),this.inAnyRange(u,{includeLowers:!1,includeUppers:!1})},kt.prototype.inAnyRange=function($,u){var c=this,f=this._cmp,p=this._ascending,v=this._descending,b=this._min,k=this._max;if($.length===0)return Di(this);if(!$.every(function(U){return U[0]!==void 0&&U[1]!==void 0&&p(U[0],U[1])<=0}))return $t(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",ye.InvalidArgument);var A=!u||u.includeLowers!==!1,T=u&&u.includeUppers===!0,I,w=p;function L(U,V){return w(U[0],V[0])}try{(I=$.reduce(function(U,V){for(var G=0,re=U.length;G<re;++G){var fe=U[G];if(f(V[0],fe[1])<0&&0<f(V[1],fe[0])){fe[0]=b(fe[0],V[0]),fe[1]=k(fe[1],V[1]);break}}return G===re&&U.push(V),U},[])).sort(L)}catch{return $t(this,yn)}var x=0,F=T?function(U){return 0<p(U,I[x][1])}:function(U){return 0<=p(U,I[x][1])},P=A?function(U){return 0<v(U,I[x][0])}:function(U){return 0<=v(U,I[x][0])},C=F,$=new this.Collection(this,function(){return Ln(I[0][0],I[I.length-1][1],!A,!T)});return $._ondirectionchange=function(U){w=U==="next"?(C=F,p):(C=P,v),I.sort(L)},$._addAlgorithm(function(U,V,G){for(var re,fe=U.key;C(fe);)if(++x===I.length)return V(G),!1;return!F(re=fe)&&!P(re)||(c._cmp(fe,I[x][1])===0||c._cmp(fe,I[x][0])===0||V(function(){w===p?U.continue(I[x][0]):U.continue(I[x][1])}),!1)}),$},kt.prototype.startsWithAnyOf=function(){var a=B.apply(ae,arguments);return a.every(function(u){return typeof u=="string"})?a.length===0?Di(this):this.inAnyRange(a.map(function(u){return[u,u+ii]})):$t(this,"startsWithAnyOf() only works with strings")},kt);function kt(){}function un(a){return st(function(u){return br(u),a(u.target.error),!1})}function br(a){a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault()}var kr="storagemutated",Co="x-storagemutated-1",$n=gr(null,kr),Ym=(ln.prototype._lock=function(){return z(!Ee.global),++this._reculock,this._reculock!==1||Ee.global||(Ee.lockOwnerFor=this),this},ln.prototype._unlock=function(){if(z(!Ee.global),--this._reculock==0)for(Ee.global||(Ee.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var a=this._blockedFuncs.shift();try{ni(a[1],a[0])}catch{}}return this},ln.prototype._locked=function(){return this._reculock&&Ee.lockOwnerFor!==this},ln.prototype.create=function(a){var u=this;if(!this.mode)return this;var c=this.db.idbdb,f=this.db._state.dbOpenError;if(z(!this.idbtrans),!a&&!c)switch(f&&f.name){case"DatabaseClosedError":throw new ye.DatabaseClosed(f);case"MissingAPIError":throw new ye.MissingAPI(f.message,f);default:throw new ye.OpenFailed(f)}if(!this.active)throw new ye.TransactionInactive;return z(this._completion._state===null),(a=this.idbtrans=a||(this.db.core||c).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=st(function(p){br(p),u._reject(a.error)}),a.onabort=st(function(p){br(p),u.active&&u._reject(new ye.Abort(a.error)),u.active=!1,u.on("abort").fire(p)}),a.oncomplete=st(function(){u.active=!1,u._resolve(),"mutatedParts"in a&&$n.storagemutated.fire(a.mutatedParts)}),this},ln.prototype._promise=function(a,u,c){var f=this;if(a==="readwrite"&&this.mode!=="readwrite")return dt(new ye.ReadOnly("Transaction is readonly"));if(!this.active)return dt(new ye.TransactionInactive);if(this._locked())return new ge(function(v,b){f._blockedFuncs.push([function(){f._promise(a,u,c).then(v,b)},Ee])});if(c)return In(function(){var v=new ge(function(b,k){f._lock();var A=u(b,k,f);A&&A.then&&A.then(b,k)});return v.finally(function(){return f._unlock()}),v._lib=!0,v});var p=new ge(function(v,b){var k=u(v,b,f);k&&k.then&&k.then(v,b)});return p._lib=!0,p},ln.prototype._root=function(){return this.parent?this.parent._root():this},ln.prototype.waitFor=function(a){var u,c=this._root(),f=ge.resolve(a);c._waitingFor?c._waitingFor=c._waitingFor.then(function(){return f}):(c._waitingFor=f,c._waitingQueue=[],u=c.idbtrans.objectStore(c.storeNames[0]),function v(){for(++c._spinCount;c._waitingQueue.length;)c._waitingQueue.shift()();c._waitingFor&&(u.get(-1/0).onsuccess=v)}());var p=c._waitingFor;return new ge(function(v,b){f.then(function(k){return c._waitingQueue.push(st(v.bind(null,k)))},function(k){return c._waitingQueue.push(st(b.bind(null,k)))}).finally(function(){c._waitingFor===p&&(c._waitingFor=null)})})},ln.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new ye.Abort))},ln.prototype.table=function(a){var u=this._memoizedTables||(this._memoizedTables={});if(y(u,a))return u[a];var c=this.schema[a];if(!c)throw new ye.NotFound("Table "+a+" not part of transaction");return c=new this.db.Table(a,c,this),c.core=this.db.core.table(a),u[a]=c},ln);function ln(){}function Ro(a,u,c,f,p,v,b){return{name:a,keyPath:u,unique:c,multi:f,auto:p,compound:v,src:(c&&!b?"&":"")+(f?"*":"")+(p?"++":"")+wc(u)}}function wc(a){return typeof a=="string"?a:a?"["+[].join.call(a,"+")+"]":""}function Fo(a,u,c){return{name:a,primKey:u,indexes:c,mappedClass:null,idxByName:(f=function(p){return[p.name,p]},c.reduce(function(p,v,b){return b=f(v,b),b&&(p[b[0]]=b[1]),p},{}))};var f}var _r=function(a){try{return a.only([[]]),_r=function(){return[[]]},[[]]}catch{return _r=function(){return ii},ii}};function Io(a){return a==null?function(){}:typeof a=="string"?(u=a).split(".").length===1?function(c){return c[u]}:function(c){return ne(c,u)}:function(c){return ne(c,a)};var u}function Sc(a){return[].slice.call(a)}var Xm=0;function wr(a){return a==null?":id":typeof a=="string"?a:"[".concat(a.join("+"),"]")}function Qm(a,u,A){function f(C){if(C.type===3)return null;if(C.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var x=C.lower,F=C.upper,P=C.lowerOpen,C=C.upperOpen;return x===void 0?F===void 0?null:u.upperBound(F,!!C):F===void 0?u.lowerBound(x,!!P):u.bound(x,F,!!P,!!C)}function p(L){var x,F=L.name;return{name:F,schema:L,mutate:function(P){var C=P.trans,$=P.type,U=P.keys,V=P.values,G=P.range;return new Promise(function(re,fe){re=st(re);var se=C.objectStore(F),le=se.keyPath==null,pe=$==="put"||$==="add";if(!pe&&$!=="delete"&&$!=="deleteRange")throw new Error("Invalid operation type: "+$);var de,be=(U||V||{length:1}).length;if(U&&V&&U.length!==V.length)throw new Error("Given keys array must have same length as given values array.");if(be===0)return re({numFailures:0,failures:{},results:[],lastResult:void 0});function De(Ct){++Mt,br(Ct)}var Be=[],Ue=[],Mt=0;if($==="deleteRange"){if(G.type===4)return re({numFailures:Mt,failures:Ue,results:[],lastResult:void 0});G.type===3?Be.push(de=se.clear()):Be.push(de=se.delete(f(G)))}else{var le=pe?le?[V,U]:[V,null]:[U,null],Ie=le[0],At=le[1];if(pe)for(var Ot=0;Ot<be;++Ot)Be.push(de=At&&At[Ot]!==void 0?se[$](Ie[Ot],At[Ot]):se[$](Ie[Ot])),de.onerror=De;else for(Ot=0;Ot<be;++Ot)Be.push(de=se[$](Ie[Ot])),de.onerror=De}function Vs(Ct){Ct=Ct.target.result,Be.forEach(function(oi,Xo){return oi.error!=null&&(Ue[Xo]=oi.error)}),re({numFailures:Mt,failures:Ue,results:$==="delete"?U:Be.map(function(oi){return oi.result}),lastResult:Ct})}de.onerror=function(Ct){De(Ct),Vs(Ct)},de.onsuccess=Vs})},getMany:function(P){var C=P.trans,$=P.keys;return new Promise(function(U,V){U=st(U);for(var G,re=C.objectStore(F),fe=$.length,se=new Array(fe),le=0,pe=0,de=function(Be){Be=Be.target,se[Be._pos]=Be.result,++pe===le&&U(se)},be=un(V),De=0;De<fe;++De)$[De]!=null&&((G=re.get($[De]))._pos=De,G.onsuccess=de,G.onerror=be,++le);le===0&&U(se)})},get:function(P){var C=P.trans,$=P.key;return new Promise(function(U,V){U=st(U);var G=C.objectStore(F).get($);G.onsuccess=function(re){return U(re.target.result)},G.onerror=un(V)})},query:(x=T,function(P){return new Promise(function(C,$){C=st(C);var U,V,G,le=P.trans,re=P.values,fe=P.limit,de=P.query,se=fe===1/0?void 0:fe,pe=de.index,de=de.range,le=le.objectStore(F),pe=pe.isPrimaryKey?le:le.index(pe.name),de=f(de);if(fe===0)return C({result:[]});x?((se=re?pe.getAll(de,se):pe.getAllKeys(de,se)).onsuccess=function(be){return C({result:be.target.result})},se.onerror=un($)):(U=0,V=!re&&"openKeyCursor"in pe?pe.openKeyCursor(de):pe.openCursor(de),G=[],V.onsuccess=function(be){var De=V.result;return De?(G.push(re?De.value:De.primaryKey),++U===fe?C({result:G}):void De.continue()):C({result:G})},V.onerror=un($))})}),openCursor:function(P){var C=P.trans,$=P.values,U=P.query,V=P.reverse,G=P.unique;return new Promise(function(re,fe){re=st(re);var pe=U.index,se=U.range,le=C.objectStore(F),le=pe.isPrimaryKey?le:le.index(pe.name),pe=V?G?"prevunique":"prev":G?"nextunique":"next",de=!$&&"openKeyCursor"in le?le.openKeyCursor(f(se),pe):le.openCursor(f(se),pe);de.onerror=un(fe),de.onsuccess=st(function(be){var De,Be,Ue,Mt,Ie=de.result;Ie?(Ie.___id=++Xm,Ie.done=!1,De=Ie.continue.bind(Ie),Be=(Be=Ie.continuePrimaryKey)&&Be.bind(Ie),Ue=Ie.advance.bind(Ie),Mt=function(){throw new Error("Cursor not stopped")},Ie.trans=C,Ie.stop=Ie.continue=Ie.continuePrimaryKey=Ie.advance=function(){throw new Error("Cursor not started")},Ie.fail=st(fe),Ie.next=function(){var At=this,Ot=1;return this.start(function(){return Ot--?At.continue():At.stop()}).then(function(){return At})},Ie.start=function(At){function Ot(){if(de.result)try{At()}catch(Ct){Ie.fail(Ct)}else Ie.done=!0,Ie.start=function(){throw new Error("Cursor behind last entry")},Ie.stop()}var Vs=new Promise(function(Ct,oi){Ct=st(Ct),de.onerror=un(oi),Ie.fail=oi,Ie.stop=function(Xo){Ie.stop=Ie.continue=Ie.continuePrimaryKey=Ie.advance=Mt,Ct(Xo)}});return de.onsuccess=st(function(Ct){de.onsuccess=Ot,Ot()}),Ie.continue=De,Ie.continuePrimaryKey=Be,Ie.advance=Ue,Ot(),Vs},re(Ie)):re(null)},fe)})},count:function(P){var C=P.query,$=P.trans,U=C.index,V=C.range;return new Promise(function(G,re){var fe=$.objectStore(F),se=U.isPrimaryKey?fe:fe.index(U.name),fe=f(V),se=fe?se.count(fe):se.count();se.onsuccess=st(function(le){return G(le.target.result)}),se.onerror=un(re)})}}}var v,b,k,I=(b=A,k=Sc((v=a).objectStoreNames),{schema:{name:v.name,tables:k.map(function(L){return b.objectStore(L)}).map(function(L){var x=L.keyPath,C=L.autoIncrement,F=l(x),P={},C={name:L.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:x==null,compound:F,keyPath:x,autoIncrement:C,unique:!0,extractKey:Io(x)},indexes:Sc(L.indexNames).map(function($){return L.index($)}).map(function(G){var U=G.name,V=G.unique,re=G.multiEntry,G=G.keyPath,re={name:U,compound:l(G),keyPath:G,unique:V,multiEntry:re,extractKey:Io(G)};return P[wr(G)]=re}),getIndexByKeyPath:function($){return P[wr($)]}};return P[":id"]=C.primaryKey,x!=null&&(P[wr(x)]=C.primaryKey),C})},hasGetAll:0<k.length&&"getAll"in b.objectStore(k[0])&&!(typeof navigator!="undefined"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),A=I.schema,T=I.hasGetAll,I=A.tables.map(p),w={};return I.forEach(function(L){return w[L.name]=L}),{stack:"dbcore",transaction:a.transaction.bind(a),table:function(L){if(!w[L])throw new Error("Table '".concat(L,"' not found"));return w[L]},MIN_KEY:-1/0,MAX_KEY:_r(u),schema:A}}function Zm(a,u,c,f){var p=c.IDBKeyRange;return c.indexedDB,{dbcore:(f=Qm(u,p,f),a.dbcore.reduce(function(v,b){return b=b.create,i(i({},v),b(v))},f))}}function Cs(a,f){var c=f.db,f=Zm(a._middlewares,c,a._deps,f);a.core=f.dbcore,a.tables.forEach(function(p){var v=p.name;a.core.schema.tables.some(function(b){return b.name===v})&&(p.core=a.core.table(v),a[v]instanceof a.Table&&(a[v].core=p.core))})}function Rs(a,u,c,f){c.forEach(function(p){var v=f[p];u.forEach(function(b){var k=function A(T,I){return E(T,I)||(T=h(T))&&A(T,I)}(b,p);(!k||"value"in k&&k.value===void 0)&&(b===a.Transaction.prototype||b instanceof a.Transaction?_(b,p,{get:function(){return this.table(p)},set:function(A){O(this,p,{value:A,writable:!0,configurable:!0,enumerable:!0})}}):b[p]=new a.Table(p,v))})})}function Do(a,u){u.forEach(function(c){for(var f in c)c[f]instanceof a.Table&&delete c[f]})}function eg(a,u){return a._cfg.version-u._cfg.version}function tg(a,u,c,f){var p=a._dbSchema;c.objectStoreNames.contains("$meta")&&!p.$meta&&(p.$meta=Fo("$meta",Nc("")[0],[]),a._storeNames.push("$meta"));var v=a._createTransaction("readwrite",a._storeNames,p);v.create(c),v._completion.catch(f);var b=v._reject.bind(v),k=Ee.transless||Ee;In(function(){return Ee.trans=v,Ee.transless=k,u!==0?(Cs(a,c),T=u,((A=v).storeNames.includes("$meta")?A.table("$meta").get("version").then(function(I){return I!=null?I:T}):ge.resolve(T)).then(function(I){return L=I,x=v,F=c,P=[],I=(w=a)._versions,C=w._dbSchema=Is(0,w.idbdb,F),(I=I.filter(function($){return $._cfg.version>=L})).length!==0?(I.forEach(function($){P.push(function(){var U=C,V=$._cfg.dbschema;Ds(w,U,F),Ds(w,V,F),C=w._dbSchema=V;var G=Po(U,V);G.add.forEach(function(pe){Lo(F,pe[0],pe[1].primKey,pe[1].indexes)}),G.change.forEach(function(pe){if(pe.recreate)throw new ye.Upgrade("Not yet support for changing primary key");var de=F.objectStore(pe.name);pe.add.forEach(function(be){return Fs(de,be)}),pe.change.forEach(function(be){de.deleteIndex(be.name),Fs(de,be)}),pe.del.forEach(function(be){return de.deleteIndex(be)})});var re=$._cfg.contentUpgrade;if(re&&$._cfg.version>L){Cs(w,F),x._memoizedTables={};var fe=Se(V);G.del.forEach(function(pe){fe[pe]=U[pe]}),Do(w,[w.Transaction.prototype]),Rs(w,[w.Transaction.prototype],o(fe),fe),x.schema=fe;var se,le=Fe(re);return le&&Ri(),G=ge.follow(function(){var pe;(se=re(x))&&le&&(pe=Dn.bind(null,null),se.then(pe,pe))}),se&&typeof se.then=="function"?ge.resolve(se):G.then(function(){return se})}}),P.push(function(U){var V,G,re=$._cfg.dbschema;V=re,G=U,[].slice.call(G.db.objectStoreNames).forEach(function(fe){return V[fe]==null&&G.db.deleteObjectStore(fe)}),Do(w,[w.Transaction.prototype]),Rs(w,[w.Transaction.prototype],w._storeNames,w._dbSchema),x.schema=w._dbSchema}),P.push(function(U){w.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(w.idbdb.version/10)===$._cfg.version?(w.idbdb.deleteObjectStore("$meta"),delete w._dbSchema.$meta,w._storeNames=w._storeNames.filter(function(V){return V!=="$meta"})):U.objectStore("$meta").put($._cfg.version,"version"))})}),function $(){return P.length?ge.resolve(P.shift()(x.idbtrans)).then($):ge.resolve()}().then(function(){Ec(C,F)})):ge.resolve();var w,L,x,F,P,C}).catch(b)):(o(p).forEach(function(I){Lo(c,I,p[I].primKey,p[I].indexes)}),Cs(a,c),void ge.follow(function(){return a.on.populate.fire(v)}).catch(b));var A,T})}function ng(a,u){Ec(a._dbSchema,u),u.db.version%10!=0||u.objectStoreNames.contains("$meta")||u.db.createObjectStore("$meta").add(Math.ceil(u.db.version/10-1),"version");var c=Is(0,a.idbdb,u);Ds(a,a._dbSchema,u);for(var f=0,p=Po(c,a._dbSchema).change;f<p.length;f++){var v=function(b){if(b.change.length||b.recreate)return console.warn("Unable to patch indexes of table ".concat(b.name," because it has changes on the type of index or primary key.")),{value:void 0};var k=u.objectStore(b.name);b.add.forEach(function(A){Te&&console.debug("Dexie upgrade patch: Creating missing index ".concat(b.name,".").concat(A.src)),Fs(k,A)})}(p[f]);if(typeof v=="object")return v.value}}function Po(a,u){var c,f={del:[],add:[],change:[]};for(c in a)u[c]||f.del.push(c);for(c in u){var p=a[c],v=u[c];if(p){var b={name:c,def:v,recreate:!1,del:[],add:[],change:[]};if(""+(p.primKey.keyPath||"")!=""+(v.primKey.keyPath||"")||p.primKey.auto!==v.primKey.auto)b.recreate=!0,f.change.push(b);else{var k=p.idxByName,A=v.idxByName,T=void 0;for(T in k)A[T]||b.del.push(T);for(T in A){var I=k[T],w=A[T];I?I.src!==w.src&&b.change.push(w):b.add.push(w)}(0<b.del.length||0<b.add.length||0<b.change.length)&&f.change.push(b)}}else f.add.push([c,v])}return f}function Lo(a,u,c,f){var p=a.db.createObjectStore(u,c.keyPath?{keyPath:c.keyPath,autoIncrement:c.auto}:{autoIncrement:c.auto});return f.forEach(function(v){return Fs(p,v)}),p}function Ec(a,u){o(a).forEach(function(c){u.db.objectStoreNames.contains(c)||(Te&&console.debug("Dexie: Creating missing table",c),Lo(u,c,a[c].primKey,a[c].indexes))})}function Fs(a,u){a.createIndex(u.name,u.keyPath,{unique:u.unique,multiEntry:u.multi})}function Is(a,u,c){var f={};return j(u.objectStoreNames,0).forEach(function(p){for(var v=c.objectStore(p),b=Ro(wc(T=v.keyPath),T||"",!0,!1,!!v.autoIncrement,T&&typeof T!="string",!0),k=[],A=0;A<v.indexNames.length;++A){var I=v.index(v.indexNames[A]),T=I.keyPath,I=Ro(I.name,T,!!I.unique,!!I.multiEntry,!1,T&&typeof T!="string",!1);k.push(I)}f[p]=Fo(p,b,k)}),f}function Ds(a,u,c){for(var f=c.db.objectStoreNames,p=0;p<f.length;++p){var v=f[p],b=c.objectStore(v);a._hasGetAll="getAll"in b;for(var k=0;k<b.indexNames.length;++k){var A=b.indexNames[k],T=b.index(A).keyPath,I=typeof T=="string"?T:"["+j(T).join("+")+"]";!u[v]||(T=u[v].idxByName[I])&&(T.name=A,delete u[v].idxByName[I],u[v].idxByName[A]=T)}}typeof navigator!="undefined"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&s.WorkerGlobalScope&&s instanceof s.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(a._hasGetAll=!1)}function Nc(a){return a.split(",").map(function(u,c){var f=(u=u.trim()).replace(/([&*]|\+\+)/g,""),p=/^\[/.test(f)?f.match(/^\[(.*)\]$/)[1].split("+"):f;return Ro(f,p||null,/\&/.test(u),/\*/.test(u),/\+\+/.test(u),l(p),c===0)})}var ig=(Ps.prototype._parseStoresSpec=function(a,u){o(a).forEach(function(c){if(a[c]!==null){var f=Nc(a[c]),p=f.shift();if(p.unique=!0,p.multi)throw new ye.Schema("Primary key cannot be multi-valued");f.forEach(function(v){if(v.auto)throw new ye.Schema("Only primary key can be marked as autoIncrement (++)");if(!v.keyPath)throw new ye.Schema("Index must have a name and cannot be an empty string")}),u[c]=Fo(c,p,f)}})},Ps.prototype.stores=function(c){var u=this.db;this._cfg.storesSource=this._cfg.storesSource?d(this._cfg.storesSource,c):c;var c=u._versions,f={},p={};return c.forEach(function(v){d(f,v._cfg.storesSource),p=v._cfg.dbschema={},v._parseStoresSpec(f,p)}),u._dbSchema=p,Do(u,[u._allTables,u,u.Transaction.prototype]),Rs(u,[u._allTables,u,u.Transaction.prototype,this._cfg.tables],o(p),p),u._storeNames=o(p),this},Ps.prototype.upgrade=function(a){return this._cfg.contentUpgrade=ue(this._cfg.contentUpgrade||Oe,a),this},Ps);function Ps(){}function $o(a,u){var c=a._dbNamesDB;return c||(c=a._dbNamesDB=new bn(Ns,{addons:[],indexedDB:a,IDBKeyRange:u})).version(1).stores({dbnames:"name"}),c.table("dbnames")}function Mo(a){return a&&typeof a.databases=="function"}function Bo(a){return In(function(){return Ee.letThrough=!0,a()})}function Uo(a){return!("from"in a)}var Nt=function(a,u){if(!this){var c=new Nt;return a&&"d"in a&&d(c,a),c}d(this,arguments.length?{d:1,from:a,to:1<arguments.length?u:a}:{d:0})};function Sr(a,u,c){var f=qe(u,c);if(!isNaN(f)){if(0<f)throw RangeError();if(Uo(a))return d(a,{from:u,to:c,d:1});var p=a.l,f=a.r;if(qe(c,a.from)<0)return p?Sr(p,u,c):a.l={from:u,to:c,d:1,l:null,r:null},Oc(a);if(0<qe(u,a.to))return f?Sr(f,u,c):a.r={from:u,to:c,d:1,l:null,r:null},Oc(a);qe(u,a.from)<0&&(a.from=u,a.l=null,a.d=f?f.d+1:1),0<qe(c,a.to)&&(a.to=c,a.r=null,a.d=a.l?a.l.d+1:1),c=!a.r,p&&!a.l&&Er(a,p),f&&c&&Er(a,f)}}function Er(a,u){Uo(u)||function c(f,A){var v=A.from,b=A.to,k=A.l,A=A.r;Sr(f,v,b),k&&c(f,k),A&&c(f,A)}(a,u)}function Ac(a,u){var c=Ls(u),f=c.next();if(f.done)return!1;for(var p=f.value,v=Ls(a),b=v.next(p.from),k=b.value;!f.done&&!b.done;){if(qe(k.from,p.to)<=0&&0<=qe(k.to,p.from))return!0;qe(p.from,k.from)<0?p=(f=c.next(k.from)).value:k=(b=v.next(p.from)).value}return!1}function Ls(a){var u=Uo(a)?null:{s:0,n:a};return{next:function(c){for(var f=0<arguments.length;u;)switch(u.s){case 0:if(u.s=1,f)for(;u.n.l&&qe(c,u.n.from)<0;)u={up:u,n:u.n.l,s:1};else for(;u.n.l;)u={up:u,n:u.n.l,s:1};case 1:if(u.s=2,!f||qe(c,u.n.to)<=0)return{value:u.n,done:!1};case 2:if(u.n.r){u.s=3,u={up:u,n:u.n.r,s:0};continue}case 3:u=u.up}return{done:!0}}}}function Oc(a){var u,c,f=(((u=a.r)===null||u===void 0?void 0:u.d)||0)-(((c=a.l)===null||c===void 0?void 0:c.d)||0),p=1<f?"r":f<-1?"l":"";p&&(u=p=="r"?"l":"r",c=i({},a),f=a[p],a.from=f.from,a.to=f.to,a[p]=f[p],c[p]=f[u],(a[u]=c).d=xc(c)),a.d=xc(a)}function xc(c){var u=c.r,c=c.l;return(u?c?Math.max(u.d,c.d):u.d:c?c.d:0)+1}function $s(a,u){return o(u).forEach(function(c){a[c]?Er(a[c],u[c]):a[c]=function f(p){var v,b,k={};for(v in p)y(p,v)&&(b=p[v],k[v]=!b||typeof b!="object"||Ne.has(b.constructor)?b:f(b));return k}(u[c])}),a}function jo(a,u){return a.all||u.all||Object.keys(a).some(function(c){return u[c]&&Ac(u[c],a[c])})}g(Nt.prototype,((zt={add:function(a){return Er(this,a),this},addKey:function(a){return Sr(this,a,a),this},addKeys:function(a){var u=this;return a.forEach(function(c){return Sr(u,c,c)}),this},hasKey:function(a){var u=Ls(this).next(a).value;return u&&qe(u.from,a)<=0&&0<=qe(u.to,a)}})[K]=function(){return Ls(this)},zt));var si={},Vo={},Ho=!1;function Ms(a){$s(Vo,a),Ho||(Ho=!0,setTimeout(function(){Ho=!1,qo(Vo,!(Vo={}))},0))}function qo(a,u){u===void 0&&(u=!1);var c=new Set;if(a.all)for(var f=0,p=Object.values(si);f<p.length;f++)Tc(b=p[f],a,c,u);else for(var v in a){var b,k=/^idb\:\/\/(.*)\/(.*)\//.exec(v);k&&(v=k[1],k=k[2],(b=si["idb://".concat(v,"/").concat(k)])&&Tc(b,a,c,u))}c.forEach(function(A){return A()})}function Tc(a,u,c,f){for(var p=[],v=0,b=Object.entries(a.queries.query);v<b.length;v++){for(var k=b[v],A=k[0],T=[],I=0,w=k[1];I<w.length;I++){var L=w[I];jo(u,L.obsSet)?L.subscribers.forEach(function(C){return c.add(C)}):f&&T.push(L)}f&&p.push([A,T])}if(f)for(var x=0,F=p;x<F.length;x++){var P=F[x],A=P[0],T=P[1];a.queries.query[A]=T}}function rg(a){var u=a._state,c=a._deps.indexedDB;if(u.isBeingOpened||a.idbdb)return u.dbReadyPromise.then(function(){return u.dbOpenError?dt(u.dbOpenError):a});u.isBeingOpened=!0,u.dbOpenError=null,u.openComplete=!1;var f=u.openCanceller,p=Math.round(10*a.verno),v=!1;function b(){if(u.openCanceller!==f)throw new ye.DatabaseClosed("db.open() was cancelled")}function k(){return new ge(function(L,x){if(b(),!c)throw new ye.MissingAPI;var F=a.name,P=u.autoSchema||!p?c.open(F):c.open(F,p);if(!P)throw new ye.MissingAPI;P.onerror=un(x),P.onblocked=st(a._fireOnBlocked),P.onupgradeneeded=st(function(C){var $;I=P.transaction,u.autoSchema&&!a._options.allowEmptyDB?(P.onerror=br,I.abort(),P.result.close(),($=c.deleteDatabase(F)).onsuccess=$.onerror=st(function(){x(new ye.NoSuchDatabase("Database ".concat(F," doesnt exist")))})):(I.onerror=un(x),C=C.oldVersion>Math.pow(2,62)?0:C.oldVersion,w=C<1,a.idbdb=P.result,v&&ng(a,I),tg(a,C/10,I,x))},x),P.onsuccess=st(function(){I=null;var C,$,U,V,G,re=a.idbdb=P.result,fe=j(re.objectStoreNames);if(0<fe.length)try{var se=re.transaction((V=fe).length===1?V[0]:V,"readonly");if(u.autoSchema)$=re,U=se,(C=a).verno=$.version/10,U=C._dbSchema=Is(0,$,U),C._storeNames=j($.objectStoreNames,0),Rs(C,[C._allTables],o(U),U);else if(Ds(a,a._dbSchema,se),((G=Po(Is(0,(G=a).idbdb,se),G._dbSchema)).add.length||G.change.some(function(le){return le.add.length||le.change.length}))&&!v)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),re.close(),p=re.version+1,v=!0,L(k());Cs(a,se)}catch{}Fi.push(a),re.onversionchange=st(function(le){u.vcFired=!0,a.on("versionchange").fire(le)}),re.onclose=st(function(le){a.on("close").fire(le)}),w&&(G=a._deps,se=F,re=G.indexedDB,G=G.IDBKeyRange,Mo(re)||se===Ns||$o(re,G).put({name:se}).catch(Oe)),L()},x)}).catch(function(L){switch(L==null?void 0:L.name){case"UnknownError":if(0<u.PR1398_maxLoop)return u.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),k();break;case"VersionError":if(0<p)return p=0,k()}return ge.reject(L)})}var A,T=u.dbReadyResolve,I=null,w=!1;return ge.race([f,(typeof navigator=="undefined"?ge.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(L){function x(){return indexedDB.databases().finally(L)}A=setInterval(x,100),x()}).finally(function(){return clearInterval(A)}):Promise.resolve()).then(k)]).then(function(){return b(),u.onReadyBeingFired=[],ge.resolve(Bo(function(){return a.on.ready.fire(a.vip)})).then(function L(){if(0<u.onReadyBeingFired.length){var x=u.onReadyBeingFired.reduce(ue,Oe);return u.onReadyBeingFired=[],ge.resolve(Bo(function(){return x(a.vip)})).then(L)}})}).finally(function(){u.openCanceller===f&&(u.onReadyBeingFired=null,u.isBeingOpened=!1)}).catch(function(L){u.dbOpenError=L;try{I&&I.abort()}catch{}return f===u.openCanceller&&a._close(),dt(L)}).finally(function(){u.openComplete=!0,T()}).then(function(){var L;return w&&(L={},a.tables.forEach(function(x){x.schema.indexes.forEach(function(F){F.name&&(L["idb://".concat(a.name,"/").concat(x.name,"/").concat(F.name)]=new Nt(-1/0,[[[]]]))}),L["idb://".concat(a.name,"/").concat(x.name,"/")]=L["idb://".concat(a.name,"/").concat(x.name,"/:dels")]=new Nt(-1/0,[[[]]])}),$n(kr).fire(L),qo(L,!0)),a})}function zo(a){function u(v){return a.next(v)}var c=p(u),f=p(function(v){return a.throw(v)});function p(v){return function(A){var k=v(A),A=k.value;return k.done?A:A&&typeof A.then=="function"?A.then(c,f):l(A)?Promise.all(A).then(c,f):c(A)}}return p(u)()}function Bs(a,u,c){for(var f=l(a)?a.slice():[a],p=0;p<c;++p)f.push(u);return f}var sg={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(a){return i(i({},a),{table:function(u){var c=a.table(u),f=c.schema,p={},v=[];function b(w,L,x){var F=wr(w),P=p[F]=p[F]||[],C=w==null?0:typeof w=="string"?1:w.length,$=0<L,$=i(i({},x),{name:$?"".concat(F,"(virtual-from:").concat(x.name,")"):x.name,lowLevelIndex:x,isVirtual:$,keyTail:L,keyLength:C,extractKey:Io(w),unique:!$&&x.unique});return P.push($),$.isPrimaryKey||v.push($),1<C&&b(C===2?w[0]:w.slice(0,C-1),L+1,x),P.sort(function(U,V){return U.keyTail-V.keyTail}),$}u=b(f.primaryKey.keyPath,0,f.primaryKey),p[":id"]=[u];for(var k=0,A=f.indexes;k<A.length;k++){var T=A[k];b(T.keyPath,0,T)}function I(w){var L,x=w.query.index;return x.isVirtual?i(i({},w),{query:{index:x.lowLevelIndex,range:(L=w.query.range,x=x.keyTail,{type:L.type===1?2:L.type,lower:Bs(L.lower,L.lowerOpen?a.MAX_KEY:a.MIN_KEY,x),lowerOpen:!0,upper:Bs(L.upper,L.upperOpen?a.MIN_KEY:a.MAX_KEY,x),upperOpen:!0})}}):w}return i(i({},c),{schema:i(i({},f),{primaryKey:u,indexes:v,getIndexByKeyPath:function(w){return(w=p[wr(w)])&&w[0]}}),count:function(w){return c.count(I(w))},query:function(w){return c.query(I(w))},openCursor:function(w){var L=w.query.index,x=L.keyTail,F=L.isVirtual,P=L.keyLength;return F?c.openCursor(I(w)).then(function($){return $&&C($)}):c.openCursor(w);function C($){return Object.create($,{continue:{value:function(U){U!=null?$.continue(Bs(U,w.reverse?a.MAX_KEY:a.MIN_KEY,x)):w.unique?$.continue($.key.slice(0,P).concat(w.reverse?a.MIN_KEY:a.MAX_KEY,x)):$.continue()}},continuePrimaryKey:{value:function(U,V){$.continuePrimaryKey(Bs(U,a.MAX_KEY,x),V)}},primaryKey:{get:function(){return $.primaryKey}},key:{get:function(){var U=$.key;return P===1?U[0]:U.slice(0,P)}},value:{get:function(){return $.value}}})}}})}})}};function Ko(a,u,c,f){return c=c||{},f=f||"",o(a).forEach(function(p){var v,b,k;y(u,p)?(v=a[p],b=u[p],typeof v=="object"&&typeof b=="object"&&v&&b?(k=N(v))!==N(b)?c[f+p]=u[p]:k==="Object"?Ko(v,b,c,f+p+"."):v!==b&&(c[f+p]=u[p]):v!==b&&(c[f+p]=u[p])):c[f+p]=void 0}),o(u).forEach(function(p){y(a,p)||(c[f+p]=u[p])}),c}function Go(a,u){return u.type==="delete"?u.keys:u.keys||u.values.map(a.extractKey)}var ag={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(a){return i(i({},a),{table:function(u){var c=a.table(u),f=c.schema.primaryKey;return i(i({},c),{mutate:function(p){var v=Ee.trans,b=v.table(u).hook,k=b.deleting,A=b.creating,T=b.updating;switch(p.type){case"add":if(A.fire===Oe)break;return v._promise("readwrite",function(){return I(p)},!0);case"put":if(A.fire===Oe&&T.fire===Oe)break;return v._promise("readwrite",function(){return I(p)},!0);case"delete":if(k.fire===Oe)break;return v._promise("readwrite",function(){return I(p)},!0);case"deleteRange":if(k.fire===Oe)break;return v._promise("readwrite",function(){return function w(L,x,F){return c.query({trans:L,values:!1,query:{index:f,range:x},limit:F}).then(function(P){var C=P.result;return I({type:"delete",keys:C,trans:L}).then(function($){return 0<$.numFailures?Promise.reject($.failures[0]):C.length<F?{failures:[],numFailures:0,lastResult:void 0}:w(L,i(i({},x),{lower:C[C.length-1],lowerOpen:!0}),F)})})}(p.trans,p.range,1e4)},!0)}return c.mutate(p);function I(w){var L,x,F,P=Ee.trans,C=w.keys||Go(f,w);if(!C)throw new Error("Keys missing");return(w=w.type==="add"||w.type==="put"?i(i({},w),{keys:C}):i({},w)).type!=="delete"&&(w.values=r([],w.values)),w.keys&&(w.keys=r([],w.keys)),L=c,F=C,((x=w).type==="add"?Promise.resolve([]):L.getMany({trans:x.trans,keys:F,cache:"immutable"})).then(function($){var U=C.map(function(V,G){var re,fe,se,le=$[G],pe={onerror:null,onsuccess:null};return w.type==="delete"?k.fire.call(pe,V,le,P):w.type==="add"||le===void 0?(re=A.fire.call(pe,V,w.values[G],P),V==null&&re!=null&&(w.keys[G]=V=re,f.outbound||oe(w.values[G],f.keyPath,V))):(re=Ko(le,w.values[G]),(fe=T.fire.call(pe,re,V,le,P))&&(se=w.values[G],Object.keys(fe).forEach(function(de){y(se,de)?se[de]=fe[de]:oe(se,de,fe[de])}))),pe});return c.mutate(w).then(function(V){for(var G=V.failures,re=V.results,fe=V.numFailures,V=V.lastResult,se=0;se<C.length;++se){var le=(re||C)[se],pe=U[se];le==null?pe.onerror&&pe.onerror(G[se]):pe.onsuccess&&pe.onsuccess(w.type==="put"&&$[se]?w.values[se]:le)}return{failures:G,results:re,numFailures:fe,lastResult:V}}).catch(function(V){return U.forEach(function(G){return G.onerror&&G.onerror(V)}),Promise.reject(V)})})}}})}})}};function Cc(a,u,c){try{if(!u||u.keys.length<a.length)return null;for(var f=[],p=0,v=0;p<u.keys.length&&v<a.length;++p)qe(u.keys[p],a[v])===0&&(f.push(c?Ve(u.values[p]):u.values[p]),++v);return f.length===a.length?f:null}catch{return null}}var og={stack:"dbcore",level:-1,create:function(a){return{table:function(u){var c=a.table(u);return i(i({},c),{getMany:function(f){if(!f.cache)return c.getMany(f);var p=Cc(f.keys,f.trans._cache,f.cache==="clone");return p?ge.resolve(p):c.getMany(f).then(function(v){return f.trans._cache={keys:f.keys,values:f.cache==="clone"?Ve(v):v},v})},mutate:function(f){return f.type!=="add"&&(f.trans._cache=null),c.mutate(f)}})}}}};function Rc(a,u){return a.trans.mode==="readonly"&&!!a.subscr&&!a.trans.explicit&&a.trans.db._options.cache!=="disabled"&&!u.schema.primaryKey.outbound}function Fc(a,u){switch(a){case"query":return u.values&&!u.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var ug={stack:"dbcore",level:0,name:"Observability",create:function(a){var u=a.schema.name,c=new Nt(a.MIN_KEY,a.MAX_KEY);return i(i({},a),{transaction:function(f,p,v){if(Ee.subscr&&p!=="readonly")throw new ye.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(Ee.querier));return a.transaction(f,p,v)},table:function(f){var p=a.table(f),v=p.schema,b=v.primaryKey,w=v.indexes,k=b.extractKey,A=b.outbound,T=b.autoIncrement&&w.filter(function(x){return x.compound&&x.keyPath.includes(b.keyPath)}),I=i(i({},p),{mutate:function(x){function F(de){return de="idb://".concat(u,"/").concat(f,"/").concat(de),V[de]||(V[de]=new Nt)}var P,C,$,U=x.trans,V=x.mutatedParts||(x.mutatedParts={}),G=F(""),re=F(":dels"),fe=x.type,pe=x.type==="deleteRange"?[x.range]:x.type==="delete"?[x.keys]:x.values.length<50?[Go(b,x).filter(function(de){return de}),x.values]:[],se=pe[0],le=pe[1],pe=x.trans._cache;return l(se)?(G.addKeys(se),(pe=fe==="delete"||se.length===le.length?Cc(se,pe):null)||re.addKeys(se),(pe||le)&&(P=F,C=pe,$=le,v.indexes.forEach(function(de){var be=P(de.name||"");function De(Ue){return Ue!=null?de.extractKey(Ue):null}function Be(Ue){return de.multiEntry&&l(Ue)?Ue.forEach(function(Mt){return be.addKey(Mt)}):be.addKey(Ue)}(C||$).forEach(function(Ue,At){var Ie=C&&De(C[At]),At=$&&De($[At]);qe(Ie,At)!==0&&(Ie!=null&&Be(Ie),At!=null&&Be(At))})}))):se?(le={from:(le=se.lower)!==null&&le!==void 0?le:a.MIN_KEY,to:(le=se.upper)!==null&&le!==void 0?le:a.MAX_KEY},re.add(le),G.add(le)):(G.add(c),re.add(c),v.indexes.forEach(function(de){return F(de.name).add(c)})),p.mutate(x).then(function(de){return!se||x.type!=="add"&&x.type!=="put"||(G.addKeys(de.results),T&&T.forEach(function(be){for(var De=x.values.map(function(Ie){return be.extractKey(Ie)}),Be=be.keyPath.findIndex(function(Ie){return Ie===b.keyPath}),Ue=0,Mt=de.results.length;Ue<Mt;++Ue)De[Ue][Be]=de.results[Ue];F(be.name).addKeys(De)})),U.mutatedParts=$s(U.mutatedParts||{},V),de})}}),w=function(F){var P=F.query,F=P.index,P=P.range;return[F,new Nt((F=P.lower)!==null&&F!==void 0?F:a.MIN_KEY,(P=P.upper)!==null&&P!==void 0?P:a.MAX_KEY)]},L={get:function(x){return[b,new Nt(x.key)]},getMany:function(x){return[b,new Nt().addKeys(x.keys)]},count:w,query:w,openCursor:w};return o(L).forEach(function(x){I[x]=function(F){var P=Ee.subscr,C=!!P,$=Rc(Ee,p)&&Fc(x,F)?F.obsSet={}:P;if(C){var U=function(le){return le="idb://".concat(u,"/").concat(f,"/").concat(le),$[le]||($[le]=new Nt)},V=U(""),G=U(":dels"),P=L[x](F),C=P[0],P=P[1];if((x==="query"&&C.isPrimaryKey&&!F.values?G:U(C.name||"")).add(P),!C.isPrimaryKey){if(x!=="count"){var re=x==="query"&&A&&F.values&&p.query(i(i({},F),{values:!1}));return p[x].apply(this,arguments).then(function(le){if(x==="query"){if(A&&F.values)return re.then(function(De){return De=De.result,V.addKeys(De),le});var pe=F.values?le.result.map(k):le.result;(F.values?V:G).addKeys(pe)}else if(x==="openCursor"){var de=le,be=F.values;return de&&Object.create(de,{key:{get:function(){return G.addKey(de.primaryKey),de.key}},primaryKey:{get:function(){var De=de.primaryKey;return G.addKey(De),De}},value:{get:function(){return be&&V.addKey(de.primaryKey),de.value}}})}return le})}G.add(c)}}return p[x].apply(this,arguments)}}),I}})}};function Ic(a,u,c){if(c.numFailures===0)return u;if(u.type==="deleteRange")return null;var f=u.keys?u.keys.length:"values"in u&&u.values?u.values.length:1;return c.numFailures===f?null:(u=i({},u),l(u.keys)&&(u.keys=u.keys.filter(function(p,v){return!(v in c.failures)})),"values"in u&&l(u.values)&&(u.values=u.values.filter(function(p,v){return!(v in c.failures)})),u)}function Wo(a,u){return c=a,((f=u).lower===void 0||(f.lowerOpen?0<qe(c,f.lower):0<=qe(c,f.lower)))&&(a=a,(u=u).upper===void 0||(u.upperOpen?qe(a,u.upper)<0:qe(a,u.upper)<=0));var c,f}function Dc(a,u,L,f,p,v){if(!L||L.length===0)return a;var b=u.query.index,k=b.multiEntry,A=u.query.range,T=f.schema.primaryKey.extractKey,I=b.extractKey,w=(b.lowLevelIndex||b).extractKey,L=L.reduce(function(x,F){var P=x,C=[];if(F.type==="add"||F.type==="put")for(var $=new Nt,U=F.values.length-1;0<=U;--U){var V,G=F.values[U],re=T(G);$.hasKey(re)||(V=I(G),(k&&l(V)?V.some(function(de){return Wo(de,A)}):Wo(V,A))&&($.addKey(re),C.push(G)))}switch(F.type){case"add":var fe=new Nt().addKeys(u.values?x.map(function(be){return T(be)}):x),P=x.concat(u.values?C.filter(function(be){return be=T(be),!fe.hasKey(be)&&(fe.addKey(be),!0)}):C.map(function(be){return T(be)}).filter(function(be){return!fe.hasKey(be)&&(fe.addKey(be),!0)}));break;case"put":var se=new Nt().addKeys(F.values.map(function(be){return T(be)}));P=x.filter(function(be){return!se.hasKey(u.values?T(be):be)}).concat(u.values?C:C.map(function(be){return T(be)}));break;case"delete":var le=new Nt().addKeys(F.keys);P=x.filter(function(be){return!le.hasKey(u.values?T(be):be)});break;case"deleteRange":var pe=F.range;P=x.filter(function(be){return!Wo(T(be),pe)})}return P},a);return L===a?a:(L.sort(function(x,F){return qe(w(x),w(F))||qe(T(x),T(F))}),u.limit&&u.limit<1/0&&(L.length>u.limit?L.length=u.limit:a.length===u.limit&&L.length<u.limit&&(p.dirty=!0)),v?Object.freeze(L):L)}function Pc(a,u){return qe(a.lower,u.lower)===0&&qe(a.upper,u.upper)===0&&!!a.lowerOpen==!!u.lowerOpen&&!!a.upperOpen==!!u.upperOpen}function lg(a,u){return function(c,f,p,v){if(c===void 0)return f!==void 0?-1:0;if(f===void 0)return 1;if((f=qe(c,f))===0){if(p&&v)return 0;if(p)return 1;if(v)return-1}return f}(a.lower,u.lower,a.lowerOpen,u.lowerOpen)<=0&&0<=function(c,f,p,v){if(c===void 0)return f!==void 0?1:0;if(f===void 0)return-1;if((f=qe(c,f))===0){if(p&&v)return 0;if(p)return-1;if(v)return 1}return f}(a.upper,u.upper,a.upperOpen,u.upperOpen)}function cg(a,u,c,f){a.subscribers.add(c),f.addEventListener("abort",function(){var p,v;a.subscribers.delete(c),a.subscribers.size===0&&(p=a,v=u,setTimeout(function(){p.subscribers.size===0&&ce(v,p)},3e3))})}var dg={stack:"dbcore",level:0,name:"Cache",create:function(a){var u=a.schema.name;return i(i({},a),{transaction:function(c,f,p){var v,b,k=a.transaction(c,f,p);return f==="readwrite"&&(b=(v=new AbortController).signal,p=function(A){return function(){if(v.abort(),f==="readwrite"){for(var T=new Set,I=0,w=c;I<w.length;I++){var L=w[I],x=si["idb://".concat(u,"/").concat(L)];if(x){var F=a.table(L),P=x.optimisticOps.filter(function(be){return be.trans===k});if(k._explicit&&A&&k.mutatedParts)for(var C=0,$=Object.values(x.queries.query);C<$.length;C++)for(var U=0,V=(fe=$[C]).slice();U<V.length;U++)jo((se=V[U]).obsSet,k.mutatedParts)&&(ce(fe,se),se.subscribers.forEach(function(be){return T.add(be)}));else if(0<P.length){x.optimisticOps=x.optimisticOps.filter(function(be){return be.trans!==k});for(var G=0,re=Object.values(x.queries.query);G<re.length;G++)for(var fe,se,le,pe=0,de=(fe=re[G]).slice();pe<de.length;pe++)(se=de[pe]).res!=null&&k.mutatedParts&&(A&&!se.dirty?(le=Object.isFrozen(se.res),le=Dc(se.res,se.req,P,F,se,le),se.dirty?(ce(fe,se),se.subscribers.forEach(function(be){return T.add(be)})):le!==se.res&&(se.res=le,se.promise=ge.resolve({result:le}))):(se.dirty&&ce(fe,se),se.subscribers.forEach(function(be){return T.add(be)})))}}}T.forEach(function(be){return be()})}}},k.addEventListener("abort",p(!1),{signal:b}),k.addEventListener("error",p(!1),{signal:b}),k.addEventListener("complete",p(!0),{signal:b})),k},table:function(c){var f=a.table(c),p=f.schema.primaryKey;return i(i({},f),{mutate:function(v){var b=Ee.trans;if(p.outbound||b.db._options.cache==="disabled"||b.explicit||b.idbtrans.mode!=="readwrite")return f.mutate(v);var k=si["idb://".concat(u,"/").concat(c)];return k?(b=f.mutate(v),v.type!=="add"&&v.type!=="put"||!(50<=v.values.length||Go(p,v).some(function(A){return A==null}))?(k.optimisticOps.push(v),v.mutatedParts&&Ms(v.mutatedParts),b.then(function(A){0<A.numFailures&&(ce(k.optimisticOps,v),(A=Ic(0,v,A))&&k.optimisticOps.push(A),v.mutatedParts&&Ms(v.mutatedParts))}),b.catch(function(){ce(k.optimisticOps,v),v.mutatedParts&&Ms(v.mutatedParts)})):b.then(function(A){var T=Ic(0,i(i({},v),{values:v.values.map(function(I,w){var L;return A.failures[w]?I:(I=(L=p.keyPath)!==null&&L!==void 0&&L.includes(".")?Ve(I):i({},I),oe(I,p.keyPath,A.results[w]),I)})}),A);k.optimisticOps.push(T),queueMicrotask(function(){return v.mutatedParts&&Ms(v.mutatedParts)})}),b):f.mutate(v)},query:function(v){if(!Rc(Ee,f)||!Fc("query",v))return f.query(v);var b=((T=Ee.trans)===null||T===void 0?void 0:T.db._options.cache)==="immutable",w=Ee,k=w.requery,A=w.signal,T=function(F,P,C,$){var U=si["idb://".concat(F,"/").concat(P)];if(!U)return[];if(!(P=U.queries[C]))return[null,!1,U,null];var V=P[($.query?$.query.index.name:null)||""];if(!V)return[null,!1,U,null];switch(C){case"query":var G=V.find(function(re){return re.req.limit===$.limit&&re.req.values===$.values&&Pc(re.req.query.range,$.query.range)});return G?[G,!0,U,V]:[V.find(function(re){return("limit"in re.req?re.req.limit:1/0)>=$.limit&&(!$.values||re.req.values)&&lg(re.req.query.range,$.query.range)}),!1,U,V];case"count":return G=V.find(function(re){return Pc(re.req.query.range,$.query.range)}),[G,!!G,U,V]}}(u,c,"query",v),I=T[0],w=T[1],L=T[2],x=T[3];return I&&w?I.obsSet=v.obsSet:(w=f.query(v).then(function(F){var P=F.result;if(I&&(I.res=P),b){for(var C=0,$=P.length;C<$;++C)Object.freeze(P[C]);Object.freeze(P)}else F.result=Ve(P);return F}).catch(function(F){return x&&I&&ce(x,I),Promise.reject(F)}),I={obsSet:v.obsSet,promise:w,subscribers:new Set,type:"query",req:v,dirty:!1},x?x.push(I):(x=[I],(L=L||(si["idb://".concat(u,"/").concat(c)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[v.query.index.name||""]=x)),cg(I,x,k,A),I.promise.then(function(F){return{result:Dc(F.result,v,L==null?void 0:L.optimisticOps,f,I,b)}})}})}})}};function Us(a,u){return new Proxy(a,{get:function(c,f,p){return f==="db"?u:Reflect.get(c,f,p)}})}var bn=(ft.prototype.version=function(a){if(isNaN(a)||a<.1)throw new ye.Type("Given version is not a positive number");if(a=Math.round(10*a)/10,this.idbdb||this._state.isBeingOpened)throw new ye.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,a);var u=this._versions,c=u.filter(function(f){return f._cfg.version===a})[0];return c||(c=new this.Version(a),u.push(c),u.sort(eg),c.stores({}),this._state.autoSchema=!1,c)},ft.prototype._whenReady=function(a){var u=this;return this.idbdb&&(this._state.openComplete||Ee.letThrough||this._vip)?a():new ge(function(c,f){if(u._state.openComplete)return f(new ye.DatabaseClosed(u._state.dbOpenError));if(!u._state.isBeingOpened){if(!u._state.autoOpen)return void f(new ye.DatabaseClosed);u.open().catch(Oe)}u._state.dbReadyPromise.then(c,f)}).then(a)},ft.prototype.use=function(a){var u=a.stack,c=a.create,f=a.level,p=a.name;return p&&this.unuse({stack:u,name:p}),a=this._middlewares[u]||(this._middlewares[u]=[]),a.push({stack:u,create:c,level:f==null?10:f,name:p}),a.sort(function(v,b){return v.level-b.level}),this},ft.prototype.unuse=function(a){var u=a.stack,c=a.name,f=a.create;return u&&this._middlewares[u]&&(this._middlewares[u]=this._middlewares[u].filter(function(p){return f?p.create!==f:!!c&&p.name!==c})),this},ft.prototype.open=function(){var a=this;return ni(Fn,function(){return rg(a)})},ft.prototype._close=function(){var a=this._state,u=Fi.indexOf(this);if(0<=u&&Fi.splice(u,1),this.idbdb){try{this.idbdb.close()}catch{}this.idbdb=null}a.isBeingOpened||(a.dbReadyPromise=new ge(function(c){a.dbReadyResolve=c}),a.openCanceller=new ge(function(c,f){a.cancelOpen=f}))},ft.prototype.close=function(c){var u=(c===void 0?{disableAutoOpen:!0}:c).disableAutoOpen,c=this._state;u?(c.isBeingOpened&&c.cancelOpen(new ye.DatabaseClosed),this._close(),c.autoOpen=!1,c.dbOpenError=new ye.DatabaseClosed):(this._close(),c.autoOpen=this._options.autoOpen||c.isBeingOpened,c.openComplete=!1,c.dbOpenError=null)},ft.prototype.delete=function(a){var u=this;a===void 0&&(a={disableAutoOpen:!0});var c=0<arguments.length&&typeof arguments[0]!="object",f=this._state;return new ge(function(p,v){function b(){u.close(a);var k=u._deps.indexedDB.deleteDatabase(u.name);k.onsuccess=st(function(){var A,T,I;A=u._deps,T=u.name,I=A.indexedDB,A=A.IDBKeyRange,Mo(I)||T===Ns||$o(I,A).delete(T).catch(Oe),p()}),k.onerror=un(v),k.onblocked=u._fireOnBlocked}if(c)throw new ye.InvalidArgument("Invalid closeOptions argument to db.delete()");f.isBeingOpened?f.dbReadyPromise.then(b):b()})},ft.prototype.backendDB=function(){return this.idbdb},ft.prototype.isOpen=function(){return this.idbdb!==null},ft.prototype.hasBeenClosed=function(){var a=this._state.dbOpenError;return a&&a.name==="DatabaseClosed"},ft.prototype.hasFailed=function(){return this._state.dbOpenError!==null},ft.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(ft.prototype,"tables",{get:function(){var a=this;return o(this._allTables).map(function(u){return a._allTables[u]})},enumerable:!1,configurable:!0}),ft.prototype.transaction=function(){var a=function(u,c,f){var p=arguments.length;if(p<2)throw new ye.InvalidArgument("Too few arguments");for(var v=new Array(p-1);--p;)v[p-1]=arguments[p];return f=v.pop(),[u,ze(v),f]}.apply(this,arguments);return this._transaction.apply(this,a)},ft.prototype._transaction=function(a,u,c){var f=this,p=Ee.trans;p&&p.db===this&&a.indexOf("!")===-1||(p=null);var v,b,k=a.indexOf("?")!==-1;a=a.replace("!","").replace("?","");try{if(b=u.map(function(T){if(T=T instanceof f.Table?T.name:T,typeof T!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return T}),a=="r"||a===No)v=No;else{if(a!="rw"&&a!=Ao)throw new ye.InvalidArgument("Invalid transaction mode: "+a);v=Ao}if(p){if(p.mode===No&&v===Ao){if(!k)throw new ye.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");p=null}p&&b.forEach(function(T){if(p&&p.storeNames.indexOf(T)===-1){if(!k)throw new ye.SubTransaction("Table "+T+" not included in parent transaction.");p=null}}),k&&p&&!p.active&&(p=null)}}catch(T){return p?p._promise(null,function(I,w){w(T)}):dt(T)}var A=function T(I,w,L,x,F){return ge.resolve().then(function(){var P=Ee.transless||Ee,C=I._createTransaction(w,L,I._dbSchema,x);if(C.explicit=!0,P={trans:C,transless:P},x)C.idbtrans=x.idbtrans;else try{C.create(),C.idbtrans._explicit=!0,I._state.PR1398_maxLoop=3}catch(V){return V.name===_e.InvalidState&&I.isOpen()&&0<--I._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),I.close({disableAutoOpen:!1}),I.open().then(function(){return T(I,w,L,null,F)})):dt(V)}var $,U=Fe(F);return U&&Ri(),P=ge.follow(function(){var V;($=F.call(C,C))&&(U?(V=Dn.bind(null,null),$.then(V,V)):typeof $.next=="function"&&typeof $.throw=="function"&&($=zo($)))},P),($&&typeof $.then=="function"?ge.resolve($).then(function(V){return C.active?V:dt(new ye.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):P.then(function(){return $})).then(function(V){return x&&C._resolve(),C._completion.then(function(){return V})}).catch(function(V){return C._reject(V),dt(V)})})}.bind(null,this,v,b,p,c);return p?p._promise(v,A,"lock"):Ee.trans?ni(Ee.transless,function(){return f._whenReady(A)}):this._whenReady(A)},ft.prototype.table=function(a){if(!y(this._allTables,a))throw new ye.InvalidTable("Table ".concat(a," does not exist"));return this._allTables[a]},ft);function ft(a,u){var c=this;this._middlewares={},this.verno=0;var f=ft.dependencies;this._options=u=i({addons:ft.addons,autoOpen:!0,indexedDB:f.indexedDB,IDBKeyRange:f.IDBKeyRange,cache:"cloned"},u),this._deps={indexedDB:u.indexedDB,IDBKeyRange:u.IDBKeyRange},f=u.addons,this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var p,v,b,k,A,T={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:Oe,dbReadyPromise:null,cancelOpen:Oe,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:u.autoOpen};T.dbReadyPromise=new ge(function(w){T.dbReadyResolve=w}),T.openCanceller=new ge(function(w,L){T.cancelOpen=L}),this._state=T,this.name=a,this.on=gr(this,"populate","blocked","versionchange","close",{ready:[ue,Oe]}),this.on.ready.subscribe=J(this.on.ready.subscribe,function(w){return function(L,x){ft.vip(function(){var F,P=c._state;P.openComplete?(P.dbOpenError||ge.resolve().then(L),x&&w(L)):P.onReadyBeingFired?(P.onReadyBeingFired.push(L),x&&w(L)):(w(L),F=c,x||w(function C(){F.on.ready.unsubscribe(L),F.on.ready.unsubscribe(C)}))})}}),this.Collection=(p=this,vr(Gm.prototype,function($,C){this.db=p;var x=fc,F=null;if(C)try{x=C()}catch(U){F=U}var P=$._ctx,C=P.table,$=C.hook.reading.fire;this._ctx={table:C,index:P.index,isPrimKey:!P.index||C.schema.primKey.keyPath&&P.index===C.schema.primKey.name,range:x,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:F,or:P.or,valueMapper:$!==wt?$:null}})),this.Table=(v=this,vr(gc.prototype,function(w,L,x){this.db=v,this._tx=x,this.name=w,this.schema=L,this.hook=v._allTables[w]?v._allTables[w].hook:gr(null,{creating:[mt,Oe],reading:[lt,wt],updating:[he,Oe],deleting:[rt,Oe]})})),this.Transaction=(b=this,vr(Ym.prototype,function(w,L,x,F,P){var C=this;this.db=b,this.mode=w,this.storeNames=L,this.schema=x,this.chromeTransactionDurability=F,this.idbtrans=null,this.on=gr(this,"complete","error","abort"),this.parent=P||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new ge(function($,U){C._resolve=$,C._reject=U}),this._completion.then(function(){C.active=!1,C.on.complete.fire()},function($){var U=C.active;return C.active=!1,C.on.error.fire($),C.parent?C.parent._reject($):U&&C.idbtrans&&C.idbtrans.abort(),dt($)})})),this.Version=(k=this,vr(ig.prototype,function(w){this.db=k,this._cfg={version:w,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=(A=this,vr(_c.prototype,function(w,L,x){if(this.db=A,this._ctx={table:w,index:L===":id"?null:L,or:x},this._cmp=this._ascending=qe,this._descending=function(F,P){return qe(P,F)},this._max=function(F,P){return 0<qe(F,P)?F:P},this._min=function(F,P){return qe(F,P)<0?F:P},this._IDBKeyRange=A._deps.IDBKeyRange,!this._IDBKeyRange)throw new ye.MissingAPI})),this.on("versionchange",function(w){0<w.newVersion?console.warn("Another connection wants to upgrade database '".concat(c.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(c.name,"'. Closing db now to resume the delete request.")),c.close({disableAutoOpen:!1})}),this.on("blocked",function(w){!w.newVersion||w.newVersion<w.oldVersion?console.warn("Dexie.delete('".concat(c.name,"') was blocked")):console.warn("Upgrade '".concat(c.name,"' blocked by other connection holding version ").concat(w.oldVersion/10))}),this._maxKey=_r(u.IDBKeyRange),this._createTransaction=function(w,L,x,F){return new c.Transaction(w,L,x,c._options.chromeTransactionDurability,F)},this._fireOnBlocked=function(w){c.on("blocked").fire(w),Fi.filter(function(L){return L.name===c.name&&L!==c&&!L._state.vcFired}).map(function(L){return L.on("versionchange").fire(w)})},this.use(og),this.use(dg),this.use(ug),this.use(sg),this.use(ag);var I=new Proxy(this,{get:function(w,L,x){if(L==="_vip")return!0;if(L==="table")return function(P){return Us(c.table(P),I)};var F=Reflect.get(w,L,x);return F instanceof gc?Us(F,I):L==="tables"?F.map(function(P){return Us(P,I)}):L==="_createTransaction"?function(){return Us(F.apply(this,arguments),I)}:F}});this.vip=I,f.forEach(function(w){return w(c)})}var js,zt=typeof Symbol!="undefined"&&"observable"in Symbol?Symbol.observable:"@@observable",fg=(Jo.prototype.subscribe=function(a,u,c){return this._subscribe(a&&typeof a!="function"?a:{next:a,error:u,complete:c})},Jo.prototype[zt]=function(){return this},Jo);function Jo(a){this._subscribe=a}try{js={indexedDB:s.indexedDB||s.mozIndexedDB||s.webkitIndexedDB||s.msIndexedDB,IDBKeyRange:s.IDBKeyRange||s.webkitIDBKeyRange}}catch{js={indexedDB:null,IDBKeyRange:null}}function Lc(a){var u,c=!1,f=new fg(function(p){var v=Fe(a),b,k=!1,A={},T={},I={get closed(){return k},unsubscribe:function(){k||(k=!0,b&&b.abort(),w&&$n.storagemutated.unsubscribe(x))}};p.start&&p.start(I);var w=!1,L=function(){return Eo(F)},x=function(P){$s(A,P),jo(T,A)&&L()},F=function(){var P,C,$;!k&&js.indexedDB&&(A={},P={},b&&b.abort(),b=new AbortController,$=function(U){var V=Ti();try{v&&Ri();var G=In(a,U);return G=v?G.finally(Dn):G}finally{V&&Ci()}}(C={subscr:P,signal:b.signal,requery:L,querier:a,trans:null}),Promise.resolve($).then(function(U){c=!0,u=U,k||C.signal.aborted||(A={},function(V){for(var G in V)if(y(V,G))return;return 1}(T=P)||w||($n(kr,x),w=!0),Eo(function(){return!k&&p.next&&p.next(U)}))},function(U){c=!1,["DatabaseClosedError","AbortError"].includes(U==null?void 0:U.name)||k||Eo(function(){k||p.error&&p.error(U)})}))};return setTimeout(L,0),I});return f.hasValue=function(){return c},f.getValue=function(){return u},f}var ai=bn;function Yo(a){var u=Mn;try{Mn=!0,$n.storagemutated.fire(a),qo(a,!0)}finally{Mn=u}}g(ai,i(i({},Je),{delete:function(a){return new ai(a,{addons:[]}).delete()},exists:function(a){return new ai(a,{addons:[]}).open().then(function(u){return u.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(a){try{return u=ai.dependencies,c=u.indexedDB,u=u.IDBKeyRange,(Mo(c)?Promise.resolve(c.databases()).then(function(f){return f.map(function(p){return p.name}).filter(function(p){return p!==Ns})}):$o(c,u).toCollection().primaryKeys()).then(a)}catch{return dt(new ye.MissingAPI)}var u,c},defineClass:function(){return function(a){d(this,a)}},ignoreTransaction:function(a){return Ee.trans?ni(Ee.transless,a):a()},vip:Bo,async:function(a){return function(){try{var u=zo(a.apply(this,arguments));return u&&typeof u.then=="function"?u:ge.resolve(u)}catch(c){return dt(c)}}},spawn:function(a,u,c){try{var f=zo(a.apply(c,u||[]));return f&&typeof f.then=="function"?f:ge.resolve(f)}catch(p){return dt(p)}},currentTransaction:{get:function(){return Ee.trans||null}},waitFor:function(a,u){return u=ge.resolve(typeof a=="function"?ai.ignoreTransaction(a):a).timeout(u||6e4),Ee.trans?Ee.trans.waitFor(u):u},Promise:ge,debug:{get:function(){return Te},set:function(a){tt(a)}},derive:S,extend:d,props:g,override:J,Events:gr,on:$n,liveQuery:Lc,extendObservabilitySet:$s,getByKeyPath:ne,setByKeyPath:oe,delByKeyPath:function(a,u){typeof u=="string"?oe(a,u,void 0):"length"in u&&[].map.call(u,function(c){oe(a,c,void 0)})},shallowClone:Se,deepClone:Ve,getObjectDiff:Ko,cmp:qe,asap:X,minKey:-1/0,addons:[],connections:Fi,errnames:_e,dependencies:js,cache:si,semVer:"4.0.11",version:"4.0.11".split(".").map(function(a){return parseInt(a)}).reduce(function(a,u,c){return a+u/Math.pow(10,2*c)})})),ai.maxKey=_r(ai.dependencies.IDBKeyRange),typeof dispatchEvent!="undefined"&&typeof addEventListener!="undefined"&&($n(kr,function(a){Mn||(a=new CustomEvent(Co,{detail:a}),Mn=!0,dispatchEvent(a),Mn=!1)}),addEventListener(Co,function(a){a=a.detail,Mn||Yo(a)}));var Pi,Mn=!1,$c=function(){};return typeof BroadcastChannel!="undefined"&&(($c=function(){(Pi=new BroadcastChannel(Co)).onmessage=function(a){return a.data&&Yo(a.data)}})(),typeof Pi.unref=="function"&&Pi.unref(),$n(kr,function(a){Mn||Pi.postMessage(a)})),typeof addEventListener!="undefined"&&(addEventListener("pagehide",function(a){if(!bn.disableBfCache&&a.persisted){Te&&console.debug("Dexie: handling persisted pagehide"),Pi!=null&&Pi.close();for(var u=0,c=Fi;u<c.length;u++)c[u].close({disableAutoOpen:!1})}}),addEventListener("pageshow",function(a){!bn.disableBfCache&&a.persisted&&(Te&&console.debug("Dexie: handling persisted pageshow"),$c(),Yo({all:new Nt(-1/0,[[]])}))})),ge.rejectionMapper=function(a,u){return!a||a instanceof Xe||a instanceof TypeError||a instanceof SyntaxError||!a.name||!et[a.name]?a:(u=new et[a.name](u||a.message,a),"stack"in a&&_(u,"stack",{get:function(){return this.inner.stack}}),u)},tt(Te),i(bn,Object.freeze({__proto__:null,Dexie:bn,liveQuery:Lc,Entity:hc,cmp:qe,PropModification:yr,replacePrefix:function(a,u){return new yr({replacePrefix:[a,u]})},add:function(a){return new yr({add:a})},remove:function(a){return new yr({remove:a})},default:bn,RangeSet:Nt,mergeRanges:Er,rangesOverlap:Ac}),{default:bn}),bn})}(ia)),ia.exports}var nb=tb();const ul=Ya(nb),vd=Symbol.for("Dexie"),_a=globalThis[vd]||(globalThis[vd]=ul);if(ul.semVer!==_a.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${ul.semVer} and ${_a.semVer}`);const{liveQuery:gN,mergeRanges:vN,rangesOverlap:yN,RangeSet:bN,cmp:kN,Entity:_N,PropModification:wN,replacePrefix:SN,add:EN,remove:NN}=_a;class Uh extends _a{constructor(n,i,r={}){super(n);me(this,"logs");const s={logs:"id, level, time, source, account"};this.version(i).stores({...s,...r})}}class ib extends Uh{constructor(){super("nizza",1)}}class jh{constructor(e,n){me(this,"logger");me(this,"channel");me(this,"listeners",new Map);me(this,"eventQueue",new Map);this.logger=n.child("EventBus");try{this.logger.debug(`Creating BroadcastChannel with name "${e}"`),this.channel=new BroadcastChannel(e),this.channel.onmessage=i=>this.handleMessage(i),this.channel.onmessageerror=i=>this.logger.error("NizzaBroadcastChannel error:",i)}catch(i){throw this.logger.error("Failed to create NizzaBroadcastChannel:",i),i}}on(e,n){return this.logger.debug(`Subscribing to pattern "${e}"`),this.subscribeToEvent(e,n),{off:()=>this.unsubscribeFromEvent(e,n)}}emit(e,n,i={}){this.logger.debug(`Emitting event "${e}" with data`,n),this.emitEvent(e,n,i)}handleMessage(e){const n=e.data,{name:i}=n;this.logger.debug(`Received message "${i}" with data`,n);for(const[r,s]of this.listeners.entries())this.matchWildcard(r,i)&&(this.logger.debug(`Matching pattern "${r}" for event "${i}"`),s.forEach(o=>o({...n,wildcard:r})))}subscribeToEvent(e,n){if(typeof e!="string"||typeof n!="function"){const r=new Error("Invalid arguments");throw this.logger.error(r),r}this.listeners.has(e)||(this.logger.debug(`Adding new pattern "${e}"`),this.listeners.set(e,new Set));const i=Array.from(this.eventQueue).filter(([r])=>{const s=this.matchWildcard(e,r);return s&&(this.eventQueue.delete(r),this.logger.debug(`Dequeued pending events for "${r}".`)),s}).flatMap(([,r])=>r);for(const[r,s]of this.listeners.entries())this.matchWildcard(r,e)&&(this.logger.debug(`Adding listener to pattern "${r}"`),s.add(n),i.length&&(this.logger.debug(`Delivering pending events for "${e}".`),i.forEach(o=>{n({...o,wildcard:r})})))}emitEvent(e,n,i){if(typeof e!="string"){const o=new Error("Invalid arguments");throw this.logger.error(o),o}const r={name:e,data:n,attrs:i},s=Array.from(this.getMatchingListeners(e));if(s.length){this.logger.debug(`Delivering event "${e}" to listeners`);for(const[o,l]of s)l({...r,wildcard:o})}else this.logger.debug(`No listeners for event "${e}", enqueuing`),this.eventQueue.has(e)||this.eventQueue.set(e,[]),this.eventQueue.get(e).push(r);this.logger.debug("Posting message to channel",r),this.channel.postMessage(r)}*getMatchingListeners(e){this.logger.debug(`Getting matching listeners for event "${e}"`);for(const[n,i]of this.listeners.entries())if(this.matchWildcard(n,e))for(const r of i)yield[n,r]}unsubscribeFromEvent(e,n){if(this.listeners.has(e)){this.logger.debug(`Unsubscribing from event "${e}"`);const i=this.listeners.get(e);i.delete(n),i.size===0&&(this.logger.debug(`No more listeners for event "${e}", deleting`),this.listeners.delete(e))}}matchWildcard(e,n){const i=e.replace(/\*/g,"[^:]*").replace(/\*\*/g,".*"),s=new RegExp(`^${i}$`).test(n);return this.logger.debug(`Wildcard "${e}" matches with pattern "${n}": ${s}`),s}}var Ir={exports:{}},yu,yd;function rb(){if(yd)return yu;yd=1;function t(n){try{return JSON.stringify(n)}catch{return'"[Circular]"'}}yu=e;function e(n,i,r){var s=r&&r.stringify||t,o=1;if(typeof n=="object"&&n!==null){var l=i.length+o;if(l===1)return n;var d=new Array(l);d[0]=s(n);for(var h=1;h<l;h++)d[h]=s(i[h]);return d.join(" ")}if(typeof n!="string")return n;var m=i.length;if(m===0)return n;for(var y="",g=1-o,O=-1,_=n&&n.length||0,S=0;S<_;){if(n.charCodeAt(S)===37&&S+1<_){switch(O=O>-1?O:0,n.charCodeAt(S+1)){case 100:case 102:if(g>=m||i[g]==null)break;O<S&&(y+=n.slice(O,S)),y+=Number(i[g]),O=S+2,S++;break;case 105:if(g>=m||i[g]==null)break;O<S&&(y+=n.slice(O,S)),y+=Math.floor(Number(i[g])),O=S+2,S++;break;case 79:case 111:case 106:if(g>=m||i[g]===void 0)break;O<S&&(y+=n.slice(O,S));var E=typeof i[g];if(E==="string"){y+="'"+i[g]+"'",O=S+2,S++;break}if(E==="function"){y+=i[g].name||"<anonymous>",O=S+2,S++;break}y+=s(i[g]),O=S+2,S++;break;case 115:if(g>=m)break;O<S&&(y+=n.slice(O,S)),y+=String(i[g]),O=S+2,S++;break;case 37:O<S&&(y+=n.slice(O,S)),y+="%",O=S+2,S++,g--;break}++g}++S}return O===-1?n:(O<_&&(y+=n.slice(O)),y)}return yu}var bd;function sb(){if(bd)return Ir.exports;bd=1;const t=rb();Ir.exports=m;const e=M().console||{},n={mapHttpRequest:oe,mapHttpResponse:oe,wrapRequestSerializer:Se,wrapResponseSerializer:Se,wrapErrorSerializer:Se,req:oe,res:oe,err:X,errWithCause:X};function i(N,K){return N==="silent"?1/0:K.levels.values[N]}const r=Symbol("pino.logFuncs"),s=Symbol("pino.hierarchy"),o={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function l(N,K){const ie={logger:K,parent:N[s]};K[s]=ie}function d(N,K,ie){const ce={};K.forEach(ae=>{ce[ae]=ie[ae]?ie[ae]:e[ae]||e[o[ae]||"log"]||ve}),N[r]=ce}function h(N,K){return Array.isArray(N)?N.filter(function(ce){return ce!=="!stdSerializers.err"}):N===!0?Object.keys(K):!1}function m(N){N=N||{},N.browser=N.browser||{};const K=N.browser.transmit;if(K&&typeof K.send!="function")throw Error("pino: transmit option must have a send function");const ie=N.browser.write||e;N.browser.write&&(N.browser.asObject=!0);const ce=N.serializers||{},ae=h(N.browser.serialize,ce);let B=N.browser.serialize;Array.isArray(N.browser.serialize)&&N.browser.serialize.indexOf("!stdSerializers.err")>-1&&(B=!1);const Fe=Object.keys(N.customLevels||{}),$e=["error","fatal","warn","info","debug","trace"].concat(Fe);typeof ie=="function"&&$e.forEach(function(et){ie[et]=ie}),(N.enabled===!1||N.browser.disabled)&&(N.level="silent");const Xe=N.level||"info",D=Object.create(ie);D.log||(D.log=ve),d(D,$e,ie),l({},D),Object.defineProperty(D,"levelVal",{get:pt}),Object.defineProperty(D,"level",{get:_e,set:Me});const H={transmit:K,serialize:ae,asObject:N.browser.asObject,formatters:N.browser.formatters,levels:$e,timestamp:ne(N),messageKey:N.messageKey||"msg",onChild:N.onChild||ve};D.levels=y(N),D.level=Xe,D.setMaxListeners=D.getMaxListeners=D.emit=D.addListener=D.on=D.prependListener=D.once=D.prependOnceListener=D.removeListener=D.removeAllListeners=D.listeners=D.listenerCount=D.eventNames=D.write=D.flush=ve,D.serializers=ce,D._serialize=ae,D._stdErrSerialize=B,D.child=function(...et){return ye.call(this,H,...et)},K&&(D._logEvent=z());function pt(){return i(this.level,this)}function _e(){return this._level}function Me(et){if(et!=="silent"&&!this.levels.values[et])throw Error("unknown level "+et);this._level=et,_(this,H,D,"error"),_(this,H,D,"fatal"),_(this,H,D,"warn"),_(this,H,D,"info"),_(this,H,D,"debug"),_(this,H,D,"trace"),Fe.forEach(Je=>{_(this,H,D,Je)})}function ye(et,Je,Oe){if(!Je)throw new Error("missing bindings for child Pino");Oe=Oe||{},ae&&Je.serializers&&(Oe.serializers=Je.serializers);const wt=Oe.serializers;if(ae&&wt){var lt=Object.assign({},ce,wt),Ae=N.browser.serialize===!0?Object.keys(lt):ae;delete Je.serializers,j([Je],Ae,lt,this._stdErrSerialize)}function mt(he){this._childLevel=(he._childLevel|0)+1,this.bindings=Je,lt&&(this.serializers=lt,this._serialize=Ae),K&&(this._logEvent=z([].concat(he._logEvent.bindings,Je)))}mt.prototype=this;const rt=new mt(this);return l(this,rt),rt.child=function(...he){return ye.call(this,et,...he)},rt.level=Oe.level||this.level,et.onChild(rt),rt}return D}function y(N){const K=N.customLevels||{},ie=Object.assign({},m.levels.values,K),ce=Object.assign({},m.levels.labels,g(K));return{values:ie,labels:ce}}function g(N){const K={};return Object.keys(N).forEach(function(ie){K[N[ie]]=ie}),K}m.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},m.stdSerializers=n,m.stdTimeFunctions=Object.assign({},{nullTime:ze,epochTime:Ne,unixTime:Re,isoTime:Ve});function O(N){const K=[];N.bindings&&K.push(N.bindings);let ie=N[s];for(;ie.parent;)ie=ie.parent,ie.logger.bindings&&K.push(ie.logger.bindings);return K.reverse()}function _(N,K,ie,ce){if(Object.defineProperty(N,ce,{value:i(N.level,ie)>i(ce,ie)?ve:ie[r][ce],writable:!0,enumerable:!0,configurable:!0}),N[ce]===ve){if(!K.transmit)return;const B=K.transmit.level||N.level,Fe=i(B,ie);if(i(ce,ie)<Fe)return}N[ce]=E(N,K,ie,ce);const ae=O(N);ae.length!==0&&(N[ce]=S(ae,N[ce]))}function S(N,K){return function(){return K.apply(this,[...N,...arguments])}}function E(N,K,ie,ce){return function(ae){return function(){const Fe=K.timestamp(),$e=new Array(arguments.length),Xe=Object.getPrototypeOf&&Object.getPrototypeOf(this)===e?e:this;for(var D=0;D<$e.length;D++)$e[D]=arguments[D];var H=!1;if(K.serialize&&(j($e,this._serialize,this.serializers,this._stdErrSerialize),H=!0),K.asObject||K.formatters?ae.call(Xe,R(this,ce,$e,Fe,K)):ae.apply(Xe,$e),K.transmit){const pt=K.transmit.level||N._level,_e=i(pt,ie),Me=i(ce,ie);if(Me<_e)return;J(this,{ts:Fe,methodLevel:ce,methodValue:Me,transmitValue:ie.levels.values[K.transmit.level||N._level],send:K.transmit.send,val:i(N._level,ie)},$e,H)}}}(N[r][ce])}function R(N,K,ie,ce,ae){const{level:B,log:Fe=_e=>_e}=ae.formatters||{},$e=ie.slice();let Xe=$e[0];const D={};if(ce&&(D.time=ce),B){const _e=B(K,N.levels.values[K]);Object.assign(D,_e)}else D.level=N.levels.values[K];let H=(N._childLevel|0)+1;if(H<1&&(H=1),Xe!==null&&typeof Xe=="object"){for(;H--&&typeof $e[0]=="object";)Object.assign(D,$e.shift());Xe=$e.length?t($e.shift(),$e):void 0}else typeof Xe=="string"&&(Xe=t($e.shift(),$e));return Xe!==void 0&&(D[ae.messageKey]=Xe),Fe(D)}function j(N,K,ie,ce){for(const ae in N)if(ce&&N[ae]instanceof Error)N[ae]=m.stdSerializers.err(N[ae]);else if(typeof N[ae]=="object"&&!Array.isArray(N[ae])&&K)for(const B in N[ae])K.indexOf(B)>-1&&B in ie&&(N[ae][B]=ie[B](N[ae][B]))}function J(N,K,ie,ce=!1){const ae=K.send,B=K.ts,Fe=K.methodLevel,$e=K.methodValue,Xe=K.val,D=N._logEvent.bindings;ce||j(ie,N._serialize||Object.keys(N.serializers),N.serializers,N._stdErrSerialize===void 0?!0:N._stdErrSerialize),N._logEvent.ts=B,N._logEvent.messages=ie.filter(function(H){return D.indexOf(H)===-1}),N._logEvent.level.label=Fe,N._logEvent.level.value=$e,ae(Fe,N._logEvent,Xe),N._logEvent=z(D)}function z(N){return{ts:0,messages:[],bindings:N||[],level:{label:"",value:0}}}function X(N){const K={type:N.constructor.name,msg:N.message,stack:N.stack};for(const ie in N)K[ie]===void 0&&(K[ie]=N[ie]);return K}function ne(N){return typeof N.timestamp=="function"?N.timestamp:N.timestamp===!1?ze:Ne}function oe(){return{}}function Se(N){return N}function ve(){}function ze(){return!1}function Ne(){return Date.now()}function Re(){return Math.round(Date.now()/1e3)}function Ve(){return new Date(Date.now()).toISOString()}function M(){function N(K){return typeof K!="undefined"&&K}try{return typeof globalThis!="undefined"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return N(self)||N(window)||N(this)||{}}}return Ir.exports.default=m,Ir.exports.pino=m,Ir.exports}var ab=sb();const ob=Ya(ab),St=[];for(let t=0;t<256;++t)St.push((t+256).toString(16).slice(1));function ub(t,e=0){return(St[t[e+0]]+St[t[e+1]]+St[t[e+2]]+St[t[e+3]]+"-"+St[t[e+4]]+St[t[e+5]]+"-"+St[t[e+6]]+St[t[e+7]]+"-"+St[t[e+8]]+St[t[e+9]]+"-"+St[t[e+10]]+St[t[e+11]]+St[t[e+12]]+St[t[e+13]]+St[t[e+14]]+St[t[e+15]]).toLowerCase()}let bu;const lb=new Uint8Array(16);function cb(){if(!bu){if(typeof crypto=="undefined"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");bu=crypto.getRandomValues.bind(crypto)}return bu(lb)}const db=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),kd={randomUUID:db};function fb(t,e,n){var r,s,o;if(kd.randomUUID&&!t)return kd.randomUUID();t=t||{};const i=(o=(s=t.random)!=null?s:(r=t.rng)==null?void 0:r.call(t))!=null?o:cb();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,ub(i)}const hb=4;var Vh=(t=>(t.CREATED="CREATED",t.STARTING="STARTING",t.LIVE="LIVE",t.FINALIZED="FINALIZED",t))(Vh||{});const pb={ALL:"*",CORE:"core:**",ADD_TO_CART_HOOKS:"core:addToCartHooks:**",LIVE_STREAMING_EVENT:"event:**",EVENT_CHAT:"event:chat:**",EVENT_PRODUCTS:"event:products:**",CUSTOMIZE_LIVE:"customize-live:**",PLAYER:"player:**",SNACK_SIZE_VIDEO:"ssv:**",SNACK_SIZE_VIDEO_ADMIN:"ssv-admin:**",UI:"ui:**",UTILS:"utils:**"},Hh={EVENT_STATUS_CHANGED:"event:statusChanged",ATCH_ACTION_EXECUTED:"core:addToCartHooks:actionExecuted"};var qh=(t=>(t.English="en",t.Spanish="es",t.Portuguese="pt",t))(qh||{}),ot=(t=>(t.TRACE="trace",t.DEBUG="debug",t.INFO="info",t.WARN="warn",t.ERROR="error",t.FATAL="fatal",t))(ot||{});const Ze={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},zh={[Ze.trace]:"trace",[Ze.debug]:"debug",[Ze.info]:"info",[Ze.warn]:"warn",[Ze.error]:"error",[Ze.fatal]:"fatal"};var Kh=(t=>(t.COMBO="Combo",t.BADGE="Badged",t))(Kh||{}),Gh=(t=>(t.VTEX="VTEX",t.PLATFORM="platform",t.CACE="CACE",t.GLOBAL_PAGE="globalPage",t.CUSTOMIZATION="customization",t.FAST_STORE="faststore",t.UNKNOWN="unknown",t))(Gh||{});function Wh(t){return Object.values(ot).includes(String(t).toLowerCase())}class Ul extends Error{constructor(e){super(`Invalid log level: ${e}`),this.name="InvalidLogLevelError"}}const Tt=class Tt{constructor(e){me(this,"instance");me(this,"httpLogger");me(this,"consoleLogger");me(this,"config");var l;this.config=e;const{source:n,levelService:i,metadata:r={},consoleLogger:s,httpLogger:o}=e;(l=Tt.root)!=null||(Tt.root=Tt.createRootLogger(s,o)),Tt.mergeGlobalMetadata(r),this.instance=Tt.root.child({source:n}),this.consoleLogger=s,this.httpLogger=o,this.setLevel(i.getLevel(n))}static createRootLogger(e,n){return ob({customLevels:Ze,browser:{write:i=>{const{payload:r,options:s,stack:o,...l}=i,d={...l,...r};s.silent||e.print(d,o),d.level>=Ze[ot.WARN]&&n.save(d)}}})}static mergeGlobalMetadata(e={}){Tt.globalMetadata={...Tt.globalMetadata,...e}}child(e,n={}){return Tt.mergeGlobalMetadata(n),new Tt({source:`${this.config.source}:${e}`,levelService:this.config.levelService,consoleLogger:this.consoleLogger,httpLogger:this.httpLogger})}setLevel(e){this.instance.level=e}setMetadata(e){Tt.mergeGlobalMetadata(e)}formatLogEntry(e){const{content:n,stack:i,options:r={}}=e,{message:s,args:o=[]}=n,l=fb(),d={};let h;return s instanceof Error?(d.error={name:s.name,message:s.message,stack:s.stack},h=s.message):h=typeof s=="object"?JSON.stringify(s):String(s),o.forEach((y,g)=>this.formatArg(y,g,d)),{payload:{id:l,msg:h,data:d,...Tt.globalMetadata},options:r,stack:i}}formatArg(e,n,i){if(e instanceof Error){const r=i.error?`error${n+1}`:"error";i[r]={message:e.message,stack:e.stack,name:e.name}}else typeof e=="object"&&e!==null?Object.assign(i,e):i[`$${n}`]=String(e)}log(e,n){if(typeof this.instance[e]!="function")throw new Ul(e);const i=this.formatLogEntry(n);this.instance[e](i)}trace(e){this.log("trace",e)}debug(e){this.log("debug",e)}info(e){this.log("info",e)}warn(e){this.log("warn",e)}error(e){this.log("error",e)}fatal(e){this.log("fatal",e)}get source(){return this.config.source}};me(Tt,"globalMetadata",{}),me(Tt,"root",null);let ll=Tt;const _d={stackExclusionPatterns:/\b(PinoAdapter|ConsoleLogger|LoggerChain|Logger|Proxy|Child|pino\.js)\b/,themes:{dark:{baseStyles:{timestamp:"color: #A9A9A9; font-weight: normal;",source:"color: #B0B0B0; font-weight: normal;",context:"color: #FFFFFF; font-weight: bold;",defaultMessage:"color: #E5E5E5; font-weight: normal;"},levels:{[Ze[ot.TRACE]]:"color: #778899; font-weight: bold;",[Ze[ot.DEBUG]]:"color: #008B8B; font-weight: bold;",[Ze[ot.INFO]]:"color: #00FFFF; font-weight: bold;",[Ze[ot.WARN]]:"color: #FFD700; font-weight: bold;",[Ze[ot.ERROR]]:"color: #FF4500; font-weight: bold;",[Ze[ot.FATAL]]:"color: #FF0000; font-weight: bold; text-shadow: 1px 1px 1px black;"},messages:{[Ze[ot.WARN]]:"color: #FFD700; font-weight: normal;",[Ze[ot.ERROR]]:"color: #FF4500; font-weight: normal;",[Ze[ot.FATAL]]:"color: #FF0000; font-weight: bold;"}},light:{baseStyles:{timestamp:"color: #4D4D4D; font-weight: normal;",source:"color: #666666; font-weight: normal;",context:"color: #000000; font-weight: bold;",defaultMessage:"color: #333333; font-weight: normal;"},levels:{[Ze[ot.TRACE]]:"color: #6A5ACD; font-weight: bold;",[Ze[ot.DEBUG]]:"color: #00509E; font-weight: bold;",[Ze[ot.INFO]]:"color: #1E90FF; font-weight: bold;",[Ze[ot.WARN]]:"color: #FFA500; font-weight: bold;",[Ze[ot.ERROR]]:"color: #ff0033; font-weight: bold;",[Ze[ot.FATAL]]:"color: #D80000; font-weight: bold; text-shadow: 1px 1px 1px #660000;"},messages:{[Ze[ot.WARN]]:"color: #FFA500; font-weight: normal;",[Ze[ot.ERROR]]:"color: #ff0033; font-weight: normal;",[Ze[ot.FATAL]]:"color: #D80000; font-weight: bold;"}}}};class mb{constructor(){me(this,"theme");this.theme=this.initializeTheme(),this.setupThemeChangeListener()}initializeTheme(){const e=localStorage.getItem("log-theme");return e==="light"||e==="dark"?e:this.detectTheme()}detectTheme(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}setupThemeChangeListener(){window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",e=>{this.theme=e.matches?"dark":"light"})}static setTheme(e){localStorage.setItem("consoleLoggerTheme",e)}formatStack(e){return e.split(`
|
|
29
|
+
`).filter(n=>!_d.stackExclusionPatterns.test(n)).map(n=>n.replace(/^Error\s*/,"").trim())}getStyles(e){const n=_d.themes[this.theme];return{...n.baseStyles,level:n.levels[e]||n.baseStyles.defaultMessage,message:n.messages[e]||n.baseStyles.defaultMessage}}getTime(){return new Date().toLocaleTimeString("en-US",{hour12:!1})+`.${new Date().getMilliseconds().toString().padStart(3,"0")}`}print({level:e,source:n,msg:i,data:r},s){const[o,l,d]=n.split(":"),h=(zh[e]||"UNKNOWN").toUpperCase(),m=d?`${d}: `:"",y=l?`:${l}`:"",g=this.getStyles(e);console.groupCollapsed(`%c${this.getTime()} %c${h} %c[${o}${y}] %c${m}%c${i}`,g.timestamp,g.level,g.source,g.context,g.message),r&&Object.keys(r).length&&console.log("Data:",r);const O=this.formatStack(s||new Error().stack);O.length&&console.log("Stack:",O.join(`
|
|
30
|
+
`)),console.groupEnd()}}const gb={endpoint:`${rr.apiUrls.restV2}/v1/telemetry/logs`,batchSize:500,flushInterval:10,maxRetries:5,retryBackoffFactor:2,maxPayloadSize:500};class jl{constructor(e){me(this,"config");me(this,"isFlushing",!1);me(this,"retryCount",0);me(this,"isFlushScheduled",!1);this.config=e,this.setupUnloadListener()}static create(e){const n={...gb,...e};if(!n.db)throw new Error("Invalid Dixie DB");if(!n.project)throw new Error("Project name is required");return new jl(n)}async save(e){const n=JSON.parse(JSON.stringify(e));await this.config.db.logs.add(n),this.scheduleFlush()}scheduleFlush(e=this.config.flushInterval*1e3){this.isFlushScheduled||this.isFlushing||(this.isFlushScheduled=!0,setTimeout(()=>{this.isFlushScheduled=!1,this.flush()},e))}async flush(){if(this.isFlushing)return;this.isFlushing=!0;let e=!1;try{await this.processLogsBatch(async i=>{await this.sendLogs(i),await this.deleteLogs(i)}),this.retryCount=0,e=!0}catch(i){this.logError("flush",i)}this.isFlushing=!1;const n=await this.hasPendingLogs();!e&&n?this.handleRetry():e&&n&&this.scheduleFlush()}async processLogsBatch(e){const n=await this.getLogsBatch(),i=this.splitLogsByPayloadSize(n);for(const r of i)await e(r)}async getLogsBatch(e=this.config.batchSize){return this.config.db.logs.orderBy("time").limit(e).toArray()}splitLogsByPayloadSize(e){let n=[],i=0;const r=[];return e.forEach(s=>{const o=JSON.stringify(s).length/1024;i+o>this.config.maxPayloadSize&&(r.push(n),n=[],i=0),n.push(s),i+=o}),n.length>0&&r.push(n),r}async sendLogs(e){const n=this.buildPayload(e);await vi({url:this.config.endpoint,method:"POST",body:n})}buildPayload(e){return JSON.stringify({project:this.config.project,logs:e})}async deleteLogs(e){const n=e.map(i=>i.id);await this.config.db.logs.bulkDelete(n)}logError(e,n){console.error(`[${e}]`,n)}handleRetry(){if(this.retryCount>=this.config.maxRetries)return;this.retryCount++;const e=this.config.flushInterval*Math.pow(this.config.retryBackoffFactor,this.retryCount)*1e3;this.scheduleFlush(e)}async hasPendingLogs(){return await this.config.db.logs.count()>0}setupUnloadListener(){window.addEventListener("beforeunload",async()=>{this.isFlushing||!await this.hasPendingLogs()||await this.processLogsBatch(async e=>{const n=this.buildPayload(e);navigator.sendBeacon(this.config.endpoint,n)?await this.deleteLogs(e):console.warn("Failed to send logs via sendBeacon; logs will remain in the database.")})})}}var ku={},_u,wd;function Xa(){if(wd)return _u;wd=1;const t="\\\\/",e=`[^${t}]`,n="\\.",i="\\+",r="\\?",s="\\/",o="(?=.)",l="[^/]",d=`(?:${s}|$)`,h=`(?:^|${s})`,m=`${n}{1,2}${d}`,y=`(?!${n})`,g=`(?!${h}${m})`,O=`(?!${n}{0,1}${d})`,_=`(?!${m})`,S=`[^.${s}]`,E=`${l}*?`,j={DOT_LITERAL:n,PLUS_LITERAL:i,QMARK_LITERAL:r,SLASH_LITERAL:s,ONE_CHAR:o,QMARK:l,END_ANCHOR:d,DOTS_SLASH:m,NO_DOT:y,NO_DOTS:g,NO_DOT_SLASH:O,NO_DOTS_SLASH:_,QMARK_NO_DOT:S,STAR:E,START_ANCHOR:h,SEP:"/"},J={...j,SLASH_LITERAL:`[${t}]`,QMARK:e,STAR:`${e}*?`,DOTS_SLASH:`${n}{1,2}(?:[${t}]|$)`,NO_DOT:`(?!${n})`,NO_DOTS:`(?!(?:^|[${t}])${n}{1,2}(?:[${t}]|$))`,NO_DOT_SLASH:`(?!${n}{0,1}(?:[${t}]|$))`,NO_DOTS_SLASH:`(?!${n}{1,2}(?:[${t}]|$))`,QMARK_NO_DOT:`[^.${t}]`,START_ANCHOR:`(?:^|[${t}])`,END_ANCHOR:`(?:[${t}]|$)`,SEP:"\\"},z={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};return _u={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:z,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(X){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${X.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(X){return X===!0?J:j}},_u}var Sd;function Qa(){return Sd||(Sd=1,function(t){const{REGEX_BACKSLASH:e,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_GLOBAL:r}=Xa();t.isObject=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),t.hasRegexChars=s=>i.test(s),t.isRegexChar=s=>s.length===1&&t.hasRegexChars(s),t.escapeRegex=s=>s.replace(r,"\\$1"),t.toPosixSlashes=s=>s.replace(e,"/"),t.isWindows=()=>{if(typeof navigator!="undefined"&&navigator.platform){const s=navigator.platform.toLowerCase();return s==="win32"||s==="windows"}return typeof process!="undefined"&&process.platform?process.platform==="win32":!1},t.removeBackslashes=s=>s.replace(n,o=>o==="\\"?"":o),t.escapeLast=(s,o,l)=>{const d=s.lastIndexOf(o,l);return d===-1?s:s[d-1]==="\\"?t.escapeLast(s,o,d-1):`${s.slice(0,d)}\\${s.slice(d)}`},t.removePrefix=(s,o={})=>{let l=s;return l.startsWith("./")&&(l=l.slice(2),o.prefix="./"),l},t.wrapOutput=(s,o={},l={})=>{const d=l.contains?"":"^",h=l.contains?"":"$";let m=`${d}(?:${s})${h}`;return o.negated===!0&&(m=`(?:^(?!${m}).*$)`),m},t.basename=(s,{windows:o}={})=>{const l=s.split(o?/[\\/]/:"/"),d=l[l.length-1];return d===""?l[l.length-2]:d}}(ku)),ku}var wu,Ed;function vb(){if(Ed)return wu;Ed=1;const t=Qa(),{CHAR_ASTERISK:e,CHAR_AT:n,CHAR_BACKWARD_SLASH:i,CHAR_COMMA:r,CHAR_DOT:s,CHAR_EXCLAMATION_MARK:o,CHAR_FORWARD_SLASH:l,CHAR_LEFT_CURLY_BRACE:d,CHAR_LEFT_PARENTHESES:h,CHAR_LEFT_SQUARE_BRACKET:m,CHAR_PLUS:y,CHAR_QUESTION_MARK:g,CHAR_RIGHT_CURLY_BRACE:O,CHAR_RIGHT_PARENTHESES:_,CHAR_RIGHT_SQUARE_BRACKET:S}=Xa(),E=J=>J===l||J===i,R=J=>{J.isPrefix!==!0&&(J.depth=J.isGlobstar?1/0:1)};return wu=(J,z)=>{const X=z||{},ne=J.length-1,oe=X.parts===!0||X.scanToEnd===!0,Se=[],ve=[],ze=[];let Ne=J,Re=-1,Ve=0,M=0,N=!1,K=!1,ie=!1,ce=!1,ae=!1,B=!1,Fe=!1,$e=!1,Xe=!1,D=!1,H=0,pt,_e,Me={value:"",depth:0,isGlob:!1};const ye=()=>Re>=ne,et=()=>Ne.charCodeAt(Re+1),Je=()=>(pt=_e,Ne.charCodeAt(++Re));for(;Re<ne;){_e=Je();let mt;if(_e===i){Fe=Me.backslashes=!0,_e=Je(),_e===d&&(B=!0);continue}if(B===!0||_e===d){for(H++;ye()!==!0&&(_e=Je());){if(_e===i){Fe=Me.backslashes=!0,Je();continue}if(_e===d){H++;continue}if(B!==!0&&_e===s&&(_e=Je())===s){if(N=Me.isBrace=!0,ie=Me.isGlob=!0,D=!0,oe===!0)continue;break}if(B!==!0&&_e===r){if(N=Me.isBrace=!0,ie=Me.isGlob=!0,D=!0,oe===!0)continue;break}if(_e===O&&(H--,H===0)){B=!1,N=Me.isBrace=!0,D=!0;break}}if(oe===!0)continue;break}if(_e===l){if(Se.push(Re),ve.push(Me),Me={value:"",depth:0,isGlob:!1},D===!0)continue;if(pt===s&&Re===Ve+1){Ve+=2;continue}M=Re+1;continue}if(X.noext!==!0&&(_e===y||_e===n||_e===e||_e===g||_e===o)===!0&&et()===h){if(ie=Me.isGlob=!0,ce=Me.isExtglob=!0,D=!0,_e===o&&Re===Ve&&(Xe=!0),oe===!0){for(;ye()!==!0&&(_e=Je());){if(_e===i){Fe=Me.backslashes=!0,_e=Je();continue}if(_e===_){ie=Me.isGlob=!0,D=!0;break}}continue}break}if(_e===e){if(pt===e&&(ae=Me.isGlobstar=!0),ie=Me.isGlob=!0,D=!0,oe===!0)continue;break}if(_e===g){if(ie=Me.isGlob=!0,D=!0,oe===!0)continue;break}if(_e===m){for(;ye()!==!0&&(mt=Je());){if(mt===i){Fe=Me.backslashes=!0,Je();continue}if(mt===S){K=Me.isBracket=!0,ie=Me.isGlob=!0,D=!0;break}}if(oe===!0)continue;break}if(X.nonegate!==!0&&_e===o&&Re===Ve){$e=Me.negated=!0,Ve++;continue}if(X.noparen!==!0&&_e===h){if(ie=Me.isGlob=!0,oe===!0){for(;ye()!==!0&&(_e=Je());){if(_e===h){Fe=Me.backslashes=!0,_e=Je();continue}if(_e===_){D=!0;break}}continue}break}if(ie===!0){if(D=!0,oe===!0)continue;break}}X.noext===!0&&(ce=!1,ie=!1);let Oe=Ne,wt="",lt="";Ve>0&&(wt=Ne.slice(0,Ve),Ne=Ne.slice(Ve),M-=Ve),Oe&&ie===!0&&M>0?(Oe=Ne.slice(0,M),lt=Ne.slice(M)):ie===!0?(Oe="",lt=Ne):Oe=Ne,Oe&&Oe!==""&&Oe!=="/"&&Oe!==Ne&&E(Oe.charCodeAt(Oe.length-1))&&(Oe=Oe.slice(0,-1)),X.unescape===!0&&(lt&&(lt=t.removeBackslashes(lt)),Oe&&Fe===!0&&(Oe=t.removeBackslashes(Oe)));const Ae={prefix:wt,input:J,start:Ve,base:Oe,glob:lt,isBrace:N,isBracket:K,isGlob:ie,isExtglob:ce,isGlobstar:ae,negated:$e,negatedExtglob:Xe};if(X.tokens===!0&&(Ae.maxDepth=0,E(_e)||ve.push(Me),Ae.tokens=ve),X.parts===!0||X.tokens===!0){let mt;for(let rt=0;rt<Se.length;rt++){const he=mt?mt+1:Ve,Ye=Se[rt],ue=J.slice(he,Ye);X.tokens&&(rt===0&&Ve!==0?(ve[rt].isPrefix=!0,ve[rt].value=wt):ve[rt].value=ue,R(ve[rt]),Ae.maxDepth+=ve[rt].depth),(rt!==0||ue!=="")&&ze.push(ue),mt=Ye}if(mt&&mt+1<J.length){const rt=J.slice(mt+1);ze.push(rt),X.tokens&&(ve[ve.length-1].value=rt,R(ve[ve.length-1]),Ae.maxDepth+=ve[ve.length-1].depth)}Ae.slashes=Se,Ae.parts=ze}return Ae},wu}var Su,Nd;function yb(){if(Nd)return Su;Nd=1;const t=Xa(),e=Qa(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:i,REGEX_NON_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:o}=t,l=(m,y)=>{if(typeof y.expandRange=="function")return y.expandRange(...m,y);m.sort();const g=`[${m.join("-")}]`;try{new RegExp(g)}catch{return m.map(_=>e.escapeRegex(_)).join("..")}return g},d=(m,y)=>`Missing ${m}: "${y}" - use "\\\\${y}" to match literal characters`,h=(m,y)=>{if(typeof m!="string")throw new TypeError("Expected a string");m=o[m]||m;const g={...y},O=typeof g.maxLength=="number"?Math.min(n,g.maxLength):n;let _=m.length;if(_>O)throw new SyntaxError(`Input length: ${_}, exceeds maximum allowed length: ${O}`);const S={type:"bos",value:"",output:g.prepend||""},E=[S],R=g.capture?"":"?:",j=t.globChars(g.windows),J=t.extglobChars(j),{DOT_LITERAL:z,PLUS_LITERAL:X,SLASH_LITERAL:ne,ONE_CHAR:oe,DOTS_SLASH:Se,NO_DOT:ve,NO_DOT_SLASH:ze,NO_DOTS_SLASH:Ne,QMARK:Re,QMARK_NO_DOT:Ve,STAR:M,START_ANCHOR:N}=j,K=he=>`(${R}(?:(?!${N}${he.dot?Se:z}).)*?)`,ie=g.dot?"":ve,ce=g.dot?Re:Ve;let ae=g.bash===!0?K(g):M;g.capture&&(ae=`(${ae})`),typeof g.noext=="boolean"&&(g.noextglob=g.noext);const B={input:m,index:-1,start:0,dot:g.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:E};m=e.removePrefix(m,B),_=m.length;const Fe=[],$e=[],Xe=[];let D=S,H;const pt=()=>B.index===_-1,_e=B.peek=(he=1)=>m[B.index+he],Me=B.advance=()=>m[++B.index]||"",ye=()=>m.slice(B.index+1),et=(he="",Ye=0)=>{B.consumed+=he,B.index+=Ye},Je=he=>{B.output+=he.output!=null?he.output:he.value,et(he.value)},Oe=()=>{let he=1;for(;_e()==="!"&&(_e(2)!=="("||_e(3)==="?");)Me(),B.start++,he++;return he%2===0?!1:(B.negated=!0,B.start++,!0)},wt=he=>{B[he]++,Xe.push(he)},lt=he=>{B[he]--,Xe.pop()},Ae=he=>{if(D.type==="globstar"){const Ye=B.braces>0&&(he.type==="comma"||he.type==="brace"),ue=he.extglob===!0||Fe.length&&(he.type==="pipe"||he.type==="paren");he.type!=="slash"&&he.type!=="paren"&&!Ye&&!ue&&(B.output=B.output.slice(0,-D.output.length),D.type="star",D.value="*",D.output=ae,B.output+=D.output)}if(Fe.length&&he.type!=="paren"&&(Fe[Fe.length-1].inner+=he.value),(he.value||he.output)&&Je(he),D&&D.type==="text"&&he.type==="text"){D.output=(D.output||D.value)+he.value,D.value+=he.value;return}he.prev=D,E.push(he),D=he},mt=(he,Ye)=>{const ue={...J[Ye],conditions:1,inner:""};ue.prev=D,ue.parens=B.parens,ue.output=B.output;const Te=(g.capture?"(":"")+ue.open;wt("parens"),Ae({type:he,value:Ye,output:B.output?"":oe}),Ae({type:"paren",extglob:!0,value:Me(),output:Te}),Fe.push(ue)},rt=he=>{let Ye=he.close+(g.capture?")":""),ue;if(he.type==="negate"){let Te=ae;if(he.inner&&he.inner.length>1&&he.inner.includes("/")&&(Te=K(g)),(Te!==ae||pt()||/^\)+$/.test(ye()))&&(Ye=he.close=`)$))${Te}`),he.inner.includes("*")&&(ue=ye())&&/^\.[^\\/.]+$/.test(ue)){const tt=h(ue,{...y,fastpaths:!1}).output;Ye=he.close=`)${tt})${Te})`}he.prev.type==="bos"&&(B.negatedExtglob=!0)}Ae({type:"paren",extglob:!0,value:H,output:Ye}),lt("parens")};if(g.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(m)){let he=!1,Ye=m.replace(s,(ue,Te,tt,ct,ut,vn)=>ct==="\\"?(he=!0,ue):ct==="?"?Te?Te+ct+(ut?Re.repeat(ut.length):""):vn===0?ce+(ut?Re.repeat(ut.length):""):Re.repeat(tt.length):ct==="."?z.repeat(tt.length):ct==="*"?Te?Te+ct+(ut?ae:""):ae:Te?ue:`\\${ue}`);return he===!0&&(g.unescape===!0?Ye=Ye.replace(/\\/g,""):Ye=Ye.replace(/\\+/g,ue=>ue.length%2===0?"\\\\":ue?"\\":"")),Ye===m&&g.contains===!0?(B.output=m,B):(B.output=e.wrapOutput(Ye,B,y),B)}for(;!pt();){if(H=Me(),H==="\0")continue;if(H==="\\"){const ue=_e();if(ue==="/"&&g.bash!==!0||ue==="."||ue===";")continue;if(!ue){H+="\\",Ae({type:"text",value:H});continue}const Te=/^\\+/.exec(ye());let tt=0;if(Te&&Te[0].length>2&&(tt=Te[0].length,B.index+=tt,tt%2!==0&&(H+="\\")),g.unescape===!0?H=Me():H+=Me(),B.brackets===0){Ae({type:"text",value:H});continue}}if(B.brackets>0&&(H!=="]"||D.value==="["||D.value==="[^")){if(g.posix!==!1&&H===":"){const ue=D.value.slice(1);if(ue.includes("[")&&(D.posix=!0,ue.includes(":"))){const Te=D.value.lastIndexOf("["),tt=D.value.slice(0,Te),ct=D.value.slice(Te+2),ut=i[ct];if(ut){D.value=tt+ut,B.backtrack=!0,Me(),!S.output&&E.indexOf(D)===1&&(S.output=oe);continue}}}(H==="["&&_e()!==":"||H==="-"&&_e()==="]")&&(H=`\\${H}`),H==="]"&&(D.value==="["||D.value==="[^")&&(H=`\\${H}`),g.posix===!0&&H==="!"&&D.value==="["&&(H="^"),D.value+=H,Je({value:H});continue}if(B.quotes===1&&H!=='"'){H=e.escapeRegex(H),D.value+=H,Je({value:H});continue}if(H==='"'){B.quotes=B.quotes===1?0:1,g.keepQuotes===!0&&Ae({type:"text",value:H});continue}if(H==="("){wt("parens"),Ae({type:"paren",value:H});continue}if(H===")"){if(B.parens===0&&g.strictBrackets===!0)throw new SyntaxError(d("opening","("));const ue=Fe[Fe.length-1];if(ue&&B.parens===ue.parens+1){rt(Fe.pop());continue}Ae({type:"paren",value:H,output:B.parens?")":"\\)"}),lt("parens");continue}if(H==="["){if(g.nobracket===!0||!ye().includes("]")){if(g.nobracket!==!0&&g.strictBrackets===!0)throw new SyntaxError(d("closing","]"));H=`\\${H}`}else wt("brackets");Ae({type:"bracket",value:H});continue}if(H==="]"){if(g.nobracket===!0||D&&D.type==="bracket"&&D.value.length===1){Ae({type:"text",value:H,output:`\\${H}`});continue}if(B.brackets===0){if(g.strictBrackets===!0)throw new SyntaxError(d("opening","["));Ae({type:"text",value:H,output:`\\${H}`});continue}lt("brackets");const ue=D.value.slice(1);if(D.posix!==!0&&ue[0]==="^"&&!ue.includes("/")&&(H=`/${H}`),D.value+=H,Je({value:H}),g.literalBrackets===!1||e.hasRegexChars(ue))continue;const Te=e.escapeRegex(D.value);if(B.output=B.output.slice(0,-D.value.length),g.literalBrackets===!0){B.output+=Te,D.value=Te;continue}D.value=`(${R}${Te}|${D.value})`,B.output+=D.value;continue}if(H==="{"&&g.nobrace!==!0){wt("braces");const ue={type:"brace",value:H,output:"(",outputIndex:B.output.length,tokensIndex:B.tokens.length};$e.push(ue),Ae(ue);continue}if(H==="}"){const ue=$e[$e.length-1];if(g.nobrace===!0||!ue){Ae({type:"text",value:H,output:H});continue}let Te=")";if(ue.dots===!0){const tt=E.slice(),ct=[];for(let ut=tt.length-1;ut>=0&&(E.pop(),tt[ut].type!=="brace");ut--)tt[ut].type!=="dots"&&ct.unshift(tt[ut].value);Te=l(ct,g),B.backtrack=!0}if(ue.comma!==!0&&ue.dots!==!0){const tt=B.output.slice(0,ue.outputIndex),ct=B.tokens.slice(ue.tokensIndex);ue.value=ue.output="\\{",H=Te="\\}",B.output=tt;for(const ut of ct)B.output+=ut.output||ut.value}Ae({type:"brace",value:H,output:Te}),lt("braces"),$e.pop();continue}if(H==="|"){Fe.length>0&&Fe[Fe.length-1].conditions++,Ae({type:"text",value:H});continue}if(H===","){let ue=H;const Te=$e[$e.length-1];Te&&Xe[Xe.length-1]==="braces"&&(Te.comma=!0,ue="|"),Ae({type:"comma",value:H,output:ue});continue}if(H==="/"){if(D.type==="dot"&&B.index===B.start+1){B.start=B.index+1,B.consumed="",B.output="",E.pop(),D=S;continue}Ae({type:"slash",value:H,output:ne});continue}if(H==="."){if(B.braces>0&&D.type==="dot"){D.value==="."&&(D.output=z);const ue=$e[$e.length-1];D.type="dots",D.output+=H,D.value+=H,ue.dots=!0;continue}if(B.braces+B.parens===0&&D.type!=="bos"&&D.type!=="slash"){Ae({type:"text",value:H,output:z});continue}Ae({type:"dot",value:H,output:z});continue}if(H==="?"){if(!(D&&D.value==="(")&&g.noextglob!==!0&&_e()==="("&&_e(2)!=="?"){mt("qmark",H);continue}if(D&&D.type==="paren"){const Te=_e();let tt=H;(D.value==="("&&!/[!=<:]/.test(Te)||Te==="<"&&!/<([!=]|\w+>)/.test(ye()))&&(tt=`\\${H}`),Ae({type:"text",value:H,output:tt});continue}if(g.dot!==!0&&(D.type==="slash"||D.type==="bos")){Ae({type:"qmark",value:H,output:Ve});continue}Ae({type:"qmark",value:H,output:Re});continue}if(H==="!"){if(g.noextglob!==!0&&_e()==="("&&(_e(2)!=="?"||!/[!=<:]/.test(_e(3)))){mt("negate",H);continue}if(g.nonegate!==!0&&B.index===0){Oe();continue}}if(H==="+"){if(g.noextglob!==!0&&_e()==="("&&_e(2)!=="?"){mt("plus",H);continue}if(D&&D.value==="("||g.regex===!1){Ae({type:"plus",value:H,output:X});continue}if(D&&(D.type==="bracket"||D.type==="paren"||D.type==="brace")||B.parens>0){Ae({type:"plus",value:H});continue}Ae({type:"plus",value:X});continue}if(H==="@"){if(g.noextglob!==!0&&_e()==="("&&_e(2)!=="?"){Ae({type:"at",extglob:!0,value:H,output:""});continue}Ae({type:"text",value:H});continue}if(H!=="*"){(H==="$"||H==="^")&&(H=`\\${H}`);const ue=r.exec(ye());ue&&(H+=ue[0],B.index+=ue[0].length),Ae({type:"text",value:H});continue}if(D&&(D.type==="globstar"||D.star===!0)){D.type="star",D.star=!0,D.value+=H,D.output=ae,B.backtrack=!0,B.globstar=!0,et(H);continue}let he=ye();if(g.noextglob!==!0&&/^\([^?]/.test(he)){mt("star",H);continue}if(D.type==="star"){if(g.noglobstar===!0){et(H);continue}const ue=D.prev,Te=ue.prev,tt=ue.type==="slash"||ue.type==="bos",ct=Te&&(Te.type==="star"||Te.type==="globstar");if(g.bash===!0&&(!tt||he[0]&&he[0]!=="/")){Ae({type:"star",value:H,output:""});continue}const ut=B.braces>0&&(ue.type==="comma"||ue.type==="brace"),vn=Fe.length&&(ue.type==="pipe"||ue.type==="paren");if(!tt&&ue.type!=="paren"&&!ut&&!vn){Ae({type:"star",value:H,output:""});continue}for(;he.slice(0,3)==="/**";){const qt=m[B.index+4];if(qt&&qt!=="/")break;he=he.slice(3),et("/**",3)}if(ue.type==="bos"&&pt()){D.type="globstar",D.value+=H,D.output=K(g),B.output=D.output,B.globstar=!0,et(H);continue}if(ue.type==="slash"&&ue.prev.type!=="bos"&&!ct&&pt()){B.output=B.output.slice(0,-(ue.output+D.output).length),ue.output=`(?:${ue.output}`,D.type="globstar",D.output=K(g)+(g.strictSlashes?")":"|$)"),D.value+=H,B.globstar=!0,B.output+=ue.output+D.output,et(H);continue}if(ue.type==="slash"&&ue.prev.type!=="bos"&&he[0]==="/"){const qt=he[1]!==void 0?"|$":"";B.output=B.output.slice(0,-(ue.output+D.output).length),ue.output=`(?:${ue.output}`,D.type="globstar",D.output=`${K(g)}${ne}|${ne}${qt})`,D.value+=H,B.output+=ue.output+D.output,B.globstar=!0,et(H+Me()),Ae({type:"slash",value:"/",output:""});continue}if(ue.type==="bos"&&he[0]==="/"){D.type="globstar",D.value+=H,D.output=`(?:^|${ne}|${K(g)}${ne})`,B.output=D.output,B.globstar=!0,et(H+Me()),Ae({type:"slash",value:"/",output:""});continue}B.output=B.output.slice(0,-D.output.length),D.type="globstar",D.output=K(g),D.value+=H,B.output+=D.output,B.globstar=!0,et(H);continue}const Ye={type:"star",value:H,output:ae};if(g.bash===!0){Ye.output=".*?",(D.type==="bos"||D.type==="slash")&&(Ye.output=ie+Ye.output),Ae(Ye);continue}if(D&&(D.type==="bracket"||D.type==="paren")&&g.regex===!0){Ye.output=H,Ae(Ye);continue}(B.index===B.start||D.type==="slash"||D.type==="dot")&&(D.type==="dot"?(B.output+=ze,D.output+=ze):g.dot===!0?(B.output+=Ne,D.output+=Ne):(B.output+=ie,D.output+=ie),_e()!=="*"&&(B.output+=oe,D.output+=oe)),Ae(Ye)}for(;B.brackets>0;){if(g.strictBrackets===!0)throw new SyntaxError(d("closing","]"));B.output=e.escapeLast(B.output,"["),lt("brackets")}for(;B.parens>0;){if(g.strictBrackets===!0)throw new SyntaxError(d("closing",")"));B.output=e.escapeLast(B.output,"("),lt("parens")}for(;B.braces>0;){if(g.strictBrackets===!0)throw new SyntaxError(d("closing","}"));B.output=e.escapeLast(B.output,"{"),lt("braces")}if(g.strictSlashes!==!0&&(D.type==="star"||D.type==="bracket")&&Ae({type:"maybe_slash",value:"",output:`${ne}?`}),B.backtrack===!0){B.output="";for(const he of B.tokens)B.output+=he.output!=null?he.output:he.value,he.suffix&&(B.output+=he.suffix)}return B};return h.fastpaths=(m,y)=>{const g={...y},O=typeof g.maxLength=="number"?Math.min(n,g.maxLength):n,_=m.length;if(_>O)throw new SyntaxError(`Input length: ${_}, exceeds maximum allowed length: ${O}`);m=o[m]||m;const{DOT_LITERAL:S,SLASH_LITERAL:E,ONE_CHAR:R,DOTS_SLASH:j,NO_DOT:J,NO_DOTS:z,NO_DOTS_SLASH:X,STAR:ne,START_ANCHOR:oe}=t.globChars(g.windows),Se=g.dot?z:J,ve=g.dot?X:J,ze=g.capture?"":"?:",Ne={negated:!1,prefix:""};let Re=g.bash===!0?".*?":ne;g.capture&&(Re=`(${Re})`);const Ve=ie=>ie.noglobstar===!0?Re:`(${ze}(?:(?!${oe}${ie.dot?j:S}).)*?)`,M=ie=>{switch(ie){case"*":return`${Se}${R}${Re}`;case".*":return`${S}${R}${Re}`;case"*.*":return`${Se}${Re}${S}${R}${Re}`;case"*/*":return`${Se}${Re}${E}${R}${ve}${Re}`;case"**":return Se+Ve(g);case"**/*":return`(?:${Se}${Ve(g)}${E})?${ve}${R}${Re}`;case"**/*.*":return`(?:${Se}${Ve(g)}${E})?${ve}${Re}${S}${R}${Re}`;case"**/.*":return`(?:${Se}${Ve(g)}${E})?${S}${R}${Re}`;default:{const ce=/^(.*?)\.(\w+)$/.exec(ie);if(!ce)return;const ae=M(ce[1]);return ae?ae+S+ce[2]:void 0}}},N=e.removePrefix(m,Ne);let K=M(N);return K&&g.strictSlashes!==!0&&(K+=`${E}?`),K},Su=h,Su}var Eu,Ad;function bb(){if(Ad)return Eu;Ad=1;const t=vb(),e=yb(),n=Qa(),i=Xa(),r=o=>o&&typeof o=="object"&&!Array.isArray(o),s=(o,l,d=!1)=>{if(Array.isArray(o)){const E=o.map(j=>s(j,l,d));return j=>{for(const J of E){const z=J(j);if(z)return z}return!1}}const h=r(o)&&o.tokens&&o.input;if(o===""||typeof o!="string"&&!h)throw new TypeError("Expected pattern to be a non-empty string");const m=l||{},y=m.windows,g=h?s.compileRe(o,l):s.makeRe(o,l,!1,!0),O=g.state;delete g.state;let _=()=>!1;if(m.ignore){const E={...l,ignore:null,onMatch:null,onResult:null};_=s(m.ignore,E,d)}const S=(E,R=!1)=>{const{isMatch:j,match:J,output:z}=s.test(E,g,l,{glob:o,posix:y}),X={glob:o,state:O,regex:g,posix:y,input:E,output:z,match:J,isMatch:j};return typeof m.onResult=="function"&&m.onResult(X),j===!1?(X.isMatch=!1,R?X:!1):_(E)?(typeof m.onIgnore=="function"&&m.onIgnore(X),X.isMatch=!1,R?X:!1):(typeof m.onMatch=="function"&&m.onMatch(X),R?X:!0)};return d&&(S.state=O),S};return s.test=(o,l,d,{glob:h,posix:m}={})=>{if(typeof o!="string")throw new TypeError("Expected input to be a string");if(o==="")return{isMatch:!1,output:""};const y=d||{},g=y.format||(m?n.toPosixSlashes:null);let O=o===h,_=O&&g?g(o):o;return O===!1&&(_=g?g(o):o,O=_===h),(O===!1||y.capture===!0)&&(y.matchBase===!0||y.basename===!0?O=s.matchBase(o,l,d,m):O=l.exec(_)),{isMatch:!!O,match:O,output:_}},s.matchBase=(o,l,d)=>(l instanceof RegExp?l:s.makeRe(l,d)).test(n.basename(o)),s.isMatch=(o,l,d)=>s(l,d)(o),s.parse=(o,l)=>Array.isArray(o)?o.map(d=>s.parse(d,l)):e(o,{...l,fastpaths:!1}),s.scan=(o,l)=>t(o,l),s.compileRe=(o,l,d=!1,h=!1)=>{if(d===!0)return o.output;const m=l||{},y=m.contains?"":"^",g=m.contains?"":"$";let O=`${y}(?:${o.output})${g}`;o&&o.negated===!0&&(O=`^(?!${O}).*$`);const _=s.toRegex(O,l);return h===!0&&(_.state=o),_},s.makeRe=(o,l={},d=!1,h=!1)=>{if(!o||typeof o!="string")throw new TypeError("Expected a non-empty string");let m={negated:!1,fastpaths:!0};return l.fastpaths!==!1&&(o[0]==="."||o[0]==="*")&&(m.output=e.fastpaths(o,l)),m.output||(m=e(o,l)),s.compileRe(m,l,d,h)},s.toRegex=(o,l)=>{try{const d=l||{};return new RegExp(o,d.flags||(d.nocase?"i":""))}catch(d){if(l&&l.debug===!0)throw d;return/$^/}},s.constants=i,Eu=s,Eu}var Nu,Od;function kb(){if(Od)return Nu;Od=1;const t=bb(),e=Qa();function n(i,r,s=!1){return r&&(r.windows===null||r.windows===void 0)&&(r={...r,windows:e.isWindows()}),t(i,r,s)}return Object.assign(n,t),Nu=n,Nu}var _b=kb();const xd=Ya(_b),Td="loglevel-patterns",Js="loglevel:",Au="!",wb=ot.INFO;class Sb{constructor(e){me(this,"projectPrefix");me(this,"patternsCache",null);this.projectPrefix=`${Js}${e}:`}getLevel(e){const n=this.loadAndUnifyPatterns();return this.resolveLogLevelFromPatterns(e,n)||wb}setLevel(e,n){const{level:i,override:r}=this.parseLogLevel(n),s=`${Js}${e}`,o=r?`${i}${Au}`:i;localStorage.setItem(s,o),this.patternsCache=null}loadAndUnifyPatterns(){if(this.patternsCache)return this.patternsCache;const e=this.readPatternsFromJSON(),n=this.unifyWithIndividualKeys(e);return this.patternsCache=n,n}resolveLogLevelFromPatterns(e,n){let i;for(const[r,{level:s,override:o}]of Object.entries(n))if(xd(r.toLowerCase())(e.toLowerCase())){if(o)return s;(!i||xd(r)(e))&&(i=s)}return i}readPatternsFromJSON(){try{const e=localStorage.getItem(Td);return e?JSON.parse(e):{}}catch{return console.error("Failed to parse loglevel-patterns from localStorage"),{}}}unifyWithIndividualKeys(e){const n={...e};for(let i=0;i<localStorage.length;i++){const r=localStorage.key(i);if(!r||!r.startsWith(Js)||r===Td)continue;const s=r.replace(Js,"").toLowerCase(),o=localStorage.getItem(r);if(!o)continue;const{level:l,override:d}=this.parseLogLevel(o);n[s]={level:l,override:d}}return n}parseLogLevel(e){const n=e.endsWith(Au),i=n?e.slice(0,-Au.length):e;if(!Wh(i))throw new Ul(i);return{level:i,override:n}}}class Eb{constructor(e,n){me(this,"committed",!1);me(this,"chainOptions",{});me(this,"method",null);me(this,"stack","");me(this,"args",[]);this.adapter=e,n&&(this.chainOptions={...n}),Promise.resolve().then(()=>this.commit())}options(e){return this.chainOptions={...this.chainOptions,...e},this}trace(...e){return this.log("trace",e)}debug(...e){return this.log("debug",e)}info(...e){return this.log("info",e)}warn(...e){return this.log("warn",e)}error(...e){return this.log("error",e)}fatal(...e){return this.log("fatal",e)}log(e,n){var i;return this.method=e,this.args=n,this.stack=(i=new Error().stack)!=null?i:"",this}commit(){if(!this.committed&&(this.committed=!0,this.method)){const e=this.args[0],n=this.args.slice(1),i={stack:this.stack,content:{message:e,args:n},options:this.chainOptions};this.adapter[this.method](i)}}}let Jh=class cl{constructor(e){me(this,"adapter");this.adapter=e}static create(e){const n=new cl(e);return n.setMetadata({account:null,client:np()}),n}child(e,n={}){return new cl(this.adapter.child(e,n))}lazyChild(e,n={}){let i;return new Proxy({},{get:(r,s,o)=>(i||(i=this.child(e,n)),Reflect.get(i,s,o))})}setMetadata(e){this.adapter.setMetadata(e)}setLevel(e){if(!Wh(e))throw new Ul(e);this.adapter.setLevel(e)}createChain(e){return new Eb(this.adapter,e)}trace(...e){return this.createChain().trace(...e)}debug(...e){return this.createChain().debug(...e)}info(...e){return this.createChain().info(...e)}warn(...e){return this.createChain().warn(...e)}error(...e){return this.createChain().error(...e)}fatal(...e){return this.createChain().fatal(...e)}options(e){return this.createChain(e)}};function Nb(t){return xi().logger.lazyChild(t)}function Yh(t,e){return Jh.create(new ll({source:t,levelService:new Sb(t),consoleLogger:new mb,httpLogger:jl.create({db:e,project:t})}))}const Ab="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let Ob=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t));for(;t--;)e+=Ab[n[t]&63];return e};const wa=(t=8)=>Ob(t),Xh=(t,e=!1)=>{const n=Object.entries(t).reduce((i,[r,s])=>s!==void 0&&(!e||s!==null)?`${i}${i?"&":""}${r}=${s}`:i,"");return n?`?${n}`:""},Qh=t=>{const e=document.getElementById(t);return e?new URL(e.src).searchParams:new URLSearchParams};function xb(){const t=new Error().stack.split(`
|
|
31
|
+
`);return t.length<3?"":t[2].trim().substring(3)}function Tb(t){return new Promise(e=>setTimeout(e,t))}const Kt=class Kt{constructor(){me(this,"projectName","nizza");me(this,"instanceId",wa());me(this,"nizzaDB",new ib);me(this,"logger",Yh(this.projectName,this.nizzaDB));me(this,"coreLogger",this.logger.child("core"));me(this,"_logger",this.coreLogger.child("NizzaStore"));me(this,"_config",null);me(this,"_account");me(this,"_accountStatus","idle");me(this,"_productDataSource");me(this,"_eventBus",new jh("nizza",this.coreLogger));me(this,"activeAccountFetchId",null);Fy(this,{_config:ht,_account:ht,_productDataSource:ht,_accountStatus:ht,config:zn,account:zn,accountName:zn,accountStatus:zn,setAccount:Bt,configure:Bt,refetchAccount:Bt,setProductDataSource:Bt,setAddToCartConfig:Bt,setProductId:Bt},{name:"NizzaStore",autoBind:!0}),this.refetchAccount=this.refetchAccount.bind(this)}static instance(){var n;if(!!((n=window==null?void 0:window.nizza)!=null&&n.store))Kt._instance=window.nizza.store;else{const i=new Kt;Kt._instance=i,Kt._instance._logger.debug("Created new NizzaStore instance")}return window.nizza||(window.nizza={},window.nz={},Kt._instance._logger.debug("Initialized nizza window object")),window.nizza.store=Kt._instance,window.nz=window.nizza,Kt._instance}async configure(e){try{this._logger.debug("Running configure with config:",e),await this.updateConfig(e)}catch(n){this.setAccountStatus("error"),this._logger.error("Error running configure",n)}}async updateConfig(e={}){var r,s;const{account:n,authToken:i}=(r=this._config)!=null?r:{};this._config={...this._config,...e},(s=this._config)!=null&&s.account&&(n!==this._config.account||i!==this._config.authToken)?(this._logger.debug(`Fetching account data for account: ${this._config.account}, authToken provided: ${!!this._config.authToken}`),this.logger.setMetadata({account:this._config.account}),await this.fetchAccount(this._config.account,this._config.authToken)):this._logger.debug("Skipped fetching account data as the account or authToken did not change"),e.getProductDataSource&&this.setProductDataSource(await e.getProductDataSource())}async fetchAccount(e,n){this.setAccountStatus("loading");const i=wa();this.activeAccountFetchId=i;try{const r=await gp(e,n);if(this.activeAccountFetchId!==i){this._logger.debug("Fetch account request was superseded by a newer request");return}this.setAccount(r),this.setAccountStatus("success"),this._logger.debug("Account fetched and set successfully:",r)}catch(r){this.activeAccountFetchId===i&&(this.setAccountStatus("error"),r instanceof Vl?this._logger.fatal("Nizza account not found",e).options({silent:!0}):this._logger.fatal("Unexpected error fetching account",r))}}setAccount(e){this._account=e}setAccountStatus(e){this._accountStatus=e}setProductDataSource(e){this._productDataSource=e}setProductId(e){this._config&&(this._config.productId=e)}setOrderFormId(e){this._config&&(this._config.orderFormId=e)}setAddToCartConfig(e){if(!this._config){const n="You cannot set addToCartConfig before running configure()";throw this._logger.error(n),new Error(n)}this._config.addToCartConfig=e}setAuthToken(e){this.updateConfig({authToken:e})}async refetchAccount(){var e;(e=this._config)!=null&&e.account&&await this.fetchAccount(this._config.account,this._config.authToken)}get version(){return Kt.version}get config(){return this._config}get account(){return this._account}get accountStatus(){return this._accountStatus}get accountName(){var e;return(e=this._config)==null?void 0:e.account}isPvtAccount(e){var n;return!!(e&&((n=this._config)!=null&&n.authToken))}isPubAccount(e){var n;return!!(e&&!((n=this._config)!=null&&n.authToken))}get productDataSource(){return this._productDataSource}get eventBus(){return this._eventBus}};me(Kt,"version","9"),me(Kt,"_instance");let Sa=Kt;const xi=t=>{const e=Sa.instance();return xy(()=>!!e.account,()=>t==null?void 0:t(e)),e};function Zh(){return je.useMemo(()=>xi(),[])}function ep(t,e){const n=Zh();return Bh(()=>t(n),e)}const{coreLogger:Cb}=xi(),Rb=Cb.child("getClientTimeZone");function tp(t=!1){var s,o,l;let e=null,n=null,i=null;try{e=(l=(o=(s=Intl.DateTimeFormat())==null?void 0:s.resolvedOptions())==null?void 0:o.timeZone)!=null?l:null;const d=-new Date().getTimezoneOffset();i=d;const h=d>=0?"+":"-",m=String(Math.floor(Math.abs(d)/60)).padStart(2,"0"),y=String(Math.abs(d)%60).padStart(2,"0");n=`${h}${m}:${y}`}catch(d){Rb.error("Error obtaining time zone or offset",d)}const r={offset:n,offsetValue:i,value:e,country:null,included:null,label:null};if(t){const{country:d,included:h,label:m,...y}=r;return y}return r}function np(){const e=typeof navigator!="undefined"?navigator.userAgent:"server",n=Fb(e),{language:i,languages:r}=Ib(),s=Db(),o=Pb(),{hardwareConcurrency:l,deviceMemory:d}=Lb(),h=$b();return{userAgent:e,browser:n.browser,os:n.os,device:n.device,language:i,languages:r,screen:s,connection:o,hardwareConcurrency:l,deviceMemory:d,timezone:h}}function Fb(t){try{const n=new On(t).getResult();return{browser:{name:n.browser.name||"Unknown",version:n.browser.version||"Unknown"},os:{name:n.os.name||"Unknown",version:n.os.version||"Unknown"},device:{model:n.device.model||"Unknown",type:n.device.type||"Desktop",vendor:n.device.vendor||"Unknown"}}}catch(e){return console.error("Error parsing user agent:",e),{browser:{name:"Unknown",version:"Unknown"},os:{name:"Unknown",version:"Unknown"},device:{model:"Unknown",type:"Desktop",vendor:"Unknown"}}}}function Ib(){return typeof navigator!="undefined"?{language:navigator.language||"Unknown",languages:navigator.languages?[...navigator.languages]:[]}:{language:"Unknown",languages:[]}}function Db(){return typeof window!="undefined"&&window.screen?{width:window.screen.width,height:window.screen.height,colorDepth:window.screen.colorDepth}:null}function Pb(){var t,e,n,i;if(typeof navigator!="undefined"&&"connection"in navigator){const r=navigator.connection;return{downlink:(t=r==null?void 0:r.downlink)!=null?t:0,effectiveType:(e=r==null?void 0:r.effectiveType)!=null?e:"Unknown",rtt:(n=r==null?void 0:r.rtt)!=null?n:0,saveData:(i=r==null?void 0:r.saveData)!=null?i:!1}}return null}function Lb(){return typeof navigator!="undefined"?{hardwareConcurrency:navigator.hardwareConcurrency||null,deviceMemory:navigator.deviceMemory||null}:{hardwareConcurrency:null,deviceMemory:null}}function $b(){try{return tp(!0)}catch(t){return console.error("Error retrieving client timezone:",t),{offset:null,offsetValue:null,value:"Unknown",country:null,included:null,label:null}}}var ip=(t=>(t.VTEX="VTEX",t.VTEX_IO="VTEX-IO",t.VTEX_CMS="PORTAL-VTEX",t.PLATFORM="PLATFORM",t.UNKNOWN="UNKNOWN",t))(ip||{}),rp=(t=>(t.PLATFORM="platform_module",t.ADENDA="subscription_module",t.APP_STORE="app_store",t))(rp||{}),sp=(t=>(t.ACTIVE="active_contract",t.INACTIVE="inactive_contract",t))(sp||{}),ap=(t=>(t.LITE="lite",t.STANDARD="standard",t.PRO="pro",t))(ap||{}),op=(t=>(t.LITE="PLAN_LITE",t.STANDARD="PLAN_ESTANDAR",t.PRO="PLAN_PRO",t.NONE="NO_PLAN",t))(op||{}),up=(t=>(t.PAST="past",t.LIVE="live",t.FUTURE="future",t))(up||{});class Vl extends Cn{constructor(e){super("NIZZA_ACCOUNT_NOT_FOUND_ERROR",`Error finding account: ${e}`)}}class lp extends Cn{constructor(e){super("NIZZA_PLAN_NOT_FOUND_ERROR",`Error finding plan: ${e}`)}}class cp extends Cn{constructor(e){super("NIZZA_CREATE_PLAN_ERROR",`Error creating plan: ${e.plan}`,e)}}const Cd=`${rr.apiUrls.restV1}/plans`;class dp{async get(e){const i=`/info${Xh({planType:e})}`,r=Cd+i,{data:s}=await vi({url:r});return s}async create(e){const n=`${Cd}/create`,{success:i}=await vi({url:n,method:"POST",body:JSON.stringify(e)});if(!i)throw new cp(e)}}function Mb(t){const{host:e,account:n,username:i,createdAt:r,subscriptionType:s,installationDateApp:o,...l}=t;return{...l,account:n,host:e!=null?e:null,username:i!=null?i:n,createdAt:new Date(r),subscriptionType:s!=null?s:null,installationDateApp:new Date(o)}}function Bb(t){const{host:e,...n}=t;return{...n,host:e!=null?e:null,plan:{}}}const Ub=`${rr.apiUrls.restV1}/accounts/v2`;class fp{async get(e){const n=`${Ub}/${e}`,{data:i}=await vi({url:n});return i?Bb(i):null}}const jb=`${rr.apiUrls.restV1}/accounts/v2/pvt`;class Vb{async get(e,n){const i=`${jb}/${e}`,{data:r}=await vi({url:i,headers:{authorization:`Bearer ${n}`}});return r?Mb(r):null}}class hp{constructor(e,n,i){this.publicAccountRepo=e,this.privateAccountRepo=n,this.accountPlanRepo=i}async get(e,n){try{const i=n?await this.privateAccountRepo.get(e,n):await this.publicAccountRepo.get(e);if(!i)throw new Vl(e);const r=await this.accountPlanRepo.get(i.descriptionPlan);if(!r)throw new lp(i.descriptionPlan);return{...i,plan:r}}catch(i){throw new Fl(i)}}}const Hb=new fp,qb=new Vb,zb=new dp,pp=new hp(Hb,qb,zb),mp=()=>{const{account:t,accountName:e,accountStatus:n,refetchAccount:i,isPvtAccount:r,isPubAccount:s}=ep(h=>({account:h.account,accountName:h.accountName,accountStatus:h.accountStatus,refetchAccount:h.refetchAccount,isPvtAccount:h.isPvtAccount,isPubAccount:h.isPubAccount})),o=["idle","loading"].includes(n);return{account:t,accountName:e,isLoading:o,isError:n==="error",isSuccess:n==="success",accountStatus:n,refetchAccount:i,isPvtAccount:r,isPubAccount:s}};async function gp(t,e){return pp.get(t,e)}var vp=(t=>(t.Created="CREATED",t.CreateComplete="CREATE_COMPLETE",t.Finalized="FINALIZED",t.Live="LIVE",t.Starting="STARTING",t))(vp||{}),yp=(t=>(t.Add="add",t.Remove="remove",t))(yp||{}),bp=(t=>(t.Vtex="VTEX",t))(bp||{}),kp=(t=>(t.Active="active",t.Inactive="inactive",t))(kp||{});const Kb={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AddCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateCollectionInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Gb={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Wb={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}},{kind:"Field",name:{kind:"Name",value:"products"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"pictures"}},{kind:"Field",name:{kind:"Name",value:"price"}},{kind:"Field",name:{kind:"Name",value:"salesprice"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Jb={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllCollections"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccessArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}},{kind:"Field",name:{kind:"Name",value:"products"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"pictures"}},{kind:"Field",name:{kind:"Name",value:"price"}},{kind:"Field",name:{kind:"Name",value:"salesprice"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Yb={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ManageCollectionProduct"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ManageCollectionProductInInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"manageCollectionProduct"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Xb={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchCollections"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccessArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}},{kind:"Field",name:{kind:"Name",value:"products"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"pictures"}},{kind:"Field",name:{kind:"Name",value:"price"}},{kind:"Field",name:{kind:"Name",value:"salesprice"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Qb={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateCollectionInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Zb={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindMinimalEvent"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FindEventInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findEvent"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EventData"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"thumbnailsPath"}},{kind:"Field",name:{kind:"Name",value:"recordVideoPath"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"thumbnails"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},ek={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchMinimalEvents"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SearchEventInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchEvent"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EventArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"thumbnailsPath"}},{kind:"Field",name:{kind:"Name",value:"recordVideoPath"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"status"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},tk={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BlockUser"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BlockUserInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"blockUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BlockUserSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},nk={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ChangeAccountUsername"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ChangeUsernameInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"changeAccountUsername"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ChangeUsernameSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},ik={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteChatMessage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteChatInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteChatMessage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"DeleteChatMessageSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},rk={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllChatMessage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetAllChatMessageInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllChatMessage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ChatMessageArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"connectionId"}},{kind:"Field",name:{kind:"Name",value:"data"}},{kind:"Field",name:{kind:"Name",value:"email"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"idEvent"}},{kind:"Field",name:{kind:"Name",value:"sendDate"}},{kind:"Field",name:{kind:"Name",value:"sessionId"}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"username"}},{kind:"Field",name:{kind:"Name",value:"isAdmin"}},{kind:"Field",name:{kind:"Name",value:"urlGif"}},{kind:"Field",name:{kind:"Name",value:"second"}},{kind:"Field",name:{kind:"Name",value:"ip"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},_p={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetChatRoomToken"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetChatRoomInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getChatRoomToken"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ChatRoomTokenData"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"token"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},sk={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"PinChatMessage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"PinChatInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pinChatMessage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PinChatMessageSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},ak={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"highlightProduct"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"HighlightProductInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"highlightProduct"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"HighlightProductSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},ok={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"deleteAllCustomization"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CustomPlayerInputAccount"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteAllCustomPlayer"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},uk={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getAllCustomization"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllCustomPlayer"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CustomPlayerSuccessArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"data"}},{kind:"Field",name:{kind:"Name",value:"section"}},{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},lk={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"updateCustomization"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CustomPlayerInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCustomPlayer"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},ck={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"sendAddToCart"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"AddToCartInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sendAddToCart"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AddToCartSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},dk={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetTimeLine"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetTimeLineInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getTimeLine"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TimeLineArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"time"}},{kind:"Field",name:{kind:"Name",value:"likes"}},{kind:"Field",name:{kind:"Name",value:"comments"}},{kind:"Field",name:{kind:"Name",value:"viewers"}},{kind:"Field",name:{kind:"Name",value:"orders"}},{kind:"Field",name:{kind:"Name",value:"minute"}},{kind:"Field",name:{kind:"Name",value:"hour"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},fk={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AppendProductsToSnackVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"RelateToProductsSnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"appendProductsSnackVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ActionSnackVideoSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},hk={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreatePlayList"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreatePlayListInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createPlayList"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreatePlayListSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},pk={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateSnackVideoBatch"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateSnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createSnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},mk={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteRelationshipWithSnackVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoRelationshipKeys"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteRelationshipSnackVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ActionSnackVideoSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}}]}}]}}]}}]},gk={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteSnackVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteSnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteSnackVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ActionSnackVideoSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},vk={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindManySnackVideos"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FindManySnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findManySnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"uploadProgress"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"eventId"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},yk={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllSnackVideos"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllSnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoCreatedArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"snackVideos"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"uploadProgress"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"eventId"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"created"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}}]}},{kind:"Field",name:{kind:"Name",value:"cursor"}},{kind:"Field",name:{kind:"Name",value:"totalItems"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},bk={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetPlayLists"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getPlayLists"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PlayListArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"created"}},{kind:"Field",name:{kind:"Name",value:"videoAmount"}},{kind:"Field",name:{kind:"Name",value:"productAmount"}},{kind:"Field",name:{kind:"Name",value:"updated"}},{kind:"Field",name:{kind:"Name",value:"videos"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"order"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},kk={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetSnackVideoRelationships"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoRelationshipInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getRelationshipSnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"RelationshipSnackVideoArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sourceEntity"}},{kind:"Field",name:{kind:"Name",value:"attributeId"}}]}}]}}]}}]}}]},_k={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchSnackVideos"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SearchInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchSnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoCreatedArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"snackVideos"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"uploadProgress"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"eventId"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"created"}}]}},{kind:"Field",name:{kind:"Name",value:"cursor"}},{kind:"Field",name:{kind:"Name",value:"totalItems"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},wk={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdatePlayList"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdatePlayListInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updatePlayList"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"UpdatePlayListSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Sk={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindByProductSnackVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FindByProductSnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findByProductSnackVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Ek={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetPlayList"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetPlayListQueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getPlayList"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PlayListData"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"videos"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"productId"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}},{kind:"Field",name:{kind:"Name",value:"order"}},{kind:"Field",name:{kind:"Name",value:"productName"}},{kind:"Field",name:{kind:"Name",value:"productImageUrl"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Nk=Object.freeze(Object.defineProperty({__proto__:null,AddCollectionDocument:Kb,AppendProductsToSnackVideoDocument:fk,BlockUserDocument:tk,ChangeAccountUsernameDocument:nk,CreatePlayListDocument:hk,CreateSnackVideoBatchDocument:pk,DeleteAllCustomizationDocument:ok,DeleteChatMessageDocument:ik,DeleteCollectionDocument:Gb,DeleteRelationshipWithSnackVideoDocument:mk,DeleteSnackVideoDocument:gk,EventStatus:vp,FindByProductSnackVideoDocument:Sk,FindCollectionDocument:Wb,FindManySnackVideosDocument:vk,FindMinimalEventDocument:Zb,GetAllChatMessageDocument:rk,GetAllCollectionsDocument:Jb,GetAllCustomizationDocument:uk,GetAllSnackVideosDocument:yk,GetChatRoomTokenDocument:_p,GetPlayListDocument:Ek,GetPlayListsDocument:bk,GetSnackVideoRelationshipsDocument:kk,GetTimeLineDocument:dk,HighlightProductDocument:ak,ManageCollectionProductDocument:Yb,Methods:yp,PinChatMessageDocument:sk,SearchCollectionsDocument:Xb,SearchMinimalEventsDocument:ek,SearchSnackVideosDocument:_k,SendAddToCartDocument:ck,SignProvider:bp,Status:kp,UpdateCollectionDocument:Qb,UpdateCustomizationDocument:lk,UpdatePlayListDocument:wk},Symbol.toStringTag,{value:"Module"}));var Za=(t=>(t.OPEN_TAB="openTab",t.OPEN_VARIATION_SELECTOR="openVariationSelector",t.ADD_TO_CART="addToCart",t))(Za||{});function Ak(t){return{class:t,_value:null,get value(){return this._value||(this._value=new t,Object.freeze(this)),this._value}}}var Rn=(t=>(t.Local="local",t.VtexLegacy="vtexlegacy",t.VtexIO="vtexio",t.VtexFastStore="faststore",t.Platform="platform",t.External="external",t))(Rn||{}),Hl=(t=>(t.PROD="prod",t.DEV="dev",t.LOCAL="local",t))(Hl||{});const{coreLogger:Ok}=xi(),dl=Ok.child("addToCartHooks"),fl={errorAddingToCart:"addToCartHooks.notification.error",errorOpeningVariationSelector:"addToCartHooks.notification.error",errorOpeningNewTab:"addToCartHooks.notification.error",successAddingToCart:"addToCartHooks.notification.success"};async function xk(t){const e={...t,action:{type:Za.ADD_TO_CART,exec:()=>dl.error("action no implemented in validate hook")}};try{const n=await Tk(e),i=await Ck(n);await Rk(i)}catch(n){dl.error("error unhandled",n)}}async function Tk(t){var s,o;const{context:e,userAddToCartConfig:n}=t,i=(s=n==null?void 0:n.hooks)==null?void 0:s.transform;let r=t.product;if(i)try{r=await i({product:{...r},data:(o=e.data)!=null?o:{}})}catch(l){Ea("transform",l)}return{...t,product:r}}async function Ck(t){var d,h;const{context:e,hookStrategy:n,userAddToCartConfig:i,product:r}=t,s=wp(t),o=(d=i==null?void 0:i.hooks)==null?void 0:d.validate;let l=n.validate({...t,actionFactory:s});if(o)try{l=await o({product:{...r},defaultAction:{...l},action:s,data:(h=e.data)!=null?h:{}})}catch(m){Ea("validate",m)}return{...t,action:l,actionFactory:s}}async function Rk(t){var E;const{eventBus:e}=xi(),{product:n,userAddToCartConfig:i,notifyFactory:r,action:s,actionFactory:o}=t,{isVariationSelectorOpen:l,data:d={}}=t.context,h=(E=i==null?void 0:i.hooks)==null?void 0:E.end,m=s.type===Za.ADD_TO_CART;let y=null,g=!1;const O=()=>{!m||!l||o.openVariationSelector(!1).exec()},_=()=>{!m||g||(y?r.error(fl.errorAddingToCart):r.success(fl.successAddingToCart))},S=()=>{const R={product:n,actionType:s.type,success:!y,error:y};e.emit(Hh.ATCH_ACTION_EXECUTED,R)};try{if(!s.type||!s.exec)throw new Error("Invalid action object, missing keys 'type' or 'exec'");await s.exec()}catch(R){Ea("end",R),y=R}if(h)try{g=!!await h({data:d,error:y,notify:r,actionExecuted:s})}catch(R){Ea("end",R)}O(),_(),S()}function wp(t){const{actionFactory:e,userAddToCartConfig:n}=t,i=r=>Object.entries(r!=null?r:{}).reduce((s,[o,l])=>({...s,[o]:d=>({type:o,exec:()=>l(d)})}),{});return{...i(e),...i(n==null?void 0:n.actionFactory)}}function Ea(t,e){dl.error(`addToCartHooks error running ${t}: `,e)}class Sp{constructor(e){me(this,"aggregate");me(this,"_numSetPropsApplied",0);this.aggregate=e}setProps(e){for(const[n,i]of Object.entries(e))n in this.aggregate&&(this.aggregate[n]=i);this._numSetPropsApplied++}get isFirstSetProps(){return this._numSetPropsApplied===1}}function Ep(t){return new Sp(t)}class Fk{constructor(e){me(this,"_value");e!==void 0&&(this._value=e)}get value(){return this._value}}var xt=(t=>(t.GENERAL_ERROR="GENERAL_ERROR",t.AXIOS_ERROR="AXIOS_ERROR",t.NETWORK_ERROR="NETWORK_ERROR",t.CONFIG_ERROR="CONFIG_ERROR",t.TIMEOUT_ERROR="TIMEOUT_ERROR",t.AUTH_ERROR="AUTH_ERROR",t.NOT_FOUND="NOT_FOUND",t.VALIDATION_ERROR="VALIDATION_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.BAD_REQUEST="BAD_REQUEST",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.CONFLICT="CONFLICT",t.GONE="GONE",t.UNSUPPORTED_MEDIA_TYPE="UNSUPPORTED_MEDIA_TYPE",t.TOO_MANY_REQUESTS="TOO_MANY_REQUESTS",t.INTERNAL_SERVER_ERROR="INTERNAL_SERVER_ERROR",t.SERVICE_UNAVAILABLE="SERVICE_UNAVAILABLE",t))(xt||{});function Np(t,e){return function(){return t.apply(e,arguments)}}const{toString:Ik}=Object.prototype,{getPrototypeOf:ql}=Object,eo=(t=>e=>{const n=Ik.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),on=t=>(t=t.toLowerCase(),e=>eo(e)===t),to=t=>e=>typeof e===t,{isArray:dr}=Array,is=to("undefined");function Dk(t){return t!==null&&!is(t)&&t.constructor!==null&&!is(t.constructor)&&Vt(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Ap=on("ArrayBuffer");function Pk(t){let e;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Ap(t.buffer),e}const Lk=to("string"),Vt=to("function"),Op=to("number"),no=t=>t!==null&&typeof t=="object",$k=t=>t===!0||t===!1,ra=t=>{if(eo(t)!=="object")return!1;const e=ql(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Mk=on("Date"),Bk=on("File"),Uk=on("Blob"),jk=on("FileList"),Vk=t=>no(t)&&Vt(t.pipe),Hk=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Vt(t.append)&&((e=eo(t))==="formdata"||e==="object"&&Vt(t.toString)&&t.toString()==="[object FormData]"))},qk=on("URLSearchParams"),[zk,Kk,Gk,Wk]=["ReadableStream","Request","Response","Headers"].map(on),Jk=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function hs(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t=="undefined")return;let i,r;if(typeof t!="object"&&(t=[t]),dr(t))for(i=0,r=t.length;i<r;i++)e.call(null,t[i],i,t);else{const s=n?Object.getOwnPropertyNames(t):Object.keys(t),o=s.length;let l;for(i=0;i<o;i++)l=s[i],e.call(null,t[l],l,t)}}function xp(t,e){e=e.toLowerCase();const n=Object.keys(t);let i=n.length,r;for(;i-- >0;)if(r=n[i],e===r.toLowerCase())return r;return null}const fi=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,Tp=t=>!is(t)&&t!==fi;function hl(){const{caseless:t}=Tp(this)&&this||{},e={},n=(i,r)=>{const s=t&&xp(e,r)||r;ra(e[s])&&ra(i)?e[s]=hl(e[s],i):ra(i)?e[s]=hl({},i):dr(i)?e[s]=i.slice():e[s]=i};for(let i=0,r=arguments.length;i<r;i++)arguments[i]&&hs(arguments[i],n);return e}const Yk=(t,e,n,{allOwnKeys:i}={})=>(hs(e,(r,s)=>{n&&Vt(r)?t[s]=Np(r,n):t[s]=r},{allOwnKeys:i}),t),Xk=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Qk=(t,e,n,i)=>{t.prototype=Object.create(e.prototype,i),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},Zk=(t,e,n,i)=>{let r,s,o;const l={};if(e=e||{},t==null)return e;do{for(r=Object.getOwnPropertyNames(t),s=r.length;s-- >0;)o=r[s],(!i||i(o,t,e))&&!l[o]&&(e[o]=t[o],l[o]=!0);t=n!==!1&&ql(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},e_=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const i=t.indexOf(e,n);return i!==-1&&i===n},t_=t=>{if(!t)return null;if(dr(t))return t;let e=t.length;if(!Op(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},n_=(t=>e=>t&&e instanceof t)(typeof Uint8Array!="undefined"&&ql(Uint8Array)),i_=(t,e)=>{const i=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=i.next())&&!r.done;){const s=r.value;e.call(t,s[0],s[1])}},r_=(t,e)=>{let n;const i=[];for(;(n=t.exec(e))!==null;)i.push(n);return i},s_=on("HTMLFormElement"),a_=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,r){return i.toUpperCase()+r}),Rd=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),o_=on("RegExp"),Cp=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),i={};hs(n,(r,s)=>{let o;(o=e(r,s,t))!==!1&&(i[s]=o||r)}),Object.defineProperties(t,i)},u_=t=>{Cp(t,(e,n)=>{if(Vt(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const i=t[n];if(Vt(i)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},l_=(t,e)=>{const n={},i=r=>{r.forEach(s=>{n[s]=!0})};return dr(t)?i(t):i(String(t).split(e)),n},c_=()=>{},d_=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,Ou="abcdefghijklmnopqrstuvwxyz",Fd="0123456789",Rp={DIGIT:Fd,ALPHA:Ou,ALPHA_DIGIT:Ou+Ou.toUpperCase()+Fd},f_=(t=16,e=Rp.ALPHA_DIGIT)=>{let n="";const{length:i}=e;for(;t--;)n+=e[Math.random()*i|0];return n};function h_(t){return!!(t&&Vt(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const p_=t=>{const e=new Array(10),n=(i,r)=>{if(no(i)){if(e.indexOf(i)>=0)return;if(!("toJSON"in i)){e[r]=i;const s=dr(i)?[]:{};return hs(i,(o,l)=>{const d=n(o,r+1);!is(d)&&(s[l]=d)}),e[r]=void 0,s}}return i};return n(t,0)},m_=on("AsyncFunction"),g_=t=>t&&(no(t)||Vt(t))&&Vt(t.then)&&Vt(t.catch),Fp=((t,e)=>t?setImmediate:e?((n,i)=>(fi.addEventListener("message",({source:r,data:s})=>{r===fi&&s===n&&i.length&&i.shift()()},!1),r=>{i.push(r),fi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Vt(fi.postMessage)),v_=typeof queueMicrotask!="undefined"?queueMicrotask.bind(fi):typeof process!="undefined"&&process.nextTick||Fp,q={isArray:dr,isArrayBuffer:Ap,isBuffer:Dk,isFormData:Hk,isArrayBufferView:Pk,isString:Lk,isNumber:Op,isBoolean:$k,isObject:no,isPlainObject:ra,isReadableStream:zk,isRequest:Kk,isResponse:Gk,isHeaders:Wk,isUndefined:is,isDate:Mk,isFile:Bk,isBlob:Uk,isRegExp:o_,isFunction:Vt,isStream:Vk,isURLSearchParams:qk,isTypedArray:n_,isFileList:jk,forEach:hs,merge:hl,extend:Yk,trim:Jk,stripBOM:Xk,inherits:Qk,toFlatObject:Zk,kindOf:eo,kindOfTest:on,endsWith:e_,toArray:t_,forEachEntry:i_,matchAll:r_,isHTMLForm:s_,hasOwnProperty:Rd,hasOwnProp:Rd,reduceDescriptors:Cp,freezeMethods:u_,toObjectSet:l_,toCamelCase:a_,noop:c_,toFiniteNumber:d_,findKey:xp,global:fi,isContextDefined:Tp,ALPHABET:Rp,generateString:f_,isSpecCompliantForm:h_,toJSONObject:p_,isAsyncFn:m_,isThenable:g_,setImmediate:Fp,asap:v_};function Le(t,e,n,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r,this.status=r.status?r.status:null)}q.inherits(Le,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:q.toJSONObject(this.config),code:this.code,status:this.status}}});const Ip=Le.prototype,Dp={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Dp[t]={value:t}});Object.defineProperties(Le,Dp);Object.defineProperty(Ip,"isAxiosError",{value:!0});Le.from=(t,e,n,i,r,s)=>{const o=Object.create(Ip);return q.toFlatObject(t,o,function(d){return d!==Error.prototype},l=>l!=="isAxiosError"),Le.call(o,t.message,e,n,i,r),o.cause=t,o.name=t.name,s&&Object.assign(o,s),o};const y_=null;function pl(t){return q.isPlainObject(t)||q.isArray(t)}function Pp(t){return q.endsWith(t,"[]")?t.slice(0,-2):t}function Id(t,e,n){return t?t.concat(e).map(function(r,s){return r=Pp(r),!n&&s?"["+r+"]":r}).join(n?".":""):e}function b_(t){return q.isArray(t)&&!t.some(pl)}const k_=q.toFlatObject(q,{},null,function(e){return/^is[A-Z]/.test(e)});function io(t,e,n){if(!q.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=q.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,E){return!q.isUndefined(E[S])});const i=n.metaTokens,r=n.visitor||m,s=n.dots,o=n.indexes,d=(n.Blob||typeof Blob!="undefined"&&Blob)&&q.isSpecCompliantForm(e);if(!q.isFunction(r))throw new TypeError("visitor must be a function");function h(_){if(_===null)return"";if(q.isDate(_))return _.toISOString();if(!d&&q.isBlob(_))throw new Le("Blob is not supported. Use a Buffer instead.");return q.isArrayBuffer(_)||q.isTypedArray(_)?d&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}function m(_,S,E){let R=_;if(_&&!E&&typeof _=="object"){if(q.endsWith(S,"{}"))S=i?S:S.slice(0,-2),_=JSON.stringify(_);else if(q.isArray(_)&&b_(_)||(q.isFileList(_)||q.endsWith(S,"[]"))&&(R=q.toArray(_)))return S=Pp(S),R.forEach(function(J,z){!(q.isUndefined(J)||J===null)&&e.append(o===!0?Id([S],z,s):o===null?S:S+"[]",h(J))}),!1}return pl(_)?!0:(e.append(Id(E,S,s),h(_)),!1)}const y=[],g=Object.assign(k_,{defaultVisitor:m,convertValue:h,isVisitable:pl});function O(_,S){if(!q.isUndefined(_)){if(y.indexOf(_)!==-1)throw Error("Circular reference detected in "+S.join("."));y.push(_),q.forEach(_,function(R,j){(!(q.isUndefined(R)||R===null)&&r.call(e,R,q.isString(j)?j.trim():j,S,g))===!0&&O(R,S?S.concat(j):[j])}),y.pop()}}if(!q.isObject(t))throw new TypeError("data must be an object");return O(t),e}function Dd(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(i){return e[i]})}function zl(t,e){this._pairs=[],t&&io(t,this,e)}const Lp=zl.prototype;Lp.append=function(e,n){this._pairs.push([e,n])};Lp.toString=function(e){const n=e?function(i){return e.call(this,i,Dd)}:Dd;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function __(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function $p(t,e,n){if(!e)return t;const i=n&&n.encode||__,r=n&&n.serialize;let s;if(r?s=r(e,n):s=q.isURLSearchParams(e)?e.toString():new zl(e,n).toString(i),s){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class Pd{constructor(){this.handlers=[]}use(e,n,i){return this.handlers.push({fulfilled:e,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){q.forEach(this.handlers,function(i){i!==null&&e(i)})}}const Mp={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},w_=typeof URLSearchParams!="undefined"?URLSearchParams:zl,S_=typeof FormData!="undefined"?FormData:null,E_=typeof Blob!="undefined"?Blob:null,N_={isBrowser:!0,classes:{URLSearchParams:w_,FormData:S_,Blob:E_},protocols:["http","https","file","blob","url","data"]},Kl=typeof window!="undefined"&&typeof document!="undefined",ml=typeof navigator=="object"&&navigator||void 0,A_=Kl&&(!ml||["ReactNative","NativeScript","NS"].indexOf(ml.product)<0),O_=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",x_=Kl&&window.location.href||"http://localhost",T_=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Kl,hasStandardBrowserEnv:A_,hasStandardBrowserWebWorkerEnv:O_,navigator:ml,origin:x_},Symbol.toStringTag,{value:"Module"})),Pt={...T_,...N_};function C_(t,e){return io(t,new Pt.classes.URLSearchParams,Object.assign({visitor:function(n,i,r,s){return Pt.isNode&&q.isBuffer(n)?(this.append(i,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function R_(t){return q.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function F_(t){const e={},n=Object.keys(t);let i;const r=n.length;let s;for(i=0;i<r;i++)s=n[i],e[s]=t[s];return e}function Bp(t){function e(n,i,r,s){let o=n[s++];if(o==="__proto__")return!0;const l=Number.isFinite(+o),d=s>=n.length;return o=!o&&q.isArray(r)?r.length:o,d?(q.hasOwnProp(r,o)?r[o]=[r[o],i]:r[o]=i,!l):((!r[o]||!q.isObject(r[o]))&&(r[o]=[]),e(n,i,r[o],s)&&q.isArray(r[o])&&(r[o]=F_(r[o])),!l)}if(q.isFormData(t)&&q.isFunction(t.entries)){const n={};return q.forEachEntry(t,(i,r)=>{e(R_(i),r,n,0)}),n}return null}function I_(t,e,n){if(q.isString(t))try{return(e||JSON.parse)(t),q.trim(t)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(t)}const ps={transitional:Mp,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const i=n.getContentType()||"",r=i.indexOf("application/json")>-1,s=q.isObject(e);if(s&&q.isHTMLForm(e)&&(e=new FormData(e)),q.isFormData(e))return r?JSON.stringify(Bp(e)):e;if(q.isArrayBuffer(e)||q.isBuffer(e)||q.isStream(e)||q.isFile(e)||q.isBlob(e)||q.isReadableStream(e))return e;if(q.isArrayBufferView(e))return e.buffer;if(q.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let l;if(s){if(i.indexOf("application/x-www-form-urlencoded")>-1)return C_(e,this.formSerializer).toString();if((l=q.isFileList(e))||i.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return io(l?{"files[]":e}:e,d&&new d,this.formSerializer)}}return s||r?(n.setContentType("application/json",!1),I_(e)):e}],transformResponse:[function(e){const n=this.transitional||ps.transitional,i=n&&n.forcedJSONParsing,r=this.responseType==="json";if(q.isResponse(e)||q.isReadableStream(e))return e;if(e&&q.isString(e)&&(i&&!this.responseType||r)){const o=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(l){if(o)throw l.name==="SyntaxError"?Le.from(l,Le.ERR_BAD_RESPONSE,this,null,this.response):l}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Pt.classes.FormData,Blob:Pt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};q.forEach(["delete","get","head","post","put","patch"],t=>{ps.headers[t]={}});const D_=q.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),P_=t=>{const e={};let n,i,r;return t&&t.split(`
|
|
32
|
+
`).forEach(function(o){r=o.indexOf(":"),n=o.substring(0,r).trim().toLowerCase(),i=o.substring(r+1).trim(),!(!n||e[n]&&D_[n])&&(n==="set-cookie"?e[n]?e[n].push(i):e[n]=[i]:e[n]=e[n]?e[n]+", "+i:i)}),e},Ld=Symbol("internals");function Dr(t){return t&&String(t).trim().toLowerCase()}function sa(t){return t===!1||t==null?t:q.isArray(t)?t.map(sa):String(t)}function L_(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(t);)e[i[1]]=i[2];return e}const $_=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function xu(t,e,n,i,r){if(q.isFunction(i))return i.call(this,e,n);if(r&&(e=n),!!q.isString(e)){if(q.isString(i))return e.indexOf(i)!==-1;if(q.isRegExp(i))return i.test(e)}}function M_(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,i)=>n.toUpperCase()+i)}function B_(t,e){const n=q.toCamelCase(" "+e);["get","set","has"].forEach(i=>{Object.defineProperty(t,i+n,{value:function(r,s,o){return this[i].call(this,e,r,s,o)},configurable:!0})})}let Lt=class{constructor(e){e&&this.set(e)}set(e,n,i){const r=this;function s(l,d,h){const m=Dr(d);if(!m)throw new Error("header name must be a non-empty string");const y=q.findKey(r,m);(!y||r[y]===void 0||h===!0||h===void 0&&r[y]!==!1)&&(r[y||d]=sa(l))}const o=(l,d)=>q.forEach(l,(h,m)=>s(h,m,d));if(q.isPlainObject(e)||e instanceof this.constructor)o(e,n);else if(q.isString(e)&&(e=e.trim())&&!$_(e))o(P_(e),n);else if(q.isHeaders(e))for(const[l,d]of e.entries())s(d,l,i);else e!=null&&s(n,e,i);return this}get(e,n){if(e=Dr(e),e){const i=q.findKey(this,e);if(i){const r=this[i];if(!n)return r;if(n===!0)return L_(r);if(q.isFunction(n))return n.call(this,r,i);if(q.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Dr(e),e){const i=q.findKey(this,e);return!!(i&&this[i]!==void 0&&(!n||xu(this,this[i],i,n)))}return!1}delete(e,n){const i=this;let r=!1;function s(o){if(o=Dr(o),o){const l=q.findKey(i,o);l&&(!n||xu(i,i[l],l,n))&&(delete i[l],r=!0)}}return q.isArray(e)?e.forEach(s):s(e),r}clear(e){const n=Object.keys(this);let i=n.length,r=!1;for(;i--;){const s=n[i];(!e||xu(this,this[s],s,e,!0))&&(delete this[s],r=!0)}return r}normalize(e){const n=this,i={};return q.forEach(this,(r,s)=>{const o=q.findKey(i,s);if(o){n[o]=sa(r),delete n[s];return}const l=e?M_(s):String(s).trim();l!==s&&delete n[s],n[l]=sa(r),i[l]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return q.forEach(this,(i,r)=>{i!=null&&i!==!1&&(n[r]=e&&q.isArray(i)?i.join(", "):i)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
|
|
33
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const i=new this(e);return n.forEach(r=>i.set(r)),i}static accessor(e){const i=(this[Ld]=this[Ld]={accessors:{}}).accessors,r=this.prototype;function s(o){const l=Dr(o);i[l]||(B_(r,o),i[l]=!0)}return q.isArray(e)?e.forEach(s):s(e),this}};Lt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);q.reduceDescriptors(Lt.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(i){this[n]=i}}});q.freezeMethods(Lt);function Tu(t,e){const n=this||ps,i=e||n,r=Lt.from(i.headers);let s=i.data;return q.forEach(t,function(l){s=l.call(n,s,r.normalize(),e?e.status:void 0)}),r.normalize(),s}function Up(t){return!!(t&&t.__CANCEL__)}function fr(t,e,n){Le.call(this,t==null?"canceled":t,Le.ERR_CANCELED,e,n),this.name="CanceledError"}q.inherits(fr,Le,{__CANCEL__:!0});function jp(t,e,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?t(n):e(new Le("Request failed with status code "+n.status,[Le.ERR_BAD_REQUEST,Le.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function U_(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function j_(t,e){t=t||10;const n=new Array(t),i=new Array(t);let r=0,s=0,o;return e=e!==void 0?e:1e3,function(d){const h=Date.now(),m=i[s];o||(o=h),n[r]=d,i[r]=h;let y=s,g=0;for(;y!==r;)g+=n[y++],y=y%t;if(r=(r+1)%t,r===s&&(s=(s+1)%t),h-o<e)return;const O=m&&h-m;return O?Math.round(g*1e3/O):void 0}}function V_(t,e){let n=0,i=1e3/e,r,s;const o=(h,m=Date.now())=>{n=m,r=null,s&&(clearTimeout(s),s=null),t.apply(null,h)};return[(...h)=>{const m=Date.now(),y=m-n;y>=i?o(h,m):(r=h,s||(s=setTimeout(()=>{s=null,o(r)},i-y)))},()=>r&&o(r)]}const Na=(t,e,n=3)=>{let i=0;const r=j_(50,250);return V_(s=>{const o=s.loaded,l=s.lengthComputable?s.total:void 0,d=o-i,h=r(d),m=o<=l;i=o;const y={loaded:o,total:l,progress:l?o/l:void 0,bytes:d,rate:h||void 0,estimated:h&&l&&m?(l-o)/h:void 0,event:s,lengthComputable:l!=null,[e?"download":"upload"]:!0};t(y)},n)},$d=(t,e)=>{const n=t!=null;return[i=>e[0]({lengthComputable:n,total:t,loaded:i}),e[1]]},Md=t=>(...e)=>q.asap(()=>t(...e)),H_=Pt.hasStandardBrowserEnv?function(){const e=Pt.navigator&&/(msie|trident)/i.test(Pt.navigator.userAgent),n=document.createElement("a");let i;function r(s){let o=s;return e&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return i=r(window.location.href),function(o){const l=q.isString(o)?r(o):o;return l.protocol===i.protocol&&l.host===i.host}}():function(){return function(){return!0}}(),q_=Pt.hasStandardBrowserEnv?{write(t,e,n,i,r,s){const o=[t+"="+encodeURIComponent(e)];q.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),q.isString(i)&&o.push("path="+i),q.isString(r)&&o.push("domain="+r),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function z_(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function K_(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Vp(t,e){return t&&!z_(e)?K_(t,e):e}const Bd=t=>t instanceof Lt?{...t}:t;function ki(t,e){e=e||{};const n={};function i(h,m,y){return q.isPlainObject(h)&&q.isPlainObject(m)?q.merge.call({caseless:y},h,m):q.isPlainObject(m)?q.merge({},m):q.isArray(m)?m.slice():m}function r(h,m,y){if(q.isUndefined(m)){if(!q.isUndefined(h))return i(void 0,h,y)}else return i(h,m,y)}function s(h,m){if(!q.isUndefined(m))return i(void 0,m)}function o(h,m){if(q.isUndefined(m)){if(!q.isUndefined(h))return i(void 0,h)}else return i(void 0,m)}function l(h,m,y){if(y in e)return i(h,m);if(y in t)return i(void 0,h)}const d={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:l,headers:(h,m)=>r(Bd(h),Bd(m),!0)};return q.forEach(Object.keys(Object.assign({},t,e)),function(m){const y=d[m]||r,g=y(t[m],e[m],m);q.isUndefined(g)&&y!==l||(n[m]=g)}),n}const Hp=t=>{const e=ki({},t);let{data:n,withXSRFToken:i,xsrfHeaderName:r,xsrfCookieName:s,headers:o,auth:l}=e;e.headers=o=Lt.from(o),e.url=$p(Vp(e.baseURL,e.url),t.params,t.paramsSerializer),l&&o.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let d;if(q.isFormData(n)){if(Pt.hasStandardBrowserEnv||Pt.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((d=o.getContentType())!==!1){const[h,...m]=d?d.split(";").map(y=>y.trim()).filter(Boolean):[];o.setContentType([h||"multipart/form-data",...m].join("; "))}}if(Pt.hasStandardBrowserEnv&&(i&&q.isFunction(i)&&(i=i(e)),i||i!==!1&&H_(e.url))){const h=r&&s&&q_.read(s);h&&o.set(r,h)}return e},G_=typeof XMLHttpRequest!="undefined",W_=G_&&function(t){return new Promise(function(n,i){const r=Hp(t);let s=r.data;const o=Lt.from(r.headers).normalize();let{responseType:l,onUploadProgress:d,onDownloadProgress:h}=r,m,y,g,O,_;function S(){O&&O(),_&&_(),r.cancelToken&&r.cancelToken.unsubscribe(m),r.signal&&r.signal.removeEventListener("abort",m)}let E=new XMLHttpRequest;E.open(r.method.toUpperCase(),r.url,!0),E.timeout=r.timeout;function R(){if(!E)return;const J=Lt.from("getAllResponseHeaders"in E&&E.getAllResponseHeaders()),X={data:!l||l==="text"||l==="json"?E.responseText:E.response,status:E.status,statusText:E.statusText,headers:J,config:t,request:E};jp(function(oe){n(oe),S()},function(oe){i(oe),S()},X),E=null}"onloadend"in E?E.onloadend=R:E.onreadystatechange=function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.indexOf("file:")===0)||setTimeout(R)},E.onabort=function(){E&&(i(new Le("Request aborted",Le.ECONNABORTED,t,E)),E=null)},E.onerror=function(){i(new Le("Network Error",Le.ERR_NETWORK,t,E)),E=null},E.ontimeout=function(){let z=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const X=r.transitional||Mp;r.timeoutErrorMessage&&(z=r.timeoutErrorMessage),i(new Le(z,X.clarifyTimeoutError?Le.ETIMEDOUT:Le.ECONNABORTED,t,E)),E=null},s===void 0&&o.setContentType(null),"setRequestHeader"in E&&q.forEach(o.toJSON(),function(z,X){E.setRequestHeader(X,z)}),q.isUndefined(r.withCredentials)||(E.withCredentials=!!r.withCredentials),l&&l!=="json"&&(E.responseType=r.responseType),h&&([g,_]=Na(h,!0),E.addEventListener("progress",g)),d&&E.upload&&([y,O]=Na(d),E.upload.addEventListener("progress",y),E.upload.addEventListener("loadend",O)),(r.cancelToken||r.signal)&&(m=J=>{E&&(i(!J||J.type?new fr(null,t,E):J),E.abort(),E=null)},r.cancelToken&&r.cancelToken.subscribe(m),r.signal&&(r.signal.aborted?m():r.signal.addEventListener("abort",m)));const j=U_(r.url);if(j&&Pt.protocols.indexOf(j)===-1){i(new Le("Unsupported protocol "+j+":",Le.ERR_BAD_REQUEST,t));return}E.send(s||null)})},J_=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let i=new AbortController,r;const s=function(h){if(!r){r=!0,l();const m=h instanceof Error?h:this.reason;i.abort(m instanceof Le?m:new fr(m instanceof Error?m.message:m))}};let o=e&&setTimeout(()=>{o=null,s(new Le(`timeout ${e} of ms exceeded`,Le.ETIMEDOUT))},e);const l=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(h=>{h.unsubscribe?h.unsubscribe(s):h.removeEventListener("abort",s)}),t=null)};t.forEach(h=>h.addEventListener("abort",s));const{signal:d}=i;return d.unsubscribe=()=>q.asap(l),d}},Y_=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let i=0,r;for(;i<n;)r=i+e,yield t.slice(i,r),i=r},X_=async function*(t,e){for await(const n of Q_(t))yield*Y_(n,e)},Q_=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:i}=await e.read();if(n)break;yield i}}finally{await e.cancel()}},Ud=(t,e,n,i)=>{const r=X_(t,e);let s=0,o,l=d=>{o||(o=!0,i&&i(d))};return new ReadableStream({async pull(d){try{const{done:h,value:m}=await r.next();if(h){l(),d.close();return}let y=m.byteLength;if(n){let g=s+=y;n(g)}d.enqueue(new Uint8Array(m))}catch(h){throw l(h),h}},cancel(d){return l(d),r.return()}},{highWaterMark:2})},ro=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",qp=ro&&typeof ReadableStream=="function",Z_=ro&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),zp=(t,...e)=>{try{return!!t(...e)}catch{return!1}},ew=qp&&zp(()=>{let t=!1;const e=new Request(Pt.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),jd=64*1024,gl=qp&&zp(()=>q.isReadableStream(new Response("").body)),Aa={stream:gl&&(t=>t.body)};ro&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Aa[e]&&(Aa[e]=q.isFunction(t[e])?n=>n[e]():(n,i)=>{throw new Le(`Response type '${e}' is not supported`,Le.ERR_NOT_SUPPORT,i)})})})(new Response);const tw=async t=>{if(t==null)return 0;if(q.isBlob(t))return t.size;if(q.isSpecCompliantForm(t))return(await new Request(Pt.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(q.isArrayBufferView(t)||q.isArrayBuffer(t))return t.byteLength;if(q.isURLSearchParams(t)&&(t=t+""),q.isString(t))return(await Z_(t)).byteLength},nw=async(t,e)=>{const n=q.toFiniteNumber(t.getContentLength());return n==null?tw(e):n},iw=ro&&(async t=>{let{url:e,method:n,data:i,signal:r,cancelToken:s,timeout:o,onDownloadProgress:l,onUploadProgress:d,responseType:h,headers:m,withCredentials:y="same-origin",fetchOptions:g}=Hp(t);h=h?(h+"").toLowerCase():"text";let O=J_([r,s&&s.toAbortSignal()],o),_;const S=O&&O.unsubscribe&&(()=>{O.unsubscribe()});let E;try{if(d&&ew&&n!=="get"&&n!=="head"&&(E=await nw(m,i))!==0){let X=new Request(e,{method:"POST",body:i,duplex:"half"}),ne;if(q.isFormData(i)&&(ne=X.headers.get("content-type"))&&m.setContentType(ne),X.body){const[oe,Se]=$d(E,Na(Md(d)));i=Ud(X.body,jd,oe,Se)}}q.isString(y)||(y=y?"include":"omit");const R="credentials"in Request.prototype;_=new Request(e,{...g,signal:O,method:n.toUpperCase(),headers:m.normalize().toJSON(),body:i,duplex:"half",credentials:R?y:void 0});let j=await fetch(_);const J=gl&&(h==="stream"||h==="response");if(gl&&(l||J&&S)){const X={};["status","statusText","headers"].forEach(ve=>{X[ve]=j[ve]});const ne=q.toFiniteNumber(j.headers.get("content-length")),[oe,Se]=l&&$d(ne,Na(Md(l),!0))||[];j=new Response(Ud(j.body,jd,oe,()=>{Se&&Se(),S&&S()}),X)}h=h||"text";let z=await Aa[q.findKey(Aa,h)||"text"](j,t);return!J&&S&&S(),await new Promise((X,ne)=>{jp(X,ne,{data:z,headers:Lt.from(j.headers),status:j.status,statusText:j.statusText,config:t,request:_})})}catch(R){throw S&&S(),R&&R.name==="TypeError"&&/fetch/i.test(R.message)?Object.assign(new Le("Network Error",Le.ERR_NETWORK,t,_),{cause:R.cause||R}):Le.from(R,R&&R.code,t,_)}}),vl={http:y_,xhr:W_,fetch:iw};q.forEach(vl,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Vd=t=>`- ${t}`,rw=t=>q.isFunction(t)||t===null||t===!1,Kp={getAdapter:t=>{t=q.isArray(t)?t:[t];const{length:e}=t;let n,i;const r={};for(let s=0;s<e;s++){n=t[s];let o;if(i=n,!rw(n)&&(i=vl[(o=String(n)).toLowerCase()],i===void 0))throw new Le(`Unknown adapter '${o}'`);if(i)break;r[o||"#"+s]=i}if(!i){const s=Object.entries(r).map(([l,d])=>`adapter ${l} `+(d===!1?"is not supported by the environment":"is not available in the build"));let o=e?s.length>1?`since :
|
|
34
|
+
`+s.map(Vd).join(`
|
|
35
|
+
`):" "+Vd(s[0]):"as no adapter specified";throw new Le("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return i},adapters:vl};function Cu(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new fr(null,t)}function Hd(t){return Cu(t),t.headers=Lt.from(t.headers),t.data=Tu.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Kp.getAdapter(t.adapter||ps.adapter)(t).then(function(i){return Cu(t),i.data=Tu.call(t,t.transformResponse,i),i.headers=Lt.from(i.headers),i},function(i){return Up(i)||(Cu(t),i&&i.response&&(i.response.data=Tu.call(t,t.transformResponse,i.response),i.response.headers=Lt.from(i.response.headers))),Promise.reject(i)})}const Gp="1.7.7",Gl={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Gl[t]=function(i){return typeof i===t||"a"+(e<1?"n ":" ")+t}});const qd={};Gl.transitional=function(e,n,i){function r(s,o){return"[Axios v"+Gp+"] Transitional option '"+s+"'"+o+(i?". "+i:"")}return(s,o,l)=>{if(e===!1)throw new Le(r(o," has been removed"+(n?" in "+n:"")),Le.ERR_DEPRECATED);return n&&!qd[o]&&(qd[o]=!0,console.warn(r(o," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(s,o,l):!0}};function sw(t,e,n){if(typeof t!="object")throw new Le("options must be an object",Le.ERR_BAD_OPTION_VALUE);const i=Object.keys(t);let r=i.length;for(;r-- >0;){const s=i[r],o=e[s];if(o){const l=t[s],d=l===void 0||o(l,s,t);if(d!==!0)throw new Le("option "+s+" must be "+d,Le.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Le("Unknown option "+s,Le.ERR_BAD_OPTION)}}const yl={assertOptions:sw,validators:Gl},Un=yl.validators;let gi=class{constructor(e){this.defaults=e,this.interceptors={request:new Pd,response:new Pd}}async request(e,n){try{return await this._request(e,n)}catch(i){if(i instanceof Error){let r;Error.captureStackTrace?Error.captureStackTrace(r={}):r=new Error;const s=r.stack?r.stack.replace(/^.+\n/,""):"";try{i.stack?s&&!String(i.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(i.stack+=`
|
|
36
|
+
`+s):i.stack=s}catch{}}throw i}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=ki(this.defaults,n);const{transitional:i,paramsSerializer:r,headers:s}=n;i!==void 0&&yl.assertOptions(i,{silentJSONParsing:Un.transitional(Un.boolean),forcedJSONParsing:Un.transitional(Un.boolean),clarifyTimeoutError:Un.transitional(Un.boolean)},!1),r!=null&&(q.isFunction(r)?n.paramsSerializer={serialize:r}:yl.assertOptions(r,{encode:Un.function,serialize:Un.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=s&&q.merge(s.common,s[n.method]);s&&q.forEach(["delete","get","head","post","put","patch","common"],_=>{delete s[_]}),n.headers=Lt.concat(o,s);const l=[];let d=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(n)===!1||(d=d&&S.synchronous,l.unshift(S.fulfilled,S.rejected))});const h=[];this.interceptors.response.forEach(function(S){h.push(S.fulfilled,S.rejected)});let m,y=0,g;if(!d){const _=[Hd.bind(this),void 0];for(_.unshift.apply(_,l),_.push.apply(_,h),g=_.length,m=Promise.resolve(n);y<g;)m=m.then(_[y++],_[y++]);return m}g=l.length;let O=n;for(y=0;y<g;){const _=l[y++],S=l[y++];try{O=_(O)}catch(E){S.call(this,E);break}}try{m=Hd.call(this,O)}catch(_){return Promise.reject(_)}for(y=0,g=h.length;y<g;)m=m.then(h[y++],h[y++]);return m}getUri(e){e=ki(this.defaults,e);const n=Vp(e.baseURL,e.url);return $p(n,e.params,e.paramsSerializer)}};q.forEach(["delete","get","head","options"],function(e){gi.prototype[e]=function(n,i){return this.request(ki(i||{},{method:e,url:n,data:(i||{}).data}))}});q.forEach(["post","put","patch"],function(e){function n(i){return function(s,o,l){return this.request(ki(l||{},{method:e,headers:i?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}gi.prototype[e]=n(),gi.prototype[e+"Form"]=n(!0)});let aw=class Wp{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const i=this;this.promise.then(r=>{if(!i._listeners)return;let s=i._listeners.length;for(;s-- >0;)i._listeners[s](r);i._listeners=null}),this.promise.then=r=>{let s;const o=new Promise(l=>{i.subscribe(l),s=l}).then(r);return o.cancel=function(){i.unsubscribe(s)},o},e(function(s,o,l){i.reason||(i.reason=new fr(s,o,l),n(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=i=>{e.abort(i)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Wp(function(r){e=r}),cancel:e}}};function ow(t){return function(n){return t.apply(null,n)}}function uw(t){return q.isObject(t)&&t.isAxiosError===!0}const bl={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(bl).forEach(([t,e])=>{bl[e]=t});function Jp(t){const e=new gi(t),n=Np(gi.prototype.request,e);return q.extend(n,gi.prototype,e,{allOwnKeys:!0}),q.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return Jp(ki(t,r))},n}const at=Jp(ps);at.Axios=gi;at.CanceledError=fr;at.CancelToken=aw;at.isCancel=Up;at.VERSION=Gp;at.toFormData=io;at.AxiosError=Le;at.Cancel=at.CanceledError;at.all=function(e){return Promise.all(e)};at.spread=ow;at.isAxiosError=uw;at.mergeConfig=ki;at.AxiosHeaders=Lt;at.formToJSON=t=>Bp(q.isHTMLForm(t)?new FormData(t):t);at.getAdapter=Kp.getAdapter;at.HttpStatusCode=bl;at.default=at;const{Axios:xN,AxiosError:TN,CanceledError:CN,isCancel:RN,CancelToken:FN,VERSION:IN,all:DN,Cancel:PN,isAxiosError:LN,spread:$N,toFormData:MN,AxiosHeaders:BN,HttpStatusCode:UN,formToJSON:jN,getAdapter:VN,mergeConfig:HN}=at,lw={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}};class Oa{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,n)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=e||lw,this.options=n,this.debug=n.debug}log(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"log","",!0)}warn(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"warn","",!0)}error(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"error","")}deprecate(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,i,r){return r&&!this.debug?null:(typeof e[0]=="string"&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new Oa(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new Oa(this.logger,e)}}var hn=new Oa;class so{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const r=this.observers[i].get(n)||0;this.observers[i].set(n,r+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(o=>{let[l,d]=o;for(let h=0;h<d;h++)l(...i)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(o=>{let[l,d]=o;for(let h=0;h<d;h++)l.apply(l,[e,...i])})}}const Pr=()=>{let t,e;const n=new Promise((i,r)=>{t=i,e=r});return n.resolve=t,n.reject=e,n},zd=t=>t==null?"":""+t,cw=(t,e,n)=>{t.forEach(i=>{e[i]&&(n[i]=e[i])})},dw=/###/g,Kd=t=>t&&t.indexOf("###")>-1?t.replace(dw,"."):t,Gd=t=>!t||typeof t=="string",Kr=(t,e,n)=>{const i=typeof e!="string"?e:e.split(".");let r=0;for(;r<i.length-1;){if(Gd(t))return{};const s=Kd(i[r]);!t[s]&&n&&(t[s]=new n),Object.prototype.hasOwnProperty.call(t,s)?t=t[s]:t={},++r}return Gd(t)?{}:{obj:t,k:Kd(i[r])}},Wd=(t,e,n)=>{const{obj:i,k:r}=Kr(t,e,Object);if(i!==void 0||e.length===1){i[r]=n;return}let s=e[e.length-1],o=e.slice(0,e.length-1),l=Kr(t,o,Object);for(;l.obj===void 0&&o.length;)s=`${o[o.length-1]}.${s}`,o=o.slice(0,o.length-1),l=Kr(t,o,Object),l&&l.obj&&typeof l.obj[`${l.k}.${s}`]!="undefined"&&(l.obj=void 0);l.obj[`${l.k}.${s}`]=n},fw=(t,e,n,i)=>{const{obj:r,k:s}=Kr(t,e,Object);r[s]=r[s]||[],r[s].push(n)},xa=(t,e)=>{const{obj:n,k:i}=Kr(t,e);if(n)return n[i]},hw=(t,e,n)=>{const i=xa(t,n);return i!==void 0?i:xa(e,n)},Yp=(t,e,n)=>{for(const i in e)i!=="__proto__"&&i!=="constructor"&&(i in t?typeof t[i]=="string"||t[i]instanceof String||typeof e[i]=="string"||e[i]instanceof String?n&&(t[i]=e[i]):Yp(t[i],e[i],n):t[i]=e[i]);return t},Ui=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var pw={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const mw=t=>typeof t=="string"?t.replace(/[&<>"'\/]/g,e=>pw[e]):t;class gw{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}const vw=[" ",",","?","!",";"],yw=new gw(20),bw=(t,e,n)=>{e=e||"",n=n||"";const i=vw.filter(o=>e.indexOf(o)<0&&n.indexOf(o)<0);if(i.length===0)return!0;const r=yw.getRegExp(`(${i.map(o=>o==="?"?"\\?":o).join("|")})`);let s=!r.test(t);if(!s){const o=t.indexOf(n);o>0&&!r.test(t.substring(0,o))&&(s=!0)}return s},kl=function(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];const i=e.split(n);let r=t;for(let s=0;s<i.length;){if(!r||typeof r!="object")return;let o,l="";for(let d=s;d<i.length;++d)if(d!==s&&(l+=n),l+=i[d],o=r[l],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&d<i.length-1)continue;s+=d-s+1;break}r=o}return r},Ta=t=>t&&t.indexOf("_")>0?t.replace("_","-"):t;class Jd extends so{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,o=r.ignoreJSONStructure!==void 0?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;e.indexOf(".")>-1?l=e.split("."):(l=[e,n],i&&(Array.isArray(i)?l.push(...i):typeof i=="string"&&s?l.push(...i.split(s)):l.push(i)));const d=xa(this.data,l);return!d&&!n&&!i&&e.indexOf(".")>-1&&(e=l[0],n=l[1],i=l.slice(2).join(".")),d||!o||typeof i!="string"?d:kl(this.data&&this.data[e]&&this.data[e][n],i,s)}addResource(e,n,i,r){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let l=[e,n];i&&(l=l.concat(o?i.split(o):i)),e.indexOf(".")>-1&&(l=e.split("."),r=n,n=l[1]),this.addNamespaces(n),Wd(this.data,l,r),s.silent||this.emit("added",e,n,i,r)}addResources(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const s in i)(typeof i[s]=="string"||Array.isArray(i[s]))&&this.addResource(e,n,s,i[s],{silent:!0});r.silent||this.emit("added",e,n,i)}addResourceBundle(e,n,i,r,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},l=[e,n];e.indexOf(".")>-1&&(l=e.split("."),r=i,i=n,n=l[1]),this.addNamespaces(n);let d=xa(this.data,l)||{};o.skipCopy||(i=JSON.parse(JSON.stringify(i))),r?Yp(d,i,s):d={...d,...i},Wd(this.data,l,d),o.silent||this.emit("added",e,n,i)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,n)}:this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(r=>n[r]&&Object.keys(n[r]).length>0)}toJSON(){return this.data}}var Xp={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,i,r){return t.forEach(s=>{this.processors[s]&&(e=this.processors[s].process(e,n,i,r))}),e}};const Yd={};class Ca extends so{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),cw(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=hn.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const i=this.resolve(e,n);return i&&i.res!==void 0}extractFromKey(e,n){let i=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const r=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let s=n.ns||this.options.defaultNS||[];const o=i&&e.indexOf(i)>-1,l=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!bw(e,i,r);if(o&&!l){const d=e.match(this.interpolator.nestingRegexp);if(d&&d.length>0)return{key:e,namespaces:s};const h=e.split(i);(i!==r||i===r&&this.options.ns.indexOf(h[0])>-1)&&(s=h.shift()),e=h.join(r)}return typeof s=="string"&&(s=[s]),{key:e,namespaces:s}}translate(e,n,i){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const r=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:o,namespaces:l}=this.extractFromKey(e[e.length-1],n),d=l[l.length-1],h=n.lng||this.language,m=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h&&h.toLowerCase()==="cimode"){if(m){const z=n.nsSeparator||this.options.nsSeparator;return r?{res:`${d}${z}${o}`,usedKey:o,exactUsedKey:o,usedLng:h,usedNS:d,usedParams:this.getUsedParamsDetails(n)}:`${d}${z}${o}`}return r?{res:o,usedKey:o,exactUsedKey:o,usedLng:h,usedNS:d,usedParams:this.getUsedParamsDetails(n)}:o}const y=this.resolve(e,n);let g=y&&y.res;const O=y&&y.usedKey||o,_=y&&y.exactUsedKey||o,S=Object.prototype.toString.apply(g),E=["[object Number]","[object Function]","[object RegExp]"],R=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,j=!this.i18nFormat||this.i18nFormat.handleAsObject;if(j&&g&&(typeof g!="string"&&typeof g!="boolean"&&typeof g!="number")&&E.indexOf(S)<0&&!(typeof R=="string"&&Array.isArray(g))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const z=this.options.returnedObjectHandler?this.options.returnedObjectHandler(O,g,{...n,ns:l}):`key '${o} (${this.language})' returned an object instead of string.`;return r?(y.res=z,y.usedParams=this.getUsedParamsDetails(n),y):z}if(s){const z=Array.isArray(g),X=z?[]:{},ne=z?_:O;for(const oe in g)if(Object.prototype.hasOwnProperty.call(g,oe)){const Se=`${ne}${s}${oe}`;X[oe]=this.translate(Se,{...n,joinArrays:!1,ns:l}),X[oe]===Se&&(X[oe]=g[oe])}g=X}}else if(j&&typeof R=="string"&&Array.isArray(g))g=g.join(R),g&&(g=this.extendTranslation(g,e,n,i));else{let z=!1,X=!1;const ne=n.count!==void 0&&typeof n.count!="string",oe=Ca.hasDefaultValue(n),Se=ne?this.pluralResolver.getSuffix(h,n.count,n):"",ve=n.ordinal&&ne?this.pluralResolver.getSuffix(h,n.count,{ordinal:!1}):"",ze=ne&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),Ne=ze&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${Se}`]||n[`defaultValue${ve}`]||n.defaultValue;!this.isValidLookup(g)&&oe&&(z=!0,g=Ne),this.isValidLookup(g)||(X=!0,g=o);const Ve=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&X?void 0:g,M=oe&&Ne!==g&&this.options.updateMissing;if(X||z||M){if(this.logger.log(M?"updateKey":"missingKey",h,d,o,M?Ne:g),s){const ce=this.resolve(o,{...n,keySeparator:!1});ce&&ce.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let N=[];const K=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&K&&K[0])for(let ce=0;ce<K.length;ce++)N.push(K[ce]);else this.options.saveMissingTo==="all"?N=this.languageUtils.toResolveHierarchy(n.lng||this.language):N.push(n.lng||this.language);const ie=(ce,ae,B)=>{const Fe=oe&&B!==g?B:Ve;this.options.missingKeyHandler?this.options.missingKeyHandler(ce,d,ae,Fe,M,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(ce,d,ae,Fe,M,n),this.emit("missingKey",ce,d,ae,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&ne?N.forEach(ce=>{const ae=this.pluralResolver.getSuffixes(ce,n);ze&&n[`defaultValue${this.options.pluralSeparator}zero`]&&ae.indexOf(`${this.options.pluralSeparator}zero`)<0&&ae.push(`${this.options.pluralSeparator}zero`),ae.forEach(B=>{ie([ce],o+B,n[`defaultValue${B}`]||Ne)})}):ie(N,o,Ne))}g=this.extendTranslation(g,e,n,y,i),X&&g===o&&this.options.appendNamespaceToMissingKey&&(g=`${d}:${o}`),(X||z)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${d}:${o}`:o,z?g:void 0):g=this.options.parseMissingKeyHandler(g))}return r?(y.res=g,y.usedParams=this.getUsedParamsDetails(n),y):g}extendTranslation(e,n,i,r,s){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const h=typeof e=="string"&&(i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let m;if(h){const g=e.match(this.interpolator.nestingRegexp);m=g&&g.length}let y=i.replace&&typeof i.replace!="string"?i.replace:i;if(this.options.interpolation.defaultVariables&&(y={...this.options.interpolation.defaultVariables,...y}),e=this.interpolator.interpolate(e,y,i.lng||this.language||r.usedLng,i),h){const g=e.match(this.interpolator.nestingRegexp),O=g&&g.length;m<O&&(i.nest=!1)}!i.lng&&this.options.compatibilityAPI!=="v1"&&r&&r.res&&(i.lng=this.language||r.usedLng),i.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var g=arguments.length,O=new Array(g),_=0;_<g;_++)O[_]=arguments[_];return s&&s[0]===O[0]&&!i.context?(o.logger.warn(`It seems you are nesting recursively key: ${O[0]} in key: ${n[0]}`),null):o.translate(...O,n)},i)),i.interpolation&&this.interpolator.reset()}const l=i.postProcess||this.options.postProcess,d=typeof l=="string"?[l]:l;return e!=null&&d&&d.length&&i.applyPostProcessor!==!1&&(e=Xp.handle(d,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,r,s,o,l;return typeof e=="string"&&(e=[e]),e.forEach(d=>{if(this.isValidLookup(i))return;const h=this.extractFromKey(d,n),m=h.key;r=m;let y=h.namespaces;this.options.fallbackNS&&(y=y.concat(this.options.fallbackNS));const g=n.count!==void 0&&typeof n.count!="string",O=g&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),_=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",S=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);y.forEach(E=>{this.isValidLookup(i)||(l=E,!Yd[`${S[0]}-${E}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(l)&&(Yd[`${S[0]}-${E}`]=!0,this.logger.warn(`key "${r}" for languages "${S.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),S.forEach(R=>{if(this.isValidLookup(i))return;o=R;const j=[m];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(j,m,R,E,n);else{let z;g&&(z=this.pluralResolver.getSuffix(R,n.count,n));const X=`${this.options.pluralSeparator}zero`,ne=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(g&&(j.push(m+z),n.ordinal&&z.indexOf(ne)===0&&j.push(m+z.replace(ne,this.options.pluralSeparator)),O&&j.push(m+X)),_){const oe=`${m}${this.options.contextSeparator}${n.context}`;j.push(oe),g&&(j.push(oe+z),n.ordinal&&z.indexOf(ne)===0&&j.push(oe+z.replace(ne,this.options.pluralSeparator)),O&&j.push(oe+X))}}let J;for(;J=j.pop();)this.isValidLookup(i)||(s=J,i=this.getResource(R,E,J,n))}))})}),{res:i,usedKey:r,exactUsedKey:s,usedLng:o,usedNS:l}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,n,i,r):this.resourceStore.getResource(e,n,i,r)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=e.replace&&typeof e.replace!="string";let r=i?e.replace:e;if(i&&typeof e.count!="undefined"&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!i){r={...r};for(const s of n)delete r[s]}return r}static hasDefaultValue(e){const n="defaultValue";for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&n===i.substring(0,n.length)&&e[i]!==void 0)return!0;return!1}}const Ru=t=>t.charAt(0).toUpperCase()+t.slice(1);class Xd{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=hn.create("languageUtils")}getScriptPartFromCode(e){if(e=Ta(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=Ta(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let i=e.split("-");return this.options.lowerCaseLng?i=i.map(r=>r.toLowerCase()):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=Ru(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=Ru(i[1].toLowerCase())),n.indexOf(i[2].toLowerCase())>-1&&(i[2]=Ru(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(i=>{if(n)return;const r=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(r))&&(n=r)}),!n&&this.options.supportedLngs&&e.forEach(i=>{if(n)return;const r=this.getLanguagePartFromCode(i);if(this.isSupportedCode(r))return n=r;n=this.options.supportedLngs.find(s=>{if(s===r)return s;if(!(s.indexOf("-")<0&&r.indexOf("-")<0)&&(s.indexOf("-")>0&&r.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===r||s.indexOf(r)===0&&r.length>1))return s})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),typeof e=="string"&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let i=e[n];return i||(i=e[this.getScriptPartFromCode(n)]),i||(i=e[this.formatLanguageCode(n)]),i||(i=e[this.getLanguagePartFromCode(n)]),i||(i=e.default),i||[]}toResolveHierarchy(e,n){const i=this.getFallbackCodes(n||this.options.fallbackLng||[],e),r=[],s=o=>{o&&(this.isSupportedCode(o)?r.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(e))):typeof e=="string"&&s(this.formatLanguageCode(e)),i.forEach(o=>{r.indexOf(o)<0&&s(this.formatLanguageCode(o))}),r}}let kw=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],_w={1:t=>+(t>1),2:t=>+(t!=1),3:t=>0,4:t=>t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,5:t=>t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5,6:t=>t==1?0:t>=2&&t<=4?1:2,7:t=>t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,8:t=>t==1?0:t==2?1:t!=8&&t!=11?2:3,9:t=>+(t>=2),10:t=>t==1?0:t==2?1:t<7?2:t<11?3:4,11:t=>t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3,12:t=>+(t%10!=1||t%100==11),13:t=>+(t!==0),14:t=>t==1?0:t==2?1:t==3?2:3,15:t=>t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2,16:t=>t%10==1&&t%100!=11?0:t!==0?1:2,17:t=>t==1||t%10==1&&t%100!=11?0:1,18:t=>t==0?0:t==1?1:2,19:t=>t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3,20:t=>t==1?0:t==0||t%100>0&&t%100<20?1:2,21:t=>t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0,22:t=>t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3};const ww=["v1","v2","v3"],Sw=["v4"],Qd={zero:0,one:1,two:2,few:3,many:4,other:5},Ew=()=>{const t={};return kw.forEach(e=>{e.lngs.forEach(n=>{t[n]={numbers:e.nr,plurals:_w[e.fc]}})}),t};class Nw{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=n,this.logger=hn.create("pluralResolver"),(!this.options.compatibilityJSON||Sw.includes(this.options.compatibilityJSON))&&(typeof Intl=="undefined"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Ew(),this.pluralRulesCache={}}addRule(e,n){this.rules[e]=n}clearCache(){this.pluralRulesCache={}}getRule(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const i=Ta(e==="dev"?"en":e),r=n.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:i,type:r});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];const o=new Intl.PluralRules(i,{type:r});return this.pluralRulesCache[s]=o,o}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,n);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}getPluralFormsOfKey(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,i).map(r=>`${n}${r}`)}getSuffixes(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,n);return i?this.shouldUseIntlApi()?i.resolvedOptions().pluralCategories.sort((r,s)=>Qd[r]-Qd[s]).map(r=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r}`):i.numbers.map(r=>this.getSuffix(e,r,n)):[]}getSuffix(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=this.getRule(e,i);return r?this.shouldUseIntlApi()?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${r.select(n)}`:this.getSuffixRetroCompatible(r,n):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,n){const i=e.noAbs?e.plurals(n):e.plurals(Math.abs(n));let r=e.numbers[i];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(r===2?r="plural":r===1&&(r=""));const s=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return this.options.compatibilityJSON==="v1"?r===1?"":typeof r=="number"?`_plural_${r.toString()}`:s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?s():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}shouldUseIntlApi(){return!ww.includes(this.options.compatibilityJSON)}}const Zd=function(t,e,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=hw(t,e,n);return!s&&r&&typeof n=="string"&&(s=kl(t,n,i),s===void 0&&(s=kl(e,n,i))),s},Fu=t=>t.replace(/\$/g,"$$$$");class Aw{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=hn.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(n=>n),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:n,escapeValue:i,useRawValueToEscape:r,prefix:s,prefixEscaped:o,suffix:l,suffixEscaped:d,formatSeparator:h,unescapeSuffix:m,unescapePrefix:y,nestingPrefix:g,nestingPrefixEscaped:O,nestingSuffix:_,nestingSuffixEscaped:S,nestingOptionsSeparator:E,maxReplaces:R,alwaysFormat:j}=e.interpolation;this.escape=n!==void 0?n:mw,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=r!==void 0?r:!1,this.prefix=s?Ui(s):o||"{{",this.suffix=l?Ui(l):d||"}}",this.formatSeparator=h||",",this.unescapePrefix=m?"":y||"-",this.unescapeSuffix=this.unescapePrefix?"":m||"",this.nestingPrefix=g?Ui(g):O||Ui("$t("),this.nestingSuffix=_?Ui(_):S||Ui(")"),this.nestingOptionsSeparator=E||",",this.maxReplaces=R||1e3,this.alwaysFormat=j!==void 0?j:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,i)=>n&&n.source===i?(n.lastIndex=0,n):new RegExp(i,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,n,i,r){let s,o,l;const d=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},h=O=>{if(O.indexOf(this.formatSeparator)<0){const R=Zd(n,d,O,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(R,void 0,i,{...r,...n,interpolationkey:O}):R}const _=O.split(this.formatSeparator),S=_.shift().trim(),E=_.join(this.formatSeparator).trim();return this.format(Zd(n,d,S,this.options.keySeparator,this.options.ignoreJSONStructure),E,i,{...r,...n,interpolationkey:S})};this.resetRegExp();const m=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,y=r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:O=>Fu(O)},{regex:this.regexp,safeValue:O=>this.escapeValue?Fu(this.escape(O)):Fu(O)}].forEach(O=>{for(l=0;s=O.regex.exec(e);){const _=s[1].trim();if(o=h(_),o===void 0)if(typeof m=="function"){const E=m(e,s,r);o=typeof E=="string"?E:""}else if(r&&Object.prototype.hasOwnProperty.call(r,_))o="";else if(y){o=s[0];continue}else this.logger.warn(`missed to pass in variable ${_} for interpolating ${e}`),o="";else typeof o!="string"&&!this.useRawValueToEscape&&(o=zd(o));const S=O.safeValue(o);if(e=e.replace(s[0],S),y?(O.regex.lastIndex+=o.length,O.regex.lastIndex-=s[0].length):O.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),e}nest(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,s,o;const l=(d,h)=>{const m=this.nestingOptionsSeparator;if(d.indexOf(m)<0)return d;const y=d.split(new RegExp(`${m}[ ]*{`));let g=`{${y[1]}`;d=y[0],g=this.interpolate(g,o);const O=g.match(/'/g),_=g.match(/"/g);(O&&O.length%2===0&&!_||_.length%2!==0)&&(g=g.replace(/'/g,'"'));try{o=JSON.parse(g),h&&(o={...h,...o})}catch(S){return this.logger.warn(`failed parsing options string in nesting for key ${d}`,S),`${d}${m}${g}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,d};for(;r=this.nestingRegexp.exec(e);){let d=[];o={...i},o=o.replace&&typeof o.replace!="string"?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let h=!1;if(r[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(r[1])){const m=r[1].split(this.formatSeparator).map(y=>y.trim());r[1]=m.shift(),d=m,h=!0}if(s=n(l.call(this,r[1].trim(),o),o),s&&r[0]===e&&typeof s!="string")return s;typeof s!="string"&&(s=zd(s)),s||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),s=""),h&&(s=d.reduce((m,y)=>this.format(m,y,i.lng,{...i,interpolationkey:r[1].trim()}),s.trim())),e=e.replace(r[0],s),this.regexp.lastIndex=0}return e}}const Ow=t=>{let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const i=t.split("(");e=i[0].toLowerCase().trim();const r=i[1].substring(0,i[1].length-1);e==="currency"&&r.indexOf(":")<0?n.currency||(n.currency=r.trim()):e==="relativetime"&&r.indexOf(":")<0?n.range||(n.range=r.trim()):r.split(";").forEach(o=>{if(o){const[l,...d]=o.split(":"),h=d.join(":").trim().replace(/^'+|'+$/g,""),m=l.trim();n[m]||(n[m]=h),h==="false"&&(n[m]=!1),h==="true"&&(n[m]=!0),isNaN(h)||(n[m]=parseInt(h,10))}})}return{formatName:e,formatOptions:n}},ji=t=>{const e={};return(n,i,r)=>{let s=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(s={...s,[r.interpolationkey]:void 0});const o=i+JSON.stringify(s);let l=e[o];return l||(l=t(Ta(i),r),e[o]=l),l(n)}};class xw{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=hn.create("formatter"),this.options=e,this.formats={number:ji((n,i)=>{const r=new Intl.NumberFormat(n,{...i});return s=>r.format(s)}),currency:ji((n,i)=>{const r=new Intl.NumberFormat(n,{...i,style:"currency"});return s=>r.format(s)}),datetime:ji((n,i)=>{const r=new Intl.DateTimeFormat(n,{...i});return s=>r.format(s)}),relativetime:ji((n,i)=>{const r=new Intl.RelativeTimeFormat(n,{...i});return s=>r.format(s,i.range||"day")}),list:ji((n,i)=>{const r=new Intl.ListFormat(n,{...i});return s=>r.format(s)})},this.init(e)}init(e){const i=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=ji(n)}format(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=n.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(l=>l.indexOf(")")>-1)){const l=s.findIndex(d=>d.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,l)].join(this.formatSeparator)}return s.reduce((l,d)=>{const{formatName:h,formatOptions:m}=Ow(d);if(this.formats[h]){let y=l;try{const g=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},O=g.locale||g.lng||r.locale||r.lng||i;y=this.formats[h](l,O,{...m,...r,...g})}catch(g){this.logger.warn(g)}return y}else this.logger.warn(`there was no format function for ${h}`);return l},e)}}const Tw=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class Cw extends so{constructor(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=n,this.services=i,this.languageUtils=i.languageUtils,this.options=r,this.logger=hn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(i,r.backend,r)}queueLoad(e,n,i,r){const s={},o={},l={},d={};return e.forEach(h=>{let m=!0;n.forEach(y=>{const g=`${h}|${y}`;!i.reload&&this.store.hasResourceBundle(h,y)?this.state[g]=2:this.state[g]<0||(this.state[g]===1?o[g]===void 0&&(o[g]=!0):(this.state[g]=1,m=!1,o[g]===void 0&&(o[g]=!0),s[g]===void 0&&(s[g]=!0),d[y]===void 0&&(d[y]=!0)))}),m||(l[h]=!0)}),(Object.keys(s).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(s),pending:Object.keys(o),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(d)}}loaded(e,n,i){const r=e.split("|"),s=r[0],o=r[1];n&&this.emit("failedLoading",s,o,n),!n&&i&&this.store.addResourceBundle(s,o,i,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2,n&&i&&(this.state[e]=0);const l={};this.queue.forEach(d=>{fw(d.loaded,[s],o),Tw(d,e),n&&d.errors.push(n),d.pendingCount===0&&!d.done&&(Object.keys(d.loaded).forEach(h=>{l[h]||(l[h]={});const m=d.loaded[h];m.length&&m.forEach(y=>{l[h][y]===void 0&&(l[h][y]=!0)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(d=>!d.done)}read(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:i,tried:r,wait:s,callback:o});return}this.readingCalls++;const l=(h,m)=>{if(this.readingCalls--,this.waitingReads.length>0){const y=this.waitingReads.shift();this.read(y.lng,y.ns,y.fcName,y.tried,y.wait,y.callback)}if(h&&m&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,i,r+1,s*2,o)},s);return}o(h,m)},d=this.backend[i].bind(this.backend);if(d.length===2){try{const h=d(e,n);h&&typeof h.then=="function"?h.then(m=>l(null,m)).catch(l):l(null,h)}catch(h){l(h)}return}return d(e,n,l)}prepareLoading(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof n=="string"&&(n=[n]);const s=this.queueLoad(e,n,i,r);if(!s.toLoad.length)return s.pending.length||r(),null;s.toLoad.forEach(o=>{this.loadOne(o)})}load(e,n,i){this.prepareLoading(e,n,{},i)}reload(e,n,i){this.prepareLoading(e,n,{reload:!0},i)}loadOne(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const i=e.split("|"),r=i[0],s=i[1];this.read(r,s,"read",void 0,void 0,(o,l)=>{o&&this.logger.warn(`${n}loading namespace ${s} for language ${r} failed`,o),!o&&l&&this.logger.log(`${n}loaded namespace ${s} for language ${r}`,l),this.loaded(e,o,l)})}saveMissing(e,n,i,r,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${i}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if(this.backend&&this.backend.create){const d={...o,isUpdate:s},h=this.backend.create.bind(this.backend);if(h.length<6)try{let m;h.length===5?m=h(e,n,i,r,d):m=h(e,n,i,r),m&&typeof m.then=="function"?m.then(y=>l(null,y)).catch(l):l(null,m)}catch(m){l(m)}else h(e,n,i,r,l,d)}!e||!e[0]||this.store.addResource(e[0],n,i,r)}}}const ef=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),typeof t[1]=="string"&&(e.defaultValue=t[1]),typeof t[2]=="string"&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const n=t[3]||t[2];Object.keys(n).forEach(i=>{e[i]=n[i]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),tf=t=>(typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t),Ys=()=>{},Rw=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})};class rs extends so{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=tf(e),this.services={},this.logger=hn,this.modules={external:[]},Rw(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(){var e=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(i=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const r=ef();this.options={...r,...this.options,...tf(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const s=m=>m?typeof m=="function"?new m:m:null;if(!this.options.isClone){this.modules.logger?hn.init(s(this.modules.logger),this.options):hn.init(null,this.options);let m;this.modules.formatter?m=this.modules.formatter:typeof Intl!="undefined"&&(m=xw);const y=new Xd(this.options);this.store=new Jd(this.options.resources,this.options);const g=this.services;g.logger=hn,g.resourceStore=this.store,g.languageUtils=y,g.pluralResolver=new Nw(y,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),m&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(g.formatter=s(m),g.formatter.init(g,this.options),this.options.interpolation.format=g.formatter.format.bind(g.formatter)),g.interpolator=new Aw(this.options),g.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},g.backendConnector=new Cw(s(this.modules.backend),g.resourceStore,g,this.options),g.backendConnector.on("*",function(O){for(var _=arguments.length,S=new Array(_>1?_-1:0),E=1;E<_;E++)S[E-1]=arguments[E];e.emit(O,...S)}),this.modules.languageDetector&&(g.languageDetector=s(this.modules.languageDetector),g.languageDetector.init&&g.languageDetector.init(g,this.options.detection,this.options)),this.modules.i18nFormat&&(g.i18nFormat=s(this.modules.i18nFormat),g.i18nFormat.init&&g.i18nFormat.init(this)),this.translator=new Ca(this.services,this.options),this.translator.on("*",function(O){for(var _=arguments.length,S=new Array(_>1?_-1:0),E=1;E<_;E++)S[E-1]=arguments[E];e.emit(O,...S)}),this.modules.external.forEach(O=>{O.init&&O.init(this)})}if(this.format=this.options.interpolation.format,i||(i=Ys),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&m[0]!=="dev"&&(this.options.lng=m[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(m=>{this[m]=function(){return e.store[m](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(m=>{this[m]=function(){return e.store[m](...arguments),e}});const d=Pr(),h=()=>{const m=(y,g)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),d.resolve(g),i(y,g)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return m(null,this.t.bind(this));this.changeLanguage(this.options.lng,m)};return this.options.resources||!this.options.initImmediate?h():setTimeout(h,0),d}loadResources(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ys;const r=typeof e=="string"?e:this.language;if(typeof e=="function"&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&r.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const s=[],o=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(h=>{h!=="cimode"&&s.indexOf(h)<0&&s.push(h)})};r?o(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(d=>o(d)),this.options.preload&&this.options.preload.forEach(l=>o(l)),this.services.backendConnector.load(s,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(l)})}else i(null)}reloadResources(e,n,i){const r=Pr();return typeof e=="function"&&(i=e,e=void 0),typeof n=="function"&&(i=n,n=void 0),e||(e=this.languages),n||(n=this.options.ns),i||(i=Ys),this.services.backendConnector.reload(e,n,s=>{r.resolve(),i(s)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&Xp.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let n=0;n<this.languages.length;n++){const i=this.languages[n];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}}changeLanguage(e,n){var i=this;this.isLanguageChangingTo=e;const r=Pr();this.emit("languageChanging",e);const s=d=>{this.language=d,this.languages=this.services.languageUtils.toResolveHierarchy(d),this.resolvedLanguage=void 0,this.setResolvedLanguage(d)},o=(d,h)=>{h?(s(h),this.translator.changeLanguage(h),this.isLanguageChangingTo=void 0,this.emit("languageChanged",h),this.logger.log("languageChanged",h)):this.isLanguageChangingTo=void 0,r.resolve(function(){return i.t(...arguments)}),n&&n(d,function(){return i.t(...arguments)})},l=d=>{!e&&!d&&this.services.languageDetector&&(d=[]);const h=typeof d=="string"?d:this.services.languageUtils.getBestMatchFromCodes(d);h&&(this.language||s(h),this.translator.language||this.translator.changeLanguage(h),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(h)),this.loadResources(h,m=>{o(m,h)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?l(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(e),r}getFixedT(e,n,i){var r=this;const s=function(o,l){let d;if(typeof l!="object"){for(var h=arguments.length,m=new Array(h>2?h-2:0),y=2;y<h;y++)m[y-2]=arguments[y];d=r.options.overloadTranslationOptionHandler([o,l].concat(m))}else d={...l};d.lng=d.lng||s.lng,d.lngs=d.lngs||s.lngs,d.ns=d.ns||s.ns,d.keyPrefix!==""&&(d.keyPrefix=d.keyPrefix||i||s.keyPrefix);const g=r.options.keySeparator||".";let O;return d.keyPrefix&&Array.isArray(o)?O=o.map(_=>`${d.keyPrefix}${g}${_}`):O=d.keyPrefix?`${d.keyPrefix}${g}${o}`:o,r.t(O,d)};return typeof e=="string"?s.lng=e:s.lngs=e,s.ns=n,s.keyPrefix=i,s}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=n.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const o=(l,d)=>{const h=this.services.backendConnector.state[`${l}|${d}`];return h===-1||h===0||h===2};if(n.precheck){const l=n.precheck(this,o);if(l!==void 0)return l}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(i,e)&&(!r||o(s,e)))}loadNamespaces(e,n){const i=Pr();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(r=>{this.options.ns.indexOf(r)<0&&this.options.ns.push(r)}),this.loadResources(r=>{i.resolve(),n&&n(r)}),i):(n&&n(),Promise.resolve())}loadLanguages(e,n){const i=Pr();typeof e=="string"&&(e=[e]);const r=this.options.preload||[],s=e.filter(o=>r.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return s.length?(this.options.preload=r.concat(s),this.loadResources(o=>{i.resolve(),n&&n(o)}),i):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],i=this.services&&this.services.languageUtils||new Xd(ef());return n.indexOf(i.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new rs(e,n)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ys;const i=e.forkResourceStore;i&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},s=new rs(r);return(e.debug!==void 0||e.prefix!==void 0)&&(s.logger=s.logger.clone(e)),["store","services","language"].forEach(l=>{s[l]=this[l]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},i&&(s.store=new Jd(this.store.data,r),s.services.resourceStore=s.store),s.translator=new Ca(s.services,r),s.translator.on("*",function(l){for(var d=arguments.length,h=new Array(d>1?d-1:0),m=1;m<d;m++)h[m-1]=arguments[m];s.emit(l,...h)}),s.init(r,n),s.translator.options=r,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Et=rs.createInstance();Et.createInstance=rs.createInstance;Et.createInstance;Et.dir;Et.init;Et.loadResources;Et.reloadResources;Et.use;Et.changeLanguage;Et.getFixedT;const nf=Et.t;Et.exists;Et.setDefaultNamespace;Et.hasLoadedNamespace;Et.loadNamespaces;Et.loadLanguages;const Qp=t=>nf(t?`errorCodes.${t}`:"errorCodes.DEFAULT");class Fw{constructor(e){me(this,"logger");me(this,"axiosInstance");this.logger=e.logger,this.axiosInstance=at.create({baseURL:e.baseUrl,headers:e.accessToken?{Authorization:`Bearer ${e.accessToken}`}:{}})}async get(e){try{return(await this.axiosInstance.get(e)).data}catch(n){throw this.handleError(n)}}async post(e,n){var s;const{data:i={},ignoreError:r=!1}=n;try{return(await this.axiosInstance.post(e,i)).data}catch(o){if(r&&at.isAxiosError(o))return(s=o.response)==null?void 0:s.data;throw this.handleError(o)}}async put(e,n){var s;const{data:i={},ignoreError:r=!1}=n;try{return(await this.axiosInstance.put(e,i)).data}catch(o){if(r&&at.isAxiosError(o))return(s=o.response)==null?void 0:s.data;throw this.handleError(o)}}async delete(e){try{return(await this.axiosInstance.delete(e)).data}catch(n){throw this.handleError(n)}}handleError(e){var r;let n=xt.GENERAL_ERROR;if(at.isAxiosError(e))if(e.response)switch(e.response.status){case 400:n=xt.BAD_REQUEST;break;case 401:n=xt.UNAUTHORIZED;break;case 403:n=xt.FORBIDDEN;break;case 404:n=xt.NOT_FOUND;break;case 409:n=xt.CONFLICT;break;case 410:n=xt.GONE;break;case 415:n=xt.UNSUPPORTED_MEDIA_TYPE;break;case 429:n=xt.TOO_MANY_REQUESTS;break;case 500:n=xt.INTERNAL_SERVER_ERROR;break;case 503:n=xt.SERVICE_UNAVAILABLE;break;default:n=xt.SERVER_ERROR}else e.request?n=xt.NETWORK_ERROR:n=xt.CONFIG_ERROR;const i=Qp(n);return this.logger.error("Error Code:",n,"Message:",i),this.logger.error("Result Data:",(r=e.response)==null?void 0:r.data),new Error(i)}}function Iw(t){return Symbol(t)}function Dw(t){return Symbol(t)}function Pw(t){return{key:t,isOptional:!0}}function Lw(t,e){return Object.entries(e).reduce((n,[i,r])=>(n[i]=t.token(r),n),{})}var Iu=new WeakMap,Zp=new Map,$w=new Map,_i;(function(t){t[t.Constant=0]="Constant",t[t.Instance=1]="Instance",t[t.Factory=2]="Factory"})(_i||(_i={}));var Tn;(function(t){t[t.Container=0]="Container",t[t.Resolution=1]="Resolution",t[t.Singleton=2]="Singleton",t[t.Transient=3]="Transient"})(Tn||(Tn={}));var Mw=class{constructor(t){this.impl=t,this.type=_i.Constant}},Bw=class{constructor(t){this.impl=t,this.type=_i.Factory}},Uw=t=>t.type===_i.Factory,ao=class{constructor(t){this.impl=t,this.type=_i.Instance}},jw=class extends ao{constructor(){super(...arguments),this.scope=Tn.Container,this.cache=new WeakMap}},Vw=class extends ao{constructor(){super(...arguments),this.scope=Tn.Resolution}},Hw=class extends ao{constructor(t){super(t),this.impl=t,this.scope=Tn.Singleton}},qw=class extends ao{constructor(){super(...arguments),this.scope=Tn.Transient}},zw=t=>t.type===_i.Instance,Kw=t=>t.scope===Tn.Container,Gw=t=>t.scope===Tn.Resolution,Ww=t=>t.scope===Tn.Singleton,em=t=>Symbol(t),Jw=t=>{const e=Symbol(t);return{__t:null,__d:t,__s:e,__o:!1,optional:{__t:null,__d:t,__s:e,__o:!0}}},jr=class{constructor(){this.parent=null,this.map=new Map}set(t,e,n=jr.notag){const i=this.map.get(e.__s);i?i.set(n,t):this.map.set(e.__s,new Map().set(n,t))}find(t,e,n){const i=this.map.get(t.__s);if(i!==void 0){if(n){const r=i.get(n);if(r)return r}if(e)for(let r=0,s=e.length;r<s;r+=1){const o=i.get(e[r]);if(o)return o}return i.get(jr.notag)}}resolve(t,e,n,i){const r=this.find(t,n,i);return r===void 0?this.parent?this.parent.resolve(t,e,n,i):null:r instanceof jr?(e.vaults.push(r),r.resolve(t,e,n,i)):r}get(t,e,n,i){const r=this.resolve(t,e,n,i);if(r)return r;for(let s=0,o=e.vaults,l=o.length;s<l;s+=1){const d=o[s].resolve(t,e,n,i);if(d)return d}return null}from(t){const e=new jr;return e.parent=this.parent,this.map.forEach((n,i)=>{e.map.set(i,t(n))}),e}clone(){return this.from(t=>new Map(t))}},tm=jr;tm.notag=em("NO_TAG");var Yw=class{constructor(t,e,n,i){this.vault=t,this.tokens=e,this.getVault=n,this.condition=i}from(t){const{tokens:e}=this;for(let n=0,i=e.length;n<i;n+=1)this.vault.set(this.getVault(t),e[n],this.condition)}},Xw=class{constructor(t,e,n,i){this.vault=t,this.impl=e,this.token=n,this.condition=i}inContainerScope(){this.set(jw)}inResolutionScope(){this.set(Vw)}inSingletonScope(){this.set(Hw)}inTransientScope(){this.set(qw)}set(t){this.vault.set(new t(this.impl),this.token,this.condition)}},Qw=class{constructor(t,e,n){this.vault=t,this.token=e,this.condition=n}toConstant(t){this.vault.set(new Mw(t),this.token,this.condition)}toFactory(t,e){this.vault.set(new Bw({creator:t,initializer:e}),this.token,this.condition)}toInstance(t){return new Xw(this.vault,t,this.token,this.condition)}},_l=class{constructor(t,e){this.vault=t,this.condition=e}static vault(t){return t.vault}bind(t){return new Qw(this.vault,t,this.condition)}use(...t){return new Yw(this.vault,t,_l.vault,this.condition)}},Zw=class extends _l{when(t){return new _l(this.vault,t)}},eS=class extends Zw{constructor(){super(new tm)}},nm=class{constructor(t=new Map,e=[]){this.instances=t,this.vaults=e}split(){return new nm(this.instances,this.vaults.slice())}},aa=class extends eS{constructor(){super(),this.snapshot=null}extend(t){return this.vault.parent=t===null?null:t.vault,this}clone(){const t=new aa;return t.vault=this.vault.clone(),t}get(t,e){return this.resolveToken(t,e)}resolveTokens(t,e,n,i){return t.map(r=>this.resolveToken(r,n,i,e.split()))}resolveToken(t,e,n,i=new nm){const r=this.vault.get(t,i,e,n);if(r)return this.resolveBinding(r,i);if(!t.__o)throw new Error(`No matching bindings found for '${t.__d}' token.`)}resolveBinding(t,e){return zw(t)?Ww(t)?this.resolveCache(t,e,()=>t.cache,n=>{t.cache=n}):Kw(t)?this.resolveCache(t,e,()=>t.cache.get(this.vault),n=>{t.cache.set(this.vault,n)}):Gw(t)?this.resolveCache(t,e,()=>e.instances.get(t),n=>{e.instances.set(t,n)}):this.createInstance(t.impl,e):Uw(t)?(...n)=>{const i=this.createInstance(t.impl.creator,e);return i instanceof Promise?i.then(r=>aa.resolveInitialization(r,n,t.impl.initializer)):aa.resolveInitialization(i,n,t.impl.initializer)}:t.impl}resolveCache(t,e,n,i){const r=n();if(r!==void 0)return r;const s=this.createInstance(t.impl,e);return i(s),s}createInstance(t,e){const n=this.getParameters(t,e),i=Iu.get(t);if(i!==void 0)return i?t(...n):new t(...n);try{const r=t(...n);return Iu.set(t,!0),r}catch{const s=new t(...n);return Iu.set(t,!1),s}}getParameters(t,e){const n=Zp.get(t);if(n)return this.resolveTokens(n,e,$w.get(t),t);if(t.length===0)return[];throw new Error(`Missing required 'injected' registration of '${t.name}'`)}static resolveInitialization(t,e,n){const i=n==null?void 0:n(t,...e);return i instanceof Promise?i.then(()=>t):t}},rf=(t,...e)=>(Zp.set(t,e),t);function Wl(t){return typeof t=="object"&&t!==null&&t.isOptional===!0}function im(t){return"useClass"in t}function rm(t){return"useValue"in t}function sm(t){return"useFactory"in t}var hi=(t=>(t.Singleton="singleton",t.Transient="transient",t.Container="container",t.Resolution="resolution",t))(hi||{});function qi(t,e){var n;return t.has(e)||t.set(e,Jw((n=e.description)!=null?n:"unknown_key")),t.get(e)}function Jl(t,e){var n;return t.has(e)||t.set(e,em((n=e.description)!=null?n:"unknown_tag")),t.get(e)}function am(t,e){return typeof e=="symbol"?Jl(t,e):e}function wl(t,e,n){return e.map(i=>{const r=Wl(i),s=r?i.key:i,o=t.get(s);if(!o)throw new Error(`DI Error: Dependency key "${String(s.description)}" required by "${String(n.description)}" not found.`);return r?o.optional:o})}function om(t,e){switch(e){case hi.Singleton:t.inSingletonScope();break;case hi.Container:t.inContainerScope();break;case hi.Resolution:t.inResolutionScope();break;case hi.Transient:default:t.inTransientScope();break}}class Yl{constructor(){me(this,"container");me(this,"keyToTokenMap",new Map);me(this,"tagToBrandiTagMap",new Map);this.container=new aa}static create(e){const n=new Yl;return n.initializeTokensAndTags(e),n.bindProviders(e),n}token(e){const n=this.keyToTokenMap.get(e);if(!n)throw new Error(`DI Error: Token for key "${String(e.description)}" not found.`);return n}initializeTokensAndTags(e){e.forEach(n=>{qi(this.keyToTokenMap,n.key),n.when&&typeof n.when=="symbol"&&Jl(this.tagToBrandiTagMap,n.when),"deps"in n&&n.deps&&n.deps.forEach(i=>{const r=Wl(i)?i.key:i;qi(this.keyToTokenMap,r)})})}bindProviders(e){e.forEach(n=>{const i=n.when?am(this.tagToBrandiTagMap,n.when):void 0,r=i?this.container.when(i):this.container;im(n)?this.bindClassProvider(r,n):rm(n)?this.bindValueProvider(r,n):sm(n)&&this.bindFactoryProvider(r,n)})}bindClassProvider(e,n){const{key:i,useClass:r,deps:s=[],scope:o=hi.Transient}=n,l=qi(this.keyToTokenMap,i),d=wl(this.keyToTokenMap,s,i);d.length>0&&rf(r,...d);const h=e.bind(l).toInstance(r);om(h,o)}bindValueProvider(e,n){const i=qi(this.keyToTokenMap,n.key);e.bind(i).toConstant(n.useValue)}bindFactoryProvider(e,n){var d;const{key:i,useFactory:r,deps:s=[],initializer:o}=n,l=qi(this.keyToTokenMap,i);if(typeof r=="function"&&((d=r.prototype)==null?void 0:d.constructor)===r&&s.length>0){const h=wl(this.keyToTokenMap,s,i);h.length>0&&rf(r,...h)}e.bind(l).toFactory(r,o)}}function um(t){const e=Object.values(t);return Object.assign({},...e)}function lm(t){return Object.entries(t).reduce((e,[n,i])=>{const r=um(i);return{...e,[n]:r}},{})}function cm(t,e){const n=lm(e);Object.entries(n).forEach(([i,r])=>{t.addResourceBundle(i,"translation",r,!0)})}const{slice:tS,forEach:nS}=[];function iS(t){return nS.call(tS.call(arguments,1),e=>{if(e)for(const n in e)t[n]===void 0&&(t[n]=e[n])}),t}const sf=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,rS=(t,e,n)=>{const i=n||{};i.path=i.path||"/";const r=encodeURIComponent(e);let s=`${t}=${r}`;if(i.maxAge>0){const o=i.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(o)}`}if(i.domain){if(!sf.test(i.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${i.domain}`}if(i.path){if(!sf.test(i.path))throw new TypeError("option path is invalid");s+=`; Path=${i.path}`}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+=`; Expires=${i.expires.toUTCString()}`}if(i.httpOnly&&(s+="; HttpOnly"),i.secure&&(s+="; Secure"),i.sameSite)switch(typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s},af={create(t,e,n,i){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(r.expires=new Date,r.expires.setTime(r.expires.getTime()+n*60*1e3)),i&&(r.domain=i),document.cookie=rS(t,encodeURIComponent(e),r)},read(t){const e=`${t}=`,n=document.cookie.split(";");for(let i=0;i<n.length;i++){let r=n[i];for(;r.charAt(0)===" ";)r=r.substring(1,r.length);if(r.indexOf(e)===0)return r.substring(e.length,r.length)}return null},remove(t){this.create(t,"",-1)}};var sS={name:"cookie",lookup(t){let{lookupCookie:e}=t;if(e&&typeof document!="undefined")return af.read(e)||void 0},cacheUserLanguage(t,e){let{lookupCookie:n,cookieMinutes:i,cookieDomain:r,cookieOptions:s}=e;n&&typeof document!="undefined"&&af.create(n,t,i,r,s)}},aS={name:"querystring",lookup(t){var i;let{lookupQuerystring:e}=t,n;if(typeof window!="undefined"){let{search:r}=window.location;!window.location.search&&((i=window.location.hash)==null?void 0:i.indexOf("?"))>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));const o=r.substring(1).split("&");for(let l=0;l<o.length;l++){const d=o[l].indexOf("=");d>0&&o[l].substring(0,d)===e&&(n=o[l].substring(d+1))}}return n}};let Lr=null;const of=()=>{if(Lr!==null)return Lr;try{Lr=window!=="undefined"&&window.localStorage!==null;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{Lr=!1}return Lr};var oS={name:"localStorage",lookup(t){let{lookupLocalStorage:e}=t;if(e&&of())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupLocalStorage:n}=e;n&&of()&&window.localStorage.setItem(n,t)}};let $r=null;const uf=()=>{if($r!==null)return $r;try{$r=window!=="undefined"&&window.sessionStorage!==null;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{$r=!1}return $r};var uS={name:"sessionStorage",lookup(t){let{lookupSessionStorage:e}=t;if(e&&uf())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupSessionStorage:n}=e;n&&uf()&&window.sessionStorage.setItem(n,t)}},lS={name:"navigator",lookup(t){const e=[];if(typeof navigator!="undefined"){const{languages:n,userLanguage:i,language:r}=navigator;if(n)for(let s=0;s<n.length;s++)e.push(n[s]);i&&e.push(i),r&&e.push(r)}return e.length>0?e:void 0}},cS={name:"htmlTag",lookup(t){let{htmlTag:e}=t,n;const i=e||(typeof document!="undefined"?document.documentElement:null);return i&&typeof i.getAttribute=="function"&&(n=i.getAttribute("lang")),n}},dS={name:"path",lookup(t){var r;let{lookupFromPathIndex:e}=t;if(typeof window=="undefined")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(r=n[typeof e=="number"?e:0])==null?void 0:r.replace("/",""):void 0}},fS={name:"subdomain",lookup(t){var r,s;let{lookupFromSubdomainIndex:e}=t;const n=typeof e=="number"?e+1:1,i=typeof window!="undefined"&&((s=(r=window.location)==null?void 0:r.hostname)==null?void 0:s.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(i)return i[n]}};function hS(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t}}class dm{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,n)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e||{languageUtils:{}},this.options=iS(n,this.options||{},hS()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=r=>r.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(sS),this.addDetector(aS),this.addDetector(oS),this.addDetector(uS),this.addDetector(lS),this.addDetector(cS),this.addDetector(dS),this.addDetector(fS)}addDetector(e){return this.detectors[e.name]=e,this}detect(e){e||(e=this.options.order);let n=[];return e.forEach(i=>{if(this.detectors[i]){let r=this.detectors[i].lookup(this.options);r&&typeof r=="string"&&(r=[r]),r&&(n=n.concat(r))}}),n=n.map(i=>this.options.convertDetectedLanguage(i)),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(e,n){n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||n.forEach(i=>{this.detectors[i]&&this.detectors[i].cacheUserLanguage(e,this.options)}))}}dm.type="languageDetector";function fm(t,e){t.use(e).use(dm).init({resources:{},fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1,format:(n,i,r)=>{if(i){const[s,...o]=i.split(",").map(l=>l.trim());if(s==="number")return new Intl.NumberFormat(r).format(n);if(s==="date")return new Intl.DateTimeFormat(r).format(n);if(s==="currency")return new Intl.NumberFormat(r,{style:"currency",currency:o[0]||"USD",currencyDisplay:"narrowSymbol"}).format(n).replace("$","").trim()}return n}},detection:{order:["navigator","cookie","localStorage","sessionStorage","querystring","htmlTag","path","subdomain"]}})}const pS=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,mS={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},gS=t=>mS[t],vS=t=>t.replace(pS,gS);let lf={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:vS};function yS(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};lf={...lf,...t}}const bS={type:"3rdParty",init(t){yS(t.options.react)}};fm(Et,bS);const kS=t=>cm(Et,t),cf={startTime:"UNKNOWN",viewerCount:0,status:"UNKNOWN"},_S=()=>{const[t,e]=je.useState([]),[n,i]=je.useState(cf);return{realTimeStreamInfo:n,productsInCart:t,onTextMetadataCue:o=>{const{action:l,data:d,startTime:h,viewerCount:m,status:y}=JSON.parse(o==null?void 0:o.text);switch(l){case"sendivsdatarealtime":{i({startTime:h,viewerCount:m,status:y});break}case"sendaddtocart":{const{id:g,sessionId:O,productId:_,productImageUrl:S,productName:E}=d;e(R=>[...R,{id:g,sessionId:O,productId:_,productImageUrl:S,productName:E}])}break}},resetRealTimeStreamInfo:()=>{i(cf)},setProductsInCart:e}},Xl=JSON,wS=t=>t.toUpperCase(),SS=t=>{const e={};return t.forEach((n,i)=>{e[i]=n}),e},ES=(t,e,n)=>t.document?t:{document:t,variables:e,requestHeaders:n,signal:void 0},NS=(t,e,n)=>t.query?t:{query:t,variables:e,requestHeaders:n,signal:void 0},AS=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0};function oa(t,e){if(!!!t)throw new Error(e)}function OS(t){return typeof t=="object"&&t!==null}function xS(t,e){if(!!!t)throw new Error("Unexpected invariant triggered.")}const TS=/\r\n|[\n\r]/g;function Sl(t,e){let n=0,i=1;for(const r of t.body.matchAll(TS)){if(typeof r.index=="number"||xS(!1),r.index>=e)break;n=r.index+r[0].length,i+=1}return{line:i,column:e+1-n}}function CS(t){return hm(t.source,Sl(t.source,t.start))}function hm(t,e){const n=t.locationOffset.column-1,i="".padStart(n)+t.body,r=e.line-1,s=t.locationOffset.line-1,o=e.line+s,l=e.line===1?n:0,d=e.column+l,h=`${t.name}:${o}:${d}
|
|
37
|
+
`,m=i.split(/\r\n|[\n\r]/g),y=m[r];if(y.length>120){const g=Math.floor(d/80),O=d%80,_=[];for(let S=0;S<y.length;S+=80)_.push(y.slice(S,S+80));return h+df([[`${o} |`,_[0]],..._.slice(1,g+1).map(S=>["|",S]),["|","^".padStart(O)],["|",_[g+1]]])}return h+df([[`${o-1} |`,m[r-1]],[`${o} |`,y],["|","^".padStart(d)],[`${o+1} |`,m[r+1]]])}function df(t){const e=t.filter(([i,r])=>r!==void 0),n=Math.max(...e.map(([i])=>i.length));return e.map(([i,r])=>i.padStart(n)+(r?" "+r:"")).join(`
|
|
38
|
+
`)}function RS(t){const e=t[0];return e==null||"kind"in e||"length"in e?{nodes:e,source:t[1],positions:t[2],path:t[3],originalError:t[4],extensions:t[5]}:e}class Ql extends Error{constructor(e,...n){var i,r,s;const{nodes:o,source:l,positions:d,path:h,originalError:m,extensions:y}=RS(n);super(e),this.name="GraphQLError",this.path=h!=null?h:void 0,this.originalError=m!=null?m:void 0,this.nodes=ff(Array.isArray(o)?o:o?[o]:void 0);const g=ff((i=this.nodes)===null||i===void 0?void 0:i.map(_=>_.loc).filter(_=>_!=null));this.source=l!=null?l:g==null||(r=g[0])===null||r===void 0?void 0:r.source,this.positions=d!=null?d:g==null?void 0:g.map(_=>_.start),this.locations=d&&l?d.map(_=>Sl(l,_)):g==null?void 0:g.map(_=>Sl(_.source,_.start));const O=OS(m==null?void 0:m.extensions)?m==null?void 0:m.extensions:void 0;this.extensions=(s=y!=null?y:O)!==null&&s!==void 0?s:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),m!=null&&m.stack?Object.defineProperty(this,"stack",{value:m.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,Ql):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const n of this.nodes)n.loc&&(e+=`
|
|
39
39
|
|
|
40
|
-
`+
|
|
40
|
+
`+CS(n.loc));else if(this.source&&this.locations)for(const n of this.locations)e+=`
|
|
41
41
|
|
|
42
|
-
`+
|
|
42
|
+
`+hm(this.source,n);return e}toJSON(){const e={message:this.message};return this.locations!=null&&(e.locations=this.locations),this.path!=null&&(e.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function ff(t){return t===void 0||t.length===0?void 0:t}function _t(t,e,n){return new Ql(`Syntax Error: ${n}`,{source:t,positions:[e]})}class FS{constructor(e,n,i){this.start=e.start,this.end=n.end,this.startToken=e,this.endToken=n,this.source=i}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class pm{constructor(e,n,i,r,s,o){this.kind=e,this.start=n,this.end=i,this.line=r,this.column=s,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const mm={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},IS=new Set(Object.keys(mm));function hf(t){const e=t==null?void 0:t.kind;return typeof e=="string"&&IS.has(e)}var Wi;(function(t){t.QUERY="query",t.MUTATION="mutation",t.SUBSCRIPTION="subscription"})(Wi||(Wi={}));var El;(function(t){t.QUERY="QUERY",t.MUTATION="MUTATION",t.SUBSCRIPTION="SUBSCRIPTION",t.FIELD="FIELD",t.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",t.FRAGMENT_SPREAD="FRAGMENT_SPREAD",t.INLINE_FRAGMENT="INLINE_FRAGMENT",t.VARIABLE_DEFINITION="VARIABLE_DEFINITION",t.SCHEMA="SCHEMA",t.SCALAR="SCALAR",t.OBJECT="OBJECT",t.FIELD_DEFINITION="FIELD_DEFINITION",t.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",t.INTERFACE="INTERFACE",t.UNION="UNION",t.ENUM="ENUM",t.ENUM_VALUE="ENUM_VALUE",t.INPUT_OBJECT="INPUT_OBJECT",t.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(El||(El={}));var xe;(function(t){t.NAME="Name",t.DOCUMENT="Document",t.OPERATION_DEFINITION="OperationDefinition",t.VARIABLE_DEFINITION="VariableDefinition",t.SELECTION_SET="SelectionSet",t.FIELD="Field",t.ARGUMENT="Argument",t.FRAGMENT_SPREAD="FragmentSpread",t.INLINE_FRAGMENT="InlineFragment",t.FRAGMENT_DEFINITION="FragmentDefinition",t.VARIABLE="Variable",t.INT="IntValue",t.FLOAT="FloatValue",t.STRING="StringValue",t.BOOLEAN="BooleanValue",t.NULL="NullValue",t.ENUM="EnumValue",t.LIST="ListValue",t.OBJECT="ObjectValue",t.OBJECT_FIELD="ObjectField",t.DIRECTIVE="Directive",t.NAMED_TYPE="NamedType",t.LIST_TYPE="ListType",t.NON_NULL_TYPE="NonNullType",t.SCHEMA_DEFINITION="SchemaDefinition",t.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",t.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",t.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",t.FIELD_DEFINITION="FieldDefinition",t.INPUT_VALUE_DEFINITION="InputValueDefinition",t.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",t.UNION_TYPE_DEFINITION="UnionTypeDefinition",t.ENUM_TYPE_DEFINITION="EnumTypeDefinition",t.ENUM_VALUE_DEFINITION="EnumValueDefinition",t.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",t.DIRECTIVE_DEFINITION="DirectiveDefinition",t.SCHEMA_EXTENSION="SchemaExtension",t.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",t.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",t.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",t.UNION_TYPE_EXTENSION="UnionTypeExtension",t.ENUM_TYPE_EXTENSION="EnumTypeExtension",t.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(xe||(xe={}));function Nl(t){return t===9||t===32}function ss(t){return t>=48&&t<=57}function gm(t){return t>=97&&t<=122||t>=65&&t<=90}function vm(t){return gm(t)||t===95}function DS(t){return gm(t)||ss(t)||t===95}function PS(t){var e;let n=Number.MAX_SAFE_INTEGER,i=null,r=-1;for(let o=0;o<t.length;++o){var s;const l=t[o],d=LS(l);d!==l.length&&(i=(s=i)!==null&&s!==void 0?s:o,r=o,o!==0&&d<n&&(n=d))}return t.map((o,l)=>l===0?o:o.slice(n)).slice((e=i)!==null&&e!==void 0?e:0,r+1)}function LS(t){let e=0;for(;e<t.length&&Nl(t.charCodeAt(e));)++e;return e}function $S(t,e){const n=t.replace(/"""/g,'\\"""'),i=n.split(/\r\n|[\n\r]/g),r=i.length===1,s=i.length>1&&i.slice(1).every(O=>O.length===0||Nl(O.charCodeAt(0))),o=n.endsWith('\\"""'),l=t.endsWith('"')&&!o,d=t.endsWith("\\"),h=l||d,m=!r||t.length>70||h||s||o;let y="";const g=r&&Nl(t.charCodeAt(0));return(m&&!g||s)&&(y+=`
|
|
43
43
|
`),y+=n,(m||h)&&(y+=`
|
|
44
|
-
`),'"""'+y+'"""'}var Y;(function(t){t.SOF="<SOF>",t.EOF="<EOF>",t.BANG="!",t.DOLLAR="$",t.AMP="&",t.PAREN_L="(",t.PAREN_R=")",t.SPREAD="...",t.COLON=":",t.EQUALS="=",t.AT="@",t.BRACKET_L="[",t.BRACKET_R="]",t.BRACE_L="{",t.PIPE="|",t.BRACE_R="}",t.NAME="Name",t.INT="Int",t.FLOAT="Float",t.STRING="String",t.BLOCK_STRING="BlockString",t.COMMENT="Comment"})(Y||(Y={}));class
|
|
45
|
-
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw _t(t.source,e,`Invalid character escape sequence: "${n.slice(e,e+2)}".`)}function
|
|
46
|
-
`));return t.line+=d.length-1,t.lineStart=r,m}if(h===92&&n.charCodeAt(
|
|
44
|
+
`),'"""'+y+'"""'}var Y;(function(t){t.SOF="<SOF>",t.EOF="<EOF>",t.BANG="!",t.DOLLAR="$",t.AMP="&",t.PAREN_L="(",t.PAREN_R=")",t.SPREAD="...",t.COLON=":",t.EQUALS="=",t.AT="@",t.BRACKET_L="[",t.BRACKET_R="]",t.BRACE_L="{",t.PIPE="|",t.BRACE_R="}",t.NAME="Name",t.INT="Int",t.FLOAT="Float",t.STRING="String",t.BLOCK_STRING="BlockString",t.COMMENT="Comment"})(Y||(Y={}));class MS{constructor(e){const n=new pm(Y.SOF,0,0,0,0);this.source=e,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==Y.EOF)do if(e.next)e=e.next;else{const n=US(this,e.end);e.next=n,n.prev=e,e=n}while(e.kind===Y.COMMENT);return e}}function BS(t){return t===Y.BANG||t===Y.DOLLAR||t===Y.AMP||t===Y.PAREN_L||t===Y.PAREN_R||t===Y.SPREAD||t===Y.COLON||t===Y.EQUALS||t===Y.AT||t===Y.BRACKET_L||t===Y.BRACKET_R||t===Y.BRACE_L||t===Y.PIPE||t===Y.BRACE_R}function hr(t){return t>=0&&t<=55295||t>=57344&&t<=1114111}function oo(t,e){return ym(t.charCodeAt(e))&&bm(t.charCodeAt(e+1))}function ym(t){return t>=55296&&t<=56319}function bm(t){return t>=56320&&t<=57343}function wi(t,e){const n=t.source.body.codePointAt(e);if(n===void 0)return Y.EOF;if(n>=32&&n<=126){const i=String.fromCodePoint(n);return i==='"'?`'"'`:`"${i}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function vt(t,e,n,i,r){const s=t.line,o=1+n-t.lineStart;return new pm(e,n,i,s,o,r)}function US(t,e){const n=t.source.body,i=n.length;let r=e;for(;r<i;){const s=n.charCodeAt(r);switch(s){case 65279:case 9:case 32:case 44:++r;continue;case 10:++r,++t.line,t.lineStart=r;continue;case 13:n.charCodeAt(r+1)===10?r+=2:++r,++t.line,t.lineStart=r;continue;case 35:return jS(t,r);case 33:return vt(t,Y.BANG,r,r+1);case 36:return vt(t,Y.DOLLAR,r,r+1);case 38:return vt(t,Y.AMP,r,r+1);case 40:return vt(t,Y.PAREN_L,r,r+1);case 41:return vt(t,Y.PAREN_R,r,r+1);case 46:if(n.charCodeAt(r+1)===46&&n.charCodeAt(r+2)===46)return vt(t,Y.SPREAD,r,r+3);break;case 58:return vt(t,Y.COLON,r,r+1);case 61:return vt(t,Y.EQUALS,r,r+1);case 64:return vt(t,Y.AT,r,r+1);case 91:return vt(t,Y.BRACKET_L,r,r+1);case 93:return vt(t,Y.BRACKET_R,r,r+1);case 123:return vt(t,Y.BRACE_L,r,r+1);case 124:return vt(t,Y.PIPE,r,r+1);case 125:return vt(t,Y.BRACE_R,r,r+1);case 34:return n.charCodeAt(r+1)===34&&n.charCodeAt(r+2)===34?GS(t,r):HS(t,r)}if(ss(s)||s===45)return VS(t,r,s);if(vm(s))return WS(t,r);throw _t(t.source,r,s===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:hr(s)||oo(n,r)?`Unexpected character: ${wi(t,r)}.`:`Invalid character: ${wi(t,r)}.`)}return vt(t,Y.EOF,i,i)}function jS(t,e){const n=t.source.body,i=n.length;let r=e+1;for(;r<i;){const s=n.charCodeAt(r);if(s===10||s===13)break;if(hr(s))++r;else if(oo(n,r))r+=2;else break}return vt(t,Y.COMMENT,e,r,n.slice(e+1,r))}function VS(t,e,n){const i=t.source.body;let r=e,s=n,o=!1;if(s===45&&(s=i.charCodeAt(++r)),s===48){if(s=i.charCodeAt(++r),ss(s))throw _t(t.source,r,`Invalid number, unexpected digit after 0: ${wi(t,r)}.`)}else r=Du(t,r,s),s=i.charCodeAt(r);if(s===46&&(o=!0,s=i.charCodeAt(++r),r=Du(t,r,s),s=i.charCodeAt(r)),(s===69||s===101)&&(o=!0,s=i.charCodeAt(++r),(s===43||s===45)&&(s=i.charCodeAt(++r)),r=Du(t,r,s),s=i.charCodeAt(r)),s===46||vm(s))throw _t(t.source,r,`Invalid number, expected digit but got: ${wi(t,r)}.`);return vt(t,o?Y.FLOAT:Y.INT,e,r,i.slice(e,r))}function Du(t,e,n){if(!ss(n))throw _t(t.source,e,`Invalid number, expected digit but got: ${wi(t,e)}.`);const i=t.source.body;let r=e+1;for(;ss(i.charCodeAt(r));)++r;return r}function HS(t,e){const n=t.source.body,i=n.length;let r=e+1,s=r,o="";for(;r<i;){const l=n.charCodeAt(r);if(l===34)return o+=n.slice(s,r),vt(t,Y.STRING,e,r+1,o);if(l===92){o+=n.slice(s,r);const d=n.charCodeAt(r+1)===117?n.charCodeAt(r+2)===123?qS(t,r):zS(t,r):KS(t,r);o+=d.value,r+=d.size,s=r;continue}if(l===10||l===13)break;if(hr(l))++r;else if(oo(n,r))r+=2;else throw _t(t.source,r,`Invalid character within String: ${wi(t,r)}.`)}throw _t(t.source,r,"Unterminated string.")}function qS(t,e){const n=t.source.body;let i=0,r=3;for(;r<12;){const s=n.charCodeAt(e+r++);if(s===125){if(r<5||!hr(i))break;return{value:String.fromCodePoint(i),size:r}}if(i=i<<4|Vr(s),i<0)break}throw _t(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+r)}".`)}function zS(t,e){const n=t.source.body,i=pf(n,e+2);if(hr(i))return{value:String.fromCodePoint(i),size:6};if(ym(i)&&n.charCodeAt(e+6)===92&&n.charCodeAt(e+7)===117){const r=pf(n,e+8);if(bm(r))return{value:String.fromCodePoint(i,r),size:12}}throw _t(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+6)}".`)}function pf(t,e){return Vr(t.charCodeAt(e))<<12|Vr(t.charCodeAt(e+1))<<8|Vr(t.charCodeAt(e+2))<<4|Vr(t.charCodeAt(e+3))}function Vr(t){return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:-1}function KS(t,e){const n=t.source.body;switch(n.charCodeAt(e+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
|
|
45
|
+
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw _t(t.source,e,`Invalid character escape sequence: "${n.slice(e,e+2)}".`)}function GS(t,e){const n=t.source.body,i=n.length;let r=t.lineStart,s=e+3,o=s,l="";const d=[];for(;s<i;){const h=n.charCodeAt(s);if(h===34&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34){l+=n.slice(o,s),d.push(l);const m=vt(t,Y.BLOCK_STRING,e,s+3,PS(d).join(`
|
|
46
|
+
`));return t.line+=d.length-1,t.lineStart=r,m}if(h===92&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34&&n.charCodeAt(s+3)===34){l+=n.slice(o,s),o=s+1,s+=4;continue}if(h===10||h===13){l+=n.slice(o,s),d.push(l),h===13&&n.charCodeAt(s+1)===10?s+=2:++s,l="",o=s,r=s;continue}if(hr(h))++s;else if(oo(n,s))s+=2;else throw _t(t.source,s,`Invalid character within String: ${wi(t,s)}.`)}throw _t(t.source,s,"Unterminated string.")}function WS(t,e){const n=t.source.body,i=n.length;let r=e+1;for(;r<i;){const s=n.charCodeAt(r);if(DS(s))++r;else break}return vt(t,Y.NAME,e,r,n.slice(e,r))}const JS=10,km=2;function Zl(t){return uo(t,[])}function uo(t,e){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return YS(t,e);default:return String(t)}}function YS(t,e){if(t===null)return"null";if(e.includes(t))return"[Circular]";const n=[...e,t];if(XS(t)){const i=t.toJSON();if(i!==t)return typeof i=="string"?i:uo(i,n)}else if(Array.isArray(t))return ZS(t,n);return QS(t,n)}function XS(t){return typeof t.toJSON=="function"}function QS(t,e){const n=Object.entries(t);return n.length===0?"{}":e.length>km?"["+eE(t)+"]":"{ "+n.map(([r,s])=>r+": "+uo(s,e)).join(", ")+" }"}function ZS(t,e){if(t.length===0)return"[]";if(e.length>km)return"[Array]";const n=Math.min(JS,t.length),i=t.length-n,r=[];for(let s=0;s<n;++s)r.push(uo(t[s],e));return i===1?r.push("... 1 more item"):i>1&&r.push(`... ${i} more items`),"["+r.join(", ")+"]"}function eE(t){const e=Object.prototype.toString.call(t).replace(/^\[object /,"").replace(/]$/,"");if(e==="Object"&&typeof t.constructor=="function"){const n=t.constructor.name;if(typeof n=="string"&&n!=="")return n}return e}const tE=globalThis.process&&!0,nE=tE?function(e,n){return e instanceof n}:function(e,n){if(e instanceof n)return!0;if(typeof e=="object"&&e!==null){var i;const r=n.prototype[Symbol.toStringTag],s=Symbol.toStringTag in e?e[Symbol.toStringTag]:(i=e.constructor)===null||i===void 0?void 0:i.name;if(r===s){const o=Zl(e);throw new Error(`Cannot use ${r} "${o}" from another module or realm.
|
|
47
47
|
|
|
48
48
|
Ensure that there is only one instance of "graphql" in the node_modules
|
|
49
49
|
directory. If different versions of "graphql" are the dependencies of other
|
|
@@ -54,17 +54,17 @@ https://yarnpkg.com/en/docs/selective-version-resolutions
|
|
|
54
54
|
Duplicate "graphql" modules cannot be used at the same time since different
|
|
55
55
|
versions may have different capabilities and behavior. The data from one
|
|
56
56
|
version used in the function from another could produce confusing and
|
|
57
|
-
spurious results.`)}}return!1};class Qp{constructor(e,n="GraphQL request",i={line:1,column:1}){typeof e=="string"||ts(!1,`Body must be a string. Received: ${Ul(e)}.`),this.body=e,this.name=n,this.locationOffset=i,this.locationOffset.line>0||ts(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||ts(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function fS(t){return dS(t,Qp)}function hS(t,e){return new pS(t,e).parseDocument()}class pS{constructor(e,n={}){const i=fS(e)?e:new Qp(e);this._lexer=new Gw(i),this._options=n,this._tokenCounter=0}parseName(){const e=this.expectToken(Y.NAME);return this.node(e,{kind:xe.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:xe.DOCUMENT,definitions:this.many(Y.SOF,this.parseDefinition,Y.EOF)})}parseDefinition(){if(this.peek(Y.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),n=e?this._lexer.lookahead():this._lexer.token;if(n.kind===Y.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw _t(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(Y.BRACE_L))return this.node(e,{kind:xe.OPERATION_DEFINITION,operation:qi.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const n=this.parseOperationType();let i;return this.peek(Y.NAME)&&(i=this.parseName()),this.node(e,{kind:xe.OPERATION_DEFINITION,operation:n,name:i,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(Y.NAME);switch(e.value){case"query":return qi.QUERY;case"mutation":return qi.MUTATION;case"subscription":return qi.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(Y.PAREN_L,this.parseVariableDefinition,Y.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:xe.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Y.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Y.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(Y.DOLLAR),this.node(e,{kind:xe.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:xe.SELECTION_SET,selections:this.many(Y.BRACE_L,this.parseSelection,Y.BRACE_R)})}parseSelection(){return this.peek(Y.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,n=this.parseName();let i,r;return this.expectOptionalToken(Y.COLON)?(i=n,r=this.parseName()):r=n,this.node(e,{kind:xe.FIELD,alias:i,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Y.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const n=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(Y.PAREN_L,n,Y.PAREN_R)}parseArgument(e=!1){const n=this._lexer.token,i=this.parseName();return this.expectToken(Y.COLON),this.node(n,{kind:xe.ARGUMENT,name:i,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(Y.SPREAD);const n=this.expectOptionalKeyword("on");return!n&&this.peek(Y.NAME)?this.node(e,{kind:xe.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:xe.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(e,{kind:xe.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:xe.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(e){const n=this._lexer.token;switch(n.kind){case Y.BRACKET_L:return this.parseList(e);case Y.BRACE_L:return this.parseObject(e);case Y.INT:return this.advanceLexer(),this.node(n,{kind:xe.INT,value:n.value});case Y.FLOAT:return this.advanceLexer(),this.node(n,{kind:xe.FLOAT,value:n.value});case Y.STRING:case Y.BLOCK_STRING:return this.parseStringLiteral();case Y.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:xe.BOOLEAN,value:!0});case"false":return this.node(n,{kind:xe.BOOLEAN,value:!1});case"null":return this.node(n,{kind:xe.NULL});default:return this.node(n,{kind:xe.ENUM,value:n.value})}case Y.DOLLAR:if(e)if(this.expectToken(Y.DOLLAR),this._lexer.token.kind===Y.NAME){const i=this._lexer.token.value;throw _t(this._lexer.source,n.start,`Unexpected variable "$${i}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:xe.STRING,value:e.value,block:e.kind===Y.BLOCK_STRING})}parseList(e){const n=()=>this.parseValueLiteral(e);return this.node(this._lexer.token,{kind:xe.LIST,values:this.any(Y.BRACKET_L,n,Y.BRACKET_R)})}parseObject(e){const n=()=>this.parseObjectField(e);return this.node(this._lexer.token,{kind:xe.OBJECT,fields:this.any(Y.BRACE_L,n,Y.BRACE_R)})}parseObjectField(e){const n=this._lexer.token,i=this.parseName();return this.expectToken(Y.COLON),this.node(n,{kind:xe.OBJECT_FIELD,name:i,value:this.parseValueLiteral(e)})}parseDirectives(e){const n=[];for(;this.peek(Y.AT);)n.push(this.parseDirective(e));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const n=this._lexer.token;return this.expectToken(Y.AT),this.node(n,{kind:xe.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let n;if(this.expectOptionalToken(Y.BRACKET_L)){const i=this.parseTypeReference();this.expectToken(Y.BRACKET_R),n=this.node(e,{kind:xe.LIST_TYPE,type:i})}else n=this.parseNamedType();return this.expectOptionalToken(Y.BANG)?this.node(e,{kind:xe.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:xe.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(Y.STRING)||this.peek(Y.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");const i=this.parseConstDirectives(),r=this.many(Y.BRACE_L,this.parseOperationTypeDefinition,Y.BRACE_R);return this.node(e,{kind:xe.SCHEMA_DEFINITION,description:n,directives:i,operationTypes:r})}parseOperationTypeDefinition(){const e=this._lexer.token,n=this.parseOperationType();this.expectToken(Y.COLON);const i=this.parseNamedType();return this.node(e,{kind:xe.OPERATION_TYPE_DEFINITION,operation:n,type:i})}parseScalarTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");const i=this.parseName(),r=this.parseConstDirectives();return this.node(e,{kind:xe.SCALAR_TYPE_DEFINITION,description:n,name:i,directives:r})}parseObjectTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");const i=this.parseName(),r=this.parseImplementsInterfaces(),a=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:xe.OBJECT_TYPE_DEFINITION,description:n,name:i,interfaces:r,directives:a,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(Y.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(Y.BRACE_L,this.parseFieldDefinition,Y.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,n=this.parseDescription(),i=this.parseName(),r=this.parseArgumentDefs();this.expectToken(Y.COLON);const a=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(e,{kind:xe.FIELD_DEFINITION,description:n,name:i,arguments:r,type:a,directives:o})}parseArgumentDefs(){return this.optionalMany(Y.PAREN_L,this.parseInputValueDef,Y.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,n=this.parseDescription(),i=this.parseName();this.expectToken(Y.COLON);const r=this.parseTypeReference();let a;this.expectOptionalToken(Y.EQUALS)&&(a=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(e,{kind:xe.INPUT_VALUE_DEFINITION,description:n,name:i,type:r,defaultValue:a,directives:o})}parseInterfaceTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");const i=this.parseName(),r=this.parseImplementsInterfaces(),a=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:xe.INTERFACE_TYPE_DEFINITION,description:n,name:i,interfaces:r,directives:a,fields:o})}parseUnionTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");const i=this.parseName(),r=this.parseConstDirectives(),a=this.parseUnionMemberTypes();return this.node(e,{kind:xe.UNION_TYPE_DEFINITION,description:n,name:i,directives:r,types:a})}parseUnionMemberTypes(){return this.expectOptionalToken(Y.EQUALS)?this.delimitedMany(Y.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");const i=this.parseName(),r=this.parseConstDirectives(),a=this.parseEnumValuesDefinition();return this.node(e,{kind:xe.ENUM_TYPE_DEFINITION,description:n,name:i,directives:r,values:a})}parseEnumValuesDefinition(){return this.optionalMany(Y.BRACE_L,this.parseEnumValueDefinition,Y.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,n=this.parseDescription(),i=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(e,{kind:xe.ENUM_VALUE_DEFINITION,description:n,name:i,directives:r})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw _t(this._lexer.source,this._lexer.token.start,`${za(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");const i=this.parseName(),r=this.parseConstDirectives(),a=this.parseInputFieldsDefinition();return this.node(e,{kind:xe.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:i,directives:r,fields:a})}parseInputFieldsDefinition(){return this.optionalMany(Y.BRACE_L,this.parseInputValueDef,Y.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===Y.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const n=this.parseConstDirectives(),i=this.optionalMany(Y.BRACE_L,this.parseOperationTypeDefinition,Y.BRACE_R);if(n.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:xe.SCHEMA_EXTENSION,directives:n,operationTypes:i})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const n=this.parseName(),i=this.parseConstDirectives();if(i.length===0)throw this.unexpected();return this.node(e,{kind:xe.SCALAR_TYPE_EXTENSION,name:n,directives:i})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const n=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),a=this.parseFieldsDefinition();if(i.length===0&&r.length===0&&a.length===0)throw this.unexpected();return this.node(e,{kind:xe.OBJECT_TYPE_EXTENSION,name:n,interfaces:i,directives:r,fields:a})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const n=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),a=this.parseFieldsDefinition();if(i.length===0&&r.length===0&&a.length===0)throw this.unexpected();return this.node(e,{kind:xe.INTERFACE_TYPE_EXTENSION,name:n,interfaces:i,directives:r,fields:a})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:xe.UNION_TYPE_EXTENSION,name:n,directives:i,types:r})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:xe.ENUM_TYPE_EXTENSION,name:n,directives:i,values:r})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:xe.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:i,fields:r})}parseDirectiveDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(Y.AT);const i=this.parseName(),r=this.parseArgumentDefs(),a=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(e,{kind:xe.DIRECTIVE_DEFINITION,description:n,name:i,arguments:r,repeatable:a,locations:o})}parseDirectiveLocations(){return this.delimitedMany(Y.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(pl,n.value))return n;throw this.unexpected(e)}node(e,n){return this._options.noLocation!==!0&&(n.loc=new jw(e,this._lexer.lastToken,this._lexer.source)),n}peek(e){return this._lexer.token.kind===e}expectToken(e){const n=this._lexer.token;if(n.kind===e)return this.advanceLexer(),n;throw _t(this._lexer.source,n.start,`Expected ${Zp(e)}, found ${za(n)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e?(this.advanceLexer(),!0):!1}expectKeyword(e){const n=this._lexer.token;if(n.kind===Y.NAME&&n.value===e)this.advanceLexer();else throw _t(this._lexer.source,n.start,`Expected "${e}", found ${za(n)}.`)}expectOptionalKeyword(e){const n=this._lexer.token;return n.kind===Y.NAME&&n.value===e?(this.advanceLexer(),!0):!1}unexpected(e){const n=e!=null?e:this._lexer.token;return _t(this._lexer.source,n.start,`Unexpected ${za(n)}.`)}any(e,n,i){this.expectToken(e);const r=[];for(;!this.expectOptionalToken(i);)r.push(n.call(this));return r}optionalMany(e,n,i){if(this.expectOptionalToken(e)){const r=[];do r.push(n.call(this));while(!this.expectOptionalToken(i));return r}return[]}many(e,n,i){this.expectToken(e);const r=[];do r.push(n.call(this));while(!this.expectOptionalToken(i));return r}delimitedMany(e,n){this.expectOptionalToken(e);const i=[];do i.push(n.call(this));while(this.expectOptionalToken(e));return i}advanceLexer(){const{maxTokens:e}=this._options,n=this._lexer.advance();if(e!==void 0&&n.kind!==Y.EOF&&(++this._tokenCounter,this._tokenCounter>e))throw _t(this._lexer.source,n.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}function za(t){const e=t.value;return Zp(t.kind)+(e!=null?` "${e}"`:"")}function Zp(t){return Ww(t)?`"${t}"`:t}function mS(t){return`"${t.replace(gS,vS)}"`}const gS=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function vS(t){return yS[t.charCodeAt(0)]}const yS=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],bS=Object.freeze({});function kS(t,e,n=zp){const i=new Map;for(const R of Object.values(xe))i.set(R,_S(e,R));let r,a=Array.isArray(t),o=[t],l=-1,d=[],h=t,m,y;const g=[],O=[];do{l++;const R=l===o.length,j=R&&d.length!==0;if(R){if(m=O.length===0?void 0:g[g.length-1],h=y,y=O.pop(),j)if(a){h=h.slice();let K=0;for(const[X,ne]of d){const oe=X-K;ne===null?(h.splice(oe,1),K++):h[oe]=ne}}else{h=Object.defineProperties({},Object.getOwnPropertyDescriptors(h));for(const[K,X]of d)h[K]=X}l=r.index,o=r.keys,d=r.edits,a=r.inArray,r=r.prev}else if(y){if(m=a?l:o[l],h=y[m],h==null)continue;g.push(m)}let J;if(!Array.isArray(h)){var _,S;Qd(h)||ts(!1,`Invalid AST Node: ${Ul(h)}.`);const K=R?(_=i.get(h.kind))===null||_===void 0?void 0:_.leave:(S=i.get(h.kind))===null||S===void 0?void 0:S.enter;if(J=K==null?void 0:K.call(e,h,m,y,g,O),J===bS)break;if(J===!1){if(!R){g.pop();continue}}else if(J!==void 0&&(d.push([m,J]),!R))if(Qd(J))h=J;else{g.pop();continue}}if(J===void 0&&j&&d.push([m,h]),R)g.pop();else{var E;r={inArray:a,index:l,keys:o,edits:d,prev:r},a=Array.isArray(h),o=a?h:(E=n[h.kind])!==null&&E!==void 0?E:[],l=-1,d=[],y&&O.push(y),y=h}}while(r!==void 0);return d.length!==0?d[d.length-1][1]:t}function _S(t,e){const n=t[e];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:t.enter,leave:t.leave}}function wS(t){return kS(t,ES)}const SS=80,ES={Name:{leave:t=>t.value},Variable:{leave:t=>"$"+t.name},Document:{leave:t=>we(t.definitions,`
|
|
57
|
+
spurious results.`)}}return!1};class _m{constructor(e,n="GraphQL request",i={line:1,column:1}){typeof e=="string"||oa(!1,`Body must be a string. Received: ${Zl(e)}.`),this.body=e,this.name=n,this.locationOffset=i,this.locationOffset.line>0||oa(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||oa(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function iE(t){return nE(t,_m)}function rE(t,e){return new sE(t,e).parseDocument()}class sE{constructor(e,n={}){const i=iE(e)?e:new _m(e);this._lexer=new MS(i),this._options=n,this._tokenCounter=0}parseName(){const e=this.expectToken(Y.NAME);return this.node(e,{kind:xe.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:xe.DOCUMENT,definitions:this.many(Y.SOF,this.parseDefinition,Y.EOF)})}parseDefinition(){if(this.peek(Y.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),n=e?this._lexer.lookahead():this._lexer.token;if(n.kind===Y.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw _t(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(Y.BRACE_L))return this.node(e,{kind:xe.OPERATION_DEFINITION,operation:Wi.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const n=this.parseOperationType();let i;return this.peek(Y.NAME)&&(i=this.parseName()),this.node(e,{kind:xe.OPERATION_DEFINITION,operation:n,name:i,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(Y.NAME);switch(e.value){case"query":return Wi.QUERY;case"mutation":return Wi.MUTATION;case"subscription":return Wi.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(Y.PAREN_L,this.parseVariableDefinition,Y.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:xe.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Y.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Y.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(Y.DOLLAR),this.node(e,{kind:xe.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:xe.SELECTION_SET,selections:this.many(Y.BRACE_L,this.parseSelection,Y.BRACE_R)})}parseSelection(){return this.peek(Y.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,n=this.parseName();let i,r;return this.expectOptionalToken(Y.COLON)?(i=n,r=this.parseName()):r=n,this.node(e,{kind:xe.FIELD,alias:i,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Y.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const n=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(Y.PAREN_L,n,Y.PAREN_R)}parseArgument(e=!1){const n=this._lexer.token,i=this.parseName();return this.expectToken(Y.COLON),this.node(n,{kind:xe.ARGUMENT,name:i,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(Y.SPREAD);const n=this.expectOptionalKeyword("on");return!n&&this.peek(Y.NAME)?this.node(e,{kind:xe.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:xe.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(e,{kind:xe.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:xe.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(e){const n=this._lexer.token;switch(n.kind){case Y.BRACKET_L:return this.parseList(e);case Y.BRACE_L:return this.parseObject(e);case Y.INT:return this.advanceLexer(),this.node(n,{kind:xe.INT,value:n.value});case Y.FLOAT:return this.advanceLexer(),this.node(n,{kind:xe.FLOAT,value:n.value});case Y.STRING:case Y.BLOCK_STRING:return this.parseStringLiteral();case Y.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:xe.BOOLEAN,value:!0});case"false":return this.node(n,{kind:xe.BOOLEAN,value:!1});case"null":return this.node(n,{kind:xe.NULL});default:return this.node(n,{kind:xe.ENUM,value:n.value})}case Y.DOLLAR:if(e)if(this.expectToken(Y.DOLLAR),this._lexer.token.kind===Y.NAME){const i=this._lexer.token.value;throw _t(this._lexer.source,n.start,`Unexpected variable "$${i}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:xe.STRING,value:e.value,block:e.kind===Y.BLOCK_STRING})}parseList(e){const n=()=>this.parseValueLiteral(e);return this.node(this._lexer.token,{kind:xe.LIST,values:this.any(Y.BRACKET_L,n,Y.BRACKET_R)})}parseObject(e){const n=()=>this.parseObjectField(e);return this.node(this._lexer.token,{kind:xe.OBJECT,fields:this.any(Y.BRACE_L,n,Y.BRACE_R)})}parseObjectField(e){const n=this._lexer.token,i=this.parseName();return this.expectToken(Y.COLON),this.node(n,{kind:xe.OBJECT_FIELD,name:i,value:this.parseValueLiteral(e)})}parseDirectives(e){const n=[];for(;this.peek(Y.AT);)n.push(this.parseDirective(e));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const n=this._lexer.token;return this.expectToken(Y.AT),this.node(n,{kind:xe.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let n;if(this.expectOptionalToken(Y.BRACKET_L)){const i=this.parseTypeReference();this.expectToken(Y.BRACKET_R),n=this.node(e,{kind:xe.LIST_TYPE,type:i})}else n=this.parseNamedType();return this.expectOptionalToken(Y.BANG)?this.node(e,{kind:xe.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:xe.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(Y.STRING)||this.peek(Y.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");const i=this.parseConstDirectives(),r=this.many(Y.BRACE_L,this.parseOperationTypeDefinition,Y.BRACE_R);return this.node(e,{kind:xe.SCHEMA_DEFINITION,description:n,directives:i,operationTypes:r})}parseOperationTypeDefinition(){const e=this._lexer.token,n=this.parseOperationType();this.expectToken(Y.COLON);const i=this.parseNamedType();return this.node(e,{kind:xe.OPERATION_TYPE_DEFINITION,operation:n,type:i})}parseScalarTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");const i=this.parseName(),r=this.parseConstDirectives();return this.node(e,{kind:xe.SCALAR_TYPE_DEFINITION,description:n,name:i,directives:r})}parseObjectTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");const i=this.parseName(),r=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:xe.OBJECT_TYPE_DEFINITION,description:n,name:i,interfaces:r,directives:s,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(Y.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(Y.BRACE_L,this.parseFieldDefinition,Y.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,n=this.parseDescription(),i=this.parseName(),r=this.parseArgumentDefs();this.expectToken(Y.COLON);const s=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(e,{kind:xe.FIELD_DEFINITION,description:n,name:i,arguments:r,type:s,directives:o})}parseArgumentDefs(){return this.optionalMany(Y.PAREN_L,this.parseInputValueDef,Y.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,n=this.parseDescription(),i=this.parseName();this.expectToken(Y.COLON);const r=this.parseTypeReference();let s;this.expectOptionalToken(Y.EQUALS)&&(s=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(e,{kind:xe.INPUT_VALUE_DEFINITION,description:n,name:i,type:r,defaultValue:s,directives:o})}parseInterfaceTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");const i=this.parseName(),r=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:xe.INTERFACE_TYPE_DEFINITION,description:n,name:i,interfaces:r,directives:s,fields:o})}parseUnionTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");const i=this.parseName(),r=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(e,{kind:xe.UNION_TYPE_DEFINITION,description:n,name:i,directives:r,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(Y.EQUALS)?this.delimitedMany(Y.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");const i=this.parseName(),r=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(e,{kind:xe.ENUM_TYPE_DEFINITION,description:n,name:i,directives:r,values:s})}parseEnumValuesDefinition(){return this.optionalMany(Y.BRACE_L,this.parseEnumValueDefinition,Y.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,n=this.parseDescription(),i=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(e,{kind:xe.ENUM_VALUE_DEFINITION,description:n,name:i,directives:r})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw _t(this._lexer.source,this._lexer.token.start,`${Xs(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");const i=this.parseName(),r=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(e,{kind:xe.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:i,directives:r,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(Y.BRACE_L,this.parseInputValueDef,Y.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===Y.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const n=this.parseConstDirectives(),i=this.optionalMany(Y.BRACE_L,this.parseOperationTypeDefinition,Y.BRACE_R);if(n.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:xe.SCHEMA_EXTENSION,directives:n,operationTypes:i})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const n=this.parseName(),i=this.parseConstDirectives();if(i.length===0)throw this.unexpected();return this.node(e,{kind:xe.SCALAR_TYPE_EXTENSION,name:n,directives:i})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const n=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(i.length===0&&r.length===0&&s.length===0)throw this.unexpected();return this.node(e,{kind:xe.OBJECT_TYPE_EXTENSION,name:n,interfaces:i,directives:r,fields:s})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const n=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(i.length===0&&r.length===0&&s.length===0)throw this.unexpected();return this.node(e,{kind:xe.INTERFACE_TYPE_EXTENSION,name:n,interfaces:i,directives:r,fields:s})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:xe.UNION_TYPE_EXTENSION,name:n,directives:i,types:r})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:xe.ENUM_TYPE_EXTENSION,name:n,directives:i,values:r})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:xe.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:i,fields:r})}parseDirectiveDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(Y.AT);const i=this.parseName(),r=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(e,{kind:xe.DIRECTIVE_DEFINITION,description:n,name:i,arguments:r,repeatable:s,locations:o})}parseDirectiveLocations(){return this.delimitedMany(Y.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(El,n.value))return n;throw this.unexpected(e)}node(e,n){return this._options.noLocation!==!0&&(n.loc=new FS(e,this._lexer.lastToken,this._lexer.source)),n}peek(e){return this._lexer.token.kind===e}expectToken(e){const n=this._lexer.token;if(n.kind===e)return this.advanceLexer(),n;throw _t(this._lexer.source,n.start,`Expected ${wm(e)}, found ${Xs(n)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e?(this.advanceLexer(),!0):!1}expectKeyword(e){const n=this._lexer.token;if(n.kind===Y.NAME&&n.value===e)this.advanceLexer();else throw _t(this._lexer.source,n.start,`Expected "${e}", found ${Xs(n)}.`)}expectOptionalKeyword(e){const n=this._lexer.token;return n.kind===Y.NAME&&n.value===e?(this.advanceLexer(),!0):!1}unexpected(e){const n=e!=null?e:this._lexer.token;return _t(this._lexer.source,n.start,`Unexpected ${Xs(n)}.`)}any(e,n,i){this.expectToken(e);const r=[];for(;!this.expectOptionalToken(i);)r.push(n.call(this));return r}optionalMany(e,n,i){if(this.expectOptionalToken(e)){const r=[];do r.push(n.call(this));while(!this.expectOptionalToken(i));return r}return[]}many(e,n,i){this.expectToken(e);const r=[];do r.push(n.call(this));while(!this.expectOptionalToken(i));return r}delimitedMany(e,n){this.expectOptionalToken(e);const i=[];do i.push(n.call(this));while(this.expectOptionalToken(e));return i}advanceLexer(){const{maxTokens:e}=this._options,n=this._lexer.advance();if(e!==void 0&&n.kind!==Y.EOF&&(++this._tokenCounter,this._tokenCounter>e))throw _t(this._lexer.source,n.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}function Xs(t){const e=t.value;return wm(t.kind)+(e!=null?` "${e}"`:"")}function wm(t){return BS(t)?`"${t}"`:t}function aE(t){return`"${t.replace(oE,uE)}"`}const oE=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function uE(t){return lE[t.charCodeAt(0)]}const lE=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],cE=Object.freeze({});function dE(t,e,n=mm){const i=new Map;for(const R of Object.values(xe))i.set(R,fE(e,R));let r,s=Array.isArray(t),o=[t],l=-1,d=[],h=t,m,y;const g=[],O=[];do{l++;const R=l===o.length,j=R&&d.length!==0;if(R){if(m=O.length===0?void 0:g[g.length-1],h=y,y=O.pop(),j)if(s){h=h.slice();let z=0;for(const[X,ne]of d){const oe=X-z;ne===null?(h.splice(oe,1),z++):h[oe]=ne}}else{h=Object.defineProperties({},Object.getOwnPropertyDescriptors(h));for(const[z,X]of d)h[z]=X}l=r.index,o=r.keys,d=r.edits,s=r.inArray,r=r.prev}else if(y){if(m=s?l:o[l],h=y[m],h==null)continue;g.push(m)}let J;if(!Array.isArray(h)){var _,S;hf(h)||oa(!1,`Invalid AST Node: ${Zl(h)}.`);const z=R?(_=i.get(h.kind))===null||_===void 0?void 0:_.leave:(S=i.get(h.kind))===null||S===void 0?void 0:S.enter;if(J=z==null?void 0:z.call(e,h,m,y,g,O),J===cE)break;if(J===!1){if(!R){g.pop();continue}}else if(J!==void 0&&(d.push([m,J]),!R))if(hf(J))h=J;else{g.pop();continue}}if(J===void 0&&j&&d.push([m,h]),R)g.pop();else{var E;r={inArray:s,index:l,keys:o,edits:d,prev:r},s=Array.isArray(h),o=s?h:(E=n[h.kind])!==null&&E!==void 0?E:[],l=-1,d=[],y&&O.push(y),y=h}}while(r!==void 0);return d.length!==0?d[d.length-1][1]:t}function fE(t,e){const n=t[e];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:t.enter,leave:t.leave}}function hE(t){return dE(t,mE)}const pE=80,mE={Name:{leave:t=>t.value},Variable:{leave:t=>"$"+t.name},Document:{leave:t=>we(t.definitions,`
|
|
58
58
|
|
|
59
|
-
`)},OperationDefinition:{leave(t){const e=He("(",we(t.variableDefinitions,", "),")"),n=we([t.operation,we([t.name,e]),we(t.directives," ")]," ");return(n==="query"?"":n+" ")+t.selectionSet}},VariableDefinition:{leave:({variable:t,type:e,defaultValue:n,directives:i})=>t+": "+e+He(" = ",n)+He(" ",we(i," "))},SelectionSet:{leave:({selections:t})=>Qt(t)},Field:{leave({alias:t,name:e,arguments:n,directives:i,selectionSet:r}){const
|
|
60
|
-
`,
|
|
59
|
+
`)},OperationDefinition:{leave(t){const e=He("(",we(t.variableDefinitions,", "),")"),n=we([t.operation,we([t.name,e]),we(t.directives," ")]," ");return(n==="query"?"":n+" ")+t.selectionSet}},VariableDefinition:{leave:({variable:t,type:e,defaultValue:n,directives:i})=>t+": "+e+He(" = ",n)+He(" ",we(i," "))},SelectionSet:{leave:({selections:t})=>Qt(t)},Field:{leave({alias:t,name:e,arguments:n,directives:i,selectionSet:r}){const s=He("",t,": ")+e;let o=s+He("(",we(n,", "),")");return o.length>pE&&(o=s+He(`(
|
|
60
|
+
`,ua(we(n,`
|
|
61
61
|
`)),`
|
|
62
|
-
)`)),we([o,we(i," "),r]," ")}},Argument:{leave:({name:t,value:e})=>t+": "+e},FragmentSpread:{leave:({name:t,directives:e})=>"..."+t+He(" ",we(e," "))},InlineFragment:{leave:({typeCondition:t,directives:e,selectionSet:n})=>we(["...",He("on ",t),we(e," "),n]," ")},FragmentDefinition:{leave:({name:t,typeCondition:e,variableDefinitions:n,directives:i,selectionSet:r})=>`fragment ${t}${He("(",we(n,", "),")")} on ${e} ${He("",we(i," ")," ")}`+r},IntValue:{leave:({value:t})=>t},FloatValue:{leave:({value:t})=>t},StringValue:{leave:({value:t,block:e})=>e
|
|
62
|
+
)`)),we([o,we(i," "),r]," ")}},Argument:{leave:({name:t,value:e})=>t+": "+e},FragmentSpread:{leave:({name:t,directives:e})=>"..."+t+He(" ",we(e," "))},InlineFragment:{leave:({typeCondition:t,directives:e,selectionSet:n})=>we(["...",He("on ",t),we(e," "),n]," ")},FragmentDefinition:{leave:({name:t,typeCondition:e,variableDefinitions:n,directives:i,selectionSet:r})=>`fragment ${t}${He("(",we(n,", "),")")} on ${e} ${He("",we(i," ")," ")}`+r},IntValue:{leave:({value:t})=>t},FloatValue:{leave:({value:t})=>t},StringValue:{leave:({value:t,block:e})=>e?$S(t):aE(t)},BooleanValue:{leave:({value:t})=>t?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:t})=>t},ListValue:{leave:({values:t})=>"["+we(t,", ")+"]"},ObjectValue:{leave:({fields:t})=>"{"+we(t,", ")+"}"},ObjectField:{leave:({name:t,value:e})=>t+": "+e},Directive:{leave:({name:t,arguments:e})=>"@"+t+He("(",we(e,", "),")")},NamedType:{leave:({name:t})=>t},ListType:{leave:({type:t})=>"["+t+"]"},NonNullType:{leave:({type:t})=>t+"!"},SchemaDefinition:{leave:({description:t,directives:e,operationTypes:n})=>He("",t,`
|
|
63
63
|
`)+we(["schema",we(e," "),Qt(n)]," ")},OperationTypeDefinition:{leave:({operation:t,type:e})=>t+": "+e},ScalarTypeDefinition:{leave:({description:t,name:e,directives:n})=>He("",t,`
|
|
64
64
|
`)+we(["scalar",e,we(n," ")]," ")},ObjectTypeDefinition:{leave:({description:t,name:e,interfaces:n,directives:i,fields:r})=>He("",t,`
|
|
65
65
|
`)+we(["type",e,He("implements ",we(n," & ")),we(i," "),Qt(r)]," ")},FieldDefinition:{leave:({description:t,name:e,arguments:n,type:i,directives:r})=>He("",t,`
|
|
66
|
-
`)+e+(
|
|
67
|
-
`,
|
|
66
|
+
`)+e+(mf(n)?He(`(
|
|
67
|
+
`,ua(we(n,`
|
|
68
68
|
`)),`
|
|
69
69
|
)`):He("(",we(n,", "),")"))+": "+i+He(" ",we(r," "))},InputValueDefinition:{leave:({description:t,name:e,type:n,defaultValue:i,directives:r})=>He("",t,`
|
|
70
70
|
`)+we([e+": "+n,He("= ",i),we(r," ")]," ")},InterfaceTypeDefinition:{leave:({description:t,name:e,interfaces:n,directives:i,fields:r})=>He("",t,`
|
|
@@ -73,51 +73,51 @@ spurious results.`)}}return!1};class Qp{constructor(e,n="GraphQL request",i={lin
|
|
|
73
73
|
`)+we(["enum",e,we(n," "),Qt(i)]," ")},EnumValueDefinition:{leave:({description:t,name:e,directives:n})=>He("",t,`
|
|
74
74
|
`)+we([e,we(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:t,name:e,directives:n,fields:i})=>He("",t,`
|
|
75
75
|
`)+we(["input",e,we(n," "),Qt(i)]," ")},DirectiveDefinition:{leave:({description:t,name:e,arguments:n,repeatable:i,locations:r})=>He("",t,`
|
|
76
|
-
`)+"directive @"+e+(
|
|
77
|
-
`,
|
|
76
|
+
`)+"directive @"+e+(mf(n)?He(`(
|
|
77
|
+
`,ua(we(n,`
|
|
78
78
|
`)),`
|
|
79
79
|
)`):He("(",we(n,", "),")"))+(i?" repeatable":"")+" on "+we(r," | ")},SchemaExtension:{leave:({directives:t,operationTypes:e})=>we(["extend schema",we(t," "),Qt(e)]," ")},ScalarTypeExtension:{leave:({name:t,directives:e})=>we(["extend scalar",t,we(e," ")]," ")},ObjectTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:i})=>we(["extend type",t,He("implements ",we(e," & ")),we(n," "),Qt(i)]," ")},InterfaceTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:i})=>we(["extend interface",t,He("implements ",we(e," & ")),we(n," "),Qt(i)]," ")},UnionTypeExtension:{leave:({name:t,directives:e,types:n})=>we(["extend union",t,we(e," "),He("= ",we(n," | "))]," ")},EnumTypeExtension:{leave:({name:t,directives:e,values:n})=>we(["extend enum",t,we(e," "),Qt(n)]," ")},InputObjectTypeExtension:{leave:({name:t,directives:e,fields:n})=>we(["extend input",t,we(e," "),Qt(n)]," ")}};function we(t,e=""){var n;return(n=t==null?void 0:t.filter(i=>i).join(e))!==null&&n!==void 0?n:""}function Qt(t){return He(`{
|
|
80
|
-
`,
|
|
80
|
+
`,ua(we(t,`
|
|
81
81
|
`)),`
|
|
82
|
-
}`)}function He(t,e,n=""){return e!=null&&e!==""?t+e+n:""}function
|
|
83
|
-
`))}function
|
|
84
|
-
`)))!==null&&e!==void 0?e:!1}const tf=t=>{var i,r;let e;const n=t.definitions.filter(a=>a.kind==="OperationDefinition");return n.length===1&&(e=(r=(i=n[0])==null?void 0:i.name)==null?void 0:r.value),e},Ou=t=>{if(typeof t=="string"){let n;try{const i=hS(t);n=tf(i)}catch{}return{query:t,operationName:n}}const e=tf(t);return{query:wS(t),operationName:e}};class Vr extends Error{constructor(e,n){const i=`${Vr.extractMessage(e)}: ${JSON.stringify({response:e,request:n})}`;super(i),Object.setPrototypeOf(this,Vr.prototype),this.response=e,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Vr)}static extractMessage(e){var n,i,r;return(r=(i=(n=e.errors)==null?void 0:n[0])==null?void 0:i.message)!=null?r:`GraphQL Error (Code: ${e.status})`}}var Mr={exports:{}},NS=Mr.exports,nf;function AS(){return nf||(nf=1,function(t,e){var n=typeof self!="undefined"?self:NS,i=function(){function a(){this.fetch=!1,this.DOMException=n.DOMException}return a.prototype=n,new a}();(function(a){(function(o){var l={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function d(M){return M&&DataView.prototype.isPrototypeOf(M)}if(l.arrayBuffer)var h=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],m=ArrayBuffer.isView||function(M){return M&&h.indexOf(Object.prototype.toString.call(M))>-1};function y(M){if(typeof M!="string"&&(M=String(M)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(M))throw new TypeError("Invalid character in header field name");return M.toLowerCase()}function g(M){return typeof M!="string"&&(M=String(M)),M}function O(M){var N={next:function(){var z=M.shift();return{done:z===void 0,value:z}}};return l.iterable&&(N[Symbol.iterator]=function(){return N}),N}function _(M){this.map={},M instanceof _?M.forEach(function(N,z){this.append(z,N)},this):Array.isArray(M)?M.forEach(function(N){this.append(N[0],N[1])},this):M&&Object.getOwnPropertyNames(M).forEach(function(N){this.append(N,M[N])},this)}_.prototype.append=function(M,N){M=y(M),N=g(N);var z=this.map[M];this.map[M]=z?z+", "+N:N},_.prototype.delete=function(M){delete this.map[y(M)]},_.prototype.get=function(M){return M=y(M),this.has(M)?this.map[M]:null},_.prototype.has=function(M){return this.map.hasOwnProperty(y(M))},_.prototype.set=function(M,N){this.map[y(M)]=g(N)},_.prototype.forEach=function(M,N){for(var z in this.map)this.map.hasOwnProperty(z)&&M.call(N,this.map[z],z,this)},_.prototype.keys=function(){var M=[];return this.forEach(function(N,z){M.push(z)}),O(M)},_.prototype.values=function(){var M=[];return this.forEach(function(N){M.push(N)}),O(M)},_.prototype.entries=function(){var M=[];return this.forEach(function(N,z){M.push([z,N])}),O(M)},l.iterable&&(_.prototype[Symbol.iterator]=_.prototype.entries);function S(M){if(M.bodyUsed)return Promise.reject(new TypeError("Already read"));M.bodyUsed=!0}function E(M){return new Promise(function(N,z){M.onload=function(){N(M.result)},M.onerror=function(){z(M.error)}})}function R(M){var N=new FileReader,z=E(N);return N.readAsArrayBuffer(M),z}function j(M){var N=new FileReader,z=E(N);return N.readAsText(M),z}function J(M){for(var N=new Uint8Array(M),z=new Array(N.length),ie=0;ie<N.length;ie++)z[ie]=String.fromCharCode(N[ie]);return z.join("")}function K(M){if(M.slice)return M.slice(0);var N=new Uint8Array(M.byteLength);return N.set(new Uint8Array(M)),N.buffer}function X(){return this.bodyUsed=!1,this._initBody=function(M){this._bodyInit=M,M?typeof M=="string"?this._bodyText=M:l.blob&&Blob.prototype.isPrototypeOf(M)?this._bodyBlob=M:l.formData&&FormData.prototype.isPrototypeOf(M)?this._bodyFormData=M:l.searchParams&&URLSearchParams.prototype.isPrototypeOf(M)?this._bodyText=M.toString():l.arrayBuffer&&l.blob&&d(M)?(this._bodyArrayBuffer=K(M.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(M)||m(M))?this._bodyArrayBuffer=K(M):this._bodyText=M=Object.prototype.toString.call(M):this._bodyText="",this.headers.get("content-type")||(typeof M=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):l.searchParams&&URLSearchParams.prototype.isPrototypeOf(M)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},l.blob&&(this.blob=function(){var M=S(this);if(M)return M;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?S(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(R)}),this.text=function(){var M=S(this);if(M)return M;if(this._bodyBlob)return j(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(J(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},l.formData&&(this.formData=function(){return this.text().then(ve)}),this.json=function(){return this.text().then(JSON.parse)},this}var ne=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function oe(M){var N=M.toUpperCase();return ne.indexOf(N)>-1?N:M}function Se(M,N){N=N||{};var z=N.body;if(M instanceof Se){if(M.bodyUsed)throw new TypeError("Already read");this.url=M.url,this.credentials=M.credentials,N.headers||(this.headers=new _(M.headers)),this.method=M.method,this.mode=M.mode,this.signal=M.signal,!z&&M._bodyInit!=null&&(z=M._bodyInit,M.bodyUsed=!0)}else this.url=String(M);if(this.credentials=N.credentials||this.credentials||"same-origin",(N.headers||!this.headers)&&(this.headers=new _(N.headers)),this.method=oe(N.method||this.method||"GET"),this.mode=N.mode||this.mode||null,this.signal=N.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&z)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(z)}Se.prototype.clone=function(){return new Se(this,{body:this._bodyInit})};function ve(M){var N=new FormData;return M.trim().split("&").forEach(function(z){if(z){var ie=z.split("="),ce=ie.shift().replace(/\+/g," "),se=ie.join("=").replace(/\+/g," ");N.append(decodeURIComponent(ce),decodeURIComponent(se))}}),N}function Ke(M){var N=new _,z=M.replace(/\r?\n[\t ]+/g," ");return z.split(/\r?\n/).forEach(function(ie){var ce=ie.split(":"),se=ce.shift().trim();if(se){var B=ce.join(":").trim();N.append(se,B)}}),N}X.call(Se.prototype);function Ne(M,N){N||(N={}),this.type="default",this.status=N.status===void 0?200:N.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in N?N.statusText:"OK",this.headers=new _(N.headers),this.url=N.url||"",this._initBody(M)}X.call(Ne.prototype),Ne.prototype.clone=function(){return new Ne(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new _(this.headers),url:this.url})},Ne.error=function(){var M=new Ne(null,{status:0,statusText:""});return M.type="error",M};var Re=[301,302,303,307,308];Ne.redirect=function(M,N){if(Re.indexOf(N)===-1)throw new RangeError("Invalid status code");return new Ne(null,{status:N,headers:{location:M}})},o.DOMException=a.DOMException;try{new o.DOMException}catch{o.DOMException=function(N,z){this.message=N,this.name=z;var ie=Error(N);this.stack=ie.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function Ve(M,N){return new Promise(function(z,ie){var ce=new Se(M,N);if(ce.signal&&ce.signal.aborted)return ie(new o.DOMException("Aborted","AbortError"));var se=new XMLHttpRequest;function B(){se.abort()}se.onload=function(){var Fe={status:se.status,statusText:se.statusText,headers:Ke(se.getAllResponseHeaders()||"")};Fe.url="responseURL"in se?se.responseURL:Fe.headers.get("X-Request-URL");var $e="response"in se?se.response:se.responseText;z(new Ne($e,Fe))},se.onerror=function(){ie(new TypeError("Network request failed"))},se.ontimeout=function(){ie(new TypeError("Network request failed"))},se.onabort=function(){ie(new o.DOMException("Aborted","AbortError"))},se.open(ce.method,ce.url,!0),ce.credentials==="include"?se.withCredentials=!0:ce.credentials==="omit"&&(se.withCredentials=!1),"responseType"in se&&l.blob&&(se.responseType="blob"),ce.headers.forEach(function(Fe,$e){se.setRequestHeader($e,Fe)}),ce.signal&&(ce.signal.addEventListener("abort",B),se.onreadystatechange=function(){se.readyState===4&&ce.signal.removeEventListener("abort",B)}),se.send(typeof ce._bodyInit=="undefined"?null:ce._bodyInit)})}return Ve.polyfill=!0,a.fetch||(a.fetch=Ve,a.Headers=_,a.Request=Se,a.Response=Ne),o.Headers=_,o.Request=Se,o.Response=Ne,o.fetch=Ve,Object.defineProperty(o,"__esModule",{value:!0}),o})({})})(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var r=i;e=r.fetch,e.default=r.fetch,e.fetch=r.fetch,e.Headers=r.Headers,e.Request=r.Request,e.Response=r.Response,t.exports=e}(Mr,Mr.exports)),Mr.exports}var Ns=AS();const is=qs(Ns),OS=Wm({__proto__:null,default:is},[Ns]),Bi=t=>{let e={};return t&&(typeof Headers!="undefined"&&t instanceof Headers||OS&&Ns.Headers&&t instanceof Ns.Headers?e=Fw(t):Array.isArray(t)?t.forEach(([n,i])=>{n&&i!==void 0&&(e[n]=i)}):e=t),e},rf=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),xS=t=>{if(!Array.isArray(t.query)){const i=t,r=[`query=${encodeURIComponent(rf(i.query))}`];return t.variables&&r.push(`variables=${encodeURIComponent(i.jsonSerializer.stringify(i.variables))}`),i.operationName&&r.push(`operationName=${encodeURIComponent(i.operationName)}`),r.join("&")}if(typeof t.variables!="undefined"&&!Array.isArray(t.variables))throw new Error("Cannot create query with given variable type, array expected");const e=t,n=t.query.reduce((i,r,a)=>(i.push({query:rf(r),variables:e.variables?e.jsonSerializer.stringify(e.variables[a]):void 0}),i),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(n))}`},TS=t=>async e=>{var S;const{url:n,query:i,variables:r,operationName:a,fetch:o,fetchOptions:l,middleware:d}=e,h={...e.headers};let m="",y;t==="POST"?(y=RS(i,r,a,l.jsonSerializer),typeof y=="string"&&(h["Content-Type"]="application/json")):m=xS({query:i,variables:r,operationName:a,jsonSerializer:(S=l.jsonSerializer)!=null?S:Ml});const g={method:t,headers:h,body:y,...l};let O=n,_=g;if(d){const E=await Promise.resolve(d({...g,url:n,operationName:a,variables:r})),{url:R,...j}=E;O=R,_=j}return m&&(O=`${O}?${m}`),await o(O,_)};class CS{constructor(e,n={}){this.url=e,this.requestConfig=n,this.rawRequest=async(...i)=>{const[r,a,o]=i,l=Dw(r,a,o),{headers:d,fetch:h=is,method:m="POST",requestMiddleware:y,responseMiddleware:g,...O}=this.requestConfig,{url:_}=this;l.signal!==void 0&&(O.signal=l.signal);const{operationName:S}=Ou(l.query);return xu({url:_,query:l.query,variables:l.variables,headers:{...Bi(Tu(d)),...Bi(l.requestHeaders)},operationName:S,fetch:h,method:m,fetchOptions:O,middleware:y}).then(E=>(g&&g(E),E)).catch(E=>{throw g&&g(E),E})}}async request(e,...n){const[i,r]=n,a=Iw(e,i,r),{headers:o,fetch:l=is,method:d="POST",requestMiddleware:h,responseMiddleware:m,...y}=this.requestConfig,{url:g}=this;a.signal!==void 0&&(y.signal=a.signal);const{query:O,operationName:_}=Ou(a.document);return xu({url:g,query:O,variables:a.variables,headers:{...Bi(Tu(o)),...Bi(a.requestHeaders)},operationName:_,fetch:l,method:d,fetchOptions:y,middleware:h}).then(S=>(m&&m(S),S.data)).catch(S=>{throw m&&m(S),S})}batchRequests(e,n){var d;const i=Pw(e,n),{headers:r,...a}=this.requestConfig;i.signal!==void 0&&(a.signal=i.signal);const o=i.documents.map(({document:h})=>Ou(h).query),l=i.documents.map(({variables:h})=>h);return xu({url:this.url,query:o,variables:l,headers:{...Bi(Tu(r)),...Bi(i.requestHeaders)},operationName:void 0,fetch:(d=this.requestConfig.fetch)!=null?d:is,method:this.requestConfig.method||"POST",fetchOptions:a,middleware:this.requestConfig.requestMiddleware}).then(h=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(h),h.data)).catch(h=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(h),h})}setHeaders(e){return this.requestConfig.headers=e,this}setHeader(e,n){const{headers:i}=this.requestConfig;return i?i[e]=n:this.requestConfig.headers={[e]:n},this}setEndpoint(e){return this.url=e,this}}const xu=async t=>{var m,y;const{query:e,variables:n,fetchOptions:i}=t,r=TS(Rw((m=t.method)!=null?m:"post")),a=Array.isArray(t.query),o=await r(t),l=await FS(o,(y=i.jsonSerializer)!=null?y:Ml),d=Array.isArray(l)?!l.some(({data:g})=>!g):!!l.data,h=Array.isArray(l)||!l.errors||Array.isArray(l.errors)&&!l.errors.length||i.errorPolicy==="all"||i.errorPolicy==="ignore";if(o.ok&&h&&d){const{errors:g,...O}=(Array.isArray(l),l),_=i.errorPolicy==="ignore"?O:l;return{...a?{data:_}:_,headers:o.headers,status:o.status}}else{const g=typeof l=="string"?{error:l}:l;throw new Vr({...g,status:o.status,headers:o.headers},{query:e,variables:n})}},RS=(t,e,n,i)=>{const r=i!=null?i:Ml;if(!Array.isArray(t))return r.stringify({query:t,variables:e,operationName:n});if(typeof e!="undefined"&&!Array.isArray(e))throw new Error("Cannot create request body with given variable type, array expected");const a=t.reduce((o,l,d)=>(o.push({query:l,variables:e?e[d]:void 0}),o),[]);return r.stringify(a)},FS=async(t,e)=>{let n;return t.headers.forEach((i,r)=>{r.toLowerCase()==="content-type"&&(n=i)}),n&&(n.toLowerCase().startsWith("application/json")||n.toLowerCase().startsWith("application/graphql+json")||n.toLowerCase().startsWith("application/graphql-response+json"))?e.parse(await t.text()):t.text()},Tu=t=>typeof t=="function"?t():t;class em extends Tn{constructor(){super("EVENT_CHAT_ROOM_TOKEN_ERROR","Error getting chat room connection token")}}class no{constructor(e){ge(this,"root",cp(this));ge(this,"token");this.root.setProps(e)}static toDomain(e){const n={token:e.token};return new no(n)}toPrimitives(){const{root:e,...n}=this;return{...n}}}const IS=er.apiUrls.graphql;class tm{constructor(){ge(this,"client");this.client=new CS(IS)}async getChatRoom(e){var r;const{getChatRoomToken:n}=await this.client.request(op,{data:{account:e.account,idEvent:e.eventId,userName:e.userName}});this.propagateGraphqlErrorIfExists(n);const i=(r=n.data)==null?void 0:r.token;if(!i)throw new em;return no.toDomain({token:i})}propagateGraphqlErrorIfExists(e){if(e.__typename==="ErrorGeneral")throw new Error(e.message)}}class nm{constructor(e){ge(this,"account");this.eventChatRoomRepository=e}async get(e){this.validateAccount();try{return await this.eventChatRoomRepository.getChatRoom({...e,account:this.account})}catch(n){throw new wl(n)}}setAccount(e){this.account=e}validateAccount(){if(!this.account)throw new If}}const DS=new tm,gl=new nm(DS),io=xs(void 0);io.debugLabel="chatSocketAtom";const ro=xs(!1);ro.debugLabel="chatIsConnectedAtom";const ca=xs([]);ca.debugLabel="chatMessageListAtom";const im=t=>{var n;t.data=t.data.replace("replace_gif",(n=t.urlGif)!=null?n:"");const e=t.data.indexOf("::question__")>-1;if(e){const[i,r]=t.data.split("::")||["none","none"],a=r.split("question__")[1],o={response:i.replace("response__",""),question:JSON.parse(a)};return{...t,data:o.response,isResponse:e,responseData:t.data,question:e?o.question:null}}return t},rm=t=>{const{url:e,token:n,onOpen:i,onClose:r,onMessage:a,onError:o}=t,l=new WebSocket(e,n);return l.onopen=d=>i(d),l.onclose=d=>r(d),l.onerror=d=>o(d),l.onmessage=d=>a(d),l},am=()=>{const t="0123456789ABCDEF";let e="#";for(let n=0;n<6;n+=1)e+=t[Math.floor(Math.random()*16)];return e},jl=(t,e)=>{var g,O;const{Content:n,Attributes:i,Sender:{Attributes:r}}=e,{username:a,type:o,email:l}=i,{isAdmin:d}=r,h=(g=i==null?void 0:i.id)!=null?g:gs(8),m=((O=t.find(_=>_.username===a))==null?void 0:O.color)||am(),y={id:h,type:o,color:m,username:a,email:l,data:n,sendDate:i.sendDate,isAdmin:d==="true",responseAdmin:!1,question:null,account:i.account,idEvent:i.idEvent,urlGif:i.urlGif,ip:i.ip};return im(y)},sm=t=>{const{eventId:e,userName:n,enabled:i=!0}=t,{accountName:r}=tp(),[a,o]=je.useState(""),l=()=>{i&&r&&(gl.setAccount(r),gl.get({eventId:e,userName:n}).then(d=>{o(d.token)}))};return je.useEffect(()=>{l()},[r,i]),{getQuery:{refetch:l},token:a}},{coreLogger:PS}=Ni(),Rt=PS.child("useConnectChatSocket"),LS=er.publicUrls.wssIVSChat,$S=10,MS=t=>Math.min(1e4,1e3*Math.pow(2,t)),BS=(t,e,n)=>{const i=JSON.parse(t.data);switch(i.Type){case"EVENT":e==null||e(i);break;case"MESSAGE":n==null||n(i);break;case"ERROR":Rt.error("Chat room error:",i);break;default:Rt.error("Unknown chat room event:",t)}},om=t=>{const{onMessage:e,eventId:n,enabled:i=!0,userName:r,onEvent:a}=t,{token:o,getQuery:l}=sm({eventId:n,userName:r,enabled:i}),[d,h]=Jo(io),[m,y]=Jo(ro),[g,O]=Jo(ca),_=je.useRef(0),S=je.useCallback(K=>Rt.error("Chat room socket error:",K),[]),E=je.useCallback(()=>{y(!0),_.current=0,Rt.debug("Successfully connected to the chat room")},[y]),R=je.useCallback(()=>{if(_.current>=$S){Rt.error("Max reconnection attempts reached. No further attempts will be made.");return}y(!1),_.current+=1;const K=MS(_.current);Rt.debug(`Disconnected from chat room. Reconnecting in ${K/1e3} seconds... (Attempt ${_.current})`),setTimeout(()=>l.refetch(),K)},[l,y]),j=je.useCallback(()=>{if(!o){Rt.debug("No token available. Connection aborted.");return}if((d==null?void 0:d.readyState)===WebSocket.OPEN){Rt.debug("WebSocket is already open. No need to reconnect.");return}Rt.debug("Connecting to the chat room...");const K=rm({token:o,url:LS,onOpen:E,onClose:R,onError:S,onMessage:X=>BS(X,a,e)});h(K)},[o,d,a,e,E,R,S,h]),J=je.useCallback(()=>{if(!d||d.readyState!==WebSocket.OPEN){Rt.debug("No open socket to close.");return}Rt.debug("Closing chat room socket..."),d.close()},[d]);return je.useEffect(()=>{if(!i){Rt.debug("Chat is disabled, skipping connection.");return}if(!o){Rt.debug("Token not available, skipping connection.");return}return Rt.debug("Initializing connection with token:",o),J(),j(),J},[o,i]),{socket:d,chatIsConnected:m,chatMessageList:g,setChatMessageList:O}},US=()=>{const t=$u(io),e=$u(ro);return{sendMessage:je.useCallback((i,r)=>{if(!t||!e)return;const a={id:r.id,sendDate:new Date,content:i,action:"SEND_MESSAGE",attributes:r},o=JSON.stringify(a);t.send(o)},[e,t])}},um=()=>{const t=yl(ca);return{handleEvent:i=>{var r;if(i.EventName==="senddeletemessage"){const a=JSON.parse((r=i.Attributes)==null?void 0:r.data);t(o=>o.filter(l=>l.id!==a.id))}},handleMessage:i=>{t(r=>[...r,jl(r,i)])}}},jS=t=>{const{eventId:e,userName:n}=t,[i,r]=je.useState(!1),[a,o]=je.useState(),[l,d]=je.useState(),[h,m]=je.useState([]),{handleEvent:y}=um(),g=yl(ca),O=j=>{g(J=>[jl(J,j),...J]),r(!1)},_=j=>{var J,K,X;if(y(j),j.EventName==="sendpinmessage"){const ne=JSON.parse((J=j.Attributes)==null?void 0:J.data);o({data:ne.data,id:ne.id,username:ne.username})}if(j.EventName==="sendunpinmessage"&&o(void 0),j.EventName==="sendhighlightproduct"){const ne=JSON.parse((K=j.Attributes)==null?void 0:K.data);d({products:ne.productIds,collection:ne.collection,livestreamingId:ne.idEvent})}if(j.EventName==="sendaddtocart"){const ne=JSON.parse((X=j.Attributes)==null?void 0:X.data);m(oe=>[...oe,{id:ne.id,sessionId:ne.sessionId,productId:ne.productId,productImageUrl:ne.productImageUrl,productName:ne.productName}])}},{socket:S,chatMessageList:E,setChatMessageList:R}=om({onMessage:O,onEvent:_,eventId:e,userName:n});return{socket:S,chat:E,showLoader:i,pinnedMessage:a,highlightProduct:l,productsInCart:h,setChat:R,setShowLoader:r,setPinnedMessage:o,setProductsInCart:m}};/**
|
|
82
|
+
}`)}function He(t,e,n=""){return e!=null&&e!==""?t+e+n:""}function ua(t){return He(" ",t.replace(/\n/g,`
|
|
83
|
+
`))}function mf(t){var e;return(e=t==null?void 0:t.some(n=>n.includes(`
|
|
84
|
+
`)))!==null&&e!==void 0?e:!1}const gf=t=>{var i,r;let e;const n=t.definitions.filter(s=>s.kind==="OperationDefinition");return n.length===1&&(e=(r=(i=n[0])==null?void 0:i.name)==null?void 0:r.value),e},Pu=t=>{if(typeof t=="string"){let n;try{const i=rE(t);n=gf(i)}catch{}return{query:t,operationName:n}}const e=gf(t);return{query:hE(t),operationName:e}};class Gr extends Error{constructor(e,n){const i=`${Gr.extractMessage(e)}: ${JSON.stringify({response:e,request:n})}`;super(i),Object.setPrototypeOf(this,Gr.prototype),this.response=e,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Gr)}static extractMessage(e){var n,i,r;return(r=(i=(n=e.errors)==null?void 0:n[0])==null?void 0:i.message)!=null?r:`GraphQL Error (Code: ${e.status})`}}var Hr={exports:{}},gE=Hr.exports,vf;function vE(){return vf||(vf=1,function(t,e){var n=typeof self!="undefined"?self:gE,i=function(){function s(){this.fetch=!1,this.DOMException=n.DOMException}return s.prototype=n,new s}();(function(s){(function(o){var l={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function d(M){return M&&DataView.prototype.isPrototypeOf(M)}if(l.arrayBuffer)var h=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],m=ArrayBuffer.isView||function(M){return M&&h.indexOf(Object.prototype.toString.call(M))>-1};function y(M){if(typeof M!="string"&&(M=String(M)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(M))throw new TypeError("Invalid character in header field name");return M.toLowerCase()}function g(M){return typeof M!="string"&&(M=String(M)),M}function O(M){var N={next:function(){var K=M.shift();return{done:K===void 0,value:K}}};return l.iterable&&(N[Symbol.iterator]=function(){return N}),N}function _(M){this.map={},M instanceof _?M.forEach(function(N,K){this.append(K,N)},this):Array.isArray(M)?M.forEach(function(N){this.append(N[0],N[1])},this):M&&Object.getOwnPropertyNames(M).forEach(function(N){this.append(N,M[N])},this)}_.prototype.append=function(M,N){M=y(M),N=g(N);var K=this.map[M];this.map[M]=K?K+", "+N:N},_.prototype.delete=function(M){delete this.map[y(M)]},_.prototype.get=function(M){return M=y(M),this.has(M)?this.map[M]:null},_.prototype.has=function(M){return this.map.hasOwnProperty(y(M))},_.prototype.set=function(M,N){this.map[y(M)]=g(N)},_.prototype.forEach=function(M,N){for(var K in this.map)this.map.hasOwnProperty(K)&&M.call(N,this.map[K],K,this)},_.prototype.keys=function(){var M=[];return this.forEach(function(N,K){M.push(K)}),O(M)},_.prototype.values=function(){var M=[];return this.forEach(function(N){M.push(N)}),O(M)},_.prototype.entries=function(){var M=[];return this.forEach(function(N,K){M.push([K,N])}),O(M)},l.iterable&&(_.prototype[Symbol.iterator]=_.prototype.entries);function S(M){if(M.bodyUsed)return Promise.reject(new TypeError("Already read"));M.bodyUsed=!0}function E(M){return new Promise(function(N,K){M.onload=function(){N(M.result)},M.onerror=function(){K(M.error)}})}function R(M){var N=new FileReader,K=E(N);return N.readAsArrayBuffer(M),K}function j(M){var N=new FileReader,K=E(N);return N.readAsText(M),K}function J(M){for(var N=new Uint8Array(M),K=new Array(N.length),ie=0;ie<N.length;ie++)K[ie]=String.fromCharCode(N[ie]);return K.join("")}function z(M){if(M.slice)return M.slice(0);var N=new Uint8Array(M.byteLength);return N.set(new Uint8Array(M)),N.buffer}function X(){return this.bodyUsed=!1,this._initBody=function(M){this._bodyInit=M,M?typeof M=="string"?this._bodyText=M:l.blob&&Blob.prototype.isPrototypeOf(M)?this._bodyBlob=M:l.formData&&FormData.prototype.isPrototypeOf(M)?this._bodyFormData=M:l.searchParams&&URLSearchParams.prototype.isPrototypeOf(M)?this._bodyText=M.toString():l.arrayBuffer&&l.blob&&d(M)?(this._bodyArrayBuffer=z(M.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(M)||m(M))?this._bodyArrayBuffer=z(M):this._bodyText=M=Object.prototype.toString.call(M):this._bodyText="",this.headers.get("content-type")||(typeof M=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):l.searchParams&&URLSearchParams.prototype.isPrototypeOf(M)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},l.blob&&(this.blob=function(){var M=S(this);if(M)return M;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?S(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(R)}),this.text=function(){var M=S(this);if(M)return M;if(this._bodyBlob)return j(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(J(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},l.formData&&(this.formData=function(){return this.text().then(ve)}),this.json=function(){return this.text().then(JSON.parse)},this}var ne=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function oe(M){var N=M.toUpperCase();return ne.indexOf(N)>-1?N:M}function Se(M,N){N=N||{};var K=N.body;if(M instanceof Se){if(M.bodyUsed)throw new TypeError("Already read");this.url=M.url,this.credentials=M.credentials,N.headers||(this.headers=new _(M.headers)),this.method=M.method,this.mode=M.mode,this.signal=M.signal,!K&&M._bodyInit!=null&&(K=M._bodyInit,M.bodyUsed=!0)}else this.url=String(M);if(this.credentials=N.credentials||this.credentials||"same-origin",(N.headers||!this.headers)&&(this.headers=new _(N.headers)),this.method=oe(N.method||this.method||"GET"),this.mode=N.mode||this.mode||null,this.signal=N.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&K)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(K)}Se.prototype.clone=function(){return new Se(this,{body:this._bodyInit})};function ve(M){var N=new FormData;return M.trim().split("&").forEach(function(K){if(K){var ie=K.split("="),ce=ie.shift().replace(/\+/g," "),ae=ie.join("=").replace(/\+/g," ");N.append(decodeURIComponent(ce),decodeURIComponent(ae))}}),N}function ze(M){var N=new _,K=M.replace(/\r?\n[\t ]+/g," ");return K.split(/\r?\n/).forEach(function(ie){var ce=ie.split(":"),ae=ce.shift().trim();if(ae){var B=ce.join(":").trim();N.append(ae,B)}}),N}X.call(Se.prototype);function Ne(M,N){N||(N={}),this.type="default",this.status=N.status===void 0?200:N.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in N?N.statusText:"OK",this.headers=new _(N.headers),this.url=N.url||"",this._initBody(M)}X.call(Ne.prototype),Ne.prototype.clone=function(){return new Ne(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new _(this.headers),url:this.url})},Ne.error=function(){var M=new Ne(null,{status:0,statusText:""});return M.type="error",M};var Re=[301,302,303,307,308];Ne.redirect=function(M,N){if(Re.indexOf(N)===-1)throw new RangeError("Invalid status code");return new Ne(null,{status:N,headers:{location:M}})},o.DOMException=s.DOMException;try{new o.DOMException}catch{o.DOMException=function(N,K){this.message=N,this.name=K;var ie=Error(N);this.stack=ie.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function Ve(M,N){return new Promise(function(K,ie){var ce=new Se(M,N);if(ce.signal&&ce.signal.aborted)return ie(new o.DOMException("Aborted","AbortError"));var ae=new XMLHttpRequest;function B(){ae.abort()}ae.onload=function(){var Fe={status:ae.status,statusText:ae.statusText,headers:ze(ae.getAllResponseHeaders()||"")};Fe.url="responseURL"in ae?ae.responseURL:Fe.headers.get("X-Request-URL");var $e="response"in ae?ae.response:ae.responseText;K(new Ne($e,Fe))},ae.onerror=function(){ie(new TypeError("Network request failed"))},ae.ontimeout=function(){ie(new TypeError("Network request failed"))},ae.onabort=function(){ie(new o.DOMException("Aborted","AbortError"))},ae.open(ce.method,ce.url,!0),ce.credentials==="include"?ae.withCredentials=!0:ce.credentials==="omit"&&(ae.withCredentials=!1),"responseType"in ae&&l.blob&&(ae.responseType="blob"),ce.headers.forEach(function(Fe,$e){ae.setRequestHeader($e,Fe)}),ce.signal&&(ce.signal.addEventListener("abort",B),ae.onreadystatechange=function(){ae.readyState===4&&ce.signal.removeEventListener("abort",B)}),ae.send(typeof ce._bodyInit=="undefined"?null:ce._bodyInit)})}return Ve.polyfill=!0,s.fetch||(s.fetch=Ve,s.Headers=_,s.Request=Se,s.Response=Ne),o.Headers=_,o.Request=Se,o.Response=Ne,o.fetch=Ve,Object.defineProperty(o,"__esModule",{value:!0}),o})({})})(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var r=i;e=r.fetch,e.default=r.fetch,e.fetch=r.fetch,e.Headers=r.Headers,e.Request=r.Request,e.Response=r.Response,t.exports=e}(Hr,Hr.exports)),Hr.exports}var Ra=vE();const la=Ya(Ra),yE=vg({__proto__:null,default:la},[Ra]),Vi=t=>{let e={};return t&&(typeof Headers!="undefined"&&t instanceof Headers||yE&&Ra.Headers&&t instanceof Ra.Headers?e=SS(t):Array.isArray(t)?t.forEach(([n,i])=>{n&&i!==void 0&&(e[n]=i)}):e=t),e},yf=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),bE=t=>{if(!Array.isArray(t.query)){const i=t,r=[`query=${encodeURIComponent(yf(i.query))}`];return t.variables&&r.push(`variables=${encodeURIComponent(i.jsonSerializer.stringify(i.variables))}`),i.operationName&&r.push(`operationName=${encodeURIComponent(i.operationName)}`),r.join("&")}if(typeof t.variables!="undefined"&&!Array.isArray(t.variables))throw new Error("Cannot create query with given variable type, array expected");const e=t,n=t.query.reduce((i,r,s)=>(i.push({query:yf(r),variables:e.variables?e.jsonSerializer.stringify(e.variables[s]):void 0}),i),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(n))}`},kE=t=>async e=>{var S;const{url:n,query:i,variables:r,operationName:s,fetch:o,fetchOptions:l,middleware:d}=e,h={...e.headers};let m="",y;t==="POST"?(y=wE(i,r,s,l.jsonSerializer),typeof y=="string"&&(h["Content-Type"]="application/json")):m=bE({query:i,variables:r,operationName:s,jsonSerializer:(S=l.jsonSerializer)!=null?S:Xl});const g={method:t,headers:h,body:y,...l};let O=n,_=g;if(d){const E=await Promise.resolve(d({...g,url:n,operationName:s,variables:r})),{url:R,...j}=E;O=R,_=j}return m&&(O=`${O}?${m}`),await o(O,_)};class _E{constructor(e,n={}){this.url=e,this.requestConfig=n,this.rawRequest=async(...i)=>{const[r,s,o]=i,l=NS(r,s,o),{headers:d,fetch:h=la,method:m="POST",requestMiddleware:y,responseMiddleware:g,...O}=this.requestConfig,{url:_}=this;l.signal!==void 0&&(O.signal=l.signal);const{operationName:S}=Pu(l.query);return Lu({url:_,query:l.query,variables:l.variables,headers:{...Vi($u(d)),...Vi(l.requestHeaders)},operationName:S,fetch:h,method:m,fetchOptions:O,middleware:y}).then(E=>(g&&g(E),E)).catch(E=>{throw g&&g(E),E})}}async request(e,...n){const[i,r]=n,s=ES(e,i,r),{headers:o,fetch:l=la,method:d="POST",requestMiddleware:h,responseMiddleware:m,...y}=this.requestConfig,{url:g}=this;s.signal!==void 0&&(y.signal=s.signal);const{query:O,operationName:_}=Pu(s.document);return Lu({url:g,query:O,variables:s.variables,headers:{...Vi($u(o)),...Vi(s.requestHeaders)},operationName:_,fetch:l,method:d,fetchOptions:y,middleware:h}).then(S=>(m&&m(S),S.data)).catch(S=>{throw m&&m(S),S})}batchRequests(e,n){var d;const i=AS(e,n),{headers:r,...s}=this.requestConfig;i.signal!==void 0&&(s.signal=i.signal);const o=i.documents.map(({document:h})=>Pu(h).query),l=i.documents.map(({variables:h})=>h);return Lu({url:this.url,query:o,variables:l,headers:{...Vi($u(r)),...Vi(i.requestHeaders)},operationName:void 0,fetch:(d=this.requestConfig.fetch)!=null?d:la,method:this.requestConfig.method||"POST",fetchOptions:s,middleware:this.requestConfig.requestMiddleware}).then(h=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(h),h.data)).catch(h=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(h),h})}setHeaders(e){return this.requestConfig.headers=e,this}setHeader(e,n){const{headers:i}=this.requestConfig;return i?i[e]=n:this.requestConfig.headers={[e]:n},this}setEndpoint(e){return this.url=e,this}}const Lu=async t=>{var m,y;const{query:e,variables:n,fetchOptions:i}=t,r=kE(wS((m=t.method)!=null?m:"post")),s=Array.isArray(t.query),o=await r(t),l=await SE(o,(y=i.jsonSerializer)!=null?y:Xl),d=Array.isArray(l)?!l.some(({data:g})=>!g):!!l.data,h=Array.isArray(l)||!l.errors||Array.isArray(l.errors)&&!l.errors.length||i.errorPolicy==="all"||i.errorPolicy==="ignore";if(o.ok&&h&&d){const{errors:g,...O}=(Array.isArray(l),l),_=i.errorPolicy==="ignore"?O:l;return{...s?{data:_}:_,headers:o.headers,status:o.status}}else{const g=typeof l=="string"?{error:l}:l;throw new Gr({...g,status:o.status,headers:o.headers},{query:e,variables:n})}},wE=(t,e,n,i)=>{const r=i!=null?i:Xl;if(!Array.isArray(t))return r.stringify({query:t,variables:e,operationName:n});if(typeof e!="undefined"&&!Array.isArray(e))throw new Error("Cannot create request body with given variable type, array expected");const s=t.reduce((o,l,d)=>(o.push({query:l,variables:e?e[d]:void 0}),o),[]);return r.stringify(s)},SE=async(t,e)=>{let n;return t.headers.forEach((i,r)=>{r.toLowerCase()==="content-type"&&(n=i)}),n&&(n.toLowerCase().startsWith("application/json")||n.toLowerCase().startsWith("application/graphql+json")||n.toLowerCase().startsWith("application/graphql-response+json"))?e.parse(await t.text()):t.text()},$u=t=>typeof t=="function"?t():t;class Sm extends Cn{constructor(){super("EVENT_CHAT_ROOM_TOKEN_ERROR","Error getting chat room connection token")}}class lo{constructor(e){me(this,"root",Ep(this));me(this,"token");this.root.setProps(e)}static toDomain(e){const n={token:e.token};return new lo(n)}toPrimitives(){const{root:e,...n}=this;return{...n}}}const EE=rr.apiUrls.graphql;class Em{constructor(){me(this,"client");this.client=new _E(EE)}async getChatRoom(e){var r;const{getChatRoomToken:n}=await this.client.request(_p,{data:{account:e.account,idEvent:e.eventId,userName:e.userName}});this.propagateGraphqlErrorIfExists(n);const i=(r=n.data)==null?void 0:r.token;if(!i)throw new Sm;return lo.toDomain({token:i})}propagateGraphqlErrorIfExists(e){if(e.__typename==="ErrorGeneral")throw new Error(e.message)}}class Nm{constructor(e){me(this,"account");this.eventChatRoomRepository=e}async get(e){this.validateAccount();try{return await this.eventChatRoomRepository.getChatRoom({...e,account:this.account})}catch(n){throw new Fl(n)}}setAccount(e){this.account=e}validateAccount(){if(!this.account)throw new Gf}}const NE=new Em,Al=new Nm(NE),co=Da(void 0);co.debugLabel="chatSocketAtom";const fo=Da(!1);fo.debugLabel="chatIsConnectedAtom";const ms=Da([]);ms.debugLabel="chatMessageListAtom";const Am=t=>{var n;t.data=t.data.replace("replace_gif",(n=t.urlGif)!=null?n:"");const e=t.data.indexOf("::question__")>-1;if(e){const[i,r]=t.data.split("::")||["none","none"],s=r.split("question__")[1],o={response:i.replace("response__",""),question:JSON.parse(s)};return{...t,data:o.response,isResponse:e,responseData:t.data,question:e?o.question:null}}return t},Om=t=>{const{url:e,token:n,onOpen:i,onClose:r,onMessage:s,onError:o}=t,l=new WebSocket(e,n);return l.onopen=d=>i(d),l.onclose=d=>r(d),l.onerror=d=>o(d),l.onmessage=d=>s(d),l},xm=()=>{const t="0123456789ABCDEF";let e="#";for(let n=0;n<6;n+=1)e+=t[Math.floor(Math.random()*16)];return e},ec=(t,e)=>{var g,O;const{Content:n,Attributes:i,Sender:{Attributes:r}}=e,{username:s,type:o,email:l}=i,{isAdmin:d}=r,h=(g=i==null?void 0:i.id)!=null?g:wa(8),m=((O=t.find(_=>_.username===s))==null?void 0:O.color)||xm(),y={id:h,type:o,color:m,username:s,email:l,data:n,sendDate:i.sendDate,isAdmin:d==="true",responseAdmin:!1,question:null,account:i.account,idEvent:i.idEvent,urlGif:i.urlGif,ip:i.ip};return Am(y)},Tm=t=>{const{eventId:e,userName:n,enabled:i=!0}=t,{accountName:r}=mp(),[s,o]=je.useState(""),l=()=>{i&&r&&(Al.setAccount(r),Al.get({eventId:e,userName:n}).then(d=>{o(d.token)}))};return je.useEffect(()=>{l()},[r,i]),{getQuery:{refetch:l},token:s}},{coreLogger:AE}=xi(),Rt=AE.child("useConnectChatSocket"),OE=rr.publicUrls.wssIVSChat,xE=10,TE=t=>Math.min(1e4,1e3*Math.pow(2,t)),CE=(t,e,n)=>{const i=JSON.parse(t.data);switch(i.Type){case"EVENT":e==null||e(i);break;case"MESSAGE":n==null||n(i);break;case"ERROR":Rt.error("Chat room error:",i);break;default:Rt.error("Unknown chat room event:",t)}},Cm=t=>{const{onMessage:e,eventId:n,enabled:i=!0,userName:r,onEvent:s}=t,{token:o,getQuery:l}=Tm({eventId:n,userName:r,enabled:i}),[d,h]=nu(co),[m,y]=nu(fo),[g,O]=nu(ms),_=je.useRef(0),S=je.useCallback(z=>Rt.error("Chat room socket error:",z),[]),E=je.useCallback(()=>{y(!0),_.current=0,Rt.debug("Successfully connected to the chat room")},[y]),R=je.useCallback(()=>{if(_.current>=xE){Rt.error("Max reconnection attempts reached. No further attempts will be made.");return}y(!1),_.current+=1;const z=TE(_.current);Rt.debug(`Disconnected from chat room. Reconnecting in ${z/1e3} seconds... (Attempt ${_.current})`),setTimeout(()=>l.refetch(),z)},[l,y]),j=je.useCallback(()=>{if(!o){Rt.debug("No token available. Connection aborted.");return}if((d==null?void 0:d.readyState)===WebSocket.OPEN){Rt.debug("WebSocket is already open. No need to reconnect.");return}Rt.debug("Connecting to the chat room...");const z=Om({token:o,url:OE,onOpen:E,onClose:R,onError:S,onMessage:X=>CE(X,s,e)});h(z)},[o,d,s,e,E,R,S,h]),J=je.useCallback(()=>{if(!d||d.readyState!==WebSocket.OPEN){Rt.debug("No open socket to close.");return}Rt.debug("Closing chat room socket..."),d.close()},[d]);return je.useEffect(()=>{if(!i){Rt.debug("Chat is disabled, skipping connection.");return}if(!o){Rt.debug("Token not available, skipping connection.");return}return Rt.debug("Initializing connection with token:",o),J(),j(),J},[o,i]),{socket:d,chatIsConnected:m,chatMessageList:g,setChatMessageList:O}},RE=()=>{const t=zu(co),e=zu(fo);return{sendMessage:je.useCallback((i,r)=>{if(!t||!e)return;const s={id:r.id,sendDate:new Date,content:i,action:"SEND_MESSAGE",attributes:r},o=JSON.stringify(s);t.send(o)},[e,t])}},Rm=()=>{const t=xl(ms);return{handleEvent:i=>{var r;if(i.EventName==="senddeletemessage"){const s=JSON.parse((r=i.Attributes)==null?void 0:r.data);t(o=>o.filter(l=>l.id!==s.id))}},handleMessage:i=>{t(r=>[...r,ec(r,i)])}}},FE=t=>{const{eventId:e,userName:n}=t,[i,r]=je.useState(!1),[s,o]=je.useState(),[l,d]=je.useState(),[h,m]=je.useState([]),{handleEvent:y}=Rm(),g=xl(ms),O=j=>{g(J=>[ec(J,j),...J]),r(!1)},_=j=>{var J,z,X;if(y(j),j.EventName==="sendpinmessage"){const ne=JSON.parse((J=j.Attributes)==null?void 0:J.data);o({data:ne.data,id:ne.id,username:ne.username})}if(j.EventName==="sendunpinmessage"&&o(void 0),j.EventName==="sendhighlightproduct"){const ne=JSON.parse((z=j.Attributes)==null?void 0:z.data);d({products:ne.productIds,collection:ne.collection,livestreamingId:ne.idEvent})}if(j.EventName==="sendaddtocart"){const ne=JSON.parse((X=j.Attributes)==null?void 0:X.data);m(oe=>[...oe,{id:ne.id,sessionId:ne.sessionId,productId:ne.productId,productImageUrl:ne.productImageUrl,productName:ne.productName}])}},{socket:S,chatMessageList:E,setChatMessageList:R}=Cm({onMessage:O,onEvent:_,eventId:e,userName:n});return{socket:S,chat:E,showLoader:i,pinnedMessage:s,highlightProduct:l,productsInCart:h,setChat:R,setShowLoader:r,setPinnedMessage:o,setProductsInCart:m}};/**
|
|
85
85
|
* @license
|
|
86
86
|
* Copyright 2019 Google LLC
|
|
87
87
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
88
|
-
*/const
|
|
88
|
+
*/const ca=globalThis,tc=ca.ShadowRoot&&(ca.ShadyCSS===void 0||ca.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,nc=Symbol(),bf=new WeakMap;let Fm=class{constructor(e,n,i){if(this._$cssResult$=!0,i!==nc)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=n}get styleSheet(){let e=this.o;const n=this.t;if(tc&&e===void 0){const i=n!==void 0&&n.length===1;i&&(e=bf.get(n)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&bf.set(n,e))}return e}toString(){return this.cssText}};const IE=t=>new Fm(typeof t=="string"?t:t+"",void 0,nc),DE=(t,...e)=>{const n=t.length===1?t[0]:e.reduce((i,r,s)=>i+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+t[s+1],t[0]);return new Fm(n,t,nc)},PE=(t,e)=>{if(tc)t.adoptedStyleSheets=e.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet);else for(const n of e){const i=document.createElement("style"),r=ca.litNonce;r!==void 0&&i.setAttribute("nonce",r),i.textContent=n.cssText,t.appendChild(i)}},kf=tc?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let n="";for(const i of e.cssRules)n+=i.cssText;return IE(n)})(t):t;/**
|
|
89
89
|
* @license
|
|
90
90
|
* Copyright 2017 Google LLC
|
|
91
91
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
92
|
-
*/const{is:
|
|
92
|
+
*/const{is:LE,defineProperty:$E,getOwnPropertyDescriptor:ME,getOwnPropertyNames:BE,getOwnPropertySymbols:UE,getPrototypeOf:jE}=Object,Gn=globalThis,_f=Gn.trustedTypes,VE=_f?_f.emptyScript:"",Mu=Gn.reactiveElementPolyfillSupport,Wr=(t,e)=>t,Ol={toAttribute(t,e){switch(e){case Boolean:t=t?VE:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=t!==null;break;case Number:n=t===null?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch{n=null}}return n}},Im=(t,e)=>!LE(t,e),wf={attribute:!0,type:String,converter:Ol,reflect:!1,hasChanged:Im};var Rf,Ff;(Rf=Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(Ff=Gn.litPropertyMetadata)!=null||(Gn.litPropertyMetadata=new WeakMap);class zi extends HTMLElement{static addInitializer(e){var n;this._$Ei(),((n=this.l)!=null?n:this.l=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,n=wf){if(n.state&&(n.attribute=!1),this._$Ei(),this.elementProperties.set(e,n),!n.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(e,i,n);r!==void 0&&$E(this.prototype,e,r)}}static getPropertyDescriptor(e,n,i){var o;const{get:r,set:s}=(o=ME(this.prototype,e))!=null?o:{get(){return this[n]},set(l){this[n]=l}};return{get(){return r==null?void 0:r.call(this)},set(l){const d=r==null?void 0:r.call(this);s.call(this,l),this.requestUpdate(e,d,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){var n;return(n=this.elementProperties.get(e))!=null?n:wf}static _$Ei(){if(this.hasOwnProperty(Wr("elementProperties")))return;const e=jE(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Wr("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Wr("properties"))){const n=this.properties,i=[...BE(n),...UE(n)];for(const r of i)this.createProperty(r,n[r])}const e=this[Symbol.metadata];if(e!==null){const n=litPropertyMetadata.get(e);if(n!==void 0)for(const[i,r]of n)this.elementProperties.set(i,r)}this._$Eh=new Map;for(const[n,i]of this.elementProperties){const r=this._$Eu(n,i);r!==void 0&&this._$Eh.set(r,n)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const n=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const r of i)n.unshift(kf(r))}else e!==void 0&&n.push(kf(e));return n}static _$Eu(e,n){const i=n.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(n=>this.enableUpdating=n),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(n=>n(this))}addController(e){var n,i;((n=this._$EO)!=null?n:this._$EO=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&((i=e.hostConnected)==null||i.call(e))}removeController(e){var n;(n=this._$EO)==null||n.delete(e)}_$E_(){const e=new Map,n=this.constructor.elementProperties;for(const i of n.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){var n;const e=(n=this.shadowRoot)!=null?n:this.attachShadow(this.constructor.shadowRootOptions);return PE(e,this.constructor.elementStyles),e}connectedCallback(){var e,n;(e=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(n=this._$EO)==null||n.forEach(i=>{var r;return(r=i.hostConnected)==null?void 0:r.call(i)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(n=>{var i;return(i=n.hostDisconnected)==null?void 0:i.call(n)})}attributeChangedCallback(e,n,i){this._$AK(e,i)}_$EC(e,n){var s;const i=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,i);if(r!==void 0&&i.reflect===!0){const o=(((s=i.converter)==null?void 0:s.toAttribute)!==void 0?i.converter:Ol).toAttribute(n,i.type);this._$Em=e,o==null?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(e,n){var s;const i=this.constructor,r=i._$Eh.get(e);if(r!==void 0&&this._$Em!==r){const o=i.getPropertyOptions(r),l=typeof o.converter=="function"?{fromAttribute:o.converter}:((s=o.converter)==null?void 0:s.fromAttribute)!==void 0?o.converter:Ol;this._$Em=r,this[r]=l.fromAttribute(n,o.type),this._$Em=null}}requestUpdate(e,n,i){var r;if(e!==void 0){if(i!=null||(i=this.constructor.getPropertyOptions(e)),!((r=i.hasChanged)!=null?r:Im)(this[e],n))return;this.P(e,n,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,n,i){var r;this._$AL.has(e)||this._$AL.set(e,n),i.reflect===!0&&this._$Em!==e&&((r=this._$Ej)!=null?r:this._$Ej=new Set).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(n){Promise.reject(n)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i,r;if(!this.isUpdatePending)return;if(!this.hasUpdated){if((i=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[o,l]of this._$Ep)this[o]=l;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[o,l]of s)l.wrapped!==!0||this._$AL.has(o)||this[o]===void 0||this.P(o,this[o],l)}let e=!1;const n=this._$AL;try{e=this.shouldUpdate(n),e?(this.willUpdate(n),(r=this._$EO)==null||r.forEach(s=>{var o;return(o=s.hostUpdate)==null?void 0:o.call(s)}),this.update(n)):this._$EU()}catch(s){throw e=!1,this._$EU(),s}e&&this._$AE(n)}willUpdate(e){}_$AE(e){var n;(n=this._$EO)==null||n.forEach(i=>{var r;return(r=i.hostUpdated)==null?void 0:r.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&(this._$Ej=this._$Ej.forEach(n=>this._$EC(n,this[n]))),this._$EU()}updated(e){}firstUpdated(e){}}var If;zi.elementStyles=[],zi.shadowRootOptions={mode:"open"},zi[Wr("elementProperties")]=new Map,zi[Wr("finalized")]=new Map,Mu==null||Mu({ReactiveElement:zi}),((If=Gn.reactiveElementVersions)!=null?If:Gn.reactiveElementVersions=[]).push("2.0.4");/**
|
|
93
93
|
* @license
|
|
94
94
|
* Copyright 2017 Google LLC
|
|
95
95
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
96
|
-
*/const
|
|
97
|
-
\f\r]`,
|
|
98
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
96
|
+
*/const Jr=globalThis,Fa=Jr.trustedTypes,Sf=Fa?Fa.createPolicy("lit-html",{createHTML:t=>t}):void 0,Dm="$lit$",Hn=`lit$${Math.random().toFixed(9).slice(2)}$`,Pm="?"+Hn,HE=`<${Pm}>`,Si=document,as=()=>Si.createComment(""),os=t=>t===null||typeof t!="object"&&typeof t!="function",ic=Array.isArray,qE=t=>ic(t)||typeof(t==null?void 0:t[Symbol.iterator])=="function",Bu=`[
|
|
97
|
+
\f\r]`,Mr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ef=/-->/g,Nf=/>/g,ci=RegExp(`>|${Bu}(?:([^\\s"'>=/]+)(${Bu}*=${Bu}*(?:[^
|
|
98
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Af=/'/g,Of=/"/g,Lm=/^(?:script|style|textarea|title)$/i,zE=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),KE=zE(1),nr=Symbol.for("lit-noChange"),yt=Symbol.for("lit-nothing"),xf=new WeakMap,pi=Si.createTreeWalker(Si,129);function $m(t,e){if(!ic(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Sf!==void 0?Sf.createHTML(e):e}const GE=(t,e)=>{const n=t.length-1,i=[];let r,s=e===2?"<svg>":e===3?"<math>":"",o=Mr;for(let l=0;l<n;l++){const d=t[l];let h,m,y=-1,g=0;for(;g<d.length&&(o.lastIndex=g,m=o.exec(d),m!==null);)g=o.lastIndex,o===Mr?m[1]==="!--"?o=Ef:m[1]!==void 0?o=Nf:m[2]!==void 0?(Lm.test(m[2])&&(r=RegExp("</"+m[2],"g")),o=ci):m[3]!==void 0&&(o=ci):o===ci?m[0]===">"?(o=r!=null?r:Mr,y=-1):m[1]===void 0?y=-2:(y=o.lastIndex-m[2].length,h=m[1],o=m[3]===void 0?ci:m[3]==='"'?Of:Af):o===Of||o===Af?o=ci:o===Ef||o===Nf?o=Mr:(o=ci,r=void 0);const O=o===ci&&t[l+1].startsWith("/>")?" ":"";s+=o===Mr?d+HE:y>=0?(i.push(h),d.slice(0,y)+Dm+d.slice(y)+Hn+O):d+Hn+(y===-2?l:O)}return[$m(t,s+(t[n]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]};class us{constructor({strings:e,_$litType$:n},i){let r;this.parts=[];let s=0,o=0;const l=e.length-1,d=this.parts,[h,m]=GE(e,n);if(this.el=us.createElement(h,i),pi.currentNode=this.el.content,n===2||n===3){const y=this.el.content.firstChild;y.replaceWith(...y.childNodes)}for(;(r=pi.nextNode())!==null&&d.length<l;){if(r.nodeType===1){if(r.hasAttributes())for(const y of r.getAttributeNames())if(y.endsWith(Dm)){const g=m[o++],O=r.getAttribute(y).split(Hn),_=/([.?@])?(.*)/.exec(g);d.push({type:1,index:s,name:_[2],strings:O,ctor:_[1]==="."?JE:_[1]==="?"?YE:_[1]==="@"?XE:ho}),r.removeAttribute(y)}else y.startsWith(Hn)&&(d.push({type:6,index:s}),r.removeAttribute(y));if(Lm.test(r.tagName)){const y=r.textContent.split(Hn),g=y.length-1;if(g>0){r.textContent=Fa?Fa.emptyScript:"";for(let O=0;O<g;O++)r.append(y[O],as()),pi.nextNode(),d.push({type:2,index:++s});r.append(y[g],as())}}}else if(r.nodeType===8)if(r.data===Pm)d.push({type:2,index:s});else{let y=-1;for(;(y=r.data.indexOf(Hn,y+1))!==-1;)d.push({type:7,index:s}),y+=Hn.length-1}s++}}static createElement(e,n){const i=Si.createElement("template");return i.innerHTML=e,i}}function ir(t,e,n=t,i){var o,l,d;if(e===nr)return e;let r=i!==void 0?(o=n.o)==null?void 0:o[i]:n.l;const s=os(e)?void 0:e._$litDirective$;return(r==null?void 0:r.constructor)!==s&&((l=r==null?void 0:r._$AO)==null||l.call(r,!1),s===void 0?r=void 0:(r=new s(t),r._$AT(t,n,i)),i!==void 0?((d=n.o)!=null?d:n.o=[])[i]=r:n.l=r),r!==void 0&&(e=ir(t,r._$AS(t,e.values),r,i)),e}class WE{constructor(e,n){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var h;const{el:{content:n},parts:i}=this._$AD,r=((h=e==null?void 0:e.creationScope)!=null?h:Si).importNode(n,!0);pi.currentNode=r;let s=pi.nextNode(),o=0,l=0,d=i[0];for(;d!==void 0;){if(o===d.index){let m;d.type===2?m=new gs(s,s.nextSibling,this,e):d.type===1?m=new d.ctor(s,d.name,d.strings,this,e):d.type===6&&(m=new QE(s,this,e)),this._$AV.push(m),d=i[++l]}o!==(d==null?void 0:d.index)&&(s=pi.nextNode(),o++)}return pi.currentNode=Si,r}p(e){let n=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,n),n+=i.strings.length-2):i._$AI(e[n])),n++}}class gs{get _$AU(){var e,n;return(n=(e=this._$AM)==null?void 0:e._$AU)!=null?n:this.v}constructor(e,n,i,r){var s;this.type=2,this._$AH=yt,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=i,this.options=r,this.v=(s=r==null?void 0:r.isConnected)!=null?s:!0}get parentNode(){let e=this._$AA.parentNode;const n=this._$AM;return n!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=n.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,n=this){e=ir(this,e,n),os(e)?e===yt||e==null||e===""?(this._$AH!==yt&&this._$AR(),this._$AH=yt):e!==this._$AH&&e!==nr&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):qE(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==yt&&os(this._$AH)?this._$AA.nextSibling.data=e:this.T(Si.createTextNode(e)),this._$AH=e}$(e){var s;const{values:n,_$litType$:i}=e,r=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=us.createElement($m(i.h,i.h[0]),this.options)),i);if(((s=this._$AH)==null?void 0:s._$AD)===r)this._$AH.p(n);else{const o=new WE(r,this),l=o.u(this.options);o.p(n),this.T(l),this._$AH=o}}_$AC(e){let n=xf.get(e.strings);return n===void 0&&xf.set(e.strings,n=new us(e)),n}k(e){ic(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let i,r=0;for(const s of e)r===n.length?n.push(i=new gs(this.O(as()),this.O(as()),this,this.options)):i=n[r],i._$AI(s),r++;r<n.length&&(this._$AR(i&&i._$AB.nextSibling,r),n.length=r)}_$AR(e=this._$AA.nextSibling,n){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,n);e&&e!==this._$AB;){const r=e.nextSibling;e.remove(),e=r}}setConnected(e){var n;this._$AM===void 0&&(this.v=e,(n=this._$AP)==null||n.call(this,e))}}class ho{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,n,i,r,s){this.type=1,this._$AH=yt,this._$AN=void 0,this.element=e,this.name=n,this._$AM=r,this.options=s,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=yt}_$AI(e,n=this,i,r){const s=this.strings;let o=!1;if(s===void 0)e=ir(this,e,n,0),o=!os(e)||e!==this._$AH&&e!==nr,o&&(this._$AH=e);else{const l=e;let d,h;for(e=s[0],d=0;d<s.length-1;d++)h=ir(this,l[i+d],n,d),h===nr&&(h=this._$AH[d]),o||(o=!os(h)||h!==this._$AH[d]),h===yt?e=yt:e!==yt&&(e+=(h!=null?h:"")+s[d+1]),this._$AH[d]=h}o&&!r&&this.j(e)}j(e){e===yt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e!=null?e:"")}}class JE extends ho{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===yt?void 0:e}}class YE extends ho{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==yt)}}class XE extends ho{constructor(e,n,i,r,s){super(e,n,i,r,s),this.type=5}_$AI(e,n=this){var o;if((e=(o=ir(this,e,n,0))!=null?o:yt)===nr)return;const i=this._$AH,r=e===yt&&i!==yt||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,s=e!==yt&&(i===yt||r);r&&this.element.removeEventListener(this.name,this,i),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var n,i;typeof this._$AH=="function"?this._$AH.call((i=(n=this.options)==null?void 0:n.host)!=null?i:this.element,e):this._$AH.handleEvent(e)}}class QE{constructor(e,n,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){ir(this,e)}}const Uu=Jr.litHtmlPolyfillSupport;var Df;Uu==null||Uu(us,gs),((Df=Jr.litHtmlVersions)!=null?Df:Jr.litHtmlVersions=[]).push("3.2.0");const ZE=(t,e,n)=>{var s,o;const i=(s=n==null?void 0:n.renderBefore)!=null?s:e;let r=i._$litPart$;if(r===void 0){const l=(o=n==null?void 0:n.renderBefore)!=null?o:null;i._$litPart$=r=new gs(e.insertBefore(as(),l),l,void 0,n!=null?n:{})}return r._$AI(t),r};/**
|
|
99
99
|
* @license
|
|
100
100
|
* Copyright 2017 Google LLC
|
|
101
101
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
102
|
-
*/class
|
|
102
|
+
*/class Yr extends zi{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){var n,i;const e=super.createRenderRoot();return(i=(n=this.renderOptions).renderBefore)!=null||(n.renderBefore=e.firstChild),e}update(e){const n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this.o=ZE(n,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this.o)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.o)==null||e.setConnected(!1)}render(){return nr}}var Pf;Yr._$litElement$=!0,Yr.finalized=!0,(Pf=globalThis.litElementHydrateSupport)==null||Pf.call(globalThis,{LitElement:Yr});const ju=globalThis.litElementPolyfillSupport;ju==null||ju({LitElement:Yr});var Lf;((Lf=globalThis.litElementVersions)!=null?Lf:globalThis.litElementVersions=[]).push("4.1.0");/**
|
|
103
103
|
* @license
|
|
104
104
|
* Copyright 2020 Google LLC
|
|
105
105
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
106
|
-
*/const
|
|
106
|
+
*/const eN=t=>t.strings===void 0;/**
|
|
107
107
|
* @license
|
|
108
108
|
* Copyright 2017 Google LLC
|
|
109
109
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
110
|
-
*/const
|
|
110
|
+
*/const tN={CHILD:2},nN=t=>(...e)=>({_$litDirective$:t,values:e});class iN{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,n,i){this.t=e,this._$AM=n,this.i=i}_$AS(e,n){return this.update(e,n)}update(e,n){return this.render(...n)}}/**
|
|
111
111
|
* @license
|
|
112
112
|
* Copyright 2017 Google LLC
|
|
113
113
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
114
|
-
*/const
|
|
114
|
+
*/const Xr=(t,e)=>{var i;const n=t._$AN;if(n===void 0)return!1;for(const r of n)(i=r._$AO)==null||i.call(r,e,!1),Xr(r,e);return!0},Ia=t=>{let e,n;do{if((e=t._$AM)===void 0)break;n=e._$AN,n.delete(t),t=e}while((n==null?void 0:n.size)===0)},Mm=t=>{for(let e;e=t._$AM;t=e){let n=e._$AN;if(n===void 0)e._$AN=n=new Set;else if(n.has(t))break;n.add(t),aN(e)}};function rN(t){this._$AN!==void 0?(Ia(this),this._$AM=t,Mm(this)):this._$AM=t}function sN(t,e=!1,n=0){const i=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(e)if(Array.isArray(i))for(let s=n;s<i.length;s++)Xr(i[s],!1),Ia(i[s]);else i!=null&&(Xr(i,!1),Ia(i));else Xr(this,t)}const aN=t=>{var e,n;t.type==tN.CHILD&&((e=t._$AP)!=null||(t._$AP=sN),(n=t._$AQ)!=null||(t._$AQ=rN))};class oN extends iN{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,n,i){super._$AT(e,n,i),Mm(this),this.isConnected=e._$AU}_$AO(e,n=!0){var i,r;e!==this.isConnected&&(this.isConnected=e,e?(i=this.reconnected)==null||i.call(this):(r=this.disconnected)==null||r.call(this)),n&&(Xr(this,e),Ia(this))}setValue(e){if(eN(this.t))this.t._$AI(e,this);else{const n=[...this.t._$AH];n[this.i]=e,this.t._$AI(n,this,0)}}disconnected(){}reconnected(){}}/**
|
|
115
115
|
* @license
|
|
116
116
|
* Copyright 2020 Google LLC
|
|
117
117
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
118
|
-
*/const
|
|
118
|
+
*/const uN=()=>new lN;class lN{}const Vu=new WeakMap,cN=nN(class extends oN{render(t){return yt}update(t,[e]){var i;const n=e!==this.Y;return n&&this.Y!==void 0&&this.rt(void 0),(n||this.lt!==this.ct)&&(this.Y=e,this.ht=(i=t.options)==null?void 0:i.host,this.rt(this.ct=t.element)),yt}rt(t){var e;if(this.isConnected||(t=void 0),typeof this.Y=="function"){const n=(e=this.ht)!=null?e:globalThis;let i=Vu.get(n);i===void 0&&(i=new WeakMap,Vu.set(n,i)),i.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),i.set(this.Y,t),t!==void 0&&this.Y.call(this.ht,t)}else this.Y.value=t}get lt(){var t,e,n;return typeof this.Y=="function"?(e=Vu.get((t=this.ht)!=null?t:globalThis))==null?void 0:e.get(this.Y):(n=this.Y)==null?void 0:n.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var Qs={},Tf;function dN(){if(Tf)return Qs;Tf=1;var t=gg;return Qs.createRoot=t.createRoot,Qs.hydrateRoot=t.hydrateRoot,Qs}var fN=dN();class Bm extends Yr{constructor(){super(...arguments);me(this,"rootRef",uN());me(this,"rootInstance")}render(){return KE`<div ${cN(this.rootRef)}></div>`}updated(){this.updateReactComponent()}updateReactComponent(){if(!this.rootRef.value)return;this.rootInstance||(this.rootInstance=fN.createRoot(this.rootRef.value));const n=je.createElement(this.getReactComponent(),this.getReactProps(),je.createElement("slot"));this.rootInstance.render(n)}handleHMR(n){}injectStyles(n){const i=r=>r.replace("./","");for(const[r,s]of Object.entries(n)){const o=i(r),l=document.createElement("style");l.setAttribute("type","text/css"),l.setAttribute("id",o),l.innerHTML=s,setTimeout(()=>{var d;return(d=this.shadowRoot)==null?void 0:d.appendChild(l)})}}setupHMRListener(){}}me(Bm,"baseStyles",DE`
|
|
119
119
|
:host {
|
|
120
120
|
width: 100%;
|
|
121
121
|
}
|
|
122
|
-
`);class
|
|
122
|
+
`);class Um{constructor(e,n,i){me(this,"renderFn");me(this,"logger");me(this,"rootId");me(this,"element",null);me(this,"unmount");me(this,"updateProps");this.rootId=e,this.renderFn=n,this.logger=i}async render(e={}){var n;if(this.element)this.updateProps(e);else{const i=await this.renderFn(this.rootId,e);this.element=(n=i==null?void 0:i.element)!=null?n:null,this.updateProps=r=>i==null?void 0:i.updateProps(r),this.unmount=()=>{i==null||i.unmount(),this.element=null}}}}class po{constructor(e){this.config=e}static isApplicable(e){return Hl.LOCAL===e.bundler.stage}async execute(){var n;const{runtime:e}=this.config;(n=e.env)!=null&&n.account?await e.configureStore(e.env):e.logger.warn("missing account in local environment")}}me(po,"type",Rn.Local);const hN=window==null?void 0:window.__NZ_APP__;class rc{constructor(e){this.config=e}static isApplicable(){return hN==="platform"}async execute(){}}me(rc,"type",Rn.Platform);const Zs=window==null?void 0:window.faststore_sdk_stores;class sc{constructor(e){this.config=e;const n={vtexfaststore:Zs};this.config.runtime.updateMeta(n)}static isApplicable(){return!!Zs}async execute(){const{runtime:e}=this.config;if(!Zs.account){e.logger.error("missing the account in window.faststore_sdk_stores");return}await e.configureStore({account:Zs.account})}}me(sc,"type",Rn.VtexFastStore);const ea=window==null?void 0:window.__RUNTIME__;class mo{constructor(e){this.config=e;const n={vtexio:ea};this.config.runtime.updateMeta(n)}static isApplicable(){return!!ea}async execute(){const{runtime:e}=this.config;if(!ea.account){e.logger.error("missing the account in window.__RUNTIME__");return}await e.configureStore({account:ea.account})}}me(mo,"type",Rn.VtexIO);const Cf=window==null?void 0:window.vtexjs;class go{constructor(e){this.config=e;const n={vtexjs:Cf};this.config.runtime.updateMeta(n)}static isApplicable(){return!!Cf}async execute(){const{runtime:e}=this.config;let n={};const i=`${e.componentId.value}-script`,r=Qh(i);if(n=Object.fromEntries(r.entries()),!n.account){e.logger.error(`missing the account in the search params of the script #${i}`);return}await e.configureStore({account:n.account})}}me(go,"type",Rn.VtexLegacy);class ac{constructor(e){this.config=e}static isApplicable(e){return!po.isApplicable(e)&&!mo.isApplicable()&&!go.isApplicable()&&!sc.isApplicable()&&!rc.isApplicable()}async execute(){}}me(ac,"type",Rn.External);const jm=[po,mo,go,ac,sc,rc];class pN{constructor(e){me(this,"globalId");me(this,"metadata");me(this,"customConfigList");me(this,"env");me(this,"bundler");me(this,"logger");me(this,"componentId");me(this,"renderHandler");me(this,"store");this.globalId=e.globalId,this.store=e.getStore(),this.logger=e.logger.child("Runtime"),this.env=e.env,this.bundler=e.bundler,this.customConfigList=new Map,this.metadata={type:Rn.External},this.initializeGlobals()}config(e,n,i){typeof n=="function"&&(i=n,n={});const{skipBaseBehavior:r=!1}=n;return this.customConfigList.set(e,{callback:i,skipBaseBehavior:r}),this}registerComponent(e,n){const i=this.toCamel(e);if(window[this.globalId][i])return this.logger.debug(`Component "${i}" is already registered.`),this;this.componentId={value:e,formatted:i},this.renderHandler=n;const r={render:this.renderHandler};return window[this.globalId][this.componentId.formatted]=r,this.logger.debug(`Component "${i}" registered.`),this}async execute(e){for(const n of jm)if(n.isApplicable(this)){const i=new n({runtime:this}),r=this.customConfigList.get(n.type);this.updateMeta({type:n.type}),r!=null&&r.skipBaseBehavior||await i.execute(),r&&await r.callback({runtime:this,component:new Um(this.componentId.value,this.renderHandler,this.logger)});break}await(e==null?void 0:e())}updateMeta(e){this.metadata={...this.metadata,...e}}async configureStore(e){await this.store.configure(e)}get meta(){return this.metadata}initializeGlobals(){var i;if(window[this.globalId]||(window[this.globalId]={},this.logger.debug(`Initialized "${this.globalId}" window object`)),(i=window[this.globalId])!=null&&i.runtime){this.logger.debug(`Runtime for "${this.globalId}" are already initialized.`);return}const e=()=>Object.freeze({...this.metadata}),n=()=>Object.freeze({isProd:this.bundler.isProd,get meta(){return e()}});Object.defineProperty(window[this.globalId],"runtime",{get:()=>n()}),this.logger.debug(`Initialized runtime for "${this.globalId}".`)}toCamel(e){return e.replace(/^[a-z]{2}-/,"").replace(/-./g,n=>n[1].toUpperCase())}}exports.AccountContractStatusTypes=sp;exports.AccountContractTypes=rp;exports.AccountInvalidError=Gf;exports.AccountNotFoundError=Vl;exports.AccountPlanDescriptionTypes=op;exports.AccountService=hp;exports.AccountSubscriptionTypes=ap;exports.AccountTypes=ip;exports.AddToCartActionTypes=Za;exports.AggregateRoot=Sp;exports.ApiGraphqlTypes=Nk;exports.BaseDB=Uh;exports.BroadcastChannelEventBus=jh;exports.ComponentManager=Um;exports.CreatePlanError=cp;exports.DependencyInjector=Yl;exports.DomainError=Cn;exports.ErrorCodes=xt;exports.EventBusWildcards=pb;exports.EventChatRoom=lo;exports.EventChatRoomService=Nm;exports.EventChatRoomTokenError=Sm;exports.EventNames=Hh;exports.ExternalRuntime=ac;exports.GlobalPageSectionTypes=up;exports.GraphqlEventChatRoomRepository=Em;exports.HttpAxiosClient=Fw;exports.InvalidNizzaGlobalObjectError=Wf;exports.LanguageTypes=qh;exports.LocalRuntime=po;exports.LogLevel=ot;exports.LogLevelPriority=Ze;exports.Logger=Jh;exports.MAX_PRODUCTS_IN_CART=hb;exports.NizzaEventStatus=Vh;exports.NizzaProductRequestOriginTypes=Gh;exports.NizzaStore=Sa;exports.NizzaVariationTypes=Kh;exports.PlanNotFoundError=lp;exports.PriorityToLogLevelMap=zh;exports.ReactHostElement=Bm;exports.ResourceNotFoundError=nv;exports.RestAccountPlanRepository=dp;exports.RestPublicAccountRepository=fp;exports.Runtime=pN;exports.RuntimeStage=Hl;exports.RuntimeType=Rn;exports.Scope=hi;exports.StoreProvider=Yy;exports.UnexpectedError=Fl;exports.ValueObject=Fk;exports.VtexIORuntime=mo;exports.VtexLegacyRuntime=go;exports.accountAtom=Vf;exports.accountService=pp;exports.addQuestionData=Am;exports.addToCartMessages=fl;exports.apiCall=Pg;exports.applyScopeInternal=om;exports.buildLanguageTranslations=um;exports.buildTranslations=lm;exports.chatIsConnectedAtom=fo;exports.chatMessageListAtom=ms;exports.chatSocketAtom=co;exports.connectToSocket=Om;exports.createActionFactory=wp;exports.createAggregateRoot=Ep;exports.createNizzaLogger=Nb;exports.createPinoLogger=Yh;exports.createStore=Ak;exports.customFetch=vi;exports.downloadFile=Lg;exports.eventChatRoomService=Al;exports.fileOrigin=xb;exports.getAccount=gp;exports.getBrandiTagInternal=Jl;exports.getClientMetadata=np;exports.getClientTimeZone=tp;exports.getNizza=xi;exports.getRandomColor=xm;exports.getScriptParams=Qh;exports.getStore=Qy;exports.getTokenInternal=qi;exports.getUserFriendlyMessage=Qp;exports.i18Init=fm;exports.isClassProvider=im;exports.isFactoryProvider=sm;exports.isOptionalDependencyDef=Wl;exports.isValueProvider=rm;exports.jsDownload=Hf;exports.key=Iw;exports.normalizeChatMessage=ec;exports.optional=Pw;exports.registerTranslations=kS;exports.registerTranslationsOf=cm;exports.resolveConditionInternal=am;exports.resolveDependenciesInternal=wl;exports.runAddToCartHooks=xk;exports.runtimeList=jm;exports.searchParams=Xh;exports.shortId=wa;exports.sleep=Tb;exports.tag=Dw;exports.tokens=Lw;exports.useAccount=mp;exports.useAutorun=Wy;exports.useChatSocketActions=RE;exports.useChatSocketClient=FE;exports.useChatSocketHandlers=Rm;exports.useConnectChatSocket=Cm;exports.useEventChatRoom=Tm;exports.useMetaDataClient=_S;exports.useNZ=Zh;exports.useNizza=ep;exports.useReaction=Jy;exports.useSelect=Bh;exports.useStore=Xy;exports.validateRequiredProps=iv;
|
|
123
123
|
//# sourceMappingURL=index.cjs.map
|