@nizza/core 0.6.9 → 0.7.0-beta.0

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.
Files changed (137) hide show
  1. package/dist/environments/environment.d.ts +2 -22
  2. package/dist/environments/environment.d.ts.map +1 -1
  3. package/dist/environments/environment.prod.d.ts +2 -22
  4. package/dist/environments/environment.prod.d.ts.map +1 -1
  5. package/dist/environments/types.d.ts +23 -0
  6. package/dist/environments/types.d.ts.map +1 -0
  7. package/dist/index.cjs +82 -53
  8. package/dist/index.cjs.map +1 -1
  9. package/dist/index.mjs +13364 -6234
  10. package/dist/index.mjs.map +1 -1
  11. package/dist/lib/accounts/core/domain/shared/errors.d.ts +6 -0
  12. package/dist/lib/accounts/core/domain/shared/errors.d.ts.map +1 -1
  13. package/dist/lib/accounts/core/index.d.ts.map +1 -1
  14. package/dist/lib/accounts/core/infrastructure/repositories/rest-account-plan.repository.d.ts.map +1 -1
  15. package/dist/lib/accounts/core/infrastructure/repositories/rest-private-account.repository.d.ts +2 -2
  16. package/dist/lib/accounts/core/infrastructure/repositories/rest-private-account.repository.d.ts.map +1 -1
  17. package/dist/lib/accounts/core/infrastructure/repositories/rest-public-account.repository.d.ts +2 -2
  18. package/dist/lib/accounts/core/infrastructure/repositories/rest-public-account.repository.d.ts.map +1 -1
  19. package/dist/lib/accounts/core/services/account.service.d.ts.map +1 -1
  20. package/dist/lib/accounts/hooks/account.hook.d.ts +9 -6
  21. package/dist/lib/accounts/hooks/account.hook.d.ts.map +1 -1
  22. package/dist/lib/accounts/states/account.d.ts +2 -3
  23. package/dist/lib/accounts/states/account.d.ts.map +1 -1
  24. package/dist/lib/accounts/utils/getAccount.d.ts +2 -1
  25. package/dist/lib/accounts/utils/getAccount.d.ts.map +1 -1
  26. package/dist/lib/add-to-cart/hooks.d.ts +4 -4
  27. package/dist/lib/add-to-cart/hooks.d.ts.map +1 -1
  28. package/dist/lib/clean-architecture/domain/AggregateRoot.d.ts.map +1 -1
  29. package/dist/lib/clean-architecture/domain/ValueObject.d.ts.map +1 -1
  30. package/dist/lib/clean-architecture/infrastructure/clients/http-axios.client.d.ts +1 -1
  31. package/dist/lib/clean-architecture/infrastructure/clients/http-axios.client.d.ts.map +1 -1
  32. package/dist/lib/constants/index.d.ts +2 -1
  33. package/dist/lib/constants/index.d.ts.map +1 -1
  34. package/dist/lib/constants/log.constant.d.ts +11 -0
  35. package/dist/lib/constants/log.constant.d.ts.map +1 -0
  36. package/dist/lib/dexie/base.db.d.ts +7 -0
  37. package/dist/lib/dexie/base.db.d.ts.map +1 -0
  38. package/dist/lib/dexie/entities/index.d.ts +2 -0
  39. package/dist/lib/dexie/entities/index.d.ts.map +1 -0
  40. package/dist/lib/dexie/entities/log.entity.d.ts +14 -0
  41. package/dist/lib/dexie/entities/log.entity.d.ts.map +1 -0
  42. package/dist/lib/dexie/index.d.ts +3 -0
  43. package/dist/lib/dexie/index.d.ts.map +1 -0
  44. package/dist/lib/dexie/nizza.db.d.ts +7 -0
  45. package/dist/lib/dexie/nizza.db.d.ts.map +1 -0
  46. package/dist/lib/errors/DomainError.d.ts +2 -2
  47. package/dist/lib/errors/DomainError.d.ts.map +1 -1
  48. package/dist/lib/event-buses/BroadcastChannelEventBus.d.ts +2 -2
  49. package/dist/lib/event-buses/BroadcastChannelEventBus.d.ts.map +1 -1
  50. package/dist/lib/i18n/buildTranslations.d.ts.map +1 -1
  51. package/dist/lib/i18n/init.d.ts.map +1 -1
  52. package/dist/lib/i18n/nizza.d.ts.map +1 -1
  53. package/dist/lib/index.d.ts +2 -0
  54. package/dist/lib/index.d.ts.map +1 -1
  55. package/dist/lib/ivs/socket/core/domain/entities/chat-client-socket.entity.d.ts +2 -2
  56. package/dist/lib/ivs/socket/core/domain/entities/chat-client-socket.entity.d.ts.map +1 -1
  57. package/dist/lib/ivs/socket/core/index.d.ts.map +1 -1
  58. package/dist/lib/ivs/socket/hooks/use-chat-socket-actions.hook.d.ts +4 -3
  59. package/dist/lib/ivs/socket/hooks/use-chat-socket-actions.hook.d.ts.map +1 -1
  60. package/dist/lib/ivs/socket/hooks/use-chat-socket-handlers.hook.d.ts +5 -4
  61. package/dist/lib/ivs/socket/hooks/use-chat-socket-handlers.hook.d.ts.map +1 -1
  62. package/dist/lib/ivs/socket/hooks/use-connect-chat-socket.hook.d.ts +7 -6
  63. package/dist/lib/ivs/socket/hooks/use-connect-chat-socket.hook.d.ts.map +1 -1
  64. package/dist/lib/ivs/socket/hooks/use-event-chat-room.hook.d.ts +3 -2
  65. package/dist/lib/ivs/socket/hooks/use-event-chat-room.hook.d.ts.map +1 -1
  66. package/dist/lib/ivs/socket/state.d.ts +4 -9
  67. package/dist/lib/ivs/socket/state.d.ts.map +1 -1
  68. package/dist/lib/ivs/socket/utils/connect-to-socket.util.d.ts.map +1 -1
  69. package/dist/lib/ivs/socket/utils/get-random-color.util.d.ts.map +1 -1
  70. package/dist/lib/lit/react-host-element.d.ts +3 -3
  71. package/dist/lib/lit/react-host-element.d.ts.map +1 -1
  72. package/dist/lib/logger/__tests__/utils.d.ts +6 -0
  73. package/dist/lib/logger/__tests__/utils.d.ts.map +1 -0
  74. package/dist/lib/logger/constants.d.ts +3 -0
  75. package/dist/lib/logger/constants.d.ts.map +1 -0
  76. package/dist/lib/logger/core/adapters/pino.adapter.d.ts +89 -0
  77. package/dist/lib/logger/core/adapters/pino.adapter.d.ts.map +1 -0
  78. package/dist/lib/logger/core/logger-chain.d.ts +24 -0
  79. package/dist/lib/logger/core/logger-chain.d.ts.map +1 -0
  80. package/dist/lib/logger/core/loggers/console/config.d.ts +3 -0
  81. package/dist/lib/logger/core/loggers/console/config.d.ts.map +1 -0
  82. package/dist/lib/logger/core/loggers/console/console.logger.d.ts +50 -0
  83. package/dist/lib/logger/core/loggers/console/console.logger.d.ts.map +1 -0
  84. package/dist/lib/logger/core/loggers/console/index.d.ts +2 -0
  85. package/dist/lib/logger/core/loggers/console/index.d.ts.map +1 -0
  86. package/dist/lib/logger/core/loggers/http.logger.d.ts +24 -0
  87. package/dist/lib/logger/core/loggers/http.logger.d.ts.map +1 -0
  88. package/dist/lib/logger/core/services/local-storage-level.service.d.ts +59 -0
  89. package/dist/lib/logger/core/services/local-storage-level.service.d.ts.map +1 -0
  90. package/dist/lib/logger/core/utils.d.ts +16 -0
  91. package/dist/lib/logger/core/utils.d.ts.map +1 -0
  92. package/dist/lib/logger/index.d.ts +6 -0
  93. package/dist/lib/logger/index.d.ts.map +1 -0
  94. package/dist/lib/logger/logger.d.ts +199 -0
  95. package/dist/lib/logger/logger.d.ts.map +1 -0
  96. package/dist/lib/logger/types.d.ts +108 -0
  97. package/dist/lib/logger/types.d.ts.map +1 -0
  98. package/dist/lib/mobx/hooks.d.ts.map +1 -1
  99. package/dist/lib/nizza-store/NizzaStore.d.ts +5 -4
  100. package/dist/lib/nizza-store/NizzaStore.d.ts.map +1 -1
  101. package/dist/lib/nizza-store/helpers.d.ts.map +1 -1
  102. package/dist/lib/runtime/component-manager.d.ts +1 -1
  103. package/dist/lib/runtime/component-manager.d.ts.map +1 -1
  104. package/dist/lib/runtime/implementations/external-runtime.d.ts.map +1 -1
  105. package/dist/lib/runtime/implementations/index.d.ts +2 -7
  106. package/dist/lib/runtime/implementations/index.d.ts.map +1 -1
  107. package/dist/lib/runtime/implementations/local-runtime.d.ts.map +1 -1
  108. package/dist/lib/runtime/implementations/platform.d.ts.map +1 -1
  109. package/dist/lib/runtime/implementations/vtex-faststore-runtime.d.ts.map +1 -1
  110. package/dist/lib/runtime/implementations/vtex-io-runtime.d.ts.map +1 -1
  111. package/dist/lib/runtime/implementations/vtex-legacy-runtime.d.ts.map +1 -1
  112. package/dist/lib/runtime/runtime.d.ts +3 -3
  113. package/dist/lib/runtime/runtime.d.ts.map +1 -1
  114. package/dist/lib/types/index.d.ts +1 -0
  115. package/dist/lib/types/index.d.ts.map +1 -1
  116. package/dist/lib/types/log.type.d.ts +82 -0
  117. package/dist/lib/types/log.type.d.ts.map +1 -0
  118. package/dist/lib/types/nizza/globalStore.d.ts +2 -2
  119. package/dist/lib/types/nizza/globalStore.d.ts.map +1 -1
  120. package/dist/lib/types/nizza/nizzaEvent.d.ts +3 -3
  121. package/dist/lib/types/nizza/nizzaEvent.d.ts.map +1 -1
  122. package/dist/lib/types/runtime/base.d.ts +1 -1
  123. package/dist/lib/types/runtime/base.d.ts.map +1 -1
  124. package/dist/lib/utils/customFetch.d.ts.map +1 -1
  125. package/dist/lib/utils/downloadFile.d.ts.map +1 -1
  126. package/dist/lib/utils/getClientMetadata.d.ts +8 -0
  127. package/dist/lib/utils/getClientMetadata.d.ts.map +1 -0
  128. package/dist/lib/utils/getClientTimeZone.d.ts +3 -2
  129. package/dist/lib/utils/getClientTimeZone.d.ts.map +1 -1
  130. package/dist/lib/utils/helpers.d.ts.map +1 -1
  131. package/dist/lib/utils/index.d.ts +1 -2
  132. package/dist/lib/utils/index.d.ts.map +1 -1
  133. package/package.json +1 -1
  134. package/dist/lib/utils/createLazyLogger.d.ts +0 -12
  135. package/dist/lib/utils/createLazyLogger.d.ts.map +0 -1
  136. package/dist/lib/utils/logger.d.ts +0 -12
  137. package/dist/lib/utils/logger.d.ts.map +0 -1
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
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
- `).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",`
1
+ "use strict";var ug=Object.defineProperty;var lg=(t,e,n)=>e in t?ug(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Ae=(t,e,n)=>lg(t,typeof e!="symbol"?e+"":e,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ue=require("react"),cg=require("react/jsx-runtime"),dg=require("react-dom");function fg(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in t)){const a=Object.getOwnPropertyDescriptor(r,i);a&&Object.defineProperty(t,i,a.get?a:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}const qt={};let hg=0;function Ia(t,e){const n=`atom${++hg}`,r={toString(){return(qt?"production":void 0)!=="production"&&this.debugLabel?n+":"+this.debugLabel:n}};return typeof t=="function"?r.read=t:(r.init=t,r.read=pg,r.write=mg),r}function pg(t){return t(this)}function mg(t,e,n){return e(this,typeof n=="function"?n(t(this)):n)}const cc=(t,e)=>t.unstable_is?t.unstable_is(e):e===t,Js=t=>"init"in t,Ys=t=>!!t.write,ha=new WeakMap,bu=t=>{var e;return ku(t)&&!((e=ha.get(t))!=null&&e[1])},gg=(t,e)=>{const n=ha.get(t);if(n)n[1]=!0,n[0].forEach(r=>r(e));else if((qt?"production":void 0)!=="production")throw new Error("[Bug] cancelable promise not found")},yg=t=>{if(ha.has(t))return;const e=[new Set,!1];ha.set(t,e);const n=()=>{e[1]=!0};t.then(n,n),t.onCancel=r=>{e[0].add(r)}},ku=t=>typeof(t==null?void 0:t.then)=="function",dc=t=>"v"in t||"e"in t,Wi=t=>{if("e"in t)throw t.e;if((qt?"production":void 0)!=="production"&&!("v"in t))throw new Error("[Bug] atom state is not initialized");return t.v},$f=(t,e,n)=>{n.p.has(t)||(n.p.add(t),e.then(()=>{n.p.delete(t)},()=>{n.p.delete(t)}))},fc=(t,e,n,r,i)=>{var a;if((qt?"production":void 0)!=="production"&&r===e)throw new Error("[Bug] atom cannot depend on itself");n.d.set(r,i.n),bu(n.v)&&$f(e,n.v,i),(a=i.m)==null||a.t.add(e),t&&vg(t,r,e)},or=()=>[new Map,new Map,new Set],Qs=(t,e,n)=>{t[0].has(e)||t[0].set(e,new Set),t[1].set(e,n)},vg=(t,e,n)=>{const r=t[0].get(e);r&&r.add(n)},bg=(t,e)=>t[0].get(e),hc=(t,e)=>{t[2].add(e)},$n=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(r=>{var i;return(i=r.m)==null?void 0:i.l.forEach(a=>a())}),n.forEach(r=>r())}},jf=t=>{let e;(qt?"production":void 0)!=="production"&&(e=new Set);const n=(E,b,k)=>{const C="v"in b,S=b.v,R=bu(b.v)?b.v:null;if(ku(k)){yg(k);for(const x of b.d.keys())$f(E,k,t(x,b));b.v=k,delete b.e}else b.v=k,delete b.e;(!C||!Object.is(S,b.v))&&(++b.n,R&&gg(R,k))},r=(E,b,k,C)=>{var S;if(!(C!=null&&C(b))&&dc(k)&&(k.m||Array.from(k.d).every(([ie,ke])=>r(E,ie,t(ie,k),C).n===ke)))return k;k.d.clear();let R=!0;const x=ie=>{if(cc(b,ie)){const he=t(ie,k);if(!dc(he))if(Js(ie))n(ie,he,ie.init);else throw new Error("no atom init");return Wi(he)}const ke=r(E,ie,t(ie,k),C);if(R)fc(E,b,k,ie,ke);else{const he=or();fc(he,b,k,ie,ke),f(he,b,k),$n(he)}return Wi(ke)};let z,I;const re={get signal(){return z||(z=new AbortController),z.signal},get setSelf(){return(qt?"production":void 0)!=="production"&&!Ys(b)&&console.warn("setSelf function cannot be used with read-only atom"),!I&&Ys(b)&&(I=(...ie)=>{if((qt?"production":void 0)!=="production"&&R&&console.warn("setSelf function cannot be called in sync"),!R)return c(b,...ie)}),I}};try{const ie=b.read(x,re);if(n(b,k,ie),ku(ie)){(S=ie.onCancel)==null||S.call(ie,()=>z==null?void 0:z.abort());const ke=()=>{if(k.m){const he=or();f(he,b,k),$n(he)}};ie.then(ke,ke)}return k}catch(ie){return delete k.v,k.e=ie,++k.n,k}finally{R=!1}},i=E=>Wi(r(void 0,E,t(E))),a=(E,b,k)=>{var C,S;const R=new Map;for(const x of((C=k.m)==null?void 0:C.t)||[])R.set(x,t(x,k));for(const x of k.p)R.set(x,t(x,k));return(S=bg(E,b))==null||S.forEach(x=>{R.set(x,t(x,k))}),R},o=(E,b,k)=>{const C=[],S=new Set,R=(I,re)=>{if(!S.has(I)){S.add(I);for(const[ie,ke]of a(E,I,re))I!==ie&&R(ie,ke);C.push([I,re,re.n])}};R(b,k);const x=new Set([b]),z=I=>S.has(I);for(let I=C.length-1;I>=0;--I){const[re,ie,ke]=C[I];let he=!1;for(const Ee of ie.d.keys())if(Ee!==re&&x.has(Ee)){he=!0;break}he&&(r(E,re,ie,z),f(E,re,ie),ke!==ie.n&&(Qs(E,re,ie),x.add(re))),S.delete(re)}},l=(E,b,k,...C)=>{const S=z=>Wi(r(E,z,t(z,k))),R=(z,...I)=>{const re=t(z,k);let ie;if(cc(b,z)){if(!Js(z))throw new Error("atom not writable");const ke="v"in re,he=re.v,Ee=I[0];n(z,re,Ee),f(E,z,re),(!ke||!Object.is(he,re.v))&&(Qs(E,z,re),o(E,z,re))}else ie=l(E,z,re,...I);return $n(E),ie};return b.write(S,R,...C)},c=(E,...b)=>{const k=or(),C=l(k,E,t(E),...b);return $n(k),C},f=(E,b,k)=>{if(k.m&&!bu(k.v)){for(const C of k.d.keys())k.m.d.has(C)||(h(E,C,t(C,k)).t.add(b),k.m.d.add(C));for(const C of k.m.d||[])if(!k.d.has(C)){k.m.d.delete(C);const S=y(E,C,t(C,k));S==null||S.t.delete(b)}}},h=(E,b,k)=>{if(!k.m){r(E,b,k);for(const C of k.d.keys())h(E,C,t(C,k)).t.add(b);if(k.m={l:new Set,d:new Set(k.d.keys()),t:new Set},(qt?"production":void 0)!=="production"&&e.add(b),Ys(b)&&b.onMount){const C=k.m,{onMount:S}=b;hc(E,()=>{const R=S((...x)=>l(E,b,k,...x));R&&(C.u=R)})}}return k.m},y=(E,b,k)=>{if(k.m&&!k.m.l.size&&!Array.from(k.m.t).some(C=>{var S;return(S=t(C,k).m)==null?void 0:S.d.has(b)})){const C=k.m.u;C&&hc(E,C),delete k.m,(qt?"production":void 0)!=="production"&&e.delete(b);for(const S of k.d.keys()){const R=y(E,S,t(S,k));R==null||R.t.delete(b)}return}return k.m},A={get:i,set:c,sub:(E,b)=>{const k=or(),C=t(E),S=h(k,E,C);$n(k);const R=S.l;return R.add(b),()=>{R.delete(b);const x=or();y(x,E,C),$n(x)}},unstable_derive:E=>jf(...E(t))};return(qt?"production":void 0)!=="production"&&Object.assign(A,{dev4_get_internal_weak_map:()=>({get:b=>{const k=t(b);if(k.n!==0)return k}}),dev4_get_mounted_atoms:()=>e,dev4_restore_atoms:b=>{const k=or();for(const[C,S]of b)if(Js(C)){const R=t(C),x="v"in R,z=R.v;n(C,R,S),f(k,C,R),(!x||!Object.is(z,R.v))&&(Qs(k,C,R),o(k,C,R))}$n(k)}}),A},kg=()=>{const t=new WeakMap;return jf(n=>{let r=t.get(n);return r||(r={d:new Map,p:new Set,n:0},t.set(n,r)),r})};let Ur;const _g=()=>(Ur||(Ur=kg(),(qt?"production":void 0)!=="production"&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=Ur),globalThis.__JOTAI_DEFAULT_STORE__!==Ur&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),Ur),Bf={},Sg=Ue.createContext(void 0),Mf=t=>Ue.useContext(Sg)||_g(),Uf=t=>typeof(t==null?void 0:t.then)=="function",Ag=t=>{t.status="pending",t.then(e=>{t.status="fulfilled",t.value=e},e=>{t.status="rejected",t.reason=e})},Eg=Ue.use||(t=>{if(t.status==="pending")throw t;if(t.status==="fulfilled")return t.value;throw t.status==="rejected"?t.reason:(Ag(t),t)}),Xs=new WeakMap,wg=t=>{let e=Xs.get(t);return e||(e=new Promise((n,r)=>{let i=t;const a=c=>f=>{i===c&&n(f)},o=c=>f=>{i===c&&r(f)},l=c=>{"onCancel"in c&&typeof c.onCancel=="function"&&c.onCancel(f=>{if((Bf?"production":void 0)!=="production"&&f===c)throw new Error("[Bug] p is not updated even after cancelation");Uf(f)?(Xs.set(f,e),i=f,f.then(a(f),o(f)),l(f)):n(f)})};t.then(a(t),o(t)),l(t)}),Xs.set(t,e)),e};function _u(t,e){const n=Mf(),[[r,i,a],o]=Ue.useReducer(f=>{const h=n.get(t);return Object.is(f[0],h)&&f[1]===n&&f[2]===t?f:[h,n,t]},void 0,()=>[n.get(t),n,t]);let l=r;if((i!==n||a!==t)&&(o(),l=n.get(t)),Ue.useEffect(()=>{const f=n.sub(t,()=>{o()});return o(),f},[n,t,void 0]),Ue.useDebugValue(l),Uf(l)){const f=wg(l);return Eg(f)}return l}function Xu(t,e){const n=Mf();return Ue.useCallback((...i)=>{if((Bf?"production":void 0)!=="production"&&!("write"in t))throw new Error("not writable atom");return n.set(t,...i)},[n,t])}function Zs(t,e){return[_u(t),Xu(t)]}const Vf=Ia(null);Vf.debugLabel="accountAtom";const Ng={},{NZ_BACKOFFICE_BACK_URL:Og,NZ_CORE_SERVICES_GRAPHQL_URL:Rg,NZ_CORE_SERVICES_REST_URL:Tg}=Ng,_r={apiUrls:{restV1:Og||"https://pabprg32bj.execute-api.us-east-1.amazonaws.com",restV2:Tg||"https://core-services-dev.nizza.com/api",graphql:Rg||"https://core-services-dev.nizza.com/graphql"},publicUrls:{wssIVSChat:"wss://edge.ivschat.us-east-1.amazonaws.com"}};async function qn(t){const{url:e,method:n="GET",body:r,raw:i=!1,contentTypeJson:a=!0,timeout:o,...l}=t,c=new Headers({...a?{"content-type":"application/json"}:{},...t.headers}),f=new AbortController,{signal:h}=f;let y;const m=fetch(e,{method:n,headers:c,body:r,signal:h,...l});o&&(y=setTimeout(()=>{f.abort()},o));const O=await m;if(i)return O;const A=await O.json();if(clearTimeout(y),!O.ok){const E=A?JSON.stringify(A):O.statusText;throw new Error(E)}return A}const Cg=t=>qn({...t,contentTypeJson:!1,raw:!1});function xg(t,e,n){fetch(e).then(r=>r.blob()).then(r=>qf(r,`${t}.${n}`))}const qf=(t,e,n)=>{const r=[t],i=new Blob(r,{type:n!=null?n:"application/octet-stream"});if(typeof window.navigator.msSaveBlob!="undefined")return window.navigator.msSaveBlob(i,e);const a=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(i):window.webkitURL.createObjectURL(i),o=document.createElement("a");return o.style.display="none",o.href=a,o.setAttribute("download",e),typeof o.download=="undefined"&&o.setAttribute("target","_blank"),document.body.appendChild(o),o.click(),setTimeout(()=>{document.body.removeChild(o),window.URL.revokeObjectURL(a)},200)};function fr(t){return t!=null&&typeof t=="object"&&t["@@functional/placeholder"]===!0}function ia(t){return function e(n){return arguments.length===0||fr(n)?e:t.apply(this,arguments)}}function Pg(t){return function e(n,r){switch(arguments.length){case 0:return e;case 1:return fr(n)?e:ia(function(i){return t(n,i)});default:return fr(n)&&fr(r)?e:fr(n)?ia(function(i){return t(i,r)}):fr(r)?ia(function(i){return t(n,i)}):t(n,r)}}}const Fg=Number.isInteger||function(e){return e<<0===e};function Ig(t){return Object.prototype.toString.call(t)==="[object String]"}function Dg(t,e){var n=t<0?e.length+t:t;return Ig(e)?e.charAt(n):e[n]}var Lg=ia(function(e){return e==null});function $g(t,e){for(var n=e,r=0;r<t.length;r+=1){if(n==null)return;var i=t[r];Fg(i)?n=Dg(i,n):n=n[i]}return n}var jg=Pg($g);class dn extends Error{constructor(e,n,r){super(n),this.value=r,this.name=e,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toDTO(){return{name:this.name,message:this.message,...this.value&&{value:this.value},...this.stack&&{stack:this.formatStack()}}}formatStack(){return this.stack?this.stack.split(`
2
+ `).map(e=>e.trim()).join(" | "):""}}class Bg extends dn{constructor(e){super("RESOURCE_NOT_FOUND_ERROR",`Resource with id '${e}' not found.`,e)}}class Zu extends dn{constructor(e){var n;super("APP_UNEXPECTED_ERROR",(n=e.message)!=null?n:"An unexpected error occurred.",e)}}class Hf extends dn{constructor(){super("APP_ACCOUNT_INVALID_ERROR","Account not defined")}}class Kf extends dn{constructor(e){super("INVALID_NIZZA_GLOBAL_OBJECT_ERROR",`
3
3
  Configuration property invalid: "${e}".
4
4
 
5
5
  It looks like you are trying to use a configuration property that is required but is "undefined", make sure you have initialized the global object "nizza".
@@ -21,25 +21,54 @@
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 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{this.activeAccountFetchId===i&&this.setAccountStatus("error")}}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 typeof e=="string"&&!e.includes("accounts/v2")&&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
- `).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
- `)}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
- `+s.map(Ds).join(`
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 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
- `,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
- `)}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+=`
24
+ `)}}function Mg(t,e){e.forEach(n=>{if(Lg(jg(n.split("."),t)))throw new Kf(n)})}function Ge(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];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 Ug={};function zf(){return typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:Ug}var Gf=Object.assign,pa=Object.getOwnPropertyDescriptor,en=Object.defineProperty,Da=Object.prototype,Su=[];Object.freeze(Su);var el={};Object.freeze(el);var Vg=typeof Proxy!="undefined",qg=Object.toString();function Wf(){Vg||Ge("Proxy not available")}function Jf(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var pr=function(){};function zt(t){return typeof t=="function"}function Hn(t){var e=typeof t;switch(e){case"string":case"symbol":case"number":return!0}return!1}function La(t){return t!==null&&typeof t=="object"}function wn(t){if(!La(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()===qg}function Yf(t){var e=t==null?void 0:t.constructor;return e?e.name==="GeneratorFunction"||e.displayName==="GeneratorFunction":!1}function $a(t,e,n){en(t,e,{enumerable:!1,writable:!0,configurable:!0,value:n})}function Qf(t,e,n){en(t,e,{enumerable:!1,writable:!1,configurable:!0,value:n})}function Jn(t,e){var n="isMobX"+t;return e.prototype[n]=!0,function(r){return La(r)&&r[n]===!0}}function Sr(t){return t!=null&&Object.prototype.toString.call(t)==="[object Map]"}function Hg(t){var e=Object.getPrototypeOf(t),n=Object.getPrototypeOf(e),r=Object.getPrototypeOf(n);return r===null}function sn(t){return t!=null&&Object.prototype.toString.call(t)==="[object Set]"}var Xf=typeof Object.getOwnPropertySymbols!="undefined";function Kg(t){var e=Object.keys(t);if(!Xf)return e;var n=Object.getOwnPropertySymbols(t);return n.length?[].concat(e,n.filter(function(r){return Da.propertyIsEnumerable.call(t,r)})):e}var ja=typeof Reflect!="undefined"&&Reflect.ownKeys?Reflect.ownKeys:Xf?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames;function Zf(t){return t===null?null:typeof t=="object"?""+t:t}function un(t,e){return Da.hasOwnProperty.call(t,e)}var zg=Object.getOwnPropertyDescriptors||function(e){var n={};return ja(e).forEach(function(r){n[r]=pa(e,r)}),n};function Tt(t,e){return!!(t&e)}function Ct(t,e,n){return n?t|=e:t&=~e,t}function pc(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Gg(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Jg(r.key),r)}}function Ar(t,e,n){return e&&Gg(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function mr(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=Yg(t))||e){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}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 Nn(){return Nn=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Nn.apply(null,arguments)}function eh(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Au(t,e)}function Au(t,e){return Au=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Au(t,e)}function Wg(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function Jg(t){var e=Wg(t,"string");return typeof e=="symbol"?e:e+""}function Yg(t,e){if(t){if(typeof t=="string")return pc(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)?pc(t,e):void 0}}var Xt=Symbol("mobx-stored-annotations");function tn(t){function e(n,r){if(hi(r))return t.decorate_20223_(n,r);Er(n,r,t)}return Object.assign(e,t)}function Er(t,e,n){un(t,Xt)||$a(t,Xt,Nn({},t[Xt])),ry(n)||(t[Xt][e]=n)}function Qg(t){return un(t,Xt)||$a(t,Xt,Nn({},t[Xt])),t[Xt]}function hi(t){return typeof t=="object"&&typeof t.kind=="string"}var Ie=Symbol("mobx administration"),Rn=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_=ze.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(r){return r()})},e.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(r){return r()})},e.reportObserved=function(){return gh(this)},e.reportChanged=function(){Bt(),yh(this),Mt()},e.toString=function(){return this.name_},Ar(t,[{key:"isBeingObserved",get:function(){return Tt(this.flags_,t.isBeingObservedMask_)},set:function(r){this.flags_=Ct(this.flags_,t.isBeingObservedMask_,r)}},{key:"isPendingUnobservation",get:function(){return Tt(this.flags_,t.isPendingUnobservationMask_)},set:function(r){this.flags_=Ct(this.flags_,t.isPendingUnobservationMask_,r)}},{key:"diffValue",get:function(){return Tt(this.flags_,t.diffValueMask_)?1:0},set:function(r){this.flags_=Ct(this.flags_,t.diffValueMask_,r===1)}}])}();Rn.isBeingObservedMask_=1;Rn.isPendingUnobservationMask_=2;Rn.diffValueMask_=4;var tl=Jn("Atom",Rn);function th(t,e,n){e===void 0&&(e=pr),n===void 0&&(n=pr);var r=new Rn(t);return e!==pr&&sv(r,e),n!==pr&&Ah(r,n),r}function Xg(t,e){return Dh(t,e)}function Zg(t,e){return Object.is?Object.is(t,e):t===e?t!==0||1/t===1/e:t!==t&&e!==e}var yr={structural:Xg,default:Zg};function Kn(t,e,n){return Nh(t)?t:Array.isArray(t)?ot.array(t,{name:n}):wn(t)?ot.object(t,void 0,{name:n}):Sr(t)?ot.map(t,{name:n}):sn(t)?ot.set(t,{name:n}):typeof t=="function"&&!Ha(t)&&!ai(t)?Yf(t)?vr(t):ii(n,t):t}function ey(t,e,n){if(t==null||Ga(t)||za(t)||Qn(t)||wr(t))return t;if(Array.isArray(t))return ot.array(t,{name:n,deep:!1});if(wn(t))return ot.object(t,void 0,{name:n,deep:!1});if(Sr(t))return ot.map(t,{name:n,deep:!1});if(sn(t))return ot.set(t,{name:n,deep:!1})}function Ba(t){return t}function ty(t,e){return Dh(t,e)?e:t}var ny="override";function ry(t){return t.annotationType_===ny}function pi(t,e){return{annotationType_:t,options_:e,make_:iy,extend_:ay,decorate_20223_:sy}}function iy(t,e,n,r){var i;if((i=this.options_)!=null&&i.bound)return this.extend_(t,e,n,!1)===null?0:1;if(r===t.target_)return this.extend_(t,e,n,!1)===null?0:2;if(Ha(n.value))return 1;var a=nh(t,this,e,n,!1);return en(r,e,a),2}function ay(t,e,n,r){var i=nh(t,this,e,n);return t.defineProperty_(e,i,r)}function sy(t,e){var n=e.kind,r=e.name,i=e.addInitializer,a=this,o=function(f){var h,y,m,O;return On((h=(y=a.options_)==null?void 0:y.name)!=null?h:r.toString(),f,(m=(O=a.options_)==null?void 0:O.autoAction)!=null?m:!1)};if(n=="field"){i(function(){Er(this,r,a)});return}if(n=="method"){var l;return Ha(t)||(t=o(t)),(l=this.options_)!=null&&l.bound&&i(function(){var c=this,f=c[r].bind(c);f.isMobxAction=!0,c[r]=f}),t}Ge("Cannot apply '"+a.annotationType_+"' to '"+String(r)+"' (kind: "+n+"):"+(`
26
+ '`+a.annotationType_+"' can only be used on properties with a function value."))}function oy(t,e,n,r){e.annotationType_,r.value}function nh(t,e,n,r,i){var a,o,l,c,f,h,y;i===void 0&&(i=Oe.safeDescriptors),oy(t,e,n,r);var m=r.value;if((a=e.options_)!=null&&a.bound){var O;m=m.bind((O=t.proxy_)!=null?O:t.target_)}return{value:On((o=(l=e.options_)==null?void 0:l.name)!=null?o:n.toString(),m,(c=(f=e.options_)==null?void 0:f.autoAction)!=null?c:!1,(h=e.options_)!=null&&h.bound?(y=t.proxy_)!=null?y:t.target_:void 0),configurable:i?t.isPlainObject_:!0,enumerable:!1,writable:!i}}function rh(t,e){return{annotationType_:t,options_:e,make_:uy,extend_:ly,decorate_20223_:cy}}function uy(t,e,n,r){var i;if(r===t.target_)return this.extend_(t,e,n,!1)===null?0:2;if((i=this.options_)!=null&&i.bound&&(!un(t.target_,e)||!ai(t.target_[e]))&&this.extend_(t,e,n,!1)===null)return 0;if(ai(n.value))return 1;var a=ih(t,this,e,n,!1,!1);return en(r,e,a),2}function ly(t,e,n,r){var i,a=ih(t,this,e,n,(i=this.options_)==null?void 0:i.bound);return t.defineProperty_(e,a,r)}function cy(t,e){var n,r=e.name,i=e.addInitializer;return ai(t)||(t=vr(t)),(n=this.options_)!=null&&n.bound&&i(function(){var a=this,o=a[r].bind(a);o.isMobXFlow=!0,a[r]=o}),t}function dy(t,e,n,r){e.annotationType_,r.value}function ih(t,e,n,r,i,a){a===void 0&&(a=Oe.safeDescriptors),dy(t,e,n,r);var o=r.value;if(ai(o)||(o=vr(o)),i){var l;o=o.bind((l=t.proxy_)!=null?l:t.target_),o.isMobXFlow=!0}return{value:o,configurable:a?t.isPlainObject_:!0,enumerable:!1,writable:!a}}function nl(t,e){return{annotationType_:t,options_:e,make_:fy,extend_:hy,decorate_20223_:py}}function fy(t,e,n){return this.extend_(t,e,n,!1)===null?0:1}function hy(t,e,n,r){return my(t,this,e,n),t.defineComputedProperty_(e,Nn({},this.options_,{get:n.get,set:n.set}),r)}function py(t,e){var n=this,r=e.name,i=e.addInitializer;return i(function(){var a=Nr(this)[Ie],o=Nn({},n.options_,{get:t,context:this});o.name||(o.name="ObservableObject."+r.toString()),a.values_.set(r,new Gt(o))}),function(){return this[Ie].getObservablePropValue_(r)}}function my(t,e,n,r){e.annotationType_,r.get}function Ma(t,e){return{annotationType_:t,options_:e,make_:gy,extend_:yy,decorate_20223_:vy}}function gy(t,e,n){return this.extend_(t,e,n,!1)===null?0:1}function yy(t,e,n,r){var i,a;return by(t,this),t.defineObservableProperty_(e,n.value,(i=(a=this.options_)==null?void 0:a.enhancer)!=null?i:Kn,r)}function vy(t,e){var n=this,r=e.kind,i=e.name,a=new WeakSet;function o(l,c){var f,h,y=Nr(l)[Ie],m=new Un(c,(f=(h=n.options_)==null?void 0:h.enhancer)!=null?f:Kn,"ObservableObject."+i.toString(),!1);y.values_.set(i,m),a.add(l)}if(r=="accessor")return{get:function(){return a.has(this)||o(this,t.get.call(this)),this[Ie].getObservablePropValue_(i)},set:function(c){return a.has(this)||o(this,c),this[Ie].setObservablePropValue_(i,c)},init:function(c){return a.has(this)||o(this,c),c}}}function by(t,e,n,r){e.annotationType_}var ky="true",_y=ah();function ah(t){return{annotationType_:ky,options_:t,make_:Sy,extend_:Ay,decorate_20223_:Ey}}function Sy(t,e,n,r){var i,a;if(n.get)return Sn.make_(t,e,n,r);if(n.set){var o=On(e.toString(),n.set);return r===t.target_?t.defineProperty_(e,{configurable:Oe.safeDescriptors?t.isPlainObject_:!0,set:o})===null?0:2:(en(r,e,{configurable:!0,set:o}),2)}if(r!==t.target_&&typeof n.value=="function"){var l;if(Yf(n.value)){var c,f=(c=this.options_)!=null&&c.autoBind?vr.bound:vr;return f.make_(t,e,n,r)}var h=(l=this.options_)!=null&&l.autoBind?ii.bound:ii;return h.make_(t,e,n,r)}var y=((i=this.options_)==null?void 0:i.deep)===!1?ot.ref:ot;if(typeof n.value=="function"&&(a=this.options_)!=null&&a.autoBind){var m;n.value=n.value.bind((m=t.proxy_)!=null?m:t.target_)}return y.make_(t,e,n,r)}function Ay(t,e,n,r){var i,a;if(n.get)return Sn.extend_(t,e,n,r);if(n.set)return t.defineProperty_(e,{configurable:Oe.safeDescriptors?t.isPlainObject_:!0,set:On(e.toString(),n.set)},r);if(typeof n.value=="function"&&(i=this.options_)!=null&&i.autoBind){var o;n.value=n.value.bind((o=t.proxy_)!=null?o:t.target_)}var l=((a=this.options_)==null?void 0:a.deep)===!1?ot.ref:ot;return l.extend_(t,e,n,r)}function Ey(t,e){Ge("'"+this.annotationType_+"' cannot be used as a decorator")}var wy="observable",Ny="observable.ref",Oy="observable.shallow",Ry="observable.struct",sh={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(sh);function Ji(t){return t||sh}var Eu=Ma(wy),Ty=Ma(Ny,{enhancer:Ba}),Cy=Ma(Oy,{enhancer:ey}),xy=Ma(Ry,{enhancer:ty}),oh=tn(Eu);function Yi(t){return t.deep===!0?Kn:t.deep===!1?Ba:Fy(t.defaultDecorator)}function Py(t){var e;return t?(e=t.defaultDecorator)!=null?e:ah(t):void 0}function Fy(t){var e,n;return t&&(e=(n=t.options_)==null?void 0:n.enhancer)!=null?e:Kn}function uh(t,e,n){if(hi(e))return Eu.decorate_20223_(t,e);if(Hn(e)){Er(t,e,Eu);return}return Nh(t)?t:wn(t)?ot.object(t,e,n):Array.isArray(t)?ot.array(t,e):Sr(t)?ot.map(t,e):sn(t)?ot.set(t,e):typeof t=="object"&&t!==null?t:ot.box(t,e)}Gf(uh,oh);var Iy={box:function(e,n){var r=Ji(n);return new Un(e,Yi(r),r.name,!0,r.equals)},array:function(e,n){var r=Ji(n);return(Oe.useProxies===!1||r.proxy===!1?Rv:vv)(e,Yi(r),r.name)},map:function(e,n){var r=Ji(n);return new Th(e,Yi(r),r.name)},set:function(e,n){var r=Ji(n);return new Ch(e,Yi(r),r.name)},object:function(e,n,r){return Xn(function(){return ov(Oe.useProxies===!1||(r==null?void 0:r.proxy)===!1?Nr({},r):pv({},r),e,n)})},ref:tn(Ty),shallow:tn(Cy),deep:oh,struct:tn(xy)},ot=Gf(uh,Iy),lh="computed",Dy="computed.struct",wu=nl(lh),Ly=nl(Dy,{equals:yr.structural}),Sn=function(e,n){if(hi(n))return wu.decorate_20223_(e,n);if(Hn(n))return Er(e,n,wu);if(wn(e))return tn(nl(lh,e));var r=wn(n)?n:{};return r.get=e,r.name||(r.name=e.name||""),new Gt(r)};Object.assign(Sn,wu);Sn.struct=tn(Ly);var mc,gc,ma=0,$y=1,jy=(mc=(gc=pa(function(){},"name"))==null?void 0:gc.configurable)!=null?mc:!1,yc={value:"action",configurable:!0,writable:!1,enumerable:!1};function On(t,e,n,r){n===void 0&&(n=!1);function i(){return By(t,n,e,r||this,arguments)}return i.isMobxAction=!0,i.toString=function(){return e.toString()},jy&&(yc.value=t,en(i,"name",yc)),i}function By(t,e,n,r,i){var a=My(t,e);try{return n.apply(r,i)}catch(o){throw a.error_=o,o}finally{Uy(a)}}function My(t,e,n,r){var i=!1,a=0,o=Oe.trackingDerivation,l=!e||!o;Bt();var c=Oe.allowStateChanges;l&&(Yn(),c=Ua(!0));var f=rl(!0),h={runAsAction_:l,prevDerivation_:o,prevAllowStateChanges_:c,prevAllowStateReads_:f,notifySpy_:i,startTime_:a,actionId_:$y++,parentActionId_:ma};return ma=h.actionId_,h}function Uy(t){ma!==t.actionId_&&Ge(30),ma=t.parentActionId_,t.error_!==void 0&&(Oe.suppressReactionErrors=!0),Va(t.prevAllowStateChanges_),Yr(t.prevAllowStateReads_),Mt(),t.runAsAction_&&ln(t.prevDerivation_),Oe.suppressReactionErrors=!1}function ch(t,e){var n=Ua(t);try{return e()}finally{Va(n)}}function Ua(t){var e=Oe.allowStateChanges;return Oe.allowStateChanges=t,e}function Va(t){Oe.allowStateChanges=t}var Un=function(t){function e(r,i,a,o,l){var c;return a===void 0&&(a="ObservableValue"),l===void 0&&(l=yr.default),c=t.call(this,a)||this,c.enhancer=void 0,c.name_=void 0,c.equals=void 0,c.hasUnreportedChange_=!1,c.interceptors_=void 0,c.changeListeners_=void 0,c.value_=void 0,c.dehancer=void 0,c.enhancer=i,c.name_=a,c.equals=l,c.value_=i(r,void 0,a),c}eh(e,t);var n=e.prototype;return n.dehanceValue=function(i){return this.dehancer!==void 0?this.dehancer(i):i},n.set=function(i){this.value_,i=this.prepareNewValue_(i),i!==Oe.UNCHANGED&&this.setNewValue_(i)},n.prepareNewValue_=function(i){if($t(this)){var a=jt(this,{object:this,type:nn,newValue:i});if(!a)return Oe.UNCHANGED;i=a.newValue}return i=this.enhancer(i,this.value_,this.name_),this.equals(this.value_,i)?Oe.UNCHANGED:i},n.setNewValue_=function(i){var a=this.value_;this.value_=i,this.reportChanged(),Ht(this)&&Kt(this,{type:nn,object:this,newValue:i,oldValue:a})},n.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(i){return mi(this,i)},n.observe_=function(i,a){return a&&i({observableKind:"value",debugObjectName:this.name_,object:this,type:nn,newValue:this.value_,oldValue:void 0}),gi(this,i)},n.raw=function(){return this.value_},n.toJSON=function(){return this.get()},n.toString=function(){return this.name_+"["+this.value_+"]"},n.valueOf=function(){return Zf(this.get())},n[Symbol.toPrimitive]=function(){return this.valueOf()},e}(Rn),Gt=function(){function t(n){this.dependenciesState_=ze.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=ze.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new ya(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.isTracing_=ga.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,n.get||Ge(31),this.derivation=n.get,this.name_=n.name||"ComputedValue",n.set&&(this.setter_=On("ComputedValue-setter",n.set)),this.equals_=n.equals||(n.compareStructural||n.struct?yr.structural:yr.default),this.scope_=n.context,this.requiresReaction_=n.requiresReaction,this.keepAlive_=!!n.keepAlive}var e=t.prototype;return e.onBecomeStale_=function(){Ky(this)},e.onBO=function(){this.onBOL&&this.onBOL.forEach(function(r){return r()})},e.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(r){return r()})},e.get=function(){if(this.isComputing&&Ge(32,this.name_,this.derivation),Oe.inBatch===0&&this.observers_.size===0&&!this.keepAlive_)Nu(this)&&(this.warnAboutUntrackedRead_(),Bt(),this.value_=this.computeValue_(!1),Mt());else if(gh(this),Nu(this)){var r=Oe.trackingContext;this.keepAlive_&&!r&&(Oe.trackingContext=this),this.trackAndCompute()&&Hy(this),Oe.trackingContext=r}var i=this.value_;if(aa(i))throw i.cause;return i},e.set=function(r){if(this.setter_){this.isRunningSetter&&Ge(33,this.name_),this.isRunningSetter=!0;try{this.setter_.call(this.scope_,r)}finally{this.isRunningSetter=!1}}else Ge(34,this.name_)},e.trackAndCompute=function(){var r=this.value_,i=this.dependenciesState_===ze.NOT_TRACKING_,a=this.computeValue_(!0),o=i||aa(r)||aa(a)||!this.equals_(r,a);return o&&(this.value_=a),o},e.computeValue_=function(r){this.isComputing=!0;var i=Ua(!1),a;if(r)a=dh(this,this.derivation,this.scope_);else if(Oe.disableErrorBoundaries===!0)a=this.derivation.call(this.scope_);else try{a=this.derivation.call(this.scope_)}catch(o){a=new ya(o)}return Va(i),this.isComputing=!1,a},e.suspend_=function(){this.keepAlive_||(Ou(this),this.value_=void 0)},e.observe_=function(r,i){var a=this,o=!0,l=void 0;return Ka(function(){var c=a.get();if(!o||i){var f=Yn();r({observableKind:"computed",debugObjectName:a.name_,type:nn,object:a,newValue:c,oldValue:l}),ln(f)}o=!1,l=c})},e.warnAboutUntrackedRead_=function(){},e.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},e.valueOf=function(){return Zf(this.get())},e[Symbol.toPrimitive]=function(){return this.valueOf()},Ar(t,[{key:"isComputing",get:function(){return Tt(this.flags_,t.isComputingMask_)},set:function(r){this.flags_=Ct(this.flags_,t.isComputingMask_,r)}},{key:"isRunningSetter",get:function(){return Tt(this.flags_,t.isRunningSetterMask_)},set:function(r){this.flags_=Ct(this.flags_,t.isRunningSetterMask_,r)}},{key:"isBeingObserved",get:function(){return Tt(this.flags_,t.isBeingObservedMask_)},set:function(r){this.flags_=Ct(this.flags_,t.isBeingObservedMask_,r)}},{key:"isPendingUnobservation",get:function(){return Tt(this.flags_,t.isPendingUnobservationMask_)},set:function(r){this.flags_=Ct(this.flags_,t.isPendingUnobservationMask_,r)}},{key:"diffValue",get:function(){return Tt(this.flags_,t.diffValueMask_)?1:0},set:function(r){this.flags_=Ct(this.flags_,t.diffValueMask_,r===1)}}])}();Gt.isComputingMask_=1;Gt.isRunningSetterMask_=2;Gt.isBeingObservedMask_=4;Gt.isPendingUnobservationMask_=8;Gt.diffValueMask_=16;var qa=Jn("ComputedValue",Gt),ze;(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_"})(ze||(ze={}));var ga;(function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK"})(ga||(ga={}));var ya=function(e){this.cause=void 0,this.cause=e};function aa(t){return t instanceof ya}function Nu(t){switch(t.dependenciesState_){case ze.UP_TO_DATE_:return!1;case ze.NOT_TRACKING_:case ze.STALE_:return!0;case ze.POSSIBLY_STALE_:{for(var e=rl(!0),n=Yn(),r=t.observing_,i=r.length,a=0;a<i;a++){var o=r[a];if(qa(o)){if(Oe.disableErrorBoundaries)o.get();else try{o.get()}catch{return ln(n),Yr(e),!0}if(t.dependenciesState_===ze.STALE_)return ln(n),Yr(e),!0}}return hh(t),ln(n),Yr(e),!1}}}function dh(t,e,n){var r=rl(!0);hh(t),t.newObserving_=new Array(t.runId_===0?100:t.observing_.length),t.unboundDepsCount_=0,t.runId_=++Oe.runId;var i=Oe.trackingDerivation;Oe.trackingDerivation=t,Oe.inBatch++;var a;if(Oe.disableErrorBoundaries===!0)a=e.call(n);else try{a=e.call(n)}catch(o){a=new ya(o)}return Oe.inBatch--,Oe.trackingDerivation=i,Vy(t),Yr(r),a}function Vy(t){for(var e=t.observing_,n=t.observing_=t.newObserving_,r=ze.UP_TO_DATE_,i=0,a=t.unboundDepsCount_,o=0;o<a;o++){var l=n[o];l.diffValue===0&&(l.diffValue=1,i!==o&&(n[i]=l),i++),l.dependenciesState_>r&&(r=l.dependenciesState_)}for(n.length=i,t.newObserving_=null,a=e.length;a--;){var c=e[a];c.diffValue===0&&ph(c,t),c.diffValue=0}for(;i--;){var f=n[i];f.diffValue===1&&(f.diffValue=0,qy(f,t))}r!==ze.UP_TO_DATE_&&(t.dependenciesState_=r,t.onBecomeStale_())}function Ou(t){var e=t.observing_;t.observing_=[];for(var n=e.length;n--;)ph(e[n],t);t.dependenciesState_=ze.NOT_TRACKING_}function fh(t){var e=Yn();try{return t()}finally{ln(e)}}function Yn(){var t=Oe.trackingDerivation;return Oe.trackingDerivation=null,t}function ln(t){Oe.trackingDerivation=t}function rl(t){var e=Oe.allowStateReads;return Oe.allowStateReads=t,e}function Yr(t){Oe.allowStateReads=t}function hh(t){if(t.dependenciesState_!==ze.UP_TO_DATE_){t.dependenciesState_=ze.UP_TO_DATE_;for(var e=t.observing_,n=e.length;n--;)e[n].lowestObserverState_=ze.UP_TO_DATE_}}var eo=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},to=!0,Oe=function(){var t=zf();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(to=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==new eo().version&&(to=!1),to?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new eo):(setTimeout(function(){Ge(35)},1),new eo)}();function qy(t,e){t.observers_.add(e),t.lowestObserverState_>e.dependenciesState_&&(t.lowestObserverState_=e.dependenciesState_)}function ph(t,e){t.observers_.delete(e),t.observers_.size===0&&mh(t)}function mh(t){t.isPendingUnobservation===!1&&(t.isPendingUnobservation=!0,Oe.pendingUnobservations.push(t))}function Bt(){Oe.inBatch++}function Mt(){if(--Oe.inBatch===0){vh();for(var t=Oe.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 Gt&&n.suspend_())}Oe.pendingUnobservations=[]}}function gh(t){var e=Oe.trackingDerivation;return e!==null?(e.runId_!==t.lastAccessedBy_&&(t.lastAccessedBy_=e.runId_,e.newObserving_[e.unboundDepsCount_++]=t,!t.isBeingObserved&&Oe.trackingContext&&(t.isBeingObserved=!0,t.onBO())),t.isBeingObserved):(t.observers_.size===0&&Oe.inBatch>0&&mh(t),!1)}function yh(t){t.lowestObserverState_!==ze.STALE_&&(t.lowestObserverState_=ze.STALE_,t.observers_.forEach(function(e){e.dependenciesState_===ze.UP_TO_DATE_&&e.onBecomeStale_(),e.dependenciesState_=ze.STALE_}))}function Hy(t){t.lowestObserverState_!==ze.STALE_&&(t.lowestObserverState_=ze.STALE_,t.observers_.forEach(function(e){e.dependenciesState_===ze.POSSIBLY_STALE_?e.dependenciesState_=ze.STALE_:e.dependenciesState_===ze.UP_TO_DATE_&&(t.lowestObserverState_=ze.UP_TO_DATE_)}))}function Ky(t){t.lowestObserverState_===ze.UP_TO_DATE_&&(t.lowestObserverState_=ze.POSSIBLY_STALE_,t.observers_.forEach(function(e){e.dependenciesState_===ze.UP_TO_DATE_&&(e.dependenciesState_=ze.POSSIBLY_STALE_,e.onBecomeStale_())}))}var cn=function(){function t(n,r,i,a){n===void 0&&(n="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=ze.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=ga.NONE,this.name_=n,this.onInvalidate_=r,this.errorHandler_=i,this.requiresObservable_=a}var e=t.prototype;return e.onBecomeStale_=function(){this.schedule_()},e.schedule_=function(){this.isScheduled||(this.isScheduled=!0,Oe.pendingReactions.push(this),vh())},e.runReaction_=function(){if(!this.isDisposed){Bt(),this.isScheduled=!1;var r=Oe.trackingContext;if(Oe.trackingContext=this,Nu(this)){this.isTrackPending=!0;try{this.onInvalidate_()}catch(i){this.reportExceptionInDerivation_(i)}}Oe.trackingContext=r,Mt()}},e.track=function(r){if(!this.isDisposed){Bt(),this.isRunning=!0;var i=Oe.trackingContext;Oe.trackingContext=this;var a=dh(this,r,void 0);Oe.trackingContext=i,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&Ou(this),aa(a)&&this.reportExceptionInDerivation_(a.cause),Mt()}},e.reportExceptionInDerivation_=function(r){var i=this;if(this.errorHandler_){this.errorHandler_(r,this);return}if(Oe.disableErrorBoundaries)throw r;var a="[mobx] uncaught error in '"+this+"'";Oe.suppressReactionErrors||console.error(a,r),Oe.globalReactionErrorHandlers.forEach(function(o){return o(r,i)})},e.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(Bt(),Ou(this),Mt()))},e.getDisposer_=function(r){var i=this,a=function o(){i.dispose(),r==null||r.removeEventListener==null||r.removeEventListener("abort",o)};return r==null||r.addEventListener==null||r.addEventListener("abort",a),a[Ie]=this,a},e.toString=function(){return"Reaction["+this.name_+"]"},e.trace=function(r){},Ar(t,[{key:"isDisposed",get:function(){return Tt(this.flags_,t.isDisposedMask_)},set:function(r){this.flags_=Ct(this.flags_,t.isDisposedMask_,r)}},{key:"isScheduled",get:function(){return Tt(this.flags_,t.isScheduledMask_)},set:function(r){this.flags_=Ct(this.flags_,t.isScheduledMask_,r)}},{key:"isTrackPending",get:function(){return Tt(this.flags_,t.isTrackPendingMask_)},set:function(r){this.flags_=Ct(this.flags_,t.isTrackPendingMask_,r)}},{key:"isRunning",get:function(){return Tt(this.flags_,t.isRunningMask_)},set:function(r){this.flags_=Ct(this.flags_,t.isRunningMask_,r)}},{key:"diffValue",get:function(){return Tt(this.flags_,t.diffValueMask_)?1:0},set:function(r){this.flags_=Ct(this.flags_,t.diffValueMask_,r===1)}}])}();cn.isDisposedMask_=1;cn.isScheduledMask_=2;cn.isTrackPendingMask_=4;cn.isRunningMask_=8;cn.diffValueMask_=16;var zy=100,Gy=function(e){return e()};function vh(){Oe.inBatch>0||Oe.isRunningReactions||Gy(Wy)}function Wy(){Oe.isRunningReactions=!0;for(var t=Oe.pendingReactions,e=0;t.length>0;){++e===zy&&(console.error("[mobx] cycle in reaction: "+t[0]),t.splice(0));for(var n=t.splice(0),r=0,i=n.length;r<i;r++)n[r].runReaction_()}Oe.isRunningReactions=!1}var va=Jn("Reaction",cn);function Qr(){return!1}function Jy(t){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}var bh="action",Yy="action.bound",kh="autoAction",Qy="autoAction.bound",Xy="<unnamed action>",Ru=pi(bh),Zy=pi(Yy,{bound:!0}),Tu=pi(kh,{autoAction:!0}),ev=pi(Qy,{autoAction:!0,bound:!0});function _h(t){var e=function(r,i){if(zt(r))return On(r.name||Xy,r,t);if(zt(i))return On(r,i,t);if(hi(i))return(t?Tu:Ru).decorate_20223_(r,i);if(Hn(i))return Er(r,i,t?Tu:Ru);if(Hn(r))return tn(pi(t?kh:bh,{name:r,autoAction:t}))};return e}var Rt=_h(!1);Object.assign(Rt,Ru);var ii=_h(!0);Object.assign(ii,Tu);Rt.bound=tn(Zy);ii.bound=tn(ev);function Ha(t){return zt(t)&&t.isMobxAction===!0}function Ka(t,e){var n,r,i,a;e===void 0&&(e=el);var o=(n=(r=e)==null?void 0:r.name)!=null?n:"Autorun",l=!e.scheduler&&!e.delay,c;if(l)c=new cn(o,function(){this.track(y)},e.onError,e.requiresObservable);else{var f=Sh(e),h=!1;c=new cn(o,function(){h||(h=!0,f(function(){h=!1,c.isDisposed||c.track(y)}))},e.onError,e.requiresObservable)}function y(){t(c)}return(i=e)!=null&&(i=i.signal)!=null&&i.aborted||c.schedule_(),c.getDisposer_((a=e)==null?void 0:a.signal)}var tv=function(e){return e()};function Sh(t){return t.scheduler?t.scheduler:t.delay?function(e){return setTimeout(e,t.delay)}:tv}function nv(t,e,n){var r,i,a;n===void 0&&(n=el);var o=(r=n.name)!=null?r:"Reaction",l=Rt(o,n.onError?rv(n.onError,e):e),c=!n.scheduler&&!n.delay,f=Sh(n),h=!0,y=!1,m,O=n.compareStructural?yr.structural:n.equals||yr.default,A=new cn(o,function(){h||c?E():y||(y=!0,f(E))},n.onError,n.requiresObservable);function E(){if(y=!1,!A.isDisposed){var b=!1,k=m;A.track(function(){var C=ch(!1,function(){return t(A)});b=h||!O(m,C),m=C}),(h&&n.fireImmediately||!h&&b)&&l(m,k,A),h=!1}}return(i=n)!=null&&(i=i.signal)!=null&&i.aborted||A.schedule_(),A.getDisposer_((a=n)==null?void 0:a.signal)}function rv(t,e){return function(){try{return e.apply(this,arguments)}catch(n){t.call(this,n)}}}var iv="onBO",av="onBUO";function sv(t,e,n){return Eh(iv,t,e,n)}function Ah(t,e,n){return Eh(av,t,e,n)}function Eh(t,e,n,r){var i=Cu(e),a=zt(r)?r:n,o=t+"L";return i[o]?i[o].add(a):i[o]=new Set([a]),function(){var l=i[o];l&&(l.delete(a),l.size===0&&delete i[o])}}function ov(t,e,n,r){var i=zg(e);return Xn(function(){var a=Nr(t,r)[Ie];ja(i).forEach(function(o){a.extend_(o,i[o],n&&o in n?n[o]:!0)})}),t}var uv=0;function wh(){this.message="FLOW_CANCELLED"}wh.prototype=Object.create(Error.prototype);var no=rh("flow"),lv=rh("flow.bound",{bound:!0}),vr=Object.assign(function(e,n){if(hi(n))return no.decorate_20223_(e,n);if(Hn(n))return Er(e,n,no);var r=e,i=r.name||"<unnamed flow>",a=function(){var l=this,c=arguments,f=++uv,h=Rt(i+" - runid: "+f+" - init",r).apply(l,c),y,m=void 0,O=new Promise(function(A,E){var b=0;y=E;function k(R){m=void 0;var x;try{x=Rt(i+" - runid: "+f+" - yield "+b++,h.next).call(h,R)}catch(z){return E(z)}S(x)}function C(R){m=void 0;var x;try{x=Rt(i+" - runid: "+f+" - yield "+b++,h.throw).call(h,R)}catch(z){return E(z)}S(x)}function S(R){if(zt(R==null?void 0:R.then)){R.then(S,E);return}return R.done?A(R.value):(m=Promise.resolve(R.value),m.then(k,C))}k(void 0)});return O.cancel=Rt(i+" - runid: "+f+" - cancel",function(){try{m&&vc(m);var A=h.return(void 0),E=Promise.resolve(A.value);E.then(pr,pr),vc(E),y(new wh)}catch(b){y(b)}}),O};return a.isMobXFlow=!0,a},no);vr.bound=tn(lv);function vc(t){zt(t.cancel)&&t.cancel()}function ai(t){return(t==null?void 0:t.isMobXFlow)===!0}function cv(t,e){return t?Ga(t)||!!t[Ie]||tl(t)||va(t)||qa(t):!1}function Nh(t){return cv(t)}function on(t,e){e===void 0&&(e=void 0),Bt();try{return t.apply(e)}finally{Mt()}}function dv(t,e,n){return arguments.length===1||e&&typeof e=="object"?fv(t,e):Oh(t,e,{})}function Oh(t,e,n){var r;if(typeof n.timeout=="number"){var i=new Error("WHEN_TIMEOUT");r=setTimeout(function(){if(!o[Ie].isDisposed)if(o(),n.onError)n.onError(i);else throw i},n.timeout)}n.name="When";var a=On("When-effect",e),o=Ka(function(l){var c=ch(!1,t);c&&(l.dispose(),r&&clearTimeout(r),a())},n);return o}function fv(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 r,i,a=new Promise(function(o,l){var c,f=Oh(t,o,Nn({},e,{onError:l}));r=function(){f(),l(new Error("WHEN_CANCELLED"))},i=function(){f(),l(new Error("WHEN_ABORTED"))},e==null||(c=e.signal)==null||c.addEventListener==null||c.addEventListener("abort",i)}).finally(function(){var o;return e==null||(o=e.signal)==null||o.removeEventListener==null?void 0:o.removeEventListener("abort",i)});return a.cancel=r,a}function ur(t){return t[Ie]}var hv={has:function(e,n){return ur(e).has_(n)},get:function(e,n){return ur(e).get_(n)},set:function(e,n,r){var i;return Hn(n)?(i=ur(e).set_(n,r,!0))!=null?i:!0:!1},deleteProperty:function(e,n){var r;return Hn(n)?(r=ur(e).delete_(n,!0))!=null?r:!0:!1},defineProperty:function(e,n,r){var i;return(i=ur(e).defineProperty_(n,r))!=null?i:!0},ownKeys:function(e){return ur(e).ownKeys_()},preventExtensions:function(e){Ge(13)}};function pv(t,e){var n,r;return Wf(),t=Nr(t,e),(r=(n=t[Ie]).proxy_)!=null?r:n.proxy_=new Proxy(t,hv)}function $t(t){return t.interceptors_!==void 0&&t.interceptors_.length>0}function mi(t,e){var n=t.interceptors_||(t.interceptors_=[]);return n.push(e),Jf(function(){var r=n.indexOf(e);r!==-1&&n.splice(r,1)})}function jt(t,e){var n=Yn();try{for(var r=[].concat(t.interceptors_||[]),i=0,a=r.length;i<a&&(e=r[i](e),e&&!e.type&&Ge(14),!!e);i++);return e}finally{ln(n)}}function Ht(t){return t.changeListeners_!==void 0&&t.changeListeners_.length>0}function gi(t,e){var n=t.changeListeners_||(t.changeListeners_=[]);return n.push(e),Jf(function(){var r=n.indexOf(e);r!==-1&&n.splice(r,1)})}function Kt(t,e){var n=Yn(),r=t.changeListeners_;if(r){r=r.slice();for(var i=0,a=r.length;i<a;i++)r[i](e);ln(n)}}function mv(t,e,n){return Xn(function(){var r,i=Nr(t,n)[Ie];(r=e)!=null||(e=Qg(t)),ja(e).forEach(function(a){return i.make_(a,e[a])})}),t}var bc="splice",nn="update",gv=1e4,yv={get:function(e,n){var r=e[Ie];return n===Ie?r:n==="length"?r.getArrayLength_():typeof n=="string"&&!isNaN(n)?r.get_(parseInt(n)):un(ba,n)?ba[n]:e[n]},set:function(e,n,r){var i=e[Ie];return n==="length"&&i.setArrayLength_(r),typeof n=="symbol"||isNaN(n)?e[n]=r:i.set_(parseInt(n),r),!0},preventExtensions:function(){Ge(15)}},il=function(){function t(n,r,i,a){n===void 0&&(n="ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=i,this.legacyMode_=a,this.atom_=new Rn(n),this.enhancer_=function(o,l){return r(o,l,"ObservableArray[..]")}}var e=t.prototype;return e.dehanceValue_=function(r){return this.dehancer!==void 0?this.dehancer(r):r},e.dehanceValues_=function(r){return this.dehancer!==void 0&&r.length>0?r.map(this.dehancer):r},e.intercept_=function(r){return mi(this,r)},e.observe_=function(r,i){return i===void 0&&(i=!1),i&&r({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),gi(this,r)},e.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},e.setArrayLength_=function(r){(typeof r!="number"||isNaN(r)||r<0)&&Ge("Out of range: "+r);var i=this.values_.length;if(r!==i)if(r>i){for(var a=new Array(r-i),o=0;o<r-i;o++)a[o]=void 0;this.spliceWithArray_(i,0,a)}else this.spliceWithArray_(r,i-r)},e.updateArrayLength_=function(r,i){r!==this.lastKnownLength_&&Ge(16),this.lastKnownLength_+=i,this.legacyMode_&&i>0&&Ih(r+i+1)},e.spliceWithArray_=function(r,i,a){var o=this;this.atom_;var l=this.values_.length;if(r===void 0?r=0:r>l?r=l:r<0&&(r=Math.max(0,l+r)),arguments.length===1?i=l-r:i==null?i=0:i=Math.max(0,Math.min(i,l-r)),a===void 0&&(a=Su),$t(this)){var c=jt(this,{object:this.proxy_,type:bc,index:r,removedCount:i,added:a});if(!c)return Su;i=c.removedCount,a=c.added}if(a=a.length===0?a:a.map(function(y){return o.enhancer_(y,void 0)}),this.legacyMode_){var f=a.length-i;this.updateArrayLength_(l,f)}var h=this.spliceItemsIntoValues_(r,i,a);return(i!==0||a.length!==0)&&this.notifyArraySplice_(r,a,h),this.dehanceValues_(h)},e.spliceItemsIntoValues_=function(r,i,a){if(a.length<gv){var o;return(o=this.values_).splice.apply(o,[r,i].concat(a))}else{var l=this.values_.slice(r,r+i),c=this.values_.slice(r+i);this.values_.length+=a.length-i;for(var f=0;f<a.length;f++)this.values_[r+f]=a[f];for(var h=0;h<c.length;h++)this.values_[r+a.length+h]=c[h];return l}},e.notifyArrayChildUpdate_=function(r,i,a){var o=!this.owned_&&Qr(),l=Ht(this),c=l||o?{observableKind:"array",object:this.proxy_,type:nn,debugObjectName:this.atom_.name_,index:r,newValue:i,oldValue:a}:null;this.atom_.reportChanged(),l&&Kt(this,c)},e.notifyArraySplice_=function(r,i,a){var o=!this.owned_&&Qr(),l=Ht(this),c=l||o?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:bc,index:r,removed:a,added:i,removedCount:a.length,addedCount:i.length}:null;this.atom_.reportChanged(),l&&Kt(this,c)},e.get_=function(r){if(this.legacyMode_&&r>=this.values_.length){console.warn("[mobx] Out of bounds read: "+r);return}return this.atom_.reportObserved(),this.dehanceValue_(this.values_[r])},e.set_=function(r,i){var a=this.values_;if(this.legacyMode_&&r>a.length&&Ge(17,r,a.length),r<a.length){this.atom_;var o=a[r];if($t(this)){var l=jt(this,{type:nn,object:this.proxy_,index:r,newValue:i});if(!l)return;i=l.newValue}i=this.enhancer_(i,o);var c=i!==o;c&&(a[r]=i,this.notifyArrayChildUpdate_(r,i,o))}else{for(var f=new Array(r+1-a.length),h=0;h<f.length-1;h++)f[h]=void 0;f[f.length-1]=i,this.spliceWithArray_(a.length,0,f)}},t}();function vv(t,e,n,r){return n===void 0&&(n="ObservableArray"),r===void 0&&(r=!1),Wf(),Xn(function(){var i=new il(n,e,r,!1);Qf(i.values_,Ie,i);var a=new Proxy(i.values_,yv);return i.proxy_=a,t&&t.length&&i.spliceWithArray_(0,0,t),a})}var ba={clear:function(){return this.splice(0)},replace:function(e){var n=this[Ie];return n.spliceWithArray_(0,n.values_.length,e)},toJSON:function(){return this.slice()},splice:function(e,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),a=2;a<r;a++)i[a-2]=arguments[a];var o=this[Ie];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray_(e);case 2:return o.spliceWithArray_(e,n)}return o.spliceWithArray_(e,n,i)},spliceWithArray:function(e,n,r){return this[Ie].spliceWithArray_(e,n,r)},push:function(){for(var e=this[Ie],n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return e.spliceWithArray_(e.values_.length,0,r),e.values_.length},pop:function(){return this.splice(Math.max(this[Ie].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=this[Ie],n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return e.spliceWithArray_(0,0,r),e.values_.length},reverse:function(){return Oe.trackingDerivation&&Ge(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){Oe.trackingDerivation&&Ge(37,"sort");var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var n=this[Ie],r=n.dehanceValues_(n.values_).indexOf(e);return r>-1?(this.splice(r,1),!0):!1}};Xe("at",Pt);Xe("concat",Pt);Xe("flat",Pt);Xe("includes",Pt);Xe("indexOf",Pt);Xe("join",Pt);Xe("lastIndexOf",Pt);Xe("slice",Pt);Xe("toString",Pt);Xe("toLocaleString",Pt);Xe("toSorted",Pt);Xe("toSpliced",Pt);Xe("with",Pt);Xe("every",Wt);Xe("filter",Wt);Xe("find",Wt);Xe("findIndex",Wt);Xe("findLast",Wt);Xe("findLastIndex",Wt);Xe("flatMap",Wt);Xe("forEach",Wt);Xe("map",Wt);Xe("some",Wt);Xe("toReversed",Wt);Xe("reduce",Rh);Xe("reduceRight",Rh);function Xe(t,e){typeof Array.prototype[t]=="function"&&(ba[t]=e(t))}function Pt(t){return function(){var e=this[Ie];e.atom_.reportObserved();var n=e.dehanceValues_(e.values_);return n[t].apply(n,arguments)}}function Wt(t){return function(e,n){var r=this,i=this[Ie];i.atom_.reportObserved();var a=i.dehanceValues_(i.values_);return a[t](function(o,l){return e.call(n,o,l,r)})}}function Rh(t){return function(){var e=this,n=this[Ie];n.atom_.reportObserved();var r=n.dehanceValues_(n.values_),i=arguments[0];return arguments[0]=function(a,o,l){return i(a,o,l,e)},r[t].apply(r,arguments)}}var bv=Jn("ObservableArrayAdministration",il);function za(t){return La(t)&&bv(t[Ie])}var kv={},An="add",ka="delete",Th=function(){function t(n,r,i){var a=this;r===void 0&&(r=Kn),i===void 0&&(i="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[Ie]=kv,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_=r,this.name_=i,zt(Map)||Ge(18),Xn(function(){a.keysAtom_=th("ObservableMap.keys()"),a.data_=new Map,a.hasMap_=new Map,n&&a.merge(n)})}var e=t.prototype;return e.has_=function(r){return this.data_.has(r)},e.has=function(r){var i=this;if(!Oe.trackingDerivation)return this.has_(r);var a=this.hasMap_.get(r);if(!a){var o=a=new Un(this.has_(r),Ba,"ObservableMap.key?",!1);this.hasMap_.set(r,o),Ah(o,function(){return i.hasMap_.delete(r)})}return a.get()},e.set=function(r,i){var a=this.has_(r);if($t(this)){var o=jt(this,{type:a?nn:An,object:this,newValue:i,name:r});if(!o)return this;i=o.newValue}return a?this.updateValue_(r,i):this.addValue_(r,i),this},e.delete=function(r){var i=this;if(this.keysAtom_,$t(this)){var a=jt(this,{type:ka,object:this,name:r});if(!a)return!1}if(this.has_(r)){var o=Qr(),l=Ht(this),c=l||o?{observableKind:"map",debugObjectName:this.name_,type:ka,object:this,oldValue:this.data_.get(r).value_,name:r}:null;return on(function(){var f;i.keysAtom_.reportChanged(),(f=i.hasMap_.get(r))==null||f.setNewValue_(!1);var h=i.data_.get(r);h.setNewValue_(void 0),i.data_.delete(r)}),l&&Kt(this,c),!0}return!1},e.updateValue_=function(r,i){var a=this.data_.get(r);if(i=a.prepareNewValue_(i),i!==Oe.UNCHANGED){var o=Qr(),l=Ht(this),c=l||o?{observableKind:"map",debugObjectName:this.name_,type:nn,object:this,oldValue:a.value_,name:r,newValue:i}:null;a.setNewValue_(i),l&&Kt(this,c)}},e.addValue_=function(r,i){var a=this;this.keysAtom_,on(function(){var f,h=new Un(i,a.enhancer_,"ObservableMap.key",!1);a.data_.set(r,h),i=h.value_,(f=a.hasMap_.get(r))==null||f.setNewValue_(!0),a.keysAtom_.reportChanged()});var o=Qr(),l=Ht(this),c=l||o?{observableKind:"map",debugObjectName:this.name_,type:An,object:this,name:r,newValue:i}:null;l&&Kt(this,c)},e.get=function(r){return this.has(r)?this.dehanceValue_(this.data_.get(r).get()):this.dehanceValue_(void 0)},e.dehanceValue_=function(r){return this.dehancer!==void 0?this.dehancer(r):r},e.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},e.values=function(){var r=this,i=this.keys();return si({next:function(){var o=i.next(),l=o.done,c=o.value;return{done:l,value:l?void 0:r.get(c)}}})},e.entries=function(){var r=this,i=this.keys();return si({next:function(){var o=i.next(),l=o.done,c=o.value;return{done:l,value:l?void 0:[c,r.get(c)]}}})},e[Symbol.iterator]=function(){return this.entries()},e.forEach=function(r,i){for(var a=mr(this),o;!(o=a()).done;){var l=o.value,c=l[0],f=l[1];r.call(i,f,c,this)}},e.merge=function(r){var i=this;return Qn(r)&&(r=new Map(r)),on(function(){wn(r)?Kg(r).forEach(function(a){return i.set(a,r[a])}):Array.isArray(r)?r.forEach(function(a){var o=a[0],l=a[1];return i.set(o,l)}):Sr(r)?(Hg(r)||Ge(19,r),r.forEach(function(a,o){return i.set(o,a)})):r!=null&&Ge(20,r)}),this},e.clear=function(){var r=this;on(function(){fh(function(){for(var i=mr(r.keys()),a;!(a=i()).done;){var o=a.value;r.delete(o)}})})},e.replace=function(r){var i=this;return on(function(){for(var a=_v(r),o=new Map,l=!1,c=mr(i.data_.keys()),f;!(f=c()).done;){var h=f.value;if(!a.has(h)){var y=i.delete(h);if(y)l=!0;else{var m=i.data_.get(h);o.set(h,m)}}}for(var O=mr(a.entries()),A;!(A=O()).done;){var E=A.value,b=E[0],k=E[1],C=i.data_.has(b);if(i.set(b,k),i.data_.has(b)){var S=i.data_.get(b);o.set(b,S),C||(l=!0)}}if(!l)if(i.data_.size!==o.size)i.keysAtom_.reportChanged();else for(var R=i.data_.keys(),x=o.keys(),z=R.next(),I=x.next();!z.done;){if(z.value!==I.value){i.keysAtom_.reportChanged();break}z=R.next(),I=x.next()}i.data_=o}),this},e.toString=function(){return"[object ObservableMap]"},e.toJSON=function(){return Array.from(this)},e.observe_=function(r,i){return gi(this,r)},e.intercept_=function(r){return mi(this,r)},Ar(t,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Map"}}])}(),Qn=Jn("ObservableMap",Th);function _v(t){if(Sr(t)||Qn(t))return t;if(Array.isArray(t))return new Map(t);if(wn(t)){var e=new Map;for(var n in t)e.set(n,t[n]);return e}else return Ge(21,t)}var Sv={},Ch=function(){function t(n,r,i){var a=this;r===void 0&&(r=Kn),i===void 0&&(i="ObservableSet"),this.name_=void 0,this[Ie]=Sv,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_=i,zt(Set)||Ge(22),this.enhancer_=function(o,l){return r(o,l,i)},Xn(function(){a.atom_=th(a.name_),n&&a.replace(n)})}var e=t.prototype;return e.dehanceValue_=function(r){return this.dehancer!==void 0?this.dehancer(r):r},e.clear=function(){var r=this;on(function(){fh(function(){for(var i=mr(r.data_.values()),a;!(a=i()).done;){var o=a.value;r.delete(o)}})})},e.forEach=function(r,i){for(var a=mr(this),o;!(o=a()).done;){var l=o.value;r.call(i,l,l,this)}},e.add=function(r){var i=this;if(this.atom_,$t(this)){var a=jt(this,{type:An,object:this,newValue:r});if(!a)return this}if(!this.has(r)){on(function(){i.data_.add(i.enhancer_(r,void 0)),i.atom_.reportChanged()});var o=!1,l=Ht(this),c=l||o?{observableKind:"set",debugObjectName:this.name_,type:An,object:this,newValue:r}:null;l&&Kt(this,c)}return this},e.delete=function(r){var i=this;if($t(this)){var a=jt(this,{type:ka,object:this,oldValue:r});if(!a)return!1}if(this.has(r)){var o=!1,l=Ht(this),c=l||o?{observableKind:"set",debugObjectName:this.name_,type:ka,object:this,oldValue:r}:null;return on(function(){i.atom_.reportChanged(),i.data_.delete(r)}),l&&Kt(this,c),!0}return!1},e.has=function(r){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(r))},e.entries=function(){var r=0,i=Array.from(this.keys()),a=Array.from(this.values());return si({next:function(){var l=r;return r+=1,l<a.length?{value:[i[l],a[l]],done:!1}:{done:!0}}})},e.keys=function(){return this.values()},e.values=function(){this.atom_.reportObserved();var r=this,i=0,a=Array.from(this.data_.values());return si({next:function(){return i<a.length?{value:r.dehanceValue_(a[i++]),done:!1}:{done:!0}}})},e.intersection=function(r){if(sn(r))return r.intersection(this);var i=new Set(this);return i.intersection(r)},e.union=function(r){if(sn(r))return r.union(this);var i=new Set(this);return i.union(r)},e.difference=function(r){return new Set(this).difference(r)},e.symmetricDifference=function(r){if(sn(r))return r.symmetricDifference(this);var i=new Set(this);return i.symmetricDifference(r)},e.isSubsetOf=function(r){return new Set(this).isSubsetOf(r)},e.isSupersetOf=function(r){return new Set(this).isSupersetOf(r)},e.isDisjointFrom=function(r){if(sn(r))return r.isDisjointFrom(this);var i=new Set(this);return i.isDisjointFrom(r)},e.replace=function(r){var i=this;return wr(r)&&(r=new Set(r)),on(function(){Array.isArray(r)?(i.clear(),r.forEach(function(a){return i.add(a)})):sn(r)?(i.clear(),r.forEach(function(a){return i.add(a)})):r!=null&&Ge("Cannot initialize set from "+r)}),this},e.observe_=function(r,i){return gi(this,r)},e.intercept_=function(r){return mi(this,r)},e.toJSON=function(){return Array.from(this)},e.toString=function(){return"[object ObservableSet]"},e[Symbol.iterator]=function(){return this.values()},Ar(t,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Set"}}])}(),wr=Jn("ObservableSet",Ch),kc=Object.create(null),_c="remove",xh=function(){function t(n,r,i,a){r===void 0&&(r=new Map),a===void 0&&(a=_y),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_=r,this.name_=i,this.defaultAnnotation_=a,this.keysAtom_=new Rn("ObservableObject.keys"),this.isPlainObject_=wn(this.target_)}var e=t.prototype;return e.getObservablePropValue_=function(r){return this.values_.get(r).get()},e.setObservablePropValue_=function(r,i){var a=this.values_.get(r);if(a instanceof Gt)return a.set(i),!0;if($t(this)){var o=jt(this,{type:nn,object:this.proxy_||this.target_,name:r,newValue:i});if(!o)return null;i=o.newValue}if(i=a.prepareNewValue_(i),i!==Oe.UNCHANGED){var l=Ht(this),c=!1,f=l||c?{type:nn,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:a.value_,name:r,newValue:i}:null;a.setNewValue_(i),l&&Kt(this,f)}return!0},e.get_=function(r){return Oe.trackingDerivation&&!un(this.target_,r)&&this.has_(r),this.target_[r]},e.set_=function(r,i,a){return a===void 0&&(a=!1),un(this.target_,r)?this.values_.has(r)?this.setObservablePropValue_(r,i):a?Reflect.set(this.target_,r,i):(this.target_[r]=i,!0):this.extend_(r,{value:i,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,a)},e.has_=function(r){if(!Oe.trackingDerivation)return r in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var i=this.pendingKeys_.get(r);return i||(i=new Un(r in this.target_,Ba,"ObservableObject.key?",!1),this.pendingKeys_.set(r,i)),i.get()},e.make_=function(r,i){if(i===!0&&(i=this.defaultAnnotation_),i!==!1){if(!(r in this.target_)){var a;if((a=this.target_[Xt])!=null&&a[r])return;Ge(1,i.annotationType_,this.name_+"."+r.toString())}for(var o=this.target_;o&&o!==Da;){var l=pa(o,r);if(l){var c=i.make_(this,r,l,o);if(c===0)return;if(c===1)break}o=Object.getPrototypeOf(o)}Ac(this,i,r)}},e.extend_=function(r,i,a,o){if(o===void 0&&(o=!1),a===!0&&(a=this.defaultAnnotation_),a===!1)return this.defineProperty_(r,i,o);var l=a.extend_(this,r,i,o);return l&&Ac(this,a,r),l},e.defineProperty_=function(r,i,a){a===void 0&&(a=!1),this.keysAtom_;try{Bt();var o=this.delete_(r);if(!o)return o;if($t(this)){var l=jt(this,{object:this.proxy_||this.target_,name:r,type:An,newValue:i.value});if(!l)return null;var c=l.newValue;i.value!==c&&(i=Nn({},i,{value:c}))}if(a){if(!Reflect.defineProperty(this.target_,r,i))return!1}else en(this.target_,r,i);this.notifyPropertyAddition_(r,i.value)}finally{Mt()}return!0},e.defineObservableProperty_=function(r,i,a,o){o===void 0&&(o=!1),this.keysAtom_;try{Bt();var l=this.delete_(r);if(!l)return l;if($t(this)){var c=jt(this,{object:this.proxy_||this.target_,name:r,type:An,newValue:i});if(!c)return null;i=c.newValue}var f=Sc(r),h={configurable:Oe.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:f.get,set:f.set};if(o){if(!Reflect.defineProperty(this.target_,r,h))return!1}else en(this.target_,r,h);var y=new Un(i,a,"ObservableObject.key",!1);this.values_.set(r,y),this.notifyPropertyAddition_(r,y.value_)}finally{Mt()}return!0},e.defineComputedProperty_=function(r,i,a){a===void 0&&(a=!1),this.keysAtom_;try{Bt();var o=this.delete_(r);if(!o)return o;if($t(this)){var l=jt(this,{object:this.proxy_||this.target_,name:r,type:An,newValue:void 0});if(!l)return null}i.name||(i.name="ObservableObject.key"),i.context=this.proxy_||this.target_;var c=Sc(r),f={configurable:Oe.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:c.get,set:c.set};if(a){if(!Reflect.defineProperty(this.target_,r,f))return!1}else en(this.target_,r,f);this.values_.set(r,new Gt(i)),this.notifyPropertyAddition_(r,void 0)}finally{Mt()}return!0},e.delete_=function(r,i){if(i===void 0&&(i=!1),this.keysAtom_,!un(this.target_,r))return!0;if($t(this)){var a=jt(this,{object:this.proxy_||this.target_,name:r,type:_c});if(!a)return null}try{var o;Bt();var l=Ht(this),c=!1,f=this.values_.get(r),h=void 0;if(!f&&(l||c)){var y;h=(y=pa(this.target_,r))==null?void 0:y.value}if(i){if(!Reflect.deleteProperty(this.target_,r))return!1}else delete this.target_[r];if(f&&(this.values_.delete(r),f instanceof Un&&(h=f.value_),yh(f)),this.keysAtom_.reportChanged(),(o=this.pendingKeys_)==null||(o=o.get(r))==null||o.set(r in this.target_),l||c){var m={type:_c,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:h,name:r};l&&Kt(this,m)}}finally{Mt()}return!0},e.observe_=function(r,i){return gi(this,r)},e.intercept_=function(r){return mi(this,r)},e.notifyPropertyAddition_=function(r,i){var a,o=Ht(this),l=!1;if(o||l){var c=o||l?{type:An,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:r,newValue:i}:null;o&&Kt(this,c)}(a=this.pendingKeys_)==null||(a=a.get(r))==null||a.set(!0),this.keysAtom_.reportChanged()},e.ownKeys_=function(){return this.keysAtom_.reportObserved(),ja(this.target_)},e.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},t}();function Nr(t,e){var n;if(un(t,Ie))return t;var r=(n=e==null?void 0:e.name)!=null?n:"ObservableObject",i=new xh(t,new Map,String(r),Py(e));return $a(t,Ie,i),t}var Av=Jn("ObservableObjectAdministration",xh);function Sc(t){return kc[t]||(kc[t]={get:function(){return this[Ie].getObservablePropValue_(t)},set:function(n){return this[Ie].setObservablePropValue_(t,n)}})}function Ga(t){return La(t)?Av(t[Ie]):!1}function Ac(t,e,n){var r;(r=t.target_[Xt])==null||delete r[n]}var Ev=Fh(0),wv=function(){var t=!1,e={};return Object.defineProperty(e,"0",{set:function(){t=!0}}),Object.create(e)[0]=1,t===!1}(),ro=0,Ph=function(){};function Nv(t,e){Object.setPrototypeOf?Object.setPrototypeOf(t.prototype,e):t.prototype.__proto__!==void 0?t.prototype.__proto__=e:t.prototype=e}Nv(Ph,Array.prototype);var al=function(t){function e(r,i,a,o){var l;return a===void 0&&(a="ObservableArray"),o===void 0&&(o=!1),l=t.call(this)||this,Xn(function(){var c=new il(a,i,o,!0);c.proxy_=l,Qf(l,Ie,c),r&&r.length&&l.spliceWithArray(0,0,r),wv&&Object.defineProperty(l,"0",Ev)}),l}eh(e,t);var n=e.prototype;return n.concat=function(){this[Ie].atom_.reportObserved();for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return Array.prototype.concat.apply(this.slice(),a.map(function(l){return za(l)?l.slice():l}))},n[Symbol.iterator]=function(){var r=this,i=0;return si({next:function(){return i<r.length?{value:r[i++],done:!1}:{done:!0,value:void 0}}})},Ar(e,[{key:"length",get:function(){return this[Ie].getArrayLength_()},set:function(i){this[Ie].setArrayLength_(i)}},{key:Symbol.toStringTag,get:function(){return"Array"}}])}(Ph);Object.entries(ba).forEach(function(t){var e=t[0],n=t[1];e!=="concat"&&$a(al.prototype,e,n)});function Fh(t){return{enumerable:!1,configurable:!0,get:function(){return this[Ie].get_(t)},set:function(n){this[Ie].set_(t,n)}}}function Ov(t){en(al.prototype,""+t,Fh(t))}function Ih(t){if(t>ro){for(var e=ro;e<t+100;e++)Ov(e);ro=t}}Ih(1e3);function Rv(t,e,n){return new al(t,e,n)}function Cu(t,e){if(typeof t=="object"&&t!==null){if(za(t))return e!==void 0&&Ge(23),t[Ie].atom_;if(wr(t))return t.atom_;if(Qn(t)){if(e===void 0)return t.keysAtom_;var n=t.data_.get(e)||t.hasMap_.get(e);return n||Ge(25,e,xu(t)),n}if(Ga(t)){if(!e)return Ge(26);var r=t[Ie].values_.get(e);return r||Ge(27,e,xu(t)),r}if(tl(t)||qa(t)||va(t))return t}else if(zt(t)&&va(t[Ie]))return t[Ie];Ge(28)}function Tv(t,e){if(t||Ge(29),tl(t)||qa(t)||va(t)||Qn(t)||wr(t))return t;if(t[Ie])return t[Ie];Ge(24,t)}function xu(t,e){var n;if(e!==void 0)n=Cu(t,e);else{if(Ha(t))return t.name;Ga(t)||Qn(t)||wr(t)?n=Tv(t):n=Cu(t)}return n.name_}function Xn(t){var e=Yn(),n=Ua(!0);Bt();try{return t()}finally{Mt(),Va(n),ln(e)}}var Ec=Da.toString;function Dh(t,e,n){return n===void 0&&(n=-1),Pu(t,e,n)}function Pu(t,e,n,r,i){if(t===e)return t!==0||1/t===1/e;if(t==null||e==null)return!1;if(t!==t)return e!==e;var a=typeof t;if(a!=="function"&&a!=="object"&&typeof e!="object")return!1;var o=Ec.call(t);if(o!==Ec.call(e))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:+t==0?1/+t===1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e;case"[object Symbol]":return typeof Symbol!="undefined"&&Symbol.valueOf.call(t)===Symbol.valueOf.call(e);case"[object Map]":case"[object Set]":n>=0&&n++;break}t=wc(t),e=wc(e);var l=o==="[object Array]";if(!l){if(typeof t!="object"||typeof e!="object")return!1;var c=t.constructor,f=e.constructor;if(c!==f&&!(zt(c)&&c instanceof c&&zt(f)&&f instanceof f)&&"constructor"in t&&"constructor"in e)return!1}if(n===0)return!1;n<0&&(n=-1),r=r||[],i=i||[];for(var h=r.length;h--;)if(r[h]===t)return i[h]===e;if(r.push(t),i.push(e),l){if(h=t.length,h!==e.length)return!1;for(;h--;)if(!Pu(t[h],e[h],n-1,r,i))return!1}else{var y=Object.keys(t),m;if(h=y.length,Object.keys(e).length!==h)return!1;for(;h--;)if(m=y[h],!(un(e,m)&&Pu(t[m],e[m],n-1,r,i)))return!1}return r.pop(),i.pop(),!0}function wc(t){return za(t)?t.slice():Sr(t)||Qn(t)||sn(t)||wr(t)?Array.from(t.entries()):t}function si(t){return t[Symbol.iterator]=Cv,t}function Cv(){return this}["Symbol","Map","Set"].forEach(function(t){var e=zf();typeof e[t]=="undefined"&&Ge("MobX requires global '"+t+"' to be available or polyfilled")});typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Jy,extras:{getDebugName:xu},$mobx:Ie});function xv(t,e=[]){Ue.useEffect(()=>{const n=Ka(t);return()=>n()},e)}function Lh(t,e={}){const{defaultValue:n,deps:r=[]}=e,i=Ue.useMemo(()=>t,r),[a,o]=Ue.useState(()=>i()||n);return Ue.useEffect(()=>{const l=Ka(()=>o(i()));return()=>l()},[i,...r]),a}function Pv(t,e,n=[]){const r=Ue.useMemo(()=>t,n),i=Ue.useMemo(()=>e,n);Ue.useEffect(()=>{const a=nv(r,i);return()=>a()},[r,i])}let sl=new Map;const Fu=Ue.createContext(sl),Fv=({children:t,stores:e})=>{const n=Ue.useContext(Fu),r=Ue.useMemo(()=>{const i=new Map;return e.forEach(a=>i.set(a.class,a.value)),sl=new Map([...n,...i])},[]);return cg.jsx(Fu.Provider,{value:r,children:t})};function Iv(t){return Ue.useContext(Fu).get(t)}function Dv(t){return sl.get(t)}var ol=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Wa(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Lv(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var sa={exports:{}},$v=sa.exports,Nc;function jv(){return Nc||(Nc=1,function(t,e){(function(n,r){t.exports=r()})($v,function(){var n=function(s,u){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(d[g]=p[g])})(s,u)},r=function(){return(r=Object.assign||function(s){for(var u,d=1,p=arguments.length;d<p;d++)for(var g in u=arguments[d])Object.prototype.hasOwnProperty.call(u,g)&&(s[g]=u[g]);return s}).apply(this,arguments)};function i(s,u,d){for(var p,g=0,v=u.length;g<v;g++)!p&&g in u||((p=p||Array.prototype.slice.call(u,0,g))[g]=u[g]);return s.concat(p||Array.prototype.slice.call(u))}var a=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:ol,o=Object.keys,l=Array.isArray;function c(s,u){return typeof u!="object"||o(u).forEach(function(d){s[d]=u[d]}),s}typeof Promise=="undefined"||a.Promise||(a.Promise=Promise);var f=Object.getPrototypeOf,h={}.hasOwnProperty;function y(s,u){return h.call(s,u)}function m(s,u){typeof u=="function"&&(u=u(f(s))),(typeof Reflect=="undefined"?o:Reflect.ownKeys)(u).forEach(function(d){A(s,d,u[d])})}var O=Object.defineProperty;function A(s,u,d,p){O(s,u,c(d&&y(d,"get")&&typeof d.get=="function"?{get:d.get,set:d.set,configurable:!0}:{value:d,configurable:!0,writable:!0},p))}function E(s){return{from:function(u){return s.prototype=Object.create(u.prototype),A(s.prototype,"constructor",s),{extend:m.bind(null,s.prototype)}}}}var b=Object.getOwnPropertyDescriptor,k=[].slice;function C(s,u,d){return k.call(s,u,d)}function S(s,u){return u(s)}function R(s){if(!s)throw new Error("Assertion Failed")}function x(s){a.setImmediate?setImmediate(s):setTimeout(s,0)}function z(s,u){if(typeof u=="string"&&y(s,u))return s[u];if(!u)return s;if(typeof u!="string"){for(var d=[],p=0,g=u.length;p<g;++p){var v=z(s,u[p]);d.push(v)}return d}var _=u.indexOf(".");if(_!==-1){var N=s[u.substr(0,_)];return N==null?void 0:z(N,u.substr(_+1))}}function I(s,u,d){if(s&&u!==void 0&&!("isFrozen"in Object&&Object.isFrozen(s)))if(typeof u!="string"&&"length"in u){R(typeof d!="string"&&"length"in d);for(var p=0,g=u.length;p<g;++p)I(s,u[p],d[p])}else{var v,_,N=u.indexOf(".");N!==-1?(v=u.substr(0,N),(_=u.substr(N+1))===""?d===void 0?l(s)&&!isNaN(parseInt(v))?s.splice(v,1):delete s[v]:s[v]=d:I(N=!(N=s[v])||!y(s,v)?s[v]={}:N,_,d)):d===void 0?l(s)&&!isNaN(parseInt(u))?s.splice(u,1):delete s[u]:s[u]=d}}function re(s){var u,d={};for(u in s)y(s,u)&&(d[u]=s[u]);return d}var ie=[].concat;function ke(s){return ie.apply([],s)}var Ut="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(ke([8,16,32,64].map(function(s){return["Int","Uint","Float"].map(function(u){return u+s+"Array"})}))).filter(function(s){return a[s]}),he=new Set(Ut.map(function(s){return a[s]})),Ee=null;function le(s){return Ee=new WeakMap,s=function u(d){if(!d||typeof d!="object")return d;var p=Ee.get(d);if(p)return p;if(l(d)){p=[],Ee.set(d,p);for(var g=0,v=d.length;g<v;++g)p.push(u(d[g]))}else if(he.has(d.constructor))p=d;else{var _,N=f(d);for(_ in p=N===Object.prototype?{}:Object.create(N),Ee.set(d,p),d)y(d,_)&&(p[_]=u(d[_]))}return p}(s),Ee=null,s}var j={}.toString;function w(s){return j.call(s).slice(8,-1)}var J=typeof Symbol!="undefined"?Symbol.iterator:"@@iterator",te=typeof J=="symbol"?function(s){var u;return s!=null&&(u=s[J])&&u.apply(s)}:function(){return null};function ne(s,u){return u=s.indexOf(u),0<=u&&s.splice(u,1),0<=u}var se={};function me(s){var u,d,p,g;if(arguments.length===1){if(l(s))return s.slice();if(this===se&&typeof s=="string")return[s];if(g=te(s)){for(d=[];!(p=g.next()).done;)d.push(p.value);return d}if(s==null)return[s];if(typeof(u=s.length)!="number")return[s];for(d=new Array(u);u--;)d[u]=s[u];return d}for(u=arguments.length,d=new Array(u);u--;)d[u]=arguments[u];return d}var G=typeof Symbol!="undefined"?function(s){return s[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},et=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Dt=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(et),D={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function Q(s,u){this.name=s,this.message=u}function q(s,u){return s+". Errors: "+Object.keys(u).map(function(d){return u[d].toString()}).filter(function(d,p,g){return g.indexOf(d)===p}).join(`
27
+ `)}function B(s,u,d,p){this.failures=u,this.failedKeys=p,this.successCount=d,this.message=q(s,u)}function W(s,u){this.name="BulkError",this.failures=Object.keys(u).map(function(d){return u[d]}),this.failuresByPos=u,this.message=q(s,this.failures)}E(Q).from(Error).extend({toString:function(){return this.name+": "+this.message}}),E(B).from(Q),E(W).from(Q);var ge=Dt.reduce(function(s,u){return s[u]=u+"Error",s},{}),ce=Q,oe=Dt.reduce(function(s,u){var d=u+"Error";function p(g,v){this.name=d,g?typeof g=="string"?(this.message="".concat(g).concat(v?`
28
+ `+v:""),this.inner=v||null):typeof g=="object"&&(this.message="".concat(g.name," ").concat(g.message),this.inner=g):(this.message=D[u]||d,this.inner=null)}return E(p).from(ce),s[u]=p,s},{});oe.Syntax=SyntaxError,oe.Type=TypeError,oe.Range=RangeError;var Ce=et.reduce(function(s,u){return s[u+"Error"]=oe[u],s},{}),xe=Dt.reduce(function(s,u){return["Syntax","Type","Range"].indexOf(u)===-1&&(s[u+"Error"]=oe[u]),s},{});function we(){}function ct(s){return s}function Ze(s,u){return s==null||s===ct?u:function(d){return u(s(d))}}function We(s,u){return function(){s.apply(this,arguments),u.apply(this,arguments)}}function Pe(s,u){return s===we?u:function(){var d=s.apply(this,arguments);d!==void 0&&(arguments[0]=d);var p=this.onsuccess,g=this.onerror;this.onsuccess=null,this.onerror=null;var v=u.apply(this,arguments);return p&&(this.onsuccess=this.onsuccess?We(p,this.onsuccess):p),g&&(this.onerror=this.onerror?We(g,this.onerror):g),v!==void 0?v:d}}function Je(s,u){return s===we?u:function(){s.apply(this,arguments);var d=this.onsuccess,p=this.onerror;this.onsuccess=this.onerror=null,u.apply(this,arguments),d&&(this.onsuccess=this.onsuccess?We(d,this.onsuccess):d),p&&(this.onerror=this.onerror?We(p,this.onerror):p)}}function Ft(s,u){return s===we?u:function(d){var p=s.apply(this,arguments);c(d,p);var g=this.onsuccess,v=this.onerror;return this.onsuccess=null,this.onerror=null,d=u.apply(this,arguments),g&&(this.onsuccess=this.onsuccess?We(g,this.onsuccess):g),v&&(this.onerror=this.onerror?We(v,this.onerror):v),p===void 0?d===void 0?void 0:d:c(p,d)}}function V(s,u){return s===we?u:function(){return u.apply(this,arguments)!==!1&&s.apply(this,arguments)}}function qe(s,u){return s===we?u:function(){var d=s.apply(this,arguments);if(d&&typeof d.then=="function"){for(var p=this,g=arguments.length,v=new Array(g);g--;)v[g]=arguments[g];return d.then(function(){return u.apply(p,v)})}return u.apply(this,arguments)}}xe.ModifyError=B,xe.DexieError=Q,xe.BulkError=W;var pe=typeof location!="undefined"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function je(s){pe=s}var Ye={},dt=100,Ut=typeof Promise=="undefined"?[]:function(){var s=Promise.resolve();if(typeof crypto=="undefined"||!crypto.subtle)return[s,f(s),s];var u=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[u,f(u),s]}(),et=Ut[0],Dt=Ut[1],Ut=Ut[2],Dt=Dt&&Dt.then,It=et&&et.constructor,ps=!!Ut,Cr=function(s,u){xr.push([s,u]),Si&&(queueMicrotask(jm),Si=!1)},ms=!0,Si=!0,Tn=[],Ai=[],gs=ct,hn={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:we,pgp:!1,env:{},finalize:we},Te=hn,xr=[],Cn=0,Ei=[];function Se(s){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var u=this._PSD=Te;if(typeof s!="function"){if(s!==Ye)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&vs(this,this._value))}this._state=null,this._value=null,++u.ref,function d(p,g){try{g(function(v){if(p._state===null){if(v===p)throw new TypeError("A promise cannot be resolved with itself.");var _=p._lib&&er();v&&typeof v.then=="function"?d(p,function(N,P){v instanceof Se?v._then(N,P):v.then(N,P)}):(p._state=!0,p._value=v,Il(p)),_&&tr()}},vs.bind(null,p))}catch(v){vs(p,v)}}(this,s)}var ys={get:function(){var s=Te,u=Ri;function d(p,g){var v=this,_=!s.global&&(s!==Te||u!==Ri),N=_&&!mn(),P=new Se(function(L,U){bs(v,new Fl(Ll(p,s,_,N),Ll(g,s,_,N),L,U,s))});return this._consoleTask&&(P._consoleTask=this._consoleTask),P}return d.prototype=Ye,d},set:function(s){A(this,"then",s&&s.prototype===Ye?ys:{get:function(){return s},set:ys.set})}};function Fl(s,u,d,p,g){this.onFulfilled=typeof s=="function"?s:null,this.onRejected=typeof u=="function"?u:null,this.resolve=d,this.reject=p,this.psd=g}function vs(s,u){var d,p;Ai.push(u),s._state===null&&(d=s._lib&&er(),u=gs(u),s._state=!1,s._value=u,p=s,Tn.some(function(g){return g._value===p._value})||Tn.push(p),Il(s),d&&tr())}function Il(s){var u=s._listeners;s._listeners=[];for(var d=0,p=u.length;d<p;++d)bs(s,u[d]);var g=s._PSD;--g.ref||g.finalize(),Cn===0&&(++Cn,Cr(function(){--Cn==0&&ks()},[]))}function bs(s,u){if(s._state!==null){var d=s._state?u.onFulfilled:u.onRejected;if(d===null)return(s._state?u.resolve:u.reject)(s._value);++u.psd.ref,++Cn,Cr($m,[d,s,u])}else s._listeners.push(u)}function $m(s,u,d){try{var p,g=u._value;!u._state&&Ai.length&&(Ai=[]),p=pe&&u._consoleTask?u._consoleTask.run(function(){return s(g)}):s(g),u._state||Ai.indexOf(g)!==-1||function(v){for(var _=Tn.length;_;)if(Tn[--_]._value===v._value)return Tn.splice(_,1)}(u),d.resolve(p)}catch(v){d.reject(v)}finally{--Cn==0&&ks(),--d.psd.ref||d.psd.finalize()}}function jm(){xn(hn,function(){er()&&tr()})}function er(){var s=ms;return Si=ms=!1,s}function tr(){var s,u,d;do for(;0<xr.length;)for(s=xr,xr=[],d=s.length,u=0;u<d;++u){var p=s[u];p[0].apply(null,p[1])}while(0<xr.length);Si=ms=!0}function ks(){var s=Tn;Tn=[],s.forEach(function(p){p._PSD.onunhandled.call(null,p._value,p)});for(var u=Ei.slice(0),d=u.length;d;)u[--d]()}function wi(s){return new Se(Ye,!1,s)}function nt(s,u){var d=Te;return function(){var p=er(),g=Te;try{return gn(d,!0),s.apply(this,arguments)}catch(v){u&&u(v)}finally{gn(g,!1),p&&tr()}}}m(Se.prototype,{then:ys,_then:function(s,u){bs(this,new Fl(null,null,s,u,Te))},catch:function(s){if(arguments.length===1)return this.then(null,s);var u=s,d=arguments[1];return typeof u=="function"?this.then(null,function(p){return(p instanceof u?d:wi)(p)}):this.then(null,function(p){return(p&&p.name===u?d:wi)(p)})},finally:function(s){return this.then(function(u){return Se.resolve(s()).then(function(){return u})},function(u){return Se.resolve(s()).then(function(){return wi(u)})})},timeout:function(s,u){var d=this;return s<1/0?new Se(function(p,g){var v=setTimeout(function(){return g(new oe.Timeout(u))},s);d.then(p,g).finally(clearTimeout.bind(null,v))}):this}}),typeof Symbol!="undefined"&&Symbol.toStringTag&&A(Se.prototype,Symbol.toStringTag,"Dexie.Promise"),hn.env=Dl(),m(Se,{all:function(){var s=me.apply(null,arguments).map(Ti);return new Se(function(u,d){s.length===0&&u([]);var p=s.length;s.forEach(function(g,v){return Se.resolve(g).then(function(_){s[v]=_,--p||u(s)},d)})})},resolve:function(s){return s instanceof Se?s:s&&typeof s.then=="function"?new Se(function(u,d){s.then(u,d)}):new Se(Ye,!0,s)},reject:wi,race:function(){var s=me.apply(null,arguments).map(Ti);return new Se(function(u,d){s.map(function(p){return Se.resolve(p).then(u,d)})})},PSD:{get:function(){return Te},set:function(s){return Te=s}},totalEchoes:{get:function(){return Ri}},newPSD:pn,usePSD:xn,scheduler:{get:function(){return Cr},set:function(s){Cr=s}},rejectionMapper:{get:function(){return gs},set:function(s){gs=s}},follow:function(s,u){return new Se(function(d,p){return pn(function(g,v){var _=Te;_.unhandleds=[],_.onunhandled=v,_.finalize=We(function(){var N,P=this;N=function(){P.unhandleds.length===0?g():v(P.unhandleds[0])},Ei.push(function L(){N(),Ei.splice(Ei.indexOf(L),1)}),++Cn,Cr(function(){--Cn==0&&ks()},[])},_.finalize),s()},u,d,p)})}}),It&&(It.allSettled&&A(Se,"allSettled",function(){var s=me.apply(null,arguments).map(Ti);return new Se(function(u){s.length===0&&u([]);var d=s.length,p=new Array(d);s.forEach(function(g,v){return Se.resolve(g).then(function(_){return p[v]={status:"fulfilled",value:_}},function(_){return p[v]={status:"rejected",reason:_}}).then(function(){return--d||u(p)})})})}),It.any&&typeof AggregateError!="undefined"&&A(Se,"any",function(){var s=me.apply(null,arguments).map(Ti);return new Se(function(u,d){s.length===0&&d(new AggregateError([]));var p=s.length,g=new Array(p);s.forEach(function(v,_){return Se.resolve(v).then(function(N){return u(N)},function(N){g[_]=N,--p||d(new AggregateError(g))})})})}),It.withResolvers&&(Se.withResolvers=It.withResolvers));var ft={awaits:0,echoes:0,id:0},Bm=0,Ni=[],Oi=0,Ri=0,Mm=0;function pn(s,u,d,p){var g=Te,v=Object.create(g);return v.parent=g,v.ref=0,v.global=!1,v.id=++Mm,hn.env,v.env=ps?{Promise:Se,PromiseProp:{value:Se,configurable:!0,writable:!0},all:Se.all,race:Se.race,allSettled:Se.allSettled,any:Se.any,resolve:Se.resolve,reject:Se.reject}:{},u&&c(v,u),++g.ref,v.finalize=function(){--this.parent.ref||this.parent.finalize()},p=xn(v,s,d,p),v.ref===0&&v.finalize(),p}function nr(){return ft.id||(ft.id=++Bm),++ft.awaits,ft.echoes+=dt,ft.id}function mn(){return!!ft.awaits&&(--ft.awaits==0&&(ft.id=0),ft.echoes=ft.awaits*dt,!0)}function Ti(s){return ft.echoes&&s&&s.constructor===It?(nr(),s.then(function(u){return mn(),u},function(u){return mn(),at(u)})):s}function Um(){var s=Ni[Ni.length-1];Ni.pop(),gn(s,!1)}function gn(s,u){var d,p=Te;(u?!ft.echoes||Oi++&&s===Te:!Oi||--Oi&&s===Te)||queueMicrotask(u?function(g){++Ri,ft.echoes&&--ft.echoes!=0||(ft.echoes=ft.awaits=ft.id=0),Ni.push(Te),gn(g,!0)}.bind(null,s):Um),s!==Te&&(Te=s,p===hn&&(hn.env=Dl()),ps&&(d=hn.env.Promise,u=s.env,(p.global||s.global)&&(Object.defineProperty(a,"Promise",u.PromiseProp),d.all=u.all,d.race=u.race,d.resolve=u.resolve,d.reject=u.reject,u.allSettled&&(d.allSettled=u.allSettled),u.any&&(d.any=u.any))))}function Dl(){var s=a.Promise;return ps?{Promise:s,PromiseProp:Object.getOwnPropertyDescriptor(a,"Promise"),all:s.all,race:s.race,allSettled:s.allSettled,any:s.any,resolve:s.resolve,reject:s.reject}:{}}function xn(s,u,d,p,g){var v=Te;try{return gn(s,!0),u(d,p,g)}finally{gn(v,!1)}}function Ll(s,u,d,p){return typeof s!="function"?s:function(){var g=Te;d&&nr(),gn(u,!0);try{return s.apply(this,arguments)}finally{gn(g,!1),p&&queueMicrotask(mn)}}}function _s(s){Promise===It&&ft.echoes===0?Oi===0?s():enqueueNativeMicroTask(s):setTimeout(s,0)}(""+Dt).indexOf("[native code]")===-1&&(nr=mn=we);var at=Se.reject,Pn="￿",rn="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",$l="String expected.",rr=[],Ci="__dbnames",Ss="readonly",As="readwrite";function Fn(s,u){return s?u?function(){return s.apply(this,arguments)&&u.apply(this,arguments)}:s:u}var jl={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function xi(s){return typeof s!="string"||/\./.test(s)?function(u){return u}:function(u){return u[s]===void 0&&s in u&&delete(u=le(u))[s],u}}function Bl(){throw oe.Type()}function He(s,u){try{var d=Ml(s),p=Ml(u);if(d!==p)return d==="Array"?1:p==="Array"?-1:d==="binary"?1:p==="binary"?-1:d==="string"?1:p==="string"?-1:d==="Date"?1:p!=="Date"?NaN:-1;switch(d){case"number":case"Date":case"string":return u<s?1:s<u?-1:0;case"binary":return function(g,v){for(var _=g.length,N=v.length,P=_<N?_:N,L=0;L<P;++L)if(g[L]!==v[L])return g[L]<v[L]?-1:1;return _===N?0:_<N?-1:1}(Ul(s),Ul(u));case"Array":return function(g,v){for(var _=g.length,N=v.length,P=_<N?_:N,L=0;L<P;++L){var U=He(g[L],v[L]);if(U!==0)return U}return _===N?0:_<N?-1:1}(s,u)}}catch{}return NaN}function Ml(s){var u=typeof s;return u!="object"?u:ArrayBuffer.isView(s)?"binary":(s=w(s),s==="ArrayBuffer"?"binary":s)}function Ul(s){return s instanceof Uint8Array?s:ArrayBuffer.isView(s)?new Uint8Array(s.buffer,s.byteOffset,s.byteLength):new Uint8Array(s)}var Vl=(tt.prototype._trans=function(s,u,d){var p=this._tx||Te.trans,g=this.name,v=pe&&typeof console!="undefined"&&console.createTask&&console.createTask("Dexie: ".concat(s==="readonly"?"read":"write"," ").concat(this.name));function _(L,U,T){if(!T.schema[g])throw new oe.NotFound("Table "+g+" not part of transaction");return u(T.idbtrans,T)}var N=er();try{var P=p&&p.db._novip===this.db._novip?p===Te.trans?p._promise(s,_,d):pn(function(){return p._promise(s,_,d)},{trans:p,transless:Te.transless||Te}):function L(U,T,K,F){if(U.idbdb&&(U._state.openComplete||Te.letThrough||U._vip)){var M=U._createTransaction(T,K,U._dbSchema);try{M.create(),U._state.PR1398_maxLoop=3}catch(H){return H.name===ge.InvalidState&&U.isOpen()&&0<--U._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),U.close({disableAutoOpen:!1}),U.open().then(function(){return L(U,T,K,F)})):at(H)}return M._promise(T,function(H,$){return pn(function(){return Te.trans=M,F(H,$,M)})}).then(function(H){if(T==="readwrite")try{M.idbtrans.commit()}catch{}return T==="readonly"?H:M._completion.then(function(){return H})})}if(U._state.openComplete)return at(new oe.DatabaseClosed(U._state.dbOpenError));if(!U._state.isBeingOpened){if(!U._state.autoOpen)return at(new oe.DatabaseClosed);U.open().catch(we)}return U._state.dbReadyPromise.then(function(){return L(U,T,K,F)})}(this.db,s,[this.name],_);return v&&(P._consoleTask=v,P=P.catch(function(L){return console.trace(L),at(L)})),P}finally{N&&tr()}},tt.prototype.get=function(s,u){var d=this;return s&&s.constructor===Object?this.where(s).first(u):s==null?at(new oe.Type("Invalid argument to Table.get()")):this._trans("readonly",function(p){return d.core.get({trans:p,key:s}).then(function(g){return d.hook.reading.fire(g)})}).then(u)},tt.prototype.where=function(s){if(typeof s=="string")return new this.db.WhereClause(this,s);if(l(s))return new this.db.WhereClause(this,"[".concat(s.join("+"),"]"));var u=o(s);if(u.length===1)return this.where(u[0]).equals(s[u[0]]);var d=this.schema.indexes.concat(this.schema.primKey).filter(function(N){if(N.compound&&u.every(function(L){return 0<=N.keyPath.indexOf(L)})){for(var P=0;P<u.length;++P)if(u.indexOf(N.keyPath[P])===-1)return!1;return!0}return!1}).sort(function(N,P){return N.keyPath.length-P.keyPath.length})[0];if(d&&this.db._maxKey!==Pn){var v=d.keyPath.slice(0,u.length);return this.where(v).equals(v.map(function(P){return s[P]}))}!d&&pe&&console.warn("The query ".concat(JSON.stringify(s)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(u.join("+"),"]"));var p=this.schema.idxByName;function g(N,P){return He(N,P)===0}var _=u.reduce(function(T,P){var L=T[0],U=T[1],T=p[P],K=s[P];return[L||T,L||!T?Fn(U,T&&T.multi?function(F){return F=z(F,P),l(F)&&F.some(function(M){return g(K,M)})}:function(F){return g(K,z(F,P))}):U]},[null,null]),v=_[0],_=_[1];return v?this.where(v.name).equals(s[v.keyPath]).filter(_):d?this.filter(_):this.where(u).equals("")},tt.prototype.filter=function(s){return this.toCollection().and(s)},tt.prototype.count=function(s){return this.toCollection().count(s)},tt.prototype.offset=function(s){return this.toCollection().offset(s)},tt.prototype.limit=function(s){return this.toCollection().limit(s)},tt.prototype.each=function(s){return this.toCollection().each(s)},tt.prototype.toArray=function(s){return this.toCollection().toArray(s)},tt.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},tt.prototype.orderBy=function(s){return new this.db.Collection(new this.db.WhereClause(this,l(s)?"[".concat(s.join("+"),"]"):s))},tt.prototype.reverse=function(){return this.toCollection().reverse()},tt.prototype.mapToClass=function(s){var u,d=this.db,p=this.name;function g(){return u!==null&&u.apply(this,arguments)||this}(this.schema.mappedClass=s).prototype instanceof Bl&&(function(P,L){if(typeof L!="function"&&L!==null)throw new TypeError("Class extends value "+String(L)+" is not a constructor or null");function U(){this.constructor=P}n(P,L),P.prototype=L===null?Object.create(L):(U.prototype=L.prototype,new U)}(g,u=s),Object.defineProperty(g.prototype,"db",{get:function(){return d},enumerable:!1,configurable:!0}),g.prototype.table=function(){return p},s=g);for(var v=new Set,_=s.prototype;_;_=f(_))Object.getOwnPropertyNames(_).forEach(function(P){return v.add(P)});function N(P){if(!P)return P;var L,U=Object.create(s.prototype);for(L in P)if(!v.has(L))try{U[L]=P[L]}catch{}return U}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=N,this.hook("reading",N),s},tt.prototype.defineClass=function(){return this.mapToClass(function(s){c(this,s)})},tt.prototype.add=function(s,u){var d=this,p=this.schema.primKey,g=p.auto,v=p.keyPath,_=s;return v&&g&&(_=xi(v)(s)),this._trans("readwrite",function(N){return d.core.mutate({trans:N,type:"add",keys:u!=null?[u]:null,values:[_]})}).then(function(N){return N.numFailures?Se.reject(N.failures[0]):N.lastResult}).then(function(N){if(v)try{I(s,v,N)}catch{}return N})},tt.prototype.update=function(s,u){return typeof s!="object"||l(s)?this.where(":id").equals(s).modify(u):(s=z(s,this.schema.primKey.keyPath),s===void 0?at(new oe.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(s).modify(u))},tt.prototype.put=function(s,u){var d=this,p=this.schema.primKey,g=p.auto,v=p.keyPath,_=s;return v&&g&&(_=xi(v)(s)),this._trans("readwrite",function(N){return d.core.mutate({trans:N,type:"put",values:[_],keys:u!=null?[u]:null})}).then(function(N){return N.numFailures?Se.reject(N.failures[0]):N.lastResult}).then(function(N){if(v)try{I(s,v,N)}catch{}return N})},tt.prototype.delete=function(s){var u=this;return this._trans("readwrite",function(d){return u.core.mutate({trans:d,type:"delete",keys:[s]})}).then(function(d){return d.numFailures?Se.reject(d.failures[0]):void 0})},tt.prototype.clear=function(){var s=this;return this._trans("readwrite",function(u){return s.core.mutate({trans:u,type:"deleteRange",range:jl})}).then(function(u){return u.numFailures?Se.reject(u.failures[0]):void 0})},tt.prototype.bulkGet=function(s){var u=this;return this._trans("readonly",function(d){return u.core.getMany({keys:s,trans:d}).then(function(p){return p.map(function(g){return u.hook.reading.fire(g)})})})},tt.prototype.bulkAdd=function(s,u,d){var p=this,g=Array.isArray(u)?u:void 0,v=(d=d||(g?void 0:u))?d.allKeys:void 0;return this._trans("readwrite",function(_){var L=p.schema.primKey,N=L.auto,L=L.keyPath;if(L&&g)throw new oe.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(g&&g.length!==s.length)throw new oe.InvalidArgument("Arguments objects and keys must have the same length");var P=s.length,L=L&&N?s.map(xi(L)):s;return p.core.mutate({trans:_,type:"add",keys:g,values:L,wantResults:v}).then(function(M){var T=M.numFailures,K=M.results,F=M.lastResult,M=M.failures;if(T===0)return v?K:F;throw new W("".concat(p.name,".bulkAdd(): ").concat(T," of ").concat(P," operations failed"),M)})})},tt.prototype.bulkPut=function(s,u,d){var p=this,g=Array.isArray(u)?u:void 0,v=(d=d||(g?void 0:u))?d.allKeys:void 0;return this._trans("readwrite",function(_){var L=p.schema.primKey,N=L.auto,L=L.keyPath;if(L&&g)throw new oe.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(g&&g.length!==s.length)throw new oe.InvalidArgument("Arguments objects and keys must have the same length");var P=s.length,L=L&&N?s.map(xi(L)):s;return p.core.mutate({trans:_,type:"put",keys:g,values:L,wantResults:v}).then(function(M){var T=M.numFailures,K=M.results,F=M.lastResult,M=M.failures;if(T===0)return v?K:F;throw new W("".concat(p.name,".bulkPut(): ").concat(T," of ").concat(P," operations failed"),M)})})},tt.prototype.bulkUpdate=function(s){var u=this,d=this.core,p=s.map(function(_){return _.key}),g=s.map(function(_){return _.changes}),v=[];return this._trans("readwrite",function(_){return d.getMany({trans:_,keys:p,cache:"clone"}).then(function(N){var P=[],L=[];s.forEach(function(T,K){var F=T.key,M=T.changes,H=N[K];if(H){for(var $=0,Y=Object.keys(M);$<Y.length;$++){var X=Y[$],Z=M[X];if(X===u.schema.primKey.keyPath){if(He(Z,F)!==0)throw new oe.Constraint("Cannot update primary key in bulkUpdate()")}else I(H,X,Z)}v.push(K),P.push(F),L.push(H)}});var U=P.length;return d.mutate({trans:_,type:"put",keys:P,values:L,updates:{keys:p,changeSpecs:g}}).then(function(T){var K=T.numFailures,F=T.failures;if(K===0)return U;for(var M=0,H=Object.keys(F);M<H.length;M++){var $,Y=H[M],X=v[Number(Y)];X!=null&&($=F[Y],delete F[Y],F[X]=$)}throw new W("".concat(u.name,".bulkUpdate(): ").concat(K," of ").concat(U," operations failed"),F)})})})},tt.prototype.bulkDelete=function(s){var u=this,d=s.length;return this._trans("readwrite",function(p){return u.core.mutate({trans:p,type:"delete",keys:s})}).then(function(_){var g=_.numFailures,v=_.lastResult,_=_.failures;if(g===0)return v;throw new W("".concat(u.name,".bulkDelete(): ").concat(g," of ").concat(d," operations failed"),_)})},tt);function tt(){}function Pr(s){function u(_,N){if(N){for(var P=arguments.length,L=new Array(P-1);--P;)L[P-1]=arguments[P];return d[_].subscribe.apply(null,L),s}if(typeof _=="string")return d[_]}var d={};u.addEventType=v;for(var p=1,g=arguments.length;p<g;++p)v(arguments[p]);return u;function v(_,N,P){if(typeof _!="object"){var L;N=N||V;var U={subscribers:[],fire:P=P||we,subscribe:function(T){U.subscribers.indexOf(T)===-1&&(U.subscribers.push(T),U.fire=N(U.fire,T))},unsubscribe:function(T){U.subscribers=U.subscribers.filter(function(K){return K!==T}),U.fire=U.subscribers.reduce(N,P)}};return d[_]=u[_]=U}o(L=_).forEach(function(T){var K=L[T];if(l(K))v(T,L[T][0],L[T][1]);else{if(K!=="asap")throw new oe.InvalidArgument("Invalid event config");var F=v(T,ct,function(){for(var M=arguments.length,H=new Array(M);M--;)H[M]=arguments[M];F.subscribers.forEach(function($){x(function(){$.apply(null,H)})})})}})}}function Fr(s,u){return E(u).from({prototype:s}),u}function ir(s,u){return!(s.filter||s.algorithm||s.or)&&(u?s.justLimit:!s.replayFilter)}function Es(s,u){s.filter=Fn(s.filter,u)}function ws(s,u,d){var p=s.replayFilter;s.replayFilter=p?function(){return Fn(p(),u())}:u,s.justLimit=d&&!p}function Pi(s,u){if(s.isPrimKey)return u.primaryKey;var d=u.getIndexByKeyPath(s.index);if(!d)throw new oe.Schema("KeyPath "+s.index+" on object store "+u.name+" is not indexed");return d}function ql(s,u,d){var p=Pi(s,u.schema);return u.openCursor({trans:d,values:!s.keysOnly,reverse:s.dir==="prev",unique:!!s.unique,query:{index:p,range:s.range}})}function Fi(s,u,d,p){var g=s.replayFilter?Fn(s.filter,s.replayFilter()):s.filter;if(s.or){var v={},_=function(N,P,L){var U,T;g&&!g(P,L,function(K){return P.stop(K)},function(K){return P.fail(K)})||((T=""+(U=P.primaryKey))=="[object ArrayBuffer]"&&(T=""+new Uint8Array(U)),y(v,T)||(v[T]=!0,u(N,P,L)))};return Promise.all([s.or._iterate(_,d),Hl(ql(s,p,d),s.algorithm,_,!s.keysOnly&&s.valueMapper)])}return Hl(ql(s,p,d),Fn(s.algorithm,g),u,!s.keysOnly&&s.valueMapper)}function Hl(s,u,d,p){var g=nt(p?function(v,_,N){return d(p(v),_,N)}:d);return s.then(function(v){if(v)return v.start(function(){var _=function(){return v.continue()};u&&!u(v,function(N){return _=N},function(N){v.stop(N),_=we},function(N){v.fail(N),_=we})||g(v.value,v,function(N){return _=N}),_()})})}var Ir=(Kl.prototype.execute=function(s){var u=this["@@propmod"];if(u.add!==void 0){var d=u.add;if(l(d))return i(i([],l(s)?s:[],!0),d).sort();if(typeof d=="number")return(Number(s)||0)+d;if(typeof d=="bigint")try{return BigInt(s)+d}catch{return BigInt(0)+d}throw new TypeError("Invalid term ".concat(d))}if(u.remove!==void 0){var p=u.remove;if(l(p))return l(s)?s.filter(function(g){return!p.includes(g)}).sort():[];if(typeof p=="number")return Number(s)-p;if(typeof p=="bigint")try{return BigInt(s)-p}catch{return BigInt(0)-p}throw new TypeError("Invalid subtrahend ".concat(p))}return d=(d=u.replacePrefix)===null||d===void 0?void 0:d[0],d&&typeof s=="string"&&s.startsWith(d)?u.replacePrefix[1]+s.substring(d.length):s},Kl);function Kl(s){this["@@propmod"]=s}var Vm=(Ke.prototype._read=function(s,u){var d=this._ctx;return d.error?d.table._trans(null,at.bind(null,d.error)):d.table._trans("readonly",s).then(u)},Ke.prototype._write=function(s){var u=this._ctx;return u.error?u.table._trans(null,at.bind(null,u.error)):u.table._trans("readwrite",s,"locked")},Ke.prototype._addAlgorithm=function(s){var u=this._ctx;u.algorithm=Fn(u.algorithm,s)},Ke.prototype._iterate=function(s,u){return Fi(this._ctx,s,u,this._ctx.table.core)},Ke.prototype.clone=function(s){var u=Object.create(this.constructor.prototype),d=Object.create(this._ctx);return s&&c(d,s),u._ctx=d,u},Ke.prototype.raw=function(){return this._ctx.valueMapper=null,this},Ke.prototype.each=function(s){var u=this._ctx;return this._read(function(d){return Fi(u,s,d,u.table.core)})},Ke.prototype.count=function(s){var u=this;return this._read(function(d){var p=u._ctx,g=p.table.core;if(ir(p,!0))return g.count({trans:d,query:{index:Pi(p,g.schema),range:p.range}}).then(function(_){return Math.min(_,p.limit)});var v=0;return Fi(p,function(){return++v,!1},d,g).then(function(){return v})}).then(s)},Ke.prototype.sortBy=function(s,u){var d=s.split(".").reverse(),p=d[0],g=d.length-1;function v(P,L){return L?v(P[d[L]],L-1):P[p]}var _=this._ctx.dir==="next"?1:-1;function N(P,L){return He(v(P,g),v(L,g))*_}return this.toArray(function(P){return P.sort(N)}).then(u)},Ke.prototype.toArray=function(s){var u=this;return this._read(function(d){var p=u._ctx;if(p.dir==="next"&&ir(p,!0)&&0<p.limit){var g=p.valueMapper,v=Pi(p,p.table.core.schema);return p.table.core.query({trans:d,limit:p.limit,values:!0,query:{index:v,range:p.range}}).then(function(N){return N=N.result,g?N.map(g):N})}var _=[];return Fi(p,function(N){return _.push(N)},d,p.table.core).then(function(){return _})},s)},Ke.prototype.offset=function(s){var u=this._ctx;return s<=0||(u.offset+=s,ir(u)?ws(u,function(){var d=s;return function(p,g){return d===0||(d===1?--d:g(function(){p.advance(d),d=0}),!1)}}):ws(u,function(){var d=s;return function(){return--d<0}})),this},Ke.prototype.limit=function(s){return this._ctx.limit=Math.min(this._ctx.limit,s),ws(this._ctx,function(){var u=s;return function(d,p,g){return--u<=0&&p(g),0<=u}},!0),this},Ke.prototype.until=function(s,u){return Es(this._ctx,function(d,p,g){return!s(d.value)||(p(g),u)}),this},Ke.prototype.first=function(s){return this.limit(1).toArray(function(u){return u[0]}).then(s)},Ke.prototype.last=function(s){return this.reverse().first(s)},Ke.prototype.filter=function(s){var u;return Es(this._ctx,function(d){return s(d.value)}),(u=this._ctx).isMatch=Fn(u.isMatch,s),this},Ke.prototype.and=function(s){return this.filter(s)},Ke.prototype.or=function(s){return new this.db.WhereClause(this._ctx.table,s,this)},Ke.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},Ke.prototype.desc=function(){return this.reverse()},Ke.prototype.eachKey=function(s){var u=this._ctx;return u.keysOnly=!u.isMatch,this.each(function(d,p){s(p.key,p)})},Ke.prototype.eachUniqueKey=function(s){return this._ctx.unique="unique",this.eachKey(s)},Ke.prototype.eachPrimaryKey=function(s){var u=this._ctx;return u.keysOnly=!u.isMatch,this.each(function(d,p){s(p.primaryKey,p)})},Ke.prototype.keys=function(s){var u=this._ctx;u.keysOnly=!u.isMatch;var d=[];return this.each(function(p,g){d.push(g.key)}).then(function(){return d}).then(s)},Ke.prototype.primaryKeys=function(s){var u=this._ctx;if(u.dir==="next"&&ir(u,!0)&&0<u.limit)return this._read(function(p){var g=Pi(u,u.table.core.schema);return u.table.core.query({trans:p,values:!1,limit:u.limit,query:{index:g,range:u.range}})}).then(function(p){return p.result}).then(s);u.keysOnly=!u.isMatch;var d=[];return this.each(function(p,g){d.push(g.primaryKey)}).then(function(){return d}).then(s)},Ke.prototype.uniqueKeys=function(s){return this._ctx.unique="unique",this.keys(s)},Ke.prototype.firstKey=function(s){return this.limit(1).keys(function(u){return u[0]}).then(s)},Ke.prototype.lastKey=function(s){return this.reverse().firstKey(s)},Ke.prototype.distinct=function(){var s=this._ctx,s=s.index&&s.table.schema.idxByName[s.index];if(!s||!s.multi)return this;var u={};return Es(this._ctx,function(g){var p=g.primaryKey.toString(),g=y(u,p);return u[p]=!0,!g}),this},Ke.prototype.modify=function(s){var u=this,d=this._ctx;return this._write(function(p){var g,v,_;_=typeof s=="function"?s:(g=o(s),v=g.length,function($){for(var Y=!1,X=0;X<v;++X){var Z=g[X],ae=s[Z],de=z($,Z);ae instanceof Ir?(I($,Z,ae.execute(de)),Y=!0):de!==ae&&(I($,Z,ae),Y=!0)}return Y});var N=d.table.core,T=N.schema.primaryKey,P=T.outbound,L=T.extractKey,U=200,T=u.db._options.modifyChunkSize;T&&(U=typeof T=="object"?T[N.name]||T["*"]||200:T);function K($,Z){var X=Z.failures,Z=Z.numFailures;M+=$-Z;for(var ae=0,de=o(X);ae<de.length;ae++){var be=de[ae];F.push(X[be])}}var F=[],M=0,H=[];return u.clone().primaryKeys().then(function($){function Y(Z){var ae=Math.min(U,$.length-Z);return N.getMany({trans:p,keys:$.slice(Z,Z+ae),cache:"immutable"}).then(function(de){for(var be=[],fe=[],ye=P?[]:null,_e=[],ve=0;ve<ae;++ve){var Ne=de[ve],Le={value:le(Ne),primKey:$[Z+ve]};_.call(Le,Le.value,Le)!==!1&&(Le.value==null?_e.push($[Z+ve]):P||He(L(Ne),L(Le.value))===0?(fe.push(Le.value),P&&ye.push($[Z+ve])):(_e.push($[Z+ve]),be.push(Le.value)))}return Promise.resolve(0<be.length&&N.mutate({trans:p,type:"add",values:be}).then(function(Be){for(var Me in Be.failures)_e.splice(parseInt(Me),1);K(be.length,Be)})).then(function(){return(0<fe.length||X&&typeof s=="object")&&N.mutate({trans:p,type:"put",keys:ye,values:fe,criteria:X,changeSpec:typeof s!="function"&&s,isAdditionalChunk:0<Z}).then(function(Be){return K(fe.length,Be)})}).then(function(){return(0<_e.length||X&&s===Ns)&&N.mutate({trans:p,type:"delete",keys:_e,criteria:X,isAdditionalChunk:0<Z}).then(function(Be){return K(_e.length,Be)})}).then(function(){return $.length>Z+ae&&Y(Z+U)})})}var X=ir(d)&&d.limit===1/0&&(typeof s!="function"||s===Ns)&&{index:d.index,range:d.range};return Y(0).then(function(){if(0<F.length)throw new B("Error modifying one or more objects",F,M,H);return $.length})})})},Ke.prototype.delete=function(){var s=this._ctx,u=s.range;return ir(s)&&(s.isPrimKey||u.type===3)?this._write(function(d){var p=s.table.core.schema.primaryKey,g=u;return s.table.core.count({trans:d,query:{index:p,range:g}}).then(function(v){return s.table.core.mutate({trans:d,type:"deleteRange",range:g}).then(function(_){var N=_.failures;if(_.lastResult,_.results,_=_.numFailures,_)throw new B("Could not delete some values",Object.keys(N).map(function(P){return N[P]}),v-_);return v-_})})}):this.modify(Ns)},Ke);function Ke(){}var Ns=function(s,u){return u.value=null};function qm(s,u){return s<u?-1:s===u?0:1}function Hm(s,u){return u<s?-1:s===u?0:1}function Nt(s,u,d){return s=s instanceof Gl?new s.Collection(s):s,s._ctx.error=new(d||TypeError)(u),s}function ar(s){return new s.Collection(s,function(){return zl("")}).limit(0)}function Ii(s,u,d,p){var g,v,_,N,P,L,U,T=d.length;if(!d.every(function(M){return typeof M=="string"}))return Nt(s,$l);function K(M){g=M==="next"?function($){return $.toUpperCase()}:function($){return $.toLowerCase()},v=M==="next"?function($){return $.toLowerCase()}:function($){return $.toUpperCase()},_=M==="next"?qm:Hm;var H=d.map(function($){return{lower:v($),upper:g($)}}).sort(function($,Y){return _($.lower,Y.lower)});N=H.map(function($){return $.upper}),P=H.map(function($){return $.lower}),U=(L=M)==="next"?"":p}K("next"),s=new s.Collection(s,function(){return yn(N[0],P[T-1]+p)}),s._ondirectionchange=function(M){K(M)};var F=0;return s._addAlgorithm(function(M,H,$){var Y=M.key;if(typeof Y!="string")return!1;var X=v(Y);if(u(X,P,F))return!0;for(var Z=null,ae=F;ae<T;++ae){var de=function(be,fe,ye,_e,ve,Ne){for(var Le=Math.min(be.length,_e.length),Be=-1,Me=0;Me<Le;++Me){var Ot=fe[Me];if(Ot!==_e[Me])return ve(be[Me],ye[Me])<0?be.substr(0,Me)+ye[Me]+ye.substr(Me+1):ve(be[Me],_e[Me])<0?be.substr(0,Me)+_e[Me]+ye.substr(Me+1):0<=Be?be.substr(0,Be)+fe[Be]+ye.substr(Be+1):null;ve(be[Me],Ot)<0&&(Be=Me)}return Le<_e.length&&Ne==="next"?be+ye.substr(be.length):Le<be.length&&Ne==="prev"?be.substr(0,ye.length):Be<0?null:be.substr(0,Be)+_e[Be]+ye.substr(Be+1)}(Y,X,N[ae],P[ae],_,L);de===null&&Z===null?F=ae+1:(Z===null||0<_(Z,de))&&(Z=de)}return H(Z!==null?function(){M.continue(Z+U)}:$),!1}),s}function yn(s,u,d,p){return{type:2,lower:s,upper:u,lowerOpen:d,upperOpen:p}}function zl(s){return{type:1,lower:s,upper:s}}var Gl=(Object.defineProperty(ht.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),ht.prototype.between=function(s,u,d,p){d=d!==!1,p=p===!0;try{return 0<this._cmp(s,u)||this._cmp(s,u)===0&&(d||p)&&(!d||!p)?ar(this):new this.Collection(this,function(){return yn(s,u,!d,!p)})}catch{return Nt(this,rn)}},ht.prototype.equals=function(s){return s==null?Nt(this,rn):new this.Collection(this,function(){return zl(s)})},ht.prototype.above=function(s){return s==null?Nt(this,rn):new this.Collection(this,function(){return yn(s,void 0,!0)})},ht.prototype.aboveOrEqual=function(s){return s==null?Nt(this,rn):new this.Collection(this,function(){return yn(s,void 0,!1)})},ht.prototype.below=function(s){return s==null?Nt(this,rn):new this.Collection(this,function(){return yn(void 0,s,!1,!0)})},ht.prototype.belowOrEqual=function(s){return s==null?Nt(this,rn):new this.Collection(this,function(){return yn(void 0,s)})},ht.prototype.startsWith=function(s){return typeof s!="string"?Nt(this,$l):this.between(s,s+Pn,!0,!0)},ht.prototype.startsWithIgnoreCase=function(s){return s===""?this.startsWith(s):Ii(this,function(u,d){return u.indexOf(d[0])===0},[s],Pn)},ht.prototype.equalsIgnoreCase=function(s){return Ii(this,function(u,d){return u===d[0]},[s],"")},ht.prototype.anyOfIgnoreCase=function(){var s=me.apply(se,arguments);return s.length===0?ar(this):Ii(this,function(u,d){return d.indexOf(u)!==-1},s,"")},ht.prototype.startsWithAnyOfIgnoreCase=function(){var s=me.apply(se,arguments);return s.length===0?ar(this):Ii(this,function(u,d){return d.some(function(p){return u.indexOf(p)===0})},s,Pn)},ht.prototype.anyOf=function(){var s=this,u=me.apply(se,arguments),d=this._cmp;try{u.sort(d)}catch{return Nt(this,rn)}if(u.length===0)return ar(this);var p=new this.Collection(this,function(){return yn(u[0],u[u.length-1])});p._ondirectionchange=function(v){d=v==="next"?s._ascending:s._descending,u.sort(d)};var g=0;return p._addAlgorithm(function(v,_,N){for(var P=v.key;0<d(P,u[g]);)if(++g===u.length)return _(N),!1;return d(P,u[g])===0||(_(function(){v.continue(u[g])}),!1)}),p},ht.prototype.notEqual=function(s){return this.inAnyRange([[-1/0,s],[s,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},ht.prototype.noneOf=function(){var s=me.apply(se,arguments);if(s.length===0)return new this.Collection(this);try{s.sort(this._ascending)}catch{return Nt(this,rn)}var u=s.reduce(function(d,p){return d?d.concat([[d[d.length-1][1],p]]):[[-1/0,p]]},null);return u.push([s[s.length-1],this.db._maxKey]),this.inAnyRange(u,{includeLowers:!1,includeUppers:!1})},ht.prototype.inAnyRange=function(Y,u){var d=this,p=this._cmp,g=this._ascending,v=this._descending,_=this._min,N=this._max;if(Y.length===0)return ar(this);if(!Y.every(function(X){return X[0]!==void 0&&X[1]!==void 0&&g(X[0],X[1])<=0}))return Nt(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",oe.InvalidArgument);var P=!u||u.includeLowers!==!1,L=u&&u.includeUppers===!0,U,T=g;function K(X,Z){return T(X[0],Z[0])}try{(U=Y.reduce(function(X,Z){for(var ae=0,de=X.length;ae<de;++ae){var be=X[ae];if(p(Z[0],be[1])<0&&0<p(Z[1],be[0])){be[0]=_(be[0],Z[0]),be[1]=N(be[1],Z[1]);break}}return ae===de&&X.push(Z),X},[])).sort(K)}catch{return Nt(this,rn)}var F=0,M=L?function(X){return 0<g(X,U[F][1])}:function(X){return 0<=g(X,U[F][1])},H=P?function(X){return 0<v(X,U[F][0])}:function(X){return 0<=v(X,U[F][0])},$=M,Y=new this.Collection(this,function(){return yn(U[0][0],U[U.length-1][1],!P,!L)});return Y._ondirectionchange=function(X){T=X==="next"?($=M,g):($=H,v),U.sort(K)},Y._addAlgorithm(function(X,Z,ae){for(var de,be=X.key;$(be);)if(++F===U.length)return Z(ae),!1;return!M(de=be)&&!H(de)||(d._cmp(be,U[F][1])===0||d._cmp(be,U[F][0])===0||Z(function(){T===g?X.continue(U[F][0]):X.continue(U[F][1])}),!1)}),Y},ht.prototype.startsWithAnyOf=function(){var s=me.apply(se,arguments);return s.every(function(u){return typeof u=="string"})?s.length===0?ar(this):this.inAnyRange(s.map(function(u){return[u,u+Pn]})):Nt(this,"startsWithAnyOf() only works with strings")},ht);function ht(){}function Yt(s){return nt(function(u){return Dr(u),s(u.target.error),!1})}function Dr(s){s.stopPropagation&&s.stopPropagation(),s.preventDefault&&s.preventDefault()}var Lr="storagemutated",Os="x-storagemutated-1",vn=Pr(null,Lr),Km=(Qt.prototype._lock=function(){return R(!Te.global),++this._reculock,this._reculock!==1||Te.global||(Te.lockOwnerFor=this),this},Qt.prototype._unlock=function(){if(R(!Te.global),--this._reculock==0)for(Te.global||(Te.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var s=this._blockedFuncs.shift();try{xn(s[1],s[0])}catch{}}return this},Qt.prototype._locked=function(){return this._reculock&&Te.lockOwnerFor!==this},Qt.prototype.create=function(s){var u=this;if(!this.mode)return this;var d=this.db.idbdb,p=this.db._state.dbOpenError;if(R(!this.idbtrans),!s&&!d)switch(p&&p.name){case"DatabaseClosedError":throw new oe.DatabaseClosed(p);case"MissingAPIError":throw new oe.MissingAPI(p.message,p);default:throw new oe.OpenFailed(p)}if(!this.active)throw new oe.TransactionInactive;return R(this._completion._state===null),(s=this.idbtrans=s||(this.db.core||d).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=nt(function(g){Dr(g),u._reject(s.error)}),s.onabort=nt(function(g){Dr(g),u.active&&u._reject(new oe.Abort(s.error)),u.active=!1,u.on("abort").fire(g)}),s.oncomplete=nt(function(){u.active=!1,u._resolve(),"mutatedParts"in s&&vn.storagemutated.fire(s.mutatedParts)}),this},Qt.prototype._promise=function(s,u,d){var p=this;if(s==="readwrite"&&this.mode!=="readwrite")return at(new oe.ReadOnly("Transaction is readonly"));if(!this.active)return at(new oe.TransactionInactive);if(this._locked())return new Se(function(v,_){p._blockedFuncs.push([function(){p._promise(s,u,d).then(v,_)},Te])});if(d)return pn(function(){var v=new Se(function(_,N){p._lock();var P=u(_,N,p);P&&P.then&&P.then(_,N)});return v.finally(function(){return p._unlock()}),v._lib=!0,v});var g=new Se(function(v,_){var N=u(v,_,p);N&&N.then&&N.then(v,_)});return g._lib=!0,g},Qt.prototype._root=function(){return this.parent?this.parent._root():this},Qt.prototype.waitFor=function(s){var u,d=this._root(),p=Se.resolve(s);d._waitingFor?d._waitingFor=d._waitingFor.then(function(){return p}):(d._waitingFor=p,d._waitingQueue=[],u=d.idbtrans.objectStore(d.storeNames[0]),function v(){for(++d._spinCount;d._waitingQueue.length;)d._waitingQueue.shift()();d._waitingFor&&(u.get(-1/0).onsuccess=v)}());var g=d._waitingFor;return new Se(function(v,_){p.then(function(N){return d._waitingQueue.push(nt(v.bind(null,N)))},function(N){return d._waitingQueue.push(nt(_.bind(null,N)))}).finally(function(){d._waitingFor===g&&(d._waitingFor=null)})})},Qt.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new oe.Abort))},Qt.prototype.table=function(s){var u=this._memoizedTables||(this._memoizedTables={});if(y(u,s))return u[s];var d=this.schema[s];if(!d)throw new oe.NotFound("Table "+s+" not part of transaction");return d=new this.db.Table(s,d,this),d.core=this.db.core.table(s),u[s]=d},Qt);function Qt(){}function Rs(s,u,d,p,g,v,_){return{name:s,keyPath:u,unique:d,multi:p,auto:g,compound:v,src:(d&&!_?"&":"")+(p?"*":"")+(g?"++":"")+Wl(u)}}function Wl(s){return typeof s=="string"?s:s?"["+[].join.call(s,"+")+"]":""}function Ts(s,u,d){return{name:s,primKey:u,indexes:d,mappedClass:null,idxByName:(p=function(g){return[g.name,g]},d.reduce(function(g,v,_){return _=p(v,_),_&&(g[_[0]]=_[1]),g},{}))};var p}var $r=function(s){try{return s.only([[]]),$r=function(){return[[]]},[[]]}catch{return $r=function(){return Pn},Pn}};function Cs(s){return s==null?function(){}:typeof s=="string"?(u=s).split(".").length===1?function(d){return d[u]}:function(d){return z(d,u)}:function(d){return z(d,s)};var u}function Jl(s){return[].slice.call(s)}var zm=0;function jr(s){return s==null?":id":typeof s=="string"?s:"[".concat(s.join("+"),"]")}function Gm(s,u,P){function p($){if($.type===3)return null;if($.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var F=$.lower,M=$.upper,H=$.lowerOpen,$=$.upperOpen;return F===void 0?M===void 0?null:u.upperBound(M,!!$):M===void 0?u.lowerBound(F,!!H):u.bound(F,M,!!H,!!$)}function g(K){var F,M=K.name;return{name:M,schema:K,mutate:function(H){var $=H.trans,Y=H.type,X=H.keys,Z=H.values,ae=H.range;return new Promise(function(de,be){de=nt(de);var fe=$.objectStore(M),ye=fe.keyPath==null,_e=Y==="put"||Y==="add";if(!_e&&Y!=="delete"&&Y!=="deleteRange")throw new Error("Invalid operation type: "+Y);var ve,Ne=(X||Z||{length:1}).length;if(X&&Z&&X.length!==Z.length)throw new Error("Given keys array must have same length as given values array.");if(Ne===0)return de({numFailures:0,failures:{},results:[],lastResult:void 0});function Le(St){++Ot,Dr(St)}var Be=[],Me=[],Ot=0;if(Y==="deleteRange"){if(ae.type===4)return de({numFailures:Ot,failures:Me,results:[],lastResult:void 0});ae.type===3?Be.push(ve=fe.clear()):Be.push(ve=fe.delete(p(ae)))}else{var ye=_e?ye?[Z,X]:[Z,null]:[X,null],De=ye[0],vt=ye[1];if(_e)for(var bt=0;bt<Ne;++bt)Be.push(ve=vt&&vt[bt]!==void 0?fe[Y](De[bt],vt[bt]):fe[Y](De[bt])),ve.onerror=Le;else for(bt=0;bt<Ne;++bt)Be.push(ve=fe[Y](De[bt])),ve.onerror=Le}function Gi(St){St=St.target.result,Be.forEach(function(Ln,Ws){return Ln.error!=null&&(Me[Ws]=Ln.error)}),de({numFailures:Ot,failures:Me,results:Y==="delete"?X:Be.map(function(Ln){return Ln.result}),lastResult:St})}ve.onerror=function(St){Le(St),Gi(St)},ve.onsuccess=Gi})},getMany:function(H){var $=H.trans,Y=H.keys;return new Promise(function(X,Z){X=nt(X);for(var ae,de=$.objectStore(M),be=Y.length,fe=new Array(be),ye=0,_e=0,ve=function(Be){Be=Be.target,fe[Be._pos]=Be.result,++_e===ye&&X(fe)},Ne=Yt(Z),Le=0;Le<be;++Le)Y[Le]!=null&&((ae=de.get(Y[Le]))._pos=Le,ae.onsuccess=ve,ae.onerror=Ne,++ye);ye===0&&X(fe)})},get:function(H){var $=H.trans,Y=H.key;return new Promise(function(X,Z){X=nt(X);var ae=$.objectStore(M).get(Y);ae.onsuccess=function(de){return X(de.target.result)},ae.onerror=Yt(Z)})},query:(F=L,function(H){return new Promise(function($,Y){$=nt($);var X,Z,ae,ye=H.trans,de=H.values,be=H.limit,ve=H.query,fe=be===1/0?void 0:be,_e=ve.index,ve=ve.range,ye=ye.objectStore(M),_e=_e.isPrimaryKey?ye:ye.index(_e.name),ve=p(ve);if(be===0)return $({result:[]});F?((fe=de?_e.getAll(ve,fe):_e.getAllKeys(ve,fe)).onsuccess=function(Ne){return $({result:Ne.target.result})},fe.onerror=Yt(Y)):(X=0,Z=!de&&"openKeyCursor"in _e?_e.openKeyCursor(ve):_e.openCursor(ve),ae=[],Z.onsuccess=function(Ne){var Le=Z.result;return Le?(ae.push(de?Le.value:Le.primaryKey),++X===be?$({result:ae}):void Le.continue()):$({result:ae})},Z.onerror=Yt(Y))})}),openCursor:function(H){var $=H.trans,Y=H.values,X=H.query,Z=H.reverse,ae=H.unique;return new Promise(function(de,be){de=nt(de);var _e=X.index,fe=X.range,ye=$.objectStore(M),ye=_e.isPrimaryKey?ye:ye.index(_e.name),_e=Z?ae?"prevunique":"prev":ae?"nextunique":"next",ve=!Y&&"openKeyCursor"in ye?ye.openKeyCursor(p(fe),_e):ye.openCursor(p(fe),_e);ve.onerror=Yt(be),ve.onsuccess=nt(function(Ne){var Le,Be,Me,Ot,De=ve.result;De?(De.___id=++zm,De.done=!1,Le=De.continue.bind(De),Be=(Be=De.continuePrimaryKey)&&Be.bind(De),Me=De.advance.bind(De),Ot=function(){throw new Error("Cursor not stopped")},De.trans=$,De.stop=De.continue=De.continuePrimaryKey=De.advance=function(){throw new Error("Cursor not started")},De.fail=nt(be),De.next=function(){var vt=this,bt=1;return this.start(function(){return bt--?vt.continue():vt.stop()}).then(function(){return vt})},De.start=function(vt){function bt(){if(ve.result)try{vt()}catch(St){De.fail(St)}else De.done=!0,De.start=function(){throw new Error("Cursor behind last entry")},De.stop()}var Gi=new Promise(function(St,Ln){St=nt(St),ve.onerror=Yt(Ln),De.fail=Ln,De.stop=function(Ws){De.stop=De.continue=De.continuePrimaryKey=De.advance=Ot,St(Ws)}});return ve.onsuccess=nt(function(St){ve.onsuccess=bt,bt()}),De.continue=Le,De.continuePrimaryKey=Be,De.advance=Me,bt(),Gi},de(De)):de(null)},be)})},count:function(H){var $=H.query,Y=H.trans,X=$.index,Z=$.range;return new Promise(function(ae,de){var be=Y.objectStore(M),fe=X.isPrimaryKey?be:be.index(X.name),be=p(Z),fe=be?fe.count(be):fe.count();fe.onsuccess=nt(function(ye){return ae(ye.target.result)}),fe.onerror=Yt(de)})}}}var v,_,N,U=(_=P,N=Jl((v=s).objectStoreNames),{schema:{name:v.name,tables:N.map(function(K){return _.objectStore(K)}).map(function(K){var F=K.keyPath,$=K.autoIncrement,M=l(F),H={},$={name:K.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:F==null,compound:M,keyPath:F,autoIncrement:$,unique:!0,extractKey:Cs(F)},indexes:Jl(K.indexNames).map(function(Y){return K.index(Y)}).map(function(ae){var X=ae.name,Z=ae.unique,de=ae.multiEntry,ae=ae.keyPath,de={name:X,compound:l(ae),keyPath:ae,unique:Z,multiEntry:de,extractKey:Cs(ae)};return H[jr(ae)]=de}),getIndexByKeyPath:function(Y){return H[jr(Y)]}};return H[":id"]=$.primaryKey,F!=null&&(H[jr(F)]=$.primaryKey),$})},hasGetAll:0<N.length&&"getAll"in _.objectStore(N[0])&&!(typeof navigator!="undefined"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),P=U.schema,L=U.hasGetAll,U=P.tables.map(g),T={};return U.forEach(function(K){return T[K.name]=K}),{stack:"dbcore",transaction:s.transaction.bind(s),table:function(K){if(!T[K])throw new Error("Table '".concat(K,"' not found"));return T[K]},MIN_KEY:-1/0,MAX_KEY:$r(u),schema:P}}function Wm(s,u,d,p){var g=d.IDBKeyRange;return d.indexedDB,{dbcore:(p=Gm(u,g,p),s.dbcore.reduce(function(v,_){return _=_.create,r(r({},v),_(v))},p))}}function Di(s,p){var d=p.db,p=Wm(s._middlewares,d,s._deps,p);s.core=p.dbcore,s.tables.forEach(function(g){var v=g.name;s.core.schema.tables.some(function(_){return _.name===v})&&(g.core=s.core.table(v),s[v]instanceof s.Table&&(s[v].core=g.core))})}function Li(s,u,d,p){d.forEach(function(g){var v=p[g];u.forEach(function(_){var N=function P(L,U){return b(L,U)||(L=f(L))&&P(L,U)}(_,g);(!N||"value"in N&&N.value===void 0)&&(_===s.Transaction.prototype||_ instanceof s.Transaction?A(_,g,{get:function(){return this.table(g)},set:function(P){O(this,g,{value:P,writable:!0,configurable:!0,enumerable:!0})}}):_[g]=new s.Table(g,v))})})}function xs(s,u){u.forEach(function(d){for(var p in d)d[p]instanceof s.Table&&delete d[p]})}function Jm(s,u){return s._cfg.version-u._cfg.version}function Ym(s,u,d,p){var g=s._dbSchema;d.objectStoreNames.contains("$meta")&&!g.$meta&&(g.$meta=Ts("$meta",Ql("")[0],[]),s._storeNames.push("$meta"));var v=s._createTransaction("readwrite",s._storeNames,g);v.create(d),v._completion.catch(p);var _=v._reject.bind(v),N=Te.transless||Te;pn(function(){return Te.trans=v,Te.transless=N,u!==0?(Di(s,d),L=u,((P=v).storeNames.includes("$meta")?P.table("$meta").get("version").then(function(U){return U!=null?U:L}):Se.resolve(L)).then(function(U){return K=U,F=v,M=d,H=[],U=(T=s)._versions,$=T._dbSchema=ji(0,T.idbdb,M),(U=U.filter(function(Y){return Y._cfg.version>=K})).length!==0?(U.forEach(function(Y){H.push(function(){var X=$,Z=Y._cfg.dbschema;Bi(T,X,M),Bi(T,Z,M),$=T._dbSchema=Z;var ae=Ps(X,Z);ae.add.forEach(function(_e){Fs(M,_e[0],_e[1].primKey,_e[1].indexes)}),ae.change.forEach(function(_e){if(_e.recreate)throw new oe.Upgrade("Not yet support for changing primary key");var ve=M.objectStore(_e.name);_e.add.forEach(function(Ne){return $i(ve,Ne)}),_e.change.forEach(function(Ne){ve.deleteIndex(Ne.name),$i(ve,Ne)}),_e.del.forEach(function(Ne){return ve.deleteIndex(Ne)})});var de=Y._cfg.contentUpgrade;if(de&&Y._cfg.version>K){Di(T,M),F._memoizedTables={};var be=re(Z);ae.del.forEach(function(_e){be[_e]=X[_e]}),xs(T,[T.Transaction.prototype]),Li(T,[T.Transaction.prototype],o(be),be),F.schema=be;var fe,ye=G(de);return ye&&nr(),ae=Se.follow(function(){var _e;(fe=de(F))&&ye&&(_e=mn.bind(null,null),fe.then(_e,_e))}),fe&&typeof fe.then=="function"?Se.resolve(fe):ae.then(function(){return fe})}}),H.push(function(X){var Z,ae,de=Y._cfg.dbschema;Z=de,ae=X,[].slice.call(ae.db.objectStoreNames).forEach(function(be){return Z[be]==null&&ae.db.deleteObjectStore(be)}),xs(T,[T.Transaction.prototype]),Li(T,[T.Transaction.prototype],T._storeNames,T._dbSchema),F.schema=T._dbSchema}),H.push(function(X){T.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(T.idbdb.version/10)===Y._cfg.version?(T.idbdb.deleteObjectStore("$meta"),delete T._dbSchema.$meta,T._storeNames=T._storeNames.filter(function(Z){return Z!=="$meta"})):X.objectStore("$meta").put(Y._cfg.version,"version"))})}),function Y(){return H.length?Se.resolve(H.shift()(F.idbtrans)).then(Y):Se.resolve()}().then(function(){Yl($,M)})):Se.resolve();var T,K,F,M,H,$}).catch(_)):(o(g).forEach(function(U){Fs(d,U,g[U].primKey,g[U].indexes)}),Di(s,d),void Se.follow(function(){return s.on.populate.fire(v)}).catch(_));var P,L})}function Qm(s,u){Yl(s._dbSchema,u),u.db.version%10!=0||u.objectStoreNames.contains("$meta")||u.db.createObjectStore("$meta").add(Math.ceil(u.db.version/10-1),"version");var d=ji(0,s.idbdb,u);Bi(s,s._dbSchema,u);for(var p=0,g=Ps(d,s._dbSchema).change;p<g.length;p++){var v=function(_){if(_.change.length||_.recreate)return console.warn("Unable to patch indexes of table ".concat(_.name," because it has changes on the type of index or primary key.")),{value:void 0};var N=u.objectStore(_.name);_.add.forEach(function(P){pe&&console.debug("Dexie upgrade patch: Creating missing index ".concat(_.name,".").concat(P.src)),$i(N,P)})}(g[p]);if(typeof v=="object")return v.value}}function Ps(s,u){var d,p={del:[],add:[],change:[]};for(d in s)u[d]||p.del.push(d);for(d in u){var g=s[d],v=u[d];if(g){var _={name:d,def:v,recreate:!1,del:[],add:[],change:[]};if(""+(g.primKey.keyPath||"")!=""+(v.primKey.keyPath||"")||g.primKey.auto!==v.primKey.auto)_.recreate=!0,p.change.push(_);else{var N=g.idxByName,P=v.idxByName,L=void 0;for(L in N)P[L]||_.del.push(L);for(L in P){var U=N[L],T=P[L];U?U.src!==T.src&&_.change.push(T):_.add.push(T)}(0<_.del.length||0<_.add.length||0<_.change.length)&&p.change.push(_)}}else p.add.push([d,v])}return p}function Fs(s,u,d,p){var g=s.db.createObjectStore(u,d.keyPath?{keyPath:d.keyPath,autoIncrement:d.auto}:{autoIncrement:d.auto});return p.forEach(function(v){return $i(g,v)}),g}function Yl(s,u){o(s).forEach(function(d){u.db.objectStoreNames.contains(d)||(pe&&console.debug("Dexie: Creating missing table",d),Fs(u,d,s[d].primKey,s[d].indexes))})}function $i(s,u){s.createIndex(u.name,u.keyPath,{unique:u.unique,multiEntry:u.multi})}function ji(s,u,d){var p={};return C(u.objectStoreNames,0).forEach(function(g){for(var v=d.objectStore(g),_=Rs(Wl(L=v.keyPath),L||"",!0,!1,!!v.autoIncrement,L&&typeof L!="string",!0),N=[],P=0;P<v.indexNames.length;++P){var U=v.index(v.indexNames[P]),L=U.keyPath,U=Rs(U.name,L,!!U.unique,!!U.multiEntry,!1,L&&typeof L!="string",!1);N.push(U)}p[g]=Ts(g,_,N)}),p}function Bi(s,u,d){for(var p=d.db.objectStoreNames,g=0;g<p.length;++g){var v=p[g],_=d.objectStore(v);s._hasGetAll="getAll"in _;for(var N=0;N<_.indexNames.length;++N){var P=_.indexNames[N],L=_.index(P).keyPath,U=typeof L=="string"?L:"["+C(L).join("+")+"]";!u[v]||(L=u[v].idxByName[U])&&(L.name=P,delete u[v].idxByName[U],u[v].idxByName[P]=L)}}typeof navigator!="undefined"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&a.WorkerGlobalScope&&a instanceof a.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(s._hasGetAll=!1)}function Ql(s){return s.split(",").map(function(u,d){var p=(u=u.trim()).replace(/([&*]|\+\+)/g,""),g=/^\[/.test(p)?p.match(/^\[(.*)\]$/)[1].split("+"):p;return Rs(p,g||null,/\&/.test(u),/\*/.test(u),/\+\+/.test(u),l(g),d===0)})}var Xm=(Mi.prototype._parseStoresSpec=function(s,u){o(s).forEach(function(d){if(s[d]!==null){var p=Ql(s[d]),g=p.shift();if(g.unique=!0,g.multi)throw new oe.Schema("Primary key cannot be multi-valued");p.forEach(function(v){if(v.auto)throw new oe.Schema("Only primary key can be marked as autoIncrement (++)");if(!v.keyPath)throw new oe.Schema("Index must have a name and cannot be an empty string")}),u[d]=Ts(d,g,p)}})},Mi.prototype.stores=function(d){var u=this.db;this._cfg.storesSource=this._cfg.storesSource?c(this._cfg.storesSource,d):d;var d=u._versions,p={},g={};return d.forEach(function(v){c(p,v._cfg.storesSource),g=v._cfg.dbschema={},v._parseStoresSpec(p,g)}),u._dbSchema=g,xs(u,[u._allTables,u,u.Transaction.prototype]),Li(u,[u._allTables,u,u.Transaction.prototype,this._cfg.tables],o(g),g),u._storeNames=o(g),this},Mi.prototype.upgrade=function(s){return this._cfg.contentUpgrade=qe(this._cfg.contentUpgrade||we,s),this},Mi);function Mi(){}function Is(s,u){var d=s._dbNamesDB;return d||(d=s._dbNamesDB=new an(Ci,{addons:[],indexedDB:s,IDBKeyRange:u})).version(1).stores({dbnames:"name"}),d.table("dbnames")}function Ds(s){return s&&typeof s.databases=="function"}function Ls(s){return pn(function(){return Te.letThrough=!0,s()})}function $s(s){return!("from"in s)}var yt=function(s,u){if(!this){var d=new yt;return s&&"d"in s&&c(d,s),d}c(this,arguments.length?{d:1,from:s,to:1<arguments.length?u:s}:{d:0})};function Br(s,u,d){var p=He(u,d);if(!isNaN(p)){if(0<p)throw RangeError();if($s(s))return c(s,{from:u,to:d,d:1});var g=s.l,p=s.r;if(He(d,s.from)<0)return g?Br(g,u,d):s.l={from:u,to:d,d:1,l:null,r:null},Zl(s);if(0<He(u,s.to))return p?Br(p,u,d):s.r={from:u,to:d,d:1,l:null,r:null},Zl(s);He(u,s.from)<0&&(s.from=u,s.l=null,s.d=p?p.d+1:1),0<He(d,s.to)&&(s.to=d,s.r=null,s.d=s.l?s.l.d+1:1),d=!s.r,g&&!s.l&&Mr(s,g),p&&d&&Mr(s,p)}}function Mr(s,u){$s(u)||function d(p,P){var v=P.from,_=P.to,N=P.l,P=P.r;Br(p,v,_),N&&d(p,N),P&&d(p,P)}(s,u)}function Xl(s,u){var d=Ui(u),p=d.next();if(p.done)return!1;for(var g=p.value,v=Ui(s),_=v.next(g.from),N=_.value;!p.done&&!_.done;){if(He(N.from,g.to)<=0&&0<=He(N.to,g.from))return!0;He(g.from,N.from)<0?g=(p=d.next(N.from)).value:N=(_=v.next(g.from)).value}return!1}function Ui(s){var u=$s(s)?null:{s:0,n:s};return{next:function(d){for(var p=0<arguments.length;u;)switch(u.s){case 0:if(u.s=1,p)for(;u.n.l&&He(d,u.n.from)<0;)u={up:u,n:u.n.l,s:1};else for(;u.n.l;)u={up:u,n:u.n.l,s:1};case 1:if(u.s=2,!p||He(d,u.n.to)<=0)return{value:u.n,done:!1};case 2:if(u.n.r){u.s=3,u={up:u,n:u.n.r,s:0};continue}case 3:u=u.up}return{done:!0}}}}function Zl(s){var u,d,p=(((u=s.r)===null||u===void 0?void 0:u.d)||0)-(((d=s.l)===null||d===void 0?void 0:d.d)||0),g=1<p?"r":p<-1?"l":"";g&&(u=g=="r"?"l":"r",d=r({},s),p=s[g],s.from=p.from,s.to=p.to,s[g]=p[g],d[g]=p[u],(s[u]=d).d=ec(d)),s.d=ec(s)}function ec(d){var u=d.r,d=d.l;return(u?d?Math.max(u.d,d.d):u.d:d?d.d:0)+1}function Vi(s,u){return o(u).forEach(function(d){s[d]?Mr(s[d],u[d]):s[d]=function p(g){var v,_,N={};for(v in g)y(g,v)&&(_=g[v],N[v]=!_||typeof _!="object"||he.has(_.constructor)?_:p(_));return N}(u[d])}),s}function js(s,u){return s.all||u.all||Object.keys(s).some(function(d){return u[d]&&Xl(u[d],s[d])})}m(yt.prototype,((Dt={add:function(s){return Mr(this,s),this},addKey:function(s){return Br(this,s,s),this},addKeys:function(s){var u=this;return s.forEach(function(d){return Br(u,d,d)}),this},hasKey:function(s){var u=Ui(this).next(s).value;return u&&He(u.from,s)<=0&&0<=He(u.to,s)}})[J]=function(){return Ui(this)},Dt));var In={},Bs={},Ms=!1;function qi(s){Vi(Bs,s),Ms||(Ms=!0,setTimeout(function(){Ms=!1,Us(Bs,!(Bs={}))},0))}function Us(s,u){u===void 0&&(u=!1);var d=new Set;if(s.all)for(var p=0,g=Object.values(In);p<g.length;p++)tc(_=g[p],s,d,u);else for(var v in s){var _,N=/^idb\:\/\/(.*)\/(.*)\//.exec(v);N&&(v=N[1],N=N[2],(_=In["idb://".concat(v,"/").concat(N)])&&tc(_,s,d,u))}d.forEach(function(P){return P()})}function tc(s,u,d,p){for(var g=[],v=0,_=Object.entries(s.queries.query);v<_.length;v++){for(var N=_[v],P=N[0],L=[],U=0,T=N[1];U<T.length;U++){var K=T[U];js(u,K.obsSet)?K.subscribers.forEach(function($){return d.add($)}):p&&L.push(K)}p&&g.push([P,L])}if(p)for(var F=0,M=g;F<M.length;F++){var H=M[F],P=H[0],L=H[1];s.queries.query[P]=L}}function Zm(s){var u=s._state,d=s._deps.indexedDB;if(u.isBeingOpened||s.idbdb)return u.dbReadyPromise.then(function(){return u.dbOpenError?at(u.dbOpenError):s});u.isBeingOpened=!0,u.dbOpenError=null,u.openComplete=!1;var p=u.openCanceller,g=Math.round(10*s.verno),v=!1;function _(){if(u.openCanceller!==p)throw new oe.DatabaseClosed("db.open() was cancelled")}function N(){return new Se(function(K,F){if(_(),!d)throw new oe.MissingAPI;var M=s.name,H=u.autoSchema||!g?d.open(M):d.open(M,g);if(!H)throw new oe.MissingAPI;H.onerror=Yt(F),H.onblocked=nt(s._fireOnBlocked),H.onupgradeneeded=nt(function($){var Y;U=H.transaction,u.autoSchema&&!s._options.allowEmptyDB?(H.onerror=Dr,U.abort(),H.result.close(),(Y=d.deleteDatabase(M)).onsuccess=Y.onerror=nt(function(){F(new oe.NoSuchDatabase("Database ".concat(M," doesnt exist")))})):(U.onerror=Yt(F),$=$.oldVersion>Math.pow(2,62)?0:$.oldVersion,T=$<1,s.idbdb=H.result,v&&Qm(s,U),Ym(s,$/10,U,F))},F),H.onsuccess=nt(function(){U=null;var $,Y,X,Z,ae,de=s.idbdb=H.result,be=C(de.objectStoreNames);if(0<be.length)try{var fe=de.transaction((Z=be).length===1?Z[0]:Z,"readonly");if(u.autoSchema)Y=de,X=fe,($=s).verno=Y.version/10,X=$._dbSchema=ji(0,Y,X),$._storeNames=C(Y.objectStoreNames,0),Li($,[$._allTables],o(X),X);else if(Bi(s,s._dbSchema,fe),((ae=Ps(ji(0,(ae=s).idbdb,fe),ae._dbSchema)).add.length||ae.change.some(function(ye){return ye.add.length||ye.change.length}))&&!v)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),de.close(),g=de.version+1,v=!0,K(N());Di(s,fe)}catch{}rr.push(s),de.onversionchange=nt(function(ye){u.vcFired=!0,s.on("versionchange").fire(ye)}),de.onclose=nt(function(ye){s.on("close").fire(ye)}),T&&(ae=s._deps,fe=M,de=ae.indexedDB,ae=ae.IDBKeyRange,Ds(de)||fe===Ci||Is(de,ae).put({name:fe}).catch(we)),K()},F)}).catch(function(K){switch(K==null?void 0:K.name){case"UnknownError":if(0<u.PR1398_maxLoop)return u.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),N();break;case"VersionError":if(0<g)return g=0,N()}return Se.reject(K)})}var P,L=u.dbReadyResolve,U=null,T=!1;return Se.race([p,(typeof navigator=="undefined"?Se.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(K){function F(){return indexedDB.databases().finally(K)}P=setInterval(F,100),F()}).finally(function(){return clearInterval(P)}):Promise.resolve()).then(N)]).then(function(){return _(),u.onReadyBeingFired=[],Se.resolve(Ls(function(){return s.on.ready.fire(s.vip)})).then(function K(){if(0<u.onReadyBeingFired.length){var F=u.onReadyBeingFired.reduce(qe,we);return u.onReadyBeingFired=[],Se.resolve(Ls(function(){return F(s.vip)})).then(K)}})}).finally(function(){u.openCanceller===p&&(u.onReadyBeingFired=null,u.isBeingOpened=!1)}).catch(function(K){u.dbOpenError=K;try{U&&U.abort()}catch{}return p===u.openCanceller&&s._close(),at(K)}).finally(function(){u.openComplete=!0,L()}).then(function(){var K;return T&&(K={},s.tables.forEach(function(F){F.schema.indexes.forEach(function(M){M.name&&(K["idb://".concat(s.name,"/").concat(F.name,"/").concat(M.name)]=new yt(-1/0,[[[]]]))}),K["idb://".concat(s.name,"/").concat(F.name,"/")]=K["idb://".concat(s.name,"/").concat(F.name,"/:dels")]=new yt(-1/0,[[[]]])}),vn(Lr).fire(K),Us(K,!0)),s})}function Vs(s){function u(v){return s.next(v)}var d=g(u),p=g(function(v){return s.throw(v)});function g(v){return function(P){var N=v(P),P=N.value;return N.done?P:P&&typeof P.then=="function"?P.then(d,p):l(P)?Promise.all(P).then(d,p):d(P)}}return g(u)()}function Hi(s,u,d){for(var p=l(s)?s.slice():[s],g=0;g<d;++g)p.push(u);return p}var eg={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(s){return r(r({},s),{table:function(u){var d=s.table(u),p=d.schema,g={},v=[];function _(T,K,F){var M=jr(T),H=g[M]=g[M]||[],$=T==null?0:typeof T=="string"?1:T.length,Y=0<K,Y=r(r({},F),{name:Y?"".concat(M,"(virtual-from:").concat(F.name,")"):F.name,lowLevelIndex:F,isVirtual:Y,keyTail:K,keyLength:$,extractKey:Cs(T),unique:!Y&&F.unique});return H.push(Y),Y.isPrimaryKey||v.push(Y),1<$&&_($===2?T[0]:T.slice(0,$-1),K+1,F),H.sort(function(X,Z){return X.keyTail-Z.keyTail}),Y}u=_(p.primaryKey.keyPath,0,p.primaryKey),g[":id"]=[u];for(var N=0,P=p.indexes;N<P.length;N++){var L=P[N];_(L.keyPath,0,L)}function U(T){var K,F=T.query.index;return F.isVirtual?r(r({},T),{query:{index:F.lowLevelIndex,range:(K=T.query.range,F=F.keyTail,{type:K.type===1?2:K.type,lower:Hi(K.lower,K.lowerOpen?s.MAX_KEY:s.MIN_KEY,F),lowerOpen:!0,upper:Hi(K.upper,K.upperOpen?s.MIN_KEY:s.MAX_KEY,F),upperOpen:!0})}}):T}return r(r({},d),{schema:r(r({},p),{primaryKey:u,indexes:v,getIndexByKeyPath:function(T){return(T=g[jr(T)])&&T[0]}}),count:function(T){return d.count(U(T))},query:function(T){return d.query(U(T))},openCursor:function(T){var K=T.query.index,F=K.keyTail,M=K.isVirtual,H=K.keyLength;return M?d.openCursor(U(T)).then(function(Y){return Y&&$(Y)}):d.openCursor(T);function $(Y){return Object.create(Y,{continue:{value:function(X){X!=null?Y.continue(Hi(X,T.reverse?s.MAX_KEY:s.MIN_KEY,F)):T.unique?Y.continue(Y.key.slice(0,H).concat(T.reverse?s.MIN_KEY:s.MAX_KEY,F)):Y.continue()}},continuePrimaryKey:{value:function(X,Z){Y.continuePrimaryKey(Hi(X,s.MAX_KEY,F),Z)}},primaryKey:{get:function(){return Y.primaryKey}},key:{get:function(){var X=Y.key;return H===1?X[0]:X.slice(0,H)}},value:{get:function(){return Y.value}}})}}})}})}};function qs(s,u,d,p){return d=d||{},p=p||"",o(s).forEach(function(g){var v,_,N;y(u,g)?(v=s[g],_=u[g],typeof v=="object"&&typeof _=="object"&&v&&_?(N=w(v))!==w(_)?d[p+g]=u[g]:N==="Object"?qs(v,_,d,p+g+"."):v!==_&&(d[p+g]=u[g]):v!==_&&(d[p+g]=u[g])):d[p+g]=void 0}),o(u).forEach(function(g){y(s,g)||(d[p+g]=u[g])}),d}function Hs(s,u){return u.type==="delete"?u.keys:u.keys||u.values.map(s.extractKey)}var tg={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(s){return r(r({},s),{table:function(u){var d=s.table(u),p=d.schema.primaryKey;return r(r({},d),{mutate:function(g){var v=Te.trans,_=v.table(u).hook,N=_.deleting,P=_.creating,L=_.updating;switch(g.type){case"add":if(P.fire===we)break;return v._promise("readwrite",function(){return U(g)},!0);case"put":if(P.fire===we&&L.fire===we)break;return v._promise("readwrite",function(){return U(g)},!0);case"delete":if(N.fire===we)break;return v._promise("readwrite",function(){return U(g)},!0);case"deleteRange":if(N.fire===we)break;return v._promise("readwrite",function(){return function T(K,F,M){return d.query({trans:K,values:!1,query:{index:p,range:F},limit:M}).then(function(H){var $=H.result;return U({type:"delete",keys:$,trans:K}).then(function(Y){return 0<Y.numFailures?Promise.reject(Y.failures[0]):$.length<M?{failures:[],numFailures:0,lastResult:void 0}:T(K,r(r({},F),{lower:$[$.length-1],lowerOpen:!0}),M)})})}(g.trans,g.range,1e4)},!0)}return d.mutate(g);function U(T){var K,F,M,H=Te.trans,$=T.keys||Hs(p,T);if(!$)throw new Error("Keys missing");return(T=T.type==="add"||T.type==="put"?r(r({},T),{keys:$}):r({},T)).type!=="delete"&&(T.values=i([],T.values)),T.keys&&(T.keys=i([],T.keys)),K=d,M=$,((F=T).type==="add"?Promise.resolve([]):K.getMany({trans:F.trans,keys:M,cache:"immutable"})).then(function(Y){var X=$.map(function(Z,ae){var de,be,fe,ye=Y[ae],_e={onerror:null,onsuccess:null};return T.type==="delete"?N.fire.call(_e,Z,ye,H):T.type==="add"||ye===void 0?(de=P.fire.call(_e,Z,T.values[ae],H),Z==null&&de!=null&&(T.keys[ae]=Z=de,p.outbound||I(T.values[ae],p.keyPath,Z))):(de=qs(ye,T.values[ae]),(be=L.fire.call(_e,de,Z,ye,H))&&(fe=T.values[ae],Object.keys(be).forEach(function(ve){y(fe,ve)?fe[ve]=be[ve]:I(fe,ve,be[ve])}))),_e});return d.mutate(T).then(function(Z){for(var ae=Z.failures,de=Z.results,be=Z.numFailures,Z=Z.lastResult,fe=0;fe<$.length;++fe){var ye=(de||$)[fe],_e=X[fe];ye==null?_e.onerror&&_e.onerror(ae[fe]):_e.onsuccess&&_e.onsuccess(T.type==="put"&&Y[fe]?T.values[fe]:ye)}return{failures:ae,results:de,numFailures:be,lastResult:Z}}).catch(function(Z){return X.forEach(function(ae){return ae.onerror&&ae.onerror(Z)}),Promise.reject(Z)})})}}})}})}};function nc(s,u,d){try{if(!u||u.keys.length<s.length)return null;for(var p=[],g=0,v=0;g<u.keys.length&&v<s.length;++g)He(u.keys[g],s[v])===0&&(p.push(d?le(u.values[g]):u.values[g]),++v);return p.length===s.length?p:null}catch{return null}}var ng={stack:"dbcore",level:-1,create:function(s){return{table:function(u){var d=s.table(u);return r(r({},d),{getMany:function(p){if(!p.cache)return d.getMany(p);var g=nc(p.keys,p.trans._cache,p.cache==="clone");return g?Se.resolve(g):d.getMany(p).then(function(v){return p.trans._cache={keys:p.keys,values:p.cache==="clone"?le(v):v},v})},mutate:function(p){return p.type!=="add"&&(p.trans._cache=null),d.mutate(p)}})}}}};function rc(s,u){return s.trans.mode==="readonly"&&!!s.subscr&&!s.trans.explicit&&s.trans.db._options.cache!=="disabled"&&!u.schema.primaryKey.outbound}function ic(s,u){switch(s){case"query":return u.values&&!u.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var rg={stack:"dbcore",level:0,name:"Observability",create:function(s){var u=s.schema.name,d=new yt(s.MIN_KEY,s.MAX_KEY);return r(r({},s),{transaction:function(p,g,v){if(Te.subscr&&g!=="readonly")throw new oe.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(Te.querier));return s.transaction(p,g,v)},table:function(p){var g=s.table(p),v=g.schema,_=v.primaryKey,T=v.indexes,N=_.extractKey,P=_.outbound,L=_.autoIncrement&&T.filter(function(F){return F.compound&&F.keyPath.includes(_.keyPath)}),U=r(r({},g),{mutate:function(F){function M(ve){return ve="idb://".concat(u,"/").concat(p,"/").concat(ve),Z[ve]||(Z[ve]=new yt)}var H,$,Y,X=F.trans,Z=F.mutatedParts||(F.mutatedParts={}),ae=M(""),de=M(":dels"),be=F.type,_e=F.type==="deleteRange"?[F.range]:F.type==="delete"?[F.keys]:F.values.length<50?[Hs(_,F).filter(function(ve){return ve}),F.values]:[],fe=_e[0],ye=_e[1],_e=F.trans._cache;return l(fe)?(ae.addKeys(fe),(_e=be==="delete"||fe.length===ye.length?nc(fe,_e):null)||de.addKeys(fe),(_e||ye)&&(H=M,$=_e,Y=ye,v.indexes.forEach(function(ve){var Ne=H(ve.name||"");function Le(Me){return Me!=null?ve.extractKey(Me):null}function Be(Me){return ve.multiEntry&&l(Me)?Me.forEach(function(Ot){return Ne.addKey(Ot)}):Ne.addKey(Me)}($||Y).forEach(function(Me,vt){var De=$&&Le($[vt]),vt=Y&&Le(Y[vt]);He(De,vt)!==0&&(De!=null&&Be(De),vt!=null&&Be(vt))})}))):fe?(ye={from:(ye=fe.lower)!==null&&ye!==void 0?ye:s.MIN_KEY,to:(ye=fe.upper)!==null&&ye!==void 0?ye:s.MAX_KEY},de.add(ye),ae.add(ye)):(ae.add(d),de.add(d),v.indexes.forEach(function(ve){return M(ve.name).add(d)})),g.mutate(F).then(function(ve){return!fe||F.type!=="add"&&F.type!=="put"||(ae.addKeys(ve.results),L&&L.forEach(function(Ne){for(var Le=F.values.map(function(De){return Ne.extractKey(De)}),Be=Ne.keyPath.findIndex(function(De){return De===_.keyPath}),Me=0,Ot=ve.results.length;Me<Ot;++Me)Le[Me][Be]=ve.results[Me];M(Ne.name).addKeys(Le)})),X.mutatedParts=Vi(X.mutatedParts||{},Z),ve})}}),T=function(M){var H=M.query,M=H.index,H=H.range;return[M,new yt((M=H.lower)!==null&&M!==void 0?M:s.MIN_KEY,(H=H.upper)!==null&&H!==void 0?H:s.MAX_KEY)]},K={get:function(F){return[_,new yt(F.key)]},getMany:function(F){return[_,new yt().addKeys(F.keys)]},count:T,query:T,openCursor:T};return o(K).forEach(function(F){U[F]=function(M){var H=Te.subscr,$=!!H,Y=rc(Te,g)&&ic(F,M)?M.obsSet={}:H;if($){var X=function(ye){return ye="idb://".concat(u,"/").concat(p,"/").concat(ye),Y[ye]||(Y[ye]=new yt)},Z=X(""),ae=X(":dels"),H=K[F](M),$=H[0],H=H[1];if((F==="query"&&$.isPrimaryKey&&!M.values?ae:X($.name||"")).add(H),!$.isPrimaryKey){if(F!=="count"){var de=F==="query"&&P&&M.values&&g.query(r(r({},M),{values:!1}));return g[F].apply(this,arguments).then(function(ye){if(F==="query"){if(P&&M.values)return de.then(function(Le){return Le=Le.result,Z.addKeys(Le),ye});var _e=M.values?ye.result.map(N):ye.result;(M.values?Z:ae).addKeys(_e)}else if(F==="openCursor"){var ve=ye,Ne=M.values;return ve&&Object.create(ve,{key:{get:function(){return ae.addKey(ve.primaryKey),ve.key}},primaryKey:{get:function(){var Le=ve.primaryKey;return ae.addKey(Le),Le}},value:{get:function(){return Ne&&Z.addKey(ve.primaryKey),ve.value}}})}return ye})}ae.add(d)}}return g[F].apply(this,arguments)}}),U}})}};function ac(s,u,d){if(d.numFailures===0)return u;if(u.type==="deleteRange")return null;var p=u.keys?u.keys.length:"values"in u&&u.values?u.values.length:1;return d.numFailures===p?null:(u=r({},u),l(u.keys)&&(u.keys=u.keys.filter(function(g,v){return!(v in d.failures)})),"values"in u&&l(u.values)&&(u.values=u.values.filter(function(g,v){return!(v in d.failures)})),u)}function Ks(s,u){return d=s,((p=u).lower===void 0||(p.lowerOpen?0<He(d,p.lower):0<=He(d,p.lower)))&&(s=s,(u=u).upper===void 0||(u.upperOpen?He(s,u.upper)<0:He(s,u.upper)<=0));var d,p}function sc(s,u,K,p,g,v){if(!K||K.length===0)return s;var _=u.query.index,N=_.multiEntry,P=u.query.range,L=p.schema.primaryKey.extractKey,U=_.extractKey,T=(_.lowLevelIndex||_).extractKey,K=K.reduce(function(F,M){var H=F,$=[];if(M.type==="add"||M.type==="put")for(var Y=new yt,X=M.values.length-1;0<=X;--X){var Z,ae=M.values[X],de=L(ae);Y.hasKey(de)||(Z=U(ae),(N&&l(Z)?Z.some(function(ve){return Ks(ve,P)}):Ks(Z,P))&&(Y.addKey(de),$.push(ae)))}switch(M.type){case"add":var be=new yt().addKeys(u.values?F.map(function(Ne){return L(Ne)}):F),H=F.concat(u.values?$.filter(function(Ne){return Ne=L(Ne),!be.hasKey(Ne)&&(be.addKey(Ne),!0)}):$.map(function(Ne){return L(Ne)}).filter(function(Ne){return!be.hasKey(Ne)&&(be.addKey(Ne),!0)}));break;case"put":var fe=new yt().addKeys(M.values.map(function(Ne){return L(Ne)}));H=F.filter(function(Ne){return!fe.hasKey(u.values?L(Ne):Ne)}).concat(u.values?$:$.map(function(Ne){return L(Ne)}));break;case"delete":var ye=new yt().addKeys(M.keys);H=F.filter(function(Ne){return!ye.hasKey(u.values?L(Ne):Ne)});break;case"deleteRange":var _e=M.range;H=F.filter(function(Ne){return!Ks(L(Ne),_e)})}return H},s);return K===s?s:(K.sort(function(F,M){return He(T(F),T(M))||He(L(F),L(M))}),u.limit&&u.limit<1/0&&(K.length>u.limit?K.length=u.limit:s.length===u.limit&&K.length<u.limit&&(g.dirty=!0)),v?Object.freeze(K):K)}function oc(s,u){return He(s.lower,u.lower)===0&&He(s.upper,u.upper)===0&&!!s.lowerOpen==!!u.lowerOpen&&!!s.upperOpen==!!u.upperOpen}function ig(s,u){return function(d,p,g,v){if(d===void 0)return p!==void 0?-1:0;if(p===void 0)return 1;if((p=He(d,p))===0){if(g&&v)return 0;if(g)return 1;if(v)return-1}return p}(s.lower,u.lower,s.lowerOpen,u.lowerOpen)<=0&&0<=function(d,p,g,v){if(d===void 0)return p!==void 0?1:0;if(p===void 0)return-1;if((p=He(d,p))===0){if(g&&v)return 0;if(g)return-1;if(v)return 1}return p}(s.upper,u.upper,s.upperOpen,u.upperOpen)}function ag(s,u,d,p){s.subscribers.add(d),p.addEventListener("abort",function(){var g,v;s.subscribers.delete(d),s.subscribers.size===0&&(g=s,v=u,setTimeout(function(){g.subscribers.size===0&&ne(v,g)},3e3))})}var sg={stack:"dbcore",level:0,name:"Cache",create:function(s){var u=s.schema.name;return r(r({},s),{transaction:function(d,p,g){var v,_,N=s.transaction(d,p,g);return p==="readwrite"&&(_=(v=new AbortController).signal,g=function(P){return function(){if(v.abort(),p==="readwrite"){for(var L=new Set,U=0,T=d;U<T.length;U++){var K=T[U],F=In["idb://".concat(u,"/").concat(K)];if(F){var M=s.table(K),H=F.optimisticOps.filter(function(Ne){return Ne.trans===N});if(N._explicit&&P&&N.mutatedParts)for(var $=0,Y=Object.values(F.queries.query);$<Y.length;$++)for(var X=0,Z=(be=Y[$]).slice();X<Z.length;X++)js((fe=Z[X]).obsSet,N.mutatedParts)&&(ne(be,fe),fe.subscribers.forEach(function(Ne){return L.add(Ne)}));else if(0<H.length){F.optimisticOps=F.optimisticOps.filter(function(Ne){return Ne.trans!==N});for(var ae=0,de=Object.values(F.queries.query);ae<de.length;ae++)for(var be,fe,ye,_e=0,ve=(be=de[ae]).slice();_e<ve.length;_e++)(fe=ve[_e]).res!=null&&N.mutatedParts&&(P&&!fe.dirty?(ye=Object.isFrozen(fe.res),ye=sc(fe.res,fe.req,H,M,fe,ye),fe.dirty?(ne(be,fe),fe.subscribers.forEach(function(Ne){return L.add(Ne)})):ye!==fe.res&&(fe.res=ye,fe.promise=Se.resolve({result:ye}))):(fe.dirty&&ne(be,fe),fe.subscribers.forEach(function(Ne){return L.add(Ne)})))}}}L.forEach(function(Ne){return Ne()})}}},N.addEventListener("abort",g(!1),{signal:_}),N.addEventListener("error",g(!1),{signal:_}),N.addEventListener("complete",g(!0),{signal:_})),N},table:function(d){var p=s.table(d),g=p.schema.primaryKey;return r(r({},p),{mutate:function(v){var _=Te.trans;if(g.outbound||_.db._options.cache==="disabled"||_.explicit||_.idbtrans.mode!=="readwrite")return p.mutate(v);var N=In["idb://".concat(u,"/").concat(d)];return N?(_=p.mutate(v),v.type!=="add"&&v.type!=="put"||!(50<=v.values.length||Hs(g,v).some(function(P){return P==null}))?(N.optimisticOps.push(v),v.mutatedParts&&qi(v.mutatedParts),_.then(function(P){0<P.numFailures&&(ne(N.optimisticOps,v),(P=ac(0,v,P))&&N.optimisticOps.push(P),v.mutatedParts&&qi(v.mutatedParts))}),_.catch(function(){ne(N.optimisticOps,v),v.mutatedParts&&qi(v.mutatedParts)})):_.then(function(P){var L=ac(0,r(r({},v),{values:v.values.map(function(U,T){var K;return P.failures[T]?U:(U=(K=g.keyPath)!==null&&K!==void 0&&K.includes(".")?le(U):r({},U),I(U,g.keyPath,P.results[T]),U)})}),P);N.optimisticOps.push(L),queueMicrotask(function(){return v.mutatedParts&&qi(v.mutatedParts)})}),_):p.mutate(v)},query:function(v){if(!rc(Te,p)||!ic("query",v))return p.query(v);var _=((L=Te.trans)===null||L===void 0?void 0:L.db._options.cache)==="immutable",T=Te,N=T.requery,P=T.signal,L=function(M,H,$,Y){var X=In["idb://".concat(M,"/").concat(H)];if(!X)return[];if(!(H=X.queries[$]))return[null,!1,X,null];var Z=H[(Y.query?Y.query.index.name:null)||""];if(!Z)return[null,!1,X,null];switch($){case"query":var ae=Z.find(function(de){return de.req.limit===Y.limit&&de.req.values===Y.values&&oc(de.req.query.range,Y.query.range)});return ae?[ae,!0,X,Z]:[Z.find(function(de){return("limit"in de.req?de.req.limit:1/0)>=Y.limit&&(!Y.values||de.req.values)&&ig(de.req.query.range,Y.query.range)}),!1,X,Z];case"count":return ae=Z.find(function(de){return oc(de.req.query.range,Y.query.range)}),[ae,!!ae,X,Z]}}(u,d,"query",v),U=L[0],T=L[1],K=L[2],F=L[3];return U&&T?U.obsSet=v.obsSet:(T=p.query(v).then(function(M){var H=M.result;if(U&&(U.res=H),_){for(var $=0,Y=H.length;$<Y;++$)Object.freeze(H[$]);Object.freeze(H)}else M.result=le(H);return M}).catch(function(M){return F&&U&&ne(F,U),Promise.reject(M)}),U={obsSet:v.obsSet,promise:T,subscribers:new Set,type:"query",req:v,dirty:!1},F?F.push(U):(F=[U],(K=K||(In["idb://".concat(u,"/").concat(d)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[v.query.index.name||""]=F)),ag(U,F,N,P),U.promise.then(function(M){return{result:sc(M.result,v,K==null?void 0:K.optimisticOps,p,U,_)}})}})}})}};function Ki(s,u){return new Proxy(s,{get:function(d,p,g){return p==="db"?u:Reflect.get(d,p,g)}})}var an=(st.prototype.version=function(s){if(isNaN(s)||s<.1)throw new oe.Type("Given version is not a positive number");if(s=Math.round(10*s)/10,this.idbdb||this._state.isBeingOpened)throw new oe.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,s);var u=this._versions,d=u.filter(function(p){return p._cfg.version===s})[0];return d||(d=new this.Version(s),u.push(d),u.sort(Jm),d.stores({}),this._state.autoSchema=!1,d)},st.prototype._whenReady=function(s){var u=this;return this.idbdb&&(this._state.openComplete||Te.letThrough||this._vip)?s():new Se(function(d,p){if(u._state.openComplete)return p(new oe.DatabaseClosed(u._state.dbOpenError));if(!u._state.isBeingOpened){if(!u._state.autoOpen)return void p(new oe.DatabaseClosed);u.open().catch(we)}u._state.dbReadyPromise.then(d,p)}).then(s)},st.prototype.use=function(s){var u=s.stack,d=s.create,p=s.level,g=s.name;return g&&this.unuse({stack:u,name:g}),s=this._middlewares[u]||(this._middlewares[u]=[]),s.push({stack:u,create:d,level:p==null?10:p,name:g}),s.sort(function(v,_){return v.level-_.level}),this},st.prototype.unuse=function(s){var u=s.stack,d=s.name,p=s.create;return u&&this._middlewares[u]&&(this._middlewares[u]=this._middlewares[u].filter(function(g){return p?g.create!==p:!!d&&g.name!==d})),this},st.prototype.open=function(){var s=this;return xn(hn,function(){return Zm(s)})},st.prototype._close=function(){var s=this._state,u=rr.indexOf(this);if(0<=u&&rr.splice(u,1),this.idbdb){try{this.idbdb.close()}catch{}this.idbdb=null}s.isBeingOpened||(s.dbReadyPromise=new Se(function(d){s.dbReadyResolve=d}),s.openCanceller=new Se(function(d,p){s.cancelOpen=p}))},st.prototype.close=function(d){var u=(d===void 0?{disableAutoOpen:!0}:d).disableAutoOpen,d=this._state;u?(d.isBeingOpened&&d.cancelOpen(new oe.DatabaseClosed),this._close(),d.autoOpen=!1,d.dbOpenError=new oe.DatabaseClosed):(this._close(),d.autoOpen=this._options.autoOpen||d.isBeingOpened,d.openComplete=!1,d.dbOpenError=null)},st.prototype.delete=function(s){var u=this;s===void 0&&(s={disableAutoOpen:!0});var d=0<arguments.length&&typeof arguments[0]!="object",p=this._state;return new Se(function(g,v){function _(){u.close(s);var N=u._deps.indexedDB.deleteDatabase(u.name);N.onsuccess=nt(function(){var P,L,U;P=u._deps,L=u.name,U=P.indexedDB,P=P.IDBKeyRange,Ds(U)||L===Ci||Is(U,P).delete(L).catch(we),g()}),N.onerror=Yt(v),N.onblocked=u._fireOnBlocked}if(d)throw new oe.InvalidArgument("Invalid closeOptions argument to db.delete()");p.isBeingOpened?p.dbReadyPromise.then(_):_()})},st.prototype.backendDB=function(){return this.idbdb},st.prototype.isOpen=function(){return this.idbdb!==null},st.prototype.hasBeenClosed=function(){var s=this._state.dbOpenError;return s&&s.name==="DatabaseClosed"},st.prototype.hasFailed=function(){return this._state.dbOpenError!==null},st.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(st.prototype,"tables",{get:function(){var s=this;return o(this._allTables).map(function(u){return s._allTables[u]})},enumerable:!1,configurable:!0}),st.prototype.transaction=function(){var s=function(u,d,p){var g=arguments.length;if(g<2)throw new oe.InvalidArgument("Too few arguments");for(var v=new Array(g-1);--g;)v[g-1]=arguments[g];return p=v.pop(),[u,ke(v),p]}.apply(this,arguments);return this._transaction.apply(this,s)},st.prototype._transaction=function(s,u,d){var p=this,g=Te.trans;g&&g.db===this&&s.indexOf("!")===-1||(g=null);var v,_,N=s.indexOf("?")!==-1;s=s.replace("!","").replace("?","");try{if(_=u.map(function(L){if(L=L instanceof p.Table?L.name:L,typeof L!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return L}),s=="r"||s===Ss)v=Ss;else{if(s!="rw"&&s!=As)throw new oe.InvalidArgument("Invalid transaction mode: "+s);v=As}if(g){if(g.mode===Ss&&v===As){if(!N)throw new oe.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");g=null}g&&_.forEach(function(L){if(g&&g.storeNames.indexOf(L)===-1){if(!N)throw new oe.SubTransaction("Table "+L+" not included in parent transaction.");g=null}}),N&&g&&!g.active&&(g=null)}}catch(L){return g?g._promise(null,function(U,T){T(L)}):at(L)}var P=function L(U,T,K,F,M){return Se.resolve().then(function(){var H=Te.transless||Te,$=U._createTransaction(T,K,U._dbSchema,F);if($.explicit=!0,H={trans:$,transless:H},F)$.idbtrans=F.idbtrans;else try{$.create(),$.idbtrans._explicit=!0,U._state.PR1398_maxLoop=3}catch(Z){return Z.name===ge.InvalidState&&U.isOpen()&&0<--U._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),U.close({disableAutoOpen:!1}),U.open().then(function(){return L(U,T,K,null,M)})):at(Z)}var Y,X=G(M);return X&&nr(),H=Se.follow(function(){var Z;(Y=M.call($,$))&&(X?(Z=mn.bind(null,null),Y.then(Z,Z)):typeof Y.next=="function"&&typeof Y.throw=="function"&&(Y=Vs(Y)))},H),(Y&&typeof Y.then=="function"?Se.resolve(Y).then(function(Z){return $.active?Z:at(new oe.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):H.then(function(){return Y})).then(function(Z){return F&&$._resolve(),$._completion.then(function(){return Z})}).catch(function(Z){return $._reject(Z),at(Z)})})}.bind(null,this,v,_,g,d);return g?g._promise(v,P,"lock"):Te.trans?xn(Te.transless,function(){return p._whenReady(P)}):this._whenReady(P)},st.prototype.table=function(s){if(!y(this._allTables,s))throw new oe.InvalidTable("Table ".concat(s," does not exist"));return this._allTables[s]},st);function st(s,u){var d=this;this._middlewares={},this.verno=0;var p=st.dependencies;this._options=u=r({addons:st.addons,autoOpen:!0,indexedDB:p.indexedDB,IDBKeyRange:p.IDBKeyRange,cache:"cloned"},u),this._deps={indexedDB:u.indexedDB,IDBKeyRange:u.IDBKeyRange},p=u.addons,this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var g,v,_,N,P,L={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:we,dbReadyPromise:null,cancelOpen:we,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:u.autoOpen};L.dbReadyPromise=new Se(function(T){L.dbReadyResolve=T}),L.openCanceller=new Se(function(T,K){L.cancelOpen=K}),this._state=L,this.name=s,this.on=Pr(this,"populate","blocked","versionchange","close",{ready:[qe,we]}),this.on.ready.subscribe=S(this.on.ready.subscribe,function(T){return function(K,F){st.vip(function(){var M,H=d._state;H.openComplete?(H.dbOpenError||Se.resolve().then(K),F&&T(K)):H.onReadyBeingFired?(H.onReadyBeingFired.push(K),F&&T(K)):(T(K),M=d,F||T(function $(){M.on.ready.unsubscribe(K),M.on.ready.unsubscribe($)}))})}}),this.Collection=(g=this,Fr(Vm.prototype,function(Y,$){this.db=g;var F=jl,M=null;if($)try{F=$()}catch(X){M=X}var H=Y._ctx,$=H.table,Y=$.hook.reading.fire;this._ctx={table:$,index:H.index,isPrimKey:!H.index||$.schema.primKey.keyPath&&H.index===$.schema.primKey.name,range:F,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:M,or:H.or,valueMapper:Y!==ct?Y:null}})),this.Table=(v=this,Fr(Vl.prototype,function(T,K,F){this.db=v,this._tx=F,this.name=T,this.schema=K,this.hook=v._allTables[T]?v._allTables[T].hook:Pr(null,{creating:[Pe,we],reading:[Ze,ct],updating:[Ft,we],deleting:[Je,we]})})),this.Transaction=(_=this,Fr(Km.prototype,function(T,K,F,M,H){var $=this;this.db=_,this.mode=T,this.storeNames=K,this.schema=F,this.chromeTransactionDurability=M,this.idbtrans=null,this.on=Pr(this,"complete","error","abort"),this.parent=H||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new Se(function(Y,X){$._resolve=Y,$._reject=X}),this._completion.then(function(){$.active=!1,$.on.complete.fire()},function(Y){var X=$.active;return $.active=!1,$.on.error.fire(Y),$.parent?$.parent._reject(Y):X&&$.idbtrans&&$.idbtrans.abort(),at(Y)})})),this.Version=(N=this,Fr(Xm.prototype,function(T){this.db=N,this._cfg={version:T,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=(P=this,Fr(Gl.prototype,function(T,K,F){if(this.db=P,this._ctx={table:T,index:K===":id"?null:K,or:F},this._cmp=this._ascending=He,this._descending=function(M,H){return He(H,M)},this._max=function(M,H){return 0<He(M,H)?M:H},this._min=function(M,H){return He(M,H)<0?M:H},this._IDBKeyRange=P._deps.IDBKeyRange,!this._IDBKeyRange)throw new oe.MissingAPI})),this.on("versionchange",function(T){0<T.newVersion?console.warn("Another connection wants to upgrade database '".concat(d.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(d.name,"'. Closing db now to resume the delete request.")),d.close({disableAutoOpen:!1})}),this.on("blocked",function(T){!T.newVersion||T.newVersion<T.oldVersion?console.warn("Dexie.delete('".concat(d.name,"') was blocked")):console.warn("Upgrade '".concat(d.name,"' blocked by other connection holding version ").concat(T.oldVersion/10))}),this._maxKey=$r(u.IDBKeyRange),this._createTransaction=function(T,K,F,M){return new d.Transaction(T,K,F,d._options.chromeTransactionDurability,M)},this._fireOnBlocked=function(T){d.on("blocked").fire(T),rr.filter(function(K){return K.name===d.name&&K!==d&&!K._state.vcFired}).map(function(K){return K.on("versionchange").fire(T)})},this.use(ng),this.use(sg),this.use(rg),this.use(eg),this.use(tg);var U=new Proxy(this,{get:function(T,K,F){if(K==="_vip")return!0;if(K==="table")return function(H){return Ki(d.table(H),U)};var M=Reflect.get(T,K,F);return M instanceof Vl?Ki(M,U):K==="tables"?M.map(function(H){return Ki(H,U)}):K==="_createTransaction"?function(){return Ki(M.apply(this,arguments),U)}:M}});this.vip=U,p.forEach(function(T){return T(d)})}var zi,Dt=typeof Symbol!="undefined"&&"observable"in Symbol?Symbol.observable:"@@observable",og=(zs.prototype.subscribe=function(s,u,d){return this._subscribe(s&&typeof s!="function"?s:{next:s,error:u,complete:d})},zs.prototype[Dt]=function(){return this},zs);function zs(s){this._subscribe=s}try{zi={indexedDB:a.indexedDB||a.mozIndexedDB||a.webkitIndexedDB||a.msIndexedDB,IDBKeyRange:a.IDBKeyRange||a.webkitIDBKeyRange}}catch{zi={indexedDB:null,IDBKeyRange:null}}function uc(s){var u,d=!1,p=new og(function(g){var v=G(s),_,N=!1,P={},L={},U={get closed(){return N},unsubscribe:function(){N||(N=!0,_&&_.abort(),T&&vn.storagemutated.unsubscribe(F))}};g.start&&g.start(U);var T=!1,K=function(){return _s(M)},F=function(H){Vi(P,H),js(L,P)&&K()},M=function(){var H,$,Y;!N&&zi.indexedDB&&(P={},H={},_&&_.abort(),_=new AbortController,Y=function(X){var Z=er();try{v&&nr();var ae=pn(s,X);return ae=v?ae.finally(mn):ae}finally{Z&&tr()}}($={subscr:H,signal:_.signal,requery:K,querier:s,trans:null}),Promise.resolve(Y).then(function(X){d=!0,u=X,N||$.signal.aborted||(P={},function(Z){for(var ae in Z)if(y(Z,ae))return;return 1}(L=H)||T||(vn(Lr,F),T=!0),_s(function(){return!N&&g.next&&g.next(X)}))},function(X){d=!1,["DatabaseClosedError","AbortError"].includes(X==null?void 0:X.name)||N||_s(function(){N||g.error&&g.error(X)})}))};return setTimeout(K,0),U});return p.hasValue=function(){return d},p.getValue=function(){return u},p}var Dn=an;function Gs(s){var u=bn;try{bn=!0,vn.storagemutated.fire(s),Us(s,!0)}finally{bn=u}}m(Dn,r(r({},xe),{delete:function(s){return new Dn(s,{addons:[]}).delete()},exists:function(s){return new Dn(s,{addons:[]}).open().then(function(u){return u.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(s){try{return u=Dn.dependencies,d=u.indexedDB,u=u.IDBKeyRange,(Ds(d)?Promise.resolve(d.databases()).then(function(p){return p.map(function(g){return g.name}).filter(function(g){return g!==Ci})}):Is(d,u).toCollection().primaryKeys()).then(s)}catch{return at(new oe.MissingAPI)}var u,d},defineClass:function(){return function(s){c(this,s)}},ignoreTransaction:function(s){return Te.trans?xn(Te.transless,s):s()},vip:Ls,async:function(s){return function(){try{var u=Vs(s.apply(this,arguments));return u&&typeof u.then=="function"?u:Se.resolve(u)}catch(d){return at(d)}}},spawn:function(s,u,d){try{var p=Vs(s.apply(d,u||[]));return p&&typeof p.then=="function"?p:Se.resolve(p)}catch(g){return at(g)}},currentTransaction:{get:function(){return Te.trans||null}},waitFor:function(s,u){return u=Se.resolve(typeof s=="function"?Dn.ignoreTransaction(s):s).timeout(u||6e4),Te.trans?Te.trans.waitFor(u):u},Promise:Se,debug:{get:function(){return pe},set:function(s){je(s)}},derive:E,extend:c,props:m,override:S,Events:Pr,on:vn,liveQuery:uc,extendObservabilitySet:Vi,getByKeyPath:z,setByKeyPath:I,delByKeyPath:function(s,u){typeof u=="string"?I(s,u,void 0):"length"in u&&[].map.call(u,function(d){I(s,d,void 0)})},shallowClone:re,deepClone:le,getObjectDiff:qs,cmp:He,asap:x,minKey:-1/0,addons:[],connections:rr,errnames:ge,dependencies:zi,cache:In,semVer:"4.0.11",version:"4.0.11".split(".").map(function(s){return parseInt(s)}).reduce(function(s,u,d){return s+u/Math.pow(10,2*d)})})),Dn.maxKey=$r(Dn.dependencies.IDBKeyRange),typeof dispatchEvent!="undefined"&&typeof addEventListener!="undefined"&&(vn(Lr,function(s){bn||(s=new CustomEvent(Os,{detail:s}),bn=!0,dispatchEvent(s),bn=!1)}),addEventListener(Os,function(s){s=s.detail,bn||Gs(s)}));var sr,bn=!1,lc=function(){};return typeof BroadcastChannel!="undefined"&&((lc=function(){(sr=new BroadcastChannel(Os)).onmessage=function(s){return s.data&&Gs(s.data)}})(),typeof sr.unref=="function"&&sr.unref(),vn(Lr,function(s){bn||sr.postMessage(s)})),typeof addEventListener!="undefined"&&(addEventListener("pagehide",function(s){if(!an.disableBfCache&&s.persisted){pe&&console.debug("Dexie: handling persisted pagehide"),sr!=null&&sr.close();for(var u=0,d=rr;u<d.length;u++)d[u].close({disableAutoOpen:!1})}}),addEventListener("pageshow",function(s){!an.disableBfCache&&s.persisted&&(pe&&console.debug("Dexie: handling persisted pageshow"),lc(),Gs({all:new yt(-1/0,[[]])}))})),Se.rejectionMapper=function(s,u){return!s||s instanceof Q||s instanceof TypeError||s instanceof SyntaxError||!s.name||!Ce[s.name]?s:(u=new Ce[s.name](u||s.message,s),"stack"in s&&A(u,"stack",{get:function(){return this.inner.stack}}),u)},je(pe),r(an,Object.freeze({__proto__:null,Dexie:an,liveQuery:uc,Entity:Bl,cmp:He,PropModification:Ir,replacePrefix:function(s,u){return new Ir({replacePrefix:[s,u]})},add:function(s){return new Ir({add:s})},remove:function(s){return new Ir({remove:s})},default:an,RangeSet:yt,mergeRanges:Mr,rangesOverlap:Xl}),{default:an}),an})}(sa)),sa.exports}var Bv=jv();const Iu=Wa(Bv),Oc=Symbol.for("Dexie"),_a=globalThis[Oc]||(globalThis[Oc]=Iu);if(Iu.semVer!==_a.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${Iu.semVer} and ${_a.semVer}`);const{liveQuery:iw,mergeRanges:aw,rangesOverlap:sw,RangeSet:ow,cmp:uw,Entity:lw,PropModification:cw,replacePrefix:dw,add:fw,remove:hw}=_a;class $h extends _a{constructor(n,r,i={}){super(n);Ae(this,"logs");const a={logs:"id, level, time, source, account"};this.version(r).stores({...a,...i})}}class Mv extends $h{constructor(){super("nizza",1)}}const jh=new Mv;class Bh{constructor(e,n){Ae(this,"logger");Ae(this,"channel");Ae(this,"listeners",new Map);Ae(this,"eventQueue",new Map);this.logger=n.child("EventBus");try{this.logger.debug(`Creating BroadcastChannel with name "${e}"`),this.channel=new BroadcastChannel(e),this.channel.onmessage=r=>this.handleMessage(r),this.channel.onmessageerror=r=>this.logger.error("NizzaBroadcastChannel error:",r)}catch(r){throw this.logger.error("Failed to create NizzaBroadcastChannel:",r),r}}on(e,n){return this.logger.debug(`Subscribing to pattern "${e}"`),this.subscribeToEvent(e,n),{off:()=>this.unsubscribeFromEvent(e,n)}}emit(e,n,r={}){this.logger.debug(`Emitting event "${e}" with data`,n),this.emitEvent(e,n,r)}handleMessage(e){const n=e.data,{name:r}=n;this.logger.debug(`Received message "${r}" with data`,n);for(const[i,a]of this.listeners.entries())this.matchWildcard(i,r)&&(this.logger.debug(`Matching pattern "${i}" for event "${r}"`),a.forEach(o=>o({...n,wildcard:i})))}subscribeToEvent(e,n){if(typeof e!="string"||typeof n!="function"){const i=new Error("Invalid arguments");throw this.logger.error(i),i}this.listeners.has(e)||(this.logger.debug(`Adding new pattern "${e}"`),this.listeners.set(e,new Set));const r=Array.from(this.eventQueue).filter(([i])=>{const a=this.matchWildcard(e,i);return a&&(this.eventQueue.delete(i),this.logger.debug(`Dequeued pending events for "${i}".`)),a}).flatMap(([,i])=>i);for(const[i,a]of this.listeners.entries())this.matchWildcard(i,e)&&(this.logger.debug(`Adding listener to pattern "${i}"`),a.add(n),r.length&&(this.logger.debug(`Delivering pending events for "${e}".`),r.forEach(o=>{n({...o,wildcard:i})})))}emitEvent(e,n,r){if(typeof e!="string"){const o=new Error("Invalid arguments");throw this.logger.error(o),o}const i={name:e,data:n,attrs:r},a=Array.from(this.getMatchingListeners(e));if(a.length){this.logger.debug(`Delivering event "${e}" to listeners`);for(const[o,l]of a)l({...i,wildcard:o})}else this.logger.debug(`No listeners for event "${e}", enqueuing`),this.eventQueue.has(e)||this.eventQueue.set(e,[]),this.eventQueue.get(e).push(i);this.logger.debug("Posting message to channel",i),this.channel.postMessage(i)}*getMatchingListeners(e){this.logger.debug(`Getting matching listeners for event "${e}"`);for(const[n,r]of this.listeners.entries())if(this.matchWildcard(n,e))for(const i of r)yield[n,i]}unsubscribeFromEvent(e,n){if(this.listeners.has(e)){this.logger.debug(`Unsubscribing from event "${e}"`);const r=this.listeners.get(e);r.delete(n),r.size===0&&(this.logger.debug(`No more listeners for event "${e}", deleting`),this.listeners.delete(e))}}matchWildcard(e,n){const r=e.replace(/\*/g,"[^:]*").replace(/\*\*/g,".*"),a=new RegExp(`^${r}$`).test(n);return this.logger.debug(`Wildcard "${e}" matches with pattern "${n}": ${a}`),a}}var Vr={exports:{}},io,Rc;function Uv(){if(Rc)return io;Rc=1;function t(n){try{return JSON.stringify(n)}catch{return'"[Circular]"'}}io=e;function e(n,r,i){var a=i&&i.stringify||t,o=1;if(typeof n=="object"&&n!==null){var l=r.length+o;if(l===1)return n;var c=new Array(l);c[0]=a(n);for(var f=1;f<l;f++)c[f]=a(r[f]);return c.join(" ")}if(typeof n!="string")return n;var h=r.length;if(h===0)return n;for(var y="",m=1-o,O=-1,A=n&&n.length||0,E=0;E<A;){if(n.charCodeAt(E)===37&&E+1<A){switch(O=O>-1?O:0,n.charCodeAt(E+1)){case 100:case 102:if(m>=h||r[m]==null)break;O<E&&(y+=n.slice(O,E)),y+=Number(r[m]),O=E+2,E++;break;case 105:if(m>=h||r[m]==null)break;O<E&&(y+=n.slice(O,E)),y+=Math.floor(Number(r[m])),O=E+2,E++;break;case 79:case 111:case 106:if(m>=h||r[m]===void 0)break;O<E&&(y+=n.slice(O,E));var b=typeof r[m];if(b==="string"){y+="'"+r[m]+"'",O=E+2,E++;break}if(b==="function"){y+=r[m].name||"<anonymous>",O=E+2,E++;break}y+=a(r[m]),O=E+2,E++;break;case 115:if(m>=h)break;O<E&&(y+=n.slice(O,E)),y+=String(r[m]),O=E+2,E++;break;case 37:O<E&&(y+=n.slice(O,E)),y+="%",O=E+2,E++,m--;break}++m}++E}return O===-1?n:(O<A&&(y+=n.slice(O)),y)}return io}var Tc;function Vv(){if(Tc)return Vr.exports;Tc=1;const t=Uv();Vr.exports=h;const e=j().console||{},n={mapHttpRequest:I,mapHttpResponse:I,wrapRequestSerializer:re,wrapResponseSerializer:re,wrapErrorSerializer:re,req:I,res:I,err:x,errWithCause:x};function r(w,J){return w==="silent"?1/0:J.levels.values[w]}const i=Symbol("pino.logFuncs"),a=Symbol("pino.hierarchy"),o={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function l(w,J){const te={logger:J,parent:w[a]};J[a]=te}function c(w,J,te){const ne={};J.forEach(se=>{ne[se]=te[se]?te[se]:e[se]||e[o[se]||"log"]||ie}),w[i]=ne}function f(w,J){return Array.isArray(w)?w.filter(function(ne){return ne!=="!stdSerializers.err"}):w===!0?Object.keys(J):!1}function h(w){w=w||{},w.browser=w.browser||{};const J=w.browser.transmit;if(J&&typeof J.send!="function")throw Error("pino: transmit option must have a send function");const te=w.browser.write||e;w.browser.write&&(w.browser.asObject=!0);const ne=w.serializers||{},se=f(w.browser.serialize,ne);let me=w.browser.serialize;Array.isArray(w.browser.serialize)&&w.browser.serialize.indexOf("!stdSerializers.err")>-1&&(me=!1);const G=Object.keys(w.customLevels||{}),D=["error","fatal","warn","info","debug","trace"].concat(G);typeof te=="function"&&D.forEach(function(Ce){te[Ce]=te}),(w.enabled===!1||w.browser.disabled)&&(w.level="silent");const Q=w.level||"info",q=Object.create(te);q.log||(q.log=ie),c(q,D,te),l({},q),Object.defineProperty(q,"levelVal",{get:W}),Object.defineProperty(q,"level",{get:ge,set:ce});const B={transmit:J,serialize:se,asObject:w.browser.asObject,formatters:w.browser.formatters,levels:D,timestamp:z(w),messageKey:w.messageKey||"msg",onChild:w.onChild||ie};q.levels=y(w),q.level=Q,q.setMaxListeners=q.getMaxListeners=q.emit=q.addListener=q.on=q.prependListener=q.once=q.prependOnceListener=q.removeListener=q.removeAllListeners=q.listeners=q.listenerCount=q.eventNames=q.write=q.flush=ie,q.serializers=ne,q._serialize=se,q._stdErrSerialize=me,q.child=function(...Ce){return oe.call(this,B,...Ce)},J&&(q._logEvent=R());function W(){return r(this.level,this)}function ge(){return this._level}function ce(Ce){if(Ce!=="silent"&&!this.levels.values[Ce])throw Error("unknown level "+Ce);this._level=Ce,A(this,B,q,"error"),A(this,B,q,"fatal"),A(this,B,q,"warn"),A(this,B,q,"info"),A(this,B,q,"debug"),A(this,B,q,"trace"),G.forEach(xe=>{A(this,B,q,xe)})}function oe(Ce,xe,we){if(!xe)throw new Error("missing bindings for child Pino");we=we||{},se&&xe.serializers&&(we.serializers=xe.serializers);const ct=we.serializers;if(se&&ct){var Ze=Object.assign({},ne,ct),We=w.browser.serialize===!0?Object.keys(Ze):se;delete xe.serializers,C([xe],We,Ze,this._stdErrSerialize)}function Pe(Ft){this._childLevel=(Ft._childLevel|0)+1,this.bindings=xe,Ze&&(this.serializers=Ze,this._serialize=We),J&&(this._logEvent=R([].concat(Ft._logEvent.bindings,xe)))}Pe.prototype=this;const Je=new Pe(this);return l(this,Je),Je.child=function(...Ft){return oe.call(this,Ce,...Ft)},Je.level=we.level||this.level,Ce.onChild(Je),Je}return q}function y(w){const J=w.customLevels||{},te=Object.assign({},h.levels.values,J),ne=Object.assign({},h.levels.labels,m(J));return{values:te,labels:ne}}function m(w){const J={};return Object.keys(w).forEach(function(te){J[w[te]]=te}),J}h.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},h.stdSerializers=n,h.stdTimeFunctions=Object.assign({},{nullTime:ke,epochTime:he,unixTime:Ee,isoTime:le});function O(w){const J=[];w.bindings&&J.push(w.bindings);let te=w[a];for(;te.parent;)te=te.parent,te.logger.bindings&&J.push(te.logger.bindings);return J.reverse()}function A(w,J,te,ne){if(Object.defineProperty(w,ne,{value:r(w.level,te)>r(ne,te)?ie:te[i][ne],writable:!0,enumerable:!0,configurable:!0}),w[ne]===ie){if(!J.transmit)return;const me=J.transmit.level||w.level,G=r(me,te);if(r(ne,te)<G)return}w[ne]=b(w,J,te,ne);const se=O(w);se.length!==0&&(w[ne]=E(se,w[ne]))}function E(w,J){return function(){return J.apply(this,[...w,...arguments])}}function b(w,J,te,ne){return function(se){return function(){const G=J.timestamp(),D=new Array(arguments.length),Q=Object.getPrototypeOf&&Object.getPrototypeOf(this)===e?e:this;for(var q=0;q<D.length;q++)D[q]=arguments[q];var B=!1;if(J.serialize&&(C(D,this._serialize,this.serializers,this._stdErrSerialize),B=!0),J.asObject||J.formatters?se.call(Q,k(this,ne,D,G,J)):se.apply(Q,D),J.transmit){const W=J.transmit.level||w._level,ge=r(W,te),ce=r(ne,te);if(ce<ge)return;S(this,{ts:G,methodLevel:ne,methodValue:ce,transmitValue:te.levels.values[J.transmit.level||w._level],send:J.transmit.send,val:r(w._level,te)},D,B)}}}(w[i][ne])}function k(w,J,te,ne,se){const{level:me,log:G=ge=>ge}=se.formatters||{},D=te.slice();let Q=D[0];const q={};if(ne&&(q.time=ne),me){const ge=me(J,w.levels.values[J]);Object.assign(q,ge)}else q.level=w.levels.values[J];let B=(w._childLevel|0)+1;if(B<1&&(B=1),Q!==null&&typeof Q=="object"){for(;B--&&typeof D[0]=="object";)Object.assign(q,D.shift());Q=D.length?t(D.shift(),D):void 0}else typeof Q=="string"&&(Q=t(D.shift(),D));return Q!==void 0&&(q[se.messageKey]=Q),G(q)}function C(w,J,te,ne){for(const se in w)if(ne&&w[se]instanceof Error)w[se]=h.stdSerializers.err(w[se]);else if(typeof w[se]=="object"&&!Array.isArray(w[se])&&J)for(const me in w[se])J.indexOf(me)>-1&&me in te&&(w[se][me]=te[me](w[se][me]))}function S(w,J,te,ne=!1){const se=J.send,me=J.ts,G=J.methodLevel,D=J.methodValue,Q=J.val,q=w._logEvent.bindings;ne||C(te,w._serialize||Object.keys(w.serializers),w.serializers,w._stdErrSerialize===void 0?!0:w._stdErrSerialize),w._logEvent.ts=me,w._logEvent.messages=te.filter(function(B){return q.indexOf(B)===-1}),w._logEvent.level.label=G,w._logEvent.level.value=D,se(G,w._logEvent,Q),w._logEvent=R(q)}function R(w){return{ts:0,messages:[],bindings:w||[],level:{label:"",value:0}}}function x(w){const J={type:w.constructor.name,msg:w.message,stack:w.stack};for(const te in w)J[te]===void 0&&(J[te]=w[te]);return J}function z(w){return typeof w.timestamp=="function"?w.timestamp:w.timestamp===!1?ke:he}function I(){return{}}function re(w){return w}function ie(){}function ke(){return!1}function he(){return Date.now()}function Ee(){return Math.round(Date.now()/1e3)}function le(){return new Date(Date.now()).toISOString()}function j(){function w(J){return typeof J!="undefined"&&J}try{return typeof globalThis!="undefined"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return w(self)||w(window)||w(this)||{}}}return Vr.exports.default=h,Vr.exports.pino=h,Vr.exports}var qv=Vv();const Hv=Wa(qv),mt=[];for(let t=0;t<256;++t)mt.push((t+256).toString(16).slice(1));function Kv(t,e=0){return(mt[t[e+0]]+mt[t[e+1]]+mt[t[e+2]]+mt[t[e+3]]+"-"+mt[t[e+4]]+mt[t[e+5]]+"-"+mt[t[e+6]]+mt[t[e+7]]+"-"+mt[t[e+8]]+mt[t[e+9]]+"-"+mt[t[e+10]]+mt[t[e+11]]+mt[t[e+12]]+mt[t[e+13]]+mt[t[e+14]]+mt[t[e+15]]).toLowerCase()}let ao;const zv=new Uint8Array(16);function Gv(){if(!ao){if(typeof crypto=="undefined"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");ao=crypto.getRandomValues.bind(crypto)}return ao(zv)}const Wv=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Cc={randomUUID:Wv};function Jv(t,e,n){var i,a,o;if(Cc.randomUUID&&!t)return Cc.randomUUID();t=t||{};const r=(o=(a=t.random)!=null?a:(i=t.rng)==null?void 0:i.call(t))!=null?o:Gv();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Kv(r)}const Yv=4;var Mh=(t=>(t.CREATED="CREATED",t.STARTING="STARTING",t.LIVE="LIVE",t.FINALIZED="FINALIZED",t))(Mh||{});const Qv={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:**"},Uh={EVENT_STATUS_CHANGED:"event:statusChanged",ATCH_ACTION_EXECUTED:"core:addToCartHooks:actionExecuted"};var Vh=(t=>(t.English="en",t.Spanish="es",t.Portuguese="pt",t))(Vh||{}),it=(t=>(t.TRACE="trace",t.DEBUG="debug",t.INFO="info",t.WARN="warn",t.ERROR="error",t.FATAL="fatal",t))(it||{});const Qe={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},qh={[Qe.trace]:"trace",[Qe.debug]:"debug",[Qe.info]:"info",[Qe.warn]:"warn",[Qe.error]:"error",[Qe.fatal]:"fatal"};var Hh=(t=>(t.COMBO="Combo",t.BADGE="Badged",t))(Hh||{}),Kh=(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))(Kh||{});function zh(t){return Object.values(it).includes(String(t).toLowerCase())}class ul extends Error{constructor(e){super(`Invalid log level: ${e}`),this.name="InvalidLogLevelError"}}const _t=class _t{constructor(e){Ae(this,"instance");Ae(this,"httpLogger");Ae(this,"consoleLogger");Ae(this,"config");var l;this.config=e;const{source:n,levelService:r,metadata:i={},consoleLogger:a,httpLogger:o}=e;(l=_t.root)!=null||(_t.root=_t.createRootLogger(a,o)),_t.mergeGlobalMetadata(i),this.instance=_t.root.child({source:n}),this.consoleLogger=a,this.httpLogger=o,this.setLevel(r.getLevel(n))}static createRootLogger(e,n){return Hv({customLevels:Qe,browser:{write:r=>{const{payload:i,options:a,stack:o,...l}=r,c={...l,...i};a.silent||e.print(c,o),c.level>=Qe[it.WARN]&&n.save(c)}}})}static mergeGlobalMetadata(e={}){_t.globalMetadata={..._t.globalMetadata,...e}}child(e,n={}){return _t.mergeGlobalMetadata(n),new _t({source:`${this.config.source}:${e}`,levelService:this.config.levelService,consoleLogger:this.consoleLogger,httpLogger:this.httpLogger})}setLevel(e){this.instance.level=e}setMetadata(e){_t.mergeGlobalMetadata(e)}formatLogEntry(e){const{content:n,stack:r,options:i={}}=e,{message:a,args:o=[]}=n,l=Jv(),c={};let f;return a instanceof Error?(c.error={name:a.name,message:a.message,stack:a.stack},f=a.message):f=typeof a=="object"?JSON.stringify(a):String(a),o.forEach((y,m)=>this.formatArg(y,m,c)),{payload:{id:l,msg:f,data:c,..._t.globalMetadata},options:i,stack:r}}formatArg(e,n,r){if(e instanceof Error){const i=r.error?`error${n+1}`:"error";r[i]={message:e.message,stack:e.stack,name:e.name}}else typeof e=="object"&&e!==null?Object.assign(r,e):r[`$${n}`]=String(e)}log(e,n){if(typeof this.instance[e]!="function")throw new ul(e);const r=this.formatLogEntry(n);this.instance[e](r)}trace(e){this.log("trace",e)}debug(e){this.log("debug",e)}info(e){this.log("info",e)}warn(e){this.log("warn",e)}error(e){this.log("error",e)}fatal(e){this.log("fatal",e)}get source(){return this.config.source}};Ae(_t,"globalMetadata",{}),Ae(_t,"root",null);let Du=_t;const xc={stackExclusionPatterns:/\b(PinoAdapter|ConsoleLogger|LoggerChain|Logger|Proxy|Child|pino\.js)\b/,themes:{dark:{baseStyles:{timestamp:"color: #A9A9A9; font-weight: normal;",source:"color: #B0B0B0; font-weight: normal;",context:"color: #FFFFFF; font-weight: bold;",defaultMessage:"color: #E5E5E5; font-weight: normal;"},levels:{[Qe[it.TRACE]]:"color: #778899; font-weight: bold;",[Qe[it.DEBUG]]:"color: #008B8B; font-weight: bold;",[Qe[it.INFO]]:"color: #00FFFF; font-weight: bold;",[Qe[it.WARN]]:"color: #FFD700; font-weight: bold;",[Qe[it.ERROR]]:"color: #FF4500; font-weight: bold;",[Qe[it.FATAL]]:"color: #FF0000; font-weight: bold; text-shadow: 1px 1px 1px black;"},messages:{[Qe[it.WARN]]:"color: #FFD700; font-weight: normal;",[Qe[it.ERROR]]:"color: #FF4500; font-weight: normal;",[Qe[it.FATAL]]:"color: #FF0000; font-weight: bold;"}},light:{baseStyles:{timestamp:"color: #4D4D4D; font-weight: normal;",source:"color: #666666; font-weight: normal;",context:"color: #000000; font-weight: bold;",defaultMessage:"color: #333333; font-weight: normal;"},levels:{[Qe[it.TRACE]]:"color: #6A5ACD; font-weight: bold;",[Qe[it.DEBUG]]:"color: #00509E; font-weight: bold;",[Qe[it.INFO]]:"color: #1E90FF; font-weight: bold;",[Qe[it.WARN]]:"color: #FFA500; font-weight: bold;",[Qe[it.ERROR]]:"color: #ff0033; font-weight: bold;",[Qe[it.FATAL]]:"color: #D80000; font-weight: bold; text-shadow: 1px 1px 1px #660000;"},messages:{[Qe[it.WARN]]:"color: #FFA500; font-weight: normal;",[Qe[it.ERROR]]:"color: #ff0033; font-weight: normal;",[Qe[it.FATAL]]:"color: #D80000; font-weight: bold;"}}}};class Xv{constructor(){Ae(this,"theme");this.theme=this.initializeTheme(),this.setupThemeChangeListener()}initializeTheme(){const e=localStorage.getItem("log-theme");return e==="light"||e==="dark"?e:this.detectTheme()}detectTheme(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}setupThemeChangeListener(){window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",e=>{this.theme=e.matches?"dark":"light"})}static setTheme(e){localStorage.setItem("consoleLoggerTheme",e)}formatStack(e){return e.split(`
29
+ `).filter(n=>!xc.stackExclusionPatterns.test(n)).map(n=>n.replace(/^Error\s*/,"").trim())}getStyles(e){const n=xc.themes[this.theme];return{...n.baseStyles,level:n.levels[e]||n.baseStyles.defaultMessage,message:n.messages[e]||n.baseStyles.defaultMessage}}getTime(){return new Date().toLocaleTimeString("en-US",{hour12:!1})+`.${new Date().getMilliseconds().toString().padStart(3,"0")}`}print({level:e,source:n,msg:r,data:i},a){const[o,l,c]=n.split(":"),f=(qh[e]||"UNKNOWN").toUpperCase(),h=c?`${c}: `:"",y=l?`:${l}`:"",m=this.getStyles(e);console.groupCollapsed(`%c${this.getTime()} %c${f} %c[${o}${y}] %c${h}%c${r}`,m.timestamp,m.level,m.source,m.context,m.message),i&&Object.keys(i).length&&console.log("Data:",i);const O=this.formatStack(a||new Error().stack);O.length&&console.log("Stack:",O.join(`
30
+ `)),console.groupEnd()}}const Zv={endpoint:`${_r.apiUrls.restV2}/v1/telemetry/logs`,batchSize:500,flushInterval:10,maxRetries:5,retryBackoffFactor:2,maxPayloadSize:500};class ll{constructor(e){Ae(this,"config");Ae(this,"isFlushing",!1);Ae(this,"retryCount",0);Ae(this,"isFlushScheduled",!1);this.config=e,this.setupUnloadListener()}static create(e){const n={...Zv,...e};if(!n.db)throw new Error("Invalid Dixie DB");if(!n.project)throw new Error("Project name is required");return new ll(n)}async save(e){const n=JSON.parse(JSON.stringify(e));await this.config.db.logs.add(n),this.scheduleFlush()}scheduleFlush(e=this.config.flushInterval*1e3){this.isFlushScheduled||this.isFlushing||(this.isFlushScheduled=!0,setTimeout(()=>{this.isFlushScheduled=!1,this.flush()},e))}async flush(){if(this.isFlushing)return;this.isFlushing=!0;let e=!1;try{await this.processLogsBatch(async r=>{await this.sendLogs(r),await this.deleteLogs(r)}),this.retryCount=0,e=!0}catch(r){this.logError("flush",r)}this.isFlushing=!1;const n=await this.hasPendingLogs();!e&&n?this.handleRetry():e&&n&&this.scheduleFlush()}async processLogsBatch(e){const n=await this.getLogsBatch(),r=this.splitLogsByPayloadSize(n);for(const i of r)await e(i)}async getLogsBatch(e=this.config.batchSize){return this.config.db.logs.orderBy("time").limit(e).toArray()}splitLogsByPayloadSize(e){let n=[],r=0;const i=[];return e.forEach(a=>{const o=JSON.stringify(a).length/1024;r+o>this.config.maxPayloadSize&&(i.push(n),n=[],r=0),n.push(a),r+=o}),n.length>0&&i.push(n),i}async sendLogs(e){const n=this.buildPayload(e);await qn({url:this.config.endpoint,method:"POST",body:n})}buildPayload(e){return JSON.stringify({project:this.config.project,logs:e})}async deleteLogs(e){const n=e.map(r=>r.id);await this.config.db.logs.bulkDelete(n)}logError(e,n){console.error(`[${e}]`,n)}handleRetry(){if(this.retryCount>=this.config.maxRetries)return;this.retryCount++;const e=this.config.flushInterval*Math.pow(this.config.retryBackoffFactor,this.retryCount)*1e3;this.scheduleFlush(e)}async hasPendingLogs(){return await this.config.db.logs.count()>0}setupUnloadListener(){window.addEventListener("beforeunload",async()=>{this.isFlushing||!await this.hasPendingLogs()||await this.processLogsBatch(async e=>{const n=this.buildPayload(e);navigator.sendBeacon(this.config.endpoint,n)?await this.deleteLogs(e):console.warn("Failed to send logs via sendBeacon; logs will remain in the database.")})})}}var so={},oo={},uo,Pc;function Gh(){return Pc||(Pc=1,uo=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;e[n]=i;for(n in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,n);if(o.value!==i||o.enumerable!==!0)return!1}return!0}),uo}var lo,Fc;function cl(){if(Fc)return lo;Fc=1;var t=Gh();return lo=function(){return t()&&!!Symbol.toStringTag},lo}var co,Ic;function eb(){return Ic||(Ic=1,co=Error),co}var fo,Dc;function tb(){return Dc||(Dc=1,fo=EvalError),fo}var ho,Lc;function nb(){return Lc||(Lc=1,ho=RangeError),ho}var po,$c;function rb(){return $c||($c=1,po=ReferenceError),po}var mo,jc;function Wh(){return jc||(jc=1,mo=SyntaxError),mo}var go,Bc;function Ja(){return Bc||(Bc=1,go=TypeError),go}var yo,Mc;function ib(){return Mc||(Mc=1,yo=URIError),yo}var vo,Uc;function ab(){if(Uc)return vo;Uc=1;var t=typeof Symbol!="undefined"&&Symbol,e=Gh();return vo=function(){return typeof t!="function"||typeof Symbol!="function"||typeof t("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},vo}var bo,Vc;function sb(){if(Vc)return bo;Vc=1;var t={__proto__:null,foo:{}},e=Object;return bo=function(){return{__proto__:t}.foo===t.foo&&!(t instanceof e)},bo}var ko,qc;function ob(){if(qc)return ko;qc=1;var t="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,n=Math.max,r="[object Function]",i=function(c,f){for(var h=[],y=0;y<c.length;y+=1)h[y]=c[y];for(var m=0;m<f.length;m+=1)h[m+c.length]=f[m];return h},a=function(c,f){for(var h=[],y=f,m=0;y<c.length;y+=1,m+=1)h[m]=c[y];return h},o=function(l,c){for(var f="",h=0;h<l.length;h+=1)f+=l[h],h+1<l.length&&(f+=c);return f};return ko=function(c){var f=this;if(typeof f!="function"||e.apply(f)!==r)throw new TypeError(t+f);for(var h=a(arguments,1),y,m=function(){if(this instanceof y){var k=f.apply(this,i(h,arguments));return Object(k)===k?k:this}return f.apply(c,i(h,arguments))},O=n(0,f.length-h.length),A=[],E=0;E<O;E++)A[E]="$"+E;if(y=Function("binder","return function ("+o(A,",")+"){ return binder.apply(this,arguments); }")(m),f.prototype){var b=function(){};b.prototype=f.prototype,y.prototype=new b,b.prototype=null}return y},ko}var _o,Hc;function dl(){if(Hc)return _o;Hc=1;var t=ob();return _o=Function.prototype.bind||t,_o}var So,Kc;function ub(){if(Kc)return So;Kc=1;var t=Function.prototype.call,e=Object.prototype.hasOwnProperty,n=dl();return So=n.call(t,e),So}var Ao,zc;function yi(){if(zc)return Ao;zc=1;var t,e=eb(),n=tb(),r=nb(),i=rb(),a=Wh(),o=Ja(),l=ib(),c=Function,f=function(te){try{return c('"use strict"; return ('+te+").constructor;")()}catch{}},h=Object.getOwnPropertyDescriptor;if(h)try{h({},"")}catch{h=null}var y=function(){throw new o},m=h?function(){try{return arguments.callee,y}catch{try{return h(arguments,"callee").get}catch{return y}}}():y,O=ab()(),A=sb()(),E=Object.getPrototypeOf||(A?function(te){return te.__proto__}:null),b={},k=typeof Uint8Array=="undefined"||!E?t:E(Uint8Array),C={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?t:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?t:ArrayBuffer,"%ArrayIteratorPrototype%":O&&E?E([][Symbol.iterator]()):t,"%AsyncFromSyncIteratorPrototype%":t,"%AsyncFunction%":b,"%AsyncGenerator%":b,"%AsyncGeneratorFunction%":b,"%AsyncIteratorPrototype%":b,"%Atomics%":typeof Atomics=="undefined"?t:Atomics,"%BigInt%":typeof BigInt=="undefined"?t:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?t:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?t:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?t:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":e,"%eval%":eval,"%EvalError%":n,"%Float32Array%":typeof Float32Array=="undefined"?t:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?t:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?t:FinalizationRegistry,"%Function%":c,"%GeneratorFunction%":b,"%Int8Array%":typeof Int8Array=="undefined"?t:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?t:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?t:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":O&&E?E(E([][Symbol.iterator]())):t,"%JSON%":typeof JSON=="object"?JSON:t,"%Map%":typeof Map=="undefined"?t:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!O||!E?t:E(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?t:Promise,"%Proxy%":typeof Proxy=="undefined"?t:Proxy,"%RangeError%":r,"%ReferenceError%":i,"%Reflect%":typeof Reflect=="undefined"?t:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?t:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!O||!E?t:E(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?t:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":O&&E?E(""[Symbol.iterator]()):t,"%Symbol%":O?Symbol:t,"%SyntaxError%":a,"%ThrowTypeError%":m,"%TypedArray%":k,"%TypeError%":o,"%Uint8Array%":typeof Uint8Array=="undefined"?t:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?t:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?t:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?t:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap=="undefined"?t:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?t:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?t:WeakSet};if(E)try{null.error}catch(te){var S=E(E(te));C["%Error.prototype%"]=S}var R=function te(ne){var se;if(ne==="%AsyncFunction%")se=f("async function () {}");else if(ne==="%GeneratorFunction%")se=f("function* () {}");else if(ne==="%AsyncGeneratorFunction%")se=f("async function* () {}");else if(ne==="%AsyncGenerator%"){var me=te("%AsyncGeneratorFunction%");me&&(se=me.prototype)}else if(ne==="%AsyncIteratorPrototype%"){var G=te("%AsyncGenerator%");G&&E&&(se=E(G.prototype))}return C[ne]=se,se},x={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},z=dl(),I=ub(),re=z.call(Function.call,Array.prototype.concat),ie=z.call(Function.apply,Array.prototype.splice),ke=z.call(Function.call,String.prototype.replace),he=z.call(Function.call,String.prototype.slice),Ee=z.call(Function.call,RegExp.prototype.exec),le=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,j=/\\(\\)?/g,w=function(ne){var se=he(ne,0,1),me=he(ne,-1);if(se==="%"&&me!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(me==="%"&&se!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var G=[];return ke(ne,le,function(D,Q,q,B){G[G.length]=q?ke(B,j,"$1"):Q||D}),G},J=function(ne,se){var me=ne,G;if(I(x,me)&&(G=x[me],me="%"+G[0]+"%"),I(C,me)){var D=C[me];if(D===b&&(D=R(me)),typeof D=="undefined"&&!se)throw new o("intrinsic "+ne+" exists, but is not available. Please file an issue!");return{alias:G,name:me,value:D}}throw new a("intrinsic "+ne+" does not exist!")};return Ao=function(ne,se){if(typeof ne!="string"||ne.length===0)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof se!="boolean")throw new o('"allowMissing" argument must be a boolean');if(Ee(/^%?[^%]*%?$/,ne)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var me=w(ne),G=me.length>0?me[0]:"",D=J("%"+G+"%",se),Q=D.name,q=D.value,B=!1,W=D.alias;W&&(G=W[0],ie(me,re([0,1],W)));for(var ge=1,ce=!0;ge<me.length;ge+=1){var oe=me[ge],Ce=he(oe,0,1),xe=he(oe,-1);if((Ce==='"'||Ce==="'"||Ce==="`"||xe==='"'||xe==="'"||xe==="`")&&Ce!==xe)throw new a("property names with quotes must have matching quotes");if((oe==="constructor"||!ce)&&(B=!0),G+="."+oe,Q="%"+G+"%",I(C,Q))q=C[Q];else if(q!=null){if(!(oe in q)){if(!se)throw new o("base intrinsic for "+ne+" exists, but the property is not available.");return}if(h&&ge+1>=me.length){var we=h(q,oe);ce=!!we,ce&&"get"in we&&!("originalValue"in we.get)?q=we.get:q=q[oe]}else ce=I(q,oe),q=q[oe];ce&&!B&&(C[Q]=q)}}return q},Ao}var Eo={exports:{}},wo,Gc;function fl(){if(Gc)return wo;Gc=1;var t=yi(),e=t("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return wo=e,wo}var No,Wc;function hl(){if(Wc)return No;Wc=1;var t=yi(),e=t("%Object.getOwnPropertyDescriptor%",!0);if(e)try{e([],"length")}catch{e=null}return No=e,No}var Oo,Jc;function lb(){if(Jc)return Oo;Jc=1;var t=fl(),e=Wh(),n=Ja(),r=hl();return Oo=function(a,o,l){if(!a||typeof a!="object"&&typeof a!="function")throw new n("`obj` must be an object or a function`");if(typeof o!="string"&&typeof o!="symbol")throw new n("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new n("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new n("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new n("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new n("`loose`, if provided, must be a boolean");var c=arguments.length>3?arguments[3]:null,f=arguments.length>4?arguments[4]:null,h=arguments.length>5?arguments[5]:null,y=arguments.length>6?arguments[6]:!1,m=!!r&&r(a,o);if(t)t(a,o,{configurable:h===null&&m?m.configurable:!h,enumerable:c===null&&m?m.enumerable:!c,value:l,writable:f===null&&m?m.writable:!f});else if(y||!c&&!f&&!h)a[o]=l;else throw new e("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Oo}var Ro,Yc;function cb(){if(Yc)return Ro;Yc=1;var t=fl(),e=function(){return!!t};return e.hasArrayLengthDefineBug=function(){if(!t)return null;try{return t([],"length",{value:1}).length!==1}catch{return!0}},Ro=e,Ro}var To,Qc;function db(){if(Qc)return To;Qc=1;var t=yi(),e=lb(),n=cb()(),r=hl(),i=Ja(),a=t("%Math.floor%");return To=function(l,c){if(typeof l!="function")throw new i("`fn` is not a function");if(typeof c!="number"||c<0||c>4294967295||a(c)!==c)throw new i("`length` must be a positive 32-bit integer");var f=arguments.length>2&&!!arguments[2],h=!0,y=!0;if("length"in l&&r){var m=r(l,"length");m&&!m.configurable&&(h=!1),m&&!m.writable&&(y=!1)}return(h||y||!f)&&(n?e(l,"length",c,!0,!0):e(l,"length",c)),l},To}var Xc;function Jh(){return Xc||(Xc=1,function(t){var e=dl(),n=yi(),r=db(),i=Ja(),a=n("%Function.prototype.apply%"),o=n("%Function.prototype.call%"),l=n("%Reflect.apply%",!0)||e.call(o,a),c=fl(),f=n("%Math.max%");t.exports=function(m){if(typeof m!="function")throw new i("a function is required");var O=l(e,o,arguments);return r(O,1+f(0,m.length-(arguments.length-1)),!0)};var h=function(){return l(e,a,arguments)};c?c(t.exports,"apply",{value:h}):t.exports.apply=h}(Eo)),Eo.exports}var Co,Zc;function Yh(){if(Zc)return Co;Zc=1;var t=yi(),e=Jh(),n=e(t("String.prototype.indexOf"));return Co=function(i,a){var o=t(i,!!a);return typeof o=="function"&&n(i,".prototype.")>-1?e(o):o},Co}var xo,ed;function fb(){if(ed)return xo;ed=1;var t=cl()(),e=Yh(),n=e("Object.prototype.toString"),r=function(l){return t&&l&&typeof l=="object"&&Symbol.toStringTag in l?!1:n(l)==="[object Arguments]"},i=function(l){return r(l)?!0:l!==null&&typeof l=="object"&&typeof l.length=="number"&&l.length>=0&&n(l)!=="[object Array]"&&n(l.callee)==="[object Function]"},a=function(){return r(arguments)}();return r.isLegacyArguments=i,xo=a?r:i,xo}var Po,td;function hb(){if(td)return Po;td=1;var t=Object.prototype.toString,e=Function.prototype.toString,n=/^\s*(?:function)?\*/,r=cl()(),i=Object.getPrototypeOf,a=function(){if(!r)return!1;try{return Function("return function*() {}")()}catch{}},o;return Po=function(c){if(typeof c!="function")return!1;if(n.test(e.call(c)))return!0;if(!r){var f=t.call(c);return f==="[object GeneratorFunction]"}if(!i)return!1;if(typeof o=="undefined"){var h=a();o=h?i(h):!1}return i(c)===o},Po}var Fo,nd;function pb(){if(nd)return Fo;nd=1;var t=Function.prototype.toString,e=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,n,r;if(typeof e=="function"&&typeof Object.defineProperty=="function")try{n=Object.defineProperty({},"length",{get:function(){throw r}}),r={},e(function(){throw 42},null,n)}catch(C){C!==r&&(e=null)}else e=null;var i=/^\s*class\b/,a=function(S){try{var R=t.call(S);return i.test(R)}catch{return!1}},o=function(S){try{return a(S)?!1:(t.call(S),!0)}catch{return!1}},l=Object.prototype.toString,c="[object Object]",f="[object Function]",h="[object GeneratorFunction]",y="[object HTMLAllCollection]",m="[object HTML document.all class]",O="[object HTMLCollection]",A=typeof Symbol=="function"&&!!Symbol.toStringTag,E=!(0 in[,]),b=function(){return!1};if(typeof document=="object"){var k=document.all;l.call(k)===l.call(document.all)&&(b=function(S){if((E||!S)&&(typeof S=="undefined"||typeof S=="object"))try{var R=l.call(S);return(R===y||R===m||R===O||R===c)&&S("")==null}catch{}return!1})}return Fo=e?function(S){if(b(S))return!0;if(!S||typeof S!="function"&&typeof S!="object")return!1;try{e(S,null,n)}catch(R){if(R!==r)return!1}return!a(S)&&o(S)}:function(S){if(b(S))return!0;if(!S||typeof S!="function"&&typeof S!="object")return!1;if(A)return o(S);if(a(S))return!1;var R=l.call(S);return R!==f&&R!==h&&!/^\[object HTML/.test(R)?!1:o(S)},Fo}var Io,rd;function mb(){if(rd)return Io;rd=1;var t=pb(),e=Object.prototype.toString,n=Object.prototype.hasOwnProperty,r=function(c,f,h){for(var y=0,m=c.length;y<m;y++)n.call(c,y)&&(h==null?f(c[y],y,c):f.call(h,c[y],y,c))},i=function(c,f,h){for(var y=0,m=c.length;y<m;y++)h==null?f(c.charAt(y),y,c):f.call(h,c.charAt(y),y,c)},a=function(c,f,h){for(var y in c)n.call(c,y)&&(h==null?f(c[y],y,c):f.call(h,c[y],y,c))},o=function(c,f,h){if(!t(f))throw new TypeError("iterator must be a function");var y;arguments.length>=3&&(y=h),e.call(c)==="[object Array]"?r(c,f,y):typeof c=="string"?i(c,f,y):a(c,f,y)};return Io=o,Io}var Do,id;function gb(){return id||(id=1,Do=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),Do}var Lo,ad;function yb(){if(ad)return Lo;ad=1;var t=gb(),e=typeof globalThis=="undefined"?ol:globalThis;return Lo=function(){for(var r=[],i=0;i<t.length;i++)typeof e[t[i]]=="function"&&(r[r.length]=t[i]);return r},Lo}var $o,sd;function Qh(){if(sd)return $o;sd=1;var t=mb(),e=yb(),n=Jh(),r=Yh(),i=hl(),a=r("Object.prototype.toString"),o=cl()(),l=typeof globalThis=="undefined"?ol:globalThis,c=e(),f=r("String.prototype.slice"),h=Object.getPrototypeOf,y=r("Array.prototype.indexOf",!0)||function(b,k){for(var C=0;C<b.length;C+=1)if(b[C]===k)return C;return-1},m={__proto__:null};o&&i&&h?t(c,function(E){var b=new l[E];if(Symbol.toStringTag in b){var k=h(b),C=i(k,Symbol.toStringTag);if(!C){var S=h(k);C=i(S,Symbol.toStringTag)}m["$"+E]=n(C.get)}}):t(c,function(E){var b=new l[E],k=b.slice||b.set;k&&(m["$"+E]=n(k))});var O=function(b){var k=!1;return t(m,function(C,S){if(!k)try{"$"+C(b)===S&&(k=f(S,1))}catch{}}),k},A=function(b){var k=!1;return t(m,function(C,S){if(!k)try{C(b),k=f(S,1)}catch{}}),k};return $o=function(b){if(!b||typeof b!="object")return!1;if(!o){var k=f(a(b),8,-1);return y(c,k)>-1?k:k!=="Object"?!1:A(b)}return i?O(b):null},$o}var jo,od;function vb(){if(od)return jo;od=1;var t=Qh();return jo=function(n){return!!t(n)},jo}var ud;function bb(){return ud||(ud=1,function(t){var e=fb(),n=hb(),r=Qh(),i=vb();function a(V){return V.call.bind(V)}var o=typeof BigInt!="undefined",l=typeof Symbol!="undefined",c=a(Object.prototype.toString),f=a(Number.prototype.valueOf),h=a(String.prototype.valueOf),y=a(Boolean.prototype.valueOf);if(o)var m=a(BigInt.prototype.valueOf);if(l)var O=a(Symbol.prototype.valueOf);function A(V,qe){if(typeof V!="object")return!1;try{return qe(V),!0}catch{return!1}}t.isArgumentsObject=e,t.isGeneratorFunction=n,t.isTypedArray=i;function E(V){return typeof Promise!="undefined"&&V instanceof Promise||V!==null&&typeof V=="object"&&typeof V.then=="function"&&typeof V.catch=="function"}t.isPromise=E;function b(V){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(V):i(V)||Q(V)}t.isArrayBufferView=b;function k(V){return r(V)==="Uint8Array"}t.isUint8Array=k;function C(V){return r(V)==="Uint8ClampedArray"}t.isUint8ClampedArray=C;function S(V){return r(V)==="Uint16Array"}t.isUint16Array=S;function R(V){return r(V)==="Uint32Array"}t.isUint32Array=R;function x(V){return r(V)==="Int8Array"}t.isInt8Array=x;function z(V){return r(V)==="Int16Array"}t.isInt16Array=z;function I(V){return r(V)==="Int32Array"}t.isInt32Array=I;function re(V){return r(V)==="Float32Array"}t.isFloat32Array=re;function ie(V){return r(V)==="Float64Array"}t.isFloat64Array=ie;function ke(V){return r(V)==="BigInt64Array"}t.isBigInt64Array=ke;function he(V){return r(V)==="BigUint64Array"}t.isBigUint64Array=he;function Ee(V){return c(V)==="[object Map]"}Ee.working=typeof Map!="undefined"&&Ee(new Map);function le(V){return typeof Map=="undefined"?!1:Ee.working?Ee(V):V instanceof Map}t.isMap=le;function j(V){return c(V)==="[object Set]"}j.working=typeof Set!="undefined"&&j(new Set);function w(V){return typeof Set=="undefined"?!1:j.working?j(V):V instanceof Set}t.isSet=w;function J(V){return c(V)==="[object WeakMap]"}J.working=typeof WeakMap!="undefined"&&J(new WeakMap);function te(V){return typeof WeakMap=="undefined"?!1:J.working?J(V):V instanceof WeakMap}t.isWeakMap=te;function ne(V){return c(V)==="[object WeakSet]"}ne.working=typeof WeakSet!="undefined"&&ne(new WeakSet);function se(V){return ne(V)}t.isWeakSet=se;function me(V){return c(V)==="[object ArrayBuffer]"}me.working=typeof ArrayBuffer!="undefined"&&me(new ArrayBuffer);function G(V){return typeof ArrayBuffer=="undefined"?!1:me.working?me(V):V instanceof ArrayBuffer}t.isArrayBuffer=G;function D(V){return c(V)==="[object DataView]"}D.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&D(new DataView(new ArrayBuffer(1),0,1));function Q(V){return typeof DataView=="undefined"?!1:D.working?D(V):V instanceof DataView}t.isDataView=Q;var q=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function B(V){return c(V)==="[object SharedArrayBuffer]"}function W(V){return typeof q=="undefined"?!1:(typeof B.working=="undefined"&&(B.working=B(new q)),B.working?B(V):V instanceof q)}t.isSharedArrayBuffer=W;function ge(V){return c(V)==="[object AsyncFunction]"}t.isAsyncFunction=ge;function ce(V){return c(V)==="[object Map Iterator]"}t.isMapIterator=ce;function oe(V){return c(V)==="[object Set Iterator]"}t.isSetIterator=oe;function Ce(V){return c(V)==="[object Generator]"}t.isGeneratorObject=Ce;function xe(V){return c(V)==="[object WebAssembly.Module]"}t.isWebAssemblyCompiledModule=xe;function we(V){return A(V,f)}t.isNumberObject=we;function ct(V){return A(V,h)}t.isStringObject=ct;function Ze(V){return A(V,y)}t.isBooleanObject=Ze;function We(V){return o&&A(V,m)}t.isBigIntObject=We;function Pe(V){return l&&A(V,O)}t.isSymbolObject=Pe;function Je(V){return we(V)||ct(V)||Ze(V)||We(V)||Pe(V)}t.isBoxedPrimitive=Je;function Ft(V){return typeof Uint8Array!="undefined"&&(G(V)||W(V))}t.isAnyArrayBuffer=Ft,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(V){Object.defineProperty(t,V,{enumerable:!1,value:function(){throw new Error(V+" is not supported in userland")}})})}(oo)),oo}var Bo,ld;function kb(){return ld||(ld=1,Bo=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"}),Bo}var Qi={exports:{}},cd;function _b(){return cd||(cd=1,typeof Object.create=="function"?Qi.exports=function(e,n){n&&(e.super_=n,e.prototype=Object.create(n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Qi.exports=function(e,n){if(n){e.super_=n;var r=function(){};r.prototype=n.prototype,e.prototype=new r,e.prototype.constructor=e}}),Qi.exports}var dd;function Xh(){return dd||(dd=1,function(t){var e=Object.getOwnPropertyDescriptors||function(Q){for(var q=Object.keys(Q),B={},W=0;W<q.length;W++)B[q[W]]=Object.getOwnPropertyDescriptor(Q,q[W]);return B},n=/%[sdj%]/g;t.format=function(D){if(!x(D)){for(var Q=[],q=0;q<arguments.length;q++)Q.push(o(arguments[q]));return Q.join(" ")}for(var q=1,B=arguments,W=B.length,ge=String(D).replace(n,function(oe){if(oe==="%%")return"%";if(q>=W)return oe;switch(oe){case"%s":return String(B[q++]);case"%d":return Number(B[q++]);case"%j":try{return JSON.stringify(B[q++])}catch{return"[Circular]"}default:return oe}}),ce=B[q];q<W;ce=B[++q])C(ce)||!ie(ce)?ge+=" "+ce:ge+=" "+o(ce);return ge},t.deprecate=function(D,Q){if(typeof process!="undefined"&&process.noDeprecation===!0)return D;if(typeof process=="undefined")return function(){return t.deprecate(D,Q).apply(this,arguments)};var q=!1;function B(){if(!q){if(process.throwDeprecation)throw new Error(Q);process.traceDeprecation?console.trace(Q):console.error(Q),q=!0}return D.apply(this,arguments)}return B};var r={},i=/^$/;if(process.env.NODE_DEBUG){var a=process.env.NODE_DEBUG;a=a.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+a+"$","i")}t.debuglog=function(D){if(D=D.toUpperCase(),!r[D])if(i.test(D)){var Q=process.pid;r[D]=function(){var q=t.format.apply(t,arguments);console.error("%s %d: %s",D,Q,q)}}else r[D]=function(){};return r[D]};function o(D,Q){var q={seen:[],stylize:c};return arguments.length>=3&&(q.depth=arguments[2]),arguments.length>=4&&(q.colors=arguments[3]),k(Q)?q.showHidden=Q:Q&&t._extend(q,Q),I(q.showHidden)&&(q.showHidden=!1),I(q.depth)&&(q.depth=2),I(q.colors)&&(q.colors=!1),I(q.customInspect)&&(q.customInspect=!0),q.colors&&(q.stylize=l),h(q,D,q.depth)}t.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function l(D,Q){var q=o.styles[Q];return q?"\x1B["+o.colors[q][0]+"m"+D+"\x1B["+o.colors[q][1]+"m":D}function c(D,Q){return D}function f(D){var Q={};return D.forEach(function(q,B){Q[q]=!0}),Q}function h(D,Q,q){if(D.customInspect&&Q&&Ee(Q.inspect)&&Q.inspect!==t.inspect&&!(Q.constructor&&Q.constructor.prototype===Q)){var B=Q.inspect(q,D);return x(B)||(B=h(D,B,q)),B}var W=y(D,Q);if(W)return W;var ge=Object.keys(Q),ce=f(ge);if(D.showHidden&&(ge=Object.getOwnPropertyNames(Q)),he(Q)&&(ge.indexOf("message")>=0||ge.indexOf("description")>=0))return m(Q);if(ge.length===0){if(Ee(Q)){var oe=Q.name?": "+Q.name:"";return D.stylize("[Function"+oe+"]","special")}if(re(Q))return D.stylize(RegExp.prototype.toString.call(Q),"regexp");if(ke(Q))return D.stylize(Date.prototype.toString.call(Q),"date");if(he(Q))return m(Q)}var Ce="",xe=!1,we=["{","}"];if(b(Q)&&(xe=!0,we=["[","]"]),Ee(Q)){var ct=Q.name?": "+Q.name:"";Ce=" [Function"+ct+"]"}if(re(Q)&&(Ce=" "+RegExp.prototype.toString.call(Q)),ke(Q)&&(Ce=" "+Date.prototype.toUTCString.call(Q)),he(Q)&&(Ce=" "+m(Q)),ge.length===0&&(!xe||Q.length==0))return we[0]+Ce+we[1];if(q<0)return re(Q)?D.stylize(RegExp.prototype.toString.call(Q),"regexp"):D.stylize("[Object]","special");D.seen.push(Q);var Ze;return xe?Ze=O(D,Q,q,ce,ge):Ze=ge.map(function(We){return A(D,Q,q,ce,We,xe)}),D.seen.pop(),E(Ze,Ce,we)}function y(D,Q){if(I(Q))return D.stylize("undefined","undefined");if(x(Q)){var q="'"+JSON.stringify(Q).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return D.stylize(q,"string")}if(R(Q))return D.stylize(""+Q,"number");if(k(Q))return D.stylize(""+Q,"boolean");if(C(Q))return D.stylize("null","null")}function m(D){return"["+Error.prototype.toString.call(D)+"]"}function O(D,Q,q,B,W){for(var ge=[],ce=0,oe=Q.length;ce<oe;++ce)ne(Q,String(ce))?ge.push(A(D,Q,q,B,String(ce),!0)):ge.push("");return W.forEach(function(Ce){Ce.match(/^\d+$/)||ge.push(A(D,Q,q,B,Ce,!0))}),ge}function A(D,Q,q,B,W,ge){var ce,oe,Ce;if(Ce=Object.getOwnPropertyDescriptor(Q,W)||{value:Q[W]},Ce.get?Ce.set?oe=D.stylize("[Getter/Setter]","special"):oe=D.stylize("[Getter]","special"):Ce.set&&(oe=D.stylize("[Setter]","special")),ne(B,W)||(ce="["+W+"]"),oe||(D.seen.indexOf(Ce.value)<0?(C(q)?oe=h(D,Ce.value,null):oe=h(D,Ce.value,q-1),oe.indexOf(`
31
+ `)>-1&&(ge?oe=oe.split(`
32
+ `).map(function(xe){return" "+xe}).join(`
33
+ `).slice(2):oe=`
34
+ `+oe.split(`
35
+ `).map(function(xe){return" "+xe}).join(`
36
+ `))):oe=D.stylize("[Circular]","special")),I(ce)){if(ge&&W.match(/^\d+$/))return oe;ce=JSON.stringify(""+W),ce.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(ce=ce.slice(1,-1),ce=D.stylize(ce,"name")):(ce=ce.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),ce=D.stylize(ce,"string"))}return ce+": "+oe}function E(D,Q,q){var B=D.reduce(function(W,ge){return ge.indexOf(`
37
+ `)>=0,W+ge.replace(/\u001b\[\d\d?m/g,"").length+1},0);return B>60?q[0]+(Q===""?"":Q+`
38
+ `)+" "+D.join(`,
39
+ `)+" "+q[1]:q[0]+Q+" "+D.join(", ")+" "+q[1]}t.types=bb();function b(D){return Array.isArray(D)}t.isArray=b;function k(D){return typeof D=="boolean"}t.isBoolean=k;function C(D){return D===null}t.isNull=C;function S(D){return D==null}t.isNullOrUndefined=S;function R(D){return typeof D=="number"}t.isNumber=R;function x(D){return typeof D=="string"}t.isString=x;function z(D){return typeof D=="symbol"}t.isSymbol=z;function I(D){return D===void 0}t.isUndefined=I;function re(D){return ie(D)&&j(D)==="[object RegExp]"}t.isRegExp=re,t.types.isRegExp=re;function ie(D){return typeof D=="object"&&D!==null}t.isObject=ie;function ke(D){return ie(D)&&j(D)==="[object Date]"}t.isDate=ke,t.types.isDate=ke;function he(D){return ie(D)&&(j(D)==="[object Error]"||D instanceof Error)}t.isError=he,t.types.isNativeError=he;function Ee(D){return typeof D=="function"}t.isFunction=Ee;function le(D){return D===null||typeof D=="boolean"||typeof D=="number"||typeof D=="string"||typeof D=="symbol"||typeof D=="undefined"}t.isPrimitive=le,t.isBuffer=kb();function j(D){return Object.prototype.toString.call(D)}function w(D){return D<10?"0"+D.toString(10):D.toString(10)}var J=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function te(){var D=new Date,Q=[w(D.getHours()),w(D.getMinutes()),w(D.getSeconds())].join(":");return[D.getDate(),J[D.getMonth()],Q].join(" ")}t.log=function(){console.log("%s - %s",te(),t.format.apply(t,arguments))},t.inherits=_b(),t._extend=function(D,Q){if(!Q||!ie(Q))return D;for(var q=Object.keys(Q),B=q.length;B--;)D[q[B]]=Q[q[B]];return D};function ne(D,Q){return Object.prototype.hasOwnProperty.call(D,Q)}var se=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;t.promisify=function(Q){if(typeof Q!="function")throw new TypeError('The "original" argument must be of type Function');if(se&&Q[se]){var q=Q[se];if(typeof q!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(q,se,{value:q,enumerable:!1,writable:!1,configurable:!0}),q}function q(){for(var B,W,ge=new Promise(function(Ce,xe){B=Ce,W=xe}),ce=[],oe=0;oe<arguments.length;oe++)ce.push(arguments[oe]);ce.push(function(Ce,xe){Ce?W(Ce):B(xe)});try{Q.apply(this,ce)}catch(Ce){W(Ce)}return ge}return Object.setPrototypeOf(q,Object.getPrototypeOf(Q)),se&&Object.defineProperty(q,se,{value:q,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(q,e(Q))},t.promisify.custom=se;function me(D,Q){if(!D){var q=new Error("Promise was rejected with a falsy value");q.reason=D,D=q}return Q(D)}function G(D){if(typeof D!="function")throw new TypeError('The "original" argument must be of type Function');function Q(){for(var q=[],B=0;B<arguments.length;B++)q.push(arguments[B]);var W=q.pop();if(typeof W!="function")throw new TypeError("The last argument must be of type Function");var ge=this,ce=function(){return W.apply(ge,arguments)};D.apply(this,q).then(function(oe){process.nextTick(ce.bind(null,null,oe))},function(oe){process.nextTick(me.bind(null,oe,ce))})}return Object.setPrototypeOf(Q,Object.getPrototypeOf(D)),Object.defineProperties(Q,e(D)),Q}t.callbackify=G}(so)),so}var Mo={},fd;function pl(){return fd||(fd=1,function(t){t.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1,t.find=(e,n)=>e.nodes.find(r=>r.type===n),t.exceedsLimit=(e,n,r=1,i)=>i===!1||!t.isInteger(e)||!t.isInteger(n)?!1:(Number(n)-Number(e))/Number(r)>=i,t.escapeNode=(e,n=0,r)=>{const i=e.nodes[n];i&&(r&&i.type===r||i.type==="open"||i.type==="close")&&i.escaped!==!0&&(i.value="\\"+i.value,i.escaped=!0)},t.encloseBrace=e=>e.type!=="brace"||e.commas>>0+e.ranges>>0?!1:(e.invalid=!0,!0),t.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:!(e.commas>>0+e.ranges>>0)||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1,t.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0,t.reduce=e=>e.reduce((n,r)=>(r.type==="text"&&n.push(r.value),r.type==="range"&&(r.type="text"),n),[]),t.flatten=(...e)=>{const n=[],r=i=>{for(let a=0;a<i.length;a++){const o=i[a];if(Array.isArray(o)){r(o);continue}o!==void 0&&n.push(o)}return n};return r(e),n}}(Mo)),Mo}var Uo,hd;function ml(){if(hd)return Uo;hd=1;const t=pl();return Uo=(e,n={})=>{const r=(i,a={})=>{const o=n.escapeInvalid&&t.isInvalidBrace(a),l=i.invalid===!0&&n.escapeInvalid===!0;let c="";if(i.value)return(o||l)&&t.isOpenOrClose(i)?"\\"+i.value:i.value;if(i.value)return i.value;if(i.nodes)for(const f of i.nodes)c+=r(f);return c};return r(e)},Uo}/*!
40
+ * is-number <https://github.com/jonschlinkert/is-number>
41
+ *
42
+ * Copyright (c) 2014-present, Jon Schlinkert.
43
+ * Released under the MIT License.
44
+ */var Vo,pd;function Sb(){return pd||(pd=1,Vo=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}),Vo}/*!
45
+ * to-regex-range <https://github.com/micromatch/to-regex-range>
46
+ *
47
+ * Copyright (c) 2015-present, Jon Schlinkert.
48
+ * Released under the MIT License.
49
+ */var qo,md;function Ab(){if(md)return qo;md=1;const t=Sb(),e=(b,k,C)=>{if(t(b)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(k===void 0||b===k)return String(b);if(t(k)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let S={relaxZeros:!0,...C};typeof S.strictZeros=="boolean"&&(S.relaxZeros=S.strictZeros===!1);let R=String(S.relaxZeros),x=String(S.shorthand),z=String(S.capture),I=String(S.wrap),re=b+":"+k+"="+R+x+z+I;if(e.cache.hasOwnProperty(re))return e.cache[re].result;let ie=Math.min(b,k),ke=Math.max(b,k);if(Math.abs(ie-ke)===1){let w=b+"|"+k;return S.capture?`(${w})`:S.wrap===!1?w:`(?:${w})`}let he=A(b)||A(k),Ee={min:b,max:k,a:ie,b:ke},le=[],j=[];if(he&&(Ee.isPadded=he,Ee.maxLen=String(Ee.max).length),ie<0){let w=ke<0?Math.abs(ke):1;j=a(w,Math.abs(ie),Ee,S),ie=Ee.a=0}return ke>=0&&(le=a(ie,ke,Ee,S)),Ee.negatives=j,Ee.positives=le,Ee.result=n(j,le),S.capture===!0?Ee.result=`(${Ee.result})`:S.wrap!==!1&&le.length+j.length>1&&(Ee.result=`(?:${Ee.result})`),e.cache[re]=Ee,Ee.result};function n(b,k,C){let S=o(b,k,"-",!1)||[],R=o(k,b,"",!1)||[],x=o(b,k,"-?",!0)||[];return S.concat(x).concat(R).join("|")}function r(b,k){let C=1,S=1,R=h(b,C),x=new Set([k]);for(;b<=R&&R<=k;)x.add(R),C+=1,R=h(b,C);for(R=y(k+1,S)-1;b<R&&R<=k;)x.add(R),S+=1,R=y(k+1,S)-1;return x=[...x],x.sort(c),x}function i(b,k,C){if(b===k)return{pattern:b,count:[],digits:0};let S=l(b,k),R=S.length,x="",z=0;for(let I=0;I<R;I++){let[re,ie]=S[I];re===ie?x+=re:re!=="0"||ie!=="9"?x+=O(re,ie):z++}return z&&(x+=C.shorthand===!0?"\\d":"[0-9]"),{pattern:x,count:[z],digits:R}}function a(b,k,C,S){let R=r(b,k),x=[],z=b,I;for(let re=0;re<R.length;re++){let ie=R[re],ke=i(String(z),String(ie),S),he="";if(!C.isPadded&&I&&I.pattern===ke.pattern){I.count.length>1&&I.count.pop(),I.count.push(ke.count[0]),I.string=I.pattern+m(I.count),z=ie+1;continue}C.isPadded&&(he=E(ie,C,S)),ke.string=he+ke.pattern+m(ke.count),x.push(ke),z=ie+1,I=ke}return x}function o(b,k,C,S,R){let x=[];for(let z of b){let{string:I}=z;!S&&!f(k,"string",I)&&x.push(C+I),S&&f(k,"string",I)&&x.push(C+I)}return x}function l(b,k){let C=[];for(let S=0;S<b.length;S++)C.push([b[S],k[S]]);return C}function c(b,k){return b>k?1:k>b?-1:0}function f(b,k,C){return b.some(S=>S[k]===C)}function h(b,k){return Number(String(b).slice(0,-k)+"9".repeat(k))}function y(b,k){return b-b%Math.pow(10,k)}function m(b){let[k=0,C=""]=b;return C||k>1?`{${k+(C?","+C:"")}}`:""}function O(b,k,C){return`[${b}${k-b===1?"":"-"}${k}]`}function A(b){return/^-?(0+)\d/.test(b)}function E(b,k,C){if(!k.isPadded)return b;let S=Math.abs(k.maxLen-String(b).length),R=C.relaxZeros!==!1;switch(S){case 0:return"";case 1:return R?"0?":"0";case 2:return R?"0{0,2}":"00";default:return R?`0{0,${S}}`:`0{${S}}`}}return e.cache={},e.clearCache=()=>e.cache={},qo=e,qo}/*!
50
+ * fill-range <https://github.com/jonschlinkert/fill-range>
51
+ *
52
+ * Copyright (c) 2014-present, Jon Schlinkert.
53
+ * Licensed under the MIT License.
54
+ */var Ho,gd;function Zh(){if(gd)return Ho;gd=1;const t=Xh(),e=Ab(),n=S=>S!==null&&typeof S=="object"&&!Array.isArray(S),r=S=>R=>S===!0?Number(R):String(R),i=S=>typeof S=="number"||typeof S=="string"&&S!=="",a=S=>Number.isInteger(+S),o=S=>{let R=`${S}`,x=-1;if(R[0]==="-"&&(R=R.slice(1)),R==="0")return!1;for(;R[++x]==="0";);return x>0},l=(S,R,x)=>typeof S=="string"||typeof R=="string"?!0:x.stringify===!0,c=(S,R,x)=>{if(R>0){let z=S[0]==="-"?"-":"";z&&(S=S.slice(1)),S=z+S.padStart(z?R-1:R,"0")}return x===!1?String(S):S},f=(S,R)=>{let x=S[0]==="-"?"-":"";for(x&&(S=S.slice(1),R--);S.length<R;)S="0"+S;return x?"-"+S:S},h=(S,R,x)=>{S.negatives.sort((ke,he)=>ke<he?-1:ke>he?1:0),S.positives.sort((ke,he)=>ke<he?-1:ke>he?1:0);let z=R.capture?"":"?:",I="",re="",ie;return S.positives.length&&(I=S.positives.map(ke=>f(String(ke),x)).join("|")),S.negatives.length&&(re=`-(${z}${S.negatives.map(ke=>f(String(ke),x)).join("|")})`),I&&re?ie=`${I}|${re}`:ie=I||re,R.wrap?`(${z}${ie})`:ie},y=(S,R,x,z)=>{if(x)return e(S,R,{wrap:!1,...z});let I=String.fromCharCode(S);if(S===R)return I;let re=String.fromCharCode(R);return`[${I}-${re}]`},m=(S,R,x)=>{if(Array.isArray(S)){let z=x.wrap===!0,I=x.capture?"":"?:";return z?`(${I}${S.join("|")})`:S.join("|")}return e(S,R,x)},O=(...S)=>new RangeError("Invalid range arguments: "+t.inspect(...S)),A=(S,R,x)=>{if(x.strictRanges===!0)throw O([S,R]);return[]},E=(S,R)=>{if(R.strictRanges===!0)throw new TypeError(`Expected step "${S}" to be a number`);return[]},b=(S,R,x=1,z={})=>{let I=Number(S),re=Number(R);if(!Number.isInteger(I)||!Number.isInteger(re)){if(z.strictRanges===!0)throw O([S,R]);return[]}I===0&&(I=0),re===0&&(re=0);let ie=I>re,ke=String(S),he=String(R),Ee=String(x);x=Math.max(Math.abs(x),1);let le=o(ke)||o(he)||o(Ee),j=le?Math.max(ke.length,he.length,Ee.length):0,w=le===!1&&l(S,R,z)===!1,J=z.transform||r(w);if(z.toRegex&&x===1)return y(f(S,j),f(R,j),!0,z);let te={negatives:[],positives:[]},ne=G=>te[G<0?"negatives":"positives"].push(Math.abs(G)),se=[],me=0;for(;ie?I>=re:I<=re;)z.toRegex===!0&&x>1?ne(I):se.push(c(J(I,me),j,w)),I=ie?I-x:I+x,me++;return z.toRegex===!0?x>1?h(te,z,j):m(se,null,{wrap:!1,...z}):se},k=(S,R,x=1,z={})=>{if(!a(S)&&S.length>1||!a(R)&&R.length>1)return A(S,R,z);let I=z.transform||(w=>String.fromCharCode(w)),re=`${S}`.charCodeAt(0),ie=`${R}`.charCodeAt(0),ke=re>ie,he=Math.min(re,ie),Ee=Math.max(re,ie);if(z.toRegex&&x===1)return y(he,Ee,!1,z);let le=[],j=0;for(;ke?re>=ie:re<=ie;)le.push(I(re,j)),re=ke?re-x:re+x,j++;return z.toRegex===!0?m(le,null,{wrap:!1,options:z}):le},C=(S,R,x,z={})=>{if(R==null&&i(S))return[S];if(!i(S)||!i(R))return A(S,R,z);if(typeof x=="function")return C(S,R,1,{transform:x});if(n(x))return C(S,R,0,x);let I={...z};return I.capture===!0&&(I.wrap=!0),x=x||I.step||1,a(x)?a(S)&&a(R)?b(S,R,x,I):k(S,R,Math.max(Math.abs(x),1),I):x!=null&&!n(x)?E(x,I):C(S,R,1,x)};return Ho=C,Ho}var Ko,yd;function Eb(){if(yd)return Ko;yd=1;const t=Zh(),e=pl();return Ko=(r,i={})=>{const a=(o,l={})=>{const c=e.isInvalidBrace(l),f=o.invalid===!0&&i.escapeInvalid===!0,h=c===!0||f===!0,y=i.escapeInvalid===!0?"\\":"";let m="";if(o.isOpen===!0)return y+o.value;if(o.isClose===!0)return console.log("node.isClose",y,o.value),y+o.value;if(o.type==="open")return h?y+o.value:"(";if(o.type==="close")return h?y+o.value:")";if(o.type==="comma")return o.prev.type==="comma"?"":h?o.value:"|";if(o.value)return o.value;if(o.nodes&&o.ranges>0){const O=e.reduce(o.nodes),A=t(...O,{...i,wrap:!1,toRegex:!0,strictZeros:!0});if(A.length!==0)return O.length>1&&A.length>1?`(${A})`:A}if(o.nodes)for(const O of o.nodes)m+=a(O,o);return m};return a(r)},Ko}var zo,vd;function wb(){if(vd)return zo;vd=1;const t=Zh(),e=ml(),n=pl(),r=(a="",o="",l=!1)=>{const c=[];if(a=[].concat(a),o=[].concat(o),!o.length)return a;if(!a.length)return l?n.flatten(o).map(f=>`{${f}}`):o;for(const f of a)if(Array.isArray(f))for(const h of f)c.push(r(h,o,l));else for(let h of o)l===!0&&typeof h=="string"&&(h=`{${h}}`),c.push(Array.isArray(h)?r(f,h,l):f+h);return n.flatten(c)};return zo=(a,o={})=>{const l=o.rangeLimit===void 0?1e3:o.rangeLimit,c=(f,h={})=>{f.queue=[];let y=h,m=h.queue;for(;y.type!=="brace"&&y.type!=="root"&&y.parent;)y=y.parent,m=y.queue;if(f.invalid||f.dollar){m.push(r(m.pop(),e(f,o)));return}if(f.type==="brace"&&f.invalid!==!0&&f.nodes.length===2){m.push(r(m.pop(),["{}"]));return}if(f.nodes&&f.ranges>0){const b=n.reduce(f.nodes);if(n.exceedsLimit(...b,o.step,l))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let k=t(...b,o);k.length===0&&(k=e(f,o)),m.push(r(m.pop(),k)),f.nodes=[];return}const O=n.encloseBrace(f);let A=f.queue,E=f;for(;E.type!=="brace"&&E.type!=="root"&&E.parent;)E=E.parent,A=E.queue;for(let b=0;b<f.nodes.length;b++){const k=f.nodes[b];if(k.type==="comma"&&f.type==="brace"){b===1&&A.push(""),A.push("");continue}if(k.type==="close"){m.push(r(m.pop(),A,O));continue}if(k.value&&k.type!=="open"){A.push(r(A.pop(),k.value));continue}k.nodes&&c(k,f)}return A};return n.flatten(c(a))},zo}var Go,bd;function Nb(){return bd||(bd=1,Go={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
55
+ `,CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}),Go}var Wo,kd;function Ob(){if(kd)return Wo;kd=1;const t=ml(),{MAX_LENGTH:e,CHAR_BACKSLASH:n,CHAR_BACKTICK:r,CHAR_COMMA:i,CHAR_DOT:a,CHAR_LEFT_PARENTHESES:o,CHAR_RIGHT_PARENTHESES:l,CHAR_LEFT_CURLY_BRACE:c,CHAR_RIGHT_CURLY_BRACE:f,CHAR_LEFT_SQUARE_BRACKET:h,CHAR_RIGHT_SQUARE_BRACKET:y,CHAR_DOUBLE_QUOTE:m,CHAR_SINGLE_QUOTE:O,CHAR_NO_BREAK_SPACE:A,CHAR_ZERO_WIDTH_NOBREAK_SPACE:E}=Nb();return Wo=(k,C={})=>{if(typeof k!="string")throw new TypeError("Expected a string");const S=C||{},R=typeof S.maxLength=="number"?Math.min(e,S.maxLength):e;if(k.length>R)throw new SyntaxError(`Input length (${k.length}), exceeds max characters (${R})`);const x={type:"root",input:k,nodes:[]},z=[x];let I=x,re=x,ie=0;const ke=k.length;let he=0,Ee=0,le;const j=()=>k[he++],w=J=>{if(J.type==="text"&&re.type==="dot"&&(re.type="text"),re&&re.type==="text"&&J.type==="text"){re.value+=J.value;return}return I.nodes.push(J),J.parent=I,J.prev=re,re=J,J};for(w({type:"bos"});he<ke;)if(I=z[z.length-1],le=j(),!(le===E||le===A)){if(le===n){w({type:"text",value:(C.keepEscaping?le:"")+j()});continue}if(le===y){w({type:"text",value:"\\"+le});continue}if(le===h){ie++;let J;for(;he<ke&&(J=j());){if(le+=J,J===h){ie++;continue}if(J===n){le+=j();continue}if(J===y&&(ie--,ie===0))break}w({type:"text",value:le});continue}if(le===o){I=w({type:"paren",nodes:[]}),z.push(I),w({type:"text",value:le});continue}if(le===l){if(I.type!=="paren"){w({type:"text",value:le});continue}I=z.pop(),w({type:"text",value:le}),I=z[z.length-1];continue}if(le===m||le===O||le===r){const J=le;let te;for(C.keepQuotes!==!0&&(le="");he<ke&&(te=j());){if(te===n){le+=te+j();continue}if(te===J){C.keepQuotes===!0&&(le+=te);break}le+=te}w({type:"text",value:le});continue}if(le===c){Ee++;const te={type:"brace",open:!0,close:!1,dollar:re.value&&re.value.slice(-1)==="$"||I.dollar===!0,depth:Ee,commas:0,ranges:0,nodes:[]};I=w(te),z.push(I),w({type:"open",value:le});continue}if(le===f){if(I.type!=="brace"){w({type:"text",value:le});continue}const J="close";I=z.pop(),I.close=!0,w({type:J,value:le}),Ee--,I=z[z.length-1];continue}if(le===i&&Ee>0){if(I.ranges>0){I.ranges=0;const J=I.nodes.shift();I.nodes=[J,{type:"text",value:t(I)}]}w({type:"comma",value:le}),I.commas++;continue}if(le===a&&Ee>0&&I.commas===0){const J=I.nodes;if(Ee===0||J.length===0){w({type:"text",value:le});continue}if(re.type==="dot"){if(I.range=[],re.value+=le,re.type="range",I.nodes.length!==3&&I.nodes.length!==5){I.invalid=!0,I.ranges=0,re.type="text";continue}I.ranges++,I.args=[];continue}if(re.type==="range"){J.pop();const te=J[J.length-1];te.value+=re.value+le,re=te,I.ranges--;continue}w({type:"dot",value:le});continue}w({type:"text",value:le})}do if(I=z.pop(),I.type!=="root"){I.nodes.forEach(ne=>{ne.nodes||(ne.type==="open"&&(ne.isOpen=!0),ne.type==="close"&&(ne.isClose=!0),ne.nodes||(ne.type="text"),ne.invalid=!0)});const J=z[z.length-1],te=J.nodes.indexOf(I);J.nodes.splice(te,1,...I.nodes)}while(z.length>0);return w({type:"eos"}),x},Wo}var Jo,_d;function Rb(){if(_d)return Jo;_d=1;const t=ml(),e=Eb(),n=wb(),r=Ob(),i=(a,o={})=>{let l=[];if(Array.isArray(a))for(const c of a){const f=i.create(c,o);Array.isArray(f)?l.push(...f):l.push(f)}else l=[].concat(i.create(a,o));return o&&o.expand===!0&&o.nodupes===!0&&(l=[...new Set(l)]),l};return i.parse=(a,o={})=>r(a,o),i.stringify=(a,o={})=>t(typeof a=="string"?i.parse(a,o):a,o),i.compile=(a,o={})=>(typeof a=="string"&&(a=i.parse(a,o)),e(a,o)),i.expand=(a,o={})=>{typeof a=="string"&&(a=i.parse(a,o));let l=n(a,o);return o.noempty===!0&&(l=l.filter(Boolean)),o.nodupes===!0&&(l=[...new Set(l)]),l},i.create=(a,o={})=>a===""||a.length<3?[a]:o.expand!==!0?i.compile(a,o):i.expand(a,o),Jo=i,Jo}const Tb={},Cb=Object.freeze(Object.defineProperty({__proto__:null,default:Tb},Symbol.toStringTag,{value:"Module"})),gl=Lv(Cb);var Yo={},Qo,Sd;function Ya(){if(Sd)return Qo;Sd=1;const t=gl,e="\\\\/",n=`[^${e}]`,r="\\.",i="\\+",a="\\?",o="\\/",l="(?=.)",c="[^/]",f=`(?:${o}|$)`,h=`(?:^|${o})`,y=`${r}{1,2}${f}`,m=`(?!${r})`,O=`(?!${h}${y})`,A=`(?!${r}{0,1}${f})`,E=`(?!${y})`,b=`[^.${o}]`,k=`${c}*?`,C={DOT_LITERAL:r,PLUS_LITERAL:i,QMARK_LITERAL:a,SLASH_LITERAL:o,ONE_CHAR:l,QMARK:c,END_ANCHOR:f,DOTS_SLASH:y,NO_DOT:m,NO_DOTS:O,NO_DOT_SLASH:A,NO_DOTS_SLASH:E,QMARK_NO_DOT:b,STAR:k,START_ANCHOR:h},S={...C,SLASH_LITERAL:`[${e}]`,QMARK:n,STAR:`${n}*?`,DOTS_SLASH:`${r}{1,2}(?:[${e}]|$)`,NO_DOT:`(?!${r})`,NO_DOTS:`(?!(?:^|[${e}])${r}{1,2}(?:[${e}]|$))`,NO_DOT_SLASH:`(?!${r}{0,1}(?:[${e}]|$))`,NO_DOTS_SLASH:`(?!${r}{1,2}(?:[${e}]|$))`,QMARK_NO_DOT:`[^.${e}]`,START_ANCHOR:`(?:^|[${e}])`,END_ANCHOR:`(?:[${e}]|$)`},R={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};return Qo={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:R,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:t.sep,extglobChars(x){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${x.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(x){return x===!0?S:C}},Qo}var Ad;function Qa(){return Ad||(Ad=1,function(t){const e=gl,n=process.platform==="win32",{REGEX_BACKSLASH:r,REGEX_REMOVE_BACKSLASH:i,REGEX_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_GLOBAL:o}=Ya();t.isObject=l=>l!==null&&typeof l=="object"&&!Array.isArray(l),t.hasRegexChars=l=>a.test(l),t.isRegexChar=l=>l.length===1&&t.hasRegexChars(l),t.escapeRegex=l=>l.replace(o,"\\$1"),t.toPosixSlashes=l=>l.replace(r,"/"),t.removeBackslashes=l=>l.replace(i,c=>c==="\\"?"":c),t.supportsLookbehinds=()=>{const l=process.version.slice(1).split(".").map(Number);return l.length===3&&l[0]>=9||l[0]===8&&l[1]>=10},t.isWindows=l=>l&&typeof l.windows=="boolean"?l.windows:n===!0||e.sep==="\\",t.escapeLast=(l,c,f)=>{const h=l.lastIndexOf(c,f);return h===-1?l:l[h-1]==="\\"?t.escapeLast(l,c,h-1):`${l.slice(0,h)}\\${l.slice(h)}`},t.removePrefix=(l,c={})=>{let f=l;return f.startsWith("./")&&(f=f.slice(2),c.prefix="./"),f},t.wrapOutput=(l,c={},f={})=>{const h=f.contains?"":"^",y=f.contains?"":"$";let m=`${h}(?:${l})${y}`;return c.negated===!0&&(m=`(?:^(?!${m}).*$)`),m}}(Yo)),Yo}var Xo,Ed;function xb(){if(Ed)return Xo;Ed=1;const t=Qa(),{CHAR_ASTERISK:e,CHAR_AT:n,CHAR_BACKWARD_SLASH:r,CHAR_COMMA:i,CHAR_DOT:a,CHAR_EXCLAMATION_MARK:o,CHAR_FORWARD_SLASH:l,CHAR_LEFT_CURLY_BRACE:c,CHAR_LEFT_PARENTHESES:f,CHAR_LEFT_SQUARE_BRACKET:h,CHAR_PLUS:y,CHAR_QUESTION_MARK:m,CHAR_RIGHT_CURLY_BRACE:O,CHAR_RIGHT_PARENTHESES:A,CHAR_RIGHT_SQUARE_BRACKET:E}=Ya(),b=S=>S===l||S===r,k=S=>{S.isPrefix!==!0&&(S.depth=S.isGlobstar?1/0:1)};return Xo=(S,R)=>{const x=R||{},z=S.length-1,I=x.parts===!0||x.scanToEnd===!0,re=[],ie=[],ke=[];let he=S,Ee=-1,le=0,j=0,w=!1,J=!1,te=!1,ne=!1,se=!1,me=!1,G=!1,D=!1,Q=!1,q=!1,B=0,W,ge,ce={value:"",depth:0,isGlob:!1};const oe=()=>Ee>=z,Ce=()=>he.charCodeAt(Ee+1),xe=()=>(W=ge,he.charCodeAt(++Ee));for(;Ee<z;){ge=xe();let Pe;if(ge===r){G=ce.backslashes=!0,ge=xe(),ge===c&&(me=!0);continue}if(me===!0||ge===c){for(B++;oe()!==!0&&(ge=xe());){if(ge===r){G=ce.backslashes=!0,xe();continue}if(ge===c){B++;continue}if(me!==!0&&ge===a&&(ge=xe())===a){if(w=ce.isBrace=!0,te=ce.isGlob=!0,q=!0,I===!0)continue;break}if(me!==!0&&ge===i){if(w=ce.isBrace=!0,te=ce.isGlob=!0,q=!0,I===!0)continue;break}if(ge===O&&(B--,B===0)){me=!1,w=ce.isBrace=!0,q=!0;break}}if(I===!0)continue;break}if(ge===l){if(re.push(Ee),ie.push(ce),ce={value:"",depth:0,isGlob:!1},q===!0)continue;if(W===a&&Ee===le+1){le+=2;continue}j=Ee+1;continue}if(x.noext!==!0&&(ge===y||ge===n||ge===e||ge===m||ge===o)===!0&&Ce()===f){if(te=ce.isGlob=!0,ne=ce.isExtglob=!0,q=!0,ge===o&&Ee===le&&(Q=!0),I===!0){for(;oe()!==!0&&(ge=xe());){if(ge===r){G=ce.backslashes=!0,ge=xe();continue}if(ge===A){te=ce.isGlob=!0,q=!0;break}}continue}break}if(ge===e){if(W===e&&(se=ce.isGlobstar=!0),te=ce.isGlob=!0,q=!0,I===!0)continue;break}if(ge===m){if(te=ce.isGlob=!0,q=!0,I===!0)continue;break}if(ge===h){for(;oe()!==!0&&(Pe=xe());){if(Pe===r){G=ce.backslashes=!0,xe();continue}if(Pe===E){J=ce.isBracket=!0,te=ce.isGlob=!0,q=!0;break}}if(I===!0)continue;break}if(x.nonegate!==!0&&ge===o&&Ee===le){D=ce.negated=!0,le++;continue}if(x.noparen!==!0&&ge===f){if(te=ce.isGlob=!0,I===!0){for(;oe()!==!0&&(ge=xe());){if(ge===f){G=ce.backslashes=!0,ge=xe();continue}if(ge===A){q=!0;break}}continue}break}if(te===!0){if(q=!0,I===!0)continue;break}}x.noext===!0&&(ne=!1,te=!1);let we=he,ct="",Ze="";le>0&&(ct=he.slice(0,le),he=he.slice(le),j-=le),we&&te===!0&&j>0?(we=he.slice(0,j),Ze=he.slice(j)):te===!0?(we="",Ze=he):we=he,we&&we!==""&&we!=="/"&&we!==he&&b(we.charCodeAt(we.length-1))&&(we=we.slice(0,-1)),x.unescape===!0&&(Ze&&(Ze=t.removeBackslashes(Ze)),we&&G===!0&&(we=t.removeBackslashes(we)));const We={prefix:ct,input:S,start:le,base:we,glob:Ze,isBrace:w,isBracket:J,isGlob:te,isExtglob:ne,isGlobstar:se,negated:D,negatedExtglob:Q};if(x.tokens===!0&&(We.maxDepth=0,b(ge)||ie.push(ce),We.tokens=ie),x.parts===!0||x.tokens===!0){let Pe;for(let Je=0;Je<re.length;Je++){const Ft=Pe?Pe+1:le,V=re[Je],qe=S.slice(Ft,V);x.tokens&&(Je===0&&le!==0?(ie[Je].isPrefix=!0,ie[Je].value=ct):ie[Je].value=qe,k(ie[Je]),We.maxDepth+=ie[Je].depth),(Je!==0||qe!=="")&&ke.push(qe),Pe=V}if(Pe&&Pe+1<S.length){const Je=S.slice(Pe+1);ke.push(Je),x.tokens&&(ie[ie.length-1].value=Je,k(ie[ie.length-1]),We.maxDepth+=ie[ie.length-1].depth)}We.slashes=re,We.parts=ke}return We},Xo}var Zo,wd;function Pb(){if(wd)return Zo;wd=1;const t=Ya(),e=Qa(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:r,REGEX_NON_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_BACKREF:a,REPLACEMENTS:o}=t,l=(h,y)=>{if(typeof y.expandRange=="function")return y.expandRange(...h,y);h.sort();const m=`[${h.join("-")}]`;try{new RegExp(m)}catch{return h.map(A=>e.escapeRegex(A)).join("..")}return m},c=(h,y)=>`Missing ${h}: "${y}" - use "\\\\${y}" to match literal characters`,f=(h,y)=>{if(typeof h!="string")throw new TypeError("Expected a string");h=o[h]||h;const m={...y},O=typeof m.maxLength=="number"?Math.min(n,m.maxLength):n;let A=h.length;if(A>O)throw new SyntaxError(`Input length: ${A}, exceeds maximum allowed length: ${O}`);const E={type:"bos",value:"",output:m.prepend||""},b=[E],k=m.capture?"":"?:",C=e.isWindows(y),S=t.globChars(C),R=t.extglobChars(S),{DOT_LITERAL:x,PLUS_LITERAL:z,SLASH_LITERAL:I,ONE_CHAR:re,DOTS_SLASH:ie,NO_DOT:ke,NO_DOT_SLASH:he,NO_DOTS_SLASH:Ee,QMARK:le,QMARK_NO_DOT:j,STAR:w,START_ANCHOR:J}=S,te=V=>`(${k}(?:(?!${J}${V.dot?ie:x}).)*?)`,ne=m.dot?"":ke,se=m.dot?le:j;let me=m.bash===!0?te(m):w;m.capture&&(me=`(${me})`),typeof m.noext=="boolean"&&(m.noextglob=m.noext);const G={input:h,index:-1,start:0,dot:m.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:b};h=e.removePrefix(h,G),A=h.length;const D=[],Q=[],q=[];let B=E,W;const ge=()=>G.index===A-1,ce=G.peek=(V=1)=>h[G.index+V],oe=G.advance=()=>h[++G.index]||"",Ce=()=>h.slice(G.index+1),xe=(V="",qe=0)=>{G.consumed+=V,G.index+=qe},we=V=>{G.output+=V.output!=null?V.output:V.value,xe(V.value)},ct=()=>{let V=1;for(;ce()==="!"&&(ce(2)!=="("||ce(3)==="?");)oe(),G.start++,V++;return V%2===0?!1:(G.negated=!0,G.start++,!0)},Ze=V=>{G[V]++,q.push(V)},We=V=>{G[V]--,q.pop()},Pe=V=>{if(B.type==="globstar"){const qe=G.braces>0&&(V.type==="comma"||V.type==="brace"),pe=V.extglob===!0||D.length&&(V.type==="pipe"||V.type==="paren");V.type!=="slash"&&V.type!=="paren"&&!qe&&!pe&&(G.output=G.output.slice(0,-B.output.length),B.type="star",B.value="*",B.output=me,G.output+=B.output)}if(D.length&&V.type!=="paren"&&(D[D.length-1].inner+=V.value),(V.value||V.output)&&we(V),B&&B.type==="text"&&V.type==="text"){B.value+=V.value,B.output=(B.output||"")+V.value;return}V.prev=B,b.push(V),B=V},Je=(V,qe)=>{const pe={...R[qe],conditions:1,inner:""};pe.prev=B,pe.parens=G.parens,pe.output=G.output;const je=(m.capture?"(":"")+pe.open;Ze("parens"),Pe({type:V,value:qe,output:G.output?"":re}),Pe({type:"paren",extglob:!0,value:oe(),output:je}),D.push(pe)},Ft=V=>{let qe=V.close+(m.capture?")":""),pe;if(V.type==="negate"){let je=me;if(V.inner&&V.inner.length>1&&V.inner.includes("/")&&(je=te(m)),(je!==me||ge()||/^\)+$/.test(Ce()))&&(qe=V.close=`)$))${je}`),V.inner.includes("*")&&(pe=Ce())&&/^\.[^\\/.]+$/.test(pe)){const Ye=f(pe,{...y,fastpaths:!1}).output;qe=V.close=`)${Ye})${je})`}V.prev.type==="bos"&&(G.negatedExtglob=!0)}Pe({type:"paren",extglob:!0,value:W,output:qe}),We("parens")};if(m.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(h)){let V=!1,qe=h.replace(a,(pe,je,Ye,dt,et,Ut)=>dt==="\\"?(V=!0,pe):dt==="?"?je?je+dt+(et?le.repeat(et.length):""):Ut===0?se+(et?le.repeat(et.length):""):le.repeat(Ye.length):dt==="."?x.repeat(Ye.length):dt==="*"?je?je+dt+(et?me:""):me:je?pe:`\\${pe}`);return V===!0&&(m.unescape===!0?qe=qe.replace(/\\/g,""):qe=qe.replace(/\\+/g,pe=>pe.length%2===0?"\\\\":pe?"\\":"")),qe===h&&m.contains===!0?(G.output=h,G):(G.output=e.wrapOutput(qe,G,y),G)}for(;!ge();){if(W=oe(),W==="\0")continue;if(W==="\\"){const pe=ce();if(pe==="/"&&m.bash!==!0||pe==="."||pe===";")continue;if(!pe){W+="\\",Pe({type:"text",value:W});continue}const je=/^\\+/.exec(Ce());let Ye=0;if(je&&je[0].length>2&&(Ye=je[0].length,G.index+=Ye,Ye%2!==0&&(W+="\\")),m.unescape===!0?W=oe():W+=oe(),G.brackets===0){Pe({type:"text",value:W});continue}}if(G.brackets>0&&(W!=="]"||B.value==="["||B.value==="[^")){if(m.posix!==!1&&W===":"){const pe=B.value.slice(1);if(pe.includes("[")&&(B.posix=!0,pe.includes(":"))){const je=B.value.lastIndexOf("["),Ye=B.value.slice(0,je),dt=B.value.slice(je+2),et=r[dt];if(et){B.value=Ye+et,G.backtrack=!0,oe(),!E.output&&b.indexOf(B)===1&&(E.output=re);continue}}}(W==="["&&ce()!==":"||W==="-"&&ce()==="]")&&(W=`\\${W}`),W==="]"&&(B.value==="["||B.value==="[^")&&(W=`\\${W}`),m.posix===!0&&W==="!"&&B.value==="["&&(W="^"),B.value+=W,we({value:W});continue}if(G.quotes===1&&W!=='"'){W=e.escapeRegex(W),B.value+=W,we({value:W});continue}if(W==='"'){G.quotes=G.quotes===1?0:1,m.keepQuotes===!0&&Pe({type:"text",value:W});continue}if(W==="("){Ze("parens"),Pe({type:"paren",value:W});continue}if(W===")"){if(G.parens===0&&m.strictBrackets===!0)throw new SyntaxError(c("opening","("));const pe=D[D.length-1];if(pe&&G.parens===pe.parens+1){Ft(D.pop());continue}Pe({type:"paren",value:W,output:G.parens?")":"\\)"}),We("parens");continue}if(W==="["){if(m.nobracket===!0||!Ce().includes("]")){if(m.nobracket!==!0&&m.strictBrackets===!0)throw new SyntaxError(c("closing","]"));W=`\\${W}`}else Ze("brackets");Pe({type:"bracket",value:W});continue}if(W==="]"){if(m.nobracket===!0||B&&B.type==="bracket"&&B.value.length===1){Pe({type:"text",value:W,output:`\\${W}`});continue}if(G.brackets===0){if(m.strictBrackets===!0)throw new SyntaxError(c("opening","["));Pe({type:"text",value:W,output:`\\${W}`});continue}We("brackets");const pe=B.value.slice(1);if(B.posix!==!0&&pe[0]==="^"&&!pe.includes("/")&&(W=`/${W}`),B.value+=W,we({value:W}),m.literalBrackets===!1||e.hasRegexChars(pe))continue;const je=e.escapeRegex(B.value);if(G.output=G.output.slice(0,-B.value.length),m.literalBrackets===!0){G.output+=je,B.value=je;continue}B.value=`(${k}${je}|${B.value})`,G.output+=B.value;continue}if(W==="{"&&m.nobrace!==!0){Ze("braces");const pe={type:"brace",value:W,output:"(",outputIndex:G.output.length,tokensIndex:G.tokens.length};Q.push(pe),Pe(pe);continue}if(W==="}"){const pe=Q[Q.length-1];if(m.nobrace===!0||!pe){Pe({type:"text",value:W,output:W});continue}let je=")";if(pe.dots===!0){const Ye=b.slice(),dt=[];for(let et=Ye.length-1;et>=0&&(b.pop(),Ye[et].type!=="brace");et--)Ye[et].type!=="dots"&&dt.unshift(Ye[et].value);je=l(dt,m),G.backtrack=!0}if(pe.comma!==!0&&pe.dots!==!0){const Ye=G.output.slice(0,pe.outputIndex),dt=G.tokens.slice(pe.tokensIndex);pe.value=pe.output="\\{",W=je="\\}",G.output=Ye;for(const et of dt)G.output+=et.output||et.value}Pe({type:"brace",value:W,output:je}),We("braces"),Q.pop();continue}if(W==="|"){D.length>0&&D[D.length-1].conditions++,Pe({type:"text",value:W});continue}if(W===","){let pe=W;const je=Q[Q.length-1];je&&q[q.length-1]==="braces"&&(je.comma=!0,pe="|"),Pe({type:"comma",value:W,output:pe});continue}if(W==="/"){if(B.type==="dot"&&G.index===G.start+1){G.start=G.index+1,G.consumed="",G.output="",b.pop(),B=E;continue}Pe({type:"slash",value:W,output:I});continue}if(W==="."){if(G.braces>0&&B.type==="dot"){B.value==="."&&(B.output=x);const pe=Q[Q.length-1];B.type="dots",B.output+=W,B.value+=W,pe.dots=!0;continue}if(G.braces+G.parens===0&&B.type!=="bos"&&B.type!=="slash"){Pe({type:"text",value:W,output:x});continue}Pe({type:"dot",value:W,output:x});continue}if(W==="?"){if(!(B&&B.value==="(")&&m.noextglob!==!0&&ce()==="("&&ce(2)!=="?"){Je("qmark",W);continue}if(B&&B.type==="paren"){const je=ce();let Ye=W;if(je==="<"&&!e.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(B.value==="("&&!/[!=<:]/.test(je)||je==="<"&&!/<([!=]|\w+>)/.test(Ce()))&&(Ye=`\\${W}`),Pe({type:"text",value:W,output:Ye});continue}if(m.dot!==!0&&(B.type==="slash"||B.type==="bos")){Pe({type:"qmark",value:W,output:j});continue}Pe({type:"qmark",value:W,output:le});continue}if(W==="!"){if(m.noextglob!==!0&&ce()==="("&&(ce(2)!=="?"||!/[!=<:]/.test(ce(3)))){Je("negate",W);continue}if(m.nonegate!==!0&&G.index===0){ct();continue}}if(W==="+"){if(m.noextglob!==!0&&ce()==="("&&ce(2)!=="?"){Je("plus",W);continue}if(B&&B.value==="("||m.regex===!1){Pe({type:"plus",value:W,output:z});continue}if(B&&(B.type==="bracket"||B.type==="paren"||B.type==="brace")||G.parens>0){Pe({type:"plus",value:W});continue}Pe({type:"plus",value:z});continue}if(W==="@"){if(m.noextglob!==!0&&ce()==="("&&ce(2)!=="?"){Pe({type:"at",extglob:!0,value:W,output:""});continue}Pe({type:"text",value:W});continue}if(W!=="*"){(W==="$"||W==="^")&&(W=`\\${W}`);const pe=i.exec(Ce());pe&&(W+=pe[0],G.index+=pe[0].length),Pe({type:"text",value:W});continue}if(B&&(B.type==="globstar"||B.star===!0)){B.type="star",B.star=!0,B.value+=W,B.output=me,G.backtrack=!0,G.globstar=!0,xe(W);continue}let V=Ce();if(m.noextglob!==!0&&/^\([^?]/.test(V)){Je("star",W);continue}if(B.type==="star"){if(m.noglobstar===!0){xe(W);continue}const pe=B.prev,je=pe.prev,Ye=pe.type==="slash"||pe.type==="bos",dt=je&&(je.type==="star"||je.type==="globstar");if(m.bash===!0&&(!Ye||V[0]&&V[0]!=="/")){Pe({type:"star",value:W,output:""});continue}const et=G.braces>0&&(pe.type==="comma"||pe.type==="brace"),Ut=D.length&&(pe.type==="pipe"||pe.type==="paren");if(!Ye&&pe.type!=="paren"&&!et&&!Ut){Pe({type:"star",value:W,output:""});continue}for(;V.slice(0,3)==="/**";){const It=h[G.index+4];if(It&&It!=="/")break;V=V.slice(3),xe("/**",3)}if(pe.type==="bos"&&ge()){B.type="globstar",B.value+=W,B.output=te(m),G.output=B.output,G.globstar=!0,xe(W);continue}if(pe.type==="slash"&&pe.prev.type!=="bos"&&!dt&&ge()){G.output=G.output.slice(0,-(pe.output+B.output).length),pe.output=`(?:${pe.output}`,B.type="globstar",B.output=te(m)+(m.strictSlashes?")":"|$)"),B.value+=W,G.globstar=!0,G.output+=pe.output+B.output,xe(W);continue}if(pe.type==="slash"&&pe.prev.type!=="bos"&&V[0]==="/"){const It=V[1]!==void 0?"|$":"";G.output=G.output.slice(0,-(pe.output+B.output).length),pe.output=`(?:${pe.output}`,B.type="globstar",B.output=`${te(m)}${I}|${I}${It})`,B.value+=W,G.output+=pe.output+B.output,G.globstar=!0,xe(W+oe()),Pe({type:"slash",value:"/",output:""});continue}if(pe.type==="bos"&&V[0]==="/"){B.type="globstar",B.value+=W,B.output=`(?:^|${I}|${te(m)}${I})`,G.output=B.output,G.globstar=!0,xe(W+oe()),Pe({type:"slash",value:"/",output:""});continue}G.output=G.output.slice(0,-B.output.length),B.type="globstar",B.output=te(m),B.value+=W,G.output+=B.output,G.globstar=!0,xe(W);continue}const qe={type:"star",value:W,output:me};if(m.bash===!0){qe.output=".*?",(B.type==="bos"||B.type==="slash")&&(qe.output=ne+qe.output),Pe(qe);continue}if(B&&(B.type==="bracket"||B.type==="paren")&&m.regex===!0){qe.output=W,Pe(qe);continue}(G.index===G.start||B.type==="slash"||B.type==="dot")&&(B.type==="dot"?(G.output+=he,B.output+=he):m.dot===!0?(G.output+=Ee,B.output+=Ee):(G.output+=ne,B.output+=ne),ce()!=="*"&&(G.output+=re,B.output+=re)),Pe(qe)}for(;G.brackets>0;){if(m.strictBrackets===!0)throw new SyntaxError(c("closing","]"));G.output=e.escapeLast(G.output,"["),We("brackets")}for(;G.parens>0;){if(m.strictBrackets===!0)throw new SyntaxError(c("closing",")"));G.output=e.escapeLast(G.output,"("),We("parens")}for(;G.braces>0;){if(m.strictBrackets===!0)throw new SyntaxError(c("closing","}"));G.output=e.escapeLast(G.output,"{"),We("braces")}if(m.strictSlashes!==!0&&(B.type==="star"||B.type==="bracket")&&Pe({type:"maybe_slash",value:"",output:`${I}?`}),G.backtrack===!0){G.output="";for(const V of G.tokens)G.output+=V.output!=null?V.output:V.value,V.suffix&&(G.output+=V.suffix)}return G};return f.fastpaths=(h,y)=>{const m={...y},O=typeof m.maxLength=="number"?Math.min(n,m.maxLength):n,A=h.length;if(A>O)throw new SyntaxError(`Input length: ${A}, exceeds maximum allowed length: ${O}`);h=o[h]||h;const E=e.isWindows(y),{DOT_LITERAL:b,SLASH_LITERAL:k,ONE_CHAR:C,DOTS_SLASH:S,NO_DOT:R,NO_DOTS:x,NO_DOTS_SLASH:z,STAR:I,START_ANCHOR:re}=t.globChars(E),ie=m.dot?x:R,ke=m.dot?z:R,he=m.capture?"":"?:",Ee={negated:!1,prefix:""};let le=m.bash===!0?".*?":I;m.capture&&(le=`(${le})`);const j=ne=>ne.noglobstar===!0?le:`(${he}(?:(?!${re}${ne.dot?S:b}).)*?)`,w=ne=>{switch(ne){case"*":return`${ie}${C}${le}`;case".*":return`${b}${C}${le}`;case"*.*":return`${ie}${le}${b}${C}${le}`;case"*/*":return`${ie}${le}${k}${C}${ke}${le}`;case"**":return ie+j(m);case"**/*":return`(?:${ie}${j(m)}${k})?${ke}${C}${le}`;case"**/*.*":return`(?:${ie}${j(m)}${k})?${ke}${le}${b}${C}${le}`;case"**/.*":return`(?:${ie}${j(m)}${k})?${b}${C}${le}`;default:{const se=/^(.*?)\.(\w+)$/.exec(ne);if(!se)return;const me=w(se[1]);return me?me+b+se[2]:void 0}}},J=e.removePrefix(h,Ee);let te=w(J);return te&&m.strictSlashes!==!0&&(te+=`${k}?`),te},Zo=f,Zo}var eu,Nd;function Fb(){if(Nd)return eu;Nd=1;const t=gl,e=xb(),n=Pb(),r=Qa(),i=Ya(),a=l=>l&&typeof l=="object"&&!Array.isArray(l),o=(l,c,f=!1)=>{if(Array.isArray(l)){const k=l.map(S=>o(S,c,f));return S=>{for(const R of k){const x=R(S);if(x)return x}return!1}}const h=a(l)&&l.tokens&&l.input;if(l===""||typeof l!="string"&&!h)throw new TypeError("Expected pattern to be a non-empty string");const y=c||{},m=r.isWindows(c),O=h?o.compileRe(l,c):o.makeRe(l,c,!1,!0),A=O.state;delete O.state;let E=()=>!1;if(y.ignore){const k={...c,ignore:null,onMatch:null,onResult:null};E=o(y.ignore,k,f)}const b=(k,C=!1)=>{const{isMatch:S,match:R,output:x}=o.test(k,O,c,{glob:l,posix:m}),z={glob:l,state:A,regex:O,posix:m,input:k,output:x,match:R,isMatch:S};return typeof y.onResult=="function"&&y.onResult(z),S===!1?(z.isMatch=!1,C?z:!1):E(k)?(typeof y.onIgnore=="function"&&y.onIgnore(z),z.isMatch=!1,C?z:!1):(typeof y.onMatch=="function"&&y.onMatch(z),C?z:!0)};return f&&(b.state=A),b};return o.test=(l,c,f,{glob:h,posix:y}={})=>{if(typeof l!="string")throw new TypeError("Expected input to be a string");if(l==="")return{isMatch:!1,output:""};const m=f||{},O=m.format||(y?r.toPosixSlashes:null);let A=l===h,E=A&&O?O(l):l;return A===!1&&(E=O?O(l):l,A=E===h),(A===!1||m.capture===!0)&&(m.matchBase===!0||m.basename===!0?A=o.matchBase(l,c,f,y):A=c.exec(E)),{isMatch:!!A,match:A,output:E}},o.matchBase=(l,c,f,h=r.isWindows(f))=>(c instanceof RegExp?c:o.makeRe(c,f)).test(t.basename(l)),o.isMatch=(l,c,f)=>o(c,f)(l),o.parse=(l,c)=>Array.isArray(l)?l.map(f=>o.parse(f,c)):n(l,{...c,fastpaths:!1}),o.scan=(l,c)=>e(l,c),o.compileRe=(l,c,f=!1,h=!1)=>{if(f===!0)return l.output;const y=c||{},m=y.contains?"":"^",O=y.contains?"":"$";let A=`${m}(?:${l.output})${O}`;l&&l.negated===!0&&(A=`^(?!${A}).*$`);const E=o.toRegex(A,c);return h===!0&&(E.state=l),E},o.makeRe=(l,c={},f=!1,h=!1)=>{if(!l||typeof l!="string")throw new TypeError("Expected a non-empty string");let y={negated:!1,fastpaths:!0};return c.fastpaths!==!1&&(l[0]==="."||l[0]==="*")&&(y.output=n.fastpaths(l,c)),y.output||(y=n(l,c)),o.compileRe(y,c,f,h)},o.toRegex=(l,c)=>{try{const f=c||{};return new RegExp(l,f.flags||(f.nocase?"i":""))}catch(f){if(c&&c.debug===!0)throw f;return/$^/}},o.constants=i,eu=o,eu}var tu,Od;function Ib(){return Od||(Od=1,tu=Fb()),tu}var nu,Rd;function Db(){if(Rd)return nu;Rd=1;const t=Xh(),e=Rb(),n=Ib(),r=Qa(),i=l=>l===""||l==="./",a=l=>{const c=l.indexOf("{");return c>-1&&l.indexOf("}",c)>-1},o=(l,c,f)=>{c=[].concat(c),l=[].concat(l);let h=new Set,y=new Set,m=new Set,O=0,A=k=>{m.add(k.output),f&&f.onResult&&f.onResult(k)};for(let k=0;k<c.length;k++){let C=n(String(c[k]),{...f,onResult:A},!0),S=C.state.negated||C.state.negatedExtglob;S&&O++;for(let R of l){let x=C(R,!0);(S?!x.isMatch:x.isMatch)&&(S?h.add(x.output):(h.delete(x.output),y.add(x.output)))}}let b=(O===c.length?[...m]:[...y]).filter(k=>!h.has(k));if(f&&b.length===0){if(f.failglob===!0)throw new Error(`No matches found for "${c.join(", ")}"`);if(f.nonull===!0||f.nullglob===!0)return f.unescape?c.map(k=>k.replace(/\\/g,"")):c}return b};return o.match=o,o.matcher=(l,c)=>n(l,c),o.isMatch=(l,c,f)=>n(c,f)(l),o.any=o.isMatch,o.not=(l,c,f={})=>{c=[].concat(c).map(String);let h=new Set,y=[],m=A=>{f.onResult&&f.onResult(A),y.push(A.output)},O=new Set(o(l,c,{...f,onResult:m}));for(let A of y)O.has(A)||h.add(A);return[...h]},o.contains=(l,c,f)=>{if(typeof l!="string")throw new TypeError(`Expected a string: "${t.inspect(l)}"`);if(Array.isArray(c))return c.some(h=>o.contains(l,h,f));if(typeof c=="string"){if(i(l)||i(c))return!1;if(l.includes(c)||l.startsWith("./")&&l.slice(2).includes(c))return!0}return o.isMatch(l,c,{...f,contains:!0})},o.matchKeys=(l,c,f)=>{if(!r.isObject(l))throw new TypeError("Expected the first argument to be an object");let h=o(Object.keys(l),c,f),y={};for(let m of h)y[m]=l[m];return y},o.some=(l,c,f)=>{let h=[].concat(l);for(let y of[].concat(c)){let m=n(String(y),f);if(h.some(O=>m(O)))return!0}return!1},o.every=(l,c,f)=>{let h=[].concat(l);for(let y of[].concat(c)){let m=n(String(y),f);if(!h.every(O=>m(O)))return!1}return!0},o.all=(l,c,f)=>{if(typeof l!="string")throw new TypeError(`Expected a string: "${t.inspect(l)}"`);return[].concat(c).every(h=>n(h,f)(l))},o.capture=(l,c,f)=>{let h=r.isWindows(f),m=n.makeRe(String(l),{...f,capture:!0}).exec(h?r.toPosixSlashes(c):c);if(m)return m.slice(1).map(O=>O===void 0?"":O)},o.makeRe=(...l)=>n.makeRe(...l),o.scan=(...l)=>n.scan(...l),o.parse=(l,c)=>{let f=[];for(let h of[].concat(l||[]))for(let y of e(String(h),c))f.push(n.parse(y,c));return f},o.braces=(l,c)=>{if(typeof l!="string")throw new TypeError("Expected a string");return c&&c.nobrace===!0||!a(l)?[l]:e(l,c)},o.braceExpand=(l,c)=>{if(typeof l!="string")throw new TypeError("Expected a string");return o.braces(l,{...c,expand:!0})},o.hasBraces=a,nu=o,nu}var Lb=Db();const Td=Wa(Lb),Cd="loglevel-patterns",Xi="loglevel:",ru="!",$b=it.INFO;class jb{constructor(e){Ae(this,"projectPrefix");Ae(this,"patternsCache",null);this.projectPrefix=`${Xi}${e}:`}getLevel(e){const n=this.loadAndUnifyPatterns();return this.resolveLogLevelFromPatterns(e,n)||$b}setLevel(e,n){const{level:r,override:i}=this.parseLogLevel(n),a=`${Xi}${e}`,o=i?`${r}${ru}`:r;localStorage.setItem(a,o),this.patternsCache=null}loadAndUnifyPatterns(){if(this.patternsCache)return this.patternsCache;const e=this.readPatternsFromJSON(),n=this.unifyWithIndividualKeys(e);return this.patternsCache=n,n}resolveLogLevelFromPatterns(e,n){let r;for(const[i,{level:a,override:o}]of Object.entries(n))if(Td.isMatch(e.toLowerCase(),i.toLowerCase())){if(o)return a;(!r||Td.matcher(i)(e))&&(r=a)}return r}readPatternsFromJSON(){try{const e=localStorage.getItem(Cd);return e?JSON.parse(e):{}}catch{return console.error("Failed to parse loglevel-patterns from localStorage"),{}}}unifyWithIndividualKeys(e){const n={...e};for(let r=0;r<localStorage.length;r++){const i=localStorage.key(r);if(!i||!i.startsWith(Xi)||i===Cd)continue;const a=i.replace(Xi,"").toLowerCase(),o=localStorage.getItem(i);if(!o)continue;const{level:l,override:c}=this.parseLogLevel(o);n[a]={level:l,override:c}}return n}parseLogLevel(e){const n=e.endsWith(ru),r=n?e.slice(0,-ru.length):e;if(!zh(r))throw new ul(r);return{level:r,override:n}}}class Bb{constructor(e,n){Ae(this,"committed",!1);Ae(this,"chainOptions",{});Ae(this,"method",null);Ae(this,"stack","");Ae(this,"args",[]);this.adapter=e,n&&(this.chainOptions={...n}),Promise.resolve().then(()=>this.commit())}options(e){return this.chainOptions={...this.chainOptions,...e},this}trace(...e){return this.log("trace",e)}debug(...e){return this.log("debug",e)}info(...e){return this.log("info",e)}warn(...e){return this.log("warn",e)}error(...e){return this.log("error",e)}fatal(...e){return this.log("fatal",e)}log(e,n){var r;return this.method=e,this.args=n,this.stack=(r=new Error().stack)!=null?r:"",this}commit(){if(!this.committed&&(this.committed=!0,this.method)){const e=this.args[0],n=this.args.slice(1),r={stack:this.stack,content:{message:e,args:n},options:this.chainOptions};this.adapter[this.method](r)}}}let ep=class Lu{constructor(e){Ae(this,"adapter");this.adapter=e}static create(e){const n=new Lu(e);return n.setMetadata({account:null,client:op()}),n}child(e,n={}){return new Lu(this.adapter.child(e,n))}lazyChild(e,n={}){let r;return new Proxy({},{get:(i,a,o)=>(r||(r=this.child(e,n)),Reflect.get(r,a,o))})}setMetadata(e){this.adapter.setMetadata(e)}setLevel(e){if(!zh(e))throw new ul(e);this.adapter.setLevel(e)}createChain(e){return new Bb(this.adapter,e)}trace(...e){return this.createChain().trace(...e)}debug(...e){return this.createChain().debug(...e)}info(...e){return this.createChain().info(...e)}warn(...e){return this.createChain().warn(...e)}error(...e){return this.createChain().error(...e)}fatal(...e){return this.createChain().fatal(...e)}options(e){return this.createChain(e)}};function Mb(t){return Zn().logger.lazyChild(t)}function tp(t,e){return ep.create(new Du({source:t,levelService:new jb(t),consoleLogger:new Xv,httpLogger:ll.create({db:e,project:t})}))}const Ub="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let Vb=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t));for(;t--;)e+=Ub[n[t]&63];return e};const Sa=(t=8)=>Vb(t),np=(t,e=!1)=>{const n=Object.entries(t).reduce((r,[i,a])=>a!==void 0&&(!e||a!==null)?`${r}${r?"&":""}${i}=${a}`:r,"");return n?`?${n}`:""},rp=t=>{const e=document.getElementById(t);return e?new URL(e.src).searchParams:new URLSearchParams};function qb(){const t=new Error().stack.split(`
56
+ `);return t.length<3?"":t[2].trim().substring(3)}function Hb(t){return new Promise(e=>setTimeout(e,t))}const Lt=class Lt{constructor(){Ae(this,"projectName","nizza");Ae(this,"instanceId",Sa());Ae(this,"logger",tp(this.projectName,jh));Ae(this,"coreLogger",this.logger.child("core"));Ae(this,"_logger",this.coreLogger.child("NizzaStore"));Ae(this,"_config",null);Ae(this,"_account");Ae(this,"_accountStatus","idle");Ae(this,"_productDataSource");Ae(this,"_eventBus",new Bh("nizza",this.coreLogger));Ae(this,"activeAccountFetchId",null);mv(this,{_config:ot,_account:ot,_productDataSource:ot,_accountStatus:ot,config:Sn,account:Sn,accountName:Sn,accountStatus:Sn,setAccount:Rt,configure:Rt,refetchAccount:Rt,setProductDataSource:Rt,setAddToCartConfig:Rt,setProductId:Rt},{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))Lt._instance=window.nizza.store;else{const r=new Lt;Lt._instance=r,Lt._instance.coreLogger.debug("Created new NizzaStore instance")}return window.nizza||(window.nizza={},window.nz={},Lt._instance.coreLogger.debug("Initialized nizza window object")),window.nizza.store=Lt._instance,window.nz=window.nizza,Lt._instance}async configure(e){try{this._logger.debug("Running configure with config:",e),await this.updateConfig(e)}catch(n){this.setAccountStatus("error"),this._logger.error("Error running configure",n)}}async updateConfig(e={}){var i,a;const{account:n,authToken:r}=(i=this._config)!=null?i:{};this._config={...this._config,...e},(a=this._config)!=null&&a.account&&(n!==this._config.account||r!==this._config.authToken)?(this._logger.debug(`Fetching account data for account: ${this._config.account}, authToken provided: ${!!this._config.authToken}`),this.logger.setMetadata({account:this._config.account}),await this.fetchAccount(this._config.account,this._config.authToken)):this._logger.debug("Skipped fetching account data as the account or authToken did not change"),e.getProductDataSource&&this.setProductDataSource(await e.getProductDataSource())}async fetchAccount(e,n){this.setAccountStatus("loading");const r=Sa();this.activeAccountFetchId=r;try{const i=await _p(e,n);if(this.activeAccountFetchId!==r){this._logger.debug("Fetch account request was superseded by a newer request");return}this.setAccount(i),this.setAccountStatus("success"),this._logger.debug("Account fetched and set successfully:",i)}catch(i){this.activeAccountFetchId===r&&(this.setAccountStatus("error"),i instanceof yl?this._logger.fatal("Nizza account not found",e).options({silent:!0}):this._logger.fatal("Unexpected error fetching account",i))}}setAccount(e){this._account=e}setAccountStatus(e){this._accountStatus=e}setProductDataSource(e){this._productDataSource=e}setProductId(e){this._config&&(this._config.productId=e)}setOrderFormId(e){this._config&&(this._config.orderFormId=e)}setAddToCartConfig(e){if(!this._config){const n="You cannot set addToCartConfig before running configure()";throw this._logger.error(n),new Error(n)}this._config.addToCartConfig=e}setAuthToken(e){this.updateConfig({authToken:e})}async refetchAccount(){var e;(e=this._config)!=null&&e.account&&await this.fetchAccount(this._config.account,this._config.authToken)}get version(){return Lt.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}};Ae(Lt,"version","8"),Ae(Lt,"_instance");let Aa=Lt;const Zn=t=>{const e=Aa.instance();return dv(()=>!!e.account,()=>t==null?void 0:t(e)),e};function ip(){return Ue.useMemo(()=>Zn(),[])}function ap(t,e){const n=ip();return Lh(()=>t(n),e)}const{coreLogger:Kb}=Zn(),zb=Kb.child("getClientTimeZone");function sp(t=!1){var a,o,l;let e=null,n=null,r=null;try{e=(l=(o=(a=Intl.DateTimeFormat())==null?void 0:a.resolvedOptions())==null?void 0:o.timeZone)!=null?l:null;const c=-new Date().getTimezoneOffset();r=c;const f=c>=0?"+":"-",h=String(Math.floor(Math.abs(c)/60)).padStart(2,"0"),y=String(Math.abs(c)%60).padStart(2,"0");n=`${f}${h}:${y}`}catch(c){zb.error("Error obtaining time zone or offset",c)}const i={offset:n,offsetValue:r,value:e,country:null,included:null,label:null};if(t){const{country:c,included:f,label:h,...y}=i;return y}return i}function op(){const t=typeof navigator!="undefined",e=t?navigator.userAgent:"server",{browser:n,os:r,device:i}=Gb(e),a=t?navigator.language:"server",o=t&&navigator.languages?navigator.languages:[],l=typeof window!="undefined"&&window.screen?{width:window.screen.width,height:window.screen.height,colorDepth:window.screen.colorDepth}:null,c=t&&"connection"in navigator?{downlink:navigator.connection.downlink,effectiveType:navigator.connection.effectiveType,rtt:navigator.connection.rtt,saveData:navigator.connection.saveData}:null,f=t?navigator.hardwareConcurrency:null,h=t&&"deviceMemory"in navigator?navigator.deviceMemory:null,y=sp(!0);return{userAgent:e,browser:n,os:r,device:i,language:a,languages:o,screen:l,connection:c,hardwareConcurrency:f,deviceMemory:h,timezone:y}}function Gb(t){var r;const e={browser:[{name:"Edge",regex:/Edg\/([\d.]+)/},{name:"Chrome",regex:/Chrome\/([\d.]+)/},{name:"Firefox",regex:/Firefox\/([\d.]+)/},{name:"Safari",regex:/Version\/([\d.]+).*Safari/},{name:"Opera",regex:/OPR\/([\d.]+)/}],os:[{name:"Windows",regex:/Windows NT ([\d.]+)/},{name:"macOS",regex:/Mac OS X ([\d_]+)/},{name:"iOS",regex:/iPhone OS ([\d_]+)/},{name:"Android",regex:/Android ([\d.]+)/},{name:"Linux",regex:/Linux/}],device:[{name:"iPhone",regex:/iPhone/},{name:"iPad",regex:/iPad/},{name:"Android",regex:/Android/}]},n=i=>{var o;const a=e[i].find(l=>l.regex.test(t));return{name:a?a.name:"Unknown",version:a&&((o=t.match(a.regex))==null?void 0:o[1].replace(/_/g,"."))||"Unknown"}};return{browser:n("browser"),os:n("os"),device:{model:n("device").name,type:n("device").name!=="Unknown"?"Mobile":"Desktop",vendor:((r=t.match(/; (\w+) Build/))==null?void 0:r[1])||"Unknown"}}}var up=(t=>(t.VTEX="VTEX",t.VTEX_IO="VTEX-IO",t.VTEX_CMS="PORTAL-VTEX",t.PLATFORM="PLATFORM",t.UNKNOWN="UNKNOWN",t))(up||{}),lp=(t=>(t.PLATFORM="platform_module",t.ADENDA="subscription_module",t.APP_STORE="app_store",t))(lp||{}),cp=(t=>(t.ACTIVE="active_contract",t.INACTIVE="inactive_contract",t))(cp||{}),dp=(t=>(t.LITE="lite",t.STANDARD="standard",t.PRO="pro",t))(dp||{}),fp=(t=>(t.LITE="PLAN_LITE",t.STANDARD="PLAN_ESTANDAR",t.PRO="PLAN_PRO",t.NONE="NO_PLAN",t))(fp||{}),hp=(t=>(t.PAST="past",t.LIVE="live",t.FUTURE="future",t))(hp||{});class yl extends dn{constructor(e){super("NIZZA_ACCOUNT_NOT_FOUND_ERROR",`Error finding account: ${e}`)}}class pp extends dn{constructor(e){super("NIZZA_PLAN_NOT_FOUND_ERROR",`Error finding plan: ${e}`)}}class mp extends dn{constructor(e){super("NIZZA_CREATE_PLAN_ERROR",`Error creating plan: ${e.plan}`,e)}}const xd=`${_r.apiUrls.restV1}/plans`;class gp{async get(e){const r=`/info${np({planType:e})}`,i=xd+r,{data:a}=await qn({url:i});return a}async create(e){const n=`${xd}/create`,{success:r}=await qn({url:n,method:"POST",body:JSON.stringify(e)});if(!r)throw new mp(e)}}function Wb(t){const{host:e,account:n,username:r,createdAt:i,subscriptionType:a,installationDateApp:o,...l}=t;return{...l,account:n,host:e!=null?e:null,username:r!=null?r:n,createdAt:new Date(i),subscriptionType:a!=null?a:null,installationDateApp:new Date(o)}}function Jb(t){const{host:e,...n}=t;return{...n,host:e!=null?e:null,plan:{}}}const Yb=`${_r.apiUrls.restV1}/accounts/v2`;class yp{async get(e){const n=`${Yb}/${e}`,{data:r}=await qn({url:n});return r?Jb(r):null}}const Qb=`${_r.apiUrls.restV1}/accounts/v2/pvt`;class Xb{async get(e,n){const r=`${Qb}/${e}`,{data:i}=await qn({url:r,headers:{authorization:`Bearer ${n}`}});return i?Wb(i):null}}class vp{constructor(e,n,r){this.publicAccountRepo=e,this.privateAccountRepo=n,this.accountPlanRepo=r}async get(e,n){try{const r=n?await this.privateAccountRepo.get(e,n):await this.publicAccountRepo.get(e);if(!r)throw new yl(e);const i=await this.accountPlanRepo.get(r.descriptionPlan);if(!i)throw new pp(r.descriptionPlan);return{...r,plan:i}}catch(r){throw new Zu(r)}}}const Zb=new yp,ek=new Xb,tk=new gp,bp=new vp(Zb,ek,tk),kp=()=>{const{account:t,accountName:e,accountStatus:n,refetchAccount:r,isPvtAccount:i,isPubAccount:a}=ap(f=>({account:f.account,accountName:f.accountName,accountStatus:f.accountStatus,refetchAccount:f.refetchAccount,isPvtAccount:f.isPvtAccount,isPubAccount:f.isPubAccount})),o=["idle","loading"].includes(n);return{account:t,accountName:e,isLoading:o,isError:n==="error",isSuccess:n==="success",accountStatus:n,refetchAccount:r,isPvtAccount:i,isPubAccount:a}};async function _p(t,e){return bp.get(t,e)}var Sp=(t=>(t.Created="CREATED",t.Finalized="FINALIZED",t.Live="LIVE",t.Starting="STARTING",t))(Sp||{}),Ap=(t=>(t.Add="add",t.Remove="remove",t))(Ap||{}),Ep=(t=>(t.Active="active",t.Inactive="inactive",t))(Ep||{});const nk={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"}}]}}]}}]}}]},rk={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"}}]}}]}}]}}]},ik={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"}}]}}]}}]}}]},ak={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"}}]}}]}}]}}]},sk={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"}}]}}]}}]}}]},ok={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"}}]}}]}}]}}]},uk={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"}}]}}]}}]}}]},lk={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"}}]}}]}}]}}]},ck={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"}}]}}]}}]}}]},dk={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"}}]}}]}}]}}]},fk={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"}}]}}]}}]}}]},hk={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"}}]}}]}}]}}]},pk={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"}}]}}]}}]}}]},wp={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"}}]}}]}}]}}]},mk={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"}}]}}]}}]}}]},gk={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"}}]}}]}}]}}]},yk={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"}}]}}]}}]}}]},vk={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"}}]}}]}}]}}]},bk={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"}}]}}]}}]}}]},kk={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"}}]}}]}}]}}]},_k={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"}}]}}]}}]}}]},Sk={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"}}]}}]}}]}}]},Ak={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"}}]}}]}}]}}]},Ek={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"}}]}}]}}]}}]},wk={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"}}]}}]}}]}}]},Nk={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"}}]}}]}}]}}]},Ok={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"}}]}}]}}]}}]},Rk={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"}}]}}]}}]}}]},Tk={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"}}]}}]}}]}}]},Ck={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"}}]}}]}}]}}]}}]},xk={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"}}]}}]}}]}}]},Pk={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"}}]}}]}}]}}]},Fk={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"}}]}}]}}]}}]},Ik={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"}}]}}]}}]}}]},Dk=Object.freeze(Object.defineProperty({__proto__:null,AddCollectionDocument:nk,AppendProductsToSnackVideoDocument:Sk,BlockUserDocument:dk,ChangeAccountUsernameDocument:fk,CreatePlayListDocument:Ak,CreateSnackVideoBatchDocument:Ek,DeleteAllCustomizationDocument:yk,DeleteChatMessageDocument:hk,DeleteCollectionDocument:rk,DeleteRelationshipWithSnackVideoDocument:wk,DeleteSnackVideoDocument:Nk,EventStatus:Sp,FindByProductSnackVideoDocument:Fk,FindCollectionDocument:ik,FindManySnackVideosDocument:Ok,FindMinimalEventDocument:lk,GetAllChatMessageDocument:pk,GetAllCollectionsDocument:ak,GetAllCustomizationDocument:vk,GetAllSnackVideosDocument:Rk,GetChatRoomTokenDocument:wp,GetPlayListDocument:Ik,GetPlayListsDocument:Tk,GetSnackVideoRelationshipsDocument:Ck,GetTimeLineDocument:_k,HighlightProductDocument:gk,ManageCollectionProductDocument:sk,Methods:Ap,PinChatMessageDocument:mk,SearchCollectionsDocument:ok,SearchMinimalEventsDocument:ck,SearchSnackVideosDocument:xk,SendAddToCartDocument:kk,Status:Ep,UpdateCollectionDocument:uk,UpdateCustomizationDocument:bk,UpdatePlayListDocument:Pk},Symbol.toStringTag,{value:"Module"}));var Xa=(t=>(t.OPEN_TAB="openTab",t.OPEN_VARIATION_SELECTOR="openVariationSelector",t.ADD_TO_CART="addToCart",t))(Xa||{});function Lk(t){return{class:t,_value:null,get value(){return this._value||(this._value=new t,Object.freeze(this)),this._value}}}var fn=(t=>(t.Local="local",t.VtexLegacy="vtexlegacy",t.VtexIO="vtexio",t.VtexFastStore="faststore",t.Platform="platform",t.External="external",t))(fn||{}),vl=(t=>(t.PROD="prod",t.DEV="dev",t.LOCAL="local",t))(vl||{});const{coreLogger:$k}=Zn(),$u=$k.child("addToCartHooks"),ju={errorAddingToCart:"addToCartHooks.notification.error",errorOpeningVariationSelector:"addToCartHooks.notification.error",errorOpeningNewTab:"addToCartHooks.notification.error",successAddingToCart:"addToCartHooks.notification.success"};async function jk(t){const e={...t,action:{type:Xa.ADD_TO_CART,exec:()=>$u.error("action no implemented in validate hook")}};try{const n=await Bk(e),r=await Mk(n);await Uk(r)}catch(n){$u.error("error unhandled",n)}}async function Bk(t){var a,o;const{context:e,userAddToCartConfig:n}=t,r=(a=n==null?void 0:n.hooks)==null?void 0:a.transform;let i=t.product;if(r)try{i=await r({product:{...i},data:(o=e.data)!=null?o:{}})}catch(l){Ea("transform",l)}return{...t,product:i}}async function Mk(t){var c,f;const{context:e,hookStrategy:n,userAddToCartConfig:r,product:i}=t,a=Np(t),o=(c=r==null?void 0:r.hooks)==null?void 0:c.validate;let l=n.validate({...t,actionFactory:a});if(o)try{l=await o({product:{...i},defaultAction:{...l},action:a,data:(f=e.data)!=null?f:{}})}catch(h){Ea("validate",h)}return{...t,action:l,actionFactory:a}}async function Uk(t){var b;const{eventBus:e}=Zn(),{product:n,userAddToCartConfig:r,notifyFactory:i,action:a,actionFactory:o}=t,{isVariationSelectorOpen:l,data:c={}}=t.context,f=(b=r==null?void 0:r.hooks)==null?void 0:b.end,h=a.type===Xa.ADD_TO_CART;let y=null,m=!1;const O=()=>{!h||!l||o.openVariationSelector(!1).exec()},A=()=>{!h||m||(y?i.error(ju.errorAddingToCart):i.success(ju.successAddingToCart))},E=()=>{const k={product:n,actionType:a.type,success:!y,error:y};e.emit(Uh.ATCH_ACTION_EXECUTED,k)};try{if(!a.type||!a.exec)throw new Error("Invalid action object, missing keys 'type' or 'exec'");await a.exec()}catch(k){Ea("end",k),y=k}if(f)try{m=!!await f({data:c,error:y,notify:i,actionExecuted:a})}catch(k){Ea("end",k)}O(),A(),E()}function Np(t){const{actionFactory:e,userAddToCartConfig:n}=t,r=i=>Object.entries(i!=null?i:{}).reduce((a,[o,l])=>({...a,[o]:c=>({type:o,exec:()=>l(c)})}),{});return{...r(e),...r(n==null?void 0:n.actionFactory)}}function Ea(t,e){$u.error(`addToCartHooks error running ${t}: `,e)}class Op{constructor(e){Ae(this,"aggregate");Ae(this,"_numSetPropsApplied",0);this.aggregate=e}setProps(e){for(const[n,r]of Object.entries(e))n in this.aggregate&&(this.aggregate[n]=r);this._numSetPropsApplied++}get isFirstSetProps(){return this._numSetPropsApplied===1}}function Rp(t){return new Op(t)}class Vk{constructor(e){Ae(this,"_value");e!==void 0&&(this._value=e)}get value(){return this._value}}var kt=(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))(kt||{});function Tp(t,e){return function(){return t.apply(e,arguments)}}const{toString:qk}=Object.prototype,{getPrototypeOf:bl}=Object,Za=(t=>e=>{const n=qk.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Jt=t=>(t=t.toLowerCase(),e=>Za(e)===t),es=t=>e=>typeof e===t,{isArray:Or}=Array,oi=es("undefined");function Hk(t){return t!==null&&!oi(t)&&t.constructor!==null&&!oi(t.constructor)&&xt(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Cp=Jt("ArrayBuffer");function Kk(t){let e;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Cp(t.buffer),e}const zk=es("string"),xt=es("function"),xp=es("number"),ts=t=>t!==null&&typeof t=="object",Gk=t=>t===!0||t===!1,oa=t=>{if(Za(t)!=="object")return!1;const e=bl(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Wk=Jt("Date"),Jk=Jt("File"),Yk=Jt("Blob"),Qk=Jt("FileList"),Xk=t=>ts(t)&&xt(t.pipe),Zk=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||xt(t.append)&&((e=Za(t))==="formdata"||e==="object"&&xt(t.toString)&&t.toString()==="[object FormData]"))},e_=Jt("URLSearchParams"),[t_,n_,r_,i_]=["ReadableStream","Request","Response","Headers"].map(Jt),a_=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function vi(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t=="undefined")return;let r,i;if(typeof t!="object"&&(t=[t]),Or(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{const a=n?Object.getOwnPropertyNames(t):Object.keys(t),o=a.length;let l;for(r=0;r<o;r++)l=a[r],e.call(null,t[l],l,t)}}function Pp(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,i;for(;r-- >0;)if(i=n[r],e===i.toLowerCase())return i;return null}const Bn=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,Fp=t=>!oi(t)&&t!==Bn;function Bu(){const{caseless:t}=Fp(this)&&this||{},e={},n=(r,i)=>{const a=t&&Pp(e,i)||i;oa(e[a])&&oa(r)?e[a]=Bu(e[a],r):oa(r)?e[a]=Bu({},r):Or(r)?e[a]=r.slice():e[a]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&vi(arguments[r],n);return e}const s_=(t,e,n,{allOwnKeys:r}={})=>(vi(e,(i,a)=>{n&&xt(i)?t[a]=Tp(i,n):t[a]=i},{allOwnKeys:r}),t),o_=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),u_=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},l_=(t,e,n,r)=>{let i,a,o;const l={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),a=i.length;a-- >0;)o=i[a],(!r||r(o,t,e))&&!l[o]&&(e[o]=t[o],l[o]=!0);t=n!==!1&&bl(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},c_=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},d_=t=>{if(!t)return null;if(Or(t))return t;let e=t.length;if(!xp(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},f_=(t=>e=>t&&e instanceof t)(typeof Uint8Array!="undefined"&&bl(Uint8Array)),h_=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=r.next())&&!i.done;){const a=i.value;e.call(t,a[0],a[1])}},p_=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},m_=Jt("HTMLFormElement"),g_=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Pd=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),y_=Jt("RegExp"),Ip=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};vi(n,(i,a)=>{let o;(o=e(i,a,t))!==!1&&(r[a]=o||i)}),Object.defineProperties(t,r)},v_=t=>{Ip(t,(e,n)=>{if(xt(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(xt(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},b_=(t,e)=>{const n={},r=i=>{i.forEach(a=>{n[a]=!0})};return Or(t)?r(t):r(String(t).split(e)),n},k_=()=>{},__=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,iu="abcdefghijklmnopqrstuvwxyz",Fd="0123456789",Dp={DIGIT:Fd,ALPHA:iu,ALPHA_DIGIT:iu+iu.toUpperCase()+Fd},S_=(t=16,e=Dp.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function A_(t){return!!(t&&xt(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const E_=t=>{const e=new Array(10),n=(r,i)=>{if(ts(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const a=Or(r)?[]:{};return vi(r,(o,l)=>{const c=n(o,i+1);!oi(c)&&(a[l]=c)}),e[i]=void 0,a}}return r};return n(t,0)},w_=Jt("AsyncFunction"),N_=t=>t&&(ts(t)||xt(t))&&xt(t.then)&&xt(t.catch),Lp=((t,e)=>t?setImmediate:e?((n,r)=>(Bn.addEventListener("message",({source:i,data:a})=>{i===Bn&&a===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Bn.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",xt(Bn.postMessage)),O_=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Bn):typeof process!="undefined"&&process.nextTick||Lp,ee={isArray:Or,isArrayBuffer:Cp,isBuffer:Hk,isFormData:Zk,isArrayBufferView:Kk,isString:zk,isNumber:xp,isBoolean:Gk,isObject:ts,isPlainObject:oa,isReadableStream:t_,isRequest:n_,isResponse:r_,isHeaders:i_,isUndefined:oi,isDate:Wk,isFile:Jk,isBlob:Yk,isRegExp:y_,isFunction:xt,isStream:Xk,isURLSearchParams:e_,isTypedArray:f_,isFileList:Qk,forEach:vi,merge:Bu,extend:s_,trim:a_,stripBOM:o_,inherits:u_,toFlatObject:l_,kindOf:Za,kindOfTest:Jt,endsWith:c_,toArray:d_,forEachEntry:h_,matchAll:p_,isHTMLForm:m_,hasOwnProperty:Pd,hasOwnProp:Pd,reduceDescriptors:Ip,freezeMethods:v_,toObjectSet:b_,toCamelCase:g_,noop:k_,toFiniteNumber:__,findKey:Pp,global:Bn,isContextDefined:Fp,ALPHABET:Dp,generateString:S_,isSpecCompliantForm:A_,toJSONObject:E_,isAsyncFn:w_,isThenable:N_,setImmediate:Lp,asap:O_};function $e(t,e,n,r,i){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),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}ee.inherits($e,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:ee.toJSONObject(this.config),code:this.code,status:this.status}}});const $p=$e.prototype,jp={};["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=>{jp[t]={value:t}});Object.defineProperties($e,jp);Object.defineProperty($p,"isAxiosError",{value:!0});$e.from=(t,e,n,r,i,a)=>{const o=Object.create($p);return ee.toFlatObject(t,o,function(c){return c!==Error.prototype},l=>l!=="isAxiosError"),$e.call(o,t.message,e,n,r,i),o.cause=t,o.name=t.name,a&&Object.assign(o,a),o};const R_=null;function Mu(t){return ee.isPlainObject(t)||ee.isArray(t)}function Bp(t){return ee.endsWith(t,"[]")?t.slice(0,-2):t}function Id(t,e,n){return t?t.concat(e).map(function(i,a){return i=Bp(i),!n&&a?"["+i+"]":i}).join(n?".":""):e}function T_(t){return ee.isArray(t)&&!t.some(Mu)}const C_=ee.toFlatObject(ee,{},null,function(e){return/^is[A-Z]/.test(e)});function ns(t,e,n){if(!ee.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=ee.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,b){return!ee.isUndefined(b[E])});const r=n.metaTokens,i=n.visitor||h,a=n.dots,o=n.indexes,c=(n.Blob||typeof Blob!="undefined"&&Blob)&&ee.isSpecCompliantForm(e);if(!ee.isFunction(i))throw new TypeError("visitor must be a function");function f(A){if(A===null)return"";if(ee.isDate(A))return A.toISOString();if(!c&&ee.isBlob(A))throw new $e("Blob is not supported. Use a Buffer instead.");return ee.isArrayBuffer(A)||ee.isTypedArray(A)?c&&typeof Blob=="function"?new Blob([A]):Buffer.from(A):A}function h(A,E,b){let k=A;if(A&&!b&&typeof A=="object"){if(ee.endsWith(E,"{}"))E=r?E:E.slice(0,-2),A=JSON.stringify(A);else if(ee.isArray(A)&&T_(A)||(ee.isFileList(A)||ee.endsWith(E,"[]"))&&(k=ee.toArray(A)))return E=Bp(E),k.forEach(function(S,R){!(ee.isUndefined(S)||S===null)&&e.append(o===!0?Id([E],R,a):o===null?E:E+"[]",f(S))}),!1}return Mu(A)?!0:(e.append(Id(b,E,a),f(A)),!1)}const y=[],m=Object.assign(C_,{defaultVisitor:h,convertValue:f,isVisitable:Mu});function O(A,E){if(!ee.isUndefined(A)){if(y.indexOf(A)!==-1)throw Error("Circular reference detected in "+E.join("."));y.push(A),ee.forEach(A,function(k,C){(!(ee.isUndefined(k)||k===null)&&i.call(e,k,ee.isString(C)?C.trim():C,E,m))===!0&&O(k,E?E.concat(C):[C])}),y.pop()}}if(!ee.isObject(t))throw new TypeError("data must be an object");return O(t),e}function Dd(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function kl(t,e){this._pairs=[],t&&ns(t,this,e)}const Mp=kl.prototype;Mp.append=function(e,n){this._pairs.push([e,n])};Mp.toString=function(e){const n=e?function(r){return e.call(this,r,Dd)}:Dd;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function x_(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Up(t,e,n){if(!e)return t;const r=n&&n.encode||x_,i=n&&n.serialize;let a;if(i?a=i(e,n):a=ee.isURLSearchParams(e)?e.toString():new kl(e,n).toString(r),a){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+a}return t}class Ld{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ee.forEach(this.handlers,function(r){r!==null&&e(r)})}}const Vp={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},P_=typeof URLSearchParams!="undefined"?URLSearchParams:kl,F_=typeof FormData!="undefined"?FormData:null,I_=typeof Blob!="undefined"?Blob:null,D_={isBrowser:!0,classes:{URLSearchParams:P_,FormData:F_,Blob:I_},protocols:["http","https","file","blob","url","data"]},_l=typeof window!="undefined"&&typeof document!="undefined",Uu=typeof navigator=="object"&&navigator||void 0,L_=_l&&(!Uu||["ReactNative","NativeScript","NS"].indexOf(Uu.product)<0),$_=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",j_=_l&&window.location.href||"http://localhost",B_=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:_l,hasStandardBrowserEnv:L_,hasStandardBrowserWebWorkerEnv:$_,navigator:Uu,origin:j_},Symbol.toStringTag,{value:"Module"})),Et={...B_,...D_};function M_(t,e){return ns(t,new Et.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,a){return Et.isNode&&ee.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},e))}function U_(t){return ee.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function V_(t){const e={},n=Object.keys(t);let r;const i=n.length;let a;for(r=0;r<i;r++)a=n[r],e[a]=t[a];return e}function qp(t){function e(n,r,i,a){let o=n[a++];if(o==="__proto__")return!0;const l=Number.isFinite(+o),c=a>=n.length;return o=!o&&ee.isArray(i)?i.length:o,c?(ee.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!l):((!i[o]||!ee.isObject(i[o]))&&(i[o]=[]),e(n,r,i[o],a)&&ee.isArray(i[o])&&(i[o]=V_(i[o])),!l)}if(ee.isFormData(t)&&ee.isFunction(t.entries)){const n={};return ee.forEachEntry(t,(r,i)=>{e(U_(r),i,n,0)}),n}return null}function q_(t,e,n){if(ee.isString(t))try{return(e||JSON.parse)(t),ee.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const bi={transitional:Vp,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,a=ee.isObject(e);if(a&&ee.isHTMLForm(e)&&(e=new FormData(e)),ee.isFormData(e))return i?JSON.stringify(qp(e)):e;if(ee.isArrayBuffer(e)||ee.isBuffer(e)||ee.isStream(e)||ee.isFile(e)||ee.isBlob(e)||ee.isReadableStream(e))return e;if(ee.isArrayBufferView(e))return e.buffer;if(ee.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let l;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return M_(e,this.formSerializer).toString();if((l=ee.isFileList(e))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return ns(l?{"files[]":e}:e,c&&new c,this.formSerializer)}}return a||i?(n.setContentType("application/json",!1),q_(e)):e}],transformResponse:[function(e){const n=this.transitional||bi.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(ee.isResponse(e)||ee.isReadableStream(e))return e;if(e&&ee.isString(e)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(l){if(o)throw l.name==="SyntaxError"?$e.from(l,$e.ERR_BAD_RESPONSE,this,null,this.response):l}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Et.classes.FormData,Blob:Et.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ee.forEach(["delete","get","head","post","put","patch"],t=>{bi.headers[t]={}});const H_=ee.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"]),K_=t=>{const e={};let n,r,i;return t&&t.split(`
57
+ `).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||e[n]&&H_[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},$d=Symbol("internals");function qr(t){return t&&String(t).trim().toLowerCase()}function ua(t){return t===!1||t==null?t:ee.isArray(t)?t.map(ua):String(t)}function z_(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const G_=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function au(t,e,n,r,i){if(ee.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!ee.isString(e)){if(ee.isString(r))return e.indexOf(r)!==-1;if(ee.isRegExp(r))return r.test(e)}}function W_(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function J_(t,e){const n=ee.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,a,o){return this[r].call(this,e,i,a,o)},configurable:!0})})}let wt=class{constructor(e){e&&this.set(e)}set(e,n,r){const i=this;function a(l,c,f){const h=qr(c);if(!h)throw new Error("header name must be a non-empty string");const y=ee.findKey(i,h);(!y||i[y]===void 0||f===!0||f===void 0&&i[y]!==!1)&&(i[y||c]=ua(l))}const o=(l,c)=>ee.forEach(l,(f,h)=>a(f,h,c));if(ee.isPlainObject(e)||e instanceof this.constructor)o(e,n);else if(ee.isString(e)&&(e=e.trim())&&!G_(e))o(K_(e),n);else if(ee.isHeaders(e))for(const[l,c]of e.entries())a(c,l,r);else e!=null&&a(n,e,r);return this}get(e,n){if(e=qr(e),e){const r=ee.findKey(this,e);if(r){const i=this[r];if(!n)return i;if(n===!0)return z_(i);if(ee.isFunction(n))return n.call(this,i,r);if(ee.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=qr(e),e){const r=ee.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||au(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let i=!1;function a(o){if(o=qr(o),o){const l=ee.findKey(r,o);l&&(!n||au(r,r[l],l,n))&&(delete r[l],i=!0)}}return ee.isArray(e)?e.forEach(a):a(e),i}clear(e){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const a=n[r];(!e||au(this,this[a],a,e,!0))&&(delete this[a],i=!0)}return i}normalize(e){const n=this,r={};return ee.forEach(this,(i,a)=>{const o=ee.findKey(r,a);if(o){n[o]=ua(i),delete n[a];return}const l=e?W_(a):String(a).trim();l!==a&&delete n[a],n[l]=ua(i),r[l]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return ee.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&ee.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
58
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[$d]=this[$d]={accessors:{}}).accessors,i=this.prototype;function a(o){const l=qr(o);r[l]||(J_(i,o),r[l]=!0)}return ee.isArray(e)?e.forEach(a):a(e),this}};wt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ee.reduceDescriptors(wt.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});ee.freezeMethods(wt);function su(t,e){const n=this||bi,r=e||n,i=wt.from(r.headers);let a=r.data;return ee.forEach(t,function(l){a=l.call(n,a,i.normalize(),e?e.status:void 0)}),i.normalize(),a}function Hp(t){return!!(t&&t.__CANCEL__)}function Rr(t,e,n){$e.call(this,t==null?"canceled":t,$e.ERR_CANCELED,e,n),this.name="CanceledError"}ee.inherits(Rr,$e,{__CANCEL__:!0});function Kp(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new $e("Request failed with status code "+n.status,[$e.ERR_BAD_REQUEST,$e.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Y_(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Q_(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i=0,a=0,o;return e=e!==void 0?e:1e3,function(c){const f=Date.now(),h=r[a];o||(o=f),n[i]=c,r[i]=f;let y=a,m=0;for(;y!==i;)m+=n[y++],y=y%t;if(i=(i+1)%t,i===a&&(a=(a+1)%t),f-o<e)return;const O=h&&f-h;return O?Math.round(m*1e3/O):void 0}}function X_(t,e){let n=0,r=1e3/e,i,a;const o=(f,h=Date.now())=>{n=h,i=null,a&&(clearTimeout(a),a=null),t.apply(null,f)};return[(...f)=>{const h=Date.now(),y=h-n;y>=r?o(f,h):(i=f,a||(a=setTimeout(()=>{a=null,o(i)},r-y)))},()=>i&&o(i)]}const wa=(t,e,n=3)=>{let r=0;const i=Q_(50,250);return X_(a=>{const o=a.loaded,l=a.lengthComputable?a.total:void 0,c=o-r,f=i(c),h=o<=l;r=o;const y={loaded:o,total:l,progress:l?o/l:void 0,bytes:c,rate:f||void 0,estimated:f&&l&&h?(l-o)/f:void 0,event:a,lengthComputable:l!=null,[e?"download":"upload"]:!0};t(y)},n)},jd=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Bd=t=>(...e)=>ee.asap(()=>t(...e)),Z_=Et.hasStandardBrowserEnv?function(){const e=Et.navigator&&/(msie|trident)/i.test(Et.navigator.userAgent),n=document.createElement("a");let r;function i(a){let o=a;return e&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(o){const l=ee.isString(o)?i(o):o;return l.protocol===r.protocol&&l.host===r.host}}():function(){return function(){return!0}}(),eS=Et.hasStandardBrowserEnv?{write(t,e,n,r,i,a){const o=[t+"="+encodeURIComponent(e)];ee.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),ee.isString(r)&&o.push("path="+r),ee.isString(i)&&o.push("domain="+i),a===!0&&o.push("secure"),document.cookie=o.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function tS(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function nS(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function zp(t,e){return t&&!tS(e)?nS(t,e):e}const Md=t=>t instanceof wt?{...t}:t;function zn(t,e){e=e||{};const n={};function r(f,h,y){return ee.isPlainObject(f)&&ee.isPlainObject(h)?ee.merge.call({caseless:y},f,h):ee.isPlainObject(h)?ee.merge({},h):ee.isArray(h)?h.slice():h}function i(f,h,y){if(ee.isUndefined(h)){if(!ee.isUndefined(f))return r(void 0,f,y)}else return r(f,h,y)}function a(f,h){if(!ee.isUndefined(h))return r(void 0,h)}function o(f,h){if(ee.isUndefined(h)){if(!ee.isUndefined(f))return r(void 0,f)}else return r(void 0,h)}function l(f,h,y){if(y in e)return r(f,h);if(y in t)return r(void 0,f)}const c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:l,headers:(f,h)=>i(Md(f),Md(h),!0)};return ee.forEach(Object.keys(Object.assign({},t,e)),function(h){const y=c[h]||i,m=y(t[h],e[h],h);ee.isUndefined(m)&&y!==l||(n[h]=m)}),n}const Gp=t=>{const e=zn({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:l}=e;e.headers=o=wt.from(o),e.url=Up(zp(e.baseURL,e.url),t.params,t.paramsSerializer),l&&o.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let c;if(ee.isFormData(n)){if(Et.hasStandardBrowserEnv||Et.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((c=o.getContentType())!==!1){const[f,...h]=c?c.split(";").map(y=>y.trim()).filter(Boolean):[];o.setContentType([f||"multipart/form-data",...h].join("; "))}}if(Et.hasStandardBrowserEnv&&(r&&ee.isFunction(r)&&(r=r(e)),r||r!==!1&&Z_(e.url))){const f=i&&a&&eS.read(a);f&&o.set(i,f)}return e},rS=typeof XMLHttpRequest!="undefined",iS=rS&&function(t){return new Promise(function(n,r){const i=Gp(t);let a=i.data;const o=wt.from(i.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:f}=i,h,y,m,O,A;function E(){O&&O(),A&&A(),i.cancelToken&&i.cancelToken.unsubscribe(h),i.signal&&i.signal.removeEventListener("abort",h)}let b=new XMLHttpRequest;b.open(i.method.toUpperCase(),i.url,!0),b.timeout=i.timeout;function k(){if(!b)return;const S=wt.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),x={data:!l||l==="text"||l==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:S,config:t,request:b};Kp(function(I){n(I),E()},function(I){r(I),E()},x),b=null}"onloadend"in b?b.onloadend=k:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(k)},b.onabort=function(){b&&(r(new $e("Request aborted",$e.ECONNABORTED,t,b)),b=null)},b.onerror=function(){r(new $e("Network Error",$e.ERR_NETWORK,t,b)),b=null},b.ontimeout=function(){let R=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const x=i.transitional||Vp;i.timeoutErrorMessage&&(R=i.timeoutErrorMessage),r(new $e(R,x.clarifyTimeoutError?$e.ETIMEDOUT:$e.ECONNABORTED,t,b)),b=null},a===void 0&&o.setContentType(null),"setRequestHeader"in b&&ee.forEach(o.toJSON(),function(R,x){b.setRequestHeader(x,R)}),ee.isUndefined(i.withCredentials)||(b.withCredentials=!!i.withCredentials),l&&l!=="json"&&(b.responseType=i.responseType),f&&([m,A]=wa(f,!0),b.addEventListener("progress",m)),c&&b.upload&&([y,O]=wa(c),b.upload.addEventListener("progress",y),b.upload.addEventListener("loadend",O)),(i.cancelToken||i.signal)&&(h=S=>{b&&(r(!S||S.type?new Rr(null,t,b):S),b.abort(),b=null)},i.cancelToken&&i.cancelToken.subscribe(h),i.signal&&(i.signal.aborted?h():i.signal.addEventListener("abort",h)));const C=Y_(i.url);if(C&&Et.protocols.indexOf(C)===-1){r(new $e("Unsupported protocol "+C+":",$e.ERR_BAD_REQUEST,t));return}b.send(a||null)})},aS=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,i;const a=function(f){if(!i){i=!0,l();const h=f instanceof Error?f:this.reason;r.abort(h instanceof $e?h:new Rr(h instanceof Error?h.message:h))}};let o=e&&setTimeout(()=>{o=null,a(new $e(`timeout ${e} of ms exceeded`,$e.ETIMEDOUT))},e);const l=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(f=>{f.unsubscribe?f.unsubscribe(a):f.removeEventListener("abort",a)}),t=null)};t.forEach(f=>f.addEventListener("abort",a));const{signal:c}=r;return c.unsubscribe=()=>ee.asap(l),c}},sS=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,i;for(;r<n;)i=r+e,yield t.slice(r,i),r=i},oS=async function*(t,e){for await(const n of uS(t))yield*sS(n,e)},uS=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},Ud=(t,e,n,r)=>{const i=oS(t,e);let a=0,o,l=c=>{o||(o=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:f,value:h}=await i.next();if(f){l(),c.close();return}let y=h.byteLength;if(n){let m=a+=y;n(m)}c.enqueue(new Uint8Array(h))}catch(f){throw l(f),f}},cancel(c){return l(c),i.return()}},{highWaterMark:2})},rs=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Wp=rs&&typeof ReadableStream=="function",lS=rs&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Jp=(t,...e)=>{try{return!!t(...e)}catch{return!1}},cS=Wp&&Jp(()=>{let t=!1;const e=new Request(Et.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Vd=64*1024,Vu=Wp&&Jp(()=>ee.isReadableStream(new Response("").body)),Na={stream:Vu&&(t=>t.body)};rs&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Na[e]&&(Na[e]=ee.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new $e(`Response type '${e}' is not supported`,$e.ERR_NOT_SUPPORT,r)})})})(new Response);const dS=async t=>{if(t==null)return 0;if(ee.isBlob(t))return t.size;if(ee.isSpecCompliantForm(t))return(await new Request(Et.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(ee.isArrayBufferView(t)||ee.isArrayBuffer(t))return t.byteLength;if(ee.isURLSearchParams(t)&&(t=t+""),ee.isString(t))return(await lS(t)).byteLength},fS=async(t,e)=>{const n=ee.toFiniteNumber(t.getContentLength());return n==null?dS(e):n},hS=rs&&(async t=>{let{url:e,method:n,data:r,signal:i,cancelToken:a,timeout:o,onDownloadProgress:l,onUploadProgress:c,responseType:f,headers:h,withCredentials:y="same-origin",fetchOptions:m}=Gp(t);f=f?(f+"").toLowerCase():"text";let O=aS([i,a&&a.toAbortSignal()],o),A;const E=O&&O.unsubscribe&&(()=>{O.unsubscribe()});let b;try{if(c&&cS&&n!=="get"&&n!=="head"&&(b=await fS(h,r))!==0){let x=new Request(e,{method:"POST",body:r,duplex:"half"}),z;if(ee.isFormData(r)&&(z=x.headers.get("content-type"))&&h.setContentType(z),x.body){const[I,re]=jd(b,wa(Bd(c)));r=Ud(x.body,Vd,I,re)}}ee.isString(y)||(y=y?"include":"omit");const k="credentials"in Request.prototype;A=new Request(e,{...m,signal:O,method:n.toUpperCase(),headers:h.normalize().toJSON(),body:r,duplex:"half",credentials:k?y:void 0});let C=await fetch(A);const S=Vu&&(f==="stream"||f==="response");if(Vu&&(l||S&&E)){const x={};["status","statusText","headers"].forEach(ie=>{x[ie]=C[ie]});const z=ee.toFiniteNumber(C.headers.get("content-length")),[I,re]=l&&jd(z,wa(Bd(l),!0))||[];C=new Response(Ud(C.body,Vd,I,()=>{re&&re(),E&&E()}),x)}f=f||"text";let R=await Na[ee.findKey(Na,f)||"text"](C,t);return!S&&E&&E(),await new Promise((x,z)=>{Kp(x,z,{data:R,headers:wt.from(C.headers),status:C.status,statusText:C.statusText,config:t,request:A})})}catch(k){throw E&&E(),k&&k.name==="TypeError"&&/fetch/i.test(k.message)?Object.assign(new $e("Network Error",$e.ERR_NETWORK,t,A),{cause:k.cause||k}):$e.from(k,k&&k.code,t,A)}}),qu={http:R_,xhr:iS,fetch:hS};ee.forEach(qu,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const qd=t=>`- ${t}`,pS=t=>ee.isFunction(t)||t===null||t===!1,Yp={getAdapter:t=>{t=ee.isArray(t)?t:[t];const{length:e}=t;let n,r;const i={};for(let a=0;a<e;a++){n=t[a];let o;if(r=n,!pS(n)&&(r=qu[(o=String(n)).toLowerCase()],r===void 0))throw new $e(`Unknown adapter '${o}'`);if(r)break;i[o||"#"+a]=r}if(!r){const a=Object.entries(i).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let o=e?a.length>1?`since :
59
+ `+a.map(qd).join(`
60
+ `):" "+qd(a[0]):"as no adapter specified";throw new $e("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:qu};function ou(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Rr(null,t)}function Hd(t){return ou(t),t.headers=wt.from(t.headers),t.data=su.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Yp.getAdapter(t.adapter||bi.adapter)(t).then(function(r){return ou(t),r.data=su.call(t,t.transformResponse,r),r.headers=wt.from(r.headers),r},function(r){return Hp(r)||(ou(t),r&&r.response&&(r.response.data=su.call(t,t.transformResponse,r.response),r.response.headers=wt.from(r.response.headers))),Promise.reject(r)})}const Qp="1.7.7",Sl={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Sl[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const Kd={};Sl.transitional=function(e,n,r){function i(a,o){return"[Axios v"+Qp+"] Transitional option '"+a+"'"+o+(r?". "+r:"")}return(a,o,l)=>{if(e===!1)throw new $e(i(o," has been removed"+(n?" in "+n:"")),$e.ERR_DEPRECATED);return n&&!Kd[o]&&(Kd[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(a,o,l):!0}};function mS(t,e,n){if(typeof t!="object")throw new $e("options must be an object",$e.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const a=r[i],o=e[a];if(o){const l=t[a],c=l===void 0||o(l,a,t);if(c!==!0)throw new $e("option "+a+" must be "+c,$e.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new $e("Unknown option "+a,$e.ERR_BAD_OPTION)}}const Hu={assertOptions:mS,validators:Sl},kn=Hu.validators;let Vn=class{constructor(e){this.defaults=e,this.interceptors={request:new Ld,response:new Ld}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const a=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
61
+ `+a):r.stack=a}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=zn(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:a}=n;r!==void 0&&Hu.assertOptions(r,{silentJSONParsing:kn.transitional(kn.boolean),forcedJSONParsing:kn.transitional(kn.boolean),clarifyTimeoutError:kn.transitional(kn.boolean)},!1),i!=null&&(ee.isFunction(i)?n.paramsSerializer={serialize:i}:Hu.assertOptions(i,{encode:kn.function,serialize:kn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=a&&ee.merge(a.common,a[n.method]);a&&ee.forEach(["delete","get","head","post","put","patch","common"],A=>{delete a[A]}),n.headers=wt.concat(o,a);const l=[];let c=!0;this.interceptors.request.forEach(function(E){typeof E.runWhen=="function"&&E.runWhen(n)===!1||(c=c&&E.synchronous,l.unshift(E.fulfilled,E.rejected))});const f=[];this.interceptors.response.forEach(function(E){f.push(E.fulfilled,E.rejected)});let h,y=0,m;if(!c){const A=[Hd.bind(this),void 0];for(A.unshift.apply(A,l),A.push.apply(A,f),m=A.length,h=Promise.resolve(n);y<m;)h=h.then(A[y++],A[y++]);return h}m=l.length;let O=n;for(y=0;y<m;){const A=l[y++],E=l[y++];try{O=A(O)}catch(b){E.call(this,b);break}}try{h=Hd.call(this,O)}catch(A){return Promise.reject(A)}for(y=0,m=f.length;y<m;)h=h.then(f[y++],f[y++]);return h}getUri(e){e=zn(this.defaults,e);const n=zp(e.baseURL,e.url);return Up(n,e.params,e.paramsSerializer)}};ee.forEach(["delete","get","head","options"],function(e){Vn.prototype[e]=function(n,r){return this.request(zn(r||{},{method:e,url:n,data:(r||{}).data}))}});ee.forEach(["post","put","patch"],function(e){function n(r){return function(a,o,l){return this.request(zn(l||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}Vn.prototype[e]=n(),Vn.prototype[e+"Form"]=n(!0)});let gS=class Xp{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(i=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](i);r._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(l=>{r.subscribe(l),a=l}).then(i);return o.cancel=function(){r.unsubscribe(a)},o},e(function(a,o,l){r.reason||(r.reason=new Rr(a,o,l),n(r.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=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Xp(function(i){e=i}),cancel:e}}};function yS(t){return function(n){return t.apply(null,n)}}function vS(t){return ee.isObject(t)&&t.isAxiosError===!0}const Ku={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(Ku).forEach(([t,e])=>{Ku[e]=t});function Zp(t){const e=new Vn(t),n=Tp(Vn.prototype.request,e);return ee.extend(n,Vn.prototype,e,{allOwnKeys:!0}),ee.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return Zp(zn(t,i))},n}const rt=Zp(bi);rt.Axios=Vn;rt.CanceledError=Rr;rt.CancelToken=gS;rt.isCancel=Hp;rt.VERSION=Qp;rt.toFormData=ns;rt.AxiosError=$e;rt.Cancel=rt.CanceledError;rt.all=function(e){return Promise.all(e)};rt.spread=yS;rt.isAxiosError=vS;rt.mergeConfig=zn;rt.AxiosHeaders=wt;rt.formToJSON=t=>qp(ee.isHTMLForm(t)?new FormData(t):t);rt.getAdapter=Yp.getAdapter;rt.HttpStatusCode=Ku;rt.default=rt;const{Axios:gw,AxiosError:yw,CanceledError:vw,isCancel:bw,CancelToken:kw,VERSION:_w,all:Sw,Cancel:Aw,isAxiosError:Ew,spread:ww,toFormData:Nw,AxiosHeaders:Ow,HttpStatusCode:Rw,formToJSON:Tw,getAdapter:Cw,mergeConfig:xw}=rt,bS={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}};class Oa{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,n)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=e||bS,this.options=n,this.debug=n.debug}log(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,r,i){return i&&!this.debug?null:(typeof e[0]=="string"&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new Oa(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new Oa(this.logger,e)}}var Zt=new Oa;class is{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+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,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(o=>{let[l,c]=o;for(let f=0;f<c;f++)l(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(o=>{let[l,c]=o;for(let f=0;f<c;f++)l.apply(l,[e,...r])})}}const Hr=()=>{let t,e;const n=new Promise((r,i)=>{t=r,e=i});return n.resolve=t,n.reject=e,n},zd=t=>t==null?"":""+t,kS=(t,e,n)=>{t.forEach(r=>{e[r]&&(n[r]=e[r])})},_S=/###/g,Gd=t=>t&&t.indexOf("###")>-1?t.replace(_S,"."):t,Wd=t=>!t||typeof t=="string",Xr=(t,e,n)=>{const r=typeof e!="string"?e:e.split(".");let i=0;for(;i<r.length-1;){if(Wd(t))return{};const a=Gd(r[i]);!t[a]&&n&&(t[a]=new n),Object.prototype.hasOwnProperty.call(t,a)?t=t[a]:t={},++i}return Wd(t)?{}:{obj:t,k:Gd(r[i])}},Jd=(t,e,n)=>{const{obj:r,k:i}=Xr(t,e,Object);if(r!==void 0||e.length===1){r[i]=n;return}let a=e[e.length-1],o=e.slice(0,e.length-1),l=Xr(t,o,Object);for(;l.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),l=Xr(t,o,Object),l&&l.obj&&typeof l.obj[`${l.k}.${a}`]!="undefined"&&(l.obj=void 0);l.obj[`${l.k}.${a}`]=n},SS=(t,e,n,r)=>{const{obj:i,k:a}=Xr(t,e,Object);i[a]=i[a]||[],i[a].push(n)},Ra=(t,e)=>{const{obj:n,k:r}=Xr(t,e);if(n)return n[r]},AS=(t,e,n)=>{const r=Ra(t,n);return r!==void 0?r:Ra(e,n)},em=(t,e,n)=>{for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in t?typeof t[r]=="string"||t[r]instanceof String||typeof e[r]=="string"||e[r]instanceof String?n&&(t[r]=e[r]):em(t[r],e[r],n):t[r]=e[r]);return t},lr=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var ES={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const wS=t=>typeof t=="string"?t.replace(/[&<>"'\/]/g,e=>ES[e]):t;class NS{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 r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const OS=[" ",",","?","!",";"],RS=new NS(20),TS=(t,e,n)=>{e=e||"",n=n||"";const r=OS.filter(o=>e.indexOf(o)<0&&n.indexOf(o)<0);if(r.length===0)return!0;const i=RS.getRegExp(`(${r.map(o=>o==="?"?"\\?":o).join("|")})`);let a=!i.test(t);if(!a){const o=t.indexOf(n);o>0&&!i.test(t.substring(0,o))&&(a=!0)}return a},zu=function(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];const r=e.split(n);let i=t;for(let a=0;a<r.length;){if(!i||typeof i!="object")return;let o,l="";for(let c=a;c<r.length;++c)if(c!==a&&(l+=n),l+=r[c],o=i[l],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&c<r.length-1)continue;a+=c-a+1;break}i=o}return i},Ta=t=>t&&t.indexOf("_")>0?t.replace("_","-"):t;class Yd extends is{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,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;e.indexOf(".")>-1?l=e.split("."):(l=[e,n],r&&(Array.isArray(r)?l.push(...r):typeof r=="string"&&a?l.push(...r.split(a)):l.push(r)));const c=Ra(this.data,l);return!c&&!n&&!r&&e.indexOf(".")>-1&&(e=l[0],n=l[1],r=l.slice(2).join(".")),c||!o||typeof r!="string"?c:zu(this.data&&this.data[e]&&this.data[e][n],r,a)}addResource(e,n,r,i){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let l=[e,n];r&&(l=l.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(l=e.split("."),i=n,n=l[1]),this.addNamespaces(n),Jd(this.data,l,i),a.silent||this.emit("added",e,n,r,i)}addResources(e,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in r)(typeof r[a]=="string"||Array.isArray(r[a]))&&this.addResource(e,n,a,r[a],{silent:!0});i.silent||this.emit("added",e,n,r)}addResourceBundle(e,n,r,i,a){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},l=[e,n];e.indexOf(".")>-1&&(l=e.split("."),i=r,r=n,n=l[1]),this.addNamespaces(n);let c=Ra(this.data,l)||{};o.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?em(c,r,a):c={...c,...r},Jd(this.data,l,c),o.silent||this.emit("added",e,n,r)}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(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var tm={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,r,i){return t.forEach(a=>{this.processors[a]&&(e=this.processors[a].process(e,n,r,i))}),e}};const Qd={};class Ca extends is{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),kS(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Zt.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 r=this.resolve(e,n);return r&&r.res!==void 0}extractFromKey(e,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let a=n.ns||this.options.defaultNS||[];const o=r&&e.indexOf(r)>-1,l=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!TS(e,r,i);if(o&&!l){const c=e.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:e,namespaces:a};const f=e.split(r);(r!==i||r===i&&this.options.ns.indexOf(f[0])>-1)&&(a=f.shift()),e=f.join(i)}return typeof a=="string"&&(a=[a]),{key:e,namespaces:a}}translate(e,n,r){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 i=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:o,namespaces:l}=this.extractFromKey(e[e.length-1],n),c=l[l.length-1],f=n.lng||this.language,h=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f&&f.toLowerCase()==="cimode"){if(h){const R=n.nsSeparator||this.options.nsSeparator;return i?{res:`${c}${R}${o}`,usedKey:o,exactUsedKey:o,usedLng:f,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${R}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:f,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:o}const y=this.resolve(e,n);let m=y&&y.res;const O=y&&y.usedKey||o,A=y&&y.exactUsedKey||o,E=Object.prototype.toString.apply(m),b=["[object Number]","[object Function]","[object RegExp]"],k=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,C=!this.i18nFormat||this.i18nFormat.handleAsObject;if(C&&m&&(typeof m!="string"&&typeof m!="boolean"&&typeof m!="number")&&b.indexOf(E)<0&&!(typeof k=="string"&&Array.isArray(m))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const R=this.options.returnedObjectHandler?this.options.returnedObjectHandler(O,m,{...n,ns:l}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(y.res=R,y.usedParams=this.getUsedParamsDetails(n),y):R}if(a){const R=Array.isArray(m),x=R?[]:{},z=R?A:O;for(const I in m)if(Object.prototype.hasOwnProperty.call(m,I)){const re=`${z}${a}${I}`;x[I]=this.translate(re,{...n,joinArrays:!1,ns:l}),x[I]===re&&(x[I]=m[I])}m=x}}else if(C&&typeof k=="string"&&Array.isArray(m))m=m.join(k),m&&(m=this.extendTranslation(m,e,n,r));else{let R=!1,x=!1;const z=n.count!==void 0&&typeof n.count!="string",I=Ca.hasDefaultValue(n),re=z?this.pluralResolver.getSuffix(f,n.count,n):"",ie=n.ordinal&&z?this.pluralResolver.getSuffix(f,n.count,{ordinal:!1}):"",ke=z&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),he=ke&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${re}`]||n[`defaultValue${ie}`]||n.defaultValue;!this.isValidLookup(m)&&I&&(R=!0,m=he),this.isValidLookup(m)||(x=!0,m=o);const le=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&x?void 0:m,j=I&&he!==m&&this.options.updateMissing;if(x||R||j){if(this.logger.log(j?"updateKey":"missingKey",f,c,o,j?he:m),a){const ne=this.resolve(o,{...n,keySeparator:!1});ne&&ne.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 w=[];const J=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&J&&J[0])for(let ne=0;ne<J.length;ne++)w.push(J[ne]);else this.options.saveMissingTo==="all"?w=this.languageUtils.toResolveHierarchy(n.lng||this.language):w.push(n.lng||this.language);const te=(ne,se,me)=>{const G=I&&me!==m?me:le;this.options.missingKeyHandler?this.options.missingKeyHandler(ne,c,se,G,j,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(ne,c,se,G,j,n),this.emit("missingKey",ne,c,se,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&z?w.forEach(ne=>{const se=this.pluralResolver.getSuffixes(ne,n);ke&&n[`defaultValue${this.options.pluralSeparator}zero`]&&se.indexOf(`${this.options.pluralSeparator}zero`)<0&&se.push(`${this.options.pluralSeparator}zero`),se.forEach(me=>{te([ne],o+me,n[`defaultValue${me}`]||he)})}):te(w,o,he))}m=this.extendTranslation(m,e,n,y,r),x&&m===o&&this.options.appendNamespaceToMissingKey&&(m=`${c}:${o}`),(x||R)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${o}`:o,R?m:void 0):m=this.options.parseMissingKeyHandler(m))}return i?(y.res=m,y.usedParams=this.getUsedParamsDetails(n),y):m}extendTranslation(e,n,r,i,a){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const f=typeof e=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let h;if(f){const m=e.match(this.interpolator.nestingRegexp);h=m&&m.length}let y=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(y={...this.options.interpolation.defaultVariables,...y}),e=this.interpolator.interpolate(e,y,r.lng||this.language||i.usedLng,r),f){const m=e.match(this.interpolator.nestingRegexp),O=m&&m.length;h<O&&(r.nest=!1)}!r.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(r.lng=this.language||i.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var m=arguments.length,O=new Array(m),A=0;A<m;A++)O[A]=arguments[A];return a&&a[0]===O[0]&&!r.context?(o.logger.warn(`It seems you are nesting recursively key: ${O[0]} in key: ${n[0]}`),null):o.translate(...O,n)},r)),r.interpolation&&this.interpolator.reset()}const l=r.postProcess||this.options.postProcess,c=typeof l=="string"?[l]:l;return e!=null&&c&&c.length&&r.applyPostProcessor!==!1&&(e=tm.handle(c,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,i,a,o,l;return typeof e=="string"&&(e=[e]),e.forEach(c=>{if(this.isValidLookup(r))return;const f=this.extractFromKey(c,n),h=f.key;i=h;let y=f.namespaces;this.options.fallbackNS&&(y=y.concat(this.options.fallbackNS));const m=n.count!==void 0&&typeof n.count!="string",O=m&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),A=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",E=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);y.forEach(b=>{this.isValidLookup(r)||(l=b,!Qd[`${E[0]}-${b}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(l)&&(Qd[`${E[0]}-${b}`]=!0,this.logger.warn(`key "${i}" for languages "${E.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),E.forEach(k=>{if(this.isValidLookup(r))return;o=k;const C=[h];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(C,h,k,b,n);else{let R;m&&(R=this.pluralResolver.getSuffix(k,n.count,n));const x=`${this.options.pluralSeparator}zero`,z=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(m&&(C.push(h+R),n.ordinal&&R.indexOf(z)===0&&C.push(h+R.replace(z,this.options.pluralSeparator)),O&&C.push(h+x)),A){const I=`${h}${this.options.contextSeparator}${n.context}`;C.push(I),m&&(C.push(I+R),n.ordinal&&R.indexOf(z)===0&&C.push(I+R.replace(z,this.options.pluralSeparator)),O&&C.push(I+x))}}let S;for(;S=C.pop();)this.isValidLookup(r)||(a=S,r=this.getResource(k,b,S,n))}))})}),{res:r,usedKey:i,exactUsedKey:a,usedLng:o,usedNS:l}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,n,r,i):this.resourceStore.getResource(e,n,r,i)}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"],r=e.replace&&typeof e.replace!="string";let i=r?e.replace:e;if(r&&typeof e.count!="undefined"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const a of n)delete i[a]}return i}static hasDefaultValue(e){const n="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&n===r.substring(0,n.length)&&e[r]!==void 0)return!0;return!1}}const uu=t=>t.charAt(0).toUpperCase()+t.slice(1);class Xd{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Zt.create("languageUtils")}getScriptPartFromCode(e){if(e=Ta(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=Ta(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=e.split("-");return this.options.lowerCaseLng?r=r.map(i=>i.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=uu(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=uu(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=uu(r[2].toLowerCase()))),r.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(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&e.forEach(r=>{if(n)return;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(a=>{if(a===i)return a;if(!(a.indexOf("-")<0&&i.indexOf("-")<0)&&(a.indexOf("-")>0&&i.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===i||a.indexOf(i)===0&&i.length>1))return a})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),typeof e=="string"&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let r=e[n];return r||(r=e[this.getScriptPartFromCode(n)]),r||(r=e[this.formatLanguageCode(n)]),r||(r=e[this.getLanguagePartFromCode(n)]),r||(r=e.default),r||[]}toResolveHierarchy(e,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],e),i=[],a=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):typeof e=="string"&&a(this.formatLanguageCode(e)),r.forEach(o=>{i.indexOf(o)<0&&a(this.formatLanguageCode(o))}),i}}let CS=[{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}],xS={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 PS=["v1","v2","v3"],FS=["v4"],Zd={zero:0,one:1,two:2,few:3,many:4,other:5},IS=()=>{const t={};return CS.forEach(e=>{e.lngs.forEach(n=>{t[n]={numbers:e.nr,plurals:xS[e.fc]}})}),t};class DS{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=n,this.logger=Zt.create("pluralResolver"),(!this.options.compatibilityJSON||FS.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=IS(),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 r=Ta(e==="dev"?"en":e),i=n.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:r,type:i});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];const o=new Intl.PluralRules(r,{type:i});return this.pluralRulesCache[a]=o,o}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(e,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,r).map(i=>`${n}${i}`)}getSuffixes(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(e,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((i,a)=>Zd[i]-Zd[a]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):r.numbers.map(i=>this.getSuffix(e,i,n)):[]}getSuffix(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(e,r);return i?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:this.getSuffixRetroCompatible(i,n):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,n){const r=e.noAbs?e.plurals(n):e.plurals(Math.abs(n));let i=e.numbers[r];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const a=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?a():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!PS.includes(this.options.compatibilityJSON)}}const ef=function(t,e,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=AS(t,e,n);return!a&&i&&typeof n=="string"&&(a=zu(t,n,r),a===void 0&&(a=zu(e,n,r))),a},lu=t=>t.replace(/\$/g,"$$$$");class LS{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Zt.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:r,useRawValueToEscape:i,prefix:a,prefixEscaped:o,suffix:l,suffixEscaped:c,formatSeparator:f,unescapeSuffix:h,unescapePrefix:y,nestingPrefix:m,nestingPrefixEscaped:O,nestingSuffix:A,nestingSuffixEscaped:E,nestingOptionsSeparator:b,maxReplaces:k,alwaysFormat:C}=e.interpolation;this.escape=n!==void 0?n:wS,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=a?lr(a):o||"{{",this.suffix=l?lr(l):c||"}}",this.formatSeparator=f||",",this.unescapePrefix=h?"":y||"-",this.unescapeSuffix=this.unescapePrefix?"":h||"",this.nestingPrefix=m?lr(m):O||lr("$t("),this.nestingSuffix=A?lr(A):E||lr(")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=k||1e3,this.alwaysFormat=C!==void 0?C:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"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,r,i){let a,o,l;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},f=O=>{if(O.indexOf(this.formatSeparator)<0){const k=ef(n,c,O,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(k,void 0,r,{...i,...n,interpolationkey:O}):k}const A=O.split(this.formatSeparator),E=A.shift().trim(),b=A.join(this.formatSeparator).trim();return this.format(ef(n,c,E,this.options.keySeparator,this.options.ignoreJSONStructure),b,r,{...i,...n,interpolationkey:E})};this.resetRegExp();const h=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,y=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:O=>lu(O)},{regex:this.regexp,safeValue:O=>this.escapeValue?lu(this.escape(O)):lu(O)}].forEach(O=>{for(l=0;a=O.regex.exec(e);){const A=a[1].trim();if(o=f(A),o===void 0)if(typeof h=="function"){const b=h(e,a,i);o=typeof b=="string"?b:""}else if(i&&Object.prototype.hasOwnProperty.call(i,A))o="";else if(y){o=a[0];continue}else this.logger.warn(`missed to pass in variable ${A} for interpolating ${e}`),o="";else typeof o!="string"&&!this.useRawValueToEscape&&(o=zd(o));const E=O.safeValue(o);if(e=e.replace(a[0],E),y?(O.regex.lastIndex+=o.length,O.regex.lastIndex-=a[0].length):O.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),e}nest(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,a,o;const l=(c,f)=>{const h=this.nestingOptionsSeparator;if(c.indexOf(h)<0)return c;const y=c.split(new RegExp(`${h}[ ]*{`));let m=`{${y[1]}`;c=y[0],m=this.interpolate(m,o);const O=m.match(/'/g),A=m.match(/"/g);(O&&O.length%2===0&&!A||A.length%2!==0)&&(m=m.replace(/'/g,'"'));try{o=JSON.parse(m),f&&(o={...f,...o})}catch(E){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,E),`${c}${h}${m}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,c};for(;i=this.nestingRegexp.exec(e);){let c=[];o={...r},o=o.replace&&typeof o.replace!="string"?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let f=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const h=i[1].split(this.formatSeparator).map(y=>y.trim());i[1]=h.shift(),c=h,f=!0}if(a=n(l.call(this,i[1].trim(),o),o),a&&i[0]===e&&typeof a!="string")return a;typeof a!="string"&&(a=zd(a)),a||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),a=""),f&&(a=c.reduce((h,y)=>this.format(h,y,r.lng,{...r,interpolationkey:i[1].trim()}),a.trim())),e=e.replace(i[0],a),this.regexp.lastIndex=0}return e}}const $S=t=>{let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const r=t.split("(");e=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);e==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):e==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(o=>{if(o){const[l,...c]=o.split(":"),f=c.join(":").trim().replace(/^'+|'+$/g,""),h=l.trim();n[h]||(n[h]=f),f==="false"&&(n[h]=!1),f==="true"&&(n[h]=!0),isNaN(f)||(n[h]=parseInt(f,10))}})}return{formatName:e,formatOptions:n}},cr=t=>{const e={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});const o=r+JSON.stringify(a);let l=e[o];return l||(l=t(Ta(r),i),e[o]=l),l(n)}};class jS{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Zt.create("formatter"),this.options=e,this.formats={number:cr((n,r)=>{const i=new Intl.NumberFormat(n,{...r});return a=>i.format(a)}),currency:cr((n,r)=>{const i=new Intl.NumberFormat(n,{...r,style:"currency"});return a=>i.format(a)}),datetime:cr((n,r)=>{const i=new Intl.DateTimeFormat(n,{...r});return a=>i.format(a)}),relativetime:cr((n,r)=>{const i=new Intl.RelativeTimeFormat(n,{...r});return a=>i.format(a,r.range||"day")}),list:cr((n,r)=>{const i=new Intl.ListFormat(n,{...r});return a=>i.format(a)})},this.init(e)}init(e){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=cr(n)}format(e,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=n.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(l=>l.indexOf(")")>-1)){const l=a.findIndex(c=>c.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,l)].join(this.formatSeparator)}return a.reduce((l,c)=>{const{formatName:f,formatOptions:h}=$S(c);if(this.formats[f]){let y=l;try{const m=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},O=m.locale||m.lng||i.locale||i.lng||r;y=this.formats[f](l,O,{...h,...i,...m})}catch(m){this.logger.warn(m)}return y}else this.logger.warn(`there was no format function for ${f}`);return l},e)}}const BS=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class MS extends is{constructor(e,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=Zt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,i.backend,i)}queueLoad(e,n,r,i){const a={},o={},l={},c={};return e.forEach(f=>{let h=!0;n.forEach(y=>{const m=`${f}|${y}`;!r.reload&&this.store.hasResourceBundle(f,y)?this.state[m]=2:this.state[m]<0||(this.state[m]===1?o[m]===void 0&&(o[m]=!0):(this.state[m]=1,h=!1,o[m]===void 0&&(o[m]=!0),a[m]===void 0&&(a[m]=!0),c[y]===void 0&&(c[y]=!0)))}),h||(l[f]=!0)}),(Object.keys(a).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(a),pending:Object.keys(o),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(c)}}loaded(e,n,r){const i=e.split("|"),a=i[0],o=i[1];n&&this.emit("failedLoading",a,o,n),!n&&r&&this.store.addResourceBundle(a,o,r,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2,n&&r&&(this.state[e]=0);const l={};this.queue.forEach(c=>{SS(c.loaded,[a],o),BS(c,e),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(f=>{l[f]||(l[f]={});const h=c.loaded[f];h.length&&h.forEach(y=>{l[f][y]===void 0&&(l[f][y]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(c=>!c.done)}read(e,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:r,tried:i,wait:a,callback:o});return}this.readingCalls++;const l=(f,h)=>{if(this.readingCalls--,this.waitingReads.length>0){const y=this.waitingReads.shift();this.read(y.lng,y.ns,y.fcName,y.tried,y.wait,y.callback)}if(f&&h&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,r,i+1,a*2,o)},a);return}o(f,h)},c=this.backend[r].bind(this.backend);if(c.length===2){try{const f=c(e,n);f&&typeof f.then=="function"?f.then(h=>l(null,h)).catch(l):l(null,f)}catch(f){l(f)}return}return c(e,n,l)}prepareLoading(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=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."),i&&i();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof n=="string"&&(n=[n]);const a=this.queueLoad(e,n,r,i);if(!a.toLoad.length)return a.pending.length||i(),null;a.toLoad.forEach(o=>{this.loadOne(o)})}load(e,n,r){this.prepareLoading(e,n,{},r)}reload(e,n,r){this.prepareLoading(e,n,{reload:!0},r)}loadOne(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=e.split("|"),i=r[0],a=r[1];this.read(i,a,"read",void 0,void 0,(o,l)=>{o&&this.logger.warn(`${n}loading namespace ${a} for language ${i} failed`,o),!o&&l&&this.logger.log(`${n}loaded namespace ${a} for language ${i}`,l),this.loaded(e,o,l)})}saveMissing(e,n,r,i,a){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" 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(!(r==null||r==="")){if(this.backend&&this.backend.create){const c={...o,isUpdate:a},f=this.backend.create.bind(this.backend);if(f.length<6)try{let h;f.length===5?h=f(e,n,r,i,c):h=f(e,n,r,i),h&&typeof h.then=="function"?h.then(y=>l(null,y)).catch(l):l(null,h)}catch(h){l(h)}else f(e,n,r,i,l,c)}!e||!e[0]||this.store.addResource(e[0],n,r,i)}}}const tf=()=>({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(r=>{e[r]=n[r]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),nf=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),Zi=()=>{},US=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})};class ui extends is{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=nf(e),this.services={},this.logger=Zt,this.modules={external:[]},US(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]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=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 i=tf();this.options={...i,...this.options,...nf(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const a=h=>h?typeof h=="function"?new h:h:null;if(!this.options.isClone){this.modules.logger?Zt.init(a(this.modules.logger),this.options):Zt.init(null,this.options);let h;this.modules.formatter?h=this.modules.formatter:typeof Intl!="undefined"&&(h=jS);const y=new Xd(this.options);this.store=new Yd(this.options.resources,this.options);const m=this.services;m.logger=Zt,m.resourceStore=this.store,m.languageUtils=y,m.pluralResolver=new DS(y,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),h&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(m.formatter=a(h),m.formatter.init(m,this.options),this.options.interpolation.format=m.formatter.format.bind(m.formatter)),m.interpolator=new LS(this.options),m.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},m.backendConnector=new MS(a(this.modules.backend),m.resourceStore,m,this.options),m.backendConnector.on("*",function(O){for(var A=arguments.length,E=new Array(A>1?A-1:0),b=1;b<A;b++)E[b-1]=arguments[b];e.emit(O,...E)}),this.modules.languageDetector&&(m.languageDetector=a(this.modules.languageDetector),m.languageDetector.init&&m.languageDetector.init(m,this.options.detection,this.options)),this.modules.i18nFormat&&(m.i18nFormat=a(this.modules.i18nFormat),m.i18nFormat.init&&m.i18nFormat.init(this)),this.translator=new Ca(this.services,this.options),this.translator.on("*",function(O){for(var A=arguments.length,E=new Array(A>1?A-1:0),b=1;b<A;b++)E[b-1]=arguments[b];e.emit(O,...E)}),this.modules.external.forEach(O=>{O.init&&O.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Zi),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const h=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);h.length>0&&h[0]!=="dev"&&(this.options.lng=h[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(h=>{this[h]=function(){return e.store[h](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(h=>{this[h]=function(){return e.store[h](...arguments),e}});const c=Hr(),f=()=>{const h=(y,m)=>{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),c.resolve(m),r(y,m)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return h(null,this.t.bind(this));this.changeLanguage(this.options.lng,h)};return this.options.resources||!this.options.initImmediate?f():setTimeout(f,0),c}loadResources(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Zi;const i=typeof e=="string"?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const a=[],o=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(f=>{f!=="cimode"&&a.indexOf(f)<0&&a.push(f)})};i?o(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>o(c)),this.options.preload&&this.options.preload.forEach(l=>o(l)),this.services.backendConnector.load(a,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(l)})}else r(null)}reloadResources(e,n,r){const i=Hr();return typeof e=="function"&&(r=e,e=void 0),typeof n=="function"&&(r=n,n=void 0),e||(e=this.languages),n||(n=this.options.ns),r||(r=Zi),this.services.backendConnector.reload(e,n,a=>{i.resolve(),r(a)}),i}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"&&tm.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 r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(e,n){var r=this;this.isLanguageChangingTo=e;const i=Hr();this.emit("languageChanging",e);const a=c=>{this.language=c,this.languages=this.services.languageUtils.toResolveHierarchy(c),this.resolvedLanguage=void 0,this.setResolvedLanguage(c)},o=(c,f)=>{f?(a(f),this.translator.changeLanguage(f),this.isLanguageChangingTo=void 0,this.emit("languageChanged",f),this.logger.log("languageChanged",f)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),n&&n(c,function(){return r.t(...arguments)})},l=c=>{!e&&!c&&this.services.languageDetector&&(c=[]);const f=typeof c=="string"?c:this.services.languageUtils.getBestMatchFromCodes(c);f&&(this.language||a(f),this.translator.language||this.translator.changeLanguage(f),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(f)),this.loadResources(f,h=>{o(h,f)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?l(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(e),i}getFixedT(e,n,r){var i=this;const a=function(o,l){let c;if(typeof l!="object"){for(var f=arguments.length,h=new Array(f>2?f-2:0),y=2;y<f;y++)h[y-2]=arguments[y];c=i.options.overloadTranslationOptionHandler([o,l].concat(h))}else c={...l};c.lng=c.lng||a.lng,c.lngs=c.lngs||a.lngs,c.ns=c.ns||a.ns,c.keyPrefix!==""&&(c.keyPrefix=c.keyPrefix||r||a.keyPrefix);const m=i.options.keySeparator||".";let O;return c.keyPrefix&&Array.isArray(o)?O=o.map(A=>`${c.keyPrefix}${m}${A}`):O=c.keyPrefix?`${c.keyPrefix}${m}${o}`:o,i.t(O,c)};return typeof e=="string"?a.lng=e:a.lngs=e,a.ns=n,a.keyPrefix=r,a}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const o=(l,c)=>{const f=this.services.backendConnector.state[`${l}|${c}`];return f===-1||f===0||f===2};if(n.precheck){const l=n.precheck(this,o);if(l!==void 0)return l}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(r,e)&&(!i||o(a,e)))}loadNamespaces(e,n){const r=Hr();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(e,n){const r=Hr();typeof e=="string"&&(e=[e]);const i=this.options.preload||[],a=e.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return a.length?(this.options.preload=i.concat(a),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(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"],r=this.services&&this.services.languageUtils||new Xd(tf());return n.indexOf(r.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 ui(e,n)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Zi;const r=e.forkResourceStore;r&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},a=new ui(i);return(e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(l=>{a[l]=this[l]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new Yd(this.store.data,i),a.services.resourceStore=a.store),a.translator=new Ca(a.services,i),a.translator.on("*",function(l){for(var c=arguments.length,f=new Array(c>1?c-1:0),h=1;h<c;h++)f[h-1]=arguments[h];a.emit(l,...f)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const gt=ui.createInstance();gt.createInstance=ui.createInstance;gt.createInstance;gt.dir;gt.init;gt.loadResources;gt.reloadResources;gt.use;gt.changeLanguage;gt.getFixedT;const rf=gt.t;gt.exists;gt.setDefaultNamespace;gt.hasLoadedNamespace;gt.loadNamespaces;gt.loadLanguages;const nm=t=>rf(t?`errorCodes.${t}`:"errorCodes.DEFAULT");class VS{constructor(e){Ae(this,"logger");Ae(this,"axiosInstance");this.logger=e.logger,this.axiosInstance=rt.create({baseURL:e.baseUrl,headers:e.accessToken?{Authorization:`Bearer ${e.accessToken}`}:{}})}async get(e){try{return(await this.axiosInstance.get(e)).data}catch(n){throw this.handleError(n)}}async post(e,n){var a;const{data:r={},ignoreError:i=!1}=n;try{return(await this.axiosInstance.post(e,r)).data}catch(o){if(i&&rt.isAxiosError(o))return(a=o.response)==null?void 0:a.data;throw this.handleError(o)}}async put(e,n){var a;const{data:r={},ignoreError:i=!1}=n;try{return(await this.axiosInstance.put(e,r)).data}catch(o){if(i&&rt.isAxiosError(o))return(a=o.response)==null?void 0:a.data;throw this.handleError(o)}}async delete(e){try{return(await this.axiosInstance.delete(e)).data}catch(n){throw this.handleError(n)}}handleError(e){var i;let n=kt.GENERAL_ERROR;if(rt.isAxiosError(e))if(e.response)switch(e.response.status){case 400:n=kt.BAD_REQUEST;break;case 401:n=kt.UNAUTHORIZED;break;case 403:n=kt.FORBIDDEN;break;case 404:n=kt.NOT_FOUND;break;case 409:n=kt.CONFLICT;break;case 410:n=kt.GONE;break;case 415:n=kt.UNSUPPORTED_MEDIA_TYPE;break;case 429:n=kt.TOO_MANY_REQUESTS;break;case 500:n=kt.INTERNAL_SERVER_ERROR;break;case 503:n=kt.SERVICE_UNAVAILABLE;break;default:n=kt.SERVER_ERROR}else e.request?n=kt.NETWORK_ERROR:n=kt.CONFIG_ERROR;const r=nm(n);return this.logger.error("Error Code:",n,"Message:",r),this.logger.error("Result Data:",(i=e.response)==null?void 0:i.data),new Error(r)}}function rm(t){const e=Object.values(t);return Object.assign({},...e)}function im(t){return Object.entries(t).reduce((e,[n,r])=>{const i=rm(r);return{...e,[n]:i}},{})}function am(t,e){const n=im(e);Object.entries(n).forEach(([r,i])=>{t.addResourceBundle(r,"translation",i,!0)})}const{slice:qS,forEach:HS}=[];function KS(t){return HS.call(qS.call(arguments,1),e=>{if(e)for(const n in e)t[n]===void 0&&(t[n]=e[n])}),t}const af=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,zS=(t,e,n)=>{const r=n||{};r.path=r.path||"/";const i=encodeURIComponent(e);let a=`${t}=${i}`;if(r.maxAge>0){const o=r.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");a+=`; Max-Age=${Math.floor(o)}`}if(r.domain){if(!af.test(r.domain))throw new TypeError("option domain is invalid");a+=`; Domain=${r.domain}`}if(r.path){if(!af.test(r.path))throw new TypeError("option path is invalid");a+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(a+="; HttpOnly"),r.secure&&(a+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return a},sf={create(t,e,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=zS(t,encodeURIComponent(e),i)},read(t){const e=`${t}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let i=n[r];for(;i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(e)===0)return i.substring(e.length,i.length)}return null},remove(t){this.create(t,"",-1)}};var GS={name:"cookie",lookup(t){let{lookupCookie:e}=t;if(e&&typeof document!="undefined")return sf.read(e)||void 0},cacheUserLanguage(t,e){let{lookupCookie:n,cookieMinutes:r,cookieDomain:i,cookieOptions:a}=e;n&&typeof document!="undefined"&&sf.create(n,t,r,i,a)}},WS={name:"querystring",lookup(t){var r;let{lookupQuerystring:e}=t,n;if(typeof window!="undefined"){let{search:i}=window.location;!window.location.search&&((r=window.location.hash)==null?void 0:r.indexOf("?"))>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const o=i.substring(1).split("&");for(let l=0;l<o.length;l++){const c=o[l].indexOf("=");c>0&&o[l].substring(0,c)===e&&(n=o[l].substring(c+1))}}return n}};let Kr=null;const of=()=>{if(Kr!==null)return Kr;try{Kr=window!=="undefined"&&window.localStorage!==null;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{Kr=!1}return Kr};var JS={name:"localStorage",lookup(t){let{lookupLocalStorage:e}=t;if(e&&of())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupLocalStorage:n}=e;n&&of()&&window.localStorage.setItem(n,t)}};let zr=null;const uf=()=>{if(zr!==null)return zr;try{zr=window!=="undefined"&&window.sessionStorage!==null;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{zr=!1}return zr};var YS={name:"sessionStorage",lookup(t){let{lookupSessionStorage:e}=t;if(e&&uf())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupSessionStorage:n}=e;n&&uf()&&window.sessionStorage.setItem(n,t)}},QS={name:"navigator",lookup(t){const e=[];if(typeof navigator!="undefined"){const{languages:n,userLanguage:r,language:i}=navigator;if(n)for(let a=0;a<n.length;a++)e.push(n[a]);r&&e.push(r),i&&e.push(i)}return e.length>0?e:void 0}},XS={name:"htmlTag",lookup(t){let{htmlTag:e}=t,n;const r=e||(typeof document!="undefined"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},ZS={name:"path",lookup(t){var i;let{lookupFromPathIndex:e}=t;if(typeof window=="undefined")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(i=n[typeof e=="number"?e:0])==null?void 0:i.replace("/",""):void 0}},eA={name:"subdomain",lookup(t){var i,a;let{lookupFromSubdomainIndex:e}=t;const n=typeof e=="number"?e+1:1,r=typeof window!="undefined"&&((a=(i=window.location)==null?void 0:i.hostname)==null?void 0:a.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};function tA(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t}}class sm{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]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e||{languageUtils:{}},this.options=KS(n,this.options||{},tA()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(GS),this.addDetector(WS),this.addDetector(JS),this.addDetector(YS),this.addDetector(QS),this.addDetector(XS),this.addDetector(ZS),this.addDetector(eA)}addDetector(e){return this.detectors[e.name]=e,this}detect(e){e||(e=this.options.order);let n=[];return e.forEach(r=>{if(this.detectors[r]){let i=this.detectors[r].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(n=n.concat(i))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),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(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(e,this.options)}))}}sm.type="languageDetector";function om(t,e){t.use(e).use(sm).init({resources:{},fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1,format:(n,r,i)=>{if(r){const[a,...o]=r.split(",").map(l=>l.trim());if(a==="number")return new Intl.NumberFormat(i).format(n);if(a==="date")return new Intl.DateTimeFormat(i).format(n);if(a==="currency")return new Intl.NumberFormat(i,{style:"currency",currency:o[0]||"USD",currencyDisplay:"narrowSymbol"}).format(n).replace("$","").trim()}return n}},detection:{order:["navigator","cookie","localStorage","sessionStorage","querystring","htmlTag","path","subdomain"]}})}const nA=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,rA={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},iA=t=>rA[t],aA=t=>t.replace(nA,iA);let lf={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:aA};function sA(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};lf={...lf,...t}}const oA={type:"3rdParty",init(t){sA(t.options.react)}};om(gt,oA);const uA=t=>am(gt,t),cf={startTime:"UNKNOWN",viewerCount:0,status:"UNKNOWN"},lA=()=>{const[t,e]=Ue.useState([]),[n,r]=Ue.useState(cf);return{realTimeStreamInfo:n,productsInCart:t,onTextMetadataCue:o=>{const{action:l,data:c,startTime:f,viewerCount:h,status:y}=JSON.parse(o==null?void 0:o.text);switch(l){case"sendivsdatarealtime":{r({startTime:f,viewerCount:h,status:y});break}case"sendaddtocart":{const{id:m,sessionId:O,productId:A,productImageUrl:E,productName:b}=c;e(k=>[...k,{id:m,sessionId:O,productId:A,productImageUrl:E,productName:b}])}break}},resetRealTimeStreamInfo:()=>{r(cf)},setProductsInCart:e}},Al=JSON,cA=t=>t.toUpperCase(),dA=t=>{const e={};return t.forEach((n,r)=>{e[r]=n}),e},fA=(t,e,n)=>t.document?t:{document:t,variables:e,requestHeaders:n,signal:void 0},hA=(t,e,n)=>t.query?t:{query:t,variables:e,requestHeaders:n,signal:void 0},pA=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0};function la(t,e){if(!!!t)throw new Error(e)}function mA(t){return typeof t=="object"&&t!==null}function gA(t,e){if(!!!t)throw new Error("Unexpected invariant triggered.")}const yA=/\r\n|[\n\r]/g;function Gu(t,e){let n=0,r=1;for(const i of t.body.matchAll(yA)){if(typeof i.index=="number"||gA(!1),i.index>=e)break;n=i.index+i[0].length,r+=1}return{line:r,column:e+1-n}}function vA(t){return um(t.source,Gu(t.source,t.start))}function um(t,e){const n=t.locationOffset.column-1,r="".padStart(n)+t.body,i=e.line-1,a=t.locationOffset.line-1,o=e.line+a,l=e.line===1?n:0,c=e.column+l,f=`${t.name}:${o}:${c}
62
+ `,h=r.split(/\r\n|[\n\r]/g),y=h[i];if(y.length>120){const m=Math.floor(c/80),O=c%80,A=[];for(let E=0;E<y.length;E+=80)A.push(y.slice(E,E+80));return f+df([[`${o} |`,A[0]],...A.slice(1,m+1).map(E=>["|",E]),["|","^".padStart(O)],["|",A[m+1]]])}return f+df([[`${o-1} |`,h[i-1]],[`${o} |`,y],["|","^".padStart(c)],[`${o+1} |`,h[i+1]]])}function df(t){const e=t.filter(([r,i])=>i!==void 0),n=Math.max(...e.map(([r])=>r.length));return e.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(`
63
+ `)}function bA(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 El extends Error{constructor(e,...n){var r,i,a;const{nodes:o,source:l,positions:c,path:f,originalError:h,extensions:y}=bA(n);super(e),this.name="GraphQLError",this.path=f!=null?f:void 0,this.originalError=h!=null?h:void 0,this.nodes=ff(Array.isArray(o)?o:o?[o]:void 0);const m=ff((r=this.nodes)===null||r===void 0?void 0:r.map(A=>A.loc).filter(A=>A!=null));this.source=l!=null?l:m==null||(i=m[0])===null||i===void 0?void 0:i.source,this.positions=c!=null?c:m==null?void 0:m.map(A=>A.start),this.locations=c&&l?c.map(A=>Gu(l,A)):m==null?void 0:m.map(A=>Gu(A.source,A.start));const O=mA(h==null?void 0:h.extensions)?h==null?void 0:h.extensions:void 0;this.extensions=(a=y!=null?y:O)!==null&&a!==void 0?a: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}}),h!=null&&h.stack?Object.defineProperty(this,"stack",{value:h.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,El):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
64
 
36
- `+Em(n.loc));else if(this.source&&this.locations)for(const n of this.locations)e+=`
65
+ `+vA(n.loc));else if(this.source&&this.locations)for(const n of this.locations)e+=`
37
66
 
38
- `+Pl(this.source,n);return e}toJSON(){const e={message:this.message};return this.locations!=null&&(e.locations=this.locations),this.path!=null&&(e.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function ta(t){return t===void 0||t.length===0?void 0:t}function X(t,e,n){return new Jr(`Syntax Error: ${n}`,{source:t,positions:[e]})}class Om{constructor(e,n,i){this.start=e.start,this.end=n.end,this.startToken=e,this.endToken=n,this.source=i}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class Ll{constructor(e,n,i,r,s,a){this.kind=e,this.start=n,this.end=i,this.line=r,this.column=s,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const $l={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},wm=new Set(Object.keys($l));function na(t){const e=t==null?void 0:t.kind;return typeof e=="string"&&wm.has(e)}var yt;(function(t){t.QUERY="query",t.MUTATION="mutation",t.SUBSCRIPTION="subscription"})(yt||(yt={}));var Ar;(function(t){t.QUERY="QUERY",t.MUTATION="MUTATION",t.SUBSCRIPTION="SUBSCRIPTION",t.FIELD="FIELD",t.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",t.FRAGMENT_SPREAD="FRAGMENT_SPREAD",t.INLINE_FRAGMENT="INLINE_FRAGMENT",t.VARIABLE_DEFINITION="VARIABLE_DEFINITION",t.SCHEMA="SCHEMA",t.SCALAR="SCALAR",t.OBJECT="OBJECT",t.FIELD_DEFINITION="FIELD_DEFINITION",t.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",t.INTERFACE="INTERFACE",t.UNION="UNION",t.ENUM="ENUM",t.ENUM_VALUE="ENUM_VALUE",t.INPUT_OBJECT="INPUT_OBJECT",t.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(Ar||(Ar={}));var I;(function(t){t.NAME="Name",t.DOCUMENT="Document",t.OPERATION_DEFINITION="OperationDefinition",t.VARIABLE_DEFINITION="VariableDefinition",t.SELECTION_SET="SelectionSet",t.FIELD="Field",t.ARGUMENT="Argument",t.FRAGMENT_SPREAD="FragmentSpread",t.INLINE_FRAGMENT="InlineFragment",t.FRAGMENT_DEFINITION="FragmentDefinition",t.VARIABLE="Variable",t.INT="IntValue",t.FLOAT="FloatValue",t.STRING="StringValue",t.BOOLEAN="BooleanValue",t.NULL="NullValue",t.ENUM="EnumValue",t.LIST="ListValue",t.OBJECT="ObjectValue",t.OBJECT_FIELD="ObjectField",t.DIRECTIVE="Directive",t.NAMED_TYPE="NamedType",t.LIST_TYPE="ListType",t.NON_NULL_TYPE="NonNullType",t.SCHEMA_DEFINITION="SchemaDefinition",t.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",t.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",t.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",t.FIELD_DEFINITION="FieldDefinition",t.INPUT_VALUE_DEFINITION="InputValueDefinition",t.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",t.UNION_TYPE_DEFINITION="UnionTypeDefinition",t.ENUM_TYPE_DEFINITION="EnumTypeDefinition",t.ENUM_VALUE_DEFINITION="EnumValueDefinition",t.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",t.DIRECTIVE_DEFINITION="DirectiveDefinition",t.SCHEMA_EXTENSION="SchemaExtension",t.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",t.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",t.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",t.UNION_TYPE_EXTENSION="UnionTypeExtension",t.ENUM_TYPE_EXTENSION="EnumTypeExtension",t.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(I||(I={}));function Or(t){return t===9||t===32}function Zt(t){return t>=48&&t<=57}function Ml(t){return t>=97&&t<=122||t>=65&&t<=90}function Ul(t){return Ml(t)||t===95}function Tm(t){return Ml(t)||Zt(t)||t===95}function Cm(t){var e;let n=Number.MAX_SAFE_INTEGER,i=null,r=-1;for(let a=0;a<t.length;++a){var s;const o=t[a],l=xm(o);l!==o.length&&(i=(s=i)!==null&&s!==void 0?s:a,r=a,a!==0&&l<n&&(n=l))}return t.map((a,o)=>o===0?a:a.slice(n)).slice((e=i)!==null&&e!==void 0?e:0,r+1)}function xm(t){let e=0;for(;e<t.length&&Or(t.charCodeAt(e));)++e;return e}function Rm(t,e){const n=t.replace(/"""/g,'\\"""'),i=n.split(/\r\n|[\n\r]/g),r=i.length===1,s=i.length>1&&i.slice(1).every(v=>v.length===0||Or(v.charCodeAt(0))),a=n.endsWith('\\"""'),o=t.endsWith('"')&&!a,l=t.endsWith("\\"),u=o||l,c=!r||t.length>70||u||s||a;let d="";const f=r&&Or(t.charCodeAt(0));return(c&&!f||s)&&(d+=`
39
- `),d+=n,(c||u)&&(d+=`
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
- `,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 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.
67
+ `+um(this.source,n);return e}toJSON(){const e={message:this.message};return this.locations!=null&&(e.locations=this.locations),this.path!=null&&(e.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function ff(t){return t===void 0||t.length===0?void 0:t}function pt(t,e,n){return new El(`Syntax Error: ${n}`,{source:t,positions:[e]})}class kA{constructor(e,n,r){this.start=e.start,this.end=n.end,this.startToken=e,this.endToken=n,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class lm{constructor(e,n,r,i,a,o){this.kind=e,this.start=n,this.end=r,this.line=i,this.column=a,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const cm={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},_A=new Set(Object.keys(cm));function hf(t){const e=t==null?void 0:t.kind;return typeof e=="string"&&_A.has(e)}var gr;(function(t){t.QUERY="query",t.MUTATION="mutation",t.SUBSCRIPTION="subscription"})(gr||(gr={}));var Wu;(function(t){t.QUERY="QUERY",t.MUTATION="MUTATION",t.SUBSCRIPTION="SUBSCRIPTION",t.FIELD="FIELD",t.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",t.FRAGMENT_SPREAD="FRAGMENT_SPREAD",t.INLINE_FRAGMENT="INLINE_FRAGMENT",t.VARIABLE_DEFINITION="VARIABLE_DEFINITION",t.SCHEMA="SCHEMA",t.SCALAR="SCALAR",t.OBJECT="OBJECT",t.FIELD_DEFINITION="FIELD_DEFINITION",t.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",t.INTERFACE="INTERFACE",t.UNION="UNION",t.ENUM="ENUM",t.ENUM_VALUE="ENUM_VALUE",t.INPUT_OBJECT="INPUT_OBJECT",t.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(Wu||(Wu={}));var Fe;(function(t){t.NAME="Name",t.DOCUMENT="Document",t.OPERATION_DEFINITION="OperationDefinition",t.VARIABLE_DEFINITION="VariableDefinition",t.SELECTION_SET="SelectionSet",t.FIELD="Field",t.ARGUMENT="Argument",t.FRAGMENT_SPREAD="FragmentSpread",t.INLINE_FRAGMENT="InlineFragment",t.FRAGMENT_DEFINITION="FragmentDefinition",t.VARIABLE="Variable",t.INT="IntValue",t.FLOAT="FloatValue",t.STRING="StringValue",t.BOOLEAN="BooleanValue",t.NULL="NullValue",t.ENUM="EnumValue",t.LIST="ListValue",t.OBJECT="ObjectValue",t.OBJECT_FIELD="ObjectField",t.DIRECTIVE="Directive",t.NAMED_TYPE="NamedType",t.LIST_TYPE="ListType",t.NON_NULL_TYPE="NonNullType",t.SCHEMA_DEFINITION="SchemaDefinition",t.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",t.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",t.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",t.FIELD_DEFINITION="FieldDefinition",t.INPUT_VALUE_DEFINITION="InputValueDefinition",t.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",t.UNION_TYPE_DEFINITION="UnionTypeDefinition",t.ENUM_TYPE_DEFINITION="EnumTypeDefinition",t.ENUM_VALUE_DEFINITION="EnumValueDefinition",t.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",t.DIRECTIVE_DEFINITION="DirectiveDefinition",t.SCHEMA_EXTENSION="SchemaExtension",t.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",t.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",t.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",t.UNION_TYPE_EXTENSION="UnionTypeExtension",t.ENUM_TYPE_EXTENSION="EnumTypeExtension",t.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(Fe||(Fe={}));function Ju(t){return t===9||t===32}function li(t){return t>=48&&t<=57}function dm(t){return t>=97&&t<=122||t>=65&&t<=90}function fm(t){return dm(t)||t===95}function SA(t){return dm(t)||li(t)||t===95}function AA(t){var e;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let o=0;o<t.length;++o){var a;const l=t[o],c=EA(l);c!==l.length&&(r=(a=r)!==null&&a!==void 0?a:o,i=o,o!==0&&c<n&&(n=c))}return t.map((o,l)=>l===0?o:o.slice(n)).slice((e=r)!==null&&e!==void 0?e:0,i+1)}function EA(t){let e=0;for(;e<t.length&&Ju(t.charCodeAt(e));)++e;return e}function wA(t,e){const n=t.replace(/"""/g,'\\"""'),r=n.split(/\r\n|[\n\r]/g),i=r.length===1,a=r.length>1&&r.slice(1).every(O=>O.length===0||Ju(O.charCodeAt(0))),o=n.endsWith('\\"""'),l=t.endsWith('"')&&!o,c=t.endsWith("\\"),f=l||c,h=!i||t.length>70||f||a||o;let y="";const m=i&&Ju(t.charCodeAt(0));return(h&&!m||a)&&(y+=`
68
+ `),y+=n,(h||f)&&(y+=`
69
+ `),'"""'+y+'"""'}var ue;(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"})(ue||(ue={}));class NA{constructor(e){const n=new lm(ue.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!==ue.EOF)do if(e.next)e=e.next;else{const n=RA(this,e.end);e.next=n,n.prev=e,e=n}while(e.kind===ue.COMMENT);return e}}function OA(t){return t===ue.BANG||t===ue.DOLLAR||t===ue.AMP||t===ue.PAREN_L||t===ue.PAREN_R||t===ue.SPREAD||t===ue.COLON||t===ue.EQUALS||t===ue.AT||t===ue.BRACKET_L||t===ue.BRACKET_R||t===ue.BRACE_L||t===ue.PIPE||t===ue.BRACE_R}function Tr(t){return t>=0&&t<=55295||t>=57344&&t<=1114111}function as(t,e){return hm(t.charCodeAt(e))&&pm(t.charCodeAt(e+1))}function hm(t){return t>=55296&&t<=56319}function pm(t){return t>=56320&&t<=57343}function Gn(t,e){const n=t.source.body.codePointAt(e);if(n===void 0)return ue.EOF;if(n>=32&&n<=126){const r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function ut(t,e,n,r,i){const a=t.line,o=1+n-t.lineStart;return new lm(e,n,r,a,o,i)}function RA(t,e){const n=t.source.body,r=n.length;let i=e;for(;i<r;){const a=n.charCodeAt(i);switch(a){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++t.line,t.lineStart=i;continue;case 13:n.charCodeAt(i+1)===10?i+=2:++i,++t.line,t.lineStart=i;continue;case 35:return TA(t,i);case 33:return ut(t,ue.BANG,i,i+1);case 36:return ut(t,ue.DOLLAR,i,i+1);case 38:return ut(t,ue.AMP,i,i+1);case 40:return ut(t,ue.PAREN_L,i,i+1);case 41:return ut(t,ue.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return ut(t,ue.SPREAD,i,i+3);break;case 58:return ut(t,ue.COLON,i,i+1);case 61:return ut(t,ue.EQUALS,i,i+1);case 64:return ut(t,ue.AT,i,i+1);case 91:return ut(t,ue.BRACKET_L,i,i+1);case 93:return ut(t,ue.BRACKET_R,i,i+1);case 123:return ut(t,ue.BRACE_L,i,i+1);case 124:return ut(t,ue.PIPE,i,i+1);case 125:return ut(t,ue.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?DA(t,i):xA(t,i)}if(li(a)||a===45)return CA(t,i,a);if(fm(a))return LA(t,i);throw pt(t.source,i,a===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:Tr(a)||as(n,i)?`Unexpected character: ${Gn(t,i)}.`:`Invalid character: ${Gn(t,i)}.`)}return ut(t,ue.EOF,r,r)}function TA(t,e){const n=t.source.body,r=n.length;let i=e+1;for(;i<r;){const a=n.charCodeAt(i);if(a===10||a===13)break;if(Tr(a))++i;else if(as(n,i))i+=2;else break}return ut(t,ue.COMMENT,e,i,n.slice(e+1,i))}function CA(t,e,n){const r=t.source.body;let i=e,a=n,o=!1;if(a===45&&(a=r.charCodeAt(++i)),a===48){if(a=r.charCodeAt(++i),li(a))throw pt(t.source,i,`Invalid number, unexpected digit after 0: ${Gn(t,i)}.`)}else i=cu(t,i,a),a=r.charCodeAt(i);if(a===46&&(o=!0,a=r.charCodeAt(++i),i=cu(t,i,a),a=r.charCodeAt(i)),(a===69||a===101)&&(o=!0,a=r.charCodeAt(++i),(a===43||a===45)&&(a=r.charCodeAt(++i)),i=cu(t,i,a),a=r.charCodeAt(i)),a===46||fm(a))throw pt(t.source,i,`Invalid number, expected digit but got: ${Gn(t,i)}.`);return ut(t,o?ue.FLOAT:ue.INT,e,i,r.slice(e,i))}function cu(t,e,n){if(!li(n))throw pt(t.source,e,`Invalid number, expected digit but got: ${Gn(t,e)}.`);const r=t.source.body;let i=e+1;for(;li(r.charCodeAt(i));)++i;return i}function xA(t,e){const n=t.source.body,r=n.length;let i=e+1,a=i,o="";for(;i<r;){const l=n.charCodeAt(i);if(l===34)return o+=n.slice(a,i),ut(t,ue.STRING,e,i+1,o);if(l===92){o+=n.slice(a,i);const c=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?PA(t,i):FA(t,i):IA(t,i);o+=c.value,i+=c.size,a=i;continue}if(l===10||l===13)break;if(Tr(l))++i;else if(as(n,i))i+=2;else throw pt(t.source,i,`Invalid character within String: ${Gn(t,i)}.`)}throw pt(t.source,i,"Unterminated string.")}function PA(t,e){const n=t.source.body;let r=0,i=3;for(;i<12;){const a=n.charCodeAt(e+i++);if(a===125){if(i<5||!Tr(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|Wr(a),r<0)break}throw pt(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+i)}".`)}function FA(t,e){const n=t.source.body,r=pf(n,e+2);if(Tr(r))return{value:String.fromCodePoint(r),size:6};if(hm(r)&&n.charCodeAt(e+6)===92&&n.charCodeAt(e+7)===117){const i=pf(n,e+8);if(pm(i))return{value:String.fromCodePoint(r,i),size:12}}throw pt(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+6)}".`)}function pf(t,e){return Wr(t.charCodeAt(e))<<12|Wr(t.charCodeAt(e+1))<<8|Wr(t.charCodeAt(e+2))<<4|Wr(t.charCodeAt(e+3))}function Wr(t){return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:-1}function IA(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:`
70
+ `,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw pt(t.source,e,`Invalid character escape sequence: "${n.slice(e,e+2)}".`)}function DA(t,e){const n=t.source.body,r=n.length;let i=t.lineStart,a=e+3,o=a,l="";const c=[];for(;a<r;){const f=n.charCodeAt(a);if(f===34&&n.charCodeAt(a+1)===34&&n.charCodeAt(a+2)===34){l+=n.slice(o,a),c.push(l);const h=ut(t,ue.BLOCK_STRING,e,a+3,AA(c).join(`
71
+ `));return t.line+=c.length-1,t.lineStart=i,h}if(f===92&&n.charCodeAt(a+1)===34&&n.charCodeAt(a+2)===34&&n.charCodeAt(a+3)===34){l+=n.slice(o,a),o=a+1,a+=4;continue}if(f===10||f===13){l+=n.slice(o,a),c.push(l),f===13&&n.charCodeAt(a+1)===10?a+=2:++a,l="",o=a,i=a;continue}if(Tr(f))++a;else if(as(n,a))a+=2;else throw pt(t.source,a,`Invalid character within String: ${Gn(t,a)}.`)}throw pt(t.source,a,"Unterminated string.")}function LA(t,e){const n=t.source.body,r=n.length;let i=e+1;for(;i<r;){const a=n.charCodeAt(i);if(SA(a))++i;else break}return ut(t,ue.NAME,e,i,n.slice(e,i))}const $A=10,mm=2;function wl(t){return ss(t,[])}function ss(t,e){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return jA(t,e);default:return String(t)}}function jA(t,e){if(t===null)return"null";if(e.includes(t))return"[Circular]";const n=[...e,t];if(BA(t)){const r=t.toJSON();if(r!==t)return typeof r=="string"?r:ss(r,n)}else if(Array.isArray(t))return UA(t,n);return MA(t,n)}function BA(t){return typeof t.toJSON=="function"}function MA(t,e){const n=Object.entries(t);return n.length===0?"{}":e.length>mm?"["+VA(t)+"]":"{ "+n.map(([i,a])=>i+": "+ss(a,e)).join(", ")+" }"}function UA(t,e){if(t.length===0)return"[]";if(e.length>mm)return"[Array]";const n=Math.min($A,t.length),r=t.length-n,i=[];for(let a=0;a<n;++a)i.push(ss(t[a],e));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function VA(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 qA=globalThis.process&&!0,HA=qA?function(e,n){return e instanceof n}:function(e,n){if(e instanceof n)return!0;if(typeof e=="object"&&e!==null){var r;const i=n.prototype[Symbol.toStringTag],a=Symbol.toStringTag in e?e[Symbol.toStringTag]:(r=e.constructor)===null||r===void 0?void 0:r.name;if(i===a){const o=wl(e);throw new Error(`Cannot use ${i} "${o}" from another module or realm.
43
72
 
44
73
  Ensure that there is only one instance of "graphql" in the node_modules
45
74
  directory. If different versions of "graphql" are the dependencies of other
@@ -50,70 +79,70 @@ https://yarnpkg.com/en/docs/selective-version-resolutions
50
79
  Duplicate "graphql" modules cannot be used at the same time since different
51
80
  versions may have different capabilities and behavior. The data from one
52
81
  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 ${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,`
82
+ spurious results.`)}}return!1};class gm{constructor(e,n="GraphQL request",r={line:1,column:1}){typeof e=="string"||la(!1,`Body must be a string. Received: ${wl(e)}.`),this.body=e,this.name=n,this.locationOffset=r,this.locationOffset.line>0||la(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||la(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function KA(t){return HA(t,gm)}function zA(t,e){return new GA(t,e).parseDocument()}class GA{constructor(e,n={}){const r=KA(e)?e:new gm(e);this._lexer=new NA(r),this._options=n,this._tokenCounter=0}parseName(){const e=this.expectToken(ue.NAME);return this.node(e,{kind:Fe.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:Fe.DOCUMENT,definitions:this.many(ue.SOF,this.parseDefinition,ue.EOF)})}parseDefinition(){if(this.peek(ue.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),n=e?this._lexer.lookahead():this._lexer.token;if(n.kind===ue.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 pt(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(ue.BRACE_L))return this.node(e,{kind:Fe.OPERATION_DEFINITION,operation:gr.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const n=this.parseOperationType();let r;return this.peek(ue.NAME)&&(r=this.parseName()),this.node(e,{kind:Fe.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(ue.NAME);switch(e.value){case"query":return gr.QUERY;case"mutation":return gr.MUTATION;case"subscription":return gr.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(ue.PAREN_L,this.parseVariableDefinition,ue.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:Fe.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(ue.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(ue.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(ue.DOLLAR),this.node(e,{kind:Fe.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:Fe.SELECTION_SET,selections:this.many(ue.BRACE_L,this.parseSelection,ue.BRACE_R)})}parseSelection(){return this.peek(ue.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,n=this.parseName();let r,i;return this.expectOptionalToken(ue.COLON)?(r=n,i=this.parseName()):i=n,this.node(e,{kind:Fe.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(ue.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const n=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(ue.PAREN_L,n,ue.PAREN_R)}parseArgument(e=!1){const n=this._lexer.token,r=this.parseName();return this.expectToken(ue.COLON),this.node(n,{kind:Fe.ARGUMENT,name:r,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(ue.SPREAD);const n=this.expectOptionalKeyword("on");return!n&&this.peek(ue.NAME)?this.node(e,{kind:Fe.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:Fe.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:Fe.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:Fe.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 ue.BRACKET_L:return this.parseList(e);case ue.BRACE_L:return this.parseObject(e);case ue.INT:return this.advanceLexer(),this.node(n,{kind:Fe.INT,value:n.value});case ue.FLOAT:return this.advanceLexer(),this.node(n,{kind:Fe.FLOAT,value:n.value});case ue.STRING:case ue.BLOCK_STRING:return this.parseStringLiteral();case ue.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:Fe.BOOLEAN,value:!0});case"false":return this.node(n,{kind:Fe.BOOLEAN,value:!1});case"null":return this.node(n,{kind:Fe.NULL});default:return this.node(n,{kind:Fe.ENUM,value:n.value})}case ue.DOLLAR:if(e)if(this.expectToken(ue.DOLLAR),this._lexer.token.kind===ue.NAME){const r=this._lexer.token.value;throw pt(this._lexer.source,n.start,`Unexpected variable "$${r}" 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:Fe.STRING,value:e.value,block:e.kind===ue.BLOCK_STRING})}parseList(e){const n=()=>this.parseValueLiteral(e);return this.node(this._lexer.token,{kind:Fe.LIST,values:this.any(ue.BRACKET_L,n,ue.BRACKET_R)})}parseObject(e){const n=()=>this.parseObjectField(e);return this.node(this._lexer.token,{kind:Fe.OBJECT,fields:this.any(ue.BRACE_L,n,ue.BRACE_R)})}parseObjectField(e){const n=this._lexer.token,r=this.parseName();return this.expectToken(ue.COLON),this.node(n,{kind:Fe.OBJECT_FIELD,name:r,value:this.parseValueLiteral(e)})}parseDirectives(e){const n=[];for(;this.peek(ue.AT);)n.push(this.parseDirective(e));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const n=this._lexer.token;return this.expectToken(ue.AT),this.node(n,{kind:Fe.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let n;if(this.expectOptionalToken(ue.BRACKET_L)){const r=this.parseTypeReference();this.expectToken(ue.BRACKET_R),n=this.node(e,{kind:Fe.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(ue.BANG)?this.node(e,{kind:Fe.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:Fe.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(ue.STRING)||this.peek(ue.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");const r=this.parseConstDirectives(),i=this.many(ue.BRACE_L,this.parseOperationTypeDefinition,ue.BRACE_R);return this.node(e,{kind:Fe.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){const e=this._lexer.token,n=this.parseOperationType();this.expectToken(ue.COLON);const r=this.parseNamedType();return this.node(e,{kind:Fe.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");const r=this.parseName(),i=this.parseConstDirectives();return this.node(e,{kind:Fe.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i})}parseObjectTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");const r=this.parseName(),i=this.parseImplementsInterfaces(),a=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:Fe.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:a,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(ue.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(ue.BRACE_L,this.parseFieldDefinition,ue.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(ue.COLON);const a=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(e,{kind:Fe.FIELD_DEFINITION,description:n,name:r,arguments:i,type:a,directives:o})}parseArgumentDefs(){return this.optionalMany(ue.PAREN_L,this.parseInputValueDef,ue.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(ue.COLON);const i=this.parseTypeReference();let a;this.expectOptionalToken(ue.EQUALS)&&(a=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(e,{kind:Fe.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:a,directives:o})}parseInterfaceTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");const r=this.parseName(),i=this.parseImplementsInterfaces(),a=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:Fe.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:a,fields:o})}parseUnionTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");const r=this.parseName(),i=this.parseConstDirectives(),a=this.parseUnionMemberTypes();return this.node(e,{kind:Fe.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:a})}parseUnionMemberTypes(){return this.expectOptionalToken(ue.EQUALS)?this.delimitedMany(ue.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");const r=this.parseName(),i=this.parseConstDirectives(),a=this.parseEnumValuesDefinition();return this.node(e,{kind:Fe.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:a})}parseEnumValuesDefinition(){return this.optionalMany(ue.BRACE_L,this.parseEnumValueDefinition,ue.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(e,{kind:Fe.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw pt(this._lexer.source,this._lexer.token.start,`${ea(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 r=this.parseName(),i=this.parseConstDirectives(),a=this.parseInputFieldsDefinition();return this.node(e,{kind:Fe.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:a})}parseInputFieldsDefinition(){return this.optionalMany(ue.BRACE_L,this.parseInputValueDef,ue.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===ue.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(),r=this.optionalMany(ue.BRACE_L,this.parseOperationTypeDefinition,ue.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:Fe.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(e,{kind:Fe.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),a=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&a.length===0)throw this.unexpected();return this.node(e,{kind:Fe.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:a})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),a=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&a.length===0)throw this.unexpected();return this.node(e,{kind:Fe.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:a})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:Fe.UNION_TYPE_EXTENSION,name:n,directives:r,types:i})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:Fe.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:Fe.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(ue.AT);const r=this.parseName(),i=this.parseArgumentDefs(),a=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(e,{kind:Fe.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:a,locations:o})}parseDirectiveLocations(){return this.delimitedMany(ue.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(Wu,n.value))return n;throw this.unexpected(e)}node(e,n){return this._options.noLocation!==!0&&(n.loc=new kA(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 pt(this._lexer.source,n.start,`Expected ${ym(e)}, found ${ea(n)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e?(this.advanceLexer(),!0):!1}expectKeyword(e){const n=this._lexer.token;if(n.kind===ue.NAME&&n.value===e)this.advanceLexer();else throw pt(this._lexer.source,n.start,`Expected "${e}", found ${ea(n)}.`)}expectOptionalKeyword(e){const n=this._lexer.token;return n.kind===ue.NAME&&n.value===e?(this.advanceLexer(),!0):!1}unexpected(e){const n=e!=null?e:this._lexer.token;return pt(this._lexer.source,n.start,`Unexpected ${ea(n)}.`)}any(e,n,r){this.expectToken(e);const i=[];for(;!this.expectOptionalToken(r);)i.push(n.call(this));return i}optionalMany(e,n,r){if(this.expectOptionalToken(e)){const i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}return[]}many(e,n,r){this.expectToken(e);const i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}delimitedMany(e,n){this.expectOptionalToken(e);const r=[];do r.push(n.call(this));while(this.expectOptionalToken(e));return r}advanceLexer(){const{maxTokens:e}=this._options,n=this._lexer.advance();if(e!==void 0&&n.kind!==ue.EOF&&(++this._tokenCounter,this._tokenCounter>e))throw pt(this._lexer.source,n.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}function ea(t){const e=t.value;return ym(t.kind)+(e!=null?` "${e}"`:"")}function ym(t){return OA(t)?`"${t}"`:t}function WA(t){return`"${t.replace(JA,YA)}"`}const JA=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function YA(t){return QA[t.charCodeAt(0)]}const QA=["\\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"],XA=Object.freeze({});function ZA(t,e,n=cm){const r=new Map;for(const k of Object.values(Fe))r.set(k,eE(e,k));let i,a=Array.isArray(t),o=[t],l=-1,c=[],f=t,h,y;const m=[],O=[];do{l++;const k=l===o.length,C=k&&c.length!==0;if(k){if(h=O.length===0?void 0:m[m.length-1],f=y,y=O.pop(),C)if(a){f=f.slice();let R=0;for(const[x,z]of c){const I=x-R;z===null?(f.splice(I,1),R++):f[I]=z}}else{f=Object.defineProperties({},Object.getOwnPropertyDescriptors(f));for(const[R,x]of c)f[R]=x}l=i.index,o=i.keys,c=i.edits,a=i.inArray,i=i.prev}else if(y){if(h=a?l:o[l],f=y[h],f==null)continue;m.push(h)}let S;if(!Array.isArray(f)){var A,E;hf(f)||la(!1,`Invalid AST Node: ${wl(f)}.`);const R=k?(A=r.get(f.kind))===null||A===void 0?void 0:A.leave:(E=r.get(f.kind))===null||E===void 0?void 0:E.enter;if(S=R==null?void 0:R.call(e,f,h,y,m,O),S===XA)break;if(S===!1){if(!k){m.pop();continue}}else if(S!==void 0&&(c.push([h,S]),!k))if(hf(S))f=S;else{m.pop();continue}}if(S===void 0&&C&&c.push([h,f]),k)m.pop();else{var b;i={inArray:a,index:l,keys:o,edits:c,prev:i},a=Array.isArray(f),o=a?f:(b=n[f.kind])!==null&&b!==void 0?b:[],l=-1,c=[],y&&O.push(y),y=f}}while(i!==void 0);return c.length!==0?c[c.length-1][1]:t}function eE(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 tE(t){return ZA(t,rE)}const nE=80,rE={Name:{leave:t=>t.value},Variable:{leave:t=>"$"+t.name},Document:{leave:t=>Re(t.definitions,`
54
83
 
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
- `,An(T(n,`
84
+ `)},OperationDefinition:{leave(t){const e=Ve("(",Re(t.variableDefinitions,", "),")"),n=Re([t.operation,Re([t.name,e]),Re(t.directives," ")]," ");return(n==="query"?"":n+" ")+t.selectionSet}},VariableDefinition:{leave:({variable:t,type:e,defaultValue:n,directives:r})=>t+": "+e+Ve(" = ",n)+Ve(" ",Re(r," "))},SelectionSet:{leave:({selections:t})=>Vt(t)},Field:{leave({alias:t,name:e,arguments:n,directives:r,selectionSet:i}){const a=Ve("",t,": ")+e;let o=a+Ve("(",Re(n,", "),")");return o.length>nE&&(o=a+Ve(`(
85
+ `,ca(Re(n,`
57
86
  `)),`
58
- )`)),T([a,T(i," "),r]," ")}},Argument:{leave:({name:t,value:e})=>t+": "+e},FragmentSpread:{leave:({name:t,directives:e})=>"..."+t+U(" ",T(e," "))},InlineFragment:{leave:({typeCondition:t,directives:e,selectionSet:n})=>T(["...",U("on ",t),T(e," "),n]," ")},FragmentDefinition:{leave:({name:t,typeCondition:e,variableDefinitions:n,directives:i,selectionSet:r})=>`fragment ${t}${U("(",T(n,", "),")")} on ${e} ${U("",T(i," ")," ")}`+r},IntValue:{leave:({value:t})=>t},FloatValue:{leave:({value:t})=>t},StringValue:{leave:({value:t,block:e})=>e?Rm(t):eg(t)},BooleanValue:{leave:({value:t})=>t?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:t})=>t},ListValue:{leave:({values:t})=>"["+T(t,", ")+"]"},ObjectValue:{leave:({fields:t})=>"{"+T(t,", ")+"}"},ObjectField:{leave:({name:t,value:e})=>t+": "+e},Directive:{leave:({name:t,arguments:e})=>"@"+t+U("(",T(e,", "),")")},NamedType:{leave:({name:t})=>t},ListType:{leave:({type:t})=>"["+t+"]"},NonNullType:{leave:({type:t})=>t+"!"},SchemaDefinition:{leave:({description:t,directives:e,operationTypes:n})=>U("",t,`
59
- `)+T(["schema",T(e," "),me(n)]," ")},OperationTypeDefinition:{leave:({operation:t,type:e})=>t+": "+e},ScalarTypeDefinition:{leave:({description:t,name:e,directives:n})=>U("",t,`
60
- `)+T(["scalar",e,T(n," ")]," ")},ObjectTypeDefinition:{leave:({description:t,name:e,interfaces:n,directives:i,fields:r})=>U("",t,`
61
- `)+T(["type",e,U("implements ",T(n," & ")),T(i," "),me(r)]," ")},FieldDefinition:{leave:({description:t,name:e,arguments:n,type:i,directives:r})=>U("",t,`
62
- `)+e+(ra(n)?U(`(
63
- `,An(T(n,`
87
+ )`)),Re([o,Re(r," "),i]," ")}},Argument:{leave:({name:t,value:e})=>t+": "+e},FragmentSpread:{leave:({name:t,directives:e})=>"..."+t+Ve(" ",Re(e," "))},InlineFragment:{leave:({typeCondition:t,directives:e,selectionSet:n})=>Re(["...",Ve("on ",t),Re(e," "),n]," ")},FragmentDefinition:{leave:({name:t,typeCondition:e,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${t}${Ve("(",Re(n,", "),")")} on ${e} ${Ve("",Re(r," ")," ")}`+i},IntValue:{leave:({value:t})=>t},FloatValue:{leave:({value:t})=>t},StringValue:{leave:({value:t,block:e})=>e?wA(t):WA(t)},BooleanValue:{leave:({value:t})=>t?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:t})=>t},ListValue:{leave:({values:t})=>"["+Re(t,", ")+"]"},ObjectValue:{leave:({fields:t})=>"{"+Re(t,", ")+"}"},ObjectField:{leave:({name:t,value:e})=>t+": "+e},Directive:{leave:({name:t,arguments:e})=>"@"+t+Ve("(",Re(e,", "),")")},NamedType:{leave:({name:t})=>t},ListType:{leave:({type:t})=>"["+t+"]"},NonNullType:{leave:({type:t})=>t+"!"},SchemaDefinition:{leave:({description:t,directives:e,operationTypes:n})=>Ve("",t,`
88
+ `)+Re(["schema",Re(e," "),Vt(n)]," ")},OperationTypeDefinition:{leave:({operation:t,type:e})=>t+": "+e},ScalarTypeDefinition:{leave:({description:t,name:e,directives:n})=>Ve("",t,`
89
+ `)+Re(["scalar",e,Re(n," ")]," ")},ObjectTypeDefinition:{leave:({description:t,name:e,interfaces:n,directives:r,fields:i})=>Ve("",t,`
90
+ `)+Re(["type",e,Ve("implements ",Re(n," & ")),Re(r," "),Vt(i)]," ")},FieldDefinition:{leave:({description:t,name:e,arguments:n,type:r,directives:i})=>Ve("",t,`
91
+ `)+e+(mf(n)?Ve(`(
92
+ `,ca(Re(n,`
64
93
  `)),`
65
- )`):U("(",T(n,", "),")"))+": "+i+U(" ",T(r," "))},InputValueDefinition:{leave:({description:t,name:e,type:n,defaultValue:i,directives:r})=>U("",t,`
66
- `)+T([e+": "+n,U("= ",i),T(r," ")]," ")},InterfaceTypeDefinition:{leave:({description:t,name:e,interfaces:n,directives:i,fields:r})=>U("",t,`
67
- `)+T(["interface",e,U("implements ",T(n," & ")),T(i," "),me(r)]," ")},UnionTypeDefinition:{leave:({description:t,name:e,directives:n,types:i})=>U("",t,`
68
- `)+T(["union",e,T(n," "),U("= ",T(i," | "))]," ")},EnumTypeDefinition:{leave:({description:t,name:e,directives:n,values:i})=>U("",t,`
69
- `)+T(["enum",e,T(n," "),me(i)]," ")},EnumValueDefinition:{leave:({description:t,name:e,directives:n})=>U("",t,`
70
- `)+T([e,T(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:t,name:e,directives:n,fields:i})=>U("",t,`
71
- `)+T(["input",e,T(n," "),me(i)]," ")},DirectiveDefinition:{leave:({description:t,name:e,arguments:n,repeatable:i,locations:r})=>U("",t,`
72
- `)+"directive @"+e+(ra(n)?U(`(
73
- `,An(T(n,`
94
+ )`):Ve("(",Re(n,", "),")"))+": "+r+Ve(" ",Re(i," "))},InputValueDefinition:{leave:({description:t,name:e,type:n,defaultValue:r,directives:i})=>Ve("",t,`
95
+ `)+Re([e+": "+n,Ve("= ",r),Re(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:t,name:e,interfaces:n,directives:r,fields:i})=>Ve("",t,`
96
+ `)+Re(["interface",e,Ve("implements ",Re(n," & ")),Re(r," "),Vt(i)]," ")},UnionTypeDefinition:{leave:({description:t,name:e,directives:n,types:r})=>Ve("",t,`
97
+ `)+Re(["union",e,Re(n," "),Ve("= ",Re(r," | "))]," ")},EnumTypeDefinition:{leave:({description:t,name:e,directives:n,values:r})=>Ve("",t,`
98
+ `)+Re(["enum",e,Re(n," "),Vt(r)]," ")},EnumValueDefinition:{leave:({description:t,name:e,directives:n})=>Ve("",t,`
99
+ `)+Re([e,Re(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:t,name:e,directives:n,fields:r})=>Ve("",t,`
100
+ `)+Re(["input",e,Re(n," "),Vt(r)]," ")},DirectiveDefinition:{leave:({description:t,name:e,arguments:n,repeatable:r,locations:i})=>Ve("",t,`
101
+ `)+"directive @"+e+(mf(n)?Ve(`(
102
+ `,ca(Re(n,`
74
103
  `)),`
75
- )`):U("(",T(n,", "),")"))+(i?" repeatable":"")+" on "+T(r," | ")},SchemaExtension:{leave:({directives:t,operationTypes:e})=>T(["extend schema",T(t," "),me(e)]," ")},ScalarTypeExtension:{leave:({name:t,directives:e})=>T(["extend scalar",t,T(e," ")]," ")},ObjectTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:i})=>T(["extend type",t,U("implements ",T(e," & ")),T(n," "),me(i)]," ")},InterfaceTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:i})=>T(["extend interface",t,U("implements ",T(e," & ")),T(n," "),me(i)]," ")},UnionTypeExtension:{leave:({name:t,directives:e,types:n})=>T(["extend union",t,T(e," "),U("= ",T(n," | "))]," ")},EnumTypeExtension:{leave:({name:t,directives:e,values:n})=>T(["extend enum",t,T(e," "),me(n)]," ")},InputObjectTypeExtension:{leave:({name:t,directives:e,fields:n})=>T(["extend input",t,T(e," "),me(n)]," ")}};function T(t,e=""){var n;return(n=t==null?void 0:t.filter(i=>i).join(e))!==null&&n!==void 0?n:""}function me(t){return U(`{
76
- `,An(T(t,`
104
+ )`):Ve("(",Re(n,", "),")"))+(r?" repeatable":"")+" on "+Re(i," | ")},SchemaExtension:{leave:({directives:t,operationTypes:e})=>Re(["extend schema",Re(t," "),Vt(e)]," ")},ScalarTypeExtension:{leave:({name:t,directives:e})=>Re(["extend scalar",t,Re(e," ")]," ")},ObjectTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:r})=>Re(["extend type",t,Ve("implements ",Re(e," & ")),Re(n," "),Vt(r)]," ")},InterfaceTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:r})=>Re(["extend interface",t,Ve("implements ",Re(e," & ")),Re(n," "),Vt(r)]," ")},UnionTypeExtension:{leave:({name:t,directives:e,types:n})=>Re(["extend union",t,Re(e," "),Ve("= ",Re(n," | "))]," ")},EnumTypeExtension:{leave:({name:t,directives:e,values:n})=>Re(["extend enum",t,Re(e," "),Vt(n)]," ")},InputObjectTypeExtension:{leave:({name:t,directives:e,fields:n})=>Re(["extend input",t,Re(e," "),Vt(n)]," ")}};function Re(t,e=""){var n;return(n=t==null?void 0:t.filter(r=>r).join(e))!==null&&n!==void 0?n:""}function Vt(t){return Ve(`{
105
+ `,ca(Re(t,`
77
106
  `)),`
78
- }`)}function U(t,e,n=""){return e!=null&&e!==""?t+e+n:""}function An(t){return U(" ",t.replace(/\n/g,`
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 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}};/**
107
+ }`)}function Ve(t,e,n=""){return e!=null&&e!==""?t+e+n:""}function ca(t){return Ve(" ",t.replace(/\n/g,`
108
+ `))}function mf(t){var e;return(e=t==null?void 0:t.some(n=>n.includes(`
109
+ `)))!==null&&e!==void 0?e:!1}const gf=t=>{var r,i;let e;const n=t.definitions.filter(a=>a.kind==="OperationDefinition");return n.length===1&&(e=(i=(r=n[0])==null?void 0:r.name)==null?void 0:i.value),e},du=t=>{if(typeof t=="string"){let n;try{const r=zA(t);n=gf(r)}catch{}return{query:t,operationName:n}}const e=gf(t);return{query:tE(t),operationName:e}};class Zr extends Error{constructor(e,n){const r=`${Zr.extractMessage(e)}: ${JSON.stringify({response:e,request:n})}`;super(r),Object.setPrototypeOf(this,Zr.prototype),this.response=e,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Zr)}static extractMessage(e){var n,r,i;return(i=(r=(n=e.errors)==null?void 0:n[0])==null?void 0:r.message)!=null?i:`GraphQL Error (Code: ${e.status})`}}var Jr={exports:{}},iE=Jr.exports,yf;function aE(){return yf||(yf=1,function(t,e){var n=typeof self!="undefined"?self:iE,r=function(){function a(){this.fetch=!1,this.DOMException=n.DOMException}return a.prototype=n,new a}();(function(a){(function(o){var l={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function c(j){return j&&DataView.prototype.isPrototypeOf(j)}if(l.arrayBuffer)var f=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],h=ArrayBuffer.isView||function(j){return j&&f.indexOf(Object.prototype.toString.call(j))>-1};function y(j){if(typeof j!="string"&&(j=String(j)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(j))throw new TypeError("Invalid character in header field name");return j.toLowerCase()}function m(j){return typeof j!="string"&&(j=String(j)),j}function O(j){var w={next:function(){var J=j.shift();return{done:J===void 0,value:J}}};return l.iterable&&(w[Symbol.iterator]=function(){return w}),w}function A(j){this.map={},j instanceof A?j.forEach(function(w,J){this.append(J,w)},this):Array.isArray(j)?j.forEach(function(w){this.append(w[0],w[1])},this):j&&Object.getOwnPropertyNames(j).forEach(function(w){this.append(w,j[w])},this)}A.prototype.append=function(j,w){j=y(j),w=m(w);var J=this.map[j];this.map[j]=J?J+", "+w:w},A.prototype.delete=function(j){delete this.map[y(j)]},A.prototype.get=function(j){return j=y(j),this.has(j)?this.map[j]:null},A.prototype.has=function(j){return this.map.hasOwnProperty(y(j))},A.prototype.set=function(j,w){this.map[y(j)]=m(w)},A.prototype.forEach=function(j,w){for(var J in this.map)this.map.hasOwnProperty(J)&&j.call(w,this.map[J],J,this)},A.prototype.keys=function(){var j=[];return this.forEach(function(w,J){j.push(J)}),O(j)},A.prototype.values=function(){var j=[];return this.forEach(function(w){j.push(w)}),O(j)},A.prototype.entries=function(){var j=[];return this.forEach(function(w,J){j.push([J,w])}),O(j)},l.iterable&&(A.prototype[Symbol.iterator]=A.prototype.entries);function E(j){if(j.bodyUsed)return Promise.reject(new TypeError("Already read"));j.bodyUsed=!0}function b(j){return new Promise(function(w,J){j.onload=function(){w(j.result)},j.onerror=function(){J(j.error)}})}function k(j){var w=new FileReader,J=b(w);return w.readAsArrayBuffer(j),J}function C(j){var w=new FileReader,J=b(w);return w.readAsText(j),J}function S(j){for(var w=new Uint8Array(j),J=new Array(w.length),te=0;te<w.length;te++)J[te]=String.fromCharCode(w[te]);return J.join("")}function R(j){if(j.slice)return j.slice(0);var w=new Uint8Array(j.byteLength);return w.set(new Uint8Array(j)),w.buffer}function x(){return this.bodyUsed=!1,this._initBody=function(j){this._bodyInit=j,j?typeof j=="string"?this._bodyText=j:l.blob&&Blob.prototype.isPrototypeOf(j)?this._bodyBlob=j:l.formData&&FormData.prototype.isPrototypeOf(j)?this._bodyFormData=j:l.searchParams&&URLSearchParams.prototype.isPrototypeOf(j)?this._bodyText=j.toString():l.arrayBuffer&&l.blob&&c(j)?(this._bodyArrayBuffer=R(j.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(j)||h(j))?this._bodyArrayBuffer=R(j):this._bodyText=j=Object.prototype.toString.call(j):this._bodyText="",this.headers.get("content-type")||(typeof j=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):l.searchParams&&URLSearchParams.prototype.isPrototypeOf(j)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},l.blob&&(this.blob=function(){var j=E(this);if(j)return j;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?E(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(k)}),this.text=function(){var j=E(this);if(j)return j;if(this._bodyBlob)return C(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(S(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},l.formData&&(this.formData=function(){return this.text().then(ie)}),this.json=function(){return this.text().then(JSON.parse)},this}var z=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function I(j){var w=j.toUpperCase();return z.indexOf(w)>-1?w:j}function re(j,w){w=w||{};var J=w.body;if(j instanceof re){if(j.bodyUsed)throw new TypeError("Already read");this.url=j.url,this.credentials=j.credentials,w.headers||(this.headers=new A(j.headers)),this.method=j.method,this.mode=j.mode,this.signal=j.signal,!J&&j._bodyInit!=null&&(J=j._bodyInit,j.bodyUsed=!0)}else this.url=String(j);if(this.credentials=w.credentials||this.credentials||"same-origin",(w.headers||!this.headers)&&(this.headers=new A(w.headers)),this.method=I(w.method||this.method||"GET"),this.mode=w.mode||this.mode||null,this.signal=w.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&J)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(J)}re.prototype.clone=function(){return new re(this,{body:this._bodyInit})};function ie(j){var w=new FormData;return j.trim().split("&").forEach(function(J){if(J){var te=J.split("="),ne=te.shift().replace(/\+/g," "),se=te.join("=").replace(/\+/g," ");w.append(decodeURIComponent(ne),decodeURIComponent(se))}}),w}function ke(j){var w=new A,J=j.replace(/\r?\n[\t ]+/g," ");return J.split(/\r?\n/).forEach(function(te){var ne=te.split(":"),se=ne.shift().trim();if(se){var me=ne.join(":").trim();w.append(se,me)}}),w}x.call(re.prototype);function he(j,w){w||(w={}),this.type="default",this.status=w.status===void 0?200:w.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in w?w.statusText:"OK",this.headers=new A(w.headers),this.url=w.url||"",this._initBody(j)}x.call(he.prototype),he.prototype.clone=function(){return new he(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new A(this.headers),url:this.url})},he.error=function(){var j=new he(null,{status:0,statusText:""});return j.type="error",j};var Ee=[301,302,303,307,308];he.redirect=function(j,w){if(Ee.indexOf(w)===-1)throw new RangeError("Invalid status code");return new he(null,{status:w,headers:{location:j}})},o.DOMException=a.DOMException;try{new o.DOMException}catch{o.DOMException=function(w,J){this.message=w,this.name=J;var te=Error(w);this.stack=te.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function le(j,w){return new Promise(function(J,te){var ne=new re(j,w);if(ne.signal&&ne.signal.aborted)return te(new o.DOMException("Aborted","AbortError"));var se=new XMLHttpRequest;function me(){se.abort()}se.onload=function(){var G={status:se.status,statusText:se.statusText,headers:ke(se.getAllResponseHeaders()||"")};G.url="responseURL"in se?se.responseURL:G.headers.get("X-Request-URL");var D="response"in se?se.response:se.responseText;J(new he(D,G))},se.onerror=function(){te(new TypeError("Network request failed"))},se.ontimeout=function(){te(new TypeError("Network request failed"))},se.onabort=function(){te(new o.DOMException("Aborted","AbortError"))},se.open(ne.method,ne.url,!0),ne.credentials==="include"?se.withCredentials=!0:ne.credentials==="omit"&&(se.withCredentials=!1),"responseType"in se&&l.blob&&(se.responseType="blob"),ne.headers.forEach(function(G,D){se.setRequestHeader(D,G)}),ne.signal&&(ne.signal.addEventListener("abort",me),se.onreadystatechange=function(){se.readyState===4&&ne.signal.removeEventListener("abort",me)}),se.send(typeof ne._bodyInit=="undefined"?null:ne._bodyInit)})}return le.polyfill=!0,a.fetch||(a.fetch=le,a.Headers=A,a.Request=re,a.Response=he),o.Headers=A,o.Request=re,o.Response=he,o.fetch=le,Object.defineProperty(o,"__esModule",{value:!0}),o})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e}(Jr,Jr.exports)),Jr.exports}var xa=aE();const da=Wa(xa),sE=fg({__proto__:null,default:da},[xa]),dr=t=>{let e={};return t&&(typeof Headers!="undefined"&&t instanceof Headers||sE&&xa.Headers&&t instanceof xa.Headers?e=dA(t):Array.isArray(t)?t.forEach(([n,r])=>{n&&r!==void 0&&(e[n]=r)}):e=t),e},vf=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),oE=t=>{if(!Array.isArray(t.query)){const r=t,i=[`query=${encodeURIComponent(vf(r.query))}`];return t.variables&&i.push(`variables=${encodeURIComponent(r.jsonSerializer.stringify(r.variables))}`),r.operationName&&i.push(`operationName=${encodeURIComponent(r.operationName)}`),i.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((r,i,a)=>(r.push({query:vf(i),variables:e.variables?e.jsonSerializer.stringify(e.variables[a]):void 0}),r),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(n))}`},uE=t=>async e=>{var E;const{url:n,query:r,variables:i,operationName:a,fetch:o,fetchOptions:l,middleware:c}=e,f={...e.headers};let h="",y;t==="POST"?(y=cE(r,i,a,l.jsonSerializer),typeof y=="string"&&(f["Content-Type"]="application/json")):h=oE({query:r,variables:i,operationName:a,jsonSerializer:(E=l.jsonSerializer)!=null?E:Al});const m={method:t,headers:f,body:y,...l};let O=n,A=m;if(c){const b=await Promise.resolve(c({...m,url:n,operationName:a,variables:i})),{url:k,...C}=b;O=k,A=C}return h&&(O=`${O}?${h}`),await o(O,A)};class lE{constructor(e,n={}){this.url=e,this.requestConfig=n,this.rawRequest=async(...r)=>{const[i,a,o]=r,l=hA(i,a,o),{headers:c,fetch:f=da,method:h="POST",requestMiddleware:y,responseMiddleware:m,...O}=this.requestConfig,{url:A}=this;l.signal!==void 0&&(O.signal=l.signal);const{operationName:E}=du(l.query);return fu({url:A,query:l.query,variables:l.variables,headers:{...dr(hu(c)),...dr(l.requestHeaders)},operationName:E,fetch:f,method:h,fetchOptions:O,middleware:y}).then(b=>(m&&m(b),b)).catch(b=>{throw m&&m(b),b})}}async request(e,...n){const[r,i]=n,a=fA(e,r,i),{headers:o,fetch:l=da,method:c="POST",requestMiddleware:f,responseMiddleware:h,...y}=this.requestConfig,{url:m}=this;a.signal!==void 0&&(y.signal=a.signal);const{query:O,operationName:A}=du(a.document);return fu({url:m,query:O,variables:a.variables,headers:{...dr(hu(o)),...dr(a.requestHeaders)},operationName:A,fetch:l,method:c,fetchOptions:y,middleware:f}).then(E=>(h&&h(E),E.data)).catch(E=>{throw h&&h(E),E})}batchRequests(e,n){var c;const r=pA(e,n),{headers:i,...a}=this.requestConfig;r.signal!==void 0&&(a.signal=r.signal);const o=r.documents.map(({document:f})=>du(f).query),l=r.documents.map(({variables:f})=>f);return fu({url:this.url,query:o,variables:l,headers:{...dr(hu(i)),...dr(r.requestHeaders)},operationName:void 0,fetch:(c=this.requestConfig.fetch)!=null?c:da,method:this.requestConfig.method||"POST",fetchOptions:a,middleware:this.requestConfig.requestMiddleware}).then(f=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(f),f.data)).catch(f=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(f),f})}setHeaders(e){return this.requestConfig.headers=e,this}setHeader(e,n){const{headers:r}=this.requestConfig;return r?r[e]=n:this.requestConfig.headers={[e]:n},this}setEndpoint(e){return this.url=e,this}}const fu=async t=>{var h,y;const{query:e,variables:n,fetchOptions:r}=t,i=uE(cA((h=t.method)!=null?h:"post")),a=Array.isArray(t.query),o=await i(t),l=await dE(o,(y=r.jsonSerializer)!=null?y:Al),c=Array.isArray(l)?!l.some(({data:m})=>!m):!!l.data,f=Array.isArray(l)||!l.errors||Array.isArray(l.errors)&&!l.errors.length||r.errorPolicy==="all"||r.errorPolicy==="ignore";if(o.ok&&f&&c){const{errors:m,...O}=(Array.isArray(l),l),A=r.errorPolicy==="ignore"?O:l;return{...a?{data:A}:A,headers:o.headers,status:o.status}}else{const m=typeof l=="string"?{error:l}:l;throw new Zr({...m,status:o.status,headers:o.headers},{query:e,variables:n})}},cE=(t,e,n,r)=>{const i=r!=null?r:Al;if(!Array.isArray(t))return i.stringify({query:t,variables:e,operationName:n});if(typeof e!="undefined"&&!Array.isArray(e))throw new Error("Cannot create request body with given variable type, array expected");const a=t.reduce((o,l,c)=>(o.push({query:l,variables:e?e[c]:void 0}),o),[]);return i.stringify(a)},dE=async(t,e)=>{let n;return t.headers.forEach((r,i)=>{i.toLowerCase()==="content-type"&&(n=r)}),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()},hu=t=>typeof t=="function"?t():t;class vm extends dn{constructor(){super("EVENT_CHAT_ROOM_TOKEN_ERROR","Error getting chat room connection token")}}class os{constructor(e){Ae(this,"root",Rp(this));Ae(this,"token");this.root.setProps(e)}static toDomain(e){const n={token:e.token};return new os(n)}toPrimitives(){const{root:e,...n}=this;return{...n}}}const fE=_r.apiUrls.graphql;class bm{constructor(){Ae(this,"client");this.client=new lE(fE)}async getChatRoom(e){var i;const{getChatRoomToken:n}=await this.client.request(wp,{data:{account:e.account,idEvent:e.eventId,userName:e.userName}});this.propagateGraphqlErrorIfExists(n);const r=(i=n.data)==null?void 0:i.token;if(!r)throw new vm;return os.toDomain({token:r})}propagateGraphqlErrorIfExists(e){if(e.__typename==="ErrorGeneral")throw new Error(e.message)}}class km{constructor(e){Ae(this,"account");this.eventChatRoomRepository=e}async get(e){this.validateAccount();try{return await this.eventChatRoomRepository.getChatRoom({...e,account:this.account})}catch(n){throw new Zu(n)}}setAccount(e){this.account=e}validateAccount(){if(!this.account)throw new Hf}}const hE=new bm,Yu=new km(hE),us=Ia(void 0);us.debugLabel="chatSocketAtom";const ls=Ia(!1);ls.debugLabel="chatIsConnectedAtom";const ki=Ia([]);ki.debugLabel="chatMessageListAtom";const _m=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[r,i]=t.data.split("::")||["none","none"],a=i.split("question__")[1],o={response:r.replace("response__",""),question:JSON.parse(a)};return{...t,data:o.response,isResponse:e,responseData:t.data,question:e?o.question:null}}return t},Sm=t=>{const{url:e,token:n,onOpen:r,onClose:i,onMessage:a,onError:o}=t,l=new WebSocket(e,n);return l.onopen=c=>r(c),l.onclose=c=>i(c),l.onerror=c=>o(c),l.onmessage=c=>a(c),l},Am=()=>{const t="0123456789ABCDEF";let e="#";for(let n=0;n<6;n+=1)e+=t[Math.floor(Math.random()*16)];return e},Nl=(t,e)=>{var m,O;const{Content:n,Attributes:r,Sender:{Attributes:i}}=e,{username:a,type:o,email:l}=r,{isAdmin:c}=i,f=(m=r==null?void 0:r.id)!=null?m:Sa(8),h=((O=t.find(A=>A.username===a))==null?void 0:O.color)||Am(),y={id:f,type:o,color:h,username:a,email:l,data:n,sendDate:r.sendDate,isAdmin:c==="true",responseAdmin:!1,question:null,account:r.account,idEvent:r.idEvent,urlGif:r.urlGif,ip:r.ip};return _m(y)},Em=t=>{const{eventId:e,userName:n,enabled:r=!0}=t,{accountName:i}=kp(),[a,o]=Ue.useState(""),l=()=>{r&&i&&(Yu.setAccount(i),Yu.get({eventId:e,userName:n}).then(c=>{o(c.token)}))};return Ue.useEffect(()=>{l()},[i,r]),{getQuery:{refetch:l},token:a}},{coreLogger:pE}=Zn(),At=pE.child("useConnectChatSocket"),mE=_r.publicUrls.wssIVSChat,gE=10,yE=t=>Math.min(1e4,1e3*Math.pow(2,t)),vE=(t,e,n)=>{const r=JSON.parse(t.data);switch(r.Type){case"EVENT":e==null||e(r);break;case"MESSAGE":n==null||n(r);break;case"ERROR":At.error("Chat room error:",r);break;default:At.error("Unknown chat room event:",t)}},wm=t=>{const{onMessage:e,eventId:n,enabled:r=!0,userName:i,onEvent:a}=t,{token:o,getQuery:l}=Em({eventId:n,userName:i,enabled:r}),[c,f]=Zs(us),[h,y]=Zs(ls),[m,O]=Zs(ki),A=Ue.useRef(0),E=Ue.useCallback(R=>At.error("Chat room socket error:",R),[]),b=Ue.useCallback(()=>{y(!0),A.current=0,At.debug("Successfully connected to the chat room")},[y]),k=Ue.useCallback(()=>{if(A.current>=gE){At.error("Max reconnection attempts reached. No further attempts will be made.");return}y(!1),A.current+=1;const R=yE(A.current);At.debug(`Disconnected from chat room. Reconnecting in ${R/1e3} seconds... (Attempt ${A.current})`),setTimeout(()=>l.refetch(),R)},[l,y]),C=Ue.useCallback(()=>{if(!o){At.debug("No token available. Connection aborted.");return}if((c==null?void 0:c.readyState)===WebSocket.OPEN){At.debug("WebSocket is already open. No need to reconnect.");return}At.debug("Connecting to the chat room...");const R=Sm({token:o,url:mE,onOpen:b,onClose:k,onError:E,onMessage:x=>vE(x,a,e)});f(R)},[o,c,a,e,b,k,E,f]),S=Ue.useCallback(()=>{if(!c||c.readyState!==WebSocket.OPEN){At.debug("No open socket to close.");return}At.debug("Closing chat room socket..."),c.close()},[c]);return Ue.useEffect(()=>{if(!r){At.debug("Chat is disabled, skipping connection.");return}if(!o){At.debug("Token not available, skipping connection.");return}return At.debug("Initializing connection with token:",o),S(),C(),S},[o,r]),{socket:c,chatIsConnected:h,chatMessageList:m,setChatMessageList:O}},bE=()=>{const t=_u(us),e=_u(ls);return{sendMessage:Ue.useCallback((r,i)=>{if(!t||!e)return;const a={id:i.id,sendDate:new Date,content:r,action:"SEND_MESSAGE",attributes:i},o=JSON.stringify(a);t.send(o)},[e,t])}},Nm=()=>{const t=Xu(ki);return{handleEvent:r=>{var i;if(r.EventName==="senddeletemessage"){const a=JSON.parse((i=r.Attributes)==null?void 0:i.data);t(o=>o.filter(l=>l.id!==a.id))}},handleMessage:r=>{t(i=>[...i,Nl(i,r)])}}},kE=t=>{const{eventId:e,userName:n}=t,[r,i]=Ue.useState(!1),[a,o]=Ue.useState(),[l,c]=Ue.useState(),[f,h]=Ue.useState([]),{handleEvent:y}=Nm(),m=Xu(ki),O=C=>{m(S=>[Nl(S,C),...S]),i(!1)},A=C=>{var S,R,x;if(y(C),C.EventName==="sendpinmessage"){const z=JSON.parse((S=C.Attributes)==null?void 0:S.data);o({data:z.data,id:z.id,username:z.username})}if(C.EventName==="sendunpinmessage"&&o(void 0),C.EventName==="sendhighlightproduct"){const z=JSON.parse((R=C.Attributes)==null?void 0:R.data);c({products:z.productIds,collection:z.collection,livestreamingId:z.idEvent})}if(C.EventName==="sendaddtocart"){const z=JSON.parse((x=C.Attributes)==null?void 0:x.data);h(I=>[...I,{id:z.id,sessionId:z.sessionId,productId:z.productId,productImageUrl:z.productImageUrl,productName:z.productName}])}},{socket:E,chatMessageList:b,setChatMessageList:k}=wm({onMessage:O,onEvent:A,eventId:e,userName:n});return{socket:E,chat:b,showLoader:r,pinnedMessage:a,highlightProduct:l,productsInCart:f,setChat:k,setShowLoader:i,setPinnedMessage:o,setProductsInCart:h}};/**
81
110
  * @license
82
111
  * Copyright 2019 Google LLC
83
112
  * SPDX-License-Identifier: BSD-3-Clause
84
- */const wn=globalThis,Xr=wn.ShadowRoot&&(wn.ShadyCSS===void 0||wn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Zr=Symbol(),oa=new WeakMap;let eu=class{constructor(e,n,i){if(this._$cssResult$=!0,i!==Zr)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=n}get styleSheet(){let e=this.o;const n=this.t;if(Xr&&e===void 0){const i=n!==void 0&&n.length===1;i&&(e=oa.get(n)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&oa.set(n,e))}return e}toString(){return this.cssText}};const Ag=t=>new eu(typeof t=="string"?t:t+"",void 0,Zr),Og=(t,...e)=>{const n=t.length===1?t[0]:e.reduce((i,r,s)=>i+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+t[s+1],t[0]);return new eu(n,t,Zr)},wg=(t,e)=>{if(Xr)t.adoptedStyleSheets=e.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet);else for(const n of e){const i=document.createElement("style"),r=wn.litNonce;r!==void 0&&i.setAttribute("nonce",r),i.textContent=n.cssText,t.appendChild(i)}},la=Xr?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let n="";for(const i of e.cssRules)n+=i.cssText;return Ag(n)})(t):t;/**
113
+ */const fa=globalThis,Ol=fa.ShadowRoot&&(fa.ShadyCSS===void 0||fa.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Rl=Symbol(),bf=new WeakMap;let Om=class{constructor(e,n,r){if(this._$cssResult$=!0,r!==Rl)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=n}get styleSheet(){let e=this.o;const n=this.t;if(Ol&&e===void 0){const r=n!==void 0&&n.length===1;r&&(e=bf.get(n)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&bf.set(n,e))}return e}toString(){return this.cssText}};const _E=t=>new Om(typeof t=="string"?t:t+"",void 0,Rl),SE=(t,...e)=>{const n=t.length===1?t[0]:e.reduce((r,i,a)=>r+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[a+1],t[0]);return new Om(n,t,Rl)},AE=(t,e)=>{if(Ol)t.adoptedStyleSheets=e.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet);else for(const n of e){const r=document.createElement("style"),i=fa.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=n.cssText,t.appendChild(r)}},kf=Ol?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let n="";for(const r of e.cssRules)n+=r.cssText;return _E(n)})(t):t;/**
85
114
  * @license
86
115
  * Copyright 2017 Google LLC
87
116
  * 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,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");/**
117
+ */const{is:EE,defineProperty:wE,getOwnPropertyDescriptor:NE,getOwnPropertyNames:OE,getOwnPropertySymbols:RE,getPrototypeOf:TE}=Object,En=globalThis,_f=En.trustedTypes,CE=_f?_f.emptyScript:"",pu=En.reactiveElementPolyfillSupport,ei=(t,e)=>t,Qu={toAttribute(t,e){switch(e){case Boolean:t=t?CE: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}},Rm=(t,e)=>!EE(t,e),Sf={attribute:!0,type:String,converter:Qu,reflect:!1,hasChanged:Rm};var xf,Pf;(xf=Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(Pf=En.litPropertyMetadata)!=null||(En.litPropertyMetadata=new WeakMap);class hr 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=Sf){if(n.state&&(n.attribute=!1),this._$Ei(),this.elementProperties.set(e,n),!n.noAccessor){const r=Symbol(),i=this.getPropertyDescriptor(e,r,n);i!==void 0&&wE(this.prototype,e,i)}}static getPropertyDescriptor(e,n,r){var o;const{get:i,set:a}=(o=NE(this.prototype,e))!=null?o:{get(){return this[n]},set(l){this[n]=l}};return{get(){return i==null?void 0:i.call(this)},set(l){const c=i==null?void 0:i.call(this);a.call(this,l),this.requestUpdate(e,c,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){var n;return(n=this.elementProperties.get(e))!=null?n:Sf}static _$Ei(){if(this.hasOwnProperty(ei("elementProperties")))return;const e=TE(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(ei("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ei("properties"))){const n=this.properties,r=[...OE(n),...RE(n)];for(const i of r)this.createProperty(i,n[i])}const e=this[Symbol.metadata];if(e!==null){const n=litPropertyMetadata.get(e);if(n!==void 0)for(const[r,i]of n)this.elementProperties.set(r,i)}this._$Eh=new Map;for(const[n,r]of this.elementProperties){const i=this._$Eu(n,r);i!==void 0&&this._$Eh.set(i,n)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const n=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const i of r)n.unshift(kf(i))}else e!==void 0&&n.push(kf(e));return n}static _$Eu(e,n){const r=n.attribute;return r===!1?void 0:typeof r=="string"?r: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,r;((n=this._$EO)!=null?n:this._$EO=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&((r=e.hostConnected)==null||r.call(e))}removeController(e){var n;(n=this._$EO)==null||n.delete(e)}_$E_(){const e=new Map,n=this.constructor.elementProperties;for(const r of n.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){var n;const e=(n=this.shadowRoot)!=null?n:this.attachShadow(this.constructor.shadowRootOptions);return AE(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(r=>{var i;return(i=r.hostConnected)==null?void 0:i.call(r)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(n=>{var r;return(r=n.hostDisconnected)==null?void 0:r.call(n)})}attributeChangedCallback(e,n,r){this._$AK(e,r)}_$EC(e,n){var a;const r=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,r);if(i!==void 0&&r.reflect===!0){const o=(((a=r.converter)==null?void 0:a.toAttribute)!==void 0?r.converter:Qu).toAttribute(n,r.type);this._$Em=e,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(e,n){var a;const r=this.constructor,i=r._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const o=r.getPropertyOptions(i),l=typeof o.converter=="function"?{fromAttribute:o.converter}:((a=o.converter)==null?void 0:a.fromAttribute)!==void 0?o.converter:Qu;this._$Em=i,this[i]=l.fromAttribute(n,o.type),this._$Em=null}}requestUpdate(e,n,r){var i;if(e!==void 0){if(r!=null||(r=this.constructor.getPropertyOptions(e)),!((i=r.hasChanged)!=null?i:Rm)(this[e],n))return;this.P(e,n,r)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,n,r){var i;this._$AL.has(e)||this._$AL.set(e,n),r.reflect===!0&&this._$Em!==e&&((i=this._$Ej)!=null?i: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 r,i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if((r=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[o,l]of this._$Ep)this[o]=l;this._$Ep=void 0}const a=this.constructor.elementProperties;if(a.size>0)for(const[o,l]of a)l.wrapped!==!0||this._$AL.has(o)||this[o]===void 0||this.P(o,this[o],l)}let e=!1;const n=this._$AL;try{e=this.shouldUpdate(n),e?(this.willUpdate(n),(i=this._$EO)==null||i.forEach(a=>{var o;return(o=a.hostUpdate)==null?void 0:o.call(a)}),this.update(n)):this._$EU()}catch(a){throw e=!1,this._$EU(),a}e&&this._$AE(n)}willUpdate(e){}_$AE(e){var n;(n=this._$EO)==null||n.forEach(r=>{var i;return(i=r.hostUpdated)==null?void 0:i.call(r)}),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 Ff;hr.elementStyles=[],hr.shadowRootOptions={mode:"open"},hr[ei("elementProperties")]=new Map,hr[ei("finalized")]=new Map,pu==null||pu({ReactiveElement:hr}),((Ff=En.reactiveElementVersions)!=null?Ff:En.reactiveElementVersions=[]).push("2.0.4");/**
89
118
  * @license
90
119
  * Copyright 2017 Google LLC
91
120
  * SPDX-License-Identifier: BSD-3-Clause
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
- \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 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};/**
121
+ */const ti=globalThis,Pa=ti.trustedTypes,Af=Pa?Pa.createPolicy("lit-html",{createHTML:t=>t}):void 0,Tm="$lit$",_n=`lit$${Math.random().toFixed(9).slice(2)}$`,Cm="?"+_n,xE=`<${Cm}>`,Wn=document,ci=()=>Wn.createComment(""),di=t=>t===null||typeof t!="object"&&typeof t!="function",Tl=Array.isArray,PE=t=>Tl(t)||typeof(t==null?void 0:t[Symbol.iterator])=="function",mu=`[
122
+ \f\r]`,Gr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ef=/-->/g,wf=/>/g,jn=RegExp(`>|${mu}(?:([^\\s"'>=/]+)(${mu}*=${mu}*(?:[^
123
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Nf=/'/g,Of=/"/g,xm=/^(?:script|style|textarea|title)$/i,FE=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),IE=FE(1),br=Symbol.for("lit-noChange"),lt=Symbol.for("lit-nothing"),Rf=new WeakMap,Mn=Wn.createTreeWalker(Wn,129);function Pm(t,e){if(!Tl(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Af!==void 0?Af.createHTML(e):e}const DE=(t,e)=>{const n=t.length-1,r=[];let i,a=e===2?"<svg>":e===3?"<math>":"",o=Gr;for(let l=0;l<n;l++){const c=t[l];let f,h,y=-1,m=0;for(;m<c.length&&(o.lastIndex=m,h=o.exec(c),h!==null);)m=o.lastIndex,o===Gr?h[1]==="!--"?o=Ef:h[1]!==void 0?o=wf:h[2]!==void 0?(xm.test(h[2])&&(i=RegExp("</"+h[2],"g")),o=jn):h[3]!==void 0&&(o=jn):o===jn?h[0]===">"?(o=i!=null?i:Gr,y=-1):h[1]===void 0?y=-2:(y=o.lastIndex-h[2].length,f=h[1],o=h[3]===void 0?jn:h[3]==='"'?Of:Nf):o===Of||o===Nf?o=jn:o===Ef||o===wf?o=Gr:(o=jn,i=void 0);const O=o===jn&&t[l+1].startsWith("/>")?" ":"";a+=o===Gr?c+xE:y>=0?(r.push(f),c.slice(0,y)+Tm+c.slice(y)+_n+O):c+_n+(y===-2?l:O)}return[Pm(t,a+(t[n]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]};class fi{constructor({strings:e,_$litType$:n},r){let i;this.parts=[];let a=0,o=0;const l=e.length-1,c=this.parts,[f,h]=DE(e,n);if(this.el=fi.createElement(f,r),Mn.currentNode=this.el.content,n===2||n===3){const y=this.el.content.firstChild;y.replaceWith(...y.childNodes)}for(;(i=Mn.nextNode())!==null&&c.length<l;){if(i.nodeType===1){if(i.hasAttributes())for(const y of i.getAttributeNames())if(y.endsWith(Tm)){const m=h[o++],O=i.getAttribute(y).split(_n),A=/([.?@])?(.*)/.exec(m);c.push({type:1,index:a,name:A[2],strings:O,ctor:A[1]==="."?$E:A[1]==="?"?jE:A[1]==="@"?BE:cs}),i.removeAttribute(y)}else y.startsWith(_n)&&(c.push({type:6,index:a}),i.removeAttribute(y));if(xm.test(i.tagName)){const y=i.textContent.split(_n),m=y.length-1;if(m>0){i.textContent=Pa?Pa.emptyScript:"";for(let O=0;O<m;O++)i.append(y[O],ci()),Mn.nextNode(),c.push({type:2,index:++a});i.append(y[m],ci())}}}else if(i.nodeType===8)if(i.data===Cm)c.push({type:2,index:a});else{let y=-1;for(;(y=i.data.indexOf(_n,y+1))!==-1;)c.push({type:7,index:a}),y+=_n.length-1}a++}}static createElement(e,n){const r=Wn.createElement("template");return r.innerHTML=e,r}}function kr(t,e,n=t,r){var o,l,c;if(e===br)return e;let i=r!==void 0?(o=n.o)==null?void 0:o[r]:n.l;const a=di(e)?void 0:e._$litDirective$;return(i==null?void 0:i.constructor)!==a&&((l=i==null?void 0:i._$AO)==null||l.call(i,!1),a===void 0?i=void 0:(i=new a(t),i._$AT(t,n,r)),r!==void 0?((c=n.o)!=null?c:n.o=[])[r]=i:n.l=i),i!==void 0&&(e=kr(t,i._$AS(t,e.values),i,r)),e}class LE{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 f;const{el:{content:n},parts:r}=this._$AD,i=((f=e==null?void 0:e.creationScope)!=null?f:Wn).importNode(n,!0);Mn.currentNode=i;let a=Mn.nextNode(),o=0,l=0,c=r[0];for(;c!==void 0;){if(o===c.index){let h;c.type===2?h=new _i(a,a.nextSibling,this,e):c.type===1?h=new c.ctor(a,c.name,c.strings,this,e):c.type===6&&(h=new ME(a,this,e)),this._$AV.push(h),c=r[++l]}o!==(c==null?void 0:c.index)&&(a=Mn.nextNode(),o++)}return Mn.currentNode=Wn,i}p(e){let n=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,n),n+=r.strings.length-2):r._$AI(e[n])),n++}}class _i{get _$AU(){var e,n;return(n=(e=this._$AM)==null?void 0:e._$AU)!=null?n:this.v}constructor(e,n,r,i){var a;this.type=2,this._$AH=lt,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=r,this.options=i,this.v=(a=i==null?void 0:i.isConnected)!=null?a:!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=kr(this,e,n),di(e)?e===lt||e==null||e===""?(this._$AH!==lt&&this._$AR(),this._$AH=lt):e!==this._$AH&&e!==br&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):PE(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!==lt&&di(this._$AH)?this._$AA.nextSibling.data=e:this.T(Wn.createTextNode(e)),this._$AH=e}$(e){var a;const{values:n,_$litType$:r}=e,i=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=fi.createElement(Pm(r.h,r.h[0]),this.options)),r);if(((a=this._$AH)==null?void 0:a._$AD)===i)this._$AH.p(n);else{const o=new LE(i,this),l=o.u(this.options);o.p(n),this.T(l),this._$AH=o}}_$AC(e){let n=Rf.get(e.strings);return n===void 0&&Rf.set(e.strings,n=new fi(e)),n}k(e){Tl(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let r,i=0;for(const a of e)i===n.length?n.push(r=new _i(this.O(ci()),this.O(ci()),this,this.options)):r=n[i],r._$AI(a),i++;i<n.length&&(this._$AR(r&&r._$AB.nextSibling,i),n.length=i)}_$AR(e=this._$AA.nextSibling,n){var r;for((r=this._$AP)==null?void 0:r.call(this,!1,!0,n);e&&e!==this._$AB;){const i=e.nextSibling;e.remove(),e=i}}setConnected(e){var n;this._$AM===void 0&&(this.v=e,(n=this._$AP)==null||n.call(this,e))}}class cs{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,n,r,i,a){this.type=1,this._$AH=lt,this._$AN=void 0,this.element=e,this.name=n,this._$AM=i,this.options=a,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=lt}_$AI(e,n=this,r,i){const a=this.strings;let o=!1;if(a===void 0)e=kr(this,e,n,0),o=!di(e)||e!==this._$AH&&e!==br,o&&(this._$AH=e);else{const l=e;let c,f;for(e=a[0],c=0;c<a.length-1;c++)f=kr(this,l[r+c],n,c),f===br&&(f=this._$AH[c]),o||(o=!di(f)||f!==this._$AH[c]),f===lt?e=lt:e!==lt&&(e+=(f!=null?f:"")+a[c+1]),this._$AH[c]=f}o&&!i&&this.j(e)}j(e){e===lt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e!=null?e:"")}}class $E extends cs{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===lt?void 0:e}}class jE extends cs{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==lt)}}class BE extends cs{constructor(e,n,r,i,a){super(e,n,r,i,a),this.type=5}_$AI(e,n=this){var o;if((e=(o=kr(this,e,n,0))!=null?o:lt)===br)return;const r=this._$AH,i=e===lt&&r!==lt||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,a=e!==lt&&(r===lt||i);i&&this.element.removeEventListener(this.name,this,r),a&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var n,r;typeof this._$AH=="function"?this._$AH.call((r=(n=this.options)==null?void 0:n.host)!=null?r:this.element,e):this._$AH.handleEvent(e)}}class ME{constructor(e,n,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){kr(this,e)}}const gu=ti.litHtmlPolyfillSupport;var If;gu==null||gu(fi,_i),((If=ti.litHtmlVersions)!=null?If:ti.litHtmlVersions=[]).push("3.2.0");const UE=(t,e,n)=>{var a,o;const r=(a=n==null?void 0:n.renderBefore)!=null?a:e;let i=r._$litPart$;if(i===void 0){const l=(o=n==null?void 0:n.renderBefore)!=null?o:null;r._$litPart$=i=new _i(e.insertBefore(ci(),l),l,void 0,n!=null?n:{})}return i._$AI(t),i};/**
95
124
  * @license
96
125
  * Copyright 2017 Google LLC
97
126
  * 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=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");/**
127
+ */class ni extends hr{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){var n,r;const e=super.createRenderRoot();return(r=(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=UE(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 br}}var Df;ni._$litElement$=!0,ni.finalized=!0,(Df=globalThis.litElementHydrateSupport)==null||Df.call(globalThis,{LitElement:ni});const yu=globalThis.litElementPolyfillSupport;yu==null||yu({LitElement:ni});var Lf;((Lf=globalThis.litElementVersions)!=null?Lf:globalThis.litElementVersions=[]).push("4.1.0");/**
99
128
  * @license
100
129
  * Copyright 2020 Google LLC
101
130
  * SPDX-License-Identifier: BSD-3-Clause
102
- */const Gg=t=>t.strings===void 0;/**
131
+ */const VE=t=>t.strings===void 0;/**
103
132
  * @license
104
133
  * Copyright 2017 Google LLC
105
134
  * SPDX-License-Identifier: BSD-3-Clause
106
- */const Kg={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Wg=t=>(...e)=>({_$litDirective$:t,values:e});class Jg{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,n,i){this.t=e,this._$AM=n,this.i=i}_$AS(e,n){return this.update(e,n)}update(e,n){return this.render(...n)}}/**
135
+ */const qE={CHILD:2},HE=t=>(...e)=>({_$litDirective$:t,values:e});class KE{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,n,r){this.t=e,this._$AM=n,this.i=r}_$AS(e,n){return this.update(e,n)}update(e,n){return this.render(...n)}}/**
107
136
  * @license
108
137
  * Copyright 2017 Google LLC
109
138
  * SPDX-License-Identifier: BSD-3-Clause
110
- */const Kt=(t,e)=>{var i;const n=t._$AN;if(n===void 0)return!1;for(const r of n)(i=r._$AO)==null||i.call(r,e,!1),Kt(r,e);return!0},Kn=t=>{let e,n;do{if((e=t._$AM)===void 0)break;n=e._$AN,n.delete(t),t=e}while((n==null?void 0:n.size)===0)},au=t=>{for(let e;e=t._$AM;t=e){let n=e._$AN;if(n===void 0)e._$AN=n=new Set;else if(n.has(t))break;n.add(t),Xg(e)}};function Yg(t){this._$AN!==void 0?(Kn(this),this._$AM=t,au(this)):this._$AM=t}function Qg(t,e=!1,n=0){const i=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(e)if(Array.isArray(i))for(let s=n;s<i.length;s++)Kt(i[s],!1),Kn(i[s]);else i!=null&&(Kt(i,!1),Kn(i));else Kt(this,t)}const Xg=t=>{var e,n;t.type==Kg.CHILD&&((e=t._$AP)!=null||(t._$AP=Qg),(n=t._$AQ)!=null||(t._$AQ=Yg))};class Zg extends Jg{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,n,i){super._$AT(e,n,i),au(this),this.isConnected=e._$AU}_$AO(e,n=!0){var i,r;e!==this.isConnected&&(this.isConnected=e,e?(i=this.reconnected)==null||i.call(this):(r=this.disconnected)==null||r.call(this)),n&&(Kt(this,e),Kn(this))}setValue(e){if(Gg(this.t))this.t._$AI(e,this);else{const n=[...this.t._$AH];n[this.i]=e,this.t._$AI(n,this,0)}}disconnected(){}reconnected(){}}/**
139
+ */const ri=(t,e)=>{var r;const n=t._$AN;if(n===void 0)return!1;for(const i of n)(r=i._$AO)==null||r.call(i,e,!1),ri(i,e);return!0},Fa=t=>{let e,n;do{if((e=t._$AM)===void 0)break;n=e._$AN,n.delete(t),t=e}while((n==null?void 0:n.size)===0)},Fm=t=>{for(let e;e=t._$AM;t=e){let n=e._$AN;if(n===void 0)e._$AN=n=new Set;else if(n.has(t))break;n.add(t),WE(e)}};function zE(t){this._$AN!==void 0?(Fa(this),this._$AM=t,Fm(this)):this._$AM=t}function GE(t,e=!1,n=0){const r=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(e)if(Array.isArray(r))for(let a=n;a<r.length;a++)ri(r[a],!1),Fa(r[a]);else r!=null&&(ri(r,!1),Fa(r));else ri(this,t)}const WE=t=>{var e,n;t.type==qE.CHILD&&((e=t._$AP)!=null||(t._$AP=GE),(n=t._$AQ)!=null||(t._$AQ=zE))};class JE extends KE{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,n,r){super._$AT(e,n,r),Fm(this),this.isConnected=e._$AU}_$AO(e,n=!0){var r,i;e!==this.isConnected&&(this.isConnected=e,e?(r=this.reconnected)==null||r.call(this):(i=this.disconnected)==null||i.call(this)),n&&(ri(this,e),Fa(this))}setValue(e){if(VE(this.t))this.t._$AI(e,this);else{const n=[...this.t._$AH];n[this.i]=e,this.t._$AI(n,this,0)}}disconnected(){}reconnected(){}}/**
111
140
  * @license
112
141
  * Copyright 2020 Google LLC
113
142
  * SPDX-License-Identifier: BSD-3-Clause
114
- */const ev=()=>new tv;class tv{}const Yi=new WeakMap,nv=Wg(class extends Zg{render(t){return Y}update(t,[e]){var i;const n=e!==this.Y;return n&&this.Y!==void 0&&this.rt(void 0),(n||this.lt!==this.ct)&&(this.Y=e,this.ht=(i=t.options)==null?void 0:i.host,this.rt(this.ct=t.element)),Y}rt(t){var e;if(this.isConnected||(t=void 0),typeof this.Y=="function"){const n=(e=this.ht)!=null?e:globalThis;let i=Yi.get(n);i===void 0&&(i=new WeakMap,Yi.set(n,i)),i.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),i.set(this.Y,t),t!==void 0&&this.Y.call(this.ht,t)}else this.Y.value=t}get lt(){var t,e,n;return typeof this.Y=="function"?(e=Yi.get((t=this.ht)!=null?t:globalThis))==null?void 0:e.get(this.Y):(n=this.Y)==null?void 0:n.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var ou,va=pu;ou=va.createRoot,va.hydrateRoot;class lu extends Gt{constructor(){super(...arguments);F(this,"rootRef",ev());F(this,"rootInstance")}render(){return Mg`<div ${nv(this.rootRef)}></div>`}updated(){this.updateReactComponent()}updateReactComponent(){if(!this.rootRef.value)return;this.rootInstance||(this.rootInstance=ou(this.rootRef.value));const n=M.createElement(this.getReactComponent(),this.getReactProps(),M.createElement("slot"));this.rootInstance.render(n)}handleHMR(n){}injectStyles(n){const i=r=>r.replace("./","");for(const[r,s]of Object.entries(n)){const a=i(r),o=document.createElement("style");o.setAttribute("type","text/css"),o.setAttribute("id",a),o.innerHTML=s,setTimeout(()=>{var l;return(l=this.shadowRoot)==null?void 0:l.appendChild(o)})}}setupHMRListener(){}}F(lu,"baseStyles",Og`
143
+ */const YE=()=>new QE;class QE{}const vu=new WeakMap,XE=HE(class extends JE{render(t){return lt}update(t,[e]){var r;const n=e!==this.Y;return n&&this.Y!==void 0&&this.rt(void 0),(n||this.lt!==this.ct)&&(this.Y=e,this.ht=(r=t.options)==null?void 0:r.host,this.rt(this.ct=t.element)),lt}rt(t){var e;if(this.isConnected||(t=void 0),typeof this.Y=="function"){const n=(e=this.ht)!=null?e:globalThis;let r=vu.get(n);r===void 0&&(r=new WeakMap,vu.set(n,r)),r.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),r.set(this.Y,t),t!==void 0&&this.Y.call(this.ht,t)}else this.Y.value=t}get lt(){var t,e,n;return typeof this.Y=="function"?(e=vu.get((t=this.ht)!=null?t:globalThis))==null?void 0:e.get(this.Y):(n=this.Y)==null?void 0:n.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var ta={},Tf;function ZE(){if(Tf)return ta;Tf=1;var t=dg;return ta.createRoot=t.createRoot,ta.hydrateRoot=t.hydrateRoot,ta}var ew=ZE();class Im extends ni{constructor(){super(...arguments);Ae(this,"rootRef",YE());Ae(this,"rootInstance")}render(){return IE`<div ${XE(this.rootRef)}></div>`}updated(){this.updateReactComponent()}updateReactComponent(){if(!this.rootRef.value)return;this.rootInstance||(this.rootInstance=ew.createRoot(this.rootRef.value));const n=Ue.createElement(this.getReactComponent(),this.getReactProps(),Ue.createElement("slot"));this.rootInstance.render(n)}handleHMR(n){}injectStyles(n){const r=i=>i.replace("./","");for(const[i,a]of Object.entries(n)){const o=r(i),l=document.createElement("style");l.setAttribute("type","text/css"),l.setAttribute("id",o),l.innerHTML=a,setTimeout(()=>{var c;return(c=this.shadowRoot)==null?void 0:c.appendChild(l)})}}setupHMRListener(){}}Ae(Im,"baseStyles",SE`
115
144
  :host {
116
145
  width: 100%;
117
146
  }
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;
147
+ `);class Dm{constructor(e,n,r){Ae(this,"renderFn");Ae(this,"logger");Ae(this,"rootId");Ae(this,"element",null);Ae(this,"unmount");Ae(this,"updateProps");this.rootId=e,this.renderFn=n,this.logger=r}async render(e={}){var n;if(this.element)this.updateProps(e);else{const r=await this.renderFn(this.rootId,e);this.element=(n=r==null?void 0:r.element)!=null?n:null,this.updateProps=i=>r==null?void 0:r.updateProps(i),this.unmount=()=>{r==null||r.unmount(),this.element=null}}}}class ds{constructor(e){this.config=e}static isApplicable(e){return vl.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")}}Ae(ds,"type",fn.Local);const tw=window==null?void 0:window.__NZ_APP__;class Cl{constructor(e){this.config=e}static isApplicable(){return tw==="platform"}async execute(){}}Ae(Cl,"type",fn.Platform);const na=window==null?void 0:window.faststore_sdk_stores;class xl{constructor(e){this.config=e;const n={vtexfaststore:na};this.config.runtime.updateMeta(n)}static isApplicable(){return!!na}async execute(){const{runtime:e}=this.config;if(!na.account){e.logger.error("missing the account in window.faststore_sdk_stores");return}await e.configureStore({account:na.account})}}Ae(xl,"type",fn.VtexFastStore);const ra=window==null?void 0:window.__RUNTIME__;class fs{constructor(e){this.config=e;const n={vtexio:ra};this.config.runtime.updateMeta(n)}static isApplicable(){return!!ra}async execute(){const{runtime:e}=this.config;if(!ra.account){e.logger.error("missing the account in window.__RUNTIME__");return}await e.configureStore({account:ra.account})}}Ae(fs,"type",fn.VtexIO);const Cf=window==null?void 0:window.vtexjs;class hs{constructor(e){this.config=e;const n={vtexjs:Cf};this.config.runtime.updateMeta(n)}static isApplicable(){return!!Cf}async execute(){const{runtime:e}=this.config;let n={};const r=`${e.componentId.value}-script`,i=rp(r);if(n=Object.fromEntries(i.entries()),!n.account){e.logger.error(`missing the account in the search params of the script #${r}`);return}await e.configureStore({account:n.account})}}Ae(hs,"type",fn.VtexLegacy);class Pl{constructor(e){this.config=e}static isApplicable(e){return!ds.isApplicable(e)&&!fs.isApplicable()&&!hs.isApplicable()&&!xl.isApplicable()&&!Cl.isApplicable()}async execute(){}}Ae(Pl,"type",fn.External);const Lm=[ds,fs,hs,Pl,xl,Cl];class nw{constructor(e){Ae(this,"globalId");Ae(this,"metadata");Ae(this,"customConfigList");Ae(this,"env");Ae(this,"bundler");Ae(this,"logger");Ae(this,"componentId");Ae(this,"renderHandler");Ae(this,"store");this.globalId=e.globalId,this.store=e.getStore(),this.logger=e.logger.child("Runtime"),this.env=e.env,this.bundler=e.bundler,this.customConfigList=new Map,this.metadata={type:fn.External},this.initializeGlobals()}config(e,n,r){typeof n=="function"&&(r=n,n={});const{skipBaseBehavior:i=!1}=n;return this.customConfigList.set(e,{callback:r,skipBaseBehavior:i}),this}registerComponent(e,n){const r=this.toCamel(e);if(window[this.globalId][r])return this.logger.debug(`Component "${r}" is already registered.`),this;this.componentId={value:e,formatted:r},this.renderHandler=n;const i={render:this.renderHandler};return window[this.globalId][this.componentId.formatted]=i,this.logger.debug(`Component "${r}" registered.`),this}async execute(e){for(const n of Lm)if(n.isApplicable(this)){const r=new n({runtime:this}),i=this.customConfigList.get(n.type);this.updateMeta({type:n.type}),i!=null&&i.skipBaseBehavior||await r.execute(),i&&await i.callback({runtime:this,component:new Dm(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 r;if(window[this.globalId]||(window[this.globalId]={},this.logger.debug(`Initialized "${this.globalId}" window object`)),(r=window[this.globalId])!=null&&r.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=cp;exports.AccountContractTypes=lp;exports.AccountInvalidError=Hf;exports.AccountNotFoundError=yl;exports.AccountPlanDescriptionTypes=fp;exports.AccountService=vp;exports.AccountSubscriptionTypes=dp;exports.AccountTypes=up;exports.AddToCartActionTypes=Xa;exports.AggregateRoot=Op;exports.ApiGraphqlTypes=Dk;exports.BaseDB=$h;exports.BroadcastChannelEventBus=Bh;exports.ComponentManager=Dm;exports.CreatePlanError=mp;exports.DomainError=dn;exports.ErrorCodes=kt;exports.EventBusWildcards=Qv;exports.EventChatRoom=os;exports.EventChatRoomService=km;exports.EventChatRoomTokenError=vm;exports.EventNames=Uh;exports.ExternalRuntime=Pl;exports.GlobalPageSectionTypes=hp;exports.GraphqlEventChatRoomRepository=bm;exports.HttpAxiosClient=VS;exports.InvalidNizzaGlobalObjectError=Kf;exports.LanguageTypes=Vh;exports.LocalRuntime=ds;exports.LogLevel=it;exports.LogLevelPriority=Qe;exports.Logger=ep;exports.MAX_PRODUCTS_IN_CART=Yv;exports.NizzaEventStatus=Mh;exports.NizzaProductRequestOriginTypes=Kh;exports.NizzaStore=Aa;exports.NizzaVariationTypes=Hh;exports.PlanNotFoundError=pp;exports.PriorityToLogLevelMap=qh;exports.ReactHostElement=Im;exports.ResourceNotFoundError=Bg;exports.RestAccountPlanRepository=gp;exports.RestPublicAccountRepository=yp;exports.Runtime=nw;exports.RuntimeStage=vl;exports.RuntimeType=fn;exports.StoreProvider=Fv;exports.UnexpectedError=Zu;exports.ValueObject=Vk;exports.VtexIORuntime=fs;exports.VtexLegacyRuntime=hs;exports.accountAtom=Vf;exports.accountService=bp;exports.addQuestionData=_m;exports.addToCartMessages=ju;exports.apiCall=Cg;exports.buildLanguageTranslations=rm;exports.buildTranslations=im;exports.chatIsConnectedAtom=ls;exports.chatMessageListAtom=ki;exports.chatSocketAtom=us;exports.connectToSocket=Sm;exports.createActionFactory=Np;exports.createAggregateRoot=Rp;exports.createNizzaLogger=Mb;exports.createPinoLogger=tp;exports.createStore=Lk;exports.customFetch=qn;exports.downloadFile=xg;exports.eventChatRoomService=Yu;exports.fileOrigin=qb;exports.getAccount=_p;exports.getClientMetadata=op;exports.getClientTimeZone=sp;exports.getNizza=Zn;exports.getRandomColor=Am;exports.getScriptParams=rp;exports.getStore=Dv;exports.getUserFriendlyMessage=nm;exports.i18Init=om;exports.jsDownload=qf;exports.nizzaDB=jh;exports.normalizeChatMessage=Nl;exports.registerTranslations=uA;exports.registerTranslationsOf=am;exports.runAddToCartHooks=jk;exports.runtimeList=Lm;exports.searchParams=np;exports.shortId=Sa;exports.sleep=Hb;exports.useAccount=kp;exports.useAutorun=xv;exports.useChatSocketActions=bE;exports.useChatSocketClient=kE;exports.useChatSocketHandlers=Nm;exports.useConnectChatSocket=wm;exports.useEventChatRoom=Em;exports.useMetaDataClient=lA;exports.useNZ=ip;exports.useNizza=ap;exports.useReaction=Pv;exports.useSelect=Lh;exports.useStore=Iv;exports.validateRequiredProps=Mg;
119
148
  //# sourceMappingURL=index.cjs.map