@nizza/core 0.6.7-beta.0 → 0.6.7

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,4 +1,4 @@
1
- "use strict";var du=Object.defineProperty;var fu=(t,e,n)=>e in t?du(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var F=(t,e,n)=>fu(t,typeof e!="symbol"?e+"":e,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const M=require("react"),hu=require("react/jsx-runtime"),pu=require("react-dom");function mu(t,e){for(var n=0;n<e.length;n++){const i=e[n];if(typeof i!="string"&&!Array.isArray(i)){for(const r in i)if(r!=="default"&&!(r in t)){const s=Object.getOwnPropertyDescriptor(i,r);s&&Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>i[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}const ge={BASE_URL:"/",DEV:!1,MODE:"production",NZ_AWS_REGION:"us-east-1",PROD:!0,SSR:!1,STAGE:"dev"};let gu=0;function Wn(t,e){const n=`atom${++gu}`,i={toString(){return(ge?"production":void 0)!=="production"&&this.debugLabel?n+":"+this.debugLabel:n}};return typeof t=="function"?i.read=t:(i.init=t,i.read=vu,i.write=ku),i}function vu(t){return t(this)}function ku(t,e,n){return e(this,typeof n=="function"?n(t(this)):n)}const rs=(t,e)=>t.unstable_is?t.unstable_is(e):e===t,Ai=t=>"init"in t,Oi=t=>!!t.write,Tn=new WeakMap,Qi=t=>{var e;return Xi(t)&&!((e=Tn.get(t))!=null&&e[1])},yu=(t,e)=>{const n=Tn.get(t);if(n)n[1]=!0,n[0].forEach(i=>i(e));else if((ge?"production":void 0)!=="production")throw new Error("[Bug] cancelable promise not found")},_u=t=>{if(Tn.has(t))return;const e=[new Set,!1];Tn.set(t,e);const n=()=>{e[1]=!0};t.then(n,n),t.onCancel=i=>{e[0].add(i)}},Xi=t=>typeof(t==null?void 0:t.then)=="function",ss=t=>"v"in t||"e"in t,hn=t=>{if("e"in t)throw t.e;if((ge?"production":void 0)!=="production"&&!("v"in t))throw new Error("[Bug] atom state is not initialized");return t.v},Aa=(t,e,n)=>{n.p.has(t)||(n.p.add(t),e.then(()=>{n.p.delete(t)},()=>{n.p.delete(t)}))},as=(t,e,n,i,r)=>{var s;if((ge?"production":void 0)!=="production"&&i===e)throw new Error("[Bug] atom cannot depend on itself");n.d.set(i,r.n),Qi(n.v)&&Aa(e,n.v,r),(s=r.m)==null||s.t.add(e),t&&bu(t,i,e)},ct=()=>[new Map,new Map,new Set],wi=(t,e,n)=>{t[0].has(e)||t[0].set(e,new Set),t[1].set(e,n)},bu=(t,e,n)=>{const i=t[0].get(e);i&&i.add(n)},Su=(t,e)=>t[0].get(e),os=(t,e)=>{t[2].add(e)},Ke=t=>{for(;t[1].size||t[2].size;){t[0].clear();const e=new Set(t[1].values());t[1].clear();const n=new Set(t[2]);t[2].clear(),e.forEach(i=>{var r;return(r=i.m)==null?void 0:r.l.forEach(s=>s())}),n.forEach(i=>i())}},Oa=t=>{let e;(ge?"production":void 0)!=="production"&&(e=new Set);const n=(m,p,h)=>{const _="v"in p,N=p.v,b=Qi(p.v)?p.v:null;if(Xi(h)){_u(h);for(const E of p.d.keys())Aa(m,h,t(E,p));p.v=h,delete p.e}else p.v=h,delete p.e;(!_||!Object.is(N,p.v))&&(++p.n,b&&yu(b,h))},i=(m,p,h,_)=>{var N;if(!(_!=null&&_(p))&&ss(h)&&(h.m||Array.from(h.d).every(([D,q])=>i(m,D,t(D,h),_).n===q)))return h;h.d.clear();let b=!0;const E=D=>{if(rs(p,D)){const C=t(D,h);if(!ss(C))if(Ai(D))n(D,C,D.init);else throw new Error("no atom init");return hn(C)}const q=i(m,D,t(D,h),_);if(b)as(m,p,h,D,q);else{const C=ct();as(C,p,h,D,q),u(C,p,h),Ke(C)}return hn(q)};let O,x;const R={get signal(){return O||(O=new AbortController),O.signal},get setSelf(){return(ge?"production":void 0)!=="production"&&!Oi(p)&&console.warn("setSelf function cannot be used with read-only atom"),!x&&Oi(p)&&(x=(...D)=>{if((ge?"production":void 0)!=="production"&&b&&console.warn("setSelf function cannot be called in sync"),!b)return l(p,...D)}),x}};try{const D=p.read(E,R);if(n(p,h,D),Xi(D)){(N=D.onCancel)==null||N.call(D,()=>O==null?void 0:O.abort());const q=()=>{if(h.m){const C=ct();u(C,p,h),Ke(C)}};D.then(q,q)}return h}catch(D){return delete h.v,h.e=D,++h.n,h}finally{b=!1}},r=m=>hn(i(void 0,m,t(m))),s=(m,p,h)=>{var _,N;const b=new Map;for(const E of((_=h.m)==null?void 0:_.t)||[])b.set(E,t(E,h));for(const E of h.p)b.set(E,t(E,h));return(N=Su(m,p))==null||N.forEach(E=>{b.set(E,t(E,h))}),b},a=(m,p,h)=>{const _=[],N=new Set,b=(x,R)=>{if(!N.has(x)){N.add(x);for(const[D,q]of s(m,x,R))x!==D&&b(D,q);_.push([x,R,R.n])}};b(p,h);const E=new Set([p]),O=x=>N.has(x);for(let x=_.length-1;x>=0;--x){const[R,D,q]=_[x];let C=!1;for(const z of D.d.keys())if(z!==R&&E.has(z)){C=!0;break}C&&(i(m,R,D,O),u(m,R,D),q!==D.n&&(wi(m,R,D),E.add(R))),N.delete(R)}},o=(m,p,h,..._)=>{const N=O=>hn(i(m,O,t(O,h))),b=(O,...x)=>{const R=t(O,h);let D;if(rs(p,O)){if(!Ai(O))throw new Error("atom not writable");const q="v"in R,C=R.v,z=x[0];n(O,R,z),u(m,O,R),(!q||!Object.is(C,R.v))&&(wi(m,O,R),a(m,O,R))}else D=o(m,O,R,...x);return Ke(m),D};return p.write(N,b,..._)},l=(m,...p)=>{const h=ct(),_=o(h,m,t(m),...p);return Ke(h),_},u=(m,p,h)=>{if(h.m&&!Qi(h.v)){for(const _ of h.d.keys())h.m.d.has(_)||(c(m,_,t(_,h)).t.add(p),h.m.d.add(_));for(const _ of h.m.d||[])if(!h.d.has(_)){h.m.d.delete(_);const N=d(m,_,t(_,h));N==null||N.t.delete(p)}}},c=(m,p,h)=>{if(!h.m){i(m,p,h);for(const _ of h.d.keys())c(m,_,t(_,h)).t.add(p);if(h.m={l:new Set,d:new Set(h.d.keys()),t:new Set},(ge?"production":void 0)!=="production"&&e.add(p),Oi(p)&&p.onMount){const _=h.m,{onMount:N}=p;os(m,()=>{const b=N((...E)=>o(m,p,h,...E));b&&(_.u=b)})}}return h.m},d=(m,p,h)=>{if(h.m&&!h.m.l.size&&!Array.from(h.m.t).some(_=>{var N;return(N=t(_,h).m)==null?void 0:N.d.has(p)})){const _=h.m.u;_&&os(m,_),delete h.m,(ge?"production":void 0)!=="production"&&e.delete(p);for(const N of h.d.keys()){const b=d(m,N,t(N,h));b==null||b.t.delete(p)}return}return h.m},g={get:r,set:l,sub:(m,p)=>{const h=ct(),_=t(m),N=c(h,m,_);Ke(h);const b=N.l;return b.add(p),()=>{b.delete(p);const E=ct();d(E,m,_),Ke(E)}},unstable_derive:m=>Oa(...m(t))};return(ge?"production":void 0)!=="production"&&Object.assign(g,{dev4_get_internal_weak_map:()=>({get:p=>{const h=t(p);if(h.n!==0)return h}}),dev4_get_mounted_atoms:()=>e,dev4_restore_atoms:p=>{const h=ct();for(const[_,N]of p)if(Ai(_)){const b=t(_),E="v"in b,O=b.v;n(_,b,N),u(h,_,b),(!E||!Object.is(O,b.v))&&(wi(h,_,b),a(h,_,b))}Ke(h)}}),g},Nu=()=>{const t=new WeakMap;return Oa(n=>{let i=t.get(n);return i||(i={d:new Map,p:new Set,n:0},t.set(n,i)),i})};let Dt;const Eu=()=>(Dt||(Dt=Nu(),(ge?"production":void 0)!=="production"&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=Dt),globalThis.__JOTAI_DEFAULT_STORE__!==Dt&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),Dt),wa={BASE_URL:"/",DEV:!1,MODE:"production",NZ_AWS_REGION:"us-east-1",PROD:!0,SSR:!1,STAGE:"dev"},Au=M.createContext(void 0),Ta=t=>M.useContext(Au)||Eu(),Ca=t=>typeof(t==null?void 0:t.then)=="function",Ou=t=>{t.status="pending",t.then(e=>{t.status="fulfilled",t.value=e},e=>{t.status="rejected",t.reason=e})},wu=M.use||(t=>{if(t.status==="pending")throw t;if(t.status==="fulfilled")return t.value;throw t.status==="rejected"?t.reason:(Ou(t),t)}),Ti=new WeakMap,Tu=t=>{let e=Ti.get(t);return e||(e=new Promise((n,i)=>{let r=t;const s=l=>u=>{r===l&&n(u)},a=l=>u=>{r===l&&i(u)},o=l=>{"onCancel"in l&&typeof l.onCancel=="function"&&l.onCancel(u=>{if((wa?"production":void 0)!=="production"&&u===l)throw new Error("[Bug] p is not updated even after cancelation");Ca(u)?(Ti.set(u,e),r=u,u.then(s(u),a(u)),o(u)):n(u)})};t.then(s(t),a(t)),o(t)}),Ti.set(t,e)),e};function Zi(t,e){const n=Ta(),[[i,r,s],a]=M.useReducer(u=>{const c=n.get(t);return Object.is(u[0],c)&&u[1]===n&&u[2]===t?u:[c,n,t]},void 0,()=>[n.get(t),n,t]);let o=i;if((r!==n||s!==t)&&(a(),o=n.get(t)),M.useEffect(()=>{const u=n.sub(t,()=>{a()});return a(),u},[n,t,void 0]),M.useDebugValue(o),Ca(o)){const u=Tu(o);return wu(u)}return o}function xr(t,e){const n=Ta();return M.useCallback((...r)=>{if((wa?"production":void 0)!=="production"&&!("write"in t))throw new Error("not writable atom");return n.set(t,...r)},[n,t])}function Ci(t,e){return[Zi(t),xr(t)]}const xa=Wn(null);xa.debugLabel="accountAtom";const Cu={BASE_URL:"/",DEV:!1,MODE:"production",NZ_AWS_REGION:"us-east-1",PROD:!0,SSR:!1,STAGE:"dev"},{NZ_AWS_REGION:xu,NZ_BACKOFFICE_BACK_URL:Ru,NZ_CORE_SERVICES_GRAPHQL_URL:Fu,NZ_CORE_SERVICES_REST_URL:Du}=Cu,rn={AWS:{region:xu,cognito:{userPoolId:"us-east-1_knSlGEmJ0",userPoolWebClientId:"3hmbfhf7nl3kq20qr9i5lihf1p"}},apiUrls:{restV1:Ru||"https://pabprg32bj.execute-api.us-east-1.amazonaws.com",restV2:Du||"https://core-services-dev.nizza.com/api",graphql:Fu||"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",globalPage:"https://live-dev.nizza.com"}};function Iu(t,e){let n=null;const i=()=>{n||(n=e().log.createLogger(t))},r=(a,o)=>typeof a[o]=="function",s={get(a,o,l){i();const u=c=>(...d)=>{if(!n)return;const f=n[c];if(typeof f=="function")return f.apply(n,d)};return n&&r(n,o)?u(o):n?n[o]:void 0}};return new Proxy({},s)}function mt(t){return t!=null&&typeof t=="object"&&t["@@functional/placeholder"]===!0}function _n(t){return function e(n){return arguments.length===0||mt(n)?e:t.apply(this,arguments)}}function Pu(t){return function e(n,i){switch(arguments.length){case 0:return e;case 1:return mt(n)?e:_n(function(r){return t(n,r)});default:return mt(n)&&mt(i)?e:mt(n)?_n(function(r){return t(r,i)}):mt(i)?_n(function(r){return t(n,r)}):t(n,i)}}}const Lu=Number.isInteger||function(e){return e<<0===e};function $u(t){return Object.prototype.toString.call(t)==="[object String]"}function Mu(t,e){var n=t<0?e.length+t:t;return $u(e)?e.charAt(n):e[n]}var Uu=_n(function(e){return e==null});function Vu(t,e){for(var n=e,i=0;i<t.length;i+=1){if(n==null)return;var r=t[i];Lu(r)?n=Mu(r,n):n=n[r]}return n}var ju=Pu(Vu);class rt extends Error{constructor(e,n,i){super(n),this.value=i,this.name=e,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toDTO(){return{name:this.name,message:this.message,...this.value&&{value:this.value},...this.stack&&{stack:this.formatStack()}}}formatStack(){return this.stack?this.stack.split(`
1
+ "use strict";var du=Object.defineProperty;var fu=(t,e,n)=>e in t?du(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var F=(t,e,n)=>fu(t,typeof e!="symbol"?e+"":e,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const M=require("react"),hu=require("react/jsx-runtime"),pu=require("react-dom");function mu(t,e){for(var n=0;n<e.length;n++){const i=e[n];if(typeof i!="string"&&!Array.isArray(i)){for(const r in i)if(r!=="default"&&!(r in t)){const s=Object.getOwnPropertyDescriptor(i,r);s&&Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>i[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}const ge={BASE_URL:"/",DEV:!1,MODE:"production",NZ_AWS_REGION:"us-east-1",PROD:!0,SSR:!1,STAGE:"prod"};let gu=0;function Wn(t,e){const n=`atom${++gu}`,i={toString(){return(ge?"production":void 0)!=="production"&&this.debugLabel?n+":"+this.debugLabel:n}};return typeof t=="function"?i.read=t:(i.init=t,i.read=vu,i.write=ku),i}function vu(t){return t(this)}function ku(t,e,n){return e(this,typeof n=="function"?n(t(this)):n)}const rs=(t,e)=>t.unstable_is?t.unstable_is(e):e===t,Ai=t=>"init"in t,Oi=t=>!!t.write,Tn=new WeakMap,Qi=t=>{var e;return Xi(t)&&!((e=Tn.get(t))!=null&&e[1])},yu=(t,e)=>{const n=Tn.get(t);if(n)n[1]=!0,n[0].forEach(i=>i(e));else if((ge?"production":void 0)!=="production")throw new Error("[Bug] cancelable promise not found")},_u=t=>{if(Tn.has(t))return;const e=[new Set,!1];Tn.set(t,e);const n=()=>{e[1]=!0};t.then(n,n),t.onCancel=i=>{e[0].add(i)}},Xi=t=>typeof(t==null?void 0:t.then)=="function",ss=t=>"v"in t||"e"in t,hn=t=>{if("e"in t)throw t.e;if((ge?"production":void 0)!=="production"&&!("v"in t))throw new Error("[Bug] atom state is not initialized");return t.v},Aa=(t,e,n)=>{n.p.has(t)||(n.p.add(t),e.then(()=>{n.p.delete(t)},()=>{n.p.delete(t)}))},as=(t,e,n,i,r)=>{var s;if((ge?"production":void 0)!=="production"&&i===e)throw new Error("[Bug] atom cannot depend on itself");n.d.set(i,r.n),Qi(n.v)&&Aa(e,n.v,r),(s=r.m)==null||s.t.add(e),t&&bu(t,i,e)},ct=()=>[new Map,new Map,new Set],wi=(t,e,n)=>{t[0].has(e)||t[0].set(e,new Set),t[1].set(e,n)},bu=(t,e,n)=>{const i=t[0].get(e);i&&i.add(n)},Su=(t,e)=>t[0].get(e),os=(t,e)=>{t[2].add(e)},Ke=t=>{for(;t[1].size||t[2].size;){t[0].clear();const e=new Set(t[1].values());t[1].clear();const n=new Set(t[2]);t[2].clear(),e.forEach(i=>{var r;return(r=i.m)==null?void 0:r.l.forEach(s=>s())}),n.forEach(i=>i())}},Oa=t=>{let e;(ge?"production":void 0)!=="production"&&(e=new Set);const n=(m,p,h)=>{const _="v"in p,N=p.v,b=Qi(p.v)?p.v:null;if(Xi(h)){_u(h);for(const E of p.d.keys())Aa(m,h,t(E,p));p.v=h,delete p.e}else p.v=h,delete p.e;(!_||!Object.is(N,p.v))&&(++p.n,b&&yu(b,h))},i=(m,p,h,_)=>{var N;if(!(_!=null&&_(p))&&ss(h)&&(h.m||Array.from(h.d).every(([D,z])=>i(m,D,t(D,h),_).n===z)))return h;h.d.clear();let b=!0;const E=D=>{if(rs(p,D)){const C=t(D,h);if(!ss(C))if(Ai(D))n(D,C,D.init);else throw new Error("no atom init");return hn(C)}const z=i(m,D,t(D,h),_);if(b)as(m,p,h,D,z);else{const C=ct();as(C,p,h,D,z),u(C,p,h),Ke(C)}return hn(z)};let O,x;const R={get signal(){return O||(O=new AbortController),O.signal},get setSelf(){return(ge?"production":void 0)!=="production"&&!Oi(p)&&console.warn("setSelf function cannot be used with read-only atom"),!x&&Oi(p)&&(x=(...D)=>{if((ge?"production":void 0)!=="production"&&b&&console.warn("setSelf function cannot be called in sync"),!b)return l(p,...D)}),x}};try{const D=p.read(E,R);if(n(p,h,D),Xi(D)){(N=D.onCancel)==null||N.call(D,()=>O==null?void 0:O.abort());const z=()=>{if(h.m){const C=ct();u(C,p,h),Ke(C)}};D.then(z,z)}return h}catch(D){return delete h.v,h.e=D,++h.n,h}finally{b=!1}},r=m=>hn(i(void 0,m,t(m))),s=(m,p,h)=>{var _,N;const b=new Map;for(const E of((_=h.m)==null?void 0:_.t)||[])b.set(E,t(E,h));for(const E of h.p)b.set(E,t(E,h));return(N=Su(m,p))==null||N.forEach(E=>{b.set(E,t(E,h))}),b},a=(m,p,h)=>{const _=[],N=new Set,b=(x,R)=>{if(!N.has(x)){N.add(x);for(const[D,z]of s(m,x,R))x!==D&&b(D,z);_.push([x,R,R.n])}};b(p,h);const E=new Set([p]),O=x=>N.has(x);for(let x=_.length-1;x>=0;--x){const[R,D,z]=_[x];let C=!1;for(const q of D.d.keys())if(q!==R&&E.has(q)){C=!0;break}C&&(i(m,R,D,O),u(m,R,D),z!==D.n&&(wi(m,R,D),E.add(R))),N.delete(R)}},o=(m,p,h,..._)=>{const N=O=>hn(i(m,O,t(O,h))),b=(O,...x)=>{const R=t(O,h);let D;if(rs(p,O)){if(!Ai(O))throw new Error("atom not writable");const z="v"in R,C=R.v,q=x[0];n(O,R,q),u(m,O,R),(!z||!Object.is(C,R.v))&&(wi(m,O,R),a(m,O,R))}else D=o(m,O,R,...x);return Ke(m),D};return p.write(N,b,..._)},l=(m,...p)=>{const h=ct(),_=o(h,m,t(m),...p);return Ke(h),_},u=(m,p,h)=>{if(h.m&&!Qi(h.v)){for(const _ of h.d.keys())h.m.d.has(_)||(c(m,_,t(_,h)).t.add(p),h.m.d.add(_));for(const _ of h.m.d||[])if(!h.d.has(_)){h.m.d.delete(_);const N=d(m,_,t(_,h));N==null||N.t.delete(p)}}},c=(m,p,h)=>{if(!h.m){i(m,p,h);for(const _ of h.d.keys())c(m,_,t(_,h)).t.add(p);if(h.m={l:new Set,d:new Set(h.d.keys()),t:new Set},(ge?"production":void 0)!=="production"&&e.add(p),Oi(p)&&p.onMount){const _=h.m,{onMount:N}=p;os(m,()=>{const b=N((...E)=>o(m,p,h,...E));b&&(_.u=b)})}}return h.m},d=(m,p,h)=>{if(h.m&&!h.m.l.size&&!Array.from(h.m.t).some(_=>{var N;return(N=t(_,h).m)==null?void 0:N.d.has(p)})){const _=h.m.u;_&&os(m,_),delete h.m,(ge?"production":void 0)!=="production"&&e.delete(p);for(const N of h.d.keys()){const b=d(m,N,t(N,h));b==null||b.t.delete(p)}return}return h.m},g={get:r,set:l,sub:(m,p)=>{const h=ct(),_=t(m),N=c(h,m,_);Ke(h);const b=N.l;return b.add(p),()=>{b.delete(p);const E=ct();d(E,m,_),Ke(E)}},unstable_derive:m=>Oa(...m(t))};return(ge?"production":void 0)!=="production"&&Object.assign(g,{dev4_get_internal_weak_map:()=>({get:p=>{const h=t(p);if(h.n!==0)return h}}),dev4_get_mounted_atoms:()=>e,dev4_restore_atoms:p=>{const h=ct();for(const[_,N]of p)if(Ai(_)){const b=t(_),E="v"in b,O=b.v;n(_,b,N),u(h,_,b),(!E||!Object.is(O,b.v))&&(wi(h,_,b),a(h,_,b))}Ke(h)}}),g},Nu=()=>{const t=new WeakMap;return Oa(n=>{let i=t.get(n);return i||(i={d:new Map,p:new Set,n:0},t.set(n,i)),i})};let Dt;const Eu=()=>(Dt||(Dt=Nu(),(ge?"production":void 0)!=="production"&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=Dt),globalThis.__JOTAI_DEFAULT_STORE__!==Dt&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),Dt),wa={BASE_URL:"/",DEV:!1,MODE:"production",NZ_AWS_REGION:"us-east-1",PROD:!0,SSR:!1,STAGE:"prod"},Au=M.createContext(void 0),Ta=t=>M.useContext(Au)||Eu(),Ca=t=>typeof(t==null?void 0:t.then)=="function",Ou=t=>{t.status="pending",t.then(e=>{t.status="fulfilled",t.value=e},e=>{t.status="rejected",t.reason=e})},wu=M.use||(t=>{if(t.status==="pending")throw t;if(t.status==="fulfilled")return t.value;throw t.status==="rejected"?t.reason:(Ou(t),t)}),Ti=new WeakMap,Tu=t=>{let e=Ti.get(t);return e||(e=new Promise((n,i)=>{let r=t;const s=l=>u=>{r===l&&n(u)},a=l=>u=>{r===l&&i(u)},o=l=>{"onCancel"in l&&typeof l.onCancel=="function"&&l.onCancel(u=>{if((wa?"production":void 0)!=="production"&&u===l)throw new Error("[Bug] p is not updated even after cancelation");Ca(u)?(Ti.set(u,e),r=u,u.then(s(u),a(u)),o(u)):n(u)})};t.then(s(t),a(t)),o(t)}),Ti.set(t,e)),e};function Zi(t,e){const n=Ta(),[[i,r,s],a]=M.useReducer(u=>{const c=n.get(t);return Object.is(u[0],c)&&u[1]===n&&u[2]===t?u:[c,n,t]},void 0,()=>[n.get(t),n,t]);let o=i;if((r!==n||s!==t)&&(a(),o=n.get(t)),M.useEffect(()=>{const u=n.sub(t,()=>{a()});return a(),u},[n,t,void 0]),M.useDebugValue(o),Ca(o)){const u=Tu(o);return wu(u)}return o}function xr(t,e){const n=Ta();return M.useCallback((...r)=>{if((wa?"production":void 0)!=="production"&&!("write"in t))throw new Error("not writable atom");return n.set(t,...r)},[n,t])}function Ci(t,e){return[Zi(t),xr(t)]}const xa=Wn(null);xa.debugLabel="accountAtom";const Cu={BASE_URL:"/",DEV:!1,MODE:"production",NZ_AWS_REGION:"us-east-1",PROD:!0,SSR:!1,STAGE:"prod"},{NZ_AWS_REGION:xu,NZ_BACKOFFICE_BACK_URL:Ru,NZ_CORE_SERVICES_GRAPHQL_URL:Fu,NZ_CORE_SERVICES_REST_URL:Du}=Cu,rn={AWS:{region:xu,cognito:{userPoolId:"us-east-1_EZ7wuZ4ig",userPoolWebClientId:"2jok7cst8ebf6ppscrhji57gvr"}},apiUrls:{restV1:Ru||"https://b133h34s56.execute-api.us-east-1.amazonaws.com",restV2:Du||"https://core-services-prod.nizza.com/api",graphql:Fu||"https://core-services-prod.nizza.com/graphql",corsProxy:"https://3hvqfl2xcg.execute-api.us-east-1.amazonaws.com"},publicUrls:{platformSite:"https://platform.nizza.com",nizzaCdn:"https://cdn.nizza.com",bundleSite:"https://bundle.nizza.com",wssIVSChat:"wss://edge.ivschat.us-east-1.amazonaws.com",globalPage:"https://live.nizza.com"}};function Iu(t,e){let n=null;const i=()=>{n||(n=e().log.createLogger(t))},r=(a,o)=>typeof a[o]=="function",s={get(a,o,l){i();const u=c=>(...d)=>{if(!n)return;const f=n[c];if(typeof f=="function")return f.apply(n,d)};return n&&r(n,o)?u(o):n?n[o]:void 0}};return new Proxy({},s)}function mt(t){return t!=null&&typeof t=="object"&&t["@@functional/placeholder"]===!0}function _n(t){return function e(n){return arguments.length===0||mt(n)?e:t.apply(this,arguments)}}function Pu(t){return function e(n,i){switch(arguments.length){case 0:return e;case 1:return mt(n)?e:_n(function(r){return t(n,r)});default:return mt(n)&&mt(i)?e:mt(n)?_n(function(r){return t(r,i)}):mt(i)?_n(function(r){return t(n,r)}):t(n,i)}}}const Lu=Number.isInteger||function(e){return e<<0===e};function $u(t){return Object.prototype.toString.call(t)==="[object String]"}function Mu(t,e){var n=t<0?e.length+t:t;return $u(e)?e.charAt(n):e[n]}var Uu=_n(function(e){return e==null});function Vu(t,e){for(var n=e,i=0;i<t.length;i+=1){if(n==null)return;var r=t[i];Lu(r)?n=Mu(r,n):n=n[r]}return n}var ju=Pu(Vu);class rt extends Error{constructor(e,n,i){super(n),this.value=i,this.name=e,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toDTO(){return{name:this.name,message:this.message,...this.value&&{value:this.value},...this.stack&&{stack:this.formatStack()}}}formatStack(){return this.stack?this.stack.split(`
2
2
  `).map(e=>e.trim()).join(" | "):""}}class er extends rt{constructor(e){super("RESOURCE_NOT_FOUND_ERROR",`Resource with id '${e}' not found.`,e)}}class Rr extends rt{constructor(e){var n;super("APP_UNEXPECTED_ERROR",(n=e.message)!=null?n:"An unexpected error occurred.",e)}}class Ra extends rt{constructor(){super("APP_ACCOUNT_INVALID_ERROR","Account not defined")}}class Fa extends rt{constructor(e){super("INVALID_NIZZA_GLOBAL_OBJECT_ERROR",`
3
3
  Configuration property invalid: "${e}".
4
4
 
@@ -21,15 +21,15 @@
21
21
  account: env.account,
22
22
  ...
23
23
  });
24
- `)}}function Bu(t,e){e.forEach(n=>{if(Uu(ju(n.split("."),t)))throw new Fa(n)})}function B(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 Hu={};function Da(){return typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:Hu}var Ia=Object.assign,Cn=Object.getOwnPropertyDescriptor,Oe=Object.defineProperty,Jn=Object.prototype,tr=[];Object.freeze(tr);var Fr={};Object.freeze(Fr);var qu=typeof Proxy!="undefined",zu=Object.toString();function Pa(){qu||B("Proxy not available")}function La(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var vt=function(){};function ye(t){return typeof t=="function"}function Ze(t){var e=typeof t;switch(e){case"string":case"symbol":case"number":return!0}return!1}function Yn(t){return t!==null&&typeof t=="object"}function He(t){if(!Yn(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()===zu}function $a(t){var e=t==null?void 0:t.constructor;return e?e.name==="GeneratorFunction"||e.displayName==="GeneratorFunction":!1}function Qn(t,e,n){Oe(t,e,{enumerable:!1,writable:!0,configurable:!0,value:n})}function Ma(t,e,n){Oe(t,e,{enumerable:!1,writable:!1,configurable:!0,value:n})}function st(t,e){var n="isMobX"+t;return e.prototype[n]=!0,function(i){return Yn(i)&&i[n]===!0}}function At(t){return t!=null&&Object.prototype.toString.call(t)==="[object Map]"}function Gu(t){var e=Object.getPrototypeOf(t),n=Object.getPrototypeOf(e),i=Object.getPrototypeOf(n);return i===null}function Ce(t){return t!=null&&Object.prototype.toString.call(t)==="[object Set]"}var Ua=typeof Object.getOwnPropertySymbols!="undefined";function Ku(t){var e=Object.keys(t);if(!Ua)return e;var n=Object.getOwnPropertySymbols(t);return n.length?[].concat(e,n.filter(function(i){return Jn.propertyIsEnumerable.call(t,i)})):e}var Xn=typeof Reflect!="undefined"&&Reflect.ownKeys?Reflect.ownKeys:Ua?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames;function Va(t){return t===null?null:typeof t=="object"?""+t:t}function Re(t,e){return Jn.hasOwnProperty.call(t,e)}var Wu=Object.getOwnPropertyDescriptors||function(e){var n={};return Xn(e).forEach(function(i){n[i]=Cn(e,i)}),n};function ae(t,e){return!!(t&e)}function oe(t,e,n){return n?t|=e:t&=~e,t}function ls(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function Ju(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,Qu(i.key),i)}}function Ot(t,e,n){return e&&Ju(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function kt(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=Xu(t))||e){n&&(t=n);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
25
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qe(){return qe=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},qe.apply(null,arguments)}function ja(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,nr(t,e)}function nr(t,e){return nr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},nr(t,e)}function Yu(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function Qu(t){var e=Yu(t,"string");return typeof e=="symbol"?e:e+""}function Xu(t,e){if(t){if(typeof t=="string")return ls(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ls(t,e):void 0}}var Ee=Symbol("mobx-stored-annotations");function we(t){function e(n,i){if(sn(i))return t.decorate_20223_(n,i);wt(n,i,t)}return Object.assign(e,t)}function wt(t,e,n){Re(t,Ee)||Qn(t,Ee,qe({},t[Ee])),oc(n)||(t[Ee][e]=n)}function Zu(t){return Re(t,Ee)||Qn(t,Ee,qe({},t[Ee])),t[Ee]}function sn(t){return typeof t=="object"&&typeof t.kind=="string"}var P=Symbol("mobx administration"),Ge=function(){function t(n){n===void 0&&(n="Atom"),this.name_=void 0,this.flags_=0,this.observers_=new Set,this.lastAccessedBy_=0,this.lowestObserverState_=j.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 io(this)},e.reportChanged=function(){he(),ro(this),pe()},e.toString=function(){return this.name_},Ot(t,[{key:"isBeingObserved",get:function(){return ae(this.flags_,t.isBeingObservedMask_)},set:function(i){this.flags_=oe(this.flags_,t.isBeingObservedMask_,i)}},{key:"isPendingUnobservation",get:function(){return ae(this.flags_,t.isPendingUnobservationMask_)},set:function(i){this.flags_=oe(this.flags_,t.isPendingUnobservationMask_,i)}},{key:"diffValue",get:function(){return ae(this.flags_,t.diffValueMask_)?1:0},set:function(i){this.flags_=oe(this.flags_,t.diffValueMask_,i===1)}}])}();Ge.isBeingObservedMask_=1;Ge.isPendingUnobservationMask_=2;Ge.diffValueMask_=4;var Dr=st("Atom",Ge);function Ba(t,e,n){e===void 0&&(e=vt),n===void 0&&(n=vt);var i=new Ge(t);return e!==vt&&cd(i,e),n!==vt&&co(i,n),i}function ec(t,e){return t===e}function tc(t,e){return Mr(t,e)}function nc(t,e){return Mr(t,e,1)}function ic(t,e){return Object.is?Object.is(t,e):t===e?t!==0||1/t===1/e:t!==t&&e!==e}var _t={identity:ec,structural:tc,default:ic,shallow:nc};function et(t,e,n){return po(t)?t:Array.isArray(t)?W.array(t,{name:n}):He(t)?W.object(t,void 0,{name:n}):At(t)?W.map(t,{name:n}):Ce(t)?W.set(t,{name:n}):typeof t=="function"&&!ri(t)&&!Jt(t)?$a(t)?bt(t):Wt(n,t):t}function rc(t,e,n){if(t==null||oi(t)||ai(t)||ot(t)||Tt(t))return t;if(Array.isArray(t))return W.array(t,{name:n,deep:!1});if(He(t))return W.object(t,void 0,{name:n,deep:!1});if(At(t))return W.map(t,{name:n,deep:!1});if(Ce(t))return W.set(t,{name:n,deep:!1})}function Zn(t){return t}function sc(t,e){return Mr(t,e)?e:t}var ac="override";function oc(t){return t.annotationType_===ac}function an(t,e){return{annotationType_:t,options_:e,make_:lc,extend_:uc,decorate_20223_:cc}}function lc(t,e,n,i){var r;if((r=this.options_)!=null&&r.bound)return this.extend_(t,e,n,!1)===null?0:1;if(i===t.target_)return this.extend_(t,e,n,!1)===null?0:2;if(ri(n.value))return 1;var s=Ha(t,this,e,n,!1);return Oe(i,e,s),2}function uc(t,e,n,i){var r=Ha(t,this,e,n);return t.defineProperty_(e,r,i)}function cc(t,e){var n=e.kind,i=e.name,r=e.addInitializer,s=this,a=function(u){var c,d,f,v;return ze((c=(d=s.options_)==null?void 0:d.name)!=null?c:i.toString(),u,(f=(v=s.options_)==null?void 0:v.autoAction)!=null?f:!1)};if(n=="field"){r(function(){wt(this,i,s)});return}if(n=="method"){var o;return ri(t)||(t=a(t)),(o=this.options_)!=null&&o.bound&&r(function(){var l=this,u=l[i].bind(l);u.isMobxAction=!0,l[i]=u}),t}B("Cannot apply '"+s.annotationType_+"' to '"+String(i)+"' (kind: "+n+"):"+(`
26
- '`+s.annotationType_+"' can only be used on properties with a function value."))}function dc(t,e,n,i){e.annotationType_,i.value}function Ha(t,e,n,i,r){var s,a,o,l,u,c,d;r===void 0&&(r=w.safeDescriptors),dc(t,e,n,i);var f=i.value;if((s=e.options_)!=null&&s.bound){var v;f=f.bind((v=t.proxy_)!=null?v:t.target_)}return{value:ze((a=(o=e.options_)==null?void 0:o.name)!=null?a:n.toString(),f,(l=(u=e.options_)==null?void 0:u.autoAction)!=null?l:!1,(c=e.options_)!=null&&c.bound?(d=t.proxy_)!=null?d:t.target_:void 0),configurable:r?t.isPlainObject_:!0,enumerable:!1,writable:!r}}function qa(t,e){return{annotationType_:t,options_:e,make_:fc,extend_:hc,decorate_20223_:pc}}function fc(t,e,n,i){var r;if(i===t.target_)return this.extend_(t,e,n,!1)===null?0:2;if((r=this.options_)!=null&&r.bound&&(!Re(t.target_,e)||!Jt(t.target_[e]))&&this.extend_(t,e,n,!1)===null)return 0;if(Jt(n.value))return 1;var s=za(t,this,e,n,!1,!1);return Oe(i,e,s),2}function hc(t,e,n,i){var r,s=za(t,this,e,n,(r=this.options_)==null?void 0:r.bound);return t.defineProperty_(e,s,i)}function pc(t,e){var n,i=e.name,r=e.addInitializer;return Jt(t)||(t=bt(t)),(n=this.options_)!=null&&n.bound&&r(function(){var s=this,a=s[i].bind(s);a.isMobXFlow=!0,s[i]=a}),t}function mc(t,e,n,i){e.annotationType_,i.value}function za(t,e,n,i,r,s){s===void 0&&(s=w.safeDescriptors),mc(t,e,n,i);var a=i.value;if(Jt(a)||(a=bt(a)),r){var o;a=a.bind((o=t.proxy_)!=null?o:t.target_),a.isMobXFlow=!0}return{value:a,configurable:s?t.isPlainObject_:!0,enumerable:!1,writable:!s}}function Ir(t,e){return{annotationType_:t,options_:e,make_:gc,extend_:vc,decorate_20223_:kc}}function gc(t,e,n){return this.extend_(t,e,n,!1)===null?0:1}function vc(t,e,n,i){return yc(t,this,e,n),t.defineComputedProperty_(e,qe({},this.options_,{get:n.get,set:n.set}),i)}function kc(t,e){var n=this,i=e.name,r=e.addInitializer;return r(function(){var s=Ct(this)[P],a=qe({},n.options_,{get:t,context:this});a.name||(a.name="ObservableObject."+i.toString()),s.values_.set(i,new _e(a))}),function(){return this[P].getObservablePropValue_(i)}}function yc(t,e,n,i){e.annotationType_,i.get}function ei(t,e){return{annotationType_:t,options_:e,make_:_c,extend_:bc,decorate_20223_:Sc}}function _c(t,e,n){return this.extend_(t,e,n,!1)===null?0:1}function bc(t,e,n,i){var r,s;return Nc(t,this),t.defineObservableProperty_(e,n.value,(r=(s=this.options_)==null?void 0:s.enhancer)!=null?r:et,i)}function Sc(t,e){var n=this,i=e.kind,r=e.name,s=new WeakSet;function a(o,l){var u,c,d=Ct(o)[P],f=new Qe(l,(u=(c=n.options_)==null?void 0:c.enhancer)!=null?u:et,"ObservableObject."+r.toString(),!1);d.values_.set(r,f),s.add(o)}if(i=="accessor")return{get:function(){return s.has(this)||a(this,t.get.call(this)),this[P].getObservablePropValue_(r)},set:function(l){return s.has(this)||a(this,l),this[P].setObservablePropValue_(r,l)},init:function(l){return s.has(this)||a(this,l),l}}}function Nc(t,e,n,i){e.annotationType_}var Ec="true",Ac=Ga();function Ga(t){return{annotationType_:Ec,options_:t,make_:Oc,extend_:wc,decorate_20223_:Tc}}function Oc(t,e,n,i){var r,s;if(n.get)return Ue.make_(t,e,n,i);if(n.set){var a=ze(e.toString(),n.set);return i===t.target_?t.defineProperty_(e,{configurable:w.safeDescriptors?t.isPlainObject_:!0,set:a})===null?0:2:(Oe(i,e,{configurable:!0,set:a}),2)}if(i!==t.target_&&typeof n.value=="function"){var o;if($a(n.value)){var l,u=(l=this.options_)!=null&&l.autoBind?bt.bound:bt;return u.make_(t,e,n,i)}var c=(o=this.options_)!=null&&o.autoBind?Wt.bound:Wt;return c.make_(t,e,n,i)}var d=((r=this.options_)==null?void 0:r.deep)===!1?W.ref:W;if(typeof n.value=="function"&&(s=this.options_)!=null&&s.autoBind){var f;n.value=n.value.bind((f=t.proxy_)!=null?f:t.target_)}return d.make_(t,e,n,i)}function wc(t,e,n,i){var r,s;if(n.get)return Ue.extend_(t,e,n,i);if(n.set)return t.defineProperty_(e,{configurable:w.safeDescriptors?t.isPlainObject_:!0,set:ze(e.toString(),n.set)},i);if(typeof n.value=="function"&&(r=this.options_)!=null&&r.autoBind){var a;n.value=n.value.bind((a=t.proxy_)!=null?a:t.target_)}var o=((s=this.options_)==null?void 0:s.deep)===!1?W.ref:W;return o.extend_(t,e,n,i)}function Tc(t,e){B("'"+this.annotationType_+"' cannot be used as a decorator")}var Cc="observable",xc="observable.ref",Rc="observable.shallow",Fc="observable.struct",Ka={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(Ka);function pn(t){return t||Ka}var ir=ei(Cc),Dc=ei(xc,{enhancer:Zn}),Ic=ei(Rc,{enhancer:rc}),Pc=ei(Fc,{enhancer:sc}),Wa=we(ir);function mn(t){return t.deep===!0?et:t.deep===!1?Zn:$c(t.defaultDecorator)}function Lc(t){var e;return t?(e=t.defaultDecorator)!=null?e:Ga(t):void 0}function $c(t){var e,n;return t&&(e=(n=t.options_)==null?void 0:n.enhancer)!=null?e:et}function Ja(t,e,n){if(sn(e))return ir.decorate_20223_(t,e);if(Ze(e)){wt(t,e,ir);return}return po(t)?t:He(t)?W.object(t,e,n):Array.isArray(t)?W.array(t,e):At(t)?W.map(t,e):Ce(t)?W.set(t,e):typeof t=="object"&&t!==null?t:W.box(t,e)}Ia(Ja,Wa);var Mc={box:function(e,n){var i=pn(n);return new Qe(e,mn(i),i.name,!0,i.equals)},array:function(e,n){var i=pn(n);return(w.useProxies===!1||i.proxy===!1?Fd:Sd)(e,mn(i),i.name)},map:function(e,n){var i=pn(n);return new vo(e,mn(i),i.name)},set:function(e,n){var i=pn(n);return new ko(e,mn(i),i.name)},object:function(e,n,i){return lt(function(){return dd(w.useProxies===!1||(i==null?void 0:i.proxy)===!1?Ct({},i):kd({},i),e,n)})},ref:we(Dc),shallow:we(Ic),deep:Wa,struct:we(Pc)},W=Ia(Ja,Mc),Ya="computed",Uc="computed.struct",rr=Ir(Ya),Vc=Ir(Uc,{equals:_t.structural}),Ue=function(e,n){if(sn(n))return rr.decorate_20223_(e,n);if(Ze(n))return wt(e,n,rr);if(He(e))return we(Ir(Ya,e));var i=He(n)?n:{};return i.get=e,i.name||(i.name=e.name||""),new _e(i)};Object.assign(Ue,rr);Ue.struct=we(Vc);var us,cs,xn=0,jc=1,Bc=(us=(cs=Cn(function(){},"name"))==null?void 0:cs.configurable)!=null?us:!1,ds={value:"action",configurable:!0,writable:!1,enumerable:!1};function ze(t,e,n,i){n===void 0&&(n=!1);function r(){return Hc(t,n,e,i||this,arguments)}return r.isMobxAction=!0,r.toString=function(){return e.toString()},Bc&&(ds.value=t,Oe(r,"name",ds)),r}function Hc(t,e,n,i,r){var s=qc(t,e);try{return n.apply(i,r)}catch(a){throw s.error_=a,a}finally{zc(s)}}function qc(t,e,n,i){var r=!1,s=0,a=w.trackingDerivation,o=!e||!a;he();var l=w.allowStateChanges;o&&(at(),l=ti(!0));var u=Pr(!0),c={runAsAction_:o,prevDerivation_:a,prevAllowStateChanges_:l,prevAllowStateReads_:u,notifySpy_:r,startTime_:s,actionId_:jc++,parentActionId_:xn};return xn=c.actionId_,c}function zc(t){xn!==t.actionId_&&B(30),xn=t.parentActionId_,t.error_!==void 0&&(w.suppressReactionErrors=!0),ni(t.prevAllowStateChanges_),Vt(t.prevAllowStateReads_),pe(),t.runAsAction_&&Fe(t.prevDerivation_),w.suppressReactionErrors=!1}function Qa(t,e){var n=ti(t);try{return e()}finally{ni(n)}}function ti(t){var e=w.allowStateChanges;return w.allowStateChanges=t,e}function ni(t){w.allowStateChanges=t}var Qe=function(t){function e(i,r,s,a,o){var l;return s===void 0&&(s="ObservableValue"),o===void 0&&(o=_t.default),l=t.call(this,s)||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=r,l.name_=s,l.equals=o,l.value_=r(i,void 0,s),l}ja(e,t);var n=e.prototype;return n.dehanceValue=function(r){return this.dehancer!==void 0?this.dehancer(r):r},n.set=function(r){this.value_,r=this.prepareNewValue_(r),r!==w.UNCHANGED&&this.setNewValue_(r)},n.prepareNewValue_=function(r){if(de(this)){var s=fe(this,{object:this,type:Te,newValue:r});if(!s)return w.UNCHANGED;r=s.newValue}return r=this.enhancer(r,this.value_,this.name_),this.equals(this.value_,r)?w.UNCHANGED:r},n.setNewValue_=function(r){var s=this.value_;this.value_=r,this.reportChanged(),ve(this)&&ke(this,{type:Te,object:this,newValue:r,oldValue:s})},n.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(r){return on(this,r)},n.observe_=function(r,s){return s&&r({observableKind:"value",debugObjectName:this.name_,object:this,type:Te,newValue:this.value_,oldValue:void 0}),ln(this,r)},n.raw=function(){return this.value_},n.toJSON=function(){return this.get()},n.toString=function(){return this.name_+"["+this.value_+"]"},n.valueOf=function(){return Va(this.get())},n[Symbol.toPrimitive]=function(){return this.valueOf()},e}(Ge),_e=function(){function t(n){this.dependenciesState_=j.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=j.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new Fn(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.isTracing_=Rn.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||B(31),this.derivation=n.get,this.name_=n.name||"ComputedValue",n.set&&(this.setter_=ze("ComputedValue-setter",n.set)),this.equals_=n.equals||(n.compareStructural||n.struct?_t.structural:_t.default),this.scope_=n.context,this.requiresReaction_=n.requiresReaction,this.keepAlive_=!!n.keepAlive}var e=t.prototype;return e.onBecomeStale_=function(){Jc(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&&B(32,this.name_,this.derivation),w.inBatch===0&&this.observers_.size===0&&!this.keepAlive_)sr(this)&&(this.warnAboutUntrackedRead_(),he(),this.value_=this.computeValue_(!1),pe());else if(io(this),sr(this)){var i=w.trackingContext;this.keepAlive_&&!i&&(w.trackingContext=this),this.trackAndCompute()&&Wc(this),w.trackingContext=i}var r=this.value_;if(bn(r))throw r.cause;return r},e.set=function(i){if(this.setter_){this.isRunningSetter&&B(33,this.name_),this.isRunningSetter=!0;try{this.setter_.call(this.scope_,i)}finally{this.isRunningSetter=!1}}else B(34,this.name_)},e.trackAndCompute=function(){var i=this.value_,r=this.dependenciesState_===j.NOT_TRACKING_,s=this.computeValue_(!0),a=r||bn(i)||bn(s)||!this.equals_(i,s);return a&&(this.value_=s),a},e.computeValue_=function(i){this.isComputing=!0;var r=ti(!1),s;if(i)s=Xa(this,this.derivation,this.scope_);else if(w.disableErrorBoundaries===!0)s=this.derivation.call(this.scope_);else try{s=this.derivation.call(this.scope_)}catch(a){s=new Fn(a)}return ni(r),this.isComputing=!1,s},e.suspend_=function(){this.keepAlive_||(ar(this),this.value_=void 0)},e.observe_=function(i,r){var s=this,a=!0,o=void 0;return si(function(){var l=s.get();if(!a||r){var u=at();i({observableKind:"computed",debugObjectName:s.name_,type:Te,object:s,newValue:l,oldValue:o}),Fe(u)}a=!1,o=l})},e.warnAboutUntrackedRead_=function(){},e.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},e.valueOf=function(){return Va(this.get())},e[Symbol.toPrimitive]=function(){return this.valueOf()},Ot(t,[{key:"isComputing",get:function(){return ae(this.flags_,t.isComputingMask_)},set:function(i){this.flags_=oe(this.flags_,t.isComputingMask_,i)}},{key:"isRunningSetter",get:function(){return ae(this.flags_,t.isRunningSetterMask_)},set:function(i){this.flags_=oe(this.flags_,t.isRunningSetterMask_,i)}},{key:"isBeingObserved",get:function(){return ae(this.flags_,t.isBeingObservedMask_)},set:function(i){this.flags_=oe(this.flags_,t.isBeingObservedMask_,i)}},{key:"isPendingUnobservation",get:function(){return ae(this.flags_,t.isPendingUnobservationMask_)},set:function(i){this.flags_=oe(this.flags_,t.isPendingUnobservationMask_,i)}},{key:"diffValue",get:function(){return ae(this.flags_,t.diffValueMask_)?1:0},set:function(i){this.flags_=oe(this.flags_,t.diffValueMask_,i===1)}}])}();_e.isComputingMask_=1;_e.isRunningSetterMask_=2;_e.isBeingObservedMask_=4;_e.isPendingUnobservationMask_=8;_e.diffValueMask_=16;var ii=st("ComputedValue",_e),j;(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_"})(j||(j={}));var Rn;(function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK"})(Rn||(Rn={}));var Fn=function(e){this.cause=void 0,this.cause=e};function bn(t){return t instanceof Fn}function sr(t){switch(t.dependenciesState_){case j.UP_TO_DATE_:return!1;case j.NOT_TRACKING_:case j.STALE_:return!0;case j.POSSIBLY_STALE_:{for(var e=Pr(!0),n=at(),i=t.observing_,r=i.length,s=0;s<r;s++){var a=i[s];if(ii(a)){if(w.disableErrorBoundaries)a.get();else try{a.get()}catch{return Fe(n),Vt(e),!0}if(t.dependenciesState_===j.STALE_)return Fe(n),Vt(e),!0}}return eo(t),Fe(n),Vt(e),!1}}}function Xa(t,e,n){var i=Pr(!0);eo(t),t.newObserving_=new Array(t.runId_===0?100:t.observing_.length),t.unboundDepsCount_=0,t.runId_=++w.runId;var r=w.trackingDerivation;w.trackingDerivation=t,w.inBatch++;var s;if(w.disableErrorBoundaries===!0)s=e.call(n);else try{s=e.call(n)}catch(a){s=new Fn(a)}return w.inBatch--,w.trackingDerivation=r,Gc(t),Vt(i),s}function Gc(t){for(var e=t.observing_,n=t.observing_=t.newObserving_,i=j.UP_TO_DATE_,r=0,s=t.unboundDepsCount_,a=0;a<s;a++){var o=n[a];o.diffValue===0&&(o.diffValue=1,r!==a&&(n[r]=o),r++),o.dependenciesState_>i&&(i=o.dependenciesState_)}for(n.length=r,t.newObserving_=null,s=e.length;s--;){var l=e[s];l.diffValue===0&&to(l,t),l.diffValue=0}for(;r--;){var u=n[r];u.diffValue===1&&(u.diffValue=0,Kc(u,t))}i!==j.UP_TO_DATE_&&(t.dependenciesState_=i,t.onBecomeStale_())}function ar(t){var e=t.observing_;t.observing_=[];for(var n=e.length;n--;)to(e[n],t);t.dependenciesState_=j.NOT_TRACKING_}function Za(t){var e=at();try{return t()}finally{Fe(e)}}function at(){var t=w.trackingDerivation;return w.trackingDerivation=null,t}function Fe(t){w.trackingDerivation=t}function Pr(t){var e=w.allowStateReads;return w.allowStateReads=t,e}function Vt(t){w.allowStateReads=t}function eo(t){if(t.dependenciesState_!==j.UP_TO_DATE_){t.dependenciesState_=j.UP_TO_DATE_;for(var e=t.observing_,n=e.length;n--;)e[n].lowestObserverState_=j.UP_TO_DATE_}}var xi=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},Ri=!0,w=function(){var t=Da();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(Ri=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==new xi().version&&(Ri=!1),Ri?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new xi):(setTimeout(function(){B(35)},1),new xi)}();function Kc(t,e){t.observers_.add(e),t.lowestObserverState_>e.dependenciesState_&&(t.lowestObserverState_=e.dependenciesState_)}function to(t,e){t.observers_.delete(e),t.observers_.size===0&&no(t)}function no(t){t.isPendingUnobservation===!1&&(t.isPendingUnobservation=!0,w.pendingUnobservations.push(t))}function he(){w.inBatch++}function pe(){if(--w.inBatch===0){so();for(var t=w.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 _e&&n.suspend_())}w.pendingUnobservations=[]}}function io(t){var e=w.trackingDerivation;return e!==null?(e.runId_!==t.lastAccessedBy_&&(t.lastAccessedBy_=e.runId_,e.newObserving_[e.unboundDepsCount_++]=t,!t.isBeingObserved&&w.trackingContext&&(t.isBeingObserved=!0,t.onBO())),t.isBeingObserved):(t.observers_.size===0&&w.inBatch>0&&no(t),!1)}function ro(t){t.lowestObserverState_!==j.STALE_&&(t.lowestObserverState_=j.STALE_,t.observers_.forEach(function(e){e.dependenciesState_===j.UP_TO_DATE_&&e.onBecomeStale_(),e.dependenciesState_=j.STALE_}))}function Wc(t){t.lowestObserverState_!==j.STALE_&&(t.lowestObserverState_=j.STALE_,t.observers_.forEach(function(e){e.dependenciesState_===j.POSSIBLY_STALE_?e.dependenciesState_=j.STALE_:e.dependenciesState_===j.UP_TO_DATE_&&(t.lowestObserverState_=j.UP_TO_DATE_)}))}function Jc(t){t.lowestObserverState_===j.UP_TO_DATE_&&(t.lowestObserverState_=j.POSSIBLY_STALE_,t.observers_.forEach(function(e){e.dependenciesState_===j.UP_TO_DATE_&&(e.dependenciesState_=j.POSSIBLY_STALE_,e.onBecomeStale_())}))}var De=function(){function t(n,i,r,s){n===void 0&&(n="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=j.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=Rn.NONE,this.name_=n,this.onInvalidate_=i,this.errorHandler_=r,this.requiresObservable_=s}var e=t.prototype;return e.onBecomeStale_=function(){this.schedule_()},e.schedule_=function(){this.isScheduled||(this.isScheduled=!0,w.pendingReactions.push(this),so())},e.runReaction_=function(){if(!this.isDisposed){he(),this.isScheduled=!1;var i=w.trackingContext;if(w.trackingContext=this,sr(this)){this.isTrackPending=!0;try{this.onInvalidate_()}catch(r){this.reportExceptionInDerivation_(r)}}w.trackingContext=i,pe()}},e.track=function(i){if(!this.isDisposed){he(),this.isRunning=!0;var r=w.trackingContext;w.trackingContext=this;var s=Xa(this,i,void 0);w.trackingContext=r,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&ar(this),bn(s)&&this.reportExceptionInDerivation_(s.cause),pe()}},e.reportExceptionInDerivation_=function(i){var r=this;if(this.errorHandler_){this.errorHandler_(i,this);return}if(w.disableErrorBoundaries)throw i;var s="[mobx] uncaught error in '"+this+"'";w.suppressReactionErrors||console.error(s,i),w.globalReactionErrorHandlers.forEach(function(a){return a(i,r)})},e.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(he(),ar(this),pe()))},e.getDisposer_=function(i){var r=this,s=function a(){r.dispose(),i==null||i.removeEventListener==null||i.removeEventListener("abort",a)};return i==null||i.addEventListener==null||i.addEventListener("abort",s),s[P]=this,s},e.toString=function(){return"Reaction["+this.name_+"]"},e.trace=function(i){},Ot(t,[{key:"isDisposed",get:function(){return ae(this.flags_,t.isDisposedMask_)},set:function(i){this.flags_=oe(this.flags_,t.isDisposedMask_,i)}},{key:"isScheduled",get:function(){return ae(this.flags_,t.isScheduledMask_)},set:function(i){this.flags_=oe(this.flags_,t.isScheduledMask_,i)}},{key:"isTrackPending",get:function(){return ae(this.flags_,t.isTrackPendingMask_)},set:function(i){this.flags_=oe(this.flags_,t.isTrackPendingMask_,i)}},{key:"isRunning",get:function(){return ae(this.flags_,t.isRunningMask_)},set:function(i){this.flags_=oe(this.flags_,t.isRunningMask_,i)}},{key:"diffValue",get:function(){return ae(this.flags_,t.diffValueMask_)?1:0},set:function(i){this.flags_=oe(this.flags_,t.diffValueMask_,i===1)}}])}();De.isDisposedMask_=1;De.isScheduledMask_=2;De.isTrackPendingMask_=4;De.isRunningMask_=8;De.diffValueMask_=16;var Yc=100,Qc=function(e){return e()};function so(){w.inBatch>0||w.isRunningReactions||Qc(Xc)}function Xc(){w.isRunningReactions=!0;for(var t=w.pendingReactions,e=0;t.length>0;){++e===Yc&&(console.error("[mobx] cycle in reaction: "+t[0]),t.splice(0));for(var n=t.splice(0),i=0,r=n.length;i<r;i++)n[i].runReaction_()}w.isRunningReactions=!1}var Dn=st("Reaction",De);function jt(){return!1}function Zc(t){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}var ao="action",ed="action.bound",oo="autoAction",td="autoAction.bound",nd="<unnamed action>",or=an(ao),id=an(ed,{bound:!0}),lr=an(oo,{autoAction:!0}),rd=an(td,{autoAction:!0,bound:!0});function lo(t){var e=function(i,r){if(ye(i))return ze(i.name||nd,i,t);if(ye(r))return ze(i,r,t);if(sn(r))return(t?lr:or).decorate_20223_(i,r);if(Ze(r))return wt(i,r,t?lr:or);if(Ze(i))return we(an(t?oo:ao,{name:i,autoAction:t}))};return e}var se=lo(!1);Object.assign(se,or);var Wt=lo(!0);Object.assign(Wt,lr);se.bound=we(id);Wt.bound=we(rd);function ri(t){return ye(t)&&t.isMobxAction===!0}function si(t,e){var n,i,r,s;e===void 0&&(e=Fr);var a=(n=(i=e)==null?void 0:i.name)!=null?n:"Autorun",o=!e.scheduler&&!e.delay,l;if(o)l=new De(a,function(){this.track(d)},e.onError,e.requiresObservable);else{var u=uo(e),c=!1;l=new De(a,function(){c||(c=!0,u(function(){c=!1,l.isDisposed||l.track(d)}))},e.onError,e.requiresObservable)}function d(){t(l)}return(r=e)!=null&&(r=r.signal)!=null&&r.aborted||l.schedule_(),l.getDisposer_((s=e)==null?void 0:s.signal)}var sd=function(e){return e()};function uo(t){return t.scheduler?t.scheduler:t.delay?function(e){return setTimeout(e,t.delay)}:sd}function ad(t,e,n){var i,r,s;n===void 0&&(n=Fr);var a=(i=n.name)!=null?i:"Reaction",o=se(a,n.onError?od(n.onError,e):e),l=!n.scheduler&&!n.delay,u=uo(n),c=!0,d=!1,f,v=n.compareStructural?_t.structural:n.equals||_t.default,g=new De(a,function(){c||l?m():d||(d=!0,u(m))},n.onError,n.requiresObservable);function m(){if(d=!1,!g.isDisposed){var p=!1,h=f;g.track(function(){var _=Qa(!1,function(){return t(g)});p=c||!v(f,_),f=_}),(c&&n.fireImmediately||!c&&p)&&o(f,h,g),c=!1}}return(r=n)!=null&&(r=r.signal)!=null&&r.aborted||g.schedule_(),g.getDisposer_((s=n)==null?void 0:s.signal)}function od(t,e){return function(){try{return e.apply(this,arguments)}catch(n){t.call(this,n)}}}var ld="onBO",ud="onBUO";function cd(t,e,n){return fo(ld,t,e,n)}function co(t,e,n){return fo(ud,t,e,n)}function fo(t,e,n,i){var r=ur(e),s=ye(i)?i:n,a=t+"L";return r[a]?r[a].add(s):r[a]=new Set([s]),function(){var o=r[a];o&&(o.delete(s),o.size===0&&delete r[a])}}function dd(t,e,n,i){var r=Wu(e);return lt(function(){var s=Ct(t,i)[P];Xn(r).forEach(function(a){s.extend_(a,r[a],n&&a in n?n[a]:!0)})}),t}var fd=0;function ho(){this.message="FLOW_CANCELLED"}ho.prototype=Object.create(Error.prototype);var Fi=qa("flow"),hd=qa("flow.bound",{bound:!0}),bt=Object.assign(function(e,n){if(sn(n))return Fi.decorate_20223_(e,n);if(Ze(n))return wt(e,n,Fi);var i=e,r=i.name||"<unnamed flow>",s=function(){var o=this,l=arguments,u=++fd,c=se(r+" - runid: "+u+" - init",i).apply(o,l),d,f=void 0,v=new Promise(function(g,m){var p=0;d=m;function h(b){f=void 0;var E;try{E=se(r+" - runid: "+u+" - yield "+p++,c.next).call(c,b)}catch(O){return m(O)}N(E)}function _(b){f=void 0;var E;try{E=se(r+" - runid: "+u+" - yield "+p++,c.throw).call(c,b)}catch(O){return m(O)}N(E)}function N(b){if(ye(b==null?void 0:b.then)){b.then(N,m);return}return b.done?g(b.value):(f=Promise.resolve(b.value),f.then(h,_))}h(void 0)});return v.cancel=se(r+" - runid: "+u+" - cancel",function(){try{f&&fs(f);var g=c.return(void 0),m=Promise.resolve(g.value);m.then(vt,vt),fs(m),d(new ho)}catch(p){d(p)}}),v};return s.isMobXFlow=!0,s},Fi);bt.bound=we(hd);function fs(t){ye(t.cancel)&&t.cancel()}function Jt(t){return(t==null?void 0:t.isMobXFlow)===!0}function pd(t,e){return t?oi(t)||!!t[P]||Dr(t)||Dn(t)||ii(t):!1}function po(t){return pd(t)}function xe(t,e){e===void 0&&(e=void 0),he();try{return t.apply(e)}finally{pe()}}function md(t,e,n){return arguments.length===1||e&&typeof e=="object"?gd(t,e):mo(t,e,{})}function mo(t,e,n){var i;if(typeof n.timeout=="number"){var r=new Error("WHEN_TIMEOUT");i=setTimeout(function(){if(!a[P].isDisposed)if(a(),n.onError)n.onError(r);else throw r},n.timeout)}n.name="When";var s=ze("When-effect",e),a=si(function(o){var l=Qa(!1,t);l&&(o.dispose(),i&&clearTimeout(i),s())},n);return a}function gd(t,e){var n;if(e!=null&&(n=e.signal)!=null&&n.aborted)return Object.assign(Promise.reject(new Error("WHEN_ABORTED")),{cancel:function(){return null}});var i,r,s=new Promise(function(a,o){var l,u=mo(t,a,qe({},e,{onError:o}));i=function(){u(),o(new Error("WHEN_CANCELLED"))},r=function(){u(),o(new Error("WHEN_ABORTED"))},e==null||(l=e.signal)==null||l.addEventListener==null||l.addEventListener("abort",r)}).finally(function(){var a;return e==null||(a=e.signal)==null||a.removeEventListener==null?void 0:a.removeEventListener("abort",r)});return s.cancel=i,s}function dt(t){return t[P]}var vd={has:function(e,n){return dt(e).has_(n)},get:function(e,n){return dt(e).get_(n)},set:function(e,n,i){var r;return Ze(n)?(r=dt(e).set_(n,i,!0))!=null?r:!0:!1},deleteProperty:function(e,n){var i;return Ze(n)?(i=dt(e).delete_(n,!0))!=null?i:!0:!1},defineProperty:function(e,n,i){var r;return(r=dt(e).defineProperty_(n,i))!=null?r:!0},ownKeys:function(e){return dt(e).ownKeys_()},preventExtensions:function(e){B(13)}};function kd(t,e){var n,i;return Pa(),t=Ct(t,e),(i=(n=t[P]).proxy_)!=null?i:n.proxy_=new Proxy(t,vd)}function de(t){return t.interceptors_!==void 0&&t.interceptors_.length>0}function on(t,e){var n=t.interceptors_||(t.interceptors_=[]);return n.push(e),La(function(){var i=n.indexOf(e);i!==-1&&n.splice(i,1)})}function fe(t,e){var n=at();try{for(var i=[].concat(t.interceptors_||[]),r=0,s=i.length;r<s&&(e=i[r](e),e&&!e.type&&B(14),!!e);r++);return e}finally{Fe(n)}}function ve(t){return t.changeListeners_!==void 0&&t.changeListeners_.length>0}function ln(t,e){var n=t.changeListeners_||(t.changeListeners_=[]);return n.push(e),La(function(){var i=n.indexOf(e);i!==-1&&n.splice(i,1)})}function ke(t,e){var n=at(),i=t.changeListeners_;if(i){i=i.slice();for(var r=0,s=i.length;r<s;r++)i[r](e);Fe(n)}}function yd(t,e,n){return lt(function(){var i,r=Ct(t,n)[P];(i=e)!=null||(e=Zu(t)),Xn(e).forEach(function(s){return r.make_(s,e[s])})}),t}var hs="splice",Te="update",_d=1e4,bd={get:function(e,n){var i=e[P];return n===P?i:n==="length"?i.getArrayLength_():typeof n=="string"&&!isNaN(n)?i.get_(parseInt(n)):Re(In,n)?In[n]:e[n]},set:function(e,n,i){var r=e[P];return n==="length"&&r.setArrayLength_(i),typeof n=="symbol"||isNaN(n)?e[n]=i:r.set_(parseInt(n),i),!0},preventExtensions:function(){B(15)}},Lr=function(){function t(n,i,r,s){n===void 0&&(n="ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=r,this.legacyMode_=s,this.atom_=new Ge(n),this.enhancer_=function(a,o){return i(a,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 on(this,i)},e.observe_=function(i,r){return r===void 0&&(r=!1),r&&i({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),ln(this,i)},e.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},e.setArrayLength_=function(i){(typeof i!="number"||isNaN(i)||i<0)&&B("Out of range: "+i);var r=this.values_.length;if(i!==r)if(i>r){for(var s=new Array(i-r),a=0;a<i-r;a++)s[a]=void 0;this.spliceWithArray_(r,0,s)}else this.spliceWithArray_(i,r-i)},e.updateArrayLength_=function(i,r){i!==this.lastKnownLength_&&B(16),this.lastKnownLength_+=r,this.legacyMode_&&r>0&&So(i+r+1)},e.spliceWithArray_=function(i,r,s){var a=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?r=o-i:r==null?r=0:r=Math.max(0,Math.min(r,o-i)),s===void 0&&(s=tr),de(this)){var l=fe(this,{object:this.proxy_,type:hs,index:i,removedCount:r,added:s});if(!l)return tr;r=l.removedCount,s=l.added}if(s=s.length===0?s:s.map(function(d){return a.enhancer_(d,void 0)}),this.legacyMode_){var u=s.length-r;this.updateArrayLength_(o,u)}var c=this.spliceItemsIntoValues_(i,r,s);return(r!==0||s.length!==0)&&this.notifyArraySplice_(i,s,c),this.dehanceValues_(c)},e.spliceItemsIntoValues_=function(i,r,s){if(s.length<_d){var a;return(a=this.values_).splice.apply(a,[i,r].concat(s))}else{var o=this.values_.slice(i,i+r),l=this.values_.slice(i+r);this.values_.length+=s.length-r;for(var u=0;u<s.length;u++)this.values_[i+u]=s[u];for(var c=0;c<l.length;c++)this.values_[i+s.length+c]=l[c];return o}},e.notifyArrayChildUpdate_=function(i,r,s){var a=!this.owned_&&jt(),o=ve(this),l=o||a?{observableKind:"array",object:this.proxy_,type:Te,debugObjectName:this.atom_.name_,index:i,newValue:r,oldValue:s}:null;this.atom_.reportChanged(),o&&ke(this,l)},e.notifyArraySplice_=function(i,r,s){var a=!this.owned_&&jt(),o=ve(this),l=o||a?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:hs,index:i,removed:s,added:r,removedCount:s.length,addedCount:r.length}:null;this.atom_.reportChanged(),o&&ke(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,r){var s=this.values_;if(this.legacyMode_&&i>s.length&&B(17,i,s.length),i<s.length){this.atom_;var a=s[i];if(de(this)){var o=fe(this,{type:Te,object:this.proxy_,index:i,newValue:r});if(!o)return;r=o.newValue}r=this.enhancer_(r,a);var l=r!==a;l&&(s[i]=r,this.notifyArrayChildUpdate_(i,r,a))}else{for(var u=new Array(i+1-s.length),c=0;c<u.length-1;c++)u[c]=void 0;u[u.length-1]=r,this.spliceWithArray_(s.length,0,u)}},t}();function Sd(t,e,n,i){return n===void 0&&(n="ObservableArray"),i===void 0&&(i=!1),Pa(),lt(function(){var r=new Lr(n,e,i,!1);Ma(r.values_,P,r);var s=new Proxy(r.values_,bd);return r.proxy_=s,t&&t.length&&r.spliceWithArray_(0,0,t),s})}var In={clear:function(){return this.splice(0)},replace:function(e){var n=this[P];return n.spliceWithArray_(0,n.values_.length,e)},toJSON:function(){return this.slice()},splice:function(e,n){for(var i=arguments.length,r=new Array(i>2?i-2:0),s=2;s<i;s++)r[s-2]=arguments[s];var a=this[P];switch(arguments.length){case 0:return[];case 1:return a.spliceWithArray_(e);case 2:return a.spliceWithArray_(e,n)}return a.spliceWithArray_(e,n,r)},spliceWithArray:function(e,n,i){return this[P].spliceWithArray_(e,n,i)},push:function(){for(var e=this[P],n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return e.spliceWithArray_(e.values_.length,0,i),e.values_.length},pop:function(){return this.splice(Math.max(this[P].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=this[P],n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return e.spliceWithArray_(0,0,i),e.values_.length},reverse:function(){return w.trackingDerivation&&B(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){w.trackingDerivation&&B(37,"sort");var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var n=this[P],i=n.dehanceValues_(n.values_).indexOf(e);return i>-1?(this.splice(i,1),!0):!1}};G("at",ue);G("concat",ue);G("flat",ue);G("includes",ue);G("indexOf",ue);G("join",ue);G("lastIndexOf",ue);G("slice",ue);G("toString",ue);G("toLocaleString",ue);G("toSorted",ue);G("toSpliced",ue);G("with",ue);G("every",be);G("filter",be);G("find",be);G("findIndex",be);G("findLast",be);G("findLastIndex",be);G("flatMap",be);G("forEach",be);G("map",be);G("some",be);G("toReversed",be);G("reduce",go);G("reduceRight",go);function G(t,e){typeof Array.prototype[t]=="function"&&(In[t]=e(t))}function ue(t){return function(){var e=this[P];e.atom_.reportObserved();var n=e.dehanceValues_(e.values_);return n[t].apply(n,arguments)}}function be(t){return function(e,n){var i=this,r=this[P];r.atom_.reportObserved();var s=r.dehanceValues_(r.values_);return s[t](function(a,o){return e.call(n,a,o,i)})}}function go(t){return function(){var e=this,n=this[P];n.atom_.reportObserved();var i=n.dehanceValues_(n.values_),r=arguments[0];return arguments[0]=function(s,a,o){return r(s,a,o,e)},i[t].apply(i,arguments)}}var Nd=st("ObservableArrayAdministration",Lr);function ai(t){return Yn(t)&&Nd(t[P])}var Ed={},Ve="add",Pn="delete",vo=function(){function t(n,i,r){var s=this;i===void 0&&(i=et),r===void 0&&(r="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[P]=Ed,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=i,this.name_=r,ye(Map)||B(18),lt(function(){s.keysAtom_=Ba("ObservableMap.keys()"),s.data_=new Map,s.hasMap_=new Map,n&&s.merge(n)})}var e=t.prototype;return e.has_=function(i){return this.data_.has(i)},e.has=function(i){var r=this;if(!w.trackingDerivation)return this.has_(i);var s=this.hasMap_.get(i);if(!s){var a=s=new Qe(this.has_(i),Zn,"ObservableMap.key?",!1);this.hasMap_.set(i,a),co(a,function(){return r.hasMap_.delete(i)})}return s.get()},e.set=function(i,r){var s=this.has_(i);if(de(this)){var a=fe(this,{type:s?Te:Ve,object:this,newValue:r,name:i});if(!a)return this;r=a.newValue}return s?this.updateValue_(i,r):this.addValue_(i,r),this},e.delete=function(i){var r=this;if(this.keysAtom_,de(this)){var s=fe(this,{type:Pn,object:this,name:i});if(!s)return!1}if(this.has_(i)){var a=jt(),o=ve(this),l=o||a?{observableKind:"map",debugObjectName:this.name_,type:Pn,object:this,oldValue:this.data_.get(i).value_,name:i}:null;return xe(function(){var u;r.keysAtom_.reportChanged(),(u=r.hasMap_.get(i))==null||u.setNewValue_(!1);var c=r.data_.get(i);c.setNewValue_(void 0),r.data_.delete(i)}),o&&ke(this,l),!0}return!1},e.updateValue_=function(i,r){var s=this.data_.get(i);if(r=s.prepareNewValue_(r),r!==w.UNCHANGED){var a=jt(),o=ve(this),l=o||a?{observableKind:"map",debugObjectName:this.name_,type:Te,object:this,oldValue:s.value_,name:i,newValue:r}:null;s.setNewValue_(r),o&&ke(this,l)}},e.addValue_=function(i,r){var s=this;this.keysAtom_,xe(function(){var u,c=new Qe(r,s.enhancer_,"ObservableMap.key",!1);s.data_.set(i,c),r=c.value_,(u=s.hasMap_.get(i))==null||u.setNewValue_(!0),s.keysAtom_.reportChanged()});var a=jt(),o=ve(this),l=o||a?{observableKind:"map",debugObjectName:this.name_,type:Ve,object:this,name:i,newValue:r}:null;o&&ke(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,r=this.keys();return Yt({next:function(){var a=r.next(),o=a.done,l=a.value;return{done:o,value:o?void 0:i.get(l)}}})},e.entries=function(){var i=this,r=this.keys();return Yt({next:function(){var a=r.next(),o=a.done,l=a.value;return{done:o,value:o?void 0:[l,i.get(l)]}}})},e[Symbol.iterator]=function(){return this.entries()},e.forEach=function(i,r){for(var s=kt(this),a;!(a=s()).done;){var o=a.value,l=o[0],u=o[1];i.call(r,u,l,this)}},e.merge=function(i){var r=this;return ot(i)&&(i=new Map(i)),xe(function(){He(i)?Ku(i).forEach(function(s){return r.set(s,i[s])}):Array.isArray(i)?i.forEach(function(s){var a=s[0],o=s[1];return r.set(a,o)}):At(i)?(Gu(i)||B(19,i),i.forEach(function(s,a){return r.set(a,s)})):i!=null&&B(20,i)}),this},e.clear=function(){var i=this;xe(function(){Za(function(){for(var r=kt(i.keys()),s;!(s=r()).done;){var a=s.value;i.delete(a)}})})},e.replace=function(i){var r=this;return xe(function(){for(var s=Ad(i),a=new Map,o=!1,l=kt(r.data_.keys()),u;!(u=l()).done;){var c=u.value;if(!s.has(c)){var d=r.delete(c);if(d)o=!0;else{var f=r.data_.get(c);a.set(c,f)}}}for(var v=kt(s.entries()),g;!(g=v()).done;){var m=g.value,p=m[0],h=m[1],_=r.data_.has(p);if(r.set(p,h),r.data_.has(p)){var N=r.data_.get(p);a.set(p,N),_||(o=!0)}}if(!o)if(r.data_.size!==a.size)r.keysAtom_.reportChanged();else for(var b=r.data_.keys(),E=a.keys(),O=b.next(),x=E.next();!O.done;){if(O.value!==x.value){r.keysAtom_.reportChanged();break}O=b.next(),x=E.next()}r.data_=a}),this},e.toString=function(){return"[object ObservableMap]"},e.toJSON=function(){return Array.from(this)},e.observe_=function(i,r){return ln(this,i)},e.intercept_=function(i){return on(this,i)},Ot(t,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Map"}}])}(),ot=st("ObservableMap",vo);function Ad(t){if(At(t)||ot(t))return t;if(Array.isArray(t))return new Map(t);if(He(t)){var e=new Map;for(var n in t)e.set(n,t[n]);return e}else return B(21,t)}var Od={},ko=function(){function t(n,i,r){var s=this;i===void 0&&(i=et),r===void 0&&(r="ObservableSet"),this.name_=void 0,this[P]=Od,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=r,ye(Set)||B(22),this.enhancer_=function(a,o){return i(a,o,r)},lt(function(){s.atom_=Ba(s.name_),n&&s.replace(n)})}var e=t.prototype;return e.dehanceValue_=function(i){return this.dehancer!==void 0?this.dehancer(i):i},e.clear=function(){var i=this;xe(function(){Za(function(){for(var r=kt(i.data_.values()),s;!(s=r()).done;){var a=s.value;i.delete(a)}})})},e.forEach=function(i,r){for(var s=kt(this),a;!(a=s()).done;){var o=a.value;i.call(r,o,o,this)}},e.add=function(i){var r=this;if(this.atom_,de(this)){var s=fe(this,{type:Ve,object:this,newValue:i});if(!s)return this}if(!this.has(i)){xe(function(){r.data_.add(r.enhancer_(i,void 0)),r.atom_.reportChanged()});var a=!1,o=ve(this),l=o||a?{observableKind:"set",debugObjectName:this.name_,type:Ve,object:this,newValue:i}:null;o&&ke(this,l)}return this},e.delete=function(i){var r=this;if(de(this)){var s=fe(this,{type:Pn,object:this,oldValue:i});if(!s)return!1}if(this.has(i)){var a=!1,o=ve(this),l=o||a?{observableKind:"set",debugObjectName:this.name_,type:Pn,object:this,oldValue:i}:null;return xe(function(){r.atom_.reportChanged(),r.data_.delete(i)}),o&&ke(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,r=Array.from(this.keys()),s=Array.from(this.values());return Yt({next:function(){var o=i;return i+=1,o<s.length?{value:[r[o],s[o]],done:!1}:{done:!0}}})},e.keys=function(){return this.values()},e.values=function(){this.atom_.reportObserved();var i=this,r=0,s=Array.from(this.data_.values());return Yt({next:function(){return r<s.length?{value:i.dehanceValue_(s[r++]),done:!1}:{done:!0}}})},e.intersection=function(i){if(Ce(i))return i.intersection(this);var r=new Set(this);return r.intersection(i)},e.union=function(i){if(Ce(i))return i.union(this);var r=new Set(this);return r.union(i)},e.difference=function(i){return new Set(this).difference(i)},e.symmetricDifference=function(i){if(Ce(i))return i.symmetricDifference(this);var r=new Set(this);return r.symmetricDifference(i)},e.isSubsetOf=function(i){return new Set(this).isSubsetOf(i)},e.isSupersetOf=function(i){return new Set(this).isSupersetOf(i)},e.isDisjointFrom=function(i){if(Ce(i))return i.isDisjointFrom(this);var r=new Set(this);return r.isDisjointFrom(i)},e.replace=function(i){var r=this;return Tt(i)&&(i=new Set(i)),xe(function(){Array.isArray(i)?(r.clear(),i.forEach(function(s){return r.add(s)})):Ce(i)?(r.clear(),i.forEach(function(s){return r.add(s)})):i!=null&&B("Cannot initialize set from "+i)}),this},e.observe_=function(i,r){return ln(this,i)},e.intercept_=function(i){return on(this,i)},e.toJSON=function(){return Array.from(this)},e.toString=function(){return"[object ObservableSet]"},e[Symbol.iterator]=function(){return this.values()},Ot(t,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Set"}}])}(),Tt=st("ObservableSet",ko),ps=Object.create(null),ms="remove",yo=function(){function t(n,i,r,s){i===void 0&&(i=new Map),s===void 0&&(s=Ac),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=n,this.values_=i,this.name_=r,this.defaultAnnotation_=s,this.keysAtom_=new Ge("ObservableObject.keys"),this.isPlainObject_=He(this.target_)}var e=t.prototype;return e.getObservablePropValue_=function(i){return this.values_.get(i).get()},e.setObservablePropValue_=function(i,r){var s=this.values_.get(i);if(s instanceof _e)return s.set(r),!0;if(de(this)){var a=fe(this,{type:Te,object:this.proxy_||this.target_,name:i,newValue:r});if(!a)return null;r=a.newValue}if(r=s.prepareNewValue_(r),r!==w.UNCHANGED){var o=ve(this),l=!1,u=o||l?{type:Te,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:s.value_,name:i,newValue:r}:null;s.setNewValue_(r),o&&ke(this,u)}return!0},e.get_=function(i){return w.trackingDerivation&&!Re(this.target_,i)&&this.has_(i),this.target_[i]},e.set_=function(i,r,s){return s===void 0&&(s=!1),Re(this.target_,i)?this.values_.has(i)?this.setObservablePropValue_(i,r):s?Reflect.set(this.target_,i,r):(this.target_[i]=r,!0):this.extend_(i,{value:r,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,s)},e.has_=function(i){if(!w.trackingDerivation)return i in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var r=this.pendingKeys_.get(i);return r||(r=new Qe(i in this.target_,Zn,"ObservableObject.key?",!1),this.pendingKeys_.set(i,r)),r.get()},e.make_=function(i,r){if(r===!0&&(r=this.defaultAnnotation_),r!==!1){if(!(i in this.target_)){var s;if((s=this.target_[Ee])!=null&&s[i])return;B(1,r.annotationType_,this.name_+"."+i.toString())}for(var a=this.target_;a&&a!==Jn;){var o=Cn(a,i);if(o){var l=r.make_(this,i,o,a);if(l===0)return;if(l===1)break}a=Object.getPrototypeOf(a)}vs(this,r,i)}},e.extend_=function(i,r,s,a){if(a===void 0&&(a=!1),s===!0&&(s=this.defaultAnnotation_),s===!1)return this.defineProperty_(i,r,a);var o=s.extend_(this,i,r,a);return o&&vs(this,s,i),o},e.defineProperty_=function(i,r,s){s===void 0&&(s=!1),this.keysAtom_;try{he();var a=this.delete_(i);if(!a)return a;if(de(this)){var o=fe(this,{object:this.proxy_||this.target_,name:i,type:Ve,newValue:r.value});if(!o)return null;var l=o.newValue;r.value!==l&&(r=qe({},r,{value:l}))}if(s){if(!Reflect.defineProperty(this.target_,i,r))return!1}else Oe(this.target_,i,r);this.notifyPropertyAddition_(i,r.value)}finally{pe()}return!0},e.defineObservableProperty_=function(i,r,s,a){a===void 0&&(a=!1),this.keysAtom_;try{he();var o=this.delete_(i);if(!o)return o;if(de(this)){var l=fe(this,{object:this.proxy_||this.target_,name:i,type:Ve,newValue:r});if(!l)return null;r=l.newValue}var u=gs(i),c={configurable:w.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:u.get,set:u.set};if(a){if(!Reflect.defineProperty(this.target_,i,c))return!1}else Oe(this.target_,i,c);var d=new Qe(r,s,"ObservableObject.key",!1);this.values_.set(i,d),this.notifyPropertyAddition_(i,d.value_)}finally{pe()}return!0},e.defineComputedProperty_=function(i,r,s){s===void 0&&(s=!1),this.keysAtom_;try{he();var a=this.delete_(i);if(!a)return a;if(de(this)){var o=fe(this,{object:this.proxy_||this.target_,name:i,type:Ve,newValue:void 0});if(!o)return null}r.name||(r.name="ObservableObject.key"),r.context=this.proxy_||this.target_;var l=gs(i),u={configurable:w.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:l.get,set:l.set};if(s){if(!Reflect.defineProperty(this.target_,i,u))return!1}else Oe(this.target_,i,u);this.values_.set(i,new _e(r)),this.notifyPropertyAddition_(i,void 0)}finally{pe()}return!0},e.delete_=function(i,r){if(r===void 0&&(r=!1),this.keysAtom_,!Re(this.target_,i))return!0;if(de(this)){var s=fe(this,{object:this.proxy_||this.target_,name:i,type:ms});if(!s)return null}try{var a;he();var o=ve(this),l=!1,u=this.values_.get(i),c=void 0;if(!u&&(o||l)){var d;c=(d=Cn(this.target_,i))==null?void 0:d.value}if(r){if(!Reflect.deleteProperty(this.target_,i))return!1}else delete this.target_[i];if(u&&(this.values_.delete(i),u instanceof Qe&&(c=u.value_),ro(u)),this.keysAtom_.reportChanged(),(a=this.pendingKeys_)==null||(a=a.get(i))==null||a.set(i in this.target_),o||l){var f={type:ms,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:c,name:i};o&&ke(this,f)}}finally{pe()}return!0},e.observe_=function(i,r){return ln(this,i)},e.intercept_=function(i){return on(this,i)},e.notifyPropertyAddition_=function(i,r){var s,a=ve(this),o=!1;if(a||o){var l=a||o?{type:Ve,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:i,newValue:r}:null;a&&ke(this,l)}(s=this.pendingKeys_)==null||(s=s.get(i))==null||s.set(!0),this.keysAtom_.reportChanged()},e.ownKeys_=function(){return this.keysAtom_.reportObserved(),Xn(this.target_)},e.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},t}();function Ct(t,e){var n;if(Re(t,P))return t;var i=(n=e==null?void 0:e.name)!=null?n:"ObservableObject",r=new yo(t,new Map,String(i),Lc(e));return Qn(t,P,r),t}var wd=st("ObservableObjectAdministration",yo);function gs(t){return ps[t]||(ps[t]={get:function(){return this[P].getObservablePropValue_(t)},set:function(n){return this[P].setObservablePropValue_(t,n)}})}function oi(t){return Yn(t)?wd(t[P]):!1}function vs(t,e,n){var i;(i=t.target_[Ee])==null||delete i[n]}var Td=bo(0),Cd=function(){var t=!1,e={};return Object.defineProperty(e,"0",{set:function(){t=!0}}),Object.create(e)[0]=1,t===!1}(),Di=0,_o=function(){};function xd(t,e){Object.setPrototypeOf?Object.setPrototypeOf(t.prototype,e):t.prototype.__proto__!==void 0?t.prototype.__proto__=e:t.prototype=e}xd(_o,Array.prototype);var $r=function(t){function e(i,r,s,a){var o;return s===void 0&&(s="ObservableArray"),a===void 0&&(a=!1),o=t.call(this)||this,lt(function(){var l=new Lr(s,r,a,!0);l.proxy_=o,Ma(o,P,l),i&&i.length&&o.spliceWithArray(0,0,i),Cd&&Object.defineProperty(o,"0",Td)}),o}ja(e,t);var n=e.prototype;return n.concat=function(){this[P].atom_.reportObserved();for(var r=arguments.length,s=new Array(r),a=0;a<r;a++)s[a]=arguments[a];return Array.prototype.concat.apply(this.slice(),s.map(function(o){return ai(o)?o.slice():o}))},n[Symbol.iterator]=function(){var i=this,r=0;return Yt({next:function(){return r<i.length?{value:i[r++],done:!1}:{done:!0,value:void 0}}})},Ot(e,[{key:"length",get:function(){return this[P].getArrayLength_()},set:function(r){this[P].setArrayLength_(r)}},{key:Symbol.toStringTag,get:function(){return"Array"}}])}(_o);Object.entries(In).forEach(function(t){var e=t[0],n=t[1];e!=="concat"&&Qn($r.prototype,e,n)});function bo(t){return{enumerable:!1,configurable:!0,get:function(){return this[P].get_(t)},set:function(n){this[P].set_(t,n)}}}function Rd(t){Oe($r.prototype,""+t,bo(t))}function So(t){if(t>Di){for(var e=Di;e<t+100;e++)Rd(e);Di=t}}So(1e3);function Fd(t,e,n){return new $r(t,e,n)}function ur(t,e){if(typeof t=="object"&&t!==null){if(ai(t))return e!==void 0&&B(23),t[P].atom_;if(Tt(t))return t.atom_;if(ot(t)){if(e===void 0)return t.keysAtom_;var n=t.data_.get(e)||t.hasMap_.get(e);return n||B(25,e,cr(t)),n}if(oi(t)){if(!e)return B(26);var i=t[P].values_.get(e);return i||B(27,e,cr(t)),i}if(Dr(t)||ii(t)||Dn(t))return t}else if(ye(t)&&Dn(t[P]))return t[P];B(28)}function Dd(t,e){if(t||B(29),Dr(t)||ii(t)||Dn(t)||ot(t)||Tt(t))return t;if(t[P])return t[P];B(24,t)}function cr(t,e){var n;if(e!==void 0)n=ur(t,e);else{if(ri(t))return t.name;oi(t)||ot(t)||Tt(t)?n=Dd(t):n=ur(t)}return n.name_}function lt(t){var e=at(),n=ti(!0);he();try{return t()}finally{pe(),ni(n),Fe(e)}}var ks=Jn.toString;function Mr(t,e,n){return n===void 0&&(n=-1),dr(t,e,n)}function dr(t,e,n,i,r){if(t===e)return t!==0||1/t===1/e;if(t==null||e==null)return!1;if(t!==t)return e!==e;var s=typeof t;if(s!=="function"&&s!=="object"&&typeof e!="object")return!1;var a=ks.call(t);if(a!==ks.call(e))return!1;switch(a){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=ys(t),e=ys(e);var o=a==="[object Array]";if(!o){if(typeof t!="object"||typeof e!="object")return!1;var l=t.constructor,u=e.constructor;if(l!==u&&!(ye(l)&&l instanceof l&&ye(u)&&u instanceof u)&&"constructor"in t&&"constructor"in e)return!1}if(n===0)return!1;n<0&&(n=-1),i=i||[],r=r||[];for(var c=i.length;c--;)if(i[c]===t)return r[c]===e;if(i.push(t),r.push(e),o){if(c=t.length,c!==e.length)return!1;for(;c--;)if(!dr(t[c],e[c],n-1,i,r))return!1}else{var d=Object.keys(t),f;if(c=d.length,Object.keys(e).length!==c)return!1;for(;c--;)if(f=d[c],!(Re(e,f)&&dr(t[f],e[f],n-1,i,r)))return!1}return i.pop(),r.pop(),!0}function ys(t){return ai(t)?t.slice():At(t)||ot(t)||Ce(t)||Tt(t)?Array.from(t.entries()):t}function Yt(t){return t[Symbol.iterator]=Id,t}function Id(){return this}["Symbol","Map","Set"].forEach(function(t){var e=Da();typeof e[t]=="undefined"&&B("MobX requires global '"+t+"' to be available or polyfilled")});typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Zc,extras:{getDebugName:cr},$mobx:P});function Pd(t,e=[]){M.useEffect(()=>{const n=si(t);return()=>n()},e)}function No(t,e={}){const{defaultValue:n,deps:i=[]}=e,r=M.useMemo(()=>t,i),[s,a]=M.useState(()=>r()||n);return M.useEffect(()=>{const o=si(()=>a(r()));return()=>o()},[r,...i]),s}function Ld(t,e,n=[]){const i=M.useMemo(()=>t,n),r=M.useMemo(()=>e,n);M.useEffect(()=>{const s=ad(i,r);return()=>s()},[i,r])}let Ur=new Map;const fr=M.createContext(Ur),$d=({children:t,stores:e})=>{const n=M.useContext(fr),i=M.useMemo(()=>{const r=new Map;return e.forEach(s=>r.set(s.class,s.value)),Ur=new Map([...n,...r])},[]);return hu.jsx(fr.Provider,{value:i,children:t})};function Md(t){return M.useContext(fr).get(t)}function Ud(t){return Ur.get(t)}class Eo{constructor(e,n){F(this,"logger");F(this,"channel");F(this,"listeners",new Map);F(this,"eventQueue",new Map);this.logger=Ie.withPrefix(n,"EventBus");try{this.logger.debug(`Creating BroadcastChannel with name "${e}"`),this.channel=new BroadcastChannel(e),this.channel.onmessage=i=>this.handleMessage(i),this.channel.onmessageerror=i=>this.logger.error("NizzaBroadcastChannel error:",i)}catch(i){throw this.logger.error("Failed to create NizzaBroadcastChannel:",i),i}}on(e,n){return this.logger.debug(`Subscribing to pattern "${e}"`),this.subscribeToEvent(e,n),{off:()=>this.unsubscribeFromEvent(e,n)}}emit(e,n,i={}){this.logger.debug(`Emitting event "${e}" with data`,n),this.emitEvent(e,n,i)}handleMessage(e){const n=e.data,{name:i}=n;this.logger.debug(`Received message "${i}" with data`,n);for(const[r,s]of this.listeners.entries())this.matchWildcard(r,i)&&(this.logger.debug(`Matching pattern "${r}" for event "${i}"`),s.forEach(a=>a({...n,wildcard:r})))}subscribeToEvent(e,n){if(typeof e!="string"||typeof n!="function"){const r=new Error("Invalid arguments");throw this.logger.error(r),r}this.listeners.has(e)||(this.logger.debug(`Adding new pattern "${e}"`),this.listeners.set(e,new Set));const i=Array.from(this.eventQueue).filter(([r])=>{const s=this.matchWildcard(e,r);return s&&(this.eventQueue.delete(r),this.logger.debug(`Dequeued pending events for "${r}".`)),s}).flatMap(([,r])=>r);for(const[r,s]of this.listeners.entries())this.matchWildcard(r,e)&&(this.logger.debug(`Adding listener to pattern "${r}"`),s.add(n),i.length&&(this.logger.debug(`Delivering pending events for "${e}".`),i.forEach(a=>{n({...a,wildcard:r})})))}emitEvent(e,n,i){if(typeof e!="string"){const a=new Error("Invalid arguments");throw this.logger.error(a),a}const r={name:e,data:n,attrs:i},s=Array.from(this.getMatchingListeners(e));if(s.length){this.logger.debug(`Delivering event "${e}" to listeners`);for(const[a,o]of s)o({...r,wildcard:a})}else this.logger.debug(`No listeners for event "${e}", enqueuing`),this.eventQueue.has(e)||this.eventQueue.set(e,[]),this.eventQueue.get(e).push(r);this.logger.debug("Posting message to channel",r),this.channel.postMessage(r)}*getMatchingListeners(e){this.logger.debug(`Getting matching listeners for event "${e}"`);for(const[n,i]of this.listeners.entries())if(this.matchWildcard(n,e))for(const r of i)yield[n,r]}unsubscribeFromEvent(e,n){if(this.listeners.has(e)){this.logger.debug(`Unsubscribing from event "${e}"`);const i=this.listeners.get(e);i.delete(n),i.size===0&&(this.logger.debug(`No more listeners for event "${e}", deleting`),this.listeners.delete(e))}}matchWildcard(e,n){const i=e.replace(/\*/g,"[^:]*").replace(/\*\*/g,".*"),s=new RegExp(`^${i}$`).test(n);return this.logger.debug(`Wildcard "${e}" matches with pattern "${n}": ${s}`),s}}const Vd="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let jd=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t));for(;t--;)e+=Vd[n[t]&63];return e};const Ln=(t=8)=>jd(t),Ao=(t,e=!1)=>{const n=Object.entries(t).reduce((i,[r,s])=>s!==void 0&&(!e||s!==null)?`${i}${i?"&":""}${r}=${s}`:i,"");return n?`?${n}`:""},Oo=t=>{const e=document.getElementById(t);return e?new URL(e.src).searchParams:new URLSearchParams};function Bd(){const t=new Error().stack.split(`
27
- `);return t.length<3?"":t[2].trim().substring(3)}function Hd(t){return new Promise(e=>setTimeout(e,t))}var Vr=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function jr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var wo={exports:{}};(function(t){(function(e,n){t.exports?t.exports=n():e.log=n()})(Vr,function(){var e=function(){},n="undefined",i=typeof window!==n&&typeof window.navigator!==n&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"],s={},a=null;function o(m,p){var h=m[p];if(typeof h.bind=="function")return h.bind(m);try{return Function.prototype.bind.call(h,m)}catch{return function(){return Function.prototype.apply.apply(h,[m,arguments])}}}function l(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function u(m){return m==="debug"&&(m="log"),typeof console===n?!1:m==="trace"&&i?l:console[m]!==void 0?o(console,m):console.log!==void 0?o(console,"log"):e}function c(){for(var m=this.getLevel(),p=0;p<r.length;p++){var h=r[p];this[h]=p<m?e:this.methodFactory(h,m,this.name)}if(this.log=this.debug,typeof console===n&&m<this.levels.SILENT)return"No console available for logging"}function d(m){return function(){typeof console!==n&&(c.call(this),this[m].apply(this,arguments))}}function f(m,p,h){return u(m)||d.apply(this,arguments)}function v(m,p){var h=this,_,N,b,E="loglevel";typeof m=="string"?E+=":"+m:typeof m=="symbol"&&(E=void 0);function O(C){var z=(r[C]||"silent").toUpperCase();if(!(typeof window===n||!E)){try{window.localStorage[E]=z;return}catch{}try{window.document.cookie=encodeURIComponent(E)+"="+z+";"}catch{}}}function x(){var C;if(!(typeof window===n||!E)){try{C=window.localStorage[E]}catch{}if(typeof C===n)try{var z=window.document.cookie,re=encodeURIComponent(E),k=z.indexOf(re+"=");k!==-1&&(C=/^([^;]+)/.exec(z.slice(k+re.length+1))[1])}catch{}return h.levels[C]===void 0&&(C=void 0),C}}function R(){if(!(typeof window===n||!E)){try{window.localStorage.removeItem(E)}catch{}try{window.document.cookie=encodeURIComponent(E)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function D(C){var z=C;if(typeof z=="string"&&h.levels[z.toUpperCase()]!==void 0&&(z=h.levels[z.toUpperCase()]),typeof z=="number"&&z>=0&&z<=h.levels.SILENT)return z;throw new TypeError("log.setLevel() called with invalid level: "+C)}h.name=m,h.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},h.methodFactory=p||f,h.getLevel=function(){return b!=null?b:N!=null?N:_},h.setLevel=function(C,z){return b=D(C),z!==!1&&O(b),c.call(h)},h.setDefaultLevel=function(C){N=D(C),x()||h.setLevel(C,!1)},h.resetLevel=function(){b=null,R(),c.call(h)},h.enableAll=function(C){h.setLevel(h.levels.TRACE,C)},h.disableAll=function(C){h.setLevel(h.levels.SILENT,C)},h.rebuild=function(){if(a!==h&&(_=D(a.getLevel())),c.call(h),a===h)for(var C in s)s[C].rebuild()},_=D(a?a.getLevel():"WARN");var q=x();q!=null&&(b=D(q)),c.call(h)}a=new v,a.getLogger=function(p){if(typeof p!="symbol"&&typeof p!="string"||p==="")throw new TypeError("You must supply a name when creating a logger.");var h=s[p];return h||(h=s[p]=new v(p,a.methodFactory)),h};var g=typeof window!==n?window.log:void 0;return a.noConflict=function(){return typeof window!==n&&window.log===a&&(window.log=g),a},a.getLoggers=function(){return s},a.default=a,a})})(wo);var hr=wo.exports;const Ii=jr(hr);var To={exports:{}};(function(t){(function(e,n){t.exports?t.exports=n():e.prefix=n(e)})(Vr,function(e){var n=function(c){for(var d=1,f=arguments.length,v;d<f;d++)for(v in arguments[d])Object.prototype.hasOwnProperty.call(arguments[d],v)&&(c[v]=arguments[d][v]);return c},i={template:"[%t] %l:",levelFormatter:function(c){return c.toUpperCase()},nameFormatter:function(c){return c||"root"},timestampFormatter:function(c){return c.toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/,"$1")},format:void 0},r,s={},a=function(c){if(!c||!c.getLogger)throw new TypeError("Argument is not a root logger");r=c},o=function(c,d){if(!c||!c.setLevel)throw new TypeError("Argument is not a logger");var f=c.methodFactory,v=c.name||"",g=s[v]||s[""]||i;function m(p,h,_){var N=f(p,h,_),b=s[_]||s[""],E=b.template.indexOf("%t")!==-1,O=b.template.indexOf("%l")!==-1,x=b.template.indexOf("%n")!==-1;return function(){for(var R="",D=arguments.length,q=Array(D),C=0;C<D;C++)q[C]=arguments[C];if(v||!s[_]){var z=b.timestampFormatter(new Date),re=b.levelFormatter(p),k=b.nameFormatter(_);b.format?R+=b.format(re,k,z):(R+=b.template,E&&(R=R.replace(/%t/,z)),O&&(R=R.replace(/%l/,re)),x&&(R=R.replace(/%n/,k))),q.length&&typeof q[0]=="string"?q[0]=R+" "+q[0]:q.unshift(R)}N.apply(void 0,q)}}return s[v]||(c.methodFactory=m),d=d||{},d.template&&(d.format=void 0),s[v]=n({},g,d),c.setLevel(c.getLevel()),r||c.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"),c},l={reg:a,apply:o},u;return e&&(u=e.prefix,l.noConflict=function(){return e.prefix===l&&(e.prefix=u),l}),l})})(To);var qd=To.exports;const _s=jr(qd);var je;let Ie=(je=class{constructor(e=""){F(this,"provider",Ii);F(this,"defaultLevel",this.getDefaultLevel());this.namePrefix=e,this.namePrefix=e?`${e}-`:"",this.provider.setDefaultLevel(this.defaultLevel),_s.reg(Ii),_s.apply(Ii,{template:"%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=this.provider.getLogger(n),r=localStorage.getItem(`loglevel:${n}`);return i.setLevel(r||this.defaultLevel),i}static withPrefix(e,n){const i=/\(\w+\)/,r={get(s,a){const o=s[a];return typeof o=="function"&&je.LOG_METHODS.includes(a)?(...l)=>(typeof l[0]=="string"&&!i.test(l[0])&&(l[0]=`(${n}) ${l[0]}`),o.apply(s,l)):o}};return new Proxy(e,r)}getDefaultLevel(){var i;const e=localStorage.getItem("loglevel");return(i=je.LOG_METHODS.reduce((r,s)=>{const a=s.toUpperCase();return r[a]=hr.levels[a],r},{})[e==null?void 0:e.toUpperCase()])!=null?i:hr.levels.INFO}},F(je,"LOG_METHODS",["trace","debug","info","warn","error","log"]),je);const ce=class ce{constructor(){F(this,"instanceId",Ln());F(this,"log",new Ie("nz"));F(this,"coreLogger",this.log.createLogger("core"));F(this,"_config",null);F(this,"_account");F(this,"_accountStatus","idle");F(this,"_productDataSource");F(this,"_eventBus",new Eo("nizza",this.coreLogger));F(this,"activeAccountFetchId",null);this.coreLogger=Ie.withPrefix(this.coreLogger,`NizzaStore:${this.instanceId}`),yd(this,{_config:W,_account:W,_productDataSource:W,_accountStatus:W,config:Ue,account:Ue,accountName:Ue,accountStatus:Ue,setAccount:se,configure:se,refetchAccount:se,setProductDataSource:se,setAddToCartConfig:se,setProductId:se},{name:"NizzaStore",autoBind:!0}),this.refetchAccount=this.refetchAccount.bind(this)}static instance(){var n;if(!!((n=window==null?void 0:window.nizza)!=null&&n.store))ce._instance=window.nizza.store;else{const i=new ce;ce._instance=i,ce._instance.coreLogger.debug("Created new NizzaStore instance")}return window.nizza||(window.nizza={},window.nz={},ce._instance.coreLogger.debug("Initialized nizza window object")),window.nizza.store=ce._instance,window.nz=window.nizza,ce._instance}async configure(e){try{this.coreLogger.debug("Running configure with config:",e),await this.updateConfig(e)}catch(n){this.setAccountStatus("error"),this.coreLogger.error("Error running configure",n)}}async updateConfig(e={}){var r,s;const{account:n,authToken:i}=(r=this._config)!=null?r:{};this._config={...this._config,...e},(s=this._config)!=null&&s.account&&(n!==this._config.account||i!==this._config.authToken)?(this.coreLogger.debug(`Fetching account data for account: ${this._config.account}, authToken provided: ${!!this._config.authToken}`),await this.fetchAccount(this._config.account,this._config.authToken)):this.coreLogger.debug("Skipped fetching account data as the account or authToken did not change"),e.getProductDataSource&&this.setProductDataSource(await e.getProductDataSource())}async fetchAccount(e,n){this.setAccountStatus("loading");const i=Ln();this.activeAccountFetchId=i;try{const r=await qo(e,n);if(this.activeAccountFetchId!==i){this.coreLogger.debug("Fetch account request was superseded by a newer request");return}this.setAccount(r),this.setAccountStatus("success"),this.coreLogger.debug("Account fetched and set successfully:",r)}catch(r){this.activeAccountFetchId===i&&(this.setAccountStatus("error"),this.coreLogger.debug("Error fetching account:",r))}}setAccount(e){this._account=e}setAccountStatus(e){this._accountStatus=e}setProductDataSource(e){this._productDataSource=e}setProductId(e){this._config&&(this._config.productId=e)}setOrderFormId(e){this._config&&(this._config.orderFormId=e)}setAddToCartConfig(e){if(!this._config){const n="You cannot set addToCartConfig before running configure()";throw this.coreLogger.error(n),new Error(n)}this._config.addToCartConfig=e}setAuthToken(e){this.updateConfig({authToken:e})}async refetchAccount(){var e;(e=this._config)!=null&&e.account&&await this.fetchAccount(this._config.account,this._config.authToken)}get version(){return ce.version}get config(){return this._config}get account(){return this._account}get accountStatus(){return this._accountStatus}get accountName(){var e;return(e=this._config)==null?void 0:e.account}isPvtAccount(e){var n;return!!(e&&((n=this._config)!=null&&n.authToken))}isPubAccount(e){var n;return!!(e&&!((n=this._config)!=null&&n.authToken))}get productDataSource(){return this._productDataSource}get eventBus(){return this._eventBus}};F(ce,"version","7"),F(ce,"_instance");let $n=ce;const ut=t=>{const e=$n.instance();return md(()=>!!e.account,()=>t==null?void 0:t(e)),e};function Co(){return M.useMemo(()=>ut(),[])}function xo(t,e){const n=Co();return No(()=>t(n),e)}const{coreLogger:zd}=ut(),Gd=Ie.withPrefix(zd,"CustomFetch");async function St(t){const{url:e,method:n="GET",body:i,raw:r=!1,contentTypeJson:s=!0,timeout:a,...o}=t,l=new Headers({...s?{"content-type":"application/json"}:{},...t.headers});try{const u=new AbortController,{signal:c}=u;let d;const f=fetch(e,{method:n,headers:l,body:i,signal:c,...o});a&&(d=setTimeout(()=>{u.abort()},a));const v=await f;if(r)return v;const g=await v.json();if(clearTimeout(d),!v.ok){const m=g?JSON.stringify(g):v.statusText;throw new Error(m)}return g}catch(u){throw Gd.debug(u),u}}const Kd=t=>St({...t,contentTypeJson:!1,raw:!1});function Wd(t,e,n){fetch(e).then(i=>i.blob()).then(i=>Ro(i,`${t}.${n}`))}const Ro=(t,e,n)=>{const i=[t],r=new Blob(i,{type:n!=null?n:"application/octet-stream"});if(typeof window.navigator.msSaveBlob!="undefined")return window.navigator.msSaveBlob(r,e);const s=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(r):window.webkitURL.createObjectURL(r),a=document.createElement("a");return a.style.display="none",a.href=s,a.setAttribute("download",e),typeof a.download=="undefined"&&a.setAttribute("target","_blank"),document.body.appendChild(a),a.click(),setTimeout(()=>{document.body.removeChild(a),window.URL.revokeObjectURL(s)},200)},{coreLogger:Jd}=ut(),Yd=Ie.withPrefix(Jd,"getClientTimeZone");function Qd(){var i,r,s;let t=null,e=null,n=null;try{t=(s=(r=(i=Intl.DateTimeFormat())==null?void 0:i.resolvedOptions())==null?void 0:r.timeZone)!=null?s:null;const a=-new Date().getTimezoneOffset();n=a;const o=a>=0?"+":"-",l=String(Math.floor(Math.abs(a)/60)).padStart(2,"0"),u=String(Math.abs(a)%60).padStart(2,"0");e=`${o}${l}:${u}`}catch{Yd.error("Error obtaining time zone or offset")}return{offset:e,offsetValue:n,value:t,country:null,included:null,label:null}}var Fo=(t=>(t.VTEX="VTEX",t.VTEX_IO="VTEX-IO",t.VTEX_CMS="PORTAL-VTEX",t.PLATFORM="PLATFORM",t.UNKNOWN="UNKNOWN",t))(Fo||{}),Do=(t=>(t.PLATFORM="platform_module",t.ADENDA="subscription_module",t.APP_STORE="app_store",t))(Do||{}),Io=(t=>(t.ACTIVE="active_contract",t.INACTIVE="inactive_contract",t))(Io||{}),Po=(t=>(t.LITE="lite",t.STANDARD="standard",t.PRO="pro",t))(Po||{}),Lo=(t=>(t.LITE="PLAN_LITE",t.STANDARD="PLAN_ESTANDAR",t.PRO="PLAN_PRO",t.NONE="NO_PLAN",t))(Lo||{}),$o=(t=>(t.PAST="past",t.LIVE="live",t.FUTURE="future",t))($o||{});class Mo extends rt{constructor(e){super("CREATE_PLAN_ERROR",`Error creating plan: ${e.plan}`,e)}}const bs=`${rn.apiUrls.restV1}/plans`;class Uo{async get(e){const i=`/info${Ao({planType:e})}`,r=bs+i,{data:s}=await St({url:r});return s}async create(e){const n=`${bs}/create`,{success:i}=await St({url:n,method:"POST",body:JSON.stringify(e)});if(!i)throw new Mo(e)}}function Xd(t){const{host:e,account:n,username:i,createdAt:r,subscriptionType:s,installationDateApp:a,...o}=t;return{...o,account:n,host:e!=null?e:null,username:i!=null?i:n,createdAt:new Date(r),subscriptionType:s!=null?s:null,installationDateApp:new Date(a)}}function Zd(t){const{host:e,...n}=t;return{...n,host:e!=null?e:null,plan:{}}}const ef=`${rn.apiUrls.restV1}/accounts/v2`;class Vo{async get(e){const n=`${ef}/${e}`,{data:i}=await St({url:n});return i?Zd(i):null}}const tf=`${rn.apiUrls.restV1}/accounts/v2/pvt`;class nf{async get(e,n){const i=`${tf}/${e}`,{data:r}=await St({url:i,headers:{authorization:`Bearer ${n}`}});return r?Xd(r):null}}class jo{constructor(e,n,i){this.publicAccountRepo=e,this.privateAccountRepo=n,this.accountPlanRepo=i}async get(e,n){try{const i=n?await this.privateAccountRepo.get(e,n):await this.publicAccountRepo.get(e);if(!i)throw new er(e);const r=await this.accountPlanRepo.get(i.descriptionPlan);if(!r)throw new er(i.descriptionPlan);return{...i,plan:r}}catch(i){throw new Rr(i)}}}const rf=new Vo,sf=new nf,af=new Uo,Bo=new jo(rf,sf,af),Ho=()=>{const{account:t,accountName:e,accountStatus:n,refetchAccount:i,isPvtAccount:r,isPubAccount:s}=xo(u=>({account:u.account,accountName:u.accountName,accountStatus:u.accountStatus,refetchAccount:u.refetchAccount,isPvtAccount:u.isPvtAccount,isPubAccount:u.isPubAccount})),a=["idle","loading"].includes(n);return{account:t,accountName:e,isLoading:a,isError:n==="error",isSuccess:n==="success",accountStatus:n,refetchAccount:i,isPvtAccount:r,isPubAccount:s}};async function qo(t,e){return Bo.get(t,e)}var zo=(t=>(t.CREATED="CREATED",t.STARTING="STARTING",t.LIVE="LIVE",t.FINALIZED="FINALIZED",t))(zo||{});const of={ALL:"*",CORE:"core:**",ADD_TO_CART_HOOKS:"core:addToCartHooks:**",LIVE_STREAMING_EVENT:"event:**",EVENT_CHAT:"event:chat:**",EVENT_PRODUCTS:"event:products:**",CUSTOMIZE_LIVE:"customize-live:**",PLAYER:"player:**",SNACK_SIZE_VIDEO:"ssv:**",SNACK_SIZE_VIDEO_ADMIN:"ssv-admin:**",UI:"ui:**",UTILS:"utils:**"},Go={EVENT_STATUS_CHANGED:"event:statusChanged",ATCH_ACTION_EXECUTED:"core:addToCartHooks:actionExecuted"};var Ko=(t=>(t.English="en",t.Spanish="es",t.Portuguese="pt",t))(Ko||{}),Wo=(t=>(t.COMBO="Combo",t.BADGE="Badged",t))(Wo||{}),Jo=(t=>(t.VTEX="VTEX",t.PLATFORM="platform",t.CACE="CACE",t.GLOBAL_PAGE="globalPage",t.CUSTOMIZATION="customization",t.FAST_STORE="faststore",t.UNKNOWN="unknown",t))(Jo||{});const lf=4;var Yo=(t=>(t.Created="CREATED",t.Finalized="FINALIZED",t.Live="LIVE",t.Starting="STARTING",t))(Yo||{}),Qo=(t=>(t.Add="add",t.Remove="remove",t))(Qo||{}),Xo=(t=>(t.Active="active",t.Inactive="inactive",t))(Xo||{});const uf={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"}}]}}]}}]}}]},cf={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"}}]}}]}}]}}]},df={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"}}]}}]}}]}}]},ff={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"}}]}}]}}]}}]},hf={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"}}]}}]}}]}}]},pf={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"}}]}}]}}]}}]},mf={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"}}]}}]}}]}}]},gf={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"}}]}}]}}]}}]},vf={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"}}]}}]}}]}}]},kf={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"}}]}}]}}]}}]},yf={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"}}]}}]}}]}}]},_f={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"}}]}}]}}]}}]},bf={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"}}]}}]}}]}}]},Zo={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"}}]}}]}}]}}]},Sf={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"}}]}}]}}]}}]},Nf={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"highlightProduct"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"HighlightProductInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"highlightProduct"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"HighlightProductSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Ef={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"}}]}}]}}]}}]},Af={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"}}]}}]}}]}}]},Of={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"}}]}}]}}]}}]},wf={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"sendAddToCart"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"AddToCartInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sendAddToCart"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AddToCartSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Tf={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"}}]}}]}}]}}]},Cf={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"}}]}}]}}]}}]},xf={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreatePlayList"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreatePlayListInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createPlayList"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreatePlayListSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Rf={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"}}]}}]}}]}}]},Ff={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"}}]}}]}}]}}]},Df={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"}}]}}]}}]}}]},If={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"}}]}}]}}]}}]},Pf={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"}}]}}]}}]}}]},Lf={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetPlayLists"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getPlayLists"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PlayListArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"created"}},{kind:"Field",name:{kind:"Name",value:"videoAmount"}},{kind:"Field",name:{kind:"Name",value:"productAmount"}},{kind:"Field",name:{kind:"Name",value:"updated"}},{kind:"Field",name:{kind:"Name",value:"videos"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"order"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},$f={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"}}]}}]}}]}}]}}]},Mf={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"}}]}}]}}]}}]},Uf={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdatePlayList"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdatePlayListInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updatePlayList"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"UpdatePlayListSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Vf={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"}}]}}]}}]}}]},jf={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetPlayList"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetPlayListQueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getPlayList"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PlayListData"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"videos"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"productId"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}},{kind:"Field",name:{kind:"Name",value:"order"}},{kind:"Field",name:{kind:"Name",value:"productName"}},{kind:"Field",name:{kind:"Name",value:"productImageUrl"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Bf=Object.freeze(Object.defineProperty({__proto__:null,AddCollectionDocument:uf,AppendProductsToSnackVideoDocument:Cf,BlockUserDocument:kf,ChangeAccountUsernameDocument:yf,CreatePlayListDocument:xf,CreateSnackVideoBatchDocument:Rf,DeleteAllCustomizationDocument:Ef,DeleteChatMessageDocument:_f,DeleteCollectionDocument:cf,DeleteRelationshipWithSnackVideoDocument:Ff,DeleteSnackVideoDocument:Df,EventStatus:Yo,FindByProductSnackVideoDocument:Vf,FindCollectionDocument:df,FindManySnackVideosDocument:If,FindMinimalEventDocument:gf,GetAllChatMessageDocument:bf,GetAllCollectionsDocument:ff,GetAllCustomizationDocument:Af,GetAllSnackVideosDocument:Pf,GetChatRoomTokenDocument:Zo,GetPlayListDocument:jf,GetPlayListsDocument:Lf,GetSnackVideoRelationshipsDocument:$f,GetTimeLineDocument:Tf,HighlightProductDocument:Nf,ManageCollectionProductDocument:hf,Methods:Qo,PinChatMessageDocument:Sf,SearchCollectionsDocument:pf,SearchMinimalEventsDocument:vf,SearchSnackVideosDocument:Mf,SendAddToCartDocument:wf,Status:Xo,UpdateCollectionDocument:mf,UpdateCustomizationDocument:Of,UpdatePlayListDocument:Uf},Symbol.toStringTag,{value:"Module"}));var li=(t=>(t.OPEN_TAB="openTab",t.OPEN_VARIATION_SELECTOR="openVariationSelector",t.ADD_TO_CART="addToCart",t))(li||{});function Hf(t){return{class:t,_value:null,get value(){return this._value||(this._value=new t,Object.freeze(this)),this._value}}}var Pe=(t=>(t.Local="local",t.VtexLegacy="vtexlegacy",t.VtexIO="vtexio",t.VtexFastStore="faststore",t.Platform="platform",t.External="external",t))(Pe||{}),Br=(t=>(t.PROD="prod",t.DEV="dev",t.LOCAL="local",t))(Br||{});const{coreLogger:qf}=ut(),pr=Ie.withPrefix(qf,"addToCartHooks"),Pi="addToCartHooks.notification.error",mr={errorAddingToCart:Pi,errorOpeningVariationSelector:Pi,errorOpeningNewTab:Pi,successAddingToCart:"addToCartHooks.notification.success"};async function zf(t){const e={...t,action:{type:li.ADD_TO_CART,exec:()=>pr.error("action no implemented in validate hook")}};try{const n=await Gf(e),i=await Kf(n);await Wf(i)}catch(n){pr.error("error unhandled",n)}}async function Gf(t){var s,a;const{context:e,userAddToCartConfig:n}=t,i=(s=n==null?void 0:n.hooks)==null?void 0:s.transform;let r=t.product;if(i)try{r=await i({product:{...r},data:(a=e.data)!=null?a:{}})}catch(o){Mn("transform",o)}return{...t,product:r}}async function Kf(t){var l,u;const{context:e,hookStrategy:n,userAddToCartConfig:i,product:r}=t,s=el(t),a=(l=i==null?void 0:i.hooks)==null?void 0:l.validate;let o=n.validate({...t,actionFactory:s});if(a)try{o=await a({product:{...r},defaultAction:{...o},action:s,data:(u=e.data)!=null?u:{}})}catch(c){Mn("validate",c)}return{...t,action:o,actionFactory:s}}async function Wf(t){var p;const{eventBus:e}=ut(),{product:n,userAddToCartConfig:i,notifyFactory:r,action:s,actionFactory:a}=t,{isVariationSelectorOpen:o,data:l={}}=t.context,u=(p=i==null?void 0:i.hooks)==null?void 0:p.end,c=s.type===li.ADD_TO_CART;let d=null,f=!1;const v=()=>{!c||!o||a.openVariationSelector(!1).exec()},g=()=>{!c||f||(d?r.error(mr.errorAddingToCart):r.success(mr.successAddingToCart))},m=()=>{const h={product:n,actionType:s.type,success:!d,error:d};e.emit(Go.ATCH_ACTION_EXECUTED,h)};try{if(!s.type||!s.exec)throw new Error("Invalid action object, missing keys 'type' or 'exec'");await s.exec()}catch(h){Mn("end",h),d=h}if(u)try{f=!!await u({data:l,error:d,notify:r,actionExecuted:s})}catch(h){Mn("end",h)}v(),g(),m()}function el(t){const{actionFactory:e,userAddToCartConfig:n}=t,i=r=>Object.entries(r!=null?r:{}).reduce((s,[a,o])=>({...s,[a]:l=>({type:a,exec:()=>o(l)})}),{});return{...i(e),...i(n==null?void 0:n.actionFactory)}}function Mn(t,e){pr.error(`addToCartHooks error running ${t}: `,e)}class tl{constructor(e){F(this,"aggregate");F(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 nl(t){return new tl(t)}class Jf{constructor(e){F(this,"_value");e!==void 0&&(this._value=e)}get value(){return this._value}}var ee=(t=>(t.GENERAL_ERROR="GENERAL_ERROR",t.AXIOS_ERROR="AXIOS_ERROR",t.NETWORK_ERROR="NETWORK_ERROR",t.CONFIG_ERROR="CONFIG_ERROR",t.TIMEOUT_ERROR="TIMEOUT_ERROR",t.AUTH_ERROR="AUTH_ERROR",t.NOT_FOUND="NOT_FOUND",t.VALIDATION_ERROR="VALIDATION_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.BAD_REQUEST="BAD_REQUEST",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.CONFLICT="CONFLICT",t.GONE="GONE",t.UNSUPPORTED_MEDIA_TYPE="UNSUPPORTED_MEDIA_TYPE",t.TOO_MANY_REQUESTS="TOO_MANY_REQUESTS",t.INTERNAL_SERVER_ERROR="INTERNAL_SERVER_ERROR",t.SERVICE_UNAVAILABLE="SERVICE_UNAVAILABLE",t))(ee||{});function il(t,e){return function(){return t.apply(e,arguments)}}const{toString:Yf}=Object.prototype,{getPrototypeOf:Hr}=Object,ui=(t=>e=>{const n=Yf.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Se=t=>(t=t.toLowerCase(),e=>ui(e)===t),ci=t=>e=>typeof e===t,{isArray:xt}=Array,Qt=ci("undefined");function Qf(t){return t!==null&&!Qt(t)&&t.constructor!==null&&!Qt(t.constructor)&&le(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const rl=Se("ArrayBuffer");function Xf(t){let e;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&rl(t.buffer),e}const Zf=ci("string"),le=ci("function"),sl=ci("number"),di=t=>t!==null&&typeof t=="object",eh=t=>t===!0||t===!1,Sn=t=>{if(ui(t)!=="object")return!1;const e=Hr(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},th=Se("Date"),nh=Se("File"),ih=Se("Blob"),rh=Se("FileList"),sh=t=>di(t)&&le(t.pipe),ah=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||le(t.append)&&((e=ui(t))==="formdata"||e==="object"&&le(t.toString)&&t.toString()==="[object FormData]"))},oh=Se("URLSearchParams"),[lh,uh,ch,dh]=["ReadableStream","Request","Response","Headers"].map(Se),fh=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function un(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t=="undefined")return;let i,r;if(typeof t!="object"&&(t=[t]),xt(t))for(i=0,r=t.length;i<r;i++)e.call(null,t[i],i,t);else{const s=n?Object.getOwnPropertyNames(t):Object.keys(t),a=s.length;let o;for(i=0;i<a;i++)o=s[i],e.call(null,t[o],o,t)}}function al(t,e){e=e.toLowerCase();const n=Object.keys(t);let i=n.length,r;for(;i-- >0;)if(r=n[i],e===r.toLowerCase())return r;return null}const Je=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,ol=t=>!Qt(t)&&t!==Je;function gr(){const{caseless:t}=ol(this)&&this||{},e={},n=(i,r)=>{const s=t&&al(e,r)||r;Sn(e[s])&&Sn(i)?e[s]=gr(e[s],i):Sn(i)?e[s]=gr({},i):xt(i)?e[s]=i.slice():e[s]=i};for(let i=0,r=arguments.length;i<r;i++)arguments[i]&&un(arguments[i],n);return e}const hh=(t,e,n,{allOwnKeys:i}={})=>(un(e,(r,s)=>{n&&le(r)?t[s]=il(r,n):t[s]=r},{allOwnKeys:i}),t),ph=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),mh=(t,e,n,i)=>{t.prototype=Object.create(e.prototype,i),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},gh=(t,e,n,i)=>{let r,s,a;const o={};if(e=e||{},t==null)return e;do{for(r=Object.getOwnPropertyNames(t),s=r.length;s-- >0;)a=r[s],(!i||i(a,t,e))&&!o[a]&&(e[a]=t[a],o[a]=!0);t=n!==!1&&Hr(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},vh=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const i=t.indexOf(e,n);return i!==-1&&i===n},kh=t=>{if(!t)return null;if(xt(t))return t;let e=t.length;if(!sl(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},yh=(t=>e=>t&&e instanceof t)(typeof Uint8Array!="undefined"&&Hr(Uint8Array)),_h=(t,e)=>{const i=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=i.next())&&!r.done;){const s=r.value;e.call(t,s[0],s[1])}},bh=(t,e)=>{let n;const i=[];for(;(n=t.exec(e))!==null;)i.push(n);return i},Sh=Se("HTMLFormElement"),Nh=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,r){return i.toUpperCase()+r}),Ss=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Eh=Se("RegExp"),ll=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),i={};un(n,(r,s)=>{let a;(a=e(r,s,t))!==!1&&(i[s]=a||r)}),Object.defineProperties(t,i)},Ah=t=>{ll(t,(e,n)=>{if(le(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const i=t[n];if(le(i)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Oh=(t,e)=>{const n={},i=r=>{r.forEach(s=>{n[s]=!0})};return xt(t)?i(t):i(String(t).split(e)),n},wh=()=>{},Th=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,Li="abcdefghijklmnopqrstuvwxyz",Ns="0123456789",ul={DIGIT:Ns,ALPHA:Li,ALPHA_DIGIT:Li+Li.toUpperCase()+Ns},Ch=(t=16,e=ul.ALPHA_DIGIT)=>{let n="";const{length:i}=e;for(;t--;)n+=e[Math.random()*i|0];return n};function xh(t){return!!(t&&le(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Rh=t=>{const e=new Array(10),n=(i,r)=>{if(di(i)){if(e.indexOf(i)>=0)return;if(!("toJSON"in i)){e[r]=i;const s=xt(i)?[]:{};return un(i,(a,o)=>{const l=n(a,r+1);!Qt(l)&&(s[o]=l)}),e[r]=void 0,s}}return i};return n(t,0)},Fh=Se("AsyncFunction"),Dh=t=>t&&(di(t)||le(t))&&le(t.then)&&le(t.catch),cl=((t,e)=>t?setImmediate:e?((n,i)=>(Je.addEventListener("message",({source:r,data:s})=>{r===Je&&s===n&&i.length&&i.shift()()},!1),r=>{i.push(r),Je.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",le(Je.postMessage)),Ih=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Je):typeof process!="undefined"&&process.nextTick||cl,y={isArray:xt,isArrayBuffer:rl,isBuffer:Qf,isFormData:ah,isArrayBufferView:Xf,isString:Zf,isNumber:sl,isBoolean:eh,isObject:di,isPlainObject:Sn,isReadableStream:lh,isRequest:uh,isResponse:ch,isHeaders:dh,isUndefined:Qt,isDate:th,isFile:nh,isBlob:ih,isRegExp:Eh,isFunction:le,isStream:sh,isURLSearchParams:oh,isTypedArray:yh,isFileList:rh,forEach:un,merge:gr,extend:hh,trim:fh,stripBOM:ph,inherits:mh,toFlatObject:gh,kindOf:ui,kindOfTest:Se,endsWith:vh,toArray:kh,forEachEntry:_h,matchAll:bh,isHTMLForm:Sh,hasOwnProperty:Ss,hasOwnProp:Ss,reduceDescriptors:ll,freezeMethods:Ah,toObjectSet:Oh,toCamelCase:Nh,noop:wh,toFiniteNumber:Th,findKey:al,global:Je,isContextDefined:ol,ALPHABET:ul,generateString:Ch,isSpecCompliantForm:xh,toJSONObject:Rh,isAsyncFn:Fh,isThenable:Dh,setImmediate:cl,asap:Ih};function $(t,e,n,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r,this.status=r.status?r.status:null)}y.inherits($,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:y.toJSONObject(this.config),code:this.code,status:this.status}}});const dl=$.prototype,fl={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{fl[t]={value:t}});Object.defineProperties($,fl);Object.defineProperty(dl,"isAxiosError",{value:!0});$.from=(t,e,n,i,r,s)=>{const a=Object.create(dl);return y.toFlatObject(t,a,function(l){return l!==Error.prototype},o=>o!=="isAxiosError"),$.call(a,t.message,e,n,i,r),a.cause=t,a.name=t.name,s&&Object.assign(a,s),a};const Ph=null;function vr(t){return y.isPlainObject(t)||y.isArray(t)}function hl(t){return y.endsWith(t,"[]")?t.slice(0,-2):t}function Es(t,e,n){return t?t.concat(e).map(function(r,s){return r=hl(r),!n&&s?"["+r+"]":r}).join(n?".":""):e}function Lh(t){return y.isArray(t)&&!t.some(vr)}const $h=y.toFlatObject(y,{},null,function(e){return/^is[A-Z]/.test(e)});function fi(t,e,n){if(!y.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=y.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,p){return!y.isUndefined(p[m])});const i=n.metaTokens,r=n.visitor||c,s=n.dots,a=n.indexes,l=(n.Blob||typeof Blob!="undefined"&&Blob)&&y.isSpecCompliantForm(e);if(!y.isFunction(r))throw new TypeError("visitor must be a function");function u(g){if(g===null)return"";if(y.isDate(g))return g.toISOString();if(!l&&y.isBlob(g))throw new $("Blob is not supported. Use a Buffer instead.");return y.isArrayBuffer(g)||y.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function c(g,m,p){let h=g;if(g&&!p&&typeof g=="object"){if(y.endsWith(m,"{}"))m=i?m:m.slice(0,-2),g=JSON.stringify(g);else if(y.isArray(g)&&Lh(g)||(y.isFileList(g)||y.endsWith(m,"[]"))&&(h=y.toArray(g)))return m=hl(m),h.forEach(function(N,b){!(y.isUndefined(N)||N===null)&&e.append(a===!0?Es([m],b,s):a===null?m:m+"[]",u(N))}),!1}return vr(g)?!0:(e.append(Es(p,m,s),u(g)),!1)}const d=[],f=Object.assign($h,{defaultVisitor:c,convertValue:u,isVisitable:vr});function v(g,m){if(!y.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(g),y.forEach(g,function(h,_){(!(y.isUndefined(h)||h===null)&&r.call(e,h,y.isString(_)?_.trim():_,m,f))===!0&&v(h,m?m.concat(_):[_])}),d.pop()}}if(!y.isObject(t))throw new TypeError("data must be an object");return v(t),e}function As(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(i){return e[i]})}function qr(t,e){this._pairs=[],t&&fi(t,this,e)}const pl=qr.prototype;pl.append=function(e,n){this._pairs.push([e,n])};pl.toString=function(e){const n=e?function(i){return e.call(this,i,As)}:As;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function Mh(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ml(t,e,n){if(!e)return t;const i=n&&n.encode||Mh,r=n&&n.serialize;let s;if(r?s=r(e,n):s=y.isURLSearchParams(e)?e.toString():new qr(e,n).toString(i),s){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class Os{constructor(){this.handlers=[]}use(e,n,i){return this.handlers.push({fulfilled:e,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){y.forEach(this.handlers,function(i){i!==null&&e(i)})}}const gl={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Uh=typeof URLSearchParams!="undefined"?URLSearchParams:qr,Vh=typeof FormData!="undefined"?FormData:null,jh=typeof Blob!="undefined"?Blob:null,Bh={isBrowser:!0,classes:{URLSearchParams:Uh,FormData:Vh,Blob:jh},protocols:["http","https","file","blob","url","data"]},zr=typeof window!="undefined"&&typeof document!="undefined",kr=typeof navigator=="object"&&navigator||void 0,Hh=zr&&(!kr||["ReactNative","NativeScript","NS"].indexOf(kr.product)<0),qh=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",zh=zr&&window.location.href||"http://localhost",Gh=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:zr,hasStandardBrowserEnv:Hh,hasStandardBrowserWebWorkerEnv:qh,navigator:kr,origin:zh},Symbol.toStringTag,{value:"Module"})),ne={...Gh,...Bh};function Kh(t,e){return fi(t,new ne.classes.URLSearchParams,Object.assign({visitor:function(n,i,r,s){return ne.isNode&&y.isBuffer(n)?(this.append(i,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function Wh(t){return y.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Jh(t){const e={},n=Object.keys(t);let i;const r=n.length;let s;for(i=0;i<r;i++)s=n[i],e[s]=t[s];return e}function vl(t){function e(n,i,r,s){let a=n[s++];if(a==="__proto__")return!0;const o=Number.isFinite(+a),l=s>=n.length;return a=!a&&y.isArray(r)?r.length:a,l?(y.hasOwnProp(r,a)?r[a]=[r[a],i]:r[a]=i,!o):((!r[a]||!y.isObject(r[a]))&&(r[a]=[]),e(n,i,r[a],s)&&y.isArray(r[a])&&(r[a]=Jh(r[a])),!o)}if(y.isFormData(t)&&y.isFunction(t.entries)){const n={};return y.forEachEntry(t,(i,r)=>{e(Wh(i),r,n,0)}),n}return null}function Yh(t,e,n){if(y.isString(t))try{return(e||JSON.parse)(t),y.trim(t)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(t)}const cn={transitional:gl,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const i=n.getContentType()||"",r=i.indexOf("application/json")>-1,s=y.isObject(e);if(s&&y.isHTMLForm(e)&&(e=new FormData(e)),y.isFormData(e))return r?JSON.stringify(vl(e)):e;if(y.isArrayBuffer(e)||y.isBuffer(e)||y.isStream(e)||y.isFile(e)||y.isBlob(e)||y.isReadableStream(e))return e;if(y.isArrayBufferView(e))return e.buffer;if(y.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(s){if(i.indexOf("application/x-www-form-urlencoded")>-1)return Kh(e,this.formSerializer).toString();if((o=y.isFileList(e))||i.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return fi(o?{"files[]":e}:e,l&&new l,this.formSerializer)}}return s||r?(n.setContentType("application/json",!1),Yh(e)):e}],transformResponse:[function(e){const n=this.transitional||cn.transitional,i=n&&n.forcedJSONParsing,r=this.responseType==="json";if(y.isResponse(e)||y.isReadableStream(e))return e;if(e&&y.isString(e)&&(i&&!this.responseType||r)){const a=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(o){if(a)throw o.name==="SyntaxError"?$.from(o,$.ERR_BAD_RESPONSE,this,null,this.response):o}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ne.classes.FormData,Blob:ne.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};y.forEach(["delete","get","head","post","put","patch"],t=>{cn.headers[t]={}});const Qh=y.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Xh=t=>{const e={};let n,i,r;return t&&t.split(`
24
+ `)}}function Bu(t,e){e.forEach(n=>{if(Uu(ju(n.split("."),t)))throw new Fa(n)})}function B(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 Hu={};function Da(){return typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:Hu}var Ia=Object.assign,Cn=Object.getOwnPropertyDescriptor,Oe=Object.defineProperty,Jn=Object.prototype,tr=[];Object.freeze(tr);var Fr={};Object.freeze(Fr);var zu=typeof Proxy!="undefined",qu=Object.toString();function Pa(){zu||B("Proxy not available")}function La(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var vt=function(){};function ye(t){return typeof t=="function"}function Ze(t){var e=typeof t;switch(e){case"string":case"symbol":case"number":return!0}return!1}function Yn(t){return t!==null&&typeof t=="object"}function He(t){if(!Yn(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()===qu}function $a(t){var e=t==null?void 0:t.constructor;return e?e.name==="GeneratorFunction"||e.displayName==="GeneratorFunction":!1}function Qn(t,e,n){Oe(t,e,{enumerable:!1,writable:!0,configurable:!0,value:n})}function Ma(t,e,n){Oe(t,e,{enumerable:!1,writable:!1,configurable:!0,value:n})}function st(t,e){var n="isMobX"+t;return e.prototype[n]=!0,function(i){return Yn(i)&&i[n]===!0}}function At(t){return t!=null&&Object.prototype.toString.call(t)==="[object Map]"}function Gu(t){var e=Object.getPrototypeOf(t),n=Object.getPrototypeOf(e),i=Object.getPrototypeOf(n);return i===null}function Ce(t){return t!=null&&Object.prototype.toString.call(t)==="[object Set]"}var Ua=typeof Object.getOwnPropertySymbols!="undefined";function Ku(t){var e=Object.keys(t);if(!Ua)return e;var n=Object.getOwnPropertySymbols(t);return n.length?[].concat(e,n.filter(function(i){return Jn.propertyIsEnumerable.call(t,i)})):e}var Xn=typeof Reflect!="undefined"&&Reflect.ownKeys?Reflect.ownKeys:Ua?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames;function Va(t){return t===null?null:typeof t=="object"?""+t:t}function Re(t,e){return Jn.hasOwnProperty.call(t,e)}var Wu=Object.getOwnPropertyDescriptors||function(e){var n={};return Xn(e).forEach(function(i){n[i]=Cn(e,i)}),n};function ae(t,e){return!!(t&e)}function oe(t,e,n){return n?t|=e:t&=~e,t}function ls(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function Ju(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,Qu(i.key),i)}}function Ot(t,e,n){return e&&Ju(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function kt(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=Xu(t))||e){n&&(t=n);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
25
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ze(){return ze=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},ze.apply(null,arguments)}function ja(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,nr(t,e)}function nr(t,e){return nr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},nr(t,e)}function Yu(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function Qu(t){var e=Yu(t,"string");return typeof e=="symbol"?e:e+""}function Xu(t,e){if(t){if(typeof t=="string")return ls(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ls(t,e):void 0}}var Ee=Symbol("mobx-stored-annotations");function we(t){function e(n,i){if(sn(i))return t.decorate_20223_(n,i);wt(n,i,t)}return Object.assign(e,t)}function wt(t,e,n){Re(t,Ee)||Qn(t,Ee,ze({},t[Ee])),oc(n)||(t[Ee][e]=n)}function Zu(t){return Re(t,Ee)||Qn(t,Ee,ze({},t[Ee])),t[Ee]}function sn(t){return typeof t=="object"&&typeof t.kind=="string"}var P=Symbol("mobx administration"),Ge=function(){function t(n){n===void 0&&(n="Atom"),this.name_=void 0,this.flags_=0,this.observers_=new Set,this.lastAccessedBy_=0,this.lowestObserverState_=j.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 io(this)},e.reportChanged=function(){he(),ro(this),pe()},e.toString=function(){return this.name_},Ot(t,[{key:"isBeingObserved",get:function(){return ae(this.flags_,t.isBeingObservedMask_)},set:function(i){this.flags_=oe(this.flags_,t.isBeingObservedMask_,i)}},{key:"isPendingUnobservation",get:function(){return ae(this.flags_,t.isPendingUnobservationMask_)},set:function(i){this.flags_=oe(this.flags_,t.isPendingUnobservationMask_,i)}},{key:"diffValue",get:function(){return ae(this.flags_,t.diffValueMask_)?1:0},set:function(i){this.flags_=oe(this.flags_,t.diffValueMask_,i===1)}}])}();Ge.isBeingObservedMask_=1;Ge.isPendingUnobservationMask_=2;Ge.diffValueMask_=4;var Dr=st("Atom",Ge);function Ba(t,e,n){e===void 0&&(e=vt),n===void 0&&(n=vt);var i=new Ge(t);return e!==vt&&cd(i,e),n!==vt&&co(i,n),i}function ec(t,e){return t===e}function tc(t,e){return Mr(t,e)}function nc(t,e){return Mr(t,e,1)}function ic(t,e){return Object.is?Object.is(t,e):t===e?t!==0||1/t===1/e:t!==t&&e!==e}var _t={identity:ec,structural:tc,default:ic,shallow:nc};function et(t,e,n){return po(t)?t:Array.isArray(t)?W.array(t,{name:n}):He(t)?W.object(t,void 0,{name:n}):At(t)?W.map(t,{name:n}):Ce(t)?W.set(t,{name:n}):typeof t=="function"&&!ri(t)&&!Jt(t)?$a(t)?bt(t):Wt(n,t):t}function rc(t,e,n){if(t==null||oi(t)||ai(t)||ot(t)||Tt(t))return t;if(Array.isArray(t))return W.array(t,{name:n,deep:!1});if(He(t))return W.object(t,void 0,{name:n,deep:!1});if(At(t))return W.map(t,{name:n,deep:!1});if(Ce(t))return W.set(t,{name:n,deep:!1})}function Zn(t){return t}function sc(t,e){return Mr(t,e)?e:t}var ac="override";function oc(t){return t.annotationType_===ac}function an(t,e){return{annotationType_:t,options_:e,make_:lc,extend_:uc,decorate_20223_:cc}}function lc(t,e,n,i){var r;if((r=this.options_)!=null&&r.bound)return this.extend_(t,e,n,!1)===null?0:1;if(i===t.target_)return this.extend_(t,e,n,!1)===null?0:2;if(ri(n.value))return 1;var s=Ha(t,this,e,n,!1);return Oe(i,e,s),2}function uc(t,e,n,i){var r=Ha(t,this,e,n);return t.defineProperty_(e,r,i)}function cc(t,e){var n=e.kind,i=e.name,r=e.addInitializer,s=this,a=function(u){var c,d,f,v;return qe((c=(d=s.options_)==null?void 0:d.name)!=null?c:i.toString(),u,(f=(v=s.options_)==null?void 0:v.autoAction)!=null?f:!1)};if(n=="field"){r(function(){wt(this,i,s)});return}if(n=="method"){var o;return ri(t)||(t=a(t)),(o=this.options_)!=null&&o.bound&&r(function(){var l=this,u=l[i].bind(l);u.isMobxAction=!0,l[i]=u}),t}B("Cannot apply '"+s.annotationType_+"' to '"+String(i)+"' (kind: "+n+"):"+(`
26
+ '`+s.annotationType_+"' can only be used on properties with a function value."))}function dc(t,e,n,i){e.annotationType_,i.value}function Ha(t,e,n,i,r){var s,a,o,l,u,c,d;r===void 0&&(r=w.safeDescriptors),dc(t,e,n,i);var f=i.value;if((s=e.options_)!=null&&s.bound){var v;f=f.bind((v=t.proxy_)!=null?v:t.target_)}return{value:qe((a=(o=e.options_)==null?void 0:o.name)!=null?a:n.toString(),f,(l=(u=e.options_)==null?void 0:u.autoAction)!=null?l:!1,(c=e.options_)!=null&&c.bound?(d=t.proxy_)!=null?d:t.target_:void 0),configurable:r?t.isPlainObject_:!0,enumerable:!1,writable:!r}}function za(t,e){return{annotationType_:t,options_:e,make_:fc,extend_:hc,decorate_20223_:pc}}function fc(t,e,n,i){var r;if(i===t.target_)return this.extend_(t,e,n,!1)===null?0:2;if((r=this.options_)!=null&&r.bound&&(!Re(t.target_,e)||!Jt(t.target_[e]))&&this.extend_(t,e,n,!1)===null)return 0;if(Jt(n.value))return 1;var s=qa(t,this,e,n,!1,!1);return Oe(i,e,s),2}function hc(t,e,n,i){var r,s=qa(t,this,e,n,(r=this.options_)==null?void 0:r.bound);return t.defineProperty_(e,s,i)}function pc(t,e){var n,i=e.name,r=e.addInitializer;return Jt(t)||(t=bt(t)),(n=this.options_)!=null&&n.bound&&r(function(){var s=this,a=s[i].bind(s);a.isMobXFlow=!0,s[i]=a}),t}function mc(t,e,n,i){e.annotationType_,i.value}function qa(t,e,n,i,r,s){s===void 0&&(s=w.safeDescriptors),mc(t,e,n,i);var a=i.value;if(Jt(a)||(a=bt(a)),r){var o;a=a.bind((o=t.proxy_)!=null?o:t.target_),a.isMobXFlow=!0}return{value:a,configurable:s?t.isPlainObject_:!0,enumerable:!1,writable:!s}}function Ir(t,e){return{annotationType_:t,options_:e,make_:gc,extend_:vc,decorate_20223_:kc}}function gc(t,e,n){return this.extend_(t,e,n,!1)===null?0:1}function vc(t,e,n,i){return yc(t,this,e,n),t.defineComputedProperty_(e,ze({},this.options_,{get:n.get,set:n.set}),i)}function kc(t,e){var n=this,i=e.name,r=e.addInitializer;return r(function(){var s=Ct(this)[P],a=ze({},n.options_,{get:t,context:this});a.name||(a.name="ObservableObject."+i.toString()),s.values_.set(i,new _e(a))}),function(){return this[P].getObservablePropValue_(i)}}function yc(t,e,n,i){e.annotationType_,i.get}function ei(t,e){return{annotationType_:t,options_:e,make_:_c,extend_:bc,decorate_20223_:Sc}}function _c(t,e,n){return this.extend_(t,e,n,!1)===null?0:1}function bc(t,e,n,i){var r,s;return Nc(t,this),t.defineObservableProperty_(e,n.value,(r=(s=this.options_)==null?void 0:s.enhancer)!=null?r:et,i)}function Sc(t,e){var n=this,i=e.kind,r=e.name,s=new WeakSet;function a(o,l){var u,c,d=Ct(o)[P],f=new Qe(l,(u=(c=n.options_)==null?void 0:c.enhancer)!=null?u:et,"ObservableObject."+r.toString(),!1);d.values_.set(r,f),s.add(o)}if(i=="accessor")return{get:function(){return s.has(this)||a(this,t.get.call(this)),this[P].getObservablePropValue_(r)},set:function(l){return s.has(this)||a(this,l),this[P].setObservablePropValue_(r,l)},init:function(l){return s.has(this)||a(this,l),l}}}function Nc(t,e,n,i){e.annotationType_}var Ec="true",Ac=Ga();function Ga(t){return{annotationType_:Ec,options_:t,make_:Oc,extend_:wc,decorate_20223_:Tc}}function Oc(t,e,n,i){var r,s;if(n.get)return Ue.make_(t,e,n,i);if(n.set){var a=qe(e.toString(),n.set);return i===t.target_?t.defineProperty_(e,{configurable:w.safeDescriptors?t.isPlainObject_:!0,set:a})===null?0:2:(Oe(i,e,{configurable:!0,set:a}),2)}if(i!==t.target_&&typeof n.value=="function"){var o;if($a(n.value)){var l,u=(l=this.options_)!=null&&l.autoBind?bt.bound:bt;return u.make_(t,e,n,i)}var c=(o=this.options_)!=null&&o.autoBind?Wt.bound:Wt;return c.make_(t,e,n,i)}var d=((r=this.options_)==null?void 0:r.deep)===!1?W.ref:W;if(typeof n.value=="function"&&(s=this.options_)!=null&&s.autoBind){var f;n.value=n.value.bind((f=t.proxy_)!=null?f:t.target_)}return d.make_(t,e,n,i)}function wc(t,e,n,i){var r,s;if(n.get)return Ue.extend_(t,e,n,i);if(n.set)return t.defineProperty_(e,{configurable:w.safeDescriptors?t.isPlainObject_:!0,set:qe(e.toString(),n.set)},i);if(typeof n.value=="function"&&(r=this.options_)!=null&&r.autoBind){var a;n.value=n.value.bind((a=t.proxy_)!=null?a:t.target_)}var o=((s=this.options_)==null?void 0:s.deep)===!1?W.ref:W;return o.extend_(t,e,n,i)}function Tc(t,e){B("'"+this.annotationType_+"' cannot be used as a decorator")}var Cc="observable",xc="observable.ref",Rc="observable.shallow",Fc="observable.struct",Ka={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(Ka);function pn(t){return t||Ka}var ir=ei(Cc),Dc=ei(xc,{enhancer:Zn}),Ic=ei(Rc,{enhancer:rc}),Pc=ei(Fc,{enhancer:sc}),Wa=we(ir);function mn(t){return t.deep===!0?et:t.deep===!1?Zn:$c(t.defaultDecorator)}function Lc(t){var e;return t?(e=t.defaultDecorator)!=null?e:Ga(t):void 0}function $c(t){var e,n;return t&&(e=(n=t.options_)==null?void 0:n.enhancer)!=null?e:et}function Ja(t,e,n){if(sn(e))return ir.decorate_20223_(t,e);if(Ze(e)){wt(t,e,ir);return}return po(t)?t:He(t)?W.object(t,e,n):Array.isArray(t)?W.array(t,e):At(t)?W.map(t,e):Ce(t)?W.set(t,e):typeof t=="object"&&t!==null?t:W.box(t,e)}Ia(Ja,Wa);var Mc={box:function(e,n){var i=pn(n);return new Qe(e,mn(i),i.name,!0,i.equals)},array:function(e,n){var i=pn(n);return(w.useProxies===!1||i.proxy===!1?Fd:Sd)(e,mn(i),i.name)},map:function(e,n){var i=pn(n);return new vo(e,mn(i),i.name)},set:function(e,n){var i=pn(n);return new ko(e,mn(i),i.name)},object:function(e,n,i){return lt(function(){return dd(w.useProxies===!1||(i==null?void 0:i.proxy)===!1?Ct({},i):kd({},i),e,n)})},ref:we(Dc),shallow:we(Ic),deep:Wa,struct:we(Pc)},W=Ia(Ja,Mc),Ya="computed",Uc="computed.struct",rr=Ir(Ya),Vc=Ir(Uc,{equals:_t.structural}),Ue=function(e,n){if(sn(n))return rr.decorate_20223_(e,n);if(Ze(n))return wt(e,n,rr);if(He(e))return we(Ir(Ya,e));var i=He(n)?n:{};return i.get=e,i.name||(i.name=e.name||""),new _e(i)};Object.assign(Ue,rr);Ue.struct=we(Vc);var us,cs,xn=0,jc=1,Bc=(us=(cs=Cn(function(){},"name"))==null?void 0:cs.configurable)!=null?us:!1,ds={value:"action",configurable:!0,writable:!1,enumerable:!1};function qe(t,e,n,i){n===void 0&&(n=!1);function r(){return Hc(t,n,e,i||this,arguments)}return r.isMobxAction=!0,r.toString=function(){return e.toString()},Bc&&(ds.value=t,Oe(r,"name",ds)),r}function Hc(t,e,n,i,r){var s=zc(t,e);try{return n.apply(i,r)}catch(a){throw s.error_=a,a}finally{qc(s)}}function zc(t,e,n,i){var r=!1,s=0,a=w.trackingDerivation,o=!e||!a;he();var l=w.allowStateChanges;o&&(at(),l=ti(!0));var u=Pr(!0),c={runAsAction_:o,prevDerivation_:a,prevAllowStateChanges_:l,prevAllowStateReads_:u,notifySpy_:r,startTime_:s,actionId_:jc++,parentActionId_:xn};return xn=c.actionId_,c}function qc(t){xn!==t.actionId_&&B(30),xn=t.parentActionId_,t.error_!==void 0&&(w.suppressReactionErrors=!0),ni(t.prevAllowStateChanges_),Vt(t.prevAllowStateReads_),pe(),t.runAsAction_&&Fe(t.prevDerivation_),w.suppressReactionErrors=!1}function Qa(t,e){var n=ti(t);try{return e()}finally{ni(n)}}function ti(t){var e=w.allowStateChanges;return w.allowStateChanges=t,e}function ni(t){w.allowStateChanges=t}var Qe=function(t){function e(i,r,s,a,o){var l;return s===void 0&&(s="ObservableValue"),o===void 0&&(o=_t.default),l=t.call(this,s)||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=r,l.name_=s,l.equals=o,l.value_=r(i,void 0,s),l}ja(e,t);var n=e.prototype;return n.dehanceValue=function(r){return this.dehancer!==void 0?this.dehancer(r):r},n.set=function(r){this.value_,r=this.prepareNewValue_(r),r!==w.UNCHANGED&&this.setNewValue_(r)},n.prepareNewValue_=function(r){if(de(this)){var s=fe(this,{object:this,type:Te,newValue:r});if(!s)return w.UNCHANGED;r=s.newValue}return r=this.enhancer(r,this.value_,this.name_),this.equals(this.value_,r)?w.UNCHANGED:r},n.setNewValue_=function(r){var s=this.value_;this.value_=r,this.reportChanged(),ve(this)&&ke(this,{type:Te,object:this,newValue:r,oldValue:s})},n.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(r){return on(this,r)},n.observe_=function(r,s){return s&&r({observableKind:"value",debugObjectName:this.name_,object:this,type:Te,newValue:this.value_,oldValue:void 0}),ln(this,r)},n.raw=function(){return this.value_},n.toJSON=function(){return this.get()},n.toString=function(){return this.name_+"["+this.value_+"]"},n.valueOf=function(){return Va(this.get())},n[Symbol.toPrimitive]=function(){return this.valueOf()},e}(Ge),_e=function(){function t(n){this.dependenciesState_=j.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=j.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new Fn(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.isTracing_=Rn.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||B(31),this.derivation=n.get,this.name_=n.name||"ComputedValue",n.set&&(this.setter_=qe("ComputedValue-setter",n.set)),this.equals_=n.equals||(n.compareStructural||n.struct?_t.structural:_t.default),this.scope_=n.context,this.requiresReaction_=n.requiresReaction,this.keepAlive_=!!n.keepAlive}var e=t.prototype;return e.onBecomeStale_=function(){Jc(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&&B(32,this.name_,this.derivation),w.inBatch===0&&this.observers_.size===0&&!this.keepAlive_)sr(this)&&(this.warnAboutUntrackedRead_(),he(),this.value_=this.computeValue_(!1),pe());else if(io(this),sr(this)){var i=w.trackingContext;this.keepAlive_&&!i&&(w.trackingContext=this),this.trackAndCompute()&&Wc(this),w.trackingContext=i}var r=this.value_;if(bn(r))throw r.cause;return r},e.set=function(i){if(this.setter_){this.isRunningSetter&&B(33,this.name_),this.isRunningSetter=!0;try{this.setter_.call(this.scope_,i)}finally{this.isRunningSetter=!1}}else B(34,this.name_)},e.trackAndCompute=function(){var i=this.value_,r=this.dependenciesState_===j.NOT_TRACKING_,s=this.computeValue_(!0),a=r||bn(i)||bn(s)||!this.equals_(i,s);return a&&(this.value_=s),a},e.computeValue_=function(i){this.isComputing=!0;var r=ti(!1),s;if(i)s=Xa(this,this.derivation,this.scope_);else if(w.disableErrorBoundaries===!0)s=this.derivation.call(this.scope_);else try{s=this.derivation.call(this.scope_)}catch(a){s=new Fn(a)}return ni(r),this.isComputing=!1,s},e.suspend_=function(){this.keepAlive_||(ar(this),this.value_=void 0)},e.observe_=function(i,r){var s=this,a=!0,o=void 0;return si(function(){var l=s.get();if(!a||r){var u=at();i({observableKind:"computed",debugObjectName:s.name_,type:Te,object:s,newValue:l,oldValue:o}),Fe(u)}a=!1,o=l})},e.warnAboutUntrackedRead_=function(){},e.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},e.valueOf=function(){return Va(this.get())},e[Symbol.toPrimitive]=function(){return this.valueOf()},Ot(t,[{key:"isComputing",get:function(){return ae(this.flags_,t.isComputingMask_)},set:function(i){this.flags_=oe(this.flags_,t.isComputingMask_,i)}},{key:"isRunningSetter",get:function(){return ae(this.flags_,t.isRunningSetterMask_)},set:function(i){this.flags_=oe(this.flags_,t.isRunningSetterMask_,i)}},{key:"isBeingObserved",get:function(){return ae(this.flags_,t.isBeingObservedMask_)},set:function(i){this.flags_=oe(this.flags_,t.isBeingObservedMask_,i)}},{key:"isPendingUnobservation",get:function(){return ae(this.flags_,t.isPendingUnobservationMask_)},set:function(i){this.flags_=oe(this.flags_,t.isPendingUnobservationMask_,i)}},{key:"diffValue",get:function(){return ae(this.flags_,t.diffValueMask_)?1:0},set:function(i){this.flags_=oe(this.flags_,t.diffValueMask_,i===1)}}])}();_e.isComputingMask_=1;_e.isRunningSetterMask_=2;_e.isBeingObservedMask_=4;_e.isPendingUnobservationMask_=8;_e.diffValueMask_=16;var ii=st("ComputedValue",_e),j;(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_"})(j||(j={}));var Rn;(function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK"})(Rn||(Rn={}));var Fn=function(e){this.cause=void 0,this.cause=e};function bn(t){return t instanceof Fn}function sr(t){switch(t.dependenciesState_){case j.UP_TO_DATE_:return!1;case j.NOT_TRACKING_:case j.STALE_:return!0;case j.POSSIBLY_STALE_:{for(var e=Pr(!0),n=at(),i=t.observing_,r=i.length,s=0;s<r;s++){var a=i[s];if(ii(a)){if(w.disableErrorBoundaries)a.get();else try{a.get()}catch{return Fe(n),Vt(e),!0}if(t.dependenciesState_===j.STALE_)return Fe(n),Vt(e),!0}}return eo(t),Fe(n),Vt(e),!1}}}function Xa(t,e,n){var i=Pr(!0);eo(t),t.newObserving_=new Array(t.runId_===0?100:t.observing_.length),t.unboundDepsCount_=0,t.runId_=++w.runId;var r=w.trackingDerivation;w.trackingDerivation=t,w.inBatch++;var s;if(w.disableErrorBoundaries===!0)s=e.call(n);else try{s=e.call(n)}catch(a){s=new Fn(a)}return w.inBatch--,w.trackingDerivation=r,Gc(t),Vt(i),s}function Gc(t){for(var e=t.observing_,n=t.observing_=t.newObserving_,i=j.UP_TO_DATE_,r=0,s=t.unboundDepsCount_,a=0;a<s;a++){var o=n[a];o.diffValue===0&&(o.diffValue=1,r!==a&&(n[r]=o),r++),o.dependenciesState_>i&&(i=o.dependenciesState_)}for(n.length=r,t.newObserving_=null,s=e.length;s--;){var l=e[s];l.diffValue===0&&to(l,t),l.diffValue=0}for(;r--;){var u=n[r];u.diffValue===1&&(u.diffValue=0,Kc(u,t))}i!==j.UP_TO_DATE_&&(t.dependenciesState_=i,t.onBecomeStale_())}function ar(t){var e=t.observing_;t.observing_=[];for(var n=e.length;n--;)to(e[n],t);t.dependenciesState_=j.NOT_TRACKING_}function Za(t){var e=at();try{return t()}finally{Fe(e)}}function at(){var t=w.trackingDerivation;return w.trackingDerivation=null,t}function Fe(t){w.trackingDerivation=t}function Pr(t){var e=w.allowStateReads;return w.allowStateReads=t,e}function Vt(t){w.allowStateReads=t}function eo(t){if(t.dependenciesState_!==j.UP_TO_DATE_){t.dependenciesState_=j.UP_TO_DATE_;for(var e=t.observing_,n=e.length;n--;)e[n].lowestObserverState_=j.UP_TO_DATE_}}var xi=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},Ri=!0,w=function(){var t=Da();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(Ri=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==new xi().version&&(Ri=!1),Ri?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new xi):(setTimeout(function(){B(35)},1),new xi)}();function Kc(t,e){t.observers_.add(e),t.lowestObserverState_>e.dependenciesState_&&(t.lowestObserverState_=e.dependenciesState_)}function to(t,e){t.observers_.delete(e),t.observers_.size===0&&no(t)}function no(t){t.isPendingUnobservation===!1&&(t.isPendingUnobservation=!0,w.pendingUnobservations.push(t))}function he(){w.inBatch++}function pe(){if(--w.inBatch===0){so();for(var t=w.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 _e&&n.suspend_())}w.pendingUnobservations=[]}}function io(t){var e=w.trackingDerivation;return e!==null?(e.runId_!==t.lastAccessedBy_&&(t.lastAccessedBy_=e.runId_,e.newObserving_[e.unboundDepsCount_++]=t,!t.isBeingObserved&&w.trackingContext&&(t.isBeingObserved=!0,t.onBO())),t.isBeingObserved):(t.observers_.size===0&&w.inBatch>0&&no(t),!1)}function ro(t){t.lowestObserverState_!==j.STALE_&&(t.lowestObserverState_=j.STALE_,t.observers_.forEach(function(e){e.dependenciesState_===j.UP_TO_DATE_&&e.onBecomeStale_(),e.dependenciesState_=j.STALE_}))}function Wc(t){t.lowestObserverState_!==j.STALE_&&(t.lowestObserverState_=j.STALE_,t.observers_.forEach(function(e){e.dependenciesState_===j.POSSIBLY_STALE_?e.dependenciesState_=j.STALE_:e.dependenciesState_===j.UP_TO_DATE_&&(t.lowestObserverState_=j.UP_TO_DATE_)}))}function Jc(t){t.lowestObserverState_===j.UP_TO_DATE_&&(t.lowestObserverState_=j.POSSIBLY_STALE_,t.observers_.forEach(function(e){e.dependenciesState_===j.UP_TO_DATE_&&(e.dependenciesState_=j.POSSIBLY_STALE_,e.onBecomeStale_())}))}var De=function(){function t(n,i,r,s){n===void 0&&(n="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=j.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=Rn.NONE,this.name_=n,this.onInvalidate_=i,this.errorHandler_=r,this.requiresObservable_=s}var e=t.prototype;return e.onBecomeStale_=function(){this.schedule_()},e.schedule_=function(){this.isScheduled||(this.isScheduled=!0,w.pendingReactions.push(this),so())},e.runReaction_=function(){if(!this.isDisposed){he(),this.isScheduled=!1;var i=w.trackingContext;if(w.trackingContext=this,sr(this)){this.isTrackPending=!0;try{this.onInvalidate_()}catch(r){this.reportExceptionInDerivation_(r)}}w.trackingContext=i,pe()}},e.track=function(i){if(!this.isDisposed){he(),this.isRunning=!0;var r=w.trackingContext;w.trackingContext=this;var s=Xa(this,i,void 0);w.trackingContext=r,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&ar(this),bn(s)&&this.reportExceptionInDerivation_(s.cause),pe()}},e.reportExceptionInDerivation_=function(i){var r=this;if(this.errorHandler_){this.errorHandler_(i,this);return}if(w.disableErrorBoundaries)throw i;var s="[mobx] uncaught error in '"+this+"'";w.suppressReactionErrors||console.error(s,i),w.globalReactionErrorHandlers.forEach(function(a){return a(i,r)})},e.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(he(),ar(this),pe()))},e.getDisposer_=function(i){var r=this,s=function a(){r.dispose(),i==null||i.removeEventListener==null||i.removeEventListener("abort",a)};return i==null||i.addEventListener==null||i.addEventListener("abort",s),s[P]=this,s},e.toString=function(){return"Reaction["+this.name_+"]"},e.trace=function(i){},Ot(t,[{key:"isDisposed",get:function(){return ae(this.flags_,t.isDisposedMask_)},set:function(i){this.flags_=oe(this.flags_,t.isDisposedMask_,i)}},{key:"isScheduled",get:function(){return ae(this.flags_,t.isScheduledMask_)},set:function(i){this.flags_=oe(this.flags_,t.isScheduledMask_,i)}},{key:"isTrackPending",get:function(){return ae(this.flags_,t.isTrackPendingMask_)},set:function(i){this.flags_=oe(this.flags_,t.isTrackPendingMask_,i)}},{key:"isRunning",get:function(){return ae(this.flags_,t.isRunningMask_)},set:function(i){this.flags_=oe(this.flags_,t.isRunningMask_,i)}},{key:"diffValue",get:function(){return ae(this.flags_,t.diffValueMask_)?1:0},set:function(i){this.flags_=oe(this.flags_,t.diffValueMask_,i===1)}}])}();De.isDisposedMask_=1;De.isScheduledMask_=2;De.isTrackPendingMask_=4;De.isRunningMask_=8;De.diffValueMask_=16;var Yc=100,Qc=function(e){return e()};function so(){w.inBatch>0||w.isRunningReactions||Qc(Xc)}function Xc(){w.isRunningReactions=!0;for(var t=w.pendingReactions,e=0;t.length>0;){++e===Yc&&(console.error("[mobx] cycle in reaction: "+t[0]),t.splice(0));for(var n=t.splice(0),i=0,r=n.length;i<r;i++)n[i].runReaction_()}w.isRunningReactions=!1}var Dn=st("Reaction",De);function jt(){return!1}function Zc(t){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}var ao="action",ed="action.bound",oo="autoAction",td="autoAction.bound",nd="<unnamed action>",or=an(ao),id=an(ed,{bound:!0}),lr=an(oo,{autoAction:!0}),rd=an(td,{autoAction:!0,bound:!0});function lo(t){var e=function(i,r){if(ye(i))return qe(i.name||nd,i,t);if(ye(r))return qe(i,r,t);if(sn(r))return(t?lr:or).decorate_20223_(i,r);if(Ze(r))return wt(i,r,t?lr:or);if(Ze(i))return we(an(t?oo:ao,{name:i,autoAction:t}))};return e}var se=lo(!1);Object.assign(se,or);var Wt=lo(!0);Object.assign(Wt,lr);se.bound=we(id);Wt.bound=we(rd);function ri(t){return ye(t)&&t.isMobxAction===!0}function si(t,e){var n,i,r,s;e===void 0&&(e=Fr);var a=(n=(i=e)==null?void 0:i.name)!=null?n:"Autorun",o=!e.scheduler&&!e.delay,l;if(o)l=new De(a,function(){this.track(d)},e.onError,e.requiresObservable);else{var u=uo(e),c=!1;l=new De(a,function(){c||(c=!0,u(function(){c=!1,l.isDisposed||l.track(d)}))},e.onError,e.requiresObservable)}function d(){t(l)}return(r=e)!=null&&(r=r.signal)!=null&&r.aborted||l.schedule_(),l.getDisposer_((s=e)==null?void 0:s.signal)}var sd=function(e){return e()};function uo(t){return t.scheduler?t.scheduler:t.delay?function(e){return setTimeout(e,t.delay)}:sd}function ad(t,e,n){var i,r,s;n===void 0&&(n=Fr);var a=(i=n.name)!=null?i:"Reaction",o=se(a,n.onError?od(n.onError,e):e),l=!n.scheduler&&!n.delay,u=uo(n),c=!0,d=!1,f,v=n.compareStructural?_t.structural:n.equals||_t.default,g=new De(a,function(){c||l?m():d||(d=!0,u(m))},n.onError,n.requiresObservable);function m(){if(d=!1,!g.isDisposed){var p=!1,h=f;g.track(function(){var _=Qa(!1,function(){return t(g)});p=c||!v(f,_),f=_}),(c&&n.fireImmediately||!c&&p)&&o(f,h,g),c=!1}}return(r=n)!=null&&(r=r.signal)!=null&&r.aborted||g.schedule_(),g.getDisposer_((s=n)==null?void 0:s.signal)}function od(t,e){return function(){try{return e.apply(this,arguments)}catch(n){t.call(this,n)}}}var ld="onBO",ud="onBUO";function cd(t,e,n){return fo(ld,t,e,n)}function co(t,e,n){return fo(ud,t,e,n)}function fo(t,e,n,i){var r=ur(e),s=ye(i)?i:n,a=t+"L";return r[a]?r[a].add(s):r[a]=new Set([s]),function(){var o=r[a];o&&(o.delete(s),o.size===0&&delete r[a])}}function dd(t,e,n,i){var r=Wu(e);return lt(function(){var s=Ct(t,i)[P];Xn(r).forEach(function(a){s.extend_(a,r[a],n&&a in n?n[a]:!0)})}),t}var fd=0;function ho(){this.message="FLOW_CANCELLED"}ho.prototype=Object.create(Error.prototype);var Fi=za("flow"),hd=za("flow.bound",{bound:!0}),bt=Object.assign(function(e,n){if(sn(n))return Fi.decorate_20223_(e,n);if(Ze(n))return wt(e,n,Fi);var i=e,r=i.name||"<unnamed flow>",s=function(){var o=this,l=arguments,u=++fd,c=se(r+" - runid: "+u+" - init",i).apply(o,l),d,f=void 0,v=new Promise(function(g,m){var p=0;d=m;function h(b){f=void 0;var E;try{E=se(r+" - runid: "+u+" - yield "+p++,c.next).call(c,b)}catch(O){return m(O)}N(E)}function _(b){f=void 0;var E;try{E=se(r+" - runid: "+u+" - yield "+p++,c.throw).call(c,b)}catch(O){return m(O)}N(E)}function N(b){if(ye(b==null?void 0:b.then)){b.then(N,m);return}return b.done?g(b.value):(f=Promise.resolve(b.value),f.then(h,_))}h(void 0)});return v.cancel=se(r+" - runid: "+u+" - cancel",function(){try{f&&fs(f);var g=c.return(void 0),m=Promise.resolve(g.value);m.then(vt,vt),fs(m),d(new ho)}catch(p){d(p)}}),v};return s.isMobXFlow=!0,s},Fi);bt.bound=we(hd);function fs(t){ye(t.cancel)&&t.cancel()}function Jt(t){return(t==null?void 0:t.isMobXFlow)===!0}function pd(t,e){return t?oi(t)||!!t[P]||Dr(t)||Dn(t)||ii(t):!1}function po(t){return pd(t)}function xe(t,e){e===void 0&&(e=void 0),he();try{return t.apply(e)}finally{pe()}}function md(t,e,n){return arguments.length===1||e&&typeof e=="object"?gd(t,e):mo(t,e,{})}function mo(t,e,n){var i;if(typeof n.timeout=="number"){var r=new Error("WHEN_TIMEOUT");i=setTimeout(function(){if(!a[P].isDisposed)if(a(),n.onError)n.onError(r);else throw r},n.timeout)}n.name="When";var s=qe("When-effect",e),a=si(function(o){var l=Qa(!1,t);l&&(o.dispose(),i&&clearTimeout(i),s())},n);return a}function gd(t,e){var n;if(e!=null&&(n=e.signal)!=null&&n.aborted)return Object.assign(Promise.reject(new Error("WHEN_ABORTED")),{cancel:function(){return null}});var i,r,s=new Promise(function(a,o){var l,u=mo(t,a,ze({},e,{onError:o}));i=function(){u(),o(new Error("WHEN_CANCELLED"))},r=function(){u(),o(new Error("WHEN_ABORTED"))},e==null||(l=e.signal)==null||l.addEventListener==null||l.addEventListener("abort",r)}).finally(function(){var a;return e==null||(a=e.signal)==null||a.removeEventListener==null?void 0:a.removeEventListener("abort",r)});return s.cancel=i,s}function dt(t){return t[P]}var vd={has:function(e,n){return dt(e).has_(n)},get:function(e,n){return dt(e).get_(n)},set:function(e,n,i){var r;return Ze(n)?(r=dt(e).set_(n,i,!0))!=null?r:!0:!1},deleteProperty:function(e,n){var i;return Ze(n)?(i=dt(e).delete_(n,!0))!=null?i:!0:!1},defineProperty:function(e,n,i){var r;return(r=dt(e).defineProperty_(n,i))!=null?r:!0},ownKeys:function(e){return dt(e).ownKeys_()},preventExtensions:function(e){B(13)}};function kd(t,e){var n,i;return Pa(),t=Ct(t,e),(i=(n=t[P]).proxy_)!=null?i:n.proxy_=new Proxy(t,vd)}function de(t){return t.interceptors_!==void 0&&t.interceptors_.length>0}function on(t,e){var n=t.interceptors_||(t.interceptors_=[]);return n.push(e),La(function(){var i=n.indexOf(e);i!==-1&&n.splice(i,1)})}function fe(t,e){var n=at();try{for(var i=[].concat(t.interceptors_||[]),r=0,s=i.length;r<s&&(e=i[r](e),e&&!e.type&&B(14),!!e);r++);return e}finally{Fe(n)}}function ve(t){return t.changeListeners_!==void 0&&t.changeListeners_.length>0}function ln(t,e){var n=t.changeListeners_||(t.changeListeners_=[]);return n.push(e),La(function(){var i=n.indexOf(e);i!==-1&&n.splice(i,1)})}function ke(t,e){var n=at(),i=t.changeListeners_;if(i){i=i.slice();for(var r=0,s=i.length;r<s;r++)i[r](e);Fe(n)}}function yd(t,e,n){return lt(function(){var i,r=Ct(t,n)[P];(i=e)!=null||(e=Zu(t)),Xn(e).forEach(function(s){return r.make_(s,e[s])})}),t}var hs="splice",Te="update",_d=1e4,bd={get:function(e,n){var i=e[P];return n===P?i:n==="length"?i.getArrayLength_():typeof n=="string"&&!isNaN(n)?i.get_(parseInt(n)):Re(In,n)?In[n]:e[n]},set:function(e,n,i){var r=e[P];return n==="length"&&r.setArrayLength_(i),typeof n=="symbol"||isNaN(n)?e[n]=i:r.set_(parseInt(n),i),!0},preventExtensions:function(){B(15)}},Lr=function(){function t(n,i,r,s){n===void 0&&(n="ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=r,this.legacyMode_=s,this.atom_=new Ge(n),this.enhancer_=function(a,o){return i(a,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 on(this,i)},e.observe_=function(i,r){return r===void 0&&(r=!1),r&&i({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),ln(this,i)},e.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},e.setArrayLength_=function(i){(typeof i!="number"||isNaN(i)||i<0)&&B("Out of range: "+i);var r=this.values_.length;if(i!==r)if(i>r){for(var s=new Array(i-r),a=0;a<i-r;a++)s[a]=void 0;this.spliceWithArray_(r,0,s)}else this.spliceWithArray_(i,r-i)},e.updateArrayLength_=function(i,r){i!==this.lastKnownLength_&&B(16),this.lastKnownLength_+=r,this.legacyMode_&&r>0&&So(i+r+1)},e.spliceWithArray_=function(i,r,s){var a=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?r=o-i:r==null?r=0:r=Math.max(0,Math.min(r,o-i)),s===void 0&&(s=tr),de(this)){var l=fe(this,{object:this.proxy_,type:hs,index:i,removedCount:r,added:s});if(!l)return tr;r=l.removedCount,s=l.added}if(s=s.length===0?s:s.map(function(d){return a.enhancer_(d,void 0)}),this.legacyMode_){var u=s.length-r;this.updateArrayLength_(o,u)}var c=this.spliceItemsIntoValues_(i,r,s);return(r!==0||s.length!==0)&&this.notifyArraySplice_(i,s,c),this.dehanceValues_(c)},e.spliceItemsIntoValues_=function(i,r,s){if(s.length<_d){var a;return(a=this.values_).splice.apply(a,[i,r].concat(s))}else{var o=this.values_.slice(i,i+r),l=this.values_.slice(i+r);this.values_.length+=s.length-r;for(var u=0;u<s.length;u++)this.values_[i+u]=s[u];for(var c=0;c<l.length;c++)this.values_[i+s.length+c]=l[c];return o}},e.notifyArrayChildUpdate_=function(i,r,s){var a=!this.owned_&&jt(),o=ve(this),l=o||a?{observableKind:"array",object:this.proxy_,type:Te,debugObjectName:this.atom_.name_,index:i,newValue:r,oldValue:s}:null;this.atom_.reportChanged(),o&&ke(this,l)},e.notifyArraySplice_=function(i,r,s){var a=!this.owned_&&jt(),o=ve(this),l=o||a?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:hs,index:i,removed:s,added:r,removedCount:s.length,addedCount:r.length}:null;this.atom_.reportChanged(),o&&ke(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,r){var s=this.values_;if(this.legacyMode_&&i>s.length&&B(17,i,s.length),i<s.length){this.atom_;var a=s[i];if(de(this)){var o=fe(this,{type:Te,object:this.proxy_,index:i,newValue:r});if(!o)return;r=o.newValue}r=this.enhancer_(r,a);var l=r!==a;l&&(s[i]=r,this.notifyArrayChildUpdate_(i,r,a))}else{for(var u=new Array(i+1-s.length),c=0;c<u.length-1;c++)u[c]=void 0;u[u.length-1]=r,this.spliceWithArray_(s.length,0,u)}},t}();function Sd(t,e,n,i){return n===void 0&&(n="ObservableArray"),i===void 0&&(i=!1),Pa(),lt(function(){var r=new Lr(n,e,i,!1);Ma(r.values_,P,r);var s=new Proxy(r.values_,bd);return r.proxy_=s,t&&t.length&&r.spliceWithArray_(0,0,t),s})}var In={clear:function(){return this.splice(0)},replace:function(e){var n=this[P];return n.spliceWithArray_(0,n.values_.length,e)},toJSON:function(){return this.slice()},splice:function(e,n){for(var i=arguments.length,r=new Array(i>2?i-2:0),s=2;s<i;s++)r[s-2]=arguments[s];var a=this[P];switch(arguments.length){case 0:return[];case 1:return a.spliceWithArray_(e);case 2:return a.spliceWithArray_(e,n)}return a.spliceWithArray_(e,n,r)},spliceWithArray:function(e,n,i){return this[P].spliceWithArray_(e,n,i)},push:function(){for(var e=this[P],n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return e.spliceWithArray_(e.values_.length,0,i),e.values_.length},pop:function(){return this.splice(Math.max(this[P].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=this[P],n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return e.spliceWithArray_(0,0,i),e.values_.length},reverse:function(){return w.trackingDerivation&&B(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){w.trackingDerivation&&B(37,"sort");var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var n=this[P],i=n.dehanceValues_(n.values_).indexOf(e);return i>-1?(this.splice(i,1),!0):!1}};G("at",ue);G("concat",ue);G("flat",ue);G("includes",ue);G("indexOf",ue);G("join",ue);G("lastIndexOf",ue);G("slice",ue);G("toString",ue);G("toLocaleString",ue);G("toSorted",ue);G("toSpliced",ue);G("with",ue);G("every",be);G("filter",be);G("find",be);G("findIndex",be);G("findLast",be);G("findLastIndex",be);G("flatMap",be);G("forEach",be);G("map",be);G("some",be);G("toReversed",be);G("reduce",go);G("reduceRight",go);function G(t,e){typeof Array.prototype[t]=="function"&&(In[t]=e(t))}function ue(t){return function(){var e=this[P];e.atom_.reportObserved();var n=e.dehanceValues_(e.values_);return n[t].apply(n,arguments)}}function be(t){return function(e,n){var i=this,r=this[P];r.atom_.reportObserved();var s=r.dehanceValues_(r.values_);return s[t](function(a,o){return e.call(n,a,o,i)})}}function go(t){return function(){var e=this,n=this[P];n.atom_.reportObserved();var i=n.dehanceValues_(n.values_),r=arguments[0];return arguments[0]=function(s,a,o){return r(s,a,o,e)},i[t].apply(i,arguments)}}var Nd=st("ObservableArrayAdministration",Lr);function ai(t){return Yn(t)&&Nd(t[P])}var Ed={},Ve="add",Pn="delete",vo=function(){function t(n,i,r){var s=this;i===void 0&&(i=et),r===void 0&&(r="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[P]=Ed,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=i,this.name_=r,ye(Map)||B(18),lt(function(){s.keysAtom_=Ba("ObservableMap.keys()"),s.data_=new Map,s.hasMap_=new Map,n&&s.merge(n)})}var e=t.prototype;return e.has_=function(i){return this.data_.has(i)},e.has=function(i){var r=this;if(!w.trackingDerivation)return this.has_(i);var s=this.hasMap_.get(i);if(!s){var a=s=new Qe(this.has_(i),Zn,"ObservableMap.key?",!1);this.hasMap_.set(i,a),co(a,function(){return r.hasMap_.delete(i)})}return s.get()},e.set=function(i,r){var s=this.has_(i);if(de(this)){var a=fe(this,{type:s?Te:Ve,object:this,newValue:r,name:i});if(!a)return this;r=a.newValue}return s?this.updateValue_(i,r):this.addValue_(i,r),this},e.delete=function(i){var r=this;if(this.keysAtom_,de(this)){var s=fe(this,{type:Pn,object:this,name:i});if(!s)return!1}if(this.has_(i)){var a=jt(),o=ve(this),l=o||a?{observableKind:"map",debugObjectName:this.name_,type:Pn,object:this,oldValue:this.data_.get(i).value_,name:i}:null;return xe(function(){var u;r.keysAtom_.reportChanged(),(u=r.hasMap_.get(i))==null||u.setNewValue_(!1);var c=r.data_.get(i);c.setNewValue_(void 0),r.data_.delete(i)}),o&&ke(this,l),!0}return!1},e.updateValue_=function(i,r){var s=this.data_.get(i);if(r=s.prepareNewValue_(r),r!==w.UNCHANGED){var a=jt(),o=ve(this),l=o||a?{observableKind:"map",debugObjectName:this.name_,type:Te,object:this,oldValue:s.value_,name:i,newValue:r}:null;s.setNewValue_(r),o&&ke(this,l)}},e.addValue_=function(i,r){var s=this;this.keysAtom_,xe(function(){var u,c=new Qe(r,s.enhancer_,"ObservableMap.key",!1);s.data_.set(i,c),r=c.value_,(u=s.hasMap_.get(i))==null||u.setNewValue_(!0),s.keysAtom_.reportChanged()});var a=jt(),o=ve(this),l=o||a?{observableKind:"map",debugObjectName:this.name_,type:Ve,object:this,name:i,newValue:r}:null;o&&ke(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,r=this.keys();return Yt({next:function(){var a=r.next(),o=a.done,l=a.value;return{done:o,value:o?void 0:i.get(l)}}})},e.entries=function(){var i=this,r=this.keys();return Yt({next:function(){var a=r.next(),o=a.done,l=a.value;return{done:o,value:o?void 0:[l,i.get(l)]}}})},e[Symbol.iterator]=function(){return this.entries()},e.forEach=function(i,r){for(var s=kt(this),a;!(a=s()).done;){var o=a.value,l=o[0],u=o[1];i.call(r,u,l,this)}},e.merge=function(i){var r=this;return ot(i)&&(i=new Map(i)),xe(function(){He(i)?Ku(i).forEach(function(s){return r.set(s,i[s])}):Array.isArray(i)?i.forEach(function(s){var a=s[0],o=s[1];return r.set(a,o)}):At(i)?(Gu(i)||B(19,i),i.forEach(function(s,a){return r.set(a,s)})):i!=null&&B(20,i)}),this},e.clear=function(){var i=this;xe(function(){Za(function(){for(var r=kt(i.keys()),s;!(s=r()).done;){var a=s.value;i.delete(a)}})})},e.replace=function(i){var r=this;return xe(function(){for(var s=Ad(i),a=new Map,o=!1,l=kt(r.data_.keys()),u;!(u=l()).done;){var c=u.value;if(!s.has(c)){var d=r.delete(c);if(d)o=!0;else{var f=r.data_.get(c);a.set(c,f)}}}for(var v=kt(s.entries()),g;!(g=v()).done;){var m=g.value,p=m[0],h=m[1],_=r.data_.has(p);if(r.set(p,h),r.data_.has(p)){var N=r.data_.get(p);a.set(p,N),_||(o=!0)}}if(!o)if(r.data_.size!==a.size)r.keysAtom_.reportChanged();else for(var b=r.data_.keys(),E=a.keys(),O=b.next(),x=E.next();!O.done;){if(O.value!==x.value){r.keysAtom_.reportChanged();break}O=b.next(),x=E.next()}r.data_=a}),this},e.toString=function(){return"[object ObservableMap]"},e.toJSON=function(){return Array.from(this)},e.observe_=function(i,r){return ln(this,i)},e.intercept_=function(i){return on(this,i)},Ot(t,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Map"}}])}(),ot=st("ObservableMap",vo);function Ad(t){if(At(t)||ot(t))return t;if(Array.isArray(t))return new Map(t);if(He(t)){var e=new Map;for(var n in t)e.set(n,t[n]);return e}else return B(21,t)}var Od={},ko=function(){function t(n,i,r){var s=this;i===void 0&&(i=et),r===void 0&&(r="ObservableSet"),this.name_=void 0,this[P]=Od,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=r,ye(Set)||B(22),this.enhancer_=function(a,o){return i(a,o,r)},lt(function(){s.atom_=Ba(s.name_),n&&s.replace(n)})}var e=t.prototype;return e.dehanceValue_=function(i){return this.dehancer!==void 0?this.dehancer(i):i},e.clear=function(){var i=this;xe(function(){Za(function(){for(var r=kt(i.data_.values()),s;!(s=r()).done;){var a=s.value;i.delete(a)}})})},e.forEach=function(i,r){for(var s=kt(this),a;!(a=s()).done;){var o=a.value;i.call(r,o,o,this)}},e.add=function(i){var r=this;if(this.atom_,de(this)){var s=fe(this,{type:Ve,object:this,newValue:i});if(!s)return this}if(!this.has(i)){xe(function(){r.data_.add(r.enhancer_(i,void 0)),r.atom_.reportChanged()});var a=!1,o=ve(this),l=o||a?{observableKind:"set",debugObjectName:this.name_,type:Ve,object:this,newValue:i}:null;o&&ke(this,l)}return this},e.delete=function(i){var r=this;if(de(this)){var s=fe(this,{type:Pn,object:this,oldValue:i});if(!s)return!1}if(this.has(i)){var a=!1,o=ve(this),l=o||a?{observableKind:"set",debugObjectName:this.name_,type:Pn,object:this,oldValue:i}:null;return xe(function(){r.atom_.reportChanged(),r.data_.delete(i)}),o&&ke(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,r=Array.from(this.keys()),s=Array.from(this.values());return Yt({next:function(){var o=i;return i+=1,o<s.length?{value:[r[o],s[o]],done:!1}:{done:!0}}})},e.keys=function(){return this.values()},e.values=function(){this.atom_.reportObserved();var i=this,r=0,s=Array.from(this.data_.values());return Yt({next:function(){return r<s.length?{value:i.dehanceValue_(s[r++]),done:!1}:{done:!0}}})},e.intersection=function(i){if(Ce(i))return i.intersection(this);var r=new Set(this);return r.intersection(i)},e.union=function(i){if(Ce(i))return i.union(this);var r=new Set(this);return r.union(i)},e.difference=function(i){return new Set(this).difference(i)},e.symmetricDifference=function(i){if(Ce(i))return i.symmetricDifference(this);var r=new Set(this);return r.symmetricDifference(i)},e.isSubsetOf=function(i){return new Set(this).isSubsetOf(i)},e.isSupersetOf=function(i){return new Set(this).isSupersetOf(i)},e.isDisjointFrom=function(i){if(Ce(i))return i.isDisjointFrom(this);var r=new Set(this);return r.isDisjointFrom(i)},e.replace=function(i){var r=this;return Tt(i)&&(i=new Set(i)),xe(function(){Array.isArray(i)?(r.clear(),i.forEach(function(s){return r.add(s)})):Ce(i)?(r.clear(),i.forEach(function(s){return r.add(s)})):i!=null&&B("Cannot initialize set from "+i)}),this},e.observe_=function(i,r){return ln(this,i)},e.intercept_=function(i){return on(this,i)},e.toJSON=function(){return Array.from(this)},e.toString=function(){return"[object ObservableSet]"},e[Symbol.iterator]=function(){return this.values()},Ot(t,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Set"}}])}(),Tt=st("ObservableSet",ko),ps=Object.create(null),ms="remove",yo=function(){function t(n,i,r,s){i===void 0&&(i=new Map),s===void 0&&(s=Ac),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=n,this.values_=i,this.name_=r,this.defaultAnnotation_=s,this.keysAtom_=new Ge("ObservableObject.keys"),this.isPlainObject_=He(this.target_)}var e=t.prototype;return e.getObservablePropValue_=function(i){return this.values_.get(i).get()},e.setObservablePropValue_=function(i,r){var s=this.values_.get(i);if(s instanceof _e)return s.set(r),!0;if(de(this)){var a=fe(this,{type:Te,object:this.proxy_||this.target_,name:i,newValue:r});if(!a)return null;r=a.newValue}if(r=s.prepareNewValue_(r),r!==w.UNCHANGED){var o=ve(this),l=!1,u=o||l?{type:Te,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:s.value_,name:i,newValue:r}:null;s.setNewValue_(r),o&&ke(this,u)}return!0},e.get_=function(i){return w.trackingDerivation&&!Re(this.target_,i)&&this.has_(i),this.target_[i]},e.set_=function(i,r,s){return s===void 0&&(s=!1),Re(this.target_,i)?this.values_.has(i)?this.setObservablePropValue_(i,r):s?Reflect.set(this.target_,i,r):(this.target_[i]=r,!0):this.extend_(i,{value:r,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,s)},e.has_=function(i){if(!w.trackingDerivation)return i in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var r=this.pendingKeys_.get(i);return r||(r=new Qe(i in this.target_,Zn,"ObservableObject.key?",!1),this.pendingKeys_.set(i,r)),r.get()},e.make_=function(i,r){if(r===!0&&(r=this.defaultAnnotation_),r!==!1){if(!(i in this.target_)){var s;if((s=this.target_[Ee])!=null&&s[i])return;B(1,r.annotationType_,this.name_+"."+i.toString())}for(var a=this.target_;a&&a!==Jn;){var o=Cn(a,i);if(o){var l=r.make_(this,i,o,a);if(l===0)return;if(l===1)break}a=Object.getPrototypeOf(a)}vs(this,r,i)}},e.extend_=function(i,r,s,a){if(a===void 0&&(a=!1),s===!0&&(s=this.defaultAnnotation_),s===!1)return this.defineProperty_(i,r,a);var o=s.extend_(this,i,r,a);return o&&vs(this,s,i),o},e.defineProperty_=function(i,r,s){s===void 0&&(s=!1),this.keysAtom_;try{he();var a=this.delete_(i);if(!a)return a;if(de(this)){var o=fe(this,{object:this.proxy_||this.target_,name:i,type:Ve,newValue:r.value});if(!o)return null;var l=o.newValue;r.value!==l&&(r=ze({},r,{value:l}))}if(s){if(!Reflect.defineProperty(this.target_,i,r))return!1}else Oe(this.target_,i,r);this.notifyPropertyAddition_(i,r.value)}finally{pe()}return!0},e.defineObservableProperty_=function(i,r,s,a){a===void 0&&(a=!1),this.keysAtom_;try{he();var o=this.delete_(i);if(!o)return o;if(de(this)){var l=fe(this,{object:this.proxy_||this.target_,name:i,type:Ve,newValue:r});if(!l)return null;r=l.newValue}var u=gs(i),c={configurable:w.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:u.get,set:u.set};if(a){if(!Reflect.defineProperty(this.target_,i,c))return!1}else Oe(this.target_,i,c);var d=new Qe(r,s,"ObservableObject.key",!1);this.values_.set(i,d),this.notifyPropertyAddition_(i,d.value_)}finally{pe()}return!0},e.defineComputedProperty_=function(i,r,s){s===void 0&&(s=!1),this.keysAtom_;try{he();var a=this.delete_(i);if(!a)return a;if(de(this)){var o=fe(this,{object:this.proxy_||this.target_,name:i,type:Ve,newValue:void 0});if(!o)return null}r.name||(r.name="ObservableObject.key"),r.context=this.proxy_||this.target_;var l=gs(i),u={configurable:w.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:l.get,set:l.set};if(s){if(!Reflect.defineProperty(this.target_,i,u))return!1}else Oe(this.target_,i,u);this.values_.set(i,new _e(r)),this.notifyPropertyAddition_(i,void 0)}finally{pe()}return!0},e.delete_=function(i,r){if(r===void 0&&(r=!1),this.keysAtom_,!Re(this.target_,i))return!0;if(de(this)){var s=fe(this,{object:this.proxy_||this.target_,name:i,type:ms});if(!s)return null}try{var a;he();var o=ve(this),l=!1,u=this.values_.get(i),c=void 0;if(!u&&(o||l)){var d;c=(d=Cn(this.target_,i))==null?void 0:d.value}if(r){if(!Reflect.deleteProperty(this.target_,i))return!1}else delete this.target_[i];if(u&&(this.values_.delete(i),u instanceof Qe&&(c=u.value_),ro(u)),this.keysAtom_.reportChanged(),(a=this.pendingKeys_)==null||(a=a.get(i))==null||a.set(i in this.target_),o||l){var f={type:ms,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:c,name:i};o&&ke(this,f)}}finally{pe()}return!0},e.observe_=function(i,r){return ln(this,i)},e.intercept_=function(i){return on(this,i)},e.notifyPropertyAddition_=function(i,r){var s,a=ve(this),o=!1;if(a||o){var l=a||o?{type:Ve,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:i,newValue:r}:null;a&&ke(this,l)}(s=this.pendingKeys_)==null||(s=s.get(i))==null||s.set(!0),this.keysAtom_.reportChanged()},e.ownKeys_=function(){return this.keysAtom_.reportObserved(),Xn(this.target_)},e.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},t}();function Ct(t,e){var n;if(Re(t,P))return t;var i=(n=e==null?void 0:e.name)!=null?n:"ObservableObject",r=new yo(t,new Map,String(i),Lc(e));return Qn(t,P,r),t}var wd=st("ObservableObjectAdministration",yo);function gs(t){return ps[t]||(ps[t]={get:function(){return this[P].getObservablePropValue_(t)},set:function(n){return this[P].setObservablePropValue_(t,n)}})}function oi(t){return Yn(t)?wd(t[P]):!1}function vs(t,e,n){var i;(i=t.target_[Ee])==null||delete i[n]}var Td=bo(0),Cd=function(){var t=!1,e={};return Object.defineProperty(e,"0",{set:function(){t=!0}}),Object.create(e)[0]=1,t===!1}(),Di=0,_o=function(){};function xd(t,e){Object.setPrototypeOf?Object.setPrototypeOf(t.prototype,e):t.prototype.__proto__!==void 0?t.prototype.__proto__=e:t.prototype=e}xd(_o,Array.prototype);var $r=function(t){function e(i,r,s,a){var o;return s===void 0&&(s="ObservableArray"),a===void 0&&(a=!1),o=t.call(this)||this,lt(function(){var l=new Lr(s,r,a,!0);l.proxy_=o,Ma(o,P,l),i&&i.length&&o.spliceWithArray(0,0,i),Cd&&Object.defineProperty(o,"0",Td)}),o}ja(e,t);var n=e.prototype;return n.concat=function(){this[P].atom_.reportObserved();for(var r=arguments.length,s=new Array(r),a=0;a<r;a++)s[a]=arguments[a];return Array.prototype.concat.apply(this.slice(),s.map(function(o){return ai(o)?o.slice():o}))},n[Symbol.iterator]=function(){var i=this,r=0;return Yt({next:function(){return r<i.length?{value:i[r++],done:!1}:{done:!0,value:void 0}}})},Ot(e,[{key:"length",get:function(){return this[P].getArrayLength_()},set:function(r){this[P].setArrayLength_(r)}},{key:Symbol.toStringTag,get:function(){return"Array"}}])}(_o);Object.entries(In).forEach(function(t){var e=t[0],n=t[1];e!=="concat"&&Qn($r.prototype,e,n)});function bo(t){return{enumerable:!1,configurable:!0,get:function(){return this[P].get_(t)},set:function(n){this[P].set_(t,n)}}}function Rd(t){Oe($r.prototype,""+t,bo(t))}function So(t){if(t>Di){for(var e=Di;e<t+100;e++)Rd(e);Di=t}}So(1e3);function Fd(t,e,n){return new $r(t,e,n)}function ur(t,e){if(typeof t=="object"&&t!==null){if(ai(t))return e!==void 0&&B(23),t[P].atom_;if(Tt(t))return t.atom_;if(ot(t)){if(e===void 0)return t.keysAtom_;var n=t.data_.get(e)||t.hasMap_.get(e);return n||B(25,e,cr(t)),n}if(oi(t)){if(!e)return B(26);var i=t[P].values_.get(e);return i||B(27,e,cr(t)),i}if(Dr(t)||ii(t)||Dn(t))return t}else if(ye(t)&&Dn(t[P]))return t[P];B(28)}function Dd(t,e){if(t||B(29),Dr(t)||ii(t)||Dn(t)||ot(t)||Tt(t))return t;if(t[P])return t[P];B(24,t)}function cr(t,e){var n;if(e!==void 0)n=ur(t,e);else{if(ri(t))return t.name;oi(t)||ot(t)||Tt(t)?n=Dd(t):n=ur(t)}return n.name_}function lt(t){var e=at(),n=ti(!0);he();try{return t()}finally{pe(),ni(n),Fe(e)}}var ks=Jn.toString;function Mr(t,e,n){return n===void 0&&(n=-1),dr(t,e,n)}function dr(t,e,n,i,r){if(t===e)return t!==0||1/t===1/e;if(t==null||e==null)return!1;if(t!==t)return e!==e;var s=typeof t;if(s!=="function"&&s!=="object"&&typeof e!="object")return!1;var a=ks.call(t);if(a!==ks.call(e))return!1;switch(a){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=ys(t),e=ys(e);var o=a==="[object Array]";if(!o){if(typeof t!="object"||typeof e!="object")return!1;var l=t.constructor,u=e.constructor;if(l!==u&&!(ye(l)&&l instanceof l&&ye(u)&&u instanceof u)&&"constructor"in t&&"constructor"in e)return!1}if(n===0)return!1;n<0&&(n=-1),i=i||[],r=r||[];for(var c=i.length;c--;)if(i[c]===t)return r[c]===e;if(i.push(t),r.push(e),o){if(c=t.length,c!==e.length)return!1;for(;c--;)if(!dr(t[c],e[c],n-1,i,r))return!1}else{var d=Object.keys(t),f;if(c=d.length,Object.keys(e).length!==c)return!1;for(;c--;)if(f=d[c],!(Re(e,f)&&dr(t[f],e[f],n-1,i,r)))return!1}return i.pop(),r.pop(),!0}function ys(t){return ai(t)?t.slice():At(t)||ot(t)||Ce(t)||Tt(t)?Array.from(t.entries()):t}function Yt(t){return t[Symbol.iterator]=Id,t}function Id(){return this}["Symbol","Map","Set"].forEach(function(t){var e=Da();typeof e[t]=="undefined"&&B("MobX requires global '"+t+"' to be available or polyfilled")});typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Zc,extras:{getDebugName:cr},$mobx:P});function Pd(t,e=[]){M.useEffect(()=>{const n=si(t);return()=>n()},e)}function No(t,e={}){const{defaultValue:n,deps:i=[]}=e,r=M.useMemo(()=>t,i),[s,a]=M.useState(()=>r()||n);return M.useEffect(()=>{const o=si(()=>a(r()));return()=>o()},[r,...i]),s}function Ld(t,e,n=[]){const i=M.useMemo(()=>t,n),r=M.useMemo(()=>e,n);M.useEffect(()=>{const s=ad(i,r);return()=>s()},[i,r])}let Ur=new Map;const fr=M.createContext(Ur),$d=({children:t,stores:e})=>{const n=M.useContext(fr),i=M.useMemo(()=>{const r=new Map;return e.forEach(s=>r.set(s.class,s.value)),Ur=new Map([...n,...r])},[]);return hu.jsx(fr.Provider,{value:i,children:t})};function Md(t){return M.useContext(fr).get(t)}function Ud(t){return Ur.get(t)}class Eo{constructor(e,n){F(this,"logger");F(this,"channel");F(this,"listeners",new Map);F(this,"eventQueue",new Map);this.logger=Ie.withPrefix(n,"EventBus");try{this.logger.debug(`Creating BroadcastChannel with name "${e}"`),this.channel=new BroadcastChannel(e),this.channel.onmessage=i=>this.handleMessage(i),this.channel.onmessageerror=i=>this.logger.error("NizzaBroadcastChannel error:",i)}catch(i){throw this.logger.error("Failed to create NizzaBroadcastChannel:",i),i}}on(e,n){return this.logger.debug(`Subscribing to pattern "${e}"`),this.subscribeToEvent(e,n),{off:()=>this.unsubscribeFromEvent(e,n)}}emit(e,n,i={}){this.logger.debug(`Emitting event "${e}" with data`,n),this.emitEvent(e,n,i)}handleMessage(e){const n=e.data,{name:i}=n;this.logger.debug(`Received message "${i}" with data`,n);for(const[r,s]of this.listeners.entries())this.matchWildcard(r,i)&&(this.logger.debug(`Matching pattern "${r}" for event "${i}"`),s.forEach(a=>a({...n,wildcard:r})))}subscribeToEvent(e,n){if(typeof e!="string"||typeof n!="function"){const r=new Error("Invalid arguments");throw this.logger.error(r),r}this.listeners.has(e)||(this.logger.debug(`Adding new pattern "${e}"`),this.listeners.set(e,new Set));const i=Array.from(this.eventQueue).filter(([r])=>{const s=this.matchWildcard(e,r);return s&&(this.eventQueue.delete(r),this.logger.debug(`Dequeued pending events for "${r}".`)),s}).flatMap(([,r])=>r);for(const[r,s]of this.listeners.entries())this.matchWildcard(r,e)&&(this.logger.debug(`Adding listener to pattern "${r}"`),s.add(n),i.length&&(this.logger.debug(`Delivering pending events for "${e}".`),i.forEach(a=>{n({...a,wildcard:r})})))}emitEvent(e,n,i){if(typeof e!="string"){const a=new Error("Invalid arguments");throw this.logger.error(a),a}const r={name:e,data:n,attrs:i},s=Array.from(this.getMatchingListeners(e));if(s.length){this.logger.debug(`Delivering event "${e}" to listeners`);for(const[a,o]of s)o({...r,wildcard:a})}else this.logger.debug(`No listeners for event "${e}", enqueuing`),this.eventQueue.has(e)||this.eventQueue.set(e,[]),this.eventQueue.get(e).push(r);this.logger.debug("Posting message to channel",r),this.channel.postMessage(r)}*getMatchingListeners(e){this.logger.debug(`Getting matching listeners for event "${e}"`);for(const[n,i]of this.listeners.entries())if(this.matchWildcard(n,e))for(const r of i)yield[n,r]}unsubscribeFromEvent(e,n){if(this.listeners.has(e)){this.logger.debug(`Unsubscribing from event "${e}"`);const i=this.listeners.get(e);i.delete(n),i.size===0&&(this.logger.debug(`No more listeners for event "${e}", deleting`),this.listeners.delete(e))}}matchWildcard(e,n){const i=e.replace(/\*/g,"[^:]*").replace(/\*\*/g,".*"),s=new RegExp(`^${i}$`).test(n);return this.logger.debug(`Wildcard "${e}" matches with pattern "${n}": ${s}`),s}}const Vd="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let jd=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t));for(;t--;)e+=Vd[n[t]&63];return e};const Ln=(t=8)=>jd(t),Ao=(t,e=!1)=>{const n=Object.entries(t).reduce((i,[r,s])=>s!==void 0&&(!e||s!==null)?`${i}${i?"&":""}${r}=${s}`:i,"");return n?`?${n}`:""},Oo=t=>{const e=document.getElementById(t);return e?new URL(e.src).searchParams:new URLSearchParams};function Bd(){const t=new Error().stack.split(`
27
+ `);return t.length<3?"":t[2].trim().substring(3)}function Hd(t){return new Promise(e=>setTimeout(e,t))}var Vr=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function jr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var wo={exports:{}};(function(t){(function(e,n){t.exports?t.exports=n():e.log=n()})(Vr,function(){var e=function(){},n="undefined",i=typeof window!==n&&typeof window.navigator!==n&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"],s={},a=null;function o(m,p){var h=m[p];if(typeof h.bind=="function")return h.bind(m);try{return Function.prototype.bind.call(h,m)}catch{return function(){return Function.prototype.apply.apply(h,[m,arguments])}}}function l(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function u(m){return m==="debug"&&(m="log"),typeof console===n?!1:m==="trace"&&i?l:console[m]!==void 0?o(console,m):console.log!==void 0?o(console,"log"):e}function c(){for(var m=this.getLevel(),p=0;p<r.length;p++){var h=r[p];this[h]=p<m?e:this.methodFactory(h,m,this.name)}if(this.log=this.debug,typeof console===n&&m<this.levels.SILENT)return"No console available for logging"}function d(m){return function(){typeof console!==n&&(c.call(this),this[m].apply(this,arguments))}}function f(m,p,h){return u(m)||d.apply(this,arguments)}function v(m,p){var h=this,_,N,b,E="loglevel";typeof m=="string"?E+=":"+m:typeof m=="symbol"&&(E=void 0);function O(C){var q=(r[C]||"silent").toUpperCase();if(!(typeof window===n||!E)){try{window.localStorage[E]=q;return}catch{}try{window.document.cookie=encodeURIComponent(E)+"="+q+";"}catch{}}}function x(){var C;if(!(typeof window===n||!E)){try{C=window.localStorage[E]}catch{}if(typeof C===n)try{var q=window.document.cookie,re=encodeURIComponent(E),k=q.indexOf(re+"=");k!==-1&&(C=/^([^;]+)/.exec(q.slice(k+re.length+1))[1])}catch{}return h.levels[C]===void 0&&(C=void 0),C}}function R(){if(!(typeof window===n||!E)){try{window.localStorage.removeItem(E)}catch{}try{window.document.cookie=encodeURIComponent(E)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function D(C){var q=C;if(typeof q=="string"&&h.levels[q.toUpperCase()]!==void 0&&(q=h.levels[q.toUpperCase()]),typeof q=="number"&&q>=0&&q<=h.levels.SILENT)return q;throw new TypeError("log.setLevel() called with invalid level: "+C)}h.name=m,h.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},h.methodFactory=p||f,h.getLevel=function(){return b!=null?b:N!=null?N:_},h.setLevel=function(C,q){return b=D(C),q!==!1&&O(b),c.call(h)},h.setDefaultLevel=function(C){N=D(C),x()||h.setLevel(C,!1)},h.resetLevel=function(){b=null,R(),c.call(h)},h.enableAll=function(C){h.setLevel(h.levels.TRACE,C)},h.disableAll=function(C){h.setLevel(h.levels.SILENT,C)},h.rebuild=function(){if(a!==h&&(_=D(a.getLevel())),c.call(h),a===h)for(var C in s)s[C].rebuild()},_=D(a?a.getLevel():"WARN");var z=x();z!=null&&(b=D(z)),c.call(h)}a=new v,a.getLogger=function(p){if(typeof p!="symbol"&&typeof p!="string"||p==="")throw new TypeError("You must supply a name when creating a logger.");var h=s[p];return h||(h=s[p]=new v(p,a.methodFactory)),h};var g=typeof window!==n?window.log:void 0;return a.noConflict=function(){return typeof window!==n&&window.log===a&&(window.log=g),a},a.getLoggers=function(){return s},a.default=a,a})})(wo);var hr=wo.exports;const Ii=jr(hr);var To={exports:{}};(function(t){(function(e,n){t.exports?t.exports=n():e.prefix=n(e)})(Vr,function(e){var n=function(c){for(var d=1,f=arguments.length,v;d<f;d++)for(v in arguments[d])Object.prototype.hasOwnProperty.call(arguments[d],v)&&(c[v]=arguments[d][v]);return c},i={template:"[%t] %l:",levelFormatter:function(c){return c.toUpperCase()},nameFormatter:function(c){return c||"root"},timestampFormatter:function(c){return c.toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/,"$1")},format:void 0},r,s={},a=function(c){if(!c||!c.getLogger)throw new TypeError("Argument is not a root logger");r=c},o=function(c,d){if(!c||!c.setLevel)throw new TypeError("Argument is not a logger");var f=c.methodFactory,v=c.name||"",g=s[v]||s[""]||i;function m(p,h,_){var N=f(p,h,_),b=s[_]||s[""],E=b.template.indexOf("%t")!==-1,O=b.template.indexOf("%l")!==-1,x=b.template.indexOf("%n")!==-1;return function(){for(var R="",D=arguments.length,z=Array(D),C=0;C<D;C++)z[C]=arguments[C];if(v||!s[_]){var q=b.timestampFormatter(new Date),re=b.levelFormatter(p),k=b.nameFormatter(_);b.format?R+=b.format(re,k,q):(R+=b.template,E&&(R=R.replace(/%t/,q)),O&&(R=R.replace(/%l/,re)),x&&(R=R.replace(/%n/,k))),z.length&&typeof z[0]=="string"?z[0]=R+" "+z[0]:z.unshift(R)}N.apply(void 0,z)}}return s[v]||(c.methodFactory=m),d=d||{},d.template&&(d.format=void 0),s[v]=n({},g,d),c.setLevel(c.getLevel()),r||c.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"),c},l={reg:a,apply:o},u;return e&&(u=e.prefix,l.noConflict=function(){return e.prefix===l&&(e.prefix=u),l}),l})})(To);var zd=To.exports;const _s=jr(zd);var je;let Ie=(je=class{constructor(e=""){F(this,"provider",Ii);F(this,"defaultLevel",this.getDefaultLevel());this.namePrefix=e,this.namePrefix=e?`${e}-`:"",this.provider.setDefaultLevel(this.defaultLevel),_s.reg(Ii),_s.apply(Ii,{template:"%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=this.provider.getLogger(n),r=localStorage.getItem(`loglevel:${n}`);return i.setLevel(r||this.defaultLevel),i}static withPrefix(e,n){const i=/\(\w+\)/,r={get(s,a){const o=s[a];return typeof o=="function"&&je.LOG_METHODS.includes(a)?(...l)=>(typeof l[0]=="string"&&!i.test(l[0])&&(l[0]=`(${n}) ${l[0]}`),o.apply(s,l)):o}};return new Proxy(e,r)}getDefaultLevel(){var i;const e=localStorage.getItem("loglevel");return(i=je.LOG_METHODS.reduce((r,s)=>{const a=s.toUpperCase();return r[a]=hr.levels[a],r},{})[e==null?void 0:e.toUpperCase()])!=null?i:hr.levels.INFO}},F(je,"LOG_METHODS",["trace","debug","info","warn","error","log"]),je);const ce=class ce{constructor(){F(this,"instanceId",Ln());F(this,"log",new Ie("nz"));F(this,"coreLogger",this.log.createLogger("core"));F(this,"_config",null);F(this,"_account");F(this,"_accountStatus","idle");F(this,"_productDataSource");F(this,"_eventBus",new Eo("nizza",this.coreLogger));F(this,"activeAccountFetchId",null);this.coreLogger=Ie.withPrefix(this.coreLogger,`NizzaStore:${this.instanceId}`),yd(this,{_config:W,_account:W,_productDataSource:W,_accountStatus:W,config:Ue,account:Ue,accountName:Ue,accountStatus:Ue,setAccount:se,configure:se,refetchAccount:se,setProductDataSource:se,setAddToCartConfig:se,setProductId:se},{name:"NizzaStore",autoBind:!0}),this.refetchAccount=this.refetchAccount.bind(this)}static instance(){var n;if(!!((n=window==null?void 0:window.nizza)!=null&&n.store))ce._instance=window.nizza.store;else{const i=new ce;ce._instance=i,ce._instance.coreLogger.debug("Created new NizzaStore instance")}return window.nizza||(window.nizza={},window.nz={},ce._instance.coreLogger.debug("Initialized nizza window object")),window.nizza.store=ce._instance,window.nz=window.nizza,ce._instance}async configure(e){try{this.coreLogger.debug("Running configure with config:",e),await this.updateConfig(e)}catch(n){this.setAccountStatus("error"),this.coreLogger.error("Error running configure",n)}}async updateConfig(e={}){var r,s;const{account:n,authToken:i}=(r=this._config)!=null?r:{};this._config={...this._config,...e},(s=this._config)!=null&&s.account&&(n!==this._config.account||i!==this._config.authToken)?(this.coreLogger.debug(`Fetching account data for account: ${this._config.account}, authToken provided: ${!!this._config.authToken}`),await this.fetchAccount(this._config.account,this._config.authToken)):this.coreLogger.debug("Skipped fetching account data as the account or authToken did not change"),e.getProductDataSource&&this.setProductDataSource(await e.getProductDataSource())}async fetchAccount(e,n){this.setAccountStatus("loading");const i=Ln();this.activeAccountFetchId=i;try{const r=await zo(e,n);if(this.activeAccountFetchId!==i){this.coreLogger.debug("Fetch account request was superseded by a newer request");return}this.setAccount(r),this.setAccountStatus("success"),this.coreLogger.debug("Account fetched and set successfully:",r)}catch(r){this.activeAccountFetchId===i&&(this.setAccountStatus("error"),this.coreLogger.debug("Error fetching account:",r))}}setAccount(e){this._account=e}setAccountStatus(e){this._accountStatus=e}setProductDataSource(e){this._productDataSource=e}setProductId(e){this._config&&(this._config.productId=e)}setOrderFormId(e){this._config&&(this._config.orderFormId=e)}setAddToCartConfig(e){if(!this._config){const n="You cannot set addToCartConfig before running configure()";throw this.coreLogger.error(n),new Error(n)}this._config.addToCartConfig=e}setAuthToken(e){this.updateConfig({authToken:e})}async refetchAccount(){var e;(e=this._config)!=null&&e.account&&await this.fetchAccount(this._config.account,this._config.authToken)}get version(){return ce.version}get config(){return this._config}get account(){return this._account}get accountStatus(){return this._accountStatus}get accountName(){var e;return(e=this._config)==null?void 0:e.account}isPvtAccount(e){var n;return!!(e&&((n=this._config)!=null&&n.authToken))}isPubAccount(e){var n;return!!(e&&!((n=this._config)!=null&&n.authToken))}get productDataSource(){return this._productDataSource}get eventBus(){return this._eventBus}};F(ce,"version","7"),F(ce,"_instance");let $n=ce;const ut=t=>{const e=$n.instance();return md(()=>!!e.account,()=>t==null?void 0:t(e)),e};function Co(){return M.useMemo(()=>ut(),[])}function xo(t,e){const n=Co();return No(()=>t(n),e)}const{coreLogger:qd}=ut(),Gd=Ie.withPrefix(qd,"CustomFetch");async function St(t){const{url:e,method:n="GET",body:i,raw:r=!1,contentTypeJson:s=!0,timeout:a,...o}=t,l=new Headers({...s?{"content-type":"application/json"}:{},...t.headers});try{const u=new AbortController,{signal:c}=u;let d;const f=fetch(e,{method:n,headers:l,body:i,signal:c,...o});a&&(d=setTimeout(()=>{u.abort()},a));const v=await f;if(r)return v;const g=await v.json();if(clearTimeout(d),!v.ok){const m=g?JSON.stringify(g):v.statusText;throw new Error(m)}return g}catch(u){throw Gd.debug(u),u}}const Kd=t=>St({...t,contentTypeJson:!1,raw:!1});function Wd(t,e,n){fetch(e).then(i=>i.blob()).then(i=>Ro(i,`${t}.${n}`))}const Ro=(t,e,n)=>{const i=[t],r=new Blob(i,{type:n!=null?n:"application/octet-stream"});if(typeof window.navigator.msSaveBlob!="undefined")return window.navigator.msSaveBlob(r,e);const s=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(r):window.webkitURL.createObjectURL(r),a=document.createElement("a");return a.style.display="none",a.href=s,a.setAttribute("download",e),typeof a.download=="undefined"&&a.setAttribute("target","_blank"),document.body.appendChild(a),a.click(),setTimeout(()=>{document.body.removeChild(a),window.URL.revokeObjectURL(s)},200)},{coreLogger:Jd}=ut(),Yd=Ie.withPrefix(Jd,"getClientTimeZone");function Qd(){var i,r,s;let t=null,e=null,n=null;try{t=(s=(r=(i=Intl.DateTimeFormat())==null?void 0:i.resolvedOptions())==null?void 0:r.timeZone)!=null?s:null;const a=-new Date().getTimezoneOffset();n=a;const o=a>=0?"+":"-",l=String(Math.floor(Math.abs(a)/60)).padStart(2,"0"),u=String(Math.abs(a)%60).padStart(2,"0");e=`${o}${l}:${u}`}catch{Yd.error("Error obtaining time zone or offset")}return{offset:e,offsetValue:n,value:t,country:null,included:null,label:null}}var Fo=(t=>(t.VTEX="VTEX",t.VTEX_IO="VTEX-IO",t.VTEX_CMS="PORTAL-VTEX",t.PLATFORM="PLATFORM",t.UNKNOWN="UNKNOWN",t))(Fo||{}),Do=(t=>(t.PLATFORM="platform_module",t.ADENDA="subscription_module",t.APP_STORE="app_store",t))(Do||{}),Io=(t=>(t.ACTIVE="active_contract",t.INACTIVE="inactive_contract",t))(Io||{}),Po=(t=>(t.LITE="lite",t.STANDARD="standard",t.PRO="pro",t))(Po||{}),Lo=(t=>(t.LITE="PLAN_LITE",t.STANDARD="PLAN_ESTANDAR",t.PRO="PLAN_PRO",t.NONE="NO_PLAN",t))(Lo||{}),$o=(t=>(t.PAST="past",t.LIVE="live",t.FUTURE="future",t))($o||{});class Mo extends rt{constructor(e){super("CREATE_PLAN_ERROR",`Error creating plan: ${e.plan}`,e)}}const bs=`${rn.apiUrls.restV1}/plans`;class Uo{async get(e){const i=`/info${Ao({planType:e})}`,r=bs+i,{data:s}=await St({url:r});return s}async create(e){const n=`${bs}/create`,{success:i}=await St({url:n,method:"POST",body:JSON.stringify(e)});if(!i)throw new Mo(e)}}function Xd(t){const{host:e,account:n,username:i,createdAt:r,subscriptionType:s,installationDateApp:a,...o}=t;return{...o,account:n,host:e!=null?e:null,username:i!=null?i:n,createdAt:new Date(r),subscriptionType:s!=null?s:null,installationDateApp:new Date(a)}}function Zd(t){const{host:e,...n}=t;return{...n,host:e!=null?e:null,plan:{}}}const ef=`${rn.apiUrls.restV1}/accounts/v2`;class Vo{async get(e){const n=`${ef}/${e}`,{data:i}=await St({url:n});return i?Zd(i):null}}const tf=`${rn.apiUrls.restV1}/accounts/v2/pvt`;class nf{async get(e,n){const i=`${tf}/${e}`,{data:r}=await St({url:i,headers:{authorization:`Bearer ${n}`}});return r?Xd(r):null}}class jo{constructor(e,n,i){this.publicAccountRepo=e,this.privateAccountRepo=n,this.accountPlanRepo=i}async get(e,n){try{const i=n?await this.privateAccountRepo.get(e,n):await this.publicAccountRepo.get(e);if(!i)throw new er(e);const r=await this.accountPlanRepo.get(i.descriptionPlan);if(!r)throw new er(i.descriptionPlan);return{...i,plan:r}}catch(i){throw new Rr(i)}}}const rf=new Vo,sf=new nf,af=new Uo,Bo=new jo(rf,sf,af),Ho=()=>{const{account:t,accountName:e,accountStatus:n,refetchAccount:i,isPvtAccount:r,isPubAccount:s}=xo(u=>({account:u.account,accountName:u.accountName,accountStatus:u.accountStatus,refetchAccount:u.refetchAccount,isPvtAccount:u.isPvtAccount,isPubAccount:u.isPubAccount})),a=["idle","loading"].includes(n);return{account:t,accountName:e,isLoading:a,isError:n==="error",isSuccess:n==="success",accountStatus:n,refetchAccount:i,isPvtAccount:r,isPubAccount:s}};async function zo(t,e){return Bo.get(t,e)}var qo=(t=>(t.CREATED="CREATED",t.STARTING="STARTING",t.LIVE="LIVE",t.FINALIZED="FINALIZED",t))(qo||{});const of={ALL:"*",CORE:"core:**",ADD_TO_CART_HOOKS:"core:addToCartHooks:**",LIVE_STREAMING_EVENT:"event:**",EVENT_CHAT:"event:chat:**",EVENT_PRODUCTS:"event:products:**",CUSTOMIZE_LIVE:"customize-live:**",PLAYER:"player:**",SNACK_SIZE_VIDEO:"ssv:**",SNACK_SIZE_VIDEO_ADMIN:"ssv-admin:**",UI:"ui:**",UTILS:"utils:**"},Go={EVENT_STATUS_CHANGED:"event:statusChanged",ATCH_ACTION_EXECUTED:"core:addToCartHooks:actionExecuted"};var Ko=(t=>(t.English="en",t.Spanish="es",t.Portuguese="pt",t))(Ko||{}),Wo=(t=>(t.COMBO="Combo",t.BADGE="Badged",t))(Wo||{}),Jo=(t=>(t.VTEX="VTEX",t.PLATFORM="platform",t.CACE="CACE",t.GLOBAL_PAGE="globalPage",t.CUSTOMIZATION="customization",t.FAST_STORE="faststore",t.UNKNOWN="unknown",t))(Jo||{});const lf=4;var Yo=(t=>(t.Created="CREATED",t.Finalized="FINALIZED",t.Live="LIVE",t.Starting="STARTING",t))(Yo||{}),Qo=(t=>(t.Add="add",t.Remove="remove",t))(Qo||{}),Xo=(t=>(t.Active="active",t.Inactive="inactive",t))(Xo||{});const uf={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"}}]}}]}}]}}]},cf={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"}}]}}]}}]}}]},df={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"}}]}}]}}]}}]},ff={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"}}]}}]}}]}}]},hf={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"}}]}}]}}]}}]},pf={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"}}]}}]}}]}}]},mf={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"}}]}}]}}]}}]},gf={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"}}]}}]}}]}}]},vf={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"}}]}}]}}]}}]},kf={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"}}]}}]}}]}}]},yf={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"}}]}}]}}]}}]},_f={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"}}]}}]}}]}}]},bf={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"}}]}}]}}]}}]},Zo={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"}}]}}]}}]}}]},Sf={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"}}]}}]}}]}}]},Nf={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"highlightProduct"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"HighlightProductInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"highlightProduct"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"HighlightProductSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Ef={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"}}]}}]}}]}}]},Af={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"}}]}}]}}]}}]},Of={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"}}]}}]}}]}}]},wf={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"sendAddToCart"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"AddToCartInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sendAddToCart"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AddToCartSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Tf={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"}}]}}]}}]}}]},Cf={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"}}]}}]}}]}}]},xf={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreatePlayList"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreatePlayListInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createPlayList"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreatePlayListSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Rf={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"}}]}}]}}]}}]},Ff={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"}}]}}]}}]}}]},Df={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"}}]}}]}}]}}]},If={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"}}]}}]}}]}}]},Pf={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"}}]}}]}}]}}]},Lf={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetPlayLists"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getPlayLists"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PlayListArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"created"}},{kind:"Field",name:{kind:"Name",value:"videoAmount"}},{kind:"Field",name:{kind:"Name",value:"productAmount"}},{kind:"Field",name:{kind:"Name",value:"updated"}},{kind:"Field",name:{kind:"Name",value:"videos"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"order"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},$f={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"}}]}}]}}]}}]}}]},Mf={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"}}]}}]}}]}}]},Uf={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdatePlayList"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdatePlayListInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updatePlayList"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"UpdatePlayListSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Vf={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"}}]}}]}}]}}]},jf={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetPlayList"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetPlayListQueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getPlayList"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PlayListData"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"videos"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"productId"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}},{kind:"Field",name:{kind:"Name",value:"order"}},{kind:"Field",name:{kind:"Name",value:"productName"}},{kind:"Field",name:{kind:"Name",value:"productImageUrl"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Bf=Object.freeze(Object.defineProperty({__proto__:null,AddCollectionDocument:uf,AppendProductsToSnackVideoDocument:Cf,BlockUserDocument:kf,ChangeAccountUsernameDocument:yf,CreatePlayListDocument:xf,CreateSnackVideoBatchDocument:Rf,DeleteAllCustomizationDocument:Ef,DeleteChatMessageDocument:_f,DeleteCollectionDocument:cf,DeleteRelationshipWithSnackVideoDocument:Ff,DeleteSnackVideoDocument:Df,EventStatus:Yo,FindByProductSnackVideoDocument:Vf,FindCollectionDocument:df,FindManySnackVideosDocument:If,FindMinimalEventDocument:gf,GetAllChatMessageDocument:bf,GetAllCollectionsDocument:ff,GetAllCustomizationDocument:Af,GetAllSnackVideosDocument:Pf,GetChatRoomTokenDocument:Zo,GetPlayListDocument:jf,GetPlayListsDocument:Lf,GetSnackVideoRelationshipsDocument:$f,GetTimeLineDocument:Tf,HighlightProductDocument:Nf,ManageCollectionProductDocument:hf,Methods:Qo,PinChatMessageDocument:Sf,SearchCollectionsDocument:pf,SearchMinimalEventsDocument:vf,SearchSnackVideosDocument:Mf,SendAddToCartDocument:wf,Status:Xo,UpdateCollectionDocument:mf,UpdateCustomizationDocument:Of,UpdatePlayListDocument:Uf},Symbol.toStringTag,{value:"Module"}));var li=(t=>(t.OPEN_TAB="openTab",t.OPEN_VARIATION_SELECTOR="openVariationSelector",t.ADD_TO_CART="addToCart",t))(li||{});function Hf(t){return{class:t,_value:null,get value(){return this._value||(this._value=new t,Object.freeze(this)),this._value}}}var Pe=(t=>(t.Local="local",t.VtexLegacy="vtexlegacy",t.VtexIO="vtexio",t.VtexFastStore="faststore",t.Platform="platform",t.External="external",t))(Pe||{}),Br=(t=>(t.PROD="prod",t.DEV="dev",t.LOCAL="local",t))(Br||{});const{coreLogger:zf}=ut(),pr=Ie.withPrefix(zf,"addToCartHooks"),Pi="addToCartHooks.notification.error",mr={errorAddingToCart:Pi,errorOpeningVariationSelector:Pi,errorOpeningNewTab:Pi,successAddingToCart:"addToCartHooks.notification.success"};async function qf(t){const e={...t,action:{type:li.ADD_TO_CART,exec:()=>pr.error("action no implemented in validate hook")}};try{const n=await Gf(e),i=await Kf(n);await Wf(i)}catch(n){pr.error("error unhandled",n)}}async function Gf(t){var s,a;const{context:e,userAddToCartConfig:n}=t,i=(s=n==null?void 0:n.hooks)==null?void 0:s.transform;let r=t.product;if(i)try{r=await i({product:{...r},data:(a=e.data)!=null?a:{}})}catch(o){Mn("transform",o)}return{...t,product:r}}async function Kf(t){var l,u;const{context:e,hookStrategy:n,userAddToCartConfig:i,product:r}=t,s=el(t),a=(l=i==null?void 0:i.hooks)==null?void 0:l.validate;let o=n.validate({...t,actionFactory:s});if(a)try{o=await a({product:{...r},defaultAction:{...o},action:s,data:(u=e.data)!=null?u:{}})}catch(c){Mn("validate",c)}return{...t,action:o,actionFactory:s}}async function Wf(t){var p;const{eventBus:e}=ut(),{product:n,userAddToCartConfig:i,notifyFactory:r,action:s,actionFactory:a}=t,{isVariationSelectorOpen:o,data:l={}}=t.context,u=(p=i==null?void 0:i.hooks)==null?void 0:p.end,c=s.type===li.ADD_TO_CART;let d=null,f=!1;const v=()=>{!c||!o||a.openVariationSelector(!1).exec()},g=()=>{!c||f||(d?r.error(mr.errorAddingToCart):r.success(mr.successAddingToCart))},m=()=>{const h={product:n,actionType:s.type,success:!d,error:d};e.emit(Go.ATCH_ACTION_EXECUTED,h)};try{if(!s.type||!s.exec)throw new Error("Invalid action object, missing keys 'type' or 'exec'");await s.exec()}catch(h){Mn("end",h),d=h}if(u)try{f=!!await u({data:l,error:d,notify:r,actionExecuted:s})}catch(h){Mn("end",h)}v(),g(),m()}function el(t){const{actionFactory:e,userAddToCartConfig:n}=t,i=r=>Object.entries(r!=null?r:{}).reduce((s,[a,o])=>({...s,[a]:l=>({type:a,exec:()=>o(l)})}),{});return{...i(e),...i(n==null?void 0:n.actionFactory)}}function Mn(t,e){pr.error(`addToCartHooks error running ${t}: `,e)}class tl{constructor(e){F(this,"aggregate");F(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 nl(t){return new tl(t)}class Jf{constructor(e){F(this,"_value");e!==void 0&&(this._value=e)}get value(){return this._value}}var ee=(t=>(t.GENERAL_ERROR="GENERAL_ERROR",t.AXIOS_ERROR="AXIOS_ERROR",t.NETWORK_ERROR="NETWORK_ERROR",t.CONFIG_ERROR="CONFIG_ERROR",t.TIMEOUT_ERROR="TIMEOUT_ERROR",t.AUTH_ERROR="AUTH_ERROR",t.NOT_FOUND="NOT_FOUND",t.VALIDATION_ERROR="VALIDATION_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.BAD_REQUEST="BAD_REQUEST",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.CONFLICT="CONFLICT",t.GONE="GONE",t.UNSUPPORTED_MEDIA_TYPE="UNSUPPORTED_MEDIA_TYPE",t.TOO_MANY_REQUESTS="TOO_MANY_REQUESTS",t.INTERNAL_SERVER_ERROR="INTERNAL_SERVER_ERROR",t.SERVICE_UNAVAILABLE="SERVICE_UNAVAILABLE",t))(ee||{});function il(t,e){return function(){return t.apply(e,arguments)}}const{toString:Yf}=Object.prototype,{getPrototypeOf:Hr}=Object,ui=(t=>e=>{const n=Yf.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Se=t=>(t=t.toLowerCase(),e=>ui(e)===t),ci=t=>e=>typeof e===t,{isArray:xt}=Array,Qt=ci("undefined");function Qf(t){return t!==null&&!Qt(t)&&t.constructor!==null&&!Qt(t.constructor)&&le(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const rl=Se("ArrayBuffer");function Xf(t){let e;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&rl(t.buffer),e}const Zf=ci("string"),le=ci("function"),sl=ci("number"),di=t=>t!==null&&typeof t=="object",eh=t=>t===!0||t===!1,Sn=t=>{if(ui(t)!=="object")return!1;const e=Hr(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},th=Se("Date"),nh=Se("File"),ih=Se("Blob"),rh=Se("FileList"),sh=t=>di(t)&&le(t.pipe),ah=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||le(t.append)&&((e=ui(t))==="formdata"||e==="object"&&le(t.toString)&&t.toString()==="[object FormData]"))},oh=Se("URLSearchParams"),[lh,uh,ch,dh]=["ReadableStream","Request","Response","Headers"].map(Se),fh=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function un(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t=="undefined")return;let i,r;if(typeof t!="object"&&(t=[t]),xt(t))for(i=0,r=t.length;i<r;i++)e.call(null,t[i],i,t);else{const s=n?Object.getOwnPropertyNames(t):Object.keys(t),a=s.length;let o;for(i=0;i<a;i++)o=s[i],e.call(null,t[o],o,t)}}function al(t,e){e=e.toLowerCase();const n=Object.keys(t);let i=n.length,r;for(;i-- >0;)if(r=n[i],e===r.toLowerCase())return r;return null}const Je=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,ol=t=>!Qt(t)&&t!==Je;function gr(){const{caseless:t}=ol(this)&&this||{},e={},n=(i,r)=>{const s=t&&al(e,r)||r;Sn(e[s])&&Sn(i)?e[s]=gr(e[s],i):Sn(i)?e[s]=gr({},i):xt(i)?e[s]=i.slice():e[s]=i};for(let i=0,r=arguments.length;i<r;i++)arguments[i]&&un(arguments[i],n);return e}const hh=(t,e,n,{allOwnKeys:i}={})=>(un(e,(r,s)=>{n&&le(r)?t[s]=il(r,n):t[s]=r},{allOwnKeys:i}),t),ph=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),mh=(t,e,n,i)=>{t.prototype=Object.create(e.prototype,i),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},gh=(t,e,n,i)=>{let r,s,a;const o={};if(e=e||{},t==null)return e;do{for(r=Object.getOwnPropertyNames(t),s=r.length;s-- >0;)a=r[s],(!i||i(a,t,e))&&!o[a]&&(e[a]=t[a],o[a]=!0);t=n!==!1&&Hr(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},vh=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const i=t.indexOf(e,n);return i!==-1&&i===n},kh=t=>{if(!t)return null;if(xt(t))return t;let e=t.length;if(!sl(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},yh=(t=>e=>t&&e instanceof t)(typeof Uint8Array!="undefined"&&Hr(Uint8Array)),_h=(t,e)=>{const i=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=i.next())&&!r.done;){const s=r.value;e.call(t,s[0],s[1])}},bh=(t,e)=>{let n;const i=[];for(;(n=t.exec(e))!==null;)i.push(n);return i},Sh=Se("HTMLFormElement"),Nh=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,r){return i.toUpperCase()+r}),Ss=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Eh=Se("RegExp"),ll=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),i={};un(n,(r,s)=>{let a;(a=e(r,s,t))!==!1&&(i[s]=a||r)}),Object.defineProperties(t,i)},Ah=t=>{ll(t,(e,n)=>{if(le(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const i=t[n];if(le(i)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Oh=(t,e)=>{const n={},i=r=>{r.forEach(s=>{n[s]=!0})};return xt(t)?i(t):i(String(t).split(e)),n},wh=()=>{},Th=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,Li="abcdefghijklmnopqrstuvwxyz",Ns="0123456789",ul={DIGIT:Ns,ALPHA:Li,ALPHA_DIGIT:Li+Li.toUpperCase()+Ns},Ch=(t=16,e=ul.ALPHA_DIGIT)=>{let n="";const{length:i}=e;for(;t--;)n+=e[Math.random()*i|0];return n};function xh(t){return!!(t&&le(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Rh=t=>{const e=new Array(10),n=(i,r)=>{if(di(i)){if(e.indexOf(i)>=0)return;if(!("toJSON"in i)){e[r]=i;const s=xt(i)?[]:{};return un(i,(a,o)=>{const l=n(a,r+1);!Qt(l)&&(s[o]=l)}),e[r]=void 0,s}}return i};return n(t,0)},Fh=Se("AsyncFunction"),Dh=t=>t&&(di(t)||le(t))&&le(t.then)&&le(t.catch),cl=((t,e)=>t?setImmediate:e?((n,i)=>(Je.addEventListener("message",({source:r,data:s})=>{r===Je&&s===n&&i.length&&i.shift()()},!1),r=>{i.push(r),Je.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",le(Je.postMessage)),Ih=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Je):typeof process!="undefined"&&process.nextTick||cl,y={isArray:xt,isArrayBuffer:rl,isBuffer:Qf,isFormData:ah,isArrayBufferView:Xf,isString:Zf,isNumber:sl,isBoolean:eh,isObject:di,isPlainObject:Sn,isReadableStream:lh,isRequest:uh,isResponse:ch,isHeaders:dh,isUndefined:Qt,isDate:th,isFile:nh,isBlob:ih,isRegExp:Eh,isFunction:le,isStream:sh,isURLSearchParams:oh,isTypedArray:yh,isFileList:rh,forEach:un,merge:gr,extend:hh,trim:fh,stripBOM:ph,inherits:mh,toFlatObject:gh,kindOf:ui,kindOfTest:Se,endsWith:vh,toArray:kh,forEachEntry:_h,matchAll:bh,isHTMLForm:Sh,hasOwnProperty:Ss,hasOwnProp:Ss,reduceDescriptors:ll,freezeMethods:Ah,toObjectSet:Oh,toCamelCase:Nh,noop:wh,toFiniteNumber:Th,findKey:al,global:Je,isContextDefined:ol,ALPHABET:ul,generateString:Ch,isSpecCompliantForm:xh,toJSONObject:Rh,isAsyncFn:Fh,isThenable:Dh,setImmediate:cl,asap:Ih};function $(t,e,n,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r,this.status=r.status?r.status:null)}y.inherits($,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:y.toJSONObject(this.config),code:this.code,status:this.status}}});const dl=$.prototype,fl={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{fl[t]={value:t}});Object.defineProperties($,fl);Object.defineProperty(dl,"isAxiosError",{value:!0});$.from=(t,e,n,i,r,s)=>{const a=Object.create(dl);return y.toFlatObject(t,a,function(l){return l!==Error.prototype},o=>o!=="isAxiosError"),$.call(a,t.message,e,n,i,r),a.cause=t,a.name=t.name,s&&Object.assign(a,s),a};const Ph=null;function vr(t){return y.isPlainObject(t)||y.isArray(t)}function hl(t){return y.endsWith(t,"[]")?t.slice(0,-2):t}function Es(t,e,n){return t?t.concat(e).map(function(r,s){return r=hl(r),!n&&s?"["+r+"]":r}).join(n?".":""):e}function Lh(t){return y.isArray(t)&&!t.some(vr)}const $h=y.toFlatObject(y,{},null,function(e){return/^is[A-Z]/.test(e)});function fi(t,e,n){if(!y.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=y.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,p){return!y.isUndefined(p[m])});const i=n.metaTokens,r=n.visitor||c,s=n.dots,a=n.indexes,l=(n.Blob||typeof Blob!="undefined"&&Blob)&&y.isSpecCompliantForm(e);if(!y.isFunction(r))throw new TypeError("visitor must be a function");function u(g){if(g===null)return"";if(y.isDate(g))return g.toISOString();if(!l&&y.isBlob(g))throw new $("Blob is not supported. Use a Buffer instead.");return y.isArrayBuffer(g)||y.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function c(g,m,p){let h=g;if(g&&!p&&typeof g=="object"){if(y.endsWith(m,"{}"))m=i?m:m.slice(0,-2),g=JSON.stringify(g);else if(y.isArray(g)&&Lh(g)||(y.isFileList(g)||y.endsWith(m,"[]"))&&(h=y.toArray(g)))return m=hl(m),h.forEach(function(N,b){!(y.isUndefined(N)||N===null)&&e.append(a===!0?Es([m],b,s):a===null?m:m+"[]",u(N))}),!1}return vr(g)?!0:(e.append(Es(p,m,s),u(g)),!1)}const d=[],f=Object.assign($h,{defaultVisitor:c,convertValue:u,isVisitable:vr});function v(g,m){if(!y.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(g),y.forEach(g,function(h,_){(!(y.isUndefined(h)||h===null)&&r.call(e,h,y.isString(_)?_.trim():_,m,f))===!0&&v(h,m?m.concat(_):[_])}),d.pop()}}if(!y.isObject(t))throw new TypeError("data must be an object");return v(t),e}function As(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(i){return e[i]})}function zr(t,e){this._pairs=[],t&&fi(t,this,e)}const pl=zr.prototype;pl.append=function(e,n){this._pairs.push([e,n])};pl.toString=function(e){const n=e?function(i){return e.call(this,i,As)}:As;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function Mh(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ml(t,e,n){if(!e)return t;const i=n&&n.encode||Mh,r=n&&n.serialize;let s;if(r?s=r(e,n):s=y.isURLSearchParams(e)?e.toString():new zr(e,n).toString(i),s){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class Os{constructor(){this.handlers=[]}use(e,n,i){return this.handlers.push({fulfilled:e,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){y.forEach(this.handlers,function(i){i!==null&&e(i)})}}const gl={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Uh=typeof URLSearchParams!="undefined"?URLSearchParams:zr,Vh=typeof FormData!="undefined"?FormData:null,jh=typeof Blob!="undefined"?Blob:null,Bh={isBrowser:!0,classes:{URLSearchParams:Uh,FormData:Vh,Blob:jh},protocols:["http","https","file","blob","url","data"]},qr=typeof window!="undefined"&&typeof document!="undefined",kr=typeof navigator=="object"&&navigator||void 0,Hh=qr&&(!kr||["ReactNative","NativeScript","NS"].indexOf(kr.product)<0),zh=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",qh=qr&&window.location.href||"http://localhost",Gh=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:qr,hasStandardBrowserEnv:Hh,hasStandardBrowserWebWorkerEnv:zh,navigator:kr,origin:qh},Symbol.toStringTag,{value:"Module"})),ne={...Gh,...Bh};function Kh(t,e){return fi(t,new ne.classes.URLSearchParams,Object.assign({visitor:function(n,i,r,s){return ne.isNode&&y.isBuffer(n)?(this.append(i,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function Wh(t){return y.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Jh(t){const e={},n=Object.keys(t);let i;const r=n.length;let s;for(i=0;i<r;i++)s=n[i],e[s]=t[s];return e}function vl(t){function e(n,i,r,s){let a=n[s++];if(a==="__proto__")return!0;const o=Number.isFinite(+a),l=s>=n.length;return a=!a&&y.isArray(r)?r.length:a,l?(y.hasOwnProp(r,a)?r[a]=[r[a],i]:r[a]=i,!o):((!r[a]||!y.isObject(r[a]))&&(r[a]=[]),e(n,i,r[a],s)&&y.isArray(r[a])&&(r[a]=Jh(r[a])),!o)}if(y.isFormData(t)&&y.isFunction(t.entries)){const n={};return y.forEachEntry(t,(i,r)=>{e(Wh(i),r,n,0)}),n}return null}function Yh(t,e,n){if(y.isString(t))try{return(e||JSON.parse)(t),y.trim(t)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(t)}const cn={transitional:gl,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const i=n.getContentType()||"",r=i.indexOf("application/json")>-1,s=y.isObject(e);if(s&&y.isHTMLForm(e)&&(e=new FormData(e)),y.isFormData(e))return r?JSON.stringify(vl(e)):e;if(y.isArrayBuffer(e)||y.isBuffer(e)||y.isStream(e)||y.isFile(e)||y.isBlob(e)||y.isReadableStream(e))return e;if(y.isArrayBufferView(e))return e.buffer;if(y.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(s){if(i.indexOf("application/x-www-form-urlencoded")>-1)return Kh(e,this.formSerializer).toString();if((o=y.isFileList(e))||i.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return fi(o?{"files[]":e}:e,l&&new l,this.formSerializer)}}return s||r?(n.setContentType("application/json",!1),Yh(e)):e}],transformResponse:[function(e){const n=this.transitional||cn.transitional,i=n&&n.forcedJSONParsing,r=this.responseType==="json";if(y.isResponse(e)||y.isReadableStream(e))return e;if(e&&y.isString(e)&&(i&&!this.responseType||r)){const a=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(o){if(a)throw o.name==="SyntaxError"?$.from(o,$.ERR_BAD_RESPONSE,this,null,this.response):o}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ne.classes.FormData,Blob:ne.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};y.forEach(["delete","get","head","post","put","patch"],t=>{cn.headers[t]={}});const Qh=y.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Xh=t=>{const e={};let n,i,r;return t&&t.split(`
28
28
  `).forEach(function(a){r=a.indexOf(":"),n=a.substring(0,r).trim().toLowerCase(),i=a.substring(r+1).trim(),!(!n||e[n]&&Qh[n])&&(n==="set-cookie"?e[n]?e[n].push(i):e[n]=[i]:e[n]=e[n]?e[n]+", "+i:i)}),e},ws=Symbol("internals");function It(t){return t&&String(t).trim().toLowerCase()}function Nn(t){return t===!1||t==null?t:y.isArray(t)?t.map(Nn):String(t)}function Zh(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(t);)e[i[1]]=i[2];return e}const ep=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function $i(t,e,n,i,r){if(y.isFunction(i))return i.call(this,e,n);if(r&&(e=n),!!y.isString(e)){if(y.isString(i))return e.indexOf(i)!==-1;if(y.isRegExp(i))return i.test(e)}}function tp(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,i)=>n.toUpperCase()+i)}function np(t,e){const n=y.toCamelCase(" "+e);["get","set","has"].forEach(i=>{Object.defineProperty(t,i+n,{value:function(r,s,a){return this[i].call(this,e,r,s,a)},configurable:!0})})}class ie{constructor(e){e&&this.set(e)}set(e,n,i){const r=this;function s(o,l,u){const c=It(l);if(!c)throw new Error("header name must be a non-empty string");const d=y.findKey(r,c);(!d||r[d]===void 0||u===!0||u===void 0&&r[d]!==!1)&&(r[d||l]=Nn(o))}const a=(o,l)=>y.forEach(o,(u,c)=>s(u,c,l));if(y.isPlainObject(e)||e instanceof this.constructor)a(e,n);else if(y.isString(e)&&(e=e.trim())&&!ep(e))a(Xh(e),n);else if(y.isHeaders(e))for(const[o,l]of e.entries())s(l,o,i);else e!=null&&s(n,e,i);return this}get(e,n){if(e=It(e),e){const i=y.findKey(this,e);if(i){const r=this[i];if(!n)return r;if(n===!0)return Zh(r);if(y.isFunction(n))return n.call(this,r,i);if(y.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=It(e),e){const i=y.findKey(this,e);return!!(i&&this[i]!==void 0&&(!n||$i(this,this[i],i,n)))}return!1}delete(e,n){const i=this;let r=!1;function s(a){if(a=It(a),a){const o=y.findKey(i,a);o&&(!n||$i(i,i[o],o,n))&&(delete i[o],r=!0)}}return y.isArray(e)?e.forEach(s):s(e),r}clear(e){const n=Object.keys(this);let i=n.length,r=!1;for(;i--;){const s=n[i];(!e||$i(this,this[s],s,e,!0))&&(delete this[s],r=!0)}return r}normalize(e){const n=this,i={};return y.forEach(this,(r,s)=>{const a=y.findKey(i,s);if(a){n[a]=Nn(r),delete n[s];return}const o=e?tp(s):String(s).trim();o!==s&&delete n[s],n[o]=Nn(r),i[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return y.forEach(this,(i,r)=>{i!=null&&i!==!1&&(n[r]=e&&y.isArray(i)?i.join(", "):i)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
29
29
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const i=new this(e);return n.forEach(r=>i.set(r)),i}static accessor(e){const i=(this[ws]=this[ws]={accessors:{}}).accessors,r=this.prototype;function s(a){const o=It(a);i[o]||(np(r,a),i[o]=!0)}return y.isArray(e)?e.forEach(s):s(e),this}}ie.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);y.reduceDescriptors(ie.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(i){this[n]=i}}});y.freezeMethods(ie);function Mi(t,e){const n=this||cn,i=e||n,r=ie.from(i.headers);let s=i.data;return y.forEach(t,function(o){s=o.call(n,s,r.normalize(),e?e.status:void 0)}),r.normalize(),s}function kl(t){return!!(t&&t.__CANCEL__)}function Rt(t,e,n){$.call(this,t==null?"canceled":t,$.ERR_CANCELED,e,n),this.name="CanceledError"}y.inherits(Rt,$,{__CANCEL__:!0});function yl(t,e,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?t(n):e(new $("Request failed with status code "+n.status,[$.ERR_BAD_REQUEST,$.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function ip(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function rp(t,e){t=t||10;const n=new Array(t),i=new Array(t);let r=0,s=0,a;return e=e!==void 0?e:1e3,function(l){const u=Date.now(),c=i[s];a||(a=u),n[r]=l,i[r]=u;let d=s,f=0;for(;d!==r;)f+=n[d++],d=d%t;if(r=(r+1)%t,r===s&&(s=(s+1)%t),u-a<e)return;const v=c&&u-c;return v?Math.round(f*1e3/v):void 0}}function sp(t,e){let n=0,i=1e3/e,r,s;const a=(u,c=Date.now())=>{n=c,r=null,s&&(clearTimeout(s),s=null),t.apply(null,u)};return[(...u)=>{const c=Date.now(),d=c-n;d>=i?a(u,c):(r=u,s||(s=setTimeout(()=>{s=null,a(r)},i-d)))},()=>r&&a(r)]}const Un=(t,e,n=3)=>{let i=0;const r=rp(50,250);return sp(s=>{const a=s.loaded,o=s.lengthComputable?s.total:void 0,l=a-i,u=r(l),c=a<=o;i=a;const d={loaded:a,total:o,progress:o?a/o:void 0,bytes:l,rate:u||void 0,estimated:u&&o&&c?(o-a)/u:void 0,event:s,lengthComputable:o!=null,[e?"download":"upload"]:!0};t(d)},n)},Ts=(t,e)=>{const n=t!=null;return[i=>e[0]({lengthComputable:n,total:t,loaded:i}),e[1]]},Cs=t=>(...e)=>y.asap(()=>t(...e)),ap=ne.hasStandardBrowserEnv?function(){const e=ne.navigator&&/(msie|trident)/i.test(ne.navigator.userAgent),n=document.createElement("a");let i;function r(s){let a=s;return e&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return i=r(window.location.href),function(a){const o=y.isString(a)?r(a):a;return o.protocol===i.protocol&&o.host===i.host}}():function(){return function(){return!0}}(),op=ne.hasStandardBrowserEnv?{write(t,e,n,i,r,s){const a=[t+"="+encodeURIComponent(e)];y.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),y.isString(i)&&a.push("path="+i),y.isString(r)&&a.push("domain="+r),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function lp(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function up(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function _l(t,e){return t&&!lp(e)?up(t,e):e}const xs=t=>t instanceof ie?{...t}:t;function tt(t,e){e=e||{};const n={};function i(u,c,d){return y.isPlainObject(u)&&y.isPlainObject(c)?y.merge.call({caseless:d},u,c):y.isPlainObject(c)?y.merge({},c):y.isArray(c)?c.slice():c}function r(u,c,d){if(y.isUndefined(c)){if(!y.isUndefined(u))return i(void 0,u,d)}else return i(u,c,d)}function s(u,c){if(!y.isUndefined(c))return i(void 0,c)}function a(u,c){if(y.isUndefined(c)){if(!y.isUndefined(u))return i(void 0,u)}else return i(void 0,c)}function o(u,c,d){if(d in e)return i(u,c);if(d in t)return i(void 0,u)}const l={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:o,headers:(u,c)=>r(xs(u),xs(c),!0)};return y.forEach(Object.keys(Object.assign({},t,e)),function(c){const d=l[c]||r,f=d(t[c],e[c],c);y.isUndefined(f)&&d!==o||(n[c]=f)}),n}const bl=t=>{const e=tt({},t);let{data:n,withXSRFToken:i,xsrfHeaderName:r,xsrfCookieName:s,headers:a,auth:o}=e;e.headers=a=ie.from(a),e.url=ml(_l(e.baseURL,e.url),t.params,t.paramsSerializer),o&&a.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):"")));let l;if(y.isFormData(n)){if(ne.hasStandardBrowserEnv||ne.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((l=a.getContentType())!==!1){const[u,...c]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];a.setContentType([u||"multipart/form-data",...c].join("; "))}}if(ne.hasStandardBrowserEnv&&(i&&y.isFunction(i)&&(i=i(e)),i||i!==!1&&ap(e.url))){const u=r&&s&&op.read(s);u&&a.set(r,u)}return e},cp=typeof XMLHttpRequest!="undefined",dp=cp&&function(t){return new Promise(function(n,i){const r=bl(t);let s=r.data;const a=ie.from(r.headers).normalize();let{responseType:o,onUploadProgress:l,onDownloadProgress:u}=r,c,d,f,v,g;function m(){v&&v(),g&&g(),r.cancelToken&&r.cancelToken.unsubscribe(c),r.signal&&r.signal.removeEventListener("abort",c)}let p=new XMLHttpRequest;p.open(r.method.toUpperCase(),r.url,!0),p.timeout=r.timeout;function h(){if(!p)return;const N=ie.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),E={data:!o||o==="text"||o==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:N,config:t,request:p};yl(function(x){n(x),m()},function(x){i(x),m()},E),p=null}"onloadend"in p?p.onloadend=h:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(h)},p.onabort=function(){p&&(i(new $("Request aborted",$.ECONNABORTED,t,p)),p=null)},p.onerror=function(){i(new $("Network Error",$.ERR_NETWORK,t,p)),p=null},p.ontimeout=function(){let b=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const E=r.transitional||gl;r.timeoutErrorMessage&&(b=r.timeoutErrorMessage),i(new $(b,E.clarifyTimeoutError?$.ETIMEDOUT:$.ECONNABORTED,t,p)),p=null},s===void 0&&a.setContentType(null),"setRequestHeader"in p&&y.forEach(a.toJSON(),function(b,E){p.setRequestHeader(E,b)}),y.isUndefined(r.withCredentials)||(p.withCredentials=!!r.withCredentials),o&&o!=="json"&&(p.responseType=r.responseType),u&&([f,g]=Un(u,!0),p.addEventListener("progress",f)),l&&p.upload&&([d,v]=Un(l),p.upload.addEventListener("progress",d),p.upload.addEventListener("loadend",v)),(r.cancelToken||r.signal)&&(c=N=>{p&&(i(!N||N.type?new Rt(null,t,p):N),p.abort(),p=null)},r.cancelToken&&r.cancelToken.subscribe(c),r.signal&&(r.signal.aborted?c():r.signal.addEventListener("abort",c)));const _=ip(r.url);if(_&&ne.protocols.indexOf(_)===-1){i(new $("Unsupported protocol "+_+":",$.ERR_BAD_REQUEST,t));return}p.send(s||null)})},fp=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let i=new AbortController,r;const s=function(u){if(!r){r=!0,o();const c=u instanceof Error?u:this.reason;i.abort(c instanceof $?c:new Rt(c instanceof Error?c.message:c))}};let a=e&&setTimeout(()=>{a=null,s(new $(`timeout ${e} of ms exceeded`,$.ETIMEDOUT))},e);const o=()=>{t&&(a&&clearTimeout(a),a=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),t=null)};t.forEach(u=>u.addEventListener("abort",s));const{signal:l}=i;return l.unsubscribe=()=>y.asap(o),l}},hp=function*(t,e){let n=t.byteLength;if(!e||n<e){yield t;return}let i=0,r;for(;i<n;)r=i+e,yield t.slice(i,r),i=r},pp=async function*(t,e){for await(const n of mp(t))yield*hp(n,e)},mp=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:i}=await e.read();if(n)break;yield i}}finally{await e.cancel()}},Rs=(t,e,n,i)=>{const r=pp(t,e);let s=0,a,o=l=>{a||(a=!0,i&&i(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await r.next();if(u){o(),l.close();return}let d=c.byteLength;if(n){let f=s+=d;n(f)}l.enqueue(new Uint8Array(c))}catch(u){throw o(u),u}},cancel(l){return o(l),r.return()}},{highWaterMark:2})},hi=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Sl=hi&&typeof ReadableStream=="function",gp=hi&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Nl=(t,...e)=>{try{return!!t(...e)}catch{return!1}},vp=Sl&&Nl(()=>{let t=!1;const e=new Request(ne.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Fs=64*1024,yr=Sl&&Nl(()=>y.isReadableStream(new Response("").body)),Vn={stream:yr&&(t=>t.body)};hi&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Vn[e]&&(Vn[e]=y.isFunction(t[e])?n=>n[e]():(n,i)=>{throw new $(`Response type '${e}' is not supported`,$.ERR_NOT_SUPPORT,i)})})})(new Response);const kp=async t=>{if(t==null)return 0;if(y.isBlob(t))return t.size;if(y.isSpecCompliantForm(t))return(await new Request(ne.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(y.isArrayBufferView(t)||y.isArrayBuffer(t))return t.byteLength;if(y.isURLSearchParams(t)&&(t=t+""),y.isString(t))return(await gp(t)).byteLength},yp=async(t,e)=>{const n=y.toFiniteNumber(t.getContentLength());return n==null?kp(e):n},_p=hi&&(async t=>{let{url:e,method:n,data:i,signal:r,cancelToken:s,timeout:a,onDownloadProgress:o,onUploadProgress:l,responseType:u,headers:c,withCredentials:d="same-origin",fetchOptions:f}=bl(t);u=u?(u+"").toLowerCase():"text";let v=fp([r,s&&s.toAbortSignal()],a),g;const m=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let p;try{if(l&&vp&&n!=="get"&&n!=="head"&&(p=await yp(c,i))!==0){let E=new Request(e,{method:"POST",body:i,duplex:"half"}),O;if(y.isFormData(i)&&(O=E.headers.get("content-type"))&&c.setContentType(O),E.body){const[x,R]=Ts(p,Un(Cs(l)));i=Rs(E.body,Fs,x,R)}}y.isString(d)||(d=d?"include":"omit");const h="credentials"in Request.prototype;g=new Request(e,{...f,signal:v,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:i,duplex:"half",credentials:h?d:void 0});let _=await fetch(g);const N=yr&&(u==="stream"||u==="response");if(yr&&(o||N&&m)){const E={};["status","statusText","headers"].forEach(D=>{E[D]=_[D]});const O=y.toFiniteNumber(_.headers.get("content-length")),[x,R]=o&&Ts(O,Un(Cs(o),!0))||[];_=new Response(Rs(_.body,Fs,x,()=>{R&&R(),m&&m()}),E)}u=u||"text";let b=await Vn[y.findKey(Vn,u)||"text"](_,t);return!N&&m&&m(),await new Promise((E,O)=>{yl(E,O,{data:b,headers:ie.from(_.headers),status:_.status,statusText:_.statusText,config:t,request:g})})}catch(h){throw m&&m(),h&&h.name==="TypeError"&&/fetch/i.test(h.message)?Object.assign(new $("Network Error",$.ERR_NETWORK,t,g),{cause:h.cause||h}):$.from(h,h&&h.code,t,g)}}),_r={http:Ph,xhr:dp,fetch:_p};y.forEach(_r,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Ds=t=>`- ${t}`,bp=t=>y.isFunction(t)||t===null||t===!1,El={getAdapter:t=>{t=y.isArray(t)?t:[t];const{length:e}=t;let n,i;const r={};for(let s=0;s<e;s++){n=t[s];let a;if(i=n,!bp(n)&&(i=_r[(a=String(n)).toLowerCase()],i===void 0))throw new $(`Unknown adapter '${a}'`);if(i)break;r[a||"#"+s]=i}if(!i){const s=Object.entries(r).map(([o,l])=>`adapter ${o} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=e?s.length>1?`since :
30
30
  `+s.map(Ds).join(`
31
31
  `):" "+Ds(s[0]):"as no adapter specified";throw new $("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return i},adapters:_r};function Ui(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Rt(null,t)}function Is(t){return Ui(t),t.headers=ie.from(t.headers),t.data=Mi.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),El.getAdapter(t.adapter||cn.adapter)(t).then(function(i){return Ui(t),i.data=Mi.call(t,t.transformResponse,i),i.headers=ie.from(i.headers),i},function(i){return kl(i)||(Ui(t),i&&i.response&&(i.response.data=Mi.call(t,t.transformResponse,i.response),i.response.headers=ie.from(i.response.headers))),Promise.reject(i)})}const Al="1.7.7",Gr={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Gr[t]=function(i){return typeof i===t||"a"+(e<1?"n ":" ")+t}});const Ps={};Gr.transitional=function(e,n,i){function r(s,a){return"[Axios v"+Al+"] Transitional option '"+s+"'"+a+(i?". "+i:"")}return(s,a,o)=>{if(e===!1)throw new $(r(a," has been removed"+(n?" in "+n:"")),$.ERR_DEPRECATED);return n&&!Ps[a]&&(Ps[a]=!0,console.warn(r(a," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(s,a,o):!0}};function Sp(t,e,n){if(typeof t!="object")throw new $("options must be an object",$.ERR_BAD_OPTION_VALUE);const i=Object.keys(t);let r=i.length;for(;r-- >0;){const s=i[r],a=e[s];if(a){const o=t[s],l=o===void 0||a(o,s,t);if(l!==!0)throw new $("option "+s+" must be "+l,$.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new $("Unknown option "+s,$.ERR_BAD_OPTION)}}const br={assertOptions:Sp,validators:Gr},$e=br.validators;class Xe{constructor(e){this.defaults=e,this.interceptors={request:new Os,response:new Os}}async request(e,n){try{return await this._request(e,n)}catch(i){if(i instanceof Error){let r;Error.captureStackTrace?Error.captureStackTrace(r={}):r=new Error;const s=r.stack?r.stack.replace(/^.+\n/,""):"";try{i.stack?s&&!String(i.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(i.stack+=`
32
- `+s):i.stack=s}catch{}}throw i}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=tt(this.defaults,n);const{transitional:i,paramsSerializer:r,headers:s}=n;i!==void 0&&br.assertOptions(i,{silentJSONParsing:$e.transitional($e.boolean),forcedJSONParsing:$e.transitional($e.boolean),clarifyTimeoutError:$e.transitional($e.boolean)},!1),r!=null&&(y.isFunction(r)?n.paramsSerializer={serialize:r}:br.assertOptions(r,{encode:$e.function,serialize:$e.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&y.merge(s.common,s[n.method]);s&&y.forEach(["delete","get","head","post","put","patch","common"],g=>{delete s[g]}),n.headers=ie.concat(a,s);const o=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,o.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let c,d=0,f;if(!l){const g=[Is.bind(this),void 0];for(g.unshift.apply(g,o),g.push.apply(g,u),f=g.length,c=Promise.resolve(n);d<f;)c=c.then(g[d++],g[d++]);return c}f=o.length;let v=n;for(d=0;d<f;){const g=o[d++],m=o[d++];try{v=g(v)}catch(p){m.call(this,p);break}}try{c=Is.call(this,v)}catch(g){return Promise.reject(g)}for(d=0,f=u.length;d<f;)c=c.then(u[d++],u[d++]);return c}getUri(e){e=tt(this.defaults,e);const n=_l(e.baseURL,e.url);return ml(n,e.params,e.paramsSerializer)}}y.forEach(["delete","get","head","options"],function(e){Xe.prototype[e]=function(n,i){return this.request(tt(i||{},{method:e,url:n,data:(i||{}).data}))}});y.forEach(["post","put","patch"],function(e){function n(i){return function(s,a,o){return this.request(tt(o||{},{method:e,headers:i?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}Xe.prototype[e]=n(),Xe.prototype[e+"Form"]=n(!0)});class Kr{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const i=this;this.promise.then(r=>{if(!i._listeners)return;let s=i._listeners.length;for(;s-- >0;)i._listeners[s](r);i._listeners=null}),this.promise.then=r=>{let s;const a=new Promise(o=>{i.subscribe(o),s=o}).then(r);return a.cancel=function(){i.unsubscribe(s)},a},e(function(s,a,o){i.reason||(i.reason=new Rt(s,a,o),n(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=i=>{e.abort(i)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Kr(function(r){e=r}),cancel:e}}}function Np(t){return function(n){return t.apply(null,n)}}function Ep(t){return y.isObject(t)&&t.isAxiosError===!0}const Sr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Sr).forEach(([t,e])=>{Sr[e]=t});function Ol(t){const e=new Xe(t),n=il(Xe.prototype.request,e);return y.extend(n,Xe.prototype,e,{allOwnKeys:!0}),y.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return Ol(tt(t,r))},n}const K=Ol(cn);K.Axios=Xe;K.CanceledError=Rt;K.CancelToken=Kr;K.isCancel=kl;K.VERSION=Al;K.toFormData=fi;K.AxiosError=$;K.Cancel=K.CanceledError;K.all=function(e){return Promise.all(e)};K.spread=Np;K.isAxiosError=Ep;K.mergeConfig=tt;K.AxiosHeaders=ie;K.formToJSON=t=>vl(y.isHTMLForm(t)?new FormData(t):t);K.getAdapter=El.getAdapter;K.HttpStatusCode=Sr;K.default=K;const Ap={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 jn{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||Ap,this.options=n,this.debug=n.debug}log(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"log","",!0)}warn(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"warn","",!0)}error(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"error","")}deprecate(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,i,r){return r&&!this.debug?null:(typeof e[0]=="string"&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new jn(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new jn(this.logger,e)}}var Ae=new jn;class pi{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const r=this.observers[i].get(n)||0;this.observers[i].set(n,r+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(a=>{let[o,l]=a;for(let u=0;u<l;u++)o(...i)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(a=>{let[o,l]=a;for(let u=0;u<l;u++)o.apply(o,[e,...i])})}}const Pt=()=>{let t,e;const n=new Promise((i,r)=>{t=i,e=r});return n.resolve=t,n.reject=e,n},Ls=t=>t==null?"":""+t,Op=(t,e,n)=>{t.forEach(i=>{e[i]&&(n[i]=e[i])})},wp=/###/g,$s=t=>t&&t.indexOf("###")>-1?t.replace(wp,"."):t,Ms=t=>!t||typeof t=="string",Bt=(t,e,n)=>{const i=typeof e!="string"?e:e.split(".");let r=0;for(;r<i.length-1;){if(Ms(t))return{};const s=$s(i[r]);!t[s]&&n&&(t[s]=new n),Object.prototype.hasOwnProperty.call(t,s)?t=t[s]:t={},++r}return Ms(t)?{}:{obj:t,k:$s(i[r])}},Us=(t,e,n)=>{const{obj:i,k:r}=Bt(t,e,Object);if(i!==void 0||e.length===1){i[r]=n;return}let s=e[e.length-1],a=e.slice(0,e.length-1),o=Bt(t,a,Object);for(;o.obj===void 0&&a.length;)s=`${a[a.length-1]}.${s}`,a=a.slice(0,a.length-1),o=Bt(t,a,Object),o&&o.obj&&typeof o.obj[`${o.k}.${s}`]!="undefined"&&(o.obj=void 0);o.obj[`${o.k}.${s}`]=n},Tp=(t,e,n,i)=>{const{obj:r,k:s}=Bt(t,e,Object);r[s]=r[s]||[],r[s].push(n)},Bn=(t,e)=>{const{obj:n,k:i}=Bt(t,e);if(n)return n[i]},Cp=(t,e,n)=>{const i=Bn(t,n);return i!==void 0?i:Bn(e,n)},wl=(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]):wl(t[i],e[i],n):t[i]=e[i]);return t},ft=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var xp={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const Rp=t=>typeof t=="string"?t.replace(/[&<>"'\/]/g,e=>xp[e]):t;class Fp{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}const Dp=[" ",",","?","!",";"],Ip=new Fp(20),Pp=(t,e,n)=>{e=e||"",n=n||"";const i=Dp.filter(a=>e.indexOf(a)<0&&n.indexOf(a)<0);if(i.length===0)return!0;const r=Ip.getRegExp(`(${i.map(a=>a==="?"?"\\?":a).join("|")})`);let s=!r.test(t);if(!s){const a=t.indexOf(n);a>0&&!r.test(t.substring(0,a))&&(s=!0)}return s},Nr=function(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];const i=e.split(n);let r=t;for(let s=0;s<i.length;){if(!r||typeof r!="object")return;let a,o="";for(let l=s;l<i.length;++l)if(l!==s&&(o+=n),o+=i[l],a=r[o],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&l<i.length-1)continue;s+=l-s+1;break}r=a}return r},Hn=t=>t&&t.indexOf("_")>0?t.replace("_","-"):t;class Vs extends pi{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,a=r.ignoreJSONStructure!==void 0?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.indexOf(".")>-1?o=e.split("."):(o=[e,n],i&&(Array.isArray(i)?o.push(...i):typeof i=="string"&&s?o.push(...i.split(s)):o.push(i)));const l=Bn(this.data,o);return!l&&!n&&!i&&e.indexOf(".")>-1&&(e=o[0],n=o[1],i=o.slice(2).join(".")),l||!a||typeof i!="string"?l:Nr(this.data&&this.data[e]&&this.data[e][n],i,s)}addResource(e,n,i,r){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let o=[e,n];i&&(o=o.concat(a?i.split(a):i)),e.indexOf(".")>-1&&(o=e.split("."),r=n,n=o[1]),this.addNamespaces(n),Us(this.data,o,r),s.silent||this.emit("added",e,n,i,r)}addResources(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const s in i)(typeof i[s]=="string"||Array.isArray(i[s]))&&this.addResource(e,n,s,i[s],{silent:!0});r.silent||this.emit("added",e,n,i)}addResourceBundle(e,n,i,r,s){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},o=[e,n];e.indexOf(".")>-1&&(o=e.split("."),r=i,i=n,n=o[1]),this.addNamespaces(n);let l=Bn(this.data,o)||{};a.skipCopy||(i=JSON.parse(JSON.stringify(i))),r?wl(l,i,s):l={...l,...i},Us(this.data,o,l),a.silent||this.emit("added",e,n,i)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,n)}:this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(r=>n[r]&&Object.keys(n[r]).length>0)}toJSON(){return this.data}}var Tl={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,i,r){return t.forEach(s=>{this.processors[s]&&(e=this.processors[s].process(e,n,i,r))}),e}};const js={};class qn extends pi{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Op(["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 r=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let s=n.ns||this.options.defaultNS||[];const a=i&&e.indexOf(i)>-1,o=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!Pp(e,i,r);if(a&&!o){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:s};const u=e.split(i);(i!==r||i===r&&this.options.ns.indexOf(u[0])>-1)&&(s=u.shift()),e=u.join(r)}return typeof s=="string"&&(s=[s]),{key:e,namespaces:s}}translate(e,n,i){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const r=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:o}=this.extractFromKey(e[e.length-1],n),l=o[o.length-1],u=n.lng||this.language,c=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(c){const b=n.nsSeparator||this.options.nsSeparator;return r?{res:`${l}${b}${a}`,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${b}${a}`}return r?{res:a,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:a}const d=this.resolve(e,n);let f=d&&d.res;const v=d&&d.usedKey||a,g=d&&d.exactUsedKey||a,m=Object.prototype.toString.apply(f),p=["[object Number]","[object Function]","[object RegExp]"],h=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,_=!this.i18nFormat||this.i18nFormat.handleAsObject;if(_&&f&&(typeof f!="string"&&typeof f!="boolean"&&typeof f!="number")&&p.indexOf(m)<0&&!(typeof h=="string"&&Array.isArray(f))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const b=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,f,{...n,ns:o}):`key '${a} (${this.language})' returned an object instead of string.`;return r?(d.res=b,d.usedParams=this.getUsedParamsDetails(n),d):b}if(s){const b=Array.isArray(f),E=b?[]:{},O=b?g:v;for(const x in f)if(Object.prototype.hasOwnProperty.call(f,x)){const R=`${O}${s}${x}`;E[x]=this.translate(R,{...n,joinArrays:!1,ns:o}),E[x]===R&&(E[x]=f[x])}f=E}}else if(_&&typeof h=="string"&&Array.isArray(f))f=f.join(h),f&&(f=this.extendTranslation(f,e,n,i));else{let b=!1,E=!1;const O=n.count!==void 0&&typeof n.count!="string",x=qn.hasDefaultValue(n),R=O?this.pluralResolver.getSuffix(u,n.count,n):"",D=n.ordinal&&O?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",q=O&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),C=q&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${R}`]||n[`defaultValue${D}`]||n.defaultValue;!this.isValidLookup(f)&&x&&(b=!0,f=C),this.isValidLookup(f)||(E=!0,f=a);const re=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&E?void 0:f,k=x&&C!==f&&this.options.updateMissing;if(E||b||k){if(this.logger.log(k?"updateKey":"missingKey",u,l,a,k?C:f),s){const H=this.resolve(a,{...n,keySeparator:!1});H&&H.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 A=[];const L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&L&&L[0])for(let H=0;H<L.length;H++)A.push(L[H]);else this.options.saveMissingTo==="all"?A=this.languageUtils.toResolveHierarchy(n.lng||this.language):A.push(n.lng||this.language);const Q=(H,V,Ne)=>{const Le=x&&Ne!==f?Ne:re;this.options.missingKeyHandler?this.options.missingKeyHandler(H,l,V,Le,k,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(H,l,V,Le,k,n),this.emit("missingKey",H,l,V,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&O?A.forEach(H=>{const V=this.pluralResolver.getSuffixes(H,n);q&&n[`defaultValue${this.options.pluralSeparator}zero`]&&V.indexOf(`${this.options.pluralSeparator}zero`)<0&&V.push(`${this.options.pluralSeparator}zero`),V.forEach(Ne=>{Q([H],a+Ne,n[`defaultValue${Ne}`]||C)})}):Q(A,a,C))}f=this.extendTranslation(f,e,n,d,i),E&&f===a&&this.options.appendNamespaceToMissingKey&&(f=`${l}:${a}`),(E||b)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${a}`:a,b?f:void 0):f=this.options.parseMissingKeyHandler(f))}return r?(d.res=f,d.usedParams=this.getUsedParamsDetails(n),d):f}extendTranslation(e,n,i,r,s){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const u=typeof e=="string"&&(i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(u){const f=e.match(this.interpolator.nestingRegexp);c=f&&f.length}let d=i.replace&&typeof i.replace!="string"?i.replace:i;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),e=this.interpolator.interpolate(e,d,i.lng||this.language||r.usedLng,i),u){const f=e.match(this.interpolator.nestingRegexp),v=f&&f.length;c<v&&(i.nest=!1)}!i.lng&&this.options.compatibilityAPI!=="v1"&&r&&r.res&&(i.lng=this.language||r.usedLng),i.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var f=arguments.length,v=new Array(f),g=0;g<f;g++)v[g]=arguments[g];return s&&s[0]===v[0]&&!i.context?(a.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${n[0]}`),null):a.translate(...v,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=Tl.handle(l,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,r,s,a,o;return typeof e=="string"&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(i))return;const u=this.extractFromKey(l,n),c=u.key;r=c;let d=u.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=n.count!==void 0&&typeof n.count!="string",v=f&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),g=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",m=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(p=>{this.isValidLookup(i)||(o=p,!js[`${m[0]}-${p}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(js[`${m[0]}-${p}`]=!0,this.logger.warn(`key "${r}" for languages "${m.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!!!")),m.forEach(h=>{if(this.isValidLookup(i))return;a=h;const _=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(_,c,h,p,n);else{let b;f&&(b=this.pluralResolver.getSuffix(h,n.count,n));const E=`${this.options.pluralSeparator}zero`,O=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(_.push(c+b),n.ordinal&&b.indexOf(O)===0&&_.push(c+b.replace(O,this.options.pluralSeparator)),v&&_.push(c+E)),g){const x=`${c}${this.options.contextSeparator}${n.context}`;_.push(x),f&&(_.push(x+b),n.ordinal&&b.indexOf(O)===0&&_.push(x+b.replace(O,this.options.pluralSeparator)),v&&_.push(x+E))}}let N;for(;N=_.pop();)this.isValidLookup(i)||(s=N,i=this.getResource(h,p,N,n))}))})}),{res:i,usedKey:r,exactUsedKey:s,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,n,i,r):this.resourceStore.getResource(e,n,i,r)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=e.replace&&typeof e.replace!="string";let r=i?e.replace:e;if(i&&typeof e.count!="undefined"&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!i){r={...r};for(const s of n)delete r[s]}return r}static hasDefaultValue(e){const n="defaultValue";for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&n===i.substring(0,n.length)&&e[i]!==void 0)return!0;return!1}}const Vi=t=>t.charAt(0).toUpperCase()+t.slice(1);class Bs{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ae.create("languageUtils")}getScriptPartFromCode(e){if(e=Hn(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=Hn(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let i=e.split("-");return this.options.lowerCaseLng?i=i.map(r=>r.toLowerCase()):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=Vi(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]=Vi(i[1].toLowerCase())),n.indexOf(i[2].toLowerCase())>-1&&(i[2]=Vi(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(i=>{if(n)return;const r=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(r))&&(n=r)}),!n&&this.options.supportedLngs&&e.forEach(i=>{if(n)return;const r=this.getLanguagePartFromCode(i);if(this.isSupportedCode(r))return n=r;n=this.options.supportedLngs.find(s=>{if(s===r)return s;if(!(s.indexOf("-")<0&&r.indexOf("-")<0)&&(s.indexOf("-")>0&&r.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===r||s.indexOf(r)===0&&r.length>1))return s})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),typeof e=="string"&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let i=e[n];return i||(i=e[this.getScriptPartFromCode(n)]),i||(i=e[this.formatLanguageCode(n)]),i||(i=e[this.getLanguagePartFromCode(n)]),i||(i=e.default),i||[]}toResolveHierarchy(e,n){const i=this.getFallbackCodes(n||this.options.fallbackLng||[],e),r=[],s=a=>{a&&(this.isSupportedCode(a)?r.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};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(a=>{r.indexOf(a)<0&&s(this.formatLanguageCode(a))}),r}}let Lp=[{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}],$p={1:t=>+(t>1),2:t=>+(t!=1),3:t=>0,4:t=>t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,5:t=>t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5,6:t=>t==1?0:t>=2&&t<=4?1:2,7:t=>t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,8:t=>t==1?0:t==2?1:t!=8&&t!=11?2:3,9:t=>+(t>=2),10:t=>t==1?0:t==2?1:t<7?2:t<11?3:4,11:t=>t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3,12:t=>+(t%10!=1||t%100==11),13:t=>+(t!==0),14:t=>t==1?0:t==2?1:t==3?2:3,15:t=>t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2,16:t=>t%10==1&&t%100!=11?0:t!==0?1:2,17:t=>t==1||t%10==1&&t%100!=11?0:1,18:t=>t==0?0:t==1?1:2,19:t=>t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3,20:t=>t==1?0:t==0||t%100>0&&t%100<20?1:2,21:t=>t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0,22:t=>t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3};const Mp=["v1","v2","v3"],Up=["v4"],Hs={zero:0,one:1,two:2,few:3,many:4,other:5},Vp=()=>{const t={};return Lp.forEach(e=>{e.lngs.forEach(n=>{t[n]={numbers:e.nr,plurals:$p[e.fc]}})}),t};class jp{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||Up.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=Vp(),this.pluralRulesCache={}}addRule(e,n){this.rules[e]=n}clearCache(){this.pluralRulesCache={}}getRule(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const i=Hn(e==="dev"?"en":e),r=n.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:i,type:r});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];const a=new Intl.PluralRules(i,{type:r});return this.pluralRulesCache[s]=a,a}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,n);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}getPluralFormsOfKey(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,i).map(r=>`${n}${r}`)}getSuffixes(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,n);return i?this.shouldUseIntlApi()?i.resolvedOptions().pluralCategories.sort((r,s)=>Hs[r]-Hs[s]).map(r=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r}`):i.numbers.map(r=>this.getSuffix(e,r,n)):[]}getSuffix(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=this.getRule(e,i);return r?this.shouldUseIntlApi()?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${r.select(n)}`:this.getSuffixRetroCompatible(r,n):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,n){const i=e.noAbs?e.plurals(n):e.plurals(Math.abs(n));let r=e.numbers[i];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(r===2?r="plural":r===1&&(r=""));const s=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return this.options.compatibilityJSON==="v1"?r===1?"":typeof r=="number"?`_plural_${r.toString()}`:s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?s():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}shouldUseIntlApi(){return!Mp.includes(this.options.compatibilityJSON)}}const qs=function(t,e,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=Cp(t,e,n);return!s&&r&&typeof n=="string"&&(s=Nr(t,n,i),s===void 0&&(s=Nr(e,n,i))),s},ji=t=>t.replace(/\$/g,"$$$$");class Bp{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{escape:n,escapeValue:i,useRawValueToEscape:r,prefix:s,prefixEscaped:a,suffix:o,suffixEscaped:l,formatSeparator:u,unescapeSuffix:c,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:v,nestingSuffix:g,nestingSuffixEscaped:m,nestingOptionsSeparator:p,maxReplaces:h,alwaysFormat:_}=e.interpolation;this.escape=n!==void 0?n:Rp,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=r!==void 0?r:!1,this.prefix=s?ft(s):a||"{{",this.suffix=o?ft(o):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=f?ft(f):v||ft("$t("),this.nestingSuffix=g?ft(g):m||ft(")"),this.nestingOptionsSeparator=p||",",this.maxReplaces=h||1e3,this.alwaysFormat=_!==void 0?_:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,i)=>n&&n.source===i?(n.lastIndex=0,n):new RegExp(i,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,n,i,r){let s,a,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=v=>{if(v.indexOf(this.formatSeparator)<0){const h=qs(n,l,v,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(h,void 0,i,{...r,...n,interpolationkey:v}):h}const g=v.split(this.formatSeparator),m=g.shift().trim(),p=g.join(this.formatSeparator).trim();return this.format(qs(n,l,m,this.options.keySeparator,this.options.ignoreJSONStructure),p,i,{...r,...n,interpolationkey:m})};this.resetRegExp();const c=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,d=r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:v=>ji(v)},{regex:this.regexp,safeValue:v=>this.escapeValue?ji(this.escape(v)):ji(v)}].forEach(v=>{for(o=0;s=v.regex.exec(e);){const g=s[1].trim();if(a=u(g),a===void 0)if(typeof c=="function"){const p=c(e,s,r);a=typeof p=="string"?p:""}else if(r&&Object.prototype.hasOwnProperty.call(r,g))a="";else if(d){a=s[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${e}`),a="";else typeof a!="string"&&!this.useRawValueToEscape&&(a=Ls(a));const m=v.safeValue(a);if(e=e.replace(s[0],m),d?(v.regex.lastIndex+=a.length,v.regex.lastIndex-=s[0].length):v.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,s,a;const o=(l,u)=>{const c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;const d=l.split(new RegExp(`${c}[ ]*{`));let f=`{${d[1]}`;l=d[0],f=this.interpolate(f,a);const v=f.match(/'/g),g=f.match(/"/g);(v&&v.length%2===0&&!g||g.length%2!==0)&&(f=f.replace(/'/g,'"'));try{a=JSON.parse(f),u&&(a={...u,...a})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,m),`${l}${c}${f}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,l};for(;r=this.nestingRegexp.exec(e);){let l=[];a={...i},a=a.replace&&typeof a.replace!="string"?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let u=!1;if(r[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(r[1])){const c=r[1].split(this.formatSeparator).map(d=>d.trim());r[1]=c.shift(),l=c,u=!0}if(s=n(o.call(this,r[1].trim(),a),a),s&&r[0]===e&&typeof s!="string")return s;typeof s!="string"&&(s=Ls(s)),s||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),s=""),u&&(s=l.reduce((c,d)=>this.format(c,d,i.lng,{...i,interpolationkey:r[1].trim()}),s.trim())),e=e.replace(r[0],s),this.regexp.lastIndex=0}return e}}const Hp=t=>{let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const i=t.split("(");e=i[0].toLowerCase().trim();const r=i[1].substring(0,i[1].length-1);e==="currency"&&r.indexOf(":")<0?n.currency||(n.currency=r.trim()):e==="relativetime"&&r.indexOf(":")<0?n.range||(n.range=r.trim()):r.split(";").forEach(a=>{if(a){const[o,...l]=a.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),c=o.trim();n[c]||(n[c]=u),u==="false"&&(n[c]=!1),u==="true"&&(n[c]=!0),isNaN(u)||(n[c]=parseInt(u,10))}})}return{formatName:e,formatOptions:n}},ht=t=>{const e={};return(n,i,r)=>{let s=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(s={...s,[r.interpolationkey]:void 0});const a=i+JSON.stringify(s);let o=e[a];return o||(o=t(Hn(i),r),e[a]=o),o(n)}};class qp{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Ae.create("formatter"),this.options=e,this.formats={number:ht((n,i)=>{const r=new Intl.NumberFormat(n,{...i});return s=>r.format(s)}),currency:ht((n,i)=>{const r=new Intl.NumberFormat(n,{...i,style:"currency"});return s=>r.format(s)}),datetime:ht((n,i)=>{const r=new Intl.DateTimeFormat(n,{...i});return s=>r.format(s)}),relativetime:ht((n,i)=>{const r=new Intl.RelativeTimeFormat(n,{...i});return s=>r.format(s,i.range||"day")}),list:ht((n,i)=>{const r=new Intl.ListFormat(n,{...i});return s=>r.format(s)})},this.init(e)}init(e){const i=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=ht(n)}format(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=n.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(o=>o.indexOf(")")>-1)){const o=s.findIndex(l=>l.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,o)].join(this.formatSeparator)}return s.reduce((o,l)=>{const{formatName:u,formatOptions:c}=Hp(l);if(this.formats[u]){let d=o;try{const f=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},v=f.locale||f.lng||r.locale||r.lng||i;d=this.formats[u](o,v,{...c,...r,...f})}catch(f){this.logger.warn(f)}return d}else this.logger.warn(`there was no format function for ${u}`);return o},e)}}const zp=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class Gp extends pi{constructor(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=n,this.services=i,this.languageUtils=i.languageUtils,this.options=r,this.logger=Ae.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(i,r.backend,r)}queueLoad(e,n,i,r){const s={},a={},o={},l={};return e.forEach(u=>{let c=!0;n.forEach(d=>{const f=`${u}|${d}`;!i.reload&&this.store.hasResourceBundle(u,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?a[f]===void 0&&(a[f]=!0):(this.state[f]=1,c=!1,a[f]===void 0&&(a[f]=!0),s[f]===void 0&&(s[f]=!0),l[d]===void 0&&(l[d]=!0)))}),c||(o[u]=!0)}),(Object.keys(s).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(s),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(e,n,i){const r=e.split("|"),s=r[0],a=r[1];n&&this.emit("failedLoading",s,a,n),!n&&i&&this.store.addResourceBundle(s,a,i,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2,n&&i&&(this.state[e]=0);const o={};this.queue.forEach(l=>{Tp(l.loaded,[s],a),zp(l,e),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{o[u]||(o[u]={});const c=l.loaded[u];c.length&&c.forEach(d=>{o[u][d]===void 0&&(o[u][d]=!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 r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:i,tried:r,wait:s,callback:a});return}this.readingCalls++;const o=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(u&&c&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,i,r+1,s*2,a)},s);return}a(u,c)},l=this.backend[i].bind(this.backend);if(l.length===2){try{const u=l(e,n);u&&typeof u.then=="function"?u.then(c=>o(null,c)).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]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof n=="string"&&(n=[n]);const s=this.queueLoad(e,n,i,r);if(!s.toLoad.length)return s.pending.length||r(),null;s.toLoad.forEach(a=>{this.loadOne(a)})}load(e,n,i){this.prepareLoading(e,n,{},i)}reload(e,n,i){this.prepareLoading(e,n,{reload:!0},i)}loadOne(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const i=e.split("|"),r=i[0],s=i[1];this.read(r,s,"read",void 0,void 0,(a,o)=>{a&&this.logger.warn(`${n}loading namespace ${s} for language ${r} failed`,a),!a&&o&&this.logger.log(`${n}loaded namespace ${s} for language ${r}`,o),this.loaded(e,a,o)})}saveMissing(e,n,i,r,s){let a=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={...a,isUpdate:s},u=this.backend.create.bind(this.backend);if(u.length<6)try{let c;u.length===5?c=u(e,n,i,r,l):c=u(e,n,i,r),c&&typeof c.then=="function"?c.then(d=>o(null,d)).catch(o):o(null,c)}catch(c){o(c)}else u(e,n,i,r,o,l)}!e||!e[0]||this.store.addResource(e[0],n,i,r)}}}const zs=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),typeof t[1]=="string"&&(e.defaultValue=t[1]),typeof t[2]=="string"&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const n=t[3]||t[2];Object.keys(n).forEach(i=>{e[i]=n[i]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Gs=t=>(typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t),gn=()=>{},Kp=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})};class Xt extends pi{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Gs(e),this.services={},this.logger=Ae,this.modules={external:[]},Kp(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(){var e=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(i=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const r=zs();this.options={...r,...this.options,...Gs(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const s=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?Ae.init(s(this.modules.logger),this.options):Ae.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:typeof Intl!="undefined"&&(c=qp);const d=new Bs(this.options);this.store=new Vs(this.options.resources,this.options);const f=this.services;f.logger=Ae,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new jp(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(f.formatter=s(c),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new Bp(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new Gp(s(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(v){for(var g=arguments.length,m=new Array(g>1?g-1:0),p=1;p<g;p++)m[p-1]=arguments[p];e.emit(v,...m)}),this.modules.languageDetector&&(f.languageDetector=s(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=s(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new qn(this.services,this.options),this.translator.on("*",function(v){for(var g=arguments.length,m=new Array(g>1?g-1:0),p=1;p<g;p++)m[p-1]=arguments[p];e.emit(v,...m)}),this.modules.external.forEach(v=>{v.init&&v.init(this)})}if(this.format=this.options.interpolation.format,i||(i=gn),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[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(c=>{this[c]=function(){return e.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return e.store[c](...arguments),e}});const l=Pt(),u=()=>{const c=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(f),i(d,f)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};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]:gn;const r=typeof e=="string"?e:this.language;if(typeof e=="function"&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&r.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const s=[],a=o=>{if(!o||o==="cimode")return;this.services.languageUtils.toResolveHierarchy(o).forEach(u=>{u!=="cimode"&&s.indexOf(u)<0&&s.push(u)})};r?a(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>a(l)),this.options.preload&&this.options.preload.forEach(o=>a(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,n,i){const r=Pt();return typeof e=="function"&&(i=e,e=void 0),typeof n=="function"&&(i=n,n=void 0),e||(e=this.languages),n||(n=this.options.ns),i||(i=gn),this.services.backendConnector.reload(e,n,s=>{r.resolve(),i(s)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&Tl.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let n=0;n<this.languages.length;n++){const i=this.languages[n];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}}changeLanguage(e,n){var i=this;this.isLanguageChangingTo=e;const r=Pt();this.emit("languageChanging",e);const s=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},a=(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,r.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||s(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,c=>{a(c,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),r}getFixedT(e,n,i){var r=this;const s=function(a,o){let l;if(typeof o!="object"){for(var u=arguments.length,c=new Array(u>2?u-2:0),d=2;d<u;d++)c[d-2]=arguments[d];l=r.options.overloadTranslationOptionHandler([a,o].concat(c))}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=l.keyPrefix||i||s.keyPrefix);const f=r.options.keySeparator||".";let v;return l.keyPrefix&&Array.isArray(a)?v=a.map(g=>`${l.keyPrefix}${f}${g}`):v=l.keyPrefix?`${l.keyPrefix}${f}${a}`:a,r.t(v,l)};return typeof e=="string"?s.lng=e:s.lngs=e,s.ns=n,s.keyPrefix=i,s}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=n.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const a=(o,l)=>{const u=this.services.backendConnector.state[`${o}|${l}`];return u===-1||u===0||u===2};if(n.precheck){const o=n.precheck(this,a);if(o!==void 0)return o}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(i,e)&&(!r||a(s,e)))}loadNamespaces(e,n){const i=Pt();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(r=>{this.options.ns.indexOf(r)<0&&this.options.ns.push(r)}),this.loadResources(r=>{i.resolve(),n&&n(r)}),i):(n&&n(),Promise.resolve())}loadLanguages(e,n){const i=Pt();typeof e=="string"&&(e=[e]);const r=this.options.preload||[],s=e.filter(a=>r.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return s.length?(this.options.preload=r.concat(s),this.loadResources(a=>{i.resolve(),n&&n(a)}),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 Bs(zs());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 Xt(e,n)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:gn;const i=e.forkResourceStore;i&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},s=new Xt(r);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 Vs(this.store.data,r),s.services.resourceStore=s.store),s.translator=new qn(s.services,r),s.translator.on("*",function(o){for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;c<l;c++)u[c-1]=arguments[c];s.emit(o,...u)}),s.init(r,n),s.translator.options=r,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Z=Xt.createInstance();Z.createInstance=Xt.createInstance;Z.createInstance;Z.dir;Z.init;Z.loadResources;Z.reloadResources;Z.use;Z.changeLanguage;Z.getFixedT;const Ks=Z.t;Z.exists;Z.setDefaultNamespace;Z.hasLoadedNamespace;Z.loadNamespaces;Z.loadLanguages;const Cl=t=>Ks(t?`errorCodes.${t}`:"errorCodes.DEFAULT");class Wp{constructor(e){F(this,"logger");F(this,"axiosInstance");this.logger=e.logger,this.axiosInstance=K.create({baseURL:e.baseUrl,headers:e.accessToken?{Authorization:`Bearer ${e.accessToken}`}:{}})}async get(e){try{return(await this.axiosInstance.get(e)).data}catch(n){throw this.handleError(n)}}async post(e,n){var s;const{data:i={},ignoreError:r=!1}=n;try{return(await this.axiosInstance.post(e,i)).data}catch(a){if(r&&K.isAxiosError(a))return(s=a.response)==null?void 0:s.data;throw this.handleError(a)}}async put(e,n){var s;const{data:i={},ignoreError:r=!1}=n;try{return(await this.axiosInstance.put(e,i)).data}catch(a){if(r&&K.isAxiosError(a))return(s=a.response)==null?void 0:s.data;throw this.handleError(a)}}async delete(e){try{return(await this.axiosInstance.delete(e)).data}catch(n){throw this.handleError(n)}}handleError(e){var r;let n=ee.GENERAL_ERROR;if(K.isAxiosError(e))if(e.response)switch(e.response.status){case 400:n=ee.BAD_REQUEST;break;case 401:n=ee.UNAUTHORIZED;break;case 403:n=ee.FORBIDDEN;break;case 404:n=ee.NOT_FOUND;break;case 409:n=ee.CONFLICT;break;case 410:n=ee.GONE;break;case 415:n=ee.UNSUPPORTED_MEDIA_TYPE;break;case 429:n=ee.TOO_MANY_REQUESTS;break;case 500:n=ee.INTERNAL_SERVER_ERROR;break;case 503:n=ee.SERVICE_UNAVAILABLE;break;default:n=ee.SERVER_ERROR}else e.request?n=ee.NETWORK_ERROR:n=ee.CONFIG_ERROR;const i=Cl(n);return this.logger.error("Error Code:",n,"Message:",i),this.logger.error("Result Data:",(r=e.response)==null?void 0:r.data),new Error(i)}}function xl(t){const e=Object.values(t);return Object.assign({},...e)}function Rl(t){return Object.entries(t).reduce((e,[n,i])=>{const r=xl(i);return{...e,[n]:r}},{})}function Fl(t,e){const n=Rl(e);Object.entries(n).forEach(([i,r])=>{t.addResourceBundle(i,"translation",r,!0)})}const{slice:Jp,forEach:Yp}=[];function Qp(t){return Yp.call(Jp.call(arguments,1),e=>{if(e)for(const n in e)t[n]===void 0&&(t[n]=e[n])}),t}const Ws=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Xp=(t,e,n)=>{const i=n||{};i.path=i.path||"/";const r=encodeURIComponent(e);let s=`${t}=${r}`;if(i.maxAge>0){const a=i.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(a)}`}if(i.domain){if(!Ws.test(i.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${i.domain}`}if(i.path){if(!Ws.test(i.path))throw new TypeError("option path is invalid");s+=`; Path=${i.path}`}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+=`; Expires=${i.expires.toUTCString()}`}if(i.httpOnly&&(s+="; HttpOnly"),i.secure&&(s+="; Secure"),i.sameSite)switch(typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s},Js={create(t,e,n,i){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(r.expires=new Date,r.expires.setTime(r.expires.getTime()+n*60*1e3)),i&&(r.domain=i),document.cookie=Xp(t,encodeURIComponent(e),r)},read(t){const e=`${t}=`,n=document.cookie.split(";");for(let i=0;i<n.length;i++){let r=n[i];for(;r.charAt(0)===" ";)r=r.substring(1,r.length);if(r.indexOf(e)===0)return r.substring(e.length,r.length)}return null},remove(t){this.create(t,"",-1)}};var Zp={name:"cookie",lookup(t){let{lookupCookie:e}=t;if(e&&typeof document!="undefined")return Js.read(e)||void 0},cacheUserLanguage(t,e){let{lookupCookie:n,cookieMinutes:i,cookieDomain:r,cookieOptions:s}=e;n&&typeof document!="undefined"&&Js.create(n,t,i,r,s)}},em={name:"querystring",lookup(t){var i;let{lookupQuerystring:e}=t,n;if(typeof window!="undefined"){let{search:r}=window.location;!window.location.search&&((i=window.location.hash)==null?void 0:i.indexOf("?"))>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));const a=r.substring(1).split("&");for(let o=0;o<a.length;o++){const l=a[o].indexOf("=");l>0&&a[o].substring(0,l)===e&&(n=a[o].substring(l+1))}}return n}};let Lt=null;const Ys=()=>{if(Lt!==null)return Lt;try{Lt=window!=="undefined"&&window.localStorage!==null;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{Lt=!1}return Lt};var tm={name:"localStorage",lookup(t){let{lookupLocalStorage:e}=t;if(e&&Ys())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupLocalStorage:n}=e;n&&Ys()&&window.localStorage.setItem(n,t)}};let $t=null;const Qs=()=>{if($t!==null)return $t;try{$t=window!=="undefined"&&window.sessionStorage!==null;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{$t=!1}return $t};var nm={name:"sessionStorage",lookup(t){let{lookupSessionStorage:e}=t;if(e&&Qs())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupSessionStorage:n}=e;n&&Qs()&&window.sessionStorage.setItem(n,t)}},im={name:"navigator",lookup(t){const e=[];if(typeof navigator!="undefined"){const{languages:n,userLanguage:i,language:r}=navigator;if(n)for(let s=0;s<n.length;s++)e.push(n[s]);i&&e.push(i),r&&e.push(r)}return e.length>0?e:void 0}},rm={name:"htmlTag",lookup(t){let{htmlTag:e}=t,n;const i=e||(typeof document!="undefined"?document.documentElement:null);return i&&typeof i.getAttribute=="function"&&(n=i.getAttribute("lang")),n}},sm={name:"path",lookup(t){var r;let{lookupFromPathIndex:e}=t;if(typeof window=="undefined")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(r=n[typeof e=="number"?e:0])==null?void 0:r.replace("/",""):void 0}},am={name:"subdomain",lookup(t){var r,s;let{lookupFromSubdomainIndex:e}=t;const n=typeof e=="number"?e+1:1,i=typeof window!="undefined"&&((s=(r=window.location)==null?void 0:r.hostname)==null?void 0:s.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(i)return i[n]}};function om(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t}}class Dl{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,n)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e||{languageUtils:{}},this.options=Qp(n,this.options||{},om()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=r=>r.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(Zp),this.addDetector(em),this.addDetector(tm),this.addDetector(nm),this.addDetector(im),this.addDetector(rm),this.addDetector(sm),this.addDetector(am)}addDetector(e){return this.detectors[e.name]=e,this}detect(e){e||(e=this.options.order);let n=[];return e.forEach(i=>{if(this.detectors[i]){let r=this.detectors[i].lookup(this.options);r&&typeof r=="string"&&(r=[r]),r&&(n=n.concat(r))}}),n=n.map(i=>this.options.convertDetectedLanguage(i)),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(e,n){n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||n.forEach(i=>{this.detectors[i]&&this.detectors[i].cacheUserLanguage(e,this.options)}))}}Dl.type="languageDetector";function Il(t,e){t.use(e).use(Dl).init({resources:{},fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1,format:(n,i,r)=>{if(i){const[s,...a]=i.split(",").map(o=>o.trim());if(s==="number")return new Intl.NumberFormat(r).format(n);if(s==="date")return new Intl.DateTimeFormat(r).format(n);if(s==="currency")return new Intl.NumberFormat(r,{style:"currency",currency:a[0]||"USD",currencyDisplay:"narrowSymbol"}).format(n).replace("$","").trim()}return n}},detection:{order:["navigator","cookie","localStorage","sessionStorage","querystring","htmlTag","path","subdomain"]}})}const lm=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,um={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},cm=t=>um[t],dm=t=>t.replace(lm,cm);let Xs={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:dm};function fm(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Xs={...Xs,...t}}const hm={type:"3rdParty",init(t){fm(t.options.react)}};Il(Z,hm);const pm=t=>Fl(Z,t),Zs={startTime:"UNKNOWN",viewerCount:0,status:"UNKNOWN"},mm=()=>{const[t,e]=M.useState([]),[n,i]=M.useState(Zs);return{realTimeStreamInfo:n,productsInCart:t,onTextMetadataCue:a=>{const{action:o,data:l,startTime:u,viewerCount:c,status:d}=JSON.parse(a==null?void 0:a.text);switch(o){case"sendivsdatarealtime":{i({startTime:u,viewerCount:c,status:d});break}case"sendaddtocart":{const{id:f,sessionId:v,productId:g,productImageUrl:m,productName:p}=l;e(h=>[...h,{id:f,sessionId:v,productId:g,productImageUrl:m,productName:p}])}break}},resetRealTimeStreamInfo:()=>{i(Zs)},setProductsInCart:e}},Wr=JSON,gm=t=>t.toUpperCase(),vm=t=>{const e={};return t.forEach((n,i)=>{e[i]=n}),e},km=(t,e,n)=>t.document?t:{document:t,variables:e,requestHeaders:n,signal:void 0},ym=(t,e,n)=>t.query?t:{query:t,variables:e,requestHeaders:n,signal:void 0},_m=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0};function En(t,e){if(!!!t)throw new Error(e)}function bm(t){return typeof t=="object"&&t!==null}function Sm(t,e){if(!!!t)throw new Error("Unexpected invariant triggered.")}const Nm=/\r\n|[\n\r]/g;function Er(t,e){let n=0,i=1;for(const r of t.body.matchAll(Nm)){if(typeof r.index=="number"||Sm(!1),r.index>=e)break;n=r.index+r[0].length,i+=1}return{line:i,column:e+1-n}}function Em(t){return Pl(t.source,Er(t.source,t.start))}function Pl(t,e){const n=t.locationOffset.column-1,i="".padStart(n)+t.body,r=e.line-1,s=t.locationOffset.line-1,a=e.line+s,o=e.line===1?n:0,l=e.column+o,u=`${t.name}:${a}:${l}
32
+ `+s):i.stack=s}catch{}}throw i}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=tt(this.defaults,n);const{transitional:i,paramsSerializer:r,headers:s}=n;i!==void 0&&br.assertOptions(i,{silentJSONParsing:$e.transitional($e.boolean),forcedJSONParsing:$e.transitional($e.boolean),clarifyTimeoutError:$e.transitional($e.boolean)},!1),r!=null&&(y.isFunction(r)?n.paramsSerializer={serialize:r}:br.assertOptions(r,{encode:$e.function,serialize:$e.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&y.merge(s.common,s[n.method]);s&&y.forEach(["delete","get","head","post","put","patch","common"],g=>{delete s[g]}),n.headers=ie.concat(a,s);const o=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,o.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let c,d=0,f;if(!l){const g=[Is.bind(this),void 0];for(g.unshift.apply(g,o),g.push.apply(g,u),f=g.length,c=Promise.resolve(n);d<f;)c=c.then(g[d++],g[d++]);return c}f=o.length;let v=n;for(d=0;d<f;){const g=o[d++],m=o[d++];try{v=g(v)}catch(p){m.call(this,p);break}}try{c=Is.call(this,v)}catch(g){return Promise.reject(g)}for(d=0,f=u.length;d<f;)c=c.then(u[d++],u[d++]);return c}getUri(e){e=tt(this.defaults,e);const n=_l(e.baseURL,e.url);return ml(n,e.params,e.paramsSerializer)}}y.forEach(["delete","get","head","options"],function(e){Xe.prototype[e]=function(n,i){return this.request(tt(i||{},{method:e,url:n,data:(i||{}).data}))}});y.forEach(["post","put","patch"],function(e){function n(i){return function(s,a,o){return this.request(tt(o||{},{method:e,headers:i?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}Xe.prototype[e]=n(),Xe.prototype[e+"Form"]=n(!0)});class Kr{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const i=this;this.promise.then(r=>{if(!i._listeners)return;let s=i._listeners.length;for(;s-- >0;)i._listeners[s](r);i._listeners=null}),this.promise.then=r=>{let s;const a=new Promise(o=>{i.subscribe(o),s=o}).then(r);return a.cancel=function(){i.unsubscribe(s)},a},e(function(s,a,o){i.reason||(i.reason=new Rt(s,a,o),n(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=i=>{e.abort(i)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Kr(function(r){e=r}),cancel:e}}}function Np(t){return function(n){return t.apply(null,n)}}function Ep(t){return y.isObject(t)&&t.isAxiosError===!0}const Sr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Sr).forEach(([t,e])=>{Sr[e]=t});function Ol(t){const e=new Xe(t),n=il(Xe.prototype.request,e);return y.extend(n,Xe.prototype,e,{allOwnKeys:!0}),y.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return Ol(tt(t,r))},n}const K=Ol(cn);K.Axios=Xe;K.CanceledError=Rt;K.CancelToken=Kr;K.isCancel=kl;K.VERSION=Al;K.toFormData=fi;K.AxiosError=$;K.Cancel=K.CanceledError;K.all=function(e){return Promise.all(e)};K.spread=Np;K.isAxiosError=Ep;K.mergeConfig=tt;K.AxiosHeaders=ie;K.formToJSON=t=>vl(y.isHTMLForm(t)?new FormData(t):t);K.getAdapter=El.getAdapter;K.HttpStatusCode=Sr;K.default=K;const Ap={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 jn{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||Ap,this.options=n,this.debug=n.debug}log(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"log","",!0)}warn(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"warn","",!0)}error(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"error","")}deprecate(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,i,r){return r&&!this.debug?null:(typeof e[0]=="string"&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new jn(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new jn(this.logger,e)}}var Ae=new jn;class pi{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const r=this.observers[i].get(n)||0;this.observers[i].set(n,r+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(a=>{let[o,l]=a;for(let u=0;u<l;u++)o(...i)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(a=>{let[o,l]=a;for(let u=0;u<l;u++)o.apply(o,[e,...i])})}}const Pt=()=>{let t,e;const n=new Promise((i,r)=>{t=i,e=r});return n.resolve=t,n.reject=e,n},Ls=t=>t==null?"":""+t,Op=(t,e,n)=>{t.forEach(i=>{e[i]&&(n[i]=e[i])})},wp=/###/g,$s=t=>t&&t.indexOf("###")>-1?t.replace(wp,"."):t,Ms=t=>!t||typeof t=="string",Bt=(t,e,n)=>{const i=typeof e!="string"?e:e.split(".");let r=0;for(;r<i.length-1;){if(Ms(t))return{};const s=$s(i[r]);!t[s]&&n&&(t[s]=new n),Object.prototype.hasOwnProperty.call(t,s)?t=t[s]:t={},++r}return Ms(t)?{}:{obj:t,k:$s(i[r])}},Us=(t,e,n)=>{const{obj:i,k:r}=Bt(t,e,Object);if(i!==void 0||e.length===1){i[r]=n;return}let s=e[e.length-1],a=e.slice(0,e.length-1),o=Bt(t,a,Object);for(;o.obj===void 0&&a.length;)s=`${a[a.length-1]}.${s}`,a=a.slice(0,a.length-1),o=Bt(t,a,Object),o&&o.obj&&typeof o.obj[`${o.k}.${s}`]!="undefined"&&(o.obj=void 0);o.obj[`${o.k}.${s}`]=n},Tp=(t,e,n,i)=>{const{obj:r,k:s}=Bt(t,e,Object);r[s]=r[s]||[],r[s].push(n)},Bn=(t,e)=>{const{obj:n,k:i}=Bt(t,e);if(n)return n[i]},Cp=(t,e,n)=>{const i=Bn(t,n);return i!==void 0?i:Bn(e,n)},wl=(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]):wl(t[i],e[i],n):t[i]=e[i]);return t},ft=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var xp={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const Rp=t=>typeof t=="string"?t.replace(/[&<>"'\/]/g,e=>xp[e]):t;class Fp{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}const Dp=[" ",",","?","!",";"],Ip=new Fp(20),Pp=(t,e,n)=>{e=e||"",n=n||"";const i=Dp.filter(a=>e.indexOf(a)<0&&n.indexOf(a)<0);if(i.length===0)return!0;const r=Ip.getRegExp(`(${i.map(a=>a==="?"?"\\?":a).join("|")})`);let s=!r.test(t);if(!s){const a=t.indexOf(n);a>0&&!r.test(t.substring(0,a))&&(s=!0)}return s},Nr=function(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];const i=e.split(n);let r=t;for(let s=0;s<i.length;){if(!r||typeof r!="object")return;let a,o="";for(let l=s;l<i.length;++l)if(l!==s&&(o+=n),o+=i[l],a=r[o],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&l<i.length-1)continue;s+=l-s+1;break}r=a}return r},Hn=t=>t&&t.indexOf("_")>0?t.replace("_","-"):t;class Vs extends pi{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,a=r.ignoreJSONStructure!==void 0?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.indexOf(".")>-1?o=e.split("."):(o=[e,n],i&&(Array.isArray(i)?o.push(...i):typeof i=="string"&&s?o.push(...i.split(s)):o.push(i)));const l=Bn(this.data,o);return!l&&!n&&!i&&e.indexOf(".")>-1&&(e=o[0],n=o[1],i=o.slice(2).join(".")),l||!a||typeof i!="string"?l:Nr(this.data&&this.data[e]&&this.data[e][n],i,s)}addResource(e,n,i,r){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let o=[e,n];i&&(o=o.concat(a?i.split(a):i)),e.indexOf(".")>-1&&(o=e.split("."),r=n,n=o[1]),this.addNamespaces(n),Us(this.data,o,r),s.silent||this.emit("added",e,n,i,r)}addResources(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const s in i)(typeof i[s]=="string"||Array.isArray(i[s]))&&this.addResource(e,n,s,i[s],{silent:!0});r.silent||this.emit("added",e,n,i)}addResourceBundle(e,n,i,r,s){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},o=[e,n];e.indexOf(".")>-1&&(o=e.split("."),r=i,i=n,n=o[1]),this.addNamespaces(n);let l=Bn(this.data,o)||{};a.skipCopy||(i=JSON.parse(JSON.stringify(i))),r?wl(l,i,s):l={...l,...i},Us(this.data,o,l),a.silent||this.emit("added",e,n,i)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,n)}:this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(r=>n[r]&&Object.keys(n[r]).length>0)}toJSON(){return this.data}}var Tl={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,i,r){return t.forEach(s=>{this.processors[s]&&(e=this.processors[s].process(e,n,i,r))}),e}};const js={};class zn extends pi{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Op(["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 r=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let s=n.ns||this.options.defaultNS||[];const a=i&&e.indexOf(i)>-1,o=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!Pp(e,i,r);if(a&&!o){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:s};const u=e.split(i);(i!==r||i===r&&this.options.ns.indexOf(u[0])>-1)&&(s=u.shift()),e=u.join(r)}return typeof s=="string"&&(s=[s]),{key:e,namespaces:s}}translate(e,n,i){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const r=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:o}=this.extractFromKey(e[e.length-1],n),l=o[o.length-1],u=n.lng||this.language,c=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(c){const b=n.nsSeparator||this.options.nsSeparator;return r?{res:`${l}${b}${a}`,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${b}${a}`}return r?{res:a,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:a}const d=this.resolve(e,n);let f=d&&d.res;const v=d&&d.usedKey||a,g=d&&d.exactUsedKey||a,m=Object.prototype.toString.apply(f),p=["[object Number]","[object Function]","[object RegExp]"],h=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,_=!this.i18nFormat||this.i18nFormat.handleAsObject;if(_&&f&&(typeof f!="string"&&typeof f!="boolean"&&typeof f!="number")&&p.indexOf(m)<0&&!(typeof h=="string"&&Array.isArray(f))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const b=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,f,{...n,ns:o}):`key '${a} (${this.language})' returned an object instead of string.`;return r?(d.res=b,d.usedParams=this.getUsedParamsDetails(n),d):b}if(s){const b=Array.isArray(f),E=b?[]:{},O=b?g:v;for(const x in f)if(Object.prototype.hasOwnProperty.call(f,x)){const R=`${O}${s}${x}`;E[x]=this.translate(R,{...n,joinArrays:!1,ns:o}),E[x]===R&&(E[x]=f[x])}f=E}}else if(_&&typeof h=="string"&&Array.isArray(f))f=f.join(h),f&&(f=this.extendTranslation(f,e,n,i));else{let b=!1,E=!1;const O=n.count!==void 0&&typeof n.count!="string",x=zn.hasDefaultValue(n),R=O?this.pluralResolver.getSuffix(u,n.count,n):"",D=n.ordinal&&O?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",z=O&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),C=z&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${R}`]||n[`defaultValue${D}`]||n.defaultValue;!this.isValidLookup(f)&&x&&(b=!0,f=C),this.isValidLookup(f)||(E=!0,f=a);const re=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&E?void 0:f,k=x&&C!==f&&this.options.updateMissing;if(E||b||k){if(this.logger.log(k?"updateKey":"missingKey",u,l,a,k?C:f),s){const H=this.resolve(a,{...n,keySeparator:!1});H&&H.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 A=[];const L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&L&&L[0])for(let H=0;H<L.length;H++)A.push(L[H]);else this.options.saveMissingTo==="all"?A=this.languageUtils.toResolveHierarchy(n.lng||this.language):A.push(n.lng||this.language);const Q=(H,V,Ne)=>{const Le=x&&Ne!==f?Ne:re;this.options.missingKeyHandler?this.options.missingKeyHandler(H,l,V,Le,k,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(H,l,V,Le,k,n),this.emit("missingKey",H,l,V,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&O?A.forEach(H=>{const V=this.pluralResolver.getSuffixes(H,n);z&&n[`defaultValue${this.options.pluralSeparator}zero`]&&V.indexOf(`${this.options.pluralSeparator}zero`)<0&&V.push(`${this.options.pluralSeparator}zero`),V.forEach(Ne=>{Q([H],a+Ne,n[`defaultValue${Ne}`]||C)})}):Q(A,a,C))}f=this.extendTranslation(f,e,n,d,i),E&&f===a&&this.options.appendNamespaceToMissingKey&&(f=`${l}:${a}`),(E||b)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${a}`:a,b?f:void 0):f=this.options.parseMissingKeyHandler(f))}return r?(d.res=f,d.usedParams=this.getUsedParamsDetails(n),d):f}extendTranslation(e,n,i,r,s){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const u=typeof e=="string"&&(i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(u){const f=e.match(this.interpolator.nestingRegexp);c=f&&f.length}let d=i.replace&&typeof i.replace!="string"?i.replace:i;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),e=this.interpolator.interpolate(e,d,i.lng||this.language||r.usedLng,i),u){const f=e.match(this.interpolator.nestingRegexp),v=f&&f.length;c<v&&(i.nest=!1)}!i.lng&&this.options.compatibilityAPI!=="v1"&&r&&r.res&&(i.lng=this.language||r.usedLng),i.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var f=arguments.length,v=new Array(f),g=0;g<f;g++)v[g]=arguments[g];return s&&s[0]===v[0]&&!i.context?(a.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${n[0]}`),null):a.translate(...v,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=Tl.handle(l,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,r,s,a,o;return typeof e=="string"&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(i))return;const u=this.extractFromKey(l,n),c=u.key;r=c;let d=u.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=n.count!==void 0&&typeof n.count!="string",v=f&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),g=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",m=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(p=>{this.isValidLookup(i)||(o=p,!js[`${m[0]}-${p}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(js[`${m[0]}-${p}`]=!0,this.logger.warn(`key "${r}" for languages "${m.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!!!")),m.forEach(h=>{if(this.isValidLookup(i))return;a=h;const _=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(_,c,h,p,n);else{let b;f&&(b=this.pluralResolver.getSuffix(h,n.count,n));const E=`${this.options.pluralSeparator}zero`,O=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(_.push(c+b),n.ordinal&&b.indexOf(O)===0&&_.push(c+b.replace(O,this.options.pluralSeparator)),v&&_.push(c+E)),g){const x=`${c}${this.options.contextSeparator}${n.context}`;_.push(x),f&&(_.push(x+b),n.ordinal&&b.indexOf(O)===0&&_.push(x+b.replace(O,this.options.pluralSeparator)),v&&_.push(x+E))}}let N;for(;N=_.pop();)this.isValidLookup(i)||(s=N,i=this.getResource(h,p,N,n))}))})}),{res:i,usedKey:r,exactUsedKey:s,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,n,i,r):this.resourceStore.getResource(e,n,i,r)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=e.replace&&typeof e.replace!="string";let r=i?e.replace:e;if(i&&typeof e.count!="undefined"&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!i){r={...r};for(const s of n)delete r[s]}return r}static hasDefaultValue(e){const n="defaultValue";for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&n===i.substring(0,n.length)&&e[i]!==void 0)return!0;return!1}}const Vi=t=>t.charAt(0).toUpperCase()+t.slice(1);class Bs{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ae.create("languageUtils")}getScriptPartFromCode(e){if(e=Hn(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=Hn(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let i=e.split("-");return this.options.lowerCaseLng?i=i.map(r=>r.toLowerCase()):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=Vi(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]=Vi(i[1].toLowerCase())),n.indexOf(i[2].toLowerCase())>-1&&(i[2]=Vi(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(i=>{if(n)return;const r=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(r))&&(n=r)}),!n&&this.options.supportedLngs&&e.forEach(i=>{if(n)return;const r=this.getLanguagePartFromCode(i);if(this.isSupportedCode(r))return n=r;n=this.options.supportedLngs.find(s=>{if(s===r)return s;if(!(s.indexOf("-")<0&&r.indexOf("-")<0)&&(s.indexOf("-")>0&&r.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===r||s.indexOf(r)===0&&r.length>1))return s})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),typeof e=="string"&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let i=e[n];return i||(i=e[this.getScriptPartFromCode(n)]),i||(i=e[this.formatLanguageCode(n)]),i||(i=e[this.getLanguagePartFromCode(n)]),i||(i=e.default),i||[]}toResolveHierarchy(e,n){const i=this.getFallbackCodes(n||this.options.fallbackLng||[],e),r=[],s=a=>{a&&(this.isSupportedCode(a)?r.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};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(a=>{r.indexOf(a)<0&&s(this.formatLanguageCode(a))}),r}}let Lp=[{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}],$p={1:t=>+(t>1),2:t=>+(t!=1),3:t=>0,4:t=>t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,5:t=>t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5,6:t=>t==1?0:t>=2&&t<=4?1:2,7:t=>t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,8:t=>t==1?0:t==2?1:t!=8&&t!=11?2:3,9:t=>+(t>=2),10:t=>t==1?0:t==2?1:t<7?2:t<11?3:4,11:t=>t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3,12:t=>+(t%10!=1||t%100==11),13:t=>+(t!==0),14:t=>t==1?0:t==2?1:t==3?2:3,15:t=>t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2,16:t=>t%10==1&&t%100!=11?0:t!==0?1:2,17:t=>t==1||t%10==1&&t%100!=11?0:1,18:t=>t==0?0:t==1?1:2,19:t=>t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3,20:t=>t==1?0:t==0||t%100>0&&t%100<20?1:2,21:t=>t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0,22:t=>t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3};const Mp=["v1","v2","v3"],Up=["v4"],Hs={zero:0,one:1,two:2,few:3,many:4,other:5},Vp=()=>{const t={};return Lp.forEach(e=>{e.lngs.forEach(n=>{t[n]={numbers:e.nr,plurals:$p[e.fc]}})}),t};class jp{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||Up.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=Vp(),this.pluralRulesCache={}}addRule(e,n){this.rules[e]=n}clearCache(){this.pluralRulesCache={}}getRule(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const i=Hn(e==="dev"?"en":e),r=n.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:i,type:r});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];const a=new Intl.PluralRules(i,{type:r});return this.pluralRulesCache[s]=a,a}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,n);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}getPluralFormsOfKey(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,i).map(r=>`${n}${r}`)}getSuffixes(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,n);return i?this.shouldUseIntlApi()?i.resolvedOptions().pluralCategories.sort((r,s)=>Hs[r]-Hs[s]).map(r=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r}`):i.numbers.map(r=>this.getSuffix(e,r,n)):[]}getSuffix(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=this.getRule(e,i);return r?this.shouldUseIntlApi()?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${r.select(n)}`:this.getSuffixRetroCompatible(r,n):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,n){const i=e.noAbs?e.plurals(n):e.plurals(Math.abs(n));let r=e.numbers[i];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(r===2?r="plural":r===1&&(r=""));const s=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return this.options.compatibilityJSON==="v1"?r===1?"":typeof r=="number"?`_plural_${r.toString()}`:s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?s():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}shouldUseIntlApi(){return!Mp.includes(this.options.compatibilityJSON)}}const zs=function(t,e,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=Cp(t,e,n);return!s&&r&&typeof n=="string"&&(s=Nr(t,n,i),s===void 0&&(s=Nr(e,n,i))),s},ji=t=>t.replace(/\$/g,"$$$$");class Bp{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{escape:n,escapeValue:i,useRawValueToEscape:r,prefix:s,prefixEscaped:a,suffix:o,suffixEscaped:l,formatSeparator:u,unescapeSuffix:c,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:v,nestingSuffix:g,nestingSuffixEscaped:m,nestingOptionsSeparator:p,maxReplaces:h,alwaysFormat:_}=e.interpolation;this.escape=n!==void 0?n:Rp,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=r!==void 0?r:!1,this.prefix=s?ft(s):a||"{{",this.suffix=o?ft(o):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=f?ft(f):v||ft("$t("),this.nestingSuffix=g?ft(g):m||ft(")"),this.nestingOptionsSeparator=p||",",this.maxReplaces=h||1e3,this.alwaysFormat=_!==void 0?_:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,i)=>n&&n.source===i?(n.lastIndex=0,n):new RegExp(i,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,n,i,r){let s,a,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=v=>{if(v.indexOf(this.formatSeparator)<0){const h=zs(n,l,v,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(h,void 0,i,{...r,...n,interpolationkey:v}):h}const g=v.split(this.formatSeparator),m=g.shift().trim(),p=g.join(this.formatSeparator).trim();return this.format(zs(n,l,m,this.options.keySeparator,this.options.ignoreJSONStructure),p,i,{...r,...n,interpolationkey:m})};this.resetRegExp();const c=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,d=r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:v=>ji(v)},{regex:this.regexp,safeValue:v=>this.escapeValue?ji(this.escape(v)):ji(v)}].forEach(v=>{for(o=0;s=v.regex.exec(e);){const g=s[1].trim();if(a=u(g),a===void 0)if(typeof c=="function"){const p=c(e,s,r);a=typeof p=="string"?p:""}else if(r&&Object.prototype.hasOwnProperty.call(r,g))a="";else if(d){a=s[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${e}`),a="";else typeof a!="string"&&!this.useRawValueToEscape&&(a=Ls(a));const m=v.safeValue(a);if(e=e.replace(s[0],m),d?(v.regex.lastIndex+=a.length,v.regex.lastIndex-=s[0].length):v.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,s,a;const o=(l,u)=>{const c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;const d=l.split(new RegExp(`${c}[ ]*{`));let f=`{${d[1]}`;l=d[0],f=this.interpolate(f,a);const v=f.match(/'/g),g=f.match(/"/g);(v&&v.length%2===0&&!g||g.length%2!==0)&&(f=f.replace(/'/g,'"'));try{a=JSON.parse(f),u&&(a={...u,...a})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,m),`${l}${c}${f}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,l};for(;r=this.nestingRegexp.exec(e);){let l=[];a={...i},a=a.replace&&typeof a.replace!="string"?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let u=!1;if(r[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(r[1])){const c=r[1].split(this.formatSeparator).map(d=>d.trim());r[1]=c.shift(),l=c,u=!0}if(s=n(o.call(this,r[1].trim(),a),a),s&&r[0]===e&&typeof s!="string")return s;typeof s!="string"&&(s=Ls(s)),s||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),s=""),u&&(s=l.reduce((c,d)=>this.format(c,d,i.lng,{...i,interpolationkey:r[1].trim()}),s.trim())),e=e.replace(r[0],s),this.regexp.lastIndex=0}return e}}const Hp=t=>{let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const i=t.split("(");e=i[0].toLowerCase().trim();const r=i[1].substring(0,i[1].length-1);e==="currency"&&r.indexOf(":")<0?n.currency||(n.currency=r.trim()):e==="relativetime"&&r.indexOf(":")<0?n.range||(n.range=r.trim()):r.split(";").forEach(a=>{if(a){const[o,...l]=a.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),c=o.trim();n[c]||(n[c]=u),u==="false"&&(n[c]=!1),u==="true"&&(n[c]=!0),isNaN(u)||(n[c]=parseInt(u,10))}})}return{formatName:e,formatOptions:n}},ht=t=>{const e={};return(n,i,r)=>{let s=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(s={...s,[r.interpolationkey]:void 0});const a=i+JSON.stringify(s);let o=e[a];return o||(o=t(Hn(i),r),e[a]=o),o(n)}};class zp{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Ae.create("formatter"),this.options=e,this.formats={number:ht((n,i)=>{const r=new Intl.NumberFormat(n,{...i});return s=>r.format(s)}),currency:ht((n,i)=>{const r=new Intl.NumberFormat(n,{...i,style:"currency"});return s=>r.format(s)}),datetime:ht((n,i)=>{const r=new Intl.DateTimeFormat(n,{...i});return s=>r.format(s)}),relativetime:ht((n,i)=>{const r=new Intl.RelativeTimeFormat(n,{...i});return s=>r.format(s,i.range||"day")}),list:ht((n,i)=>{const r=new Intl.ListFormat(n,{...i});return s=>r.format(s)})},this.init(e)}init(e){const i=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=ht(n)}format(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=n.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(o=>o.indexOf(")")>-1)){const o=s.findIndex(l=>l.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,o)].join(this.formatSeparator)}return s.reduce((o,l)=>{const{formatName:u,formatOptions:c}=Hp(l);if(this.formats[u]){let d=o;try{const f=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},v=f.locale||f.lng||r.locale||r.lng||i;d=this.formats[u](o,v,{...c,...r,...f})}catch(f){this.logger.warn(f)}return d}else this.logger.warn(`there was no format function for ${u}`);return o},e)}}const qp=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class Gp extends pi{constructor(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=n,this.services=i,this.languageUtils=i.languageUtils,this.options=r,this.logger=Ae.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(i,r.backend,r)}queueLoad(e,n,i,r){const s={},a={},o={},l={};return e.forEach(u=>{let c=!0;n.forEach(d=>{const f=`${u}|${d}`;!i.reload&&this.store.hasResourceBundle(u,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?a[f]===void 0&&(a[f]=!0):(this.state[f]=1,c=!1,a[f]===void 0&&(a[f]=!0),s[f]===void 0&&(s[f]=!0),l[d]===void 0&&(l[d]=!0)))}),c||(o[u]=!0)}),(Object.keys(s).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(s),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(e,n,i){const r=e.split("|"),s=r[0],a=r[1];n&&this.emit("failedLoading",s,a,n),!n&&i&&this.store.addResourceBundle(s,a,i,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2,n&&i&&(this.state[e]=0);const o={};this.queue.forEach(l=>{Tp(l.loaded,[s],a),qp(l,e),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{o[u]||(o[u]={});const c=l.loaded[u];c.length&&c.forEach(d=>{o[u][d]===void 0&&(o[u][d]=!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 r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:i,tried:r,wait:s,callback:a});return}this.readingCalls++;const o=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(u&&c&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,i,r+1,s*2,a)},s);return}a(u,c)},l=this.backend[i].bind(this.backend);if(l.length===2){try{const u=l(e,n);u&&typeof u.then=="function"?u.then(c=>o(null,c)).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]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof n=="string"&&(n=[n]);const s=this.queueLoad(e,n,i,r);if(!s.toLoad.length)return s.pending.length||r(),null;s.toLoad.forEach(a=>{this.loadOne(a)})}load(e,n,i){this.prepareLoading(e,n,{},i)}reload(e,n,i){this.prepareLoading(e,n,{reload:!0},i)}loadOne(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const i=e.split("|"),r=i[0],s=i[1];this.read(r,s,"read",void 0,void 0,(a,o)=>{a&&this.logger.warn(`${n}loading namespace ${s} for language ${r} failed`,a),!a&&o&&this.logger.log(`${n}loaded namespace ${s} for language ${r}`,o),this.loaded(e,a,o)})}saveMissing(e,n,i,r,s){let a=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={...a,isUpdate:s},u=this.backend.create.bind(this.backend);if(u.length<6)try{let c;u.length===5?c=u(e,n,i,r,l):c=u(e,n,i,r),c&&typeof c.then=="function"?c.then(d=>o(null,d)).catch(o):o(null,c)}catch(c){o(c)}else u(e,n,i,r,o,l)}!e||!e[0]||this.store.addResource(e[0],n,i,r)}}}const qs=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),typeof t[1]=="string"&&(e.defaultValue=t[1]),typeof t[2]=="string"&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const n=t[3]||t[2];Object.keys(n).forEach(i=>{e[i]=n[i]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Gs=t=>(typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t),gn=()=>{},Kp=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})};class Xt extends pi{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Gs(e),this.services={},this.logger=Ae,this.modules={external:[]},Kp(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(){var e=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(i=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const r=qs();this.options={...r,...this.options,...Gs(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const s=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?Ae.init(s(this.modules.logger),this.options):Ae.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:typeof Intl!="undefined"&&(c=zp);const d=new Bs(this.options);this.store=new Vs(this.options.resources,this.options);const f=this.services;f.logger=Ae,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new jp(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(f.formatter=s(c),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new Bp(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new Gp(s(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(v){for(var g=arguments.length,m=new Array(g>1?g-1:0),p=1;p<g;p++)m[p-1]=arguments[p];e.emit(v,...m)}),this.modules.languageDetector&&(f.languageDetector=s(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=s(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new zn(this.services,this.options),this.translator.on("*",function(v){for(var g=arguments.length,m=new Array(g>1?g-1:0),p=1;p<g;p++)m[p-1]=arguments[p];e.emit(v,...m)}),this.modules.external.forEach(v=>{v.init&&v.init(this)})}if(this.format=this.options.interpolation.format,i||(i=gn),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[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(c=>{this[c]=function(){return e.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return e.store[c](...arguments),e}});const l=Pt(),u=()=>{const c=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(f),i(d,f)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};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]:gn;const r=typeof e=="string"?e:this.language;if(typeof e=="function"&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&r.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const s=[],a=o=>{if(!o||o==="cimode")return;this.services.languageUtils.toResolveHierarchy(o).forEach(u=>{u!=="cimode"&&s.indexOf(u)<0&&s.push(u)})};r?a(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>a(l)),this.options.preload&&this.options.preload.forEach(o=>a(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,n,i){const r=Pt();return typeof e=="function"&&(i=e,e=void 0),typeof n=="function"&&(i=n,n=void 0),e||(e=this.languages),n||(n=this.options.ns),i||(i=gn),this.services.backendConnector.reload(e,n,s=>{r.resolve(),i(s)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&Tl.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let n=0;n<this.languages.length;n++){const i=this.languages[n];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}}changeLanguage(e,n){var i=this;this.isLanguageChangingTo=e;const r=Pt();this.emit("languageChanging",e);const s=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},a=(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,r.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||s(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,c=>{a(c,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),r}getFixedT(e,n,i){var r=this;const s=function(a,o){let l;if(typeof o!="object"){for(var u=arguments.length,c=new Array(u>2?u-2:0),d=2;d<u;d++)c[d-2]=arguments[d];l=r.options.overloadTranslationOptionHandler([a,o].concat(c))}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=l.keyPrefix||i||s.keyPrefix);const f=r.options.keySeparator||".";let v;return l.keyPrefix&&Array.isArray(a)?v=a.map(g=>`${l.keyPrefix}${f}${g}`):v=l.keyPrefix?`${l.keyPrefix}${f}${a}`:a,r.t(v,l)};return typeof e=="string"?s.lng=e:s.lngs=e,s.ns=n,s.keyPrefix=i,s}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=n.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const a=(o,l)=>{const u=this.services.backendConnector.state[`${o}|${l}`];return u===-1||u===0||u===2};if(n.precheck){const o=n.precheck(this,a);if(o!==void 0)return o}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(i,e)&&(!r||a(s,e)))}loadNamespaces(e,n){const i=Pt();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(r=>{this.options.ns.indexOf(r)<0&&this.options.ns.push(r)}),this.loadResources(r=>{i.resolve(),n&&n(r)}),i):(n&&n(),Promise.resolve())}loadLanguages(e,n){const i=Pt();typeof e=="string"&&(e=[e]);const r=this.options.preload||[],s=e.filter(a=>r.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return s.length?(this.options.preload=r.concat(s),this.loadResources(a=>{i.resolve(),n&&n(a)}),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 Bs(qs());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 Xt(e,n)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:gn;const i=e.forkResourceStore;i&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},s=new Xt(r);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 Vs(this.store.data,r),s.services.resourceStore=s.store),s.translator=new zn(s.services,r),s.translator.on("*",function(o){for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;c<l;c++)u[c-1]=arguments[c];s.emit(o,...u)}),s.init(r,n),s.translator.options=r,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Z=Xt.createInstance();Z.createInstance=Xt.createInstance;Z.createInstance;Z.dir;Z.init;Z.loadResources;Z.reloadResources;Z.use;Z.changeLanguage;Z.getFixedT;const Ks=Z.t;Z.exists;Z.setDefaultNamespace;Z.hasLoadedNamespace;Z.loadNamespaces;Z.loadLanguages;const Cl=t=>Ks(t?`errorCodes.${t}`:"errorCodes.DEFAULT");class Wp{constructor(e){F(this,"logger");F(this,"axiosInstance");this.logger=e.logger,this.axiosInstance=K.create({baseURL:e.baseUrl,headers:e.accessToken?{Authorization:`Bearer ${e.accessToken}`}:{}})}async get(e){try{return(await this.axiosInstance.get(e)).data}catch(n){throw this.handleError(n)}}async post(e,n){var s;const{data:i={},ignoreError:r=!1}=n;try{return(await this.axiosInstance.post(e,i)).data}catch(a){if(r&&K.isAxiosError(a))return(s=a.response)==null?void 0:s.data;throw this.handleError(a)}}async put(e,n){var s;const{data:i={},ignoreError:r=!1}=n;try{return(await this.axiosInstance.put(e,i)).data}catch(a){if(r&&K.isAxiosError(a))return(s=a.response)==null?void 0:s.data;throw this.handleError(a)}}async delete(e){try{return(await this.axiosInstance.delete(e)).data}catch(n){throw this.handleError(n)}}handleError(e){var r;let n=ee.GENERAL_ERROR;if(K.isAxiosError(e))if(e.response)switch(e.response.status){case 400:n=ee.BAD_REQUEST;break;case 401:n=ee.UNAUTHORIZED;break;case 403:n=ee.FORBIDDEN;break;case 404:n=ee.NOT_FOUND;break;case 409:n=ee.CONFLICT;break;case 410:n=ee.GONE;break;case 415:n=ee.UNSUPPORTED_MEDIA_TYPE;break;case 429:n=ee.TOO_MANY_REQUESTS;break;case 500:n=ee.INTERNAL_SERVER_ERROR;break;case 503:n=ee.SERVICE_UNAVAILABLE;break;default:n=ee.SERVER_ERROR}else e.request?n=ee.NETWORK_ERROR:n=ee.CONFIG_ERROR;const i=Cl(n);return this.logger.error("Error Code:",n,"Message:",i),this.logger.error("Result Data:",(r=e.response)==null?void 0:r.data),new Error(i)}}function xl(t){const e=Object.values(t);return Object.assign({},...e)}function Rl(t){return Object.entries(t).reduce((e,[n,i])=>{const r=xl(i);return{...e,[n]:r}},{})}function Fl(t,e){const n=Rl(e);Object.entries(n).forEach(([i,r])=>{t.addResourceBundle(i,"translation",r,!0)})}const{slice:Jp,forEach:Yp}=[];function Qp(t){return Yp.call(Jp.call(arguments,1),e=>{if(e)for(const n in e)t[n]===void 0&&(t[n]=e[n])}),t}const Ws=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Xp=(t,e,n)=>{const i=n||{};i.path=i.path||"/";const r=encodeURIComponent(e);let s=`${t}=${r}`;if(i.maxAge>0){const a=i.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(a)}`}if(i.domain){if(!Ws.test(i.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${i.domain}`}if(i.path){if(!Ws.test(i.path))throw new TypeError("option path is invalid");s+=`; Path=${i.path}`}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+=`; Expires=${i.expires.toUTCString()}`}if(i.httpOnly&&(s+="; HttpOnly"),i.secure&&(s+="; Secure"),i.sameSite)switch(typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s},Js={create(t,e,n,i){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(r.expires=new Date,r.expires.setTime(r.expires.getTime()+n*60*1e3)),i&&(r.domain=i),document.cookie=Xp(t,encodeURIComponent(e),r)},read(t){const e=`${t}=`,n=document.cookie.split(";");for(let i=0;i<n.length;i++){let r=n[i];for(;r.charAt(0)===" ";)r=r.substring(1,r.length);if(r.indexOf(e)===0)return r.substring(e.length,r.length)}return null},remove(t){this.create(t,"",-1)}};var Zp={name:"cookie",lookup(t){let{lookupCookie:e}=t;if(e&&typeof document!="undefined")return Js.read(e)||void 0},cacheUserLanguage(t,e){let{lookupCookie:n,cookieMinutes:i,cookieDomain:r,cookieOptions:s}=e;n&&typeof document!="undefined"&&Js.create(n,t,i,r,s)}},em={name:"querystring",lookup(t){var i;let{lookupQuerystring:e}=t,n;if(typeof window!="undefined"){let{search:r}=window.location;!window.location.search&&((i=window.location.hash)==null?void 0:i.indexOf("?"))>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));const a=r.substring(1).split("&");for(let o=0;o<a.length;o++){const l=a[o].indexOf("=");l>0&&a[o].substring(0,l)===e&&(n=a[o].substring(l+1))}}return n}};let Lt=null;const Ys=()=>{if(Lt!==null)return Lt;try{Lt=window!=="undefined"&&window.localStorage!==null;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{Lt=!1}return Lt};var tm={name:"localStorage",lookup(t){let{lookupLocalStorage:e}=t;if(e&&Ys())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupLocalStorage:n}=e;n&&Ys()&&window.localStorage.setItem(n,t)}};let $t=null;const Qs=()=>{if($t!==null)return $t;try{$t=window!=="undefined"&&window.sessionStorage!==null;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{$t=!1}return $t};var nm={name:"sessionStorage",lookup(t){let{lookupSessionStorage:e}=t;if(e&&Qs())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupSessionStorage:n}=e;n&&Qs()&&window.sessionStorage.setItem(n,t)}},im={name:"navigator",lookup(t){const e=[];if(typeof navigator!="undefined"){const{languages:n,userLanguage:i,language:r}=navigator;if(n)for(let s=0;s<n.length;s++)e.push(n[s]);i&&e.push(i),r&&e.push(r)}return e.length>0?e:void 0}},rm={name:"htmlTag",lookup(t){let{htmlTag:e}=t,n;const i=e||(typeof document!="undefined"?document.documentElement:null);return i&&typeof i.getAttribute=="function"&&(n=i.getAttribute("lang")),n}},sm={name:"path",lookup(t){var r;let{lookupFromPathIndex:e}=t;if(typeof window=="undefined")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(r=n[typeof e=="number"?e:0])==null?void 0:r.replace("/",""):void 0}},am={name:"subdomain",lookup(t){var r,s;let{lookupFromSubdomainIndex:e}=t;const n=typeof e=="number"?e+1:1,i=typeof window!="undefined"&&((s=(r=window.location)==null?void 0:r.hostname)==null?void 0:s.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(i)return i[n]}};function om(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t}}class Dl{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,n)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e||{languageUtils:{}},this.options=Qp(n,this.options||{},om()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=r=>r.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(Zp),this.addDetector(em),this.addDetector(tm),this.addDetector(nm),this.addDetector(im),this.addDetector(rm),this.addDetector(sm),this.addDetector(am)}addDetector(e){return this.detectors[e.name]=e,this}detect(e){e||(e=this.options.order);let n=[];return e.forEach(i=>{if(this.detectors[i]){let r=this.detectors[i].lookup(this.options);r&&typeof r=="string"&&(r=[r]),r&&(n=n.concat(r))}}),n=n.map(i=>this.options.convertDetectedLanguage(i)),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(e,n){n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||n.forEach(i=>{this.detectors[i]&&this.detectors[i].cacheUserLanguage(e,this.options)}))}}Dl.type="languageDetector";function Il(t,e){t.use(e).use(Dl).init({resources:{},fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1,format:(n,i,r)=>{if(i){const[s,...a]=i.split(",").map(o=>o.trim());if(s==="number")return new Intl.NumberFormat(r).format(n);if(s==="date")return new Intl.DateTimeFormat(r).format(n);if(s==="currency")return new Intl.NumberFormat(r,{style:"currency",currency:a[0]||"USD",currencyDisplay:"narrowSymbol"}).format(n).replace("$","").trim()}return n}},detection:{order:["navigator","cookie","localStorage","sessionStorage","querystring","htmlTag","path","subdomain"]}})}const lm=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,um={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},cm=t=>um[t],dm=t=>t.replace(lm,cm);let Xs={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:dm};function fm(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Xs={...Xs,...t}}const hm={type:"3rdParty",init(t){fm(t.options.react)}};Il(Z,hm);const pm=t=>Fl(Z,t),Zs={startTime:"UNKNOWN",viewerCount:0,status:"UNKNOWN"},mm=()=>{const[t,e]=M.useState([]),[n,i]=M.useState(Zs);return{realTimeStreamInfo:n,productsInCart:t,onTextMetadataCue:a=>{const{action:o,data:l,startTime:u,viewerCount:c,status:d}=JSON.parse(a==null?void 0:a.text);switch(o){case"sendivsdatarealtime":{i({startTime:u,viewerCount:c,status:d});break}case"sendaddtocart":{const{id:f,sessionId:v,productId:g,productImageUrl:m,productName:p}=l;e(h=>[...h,{id:f,sessionId:v,productId:g,productImageUrl:m,productName:p}])}break}},resetRealTimeStreamInfo:()=>{i(Zs)},setProductsInCart:e}},Wr=JSON,gm=t=>t.toUpperCase(),vm=t=>{const e={};return t.forEach((n,i)=>{e[i]=n}),e},km=(t,e,n)=>t.document?t:{document:t,variables:e,requestHeaders:n,signal:void 0},ym=(t,e,n)=>t.query?t:{query:t,variables:e,requestHeaders:n,signal:void 0},_m=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0};function En(t,e){if(!!!t)throw new Error(e)}function bm(t){return typeof t=="object"&&t!==null}function Sm(t,e){if(!!!t)throw new Error("Unexpected invariant triggered.")}const Nm=/\r\n|[\n\r]/g;function Er(t,e){let n=0,i=1;for(const r of t.body.matchAll(Nm)){if(typeof r.index=="number"||Sm(!1),r.index>=e)break;n=r.index+r[0].length,i+=1}return{line:i,column:e+1-n}}function Em(t){return Pl(t.source,Er(t.source,t.start))}function Pl(t,e){const n=t.locationOffset.column-1,i="".padStart(n)+t.body,r=e.line-1,s=t.locationOffset.line-1,a=e.line+s,o=e.line===1?n:0,l=e.column+o,u=`${t.name}:${a}:${l}
33
33
  `,c=i.split(/\r\n|[\n\r]/g),d=c[r];if(d.length>120){const f=Math.floor(l/80),v=l%80,g=[];for(let m=0;m<d.length;m+=80)g.push(d.slice(m,m+80));return u+ea([[`${a} |`,g[0]],...g.slice(1,f+1).map(m=>["|",m]),["|","^".padStart(v)],["|",g[f+1]]])}return u+ea([[`${a-1} |`,c[r-1]],[`${a} |`,d],["|","^".padStart(l)],[`${a+1} |`,c[r+1]]])}function ea(t){const e=t.filter(([i,r])=>r!==void 0),n=Math.max(...e.map(([i])=>i.length));return e.map(([i,r])=>i.padStart(n)+(r?" "+r:"")).join(`
34
34
  `)}function Am(t){const e=t[0];return e==null||"kind"in e||"length"in e?{nodes:e,source:t[1],positions:t[2],path:t[3],originalError:t[4],extensions:t[5]}:e}class Jr extends Error{constructor(e,...n){var i,r,s;const{nodes:a,source:o,positions:l,path:u,originalError:c,extensions:d}=Am(n);super(e),this.name="GraphQLError",this.path=u!=null?u:void 0,this.originalError=c!=null?c:void 0,this.nodes=ta(Array.isArray(a)?a:a?[a]:void 0);const f=ta((i=this.nodes)===null||i===void 0?void 0:i.map(g=>g.loc).filter(g=>g!=null));this.source=o!=null?o:f==null||(r=f[0])===null||r===void 0?void 0:r.source,this.positions=l!=null?l:f==null?void 0:f.map(g=>g.start),this.locations=l&&o?l.map(g=>Er(o,g)):f==null?void 0:f.map(g=>Er(g.source,g.start));const v=bm(c==null?void 0:c.extensions)?c==null?void 0:c.extensions:void 0;this.extensions=(s=d!=null?d:v)!==null&&s!==void 0?s:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),c!=null&&c.stack?Object.defineProperty(this,"stack",{value:c.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,Jr):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const n of this.nodes)n.loc&&(e+=`
35
35
 
@@ -39,7 +39,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
39
39
  `),d+=n,(c||u)&&(d+=`
40
40
  `),'"""'+d+'"""'}var S;(function(t){t.SOF="<SOF>",t.EOF="<EOF>",t.BANG="!",t.DOLLAR="$",t.AMP="&",t.PAREN_L="(",t.PAREN_R=")",t.SPREAD="...",t.COLON=":",t.EQUALS="=",t.AT="@",t.BRACKET_L="[",t.BRACKET_R="]",t.BRACE_L="{",t.PIPE="|",t.BRACE_R="}",t.NAME="Name",t.INT="Int",t.FLOAT="Float",t.STRING="String",t.BLOCK_STRING="BlockString",t.COMMENT="Comment"})(S||(S={}));class Fm{constructor(e){const n=new Ll(S.SOF,0,0,0,0);this.source=e,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==S.EOF)do if(e.next)e=e.next;else{const n=Im(this,e.end);e.next=n,n.prev=e,e=n}while(e.kind===S.COMMENT);return e}}function Dm(t){return t===S.BANG||t===S.DOLLAR||t===S.AMP||t===S.PAREN_L||t===S.PAREN_R||t===S.SPREAD||t===S.COLON||t===S.EQUALS||t===S.AT||t===S.BRACKET_L||t===S.BRACKET_R||t===S.BRACE_L||t===S.PIPE||t===S.BRACE_R}function Ft(t){return t>=0&&t<=55295||t>=57344&&t<=1114111}function mi(t,e){return Vl(t.charCodeAt(e))&&jl(t.charCodeAt(e+1))}function Vl(t){return t>=55296&&t<=56319}function jl(t){return t>=56320&&t<=57343}function nt(t,e){const n=t.source.body.codePointAt(e);if(n===void 0)return S.EOF;if(n>=32&&n<=126){const i=String.fromCodePoint(n);return i==='"'?`'"'`:`"${i}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function J(t,e,n,i,r){const s=t.line,a=1+n-t.lineStart;return new Ll(e,n,i,s,a,r)}function Im(t,e){const n=t.source.body,i=n.length;let r=e;for(;r<i;){const s=n.charCodeAt(r);switch(s){case 65279:case 9:case 32:case 44:++r;continue;case 10:++r,++t.line,t.lineStart=r;continue;case 13:n.charCodeAt(r+1)===10?r+=2:++r,++t.line,t.lineStart=r;continue;case 35:return Pm(t,r);case 33:return J(t,S.BANG,r,r+1);case 36:return J(t,S.DOLLAR,r,r+1);case 38:return J(t,S.AMP,r,r+1);case 40:return J(t,S.PAREN_L,r,r+1);case 41:return J(t,S.PAREN_R,r,r+1);case 46:if(n.charCodeAt(r+1)===46&&n.charCodeAt(r+2)===46)return J(t,S.SPREAD,r,r+3);break;case 58:return J(t,S.COLON,r,r+1);case 61:return J(t,S.EQUALS,r,r+1);case 64:return J(t,S.AT,r,r+1);case 91:return J(t,S.BRACKET_L,r,r+1);case 93:return J(t,S.BRACKET_R,r,r+1);case 123:return J(t,S.BRACE_L,r,r+1);case 124:return J(t,S.PIPE,r,r+1);case 125:return J(t,S.BRACE_R,r,r+1);case 34:return n.charCodeAt(r+1)===34&&n.charCodeAt(r+2)===34?jm(t,r):$m(t,r)}if(Zt(s)||s===45)return Lm(t,r,s);if(Ul(s))return Bm(t,r);throw X(t.source,r,s===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:Ft(s)||mi(n,r)?`Unexpected character: ${nt(t,r)}.`:`Invalid character: ${nt(t,r)}.`)}return J(t,S.EOF,i,i)}function Pm(t,e){const n=t.source.body,i=n.length;let r=e+1;for(;r<i;){const s=n.charCodeAt(r);if(s===10||s===13)break;if(Ft(s))++r;else if(mi(n,r))r+=2;else break}return J(t,S.COMMENT,e,r,n.slice(e+1,r))}function Lm(t,e,n){const i=t.source.body;let r=e,s=n,a=!1;if(s===45&&(s=i.charCodeAt(++r)),s===48){if(s=i.charCodeAt(++r),Zt(s))throw X(t.source,r,`Invalid number, unexpected digit after 0: ${nt(t,r)}.`)}else r=Bi(t,r,s),s=i.charCodeAt(r);if(s===46&&(a=!0,s=i.charCodeAt(++r),r=Bi(t,r,s),s=i.charCodeAt(r)),(s===69||s===101)&&(a=!0,s=i.charCodeAt(++r),(s===43||s===45)&&(s=i.charCodeAt(++r)),r=Bi(t,r,s),s=i.charCodeAt(r)),s===46||Ul(s))throw X(t.source,r,`Invalid number, expected digit but got: ${nt(t,r)}.`);return J(t,a?S.FLOAT:S.INT,e,r,i.slice(e,r))}function Bi(t,e,n){if(!Zt(n))throw X(t.source,e,`Invalid number, expected digit but got: ${nt(t,e)}.`);const i=t.source.body;let r=e+1;for(;Zt(i.charCodeAt(r));)++r;return r}function $m(t,e){const n=t.source.body,i=n.length;let r=e+1,s=r,a="";for(;r<i;){const o=n.charCodeAt(r);if(o===34)return a+=n.slice(s,r),J(t,S.STRING,e,r+1,a);if(o===92){a+=n.slice(s,r);const l=n.charCodeAt(r+1)===117?n.charCodeAt(r+2)===123?Mm(t,r):Um(t,r):Vm(t,r);a+=l.value,r+=l.size,s=r;continue}if(o===10||o===13)break;if(Ft(o))++r;else if(mi(n,r))r+=2;else throw X(t.source,r,`Invalid character within String: ${nt(t,r)}.`)}throw X(t.source,r,"Unterminated string.")}function Mm(t,e){const n=t.source.body;let i=0,r=3;for(;r<12;){const s=n.charCodeAt(e+r++);if(s===125){if(r<5||!Ft(i))break;return{value:String.fromCodePoint(i),size:r}}if(i=i<<4|Ut(s),i<0)break}throw X(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+r)}".`)}function Um(t,e){const n=t.source.body,i=ia(n,e+2);if(Ft(i))return{value:String.fromCodePoint(i),size:6};if(Vl(i)&&n.charCodeAt(e+6)===92&&n.charCodeAt(e+7)===117){const r=ia(n,e+8);if(jl(r))return{value:String.fromCodePoint(i,r),size:12}}throw X(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+6)}".`)}function ia(t,e){return Ut(t.charCodeAt(e))<<12|Ut(t.charCodeAt(e+1))<<8|Ut(t.charCodeAt(e+2))<<4|Ut(t.charCodeAt(e+3))}function Ut(t){return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:-1}function Vm(t,e){const n=t.source.body;switch(n.charCodeAt(e+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
41
41
  `,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw X(t.source,e,`Invalid character escape sequence: "${n.slice(e,e+2)}".`)}function jm(t,e){const n=t.source.body,i=n.length;let r=t.lineStart,s=e+3,a=s,o="";const l=[];for(;s<i;){const u=n.charCodeAt(s);if(u===34&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34){o+=n.slice(a,s),l.push(o);const c=J(t,S.BLOCK_STRING,e,s+3,Cm(l).join(`
42
- `));return t.line+=l.length-1,t.lineStart=r,c}if(u===92&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34&&n.charCodeAt(s+3)===34){o+=n.slice(a,s),a=s+1,s+=4;continue}if(u===10||u===13){o+=n.slice(a,s),l.push(o),u===13&&n.charCodeAt(s+1)===10?s+=2:++s,o="",a=s,r=s;continue}if(Ft(u))++s;else if(mi(n,s))s+=2;else throw X(t.source,s,`Invalid character within String: ${nt(t,s)}.`)}throw X(t.source,s,"Unterminated string.")}function Bm(t,e){const n=t.source.body,i=n.length;let r=e+1;for(;r<i;){const s=n.charCodeAt(r);if(Tm(s))++r;else break}return J(t,S.NAME,e,r,n.slice(e,r))}const Hm=10,Bl=2;function Yr(t){return gi(t,[])}function gi(t,e){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return qm(t,e);default:return String(t)}}function qm(t,e){if(t===null)return"null";if(e.includes(t))return"[Circular]";const n=[...e,t];if(zm(t)){const i=t.toJSON();if(i!==t)return typeof i=="string"?i:gi(i,n)}else if(Array.isArray(t))return Km(t,n);return Gm(t,n)}function zm(t){return typeof t.toJSON=="function"}function Gm(t,e){const n=Object.entries(t);return n.length===0?"{}":e.length>Bl?"["+Wm(t)+"]":"{ "+n.map(([r,s])=>r+": "+gi(s,e)).join(", ")+" }"}function Km(t,e){if(t.length===0)return"[]";if(e.length>Bl)return"[Array]";const n=Math.min(Hm,t.length),i=t.length-n,r=[];for(let s=0;s<n;++s)r.push(gi(t[s],e));return i===1?r.push("... 1 more item"):i>1&&r.push(`... ${i} more items`),"["+r.join(", ")+"]"}function Wm(t){const e=Object.prototype.toString.call(t).replace(/^\[object /,"").replace(/]$/,"");if(e==="Object"&&typeof t.constructor=="function"){const n=t.constructor.name;if(typeof n=="string"&&n!=="")return n}return e}const Jm=globalThis.process&&!0,Ym=Jm?function(e,n){return e instanceof n}:function(e,n){if(e instanceof n)return!0;if(typeof e=="object"&&e!==null){var i;const r=n.prototype[Symbol.toStringTag],s=Symbol.toStringTag in e?e[Symbol.toStringTag]:(i=e.constructor)===null||i===void 0?void 0:i.name;if(r===s){const a=Yr(e);throw new Error(`Cannot use ${r} "${a}" from another module or realm.
42
+ `));return t.line+=l.length-1,t.lineStart=r,c}if(u===92&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34&&n.charCodeAt(s+3)===34){o+=n.slice(a,s),a=s+1,s+=4;continue}if(u===10||u===13){o+=n.slice(a,s),l.push(o),u===13&&n.charCodeAt(s+1)===10?s+=2:++s,o="",a=s,r=s;continue}if(Ft(u))++s;else if(mi(n,s))s+=2;else throw X(t.source,s,`Invalid character within String: ${nt(t,s)}.`)}throw X(t.source,s,"Unterminated string.")}function Bm(t,e){const n=t.source.body,i=n.length;let r=e+1;for(;r<i;){const s=n.charCodeAt(r);if(Tm(s))++r;else break}return J(t,S.NAME,e,r,n.slice(e,r))}const Hm=10,Bl=2;function Yr(t){return gi(t,[])}function gi(t,e){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return zm(t,e);default:return String(t)}}function zm(t,e){if(t===null)return"null";if(e.includes(t))return"[Circular]";const n=[...e,t];if(qm(t)){const i=t.toJSON();if(i!==t)return typeof i=="string"?i:gi(i,n)}else if(Array.isArray(t))return Km(t,n);return Gm(t,n)}function qm(t){return typeof t.toJSON=="function"}function Gm(t,e){const n=Object.entries(t);return n.length===0?"{}":e.length>Bl?"["+Wm(t)+"]":"{ "+n.map(([r,s])=>r+": "+gi(s,e)).join(", ")+" }"}function Km(t,e){if(t.length===0)return"[]";if(e.length>Bl)return"[Array]";const n=Math.min(Hm,t.length),i=t.length-n,r=[];for(let s=0;s<n;++s)r.push(gi(t[s],e));return i===1?r.push("... 1 more item"):i>1&&r.push(`... ${i} more items`),"["+r.join(", ")+"]"}function Wm(t){const e=Object.prototype.toString.call(t).replace(/^\[object /,"").replace(/]$/,"");if(e==="Object"&&typeof t.constructor=="function"){const n=t.constructor.name;if(typeof n=="string"&&n!=="")return n}return e}const Jm=globalThis.process&&!0,Ym=Jm?function(e,n){return e instanceof n}:function(e,n){if(e instanceof n)return!0;if(typeof e=="object"&&e!==null){var i;const r=n.prototype[Symbol.toStringTag],s=Symbol.toStringTag in e?e[Symbol.toStringTag]:(i=e.constructor)===null||i===void 0?void 0:i.name;if(r===s){const a=Yr(e);throw new Error(`Cannot use ${r} "${a}" from another module or realm.
43
43
 
44
44
  Ensure that there is only one instance of "graphql" in the node_modules
45
45
  directory. If different versions of "graphql" are the dependencies of other
@@ -50,7 +50,7 @@ https://yarnpkg.com/en/docs/selective-version-resolutions
50
50
  Duplicate "graphql" modules cannot be used at the same time since different
51
51
  versions may have different capabilities and behavior. The data from one
52
52
  version used in the function from another could produce confusing and
53
- spurious results.`)}}return!1};class Hl{constructor(e,n="GraphQL request",i={line:1,column:1}){typeof e=="string"||En(!1,`Body must be a string. Received: ${Yr(e)}.`),this.body=e,this.name=n,this.locationOffset=i,this.locationOffset.line>0||En(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||En(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function Qm(t){return Ym(t,Hl)}function Xm(t,e){return new Zm(t,e).parseDocument()}class Zm{constructor(e,n={}){const i=Qm(e)?e:new Hl(e);this._lexer=new Fm(i),this._options=n,this._tokenCounter=0}parseName(){const e=this.expectToken(S.NAME);return this.node(e,{kind:I.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:I.DOCUMENT,definitions:this.many(S.SOF,this.parseDefinition,S.EOF)})}parseDefinition(){if(this.peek(S.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),n=e?this._lexer.lookahead():this._lexer.token;if(n.kind===S.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw X(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(S.BRACE_L))return this.node(e,{kind:I.OPERATION_DEFINITION,operation:yt.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const n=this.parseOperationType();let i;return this.peek(S.NAME)&&(i=this.parseName()),this.node(e,{kind:I.OPERATION_DEFINITION,operation:n,name:i,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(S.NAME);switch(e.value){case"query":return yt.QUERY;case"mutation":return yt.MUTATION;case"subscription":return yt.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(S.PAREN_L,this.parseVariableDefinition,S.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:I.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(S.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(S.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(S.DOLLAR),this.node(e,{kind:I.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:I.SELECTION_SET,selections:this.many(S.BRACE_L,this.parseSelection,S.BRACE_R)})}parseSelection(){return this.peek(S.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,n=this.parseName();let i,r;return this.expectOptionalToken(S.COLON)?(i=n,r=this.parseName()):r=n,this.node(e,{kind:I.FIELD,alias:i,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(S.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const n=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(S.PAREN_L,n,S.PAREN_R)}parseArgument(e=!1){const n=this._lexer.token,i=this.parseName();return this.expectToken(S.COLON),this.node(n,{kind:I.ARGUMENT,name:i,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(S.SPREAD);const n=this.expectOptionalKeyword("on");return!n&&this.peek(S.NAME)?this.node(e,{kind:I.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:I.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(e,{kind:I.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:I.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(e){const n=this._lexer.token;switch(n.kind){case S.BRACKET_L:return this.parseList(e);case S.BRACE_L:return this.parseObject(e);case S.INT:return this.advanceLexer(),this.node(n,{kind:I.INT,value:n.value});case S.FLOAT:return this.advanceLexer(),this.node(n,{kind:I.FLOAT,value:n.value});case S.STRING:case S.BLOCK_STRING:return this.parseStringLiteral();case S.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:I.BOOLEAN,value:!0});case"false":return this.node(n,{kind:I.BOOLEAN,value:!1});case"null":return this.node(n,{kind:I.NULL});default:return this.node(n,{kind:I.ENUM,value:n.value})}case S.DOLLAR:if(e)if(this.expectToken(S.DOLLAR),this._lexer.token.kind===S.NAME){const i=this._lexer.token.value;throw X(this._lexer.source,n.start,`Unexpected variable "$${i}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:I.STRING,value:e.value,block:e.kind===S.BLOCK_STRING})}parseList(e){const n=()=>this.parseValueLiteral(e);return this.node(this._lexer.token,{kind:I.LIST,values:this.any(S.BRACKET_L,n,S.BRACKET_R)})}parseObject(e){const n=()=>this.parseObjectField(e);return this.node(this._lexer.token,{kind:I.OBJECT,fields:this.any(S.BRACE_L,n,S.BRACE_R)})}parseObjectField(e){const n=this._lexer.token,i=this.parseName();return this.expectToken(S.COLON),this.node(n,{kind:I.OBJECT_FIELD,name:i,value:this.parseValueLiteral(e)})}parseDirectives(e){const n=[];for(;this.peek(S.AT);)n.push(this.parseDirective(e));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const n=this._lexer.token;return this.expectToken(S.AT),this.node(n,{kind:I.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let n;if(this.expectOptionalToken(S.BRACKET_L)){const i=this.parseTypeReference();this.expectToken(S.BRACKET_R),n=this.node(e,{kind:I.LIST_TYPE,type:i})}else n=this.parseNamedType();return this.expectOptionalToken(S.BANG)?this.node(e,{kind:I.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:I.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(S.STRING)||this.peek(S.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");const i=this.parseConstDirectives(),r=this.many(S.BRACE_L,this.parseOperationTypeDefinition,S.BRACE_R);return this.node(e,{kind:I.SCHEMA_DEFINITION,description:n,directives:i,operationTypes:r})}parseOperationTypeDefinition(){const e=this._lexer.token,n=this.parseOperationType();this.expectToken(S.COLON);const i=this.parseNamedType();return this.node(e,{kind:I.OPERATION_TYPE_DEFINITION,operation:n,type:i})}parseScalarTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");const i=this.parseName(),r=this.parseConstDirectives();return this.node(e,{kind:I.SCALAR_TYPE_DEFINITION,description:n,name:i,directives:r})}parseObjectTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");const i=this.parseName(),r=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(e,{kind:I.OBJECT_TYPE_DEFINITION,description:n,name:i,interfaces:r,directives:s,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(S.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(S.BRACE_L,this.parseFieldDefinition,S.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,n=this.parseDescription(),i=this.parseName(),r=this.parseArgumentDefs();this.expectToken(S.COLON);const s=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(e,{kind:I.FIELD_DEFINITION,description:n,name:i,arguments:r,type:s,directives:a})}parseArgumentDefs(){return this.optionalMany(S.PAREN_L,this.parseInputValueDef,S.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,n=this.parseDescription(),i=this.parseName();this.expectToken(S.COLON);const r=this.parseTypeReference();let s;this.expectOptionalToken(S.EQUALS)&&(s=this.parseConstValueLiteral());const a=this.parseConstDirectives();return this.node(e,{kind:I.INPUT_VALUE_DEFINITION,description:n,name:i,type:r,defaultValue:s,directives:a})}parseInterfaceTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");const i=this.parseName(),r=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(e,{kind:I.INTERFACE_TYPE_DEFINITION,description:n,name:i,interfaces:r,directives:s,fields:a})}parseUnionTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");const i=this.parseName(),r=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(e,{kind:I.UNION_TYPE_DEFINITION,description:n,name:i,directives:r,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(S.EQUALS)?this.delimitedMany(S.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");const i=this.parseName(),r=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(e,{kind:I.ENUM_TYPE_DEFINITION,description:n,name:i,directives:r,values:s})}parseEnumValuesDefinition(){return this.optionalMany(S.BRACE_L,this.parseEnumValueDefinition,S.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,n=this.parseDescription(),i=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(e,{kind:I.ENUM_VALUE_DEFINITION,description:n,name:i,directives:r})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw X(this._lexer.source,this._lexer.token.start,`${vn(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");const i=this.parseName(),r=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(e,{kind:I.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:i,directives:r,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(S.BRACE_L,this.parseInputValueDef,S.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===S.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const n=this.parseConstDirectives(),i=this.optionalMany(S.BRACE_L,this.parseOperationTypeDefinition,S.BRACE_R);if(n.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:I.SCHEMA_EXTENSION,directives:n,operationTypes:i})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const n=this.parseName(),i=this.parseConstDirectives();if(i.length===0)throw this.unexpected();return this.node(e,{kind:I.SCALAR_TYPE_EXTENSION,name:n,directives:i})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const n=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(i.length===0&&r.length===0&&s.length===0)throw this.unexpected();return this.node(e,{kind:I.OBJECT_TYPE_EXTENSION,name:n,interfaces:i,directives:r,fields:s})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const n=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(i.length===0&&r.length===0&&s.length===0)throw this.unexpected();return this.node(e,{kind:I.INTERFACE_TYPE_EXTENSION,name:n,interfaces:i,directives:r,fields:s})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:I.UNION_TYPE_EXTENSION,name:n,directives:i,types:r})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:I.ENUM_TYPE_EXTENSION,name:n,directives:i,values:r})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:I.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:i,fields:r})}parseDirectiveDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(S.AT);const i=this.parseName(),r=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const a=this.parseDirectiveLocations();return this.node(e,{kind:I.DIRECTIVE_DEFINITION,description:n,name:i,arguments:r,repeatable:s,locations:a})}parseDirectiveLocations(){return this.delimitedMany(S.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(Ar,n.value))return n;throw this.unexpected(e)}node(e,n){return this._options.noLocation!==!0&&(n.loc=new Om(e,this._lexer.lastToken,this._lexer.source)),n}peek(e){return this._lexer.token.kind===e}expectToken(e){const n=this._lexer.token;if(n.kind===e)return this.advanceLexer(),n;throw X(this._lexer.source,n.start,`Expected ${ql(e)}, found ${vn(n)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e?(this.advanceLexer(),!0):!1}expectKeyword(e){const n=this._lexer.token;if(n.kind===S.NAME&&n.value===e)this.advanceLexer();else throw X(this._lexer.source,n.start,`Expected "${e}", found ${vn(n)}.`)}expectOptionalKeyword(e){const n=this._lexer.token;return n.kind===S.NAME&&n.value===e?(this.advanceLexer(),!0):!1}unexpected(e){const n=e!=null?e:this._lexer.token;return X(this._lexer.source,n.start,`Unexpected ${vn(n)}.`)}any(e,n,i){this.expectToken(e);const r=[];for(;!this.expectOptionalToken(i);)r.push(n.call(this));return r}optionalMany(e,n,i){if(this.expectOptionalToken(e)){const r=[];do r.push(n.call(this));while(!this.expectOptionalToken(i));return r}return[]}many(e,n,i){this.expectToken(e);const r=[];do r.push(n.call(this));while(!this.expectOptionalToken(i));return r}delimitedMany(e,n){this.expectOptionalToken(e);const i=[];do i.push(n.call(this));while(this.expectOptionalToken(e));return i}advanceLexer(){const{maxTokens:e}=this._options,n=this._lexer.advance();if(e!==void 0&&n.kind!==S.EOF&&(++this._tokenCounter,this._tokenCounter>e))throw X(this._lexer.source,n.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}function vn(t){const e=t.value;return ql(t.kind)+(e!=null?` "${e}"`:"")}function ql(t){return Dm(t)?`"${t}"`:t}function eg(t){return`"${t.replace(tg,ng)}"`}const tg=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function ng(t){return ig[t.charCodeAt(0)]}const ig=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],rg=Object.freeze({});function sg(t,e,n=$l){const i=new Map;for(const h of Object.values(I))i.set(h,ag(e,h));let r,s=Array.isArray(t),a=[t],o=-1,l=[],u=t,c,d;const f=[],v=[];do{o++;const h=o===a.length,_=h&&l.length!==0;if(h){if(c=v.length===0?void 0:f[f.length-1],u=d,d=v.pop(),_)if(s){u=u.slice();let b=0;for(const[E,O]of l){const x=E-b;O===null?(u.splice(x,1),b++):u[x]=O}}else{u=Object.defineProperties({},Object.getOwnPropertyDescriptors(u));for(const[b,E]of l)u[b]=E}o=r.index,a=r.keys,l=r.edits,s=r.inArray,r=r.prev}else if(d){if(c=s?o:a[o],u=d[c],u==null)continue;f.push(c)}let N;if(!Array.isArray(u)){var g,m;na(u)||En(!1,`Invalid AST Node: ${Yr(u)}.`);const b=h?(g=i.get(u.kind))===null||g===void 0?void 0:g.leave:(m=i.get(u.kind))===null||m===void 0?void 0:m.enter;if(N=b==null?void 0:b.call(e,u,c,d,f,v),N===rg)break;if(N===!1){if(!h){f.pop();continue}}else if(N!==void 0&&(l.push([c,N]),!h))if(na(N))u=N;else{f.pop();continue}}if(N===void 0&&_&&l.push([c,u]),h)f.pop();else{var p;r={inArray:s,index:o,keys:a,edits:l,prev:r},s=Array.isArray(u),a=s?u:(p=n[u.kind])!==null&&p!==void 0?p:[],o=-1,l=[],d&&v.push(d),d=u}}while(r!==void 0);return l.length!==0?l[l.length-1][1]:t}function ag(t,e){const n=t[e];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:t.enter,leave:t.leave}}function og(t){return sg(t,ug)}const lg=80,ug={Name:{leave:t=>t.value},Variable:{leave:t=>"$"+t.name},Document:{leave:t=>T(t.definitions,`
53
+ spurious results.`)}}return!1};class Hl{constructor(e,n="GraphQL request",i={line:1,column:1}){typeof e=="string"||En(!1,`Body must be a string. Received: ${Yr(e)}.`),this.body=e,this.name=n,this.locationOffset=i,this.locationOffset.line>0||En(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||En(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function Qm(t){return Ym(t,Hl)}function Xm(t,e){return new Zm(t,e).parseDocument()}class Zm{constructor(e,n={}){const i=Qm(e)?e:new Hl(e);this._lexer=new Fm(i),this._options=n,this._tokenCounter=0}parseName(){const e=this.expectToken(S.NAME);return this.node(e,{kind:I.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:I.DOCUMENT,definitions:this.many(S.SOF,this.parseDefinition,S.EOF)})}parseDefinition(){if(this.peek(S.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),n=e?this._lexer.lookahead():this._lexer.token;if(n.kind===S.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw X(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(S.BRACE_L))return this.node(e,{kind:I.OPERATION_DEFINITION,operation:yt.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const n=this.parseOperationType();let i;return this.peek(S.NAME)&&(i=this.parseName()),this.node(e,{kind:I.OPERATION_DEFINITION,operation:n,name:i,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(S.NAME);switch(e.value){case"query":return yt.QUERY;case"mutation":return yt.MUTATION;case"subscription":return yt.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(S.PAREN_L,this.parseVariableDefinition,S.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:I.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(S.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(S.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(S.DOLLAR),this.node(e,{kind:I.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:I.SELECTION_SET,selections:this.many(S.BRACE_L,this.parseSelection,S.BRACE_R)})}parseSelection(){return this.peek(S.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,n=this.parseName();let i,r;return this.expectOptionalToken(S.COLON)?(i=n,r=this.parseName()):r=n,this.node(e,{kind:I.FIELD,alias:i,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(S.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const n=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(S.PAREN_L,n,S.PAREN_R)}parseArgument(e=!1){const n=this._lexer.token,i=this.parseName();return this.expectToken(S.COLON),this.node(n,{kind:I.ARGUMENT,name:i,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(S.SPREAD);const n=this.expectOptionalKeyword("on");return!n&&this.peek(S.NAME)?this.node(e,{kind:I.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:I.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(e,{kind:I.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:I.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(e){const n=this._lexer.token;switch(n.kind){case S.BRACKET_L:return this.parseList(e);case S.BRACE_L:return this.parseObject(e);case S.INT:return this.advanceLexer(),this.node(n,{kind:I.INT,value:n.value});case S.FLOAT:return this.advanceLexer(),this.node(n,{kind:I.FLOAT,value:n.value});case S.STRING:case S.BLOCK_STRING:return this.parseStringLiteral();case S.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:I.BOOLEAN,value:!0});case"false":return this.node(n,{kind:I.BOOLEAN,value:!1});case"null":return this.node(n,{kind:I.NULL});default:return this.node(n,{kind:I.ENUM,value:n.value})}case S.DOLLAR:if(e)if(this.expectToken(S.DOLLAR),this._lexer.token.kind===S.NAME){const i=this._lexer.token.value;throw X(this._lexer.source,n.start,`Unexpected variable "$${i}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:I.STRING,value:e.value,block:e.kind===S.BLOCK_STRING})}parseList(e){const n=()=>this.parseValueLiteral(e);return this.node(this._lexer.token,{kind:I.LIST,values:this.any(S.BRACKET_L,n,S.BRACKET_R)})}parseObject(e){const n=()=>this.parseObjectField(e);return this.node(this._lexer.token,{kind:I.OBJECT,fields:this.any(S.BRACE_L,n,S.BRACE_R)})}parseObjectField(e){const n=this._lexer.token,i=this.parseName();return this.expectToken(S.COLON),this.node(n,{kind:I.OBJECT_FIELD,name:i,value:this.parseValueLiteral(e)})}parseDirectives(e){const n=[];for(;this.peek(S.AT);)n.push(this.parseDirective(e));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const n=this._lexer.token;return this.expectToken(S.AT),this.node(n,{kind:I.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let n;if(this.expectOptionalToken(S.BRACKET_L)){const i=this.parseTypeReference();this.expectToken(S.BRACKET_R),n=this.node(e,{kind:I.LIST_TYPE,type:i})}else n=this.parseNamedType();return this.expectOptionalToken(S.BANG)?this.node(e,{kind:I.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:I.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(S.STRING)||this.peek(S.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");const i=this.parseConstDirectives(),r=this.many(S.BRACE_L,this.parseOperationTypeDefinition,S.BRACE_R);return this.node(e,{kind:I.SCHEMA_DEFINITION,description:n,directives:i,operationTypes:r})}parseOperationTypeDefinition(){const e=this._lexer.token,n=this.parseOperationType();this.expectToken(S.COLON);const i=this.parseNamedType();return this.node(e,{kind:I.OPERATION_TYPE_DEFINITION,operation:n,type:i})}parseScalarTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");const i=this.parseName(),r=this.parseConstDirectives();return this.node(e,{kind:I.SCALAR_TYPE_DEFINITION,description:n,name:i,directives:r})}parseObjectTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");const i=this.parseName(),r=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(e,{kind:I.OBJECT_TYPE_DEFINITION,description:n,name:i,interfaces:r,directives:s,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(S.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(S.BRACE_L,this.parseFieldDefinition,S.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,n=this.parseDescription(),i=this.parseName(),r=this.parseArgumentDefs();this.expectToken(S.COLON);const s=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(e,{kind:I.FIELD_DEFINITION,description:n,name:i,arguments:r,type:s,directives:a})}parseArgumentDefs(){return this.optionalMany(S.PAREN_L,this.parseInputValueDef,S.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,n=this.parseDescription(),i=this.parseName();this.expectToken(S.COLON);const r=this.parseTypeReference();let s;this.expectOptionalToken(S.EQUALS)&&(s=this.parseConstValueLiteral());const a=this.parseConstDirectives();return this.node(e,{kind:I.INPUT_VALUE_DEFINITION,description:n,name:i,type:r,defaultValue:s,directives:a})}parseInterfaceTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");const i=this.parseName(),r=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(e,{kind:I.INTERFACE_TYPE_DEFINITION,description:n,name:i,interfaces:r,directives:s,fields:a})}parseUnionTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");const i=this.parseName(),r=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(e,{kind:I.UNION_TYPE_DEFINITION,description:n,name:i,directives:r,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(S.EQUALS)?this.delimitedMany(S.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");const i=this.parseName(),r=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(e,{kind:I.ENUM_TYPE_DEFINITION,description:n,name:i,directives:r,values:s})}parseEnumValuesDefinition(){return this.optionalMany(S.BRACE_L,this.parseEnumValueDefinition,S.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,n=this.parseDescription(),i=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(e,{kind:I.ENUM_VALUE_DEFINITION,description:n,name:i,directives:r})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw X(this._lexer.source,this._lexer.token.start,`${vn(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");const i=this.parseName(),r=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(e,{kind:I.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:i,directives:r,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(S.BRACE_L,this.parseInputValueDef,S.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===S.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const n=this.parseConstDirectives(),i=this.optionalMany(S.BRACE_L,this.parseOperationTypeDefinition,S.BRACE_R);if(n.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:I.SCHEMA_EXTENSION,directives:n,operationTypes:i})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const n=this.parseName(),i=this.parseConstDirectives();if(i.length===0)throw this.unexpected();return this.node(e,{kind:I.SCALAR_TYPE_EXTENSION,name:n,directives:i})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const n=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(i.length===0&&r.length===0&&s.length===0)throw this.unexpected();return this.node(e,{kind:I.OBJECT_TYPE_EXTENSION,name:n,interfaces:i,directives:r,fields:s})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const n=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(i.length===0&&r.length===0&&s.length===0)throw this.unexpected();return this.node(e,{kind:I.INTERFACE_TYPE_EXTENSION,name:n,interfaces:i,directives:r,fields:s})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:I.UNION_TYPE_EXTENSION,name:n,directives:i,types:r})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:I.ENUM_TYPE_EXTENSION,name:n,directives:i,values:r})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:I.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:i,fields:r})}parseDirectiveDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(S.AT);const i=this.parseName(),r=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const a=this.parseDirectiveLocations();return this.node(e,{kind:I.DIRECTIVE_DEFINITION,description:n,name:i,arguments:r,repeatable:s,locations:a})}parseDirectiveLocations(){return this.delimitedMany(S.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(Ar,n.value))return n;throw this.unexpected(e)}node(e,n){return this._options.noLocation!==!0&&(n.loc=new Om(e,this._lexer.lastToken,this._lexer.source)),n}peek(e){return this._lexer.token.kind===e}expectToken(e){const n=this._lexer.token;if(n.kind===e)return this.advanceLexer(),n;throw X(this._lexer.source,n.start,`Expected ${zl(e)}, found ${vn(n)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e?(this.advanceLexer(),!0):!1}expectKeyword(e){const n=this._lexer.token;if(n.kind===S.NAME&&n.value===e)this.advanceLexer();else throw X(this._lexer.source,n.start,`Expected "${e}", found ${vn(n)}.`)}expectOptionalKeyword(e){const n=this._lexer.token;return n.kind===S.NAME&&n.value===e?(this.advanceLexer(),!0):!1}unexpected(e){const n=e!=null?e:this._lexer.token;return X(this._lexer.source,n.start,`Unexpected ${vn(n)}.`)}any(e,n,i){this.expectToken(e);const r=[];for(;!this.expectOptionalToken(i);)r.push(n.call(this));return r}optionalMany(e,n,i){if(this.expectOptionalToken(e)){const r=[];do r.push(n.call(this));while(!this.expectOptionalToken(i));return r}return[]}many(e,n,i){this.expectToken(e);const r=[];do r.push(n.call(this));while(!this.expectOptionalToken(i));return r}delimitedMany(e,n){this.expectOptionalToken(e);const i=[];do i.push(n.call(this));while(this.expectOptionalToken(e));return i}advanceLexer(){const{maxTokens:e}=this._options,n=this._lexer.advance();if(e!==void 0&&n.kind!==S.EOF&&(++this._tokenCounter,this._tokenCounter>e))throw X(this._lexer.source,n.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}function vn(t){const e=t.value;return zl(t.kind)+(e!=null?` "${e}"`:"")}function zl(t){return Dm(t)?`"${t}"`:t}function eg(t){return`"${t.replace(tg,ng)}"`}const tg=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function ng(t){return ig[t.charCodeAt(0)]}const ig=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],rg=Object.freeze({});function sg(t,e,n=$l){const i=new Map;for(const h of Object.values(I))i.set(h,ag(e,h));let r,s=Array.isArray(t),a=[t],o=-1,l=[],u=t,c,d;const f=[],v=[];do{o++;const h=o===a.length,_=h&&l.length!==0;if(h){if(c=v.length===0?void 0:f[f.length-1],u=d,d=v.pop(),_)if(s){u=u.slice();let b=0;for(const[E,O]of l){const x=E-b;O===null?(u.splice(x,1),b++):u[x]=O}}else{u=Object.defineProperties({},Object.getOwnPropertyDescriptors(u));for(const[b,E]of l)u[b]=E}o=r.index,a=r.keys,l=r.edits,s=r.inArray,r=r.prev}else if(d){if(c=s?o:a[o],u=d[c],u==null)continue;f.push(c)}let N;if(!Array.isArray(u)){var g,m;na(u)||En(!1,`Invalid AST Node: ${Yr(u)}.`);const b=h?(g=i.get(u.kind))===null||g===void 0?void 0:g.leave:(m=i.get(u.kind))===null||m===void 0?void 0:m.enter;if(N=b==null?void 0:b.call(e,u,c,d,f,v),N===rg)break;if(N===!1){if(!h){f.pop();continue}}else if(N!==void 0&&(l.push([c,N]),!h))if(na(N))u=N;else{f.pop();continue}}if(N===void 0&&_&&l.push([c,u]),h)f.pop();else{var p;r={inArray:s,index:o,keys:a,edits:l,prev:r},s=Array.isArray(u),a=s?u:(p=n[u.kind])!==null&&p!==void 0?p:[],o=-1,l=[],d&&v.push(d),d=u}}while(r!==void 0);return l.length!==0?l[l.length-1][1]:t}function ag(t,e){const n=t[e];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:t.enter,leave:t.leave}}function og(t){return sg(t,ug)}const lg=80,ug={Name:{leave:t=>t.value},Variable:{leave:t=>"$"+t.name},Document:{leave:t=>T(t.definitions,`
54
54
 
55
55
  `)},OperationDefinition:{leave(t){const e=U("(",T(t.variableDefinitions,", "),")"),n=T([t.operation,T([t.name,e]),T(t.directives," ")]," ");return(n==="query"?"":n+" ")+t.selectionSet}},VariableDefinition:{leave:({variable:t,type:e,defaultValue:n,directives:i})=>t+": "+e+U(" = ",n)+U(" ",T(i," "))},SelectionSet:{leave:({selections:t})=>me(t)},Field:{leave({alias:t,name:e,arguments:n,directives:i,selectionSet:r}){const s=U("",t,": ")+e;let a=s+U("(",T(n,", "),")");return a.length>lg&&(a=s+U(`(
56
56
  `,An(T(n,`
@@ -77,7 +77,7 @@ spurious results.`)}}return!1};class Hl{constructor(e,n="GraphQL request",i={lin
77
77
  `)),`
78
78
  }`)}function U(t,e,n=""){return e!=null&&e!==""?t+e+n:""}function An(t){return U(" ",t.replace(/\n/g,`
79
79
  `))}function ra(t){var e;return(e=t==null?void 0:t.some(n=>n.includes(`
80
- `)))!==null&&e!==void 0?e:!1}const sa=t=>{var i,r;let e;const n=t.definitions.filter(s=>s.kind==="OperationDefinition");return n.length===1&&(e=(r=(i=n[0])==null?void 0:i.name)==null?void 0:r.value),e},Hi=t=>{if(typeof t=="string"){let n;try{const i=Xm(t);n=sa(i)}catch{}return{query:t,operationName:n}}const e=sa(t);return{query:og(t),operationName:e}};class Ht extends Error{constructor(e,n){const i=`${Ht.extractMessage(e)}: ${JSON.stringify({response:e,request:n})}`;super(i),Object.setPrototypeOf(this,Ht.prototype),this.response=e,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Ht)}static extractMessage(e){var n,i,r;return(r=(i=(n=e.errors)==null?void 0:n[0])==null?void 0:i.message)!=null?r:`GraphQL Error (Code: ${e.status})`}}var wr={exports:{}};(function(t,e){var n=typeof self!="undefined"?self:Vr,i=function(){function s(){this.fetch=!1,this.DOMException=n.DOMException}return s.prototype=n,new s}();(function(s){(function(a){var o={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function l(k){return k&&DataView.prototype.isPrototypeOf(k)}if(o.arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(k){return k&&u.indexOf(Object.prototype.toString.call(k))>-1};function d(k){if(typeof k!="string"&&(k=String(k)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(k))throw new TypeError("Invalid character in header field name");return k.toLowerCase()}function f(k){return typeof k!="string"&&(k=String(k)),k}function v(k){var A={next:function(){var L=k.shift();return{done:L===void 0,value:L}}};return o.iterable&&(A[Symbol.iterator]=function(){return A}),A}function g(k){this.map={},k instanceof g?k.forEach(function(A,L){this.append(L,A)},this):Array.isArray(k)?k.forEach(function(A){this.append(A[0],A[1])},this):k&&Object.getOwnPropertyNames(k).forEach(function(A){this.append(A,k[A])},this)}g.prototype.append=function(k,A){k=d(k),A=f(A);var L=this.map[k];this.map[k]=L?L+", "+A:A},g.prototype.delete=function(k){delete this.map[d(k)]},g.prototype.get=function(k){return k=d(k),this.has(k)?this.map[k]:null},g.prototype.has=function(k){return this.map.hasOwnProperty(d(k))},g.prototype.set=function(k,A){this.map[d(k)]=f(A)},g.prototype.forEach=function(k,A){for(var L in this.map)this.map.hasOwnProperty(L)&&k.call(A,this.map[L],L,this)},g.prototype.keys=function(){var k=[];return this.forEach(function(A,L){k.push(L)}),v(k)},g.prototype.values=function(){var k=[];return this.forEach(function(A){k.push(A)}),v(k)},g.prototype.entries=function(){var k=[];return this.forEach(function(A,L){k.push([L,A])}),v(k)},o.iterable&&(g.prototype[Symbol.iterator]=g.prototype.entries);function m(k){if(k.bodyUsed)return Promise.reject(new TypeError("Already read"));k.bodyUsed=!0}function p(k){return new Promise(function(A,L){k.onload=function(){A(k.result)},k.onerror=function(){L(k.error)}})}function h(k){var A=new FileReader,L=p(A);return A.readAsArrayBuffer(k),L}function _(k){var A=new FileReader,L=p(A);return A.readAsText(k),L}function N(k){for(var A=new Uint8Array(k),L=new Array(A.length),Q=0;Q<A.length;Q++)L[Q]=String.fromCharCode(A[Q]);return L.join("")}function b(k){if(k.slice)return k.slice(0);var A=new Uint8Array(k.byteLength);return A.set(new Uint8Array(k)),A.buffer}function E(){return this.bodyUsed=!1,this._initBody=function(k){this._bodyInit=k,k?typeof k=="string"?this._bodyText=k:o.blob&&Blob.prototype.isPrototypeOf(k)?this._bodyBlob=k:o.formData&&FormData.prototype.isPrototypeOf(k)?this._bodyFormData=k:o.searchParams&&URLSearchParams.prototype.isPrototypeOf(k)?this._bodyText=k.toString():o.arrayBuffer&&o.blob&&l(k)?(this._bodyArrayBuffer=b(k.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(k)||c(k))?this._bodyArrayBuffer=b(k):this._bodyText=k=Object.prototype.toString.call(k):this._bodyText="",this.headers.get("content-type")||(typeof k=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):o.searchParams&&URLSearchParams.prototype.isPrototypeOf(k)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o.blob&&(this.blob=function(){var k=m(this);if(k)return k;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?m(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(h)}),this.text=function(){var k=m(this);if(k)return k;if(this._bodyBlob)return _(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(N(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o.formData&&(this.formData=function(){return this.text().then(D)}),this.json=function(){return this.text().then(JSON.parse)},this}var O=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function x(k){var A=k.toUpperCase();return O.indexOf(A)>-1?A:k}function R(k,A){A=A||{};var L=A.body;if(k instanceof R){if(k.bodyUsed)throw new TypeError("Already read");this.url=k.url,this.credentials=k.credentials,A.headers||(this.headers=new g(k.headers)),this.method=k.method,this.mode=k.mode,this.signal=k.signal,!L&&k._bodyInit!=null&&(L=k._bodyInit,k.bodyUsed=!0)}else this.url=String(k);if(this.credentials=A.credentials||this.credentials||"same-origin",(A.headers||!this.headers)&&(this.headers=new g(A.headers)),this.method=x(A.method||this.method||"GET"),this.mode=A.mode||this.mode||null,this.signal=A.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&L)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(L)}R.prototype.clone=function(){return new R(this,{body:this._bodyInit})};function D(k){var A=new FormData;return k.trim().split("&").forEach(function(L){if(L){var Q=L.split("="),H=Q.shift().replace(/\+/g," "),V=Q.join("=").replace(/\+/g," ");A.append(decodeURIComponent(H),decodeURIComponent(V))}}),A}function q(k){var A=new g,L=k.replace(/\r?\n[\t ]+/g," ");return L.split(/\r?\n/).forEach(function(Q){var H=Q.split(":"),V=H.shift().trim();if(V){var Ne=H.join(":").trim();A.append(V,Ne)}}),A}E.call(R.prototype);function C(k,A){A||(A={}),this.type="default",this.status=A.status===void 0?200:A.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in A?A.statusText:"OK",this.headers=new g(A.headers),this.url=A.url||"",this._initBody(k)}E.call(C.prototype),C.prototype.clone=function(){return new C(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new g(this.headers),url:this.url})},C.error=function(){var k=new C(null,{status:0,statusText:""});return k.type="error",k};var z=[301,302,303,307,308];C.redirect=function(k,A){if(z.indexOf(A)===-1)throw new RangeError("Invalid status code");return new C(null,{status:A,headers:{location:k}})},a.DOMException=s.DOMException;try{new a.DOMException}catch{a.DOMException=function(A,L){this.message=A,this.name=L;var Q=Error(A);this.stack=Q.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function re(k,A){return new Promise(function(L,Q){var H=new R(k,A);if(H.signal&&H.signal.aborted)return Q(new a.DOMException("Aborted","AbortError"));var V=new XMLHttpRequest;function Ne(){V.abort()}V.onload=function(){var Le={status:V.status,statusText:V.statusText,headers:q(V.getAllResponseHeaders()||"")};Le.url="responseURL"in V?V.responseURL:Le.headers.get("X-Request-URL");var Ei="response"in V?V.response:V.responseText;L(new C(Ei,Le))},V.onerror=function(){Q(new TypeError("Network request failed"))},V.ontimeout=function(){Q(new TypeError("Network request failed"))},V.onabort=function(){Q(new a.DOMException("Aborted","AbortError"))},V.open(H.method,H.url,!0),H.credentials==="include"?V.withCredentials=!0:H.credentials==="omit"&&(V.withCredentials=!1),"responseType"in V&&o.blob&&(V.responseType="blob"),H.headers.forEach(function(Le,Ei){V.setRequestHeader(Ei,Le)}),H.signal&&(H.signal.addEventListener("abort",Ne),V.onreadystatechange=function(){V.readyState===4&&H.signal.removeEventListener("abort",Ne)}),V.send(typeof H._bodyInit=="undefined"?null:H._bodyInit)})}return re.polyfill=!0,s.fetch||(s.fetch=re,s.Headers=g,s.Request=R,s.Response=C),a.Headers=g,a.Request=R,a.Response=C,a.fetch=re,Object.defineProperty(a,"__esModule",{value:!0}),a})({})})(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var r=i;e=r.fetch,e.default=r.fetch,e.fetch=r.fetch,e.Headers=r.Headers,e.Request=r.Request,e.Response=r.Response,t.exports=e})(wr,wr.exports);var zn=wr.exports;const On=jr(zn),cg=mu({__proto__:null,default:On},[zn]),pt=t=>{let e={};return t&&(typeof Headers!="undefined"&&t instanceof Headers||cg&&zn.Headers&&t instanceof zn.Headers?e=vm(t):Array.isArray(t)?t.forEach(([n,i])=>{n&&i!==void 0&&(e[n]=i)}):e=t),e},aa=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),dg=t=>{if(!Array.isArray(t.query)){const i=t,r=[`query=${encodeURIComponent(aa(i.query))}`];return t.variables&&r.push(`variables=${encodeURIComponent(i.jsonSerializer.stringify(i.variables))}`),i.operationName&&r.push(`operationName=${encodeURIComponent(i.operationName)}`),r.join("&")}if(typeof t.variables!="undefined"&&!Array.isArray(t.variables))throw new Error("Cannot create query with given variable type, array expected");const e=t,n=t.query.reduce((i,r,s)=>(i.push({query:aa(r),variables:e.variables?e.jsonSerializer.stringify(e.variables[s]):void 0}),i),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(n))}`},fg=t=>async e=>{var m;const{url:n,query:i,variables:r,operationName:s,fetch:a,fetchOptions:o,middleware:l}=e,u={...e.headers};let c="",d;t==="POST"?(d=pg(i,r,s,o.jsonSerializer),typeof d=="string"&&(u["Content-Type"]="application/json")):c=dg({query:i,variables:r,operationName:s,jsonSerializer:(m=o.jsonSerializer)!=null?m:Wr});const f={method:t,headers:u,body:d,...o};let v=n,g=f;if(l){const p=await Promise.resolve(l({...f,url:n,operationName:s,variables:r})),{url:h,..._}=p;v=h,g=_}return c&&(v=`${v}?${c}`),await a(v,g)};class hg{constructor(e,n={}){this.url=e,this.requestConfig=n,this.rawRequest=async(...i)=>{const[r,s,a]=i,o=ym(r,s,a),{headers:l,fetch:u=On,method:c="POST",requestMiddleware:d,responseMiddleware:f,...v}=this.requestConfig,{url:g}=this;o.signal!==void 0&&(v.signal=o.signal);const{operationName:m}=Hi(o.query);return qi({url:g,query:o.query,variables:o.variables,headers:{...pt(zi(l)),...pt(o.requestHeaders)},operationName:m,fetch:u,method:c,fetchOptions:v,middleware:d}).then(p=>(f&&f(p),p)).catch(p=>{throw f&&f(p),p})}}async request(e,...n){const[i,r]=n,s=km(e,i,r),{headers:a,fetch:o=On,method:l="POST",requestMiddleware:u,responseMiddleware:c,...d}=this.requestConfig,{url:f}=this;s.signal!==void 0&&(d.signal=s.signal);const{query:v,operationName:g}=Hi(s.document);return qi({url:f,query:v,variables:s.variables,headers:{...pt(zi(a)),...pt(s.requestHeaders)},operationName:g,fetch:o,method:l,fetchOptions:d,middleware:u}).then(m=>(c&&c(m),m.data)).catch(m=>{throw c&&c(m),m})}batchRequests(e,n){var l;const i=_m(e,n),{headers:r,...s}=this.requestConfig;i.signal!==void 0&&(s.signal=i.signal);const a=i.documents.map(({document:u})=>Hi(u).query),o=i.documents.map(({variables:u})=>u);return qi({url:this.url,query:a,variables:o,headers:{...pt(zi(r)),...pt(i.requestHeaders)},operationName:void 0,fetch:(l=this.requestConfig.fetch)!=null?l:On,method:this.requestConfig.method||"POST",fetchOptions:s,middleware:this.requestConfig.requestMiddleware}).then(u=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(u),u.data)).catch(u=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(u),u})}setHeaders(e){return this.requestConfig.headers=e,this}setHeader(e,n){const{headers:i}=this.requestConfig;return i?i[e]=n:this.requestConfig.headers={[e]:n},this}setEndpoint(e){return this.url=e,this}}const qi=async t=>{var c,d;const{query:e,variables:n,fetchOptions:i}=t,r=fg(gm((c=t.method)!=null?c:"post")),s=Array.isArray(t.query),a=await r(t),o=await mg(a,(d=i.jsonSerializer)!=null?d:Wr),l=Array.isArray(o)?!o.some(({data:f})=>!f):!!o.data,u=Array.isArray(o)||!o.errors||Array.isArray(o.errors)&&!o.errors.length||i.errorPolicy==="all"||i.errorPolicy==="ignore";if(a.ok&&u&&l){const{errors:f,...v}=(Array.isArray(o),o),g=i.errorPolicy==="ignore"?v:o;return{...s?{data:g}:g,headers:a.headers,status:a.status}}else{const f=typeof o=="string"?{error:o}:o;throw new Ht({...f,status:a.status,headers:a.headers},{query:e,variables:n})}},pg=(t,e,n,i)=>{const r=i!=null?i:Wr;if(!Array.isArray(t))return r.stringify({query:t,variables:e,operationName:n});if(typeof e!="undefined"&&!Array.isArray(e))throw new Error("Cannot create request body with given variable type, array expected");const s=t.reduce((a,o,l)=>(a.push({query:o,variables:e?e[l]:void 0}),a),[]);return r.stringify(s)},mg=async(t,e)=>{let n;return t.headers.forEach((i,r)=>{r.toLowerCase()==="content-type"&&(n=i)}),n&&(n.toLowerCase().startsWith("application/json")||n.toLowerCase().startsWith("application/graphql+json")||n.toLowerCase().startsWith("application/graphql-response+json"))?e.parse(await t.text()):t.text()},zi=t=>typeof t=="function"?t():t;class zl extends rt{constructor(){super("EVENT_CHAT_ROOM_TOKEN_ERROR","Error getting chat room connection token")}}class vi{constructor(e){F(this,"root",nl(this));F(this,"token");this.root.setProps(e)}static toDomain(e){const n={token:e.token};return new vi(n)}toPrimitives(){const{root:e,...n}=this;return{...n}}}const gg=rn.apiUrls.graphql;class Gl{constructor(){F(this,"client");this.client=new hg(gg)}async getChatRoom(e){var r;const{getChatRoomToken:n}=await this.client.request(Zo,{data:{account:e.account,idEvent:e.eventId,userName:e.userName}});this.propagateGraphqlErrorIfExists(n);const i=(r=n.data)==null?void 0:r.token;if(!i)throw new zl;return vi.toDomain({token:i})}propagateGraphqlErrorIfExists(e){if(e.__typename==="ErrorGeneral")throw new Error(e.message)}}class Kl{constructor(e){F(this,"account");this.eventChatRoomRepository=e}async get(e){this.validateAccount();try{return await this.eventChatRoomRepository.getChatRoom({...e,account:this.account})}catch(n){throw new Rr(n)}}setAccount(e){this.account=e}validateAccount(){if(!this.account)throw new Ra}}const vg=new Gl,Tr=new Kl(vg),ki=Wn(void 0);ki.debugLabel="chatSocketAtom";const yi=Wn(!1);yi.debugLabel="chatIsConnectedAtom";const dn=Wn([]);dn.debugLabel="chatMessageListAtom";const Wl=t=>{var n;t.data=t.data.replace("replace_gif",(n=t.urlGif)!=null?n:"");const e=t.data.indexOf("::question__")>-1;if(e){const[i,r]=t.data.split("::")||["none","none"],s=r.split("question__")[1],a={response:i.replace("response__",""),question:JSON.parse(s)};return{...t,data:a.response,isResponse:e,responseData:t.data,question:e?a.question:null}}return t},Jl=t=>{const{url:e,token:n,onOpen:i,onClose:r,onMessage:s,onError:a}=t,o=new WebSocket(e,n);return o.onopen=l=>i(l),o.onclose=l=>r(l),o.onerror=l=>a(l),o.onmessage=l=>s(l),o},Yl=()=>{const t="0123456789ABCDEF";let e="#";for(let n=0;n<6;n+=1)e+=t[Math.floor(Math.random()*16)];return e},Qr=(t,e)=>{var f,v;const{Content:n,Attributes:i,Sender:{Attributes:r}}=e,{username:s,type:a,email:o}=i,{isAdmin:l}=r,u=(f=i==null?void 0:i.id)!=null?f:Ln(8),c=((v=t.find(g=>g.username===s))==null?void 0:v.color)||Yl(),d={id:u,type:a,color:c,username:s,email:o,data:n,sendDate:i.sendDate,isAdmin:l==="true",responseAdmin:!1,question:null,account:i.account,idEvent:i.idEvent,urlGif:i.urlGif,ip:i.ip};return Wl(d)},Ql=t=>{const{eventId:e,userName:n,enabled:i=!0}=t,{accountName:r}=Ho(),[s,a]=M.useState(""),o=()=>{i&&r&&(Tr.setAccount(r),Tr.get({eventId:e,userName:n}).then(l=>{a(l.token)}))};return M.useEffect(()=>{o()},[r,i]),{getQuery:{refetch:o},token:s}},{coreLogger:kg}=ut(),te=Ie.withPrefix(kg,"useConnectChatSocket"),yg=rn.publicUrls.wssIVSChat,_g=10,bg=t=>Math.min(1e4,1e3*Math.pow(2,t)),Sg=(t,e,n)=>{const i=JSON.parse(t.data);switch(i.Type){case"EVENT":e==null||e(i);break;case"MESSAGE":n==null||n(i);break;case"ERROR":te.error("Chat room error:",i);break;default:te.error("Unknown chat room event:",t)}},Xl=t=>{const{onMessage:e,eventId:n,enabled:i=!0,userName:r,onEvent:s}=t,{token:a,getQuery:o}=Ql({eventId:n,userName:r,enabled:i}),[l,u]=Ci(ki),[c,d]=Ci(yi),[f,v]=Ci(dn),g=M.useRef(0),m=M.useCallback(b=>te.error("Chat room socket error:",b),[]),p=M.useCallback(()=>{d(!0),g.current=0,te.debug("Successfully connected to the chat room")},[d]),h=M.useCallback(()=>{if(g.current>=_g){te.error("Max reconnection attempts reached. No further attempts will be made.");return}d(!1),g.current+=1;const b=bg(g.current);te.debug(`Disconnected from chat room. Reconnecting in ${b/1e3} seconds... (Attempt ${g.current})`),setTimeout(()=>o.refetch(),b)},[o,d]),_=M.useCallback(()=>{if(!a){te.debug("No token available. Connection aborted.");return}if((l==null?void 0:l.readyState)===WebSocket.OPEN){te.debug("WebSocket is already open. No need to reconnect.");return}te.debug("Connecting to the chat room...");const b=Jl({token:a,url:yg,onOpen:p,onClose:h,onError:m,onMessage:E=>Sg(E,s,e)});u(b)},[a,l,s,e,p,h,m,u]),N=M.useCallback(()=>{if(!l||l.readyState!==WebSocket.OPEN){te.debug("No open socket to close.");return}te.debug("Closing chat room socket..."),l.close()},[l]);return M.useEffect(()=>{if(!i){te.debug("Chat is disabled, skipping connection.");return}if(!a){te.debug("Token not available, skipping connection.");return}return te.debug("Initializing connection with token:",a),N(),_(),N},[a,i]),{socket:l,chatIsConnected:c,chatMessageList:f,setChatMessageList:v}},Ng=()=>{const t=Zi(ki),e=Zi(yi);return{sendMessage:M.useCallback((i,r)=>{if(!t||!e)return;const s={id:r.id,sendDate:new Date,content:i,action:"SEND_MESSAGE",attributes:r},a=JSON.stringify(s);t.send(a)},[e,t])}},Zl=()=>{const t=xr(dn);return{handleEvent:i=>{var r;if(i.EventName==="senddeletemessage"){const s=JSON.parse((r=i.Attributes)==null?void 0:r.data);t(a=>a.filter(o=>o.id!==s.id))}},handleMessage:i=>{t(r=>[...r,Qr(r,i)])}}},Eg=t=>{const{eventId:e,userName:n}=t,[i,r]=M.useState(!1),[s,a]=M.useState(),[o,l]=M.useState(),[u,c]=M.useState([]),{handleEvent:d}=Zl(),f=xr(dn),v=_=>{f(N=>[Qr(N,_),...N]),r(!1)},g=_=>{var N,b,E;if(d(_),_.EventName==="sendpinmessage"){const O=JSON.parse((N=_.Attributes)==null?void 0:N.data);a({data:O.data,id:O.id,username:O.username})}if(_.EventName==="sendunpinmessage"&&a(void 0),_.EventName==="sendhighlightproduct"){const O=JSON.parse((b=_.Attributes)==null?void 0:b.data);l({products:O.productIds,collection:O.collection,livestreamingId:O.idEvent})}if(_.EventName==="sendaddtocart"){const O=JSON.parse((E=_.Attributes)==null?void 0:E.data);c(x=>[...x,{id:O.id,sessionId:O.sessionId,productId:O.productId,productImageUrl:O.productImageUrl,productName:O.productName}])}},{socket:m,chatMessageList:p,setChatMessageList:h}=Xl({onMessage:v,onEvent:g,eventId:e,userName:n});return{socket:m,chat:p,showLoader:i,pinnedMessage:s,highlightProduct:o,productsInCart:u,setChat:h,setShowLoader:r,setPinnedMessage:a,setProductsInCart:c}};/**
80
+ `)))!==null&&e!==void 0?e:!1}const sa=t=>{var i,r;let e;const n=t.definitions.filter(s=>s.kind==="OperationDefinition");return n.length===1&&(e=(r=(i=n[0])==null?void 0:i.name)==null?void 0:r.value),e},Hi=t=>{if(typeof t=="string"){let n;try{const i=Xm(t);n=sa(i)}catch{}return{query:t,operationName:n}}const e=sa(t);return{query:og(t),operationName:e}};class Ht extends Error{constructor(e,n){const i=`${Ht.extractMessage(e)}: ${JSON.stringify({response:e,request:n})}`;super(i),Object.setPrototypeOf(this,Ht.prototype),this.response=e,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Ht)}static extractMessage(e){var n,i,r;return(r=(i=(n=e.errors)==null?void 0:n[0])==null?void 0:i.message)!=null?r:`GraphQL Error (Code: ${e.status})`}}var wr={exports:{}};(function(t,e){var n=typeof self!="undefined"?self:Vr,i=function(){function s(){this.fetch=!1,this.DOMException=n.DOMException}return s.prototype=n,new s}();(function(s){(function(a){var o={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function l(k){return k&&DataView.prototype.isPrototypeOf(k)}if(o.arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(k){return k&&u.indexOf(Object.prototype.toString.call(k))>-1};function d(k){if(typeof k!="string"&&(k=String(k)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(k))throw new TypeError("Invalid character in header field name");return k.toLowerCase()}function f(k){return typeof k!="string"&&(k=String(k)),k}function v(k){var A={next:function(){var L=k.shift();return{done:L===void 0,value:L}}};return o.iterable&&(A[Symbol.iterator]=function(){return A}),A}function g(k){this.map={},k instanceof g?k.forEach(function(A,L){this.append(L,A)},this):Array.isArray(k)?k.forEach(function(A){this.append(A[0],A[1])},this):k&&Object.getOwnPropertyNames(k).forEach(function(A){this.append(A,k[A])},this)}g.prototype.append=function(k,A){k=d(k),A=f(A);var L=this.map[k];this.map[k]=L?L+", "+A:A},g.prototype.delete=function(k){delete this.map[d(k)]},g.prototype.get=function(k){return k=d(k),this.has(k)?this.map[k]:null},g.prototype.has=function(k){return this.map.hasOwnProperty(d(k))},g.prototype.set=function(k,A){this.map[d(k)]=f(A)},g.prototype.forEach=function(k,A){for(var L in this.map)this.map.hasOwnProperty(L)&&k.call(A,this.map[L],L,this)},g.prototype.keys=function(){var k=[];return this.forEach(function(A,L){k.push(L)}),v(k)},g.prototype.values=function(){var k=[];return this.forEach(function(A){k.push(A)}),v(k)},g.prototype.entries=function(){var k=[];return this.forEach(function(A,L){k.push([L,A])}),v(k)},o.iterable&&(g.prototype[Symbol.iterator]=g.prototype.entries);function m(k){if(k.bodyUsed)return Promise.reject(new TypeError("Already read"));k.bodyUsed=!0}function p(k){return new Promise(function(A,L){k.onload=function(){A(k.result)},k.onerror=function(){L(k.error)}})}function h(k){var A=new FileReader,L=p(A);return A.readAsArrayBuffer(k),L}function _(k){var A=new FileReader,L=p(A);return A.readAsText(k),L}function N(k){for(var A=new Uint8Array(k),L=new Array(A.length),Q=0;Q<A.length;Q++)L[Q]=String.fromCharCode(A[Q]);return L.join("")}function b(k){if(k.slice)return k.slice(0);var A=new Uint8Array(k.byteLength);return A.set(new Uint8Array(k)),A.buffer}function E(){return this.bodyUsed=!1,this._initBody=function(k){this._bodyInit=k,k?typeof k=="string"?this._bodyText=k:o.blob&&Blob.prototype.isPrototypeOf(k)?this._bodyBlob=k:o.formData&&FormData.prototype.isPrototypeOf(k)?this._bodyFormData=k:o.searchParams&&URLSearchParams.prototype.isPrototypeOf(k)?this._bodyText=k.toString():o.arrayBuffer&&o.blob&&l(k)?(this._bodyArrayBuffer=b(k.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(k)||c(k))?this._bodyArrayBuffer=b(k):this._bodyText=k=Object.prototype.toString.call(k):this._bodyText="",this.headers.get("content-type")||(typeof k=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):o.searchParams&&URLSearchParams.prototype.isPrototypeOf(k)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o.blob&&(this.blob=function(){var k=m(this);if(k)return k;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?m(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(h)}),this.text=function(){var k=m(this);if(k)return k;if(this._bodyBlob)return _(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(N(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o.formData&&(this.formData=function(){return this.text().then(D)}),this.json=function(){return this.text().then(JSON.parse)},this}var O=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function x(k){var A=k.toUpperCase();return O.indexOf(A)>-1?A:k}function R(k,A){A=A||{};var L=A.body;if(k instanceof R){if(k.bodyUsed)throw new TypeError("Already read");this.url=k.url,this.credentials=k.credentials,A.headers||(this.headers=new g(k.headers)),this.method=k.method,this.mode=k.mode,this.signal=k.signal,!L&&k._bodyInit!=null&&(L=k._bodyInit,k.bodyUsed=!0)}else this.url=String(k);if(this.credentials=A.credentials||this.credentials||"same-origin",(A.headers||!this.headers)&&(this.headers=new g(A.headers)),this.method=x(A.method||this.method||"GET"),this.mode=A.mode||this.mode||null,this.signal=A.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&L)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(L)}R.prototype.clone=function(){return new R(this,{body:this._bodyInit})};function D(k){var A=new FormData;return k.trim().split("&").forEach(function(L){if(L){var Q=L.split("="),H=Q.shift().replace(/\+/g," "),V=Q.join("=").replace(/\+/g," ");A.append(decodeURIComponent(H),decodeURIComponent(V))}}),A}function z(k){var A=new g,L=k.replace(/\r?\n[\t ]+/g," ");return L.split(/\r?\n/).forEach(function(Q){var H=Q.split(":"),V=H.shift().trim();if(V){var Ne=H.join(":").trim();A.append(V,Ne)}}),A}E.call(R.prototype);function C(k,A){A||(A={}),this.type="default",this.status=A.status===void 0?200:A.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in A?A.statusText:"OK",this.headers=new g(A.headers),this.url=A.url||"",this._initBody(k)}E.call(C.prototype),C.prototype.clone=function(){return new C(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new g(this.headers),url:this.url})},C.error=function(){var k=new C(null,{status:0,statusText:""});return k.type="error",k};var q=[301,302,303,307,308];C.redirect=function(k,A){if(q.indexOf(A)===-1)throw new RangeError("Invalid status code");return new C(null,{status:A,headers:{location:k}})},a.DOMException=s.DOMException;try{new a.DOMException}catch{a.DOMException=function(A,L){this.message=A,this.name=L;var Q=Error(A);this.stack=Q.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function re(k,A){return new Promise(function(L,Q){var H=new R(k,A);if(H.signal&&H.signal.aborted)return Q(new a.DOMException("Aborted","AbortError"));var V=new XMLHttpRequest;function Ne(){V.abort()}V.onload=function(){var Le={status:V.status,statusText:V.statusText,headers:z(V.getAllResponseHeaders()||"")};Le.url="responseURL"in V?V.responseURL:Le.headers.get("X-Request-URL");var Ei="response"in V?V.response:V.responseText;L(new C(Ei,Le))},V.onerror=function(){Q(new TypeError("Network request failed"))},V.ontimeout=function(){Q(new TypeError("Network request failed"))},V.onabort=function(){Q(new a.DOMException("Aborted","AbortError"))},V.open(H.method,H.url,!0),H.credentials==="include"?V.withCredentials=!0:H.credentials==="omit"&&(V.withCredentials=!1),"responseType"in V&&o.blob&&(V.responseType="blob"),H.headers.forEach(function(Le,Ei){V.setRequestHeader(Ei,Le)}),H.signal&&(H.signal.addEventListener("abort",Ne),V.onreadystatechange=function(){V.readyState===4&&H.signal.removeEventListener("abort",Ne)}),V.send(typeof H._bodyInit=="undefined"?null:H._bodyInit)})}return re.polyfill=!0,s.fetch||(s.fetch=re,s.Headers=g,s.Request=R,s.Response=C),a.Headers=g,a.Request=R,a.Response=C,a.fetch=re,Object.defineProperty(a,"__esModule",{value:!0}),a})({})})(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var r=i;e=r.fetch,e.default=r.fetch,e.fetch=r.fetch,e.Headers=r.Headers,e.Request=r.Request,e.Response=r.Response,t.exports=e})(wr,wr.exports);var qn=wr.exports;const On=jr(qn),cg=mu({__proto__:null,default:On},[qn]),pt=t=>{let e={};return t&&(typeof Headers!="undefined"&&t instanceof Headers||cg&&qn.Headers&&t instanceof qn.Headers?e=vm(t):Array.isArray(t)?t.forEach(([n,i])=>{n&&i!==void 0&&(e[n]=i)}):e=t),e},aa=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),dg=t=>{if(!Array.isArray(t.query)){const i=t,r=[`query=${encodeURIComponent(aa(i.query))}`];return t.variables&&r.push(`variables=${encodeURIComponent(i.jsonSerializer.stringify(i.variables))}`),i.operationName&&r.push(`operationName=${encodeURIComponent(i.operationName)}`),r.join("&")}if(typeof t.variables!="undefined"&&!Array.isArray(t.variables))throw new Error("Cannot create query with given variable type, array expected");const e=t,n=t.query.reduce((i,r,s)=>(i.push({query:aa(r),variables:e.variables?e.jsonSerializer.stringify(e.variables[s]):void 0}),i),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(n))}`},fg=t=>async e=>{var m;const{url:n,query:i,variables:r,operationName:s,fetch:a,fetchOptions:o,middleware:l}=e,u={...e.headers};let c="",d;t==="POST"?(d=pg(i,r,s,o.jsonSerializer),typeof d=="string"&&(u["Content-Type"]="application/json")):c=dg({query:i,variables:r,operationName:s,jsonSerializer:(m=o.jsonSerializer)!=null?m:Wr});const f={method:t,headers:u,body:d,...o};let v=n,g=f;if(l){const p=await Promise.resolve(l({...f,url:n,operationName:s,variables:r})),{url:h,..._}=p;v=h,g=_}return c&&(v=`${v}?${c}`),await a(v,g)};class hg{constructor(e,n={}){this.url=e,this.requestConfig=n,this.rawRequest=async(...i)=>{const[r,s,a]=i,o=ym(r,s,a),{headers:l,fetch:u=On,method:c="POST",requestMiddleware:d,responseMiddleware:f,...v}=this.requestConfig,{url:g}=this;o.signal!==void 0&&(v.signal=o.signal);const{operationName:m}=Hi(o.query);return zi({url:g,query:o.query,variables:o.variables,headers:{...pt(qi(l)),...pt(o.requestHeaders)},operationName:m,fetch:u,method:c,fetchOptions:v,middleware:d}).then(p=>(f&&f(p),p)).catch(p=>{throw f&&f(p),p})}}async request(e,...n){const[i,r]=n,s=km(e,i,r),{headers:a,fetch:o=On,method:l="POST",requestMiddleware:u,responseMiddleware:c,...d}=this.requestConfig,{url:f}=this;s.signal!==void 0&&(d.signal=s.signal);const{query:v,operationName:g}=Hi(s.document);return zi({url:f,query:v,variables:s.variables,headers:{...pt(qi(a)),...pt(s.requestHeaders)},operationName:g,fetch:o,method:l,fetchOptions:d,middleware:u}).then(m=>(c&&c(m),m.data)).catch(m=>{throw c&&c(m),m})}batchRequests(e,n){var l;const i=_m(e,n),{headers:r,...s}=this.requestConfig;i.signal!==void 0&&(s.signal=i.signal);const a=i.documents.map(({document:u})=>Hi(u).query),o=i.documents.map(({variables:u})=>u);return zi({url:this.url,query:a,variables:o,headers:{...pt(qi(r)),...pt(i.requestHeaders)},operationName:void 0,fetch:(l=this.requestConfig.fetch)!=null?l:On,method:this.requestConfig.method||"POST",fetchOptions:s,middleware:this.requestConfig.requestMiddleware}).then(u=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(u),u.data)).catch(u=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(u),u})}setHeaders(e){return this.requestConfig.headers=e,this}setHeader(e,n){const{headers:i}=this.requestConfig;return i?i[e]=n:this.requestConfig.headers={[e]:n},this}setEndpoint(e){return this.url=e,this}}const zi=async t=>{var c,d;const{query:e,variables:n,fetchOptions:i}=t,r=fg(gm((c=t.method)!=null?c:"post")),s=Array.isArray(t.query),a=await r(t),o=await mg(a,(d=i.jsonSerializer)!=null?d:Wr),l=Array.isArray(o)?!o.some(({data:f})=>!f):!!o.data,u=Array.isArray(o)||!o.errors||Array.isArray(o.errors)&&!o.errors.length||i.errorPolicy==="all"||i.errorPolicy==="ignore";if(a.ok&&u&&l){const{errors:f,...v}=(Array.isArray(o),o),g=i.errorPolicy==="ignore"?v:o;return{...s?{data:g}:g,headers:a.headers,status:a.status}}else{const f=typeof o=="string"?{error:o}:o;throw new Ht({...f,status:a.status,headers:a.headers},{query:e,variables:n})}},pg=(t,e,n,i)=>{const r=i!=null?i:Wr;if(!Array.isArray(t))return r.stringify({query:t,variables:e,operationName:n});if(typeof e!="undefined"&&!Array.isArray(e))throw new Error("Cannot create request body with given variable type, array expected");const s=t.reduce((a,o,l)=>(a.push({query:o,variables:e?e[l]:void 0}),a),[]);return r.stringify(s)},mg=async(t,e)=>{let n;return t.headers.forEach((i,r)=>{r.toLowerCase()==="content-type"&&(n=i)}),n&&(n.toLowerCase().startsWith("application/json")||n.toLowerCase().startsWith("application/graphql+json")||n.toLowerCase().startsWith("application/graphql-response+json"))?e.parse(await t.text()):t.text()},qi=t=>typeof t=="function"?t():t;class ql extends rt{constructor(){super("EVENT_CHAT_ROOM_TOKEN_ERROR","Error getting chat room connection token")}}class vi{constructor(e){F(this,"root",nl(this));F(this,"token");this.root.setProps(e)}static toDomain(e){const n={token:e.token};return new vi(n)}toPrimitives(){const{root:e,...n}=this;return{...n}}}const gg=rn.apiUrls.graphql;class Gl{constructor(){F(this,"client");this.client=new hg(gg)}async getChatRoom(e){var r;const{getChatRoomToken:n}=await this.client.request(Zo,{data:{account:e.account,idEvent:e.eventId,userName:e.userName}});this.propagateGraphqlErrorIfExists(n);const i=(r=n.data)==null?void 0:r.token;if(!i)throw new ql;return vi.toDomain({token:i})}propagateGraphqlErrorIfExists(e){if(e.__typename==="ErrorGeneral")throw new Error(e.message)}}class Kl{constructor(e){F(this,"account");this.eventChatRoomRepository=e}async get(e){this.validateAccount();try{return await this.eventChatRoomRepository.getChatRoom({...e,account:this.account})}catch(n){throw new Rr(n)}}setAccount(e){this.account=e}validateAccount(){if(!this.account)throw new Ra}}const vg=new Gl,Tr=new Kl(vg),ki=Wn(void 0);ki.debugLabel="chatSocketAtom";const yi=Wn(!1);yi.debugLabel="chatIsConnectedAtom";const dn=Wn([]);dn.debugLabel="chatMessageListAtom";const Wl=t=>{var n;t.data=t.data.replace("replace_gif",(n=t.urlGif)!=null?n:"");const e=t.data.indexOf("::question__")>-1;if(e){const[i,r]=t.data.split("::")||["none","none"],s=r.split("question__")[1],a={response:i.replace("response__",""),question:JSON.parse(s)};return{...t,data:a.response,isResponse:e,responseData:t.data,question:e?a.question:null}}return t},Jl=t=>{const{url:e,token:n,onOpen:i,onClose:r,onMessage:s,onError:a}=t,o=new WebSocket(e,n);return o.onopen=l=>i(l),o.onclose=l=>r(l),o.onerror=l=>a(l),o.onmessage=l=>s(l),o},Yl=()=>{const t="0123456789ABCDEF";let e="#";for(let n=0;n<6;n+=1)e+=t[Math.floor(Math.random()*16)];return e},Qr=(t,e)=>{var f,v;const{Content:n,Attributes:i,Sender:{Attributes:r}}=e,{username:s,type:a,email:o}=i,{isAdmin:l}=r,u=(f=i==null?void 0:i.id)!=null?f:Ln(8),c=((v=t.find(g=>g.username===s))==null?void 0:v.color)||Yl(),d={id:u,type:a,color:c,username:s,email:o,data:n,sendDate:i.sendDate,isAdmin:l==="true",responseAdmin:!1,question:null,account:i.account,idEvent:i.idEvent,urlGif:i.urlGif,ip:i.ip};return Wl(d)},Ql=t=>{const{eventId:e,userName:n,enabled:i=!0}=t,{accountName:r}=Ho(),[s,a]=M.useState(""),o=()=>{i&&r&&(Tr.setAccount(r),Tr.get({eventId:e,userName:n}).then(l=>{a(l.token)}))};return M.useEffect(()=>{o()},[r,i]),{getQuery:{refetch:o},token:s}},{coreLogger:kg}=ut(),te=Ie.withPrefix(kg,"useConnectChatSocket"),yg=rn.publicUrls.wssIVSChat,_g=10,bg=t=>Math.min(1e4,1e3*Math.pow(2,t)),Sg=(t,e,n)=>{const i=JSON.parse(t.data);switch(i.Type){case"EVENT":e==null||e(i);break;case"MESSAGE":n==null||n(i);break;case"ERROR":te.error("Chat room error:",i);break;default:te.error("Unknown chat room event:",t)}},Xl=t=>{const{onMessage:e,eventId:n,enabled:i=!0,userName:r,onEvent:s}=t,{token:a,getQuery:o}=Ql({eventId:n,userName:r,enabled:i}),[l,u]=Ci(ki),[c,d]=Ci(yi),[f,v]=Ci(dn),g=M.useRef(0),m=M.useCallback(b=>te.error("Chat room socket error:",b),[]),p=M.useCallback(()=>{d(!0),g.current=0,te.debug("Successfully connected to the chat room")},[d]),h=M.useCallback(()=>{if(g.current>=_g){te.error("Max reconnection attempts reached. No further attempts will be made.");return}d(!1),g.current+=1;const b=bg(g.current);te.debug(`Disconnected from chat room. Reconnecting in ${b/1e3} seconds... (Attempt ${g.current})`),setTimeout(()=>o.refetch(),b)},[o,d]),_=M.useCallback(()=>{if(!a){te.debug("No token available. Connection aborted.");return}if((l==null?void 0:l.readyState)===WebSocket.OPEN){te.debug("WebSocket is already open. No need to reconnect.");return}te.debug("Connecting to the chat room...");const b=Jl({token:a,url:yg,onOpen:p,onClose:h,onError:m,onMessage:E=>Sg(E,s,e)});u(b)},[a,l,s,e,p,h,m,u]),N=M.useCallback(()=>{if(!l||l.readyState!==WebSocket.OPEN){te.debug("No open socket to close.");return}te.debug("Closing chat room socket..."),l.close()},[l]);return M.useEffect(()=>{if(!i){te.debug("Chat is disabled, skipping connection.");return}if(!a){te.debug("Token not available, skipping connection.");return}return te.debug("Initializing connection with token:",a),N(),_(),N},[a,i]),{socket:l,chatIsConnected:c,chatMessageList:f,setChatMessageList:v}},Ng=()=>{const t=Zi(ki),e=Zi(yi);return{sendMessage:M.useCallback((i,r)=>{if(!t||!e)return;const s={id:r.id,sendDate:new Date,content:i,action:"SEND_MESSAGE",attributes:r},a=JSON.stringify(s);t.send(a)},[e,t])}},Zl=()=>{const t=xr(dn);return{handleEvent:i=>{var r;if(i.EventName==="senddeletemessage"){const s=JSON.parse((r=i.Attributes)==null?void 0:r.data);t(a=>a.filter(o=>o.id!==s.id))}},handleMessage:i=>{t(r=>[...r,Qr(r,i)])}}},Eg=t=>{const{eventId:e,userName:n}=t,[i,r]=M.useState(!1),[s,a]=M.useState(),[o,l]=M.useState(),[u,c]=M.useState([]),{handleEvent:d}=Zl(),f=xr(dn),v=_=>{f(N=>[Qr(N,_),...N]),r(!1)},g=_=>{var N,b,E;if(d(_),_.EventName==="sendpinmessage"){const O=JSON.parse((N=_.Attributes)==null?void 0:N.data);a({data:O.data,id:O.id,username:O.username})}if(_.EventName==="sendunpinmessage"&&a(void 0),_.EventName==="sendhighlightproduct"){const O=JSON.parse((b=_.Attributes)==null?void 0:b.data);l({products:O.productIds,collection:O.collection,livestreamingId:O.idEvent})}if(_.EventName==="sendaddtocart"){const O=JSON.parse((E=_.Attributes)==null?void 0:E.data);c(x=>[...x,{id:O.id,sessionId:O.sessionId,productId:O.productId,productImageUrl:O.productImageUrl,productName:O.productName}])}},{socket:m,chatMessageList:p,setChatMessageList:h}=Xl({onMessage:v,onEvent:g,eventId:e,userName:n});return{socket:m,chat:p,showLoader:i,pinnedMessage:s,highlightProduct:o,productsInCart:u,setChat:h,setShowLoader:r,setPinnedMessage:a,setProductsInCart:c}};/**
81
81
  * @license
82
82
  * Copyright 2019 Google LLC
83
83
  * SPDX-License-Identifier: BSD-3-Clause
@@ -85,17 +85,17 @@ spurious results.`)}}return!1};class Hl{constructor(e,n="GraphQL request",i={lin
85
85
  * @license
86
86
  * Copyright 2017 Google LLC
87
87
  * SPDX-License-Identifier: BSD-3-Clause
88
- */const{is:Tg,defineProperty:Cg,getOwnPropertyDescriptor:xg,getOwnPropertyNames:Rg,getOwnPropertySymbols:Fg,getPrototypeOf:Dg}=Object,Be=globalThis,ua=Be.trustedTypes,Ig=ua?ua.emptyScript:"",Gi=Be.reactiveElementPolyfillSupport,qt=(t,e)=>t,Cr={toAttribute(t,e){switch(e){case Boolean:t=t?Ig:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=t!==null;break;case Number:n=t===null?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch{n=null}}return n}},tu=(t,e)=>!Tg(t,e),ca={attribute:!0,type:String,converter:Cr,reflect:!1,hasChanged:tu};var ya,_a;(ya=Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(_a=Be.litPropertyMetadata)!=null||(Be.litPropertyMetadata=new WeakMap);class gt extends HTMLElement{static addInitializer(e){var n;this._$Ei(),((n=this.l)!=null?n:this.l=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,n=ca){if(n.state&&(n.attribute=!1),this._$Ei(),this.elementProperties.set(e,n),!n.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(e,i,n);r!==void 0&&Cg(this.prototype,e,r)}}static getPropertyDescriptor(e,n,i){var a;const{get:r,set:s}=(a=xg(this.prototype,e))!=null?a:{get(){return this[n]},set(o){this[n]=o}};return{get(){return r==null?void 0:r.call(this)},set(o){const l=r==null?void 0:r.call(this);s.call(this,o),this.requestUpdate(e,l,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){var n;return(n=this.elementProperties.get(e))!=null?n:ca}static _$Ei(){if(this.hasOwnProperty(qt("elementProperties")))return;const e=Dg(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(qt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(qt("properties"))){const n=this.properties,i=[...Rg(n),...Fg(n)];for(const r of i)this.createProperty(r,n[r])}const e=this[Symbol.metadata];if(e!==null){const n=litPropertyMetadata.get(e);if(n!==void 0)for(const[i,r]of n)this.elementProperties.set(i,r)}this._$Eh=new Map;for(const[n,i]of this.elementProperties){const r=this._$Eu(n,i);r!==void 0&&this._$Eh.set(r,n)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const n=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const r of i)n.unshift(la(r))}else e!==void 0&&n.push(la(e));return n}static _$Eu(e,n){const i=n.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(n=>this.enableUpdating=n),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(n=>n(this))}addController(e){var n,i;((n=this._$EO)!=null?n:this._$EO=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&((i=e.hostConnected)==null||i.call(e))}removeController(e){var n;(n=this._$EO)==null||n.delete(e)}_$E_(){const e=new Map,n=this.constructor.elementProperties;for(const i of n.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){var n;const e=(n=this.shadowRoot)!=null?n:this.attachShadow(this.constructor.shadowRootOptions);return wg(e,this.constructor.elementStyles),e}connectedCallback(){var e,n;(e=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(n=this._$EO)==null||n.forEach(i=>{var r;return(r=i.hostConnected)==null?void 0:r.call(i)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(n=>{var i;return(i=n.hostDisconnected)==null?void 0:i.call(n)})}attributeChangedCallback(e,n,i){this._$AK(e,i)}_$EC(e,n){var s;const i=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,i);if(r!==void 0&&i.reflect===!0){const a=(((s=i.converter)==null?void 0:s.toAttribute)!==void 0?i.converter:Cr).toAttribute(n,i.type);this._$Em=e,a==null?this.removeAttribute(r):this.setAttribute(r,a),this._$Em=null}}_$AK(e,n){var s;const i=this.constructor,r=i._$Eh.get(e);if(r!==void 0&&this._$Em!==r){const a=i.getPropertyOptions(r),o=typeof a.converter=="function"?{fromAttribute:a.converter}:((s=a.converter)==null?void 0:s.fromAttribute)!==void 0?a.converter:Cr;this._$Em=r,this[r]=o.fromAttribute(n,a.type),this._$Em=null}}requestUpdate(e,n,i){var r;if(e!==void 0){if(i!=null||(i=this.constructor.getPropertyOptions(e)),!((r=i.hasChanged)!=null?r:tu)(this[e],n))return;this.P(e,n,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,n,i){var r;this._$AL.has(e)||this._$AL.set(e,n),i.reflect===!0&&this._$Em!==e&&((r=this._$Ej)!=null?r:this._$Ej=new Set).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(n){Promise.reject(n)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i,r;if(!this.isUpdatePending)return;if(!this.hasUpdated){if((i=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[a,o]of this._$Ep)this[a]=o;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[a,o]of s)o.wrapped!==!0||this._$AL.has(a)||this[a]===void 0||this.P(a,this[a],o)}let e=!1;const n=this._$AL;try{e=this.shouldUpdate(n),e?(this.willUpdate(n),(r=this._$EO)==null||r.forEach(s=>{var a;return(a=s.hostUpdate)==null?void 0:a.call(s)}),this.update(n)):this._$EU()}catch(s){throw e=!1,this._$EU(),s}e&&this._$AE(n)}willUpdate(e){}_$AE(e){var n;(n=this._$EO)==null||n.forEach(i=>{var r;return(r=i.hostUpdated)==null?void 0:r.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&(this._$Ej=this._$Ej.forEach(n=>this._$EC(n,this[n]))),this._$EU()}updated(e){}firstUpdated(e){}}var ba;gt.elementStyles=[],gt.shadowRootOptions={mode:"open"},gt[qt("elementProperties")]=new Map,gt[qt("finalized")]=new Map,Gi==null||Gi({ReactiveElement:gt}),((ba=Be.reactiveElementVersions)!=null?ba:Be.reactiveElementVersions=[]).push("2.0.4");/**
88
+ */const{is:Tg,defineProperty:Cg,getOwnPropertyDescriptor:xg,getOwnPropertyNames:Rg,getOwnPropertySymbols:Fg,getPrototypeOf:Dg}=Object,Be=globalThis,ua=Be.trustedTypes,Ig=ua?ua.emptyScript:"",Gi=Be.reactiveElementPolyfillSupport,zt=(t,e)=>t,Cr={toAttribute(t,e){switch(e){case Boolean:t=t?Ig:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=t!==null;break;case Number:n=t===null?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch{n=null}}return n}},tu=(t,e)=>!Tg(t,e),ca={attribute:!0,type:String,converter:Cr,reflect:!1,hasChanged:tu};var ya,_a;(ya=Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(_a=Be.litPropertyMetadata)!=null||(Be.litPropertyMetadata=new WeakMap);class gt extends HTMLElement{static addInitializer(e){var n;this._$Ei(),((n=this.l)!=null?n:this.l=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,n=ca){if(n.state&&(n.attribute=!1),this._$Ei(),this.elementProperties.set(e,n),!n.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(e,i,n);r!==void 0&&Cg(this.prototype,e,r)}}static getPropertyDescriptor(e,n,i){var a;const{get:r,set:s}=(a=xg(this.prototype,e))!=null?a:{get(){return this[n]},set(o){this[n]=o}};return{get(){return r==null?void 0:r.call(this)},set(o){const l=r==null?void 0:r.call(this);s.call(this,o),this.requestUpdate(e,l,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){var n;return(n=this.elementProperties.get(e))!=null?n:ca}static _$Ei(){if(this.hasOwnProperty(zt("elementProperties")))return;const e=Dg(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(zt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(zt("properties"))){const n=this.properties,i=[...Rg(n),...Fg(n)];for(const r of i)this.createProperty(r,n[r])}const e=this[Symbol.metadata];if(e!==null){const n=litPropertyMetadata.get(e);if(n!==void 0)for(const[i,r]of n)this.elementProperties.set(i,r)}this._$Eh=new Map;for(const[n,i]of this.elementProperties){const r=this._$Eu(n,i);r!==void 0&&this._$Eh.set(r,n)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const n=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const r of i)n.unshift(la(r))}else e!==void 0&&n.push(la(e));return n}static _$Eu(e,n){const i=n.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(n=>this.enableUpdating=n),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(n=>n(this))}addController(e){var n,i;((n=this._$EO)!=null?n:this._$EO=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&((i=e.hostConnected)==null||i.call(e))}removeController(e){var n;(n=this._$EO)==null||n.delete(e)}_$E_(){const e=new Map,n=this.constructor.elementProperties;for(const i of n.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){var n;const e=(n=this.shadowRoot)!=null?n:this.attachShadow(this.constructor.shadowRootOptions);return wg(e,this.constructor.elementStyles),e}connectedCallback(){var e,n;(e=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(n=this._$EO)==null||n.forEach(i=>{var r;return(r=i.hostConnected)==null?void 0:r.call(i)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(n=>{var i;return(i=n.hostDisconnected)==null?void 0:i.call(n)})}attributeChangedCallback(e,n,i){this._$AK(e,i)}_$EC(e,n){var s;const i=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,i);if(r!==void 0&&i.reflect===!0){const a=(((s=i.converter)==null?void 0:s.toAttribute)!==void 0?i.converter:Cr).toAttribute(n,i.type);this._$Em=e,a==null?this.removeAttribute(r):this.setAttribute(r,a),this._$Em=null}}_$AK(e,n){var s;const i=this.constructor,r=i._$Eh.get(e);if(r!==void 0&&this._$Em!==r){const a=i.getPropertyOptions(r),o=typeof a.converter=="function"?{fromAttribute:a.converter}:((s=a.converter)==null?void 0:s.fromAttribute)!==void 0?a.converter:Cr;this._$Em=r,this[r]=o.fromAttribute(n,a.type),this._$Em=null}}requestUpdate(e,n,i){var r;if(e!==void 0){if(i!=null||(i=this.constructor.getPropertyOptions(e)),!((r=i.hasChanged)!=null?r:tu)(this[e],n))return;this.P(e,n,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,n,i){var r;this._$AL.has(e)||this._$AL.set(e,n),i.reflect===!0&&this._$Em!==e&&((r=this._$Ej)!=null?r:this._$Ej=new Set).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(n){Promise.reject(n)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i,r;if(!this.isUpdatePending)return;if(!this.hasUpdated){if((i=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[a,o]of this._$Ep)this[a]=o;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[a,o]of s)o.wrapped!==!0||this._$AL.has(a)||this[a]===void 0||this.P(a,this[a],o)}let e=!1;const n=this._$AL;try{e=this.shouldUpdate(n),e?(this.willUpdate(n),(r=this._$EO)==null||r.forEach(s=>{var a;return(a=s.hostUpdate)==null?void 0:a.call(s)}),this.update(n)):this._$EU()}catch(s){throw e=!1,this._$EU(),s}e&&this._$AE(n)}willUpdate(e){}_$AE(e){var n;(n=this._$EO)==null||n.forEach(i=>{var r;return(r=i.hostUpdated)==null?void 0:r.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&(this._$Ej=this._$Ej.forEach(n=>this._$EC(n,this[n]))),this._$EU()}updated(e){}firstUpdated(e){}}var ba;gt.elementStyles=[],gt.shadowRootOptions={mode:"open"},gt[zt("elementProperties")]=new Map,gt[zt("finalized")]=new Map,Gi==null||Gi({ReactiveElement:gt}),((ba=Be.reactiveElementVersions)!=null?ba:Be.reactiveElementVersions=[]).push("2.0.4");/**
89
89
  * @license
90
90
  * Copyright 2017 Google LLC
91
91
  * SPDX-License-Identifier: BSD-3-Clause
92
- */const zt=globalThis,Gn=zt.trustedTypes,da=Gn?Gn.createPolicy("lit-html",{createHTML:t=>t}):void 0,nu="$lit$",Me=`lit$${Math.random().toFixed(9).slice(2)}$`,iu="?"+Me,Pg=`<${iu}>`,it=document,en=()=>it.createComment(""),tn=t=>t===null||typeof t!="object"&&typeof t!="function",es=Array.isArray,Lg=t=>es(t)||typeof(t==null?void 0:t[Symbol.iterator])=="function",Ki=`[
92
+ */const qt=globalThis,Gn=qt.trustedTypes,da=Gn?Gn.createPolicy("lit-html",{createHTML:t=>t}):void 0,nu="$lit$",Me=`lit$${Math.random().toFixed(9).slice(2)}$`,iu="?"+Me,Pg=`<${iu}>`,it=document,en=()=>it.createComment(""),tn=t=>t===null||typeof t!="object"&&typeof t!="function",es=Array.isArray,Lg=t=>es(t)||typeof(t==null?void 0:t[Symbol.iterator])=="function",Ki=`[
93
93
  \f\r]`,Mt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,fa=/-->/g,ha=/>/g,We=RegExp(`>|${Ki}(?:([^\\s"'>=/]+)(${Ki}*=${Ki}*(?:[^
94
- \f\r"'\`<>=]|("|')|))|$)`,"g"),pa=/'/g,ma=/"/g,ru=/^(?:script|style|textarea|title)$/i,$g=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),Mg=$g(1),Nt=Symbol.for("lit-noChange"),Y=Symbol.for("lit-nothing"),ga=new WeakMap,Ye=it.createTreeWalker(it,129);function su(t,e){if(!es(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return da!==void 0?da.createHTML(e):e}const Ug=(t,e)=>{const n=t.length-1,i=[];let r,s=e===2?"<svg>":e===3?"<math>":"",a=Mt;for(let o=0;o<n;o++){const l=t[o];let u,c,d=-1,f=0;for(;f<l.length&&(a.lastIndex=f,c=a.exec(l),c!==null);)f=a.lastIndex,a===Mt?c[1]==="!--"?a=fa:c[1]!==void 0?a=ha:c[2]!==void 0?(ru.test(c[2])&&(r=RegExp("</"+c[2],"g")),a=We):c[3]!==void 0&&(a=We):a===We?c[0]===">"?(a=r!=null?r:Mt,d=-1):c[1]===void 0?d=-2:(d=a.lastIndex-c[2].length,u=c[1],a=c[3]===void 0?We:c[3]==='"'?ma:pa):a===ma||a===pa?a=We:a===fa||a===ha?a=Mt:(a=We,r=void 0);const v=a===We&&t[o+1].startsWith("/>")?" ":"";s+=a===Mt?l+Pg:d>=0?(i.push(u),l.slice(0,d)+nu+l.slice(d)+Me+v):l+Me+(d===-2?o:v)}return[su(t,s+(t[n]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]};class nn{constructor({strings:e,_$litType$:n},i){let r;this.parts=[];let s=0,a=0;const o=e.length-1,l=this.parts,[u,c]=Ug(e,n);if(this.el=nn.createElement(u,i),Ye.currentNode=this.el.content,n===2||n===3){const d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(r=Ye.nextNode())!==null&&l.length<o;){if(r.nodeType===1){if(r.hasAttributes())for(const d of r.getAttributeNames())if(d.endsWith(nu)){const f=c[a++],v=r.getAttribute(d).split(Me),g=/([.?@])?(.*)/.exec(f);l.push({type:1,index:s,name:g[2],strings:v,ctor:g[1]==="."?jg:g[1]==="?"?Bg:g[1]==="@"?Hg:_i}),r.removeAttribute(d)}else d.startsWith(Me)&&(l.push({type:6,index:s}),r.removeAttribute(d));if(ru.test(r.tagName)){const d=r.textContent.split(Me),f=d.length-1;if(f>0){r.textContent=Gn?Gn.emptyScript:"";for(let v=0;v<f;v++)r.append(d[v],en()),Ye.nextNode(),l.push({type:2,index:++s});r.append(d[f],en())}}}else if(r.nodeType===8)if(r.data===iu)l.push({type:2,index:s});else{let d=-1;for(;(d=r.data.indexOf(Me,d+1))!==-1;)l.push({type:7,index:s}),d+=Me.length-1}s++}}static createElement(e,n){const i=it.createElement("template");return i.innerHTML=e,i}}function Et(t,e,n=t,i){var a,o,l;if(e===Nt)return e;let r=i!==void 0?(a=n.o)==null?void 0:a[i]:n.l;const s=tn(e)?void 0:e._$litDirective$;return(r==null?void 0:r.constructor)!==s&&((o=r==null?void 0:r._$AO)==null||o.call(r,!1),s===void 0?r=void 0:(r=new s(t),r._$AT(t,n,i)),i!==void 0?((l=n.o)!=null?l:n.o=[])[i]=r:n.l=r),r!==void 0&&(e=Et(t,r._$AS(t,e.values),r,i)),e}class Vg{constructor(e,n){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var u;const{el:{content:n},parts:i}=this._$AD,r=((u=e==null?void 0:e.creationScope)!=null?u:it).importNode(n,!0);Ye.currentNode=r;let s=Ye.nextNode(),a=0,o=0,l=i[0];for(;l!==void 0;){if(a===l.index){let c;l.type===2?c=new fn(s,s.nextSibling,this,e):l.type===1?c=new l.ctor(s,l.name,l.strings,this,e):l.type===6&&(c=new qg(s,this,e)),this._$AV.push(c),l=i[++o]}a!==(l==null?void 0:l.index)&&(s=Ye.nextNode(),a++)}return Ye.currentNode=it,r}p(e){let n=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,n),n+=i.strings.length-2):i._$AI(e[n])),n++}}class fn{get _$AU(){var e,n;return(n=(e=this._$AM)==null?void 0:e._$AU)!=null?n:this.v}constructor(e,n,i,r){var s;this.type=2,this._$AH=Y,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=i,this.options=r,this.v=(s=r==null?void 0:r.isConnected)!=null?s:!0}get parentNode(){let e=this._$AA.parentNode;const n=this._$AM;return n!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=n.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,n=this){e=Et(this,e,n),tn(e)?e===Y||e==null||e===""?(this._$AH!==Y&&this._$AR(),this._$AH=Y):e!==this._$AH&&e!==Nt&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Lg(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==Y&&tn(this._$AH)?this._$AA.nextSibling.data=e:this.T(it.createTextNode(e)),this._$AH=e}$(e){var s;const{values:n,_$litType$:i}=e,r=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=nn.createElement(su(i.h,i.h[0]),this.options)),i);if(((s=this._$AH)==null?void 0:s._$AD)===r)this._$AH.p(n);else{const a=new Vg(r,this),o=a.u(this.options);a.p(n),this.T(o),this._$AH=a}}_$AC(e){let n=ga.get(e.strings);return n===void 0&&ga.set(e.strings,n=new nn(e)),n}k(e){es(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let i,r=0;for(const s of e)r===n.length?n.push(i=new fn(this.O(en()),this.O(en()),this,this.options)):i=n[r],i._$AI(s),r++;r<n.length&&(this._$AR(i&&i._$AB.nextSibling,r),n.length=r)}_$AR(e=this._$AA.nextSibling,n){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,n);e&&e!==this._$AB;){const r=e.nextSibling;e.remove(),e=r}}setConnected(e){var n;this._$AM===void 0&&(this.v=e,(n=this._$AP)==null||n.call(this,e))}}class _i{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,n,i,r,s){this.type=1,this._$AH=Y,this._$AN=void 0,this.element=e,this.name=n,this._$AM=r,this.options=s,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Y}_$AI(e,n=this,i,r){const s=this.strings;let a=!1;if(s===void 0)e=Et(this,e,n,0),a=!tn(e)||e!==this._$AH&&e!==Nt,a&&(this._$AH=e);else{const o=e;let l,u;for(e=s[0],l=0;l<s.length-1;l++)u=Et(this,o[i+l],n,l),u===Nt&&(u=this._$AH[l]),a||(a=!tn(u)||u!==this._$AH[l]),u===Y?e=Y:e!==Y&&(e+=(u!=null?u:"")+s[l+1]),this._$AH[l]=u}a&&!r&&this.j(e)}j(e){e===Y?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e!=null?e:"")}}class jg extends _i{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Y?void 0:e}}class Bg extends _i{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==Y)}}class Hg extends _i{constructor(e,n,i,r,s){super(e,n,i,r,s),this.type=5}_$AI(e,n=this){var a;if((e=(a=Et(this,e,n,0))!=null?a:Y)===Nt)return;const i=this._$AH,r=e===Y&&i!==Y||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,s=e!==Y&&(i===Y||r);r&&this.element.removeEventListener(this.name,this,i),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var n,i;typeof this._$AH=="function"?this._$AH.call((i=(n=this.options)==null?void 0:n.host)!=null?i:this.element,e):this._$AH.handleEvent(e)}}class qg{constructor(e,n,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){Et(this,e)}}const Wi=zt.litHtmlPolyfillSupport;var Sa;Wi==null||Wi(nn,fn),((Sa=zt.litHtmlVersions)!=null?Sa:zt.litHtmlVersions=[]).push("3.2.0");const zg=(t,e,n)=>{var s,a;const i=(s=n==null?void 0:n.renderBefore)!=null?s:e;let r=i._$litPart$;if(r===void 0){const o=(a=n==null?void 0:n.renderBefore)!=null?a:null;i._$litPart$=r=new fn(e.insertBefore(en(),o),o,void 0,n!=null?n:{})}return r._$AI(t),r};/**
94
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),pa=/'/g,ma=/"/g,ru=/^(?:script|style|textarea|title)$/i,$g=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),Mg=$g(1),Nt=Symbol.for("lit-noChange"),Y=Symbol.for("lit-nothing"),ga=new WeakMap,Ye=it.createTreeWalker(it,129);function su(t,e){if(!es(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return da!==void 0?da.createHTML(e):e}const Ug=(t,e)=>{const n=t.length-1,i=[];let r,s=e===2?"<svg>":e===3?"<math>":"",a=Mt;for(let o=0;o<n;o++){const l=t[o];let u,c,d=-1,f=0;for(;f<l.length&&(a.lastIndex=f,c=a.exec(l),c!==null);)f=a.lastIndex,a===Mt?c[1]==="!--"?a=fa:c[1]!==void 0?a=ha:c[2]!==void 0?(ru.test(c[2])&&(r=RegExp("</"+c[2],"g")),a=We):c[3]!==void 0&&(a=We):a===We?c[0]===">"?(a=r!=null?r:Mt,d=-1):c[1]===void 0?d=-2:(d=a.lastIndex-c[2].length,u=c[1],a=c[3]===void 0?We:c[3]==='"'?ma:pa):a===ma||a===pa?a=We:a===fa||a===ha?a=Mt:(a=We,r=void 0);const v=a===We&&t[o+1].startsWith("/>")?" ":"";s+=a===Mt?l+Pg:d>=0?(i.push(u),l.slice(0,d)+nu+l.slice(d)+Me+v):l+Me+(d===-2?o:v)}return[su(t,s+(t[n]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]};class nn{constructor({strings:e,_$litType$:n},i){let r;this.parts=[];let s=0,a=0;const o=e.length-1,l=this.parts,[u,c]=Ug(e,n);if(this.el=nn.createElement(u,i),Ye.currentNode=this.el.content,n===2||n===3){const d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(r=Ye.nextNode())!==null&&l.length<o;){if(r.nodeType===1){if(r.hasAttributes())for(const d of r.getAttributeNames())if(d.endsWith(nu)){const f=c[a++],v=r.getAttribute(d).split(Me),g=/([.?@])?(.*)/.exec(f);l.push({type:1,index:s,name:g[2],strings:v,ctor:g[1]==="."?jg:g[1]==="?"?Bg:g[1]==="@"?Hg:_i}),r.removeAttribute(d)}else d.startsWith(Me)&&(l.push({type:6,index:s}),r.removeAttribute(d));if(ru.test(r.tagName)){const d=r.textContent.split(Me),f=d.length-1;if(f>0){r.textContent=Gn?Gn.emptyScript:"";for(let v=0;v<f;v++)r.append(d[v],en()),Ye.nextNode(),l.push({type:2,index:++s});r.append(d[f],en())}}}else if(r.nodeType===8)if(r.data===iu)l.push({type:2,index:s});else{let d=-1;for(;(d=r.data.indexOf(Me,d+1))!==-1;)l.push({type:7,index:s}),d+=Me.length-1}s++}}static createElement(e,n){const i=it.createElement("template");return i.innerHTML=e,i}}function Et(t,e,n=t,i){var a,o,l;if(e===Nt)return e;let r=i!==void 0?(a=n.o)==null?void 0:a[i]:n.l;const s=tn(e)?void 0:e._$litDirective$;return(r==null?void 0:r.constructor)!==s&&((o=r==null?void 0:r._$AO)==null||o.call(r,!1),s===void 0?r=void 0:(r=new s(t),r._$AT(t,n,i)),i!==void 0?((l=n.o)!=null?l:n.o=[])[i]=r:n.l=r),r!==void 0&&(e=Et(t,r._$AS(t,e.values),r,i)),e}class Vg{constructor(e,n){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var u;const{el:{content:n},parts:i}=this._$AD,r=((u=e==null?void 0:e.creationScope)!=null?u:it).importNode(n,!0);Ye.currentNode=r;let s=Ye.nextNode(),a=0,o=0,l=i[0];for(;l!==void 0;){if(a===l.index){let c;l.type===2?c=new fn(s,s.nextSibling,this,e):l.type===1?c=new l.ctor(s,l.name,l.strings,this,e):l.type===6&&(c=new zg(s,this,e)),this._$AV.push(c),l=i[++o]}a!==(l==null?void 0:l.index)&&(s=Ye.nextNode(),a++)}return Ye.currentNode=it,r}p(e){let n=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,n),n+=i.strings.length-2):i._$AI(e[n])),n++}}class fn{get _$AU(){var e,n;return(n=(e=this._$AM)==null?void 0:e._$AU)!=null?n:this.v}constructor(e,n,i,r){var s;this.type=2,this._$AH=Y,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=i,this.options=r,this.v=(s=r==null?void 0:r.isConnected)!=null?s:!0}get parentNode(){let e=this._$AA.parentNode;const n=this._$AM;return n!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=n.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,n=this){e=Et(this,e,n),tn(e)?e===Y||e==null||e===""?(this._$AH!==Y&&this._$AR(),this._$AH=Y):e!==this._$AH&&e!==Nt&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Lg(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==Y&&tn(this._$AH)?this._$AA.nextSibling.data=e:this.T(it.createTextNode(e)),this._$AH=e}$(e){var s;const{values:n,_$litType$:i}=e,r=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=nn.createElement(su(i.h,i.h[0]),this.options)),i);if(((s=this._$AH)==null?void 0:s._$AD)===r)this._$AH.p(n);else{const a=new Vg(r,this),o=a.u(this.options);a.p(n),this.T(o),this._$AH=a}}_$AC(e){let n=ga.get(e.strings);return n===void 0&&ga.set(e.strings,n=new nn(e)),n}k(e){es(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let i,r=0;for(const s of e)r===n.length?n.push(i=new fn(this.O(en()),this.O(en()),this,this.options)):i=n[r],i._$AI(s),r++;r<n.length&&(this._$AR(i&&i._$AB.nextSibling,r),n.length=r)}_$AR(e=this._$AA.nextSibling,n){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,n);e&&e!==this._$AB;){const r=e.nextSibling;e.remove(),e=r}}setConnected(e){var n;this._$AM===void 0&&(this.v=e,(n=this._$AP)==null||n.call(this,e))}}class _i{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,n,i,r,s){this.type=1,this._$AH=Y,this._$AN=void 0,this.element=e,this.name=n,this._$AM=r,this.options=s,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Y}_$AI(e,n=this,i,r){const s=this.strings;let a=!1;if(s===void 0)e=Et(this,e,n,0),a=!tn(e)||e!==this._$AH&&e!==Nt,a&&(this._$AH=e);else{const o=e;let l,u;for(e=s[0],l=0;l<s.length-1;l++)u=Et(this,o[i+l],n,l),u===Nt&&(u=this._$AH[l]),a||(a=!tn(u)||u!==this._$AH[l]),u===Y?e=Y:e!==Y&&(e+=(u!=null?u:"")+s[l+1]),this._$AH[l]=u}a&&!r&&this.j(e)}j(e){e===Y?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e!=null?e:"")}}class jg extends _i{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Y?void 0:e}}class Bg extends _i{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==Y)}}class Hg extends _i{constructor(e,n,i,r,s){super(e,n,i,r,s),this.type=5}_$AI(e,n=this){var a;if((e=(a=Et(this,e,n,0))!=null?a:Y)===Nt)return;const i=this._$AH,r=e===Y&&i!==Y||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,s=e!==Y&&(i===Y||r);r&&this.element.removeEventListener(this.name,this,i),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var n,i;typeof this._$AH=="function"?this._$AH.call((i=(n=this.options)==null?void 0:n.host)!=null?i:this.element,e):this._$AH.handleEvent(e)}}class zg{constructor(e,n,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){Et(this,e)}}const Wi=qt.litHtmlPolyfillSupport;var Sa;Wi==null||Wi(nn,fn),((Sa=qt.litHtmlVersions)!=null?Sa:qt.litHtmlVersions=[]).push("3.2.0");const qg=(t,e,n)=>{var s,a;const i=(s=n==null?void 0:n.renderBefore)!=null?s:e;let r=i._$litPart$;if(r===void 0){const o=(a=n==null?void 0:n.renderBefore)!=null?a:null;i._$litPart$=r=new fn(e.insertBefore(en(),o),o,void 0,n!=null?n:{})}return r._$AI(t),r};/**
95
95
  * @license
96
96
  * Copyright 2017 Google LLC
97
97
  * SPDX-License-Identifier: BSD-3-Clause
98
- */class Gt extends gt{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){var n,i;const e=super.createRenderRoot();return(i=(n=this.renderOptions).renderBefore)!=null||(n.renderBefore=e.firstChild),e}update(e){const n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this.o=zg(n,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this.o)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.o)==null||e.setConnected(!1)}render(){return Nt}}var Na;Gt._$litElement$=!0,Gt.finalized=!0,(Na=globalThis.litElementHydrateSupport)==null||Na.call(globalThis,{LitElement:Gt});const Ji=globalThis.litElementPolyfillSupport;Ji==null||Ji({LitElement:Gt});var Ea;((Ea=globalThis.litElementVersions)!=null?Ea:globalThis.litElementVersions=[]).push("4.1.0");/**
98
+ */class Gt extends gt{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){var n,i;const e=super.createRenderRoot();return(i=(n=this.renderOptions).renderBefore)!=null||(n.renderBefore=e.firstChild),e}update(e){const n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this.o=qg(n,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this.o)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.o)==null||e.setConnected(!1)}render(){return Nt}}var Na;Gt._$litElement$=!0,Gt.finalized=!0,(Na=globalThis.litElementHydrateSupport)==null||Na.call(globalThis,{LitElement:Gt});const Ji=globalThis.litElementPolyfillSupport;Ji==null||Ji({LitElement:Gt});var Ea;((Ea=globalThis.litElementVersions)!=null?Ea:globalThis.litElementVersions=[]).push("4.1.0");/**
99
99
  * @license
100
100
  * Copyright 2020 Google LLC
101
101
  * SPDX-License-Identifier: BSD-3-Clause
@@ -115,5 +115,5 @@ spurious results.`)}}return!1};class Hl{constructor(e,n="GraphQL request",i={lin
115
115
  :host {
116
116
  width: 100%;
117
117
  }
118
- `);class uu{constructor(e,n,i){F(this,"renderFn");F(this,"logger");F(this,"rootId");F(this,"element",null);F(this,"unmount");F(this,"updateProps");this.rootId=e,this.renderFn=n,this.logger=i}async render(e={}){var n;if(this.element)this.updateProps(e);else{const i=await this.renderFn(this.rootId,e);this.element=(n=i==null?void 0:i.element)!=null?n:null,this.updateProps=r=>i==null?void 0:i.updateProps(r),this.unmount=()=>{i==null||i.unmount(),this.element=null}}}}class bi{constructor(e){this.config=e}static isApplicable(e){return Br.LOCAL===e.bundler.stage}async execute(){var n;const{runtime:e}=this.config;(n=e.env)!=null&&n.account?await e.configureStore(e.env):e.logger.warn("missing account in local environment")}}F(bi,"type",Pe.Local);const iv=window==null?void 0:window.__NZ_APP__;class ts{constructor(e){this.config=e}static isApplicable(){return iv==="platform"}async execute(){}}F(ts,"type",Pe.Platform);const kn=window==null?void 0:window.faststore_sdk_stores;class ns{constructor(e){this.config=e;const n={vtexfaststore:kn};this.config.runtime.updateMeta(n)}static isApplicable(){return!!kn}async execute(){const{runtime:e}=this.config;if(!kn.account){e.logger.error("missing the account in window.faststore_sdk_stores");return}await e.configureStore({account:kn.account})}}F(ns,"type",Pe.VtexFastStore);const yn=window==null?void 0:window.__RUNTIME__;class Si{constructor(e){this.config=e;const n={vtexio:yn};this.config.runtime.updateMeta(n)}static isApplicable(){return!!yn}async execute(){const{runtime:e}=this.config;if(!yn.account){e.logger.error("missing the account in window.__RUNTIME__");return}await e.configureStore({account:yn.account})}}F(Si,"type",Pe.VtexIO);const ka=window==null?void 0:window.vtexjs;class Ni{constructor(e){this.config=e;const n={vtexjs:ka};this.config.runtime.updateMeta(n)}static isApplicable(){return!!ka}async execute(){const{runtime:e}=this.config;let n={};const i=`${e.componentId.value}-script`,r=Oo(i);if(n=Object.fromEntries(r.entries()),!n.account){e.logger.error(`missing the account in the search params of the script #${i}`);return}await e.configureStore({account:n.account})}}F(Ni,"type",Pe.VtexLegacy);class is{constructor(e){this.config=e}static isApplicable(e){return!bi.isApplicable(e)&&!Si.isApplicable()&&!Ni.isApplicable()&&!ns.isApplicable()&&!ts.isApplicable()}async execute(){}}F(is,"type",Pe.External);const cu=[bi,Si,Ni,is,ns,ts];class rv{constructor(e){F(this,"globalId");F(this,"metadata");F(this,"customConfigList");F(this,"env");F(this,"bundler");F(this,"logger");F(this,"componentId");F(this,"renderHandler");F(this,"store");this.globalId=e.globalId,this.store=e.getStore(),this.logger=Ie.withPrefix(e.logger,"Runtime"),this.env=e.env,this.bundler=e.bundler,this.customConfigList=new Map,this.metadata={type:Pe.External},this.initializeGlobals()}config(e,n,i){typeof n=="function"&&(i=n,n={});const{skipBaseBehavior:r=!1}=n;return this.customConfigList.set(e,{callback:i,skipBaseBehavior:r}),this}registerComponent(e,n){const i=this.toCamel(e);if(window[this.globalId][i])return this.logger.debug(`Component "${i}" is already registered.`),this;this.componentId={value:e,formatted:i},this.renderHandler=n;const r={render:this.renderHandler};return window[this.globalId][this.componentId.formatted]=r,this.logger.debug(`Component "${i}" registered.`),this}async execute(e){for(const n of cu)if(n.isApplicable(this)){const i=new n({runtime:this}),r=this.customConfigList.get(n.type);this.updateMeta({type:n.type}),r!=null&&r.skipBaseBehavior||await i.execute(),r&&await r.callback({runtime:this,component:new uu(this.componentId.value,this.renderHandler,this.logger)});break}await(e==null?void 0:e())}updateMeta(e){this.metadata={...this.metadata,...e}}async configureStore(e){await this.store.configure(e)}get meta(){return this.metadata}initializeGlobals(){var i;if(window[this.globalId]||(window[this.globalId]={},this.logger.debug(`Initialized "${this.globalId}" window object`)),(i=window[this.globalId])!=null&&i.runtime){this.logger.debug(`Runtime for "${this.globalId}" are already initialized.`);return}const e=()=>Object.freeze({...this.metadata}),n=()=>Object.freeze({isProd:this.bundler.isProd,get meta(){return e()}});Object.defineProperty(window[this.globalId],"runtime",{get:()=>n()}),this.logger.debug(`Initialized runtime for "${this.globalId}".`)}toCamel(e){return e.replace(/^[a-z]{2}-/,"").replace(/-./g,n=>n[1].toUpperCase())}}exports.AccountContractStatusTypes=Io;exports.AccountContractTypes=Do;exports.AccountInvalidError=Ra;exports.AccountPlanDescriptionTypes=Lo;exports.AccountService=jo;exports.AccountSubscriptionTypes=Po;exports.AccountTypes=Fo;exports.AddToCartActionTypes=li;exports.AggregateRoot=tl;exports.ApiGraphqlTypes=Bf;exports.BroadcastChannelEventBus=Eo;exports.ComponentManager=uu;exports.CreatePlanError=Mo;exports.DomainError=rt;exports.ErrorCodes=ee;exports.EventBusWildcards=of;exports.EventChatRoom=vi;exports.EventChatRoomService=Kl;exports.EventChatRoomTokenError=zl;exports.EventNames=Go;exports.ExternalRuntime=is;exports.GlobalPageSectionTypes=$o;exports.GraphqlEventChatRoomRepository=Gl;exports.HttpAxiosClient=Wp;exports.InvalidNizzaGlobalObjectError=Fa;exports.LanguageTypes=Ko;exports.LocalRuntime=bi;exports.Logger=Ie;exports.MAX_PRODUCTS_IN_CART=lf;exports.NizzaEventStatus=zo;exports.NizzaProductRequestOriginTypes=Jo;exports.NizzaStore=$n;exports.NizzaVariationTypes=Wo;exports.ReactHostElement=lu;exports.ResourceNotFoundError=er;exports.RestAccountPlanRepository=Uo;exports.RestPublicAccountRepository=Vo;exports.Runtime=rv;exports.RuntimeStage=Br;exports.RuntimeType=Pe;exports.StoreProvider=$d;exports.UnexpectedError=Rr;exports.ValueObject=Jf;exports.VtexIORuntime=Si;exports.VtexLegacyRuntime=Ni;exports.accountAtom=xa;exports.accountService=Bo;exports.addQuestionData=Wl;exports.addToCartMessages=mr;exports.apiCall=Kd;exports.buildLanguageTranslations=xl;exports.buildTranslations=Rl;exports.chatIsConnectedAtom=yi;exports.chatMessageListAtom=dn;exports.chatSocketAtom=ki;exports.connectToSocket=Jl;exports.createActionFactory=el;exports.createAggregateRoot=nl;exports.createLazyLogger=Iu;exports.createStore=Hf;exports.customFetch=St;exports.downloadFile=Wd;exports.eventChatRoomService=Tr;exports.fileOrigin=Bd;exports.getAccount=qo;exports.getClientTimeZone=Qd;exports.getNizza=ut;exports.getRandomColor=Yl;exports.getScriptParams=Oo;exports.getStore=Ud;exports.getUserFriendlyMessage=Cl;exports.i18Init=Il;exports.jsDownload=Ro;exports.normalizeChatMessage=Qr;exports.registerTranslations=pm;exports.registerTranslationsOf=Fl;exports.runAddToCartHooks=zf;exports.runtimeList=cu;exports.searchParams=Ao;exports.shortId=Ln;exports.sleep=Hd;exports.useAccount=Ho;exports.useAutorun=Pd;exports.useChatSocketActions=Ng;exports.useChatSocketClient=Eg;exports.useChatSocketHandlers=Zl;exports.useConnectChatSocket=Xl;exports.useEventChatRoom=Ql;exports.useMetaDataClient=mm;exports.useNZ=Co;exports.useNizza=xo;exports.useReaction=Ld;exports.useSelect=No;exports.useStore=Md;exports.validateRequiredProps=Bu;
118
+ `);class uu{constructor(e,n,i){F(this,"renderFn");F(this,"logger");F(this,"rootId");F(this,"element",null);F(this,"unmount");F(this,"updateProps");this.rootId=e,this.renderFn=n,this.logger=i}async render(e={}){var n;if(this.element)this.updateProps(e);else{const i=await this.renderFn(this.rootId,e);this.element=(n=i==null?void 0:i.element)!=null?n:null,this.updateProps=r=>i==null?void 0:i.updateProps(r),this.unmount=()=>{i==null||i.unmount(),this.element=null}}}}class bi{constructor(e){this.config=e}static isApplicable(e){return Br.LOCAL===e.bundler.stage}async execute(){var n;const{runtime:e}=this.config;(n=e.env)!=null&&n.account?await e.configureStore(e.env):e.logger.warn("missing account in local environment")}}F(bi,"type",Pe.Local);const iv=window==null?void 0:window.__NZ_APP__;class ts{constructor(e){this.config=e}static isApplicable(){return iv==="platform"}async execute(){}}F(ts,"type",Pe.Platform);const kn=window==null?void 0:window.faststore_sdk_stores;class ns{constructor(e){this.config=e;const n={vtexfaststore:kn};this.config.runtime.updateMeta(n)}static isApplicable(){return!!kn}async execute(){const{runtime:e}=this.config;if(!kn.account){e.logger.error("missing the account in window.faststore_sdk_stores");return}await e.configureStore({account:kn.account})}}F(ns,"type",Pe.VtexFastStore);const yn=window==null?void 0:window.__RUNTIME__;class Si{constructor(e){this.config=e;const n={vtexio:yn};this.config.runtime.updateMeta(n)}static isApplicable(){return!!yn}async execute(){const{runtime:e}=this.config;if(!yn.account){e.logger.error("missing the account in window.__RUNTIME__");return}await e.configureStore({account:yn.account})}}F(Si,"type",Pe.VtexIO);const ka=window==null?void 0:window.vtexjs;class Ni{constructor(e){this.config=e;const n={vtexjs:ka};this.config.runtime.updateMeta(n)}static isApplicable(){return!!ka}async execute(){const{runtime:e}=this.config;let n={};const i=`${e.componentId.value}-script`,r=Oo(i);if(n=Object.fromEntries(r.entries()),!n.account){e.logger.error(`missing the account in the search params of the script #${i}`);return}await e.configureStore({account:n.account})}}F(Ni,"type",Pe.VtexLegacy);class is{constructor(e){this.config=e}static isApplicable(e){return!bi.isApplicable(e)&&!Si.isApplicable()&&!Ni.isApplicable()&&!ns.isApplicable()&&!ts.isApplicable()}async execute(){}}F(is,"type",Pe.External);const cu=[bi,Si,Ni,is,ns,ts];class rv{constructor(e){F(this,"globalId");F(this,"metadata");F(this,"customConfigList");F(this,"env");F(this,"bundler");F(this,"logger");F(this,"componentId");F(this,"renderHandler");F(this,"store");this.globalId=e.globalId,this.store=e.getStore(),this.logger=Ie.withPrefix(e.logger,"Runtime"),this.env=e.env,this.bundler=e.bundler,this.customConfigList=new Map,this.metadata={type:Pe.External},this.initializeGlobals()}config(e,n,i){typeof n=="function"&&(i=n,n={});const{skipBaseBehavior:r=!1}=n;return this.customConfigList.set(e,{callback:i,skipBaseBehavior:r}),this}registerComponent(e,n){const i=this.toCamel(e);if(window[this.globalId][i])return this.logger.debug(`Component "${i}" is already registered.`),this;this.componentId={value:e,formatted:i},this.renderHandler=n;const r={render:this.renderHandler};return window[this.globalId][this.componentId.formatted]=r,this.logger.debug(`Component "${i}" registered.`),this}async execute(e){for(const n of cu)if(n.isApplicable(this)){const i=new n({runtime:this}),r=this.customConfigList.get(n.type);this.updateMeta({type:n.type}),r!=null&&r.skipBaseBehavior||await i.execute(),r&&await r.callback({runtime:this,component:new uu(this.componentId.value,this.renderHandler,this.logger)});break}await(e==null?void 0:e())}updateMeta(e){this.metadata={...this.metadata,...e}}async configureStore(e){await this.store.configure(e)}get meta(){return this.metadata}initializeGlobals(){var i;if(window[this.globalId]||(window[this.globalId]={},this.logger.debug(`Initialized "${this.globalId}" window object`)),(i=window[this.globalId])!=null&&i.runtime){this.logger.debug(`Runtime for "${this.globalId}" are already initialized.`);return}const e=()=>Object.freeze({...this.metadata}),n=()=>Object.freeze({isProd:this.bundler.isProd,get meta(){return e()}});Object.defineProperty(window[this.globalId],"runtime",{get:()=>n()}),this.logger.debug(`Initialized runtime for "${this.globalId}".`)}toCamel(e){return e.replace(/^[a-z]{2}-/,"").replace(/-./g,n=>n[1].toUpperCase())}}exports.AccountContractStatusTypes=Io;exports.AccountContractTypes=Do;exports.AccountInvalidError=Ra;exports.AccountPlanDescriptionTypes=Lo;exports.AccountService=jo;exports.AccountSubscriptionTypes=Po;exports.AccountTypes=Fo;exports.AddToCartActionTypes=li;exports.AggregateRoot=tl;exports.ApiGraphqlTypes=Bf;exports.BroadcastChannelEventBus=Eo;exports.ComponentManager=uu;exports.CreatePlanError=Mo;exports.DomainError=rt;exports.ErrorCodes=ee;exports.EventBusWildcards=of;exports.EventChatRoom=vi;exports.EventChatRoomService=Kl;exports.EventChatRoomTokenError=ql;exports.EventNames=Go;exports.ExternalRuntime=is;exports.GlobalPageSectionTypes=$o;exports.GraphqlEventChatRoomRepository=Gl;exports.HttpAxiosClient=Wp;exports.InvalidNizzaGlobalObjectError=Fa;exports.LanguageTypes=Ko;exports.LocalRuntime=bi;exports.Logger=Ie;exports.MAX_PRODUCTS_IN_CART=lf;exports.NizzaEventStatus=qo;exports.NizzaProductRequestOriginTypes=Jo;exports.NizzaStore=$n;exports.NizzaVariationTypes=Wo;exports.ReactHostElement=lu;exports.ResourceNotFoundError=er;exports.RestAccountPlanRepository=Uo;exports.RestPublicAccountRepository=Vo;exports.Runtime=rv;exports.RuntimeStage=Br;exports.RuntimeType=Pe;exports.StoreProvider=$d;exports.UnexpectedError=Rr;exports.ValueObject=Jf;exports.VtexIORuntime=Si;exports.VtexLegacyRuntime=Ni;exports.accountAtom=xa;exports.accountService=Bo;exports.addQuestionData=Wl;exports.addToCartMessages=mr;exports.apiCall=Kd;exports.buildLanguageTranslations=xl;exports.buildTranslations=Rl;exports.chatIsConnectedAtom=yi;exports.chatMessageListAtom=dn;exports.chatSocketAtom=ki;exports.connectToSocket=Jl;exports.createActionFactory=el;exports.createAggregateRoot=nl;exports.createLazyLogger=Iu;exports.createStore=Hf;exports.customFetch=St;exports.downloadFile=Wd;exports.eventChatRoomService=Tr;exports.fileOrigin=Bd;exports.getAccount=zo;exports.getClientTimeZone=Qd;exports.getNizza=ut;exports.getRandomColor=Yl;exports.getScriptParams=Oo;exports.getStore=Ud;exports.getUserFriendlyMessage=Cl;exports.i18Init=Il;exports.jsDownload=Ro;exports.normalizeChatMessage=Qr;exports.registerTranslations=pm;exports.registerTranslationsOf=Fl;exports.runAddToCartHooks=qf;exports.runtimeList=cu;exports.searchParams=Ao;exports.shortId=Ln;exports.sleep=Hd;exports.useAccount=Ho;exports.useAutorun=Pd;exports.useChatSocketActions=Ng;exports.useChatSocketClient=Eg;exports.useChatSocketHandlers=Zl;exports.useConnectChatSocket=Xl;exports.useEventChatRoom=Ql;exports.useMetaDataClient=mm;exports.useNZ=Co;exports.useNizza=xo;exports.useReaction=Ld;exports.useSelect=No;exports.useStore=Md;exports.validateRequiredProps=Bu;
119
119
  //# sourceMappingURL=index.cjs.map