@nizza/core 0.5.0-beta.12 → 0.5.0-beta.14

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 CHANGED
@@ -1,21 +1,7 @@
1
- "use strict";var fn=Object.defineProperty;var pn=(n,e,t)=>e in n?fn(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var R=(n,e,t)=>(pn(n,typeof e!="symbol"?e+"":e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("react"),hn=require("react/jsx-runtime");function gn(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const M=gn(j);var _={NZ_AWS_REGION:"us-east-1",NZ_VTEX_PROJECT:"/Users/jbermudez/TODO/PROJECTS/live-shopping",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};let kn=0;function vn(n,e){const t=`atom${++kn}`,i={toString:()=>t};return typeof n=="function"?i.read=n:(i.init=n,i.read=function(a){return a(this)},i.write=function(a,s,r){return s(this,typeof r=="function"?r(a(this)):r)}),e&&(i.write=e),i}const Ne=n=>"init"in n,be=n=>!!n.write,le=new WeakMap,Sn=(n,e)=>{le.set(n,e),n.catch(()=>{}).finally(()=>le.delete(n))},je=(n,e)=>{const t=le.get(n);t&&(le.delete(n),t(e))},Me=(n,e)=>{n.status="fulfilled",n.value=e},$e=(n,e)=>{n.status="rejected",n.reason=e},yn=n=>typeof(n==null?void 0:n.then)=="function",J=(n,e)=>!!n&&"v"in n&&"v"in e&&Object.is(n.v,e.v),ze=(n,e)=>!!n&&"e"in n&&"e"in e&&Object.is(n.e,e.e),z=n=>!!n&&"v"in n&&n.v instanceof Promise,Nn=(n,e)=>"v"in n&&"v"in e&&n.v.orig&&n.v.orig===e.v.orig,ae=n=>{if("e"in n)throw n.e;return n.v},vt=()=>{const n=new WeakMap,e=new WeakMap,t=new Map;let i,a;(_?"production":void 0)!=="production"&&(i=new Set,a=new Set);const s=m=>n.get(m),r=(m,p)=>{(_?"production":void 0)!=="production"&&Object.freeze(p);const h=n.get(m);if(n.set(m,p),t.has(m)||t.set(m,h),z(h)){const g="v"in p?p.v instanceof Promise?p.v:Promise.resolve(p.v):Promise.reject(p.e);h.v!==g&&je(h.v,g)}},o=(m,p,h)=>{const g=new Map;let b=!1;h.forEach((C,v)=>{!C&&v===m&&(C=p),C?(g.set(v,C),p.d.get(v)!==C&&(b=!0)):(_?"production":void 0)!=="production"&&console.warn("[Bug] atom state not found")}),(b||p.d.size!==g.size)&&(p.d=g)},l=(m,p,h)=>{const g=s(m),b={d:(g==null?void 0:g.d)||new Map,v:p};if(h&&o(m,b,h),J(g,b)&&g.d===b.d)return g;if(z(g)&&z(b)&&Nn(g,b)){if(g.d===b.d)return g;b.v=g.v}return r(m,b),b},u=(m,p,h,g)=>{if(yn(p)){let b;const C=()=>{const E=s(m);if(!z(E)||E.v!==v)return;const P=l(m,v,h);e.has(m)&&E.d!==P.d&&D(m,P,E.d)},v=new Promise((E,P)=>{let O=!1;p.then(T=>{O||(O=!0,Me(v,T),E(T),C())},T=>{O||(O=!0,$e(v,T),P(T),C())}),b=T=>{O||(O=!0,T.then(V=>Me(v,V),V=>$e(v,V)),E(T))}});return v.orig=p,v.status="pending",Sn(v,E=>{E&&b(E),g==null||g()}),l(m,v,h)}return l(m,p,h)},d=(m,p,h)=>{const g=s(m),b={d:(g==null?void 0:g.d)||new Map,e:p};return h&&o(m,b,h),ze(g,b)&&g.d===b.d?g:(r(m,b),b)},f=(m,p)=>{const h=s(m);if(!p&&h&&(e.has(m)||Array.from(h.d).every(([O,T])=>{if(O===m)return!0;const V=f(O);return V===T||J(V,T)})))return h;const g=new Map;let b=!0;const C=O=>{if(O===m){const V=s(O);if(V)return g.set(O,V),ae(V);if(Ne(O))return g.set(O,void 0),O.init;throw new Error("no atom init")}const T=f(O);return g.set(O,T),ae(T)};let v,E;const P={get signal(){return v||(v=new AbortController),v.signal},get setSelf(){return(_?"production":void 0)!=="production"&&!be(m)&&console.warn("setSelf function cannot be used with read-only atom"),!E&&be(m)&&(E=(...O)=>{if((_?"production":void 0)!=="production"&&b&&console.warn("setSelf function cannot be called in sync"),!b)return F(m,...O)}),E}};try{const O=m.read(C,P);return u(m,O,g,()=>v==null?void 0:v.abort())}catch(O){return d(m,O,g)}finally{b=!1}},c=m=>ae(f(m)),S=m=>{let p=e.get(m);return p||(p=I(m)),p},y=(m,p)=>!p.l.size&&(!p.t.size||p.t.size===1&&p.t.has(m)),k=m=>{const p=e.get(m);p&&y(m,p)&&w(m)},N=m=>{const p=new Map,h=new WeakMap,g=v=>{var E;const P=new Set((E=e.get(v))==null?void 0:E.t);return t.forEach((O,T)=>{var V;(V=s(T))!=null&&V.d.has(v)&&P.add(T)}),P},b=v=>{g(v).forEach(E=>{E!==v&&(p.set(E,(p.get(E)||new Set).add(v)),h.set(E,(h.get(E)||0)+1),b(E))})};b(m);const C=v=>{g(v).forEach(E=>{var P;if(E!==v){let O=h.get(E);if(O&&h.set(E,--O),!O){let T=!!((P=p.get(E))!=null&&P.size);if(T){const V=s(E),ie=f(E,!0);T=!J(V,ie)}T||p.forEach(V=>V.delete(E))}C(E)}})};C(m)},x=(m,...p)=>{let h=!0;const g=v=>ae(f(v)),b=(v,...E)=>{let P;if(v===m){if(!Ne(v))throw new Error("atom not writable");const O=s(v),T=u(v,E[0]);J(O,T)||N(v)}else P=x(v,...E);if(!h){const O=L();(_?"production":void 0)!=="production"&&i.forEach(T=>T({type:"async-write",flushed:O}))}return P},C=m.write(g,b,...p);return h=!1,C},F=(m,...p)=>{const h=x(m,...p),g=L();return(_?"production":void 0)!=="production"&&i.forEach(b=>b({type:"write",flushed:g})),h},I=(m,p,h)=>{var g;const b=h||[];(g=s(m))==null||g.d.forEach((v,E)=>{const P=e.get(E);P?P.t.add(m):E!==m&&I(E,m,b)}),f(m);const C={t:new Set(p&&[p]),l:new Set};if(e.set(m,C),(_?"production":void 0)!=="production"&&a.add(m),be(m)&&m.onMount){const{onMount:v}=m;b.push(()=>{const E=v((...P)=>F(m,...P));E&&(C.u=E)})}return h||b.forEach(v=>v()),C},w=m=>{var p;const h=(p=e.get(m))==null?void 0:p.u;h&&h(),e.delete(m),(_?"production":void 0)!=="production"&&a.delete(m);const g=s(m);g?(z(g)&&je(g.v),g.d.forEach((b,C)=>{if(C!==m){const v=e.get(C);v&&(v.t.delete(m),y(C,v)&&w(C))}})):(_?"production":void 0)!=="production"&&console.warn("[Bug] could not find atom state to unmount",m)},D=(m,p,h)=>{const g=new Set(p.d.keys());h==null||h.forEach((b,C)=>{if(g.has(C)){g.delete(C);return}const v=e.get(C);v&&(v.t.delete(m),y(C,v)&&w(C))}),g.forEach(b=>{const C=e.get(b);C?C.t.add(m):e.has(m)&&I(b,m)})},L=()=>{let m;for((_?"production":void 0)!=="production"&&(m=new Set);t.size;){const p=Array.from(t);t.clear(),p.forEach(([h,g])=>{const b=s(h);if(b){const C=e.get(h);C&&b.d!==(g==null?void 0:g.d)&&D(h,b,g==null?void 0:g.d),C&&!(!z(g)&&(J(g,b)||ze(g,b)))&&(C.l.forEach(v=>v()),(_?"production":void 0)!=="production"&&m.add(h))}else(_?"production":void 0)!=="production"&&console.warn("[Bug] no atom state to flush")})}if((_?"production":void 0)!=="production")return m},A=(m,p)=>{const h=S(m),g=L(),b=h.l;return b.add(p),(_?"production":void 0)!=="production"&&i.forEach(C=>C({type:"sub",flushed:g})),()=>{b.delete(p),k(m),(_?"production":void 0)!=="production"&&i.forEach(C=>C({type:"unsub"}))}};return(_?"production":void 0)!=="production"?{get:c,set:F,sub:A,dev_subscribe_store:(m,p)=>{if(p!==2)throw new Error("The current StoreListener revision is 2.");return i.add(m),()=>{i.delete(m)}},dev_get_mounted_atoms:()=>a.values(),dev_get_atom_state:m=>n.get(m),dev_get_mounted:m=>e.get(m),dev_restore_atoms:m=>{for(const[h,g]of m)Ne(h)&&(u(h,g),N(h));const p=L();i.forEach(h=>h({type:"restore",flushed:p}))}}:{get:c,set:F,sub:A}};let Fe;(_?"production":void 0)!=="production"&&(typeof globalThis.__NUMBER_OF_JOTAI_INSTANCES__=="number"?++globalThis.__NUMBER_OF_JOTAI_INSTANCES__:globalThis.__NUMBER_OF_JOTAI_INSTANCES__=1);const bn=()=>(Fe||((_?"production":void 0)!=="production"&&globalThis.__NUMBER_OF_JOTAI_INSTANCES__!==1&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"),Fe=vt()),Fe);var Fn={NZ_AWS_REGION:"us-east-1",NZ_VTEX_PROJECT:"/Users/jbermudez/TODO/PROJECTS/live-shopping",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const wn=j.createContext(void 0),St=n=>{const e=j.useContext(wn);return(n==null?void 0:n.store)||e||bn()},Cn=n=>typeof(n==null?void 0:n.then)=="function",En=j.use||(n=>{if(n.status==="pending")throw n;if(n.status==="fulfilled")return n.value;throw n.status==="rejected"?n.reason:(n.status="pending",n.then(e=>{n.status="fulfilled",n.value=e},e=>{n.status="rejected",n.reason=e}),n)});function On(n,e){const t=St(e),[[i,a,s],r]=j.useReducer(u=>{const d=t.get(n);return Object.is(u[0],d)&&u[1]===t&&u[2]===n?u:[d,t,n]},void 0,()=>[t.get(n),t,n]);let o=i;(a!==t||s!==n)&&(r(),o=t.get(n));const l=e==null?void 0:e.delay;return j.useEffect(()=>{const u=t.sub(n,()=>{if(typeof l=="number"){setTimeout(r,l);return}r()});return r(),u},[t,n,l]),j.useDebugValue(o),Cn(o)?En(o):o}function xn(n,e){const t=St(e);return j.useCallback((...a)=>{if((Fn?"production":void 0)!=="production"&&!("write"in n))throw new Error("not writable atom");return t.set(n,...a)},[t,n])}function Rn(n,e){return[On(n,e),xn(n,e)]}const ge=vn(null);ge.debugLabel="accountAtom";var Tn={NZ_AWS_REGION:"us-east-1",NZ_VTEX_PROJECT:"/Users/jbermudez/TODO/PROJECTS/live-shopping",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{NZ_AWS_REGION:In,NZ_BACKOFFICE_BACK_URL:Dn,NZ_CORE_SERVICES_GRAPHQL_URL:Ln,NZ_CORE_SERVICES_REST_URL:An}=Tn,Pn={AWS:{region:In,cognito:{userPoolId:"us-east-1_knSlGEmJ0",userPoolWebClientId:"3hmbfhf7nl3kq20qr9i5lihf1p"}},apiUrls:{restV1:Dn||"https://pabprg32bj.execute-api.us-east-1.amazonaws.com",restV2:An||"https://core-services-dev.nizza.com/api",graphql:Ln||"https://core-services-dev.nizza.com/graphql",corsProxy:"https://1qmd8jteh1.execute-api.us-east-1.amazonaws.com"},publicUrls:{platformSite:"https://platformdev.nizza.com",nizzaCdn:"https://cdn.nizza.com",bundleSite:"https://bundledev.nizza.com",wssIVSChat:"wss://edge.ivschat.us-east-1.amazonaws.com"}};async function Re(n){const{url:e,method:t="GET",body:i,raw:a=!1,contentTypeJson:s=!0,timeout:r,...o}=n,l=s&&!n.headers?new Headers({"content-type":"application/json"}):n.headers;try{const u=new AbortController,{signal:d}=u;let f;const c=fetch(e,{method:t,headers:l,body:i,signal:d,...o});r&&(f=setTimeout(()=>{u.abort()},r));const S=await c;if(a)return S;const y=await S.json();if(clearTimeout(f),!S.ok){const k=y?JSON.stringify(y):S.statusText;throw new Error(k)}return y}catch(u){throw console.error("[CustomFetch] ",u),u}}const Vn=n=>Re({...n,contentTypeJson:!1,raw:!1});function _n(n,e,t){fetch(e).then(i=>i.blob()).then(i=>yt(i,`${n}.${t}`))}const yt=(n,e,t)=>{const i=[n],a=new Blob(i,{type:t!=null?t:"application/octet-stream"});if(typeof window.navigator.msSaveBlob!="undefined")return window.navigator.msSaveBlob(a,e);const s=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(a):window.webkitURL.createObjectURL(a),r=document.createElement("a");return r.style.display="none",r.href=s,r.setAttribute("download",e),typeof r.download=="undefined"&&r.setAttribute("target","_blank"),document.body.appendChild(r),r.click(),setTimeout(()=>{document.body.removeChild(r),window.URL.revokeObjectURL(s)},200)};var Un={NZ_AWS_REGION:"us-east-1",NZ_VTEX_PROJECT:"/Users/jbermudez/TODO/PROJECTS/live-shopping",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const Be=n=>{let e;const t=new Set,i=(l,u)=>{const d=typeof l=="function"?l(e):l;if(!Object.is(d,e)){const f=e;e=(u!=null?u:typeof d!="object"||d===null)?d:Object.assign({},e,d),t.forEach(c=>c(e,f))}},a=()=>e,o={setState:i,getState:a,subscribe:l=>(t.add(l),()=>t.delete(l)),destroy:()=>{(Un?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),t.clear()}};return e=n(i,a,o),o},jn=n=>n?Be(n):Be;var Nt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Te(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var bt={exports:{}},Ft={},wt={exports:{}},Ct={};/**
2
- * @license React
3
- * use-sync-external-store-shim.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var q=j;function Mn(n,e){return n===e&&(n!==0||1/n===1/e)||n!==n&&e!==e}var $n=typeof Object.is=="function"?Object.is:Mn,zn=q.useState,Bn=q.useEffect,Qn=q.useLayoutEffect,Gn=q.useDebugValue;function Kn(n,e){var t=e(),i=zn({inst:{value:t,getSnapshot:e}}),a=i[0].inst,s=i[1];return Qn(function(){a.value=t,a.getSnapshot=e,we(a)&&s({inst:a})},[n,t,e]),Bn(function(){return we(a)&&s({inst:a}),n(function(){we(a)&&s({inst:a})})},[n]),Gn(t),t}function we(n){var e=n.getSnapshot;n=n.value;try{var t=e();return!$n(n,t)}catch{return!0}}function Wn(n,e){return e()}var qn=typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"?Wn:Kn;Ct.useSyncExternalStore=q.useSyncExternalStore!==void 0?q.useSyncExternalStore:qn;wt.exports=Ct;var Et=wt.exports;/**
10
- * @license React
11
- * use-sync-external-store-shim/with-selector.production.min.js
12
- *
13
- * Copyright (c) Facebook, Inc. and its affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var ke=j,Jn=Et;function Hn(n,e){return n===e&&(n!==0||1/n===1/e)||n!==n&&e!==e}var Zn=typeof Object.is=="function"?Object.is:Hn,Xn=Jn.useSyncExternalStore,Yn=ke.useRef,ei=ke.useEffect,ti=ke.useMemo,ni=ke.useDebugValue;Ft.useSyncExternalStoreWithSelector=function(n,e,t,i,a){var s=Yn(null);if(s.current===null){var r={hasValue:!1,value:null};s.current=r}else r=s.current;s=ti(function(){function l(S){if(!u){if(u=!0,d=S,S=i(S),a!==void 0&&r.hasValue){var y=r.value;if(a(y,S))return f=y}return f=S}if(y=f,Zn(d,S))return y;var k=i(S);return a!==void 0&&a(y,k)?y:(d=S,f=k)}var u=!1,d,f,c=t===void 0?null:t;return[function(){return l(e())},c===null?void 0:function(){return l(c())}]},[e,t,i,a]);var o=Xn(n,s[0],s[1]);return ei(function(){r.hasValue=!0,r.value=o},[o]),ni(o),o};bt.exports=Ft;var ii=bt.exports;const ai=Te(ii);var Ot={NZ_AWS_REGION:"us-east-1",NZ_VTEX_PROJECT:"/Users/jbermudez/TODO/PROJECTS/live-shopping",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{useDebugValue:si}=j,{useSyncExternalStoreWithSelector:ri}=ai;let Qe=!1;function oi(n,e=n.getState,t){(Ot?"production":void 0)!=="production"&&t&&!Qe&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),Qe=!0);const i=ri(n.subscribe,n.getState,n.getServerState||n.getState,e,t);return si(i),i}const Ge=n=>{(Ot?"production":void 0)!=="production"&&typeof n!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const e=typeof n=="function"?jn(n):n,t=(i,a)=>oi(e,i,a);return Object.assign(t,e),t},li=n=>n?Ge(n):Ge;class xt{constructor(e){R(this,"channel");R(this,"listeners",new Map);R(this,"eventQueue",new Map);try{this.channel=new BroadcastChannel(e),this.channel.onmessage=t=>this.handleMessage(t),this.channel.onmessageerror=t=>K.error("NizzaBroadcastChannel:",t)}catch(t){throw K.error("Failed to create NizzaBroadcastChannel:",t),t}}on(e,t){return this.subscribeToEvent(e,t),{off:()=>this.unsubscribeFromEvent(e,t)}}emit(e,t,i={}){this.emitEvent(e,t,i)}handleMessage(e){const t=e.data,{name:i}=t;for(const[a,s]of this.listeners.entries())this.matchWildcard(a,i)&&s.forEach(r=>r({...t,wildcard:a}))}subscribeToEvent(e,t){if(typeof e!="string"||typeof t!="function"){const i=new Error("Invalid arguments");throw K.error(i),i}for(const[i,a]of this.listeners.entries())if(this.matchWildcard(i,e)){a.add(t);const s=this.eventQueue.get(i);s&&(s.forEach(r=>{t({...r,wildcard:i})}),this.eventQueue.delete(i));return}this.listeners.set(e,new Set([t]))}emitEvent(e,t,i){if(typeof e!="string"){const r=new Error("Invalid arguments");throw K.error(r),r}const a={name:e,data:t,attrs:i},s=Array.from(this.getMatchingListeners(e));if(s.length)for(const[r,o]of s)o({...a,wildcard:r});else this.eventQueue.has(e)||this.eventQueue.set(e,[]),this.eventQueue.get(e).push(a);this.channel.postMessage(a)}*getMatchingListeners(e){for(const[t,i]of this.listeners.entries())if(this.matchWildcard(t,e))for(const a of i)yield[t,a]}unsubscribeFromEvent(e,t){if(this.listeners.has(e)){const i=this.listeners.get(e);i.delete(t),i.size===0&&this.listeners.delete(e)}}matchWildcard(e,t){const i=e.replace(/\*/g,"[^:]*").replace(/\*\*/g,".*");return new RegExp(`^${i}$`).test(t)}}let di=(n=21)=>crypto.getRandomValues(new Uint8Array(n)).reduce((e,t)=>(t&=63,t<36?e+=t.toString(36):t<62?e+=(t-26).toString(36).toUpperCase():t>62?e+="-":e+="_",e),"");const Rt=(n=8)=>di(n),ui=n=>{const e=Object.entries(n).reduce((t,[i,a])=>a!==void 0?`${t}${t?"&":""}${i}=${a}`:t,"");return e?`?${e}`:""};function ci(){const n=new Error().stack.split(`
18
- `);return n.length<3?"":n[2].trim().substring(3)}var Tt={exports:{}};(function(n){(function(e,t){n.exports?n.exports=t():e.log=t()})(Nt,function(){var e=function(){},t="undefined",i=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),a=["trace","debug","info","warn","error"];function s(k,N){var x=k[N];if(typeof x.bind=="function")return x.bind(k);try{return Function.prototype.bind.call(x,k)}catch{return function(){return Function.prototype.apply.apply(x,[k,arguments])}}}function r(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function o(k){return k==="debug"&&(k="log"),typeof console===t?!1:k==="trace"&&i?r:console[k]!==void 0?s(console,k):console.log!==void 0?s(console,"log"):e}function l(k,N){for(var x=0;x<a.length;x++){var F=a[x];this[F]=x<k?e:this.methodFactory(F,k,N)}this.log=this.debug}function u(k,N,x){return function(){typeof console!==t&&(l.call(this,N,x),this[k].apply(this,arguments))}}function d(k,N,x){return o(k)||u.apply(this,arguments)}function f(k,N,x){var F=this,I;N=N==null?"WARN":N;var w="loglevel";typeof k=="string"?w+=":"+k:typeof k=="symbol"&&(w=void 0);function D(p){var h=(a[p]||"silent").toUpperCase();if(!(typeof window===t||!w)){try{window.localStorage[w]=h;return}catch{}try{window.document.cookie=encodeURIComponent(w)+"="+h+";"}catch{}}}function L(){var p;if(!(typeof window===t||!w)){try{p=window.localStorage[w]}catch{}if(typeof p===t)try{var h=window.document.cookie,g=h.indexOf(encodeURIComponent(w)+"=");g!==-1&&(p=/^([^;]+)/.exec(h.slice(g))[1])}catch{}return F.levels[p]===void 0&&(p=void 0),p}}function A(){if(!(typeof window===t||!w)){try{window.localStorage.removeItem(w);return}catch{}try{window.document.cookie=encodeURIComponent(w)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}F.name=k,F.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},F.methodFactory=x||d,F.getLevel=function(){return I},F.setLevel=function(p,h){if(typeof p=="string"&&F.levels[p.toUpperCase()]!==void 0&&(p=F.levels[p.toUpperCase()]),typeof p=="number"&&p>=0&&p<=F.levels.SILENT){if(I=p,h!==!1&&D(p),l.call(F,p,k),typeof console===t&&p<F.levels.SILENT)return"No console available for logging"}else throw"log.setLevel() called with invalid level: "+p},F.setDefaultLevel=function(p){N=p,L()||F.setLevel(p,!1)},F.resetLevel=function(){F.setLevel(N,!1),A()},F.enableAll=function(p){F.setLevel(F.levels.TRACE,p)},F.disableAll=function(p){F.setLevel(F.levels.SILENT,p)};var m=L();m==null&&(m=N),F.setLevel(m,!1)}var c=new f,S={};c.getLogger=function(N){if(typeof N!="symbol"&&typeof N!="string"||N==="")throw new TypeError("You must supply a name when creating a logger.");var x=S[N];return x||(x=S[N]=new f(N,c.getLevel(),c.methodFactory)),x};var y=typeof window!==t?window.log:void 0;return c.noConflict=function(){return typeof window!==t&&window.log===c&&(window.log=y),c},c.getLoggers=function(){return S},c.default=c,c})})(Tt);var It=Tt.exports;const se=Te(It);var Dt={exports:{}};(function(n){(function(e,t){n.exports?n.exports=t():e.prefix=t(e)})(Nt,function(e){var t=function(d){for(var f=1,c=arguments.length,S;f<c;f++)for(S in arguments[f])Object.prototype.hasOwnProperty.call(arguments[f],S)&&(d[S]=arguments[f][S]);return d},i={template:"[%t] %l:",levelFormatter:function(d){return d.toUpperCase()},nameFormatter:function(d){return d||"root"},timestampFormatter:function(d){return d.toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/,"$1")},format:void 0},a,s={},r=function(d){if(!d||!d.getLogger)throw new TypeError("Argument is not a root logger");a=d},o=function(d,f){if(!d||!d.setLevel)throw new TypeError("Argument is not a logger");var c=d.methodFactory,S=d.name||"",y=s[S]||s[""]||i;function k(N,x,F){var I=c(N,x,F),w=s[F]||s[""],D=w.template.indexOf("%t")!==-1,L=w.template.indexOf("%l")!==-1,A=w.template.indexOf("%n")!==-1;return function(){for(var m="",p=arguments.length,h=Array(p),g=0;g<p;g++)h[g]=arguments[g];if(S||!s[F]){var b=w.timestampFormatter(new Date),C=w.levelFormatter(N),v=w.nameFormatter(F);w.format?m+=w.format(C,v,b):(m+=w.template,D&&(m=m.replace(/%t/,b)),L&&(m=m.replace(/%l/,C)),A&&(m=m.replace(/%n/,v))),h.length&&typeof h[0]=="string"?h[0]=m+" "+h[0]:h.unshift(m)}I.apply(void 0,h)}}return s[S]||(d.methodFactory=k),f=f||{},f.template&&(f.format=void 0),s[S]=t({},y,f),d.setLevel(d.getLevel()),a||d.warn("It is necessary to call the function reg() of loglevel-plugin-prefix before calling apply. From the next release, it will throw an error. See more: https://github.com/kutuluk/loglevel-plugin-prefix/blob/master/README.md"),d},l={reg:r,apply:o},u;return e&&(u=e.prefix,l.noConflict=function(){return e.prefix===l&&(e.prefix=u),l}),l})})(Dt);var mi=Dt.exports;const Ke=Te(mi),W=class W{constructor(e){R(this,"defaultLevel",It.levels.INFO);R(this,"namePrefix");this.namePrefix=e?`${e}-`:"",se.setDefaultLevel(this.defaultLevel),Ke.reg(se),Ke.apply(se,{template:"[%t] %l (%n)",nameFormatter:t=>{var i;return(i=t==null?void 0:t.toLowerCase())!=null?i:""},timestampFormatter:()=>new Date().toTimeString().slice(0,8)})}static create(e){const t=`${e}log`;return window!=null&&window[t]||(W.instance=new W(e),window[t]=W.instance),window[t]}createLogger(e){const t=this.namePrefix+e.toLowerCase(),i=se.getLogger(t),a=localStorage.getItem(`loglevel:${t}`);return a?i.setLevel(a):i.setLevel(this.defaultLevel),i}};R(W,"instance");let de=W;const ve=de.create("nz"),fi=ve.createLogger("main"),K=ve.createLogger("core");exports.nizza={log:ve};exports.useNizza=void 0;function pi(){return exports.nizza=Lt(),exports.useNizza=exports.nizza.store,exports.nizza}function Lt(){if(!window.nizza){const n=hi();window.nizza=n,window.nz=n}return window.nizza}function hi(){const n=li(()=>({config:null}));return{version:"1.0.4",log:ve,store:n,configure:At,setProductDataSource:Pt,instanceId:Rt(),eventBus:new xt("nizza"),get state(){return n.getState()}}}async function At(n){try{const e=exports.nizza.store.getState().account;if(exports.nizza.store.setState({config:n}),(e==null?void 0:e.account)!==n.account){const t=await Ht(n.account);exports.nizza.store.setState({account:t})}if(n.getProductDataSource){const t=await n.getProductDataSource();exports.nizza.store.setState({productDataSource:t})}}catch(e){console.error("Error configuring NizzaStore:",e)}}function Pt(n){exports.nizza.store.setState({productDataSource:n})}function G(n){return n!=null&&typeof n=="object"&&n["@@functional/placeholder"]===!0}function oe(n){return function e(t){return arguments.length===0||G(t)?e:n.apply(this,arguments)}}function Ie(n){return function e(t,i){switch(arguments.length){case 0:return e;case 1:return G(t)?e:oe(function(a){return n(t,a)});default:return G(t)&&G(i)?e:G(t)?oe(function(a){return n(a,i)}):G(i)?oe(function(a){return n(t,a)}):n(t,i)}}}const gi=Number.isInteger||function(e){return e<<0===e};function ki(n){return Object.prototype.toString.call(n)==="[object String]"}var vi=Ie(function(e,t){var i=e<0?t.length+e:e;return ki(t)?t.charAt(i):t[i]});const Si=vi;var yi=oe(function(e){return e==null});const Ni=yi;var bi=Ie(function(e,t){return e.map(function(i){for(var a=t,s=0,r;s<i.length;){if(a==null)return;r=i[s],a=gi(r)?Si(r,a):a[r],s+=1}return a})});const Fi=bi;var wi=Ie(function(e,t){return Fi([e],t)[0]});const Ci=wi;class ne extends Error{constructor(e,t,i){super(t),this.value=i,this.name=e}toDTO(){return{name:this.name,message:this.message,...this.value&&{value:this.value}}}}class Vt extends ne{constructor(e){super("RESOURCE_NOT_FOUND_ERROR",`Resource with id '${e}' not found.`,e)}}class _t extends ne{constructor(e){var t;super("APP_UNEXPECTED_ERROR",(t=e.message)!=null?t:"An unexpected error occurred.",e)}}class Ei extends ne{constructor(){super("APP_ACCOUNT_INVALID_ERROR","Account not defined")}}class Ut extends ne{constructor(e){super("INVALID_NIZZA_GLOBAL_OBJECT_ERROR",`
1
+ "use strict";var pr=Object.defineProperty;var vr=(t,e,n)=>e in t?pr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var x=(t,e,n)=>(vr(t,typeof e!="symbol"?e+"":e,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const M=require("react"),gr=require("react-dom"),kr=require("react/jsx-runtime");function yr(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const Z=yr(M);var K={NZ_AWS_REGION:"us-east-1",NZ_VTEX_PROJECT:"/Users/jbermudez/TODO/PROJECTS/live-shopping",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};let br=0;function Sr(t,e){const n=`atom${++br}`,i={toString:()=>n};return typeof t=="function"?i.read=t:(i.init=t,i.read=function(a){return a(this)},i.write=function(a,r,s){return r(this,typeof s=="function"?s(a(this)):s)}),e&&(i.write=e),i}const Qt=t=>"init"in t,qt=t=>!!t.write,yt=new WeakMap,_r=(t,e)=>{yt.set(t,e),t.catch(()=>{}).finally(()=>yt.delete(t))},Vn=(t,e)=>{const n=yt.get(t);n&&(yt.delete(t),n(e))},jn=(t,e)=>{t.status="fulfilled",t.value=e},Un=(t,e)=>{t.status="rejected",t.reason=e},Nr=t=>typeof(t==null?void 0:t.then)=="function",Me=(t,e)=>!!t&&"v"in t&&"v"in e&&Object.is(t.v,e.v),Mn=(t,e)=>!!t&&"e"in t&&"e"in e&&Object.is(t.e,e.e),Oe=t=>!!t&&"v"in t&&t.v instanceof Promise,Or=(t,e)=>"v"in t&&"v"in e&&t.v.orig&&t.v.orig===e.v.orig,ut=t=>{if("e"in t)throw t.e;return t.v},Ei=()=>{const t=new WeakMap,e=new WeakMap,n=new Map;let i,a;(K?"production":void 0)!=="production"&&(i=new Set,a=new Set);const r=m=>t.get(m),s=(m,h)=>{(K?"production":void 0)!=="production"&&Object.freeze(h);const v=t.get(m);if(t.set(m,h),n.has(m)||n.set(m,v),Oe(v)){const g="v"in h?h.v instanceof Promise?h.v:Promise.resolve(h.v):Promise.reject(h.e);v.v!==g&&Vn(v.v,g)}},o=(m,h,v)=>{const g=new Map;let w=!1;v.forEach((F,_)=>{!F&&_===m&&(F=h),F?(g.set(_,F),h.d.get(_)!==F&&(w=!0)):(K?"production":void 0)!=="production"&&console.warn("[Bug] atom state not found")}),(w||h.d.size!==g.size)&&(h.d=g)},l=(m,h,v)=>{const g=r(m),w={d:(g==null?void 0:g.d)||new Map,v:h};if(v&&o(m,w,v),Me(g,w)&&g.d===w.d)return g;if(Oe(g)&&Oe(w)&&Or(g,w)){if(g.d===w.d)return g;w.v=g.v}return s(m,w),w},u=(m,h,v,g)=>{if(Nr(h)){let w;const F=()=>{const A=r(m);if(!Oe(A)||A.v!==_)return;const $=l(m,_,v);e.has(m)&&A.d!==$.d&&T(m,$,A.d)},_=new Promise((A,$)=>{let E=!1;h.then(L=>{E||(E=!0,jn(_,L),A(L),F())},L=>{E||(E=!0,Un(_,L),$(L),F())}),w=L=>{E||(E=!0,L.then(B=>jn(_,B),B=>Un(_,B)),A(L))}});return _.orig=h,_.status="pending",_r(_,A=>{A&&w(A),g==null||g()}),l(m,_,v)}return l(m,h,v)},d=(m,h,v)=>{const g=r(m),w={d:(g==null?void 0:g.d)||new Map,e:h};return v&&o(m,w,v),Mn(g,w)&&g.d===w.d?g:(s(m,w),w)},f=(m,h)=>{const v=r(m);if(!h&&v&&(e.has(m)||Array.from(v.d).every(([E,L])=>{if(E===m)return!0;const B=f(E);return B===L||Me(B,L)})))return v;const g=new Map;let w=!0;const F=E=>{if(E===m){const B=r(E);if(B)return g.set(E,B),ut(B);if(Qt(E))return g.set(E,void 0),E.init;throw new Error("no atom init")}const L=f(E);return g.set(E,L),ut(L)};let _,A;const $={get signal(){return _||(_=new AbortController),_.signal},get setSelf(){return(K?"production":void 0)!=="production"&&!qt(m)&&console.warn("setSelf function cannot be used with read-only atom"),!A&&qt(m)&&(A=(...E)=>{if((K?"production":void 0)!=="production"&&w&&console.warn("setSelf function cannot be called in sync"),!w)return O(m,...E)}),A}};try{const E=m.read(F,$);return u(m,E,g,()=>_==null?void 0:_.abort())}catch(E){return d(m,E,g)}finally{w=!1}},c=m=>ut(f(m)),b=m=>{let h=e.get(m);return h||(h=V(m)),h},N=(m,h)=>!h.l.size&&(!h.t.size||h.t.size===1&&h.t.has(m)),k=m=>{const h=e.get(m);h&&N(m,h)&&S(m)},y=m=>{const h=new Map,v=new WeakMap,g=_=>{var A;const $=new Set((A=e.get(_))==null?void 0:A.t);return n.forEach((E,L)=>{var B;(B=r(L))!=null&&B.d.has(_)&&$.add(L)}),$},w=_=>{g(_).forEach(A=>{A!==_&&(h.set(A,(h.get(A)||new Set).add(_)),v.set(A,(v.get(A)||0)+1),w(A))})};w(m);const F=_=>{g(_).forEach(A=>{var $;if(A!==_){let E=v.get(A);if(E&&v.set(A,--E),!E){let L=!!(($=h.get(A))!=null&&$.size);if(L){const B=r(A),lt=f(A,!0);L=!Me(B,lt)}L||h.forEach(B=>B.delete(A))}F(A)}})};F(m)},R=(m,...h)=>{let v=!0;const g=_=>ut(f(_)),w=(_,...A)=>{let $;if(_===m){if(!Qt(_))throw new Error("atom not writable");const E=r(_),L=u(_,A[0]);Me(E,L)||y(_)}else $=R(_,...A);if(!v){const E=P();(K?"production":void 0)!=="production"&&i.forEach(L=>L({type:"async-write",flushed:E}))}return $},F=m.write(g,w,...h);return v=!1,F},O=(m,...h)=>{const v=R(m,...h),g=P();return(K?"production":void 0)!=="production"&&i.forEach(w=>w({type:"write",flushed:g})),v},V=(m,h,v)=>{var g;const w=v||[];(g=r(m))==null||g.d.forEach((_,A)=>{const $=e.get(A);$?$.t.add(m):A!==m&&V(A,m,w)}),f(m);const F={t:new Set(h&&[h]),l:new Set};if(e.set(m,F),(K?"production":void 0)!=="production"&&a.add(m),qt(m)&&m.onMount){const{onMount:_}=m;w.push(()=>{const A=_((...$)=>O(m,...$));A&&(F.u=A)})}return v||w.forEach(_=>_()),F},S=m=>{var h;const v=(h=e.get(m))==null?void 0:h.u;v&&v(),e.delete(m),(K?"production":void 0)!=="production"&&a.delete(m);const g=r(m);g?(Oe(g)&&Vn(g.v),g.d.forEach((w,F)=>{if(F!==m){const _=e.get(F);_&&(_.t.delete(m),N(F,_)&&S(F))}})):(K?"production":void 0)!=="production"&&console.warn("[Bug] could not find atom state to unmount",m)},T=(m,h,v)=>{const g=new Set(h.d.keys());v==null||v.forEach((w,F)=>{if(g.has(F)){g.delete(F);return}const _=e.get(F);_&&(_.t.delete(m),N(F,_)&&S(F))}),g.forEach(w=>{const F=e.get(w);F?F.t.add(m):e.has(m)&&V(w,m)})},P=()=>{let m;for((K?"production":void 0)!=="production"&&(m=new Set);n.size;){const h=Array.from(n);n.clear(),h.forEach(([v,g])=>{const w=r(v);if(w){const F=e.get(v);F&&w.d!==(g==null?void 0:g.d)&&T(v,w,g==null?void 0:g.d),F&&!(!Oe(g)&&(Me(g,w)||Mn(g,w)))&&(F.l.forEach(_=>_()),(K?"production":void 0)!=="production"&&m.add(v))}else(K?"production":void 0)!=="production"&&console.warn("[Bug] no atom state to flush")})}if((K?"production":void 0)!=="production")return m},j=(m,h)=>{const v=b(m),g=P(),w=v.l;return w.add(h),(K?"production":void 0)!=="production"&&i.forEach(F=>F({type:"sub",flushed:g})),()=>{w.delete(h),k(m),(K?"production":void 0)!=="production"&&i.forEach(F=>F({type:"unsub"}))}};return(K?"production":void 0)!=="production"?{get:c,set:O,sub:j,dev_subscribe_store:(m,h)=>{if(h!==2)throw new Error("The current StoreListener revision is 2.");return i.add(m),()=>{i.delete(m)}},dev_get_mounted_atoms:()=>a.values(),dev_get_atom_state:m=>t.get(m),dev_get_mounted:m=>e.get(m),dev_restore_atoms:m=>{for(const[v,g]of m)Qt(v)&&(u(v,g),y(v));const h=P();i.forEach(v=>v({type:"restore",flushed:h}))}}:{get:c,set:O,sub:j}};let Wt;(K?"production":void 0)!=="production"&&(typeof globalThis.__NUMBER_OF_JOTAI_INSTANCES__=="number"?++globalThis.__NUMBER_OF_JOTAI_INSTANCES__:globalThis.__NUMBER_OF_JOTAI_INSTANCES__=1);const wr=()=>(Wt||((K?"production":void 0)!=="production"&&globalThis.__NUMBER_OF_JOTAI_INSTANCES__!==1&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"),Wt=Ei()),Wt);var Fr={NZ_AWS_REGION:"us-east-1",NZ_VTEX_PROJECT:"/Users/jbermudez/TODO/PROJECTS/live-shopping",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const Ar=M.createContext(void 0),Ci=t=>{const e=M.useContext(Ar);return(t==null?void 0:t.store)||e||wr()},Er=t=>typeof(t==null?void 0:t.then)=="function",Cr=M.use||(t=>{if(t.status==="pending")throw t;if(t.status==="fulfilled")return t.value;throw t.status==="rejected"?t.reason:(t.status="pending",t.then(e=>{t.status="fulfilled",t.value=e},e=>{t.status="rejected",t.reason=e}),t)});function Rr(t,e){const n=Ci(e),[[i,a,r],s]=M.useReducer(u=>{const d=n.get(t);return Object.is(u[0],d)&&u[1]===n&&u[2]===t?u:[d,n,t]},void 0,()=>[n.get(t),n,t]);let o=i;(a!==n||r!==t)&&(s(),o=n.get(t));const l=e==null?void 0:e.delay;return M.useEffect(()=>{const u=n.sub(t,()=>{if(typeof l=="number"){setTimeout(s,l);return}s()});return s(),u},[n,t,l]),M.useDebugValue(o),Er(o)?Cr(o):o}function xr(t,e){const n=Ci(e);return M.useCallback((...a)=>{if((Fr?"production":void 0)!=="production"&&!("write"in t))throw new Error("not writable atom");return n.set(t,...a)},[n,t])}function Tr(t,e){return[Rr(t,e),xr(t,e)]}const Pt=Sr(null);Pt.debugLabel="accountAtom";var Dr={NZ_AWS_REGION:"us-east-1",NZ_VTEX_PROJECT:"/Users/jbermudez/TODO/PROJECTS/live-shopping",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{NZ_AWS_REGION:Pr,NZ_BACKOFFICE_BACK_URL:Lr,NZ_CORE_SERVICES_GRAPHQL_URL:Ir,NZ_CORE_SERVICES_REST_URL:Vr}=Dr,jr={AWS:{region:Pr,cognito:{userPoolId:"us-east-1_knSlGEmJ0",userPoolWebClientId:"3hmbfhf7nl3kq20qr9i5lihf1p"}},apiUrls:{restV1:Lr||"https://pabprg32bj.execute-api.us-east-1.amazonaws.com",restV2:Vr||"https://core-services-dev.nizza.com/api",graphql:Ir||"https://core-services-dev.nizza.com/graphql",corsProxy:"https://1qmd8jteh1.execute-api.us-east-1.amazonaws.com"},publicUrls:{platformSite:"https://platformdev.nizza.com",nizzaCdn:"https://cdn.nizza.com",bundleSite:"https://bundledev.nizza.com",wssIVSChat:"wss://edge.ivschat.us-east-1.amazonaws.com"}};async function gn(t){const{url:e,method:n="GET",body:i,raw:a=!1,contentTypeJson:r=!0,timeout:s,...o}=t,l=r&&!t.headers?new Headers({"content-type":"application/json"}):t.headers;try{const u=new AbortController,{signal:d}=u;let f;const c=fetch(e,{method:n,headers:l,body:i,signal:d,...o});s&&(f=setTimeout(()=>{u.abort()},s));const b=await c;if(a)return b;const N=await b.json();if(clearTimeout(f),!b.ok){const k=N?JSON.stringify(N):b.statusText;throw new Error(k)}return N}catch(u){throw console.error("[CustomFetch] ",u),u}}const Ur=t=>gn({...t,contentTypeJson:!1,raw:!1});function Mr(t,e,n){fetch(e).then(i=>i.blob()).then(i=>Ri(i,`${t}.${n}`))}const Ri=(t,e,n)=>{const i=[t],a=new Blob(i,{type:n!=null?n:"application/octet-stream"});if(typeof window.navigator.msSaveBlob!="undefined")return window.navigator.msSaveBlob(a,e);const r=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(a):window.webkitURL.createObjectURL(a),s=document.createElement("a");return s.style.display="none",s.href=r,s.setAttribute("download",e),typeof s.download=="undefined"&&s.setAttribute("target","_blank"),document.body.appendChild(s),s.click(),setTimeout(()=>{document.body.removeChild(s),window.URL.revokeObjectURL(r)},200)};function D(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 $r={};function kn(){return typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:$r}var xi=Object.assign,bt=Object.getOwnPropertyDescriptor,re=Object.defineProperty,Lt=Object.prototype,tn=[];Object.freeze(tn);var Ti={};Object.freeze(Ti);var Br=typeof Proxy!="undefined",zr=Object.toString();function Di(){Br||D("Proxy not available")}function Pi(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var Ce=function(){};function ee(t){return typeof t=="function"}function ve(t){var e=typeof t;switch(e){case"string":case"symbol":case"number":return!0}return!1}function It(t){return t!==null&&typeof t=="object"}function me(t){if(!It(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()===zr}function Li(t){var e=t==null?void 0:t.constructor;return e?e.name==="GeneratorFunction"||e.displayName==="GeneratorFunction":!1}function Vt(t,e,n){re(t,e,{enumerable:!1,writable:!0,configurable:!0,value:n})}function Ii(t,e,n){re(t,e,{enumerable:!1,writable:!1,configurable:!0,value:n})}function be(t,e){var n="isMobX"+t;return e.prototype[n]=!0,function(i){return It(i)&&i[n]===!0}}function Ie(t){return t instanceof Map}function tt(t){return t instanceof Set}var Vi=typeof Object.getOwnPropertySymbols!="undefined";function Kr(t){var e=Object.keys(t);if(!Vi)return e;var n=Object.getOwnPropertySymbols(t);return n.length?[].concat(e,n.filter(function(i){return Lt.propertyIsEnumerable.call(t,i)})):e}var jt=typeof Reflect!="undefined"&&Reflect.ownKeys?Reflect.ownKeys:Vi?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames;function ji(t){return t===null?null:typeof t=="object"?""+t:t}function ue(t,e){return Lt.hasOwnProperty.call(t,e)}var Gr=Object.getOwnPropertyDescriptors||function(e){var n={};return jt(e).forEach(function(i){n[i]=bt(e,i)}),n};function $n(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,Wr(i.key),i)}}function yn(t,e,n){return e&&$n(t.prototype,e),n&&$n(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function ge(){return ge=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},ge.apply(this,arguments)}function Ui(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,nn(t,e)}function nn(t,e){return nn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},nn(t,e)}function Ht(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Qr(t,e){if(t){if(typeof t=="string")return Bn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Bn(t,e)}}function Bn(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function Re(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=Qr(t))||e&&t&&typeof t.length=="number"){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.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qr(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Wr(t){var e=qr(t,"string");return typeof e=="symbol"?e:String(e)}var ie=Symbol("mobx-stored-annotations");function se(t){function e(n,i){if(nt(i))return t.decorate_20223_(n,i);Ve(n,i,t)}return Object.assign(e,t)}function Ve(t,e,n){ue(t,ie)||Vt(t,ie,ge({},t[ie])),is(n)||(t[ie][e]=n)}function Hr(t){return ue(t,ie)||Vt(t,ie,ge({},t[ie])),t[ie]}function nt(t){return typeof t=="object"&&typeof t.kind=="string"}var C=Symbol("mobx administration"),it=function(){function t(n){n===void 0&&(n="Atom"),this.name_=void 0,this.isPendingUnobservation_=!1,this.isBeingObserved_=!1,this.observers_=new Set,this.diffValue_=0,this.lastAccessedBy_=0,this.lowestObserverState_=I.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 ia(this)},e.reportChanged=function(){H(),aa(this),J()},e.toString=function(){return this.name_},t}(),bn=be("Atom",it);function Mi(t,e,n){e===void 0&&(e=Ce),n===void 0&&(n=Ce);var i=new it(t);return e!==Ce&&oo(i,e),n!==Ce&&ua(i,n),i}function Jr(t,e){return t===e}function Zr(t,e){return An(t,e)}function Xr(t,e){return An(t,e,1)}function Yr(t,e){return Object.is?Object.is(t,e):t===e?t!==0||1/t===1/e:t!==t&&e!==e}var St={identity:Jr,structural:Zr,default:Yr,shallow:Xr};function ke(t,e,n){return ma(t)?t:Array.isArray(t)?z.array(t,{name:n}):me(t)?z.object(t,void 0,{name:n}):Ie(t)?z.map(t,{name:n}):tt(t)?z.set(t,{name:n}):typeof t=="function"&&!Bt(t)&&!He(t)?Li(t)?De(t):We(n,t):t}function es(t,e,n){if(t==null||Je(t)||zt(t)||_e(t)||je(t))return t;if(Array.isArray(t))return z.array(t,{name:n,deep:!1});if(me(t))return z.object(t,void 0,{name:n,deep:!1});if(Ie(t))return z.map(t,{name:n,deep:!1});if(tt(t))return z.set(t,{name:n,deep:!1})}function Ut(t){return t}function ts(t,e){return An(t,e)?e:t}var ns="override";function is(t){return t.annotationType_===ns}function at(t,e){return{annotationType_:t,options_:e,make_:as,extend_:rs,decorate_20223_:ss}}function as(t,e,n,i){var a;if((a=this.options_)!=null&&a.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(Bt(n.value))return 1;var r=$i(t,this,e,n,!1);return re(i,e,r),2}function rs(t,e,n,i){var a=$i(t,this,e,n);return t.defineProperty_(e,a,i)}function ss(t,e){var n=e.kind,i=e.name,a=e.addInitializer,r=this,s=function(u){var d,f,c,b;return ye((d=(f=r.options_)==null?void 0:f.name)!=null?d:i.toString(),u,(c=(b=r.options_)==null?void 0:b.autoAction)!=null?c:!1)};if(n=="field"){a(function(){Ve(this,i,r)});return}if(n=="method"){var o;return Bt(t)||(t=s(t)),(o=this.options_)!=null&&o.bound&&a(function(){var l=this,u=l[i].bind(l);u.isMobxAction=!0,l[i]=u}),t}D("Cannot apply '"+r.annotationType_+"' to '"+String(i)+"' (kind: "+n+"):"+(`
3
+ '`+r.annotationType_+"' can only be used on properties with a function value."))}function os(t,e,n,i){e.annotationType_,i.value}function $i(t,e,n,i,a){var r,s,o,l,u,d,f;a===void 0&&(a=p.safeDescriptors),os(t,e,n,i);var c=i.value;if((r=e.options_)!=null&&r.bound){var b;c=c.bind((b=t.proxy_)!=null?b:t.target_)}return{value:ye((s=(o=e.options_)==null?void 0:o.name)!=null?s:n.toString(),c,(l=(u=e.options_)==null?void 0:u.autoAction)!=null?l:!1,(d=e.options_)!=null&&d.bound?(f=t.proxy_)!=null?f:t.target_:void 0),configurable:a?t.isPlainObject_:!0,enumerable:!1,writable:!a}}function Bi(t,e){return{annotationType_:t,options_:e,make_:ls,extend_:us,decorate_20223_:ds}}function ls(t,e,n,i){var a;if(i===t.target_)return this.extend_(t,e,n,!1)===null?0:2;if((a=this.options_)!=null&&a.bound&&(!ue(t.target_,e)||!He(t.target_[e]))&&this.extend_(t,e,n,!1)===null)return 0;if(He(n.value))return 1;var r=zi(t,this,e,n,!1,!1);return re(i,e,r),2}function us(t,e,n,i){var a,r=zi(t,this,e,n,(a=this.options_)==null?void 0:a.bound);return t.defineProperty_(e,r,i)}function ds(t,e){var n,i=e.name,a=e.addInitializer;return He(t)||(t=De(t)),(n=this.options_)!=null&&n.bound&&a(function(){var r=this,s=r[i].bind(r);s.isMobXFlow=!0,r[i]=s}),t}function cs(t,e,n,i){e.annotationType_,i.value}function zi(t,e,n,i,a,r){r===void 0&&(r=p.safeDescriptors),cs(t,e,n,i);var s=i.value;if(He(s)||(s=De(s)),a){var o;s=s.bind((o=t.proxy_)!=null?o:t.target_),s.isMobXFlow=!0}return{value:s,configurable:r?t.isPlainObject_:!0,enumerable:!1,writable:!r}}function Sn(t,e){return{annotationType_:t,options_:e,make_:fs,extend_:ms,decorate_20223_:hs}}function fs(t,e,n){return this.extend_(t,e,n,!1)===null?0:1}function ms(t,e,n,i){return ps(t,this,e,n),t.defineComputedProperty_(e,ge({},this.options_,{get:n.get,set:n.set}),i)}function hs(t,e){var n=this,i=e.name,a=e.addInitializer;return a(function(){var r=Ue(this)[C],s=ge({},n.options_,{get:t,context:this});s.name||(s.name="ObservableObject."+i.toString()),r.values_.set(i,new Te(s))}),function(){return this[C].getObservablePropValue_(i)}}function ps(t,e,n,i){e.annotationType_,i.get}function Mt(t,e){return{annotationType_:t,options_:e,make_:vs,extend_:gs,decorate_20223_:ks}}function vs(t,e,n){return this.extend_(t,e,n,!1)===null?0:1}function gs(t,e,n,i){var a,r;return ys(t,this),t.defineObservableProperty_(e,n.value,(a=(r=this.options_)==null?void 0:r.enhancer)!=null?a:ke,i)}function ks(t,e){var n=this,i=e.kind,a=e.name,r=new WeakSet;function s(o,l){var u,d,f=Ue(o)[C],c=new pe(l,(u=(d=n.options_)==null?void 0:d.enhancer)!=null?u:ke,"ObservableObject."+a.toString(),!1);f.values_.set(a,c),r.add(o)}if(i=="accessor")return{get:function(){return r.has(this)||s(this,t.get.call(this)),this[C].getObservablePropValue_(a)},set:function(l){return r.has(this)||s(this,l),this[C].setObservablePropValue_(a,l)},init:function(l){return r.has(this)||s(this,l),l}}}function ys(t,e,n,i){e.annotationType_}var bs="true",Ss=Ki();function Ki(t){return{annotationType_:bs,options_:t,make_:_s,extend_:Ns,decorate_20223_:Os}}function _s(t,e,n,i){var a,r;if(n.get)return he.make_(t,e,n,i);if(n.set){var s=ye(e.toString(),n.set);return i===t.target_?t.defineProperty_(e,{configurable:p.safeDescriptors?t.isPlainObject_:!0,set:s})===null?0:2:(re(i,e,{configurable:!0,set:s}),2)}if(i!==t.target_&&typeof n.value=="function"){var o;if(Li(n.value)){var l,u=(l=this.options_)!=null&&l.autoBind?De.bound:De;return u.make_(t,e,n,i)}var d=(o=this.options_)!=null&&o.autoBind?We.bound:We;return d.make_(t,e,n,i)}var f=((a=this.options_)==null?void 0:a.deep)===!1?z.ref:z;if(typeof n.value=="function"&&(r=this.options_)!=null&&r.autoBind){var c;n.value=n.value.bind((c=t.proxy_)!=null?c:t.target_)}return f.make_(t,e,n,i)}function Ns(t,e,n,i){var a,r;if(n.get)return he.extend_(t,e,n,i);if(n.set)return t.defineProperty_(e,{configurable:p.safeDescriptors?t.isPlainObject_:!0,set:ye(e.toString(),n.set)},i);if(typeof n.value=="function"&&(a=this.options_)!=null&&a.autoBind){var s;n.value=n.value.bind((s=t.proxy_)!=null?s:t.target_)}var o=((r=this.options_)==null?void 0:r.deep)===!1?z.ref:z;return o.extend_(t,e,n,i)}function Os(t,e){D("'"+this.annotationType_+"' cannot be used as a decorator")}var ws="observable",Fs="observable.ref",As="observable.shallow",Es="observable.struct",Gi={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(Gi);function dt(t){return t||Gi}var an=Mt(ws),Cs=Mt(Fs,{enhancer:Ut}),Rs=Mt(As,{enhancer:es}),xs=Mt(Es,{enhancer:ts}),Qi=se(an);function ct(t){return t.deep===!0?ke:t.deep===!1?Ut:Ds(t.defaultDecorator)}function Ts(t){var e;return t?(e=t.defaultDecorator)!=null?e:Ki(t):void 0}function Ds(t){var e,n;return t&&(e=(n=t.options_)==null?void 0:n.enhancer)!=null?e:ke}function qi(t,e,n){if(nt(e))return an.decorate_20223_(t,e);if(ve(e)){Ve(t,e,an);return}return ma(t)?t:me(t)?z.object(t,e,n):Array.isArray(t)?z.array(t,e):Ie(t)?z.map(t,e):tt(t)?z.set(t,e):typeof t=="object"&&t!==null?t:z.box(t,e)}xi(qi,Qi);var Ps={box:function(e,n){var i=dt(n);return new pe(e,ct(i),i.name,!0,i.equals)},array:function(e,n){var i=dt(n);return(p.useProxies===!1||i.proxy===!1?To:_o)(e,ct(i),i.name)},map:function(e,n){var i=dt(n);return new ka(e,ct(i),i.name)},set:function(e,n){var i=dt(n);return new Sa(e,ct(i),i.name)},object:function(e,n,i){return Ne(function(){return fo(p.useProxies===!1||(i==null?void 0:i.proxy)===!1?Ue({},i):yo({},i),e,n)})},ref:se(Cs),shallow:se(Rs),deep:Qi,struct:se(xs)},z=xi(qi,Ps),Wi="computed",Ls="computed.struct",rn=Sn(Wi),Is=Sn(Ls,{equals:St.structural}),he=function(e,n){if(nt(n))return rn.decorate_20223_(e,n);if(ve(n))return Ve(e,n,rn);if(me(e))return se(Sn(Wi,e));var i=me(n)?n:{};return i.get=e,i.name||(i.name=e.name||""),new Te(i)};Object.assign(he,rn);he.struct=se(Is);var zn,Kn,_t=0,Vs=1,js=(zn=(Kn=bt(function(){},"name"))==null?void 0:Kn.configurable)!=null?zn:!1,Gn={value:"action",configurable:!0,writable:!1,enumerable:!1};function ye(t,e,n,i){n===void 0&&(n=!1);function a(){return Us(t,n,e,i||this,arguments)}return a.isMobxAction=!0,a.toString=function(){return e.toString()},js&&(Gn.value=t,re(a,"name",Gn)),a}function Us(t,e,n,i,a){var r=Ms(t,e);try{return n.apply(i,a)}catch(s){throw r.error_=s,s}finally{$s(r)}}function Ms(t,e,n,i){var a=!1,r=0,s=p.trackingDerivation,o=!e||!s;H();var l=p.allowStateChanges;o&&(Se(),l=_n(!0));var u=On(!0),d={runAsAction_:o,prevDerivation_:s,prevAllowStateChanges_:l,prevAllowStateReads_:u,notifySpy_:a,startTime_:r,actionId_:Vs++,parentActionId_:_t};return _t=d.actionId_,d}function $s(t){_t!==t.actionId_&&D(30),_t=t.parentActionId_,t.error_!==void 0&&(p.suppressReactionErrors=!0),Nn(t.prevAllowStateChanges_),Ge(t.prevAllowStateReads_),J(),t.runAsAction_&&de(t.prevDerivation_),p.suppressReactionErrors=!1}function _n(t){var e=p.allowStateChanges;return p.allowStateChanges=t,e}function Nn(t){p.allowStateChanges=t}var Hi;Hi=Symbol.toPrimitive;var pe=function(t){Ui(e,t);function e(i,a,r,s,o){var l;return r===void 0&&(r="ObservableValue"),o===void 0&&(o=St.default),l=t.call(this,r)||this,l.enhancer=void 0,l.name_=void 0,l.equals=void 0,l.hasUnreportedChange_=!1,l.interceptors_=void 0,l.changeListeners_=void 0,l.value_=void 0,l.dehancer=void 0,l.enhancer=a,l.name_=r,l.equals=o,l.value_=a(i,void 0,r),l}var n=e.prototype;return n.dehanceValue=function(a){return this.dehancer!==void 0?this.dehancer(a):a},n.set=function(a){this.value_,a=this.prepareNewValue_(a),a!==p.UNCHANGED&&this.setNewValue_(a)},n.prepareNewValue_=function(a){if(q(this)){var r=W(this,{object:this,type:oe,newValue:a});if(!r)return p.UNCHANGED;a=r.newValue}return a=this.enhancer(a,this.value_,this.name_),this.equals(this.value_,a)?p.UNCHANGED:a},n.setNewValue_=function(a){var r=this.value_;this.value_=a,this.reportChanged(),X(this)&&Y(this,{type:oe,object:this,newValue:a,oldValue:r})},n.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(a){return rt(this,a)},n.observe_=function(a,r){return r&&a({observableKind:"value",debugObjectName:this.name_,object:this,type:oe,newValue:this.value_,oldValue:void 0}),st(this,a)},n.raw=function(){return this.value_},n.toJSON=function(){return this.get()},n.toString=function(){return this.name_+"["+this.value_+"]"},n.valueOf=function(){return ji(this.get())},n[Hi]=function(){return this.valueOf()},e}(it),Ji;Ji=Symbol.toPrimitive;var Te=function(){function t(n){this.dependenciesState_=I.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.isBeingObserved_=!1,this.isPendingUnobservation_=!1,this.observers_=new Set,this.diffValue_=0,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=I.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new Ot(null),this.name_=void 0,this.triggeredBy_=void 0,this.isComputing_=!1,this.isRunningSetter_=!1,this.derivation=void 0,this.setter_=void 0,this.isTracing_=Nt.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||D(31),this.derivation=n.get,this.name_=n.name||"ComputedValue",n.set&&(this.setter_=ye("ComputedValue-setter",n.set)),this.equals_=n.equals||(n.compareStructural||n.struct?St.structural:St.default),this.scope_=n.context,this.requiresReaction_=n.requiresReaction,this.keepAlive_=!!n.keepAlive}var e=t.prototype;return e.onBecomeStale_=function(){Qs(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_&&D(32,this.name_,this.derivation),p.inBatch===0&&this.observers_.size===0&&!this.keepAlive_)sn(this)&&(this.warnAboutUntrackedRead_(),H(),this.value_=this.computeValue_(!1),J());else if(ia(this),sn(this)){var i=p.trackingContext;this.keepAlive_&&!i&&(p.trackingContext=this),this.trackAndCompute()&&Gs(this),p.trackingContext=i}var a=this.value_;if(pt(a))throw a.cause;return a},e.set=function(i){if(this.setter_){this.isRunningSetter_&&D(33,this.name_),this.isRunningSetter_=!0;try{this.setter_.call(this.scope_,i)}finally{this.isRunningSetter_=!1}}else D(34,this.name_)},e.trackAndCompute=function(){var i=this.value_,a=this.dependenciesState_===I.NOT_TRACKING_,r=this.computeValue_(!0),s=a||pt(i)||pt(r)||!this.equals_(i,r);return s&&(this.value_=r),s},e.computeValue_=function(i){this.isComputing_=!0;var a=_n(!1),r;if(i)r=Zi(this,this.derivation,this.scope_);else if(p.disableErrorBoundaries===!0)r=this.derivation.call(this.scope_);else try{r=this.derivation.call(this.scope_)}catch(s){r=new Ot(s)}return Nn(a),this.isComputing_=!1,r},e.suspend_=function(){this.keepAlive_||(on(this),this.value_=void 0)},e.observe_=function(i,a){var r=this,s=!0,o=void 0;return no(function(){var l=r.get();if(!s||a){var u=Se();i({observableKind:"computed",debugObjectName:r.name_,type:oe,object:r,newValue:l,oldValue:o}),de(u)}s=!1,o=l})},e.warnAboutUntrackedRead_=function(){},e.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},e.valueOf=function(){return ji(this.get())},e[Ji]=function(){return this.valueOf()},t}(),$t=be("ComputedValue",Te),I;(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_"})(I||(I={}));var Nt;(function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK"})(Nt||(Nt={}));var Ot=function(e){this.cause=void 0,this.cause=e};function pt(t){return t instanceof Ot}function sn(t){switch(t.dependenciesState_){case I.UP_TO_DATE_:return!1;case I.NOT_TRACKING_:case I.STALE_:return!0;case I.POSSIBLY_STALE_:{for(var e=On(!0),n=Se(),i=t.observing_,a=i.length,r=0;r<a;r++){var s=i[r];if($t(s)){if(p.disableErrorBoundaries)s.get();else try{s.get()}catch{return de(n),Ge(e),!0}if(t.dependenciesState_===I.STALE_)return de(n),Ge(e),!0}}return Yi(t),de(n),Ge(e),!1}}}function Zi(t,e,n){var i=On(!0);Yi(t),t.newObserving_=new Array(t.observing_.length+100),t.unboundDepsCount_=0,t.runId_=++p.runId;var a=p.trackingDerivation;p.trackingDerivation=t,p.inBatch++;var r;if(p.disableErrorBoundaries===!0)r=e.call(n);else try{r=e.call(n)}catch(s){r=new Ot(s)}return p.inBatch--,p.trackingDerivation=a,Bs(t),Ge(i),r}function Bs(t){for(var e=t.observing_,n=t.observing_=t.newObserving_,i=I.UP_TO_DATE_,a=0,r=t.unboundDepsCount_,s=0;s<r;s++){var o=n[s];o.diffValue_===0&&(o.diffValue_=1,a!==s&&(n[a]=o),a++),o.dependenciesState_>i&&(i=o.dependenciesState_)}for(n.length=a,t.newObserving_=null,r=e.length;r--;){var l=e[r];l.diffValue_===0&&ta(l,t),l.diffValue_=0}for(;a--;){var u=n[a];u.diffValue_===1&&(u.diffValue_=0,Ks(u,t))}i!==I.UP_TO_DATE_&&(t.dependenciesState_=i,t.onBecomeStale_())}function on(t){var e=t.observing_;t.observing_=[];for(var n=e.length;n--;)ta(e[n],t);t.dependenciesState_=I.NOT_TRACKING_}function Xi(t){var e=Se();try{return t()}finally{de(e)}}function Se(){var t=p.trackingDerivation;return p.trackingDerivation=null,t}function de(t){p.trackingDerivation=t}function On(t){var e=p.allowStateReads;return p.allowStateReads=t,e}function Ge(t){p.allowStateReads=t}function Yi(t){if(t.dependenciesState_!==I.UP_TO_DATE_){t.dependenciesState_=I.UP_TO_DATE_;for(var e=t.observing_,n=e.length;n--;)e[n].lowestObserverState_=I.UP_TO_DATE_}}var vt=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},gt=!0,ea=!1,p=function(){var t=kn();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(gt=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==new vt().version&&(gt=!1),gt?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new vt):(setTimeout(function(){ea||D(35)},1),new vt)}();function zs(){if((p.pendingReactions.length||p.inBatch||p.isRunningReactions)&&D(36),ea=!0,gt){var t=kn();--t.__mobxInstanceCount===0&&(t.__mobxGlobals=void 0),p=new vt}}function Ks(t,e){t.observers_.add(e),t.lowestObserverState_>e.dependenciesState_&&(t.lowestObserverState_=e.dependenciesState_)}function ta(t,e){t.observers_.delete(e),t.observers_.size===0&&na(t)}function na(t){t.isPendingUnobservation_===!1&&(t.isPendingUnobservation_=!0,p.pendingUnobservations.push(t))}function H(){p.inBatch++}function J(){if(--p.inBatch===0){ra();for(var t=p.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 Te&&n.suspend_())}p.pendingUnobservations=[]}}function ia(t){var e=p.trackingDerivation;return e!==null?(e.runId_!==t.lastAccessedBy_&&(t.lastAccessedBy_=e.runId_,e.newObserving_[e.unboundDepsCount_++]=t,!t.isBeingObserved_&&p.trackingContext&&(t.isBeingObserved_=!0,t.onBO())),t.isBeingObserved_):(t.observers_.size===0&&p.inBatch>0&&na(t),!1)}function aa(t){t.lowestObserverState_!==I.STALE_&&(t.lowestObserverState_=I.STALE_,t.observers_.forEach(function(e){e.dependenciesState_===I.UP_TO_DATE_&&e.onBecomeStale_(),e.dependenciesState_=I.STALE_}))}function Gs(t){t.lowestObserverState_!==I.STALE_&&(t.lowestObserverState_=I.STALE_,t.observers_.forEach(function(e){e.dependenciesState_===I.POSSIBLY_STALE_?e.dependenciesState_=I.STALE_:e.dependenciesState_===I.UP_TO_DATE_&&(t.lowestObserverState_=I.UP_TO_DATE_)}))}function Qs(t){t.lowestObserverState_===I.UP_TO_DATE_&&(t.lowestObserverState_=I.POSSIBLY_STALE_,t.observers_.forEach(function(e){e.dependenciesState_===I.UP_TO_DATE_&&(e.dependenciesState_=I.POSSIBLY_STALE_,e.onBecomeStale_())}))}var qe=function(){function t(n,i,a,r){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_=I.NOT_TRACKING_,this.diffValue_=0,this.runId_=0,this.unboundDepsCount_=0,this.isDisposed_=!1,this.isScheduled_=!1,this.isTrackPending_=!1,this.isRunning_=!1,this.isTracing_=Nt.NONE,this.name_=n,this.onInvalidate_=i,this.errorHandler_=a,this.requiresObservable_=r}var e=t.prototype;return e.onBecomeStale_=function(){this.schedule_()},e.schedule_=function(){this.isScheduled_||(this.isScheduled_=!0,p.pendingReactions.push(this),ra())},e.isScheduled=function(){return this.isScheduled_},e.runReaction_=function(){if(!this.isDisposed_){H(),this.isScheduled_=!1;var i=p.trackingContext;if(p.trackingContext=this,sn(this)){this.isTrackPending_=!0;try{this.onInvalidate_()}catch(a){this.reportExceptionInDerivation_(a)}}p.trackingContext=i,J()}},e.track=function(i){if(!this.isDisposed_){H(),this.isRunning_=!0;var a=p.trackingContext;p.trackingContext=this;var r=Zi(this,i,void 0);p.trackingContext=a,this.isRunning_=!1,this.isTrackPending_=!1,this.isDisposed_&&on(this),pt(r)&&this.reportExceptionInDerivation_(r.cause),J()}},e.reportExceptionInDerivation_=function(i){var a=this;if(this.errorHandler_){this.errorHandler_(i,this);return}if(p.disableErrorBoundaries)throw i;var r="[mobx] uncaught error in '"+this+"'";p.suppressReactionErrors||console.error(r,i),p.globalReactionErrorHandlers.forEach(function(s){return s(i,a)})},e.dispose=function(){this.isDisposed_||(this.isDisposed_=!0,this.isRunning_||(H(),on(this),J()))},e.getDisposer_=function(i){var a=this,r=function s(){a.dispose(),i==null||i.removeEventListener==null||i.removeEventListener("abort",s)};return i==null||i.addEventListener==null||i.addEventListener("abort",r),r[C]=this,r},e.toString=function(){return"Reaction["+this.name_+"]"},e.trace=function(i){},t}(),qs=100,ln=function(e){return e()};function ra(){p.inBatch>0||p.isRunningReactions||ln(Ws)}function Ws(){p.isRunningReactions=!0;for(var t=p.pendingReactions,e=0;t.length>0;){++e===qs&&(console.error("[mobx] cycle in reaction: "+t[0]),t.splice(0));for(var n=t.splice(0),i=0,a=n.length;i<a;i++)n[i].runReaction_()}p.isRunningReactions=!1}var wt=be("Reaction",qe);function Hs(t){var e=ln;ln=function(i){return t(function(){return e(i)})}}function Qe(){return!1}function Js(t){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}var sa="action",Zs="action.bound",oa="autoAction",Xs="autoAction.bound",Ys="<unnamed action>",un=at(sa),eo=at(Zs,{bound:!0}),dn=at(oa,{autoAction:!0}),to=at(Xs,{autoAction:!0,bound:!0});function la(t){var e=function(i,a){if(ee(i))return ye(i.name||Ys,i,t);if(ee(a))return ye(i,a,t);if(nt(a))return(t?dn:un).decorate_20223_(i,a);if(ve(a))return Ve(i,a,t?dn:un);if(ve(i))return se(at(t?oa:sa,{name:i,autoAction:t}))};return e}var ce=la(!1);Object.assign(ce,un);var We=la(!0);Object.assign(We,dn);ce.bound=se(eo);We.bound=se(to);function Bt(t){return ee(t)&&t.isMobxAction===!0}function no(t,e){var n,i,a,r,s;e===void 0&&(e=Ti);var o=(n=(i=e)==null?void 0:i.name)!=null?n:"Autorun",l=!e.scheduler&&!e.delay,u;if(l)u=new qe(o,function(){this.track(c)},e.onError,e.requiresObservable);else{var d=ao(e),f=!1;u=new qe(o,function(){f||(f=!0,d(function(){f=!1,u.isDisposed_||u.track(c)}))},e.onError,e.requiresObservable)}function c(){t(u)}return(a=e)!=null&&(r=a.signal)!=null&&r.aborted||u.schedule_(),u.getDisposer_((s=e)==null?void 0:s.signal)}var io=function(e){return e()};function ao(t){return t.scheduler?t.scheduler:t.delay?function(e){return setTimeout(e,t.delay)}:io}var ro="onBO",so="onBUO";function oo(t,e,n){return da(ro,t,e,n)}function ua(t,e,n){return da(so,t,e,n)}function da(t,e,n,i){var a=typeof i=="function"?Pe(e,n):Pe(e),r=ee(i)?i:n,s=t+"L";return a[s]?a[s].add(r):a[s]=new Set([r]),function(){var o=a[s];o&&(o.delete(r),o.size===0&&delete a[s])}}var lo="never",ft="always",uo="observed";function co(t){t.isolateGlobalState===!0&&zs();var e=t.useProxies,n=t.enforceActions;if(e!==void 0&&(p.useProxies=e===ft?!0:e===lo?!1:typeof Proxy!="undefined"),e==="ifavailable"&&(p.verifyProxies=!0),n!==void 0){var i=n===ft?ft:n===uo;p.enforceActions=i,p.allowStateChanges=!(i===!0||i===ft)}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach(function(a){a in t&&(p[a]=!!t[a])}),p.allowStateReads=!p.observableRequiresReaction,t.reactionScheduler&&Hs(t.reactionScheduler)}function fo(t,e,n,i){var a=Gr(e);return Ne(function(){var r=Ue(t,i)[C];jt(a).forEach(function(s){r.extend_(s,a[s],n&&s in n?n[s]:!0)})}),t}function mo(t,e){return ca(Pe(t,e))}function ca(t){var e={name:t.name_};return t.observing_&&t.observing_.length>0&&(e.dependencies=ho(t.observing_).map(ca)),e}function ho(t){return Array.from(new Set(t))}var po=0;function fa(){this.message="FLOW_CANCELLED"}fa.prototype=Object.create(Error.prototype);var Jt=Bi("flow"),vo=Bi("flow.bound",{bound:!0}),De=Object.assign(function(e,n){if(nt(n))return Jt.decorate_20223_(e,n);if(ve(n))return Ve(e,n,Jt);var i=e,a=i.name||"<unnamed flow>",r=function(){var o=this,l=arguments,u=++po,d=ce(a+" - runid: "+u+" - init",i).apply(o,l),f,c=void 0,b=new Promise(function(N,k){var y=0;f=k;function R(S){c=void 0;var T;try{T=ce(a+" - runid: "+u+" - yield "+y++,d.next).call(d,S)}catch(P){return k(P)}V(T)}function O(S){c=void 0;var T;try{T=ce(a+" - runid: "+u+" - yield "+y++,d.throw).call(d,S)}catch(P){return k(P)}V(T)}function V(S){if(ee(S==null?void 0:S.then)){S.then(V,k);return}return S.done?N(S.value):(c=Promise.resolve(S.value),c.then(R,O))}R(void 0)});return b.cancel=ce(a+" - runid: "+u+" - cancel",function(){try{c&&Qn(c);var N=d.return(void 0),k=Promise.resolve(N.value);k.then(Ce,Ce),Qn(k),f(new fa)}catch(y){f(y)}}),b};return r.isMobXFlow=!0,r},Jt);De.bound=se(vo);function Qn(t){ee(t.cancel)&&t.cancel()}function He(t){return(t==null?void 0:t.isMobXFlow)===!0}function go(t,e){return t?e!==void 0?Je(t)?t[C].values_.has(e):!1:Je(t)||!!t[C]||bn(t)||wt(t)||$t(t):!1}function ma(t){return go(t)}function le(t,e){e===void 0&&(e=void 0),H();try{return t.apply(e)}finally{J()}}function we(t){return t[C]}var ko={has:function(e,n){return we(e).has_(n)},get:function(e,n){return we(e).get_(n)},set:function(e,n,i){var a;return ve(n)?(a=we(e).set_(n,i,!0))!=null?a:!0:!1},deleteProperty:function(e,n){var i;return ve(n)?(i=we(e).delete_(n,!0))!=null?i:!0:!1},defineProperty:function(e,n,i){var a;return(a=we(e).defineProperty_(n,i))!=null?a:!0},ownKeys:function(e){return we(e).ownKeys_()},preventExtensions:function(e){D(13)}};function yo(t,e){var n,i;return Di(),t=Ue(t,e),(i=(n=t[C]).proxy_)!=null?i:n.proxy_=new Proxy(t,ko)}function q(t){return t.interceptors_!==void 0&&t.interceptors_.length>0}function rt(t,e){var n=t.interceptors_||(t.interceptors_=[]);return n.push(e),Pi(function(){var i=n.indexOf(e);i!==-1&&n.splice(i,1)})}function W(t,e){var n=Se();try{for(var i=[].concat(t.interceptors_||[]),a=0,r=i.length;a<r&&(e=i[a](e),e&&!e.type&&D(14),!!e);a++);return e}finally{de(n)}}function X(t){return t.changeListeners_!==void 0&&t.changeListeners_.length>0}function st(t,e){var n=t.changeListeners_||(t.changeListeners_=[]);return n.push(e),Pi(function(){var i=n.indexOf(e);i!==-1&&n.splice(i,1)})}function Y(t,e){var n=Se(),i=t.changeListeners_;if(i){i=i.slice();for(var a=0,r=i.length;a<r;a++)i[a](e);de(n)}}function ha(t,e,n){return Ne(function(){var i,a=Ue(t,n)[C];(i=e)!=null||(e=Hr(t)),jt(e).forEach(function(r){return a.make_(r,e[r])})}),t}var qn="splice",oe="update",bo=1e4,So={get:function(e,n){var i=e[C];return n===C?i:n==="length"?i.getArrayLength_():typeof n=="string"&&!isNaN(n)?i.get_(parseInt(n)):ue(Ft,n)?Ft[n]:e[n]},set:function(e,n,i){var a=e[C];return n==="length"&&a.setArrayLength_(i),typeof n=="symbol"||isNaN(n)?e[n]=i:a.set_(parseInt(n),i),!0},preventExtensions:function(){D(15)}},wn=function(){function t(n,i,a,r){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_=a,this.legacyMode_=r,this.atom_=new it(n),this.enhancer_=function(s,o){return i(s,o,"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 rt(this,i)},e.observe_=function(i,a){return a===void 0&&(a=!1),a&&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}),st(this,i)},e.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},e.setArrayLength_=function(i){(typeof i!="number"||isNaN(i)||i<0)&&D("Out of range: "+i);var a=this.values_.length;if(i!==a)if(i>a){for(var r=new Array(i-a),s=0;s<i-a;s++)r[s]=void 0;this.spliceWithArray_(a,0,r)}else this.spliceWithArray_(i,a-i)},e.updateArrayLength_=function(i,a){i!==this.lastKnownLength_&&D(16),this.lastKnownLength_+=a,this.legacyMode_&&a>0&&wa(i+a+1)},e.spliceWithArray_=function(i,a,r){var s=this;this.atom_;var o=this.values_.length;if(i===void 0?i=0:i>o?i=o:i<0&&(i=Math.max(0,o+i)),arguments.length===1?a=o-i:a==null?a=0:a=Math.max(0,Math.min(a,o-i)),r===void 0&&(r=tn),q(this)){var l=W(this,{object:this.proxy_,type:qn,index:i,removedCount:a,added:r});if(!l)return tn;a=l.removedCount,r=l.added}if(r=r.length===0?r:r.map(function(f){return s.enhancer_(f,void 0)}),this.legacyMode_){var u=r.length-a;this.updateArrayLength_(o,u)}var d=this.spliceItemsIntoValues_(i,a,r);return(a!==0||r.length!==0)&&this.notifyArraySplice_(i,r,d),this.dehanceValues_(d)},e.spliceItemsIntoValues_=function(i,a,r){if(r.length<bo){var s;return(s=this.values_).splice.apply(s,[i,a].concat(r))}else{var o=this.values_.slice(i,i+a),l=this.values_.slice(i+a);this.values_.length+=r.length-a;for(var u=0;u<r.length;u++)this.values_[i+u]=r[u];for(var d=0;d<l.length;d++)this.values_[i+r.length+d]=l[d];return o}},e.notifyArrayChildUpdate_=function(i,a,r){var s=!this.owned_&&Qe(),o=X(this),l=o||s?{observableKind:"array",object:this.proxy_,type:oe,debugObjectName:this.atom_.name_,index:i,newValue:a,oldValue:r}:null;this.atom_.reportChanged(),o&&Y(this,l)},e.notifyArraySplice_=function(i,a,r){var s=!this.owned_&&Qe(),o=X(this),l=o||s?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:qn,index:i,removed:r,added:a,removedCount:r.length,addedCount:a.length}:null;this.atom_.reportChanged(),o&&Y(this,l)},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,a){var r=this.values_;if(this.legacyMode_&&i>r.length&&D(17,i,r.length),i<r.length){this.atom_;var s=r[i];if(q(this)){var o=W(this,{type:oe,object:this.proxy_,index:i,newValue:a});if(!o)return;a=o.newValue}a=this.enhancer_(a,s);var l=a!==s;l&&(r[i]=a,this.notifyArrayChildUpdate_(i,a,s))}else{for(var u=new Array(i+1-r.length),d=0;d<u.length-1;d++)u[d]=void 0;u[u.length-1]=a,this.spliceWithArray_(r.length,0,u)}},t}();function _o(t,e,n,i){return n===void 0&&(n="ObservableArray"),i===void 0&&(i=!1),Di(),Ne(function(){var a=new wn(n,e,i,!1);Ii(a.values_,C,a);var r=new Proxy(a.values_,So);return a.proxy_=r,t&&t.length&&a.spliceWithArray_(0,0,t),r})}var Ft={clear:function(){return this.splice(0)},replace:function(e){var n=this[C];return n.spliceWithArray_(0,n.values_.length,e)},toJSON:function(){return this.slice()},splice:function(e,n){for(var i=arguments.length,a=new Array(i>2?i-2:0),r=2;r<i;r++)a[r-2]=arguments[r];var s=this[C];switch(arguments.length){case 0:return[];case 1:return s.spliceWithArray_(e);case 2:return s.spliceWithArray_(e,n)}return s.spliceWithArray_(e,n,a)},spliceWithArray:function(e,n,i){return this[C].spliceWithArray_(e,n,i)},push:function(){for(var e=this[C],n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e.spliceWithArray_(e.values_.length,0,i),e.values_.length},pop:function(){return this.splice(Math.max(this[C].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=this[C],n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e.spliceWithArray_(0,0,i),e.values_.length},reverse:function(){return p.trackingDerivation&&D(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){p.trackingDerivation&&D(37,"sort");var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var n=this[C],i=n.dehanceValues_(n.values_).indexOf(e);return i>-1?(this.splice(i,1),!0):!1}};U("at",Q);U("concat",Q);U("flat",Q);U("includes",Q);U("indexOf",Q);U("join",Q);U("lastIndexOf",Q);U("slice",Q);U("toString",Q);U("toLocaleString",Q);U("toSorted",Q);U("toSpliced",Q);U("with",Q);U("every",te);U("filter",te);U("find",te);U("findIndex",te);U("findLast",te);U("findLastIndex",te);U("flatMap",te);U("forEach",te);U("map",te);U("some",te);U("toReversed",te);U("reduce",pa);U("reduceRight",pa);function U(t,e){typeof Array.prototype[t]=="function"&&(Ft[t]=e(t))}function Q(t){return function(){var e=this[C];e.atom_.reportObserved();var n=e.dehanceValues_(e.values_);return n[t].apply(n,arguments)}}function te(t){return function(e,n){var i=this,a=this[C];a.atom_.reportObserved();var r=a.dehanceValues_(a.values_);return r[t](function(s,o){return e.call(n,s,o,i)})}}function pa(t){return function(){var e=this,n=this[C];n.atom_.reportObserved();var i=n.dehanceValues_(n.values_),a=arguments[0];return arguments[0]=function(r,s,o){return a(r,s,o,e)},i[t].apply(i,arguments)}}var No=be("ObservableArrayAdministration",wn);function zt(t){return It(t)&&No(t[C])}var va,ga,Oo={},fe="add",At="delete";va=Symbol.iterator;ga=Symbol.toStringTag;var ka=function(){function t(n,i,a){var r=this;i===void 0&&(i=ke),a===void 0&&(a="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[C]=Oo,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_=a,ee(Map)||D(18),Ne(function(){r.keysAtom_=Mi("ObservableMap.keys()"),r.data_=new Map,r.hasMap_=new Map,n&&r.merge(n)})}var e=t.prototype;return e.has_=function(i){return this.data_.has(i)},e.has=function(i){var a=this;if(!p.trackingDerivation)return this.has_(i);var r=this.hasMap_.get(i);if(!r){var s=r=new pe(this.has_(i),Ut,"ObservableMap.key?",!1);this.hasMap_.set(i,s),ua(s,function(){return a.hasMap_.delete(i)})}return r.get()},e.set=function(i,a){var r=this.has_(i);if(q(this)){var s=W(this,{type:r?oe:fe,object:this,newValue:a,name:i});if(!s)return this;a=s.newValue}return r?this.updateValue_(i,a):this.addValue_(i,a),this},e.delete=function(i){var a=this;if(this.keysAtom_,q(this)){var r=W(this,{type:At,object:this,name:i});if(!r)return!1}if(this.has_(i)){var s=Qe(),o=X(this),l=o||s?{observableKind:"map",debugObjectName:this.name_,type:At,object:this,oldValue:this.data_.get(i).value_,name:i}:null;return le(function(){var u;a.keysAtom_.reportChanged(),(u=a.hasMap_.get(i))==null||u.setNewValue_(!1);var d=a.data_.get(i);d.setNewValue_(void 0),a.data_.delete(i)}),o&&Y(this,l),!0}return!1},e.updateValue_=function(i,a){var r=this.data_.get(i);if(a=r.prepareNewValue_(a),a!==p.UNCHANGED){var s=Qe(),o=X(this),l=o||s?{observableKind:"map",debugObjectName:this.name_,type:oe,object:this,oldValue:r.value_,name:i,newValue:a}:null;r.setNewValue_(a),o&&Y(this,l)}},e.addValue_=function(i,a){var r=this;this.keysAtom_,le(function(){var u,d=new pe(a,r.enhancer_,"ObservableMap.key",!1);r.data_.set(i,d),a=d.value_,(u=r.hasMap_.get(i))==null||u.setNewValue_(!0),r.keysAtom_.reportChanged()});var s=Qe(),o=X(this),l=o||s?{observableKind:"map",debugObjectName:this.name_,type:fe,object:this,name:i,newValue:a}:null;o&&Y(this,l)},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,a=this.keys();return Ze({next:function(){var s=a.next(),o=s.done,l=s.value;return{done:o,value:o?void 0:i.get(l)}}})},e.entries=function(){var i=this,a=this.keys();return Ze({next:function(){var s=a.next(),o=s.done,l=s.value;return{done:o,value:o?void 0:[l,i.get(l)]}}})},e[va]=function(){return this.entries()},e.forEach=function(i,a){for(var r=Re(this),s;!(s=r()).done;){var o=s.value,l=o[0],u=o[1];i.call(a,u,l,this)}},e.merge=function(i){var a=this;return _e(i)&&(i=new Map(i)),le(function(){me(i)?Kr(i).forEach(function(r){return a.set(r,i[r])}):Array.isArray(i)?i.forEach(function(r){var s=r[0],o=r[1];return a.set(s,o)}):Ie(i)?(i.constructor!==Map&&D(19,i),i.forEach(function(r,s){return a.set(s,r)})):i!=null&&D(20,i)}),this},e.clear=function(){var i=this;le(function(){Xi(function(){for(var a=Re(i.keys()),r;!(r=a()).done;){var s=r.value;i.delete(s)}})})},e.replace=function(i){var a=this;return le(function(){for(var r=wo(i),s=new Map,o=!1,l=Re(a.data_.keys()),u;!(u=l()).done;){var d=u.value;if(!r.has(d)){var f=a.delete(d);if(f)o=!0;else{var c=a.data_.get(d);s.set(d,c)}}}for(var b=Re(r.entries()),N;!(N=b()).done;){var k=N.value,y=k[0],R=k[1],O=a.data_.has(y);if(a.set(y,R),a.data_.has(y)){var V=a.data_.get(y);s.set(y,V),O||(o=!0)}}if(!o)if(a.data_.size!==s.size)a.keysAtom_.reportChanged();else for(var S=a.data_.keys(),T=s.keys(),P=S.next(),j=T.next();!P.done;){if(P.value!==j.value){a.keysAtom_.reportChanged();break}P=S.next(),j=T.next()}a.data_=s}),this},e.toString=function(){return"[object ObservableMap]"},e.toJSON=function(){return Array.from(this)},e.observe_=function(i,a){return st(this,i)},e.intercept_=function(i){return rt(this,i)},yn(t,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:ga,get:function(){return"Map"}}]),t}(),_e=be("ObservableMap",ka);function wo(t){if(Ie(t)||_e(t))return t;if(Array.isArray(t))return new Map(t);if(me(t)){var e=new Map;for(var n in t)e.set(n,t[n]);return e}else return D(21,t)}var ya,ba,Fo={};ya=Symbol.iterator;ba=Symbol.toStringTag;var Sa=function(){function t(n,i,a){var r=this;i===void 0&&(i=ke),a===void 0&&(a="ObservableSet"),this.name_=void 0,this[C]=Fo,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_=a,ee(Set)||D(22),this.enhancer_=function(s,o){return i(s,o,a)},Ne(function(){r.atom_=Mi(r.name_),n&&r.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;le(function(){Xi(function(){for(var a=Re(i.data_.values()),r;!(r=a()).done;){var s=r.value;i.delete(s)}})})},e.forEach=function(i,a){for(var r=Re(this),s;!(s=r()).done;){var o=s.value;i.call(a,o,o,this)}},e.add=function(i){var a=this;if(this.atom_,q(this)){var r=W(this,{type:fe,object:this,newValue:i});if(!r)return this}if(!this.has(i)){le(function(){a.data_.add(a.enhancer_(i,void 0)),a.atom_.reportChanged()});var s=!1,o=X(this),l=o||s?{observableKind:"set",debugObjectName:this.name_,type:fe,object:this,newValue:i}:null;o&&Y(this,l)}return this},e.delete=function(i){var a=this;if(q(this)){var r=W(this,{type:At,object:this,oldValue:i});if(!r)return!1}if(this.has(i)){var s=!1,o=X(this),l=o||s?{observableKind:"set",debugObjectName:this.name_,type:At,object:this,oldValue:i}:null;return le(function(){a.atom_.reportChanged(),a.data_.delete(i)}),o&&Y(this,l),!0}return!1},e.has=function(i){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(i))},e.entries=function(){var i=0,a=Array.from(this.keys()),r=Array.from(this.values());return Ze({next:function(){var o=i;return i+=1,o<r.length?{value:[a[o],r[o]],done:!1}:{done:!0}}})},e.keys=function(){return this.values()},e.values=function(){this.atom_.reportObserved();var i=this,a=0,r=Array.from(this.data_.values());return Ze({next:function(){return a<r.length?{value:i.dehanceValue_(r[a++]),done:!1}:{done:!0}}})},e.replace=function(i){var a=this;return je(i)&&(i=new Set(i)),le(function(){Array.isArray(i)?(a.clear(),i.forEach(function(r){return a.add(r)})):tt(i)?(a.clear(),i.forEach(function(r){return a.add(r)})):i!=null&&D("Cannot initialize set from "+i)}),this},e.observe_=function(i,a){return st(this,i)},e.intercept_=function(i){return rt(this,i)},e.toJSON=function(){return Array.from(this)},e.toString=function(){return"[object ObservableSet]"},e[ya]=function(){return this.values()},yn(t,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:ba,get:function(){return"Set"}}]),t}(),je=be("ObservableSet",Sa),Wn=Object.create(null),Hn="remove",_a=function(){function t(n,i,a,r){i===void 0&&(i=new Map),r===void 0&&(r=Ss),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_=a,this.defaultAnnotation_=r,this.keysAtom_=new it("ObservableObject.keys"),this.isPlainObject_=me(this.target_)}var e=t.prototype;return e.getObservablePropValue_=function(i){return this.values_.get(i).get()},e.setObservablePropValue_=function(i,a){var r=this.values_.get(i);if(r instanceof Te)return r.set(a),!0;if(q(this)){var s=W(this,{type:oe,object:this.proxy_||this.target_,name:i,newValue:a});if(!s)return null;a=s.newValue}if(a=r.prepareNewValue_(a),a!==p.UNCHANGED){var o=X(this),l=!1,u=o||l?{type:oe,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:r.value_,name:i,newValue:a}:null;r.setNewValue_(a),o&&Y(this,u)}return!0},e.get_=function(i){return p.trackingDerivation&&!ue(this.target_,i)&&this.has_(i),this.target_[i]},e.set_=function(i,a,r){return r===void 0&&(r=!1),ue(this.target_,i)?this.values_.has(i)?this.setObservablePropValue_(i,a):r?Reflect.set(this.target_,i,a):(this.target_[i]=a,!0):this.extend_(i,{value:a,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,r)},e.has_=function(i){if(!p.trackingDerivation)return i in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var a=this.pendingKeys_.get(i);return a||(a=new pe(i in this.target_,Ut,"ObservableObject.key?",!1),this.pendingKeys_.set(i,a)),a.get()},e.make_=function(i,a){if(a===!0&&(a=this.defaultAnnotation_),a!==!1){if(!(i in this.target_)){var r;if((r=this.target_[ie])!=null&&r[i])return;D(1,a.annotationType_,this.name_+"."+i.toString())}for(var s=this.target_;s&&s!==Lt;){var o=bt(s,i);if(o){var l=a.make_(this,i,o,s);if(l===0)return;if(l===1)break}s=Object.getPrototypeOf(s)}Zn(this,a,i)}},e.extend_=function(i,a,r,s){if(s===void 0&&(s=!1),r===!0&&(r=this.defaultAnnotation_),r===!1)return this.defineProperty_(i,a,s);var o=r.extend_(this,i,a,s);return o&&Zn(this,r,i),o},e.defineProperty_=function(i,a,r){r===void 0&&(r=!1),this.keysAtom_;try{H();var s=this.delete_(i);if(!s)return s;if(q(this)){var o=W(this,{object:this.proxy_||this.target_,name:i,type:fe,newValue:a.value});if(!o)return null;var l=o.newValue;a.value!==l&&(a=ge({},a,{value:l}))}if(r){if(!Reflect.defineProperty(this.target_,i,a))return!1}else re(this.target_,i,a);this.notifyPropertyAddition_(i,a.value)}finally{J()}return!0},e.defineObservableProperty_=function(i,a,r,s){s===void 0&&(s=!1),this.keysAtom_;try{H();var o=this.delete_(i);if(!o)return o;if(q(this)){var l=W(this,{object:this.proxy_||this.target_,name:i,type:fe,newValue:a});if(!l)return null;a=l.newValue}var u=Jn(i),d={configurable:p.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:u.get,set:u.set};if(s){if(!Reflect.defineProperty(this.target_,i,d))return!1}else re(this.target_,i,d);var f=new pe(a,r,"ObservableObject.key",!1);this.values_.set(i,f),this.notifyPropertyAddition_(i,f.value_)}finally{J()}return!0},e.defineComputedProperty_=function(i,a,r){r===void 0&&(r=!1),this.keysAtom_;try{H();var s=this.delete_(i);if(!s)return s;if(q(this)){var o=W(this,{object:this.proxy_||this.target_,name:i,type:fe,newValue:void 0});if(!o)return null}a.name||(a.name="ObservableObject.key"),a.context=this.proxy_||this.target_;var l=Jn(i),u={configurable:p.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:l.get,set:l.set};if(r){if(!Reflect.defineProperty(this.target_,i,u))return!1}else re(this.target_,i,u);this.values_.set(i,new Te(a)),this.notifyPropertyAddition_(i,void 0)}finally{J()}return!0},e.delete_=function(i,a){if(a===void 0&&(a=!1),this.keysAtom_,!ue(this.target_,i))return!0;if(q(this)){var r=W(this,{object:this.proxy_||this.target_,name:i,type:Hn});if(!r)return null}try{var s,o;H();var l=X(this),u=!1,d=this.values_.get(i),f=void 0;if(!d&&(l||u)){var c;f=(c=bt(this.target_,i))==null?void 0:c.value}if(a){if(!Reflect.deleteProperty(this.target_,i))return!1}else delete this.target_[i];if(d&&(this.values_.delete(i),d instanceof pe&&(f=d.value_),aa(d)),this.keysAtom_.reportChanged(),(s=this.pendingKeys_)==null||(o=s.get(i))==null||o.set(i in this.target_),l||u){var b={type:Hn,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:f,name:i};l&&Y(this,b)}}finally{J()}return!0},e.observe_=function(i,a){return st(this,i)},e.intercept_=function(i){return rt(this,i)},e.notifyPropertyAddition_=function(i,a){var r,s,o=X(this),l=!1;if(o||l){var u=o||l?{type:fe,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:i,newValue:a}:null;o&&Y(this,u)}(r=this.pendingKeys_)==null||(s=r.get(i))==null||s.set(!0),this.keysAtom_.reportChanged()},e.ownKeys_=function(){return this.keysAtom_.reportObserved(),jt(this.target_)},e.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},t}();function Ue(t,e){var n;if(ue(t,C))return t;var i=(n=e==null?void 0:e.name)!=null?n:"ObservableObject",a=new _a(t,new Map,String(i),Ts(e));return Vt(t,C,a),t}var Ao=be("ObservableObjectAdministration",_a);function Jn(t){return Wn[t]||(Wn[t]={get:function(){return this[C].getObservablePropValue_(t)},set:function(n){return this[C].setObservablePropValue_(t,n)}})}function Je(t){return It(t)?Ao(t[C]):!1}function Zn(t,e,n){var i;(i=t.target_[ie])==null||delete i[n]}var Eo=Oa(0),Co=function(){var t=!1,e={};return Object.defineProperty(e,"0",{set:function(){t=!0}}),Object.create(e)[0]=1,t===!1}(),Zt=0,Na=function(){};function Ro(t,e){Object.setPrototypeOf?Object.setPrototypeOf(t.prototype,e):t.prototype.__proto__!==void 0?t.prototype.__proto__=e:t.prototype=e}Ro(Na,Array.prototype);var Fn=function(t,e,n){Ui(i,t);function i(r,s,o,l){var u;return o===void 0&&(o="ObservableArray"),l===void 0&&(l=!1),u=t.call(this)||this,Ne(function(){var d=new wn(o,s,l,!0);d.proxy_=Ht(u),Ii(Ht(u),C,d),r&&r.length&&u.spliceWithArray(0,0,r),Co&&Object.defineProperty(Ht(u),"0",Eo)}),u}var a=i.prototype;return a.concat=function(){this[C].atom_.reportObserved();for(var s=arguments.length,o=new Array(s),l=0;l<s;l++)o[l]=arguments[l];return Array.prototype.concat.apply(this.slice(),o.map(function(u){return zt(u)?u.slice():u}))},a[n]=function(){var r=this,s=0;return Ze({next:function(){return s<r.length?{value:r[s++],done:!1}:{done:!0,value:void 0}}})},yn(i,[{key:"length",get:function(){return this[C].getArrayLength_()},set:function(s){this[C].setArrayLength_(s)}},{key:e,get:function(){return"Array"}}]),i}(Na,Symbol.toStringTag,Symbol.iterator);Object.entries(Ft).forEach(function(t){var e=t[0],n=t[1];e!=="concat"&&Vt(Fn.prototype,e,n)});function Oa(t){return{enumerable:!1,configurable:!0,get:function(){return this[C].get_(t)},set:function(n){this[C].set_(t,n)}}}function xo(t){re(Fn.prototype,""+t,Oa(t))}function wa(t){if(t>Zt){for(var e=Zt;e<t+100;e++)xo(e);Zt=t}}wa(1e3);function To(t,e,n){return new Fn(t,e,n)}function Pe(t,e){if(typeof t=="object"&&t!==null){if(zt(t))return e!==void 0&&D(23),t[C].atom_;if(je(t))return t.atom_;if(_e(t)){if(e===void 0)return t.keysAtom_;var n=t.data_.get(e)||t.hasMap_.get(e);return n||D(25,e,cn(t)),n}if(Je(t)){if(!e)return D(26);var i=t[C].values_.get(e);return i||D(27,e,cn(t)),i}if(bn(t)||$t(t)||wt(t))return t}else if(ee(t)&&wt(t[C]))return t[C];D(28)}function Fa(t,e){if(t||D(29),e!==void 0)return Fa(Pe(t,e));if(bn(t)||$t(t)||wt(t)||_e(t)||je(t))return t;if(t[C])return t[C];D(24,t)}function cn(t,e){var n;if(e!==void 0)n=Pe(t,e);else{if(Bt(t))return t.name;Je(t)||_e(t)||je(t)?n=Fa(t):n=Pe(t)}return n.name_}function Ne(t){var e=Se(),n=_n(!0);H();try{return t()}finally{J(),Nn(n),de(e)}}var Xn=Lt.toString;function An(t,e,n){return n===void 0&&(n=-1),fn(t,e,n)}function fn(t,e,n,i,a){if(t===e)return t!==0||1/t===1/e;if(t==null||e==null)return!1;if(t!==t)return e!==e;var r=typeof t;if(r!=="function"&&r!=="object"&&typeof e!="object")return!1;var s=Xn.call(t);if(s!==Xn.call(e))return!1;switch(s){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=Yn(t),e=Yn(e);var o=s==="[object Array]";if(!o){if(typeof t!="object"||typeof e!="object")return!1;var l=t.constructor,u=e.constructor;if(l!==u&&!(ee(l)&&l instanceof l&&ee(u)&&u instanceof u)&&"constructor"in t&&"constructor"in e)return!1}if(n===0)return!1;n<0&&(n=-1),i=i||[],a=a||[];for(var d=i.length;d--;)if(i[d]===t)return a[d]===e;if(i.push(t),a.push(e),o){if(d=t.length,d!==e.length)return!1;for(;d--;)if(!fn(t[d],e[d],n-1,i,a))return!1}else{var f=Object.keys(t),c;if(d=f.length,Object.keys(e).length!==d)return!1;for(;d--;)if(c=f[d],!(ue(e,c)&&fn(t[c],e[c],n-1,i,a)))return!1}return i.pop(),a.pop(),!0}function Yn(t){return zt(t)?t.slice():Ie(t)||_e(t)||tt(t)||je(t)?Array.from(t.entries()):t}function Ze(t){return t[Symbol.iterator]=Do,t}function Do(){return this}["Symbol","Map","Set"].forEach(function(t){var e=kn();typeof e[t]=="undefined"&&D("MobX requires global '"+t+"' to be available or polyfilled")});typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Js,extras:{getDebugName:cn},$mobx:C});class Aa{constructor(e){x(this,"channel");x(this,"listeners",new Map);x(this,"eventQueue",new Map);try{this.channel=new BroadcastChannel(e),this.channel.onmessage=n=>this.handleMessage(n),this.channel.onmessageerror=n=>xe.error("NizzaBroadcastChannel:",n)}catch(n){throw xe.error("Failed to create NizzaBroadcastChannel:",n),n}}on(e,n){return this.subscribeToEvent(e,n),{off:()=>this.unsubscribeFromEvent(e,n)}}emit(e,n,i={}){this.emitEvent(e,n,i)}handleMessage(e){const n=e.data,{name:i}=n;for(const[a,r]of this.listeners.entries())this.matchWildcard(a,i)&&r.forEach(s=>s({...n,wildcard:a}))}subscribeToEvent(e,n){if(typeof e!="string"||typeof n!="function"){const i=new Error("Invalid arguments");throw xe.error(i),i}for(const[i,a]of this.listeners.entries())if(this.matchWildcard(i,e)){a.add(n);const r=this.eventQueue.get(i);r&&(r.forEach(s=>{n({...s,wildcard:i})}),this.eventQueue.delete(i));return}this.listeners.set(e,new Set([n]))}emitEvent(e,n,i){if(typeof e!="string"){const s=new Error("Invalid arguments");throw xe.error(s),s}const a={name:e,data:n,attrs:i},r=Array.from(this.getMatchingListeners(e));if(r.length)for(const[s,o]of r)o({...a,wildcard:s});else this.eventQueue.has(e)||this.eventQueue.set(e,[]),this.eventQueue.get(e).push(a);this.channel.postMessage(a)}*getMatchingListeners(e){for(const[n,i]of this.listeners.entries())if(this.matchWildcard(n,e))for(const a of i)yield[n,a]}unsubscribeFromEvent(e,n){if(this.listeners.has(e)){const i=this.listeners.get(e);i.delete(n),i.size===0&&this.listeners.delete(e)}}matchWildcard(e,n){const i=e.replace(/\*/g,"[^:]*").replace(/\*\*/g,".*");return new RegExp(`^${i}$`).test(n)}}let Po=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((e,n)=>(n&=63,n<36?e+=n.toString(36):n<62?e+=(n-26).toString(36).toUpperCase():n>62?e+="-":e+="_",e),"");const Ea=(t=8)=>Po(t),Lo=t=>{const e=Object.entries(t).reduce((n,[i,a])=>a!==void 0?`${n}${n?"&":""}${i}=${a}`:n,"");return e?`?${e}`:""};function Io(){const t=new Error().stack.split(`
4
+ `);return t.length<3?"":t[2].trim().substring(3)}var Ca=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Ra(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var xa={exports:{}};(function(t){(function(e,n){t.exports?t.exports=n():e.log=n()})(Ca,function(){var e=function(){},n="undefined",i=typeof window!==n&&typeof window.navigator!==n&&/Trident\/|MSIE /.test(window.navigator.userAgent),a=["trace","debug","info","warn","error"];function r(k,y){var R=k[y];if(typeof R.bind=="function")return R.bind(k);try{return Function.prototype.bind.call(R,k)}catch{return function(){return Function.prototype.apply.apply(R,[k,arguments])}}}function s(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function o(k){return k==="debug"&&(k="log"),typeof console===n?!1:k==="trace"&&i?s:console[k]!==void 0?r(console,k):console.log!==void 0?r(console,"log"):e}function l(k,y){for(var R=0;R<a.length;R++){var O=a[R];this[O]=R<k?e:this.methodFactory(O,k,y)}this.log=this.debug}function u(k,y,R){return function(){typeof console!==n&&(l.call(this,y,R),this[k].apply(this,arguments))}}function d(k,y,R){return o(k)||u.apply(this,arguments)}function f(k,y,R){var O=this,V;y=y==null?"WARN":y;var S="loglevel";typeof k=="string"?S+=":"+k:typeof k=="symbol"&&(S=void 0);function T(h){var v=(a[h]||"silent").toUpperCase();if(!(typeof window===n||!S)){try{window.localStorage[S]=v;return}catch{}try{window.document.cookie=encodeURIComponent(S)+"="+v+";"}catch{}}}function P(){var h;if(!(typeof window===n||!S)){try{h=window.localStorage[S]}catch{}if(typeof h===n)try{var v=window.document.cookie,g=v.indexOf(encodeURIComponent(S)+"=");g!==-1&&(h=/^([^;]+)/.exec(v.slice(g))[1])}catch{}return O.levels[h]===void 0&&(h=void 0),h}}function j(){if(!(typeof window===n||!S)){try{window.localStorage.removeItem(S);return}catch{}try{window.document.cookie=encodeURIComponent(S)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}O.name=k,O.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},O.methodFactory=R||d,O.getLevel=function(){return V},O.setLevel=function(h,v){if(typeof h=="string"&&O.levels[h.toUpperCase()]!==void 0&&(h=O.levels[h.toUpperCase()]),typeof h=="number"&&h>=0&&h<=O.levels.SILENT){if(V=h,v!==!1&&T(h),l.call(O,h,k),typeof console===n&&h<O.levels.SILENT)return"No console available for logging"}else throw"log.setLevel() called with invalid level: "+h},O.setDefaultLevel=function(h){y=h,P()||O.setLevel(h,!1)},O.resetLevel=function(){O.setLevel(y,!1),j()},O.enableAll=function(h){O.setLevel(O.levels.TRACE,h)},O.disableAll=function(h){O.setLevel(O.levels.SILENT,h)};var m=P();m==null&&(m=y),O.setLevel(m,!1)}var c=new f,b={};c.getLogger=function(y){if(typeof y!="symbol"&&typeof y!="string"||y==="")throw new TypeError("You must supply a name when creating a logger.");var R=b[y];return R||(R=b[y]=new f(y,c.getLevel(),c.methodFactory)),R};var N=typeof window!==n?window.log:void 0;return c.noConflict=function(){return typeof window!==n&&window.log===c&&(window.log=N),c},c.getLoggers=function(){return b},c.default=c,c})})(xa);var Ta=xa.exports;const mt=Ra(Ta);var Da={exports:{}};(function(t){(function(e,n){t.exports?t.exports=n():e.prefix=n(e)})(Ca,function(e){var n=function(d){for(var f=1,c=arguments.length,b;f<c;f++)for(b in arguments[f])Object.prototype.hasOwnProperty.call(arguments[f],b)&&(d[b]=arguments[f][b]);return d},i={template:"[%t] %l:",levelFormatter:function(d){return d.toUpperCase()},nameFormatter:function(d){return d||"root"},timestampFormatter:function(d){return d.toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/,"$1")},format:void 0},a,r={},s=function(d){if(!d||!d.getLogger)throw new TypeError("Argument is not a root logger");a=d},o=function(d,f){if(!d||!d.setLevel)throw new TypeError("Argument is not a logger");var c=d.methodFactory,b=d.name||"",N=r[b]||r[""]||i;function k(y,R,O){var V=c(y,R,O),S=r[O]||r[""],T=S.template.indexOf("%t")!==-1,P=S.template.indexOf("%l")!==-1,j=S.template.indexOf("%n")!==-1;return function(){for(var m="",h=arguments.length,v=Array(h),g=0;g<h;g++)v[g]=arguments[g];if(b||!r[O]){var w=S.timestampFormatter(new Date),F=S.levelFormatter(y),_=S.nameFormatter(O);S.format?m+=S.format(F,_,w):(m+=S.template,T&&(m=m.replace(/%t/,w)),P&&(m=m.replace(/%l/,F)),j&&(m=m.replace(/%n/,_))),v.length&&typeof v[0]=="string"?v[0]=m+" "+v[0]:v.unshift(m)}V.apply(void 0,v)}}return r[b]||(d.methodFactory=k),f=f||{},f.template&&(f.format=void 0),r[b]=n({},N,f),d.setLevel(d.getLevel()),a||d.warn("It is necessary to call the function reg() of loglevel-plugin-prefix before calling apply. From the next release, it will throw an error. See more: https://github.com/kutuluk/loglevel-plugin-prefix/blob/master/README.md"),d},l={reg:s,apply:o},u;return e&&(u=e.prefix,l.noConflict=function(){return e.prefix===l&&(e.prefix=u),l}),l})})(Da);var Vo=Da.exports;const ei=Ra(Vo);let Pa=class{constructor(e){x(this,"defaultLevel",Ta.levels.INFO);x(this,"namePrefix");this.namePrefix=e?`${e}-`:"",mt.setDefaultLevel(this.defaultLevel),ei.reg(mt),ei.apply(mt,{template:"[%t] %l (%n)",nameFormatter:n=>{var i;return(i=n==null?void 0:n.toLowerCase())!=null?i:""},timestampFormatter:()=>new Date().toTimeString().slice(0,8)})}createLogger(e){const n=this.namePrefix+e.toLowerCase(),i=mt.getLogger(n),a=localStorage.getItem(`loglevel:${n}`);return a?i.setLevel(a):i.setLevel(this.defaultLevel),i}};const ne=class ne{constructor(){x(this,"version","1.0.5");x(this,"instanceId",Ea());x(this,"_config",null);x(this,"_account");x(this,"_productDataSource");x(this,"_eventBus",new Aa("nizza"));x(this,"log",new Pa("nz"));ha(this,{_config:z,_account:z,_productDataSource:z,config:he,account:he,accountName:he,configure:ce,setProductDataSource:ce},{name:"NizzaStore",autoBind:!0})}static instance(){return ne._instance||(ne._instance=new ne),window!=null&&window.nizza?ne._instance=window==null?void 0:window.nizza:(window.nizza=ne._instance,window.nz=ne._instance),ne._instance}async configure(e){var n;try{const i=(n=this._config)==null?void 0:n.account;if(this._config=e,i!==e.account){const a=await Ya(e.account);this.setAccount(a)}if(e.getProductDataSource){const a=await e.getProductDataSource();this.setProductDataSource(a)}}catch(i){console.error("Error configuring NizzaStore:",i)}}setAccount(e){this._account=e}setProductDataSource(e){this._productDataSource=e}get config(){return this._config}get account(){return this._account}get accountName(){var e;return(e=this._config)==null?void 0:e.account}get productDataSource(){return this._productDataSource}get eventBus(){return this._eventBus}};x(ne,"_instance");let Xe=ne;const En=Xe.instance(),jo=En.log.createLogger("main"),xe=En.log.createLogger("core");function Ee(t){return t!=null&&typeof t=="object"&&t["@@functional/placeholder"]===!0}function kt(t){return function e(n){return arguments.length===0||Ee(n)?e:t.apply(this,arguments)}}function Cn(t){return function e(n,i){switch(arguments.length){case 0:return e;case 1:return Ee(n)?e:kt(function(a){return t(n,a)});default:return Ee(n)&&Ee(i)?e:Ee(n)?kt(function(a){return t(a,i)}):Ee(i)?kt(function(a){return t(n,a)}):t(n,i)}}}const Uo=Number.isInteger||function(e){return e<<0===e};function Mo(t){return Object.prototype.toString.call(t)==="[object String]"}var $o=Cn(function(e,n){var i=e<0?n.length+e:e;return Mo(n)?n.charAt(i):n[i]});const Bo=$o;var zo=kt(function(e){return e==null});const Ko=zo;var Go=Cn(function(e,n){return e.map(function(i){for(var a=n,r=0,s;r<i.length;){if(a==null)return;s=i[r],a=Uo(s)?Bo(s,a):a[s],r+=1}return a})});const Qo=Go;var qo=Cn(function(e,n){return Qo([e],n)[0]});const Wo=qo;class ot extends Error{constructor(e,n,i){super(n),this.value=i,this.name=e}toDTO(){return{name:this.name,message:this.message,...this.value&&{value:this.value}}}}class La extends ot{constructor(e){super("RESOURCE_NOT_FOUND_ERROR",`Resource with id '${e}' not found.`,e)}}class Ia extends ot{constructor(e){var n;super("APP_UNEXPECTED_ERROR",(n=e.message)!=null?n:"An unexpected error occurred.",e)}}class Ho extends ot{constructor(){super("APP_ACCOUNT_INVALID_ERROR","Account not defined")}}class Va extends ot{constructor(e){super("INVALID_NIZZA_GLOBAL_OBJECT_ERROR",`
19
5
  Configuration property invalid: "${e}".
20
6
 
21
7
  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".
@@ -35,5 +21,13 @@
35
21
  account: env.account,
36
22
  ...
37
23
  });
38
- `)}}function Oi(n,e){e.forEach(t=>{if(Ni(Ci(t.split("."),n)))throw new Ut(t)})}function xi(){var i,a,s;let n=null,e=null,t=null;try{n=(s=(a=(i=Intl.DateTimeFormat())==null?void 0:i.resolvedOptions())==null?void 0:a.timeZone)!=null?s:null;const r=-new Date().getTimezoneOffset();t=r;const o=r>=0?"+":"-",l=String(Math.floor(Math.abs(r)/60)).padStart(2,"0"),u=String(Math.abs(r)%60).padStart(2,"0");e=`${o}${l}:${u}`}catch{K.error("Error obtaining time zone or offset")}return{offset:e,offsetValue:t,value:n,country:null,included:null,label:null}}class jt{constructor(e){R(this,"aggregate");R(this,"_numSetPropsApplied",0);this.aggregate=e}setProps(e){for(const[t,i]of Object.entries(e))t in this.aggregate&&(this.aggregate[t]=i);this._numSetPropsApplied++}get isFirstSetProps(){return this._numSetPropsApplied===1}}function Mt(n){return new jt(n)}class Ri{}class Ti{constructor(e){R(this,"_value");e!==void 0&&(this._value=e)}get value(){return this._value}}var De=(n=>(n.VTEX="VTEX",n.VTEX_IO="VTEX-IO",n.VTEX_CMS="PORTAL-VTEX",n.PLATFORM="PLATFORM",n.UNKNOWN="UNKNOWN",n))(De||{}),$t=(n=>(n.PLATFORM="platform_module",n.ADENDA="subscription_module",n.APP_STORE="app_store",n))($t||{}),Le=(n=>(n.ACTIVE="active_contract",n.INACTIVE="inactive_contract",n))(Le||{}),zt=(n=>(n.LITE="lite",n.STANDARD="standard",n.PRO="pro",n))(zt||{}),Bt=(n=>(n.LITE="PLAN_LITE",n.STANDARD="PLAN_ESTANDAR",n.PRO="PLAN_PRO",n.NONE="NO_PLAN",n))(Bt||{}),Qt=(n=>(n.PAST="past",n.LIVE="live",n.FUTURE="future",n))(Qt||{});class Se{constructor(e){R(this,"root",Mt(this));R(this,"id");R(this,"account");R(this,"accountType",De.UNKNOWN);R(this,"username");R(this,"currencyConfig");R(this,"contractType");R(this,"nextDateMetricRecord");R(this,"spendedMinutes",0);R(this,"unlimitedService",!1);R(this,"hoursAvailable",0);R(this,"contractStatus",Le.ACTIVE);R(this,"createdAt");R(this,"installationDateApp");R(this,"cxAccount");R(this,"freeService",!1);R(this,"subscriptionType",null);R(this,"minutesAvailable",0);R(this,"globalPage");R(this,"stripe");R(this,"descriptionPlan");R(this,"planType");R(this,"selectFreeTrial");R(this,"exceededFeatures");R(this,"host",null);this.root.setProps(e)}static toDomain(e){const{createdAt:t,username:i,...a}=e,s={...a,username:i!=null?i:a.account,createdAt:new Date(Number(t))};return new Se(s)}toPrimitives(){const{root:e,createdAt:t,...i}=this;return{...i,created:t.toISOString()}}}const Ii=`${Pn.apiUrls.restV1}/accounts/v2`;class Gt{async get(e){const t=`${Ii}/${e}`,{data:i}=await Re({url:t});return i?Se.toDomain(i):null}}class Kt{constructor(e){this.accountRepository=e}async get(e){try{const t=await this.accountRepository.get(e);if(!t)throw new Vt(e);return t}catch(t){throw new _t(t)}}}const Di=new Gt,Ae=new Kt(Di);class Pe{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){const t={listener:e};return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const ue=typeof window=="undefined"||"Deno"in window;function Li(){}function We(n){return typeof n=="number"&&n>=0&&n!==1/0}function Ai(n,e){return Math.max(n+(e||0)-Date.now(),0)}function Pi(n,e,t){return Vi(n)?typeof e=="function"?{...t,queryKey:n,queryFn:e}:{...e,queryKey:n}:n}function Wt(n,e){if(n===e)return n;const t=qe(n)&&qe(e);if(t||Je(n)&&Je(e)){const i=t?n.length:Object.keys(n).length,a=t?e:Object.keys(e),s=a.length,r=t?[]:{};let o=0;for(let l=0;l<s;l++){const u=t?l:a[l];r[u]=Wt(n[u],e[u]),r[u]===n[u]&&o++}return i===s&&o===i?n:r}return e}function Ee(n,e){if(n&&!e||e&&!n)return!1;for(const t in n)if(n[t]!==e[t])return!1;return!0}function qe(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function Je(n){if(!He(n))return!1;const e=n.constructor;if(typeof e=="undefined")return!0;const t=e.prototype;return!(!He(t)||!t.hasOwnProperty("isPrototypeOf"))}function He(n){return Object.prototype.toString.call(n)==="[object Object]"}function Vi(n){return Array.isArray(n)}function _i(n){return new Promise(e=>{setTimeout(e,n)})}function Ze(n){_i(0).then(n)}function Xe(n,e,t){return t.isDataEqual!=null&&t.isDataEqual(n,e)?n:typeof t.structuralSharing=="function"?t.structuralSharing(n,e):t.structuralSharing!==!1?Wt(n,e):e}class Ui extends Pe{constructor(){super(),this.setup=e=>{if(!ue&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),window.addEventListener("focus",t,!1),()=>{window.removeEventListener("visibilitychange",t),window.removeEventListener("focus",t)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var t;this.setup=e,(t=this.cleanup)==null||t.call(this),this.cleanup=e(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()})}setFocused(e){this.focused!==e&&(this.focused=e,this.onFocus())}onFocus(){this.listeners.forEach(({listener:e})=>{e()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document=="undefined"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const ji=new Ui,Ye=["online","offline"];class Mi extends Pe{constructor(){super(),this.setup=e=>{if(!ue&&window.addEventListener){const t=()=>e();return Ye.forEach(i=>{window.addEventListener(i,t,!1)}),()=>{Ye.forEach(i=>{window.removeEventListener(i,t)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var t;this.setup=e,(t=this.cleanup)==null||t.call(this),this.cleanup=e(i=>{typeof i=="boolean"?this.setOnline(i):this.onOnline()})}setOnline(e){this.online!==e&&(this.online=e,this.onOnline())}onOnline(){this.listeners.forEach(({listener:e})=>{e()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator=="undefined"||typeof navigator.onLine=="undefined"?!0:navigator.onLine}}const $i=new Mi;function zi(n){return(n!=null?n:"online")==="online"?$i.isOnline():!0}class Bi{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}}function Qi(n){return n instanceof Bi}function Gi(){let n=[],e=0,t=d=>{d()},i=d=>{d()};const a=d=>{let f;e++;try{f=d()}finally{e--,e||o()}return f},s=d=>{e?n.push(d):Ze(()=>{t(d)})},r=d=>(...f)=>{s(()=>{d(...f)})},o=()=>{const d=n;n=[],d.length&&Ze(()=>{i(()=>{d.forEach(f=>{t(f)})})})};return{batch:a,batchCalls:r,schedule:s,setNotifyFunction:d=>{t=d},setBatchNotifyFunction:d=>{i=d}}}const Y=Gi();class Ki extends Pe{constructor(e,t){super(),this.client=e,this.options=t,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),et(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Oe(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Oe(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,t){const i=this.options,a=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),Ee(i,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled!="undefined"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=i.queryKey),this.updateQuery();const s=this.hasListeners();s&&tt(this.currentQuery,a,this.options,i)&&this.executeFetch(),this.updateResult(t),s&&(this.currentQuery!==a||this.options.enabled!==i.enabled||this.options.staleTime!==i.staleTime)&&this.updateStaleTimeout();const r=this.computeRefetchInterval();s&&(this.currentQuery!==a||this.options.enabled!==i.enabled||r!==this.currentRefetchInterval)&&this.updateRefetchInterval(r)}getOptimisticResult(e){const t=this.client.getQueryCache().build(this.client,e),i=this.createResult(t,e);return qi(this,i,e)&&(this.currentResult=i,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),i}getCurrentResult(){return this.currentResult}trackResult(e){const t={};return Object.keys(e).forEach(i=>{Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(i),e[i])})}),t}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...t}={}){return this.fetch({...t,meta:{refetchPage:e}})}fetchOptimistic(e){const t=this.client.defaultQueryOptions(e),i=this.client.getQueryCache().build(this.client,t);return i.isFetchingOptimistic=!0,i.fetch().then(()=>this.createResult(i,t))}fetch(e){var t;return this.executeFetch({...e,cancelRefetch:(t=e.cancelRefetch)!=null?t:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let t=this.currentQuery.fetch(this.options,e);return e!=null&&e.throwOnError||(t=t.catch(Li)),t}updateStaleTimeout(){if(this.clearStaleTimeout(),ue||this.currentResult.isStale||!We(this.options.staleTime))return;const t=Ai(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},t)}computeRefetchInterval(){var e;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(e=this.options.refetchInterval)!=null?e:!1}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!(ue||this.options.enabled===!1||!We(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||ji.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,t){const i=this.currentQuery,a=this.options,s=this.currentResult,r=this.currentResultState,o=this.currentResultOptions,l=e!==i,u=l?e.state:this.currentQueryInitialState,d=l?this.currentResult:this.previousQueryResult,{state:f}=e;let{dataUpdatedAt:c,error:S,errorUpdatedAt:y,fetchStatus:k,status:N}=f,x=!1,F=!1,I;if(t._optimisticResults){const m=this.hasListeners(),p=!m&&et(e,t),h=m&&tt(e,i,t,a);(p||h)&&(k=zi(e.options.networkMode)?"fetching":"paused",c||(N="loading")),t._optimisticResults==="isRestoring"&&(k="idle")}if(t.keepPreviousData&&!f.dataUpdatedAt&&d!=null&&d.isSuccess&&N!=="error")I=d.data,c=d.dataUpdatedAt,N=d.status,x=!0;else if(t.select&&typeof f.data!="undefined")if(s&&f.data===(r==null?void 0:r.data)&&t.select===this.selectFn)I=this.selectResult;else try{this.selectFn=t.select,I=t.select(f.data),I=Xe(s==null?void 0:s.data,I,t),this.selectResult=I,this.selectError=null}catch(m){this.selectError=m}else I=f.data;if(typeof t.placeholderData!="undefined"&&typeof I=="undefined"&&N==="loading"){let m;if(s!=null&&s.isPlaceholderData&&t.placeholderData===(o==null?void 0:o.placeholderData))m=s.data;else if(m=typeof t.placeholderData=="function"?t.placeholderData():t.placeholderData,t.select&&typeof m!="undefined")try{m=t.select(m),this.selectError=null}catch(p){this.selectError=p}typeof m!="undefined"&&(N="success",I=Xe(s==null?void 0:s.data,m,t),F=!0)}this.selectError&&(S=this.selectError,I=this.selectResult,y=Date.now(),N="error");const w=k==="fetching",D=N==="loading",L=N==="error";return{status:N,fetchStatus:k,isLoading:D,isSuccess:N==="success",isError:L,isInitialLoading:D&&w,data:I,dataUpdatedAt:c,error:S,errorUpdatedAt:y,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:w,isRefetching:w&&!D,isLoadingError:L&&f.dataUpdatedAt===0,isPaused:k==="paused",isPlaceholderData:F,isPreviousData:x,isRefetchError:L&&f.dataUpdatedAt!==0,isStale:Ve(e,t),refetch:this.refetch,remove:this.remove}}updateResult(e){const t=this.currentResult,i=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,Ee(i,t))return;this.currentResult=i;const a={cache:!0},s=()=>{if(!t)return!0;const{notifyOnChangeProps:r}=this.options,o=typeof r=="function"?r():r;if(o==="all"||!o&&!this.trackedProps.size)return!0;const l=new Set(o!=null?o:this.trackedProps);return this.options.useErrorBoundary&&l.add("error"),Object.keys(this.currentResult).some(u=>{const d=u;return this.currentResult[d]!==t[d]&&l.has(d)})};(e==null?void 0:e.listeners)!==!1&&s()&&(a.listeners=!0),this.notify({...a,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(t==null||t.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const t={};e.type==="success"?t.onSuccess=!e.manual:e.type==="error"&&!Qi(e.error)&&(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()}notify(e){Y.batch(()=>{if(e.onSuccess){var t,i,a,s;(t=(i=this.options).onSuccess)==null||t.call(i,this.currentResult.data),(a=(s=this.options).onSettled)==null||a.call(s,this.currentResult.data,null)}else if(e.onError){var r,o,l,u;(r=(o=this.options).onError)==null||r.call(o,this.currentResult.error),(l=(u=this.options).onSettled)==null||l.call(u,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(({listener:d})=>{d(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function Wi(n,e){return e.enabled!==!1&&!n.state.dataUpdatedAt&&!(n.state.status==="error"&&e.retryOnMount===!1)}function et(n,e){return Wi(n,e)||n.state.dataUpdatedAt>0&&Oe(n,e,e.refetchOnMount)}function Oe(n,e,t){if(e.enabled!==!1){const i=typeof t=="function"?t(n):t;return i==="always"||i!==!1&&Ve(n,e)}return!1}function tt(n,e,t,i){return t.enabled!==!1&&(n!==e||i.enabled===!1)&&(!t.suspense||n.state.status!=="error")&&Ve(n,t)}function Ve(n,e){return n.isStaleByTime(e.staleTime)}function qi(n,e,t){return t.keepPreviousData?!1:t.placeholderData!==void 0?e.isPlaceholderData:!Ee(n.getCurrentResult(),e)}const Ji=Et.useSyncExternalStore,nt=M.createContext(void 0),Hi=M.createContext(!1);function Zi(n,e){return n||(e&&typeof window!="undefined"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=nt),window.ReactQueryClientContext):nt)}const Xi=({context:n}={})=>{const e=M.useContext(Zi(n,M.useContext(Hi)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},qt=M.createContext(!1),Yi=()=>M.useContext(qt);qt.Provider;function ea(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}const ta=M.createContext(ea()),na=()=>M.useContext(ta);function ia(n,e){return typeof n=="function"?n(...e):!!n}const aa=(n,e)=>{(n.suspense||n.useErrorBoundary)&&(e.isReset()||(n.retryOnMount=!1))},sa=n=>{M.useEffect(()=>{n.clearReset()},[n])},ra=({result:n,errorResetBoundary:e,useErrorBoundary:t,query:i})=>n.isError&&!e.isReset()&&!n.isFetching&&ia(t,[n.error,i]),oa=n=>{n.suspense&&typeof n.staleTime!="number"&&(n.staleTime=1e3)},la=(n,e)=>n.isLoading&&n.isFetching&&!e,da=(n,e,t)=>(n==null?void 0:n.suspense)&&la(e,t),ua=(n,e,t)=>e.fetchOptimistic(n).then(({data:i})=>{n.onSuccess==null||n.onSuccess(i),n.onSettled==null||n.onSettled(i,null)}).catch(i=>{t.clearReset(),n.onError==null||n.onError(i),n.onSettled==null||n.onSettled(void 0,i)});function ca(n,e){const t=Xi({context:n.context}),i=Yi(),a=na(),s=t.defaultQueryOptions(n);s._optimisticResults=i?"isRestoring":"optimistic",s.onError&&(s.onError=Y.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=Y.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=Y.batchCalls(s.onSettled)),oa(s),aa(s,a),sa(a);const[r]=M.useState(()=>new e(t,s)),o=r.getOptimisticResult(s);if(Ji(M.useCallback(l=>{const u=i?()=>{}:r.subscribe(Y.batchCalls(l));return r.updateResult(),u},[r,i]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),M.useEffect(()=>{r.setOptions(s,{listeners:!1})},[s,r]),da(s,o,i))throw ua(s,r,a);if(ra({result:o,errorResetBoundary:a,useErrorBoundary:s.useErrorBoundary,query:r.getCurrentQuery()}))throw o.error;return s.notifyOnChangeProps?o:r.trackResult(o)}function ma(n,e,t){const i=Pi(n,e,t);return ca(i,Ki)}const fa=()=>["account"],pa=()=>{const n=exports.useNizza(a=>{var s;return(s=a.config)==null?void 0:s.account}),[e,t]=Rn(ge),i=ma(fa(),()=>Ae.get(n),{enabled:!!n&&!e,refetchOnWindowFocus:!1,refetchOnMount:!1});return j.useEffect(()=>{const a=i.data;!i.isSuccess||!a||t(a)},[i.status]),{findQuery:i,account:e}},Jt=vt();async function Ht(n){const e=await Ae.get(n);return Jt.set(ge,e),e}var Zt=(n=>(n.CREATED="CREATED",n.STARTING="STARTING",n.LIVE="LIVE",n.FINALIZED="FINALIZED",n))(Zt||{});const ha={ALL:"*",CORE:"core:**",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:**"},ga={EVENT_STATUS_CHANGED:"event:statusChanged"};var Xt=(n=>(n.English="en",n.Spanish="es",n.Portuguese="pt",n))(Xt||{}),Yt=(n=>(n.COMBO="Combo",n))(Yt||{}),en=(n=>(n.VTEX="VTEX",n.PLATFORM="platform",n.CACE="CACE",n.GLOBAL_PAGE="globalPage",n.DEV_LOCAL="dev:local",n.CUSTOMIZATION="customization",n.FAST_STORE="faststore",n))(en||{});function tn(n){const e=Object.values(n);return Object.assign({},...e)}function nn(n){return Object.entries(n).reduce((e,[t,i])=>{const a=tn(i);return{...e,[t]:a}},{})}function an(n,e){const t=nn(e);Object.entries(t).forEach(([i,a])=>{n.addResourceBundle(i,"translation",a,!0)})}function ka(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function ee(n){"@babel/helpers - typeof";return ee=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ee(n)}function va(n,e){if(ee(n)!=="object"||n===null)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var i=t.call(n,e||"default");if(ee(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function Sa(n){var e=va(n,"string");return ee(e)==="symbol"?e:String(e)}function it(n,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,Sa(i.key),i)}}function ya(n,e,t){return e&&it(n.prototype,e),t&&it(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}var sn=[],Na=sn.forEach,ba=sn.slice;function Fa(n){return Na.call(ba.call(arguments,1),function(e){if(e)for(var t in e)n[t]===void 0&&(n[t]=e[t])}),n}var at=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,wa=function(e,t,i){var a=i||{};a.path=a.path||"/";var s=encodeURIComponent(t),r="".concat(e,"=").concat(s);if(a.maxAge>0){var o=a.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");r+="; Max-Age=".concat(Math.floor(o))}if(a.domain){if(!at.test(a.domain))throw new TypeError("option domain is invalid");r+="; Domain=".concat(a.domain)}if(a.path){if(!at.test(a.path))throw new TypeError("option path is invalid");r+="; Path=".concat(a.path)}if(a.expires){if(typeof a.expires.toUTCString!="function")throw new TypeError("option expires is invalid");r+="; Expires=".concat(a.expires.toUTCString())}if(a.httpOnly&&(r+="; HttpOnly"),a.secure&&(r+="; Secure"),a.sameSite){var l=typeof a.sameSite=="string"?a.sameSite.toLowerCase():a.sameSite;switch(l){case!0:r+="; SameSite=Strict";break;case"lax":r+="; SameSite=Lax";break;case"strict":r+="; SameSite=Strict";break;case"none":r+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return r},st={create:function(e,t,i,a){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};i&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+i*60*1e3)),a&&(s.domain=a),document.cookie=wa(e,encodeURIComponent(t),s)},read:function(e){for(var t="".concat(e,"="),i=document.cookie.split(";"),a=0;a<i.length;a++){for(var s=i[a];s.charAt(0)===" ";)s=s.substring(1,s.length);if(s.indexOf(t)===0)return s.substring(t.length,s.length)}return null},remove:function(e){this.create(e,"",-1)}},Ca={name:"cookie",lookup:function(e){var t;if(e.lookupCookie&&typeof document!="undefined"){var i=st.read(e.lookupCookie);i&&(t=i)}return t},cacheUserLanguage:function(e,t){t.lookupCookie&&typeof document!="undefined"&&st.create(t.lookupCookie,e,t.cookieMinutes,t.cookieDomain,t.cookieOptions)}},Ea={name:"querystring",lookup:function(e){var t;if(typeof window!="undefined"){var i=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));for(var a=i.substring(1),s=a.split("&"),r=0;r<s.length;r++){var o=s[r].indexOf("=");if(o>0){var l=s[r].substring(0,o);l===e.lookupQuerystring&&(t=s[r].substring(o+1))}}}return t}},H=null,rt=function(){if(H!==null)return H;try{H=window!=="undefined"&&window.localStorage!==null;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{H=!1}return H},Oa={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&rt()){var i=window.localStorage.getItem(e.lookupLocalStorage);i&&(t=i)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&rt()&&window.localStorage.setItem(t.lookupLocalStorage,e)}},Z=null,ot=function(){if(Z!==null)return Z;try{Z=window!=="undefined"&&window.sessionStorage!==null;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Z=!1}return Z},xa={name:"sessionStorage",lookup:function(e){var t;if(e.lookupSessionStorage&&ot()){var i=window.sessionStorage.getItem(e.lookupSessionStorage);i&&(t=i)}return t},cacheUserLanguage:function(e,t){t.lookupSessionStorage&&ot()&&window.sessionStorage.setItem(t.lookupSessionStorage,e)}},Ra={name:"navigator",lookup:function(e){var t=[];if(typeof navigator!="undefined"){if(navigator.languages)for(var i=0;i<navigator.languages.length;i++)t.push(navigator.languages[i]);navigator.userLanguage&&t.push(navigator.userLanguage),navigator.language&&t.push(navigator.language)}return t.length>0?t:void 0}},Ta={name:"htmlTag",lookup:function(e){var t,i=e.htmlTag||(typeof document!="undefined"?document.documentElement:null);return i&&typeof i.getAttribute=="function"&&(t=i.getAttribute("lang")),t}},Ia={name:"path",lookup:function(e){var t;if(typeof window!="undefined"){var i=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(i instanceof Array)if(typeof e.lookupFromPathIndex=="number"){if(typeof i[e.lookupFromPathIndex]!="string")return;t=i[e.lookupFromPathIndex].replace("/","")}else t=i[0].replace("/","")}return t}},Da={name:"subdomain",lookup:function(e){var t=typeof e.lookupFromSubdomainIndex=="number"?e.lookupFromSubdomainIndex+1:1,i=typeof window!="undefined"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(i)return i[t]}};function La(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:function(e){return e}}}var rn=function(){function n(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ka(this,n),this.type="languageDetector",this.detectors={},this.init(e,t)}return ya(n,[{key:"init",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=Fa(i,this.options||{},La()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(s){return s.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=a,this.addDetector(Ca),this.addDetector(Ea),this.addDetector(Oa),this.addDetector(xa),this.addDetector(Ra),this.addDetector(Ta),this.addDetector(Ia),this.addDetector(Da)}},{key:"addDetector",value:function(t){this.detectors[t.name]=t}},{key:"detect",value:function(t){var i=this;t||(t=this.options.order);var a=[];return t.forEach(function(s){if(i.detectors[s]){var r=i.detectors[s].lookup(i.options);r&&typeof r=="string"&&(r=[r]),r&&(a=a.concat(r))}}),a=a.map(function(s){return i.options.convertDetectedLanguage(s)}),this.services.languageUtils.getBestMatchFromCodes?a:a.length>0?a[0]:null}},{key:"cacheUserLanguage",value:function(t,i){var a=this;i||(i=this.options.caches),i&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||i.forEach(function(s){a.detectors[s]&&a.detectors[s].cacheUserLanguage(t,a.options)}))}}]),n}();rn.type="languageDetector";function on(n,e){n.use(e).use(rn).init({resources:{},fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1,format:(t,i,a)=>{if(i){const[s,...r]=i.split(",").map(o=>o.trim());if(s==="number")return new Intl.NumberFormat(a).format(t);if(s==="date")return new Intl.DateTimeFormat(a).format(t);if(s==="currency")return new Intl.NumberFormat(a,{style:"currency",currency:r[0]||"USD",currencyDisplay:"narrowSymbol"}).format(t).replace("$","").trim()}return t}},detection:{order:["navigator","cookie","localStorage","sessionStorage","querystring","htmlTag","path","subdomain"]}})}const Aa={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,e){console&&console[n]&&console[n].apply(console,e)}};class ce{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||Aa,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,i,a){return a&&!this.debug?null:(typeof e[0]=="string"&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new ce(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new ce(this.logger,e)}}var $=new ce;class ye{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(i=>{this.observers[i]=this.observers[i]||[],this.observers[i].push(t)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e]=this.observers[e].filter(i=>i!==t)}}emit(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),a=1;a<t;a++)i[a-1]=arguments[a];this.observers[e]&&[].concat(this.observers[e]).forEach(r=>{r(...i)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(r=>{r.apply(r,[e,...i])})}}function X(){let n,e;const t=new Promise((i,a)=>{n=i,e=a});return t.resolve=n,t.reject=e,t}function lt(n){return n==null?"":""+n}function Pa(n,e,t){n.forEach(i=>{e[i]&&(t[i]=e[i])})}function _e(n,e,t){function i(r){return r&&r.indexOf("###")>-1?r.replace(/###/g,"."):r}function a(){return!n||typeof n=="string"}const s=typeof e!="string"?[].concat(e):e.split(".");for(;s.length>1;){if(a())return{};const r=i(s.shift());!n[r]&&t&&(n[r]=new t),Object.prototype.hasOwnProperty.call(n,r)?n=n[r]:n={}}return a()?{}:{obj:n,k:i(s.shift())}}function dt(n,e,t){const{obj:i,k:a}=_e(n,e,Object);i[a]=t}function Va(n,e,t,i){const{obj:a,k:s}=_e(n,e,Object);a[s]=a[s]||[],i&&(a[s]=a[s].concat(t)),i||a[s].push(t)}function me(n,e){const{obj:t,k:i}=_e(n,e);if(t)return t[i]}function _a(n,e,t){const i=me(n,t);return i!==void 0?i:me(e,t)}function ln(n,e,t){for(const i in e)i!=="__proto__"&&i!=="constructor"&&(i in n?typeof n[i]=="string"||n[i]instanceof String||typeof e[i]=="string"||e[i]instanceof String?t&&(n[i]=e[i]):ln(n[i],e[i],t):n[i]=e[i]);return n}function B(n){return n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var Ua={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function ja(n){return typeof n=="string"?n.replace(/[&<>"'\/]/g,e=>Ua[e]):n}const Ma=[" ",",","?","!",";"];function $a(n,e,t){e=e||"",t=t||"";const i=Ma.filter(r=>e.indexOf(r)<0&&t.indexOf(r)<0);if(i.length===0)return!0;const a=new RegExp(`(${i.map(r=>r==="?"?"\\?":r).join("|")})`);let s=!a.test(n);if(!s){const r=n.indexOf(t);r>0&&!a.test(n.substring(0,r))&&(s=!0)}return s}function fe(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!n)return;if(n[e])return n[e];const i=e.split(t);let a=n;for(let s=0;s<i.length;++s){if(!a||typeof a[i[s]]=="string"&&s+1<i.length)return;if(a[i[s]]===void 0){let r=2,o=i.slice(s,s+r).join(t),l=a[o];for(;l===void 0&&i.length>s+r;)r++,o=i.slice(s,s+r).join(t),l=a[o];if(l===void 0)return;if(l===null)return null;if(e.endsWith(o)){if(typeof l=="string")return l;if(o&&typeof l[o]=="string")return l[o]}const u=i.slice(s+r).join(t);return u?fe(l,u,t):void 0}a=a[i[s]]}return a}function pe(n){return n&&n.indexOf("_")>0?n.replace("_","-"):n}class ut extends ye{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,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 t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,r=a.ignoreJSONStructure!==void 0?a.ignoreJSONStructure:this.options.ignoreJSONStructure;let o=[e,t];i&&typeof i!="string"&&(o=o.concat(i)),i&&typeof i=="string"&&(o=o.concat(s?i.split(s):i)),e.indexOf(".")>-1&&(o=e.split("."));const l=me(this.data,o);return l||!r||typeof i!="string"?l:fe(this.data&&this.data[e]&&this.data[e][t],i,s)}addResource(e,t,i,a){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const r=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let o=[e,t];i&&(o=o.concat(r?i.split(r):i)),e.indexOf(".")>-1&&(o=e.split("."),a=t,t=o[1]),this.addNamespaces(t),dt(this.data,o,a),s.silent||this.emit("added",e,t,i,a)}addResources(e,t,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const s in i)(typeof i[s]=="string"||Object.prototype.toString.apply(i[s])==="[object Array]")&&this.addResource(e,t,s,i[s],{silent:!0});a.silent||this.emit("added",e,t,i)}addResourceBundle(e,t,i,a,s){let r=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),a=i,i=t,t=o[1]),this.addNamespaces(t);let l=me(this.data,o)||{};a?ln(l,i,s):l={...l,...i},dt(this.data,o,l),r.silent||this.emit("added",e,t,i)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(a=>t[a]&&Object.keys(t[a]).length>0)}toJSON(){return this.data}}var dn={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,e,t,i,a){return n.forEach(s=>{this.processors[s]&&(e=this.processors[s].process(e,t,i,a))}),e}};const ct={};class he extends ye{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Pa(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=$.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const i=this.resolve(e,t);return i&&i.res!==void 0}extractFromKey(e,t){let i=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const a=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let s=t.ns||this.options.defaultNS||[];const r=i&&e.indexOf(i)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!$a(e,i,a);if(r&&!o){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:s};const u=e.split(i);(i!==a||i===a&&this.options.ns.indexOf(u[0])>-1)&&(s=u.shift()),e=u.join(a)}return typeof s=="string"&&(s=[s]),{key:e,namespaces:s}}translate(e,t,i){if(typeof t!="object"&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),typeof t=="object"&&(t={...t}),t||(t={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const a=t.returnDetails!==void 0?t.returnDetails:this.options.returnDetails,s=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,{key:r,namespaces:o}=this.extractFromKey(e[e.length-1],t),l=o[o.length-1],u=t.lng||this.language,d=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(d){const w=t.nsSeparator||this.options.nsSeparator;return a?{res:`${l}${w}${r}`,usedKey:r,exactUsedKey:r,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:`${l}${w}${r}`}return a?{res:r,usedKey:r,exactUsedKey:r,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:r}const f=this.resolve(e,t);let c=f&&f.res;const S=f&&f.usedKey||r,y=f&&f.exactUsedKey||r,k=Object.prototype.toString.apply(c),N=["[object Number]","[object Function]","[object RegExp]"],x=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,F=!this.i18nFormat||this.i18nFormat.handleAsObject;if(F&&c&&(typeof c!="string"&&typeof c!="boolean"&&typeof c!="number")&&N.indexOf(k)<0&&!(typeof x=="string"&&k==="[object Array]")){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const w=this.options.returnedObjectHandler?this.options.returnedObjectHandler(S,c,{...t,ns:o}):`key '${r} (${this.language})' returned an object instead of string.`;return a?(f.res=w,f.usedParams=this.getUsedParamsDetails(t),f):w}if(s){const w=k==="[object Array]",D=w?[]:{},L=w?y:S;for(const A in c)if(Object.prototype.hasOwnProperty.call(c,A)){const m=`${L}${s}${A}`;D[A]=this.translate(m,{...t,joinArrays:!1,ns:o}),D[A]===m&&(D[A]=c[A])}c=D}}else if(F&&typeof x=="string"&&k==="[object Array]")c=c.join(x),c&&(c=this.extendTranslation(c,e,t,i));else{let w=!1,D=!1;const L=t.count!==void 0&&typeof t.count!="string",A=he.hasDefaultValue(t),m=L?this.pluralResolver.getSuffix(u,t.count,t):"",p=t.ordinal&&L?this.pluralResolver.getSuffix(u,t.count,{ordinal:!1}):"",h=t[`defaultValue${m}`]||t[`defaultValue${p}`]||t.defaultValue;!this.isValidLookup(c)&&A&&(w=!0,c=h),this.isValidLookup(c)||(D=!0,c=r);const b=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&D?void 0:c,C=A&&h!==c&&this.options.updateMissing;if(D||w||C){if(this.logger.log(C?"updateKey":"missingKey",u,l,r,C?h:c),s){const O=this.resolve(r,{...t,keySeparator:!1});O&&O.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 v=[];const E=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&E&&E[0])for(let O=0;O<E.length;O++)v.push(E[O]);else this.options.saveMissingTo==="all"?v=this.languageUtils.toResolveHierarchy(t.lng||this.language):v.push(t.lng||this.language);const P=(O,T,V)=>{const ie=A&&V!==c?V:b;this.options.missingKeyHandler?this.options.missingKeyHandler(O,l,T,ie,C,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(O,l,T,ie,C,t),this.emit("missingKey",O,l,T,c)};this.options.saveMissing&&(this.options.saveMissingPlurals&&L?v.forEach(O=>{this.pluralResolver.getSuffixes(O,t).forEach(T=>{P([O],r+T,t[`defaultValue${T}`]||h)})}):P(v,r,h))}c=this.extendTranslation(c,e,t,f,i),D&&c===r&&this.options.appendNamespaceToMissingKey&&(c=`${l}:${r}`),(D||w)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?c=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${r}`:r,w?c:void 0):c=this.options.parseMissingKeyHandler(c))}return a?(f.res=c,f.usedParams=this.getUsedParamsDetails(t),f):c}extendTranslation(e,t,i,a,s){var r=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||a.usedLng,a.usedNS,a.usedKey,{resolved:a});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const u=typeof e=="string"&&(i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(u){const c=e.match(this.interpolator.nestingRegexp);d=c&&c.length}let f=i.replace&&typeof i.replace!="string"?i.replace:i;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),e=this.interpolator.interpolate(e,f,i.lng||this.language,i),u){const c=e.match(this.interpolator.nestingRegexp),S=c&&c.length;d<S&&(i.nest=!1)}!i.lng&&this.options.compatibilityAPI!=="v1"&&a&&a.res&&(i.lng=a.usedLng),i.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var c=arguments.length,S=new Array(c),y=0;y<c;y++)S[y]=arguments[y];return s&&s[0]===S[0]&&!i.context?(r.logger.warn(`It seems you are nesting recursively key: ${S[0]} in key: ${t[0]}`),null):r.translate(...S,t)},i)),i.interpolation&&this.interpolator.reset()}const o=i.postProcess||this.options.postProcess,l=typeof o=="string"?[o]:o;return e!=null&&l&&l.length&&i.applyPostProcessor!==!1&&(e=dn.handle(l,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...a,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,a,s,r,o;return typeof e=="string"&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(i))return;const u=this.extractFromKey(l,t),d=u.key;a=d;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const c=t.count!==void 0&&typeof t.count!="string",S=c&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),y=t.context!==void 0&&(typeof t.context=="string"||typeof t.context=="number")&&t.context!=="",k=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);f.forEach(N=>{this.isValidLookup(i)||(o=N,!ct[`${k[0]}-${N}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(ct[`${k[0]}-${N}`]=!0,this.logger.warn(`key "${a}" for languages "${k.join(", ")}" won't get resolved as namespace "${o}" 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!!!")),k.forEach(x=>{if(this.isValidLookup(i))return;r=x;const F=[d];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(F,d,x,N,t);else{let w;c&&(w=this.pluralResolver.getSuffix(x,t.count,t));const D=`${this.options.pluralSeparator}zero`,L=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(F.push(d+w),t.ordinal&&w.indexOf(L)===0&&F.push(d+w.replace(L,this.options.pluralSeparator)),S&&F.push(d+D)),y){const A=`${d}${this.options.contextSeparator}${t.context}`;F.push(A),c&&(F.push(A+w),t.ordinal&&w.indexOf(L)===0&&F.push(A+w.replace(L,this.options.pluralSeparator)),S&&F.push(A+D))}}let I;for(;I=F.pop();)this.isValidLookup(i)||(s=I,i=this.getResource(x,N,I,t))}))})}),{res:i,usedKey:a,exactUsedKey:s,usedLng:r,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,i,a):this.resourceStore.getResource(e,t,i,a)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=e.replace&&typeof e.replace!="string";let a=i?e.replace:e;if(i&&typeof e.count!="undefined"&&(a.count=e.count),this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),!i){a={...a};for(const s of t)delete a[s]}return a}static hasDefaultValue(e){const t="defaultValue";for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&t===i.substring(0,t.length)&&e[i]!==void 0)return!0;return!1}}function Ce(n){return n.charAt(0).toUpperCase()+n.slice(1)}class mt{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=$.create("languageUtils")}getScriptPartFromCode(e){if(e=pe(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=pe(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const t=["hans","hant","latn","cyrl","cans","mong","arab"];let i=e.split("-");return this.options.lowerCaseLng?i=i.map(a=>a.toLowerCase()):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),t.indexOf(i[1].toLowerCase())>-1&&(i[1]=Ce(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()),t.indexOf(i[1].toLowerCase())>-1&&(i[1]=Ce(i[1].toLowerCase())),t.indexOf(i[2].toLowerCase())>-1&&(i[2]=Ce(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 t;return e.forEach(i=>{if(t)return;const a=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(a))&&(t=a)}),!t&&this.options.supportedLngs&&e.forEach(i=>{if(t)return;const a=this.getLanguagePartFromCode(i);if(this.isSupportedCode(a))return t=a;t=this.options.supportedLngs.find(s=>{if(s===a)return s;if(!(s.indexOf("-")<0&&a.indexOf("-")<0)&&s.indexOf(a)===0)return s})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),typeof e=="string"&&(e=[e]),Object.prototype.toString.apply(e)==="[object Array]")return e;if(!t)return e.default||[];let i=e[t];return i||(i=e[this.getScriptPartFromCode(t)]),i||(i=e[this.formatLanguageCode(t)]),i||(i=e[this.getLanguagePartFromCode(t)]),i||(i=e.default),i||[]}toResolveHierarchy(e,t){const i=this.getFallbackCodes(t||this.options.fallbackLng||[],e),a=[],s=r=>{r&&(this.isSupportedCode(r)?a.push(r):this.logger.warn(`rejecting language code not found in supportedLngs: ${r}`))};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(r=>{a.indexOf(r)<0&&s(this.formatLanguageCode(r))}),a}}let za=[{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}],Ba={1:function(n){return+(n>1)},2:function(n){return+(n!=1)},3:function(n){return 0},4:function(n){return n%10==1&&n%100!=11?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2},5:function(n){return n==0?0:n==1?1:n==2?2:n%100>=3&&n%100<=10?3:n%100>=11?4:5},6:function(n){return n==1?0:n>=2&&n<=4?1:2},7:function(n){return n==1?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2},8:function(n){return n==1?0:n==2?1:n!=8&&n!=11?2:3},9:function(n){return+(n>=2)},10:function(n){return n==1?0:n==2?1:n<7?2:n<11?3:4},11:function(n){return n==1||n==11?0:n==2||n==12?1:n>2&&n<20?2:3},12:function(n){return+(n%10!=1||n%100==11)},13:function(n){return+(n!==0)},14:function(n){return n==1?0:n==2?1:n==3?2:3},15:function(n){return n%10==1&&n%100!=11?0:n%10>=2&&(n%100<10||n%100>=20)?1:2},16:function(n){return n%10==1&&n%100!=11?0:n!==0?1:2},17:function(n){return n==1||n%10==1&&n%100!=11?0:1},18:function(n){return n==0?0:n==1?1:2},19:function(n){return n==1?0:n==0||n%100>1&&n%100<11?1:n%100>10&&n%100<20?2:3},20:function(n){return n==1?0:n==0||n%100>0&&n%100<20?1:2},21:function(n){return n%100==1?1:n%100==2?2:n%100==3||n%100==4?3:0},22:function(n){return n==1?0:n==2?1:(n<0||n>10)&&n%10==0?2:3}};const Qa=["v1","v2","v3"],Ga=["v4"],ft={zero:0,one:1,two:2,few:3,many:4,other:5};function Ka(){const n={};return za.forEach(e=>{e.lngs.forEach(t=>{n[t]={numbers:e.nr,plurals:Ba[e.fc]}})}),n}class Wa{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=$.create("pluralResolver"),(!this.options.compatibilityJSON||Ga.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=Ka()}addRule(e,t){this.rules[e]=t}getRule(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(pe(e),{type:t.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,t);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}getPluralFormsOfKey(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,i).map(a=>`${t}${a}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,t);return i?this.shouldUseIntlApi()?i.resolvedOptions().pluralCategories.sort((a,s)=>ft[a]-ft[s]).map(a=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${a}`):i.numbers.map(a=>this.getSuffix(e,a,t)):[]}getSuffix(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const a=this.getRule(e,i);return a?this.shouldUseIntlApi()?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${a.select(t)}`:this.getSuffixRetroCompatible(a,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const i=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let a=e.numbers[i];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(a===2?a="plural":a===1&&(a=""));const s=()=>this.options.prepend&&a.toString()?this.options.prepend+a.toString():a.toString();return this.options.compatibilityJSON==="v1"?a===1?"":typeof a=="number"?`_plural_${a.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!Qa.includes(this.options.compatibilityJSON)}}function pt(n,e,t){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=_a(n,e,t);return!s&&a&&typeof t=="string"&&(s=fe(n,t,i),s===void 0&&(s=fe(e,t,i))),s}class qa{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=$.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(t=>t),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const t=e.interpolation;this.escape=t.escape!==void 0?t.escape:ja,this.escapeValue=t.escapeValue!==void 0?t.escapeValue:!0,this.useRawValueToEscape=t.useRawValueToEscape!==void 0?t.useRawValueToEscape:!1,this.prefix=t.prefix?B(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?B(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?B(t.nestingPrefix):t.nestingPrefixEscaped||B("$t("),this.nestingSuffix=t.nestingSuffix?B(t.nestingSuffix):t.nestingSuffixEscaped||B(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=t.alwaysFormat!==void 0?t.alwaysFormat:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=`${this.prefix}(.+?)${this.suffix}`;this.regexp=new RegExp(e,"g");const t=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=new RegExp(t,"g");const i=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=new RegExp(i,"g")}interpolate(e,t,i,a){let s,r,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(y){return y.replace(/\$/g,"$$$$")}const d=y=>{if(y.indexOf(this.formatSeparator)<0){const F=pt(t,l,y,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(F,void 0,i,{...a,...t,interpolationkey:y}):F}const k=y.split(this.formatSeparator),N=k.shift().trim(),x=k.join(this.formatSeparator).trim();return this.format(pt(t,l,N,this.options.keySeparator,this.options.ignoreJSONStructure),x,i,{...a,...t,interpolationkey:N})};this.resetRegExp();const f=a&&a.missingInterpolationHandler||this.options.missingInterpolationHandler,c=a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:y=>u(y)},{regex:this.regexp,safeValue:y=>this.escapeValue?u(this.escape(y)):u(y)}].forEach(y=>{for(o=0;s=y.regex.exec(e);){const k=s[1].trim();if(r=d(k),r===void 0)if(typeof f=="function"){const x=f(e,s,a);r=typeof x=="string"?x:""}else if(a&&Object.prototype.hasOwnProperty.call(a,k))r="";else if(c){r=s[0];continue}else this.logger.warn(`missed to pass in variable ${k} for interpolating ${e}`),r="";else typeof r!="string"&&!this.useRawValueToEscape&&(r=lt(r));const N=y.safeValue(r);if(e=e.replace(s[0],N),c?(y.regex.lastIndex+=r.length,y.regex.lastIndex-=s[0].length):y.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,s,r;function o(l,u){const d=this.nestingOptionsSeparator;if(l.indexOf(d)<0)return l;const f=l.split(new RegExp(`${d}[ ]*{`));let c=`{${f[1]}`;l=f[0],c=this.interpolate(c,r);const S=c.match(/'/g),y=c.match(/"/g);(S&&S.length%2===0&&!y||y.length%2!==0)&&(c=c.replace(/'/g,'"'));try{r=JSON.parse(c),u&&(r={...u,...r})}catch(k){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,k),`${l}${d}${c}`}return delete r.defaultValue,l}for(;a=this.nestingRegexp.exec(e);){let l=[];r={...i},r=r.replace&&typeof r.replace!="string"?r.replace:r,r.applyPostProcessor=!1,delete r.defaultValue;let u=!1;if(a[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(a[1])){const d=a[1].split(this.formatSeparator).map(f=>f.trim());a[1]=d.shift(),l=d,u=!0}if(s=t(o.call(this,a[1].trim(),r),r),s&&a[0]===e&&typeof s!="string")return s;typeof s!="string"&&(s=lt(s)),s||(this.logger.warn(`missed to resolve ${a[1]} for nesting ${e}`),s=""),u&&(s=l.reduce((d,f)=>this.format(d,f,i.lng,{...i,interpolationkey:a[1].trim()}),s.trim())),e=e.replace(a[0],s),this.regexp.lastIndex=0}return e}}function Ja(n){let e=n.toLowerCase().trim();const t={};if(n.indexOf("(")>-1){const i=n.split("(");e=i[0].toLowerCase().trim();const a=i[1].substring(0,i[1].length-1);e==="currency"&&a.indexOf(":")<0?t.currency||(t.currency=a.trim()):e==="relativetime"&&a.indexOf(":")<0?t.range||(t.range=a.trim()):a.split(";").forEach(r=>{if(!r)return;const[o,...l]=r.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,"");t[o.trim()]||(t[o.trim()]=u),u==="false"&&(t[o.trim()]=!1),u==="true"&&(t[o.trim()]=!0),isNaN(u)||(t[o.trim()]=parseInt(u,10))})}return{formatName:e,formatOptions:t}}function Q(n){const e={};return function(i,a,s){const r=a+JSON.stringify(s);let o=e[r];return o||(o=n(pe(a),s),e[r]=o),o(i)}}class Ha{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=$.create("formatter"),this.options=e,this.formats={number:Q((t,i)=>{const a=new Intl.NumberFormat(t,{...i});return s=>a.format(s)}),currency:Q((t,i)=>{const a=new Intl.NumberFormat(t,{...i,style:"currency"});return s=>a.format(s)}),datetime:Q((t,i)=>{const a=new Intl.DateTimeFormat(t,{...i});return s=>a.format(s)}),relativetime:Q((t,i)=>{const a=new Intl.RelativeTimeFormat(t,{...i});return s=>a.format(s,i.range||"day")}),list:Q((t,i)=>{const a=new Intl.ListFormat(t,{...i});return s=>a.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,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Q(t)}format(e,t,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return t.split(this.formatSeparator).reduce((o,l)=>{const{formatName:u,formatOptions:d}=Ja(l);if(this.formats[u]){let f=o;try{const c=a&&a.formatParams&&a.formatParams[a.interpolationkey]||{},S=c.locale||c.lng||a.locale||a.lng||i;f=this.formats[u](o,S,{...d,...a,...c})}catch(c){this.logger.warn(c)}return f}else this.logger.warn(`there was no format function for ${u}`);return o},e)}}function Za(n,e){n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)}class Xa extends ye{constructor(e,t,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=i,this.languageUtils=i.languageUtils,this.options=a,this.logger=$.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=a.maxParallelReads||10,this.readingCalls=0,this.maxRetries=a.maxRetries>=0?a.maxRetries:5,this.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(i,a.backend,a)}queueLoad(e,t,i,a){const s={},r={},o={},l={};return e.forEach(u=>{let d=!0;t.forEach(f=>{const c=`${u}|${f}`;!i.reload&&this.store.hasResourceBundle(u,f)?this.state[c]=2:this.state[c]<0||(this.state[c]===1?r[c]===void 0&&(r[c]=!0):(this.state[c]=1,d=!1,r[c]===void 0&&(r[c]=!0),s[c]===void 0&&(s[c]=!0),l[f]===void 0&&(l[f]=!0)))}),d||(o[u]=!0)}),(Object.keys(s).length||Object.keys(r).length)&&this.queue.push({pending:r,pendingCount:Object.keys(r).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(s),pending:Object.keys(r),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(e,t,i){const a=e.split("|"),s=a[0],r=a[1];t&&this.emit("failedLoading",s,r,t),i&&this.store.addResourceBundle(s,r,i),this.state[e]=t?-1:2;const o={};this.queue.forEach(l=>{Va(l.loaded,[s],r),Za(l,e),t&&l.errors.push(t),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{o[u]||(o[u]={});const d=l.loaded[u];d.length&&d.forEach(f=>{o[u][f]===void 0&&(o[u][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done)}read(e,t,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,r=arguments.length>5?arguments[5]:void 0;if(!e.length)return r(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:i,tried:a,wait:s,callback:r});return}this.readingCalls++;const o=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&d&&a<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,i,a+1,s*2,r)},s);return}r(u,d)},l=this.backend[i].bind(this.backend);if(l.length===2){try{const u=l(e,t);u&&typeof u.then=="function"?u.then(d=>o(null,d)).catch(o):o(null,u)}catch(u){o(u)}return}return l(e,t,o)}prepareLoading(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=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."),a&&a();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof t=="string"&&(t=[t]);const s=this.queueLoad(e,t,i,a);if(!s.toLoad.length)return s.pending.length||a(),null;s.toLoad.forEach(r=>{this.loadOne(r)})}load(e,t,i){this.prepareLoading(e,t,{},i)}reload(e,t,i){this.prepareLoading(e,t,{reload:!0},i)}loadOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const i=e.split("|"),a=i[0],s=i[1];this.read(a,s,"read",void 0,void 0,(r,o)=>{r&&this.logger.warn(`${t}loading namespace ${s} for language ${a} failed`,r),!r&&o&&this.logger.log(`${t}loaded namespace ${s} for language ${a}`,o),this.loaded(e,r,o)})}saveMissing(e,t,i,a,s){let r=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${i}" as the namespace "${t}" 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 l={...r,isUpdate:s},u=this.backend.create.bind(this.backend);if(u.length<6)try{let d;u.length===5?d=u(e,t,i,a,l):d=u(e,t,i,a),d&&typeof d.then=="function"?d.then(f=>o(null,f)).catch(o):o(null,d)}catch(d){o(d)}else u(e,t,i,a,o,l)}!e||!e[0]||this.store.addResource(e[0],t,i,a)}}}function ht(){return{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:function(e){let t={};if(typeof e[1]=="object"&&(t=e[1]),typeof e[1]=="string"&&(t.defaultValue=e[1]),typeof e[2]=="string"&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const i=e[3]||e[2];Object.keys(i).forEach(a=>{t[a]=i[a]})}return t},interpolation:{escapeValue:!0,format:(n,e,t,i)=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function gt(n){return typeof n.ns=="string"&&(n.ns=[n.ns]),typeof n.fallbackLng=="string"&&(n.fallbackLng=[n.fallbackLng]),typeof n.fallbackNS=="string"&&(n.fallbackNS=[n.fallbackNS]),n.supportedLngs&&n.supportedLngs.indexOf("cimode")<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),n}function re(){}function Ya(n){Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(t=>{typeof n[t]=="function"&&(n[t]=n[t].bind(n))})}class te extends ye{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=gt(e),this.services={},this.logger=$,this.modules={external:[]},Ya(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;typeof t=="function"&&(i=t,t={}),!t.defaultNS&&t.defaultNS!==!1&&t.ns&&(typeof t.ns=="string"?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const a=ht();this.options={...a,...this.options,...gt(t)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...a.interpolation,...this.options.interpolation}),t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);function s(d){return d?typeof d=="function"?new d:d:null}if(!this.options.isClone){this.modules.logger?$.init(s(this.modules.logger),this.options):$.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:typeof Intl!="undefined"&&(d=Ha);const f=new mt(this.options);this.store=new ut(this.options.resources,this.options);const c=this.services;c.logger=$,c.resourceStore=this.store,c.languageUtils=f,c.pluralResolver=new Wa(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===a.interpolation.format)&&(c.formatter=s(d),c.formatter.init(c,this.options),this.options.interpolation.format=c.formatter.format.bind(c.formatter)),c.interpolator=new qa(this.options),c.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},c.backendConnector=new Xa(s(this.modules.backend),c.resourceStore,c,this.options),c.backendConnector.on("*",function(S){for(var y=arguments.length,k=new Array(y>1?y-1:0),N=1;N<y;N++)k[N-1]=arguments[N];e.emit(S,...k)}),this.modules.languageDetector&&(c.languageDetector=s(this.modules.languageDetector),c.languageDetector.init&&c.languageDetector.init(c,this.options.detection,this.options)),this.modules.i18nFormat&&(c.i18nFormat=s(this.modules.i18nFormat),c.i18nFormat.init&&c.i18nFormat.init(this)),this.translator=new he(this.services,this.options),this.translator.on("*",function(S){for(var y=arguments.length,k=new Array(y>1?y-1:0),N=1;N<y;N++)k[N-1]=arguments[N];e.emit(S,...k)}),this.modules.external.forEach(S=>{S.init&&S.init(this)})}if(this.format=this.options.interpolation.format,i||(i=re),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[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(d=>{this[d]=function(){return e.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return e.store[d](...arguments),e}});const l=X(),u=()=>{const d=(f,c)=>{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),l.resolve(c),i(f,c)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}loadResources(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:re;const a=typeof e=="string"?e:this.language;if(typeof e=="function"&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(a&&a.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const s=[],r=o=>{if(!o||o==="cimode")return;this.services.languageUtils.toResolveHierarchy(o).forEach(u=>{u!=="cimode"&&s.indexOf(u)<0&&s.push(u)})};a?r(a):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>r(l)),this.options.preload&&this.options.preload.forEach(o=>r(o)),this.services.backendConnector.load(s,this.options.ns,o=>{!o&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(o)})}else i(null)}reloadResources(e,t,i){const a=X();return e||(e=this.languages),t||(t=this.options.ns),i||(i=re),this.services.backendConnector.reload(e,t,s=>{a.resolve(),i(s)}),a}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"&&dn.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 t=0;t<this.languages.length;t++){const i=this.languages[t];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}}changeLanguage(e,t){var i=this;this.isLanguageChangingTo=e;const a=X();this.emit("languageChanging",e);const s=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},r=(l,u)=>{u?(s(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,a.resolve(function(){return i.t(...arguments)}),t&&t(l,function(){return i.t(...arguments)})},o=l=>{!e&&!l&&this.services.languageDetector&&(l=[]);const u=typeof l=="string"?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||s(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,d=>{r(d,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),a}getFixedT(e,t,i){var a=this;const s=function(r,o){let l;if(typeof o!="object"){for(var u=arguments.length,d=new Array(u>2?u-2:0),f=2;f<u;f++)d[f-2]=arguments[f];l=a.options.overloadTranslationOptionHandler([r,o].concat(d))}else l={...o};l.lng=l.lng||s.lng,l.lngs=l.lngs||s.lngs,l.ns=l.ns||s.ns,l.keyPrefix=l.keyPrefix||i||s.keyPrefix;const c=a.options.keySeparator||".";let S;return l.keyPrefix&&Array.isArray(r)?S=r.map(y=>`${l.keyPrefix}${c}${y}`):S=l.keyPrefix?`${l.keyPrefix}${c}${r}`:r,a.t(S,l)};return typeof e=="string"?s.lng=e:s.lngs=e,s.ns=t,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 t=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=t.lng||this.resolvedLanguage||this.languages[0],a=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const r=(o,l)=>{const u=this.services.backendConnector.state[`${o}|${l}`];return u===-1||u===2};if(t.precheck){const o=t.precheck(this,r);if(o!==void 0)return o}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||r(i,e)&&(!a||r(s,e)))}loadNamespaces(e,t){const i=X();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(a=>{this.options.ns.indexOf(a)<0&&this.options.ns.push(a)}),this.loadResources(a=>{i.resolve(),t&&t(a)}),i):(t&&t(),Promise.resolve())}loadLanguages(e,t){const i=X();typeof e=="string"&&(e=[e]);const a=this.options.preload||[],s=e.filter(r=>a.indexOf(r)<0);return s.length?(this.options.preload=a.concat(s),this.loadResources(r=>{i.resolve(),t&&t(r)}),i):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=["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 mt(ht());return t.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]:{},t=arguments.length>1?arguments[1]:void 0;return new te(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:re;const i=e.forkResourceStore;i&&delete e.forkResourceStore;const a={...this.options,...e,isClone:!0},s=new te(a);return(e.debug!==void 0||e.prefix!==void 0)&&(s.logger=s.logger.clone(e)),["store","services","language"].forEach(o=>{s[o]=this[o]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},i&&(s.store=new ut(this.store.data,a),s.services.resourceStore=s.store),s.translator=new he(s.services,a),s.translator.on("*",function(o){for(var l=arguments.length,u=new Array(l>1?l-1:0),d=1;d<l;d++)u[d-1]=arguments[d];s.emit(o,...u)}),s.init(a,t),s.translator.options=a,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 U=te.createInstance();U.createInstance=te.createInstance;U.createInstance;U.dir;U.init;U.loadResources;U.reloadResources;U.use;U.changeLanguage;U.getFixedT;U.t;U.exists;U.setDefaultNamespace;U.hasLoadedNamespace;U.loadNamespaces;U.loadLanguages;const es=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,ts={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},ns=n=>ts[n],is=n=>n.replace(es,ns);let kt={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:is};function as(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};kt={...kt,...n}}const ss={type:"3rdParty",init(n){as(n.options.react)}};on(U,ss);const rs=n=>an(U,n);let Ue=new Map;const xe=j.createContext(Ue),os=({children:n,stores:e})=>{const t=j.useContext(xe),i=j.useMemo(()=>{const a=new Map;return e.forEach(s=>a.set(s.class,s.value)),Ue=new Map([...t,...a])},[]);return hn.jsx(xe.Provider,{value:i,children:n})};function ls(n){return j.useContext(xe).get(n)}function ds(n){return Ue.get(n)}var un=(n=>(n.Created="CREATED",n.Finalized="FINALIZED",n.Live="LIVE",n.Starting="STARTING",n))(un||{}),cn=(n=>(n.Add="add",n.Remove="remove",n))(cn||{}),mn=(n=>(n.Active="active",n.Inactive="inactive",n))(mn||{});const us={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"}}]}}]}}]}}]},cs={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"}}]}}]}}]}}]},ms={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"}}]}}]}}]}}]},fs={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"}}]}}]}}]}}]},ps={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"}}]}}]}}]}}]},hs={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"}}]}}]}}]}}]},gs={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"}}]}}]}}]}}]},ks={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"}}]}}]}}]}}]},vs={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"}}]}}]}}]}}]},Ss={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"}}]}}]}}]}}]},ys={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"}}]}}]}}]}}]},Ns={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"}}]}}]}}]}}]},bs={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"}}]}}]}}]}}]},Fs={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"}}]}}]}}]}}]},ws={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"}}]}}]}}]}}]},Cs={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"}}]}}]}}]}}]},Es={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"}}]}}]}}]}}]},Os={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"}}]}}]}}]}}]},xs={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"}}]}}]}}]}}]},Rs={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"}}]}}]}}]}}]},Ts={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"}}]}}]}}]}}]},Is={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"}}]}}]}}]}}]},Ds={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"}}]}}]}}]}}]},Ls={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"}}]}}]}}]}}]},As={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"}}]}}]}}]}}]},Ps={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"}}]}}]}}]}}]}}]},Vs={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"}}]}}]}}]}}]},_s={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"}}]}}]}}]}}]},Us=Object.freeze(Object.defineProperty({__proto__:null,AddCollectionDocument:us,AppendProductsToSnackVideoDocument:Rs,BlockUserDocument:Ss,ChangeAccountUsernameDocument:ys,CreateSnackVideoBatchDocument:Ts,DeleteAllCustomizationDocument:Cs,DeleteChatMessageDocument:Ns,DeleteCollectionDocument:cs,DeleteRelationshipWithSnackVideoDocument:Is,DeleteSnackVideoDocument:Ds,EventStatus:un,FindByProductSnackVideoDocument:_s,FindCollectionDocument:ms,FindManySnackVideosDocument:Ls,FindMinimalEventDocument:ks,GetAllChatMessageDocument:bs,GetAllCollectionsDocument:fs,GetAllCustomizationDocument:Es,GetAllSnackVideosDocument:As,GetChatRoomTokenDocument:Fs,GetSnackVideoRelationshipsDocument:Ps,GetTimeLineDocument:xs,ManageCollectionProductDocument:ps,Methods:cn,PinChatMessageDocument:ws,SearchCollectionsDocument:hs,SearchMinimalEventsDocument:vs,SearchSnackVideosDocument:Vs,Status:mn,UpdateCollectionDocument:gs,UpdateCustomizationDocument:Os},Symbol.toStringTag,{value:"Module"}));function js(n){return{class:n,_value:null,get value(){return this._value||(this._value=new n,Object.freeze(this)),this._value}}}exports.AccountContractStatusTypes=Le;exports.AccountContractTypes=$t;exports.AccountInvalidError=Ei;exports.AccountPlanDescriptionTypes=Bt;exports.AccountRestRepository=Gt;exports.AccountService=Kt;exports.AccountSubscriptionTypes=zt;exports.AccountTypes=De;exports.AggregateRoot=jt;exports.ApiGraphqlTypes=Us;exports.BaseMobxStore=Ri;exports.BroadcastChannelEventBus=xt;exports.DomainError=ne;exports.EventBusWildcards=ha;exports.EventNames=ga;exports.GlobalPageSectionTypes=Qt;exports.InvalidNizzaGlobalObjectError=Ut;exports.LanguageTypes=Xt;exports.NizzaAccount=Se;exports.NizzaEventStatus=Zt;exports.NizzaLogger=de;exports.NizzaProductRequestOriginTypes=en;exports.NizzaVariationTypes=Yt;exports.ResourceNotFoundError=Vt;exports.StoreProvider=os;exports.UnexpectedError=_t;exports.ValueObject=Ti;exports.accountAtom=ge;exports.accountService=Ae;exports.apiCall=Vn;exports.buildLanguageTranslations=tn;exports.buildTranslations=nn;exports.configure=At;exports.coreLogger=K;exports.createAggregateRoot=Mt;exports.createStore=js;exports.customFetch=Re;exports.downloadFile=_n;exports.fileOrigin=ci;exports.getAccount=Ht;exports.getClientTimeZone=xi;exports.getInstance=Lt;exports.getStore=ds;exports.globalAtomStore=Jt;exports.i18Init=on;exports.jsDownload=yt;exports.logger=fi;exports.nizzaInit=pi;exports.registerTranslations=rs;exports.registerTranslationsOf=an;exports.searchParams=ui;exports.setProductDataSource=Pt;exports.shortId=Rt;exports.useAccount=pa;exports.useStore=ls;exports.validateRequiredProps=Oi;
24
+ `)}}function Jo(t,e){e.forEach(n=>{if(Ko(Wo(n.split("."),t)))throw new Va(n)})}if(!M.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!ha)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");function Zo(t){t()}function Xo(t){t||(t=Zo),co({reactionScheduler:t})}function Yo(t){return mo(t)}var el=1e4,tl=1e4,nl=function(){function t(e){var n=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(i){i===void 0&&(i=el),clearTimeout(n.sweepTimeout),n.sweepTimeout=void 0;var a=Date.now();n.registrations.forEach(function(r,s){a-r.registeredAt>=i&&(n.finalize(r.value),n.registrations.delete(s))}),n.registrations.size>0&&n.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){n.sweep(0)}})}return Object.defineProperty(t.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(e,n,i){this.registrations.set(i,{value:n,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(t.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.registrations.delete(e)}}),Object.defineProperty(t.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sweepTimeout===void 0&&(this.sweepTimeout=setTimeout(this.sweep,tl))}}),t}(),il=typeof FinalizationRegistry!="undefined"?FinalizationRegistry:nl,mn=new il(function(t){var e;(e=t.reaction)===null||e===void 0||e.dispose(),t.reaction=null}),ti=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,r=[],s;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)r.push(a.value)}catch(o){s={error:o}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(s)throw s.error}}return r};function ni(t){return"observer".concat(t)}var al=function(){function t(){}return t}();function rl(){return new al}function sl(t,e){e===void 0&&(e="observed");var n=ti(M.useState(rl),1),i=n[0],a=ti(M.useState(),2),r=a[1],s=function(){return r([])},o=M.useRef(null);o.current||(o.current={reaction:null,mounted:!1,changedBeforeMount:!1});var l=o.current;l.reaction||(l.reaction=new qe(ni(e),function(){l.mounted?s():l.changedBeforeMount=!0}),mn.register(i,l,l)),M.useDebugValue(l.reaction,Yo),M.useEffect(function(){return mn.unregister(l),l.mounted=!0,l.reaction?l.changedBeforeMount&&(l.changedBeforeMount=!1,s()):(l.reaction=new qe(ni(e),function(){s()}),s()),function(){l.reaction.dispose(),l.reaction=null,l.mounted=!1,l.changedBeforeMount=!1}},[]);var u,d;if(l.reaction.track(function(){try{u=t()}catch(f){d=f}}),d)throw d;return u}var ja=typeof Symbol=="function"&&Symbol.for;ja?Symbol.for("react.forward_ref"):typeof M.forwardRef=="function"&&M.forwardRef(function(t){return null}).$$typeof;ja?Symbol.for("react.memo"):typeof M.memo=="function"&&M.memo(function(t){return null}).$$typeof;var Xt;Xo(gr.unstable_batchedUpdates);Xt=mn.finalizeAllImmediately;function ol(t,e){return e===void 0&&(e="observed"),sl(t,e)}function Ua(t){return ol(()=>{const e=Xe.instance();return t(e)})}function ll(){var i,a,r;let t=null,e=null,n=null;try{t=(r=(a=(i=Intl.DateTimeFormat())==null?void 0:i.resolvedOptions())==null?void 0:a.timeZone)!=null?r:null;const s=-new Date().getTimezoneOffset();n=s;const o=s>=0?"+":"-",l=String(Math.floor(Math.abs(s)/60)).padStart(2,"0"),u=String(Math.abs(s)%60).padStart(2,"0");e=`${o}${l}:${u}`}catch{xe.error("Error obtaining time zone or offset")}return{offset:e,offsetValue:n,value:t,country:null,included:null,label:null}}class Ma{constructor(e){x(this,"aggregate");x(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 $a(t){return new Ma(t)}class ul{}class dl{constructor(e){x(this,"_value");e!==void 0&&(this._value=e)}get value(){return this._value}}var Rn=(t=>(t.VTEX="VTEX",t.VTEX_IO="VTEX-IO",t.VTEX_CMS="PORTAL-VTEX",t.PLATFORM="PLATFORM",t.UNKNOWN="UNKNOWN",t))(Rn||{}),Ba=(t=>(t.PLATFORM="platform_module",t.ADENDA="subscription_module",t.APP_STORE="app_store",t))(Ba||{}),xn=(t=>(t.ACTIVE="active_contract",t.INACTIVE="inactive_contract",t))(xn||{}),za=(t=>(t.LITE="lite",t.STANDARD="standard",t.PRO="pro",t))(za||{}),Ka=(t=>(t.LITE="PLAN_LITE",t.STANDARD="PLAN_ESTANDAR",t.PRO="PLAN_PRO",t.NONE="NO_PLAN",t))(Ka||{}),Ga=(t=>(t.PAST="past",t.LIVE="live",t.FUTURE="future",t))(Ga||{});class Kt{constructor(e){x(this,"root",$a(this));x(this,"id");x(this,"account");x(this,"accountType",Rn.UNKNOWN);x(this,"username");x(this,"currencyConfig");x(this,"contractType");x(this,"nextDateMetricRecord");x(this,"spendedMinutes",0);x(this,"unlimitedService",!1);x(this,"hoursAvailable",0);x(this,"contractStatus",xn.ACTIVE);x(this,"createdAt");x(this,"installationDateApp");x(this,"cxAccount");x(this,"freeService",!1);x(this,"subscriptionType",null);x(this,"minutesAvailable",0);x(this,"globalPage");x(this,"stripe");x(this,"descriptionPlan");x(this,"planType");x(this,"selectFreeTrial");x(this,"exceededFeatures");x(this,"host",null);this.root.setProps(e)}static toDomain(e){const{createdAt:n,username:i,...a}=e,r={...a,username:i!=null?i:a.account,createdAt:new Date(Number(n))};return new Kt(r)}toPrimitives(){const{root:e,createdAt:n,...i}=this;return{...i,created:n.toISOString()}}}const cl=`${jr.apiUrls.restV1}/accounts/v2`;class Qa{async get(e){const n=`${cl}/${e}`,{data:i}=await gn({url:n});return i?Kt.toDomain(i):null}}class qa{constructor(e){this.accountRepository=e}async get(e){try{const n=await this.accountRepository.get(e);if(!n)throw new La(e);return n}catch(n){throw new Ia(n)}}}const fl=new Qa,Tn=new qa(fl);class Dn{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){const n={listener:e};return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const Et=typeof window=="undefined"||"Deno"in window;function ml(){}function ii(t){return typeof t=="number"&&t>=0&&t!==1/0}function hl(t,e){return Math.max(t+(e||0)-Date.now(),0)}function pl(t,e,n){return vl(t)?typeof e=="function"?{...n,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function Wa(t,e){if(t===e)return t;const n=ai(t)&&ai(e);if(n||ri(t)&&ri(e)){const i=n?t.length:Object.keys(t).length,a=n?e:Object.keys(e),r=a.length,s=n?[]:{};let o=0;for(let l=0;l<r;l++){const u=n?l:a[l];s[u]=Wa(t[u],e[u]),s[u]===t[u]&&o++}return i===r&&o===i?t:s}return e}function hn(t,e){if(t&&!e||e&&!t)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function ai(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function ri(t){if(!si(t))return!1;const e=t.constructor;if(typeof e=="undefined")return!0;const n=e.prototype;return!(!si(n)||!n.hasOwnProperty("isPrototypeOf"))}function si(t){return Object.prototype.toString.call(t)==="[object Object]"}function vl(t){return Array.isArray(t)}function gl(t){return new Promise(e=>{setTimeout(e,t)})}function oi(t){gl(0).then(t)}function li(t,e,n){return n.isDataEqual!=null&&n.isDataEqual(t,e)?t:typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?Wa(t,e):e}class kl extends Dn{constructor(){super(),this.setup=e=>{if(!Et&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),()=>{window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var n;this.setup=e,(n=this.cleanup)==null||n.call(this),this.cleanup=e(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()})}setFocused(e){this.focused!==e&&(this.focused=e,this.onFocus())}onFocus(){this.listeners.forEach(({listener:e})=>{e()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document=="undefined"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const yl=new kl,ui=["online","offline"];class bl extends Dn{constructor(){super(),this.setup=e=>{if(!Et&&window.addEventListener){const n=()=>e();return ui.forEach(i=>{window.addEventListener(i,n,!1)}),()=>{ui.forEach(i=>{window.removeEventListener(i,n)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var n;this.setup=e,(n=this.cleanup)==null||n.call(this),this.cleanup=e(i=>{typeof i=="boolean"?this.setOnline(i):this.onOnline()})}setOnline(e){this.online!==e&&(this.online=e,this.onOnline())}onOnline(){this.listeners.forEach(({listener:e})=>{e()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator=="undefined"||typeof navigator.onLine=="undefined"?!0:navigator.onLine}}const Sl=new bl;function _l(t){return(t!=null?t:"online")==="online"?Sl.isOnline():!0}class Nl{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}}function Ol(t){return t instanceof Nl}function wl(){let t=[],e=0,n=d=>{d()},i=d=>{d()};const a=d=>{let f;e++;try{f=d()}finally{e--,e||o()}return f},r=d=>{e?t.push(d):oi(()=>{n(d)})},s=d=>(...f)=>{r(()=>{d(...f)})},o=()=>{const d=t;t=[],d.length&&oi(()=>{i(()=>{d.forEach(f=>{n(f)})})})};return{batch:a,batchCalls:s,schedule:r,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{i=d}}}const Ke=wl();class Fl extends Dn{constructor(e,n){super(),this.client=e,this.options=n,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(n)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),di(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return pn(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return pn(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,n){const i=this.options,a=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),hn(i,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled!="undefined"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=i.queryKey),this.updateQuery();const r=this.hasListeners();r&&ci(this.currentQuery,a,this.options,i)&&this.executeFetch(),this.updateResult(n),r&&(this.currentQuery!==a||this.options.enabled!==i.enabled||this.options.staleTime!==i.staleTime)&&this.updateStaleTimeout();const s=this.computeRefetchInterval();r&&(this.currentQuery!==a||this.options.enabled!==i.enabled||s!==this.currentRefetchInterval)&&this.updateRefetchInterval(s)}getOptimisticResult(e){const n=this.client.getQueryCache().build(this.client,e),i=this.createResult(n,e);return El(this,i,e)&&(this.currentResult=i,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),i}getCurrentResult(){return this.currentResult}trackResult(e){const n={};return Object.keys(e).forEach(i=>{Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(i),e[i])})}),n}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...n}={}){return this.fetch({...n,meta:{refetchPage:e}})}fetchOptimistic(e){const n=this.client.defaultQueryOptions(e),i=this.client.getQueryCache().build(this.client,n);return i.isFetchingOptimistic=!0,i.fetch().then(()=>this.createResult(i,n))}fetch(e){var n;return this.executeFetch({...e,cancelRefetch:(n=e.cancelRefetch)!=null?n:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let n=this.currentQuery.fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(ml)),n}updateStaleTimeout(){if(this.clearStaleTimeout(),Et||this.currentResult.isStale||!ii(this.options.staleTime))return;const n=hl(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},n)}computeRefetchInterval(){var e;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(e=this.options.refetchInterval)!=null?e:!1}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!(Et||this.options.enabled===!1||!ii(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||yl.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,n){const i=this.currentQuery,a=this.options,r=this.currentResult,s=this.currentResultState,o=this.currentResultOptions,l=e!==i,u=l?e.state:this.currentQueryInitialState,d=l?this.currentResult:this.previousQueryResult,{state:f}=e;let{dataUpdatedAt:c,error:b,errorUpdatedAt:N,fetchStatus:k,status:y}=f,R=!1,O=!1,V;if(n._optimisticResults){const m=this.hasListeners(),h=!m&&di(e,n),v=m&&ci(e,i,n,a);(h||v)&&(k=_l(e.options.networkMode)?"fetching":"paused",c||(y="loading")),n._optimisticResults==="isRestoring"&&(k="idle")}if(n.keepPreviousData&&!f.dataUpdatedAt&&d!=null&&d.isSuccess&&y!=="error")V=d.data,c=d.dataUpdatedAt,y=d.status,R=!0;else if(n.select&&typeof f.data!="undefined")if(r&&f.data===(s==null?void 0:s.data)&&n.select===this.selectFn)V=this.selectResult;else try{this.selectFn=n.select,V=n.select(f.data),V=li(r==null?void 0:r.data,V,n),this.selectResult=V,this.selectError=null}catch(m){this.selectError=m}else V=f.data;if(typeof n.placeholderData!="undefined"&&typeof V=="undefined"&&y==="loading"){let m;if(r!=null&&r.isPlaceholderData&&n.placeholderData===(o==null?void 0:o.placeholderData))m=r.data;else if(m=typeof n.placeholderData=="function"?n.placeholderData():n.placeholderData,n.select&&typeof m!="undefined")try{m=n.select(m),this.selectError=null}catch(h){this.selectError=h}typeof m!="undefined"&&(y="success",V=li(r==null?void 0:r.data,m,n),O=!0)}this.selectError&&(b=this.selectError,V=this.selectResult,N=Date.now(),y="error");const S=k==="fetching",T=y==="loading",P=y==="error";return{status:y,fetchStatus:k,isLoading:T,isSuccess:y==="success",isError:P,isInitialLoading:T&&S,data:V,dataUpdatedAt:c,error:b,errorUpdatedAt:N,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:S,isRefetching:S&&!T,isLoadingError:P&&f.dataUpdatedAt===0,isPaused:k==="paused",isPlaceholderData:O,isPreviousData:R,isRefetchError:P&&f.dataUpdatedAt!==0,isStale:Pn(e,n),refetch:this.refetch,remove:this.remove}}updateResult(e){const n=this.currentResult,i=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,hn(i,n))return;this.currentResult=i;const a={cache:!0},r=()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options,o=typeof s=="function"?s():s;if(o==="all"||!o&&!this.trackedProps.size)return!0;const l=new Set(o!=null?o:this.trackedProps);return this.options.useErrorBoundary&&l.add("error"),Object.keys(this.currentResult).some(u=>{const d=u;return this.currentResult[d]!==n[d]&&l.has(d)})};(e==null?void 0:e.listeners)!==!1&&r()&&(a.listeners=!0),this.notify({...a,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const n=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const n={};e.type==="success"?n.onSuccess=!e.manual:e.type==="error"&&!Ol(e.error)&&(n.onError=!0),this.updateResult(n),this.hasListeners()&&this.updateTimers()}notify(e){Ke.batch(()=>{if(e.onSuccess){var n,i,a,r;(n=(i=this.options).onSuccess)==null||n.call(i,this.currentResult.data),(a=(r=this.options).onSettled)==null||a.call(r,this.currentResult.data,null)}else if(e.onError){var s,o,l,u;(s=(o=this.options).onError)==null||s.call(o,this.currentResult.error),(l=(u=this.options).onSettled)==null||l.call(u,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(({listener:d})=>{d(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function Al(t,e){return e.enabled!==!1&&!t.state.dataUpdatedAt&&!(t.state.status==="error"&&e.retryOnMount===!1)}function di(t,e){return Al(t,e)||t.state.dataUpdatedAt>0&&pn(t,e,e.refetchOnMount)}function pn(t,e,n){if(e.enabled!==!1){const i=typeof n=="function"?n(t):n;return i==="always"||i!==!1&&Pn(t,e)}return!1}function ci(t,e,n,i){return n.enabled!==!1&&(t!==e||i.enabled===!1)&&(!n.suspense||t.state.status!=="error")&&Pn(t,n)}function Pn(t,e){return t.isStaleByTime(e.staleTime)}function El(t,e,n){return n.keepPreviousData?!1:n.placeholderData!==void 0?e.isPlaceholderData:!hn(t.getCurrentResult(),e)}var Ha={exports:{}},Ja={};/**
25
+ * @license React
26
+ * use-sync-external-store-shim.production.min.js
27
+ *
28
+ * Copyright (c) Facebook, Inc. and its affiliates.
29
+ *
30
+ * This source code is licensed under the MIT license found in the
31
+ * LICENSE file in the root directory of this source tree.
32
+ */var Le=M;function Cl(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Rl=typeof Object.is=="function"?Object.is:Cl,xl=Le.useState,Tl=Le.useEffect,Dl=Le.useLayoutEffect,Pl=Le.useDebugValue;function Ll(t,e){var n=e(),i=xl({inst:{value:n,getSnapshot:e}}),a=i[0].inst,r=i[1];return Dl(function(){a.value=n,a.getSnapshot=e,Yt(a)&&r({inst:a})},[t,n,e]),Tl(function(){return Yt(a)&&r({inst:a}),t(function(){Yt(a)&&r({inst:a})})},[t]),Pl(n),n}function Yt(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Rl(t,n)}catch{return!0}}function Il(t,e){return e()}var Vl=typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"?Il:Ll;Ja.useSyncExternalStore=Le.useSyncExternalStore!==void 0?Le.useSyncExternalStore:Vl;Ha.exports=Ja;var jl=Ha.exports;const Ul=jl.useSyncExternalStore,fi=Z.createContext(void 0),Ml=Z.createContext(!1);function $l(t,e){return t||(e&&typeof window!="undefined"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=fi),window.ReactQueryClientContext):fi)}const Bl=({context:t}={})=>{const e=Z.useContext($l(t,Z.useContext(Ml)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Za=Z.createContext(!1),zl=()=>Z.useContext(Za);Za.Provider;function Kl(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const Gl=Z.createContext(Kl()),Ql=()=>Z.useContext(Gl);function ql(t,e){return typeof t=="function"?t(...e):!!t}const Wl=(t,e)=>{(t.suspense||t.useErrorBoundary)&&(e.isReset()||(t.retryOnMount=!1))},Hl=t=>{Z.useEffect(()=>{t.clearReset()},[t])},Jl=({result:t,errorResetBoundary:e,useErrorBoundary:n,query:i})=>t.isError&&!e.isReset()&&!t.isFetching&&ql(n,[t.error,i]),Zl=t=>{t.suspense&&typeof t.staleTime!="number"&&(t.staleTime=1e3)},Xl=(t,e)=>t.isLoading&&t.isFetching&&!e,Yl=(t,e,n)=>(t==null?void 0:t.suspense)&&Xl(e,n),eu=(t,e,n)=>e.fetchOptimistic(t).then(({data:i})=>{t.onSuccess==null||t.onSuccess(i),t.onSettled==null||t.onSettled(i,null)}).catch(i=>{n.clearReset(),t.onError==null||t.onError(i),t.onSettled==null||t.onSettled(void 0,i)});function tu(t,e){const n=Bl({context:t.context}),i=zl(),a=Ql(),r=n.defaultQueryOptions(t);r._optimisticResults=i?"isRestoring":"optimistic",r.onError&&(r.onError=Ke.batchCalls(r.onError)),r.onSuccess&&(r.onSuccess=Ke.batchCalls(r.onSuccess)),r.onSettled&&(r.onSettled=Ke.batchCalls(r.onSettled)),Zl(r),Wl(r,a),Hl(a);const[s]=Z.useState(()=>new e(n,r)),o=s.getOptimisticResult(r);if(Ul(Z.useCallback(l=>{const u=i?()=>{}:s.subscribe(Ke.batchCalls(l));return s.updateResult(),u},[s,i]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),Z.useEffect(()=>{s.setOptions(r,{listeners:!1})},[r,s]),Yl(r,o,i))throw eu(r,s,a);if(Jl({result:o,errorResetBoundary:a,useErrorBoundary:r.useErrorBoundary,query:s.getCurrentQuery()}))throw o.error;return r.notifyOnChangeProps?o:s.trackResult(o)}function nu(t,e,n){const i=pl(t,e,n);return tu(i,Fl)}const iu=()=>["account"],au=()=>{const t=Ua(a=>a.accountName),[e,n]=Tr(Pt),i=nu(iu(),()=>Tn.get(t),{enabled:!!t&&!e,refetchOnWindowFocus:!1,refetchOnMount:!1});return M.useEffect(()=>{const a=i.data;!i.isSuccess||!a||n(a)},[i.status]),{findQuery:i,account:e}},Xa=Ei();async function Ya(t){const e=await Tn.get(t);return Xa.set(Pt,e),e}var er=(t=>(t.CREATED="CREATED",t.STARTING="STARTING",t.LIVE="LIVE",t.FINALIZED="FINALIZED",t))(er||{});const ru={ALL:"*",CORE:"core:**",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:**"},su={EVENT_STATUS_CHANGED:"event:statusChanged"};var tr=(t=>(t.English="en",t.Spanish="es",t.Portuguese="pt",t))(tr||{}),nr=(t=>(t.COMBO="Combo",t))(nr||{}),ir=(t=>(t.VTEX="VTEX",t.PLATFORM="platform",t.CACE="CACE",t.GLOBAL_PAGE="globalPage",t.DEV_LOCAL="dev:local",t.CUSTOMIZATION="customization",t.FAST_STORE="faststore",t))(ir||{});function ar(t){const e=Object.values(t);return Object.assign({},...e)}function rr(t){return Object.entries(t).reduce((e,[n,i])=>{const a=ar(i);return{...e,[n]:a}},{})}function sr(t,e){const n=rr(e);Object.entries(n).forEach(([i,a])=>{t.addResourceBundle(i,"translation",a,!0)})}function ou(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ye(t){"@babel/helpers - typeof";return Ye=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ye(t)}function lu(t,e){if(Ye(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(Ye(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function uu(t){var e=lu(t,"string");return Ye(e)==="symbol"?e:String(e)}function mi(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,uu(i.key),i)}}function du(t,e,n){return e&&mi(t.prototype,e),n&&mi(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var or=[],cu=or.forEach,fu=or.slice;function mu(t){return cu.call(fu.call(arguments,1),function(e){if(e)for(var n in e)t[n]===void 0&&(t[n]=e[n])}),t}var hi=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,hu=function(e,n,i){var a=i||{};a.path=a.path||"/";var r=encodeURIComponent(n),s="".concat(e,"=").concat(r);if(a.maxAge>0){var o=a.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");s+="; Max-Age=".concat(Math.floor(o))}if(a.domain){if(!hi.test(a.domain))throw new TypeError("option domain is invalid");s+="; Domain=".concat(a.domain)}if(a.path){if(!hi.test(a.path))throw new TypeError("option path is invalid");s+="; Path=".concat(a.path)}if(a.expires){if(typeof a.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+="; Expires=".concat(a.expires.toUTCString())}if(a.httpOnly&&(s+="; HttpOnly"),a.secure&&(s+="; Secure"),a.sameSite){var l=typeof a.sameSite=="string"?a.sameSite.toLowerCase():a.sameSite;switch(l){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},pi={create:function(e,n,i,a){var r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};i&&(r.expires=new Date,r.expires.setTime(r.expires.getTime()+i*60*1e3)),a&&(r.domain=a),document.cookie=hu(e,encodeURIComponent(n),r)},read:function(e){for(var n="".concat(e,"="),i=document.cookie.split(";"),a=0;a<i.length;a++){for(var r=i[a];r.charAt(0)===" ";)r=r.substring(1,r.length);if(r.indexOf(n)===0)return r.substring(n.length,r.length)}return null},remove:function(e){this.create(e,"",-1)}},pu={name:"cookie",lookup:function(e){var n;if(e.lookupCookie&&typeof document!="undefined"){var i=pi.read(e.lookupCookie);i&&(n=i)}return n},cacheUserLanguage:function(e,n){n.lookupCookie&&typeof document!="undefined"&&pi.create(n.lookupCookie,e,n.cookieMinutes,n.cookieDomain,n.cookieOptions)}},vu={name:"querystring",lookup:function(e){var n;if(typeof window!="undefined"){var i=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));for(var a=i.substring(1),r=a.split("&"),s=0;s<r.length;s++){var o=r[s].indexOf("=");if(o>0){var l=r[s].substring(0,o);l===e.lookupQuerystring&&(n=r[s].substring(o+1))}}}return n}},$e=null,vi=function(){if($e!==null)return $e;try{$e=window!=="undefined"&&window.localStorage!==null;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{$e=!1}return $e},gu={name:"localStorage",lookup:function(e){var n;if(e.lookupLocalStorage&&vi()){var i=window.localStorage.getItem(e.lookupLocalStorage);i&&(n=i)}return n},cacheUserLanguage:function(e,n){n.lookupLocalStorage&&vi()&&window.localStorage.setItem(n.lookupLocalStorage,e)}},Be=null,gi=function(){if(Be!==null)return Be;try{Be=window!=="undefined"&&window.sessionStorage!==null;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Be=!1}return Be},ku={name:"sessionStorage",lookup:function(e){var n;if(e.lookupSessionStorage&&gi()){var i=window.sessionStorage.getItem(e.lookupSessionStorage);i&&(n=i)}return n},cacheUserLanguage:function(e,n){n.lookupSessionStorage&&gi()&&window.sessionStorage.setItem(n.lookupSessionStorage,e)}},yu={name:"navigator",lookup:function(e){var n=[];if(typeof navigator!="undefined"){if(navigator.languages)for(var i=0;i<navigator.languages.length;i++)n.push(navigator.languages[i]);navigator.userLanguage&&n.push(navigator.userLanguage),navigator.language&&n.push(navigator.language)}return n.length>0?n:void 0}},bu={name:"htmlTag",lookup:function(e){var n,i=e.htmlTag||(typeof document!="undefined"?document.documentElement:null);return i&&typeof i.getAttribute=="function"&&(n=i.getAttribute("lang")),n}},Su={name:"path",lookup:function(e){var n;if(typeof window!="undefined"){var i=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(i instanceof Array)if(typeof e.lookupFromPathIndex=="number"){if(typeof i[e.lookupFromPathIndex]!="string")return;n=i[e.lookupFromPathIndex].replace("/","")}else n=i[0].replace("/","")}return n}},_u={name:"subdomain",lookup:function(e){var n=typeof e.lookupFromSubdomainIndex=="number"?e.lookupFromSubdomainIndex+1:1,i=typeof window!="undefined"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(i)return i[n]}};function Nu(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:function(e){return e}}}var lr=function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ou(this,t),this.type="languageDetector",this.detectors={},this.init(e,n)}return du(t,[{key:"init",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n||{languageUtils:{}},this.options=mu(i,this.options||{},Nu()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(r){return r.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=a,this.addDetector(pu),this.addDetector(vu),this.addDetector(gu),this.addDetector(ku),this.addDetector(yu),this.addDetector(bu),this.addDetector(Su),this.addDetector(_u)}},{key:"addDetector",value:function(n){this.detectors[n.name]=n}},{key:"detect",value:function(n){var i=this;n||(n=this.options.order);var a=[];return n.forEach(function(r){if(i.detectors[r]){var s=i.detectors[r].lookup(i.options);s&&typeof s=="string"&&(s=[s]),s&&(a=a.concat(s))}}),a=a.map(function(r){return i.options.convertDetectedLanguage(r)}),this.services.languageUtils.getBestMatchFromCodes?a:a.length>0?a[0]:null}},{key:"cacheUserLanguage",value:function(n,i){var a=this;i||(i=this.options.caches),i&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(n)>-1||i.forEach(function(r){a.detectors[r]&&a.detectors[r].cacheUserLanguage(n,a.options)}))}}]),t}();lr.type="languageDetector";function ur(t,e){t.use(e).use(lr).init({resources:{},fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1,format:(n,i,a)=>{if(i){const[r,...s]=i.split(",").map(o=>o.trim());if(r==="number")return new Intl.NumberFormat(a).format(n);if(r==="date")return new Intl.DateTimeFormat(a).format(n);if(r==="currency")return new Intl.NumberFormat(a,{style:"currency",currency:s[0]||"USD",currencyDisplay:"narrowSymbol"}).format(n).replace("$","").trim()}return n}},detection:{order:["navigator","cookie","localStorage","sessionStorage","querystring","htmlTag","path","subdomain"]}})}const Ou={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 Ct{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||Ou,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,a){return a&&!this.debug?null:(typeof e[0]=="string"&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new Ct(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new Ct(this.logger,e)}}var ae=new Ct;class Gt{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(i=>{this.observers[i]=this.observers[i]||[],this.observers[i].push(n)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e]=this.observers[e].filter(i=>i!==n)}}emit(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];this.observers[e]&&[].concat(this.observers[e]).forEach(s=>{s(...i)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(s=>{s.apply(s,[e,...i])})}}function ze(){let t,e;const n=new Promise((i,a)=>{t=i,e=a});return n.resolve=t,n.reject=e,n}function ki(t){return t==null?"":""+t}function wu(t,e,n){t.forEach(i=>{e[i]&&(n[i]=e[i])})}function Ln(t,e,n){function i(s){return s&&s.indexOf("###")>-1?s.replace(/###/g,"."):s}function a(){return!t||typeof t=="string"}const r=typeof e!="string"?[].concat(e):e.split(".");for(;r.length>1;){if(a())return{};const s=i(r.shift());!t[s]&&n&&(t[s]=new n),Object.prototype.hasOwnProperty.call(t,s)?t=t[s]:t={}}return a()?{}:{obj:t,k:i(r.shift())}}function yi(t,e,n){const{obj:i,k:a}=Ln(t,e,Object);i[a]=n}function Fu(t,e,n,i){const{obj:a,k:r}=Ln(t,e,Object);a[r]=a[r]||[],i&&(a[r]=a[r].concat(n)),i||a[r].push(n)}function Rt(t,e){const{obj:n,k:i}=Ln(t,e);if(n)return n[i]}function Au(t,e,n){const i=Rt(t,n);return i!==void 0?i:Rt(e,n)}function dr(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]):dr(t[i],e[i],n):t[i]=e[i]);return t}function Fe(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var Eu={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function Cu(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,e=>Eu[e]):t}const Ru=[" ",",","?","!",";"];function xu(t,e,n){e=e||"",n=n||"";const i=Ru.filter(s=>e.indexOf(s)<0&&n.indexOf(s)<0);if(i.length===0)return!0;const a=new RegExp(`(${i.map(s=>s==="?"?"\\?":s).join("|")})`);let r=!a.test(t);if(!r){const s=t.indexOf(n);s>0&&!a.test(t.substring(0,s))&&(r=!0)}return r}function xt(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 a=t;for(let r=0;r<i.length;++r){if(!a||typeof a[i[r]]=="string"&&r+1<i.length)return;if(a[i[r]]===void 0){let s=2,o=i.slice(r,r+s).join(n),l=a[o];for(;l===void 0&&i.length>r+s;)s++,o=i.slice(r,r+s).join(n),l=a[o];if(l===void 0)return;if(l===null)return null;if(e.endsWith(o)){if(typeof l=="string")return l;if(o&&typeof l[o]=="string")return l[o]}const u=i.slice(r+s).join(n);return u?xt(l,u,n):void 0}a=a[i[r]]}return a}function Tt(t){return t&&t.indexOf("_")>0?t.replace("_","-"):t}class bi extends Gt{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 a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const r=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,s=a.ignoreJSONStructure!==void 0?a.ignoreJSONStructure:this.options.ignoreJSONStructure;let o=[e,n];i&&typeof i!="string"&&(o=o.concat(i)),i&&typeof i=="string"&&(o=o.concat(r?i.split(r):i)),e.indexOf(".")>-1&&(o=e.split("."));const l=Rt(this.data,o);return l||!s||typeof i!="string"?l:xt(this.data&&this.data[e]&&this.data[e][n],i,r)}addResource(e,n,i,a){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const s=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let o=[e,n];i&&(o=o.concat(s?i.split(s):i)),e.indexOf(".")>-1&&(o=e.split("."),a=n,n=o[1]),this.addNamespaces(n),yi(this.data,o,a),r.silent||this.emit("added",e,n,i,a)}addResources(e,n,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const r in i)(typeof i[r]=="string"||Object.prototype.toString.apply(i[r])==="[object Array]")&&this.addResource(e,n,r,i[r],{silent:!0});a.silent||this.emit("added",e,n,i)}addResourceBundle(e,n,i,a,r){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},o=[e,n];e.indexOf(".")>-1&&(o=e.split("."),a=i,i=n,n=o[1]),this.addNamespaces(n);let l=Rt(this.data,o)||{};a?dr(l,i,r):l={...l,...i},yi(this.data,o,l),s.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(a=>n[a]&&Object.keys(n[a]).length>0)}toJSON(){return this.data}}var cr={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,i,a){return t.forEach(r=>{this.processors[r]&&(e=this.processors[r].process(e,n,i,a))}),e}};const Si={};class Dt extends Gt{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),wu(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ae.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 a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let r=n.ns||this.options.defaultNS||[];const s=i&&e.indexOf(i)>-1,o=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!xu(e,i,a);if(s&&!o){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:r};const u=e.split(i);(i!==a||i===a&&this.options.ns.indexOf(u[0])>-1)&&(r=u.shift()),e=u.join(a)}return typeof r=="string"&&(r=[r]),{key:e,namespaces:r}}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 a=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,r=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:s,namespaces:o}=this.extractFromKey(e[e.length-1],n),l=o[o.length-1],u=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(d){const S=n.nsSeparator||this.options.nsSeparator;return a?{res:`${l}${S}${s}`,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${S}${s}`}return a?{res:s,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:s}const f=this.resolve(e,n);let c=f&&f.res;const b=f&&f.usedKey||s,N=f&&f.exactUsedKey||s,k=Object.prototype.toString.apply(c),y=["[object Number]","[object Function]","[object RegExp]"],R=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,O=!this.i18nFormat||this.i18nFormat.handleAsObject;if(O&&c&&(typeof c!="string"&&typeof c!="boolean"&&typeof c!="number")&&y.indexOf(k)<0&&!(typeof R=="string"&&k==="[object Array]")){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const S=this.options.returnedObjectHandler?this.options.returnedObjectHandler(b,c,{...n,ns:o}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(f.res=S,f.usedParams=this.getUsedParamsDetails(n),f):S}if(r){const S=k==="[object Array]",T=S?[]:{},P=S?N:b;for(const j in c)if(Object.prototype.hasOwnProperty.call(c,j)){const m=`${P}${r}${j}`;T[j]=this.translate(m,{...n,joinArrays:!1,ns:o}),T[j]===m&&(T[j]=c[j])}c=T}}else if(O&&typeof R=="string"&&k==="[object Array]")c=c.join(R),c&&(c=this.extendTranslation(c,e,n,i));else{let S=!1,T=!1;const P=n.count!==void 0&&typeof n.count!="string",j=Dt.hasDefaultValue(n),m=P?this.pluralResolver.getSuffix(u,n.count,n):"",h=n.ordinal&&P?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",v=n[`defaultValue${m}`]||n[`defaultValue${h}`]||n.defaultValue;!this.isValidLookup(c)&&j&&(S=!0,c=v),this.isValidLookup(c)||(T=!0,c=s);const w=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&T?void 0:c,F=j&&v!==c&&this.options.updateMissing;if(T||S||F){if(this.logger.log(F?"updateKey":"missingKey",u,l,s,F?v:c),r){const E=this.resolve(s,{...n,keySeparator:!1});E&&E.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 _=[];const A=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&A&&A[0])for(let E=0;E<A.length;E++)_.push(A[E]);else this.options.saveMissingTo==="all"?_=this.languageUtils.toResolveHierarchy(n.lng||this.language):_.push(n.lng||this.language);const $=(E,L,B)=>{const lt=j&&B!==c?B:w;this.options.missingKeyHandler?this.options.missingKeyHandler(E,l,L,lt,F,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(E,l,L,lt,F,n),this.emit("missingKey",E,l,L,c)};this.options.saveMissing&&(this.options.saveMissingPlurals&&P?_.forEach(E=>{this.pluralResolver.getSuffixes(E,n).forEach(L=>{$([E],s+L,n[`defaultValue${L}`]||v)})}):$(_,s,v))}c=this.extendTranslation(c,e,n,f,i),T&&c===s&&this.options.appendNamespaceToMissingKey&&(c=`${l}:${s}`),(T||S)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?c=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${s}`:s,S?c:void 0):c=this.options.parseMissingKeyHandler(c))}return a?(f.res=c,f.usedParams=this.getUsedParamsDetails(n),f):c}extendTranslation(e,n,i,a,r){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||a.usedLng,a.usedNS,a.usedKey,{resolved:a});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const u=typeof e=="string"&&(i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(u){const c=e.match(this.interpolator.nestingRegexp);d=c&&c.length}let f=i.replace&&typeof i.replace!="string"?i.replace:i;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),e=this.interpolator.interpolate(e,f,i.lng||this.language,i),u){const c=e.match(this.interpolator.nestingRegexp),b=c&&c.length;d<b&&(i.nest=!1)}!i.lng&&this.options.compatibilityAPI!=="v1"&&a&&a.res&&(i.lng=a.usedLng),i.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var c=arguments.length,b=new Array(c),N=0;N<c;N++)b[N]=arguments[N];return r&&r[0]===b[0]&&!i.context?(s.logger.warn(`It seems you are nesting recursively key: ${b[0]} in key: ${n[0]}`),null):s.translate(...b,n)},i)),i.interpolation&&this.interpolator.reset()}const o=i.postProcess||this.options.postProcess,l=typeof o=="string"?[o]:o;return e!=null&&l&&l.length&&i.applyPostProcessor!==!1&&(e=cr.handle(l,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...a,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,a,r,s,o;return typeof e=="string"&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(i))return;const u=this.extractFromKey(l,n),d=u.key;a=d;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const c=n.count!==void 0&&typeof n.count!="string",b=c&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),N=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",k=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(y=>{this.isValidLookup(i)||(o=y,!Si[`${k[0]}-${y}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(Si[`${k[0]}-${y}`]=!0,this.logger.warn(`key "${a}" for languages "${k.join(", ")}" won't get resolved as namespace "${o}" 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!!!")),k.forEach(R=>{if(this.isValidLookup(i))return;s=R;const O=[d];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(O,d,R,y,n);else{let S;c&&(S=this.pluralResolver.getSuffix(R,n.count,n));const T=`${this.options.pluralSeparator}zero`,P=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(O.push(d+S),n.ordinal&&S.indexOf(P)===0&&O.push(d+S.replace(P,this.options.pluralSeparator)),b&&O.push(d+T)),N){const j=`${d}${this.options.contextSeparator}${n.context}`;O.push(j),c&&(O.push(j+S),n.ordinal&&S.indexOf(P)===0&&O.push(j+S.replace(P,this.options.pluralSeparator)),b&&O.push(j+T))}}let V;for(;V=O.pop();)this.isValidLookup(i)||(r=V,i=this.getResource(R,y,V,n))}))})}),{res:i,usedKey:a,exactUsedKey:r,usedLng:s,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,n,i,a):this.resourceStore.getResource(e,n,i,a)}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 a=i?e.replace:e;if(i&&typeof e.count!="undefined"&&(a.count=e.count),this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),!i){a={...a};for(const r of n)delete a[r]}return a}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}}function en(t){return t.charAt(0).toUpperCase()+t.slice(1)}class _i{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ae.create("languageUtils")}getScriptPartFromCode(e){if(e=Tt(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=Tt(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(a=>a.toLowerCase()):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=en(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]=en(i[1].toLowerCase())),n.indexOf(i[2].toLowerCase())>-1&&(i[2]=en(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 a=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(a))&&(n=a)}),!n&&this.options.supportedLngs&&e.forEach(i=>{if(n)return;const a=this.getLanguagePartFromCode(i);if(this.isSupportedCode(a))return n=a;n=this.options.supportedLngs.find(r=>{if(r===a)return r;if(!(r.indexOf("-")<0&&a.indexOf("-")<0)&&r.indexOf(a)===0)return r})}),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]),Object.prototype.toString.apply(e)==="[object Array]")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),a=[],r=s=>{s&&(this.isSupportedCode(s)?a.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&r(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&r(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&r(this.getLanguagePartFromCode(e))):typeof e=="string"&&r(this.formatLanguageCode(e)),i.forEach(s=>{a.indexOf(s)<0&&r(this.formatLanguageCode(s))}),a}}let Tu=[{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}],Du={1:function(t){return+(t>1)},2:function(t){return+(t!=1)},3:function(t){return 0},4:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},5:function(t){return t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},6:function(t){return t==1?0:t>=2&&t<=4?1:2},7:function(t){return t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},8:function(t){return t==1?0:t==2?1:t!=8&&t!=11?2:3},9:function(t){return+(t>=2)},10:function(t){return t==1?0:t==2?1:t<7?2:t<11?3:4},11:function(t){return t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3},12:function(t){return+(t%10!=1||t%100==11)},13:function(t){return+(t!==0)},14:function(t){return t==1?0:t==2?1:t==3?2:3},15:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2},16:function(t){return t%10==1&&t%100!=11?0:t!==0?1:2},17:function(t){return t==1||t%10==1&&t%100!=11?0:1},18:function(t){return t==0?0:t==1?1:2},19:function(t){return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3},20:function(t){return t==1?0:t==0||t%100>0&&t%100<20?1:2},21:function(t){return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0},22:function(t){return t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3}};const Pu=["v1","v2","v3"],Lu=["v4"],Ni={zero:0,one:1,two:2,few:3,many:4,other:5};function Iu(){const t={};return Tu.forEach(e=>{e.lngs.forEach(n=>{t[n]={numbers:e.nr,plurals:Du[e.fc]}})}),t}class Vu{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=n,this.logger=ae.create("pluralResolver"),(!this.options.compatibilityJSON||Lu.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=Iu()}addRule(e,n){this.rules[e]=n}getRule(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(Tt(e),{type:n.ordinal?"ordinal":"cardinal"})}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(a=>`${n}${a}`)}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((a,r)=>Ni[a]-Ni[r]).map(a=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${a}`):i.numbers.map(a=>this.getSuffix(e,a,n)):[]}getSuffix(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const a=this.getRule(e,i);return a?this.shouldUseIntlApi()?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${a.select(n)}`:this.getSuffixRetroCompatible(a,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 a=e.numbers[i];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(a===2?a="plural":a===1&&(a=""));const r=()=>this.options.prepend&&a.toString()?this.options.prepend+a.toString():a.toString();return this.options.compatibilityJSON==="v1"?a===1?"":typeof a=="number"?`_plural_${a.toString()}`:r():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?r():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}shouldUseIntlApi(){return!Pu.includes(this.options.compatibilityJSON)}}function Oi(t,e,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,r=Au(t,e,n);return!r&&a&&typeof n=="string"&&(r=xt(t,n,i),r===void 0&&(r=xt(e,n,i))),r}class ju{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ae.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 n=e.interpolation;this.escape=n.escape!==void 0?n.escape:Cu,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?Fe(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?Fe(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?Fe(n.nestingPrefix):n.nestingPrefixEscaped||Fe("$t("),this.nestingSuffix=n.nestingSuffix?Fe(n.nestingSuffix):n.nestingSuffixEscaped||Fe(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=`${this.prefix}(.+?)${this.suffix}`;this.regexp=new RegExp(e,"g");const n=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=new RegExp(n,"g");const i=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=new RegExp(i,"g")}interpolate(e,n,i,a){let r,s,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(N){return N.replace(/\$/g,"$$$$")}const d=N=>{if(N.indexOf(this.formatSeparator)<0){const O=Oi(n,l,N,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(O,void 0,i,{...a,...n,interpolationkey:N}):O}const k=N.split(this.formatSeparator),y=k.shift().trim(),R=k.join(this.formatSeparator).trim();return this.format(Oi(n,l,y,this.options.keySeparator,this.options.ignoreJSONStructure),R,i,{...a,...n,interpolationkey:y})};this.resetRegExp();const f=a&&a.missingInterpolationHandler||this.options.missingInterpolationHandler,c=a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:N=>u(N)},{regex:this.regexp,safeValue:N=>this.escapeValue?u(this.escape(N)):u(N)}].forEach(N=>{for(o=0;r=N.regex.exec(e);){const k=r[1].trim();if(s=d(k),s===void 0)if(typeof f=="function"){const R=f(e,r,a);s=typeof R=="string"?R:""}else if(a&&Object.prototype.hasOwnProperty.call(a,k))s="";else if(c){s=r[0];continue}else this.logger.warn(`missed to pass in variable ${k} for interpolating ${e}`),s="";else typeof s!="string"&&!this.useRawValueToEscape&&(s=ki(s));const y=N.safeValue(s);if(e=e.replace(r[0],y),c?(N.regex.lastIndex+=s.length,N.regex.lastIndex-=r[0].length):N.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,r,s;function o(l,u){const d=this.nestingOptionsSeparator;if(l.indexOf(d)<0)return l;const f=l.split(new RegExp(`${d}[ ]*{`));let c=`{${f[1]}`;l=f[0],c=this.interpolate(c,s);const b=c.match(/'/g),N=c.match(/"/g);(b&&b.length%2===0&&!N||N.length%2!==0)&&(c=c.replace(/'/g,'"'));try{s=JSON.parse(c),u&&(s={...u,...s})}catch(k){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,k),`${l}${d}${c}`}return delete s.defaultValue,l}for(;a=this.nestingRegexp.exec(e);){let l=[];s={...i},s=s.replace&&typeof s.replace!="string"?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let u=!1;if(a[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(a[1])){const d=a[1].split(this.formatSeparator).map(f=>f.trim());a[1]=d.shift(),l=d,u=!0}if(r=n(o.call(this,a[1].trim(),s),s),r&&a[0]===e&&typeof r!="string")return r;typeof r!="string"&&(r=ki(r)),r||(this.logger.warn(`missed to resolve ${a[1]} for nesting ${e}`),r=""),u&&(r=l.reduce((d,f)=>this.format(d,f,i.lng,{...i,interpolationkey:a[1].trim()}),r.trim())),e=e.replace(a[0],r),this.regexp.lastIndex=0}return e}}function Uu(t){let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const i=t.split("(");e=i[0].toLowerCase().trim();const a=i[1].substring(0,i[1].length-1);e==="currency"&&a.indexOf(":")<0?n.currency||(n.currency=a.trim()):e==="relativetime"&&a.indexOf(":")<0?n.range||(n.range=a.trim()):a.split(";").forEach(s=>{if(!s)return;const[o,...l]=s.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,"");n[o.trim()]||(n[o.trim()]=u),u==="false"&&(n[o.trim()]=!1),u==="true"&&(n[o.trim()]=!0),isNaN(u)||(n[o.trim()]=parseInt(u,10))})}return{formatName:e,formatOptions:n}}function Ae(t){const e={};return function(i,a,r){const s=a+JSON.stringify(r);let o=e[s];return o||(o=t(Tt(a),r),e[s]=o),o(i)}}class Mu{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ae.create("formatter"),this.options=e,this.formats={number:Ae((n,i)=>{const a=new Intl.NumberFormat(n,{...i});return r=>a.format(r)}),currency:Ae((n,i)=>{const a=new Intl.NumberFormat(n,{...i,style:"currency"});return r=>a.format(r)}),datetime:Ae((n,i)=>{const a=new Intl.DateTimeFormat(n,{...i});return r=>a.format(r)}),relativetime:Ae((n,i)=>{const a=new Intl.RelativeTimeFormat(n,{...i});return r=>a.format(r,i.range||"day")}),list:Ae((n,i)=>{const a=new Intl.ListFormat(n,{...i});return r=>a.format(r)})},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()]=Ae(n)}format(e,n,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((o,l)=>{const{formatName:u,formatOptions:d}=Uu(l);if(this.formats[u]){let f=o;try{const c=a&&a.formatParams&&a.formatParams[a.interpolationkey]||{},b=c.locale||c.lng||a.locale||a.lng||i;f=this.formats[u](o,b,{...d,...a,...c})}catch(c){this.logger.warn(c)}return f}else this.logger.warn(`there was no format function for ${u}`);return o},e)}}function $u(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}class Bu extends Gt{constructor(e,n,i){let a=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=a,this.logger=ae.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=a.maxParallelReads||10,this.readingCalls=0,this.maxRetries=a.maxRetries>=0?a.maxRetries:5,this.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(i,a.backend,a)}queueLoad(e,n,i,a){const r={},s={},o={},l={};return e.forEach(u=>{let d=!0;n.forEach(f=>{const c=`${u}|${f}`;!i.reload&&this.store.hasResourceBundle(u,f)?this.state[c]=2:this.state[c]<0||(this.state[c]===1?s[c]===void 0&&(s[c]=!0):(this.state[c]=1,d=!1,s[c]===void 0&&(s[c]=!0),r[c]===void 0&&(r[c]=!0),l[f]===void 0&&(l[f]=!0)))}),d||(o[u]=!0)}),(Object.keys(r).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(r),pending:Object.keys(s),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(e,n,i){const a=e.split("|"),r=a[0],s=a[1];n&&this.emit("failedLoading",r,s,n),i&&this.store.addResourceBundle(r,s,i),this.state[e]=n?-1:2;const o={};this.queue.forEach(l=>{Fu(l.loaded,[r],s),$u(l,e),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{o[u]||(o[u]={});const d=l.loaded[u];d.length&&d.forEach(f=>{o[u][f]===void 0&&(o[u][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done)}read(e,n,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!e.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:i,tried:a,wait:r,callback:s});return}this.readingCalls++;const o=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&d&&a<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,i,a+1,r*2,s)},r);return}s(u,d)},l=this.backend[i].bind(this.backend);if(l.length===2){try{const u=l(e,n);u&&typeof u.then=="function"?u.then(d=>o(null,d)).catch(o):o(null,u)}catch(u){o(u)}return}return l(e,n,o)}prepareLoading(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=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."),a&&a();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof n=="string"&&(n=[n]);const r=this.queueLoad(e,n,i,a);if(!r.toLoad.length)return r.pending.length||a(),null;r.toLoad.forEach(s=>{this.loadOne(s)})}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("|"),a=i[0],r=i[1];this.read(a,r,"read",void 0,void 0,(s,o)=>{s&&this.logger.warn(`${n}loading namespace ${r} for language ${a} failed`,s),!s&&o&&this.logger.log(`${n}loaded namespace ${r} for language ${a}`,o),this.loaded(e,s,o)})}saveMissing(e,n,i,a,r){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},o=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 l={...s,isUpdate:r},u=this.backend.create.bind(this.backend);if(u.length<6)try{let d;u.length===5?d=u(e,n,i,a,l):d=u(e,n,i,a),d&&typeof d.then=="function"?d.then(f=>o(null,f)).catch(o):o(null,d)}catch(d){o(d)}else u(e,n,i,a,o,l)}!e||!e[0]||this.store.addResource(e[0],n,i,a)}}}function wi(){return{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:function(e){let n={};if(typeof e[1]=="object"&&(n=e[1]),typeof e[1]=="string"&&(n.defaultValue=e[1]),typeof e[2]=="string"&&(n.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const i=e[3]||e[2];Object.keys(i).forEach(a=>{n[a]=i[a]})}return n},interpolation:{escapeValue:!0,format:(t,e,n,i)=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function Fi(t){return 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}function ht(){}function zu(t){Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})}class et extends Gt{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Fi(e),this.services={},this.logger=ae,this.modules={external:[]},zu(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;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 a=wi();this.options={...a,...this.options,...Fi(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...a.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function r(d){return d?typeof d=="function"?new d:d:null}if(!this.options.isClone){this.modules.logger?ae.init(r(this.modules.logger),this.options):ae.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:typeof Intl!="undefined"&&(d=Mu);const f=new _i(this.options);this.store=new bi(this.options.resources,this.options);const c=this.services;c.logger=ae,c.resourceStore=this.store,c.languageUtils=f,c.pluralResolver=new Vu(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===a.interpolation.format)&&(c.formatter=r(d),c.formatter.init(c,this.options),this.options.interpolation.format=c.formatter.format.bind(c.formatter)),c.interpolator=new ju(this.options),c.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},c.backendConnector=new Bu(r(this.modules.backend),c.resourceStore,c,this.options),c.backendConnector.on("*",function(b){for(var N=arguments.length,k=new Array(N>1?N-1:0),y=1;y<N;y++)k[y-1]=arguments[y];e.emit(b,...k)}),this.modules.languageDetector&&(c.languageDetector=r(this.modules.languageDetector),c.languageDetector.init&&c.languageDetector.init(c,this.options.detection,this.options)),this.modules.i18nFormat&&(c.i18nFormat=r(this.modules.i18nFormat),c.i18nFormat.init&&c.i18nFormat.init(this)),this.translator=new Dt(this.services,this.options),this.translator.on("*",function(b){for(var N=arguments.length,k=new Array(N>1?N-1:0),y=1;y<N;y++)k[y-1]=arguments[y];e.emit(b,...k)}),this.modules.external.forEach(b=>{b.init&&b.init(this)})}if(this.format=this.options.interpolation.format,i||(i=ht),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[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(d=>{this[d]=function(){return e.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return e.store[d](...arguments),e}});const l=ze(),u=()=>{const d=(f,c)=>{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),l.resolve(c),i(f,c)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}loadResources(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ht;const a=typeof e=="string"?e:this.language;if(typeof e=="function"&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(a&&a.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const r=[],s=o=>{if(!o||o==="cimode")return;this.services.languageUtils.toResolveHierarchy(o).forEach(u=>{u!=="cimode"&&r.indexOf(u)<0&&r.push(u)})};a?s(a):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>s(l)),this.options.preload&&this.options.preload.forEach(o=>s(o)),this.services.backendConnector.load(r,this.options.ns,o=>{!o&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(o)})}else i(null)}reloadResources(e,n,i){const a=ze();return e||(e=this.languages),n||(n=this.options.ns),i||(i=ht),this.services.backendConnector.reload(e,n,r=>{a.resolve(),i(r)}),a}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"&&cr.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 a=ze();this.emit("languageChanging",e);const r=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},s=(l,u)=>{u?(r(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,a.resolve(function(){return i.t(...arguments)}),n&&n(l,function(){return i.t(...arguments)})},o=l=>{!e&&!l&&this.services.languageDetector&&(l=[]);const u=typeof l=="string"?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||r(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,d=>{s(d,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),a}getFixedT(e,n,i){var a=this;const r=function(s,o){let l;if(typeof o!="object"){for(var u=arguments.length,d=new Array(u>2?u-2:0),f=2;f<u;f++)d[f-2]=arguments[f];l=a.options.overloadTranslationOptionHandler([s,o].concat(d))}else l={...o};l.lng=l.lng||r.lng,l.lngs=l.lngs||r.lngs,l.ns=l.ns||r.ns,l.keyPrefix=l.keyPrefix||i||r.keyPrefix;const c=a.options.keySeparator||".";let b;return l.keyPrefix&&Array.isArray(s)?b=s.map(N=>`${l.keyPrefix}${c}${N}`):b=l.keyPrefix?`${l.keyPrefix}${c}${s}`:s,a.t(b,l)};return typeof e=="string"?r.lng=e:r.lngs=e,r.ns=n,r.keyPrefix=i,r}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],a=this.options?this.options.fallbackLng:!1,r=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const s=(o,l)=>{const u=this.services.backendConnector.state[`${o}|${l}`];return u===-1||u===2};if(n.precheck){const o=n.precheck(this,s);if(o!==void 0)return o}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(i,e)&&(!a||s(r,e)))}loadNamespaces(e,n){const i=ze();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(a=>{this.options.ns.indexOf(a)<0&&this.options.ns.push(a)}),this.loadResources(a=>{i.resolve(),n&&n(a)}),i):(n&&n(),Promise.resolve())}loadLanguages(e,n){const i=ze();typeof e=="string"&&(e=[e]);const a=this.options.preload||[],r=e.filter(s=>a.indexOf(s)<0);return r.length?(this.options.preload=a.concat(r),this.loadResources(s=>{i.resolve(),n&&n(s)}),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 _i(wi());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 et(e,n)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ht;const i=e.forkResourceStore;i&&delete e.forkResourceStore;const a={...this.options,...e,isClone:!0},r=new et(a);return(e.debug!==void 0||e.prefix!==void 0)&&(r.logger=r.logger.clone(e)),["store","services","language"].forEach(o=>{r[o]=this[o]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},i&&(r.store=new bi(this.store.data,a),r.services.resourceStore=r.store),r.translator=new Dt(r.services,a),r.translator.on("*",function(o){for(var l=arguments.length,u=new Array(l>1?l-1:0),d=1;d<l;d++)u[d-1]=arguments[d];r.emit(o,...u)}),r.init(a,n),r.translator.options=a,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const G=et.createInstance();G.createInstance=et.createInstance;G.createInstance;G.dir;G.init;G.loadResources;G.reloadResources;G.use;G.changeLanguage;G.getFixedT;G.t;G.exists;G.setDefaultNamespace;G.hasLoadedNamespace;G.loadNamespaces;G.loadLanguages;const Ku=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Gu={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},Qu=t=>Gu[t],qu=t=>t.replace(Ku,Qu);let Ai={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:qu};function Wu(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ai={...Ai,...t}}const Hu={type:"3rdParty",init(t){Wu(t.options.react)}};ur(G,Hu);const Ju=t=>sr(G,t);let In=new Map;const vn=M.createContext(In),Zu=({children:t,stores:e})=>{const n=M.useContext(vn),i=M.useMemo(()=>{const a=new Map;return e.forEach(r=>a.set(r.class,r.value)),In=new Map([...n,...a])},[]);return kr.jsx(vn.Provider,{value:i,children:t})};function Xu(t){return M.useContext(vn).get(t)}function Yu(t){return In.get(t)}var fr=(t=>(t.Created="CREATED",t.Finalized="FINALIZED",t.Live="LIVE",t.Starting="STARTING",t))(fr||{}),mr=(t=>(t.Add="add",t.Remove="remove",t))(mr||{}),hr=(t=>(t.Active="active",t.Inactive="inactive",t))(hr||{});const ed={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"}}]}}]}}]}}]},td={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"}}]}}]}}]}}]},nd={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"}}]}}]}}]}}]},id={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"}}]}}]}}]}}]},ad={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"}}]}}]}}]}}]},rd={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"}}]}}]}}]}}]},sd={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"}}]}}]}}]}}]},od={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"}}]}}]}}]}}]},ld={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"}}]}}]}}]}}]},ud={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"}}]}}]}}]}}]},dd={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"}}]}}]}}]}}]},cd={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"}}]}}]}}]}}]},fd={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"}}]}}]}}]}}]},md={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"}}]}}]}}]}}]},hd={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"}}]}}]}}]}}]},pd={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"}}]}}]}}]}}]},vd={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"}}]}}]}}]}}]},gd={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"}}]}}]}}]}}]},kd={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"}}]}}]}}]}}]},yd={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"}}]}}]}}]}}]},bd={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"}}]}}]}}]}}]},Sd={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"}}]}}]}}]}}]},_d={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"}}]}}]}}]}}]},Nd={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"}}]}}]}}]}}]},Od={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"}}]}}]}}]}}]},wd={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"}}]}}]}}]}}]}}]},Fd={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"}}]}}]}}]}}]},Ad={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"}}]}}]}}]}}]},Ed=Object.freeze(Object.defineProperty({__proto__:null,AddCollectionDocument:ed,AppendProductsToSnackVideoDocument:yd,BlockUserDocument:ud,ChangeAccountUsernameDocument:dd,CreateSnackVideoBatchDocument:bd,DeleteAllCustomizationDocument:pd,DeleteChatMessageDocument:cd,DeleteCollectionDocument:td,DeleteRelationshipWithSnackVideoDocument:Sd,DeleteSnackVideoDocument:_d,EventStatus:fr,FindByProductSnackVideoDocument:Ad,FindCollectionDocument:nd,FindManySnackVideosDocument:Nd,FindMinimalEventDocument:od,GetAllChatMessageDocument:fd,GetAllCollectionsDocument:id,GetAllCustomizationDocument:vd,GetAllSnackVideosDocument:Od,GetChatRoomTokenDocument:md,GetSnackVideoRelationshipsDocument:wd,GetTimeLineDocument:kd,ManageCollectionProductDocument:ad,Methods:mr,PinChatMessageDocument:hd,SearchCollectionsDocument:rd,SearchMinimalEventsDocument:ld,SearchSnackVideosDocument:Fd,Status:hr,UpdateCollectionDocument:sd,UpdateCustomizationDocument:gd},Symbol.toStringTag,{value:"Module"}));function Cd(t){return{class:t,_value:null,get value(){return this._value||(this._value=new t,Object.freeze(this)),this._value}}}exports.AccountContractStatusTypes=xn;exports.AccountContractTypes=Ba;exports.AccountInvalidError=Ho;exports.AccountPlanDescriptionTypes=Ka;exports.AccountRestRepository=Qa;exports.AccountService=qa;exports.AccountSubscriptionTypes=za;exports.AccountTypes=Rn;exports.AggregateRoot=Ma;exports.ApiGraphqlTypes=Ed;exports.BaseMobxStore=ul;exports.BroadcastChannelEventBus=Aa;exports.DomainError=ot;exports.EventBusWildcards=ru;exports.EventNames=su;exports.GlobalPageSectionTypes=Ga;exports.InvalidNizzaGlobalObjectError=Va;exports.LanguageTypes=tr;exports.Logger=Pa;exports.NizzaAccount=Kt;exports.NizzaEventStatus=er;exports.NizzaProductRequestOriginTypes=ir;exports.NizzaStore=Xe;exports.NizzaVariationTypes=nr;exports.ResourceNotFoundError=La;exports.StoreProvider=Zu;exports.UnexpectedError=Ia;exports.ValueObject=dl;exports.accountAtom=Pt;exports.accountService=Tn;exports.apiCall=Ur;exports.buildLanguageTranslations=ar;exports.buildTranslations=rr;exports.coreLogger=xe;exports.createAggregateRoot=$a;exports.createStore=Cd;exports.customFetch=gn;exports.downloadFile=Mr;exports.fileOrigin=Io;exports.getAccount=Ya;exports.getClientTimeZone=ll;exports.getStore=Yu;exports.globalAtomStore=Xa;exports.i18Init=ur;exports.jsDownload=Ri;exports.logger=jo;exports.nizza=En;exports.registerTranslations=Ju;exports.registerTranslationsOf=sr;exports.searchParams=Lo;exports.shortId=Ea;exports.useAccount=au;exports.useNizza=Ua;exports.useStore=Xu;exports.validateRequiredProps=Jo;
39
33
  //# sourceMappingURL=index.cjs.map