@omnic/widget-locations 1.0.94 → 1.0.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/widget.cjs.js +21 -21
- package/dist/lib/widget.esm.js +533 -533
- package/package.json +1 -1
package/dist/lib/widget.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react/jsx-runtime"),u=require("react"),ur=require("react-dom"),zi=require("react-dom/server");function Kc(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const de=Kc(u),Yc=Kc(ur);function ea(t){return!!(t&&typeof t.then=="function")}function $i(t,e){return ea(t)?Promise.resolve(t).then(e):e(t)}function Pa(t){const e=(Array.isArray(t)?t:[t]).map(o=>`'${o}'`),n=e.slice(-2).join(" or ");return`Tolgee: You need to specify ${[...e.slice(0,-2),n].join(", ")} option`}function Fd(t){return typeof t=="object"&&!Array.isArray(t)&&t!==null}function Jc(t){if(typeof t=="string")return[t];if(Array.isArray(t))return t}function Et(t){return Jc(t)||[]}function zd(t,e){return Fd(e)?Et(e==null?void 0:e[t]):Et(e)}function vs(t){return Array.from(new Set(t))}function Xc(t){return t&&t.replace(/\/+$/,"")}function $d(t){if(typeof t=="string")return t;if(typeof(t==null?void 0:t.message)=="string")return t.message}const Hd=(t,e)=>fetch(t,e),Qc=(t=Hd)=>(e,n)=>t(e,Object.assign(Object.assign({},n),{headers:Object.assign({"X-Tolgee-SDK-Type":"JS","X-Tolgee-SDK-Version":"5.14.0"},n==null?void 0:n.headers)}));function nn(t){let e=[];return Object.freeze({listen(n){const r=i=>{n(i)};return e.push(r),{unsubscribe(){e=e.filter(i=>r!==i)}}},emit(n){t()&&e.forEach(r=>r({value:n}))}})}function Gd(t,e,n){const r=new Set,i=new Set;function o(l){const c=new Set(e());i.forEach(f=>{(l===void 0||(l==null?void 0:l.findIndex(p=>c.has(p)||f.namespaces.has(p)))!==-1)&&f.fn({value:void 0})})}let s=[];function a(){if(s.length===0)return;const l=s;s=[],r.forEach(d=>{d({value:void 0})});let c=new Set;l.forEach(d=>{d===void 0?c=void 0:c!==void 0&&d.forEach(p=>c.add(p))});const f=c?Array.from(c.keys()):void 0;o(f)}return Object.freeze({emit(l,c){t()&&(s.push(l),c?setTimeout(a,0):a())},listen(l){return r.add(l),{unsubscribe:()=>{r.delete(l)}}},listenSome(l){const c={fn:d=>{l(d)},namespaces:new Set};i.add(c);const f={unsubscribe:()=>{i.delete(c)},subscribeNs:d=>(Et(d).forEach(p=>c.namespaces.add(p)),d===void 0&&c.namespaces.add(n()),f)};return f}})}function Wd(t,e){let n=!0;function r(){return n}const i=Object.freeze({onPendingLanguageChange:nn(r),onLanguageChange:nn(r),onLoadingChange:nn(r),onFetchingChange:nn(r),onInitialLoaded:nn(r),onRunningChange:nn(r),onCacheChange:nn(r),onUpdate:Gd(r,t,e),onPermanentChange:nn(r),setEmitterActive(o){n=o},on:(o,s)=>{switch(o){case"pendingLanguage":return i.onPendingLanguageChange.listen(s);case"language":return i.onLanguageChange.listen(s);case"loading":return i.onLoadingChange.listen(s);case"fetching":return i.onFetchingChange.listen(s);case"initialLoad":return i.onInitialLoaded.listen(s);case"running":return i.onRunningChange.listen(s);case"cache":return i.onCacheChange.listen(s);case"update":return i.onUpdate.listen(s);case"permanentChange":return i.onPermanentChange.listen(s)}}});return i.onInitialLoaded.listen(()=>i.onUpdate.emit()),i.onLanguageChange.listen(()=>i.onUpdate.emit()),i.onCacheChange.listen(({value:o})=>i.onUpdate.emit([o.namespace],!0)),i}const eu=t=>{const e=new Map;return Object.entries(t).forEach(([n,r])=>{if(r!=null){if(typeof r=="object"){eu(r).forEach((i,o)=>{e.set(n+"."+o,i)});return}e.set(n,r)}}),e},Rr=t=>{const[e,...n]=t.split(":"),r=n.join(":");return{language:e,namespace:r||""}},Zt=({language:t,namespace:e})=>e?`${t}:${e}`:t;function Zd(t,e,n,r,i,o,s){const a=new Map,l=new Map;let c={},f=0;function d(h,S,L){const b=Zt(h);l.set(b,{data:eu(S),version:L}),t.emit(h)}function p(h){let S;if(!S){const L=c[Zt(h)];typeof L=="function"&&(S=L())}return S||(S=e(h)),S}function v(h,S){var L;let b;return S&&(b=(L=n(h))===null||L===void 0?void 0:L.catch(()=>(console.warn("Tolgee: Failed to fetch data from dev backend"),p(h)))),b||(b=p(h)),b}const g=Object.freeze({addStaticData(h){h&&(c=Object.assign(Object.assign({},c),h),Object.entries(h).forEach(([S,L])=>{if(typeof L!="function"){const b=Rr(S),y=l.get(S);(!y||y.version===0)&&d(b,L,0)}}))},invalidate(){a.clear(),f+=1},addRecord(h,S){d(h,S,f)},exists(h,S=!1){const L=l.get(Zt(h));return L&&S?L.version===f:!!L},getRecord(h){var S;return(S=l.get(Zt(r(h))))===null||S===void 0?void 0:S.data},getTranslation(h,S){var L;return(L=l.get(Zt(h)))===null||L===void 0?void 0:L.data.get(S)},getTranslationNs(h,S,L){var b;for(const y of h)for(const x of S){const E=(b=l.get(Zt({language:x,namespace:y})))===null||b===void 0?void 0:b.data.get(L);if(E!=null)return[y]}return vs(h)},getTranslationFallback(h,S,L){var b;for(const y of h)for(const x of S){const E=(b=l.get(Zt({language:x,namespace:y})))===null||b===void 0?void 0:b.data.get(L);if(E!=null)return E}},changeTranslation(h,S,L){var b;const y=(b=l.get(Zt(h)))===null||b===void 0?void 0:b.data;y==null||y.set(S,L),t.emit(Object.assign(Object.assign({},h),{key:S}))},isFetching(h){if(i())return!0;if(h===void 0)return a.size>0;const S=Et(h);return!!Array.from(a.keys()).find(L=>S.includes(Rr(L).namespace))},isLoading(h,S){const L=Et(S);return!!(i()||Array.from(a.keys()).find(b=>{const y=Rr(b);return(!L.length||L.includes(y.namespace))&&!g.exists({namespace:y.namespace,language:h})}))},async loadRecords(h,S){const L=h.map(y=>{const x=r(y),E=Zt(x),m=a.get(E);if(m)return{new:!1,promise:m,keyObject:x,cacheKey:E};const w=v(x,S)||Promise.resolve(void 0);return a.set(E,w),{new:!0,promise:w,keyObject:x,cacheKey:E}});o.notify(),s.notify();const b=await Promise.all(L.map(y=>y.promise));return L.forEach((y,x)=>{const E=a.get(y.cacheKey)!==y.promise;if(y.new&&!E){a.delete(y.cacheKey);const m=b[x];m?g.addRecord(y.keyObject,m):g.getRecord(y.keyObject)||g.addRecord(y.keyObject,{})}}),o.notify(),s.notify(),L.map(y=>g.getRecord(y.keyObject))},getAllRecords(){return Array.from(l.entries()).map(([S,L])=>Object.assign(Object.assign({},Rr(S)),{data:L.data}))}});return g}function tu(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}const qd={tagAttributes:{textarea:["placeholder"],input:["value","placeholder"],img:["alt"],"*":["aria-label","title"]},restrictedElements:["script","style"],highlightKeys:["Alt"],highlightColor:"rgb(255, 0, 0)",highlightWidth:5,inputPrefix:"%-%tolgee:",inputSuffix:"%-%",passToParent:["option","optgroup"],fullKeyEncode:!1},ms="invalid",Kd="https://app.tolgee.io",Yd=({key:t})=>t,Jd={defaultNs:"",observerOptions:qd,observerType:"invisible",onFormatError:ms,apiUrl:Kd,fetch:Qc(),onTranslationMissing:Yd},ys=(...t)=>{let e={};return t.forEach(n=>{e=Object.assign(Object.assign(Object.assign({},e),n),{observerOptions:Object.assign(Object.assign({},e.observerOptions),n==null?void 0:n.observerOptions)})}),e};function ka(t,e){const n=ys(Jd,e==null?void 0:e.initialOptions,t);return n.apiUrl=Xc(n.apiUrl),t!=null&&t.fetch&&(n.fetch=Qc(t.fetch)),{initialOptions:n,activeNamespaces:(e==null?void 0:e.activeNamespaces)||new Map,language:e==null?void 0:e.language,pendingLanguage:e==null?void 0:e.language,isInitialLoading:!1,isRunning:!1}}function Xd(t,e,n,r,i,o,s,a){const l={ui:void 0},c={formatters:[],finalFormatter:void 0,observer:void 0,devBackend:void 0,backends:[],ui:void 0,languageDetector:void 0,languageStorage:void 0},f=async({keysAndDefaults:O,event:k})=>{var I;const B=O.map(({key:H,ns:Z,defaultValue:F})=>({key:H,defaultValue:F,fallbackNamespaces:r(Z),namespace:i({key:H,ns:Z})[0],translation:o({key:H,ns:Z})}));(I=c.ui)===null||I===void 0||I.handleElementClick(B,k)},d=(O,k)=>{var I;return((I=c.observer)===null||I===void 0?void 0:I.findPositions(O,k))||[]};function p(O){const k=o({key:O.key,ns:O.ns});return M.formatTranslation(Object.assign(Object.assign({},O),{translation:k,formatEnabled:!0}))}function v(){return{fetch:e().fetch}}function g(O){c.observer=O==null?void 0:O()}function h(){return!!c.observer}function S(O){O&&c.formatters.push(O)}function L(O){c.finalFormatter=O}function b(O){l.ui=O}function y(){return!!l.ui}function x(O){c.languageStorage=O}function E(O){c.languageDetector=O}function m(){if(!c.languageDetector)return;const O=n();return c.languageDetector.getLanguage(Object.assign({availableLanguages:O},v()))}function w(O){O&&c.backends.push(O)}function _(O){c.devBackend=O}function P(O,k){const I=Object.freeze({setFinalFormatter:L,addFormatter:S,setObserver:g,hasObserver:h,setUi:b,hasUi:y,setDevBackend:_,addBackend:w,setLanguageDetector:E,setLanguageStorage:x});k(O,I)}const M=Object.freeze({addPlugin:P,run(){var O,k;const{apiKey:I,apiUrl:B,projectId:H,observerOptions:Z}=e();c.ui=(O=l.ui)===null||O===void 0?void 0:O.call(l,{apiKey:I,apiUrl:B,projectId:H,highlight:M.highlight,changeTranslation:s,findPositions:d,onPermanentChange:a}),(k=c.observer)===null||k===void 0||k.run({mouseHighlight:!0,options:Z,translate:p,onClick:f})},stop(){var O;c.ui=void 0,(O=c.observer)===null||O===void 0||O.stop()},getLanguageStorage(){return c.languageStorage},getInitialLanguage(){var O;const k=n(),I=(O=c.languageStorage)===null||O===void 0?void 0:O.getLanguage(v());return $i(I,B=>(!k||k.includes(B))&&B?B:m())},setStoredLanguage(O){var k;(k=c.languageStorage)===null||k===void 0||k.setLanguage(O,v())},getDevBackend(){return c.devBackend},getBackendRecord:({language:O,namespace:k})=>{for(const I of c.backends){const B=I.getRecord(Object.assign({language:O,namespace:k},v()));if(ea(B))return B==null?void 0:B.catch(H=>(console.error(H),{}));if(B!==void 0)return B}},getBackendDevRecord:({language:O,namespace:k})=>{var I;const{apiKey:B,apiUrl:H,projectId:Z}=e();return(I=c.devBackend)===null||I===void 0?void 0:I.getRecord(Object.assign({apiKey:B,apiUrl:H,projectId:Z,language:O,namespace:k},v()))},getLanguageDetector(){return c.languageDetector},retranslate(){var O;(O=c.observer)===null||O===void 0||O.retranslate()},highlight:(O,k)=>{var I,B;return((B=(I=c.observer)===null||I===void 0?void 0:I.highlight)===null||B===void 0?void 0:B.call(I,O,k))||{unhighlight(){}}},unwrap(O){var k;return c.observer?(k=c.observer)===null||k===void 0?void 0:k.unwrap(O):{text:O,keys:[]}},wrap(O){var k;return c.observer?(k=c.observer)===null||k===void 0?void 0:k.wrap(O):O.translation},hasDevBackend(){return!!M.getDevBackend()},formatTranslation(O){var k,{formatEnabled:I}=O,B=tu(O,["formatEnabled"]);const{key:H,translation:Z,defaultValue:F,noWrap:K,params:A,ns:R,orEmpty:T}=B,V=Z??F;let z="";Z==null&&(z=e().onTranslationMissing(B));let $=V??(T?"":z);const Q=t(),N=I||!(!((k=c.observer)===null||k===void 0)&&k.outputNotFormattable),D=W=>c.observer&&!K?c.observer.wrap({key:H,translation:W,defaultValue:F,params:A,ns:R}):W;$=D($);try{if(V&&Q&&N)for(const W of c.formatters)$=W.format({translation:$,language:Q,params:A});c.finalFormatter&&V&&Q&&N&&($=c.finalFormatter.format({translation:$,language:Q,params:A}))}catch(W){console.error(W);const q=$d(W)||ms,te=e().onFormatError,re=typeof te;re==="string"?$=te:re==="function"?$=te(q,B):$=ms,$=D($)}return $}});return M}const Ra=(t,e,n)=>{let r=t;return Object.freeze({init(i){r=i},notify(){const i=e();r!==i&&n(i),r=i}})};function Qd(t,e,n){let r=ka(),i;const o=Object.freeze({init(s){r=ka(s,r)},isRunning(){return r.isRunning},setRunning(s){r.isRunning!==s&&(r.isRunning=s,n.emit(s))},isInitialLoading(){return r.isInitialLoading},setInitialLoading(s){r.isInitialLoading=s},getLanguage(){return r.language||r.initialOptions.language},setLanguage(s){r.language!==s&&(r.language=s,t.emit(s))},getPendingLanguage(){return r.pendingLanguage||o.getLanguage()},setPendingLanguage(s){r.pendingLanguage!==s&&(r.pendingLanguage=s,e.emit(s))},getInitialOptions(){return Object.assign(Object.assign({},r.initialOptions),i)},addActiveNs(s){Et(s).forEach(l=>{const c=r.activeNamespaces.get(l);c!==void 0?r.activeNamespaces.set(l,c+1):r.activeNamespaces.set(l,1)})},removeActiveNs(s){Et(s).forEach(l=>{const c=r.activeNamespaces.get(l);c!==void 0&&c>1?r.activeNamespaces.set(l,c-1):r.activeNamespaces.delete(l)})},getRequiredNamespaces(){return vs([...r.initialOptions.ns||[r.initialOptions.defaultNs],...Et(r.initialOptions.fallbackNs),...r.activeNamespaces.keys()])},getFallbackLangs(s){const a=s||o.getLanguage();return a?vs([a,...zd(a,r.initialOptions.fallbackLanguage)]):[]},getFallbackNs(){return Et(r.initialOptions.fallbackNs)},getDefaultNs(s){return s===void 0?r.initialOptions.defaultNs:s},getAvailableLanguages(){if(r.initialOptions.availableLanguages)return r.initialOptions.availableLanguages;if(r.initialOptions.staticData){const s=Object.keys(r.initialOptions.staticData).map(a=>Rr(a).language);return Array.from(new Set(s))}},withDefaultNs(s){return{namespace:s.namespace===void 0?o.getInitialOptions().defaultNs:s.namespace,language:s.language}},overrideCredentials(s){s?i=Object.assign(Object.assign({},s),{apiUrl:Xc(s.apiUrl)}):i=void 0}});return o}function ep(t){var{ns:e,noWrap:n,orEmpty:r,params:i,language:o}=t,s=tu(t,["ns","noWrap","orEmpty","params","language"]);return Object.assign(Object.assign({},{ns:e,noWrap:n,orEmpty:r,language:o}),{params:Object.assign({},s)})}const nu=(t,...e)=>{let n={},r;return typeof t=="object"?n=t:(n.key=t,typeof e[0]=="string"?(n.defaultValue=e[0],r=e[1]):typeof e[0]=="object"&&(r=e[0])),r&&(n=Object.assign(Object.assign({},ep(r)),n)),n};function tp({options:t}){const e=Wd(l,c),n=Ra(!1,()=>s.isFetching(),e.onFetchingChange.emit),r=Ra(!1,()=>m.isLoading(),e.onLoadingChange.emit),i=Qd(e.onLanguageChange,e.onPendingLanguageChange,e.onRunningChange),o=Xd(i.getLanguage,i.getInitialOptions,i.getAvailableLanguages,f,L,b,p,v),s=Zd(e.onCacheChange,o.getBackendRecord,o.getBackendDevRecord,i.withDefaultNs,i.isInitialLoading,n,r);t&&g(t);let a;e.onUpdate.listen(()=>{i.isRunning()&&o.retranslate()});function l(){return i.getFallbackNs()}function c(w){return i.getDefaultNs(w)}function f(w){return[...Et(c(w)),...l()]}function d(w){return[...Et(w??c()),...i.getRequiredNamespaces()]}function p(w,_,P){const M=i.withDefaultNs(w),O=s.getTranslation(M,_);return s.changeTranslation(M,_,P),{revert(){s.changeTranslation(M,_,O)}}}function v(w){e.onPermanentChange.emit({key:w.key,namespace:w.namespace})}function g(w){i.init(w),s.addStaticData(i.getInitialOptions().staticData)}function h(w,_){const P=i.getFallbackLangs(w),M=d(_),O=[];return P.forEach(k=>{M.forEach(I=>{s.exists({language:k,namespace:I},!0)||O.push({language:k,namespace:I})})}),O}function S(w,_){const P=h(w,_);if(P.length)return $i(m.loadRecords(P),()=>{})}function L({key:w,ns:_}){const P=i.getFallbackLangs(),M=f(_??void 0);return s.getTranslationNs(M,P,w)}function b({key:w,ns:_,language:P}){const M=f(_??void 0),O=i.getFallbackLangs(P);return s.getTranslationFallback(M,O,w)}function y(){const w=$i(x(),()=>S());if(ea(w))return i.setInitialLoading(!0),n.notify(),r.notify(),Promise.resolve(w).then(()=>{i.setInitialLoading(!1),n.notify(),r.notify(),e.onInitialLoaded.emit()});e.onInitialLoaded.emit()}function x(){if(i.getLanguage())return;const _=o.getInitialLanguage();return $i(_,P=>{const M=P||i.getInitialOptions().defaultLanguage;M&&i.setLanguage(M)})}function E(){if((o.getLanguageDetector()||o.getLanguageStorage())&&!i.getAvailableLanguages())throw new Error(Pa("availableLanguages"));if(!i.getLanguage()&&!i.getInitialOptions().defaultLanguage)throw new Error(Pa(["defaultLanguage","language"]))}const m=Object.freeze(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),i),o),s),{init:g,getTranslation:b,changeTranslation:p,getTranslationNs:L,getDefaultAndFallbackNs:f,async changeLanguage(w){i.getPendingLanguage()===w&&i.getLanguage()===w||(i.setPendingLanguage(w),i.isRunning()&&await S(w),w===i.getPendingLanguage()&&(i.setLanguage(w),o.setStoredLanguage(w)))},async addActiveNs(w,_){_||i.addActiveNs(w),i.isRunning()&&await S(void 0,w)},loadRecords(w){return s.loadRecords(w,m.isDev())},async loadRecord(w){return(await m.loadRecords([w]))[0]},isLoading(w){return s.isLoading(i.getLanguage(),w)},isLoaded(w){const _=i.getLanguage();if(!_)return!1;const P=i.getFallbackLangs(_),M=d(w),O=[];return P.forEach(k=>{M.forEach(I=>{s.exists({language:k,namespace:I})||O.push({language:k,namespace:I})})}),O.length===0},t:(...w)=>{const _=nu(...w),P=b(_);return o.formatTranslation(Object.assign(Object.assign({},_),{translation:P}))},isDev(){return!!(i.getInitialOptions().apiKey&&i.getInitialOptions().apiUrl)},run(){return E(),i.isRunning()||(i.setRunning(!0),o.run(),a=y()),Promise.resolve(a)},stop(){i.isRunning()&&(o.stop(),i.setRunning(!1))}}));return m}function np(t){const e=tp({options:t});e.isDev()&&e.invalidate();function n(i){const o=e.isRunning();o&&e.stop(),i(),e.isDev()&&e.invalidate(),o&&e.run()}const r=Object.freeze({on:e.on,onNsUpdate:e.onUpdate.listenSome,setEmitterActive:e.setEmitterActive,getLanguage:e.getLanguage,getPendingLanguage:e.getPendingLanguage,changeLanguage:e.changeLanguage,changeTranslation:e.changeTranslation,addActiveNs:e.addActiveNs,removeActiveNs:e.removeActiveNs,loadRecords:e.loadRecords,loadRecord:e.loadRecord,addStaticData:e.addStaticData,getRecord:e.getRecord,getAllRecords:e.getAllRecords,isLoaded:e.isLoaded,isInitialLoading:e.isInitialLoading,isLoading:e.isLoading,isFetching:e.isFetching,isRunning:e.isRunning,run:e.run,stop:e.stop,t:e.t,highlight:e.highlight,getInitialOptions:e.getInitialOptions,isDev:e.isDev,wrap:e.wrap,unwrap:e.unwrap,overrideCredentials(i){n(()=>e.overrideCredentials(i))},addPlugin(i){i&&n(()=>e.addPlugin(r,i))},updateOptions(i){i&&n(()=>e.init(i))}});return r}const rp=()=>{const t={plugins:[],options:{}},e=Object.freeze({use(n){return t.plugins.push(n),e},updateDefaults(n){return t.options=ys(t.options,n),e},init(n){const r=np(ys(t.options,n));return t.plugins.forEach(r.addPlugin),r}});return e},ru=0,bs=1,ip=2;class op extends Error{constructor(e,n,r){let i;e===ru?i="Empty parameter":e===bs?i="Unexpected character":i="Unexpected end",super(`Tolgee parser: ${i} at ${n} in "${r}"`),this.code=e,this.index=n}}function Ta(t){return/\s/.test(t)}const an=0,ws=1,Hi=2,$o=3,Ho=4,sp=new Set([Hi,ws,an]),Ss="'",ap=new Set(["{","}",Ss]),lp=t=>/[0-9a-zA-Z_]/.test(t);function cp(t){let e=an,n="",r="",i="";const o=[],s=[];let a=0;function l(p){throw new op(p,a,t)}const c=()=>{o.push(n),n=""},f=()=>{lp(i)||l(bs),r+=i},d=()=>{r===""&&l(ru),s.push(r),r=""};for(a=0;a<t.length;a++)switch(i=t[a],e){case an:i===Ss?(n+=i,e=ws):i==="{"?(c(),e=$o):(n+=i,e=an);break;case ws:ap.has(i)?(n=n.slice(0,-1)+i,e=Hi):(n+=i,e=an);break;case Hi:i===Ss?e=an:(n+=i,e=Hi);break;case $o:i==="}"?(d(),e=an):Ta(i)?r!==""&&(d(),e=Ho):(f(),e=$o);break;case Ho:i=="}"?e=an:Ta(i)?e=Ho:l(bs)}return sp.has(e)||l(ip),c(),[o,s]}function up(t,e){const[n,r]=cp(t),i=[n[0]];for(let o=1;o<n.length;o++){const s=e==null?void 0:e[r[o-1]];if(s===void 0)throw new Error(`Missing parameter "${r[o-1]}" in "${t}"`);i.push(String(s)),i.push(n[o])}return i.join("")}function fp(){return{format:({translation:t,params:e})=>up(t,e)}}const dp=()=>(t,e)=>(e.setFinalFormatter(fp()),t),pp="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";function hp(t){const e=pp.indexOf(t);if(e===-1)throw new Error("Invalid character found: "+t);return e}function gp(t){const e=new Uint8Array(t),n=e.length;let r="",i=Math.pow(2,16)-1;for(let o=0;o<n;o+=i)o+i>n&&(i=n-o),r+=String.fromCharCode.apply(null,e.subarray(o,o+i));return r}function vp(t){t=t.toUpperCase();const e=t.length;let n=0,r=0,i=0;const o=new Uint8Array(e*5/8|0);for(let s=0;s<e;s++)r=r<<5|hp(t[s]),n+=5,n>=8&&(o[i++]=r>>>n-8&255,n-=8);return gp(o.buffer)}function mp(t){if(t)try{const[e,n]=t.split("_");if(e==="tgpak"){const[r]=vp(n).split("_");return Number(r)}}catch{console.warn("Tolgee: Api key can't be parsed")}}function yp(t){if(!t)return;const[e]=t.split("_");return e==="tgpak"?"tgpak":e==="tgpat"?"tgpat":"legacy"}function bp(){return{getRecord({apiUrl:t,apiKey:e,language:n,namespace:r,projectId:i,fetch:o}){var s;const a=(s=mp(e))!==null&&s!==void 0?s:i;let l=a!==void 0?`${t}/v2/projects/${a}/translations/${n}`:`${t}/v2/projects/translations/${n}`;if(r&&(l+=`?ns=${r}`),yp(e)==="tgpat"&&i===void 0)throw new Error("You need to specify 'projectId' when using PAT key");return o(l,{headers:{"X-API-Key":e||"","Content-Type":"application/json"}}).then(c=>{if(c.ok)return c.json().then(f=>f[n]);throw new Error(c.statusText)})}}}const wp=()=>(t,e)=>(e.setDevBackend(bp()),t);function Sp(t,e){const n=r=>{var i,o;t.includes((i=r.data)===null||i===void 0?void 0:i.type)&&e((o=r.data)===null||o===void 0?void 0:o.data)};return window.addEventListener("message",n,!1),{unsubscribe(){window.removeEventListener("message",n)}}}function Lp({message:t,recievingMessage:e,data:n,attempts:r=1}){let i=!1;const o=()=>new Promise((a,l)=>{const c=Sp(e,d);window.postMessage({type:t,data:n},window.origin);const f=setTimeout(v,300);function d(g){clearTimeout(f),p(),a(g)}function p(){c.unsubscribe()}function v(){p(),l()}});return{cancel(){i=!0},promise:(async()=>{for(let a=0;a<r;a++){if(i)return new Promise(()=>{});try{return await o()}catch{continue}}if(!i)throw`Didn't recieve ${e.join(" or ")} in time.`;return new Promise(()=>{})})()}}function Ep(){let t;async function e(n){t==null||t();const{cancel:r,promise:i}=Lp({message:"TOLGEE_READY",recievingMessage:["TOLGEE_PLUGIN_READY","TOLGEE_PLUGIN_UPDATED"],data:n,attempts:4});return t=r,i}return{update:e}}const xp="tolgee-in-context-tools.umd.min.js",Cp="@tolgee/in-context-tools",_p="InContextTools",Op="https://cdn.jsdelivr.net/npm";function Mp(t){return new Promise((e,n)=>{const r=document.createElement("script");r.src=t,r.addEventListener("load",()=>e()),r.addEventListener("error",i=>n(i.error)),document.body.appendChild(r)})}let Go=null;function Pp(t){return Go||(Go=Mp(`${Op}/@tolgee/web@${t}/dist/${xp}`).then(()=>window[Cp][_p])),Go}const iu="__tolgee_apiKey",ou="__tolgee_apiUrl";function Aa(){const t=sessionStorage.getItem(iu)||void 0,e=sessionStorage.getItem(ou)||void 0;if(!(!t||!e))return{apiKey:t,apiUrl:e}}function kp(){sessionStorage.removeItem(iu),sessionStorage.removeItem(ou)}function Rp(t){document.readyState!=="loading"?Promise.resolve().then(()=>{t()}):document.addEventListener&&document.addEventListener("DOMContentLoaded",t)}let su=()=>t=>t;const Tp=()=>{if(typeof window>"u")return!1;try{return typeof sessionStorage<"u"&&sessionStorage}catch(t){return console.error("sessionStorage not available",t),!1}};Tp()&&(su=()=>t=>{const e=Ep(),n=()=>({uiPresent:!0,uiVersion:void 0,mode:t.isDev()?"development":"production",config:{apiUrl:t.getInitialOptions().apiUrl||"",apiKey:t.getInitialOptions().apiKey||""}}),r=async()=>{const o=await Pp("5.14.0");return s=>{const a=Aa();return s.addPlugin(o({credentials:a})),s}};return t.on("running",({value:o})=>{o&&Rp(()=>{e.update(n()).catch(kp)})}),Aa()&&r().then(o=>{t.addPlugin(o)}).catch(o=>{console.error("Tolgee: Failed to load in-context tools"),console.error(o)}),t});function Ap(){return rp().use(su())}const Dp={useSuspense:!0};let Wo;const au=()=>(Wo||(Wo=u.createContext(void 0)),Wo),Ip=({tolgee:t,options:e,children:n,fallback:r})=>{const[i,o]=u.useState(!t.isLoaded());u.useEffect(()=>{t.run().catch(l=>{console.error(l)}).finally(()=>{o(!1)})},[t]);const s=Object.assign(Object.assign({},Dp),e),a=au();return s.useSuspense?u.createElement(a.Provider,{value:{tolgee:t,options:s}},i?r:u.createElement(u.Suspense,{fallback:r||null},n)):u.createElement(a.Provider,{value:{tolgee:t,options:s}},i?r:n)};let jp;function Np(){return jp}const lu=()=>{const t=au(),e=u.useContext(t)||Np();if(!e)throw new Error("Couldn't find tolgee instance, did you forgot to use `TolgeeProvider`?");return e},cu=()=>{const[t,e]=u.useState(0),n=u.useCallback(()=>{e(r=>r+1)},[e]);return{instance:t,rerender:n}},uu=(t,e)=>{const{tolgee:n,options:r}=lu(),i=Jc(t),o=Et(i).join(":"),s=Object.assign(Object.assign({},r),e),{rerender:a,instance:l}=cu(),c=u.useRef(),f=u.useRef([]);f.current=[];const d=g=>{var h;f.current.push(g),(h=c.current)===null||h===void 0||h.subscribeNs(g)},p=n.isLoaded(i);u.useEffect(()=>{const g=n.onNsUpdate(a);return c.current=g,g.subscribeNs(i),f.current.forEach(h=>{g.subscribeNs(h)}),()=>{g.unsubscribe()}},[o,n]),u.useEffect(()=>(n.addActiveNs(i),()=>n.removeActiveNs(i)),[o,n]);const v=u.useCallback(g=>{var h;const S=(h=g.ns)!==null&&h!==void 0?h:i==null?void 0:i[0];return d(S),n.t(Object.assign(Object.assign({},g),{ns:S}))},[n,l]);if(s.useSuspense&&!p)throw n.addActiveNs(i,!0);return{t:v,isLoading:!p}},jt=(t,e)=>{const{t:n,isLoading:r}=uu(t,e);return{t:u.useCallback((...o)=>{const s=nu(...o);return n(s)},[n]),isLoading:r}},Bp=t=>{if(!t)return;const e={};return Object.entries(t||{}).forEach(([n,r])=>{if(typeof r=="function")e[n]=i=>r(Ls(i));else if(u.isValidElement(r)){const i=r;e[n]=o=>i.props.children===void 0&&(o!=null&&o.length)?u.cloneElement(i,{},Ls(o)):u.cloneElement(i)}else e[n]=r}),e},Ls=t=>Array.isArray(t)?u.Children.toArray(t):t,Up=t=>{const e=t.keyName||t.children;e===void 0&&console.error("T component: keyName not defined");const n=t.defaultValue||(t.keyName?t.children:void 0),r=Ls(t.t({key:e,params:Bp(t.params),defaultValue:n,noWrap:t.noWrap,ns:t.ns,language:t.language}));return u.createElement(u.Fragment,null,r)},Rn=t=>{const{t:e}=uu();return u.createElement(Up,Object.assign({t:e},t))},Vp=t=>{const{tolgee:e}=lu(),{rerender:n}=cu();return u.useEffect(()=>{const r=t==null?void 0:t.map(i=>e.on(i,n));return()=>{r==null||r.forEach(i=>i.unsubscribe())}},[t==null?void 0:t.join(":")]),e};function Mo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Fp=function(t,e,n,r,i,o,s,a){if(!t){var l;if(e===void 0)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,o,s,a],f=0;l=new Error(e.replace(/%s/g,function(){return c[f++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}},zp=Fp;const Yt=Mo(zp);/*! *****************************************************************************
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react/jsx-runtime"),u=require("react"),ur=require("react-dom"),zi=require("react-dom/server");function Kc(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const de=Kc(u),Jc=Kc(ur);function ea(t){return!!(t&&typeof t.then=="function")}function $i(t,e){return ea(t)?Promise.resolve(t).then(e):e(t)}function Pa(t){const e=(Array.isArray(t)?t:[t]).map(o=>`'${o}'`),n=e.slice(-2).join(" or ");return`Tolgee: You need to specify ${[...e.slice(0,-2),n].join(", ")} option`}function Fd(t){return typeof t=="object"&&!Array.isArray(t)&&t!==null}function Yc(t){if(typeof t=="string")return[t];if(Array.isArray(t))return t}function Lt(t){return Yc(t)||[]}function zd(t,e){return Fd(e)?Lt(e==null?void 0:e[t]):Lt(e)}function vs(t){return Array.from(new Set(t))}function Qc(t){return t&&t.replace(/\/+$/,"")}function $d(t){if(typeof t=="string")return t;if(typeof(t==null?void 0:t.message)=="string")return t.message}const Hd=(t,e)=>fetch(t,e),Xc=(t=Hd)=>(e,n)=>t(e,Object.assign(Object.assign({},n),{headers:Object.assign({"X-Tolgee-SDK-Type":"JS","X-Tolgee-SDK-Version":"5.14.0"},n==null?void 0:n.headers)}));function nn(t){let e=[];return Object.freeze({listen(n){const r=i=>{n(i)};return e.push(r),{unsubscribe(){e=e.filter(i=>r!==i)}}},emit(n){t()&&e.forEach(r=>r({value:n}))}})}function Gd(t,e,n){const r=new Set,i=new Set;function o(l){const c=new Set(e());i.forEach(f=>{(l===void 0||(l==null?void 0:l.findIndex(p=>c.has(p)||f.namespaces.has(p)))!==-1)&&f.fn({value:void 0})})}let s=[];function a(){if(s.length===0)return;const l=s;s=[],r.forEach(d=>{d({value:void 0})});let c=new Set;l.forEach(d=>{d===void 0?c=void 0:c!==void 0&&d.forEach(p=>c.add(p))});const f=c?Array.from(c.keys()):void 0;o(f)}return Object.freeze({emit(l,c){t()&&(s.push(l),c?setTimeout(a,0):a())},listen(l){return r.add(l),{unsubscribe:()=>{r.delete(l)}}},listenSome(l){const c={fn:d=>{l(d)},namespaces:new Set};i.add(c);const f={unsubscribe:()=>{i.delete(c)},subscribeNs:d=>(Lt(d).forEach(p=>c.namespaces.add(p)),d===void 0&&c.namespaces.add(n()),f)};return f}})}function Wd(t,e){let n=!0;function r(){return n}const i=Object.freeze({onPendingLanguageChange:nn(r),onLanguageChange:nn(r),onLoadingChange:nn(r),onFetchingChange:nn(r),onInitialLoaded:nn(r),onRunningChange:nn(r),onCacheChange:nn(r),onUpdate:Gd(r,t,e),onPermanentChange:nn(r),setEmitterActive(o){n=o},on:(o,s)=>{switch(o){case"pendingLanguage":return i.onPendingLanguageChange.listen(s);case"language":return i.onLanguageChange.listen(s);case"loading":return i.onLoadingChange.listen(s);case"fetching":return i.onFetchingChange.listen(s);case"initialLoad":return i.onInitialLoaded.listen(s);case"running":return i.onRunningChange.listen(s);case"cache":return i.onCacheChange.listen(s);case"update":return i.onUpdate.listen(s);case"permanentChange":return i.onPermanentChange.listen(s)}}});return i.onInitialLoaded.listen(()=>i.onUpdate.emit()),i.onLanguageChange.listen(()=>i.onUpdate.emit()),i.onCacheChange.listen(({value:o})=>i.onUpdate.emit([o.namespace],!0)),i}const eu=t=>{const e=new Map;return Object.entries(t).forEach(([n,r])=>{if(r!=null){if(typeof r=="object"){eu(r).forEach((i,o)=>{e.set(n+"."+o,i)});return}e.set(n,r)}}),e},Rr=t=>{const[e,...n]=t.split(":"),r=n.join(":");return{language:e,namespace:r||""}},Zt=({language:t,namespace:e})=>e?`${t}:${e}`:t;function Zd(t,e,n,r,i,o,s){const a=new Map,l=new Map;let c={},f=0;function d(h,S,E){const b=Zt(h);l.set(b,{data:eu(S),version:E}),t.emit(h)}function p(h){let S;if(!S){const E=c[Zt(h)];typeof E=="function"&&(S=E())}return S||(S=e(h)),S}function v(h,S){var E;let b;return S&&(b=(E=n(h))===null||E===void 0?void 0:E.catch(()=>(console.warn("Tolgee: Failed to fetch data from dev backend"),p(h)))),b||(b=p(h)),b}const g=Object.freeze({addStaticData(h){h&&(c=Object.assign(Object.assign({},c),h),Object.entries(h).forEach(([S,E])=>{if(typeof E!="function"){const b=Rr(S),y=l.get(S);(!y||y.version===0)&&d(b,E,0)}}))},invalidate(){a.clear(),f+=1},addRecord(h,S){d(h,S,f)},exists(h,S=!1){const E=l.get(Zt(h));return E&&S?E.version===f:!!E},getRecord(h){var S;return(S=l.get(Zt(r(h))))===null||S===void 0?void 0:S.data},getTranslation(h,S){var E;return(E=l.get(Zt(h)))===null||E===void 0?void 0:E.data.get(S)},getTranslationNs(h,S,E){var b;for(const y of h)for(const x of S){const L=(b=l.get(Zt({language:x,namespace:y})))===null||b===void 0?void 0:b.data.get(E);if(L!=null)return[y]}return vs(h)},getTranslationFallback(h,S,E){var b;for(const y of h)for(const x of S){const L=(b=l.get(Zt({language:x,namespace:y})))===null||b===void 0?void 0:b.data.get(E);if(L!=null)return L}},changeTranslation(h,S,E){var b;const y=(b=l.get(Zt(h)))===null||b===void 0?void 0:b.data;y==null||y.set(S,E),t.emit(Object.assign(Object.assign({},h),{key:S}))},isFetching(h){if(i())return!0;if(h===void 0)return a.size>0;const S=Lt(h);return!!Array.from(a.keys()).find(E=>S.includes(Rr(E).namespace))},isLoading(h,S){const E=Lt(S);return!!(i()||Array.from(a.keys()).find(b=>{const y=Rr(b);return(!E.length||E.includes(y.namespace))&&!g.exists({namespace:y.namespace,language:h})}))},async loadRecords(h,S){const E=h.map(y=>{const x=r(y),L=Zt(x),m=a.get(L);if(m)return{new:!1,promise:m,keyObject:x,cacheKey:L};const w=v(x,S)||Promise.resolve(void 0);return a.set(L,w),{new:!0,promise:w,keyObject:x,cacheKey:L}});o.notify(),s.notify();const b=await Promise.all(E.map(y=>y.promise));return E.forEach((y,x)=>{const L=a.get(y.cacheKey)!==y.promise;if(y.new&&!L){a.delete(y.cacheKey);const m=b[x];m?g.addRecord(y.keyObject,m):g.getRecord(y.keyObject)||g.addRecord(y.keyObject,{})}}),o.notify(),s.notify(),E.map(y=>g.getRecord(y.keyObject))},getAllRecords(){return Array.from(l.entries()).map(([S,E])=>Object.assign(Object.assign({},Rr(S)),{data:E.data}))}});return g}function tu(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}const qd={tagAttributes:{textarea:["placeholder"],input:["value","placeholder"],img:["alt"],"*":["aria-label","title"]},restrictedElements:["script","style"],highlightKeys:["Alt"],highlightColor:"rgb(255, 0, 0)",highlightWidth:5,inputPrefix:"%-%tolgee:",inputSuffix:"%-%",passToParent:["option","optgroup"],fullKeyEncode:!1},ms="invalid",Kd="https://app.tolgee.io",Jd=({key:t})=>t,Yd={defaultNs:"",observerOptions:qd,observerType:"invisible",onFormatError:ms,apiUrl:Kd,fetch:Xc(),onTranslationMissing:Jd},ys=(...t)=>{let e={};return t.forEach(n=>{e=Object.assign(Object.assign(Object.assign({},e),n),{observerOptions:Object.assign(Object.assign({},e.observerOptions),n==null?void 0:n.observerOptions)})}),e};function ka(t,e){const n=ys(Yd,e==null?void 0:e.initialOptions,t);return n.apiUrl=Qc(n.apiUrl),t!=null&&t.fetch&&(n.fetch=Xc(t.fetch)),{initialOptions:n,activeNamespaces:(e==null?void 0:e.activeNamespaces)||new Map,language:e==null?void 0:e.language,pendingLanguage:e==null?void 0:e.language,isInitialLoading:!1,isRunning:!1}}function Qd(t,e,n,r,i,o,s,a){const l={ui:void 0},c={formatters:[],finalFormatter:void 0,observer:void 0,devBackend:void 0,backends:[],ui:void 0,languageDetector:void 0,languageStorage:void 0},f=async({keysAndDefaults:O,event:k})=>{var I;const B=O.map(({key:H,ns:Z,defaultValue:F})=>({key:H,defaultValue:F,fallbackNamespaces:r(Z),namespace:i({key:H,ns:Z})[0],translation:o({key:H,ns:Z})}));(I=c.ui)===null||I===void 0||I.handleElementClick(B,k)},d=(O,k)=>{var I;return((I=c.observer)===null||I===void 0?void 0:I.findPositions(O,k))||[]};function p(O){const k=o({key:O.key,ns:O.ns});return M.formatTranslation(Object.assign(Object.assign({},O),{translation:k,formatEnabled:!0}))}function v(){return{fetch:e().fetch}}function g(O){c.observer=O==null?void 0:O()}function h(){return!!c.observer}function S(O){O&&c.formatters.push(O)}function E(O){c.finalFormatter=O}function b(O){l.ui=O}function y(){return!!l.ui}function x(O){c.languageStorage=O}function L(O){c.languageDetector=O}function m(){if(!c.languageDetector)return;const O=n();return c.languageDetector.getLanguage(Object.assign({availableLanguages:O},v()))}function w(O){O&&c.backends.push(O)}function _(O){c.devBackend=O}function P(O,k){const I=Object.freeze({setFinalFormatter:E,addFormatter:S,setObserver:g,hasObserver:h,setUi:b,hasUi:y,setDevBackend:_,addBackend:w,setLanguageDetector:L,setLanguageStorage:x});k(O,I)}const M=Object.freeze({addPlugin:P,run(){var O,k;const{apiKey:I,apiUrl:B,projectId:H,observerOptions:Z}=e();c.ui=(O=l.ui)===null||O===void 0?void 0:O.call(l,{apiKey:I,apiUrl:B,projectId:H,highlight:M.highlight,changeTranslation:s,findPositions:d,onPermanentChange:a}),(k=c.observer)===null||k===void 0||k.run({mouseHighlight:!0,options:Z,translate:p,onClick:f})},stop(){var O;c.ui=void 0,(O=c.observer)===null||O===void 0||O.stop()},getLanguageStorage(){return c.languageStorage},getInitialLanguage(){var O;const k=n(),I=(O=c.languageStorage)===null||O===void 0?void 0:O.getLanguage(v());return $i(I,B=>(!k||k.includes(B))&&B?B:m())},setStoredLanguage(O){var k;(k=c.languageStorage)===null||k===void 0||k.setLanguage(O,v())},getDevBackend(){return c.devBackend},getBackendRecord:({language:O,namespace:k})=>{for(const I of c.backends){const B=I.getRecord(Object.assign({language:O,namespace:k},v()));if(ea(B))return B==null?void 0:B.catch(H=>(console.error(H),{}));if(B!==void 0)return B}},getBackendDevRecord:({language:O,namespace:k})=>{var I;const{apiKey:B,apiUrl:H,projectId:Z}=e();return(I=c.devBackend)===null||I===void 0?void 0:I.getRecord(Object.assign({apiKey:B,apiUrl:H,projectId:Z,language:O,namespace:k},v()))},getLanguageDetector(){return c.languageDetector},retranslate(){var O;(O=c.observer)===null||O===void 0||O.retranslate()},highlight:(O,k)=>{var I,B;return((B=(I=c.observer)===null||I===void 0?void 0:I.highlight)===null||B===void 0?void 0:B.call(I,O,k))||{unhighlight(){}}},unwrap(O){var k;return c.observer?(k=c.observer)===null||k===void 0?void 0:k.unwrap(O):{text:O,keys:[]}},wrap(O){var k;return c.observer?(k=c.observer)===null||k===void 0?void 0:k.wrap(O):O.translation},hasDevBackend(){return!!M.getDevBackend()},formatTranslation(O){var k,{formatEnabled:I}=O,B=tu(O,["formatEnabled"]);const{key:H,translation:Z,defaultValue:F,noWrap:K,params:A,ns:R,orEmpty:T}=B,V=Z??F;let z="";Z==null&&(z=e().onTranslationMissing(B));let $=V??(T?"":z);const X=t(),N=I||!(!((k=c.observer)===null||k===void 0)&&k.outputNotFormattable),D=W=>c.observer&&!K?c.observer.wrap({key:H,translation:W,defaultValue:F,params:A,ns:R}):W;$=D($);try{if(V&&X&&N)for(const W of c.formatters)$=W.format({translation:$,language:X,params:A});c.finalFormatter&&V&&X&&N&&($=c.finalFormatter.format({translation:$,language:X,params:A}))}catch(W){console.error(W);const q=$d(W)||ms,te=e().onFormatError,re=typeof te;re==="string"?$=te:re==="function"?$=te(q,B):$=ms,$=D($)}return $}});return M}const Ra=(t,e,n)=>{let r=t;return Object.freeze({init(i){r=i},notify(){const i=e();r!==i&&n(i),r=i}})};function Xd(t,e,n){let r=ka(),i;const o=Object.freeze({init(s){r=ka(s,r)},isRunning(){return r.isRunning},setRunning(s){r.isRunning!==s&&(r.isRunning=s,n.emit(s))},isInitialLoading(){return r.isInitialLoading},setInitialLoading(s){r.isInitialLoading=s},getLanguage(){return r.language||r.initialOptions.language},setLanguage(s){r.language!==s&&(r.language=s,t.emit(s))},getPendingLanguage(){return r.pendingLanguage||o.getLanguage()},setPendingLanguage(s){r.pendingLanguage!==s&&(r.pendingLanguage=s,e.emit(s))},getInitialOptions(){return Object.assign(Object.assign({},r.initialOptions),i)},addActiveNs(s){Lt(s).forEach(l=>{const c=r.activeNamespaces.get(l);c!==void 0?r.activeNamespaces.set(l,c+1):r.activeNamespaces.set(l,1)})},removeActiveNs(s){Lt(s).forEach(l=>{const c=r.activeNamespaces.get(l);c!==void 0&&c>1?r.activeNamespaces.set(l,c-1):r.activeNamespaces.delete(l)})},getRequiredNamespaces(){return vs([...r.initialOptions.ns||[r.initialOptions.defaultNs],...Lt(r.initialOptions.fallbackNs),...r.activeNamespaces.keys()])},getFallbackLangs(s){const a=s||o.getLanguage();return a?vs([a,...zd(a,r.initialOptions.fallbackLanguage)]):[]},getFallbackNs(){return Lt(r.initialOptions.fallbackNs)},getDefaultNs(s){return s===void 0?r.initialOptions.defaultNs:s},getAvailableLanguages(){if(r.initialOptions.availableLanguages)return r.initialOptions.availableLanguages;if(r.initialOptions.staticData){const s=Object.keys(r.initialOptions.staticData).map(a=>Rr(a).language);return Array.from(new Set(s))}},withDefaultNs(s){return{namespace:s.namespace===void 0?o.getInitialOptions().defaultNs:s.namespace,language:s.language}},overrideCredentials(s){s?i=Object.assign(Object.assign({},s),{apiUrl:Qc(s.apiUrl)}):i=void 0}});return o}function ep(t){var{ns:e,noWrap:n,orEmpty:r,params:i,language:o}=t,s=tu(t,["ns","noWrap","orEmpty","params","language"]);return Object.assign(Object.assign({},{ns:e,noWrap:n,orEmpty:r,language:o}),{params:Object.assign({},s)})}const nu=(t,...e)=>{let n={},r;return typeof t=="object"?n=t:(n.key=t,typeof e[0]=="string"?(n.defaultValue=e[0],r=e[1]):typeof e[0]=="object"&&(r=e[0])),r&&(n=Object.assign(Object.assign({},ep(r)),n)),n};function tp({options:t}){const e=Wd(l,c),n=Ra(!1,()=>s.isFetching(),e.onFetchingChange.emit),r=Ra(!1,()=>m.isLoading(),e.onLoadingChange.emit),i=Xd(e.onLanguageChange,e.onPendingLanguageChange,e.onRunningChange),o=Qd(i.getLanguage,i.getInitialOptions,i.getAvailableLanguages,f,E,b,p,v),s=Zd(e.onCacheChange,o.getBackendRecord,o.getBackendDevRecord,i.withDefaultNs,i.isInitialLoading,n,r);t&&g(t);let a;e.onUpdate.listen(()=>{i.isRunning()&&o.retranslate()});function l(){return i.getFallbackNs()}function c(w){return i.getDefaultNs(w)}function f(w){return[...Lt(c(w)),...l()]}function d(w){return[...Lt(w??c()),...i.getRequiredNamespaces()]}function p(w,_,P){const M=i.withDefaultNs(w),O=s.getTranslation(M,_);return s.changeTranslation(M,_,P),{revert(){s.changeTranslation(M,_,O)}}}function v(w){e.onPermanentChange.emit({key:w.key,namespace:w.namespace})}function g(w){i.init(w),s.addStaticData(i.getInitialOptions().staticData)}function h(w,_){const P=i.getFallbackLangs(w),M=d(_),O=[];return P.forEach(k=>{M.forEach(I=>{s.exists({language:k,namespace:I},!0)||O.push({language:k,namespace:I})})}),O}function S(w,_){const P=h(w,_);if(P.length)return $i(m.loadRecords(P),()=>{})}function E({key:w,ns:_}){const P=i.getFallbackLangs(),M=f(_??void 0);return s.getTranslationNs(M,P,w)}function b({key:w,ns:_,language:P}){const M=f(_??void 0),O=i.getFallbackLangs(P);return s.getTranslationFallback(M,O,w)}function y(){const w=$i(x(),()=>S());if(ea(w))return i.setInitialLoading(!0),n.notify(),r.notify(),Promise.resolve(w).then(()=>{i.setInitialLoading(!1),n.notify(),r.notify(),e.onInitialLoaded.emit()});e.onInitialLoaded.emit()}function x(){if(i.getLanguage())return;const _=o.getInitialLanguage();return $i(_,P=>{const M=P||i.getInitialOptions().defaultLanguage;M&&i.setLanguage(M)})}function L(){if((o.getLanguageDetector()||o.getLanguageStorage())&&!i.getAvailableLanguages())throw new Error(Pa("availableLanguages"));if(!i.getLanguage()&&!i.getInitialOptions().defaultLanguage)throw new Error(Pa(["defaultLanguage","language"]))}const m=Object.freeze(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),i),o),s),{init:g,getTranslation:b,changeTranslation:p,getTranslationNs:E,getDefaultAndFallbackNs:f,async changeLanguage(w){i.getPendingLanguage()===w&&i.getLanguage()===w||(i.setPendingLanguage(w),i.isRunning()&&await S(w),w===i.getPendingLanguage()&&(i.setLanguage(w),o.setStoredLanguage(w)))},async addActiveNs(w,_){_||i.addActiveNs(w),i.isRunning()&&await S(void 0,w)},loadRecords(w){return s.loadRecords(w,m.isDev())},async loadRecord(w){return(await m.loadRecords([w]))[0]},isLoading(w){return s.isLoading(i.getLanguage(),w)},isLoaded(w){const _=i.getLanguage();if(!_)return!1;const P=i.getFallbackLangs(_),M=d(w),O=[];return P.forEach(k=>{M.forEach(I=>{s.exists({language:k,namespace:I})||O.push({language:k,namespace:I})})}),O.length===0},t:(...w)=>{const _=nu(...w),P=b(_);return o.formatTranslation(Object.assign(Object.assign({},_),{translation:P}))},isDev(){return!!(i.getInitialOptions().apiKey&&i.getInitialOptions().apiUrl)},run(){return L(),i.isRunning()||(i.setRunning(!0),o.run(),a=y()),Promise.resolve(a)},stop(){i.isRunning()&&(o.stop(),i.setRunning(!1))}}));return m}function np(t){const e=tp({options:t});e.isDev()&&e.invalidate();function n(i){const o=e.isRunning();o&&e.stop(),i(),e.isDev()&&e.invalidate(),o&&e.run()}const r=Object.freeze({on:e.on,onNsUpdate:e.onUpdate.listenSome,setEmitterActive:e.setEmitterActive,getLanguage:e.getLanguage,getPendingLanguage:e.getPendingLanguage,changeLanguage:e.changeLanguage,changeTranslation:e.changeTranslation,addActiveNs:e.addActiveNs,removeActiveNs:e.removeActiveNs,loadRecords:e.loadRecords,loadRecord:e.loadRecord,addStaticData:e.addStaticData,getRecord:e.getRecord,getAllRecords:e.getAllRecords,isLoaded:e.isLoaded,isInitialLoading:e.isInitialLoading,isLoading:e.isLoading,isFetching:e.isFetching,isRunning:e.isRunning,run:e.run,stop:e.stop,t:e.t,highlight:e.highlight,getInitialOptions:e.getInitialOptions,isDev:e.isDev,wrap:e.wrap,unwrap:e.unwrap,overrideCredentials(i){n(()=>e.overrideCredentials(i))},addPlugin(i){i&&n(()=>e.addPlugin(r,i))},updateOptions(i){i&&n(()=>e.init(i))}});return r}const rp=()=>{const t={plugins:[],options:{}},e=Object.freeze({use(n){return t.plugins.push(n),e},updateDefaults(n){return t.options=ys(t.options,n),e},init(n){const r=np(ys(t.options,n));return t.plugins.forEach(r.addPlugin),r}});return e},ru=0,bs=1,ip=2;class op extends Error{constructor(e,n,r){let i;e===ru?i="Empty parameter":e===bs?i="Unexpected character":i="Unexpected end",super(`Tolgee parser: ${i} at ${n} in "${r}"`),this.code=e,this.index=n}}function Ta(t){return/\s/.test(t)}const an=0,ws=1,Hi=2,$o=3,Ho=4,sp=new Set([Hi,ws,an]),Ss="'",ap=new Set(["{","}",Ss]),lp=t=>/[0-9a-zA-Z_]/.test(t);function cp(t){let e=an,n="",r="",i="";const o=[],s=[];let a=0;function l(p){throw new op(p,a,t)}const c=()=>{o.push(n),n=""},f=()=>{lp(i)||l(bs),r+=i},d=()=>{r===""&&l(ru),s.push(r),r=""};for(a=0;a<t.length;a++)switch(i=t[a],e){case an:i===Ss?(n+=i,e=ws):i==="{"?(c(),e=$o):(n+=i,e=an);break;case ws:ap.has(i)?(n=n.slice(0,-1)+i,e=Hi):(n+=i,e=an);break;case Hi:i===Ss?e=an:(n+=i,e=Hi);break;case $o:i==="}"?(d(),e=an):Ta(i)?r!==""&&(d(),e=Ho):(f(),e=$o);break;case Ho:i=="}"?e=an:Ta(i)?e=Ho:l(bs)}return sp.has(e)||l(ip),c(),[o,s]}function up(t,e){const[n,r]=cp(t),i=[n[0]];for(let o=1;o<n.length;o++){const s=e==null?void 0:e[r[o-1]];if(s===void 0)throw new Error(`Missing parameter "${r[o-1]}" in "${t}"`);i.push(String(s)),i.push(n[o])}return i.join("")}function fp(){return{format:({translation:t,params:e})=>up(t,e)}}const dp=()=>(t,e)=>(e.setFinalFormatter(fp()),t),pp="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";function hp(t){const e=pp.indexOf(t);if(e===-1)throw new Error("Invalid character found: "+t);return e}function gp(t){const e=new Uint8Array(t),n=e.length;let r="",i=Math.pow(2,16)-1;for(let o=0;o<n;o+=i)o+i>n&&(i=n-o),r+=String.fromCharCode.apply(null,e.subarray(o,o+i));return r}function vp(t){t=t.toUpperCase();const e=t.length;let n=0,r=0,i=0;const o=new Uint8Array(e*5/8|0);for(let s=0;s<e;s++)r=r<<5|hp(t[s]),n+=5,n>=8&&(o[i++]=r>>>n-8&255,n-=8);return gp(o.buffer)}function mp(t){if(t)try{const[e,n]=t.split("_");if(e==="tgpak"){const[r]=vp(n).split("_");return Number(r)}}catch{console.warn("Tolgee: Api key can't be parsed")}}function yp(t){if(!t)return;const[e]=t.split("_");return e==="tgpak"?"tgpak":e==="tgpat"?"tgpat":"legacy"}function bp(){return{getRecord({apiUrl:t,apiKey:e,language:n,namespace:r,projectId:i,fetch:o}){var s;const a=(s=mp(e))!==null&&s!==void 0?s:i;let l=a!==void 0?`${t}/v2/projects/${a}/translations/${n}`:`${t}/v2/projects/translations/${n}`;if(r&&(l+=`?ns=${r}`),yp(e)==="tgpat"&&i===void 0)throw new Error("You need to specify 'projectId' when using PAT key");return o(l,{headers:{"X-API-Key":e||"","Content-Type":"application/json"}}).then(c=>{if(c.ok)return c.json().then(f=>f[n]);throw new Error(c.statusText)})}}}const wp=()=>(t,e)=>(e.setDevBackend(bp()),t);function Sp(t,e){const n=r=>{var i,o;t.includes((i=r.data)===null||i===void 0?void 0:i.type)&&e((o=r.data)===null||o===void 0?void 0:o.data)};return window.addEventListener("message",n,!1),{unsubscribe(){window.removeEventListener("message",n)}}}function Ep({message:t,recievingMessage:e,data:n,attempts:r=1}){let i=!1;const o=()=>new Promise((a,l)=>{const c=Sp(e,d);window.postMessage({type:t,data:n},window.origin);const f=setTimeout(v,300);function d(g){clearTimeout(f),p(),a(g)}function p(){c.unsubscribe()}function v(){p(),l()}});return{cancel(){i=!0},promise:(async()=>{for(let a=0;a<r;a++){if(i)return new Promise(()=>{});try{return await o()}catch{continue}}if(!i)throw`Didn't recieve ${e.join(" or ")} in time.`;return new Promise(()=>{})})()}}function Lp(){let t;async function e(n){t==null||t();const{cancel:r,promise:i}=Ep({message:"TOLGEE_READY",recievingMessage:["TOLGEE_PLUGIN_READY","TOLGEE_PLUGIN_UPDATED"],data:n,attempts:4});return t=r,i}return{update:e}}const xp="tolgee-in-context-tools.umd.min.js",Cp="@tolgee/in-context-tools",_p="InContextTools",Op="https://cdn.jsdelivr.net/npm";function Mp(t){return new Promise((e,n)=>{const r=document.createElement("script");r.src=t,r.addEventListener("load",()=>e()),r.addEventListener("error",i=>n(i.error)),document.body.appendChild(r)})}let Go=null;function Pp(t){return Go||(Go=Mp(`${Op}/@tolgee/web@${t}/dist/${xp}`).then(()=>window[Cp][_p])),Go}const iu="__tolgee_apiKey",ou="__tolgee_apiUrl";function Aa(){const t=sessionStorage.getItem(iu)||void 0,e=sessionStorage.getItem(ou)||void 0;if(!(!t||!e))return{apiKey:t,apiUrl:e}}function kp(){sessionStorage.removeItem(iu),sessionStorage.removeItem(ou)}function Rp(t){document.readyState!=="loading"?Promise.resolve().then(()=>{t()}):document.addEventListener&&document.addEventListener("DOMContentLoaded",t)}let su=()=>t=>t;const Tp=()=>{if(typeof window>"u")return!1;try{return typeof sessionStorage<"u"&&sessionStorage}catch(t){return console.error("sessionStorage not available",t),!1}};Tp()&&(su=()=>t=>{const e=Lp(),n=()=>({uiPresent:!0,uiVersion:void 0,mode:t.isDev()?"development":"production",config:{apiUrl:t.getInitialOptions().apiUrl||"",apiKey:t.getInitialOptions().apiKey||""}}),r=async()=>{const o=await Pp("5.14.0");return s=>{const a=Aa();return s.addPlugin(o({credentials:a})),s}};return t.on("running",({value:o})=>{o&&Rp(()=>{e.update(n()).catch(kp)})}),Aa()&&r().then(o=>{t.addPlugin(o)}).catch(o=>{console.error("Tolgee: Failed to load in-context tools"),console.error(o)}),t});function Ap(){return rp().use(su())}const Dp={useSuspense:!0};let Wo;const au=()=>(Wo||(Wo=u.createContext(void 0)),Wo),Ip=({tolgee:t,options:e,children:n,fallback:r})=>{const[i,o]=u.useState(!t.isLoaded());u.useEffect(()=>{t.run().catch(l=>{console.error(l)}).finally(()=>{o(!1)})},[t]);const s=Object.assign(Object.assign({},Dp),e),a=au();return s.useSuspense?u.createElement(a.Provider,{value:{tolgee:t,options:s}},i?r:u.createElement(u.Suspense,{fallback:r||null},n)):u.createElement(a.Provider,{value:{tolgee:t,options:s}},i?r:n)};let jp;function Np(){return jp}const lu=()=>{const t=au(),e=u.useContext(t)||Np();if(!e)throw new Error("Couldn't find tolgee instance, did you forgot to use `TolgeeProvider`?");return e},cu=()=>{const[t,e]=u.useState(0),n=u.useCallback(()=>{e(r=>r+1)},[e]);return{instance:t,rerender:n}},uu=(t,e)=>{const{tolgee:n,options:r}=lu(),i=Yc(t),o=Lt(i).join(":"),s=Object.assign(Object.assign({},r),e),{rerender:a,instance:l}=cu(),c=u.useRef(),f=u.useRef([]);f.current=[];const d=g=>{var h;f.current.push(g),(h=c.current)===null||h===void 0||h.subscribeNs(g)},p=n.isLoaded(i);u.useEffect(()=>{const g=n.onNsUpdate(a);return c.current=g,g.subscribeNs(i),f.current.forEach(h=>{g.subscribeNs(h)}),()=>{g.unsubscribe()}},[o,n]),u.useEffect(()=>(n.addActiveNs(i),()=>n.removeActiveNs(i)),[o,n]);const v=u.useCallback(g=>{var h;const S=(h=g.ns)!==null&&h!==void 0?h:i==null?void 0:i[0];return d(S),n.t(Object.assign(Object.assign({},g),{ns:S}))},[n,l]);if(s.useSuspense&&!p)throw n.addActiveNs(i,!0);return{t:v,isLoading:!p}},jt=(t,e)=>{const{t:n,isLoading:r}=uu(t,e);return{t:u.useCallback((...o)=>{const s=nu(...o);return n(s)},[n]),isLoading:r}},Bp=t=>{if(!t)return;const e={};return Object.entries(t||{}).forEach(([n,r])=>{if(typeof r=="function")e[n]=i=>r(Es(i));else if(u.isValidElement(r)){const i=r;e[n]=o=>i.props.children===void 0&&(o!=null&&o.length)?u.cloneElement(i,{},Es(o)):u.cloneElement(i)}else e[n]=r}),e},Es=t=>Array.isArray(t)?u.Children.toArray(t):t,Up=t=>{const e=t.keyName||t.children;e===void 0&&console.error("T component: keyName not defined");const n=t.defaultValue||(t.keyName?t.children:void 0),r=Es(t.t({key:e,params:Bp(t.params),defaultValue:n,noWrap:t.noWrap,ns:t.ns,language:t.language}));return u.createElement(u.Fragment,null,r)},Rn=t=>{const{t:e}=uu();return u.createElement(Up,Object.assign({t:e},t))},Vp=t=>{const{tolgee:e}=lu(),{rerender:n}=cu();return u.useEffect(()=>{const r=t==null?void 0:t.map(i=>e.on(i,n));return()=>{r==null||r.forEach(i=>i.unsubscribe())}},[t==null?void 0:t.join(":")]),e};function Mo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Fp=function(t,e,n,r,i,o,s,a){if(!t){var l;if(e===void 0)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,o,s,a],f=0;l=new Error(e.replace(/%s/g,function(){return c[f++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}},zp=Fp;const Jt=Mo(zp);/*! *****************************************************************************
|
|
2
2
|
Copyright (c) Microsoft Corporation.
|
|
3
3
|
|
|
4
4
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -11,15 +11,15 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
11
11
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
12
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
13
|
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
-
***************************************************************************** */var
|
|
14
|
+
***************************************************************************** */var Ls=function(t,e){return Ls=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Ls(t,e)};function je(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Ls(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var ee=function(){return ee=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},ee.apply(this,arguments)};function ta(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function $p(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(f){try{c(r.next(f))}catch(d){s(d)}}function l(f){try{c(r.throw(f))}catch(d){s(d)}}function c(f){f.done?o(f.value):i(f.value).then(a,l)}c((r=r.apply(t,e||[])).next())})}function Hp(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(f){return l([c,f])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(f){c=[6,f],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function fu(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Gp=function(t,e,n,r,i,o,s,a){if(!t){var l;if(e===void 0)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,o,s,a],f=0;l=new Error(e.replace(/%s/g,function(){return c[f++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}},Wp=Gp,Ze=fu(Wp),ue=u.createContext(null);function Zp(){Ze(!!u.useContext,"useGoogleMap is React hook and requires React version 16.8+");var t=u.useContext(ue);return Ze(!!t,"useGoogleMap needs a GoogleMap available up in the tree"),t}function qp(t,e,n){return Object.keys(t).reduce(function(i,o){return e(i,t[o],o)},n)}function Kp(t,e){Object.keys(t).forEach(function(n){return e(t[n],n)})}function Jp(t,e,n,r){var i={},o=function(s,a){var l=n[a];l!==e[a]&&(i[a]=l,s(r,l))};return Kp(t,o),i}function Yp(t,e,n){var r=qp(n,function(o,s,a){return typeof t[a]=="function"&&o.push(google.maps.event.addListener(e,s,t[a])),o},[]);return r}function Qp(t){google.maps.event.removeListener(t)}function ve(t){t===void 0&&(t=[]),t.forEach(Qp)}function pe(t){var e=t.updaterMap,n=t.eventMap,r=t.prevProps,i=t.nextProps,o=t.instance,s=Yp(i,o,n);return Jp(e,r,i,o),s}var Da={onDblClick:"dblclick",onDragEnd:"dragend",onDragStart:"dragstart",onMapTypeIdChanged:"maptypeid_changed",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseDown:"mousedown",onMouseUp:"mouseup",onRightClick:"rightclick",onTilesLoaded:"tilesloaded",onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onDrag:"drag",onHeadingChanged:"heading_changed",onIdle:"idle",onProjectionChanged:"projection_changed",onResize:"resize",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed"},Ia={extraMapTypes:function(t,e){e.forEach(function(r,i){t.mapTypes.set(String(i),r)})},center:function(t,e){t.setCenter(e)},clickableIcons:function(t,e){t.setClickableIcons(e)},heading:function(t,e){t.setHeading(e)},mapTypeId:function(t,e){t.setMapTypeId(e)},options:function(t,e){t.setOptions(e)},streetView:function(t,e){t.setStreetView(e)},tilt:function(t,e){t.setTilt(e)},zoom:function(t,e){t.setZoom(e)}};function Xp(t){var e=t.children,n=t.options,r=t.id,i=t.mapContainerStyle,o=t.mapContainerClassName,s=t.center,a=t.onClick,l=t.onDblClick,c=t.onDrag,f=t.onDragEnd,d=t.onDragStart,p=t.onMouseMove,v=t.onMouseOut,g=t.onMouseOver,h=t.onMouseDown,S=t.onMouseUp,E=t.onRightClick,b=t.onCenterChanged,y=t.onLoad,x=t.onUnmount,L=u.useState(null),m=L[0],w=L[1],_=u.useRef(null),P=u.useState(null),M=P[0],O=P[1],k=u.useState(null),I=k[0],B=k[1],H=u.useState(null),Z=H[0],F=H[1],K=u.useState(null),A=K[0],R=K[1],T=u.useState(null),V=T[0],z=T[1],$=u.useState(null),X=$[0],N=$[1],D=u.useState(null),W=D[0],q=D[1],te=u.useState(null),re=te[0],ie=te[1],fe=u.useState(null),Oe=fe[0],me=fe[1],ye=u.useState(null),Me=ye[0],Pe=ye[1],Te=u.useState(null),se=Te[0],ae=Te[1],ze=u.useState(null),Je=ze[0],Y=ze[1];return u.useEffect(function(){n&&m!==null&&m.setOptions(n)},[m,n]),u.useEffect(function(){m!==null&&typeof s<"u"&&m.setCenter(s)},[m,s]),u.useEffect(function(){m&&l&&(I!==null&&google.maps.event.removeListener(I),B(google.maps.event.addListener(m,"dblclick",l)))},[l]),u.useEffect(function(){m&&f&&(Z!==null&&google.maps.event.removeListener(Z),F(google.maps.event.addListener(m,"dragend",f)))},[f]),u.useEffect(function(){m&&d&&(A!==null&&google.maps.event.removeListener(A),R(google.maps.event.addListener(m,"dragstart",d)))},[d]),u.useEffect(function(){m&&h&&(V!==null&&google.maps.event.removeListener(V),z(google.maps.event.addListener(m,"mousedown",h)))},[h]),u.useEffect(function(){m&&p&&(X!==null&&google.maps.event.removeListener(X),N(google.maps.event.addListener(m,"mousemove",p)))},[p]),u.useEffect(function(){m&&v&&(W!==null&&google.maps.event.removeListener(W),q(google.maps.event.addListener(m,"mouseout",v)))},[v]),u.useEffect(function(){m&&g&&(re!==null&&google.maps.event.removeListener(re),ie(google.maps.event.addListener(m,"mouseover",g)))},[g]),u.useEffect(function(){m&&S&&(Oe!==null&&google.maps.event.removeListener(Oe),me(google.maps.event.addListener(m,"mouseup",S)))},[S]),u.useEffect(function(){m&&E&&(Me!==null&&google.maps.event.removeListener(Me),Pe(google.maps.event.addListener(m,"rightclick",E)))},[E]),u.useEffect(function(){m&&a&&(se!==null&&google.maps.event.removeListener(se),ae(google.maps.event.addListener(m,"click",a)))},[a]),u.useEffect(function(){m&&c&&(Je!==null&&google.maps.event.removeListener(Je),Y(google.maps.event.addListener(m,"drag",c)))},[c]),u.useEffect(function(){m&&b&&(M!==null&&google.maps.event.removeListener(M),O(google.maps.event.addListener(m,"center_changed",b)))},[a]),u.useEffect(function(){var $e=_.current===null?null:new google.maps.Map(_.current,n);return w($e),$e!==null&&y&&y($e),function(){$e!==null&&x&&x($e)}},[]),C.jsx("div",{id:r,ref:_,style:i,className:o,children:C.jsx(ue.Provider,{value:m,children:m!==null?e:C.jsx(C.Fragment,{})})})}u.memo(Xp);var eh=function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={map:null},n.registeredEvents=[],n.mapRef=null,n.getInstance=function(){return n.mapRef===null?null:new google.maps.Map(n.mapRef,n.props.options)},n.panTo=function(r){var i=n.getInstance();i&&i.panTo(r)},n.setMapCallback=function(){n.state.map!==null&&n.props.onLoad&&n.props.onLoad(n.state.map)},n.getRef=function(r){n.mapRef=r},n}return e.prototype.componentDidMount=function(){var n=this.getInstance();this.registeredEvents=pe({updaterMap:Ia,eventMap:Da,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{map:n}},this.setMapCallback)},e.prototype.componentDidUpdate=function(n){this.state.map!==null&&(ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:Ia,eventMap:Da,prevProps:n,nextProps:this.props,instance:this.state.map}))},e.prototype.componentWillUnmount=function(){this.state.map!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.map),ve(this.registeredEvents))},e.prototype.render=function(){return C.jsx("div",{id:this.props.id,ref:this.getRef,style:this.props.mapContainerStyle,className:this.props.mapContainerClassName,children:C.jsx(ue.Provider,{value:this.state.map,children:this.state.map!==null?this.props.children:C.jsx(C.Fragment,{})})})},e}(u.PureComponent),hn=typeof document<"u";function du(t){var e=t.url,n=t.id,r=t.nonce;return hn?new Promise(function(o,s){var a=document.getElementById(n),l=window;if(a){var c=a.getAttribute("data-state");if(a.src===e&&c!=="error"){if(c==="ready")return o(n);var f=l.initMap,d=a.onerror;l.initMap=function(){f&&f(),o(n)},a.onerror=function(v){d&&d(v),s(v)};return}else a.remove()}var p=document.createElement("script");p.type="text/javascript",p.src=e,p.id=n,p.async=!0,p.nonce=r||"",p.onerror=function(g){p.setAttribute("data-state","error"),s(g)},l.initMap=function(){p.setAttribute("data-state","ready"),o(n)},document.head.appendChild(p)}).catch(function(i){throw console.error("injectScript error: ",i),i}):Promise.reject(new Error("document is undefined"))}function ja(t){var e=t.href;return e&&(e.indexOf("https://fonts.googleapis.com/css?family=Roboto")===0||e.indexOf("https://fonts.googleapis.com/css?family=Google+Sans+Text")===0)?!0:t.tagName.toLowerCase()==="style"&&t.styleSheet&&t.styleSheet.cssText&&t.styleSheet.cssText.replace(`\r
|
|
15
15
|
`,"").indexOf(".gm-style")===0?(t.styleSheet.cssText="",!0):t.tagName.toLowerCase()==="style"&&t.innerHTML&&t.innerHTML.replace(`\r
|
|
16
|
-
`,"").indexOf(".gm-style")===0?(t.innerHTML="",!0):t.tagName.toLowerCase()==="style"&&!t.styleSheet&&!t.innerHTML}function na(){var t=document.getElementsByTagName("head")[0];if(t){var e=t.insertBefore.bind(t);t.insertBefore=function(i,o){return ja(i)||Reflect.apply(e,t,[i,o]),i};var n=t.appendChild.bind(t);t.appendChild=function(i){return ja(i)||Reflect.apply(n,t,[i]),i}}}function pu(t){var e=t.googleMapsApiKey,n=t.googleMapsClientId,r=t.version,i=r===void 0?"weekly":r,o=t.language,s=t.region,a=t.libraries,l=t.channel,c=t.mapIds,f=t.authReferrerPolicy,d=[];return Ze(e&&n||!(e&&n),"You need to specify either googleMapsApiKey or googleMapsClientId for @react-google-maps/api load script to work. You cannot use both at the same time."),e?d.push("key=".concat(e)):n&&d.push("client=".concat(n)),i&&d.push("v=".concat(i)),o&&d.push("language=".concat(o)),s&&d.push("region=".concat(s)),a&&a.length&&d.push("libraries=".concat(a.sort().join(","))),l&&d.push("channel=".concat(l)),c&&c.length&&d.push("map_ids=".concat(c.join(","))),f&&d.push("auth_referrer_policy=".concat(f)),d.push("callback=initMap"),"https://maps.googleapis.com/maps/api/js?".concat(d.join("&"))}var wr=!1;function hu(){return C.jsx("div",{children:"Loading..."})}var
|
|
16
|
+
`,"").indexOf(".gm-style")===0?(t.innerHTML="",!0):t.tagName.toLowerCase()==="style"&&!t.styleSheet&&!t.innerHTML}function na(){var t=document.getElementsByTagName("head")[0];if(t){var e=t.insertBefore.bind(t);t.insertBefore=function(i,o){return ja(i)||Reflect.apply(e,t,[i,o]),i};var n=t.appendChild.bind(t);t.appendChild=function(i){return ja(i)||Reflect.apply(n,t,[i]),i}}}function pu(t){var e=t.googleMapsApiKey,n=t.googleMapsClientId,r=t.version,i=r===void 0?"weekly":r,o=t.language,s=t.region,a=t.libraries,l=t.channel,c=t.mapIds,f=t.authReferrerPolicy,d=[];return Ze(e&&n||!(e&&n),"You need to specify either googleMapsApiKey or googleMapsClientId for @react-google-maps/api load script to work. You cannot use both at the same time."),e?d.push("key=".concat(e)):n&&d.push("client=".concat(n)),i&&d.push("v=".concat(i)),o&&d.push("language=".concat(o)),s&&d.push("region=".concat(s)),a&&a.length&&d.push("libraries=".concat(a.sort().join(","))),l&&d.push("channel=".concat(l)),c&&c.length&&d.push("map_ids=".concat(c.join(","))),f&&d.push("auth_referrer_policy=".concat(f)),d.push("callback=initMap"),"https://maps.googleapis.com/maps/api/js?".concat(d.join("&"))}var wr=!1;function hu(){return C.jsx("div",{children:"Loading..."})}var Xr={id:"script-loader",version:"weekly"};(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.check=u.createRef(),n.state={loaded:!1},n.cleanupCallback=function(){delete window.google.maps,n.injectScript()},n.isCleaningUp=function(){return $p(n,void 0,void 0,function(){function r(i){if(!wr)i();else if(hn)var o=window.setInterval(function(){wr||(window.clearInterval(o),i())},1)}return Hp(this,function(i){return[2,new Promise(r)]})})},n.cleanup=function(){wr=!0;var r=document.getElementById(n.props.id);r&&r.parentNode&&r.parentNode.removeChild(r),Array.prototype.slice.call(document.getElementsByTagName("script")).filter(function(o){return typeof o.src=="string"&&o.src.includes("maps.googleapis")}).forEach(function(o){o.parentNode&&o.parentNode.removeChild(o)}),Array.prototype.slice.call(document.getElementsByTagName("link")).filter(function(o){return o.href==="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans"}).forEach(function(o){o.parentNode&&o.parentNode.removeChild(o)}),Array.prototype.slice.call(document.getElementsByTagName("style")).filter(function(o){return o.innerText!==void 0&&o.innerText.length>0&&o.innerText.includes(".gm-")}).forEach(function(o){o.parentNode&&o.parentNode.removeChild(o)})},n.injectScript=function(){n.props.preventGoogleFontsLoading&&na(),Ze(!!n.props.id,'LoadScript requires "id" prop to be a string: %s',n.props.id);var r={id:n.props.id,nonce:n.props.nonce,url:pu(n.props)};du(r).then(function(){n.props.onLoad&&n.props.onLoad(),n.setState(function(){return{loaded:!0}})}).catch(function(i){n.props.onError&&n.props.onError(i),console.error(`
|
|
17
17
|
There has been an Error with loading Google Maps API script, please check that you provided correct google API key (`.concat(n.props.googleMapsApiKey||"-",") or Client ID (").concat(n.props.googleMapsClientId||"-",`) to <LoadScript />
|
|
18
18
|
Otherwise it is a Network issue.
|
|
19
|
-
`))})},n}return e.prototype.componentDidMount=function(){if(hn){if(window.google&&window.google.maps&&!wr){console.error("google api is already presented");return}this.isCleaningUp().then(this.injectScript).catch(function(r){console.error("Error at injecting script after cleaning up: ",r)})}},e.prototype.componentDidUpdate=function(n){this.props.libraries!==n.libraries&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),hn&&n.language!==this.props.language&&(this.cleanup(),this.setState(function(){return{loaded:!1}},this.cleanupCallback))},e.prototype.componentWillUnmount=function(){var n=this;if(hn){this.cleanup();var r=function(){n.check.current||(delete window.google,wr=!1)};window.setTimeout(r,1),this.props.onUnmount&&this.props.onUnmount()}},e.prototype.render=function(){return C.jsxs(C.Fragment,{children:[C.jsx("div",{ref:this.check}),this.state.loaded?this.props.children:this.props.loadingElement||C.jsx(hu,{})]})},e.defaultProps=
|
|
19
|
+
`))})},n}return e.prototype.componentDidMount=function(){if(hn){if(window.google&&window.google.maps&&!wr){console.error("google api is already presented");return}this.isCleaningUp().then(this.injectScript).catch(function(r){console.error("Error at injecting script after cleaning up: ",r)})}},e.prototype.componentDidUpdate=function(n){this.props.libraries!==n.libraries&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),hn&&n.language!==this.props.language&&(this.cleanup(),this.setState(function(){return{loaded:!1}},this.cleanupCallback))},e.prototype.componentWillUnmount=function(){var n=this;if(hn){this.cleanup();var r=function(){n.check.current||(delete window.google,wr=!1)};window.setTimeout(r,1),this.props.onUnmount&&this.props.onUnmount()}},e.prototype.render=function(){return C.jsxs(C.Fragment,{children:[C.jsx("div",{ref:this.check}),this.state.loaded?this.props.children:this.props.loadingElement||C.jsx(hu,{})]})},e.defaultProps=Xr,e})(u.PureComponent);var Na;function th(t){var e=t.id,n=e===void 0?Xr.id:e,r=t.version,i=r===void 0?Xr.version:r,o=t.nonce,s=t.googleMapsApiKey,a=t.googleMapsClientId,l=t.language,c=t.region,f=t.libraries,d=t.preventGoogleFontsLoading,p=t.channel,v=t.mapIds,g=t.authReferrerPolicy,h=u.useRef(!1),S=u.useState(!1),E=S[0],b=S[1],y=u.useState(void 0),x=y[0],L=y[1];u.useEffect(function(){return h.current=!0,function(){h.current=!1}},[]),u.useEffect(function(){hn&&d&&na()},[d]),u.useEffect(function(){E&&Ze(!!window.google,"useLoadScript was marked as loaded, but window.google is not present. Something went wrong.")},[E]);var m=pu({version:i,googleMapsApiKey:s,googleMapsClientId:a,language:l,region:c,libraries:f,channel:p,mapIds:v,authReferrerPolicy:g});u.useEffect(function(){if(!hn)return;function P(){h.current&&(b(!0),Na=m)}if(window.google&&window.google.maps&&Na===m){P();return}du({id:n,url:m,nonce:o}).then(P).catch(function(O){h.current&&L(O),console.warn(`
|
|
20
20
|
There has been an Error with loading Google Maps API script, please check that you provided correct google API key (`.concat(s||"-",") or Client ID (").concat(a||"-",`)
|
|
21
21
|
Otherwise it is a Network issue.
|
|
22
|
-
`)),console.error(O)})},[n,m,o]);var w=u.useRef();return u.useEffect(function(){w.current&&f!==w.current&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),w.current=f},[f]),{isLoaded:
|
|
22
|
+
`)),console.error(O)})},[n,m,o]);var w=u.useRef();return u.useEffect(function(){w.current&&f!==w.current&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),w.current=f},[f]),{isLoaded:E,loadError:x,url:m}}var nh=C.jsx(hu,{});function rh(t){var e=t.loadingElement,n=t.onLoad,r=t.onError,i=t.onUnmount,o=t.children,s=ta(t,["loadingElement","onLoad","onError","onUnmount","children"]),a=th(s),l=a.isLoaded,c=a.loadError;return u.useEffect(function(){l&&typeof n=="function"&&n()},[l,n]),u.useEffect(function(){c&&typeof r=="function"&&r(c)},[c,r]),u.useEffect(function(){return function(){i&&i()}},[i]),l?o:e||nh}u.memo(rh);/*! *****************************************************************************
|
|
23
23
|
Copyright (c) Microsoft Corporation.
|
|
24
24
|
|
|
25
25
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -32,7 +32,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
32
32
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
33
33
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
34
34
|
PERFORMANCE OF THIS SOFTWARE.
|
|
35
|
-
***************************************************************************** */function ih(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(f){try{c(r.next(f))}catch(d){s(d)}}function l(f){try{c(r.throw(f))}catch(d){s(d)}}function c(f){f.done?o(f.value):i(f.value).then(a,l)}c((r=r.apply(t,e||[])).next())})}var oh=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n};const Ba="__googleMapsScriptId";var Yn;(function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"})(Yn||(Yn={}));class Pn{constructor({apiKey:e,authReferrerPolicy:n,channel:r,client:i,id:o=Ba,language:s,libraries:a=[],mapIds:l,nonce:c,region:f,retries:d=3,url:p="https://maps.googleapis.com/maps/api/js",version:v}){if(this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=e,this.authReferrerPolicy=n,this.channel=r,this.client=i,this.id=o||Ba,this.language=s,this.libraries=a,this.mapIds=l,this.nonce=c,this.region=f,this.retries=d,this.url=p,this.version=v,Pn.instance){if(!oh(this.options,Pn.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(Pn.instance.options)}`);return Pn.instance}Pn.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?Yn.FAILURE:this.done?Yn.SUCCESS:this.loading?Yn.LOADING:Yn.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let e=this.url;return e+="?callback=__googleMapsCallback",this.apiKey&&(e+=`&key=${this.apiKey}`),this.channel&&(e+=`&channel=${this.channel}`),this.client&&(e+=`&client=${this.client}`),this.libraries.length>0&&(e+=`&libraries=${this.libraries.join(",")}`),this.language&&(e+=`&language=${this.language}`),this.region&&(e+=`®ion=${this.region}`),this.version&&(e+=`&v=${this.version}`),this.mapIds&&(e+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(e+=`&auth_referrer_policy=${this.authReferrerPolicy}`),e}deleteScript(){const e=document.getElementById(this.id);e&&e.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise((e,n)=>{this.loadCallback(r=>{r?n(r.error):e(window.google)})})}importLibrary(e){return this.execute(),google.maps.importLibrary(e)}loadCallback(e){this.callbacks.push(e),this.execute()}setScript(){var e,n;if(document.getElementById(this.id)){this.callback();return}const r={key:this.apiKey,channel:this.channel,client:this.client,libraries:this.libraries.length&&this.libraries,v:this.version,mapIds:this.mapIds,language:this.language,region:this.region,authReferrerPolicy:this.authReferrerPolicy};Object.keys(r).forEach(o=>!r[o]&&delete r[o]),!((n=(e=window==null?void 0:window.google)===null||e===void 0?void 0:e.maps)===null||n===void 0)&&n.importLibrary||(o=>{let s,a,l,c="The Google Maps JavaScript API",f="google",d="importLibrary",p="__ib__",v=document,g=window;g=g[f]||(g[f]={});const h=g.maps||(g.maps={}),S=new Set,L=new URLSearchParams,b=()=>s||(s=new Promise((y,x)=>ih(this,void 0,void 0,function*(){var E;yield a=v.createElement("script"),a.id=this.id,L.set("libraries",[...S]+"");for(l in o)L.set(l.replace(/[A-Z]/g,m=>"_"+m[0].toLowerCase()),o[l]);L.set("callback",f+".maps."+p),a.src=this.url+"?"+L,h[p]=y,a.onerror=()=>s=x(Error(c+" could not load.")),a.nonce=this.nonce||((E=v.querySelector("script[nonce]"))===null||E===void 0?void 0:E.nonce)||"",v.head.append(a)})));h[d]?console.warn(c+" only loads once. Ignoring:",o):h[d]=(y,...x)=>S.add(y)&&b().then(()=>h[d](y,...x))})(r);const i=this.libraries.map(o=>this.importLibrary(o));i.length||i.push(this.importLibrary("core")),Promise.all(i).then(()=>this.callback(),o=>{const s=new ErrorEvent("error",{error:o});this.loadErrorCallback(s)})}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(e){if(this.errors.push(e),this.errors.length<=this.retries){const n=this.errors.length*Math.pow(2,this.errors.length);console.error(`Failed to load Google Maps script, retrying in ${n} ms.`),setTimeout(()=>{this.deleteScript(),this.setScript()},n)}else this.onerrorEvent=e,this.callback()}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach(e=>{e(this.onerrorEvent)}),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version){console.warn("Google Maps already loaded outside @googlemaps/js-api-loader.This may result in undesirable behavior as options and script parameters may not match."),this.callback();return}this.loading||(this.loading=!0,this.setScript())}}}var sh=["maps"];function ah(t){var e=t.id,n=e===void 0?Qr.id:e,r=t.version,i=r===void 0?Qr.version:r,o=t.nonce,s=t.googleMapsApiKey,a=t.language,l=t.region,c=t.libraries,f=c===void 0?sh:c,d=t.preventGoogleFontsLoading,p=t.mapIds,v=t.authReferrerPolicy,g=u.useRef(!1),h=u.useState(!1),S=h[0],L=h[1],b=u.useState(void 0),y=b[0],x=b[1];u.useEffect(function(){return g.current=!0,function(){g.current=!1}},[]);var E=u.useMemo(function(){return new Pn({id:n,apiKey:s,version:i,libraries:f,language:a||"en",region:l||"US",mapIds:p||[],nonce:o||"",authReferrerPolicy:v||"origin"})},[n,s,i,f,a,l,p,o,v]);u.useEffect(function(){S||E.load().then(function(){g.current&&L(!0)}).catch(function(_){x(_)})},[]),u.useEffect(function(){hn&&d&&na()},[d]);var m=u.useRef();return u.useEffect(function(){m.current&&f!==m.current&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),m.current=f},[f]),{isLoaded:S,loadError:y}}var Ua={},Va={options:function(t,e){t.setOptions(e)}};function lh(t){var e=t.options,n=t.onLoad,r=t.onUnmount,i=u.useContext(ue),o=u.useState(null),s=o[0],a=o[1];return u.useEffect(function(){s!==null&&s.setMap(i)},[i]),u.useEffect(function(){e&&s!==null&&s.setOptions(e)},[s,e]),u.useEffect(function(){var l=new google.maps.TrafficLayer(ee(ee({},e||{}),{map:i}));return a(l),n&&n(l),function(){s!==null&&(r&&r(s),s.setMap(null))}},[]),null}u.memo(lh);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={trafficLayer:null},n.setTrafficLayerCallback=function(){n.state.trafficLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.trafficLayer)},n.registeredEvents=[],n}return e.prototype.componentDidMount=function(){var n=new google.maps.TrafficLayer(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=pe({updaterMap:Va,eventMap:Ua,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{trafficLayer:n}},this.setTrafficLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.trafficLayer!==null&&(ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:Va,eventMap:Ua,prevProps:n,nextProps:this.props,instance:this.state.trafficLayer}))},e.prototype.componentWillUnmount=function(){this.state.trafficLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),ve(this.registeredEvents),this.state.trafficLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e})(u.PureComponent);function ch(t){var e=t.onLoad,n=t.onUnmount,r=u.useContext(ue),i=u.useState(null),o=i[0],s=i[1];return u.useEffect(function(){o!==null&&o.setMap(r)},[r]),u.useEffect(function(){var a=new google.maps.BicyclingLayer;return s(a),a.setMap(r),e&&e(a),function(){a!==null&&(n&&n(a),a.setMap(null))}},[]),null}u.memo(ch);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={bicyclingLayer:null},n.setBicyclingLayerCallback=function(){n.state.bicyclingLayer!==null&&(n.state.bicyclingLayer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.bicyclingLayer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.BicyclingLayer;this.setState(function(){return{bicyclingLayer:n}},this.setBicyclingLayerCallback)},e.prototype.componentWillUnmount=function(){this.state.bicyclingLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e})(u.PureComponent);function uh(t){var e=t.onLoad,n=t.onUnmount,r=u.useContext(ue),i=u.useState(null),o=i[0],s=i[1];return u.useEffect(function(){o!==null&&o.setMap(r)},[r]),u.useEffect(function(){var a=new google.maps.TransitLayer;return s(a),a.setMap(r),e&&e(a),function(){o!==null&&(n&&n(o),o.setMap(null))}},[]),null}u.memo(uh);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={transitLayer:null},n.setTransitLayerCallback=function(){n.state.transitLayer!==null&&(n.state.transitLayer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.transitLayer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.TransitLayer;this.setState(function(){return{transitLayer:n}},this.setTransitLayerCallback)},e.prototype.componentWillUnmount=function(){this.state.transitLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.transitLayer),this.state.transitLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e})(u.PureComponent);var Fa={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},za={drawingMode:function(t,e){t.setDrawingMode(e)},options:function(t,e){t.setOptions(e)}};function fh(t){var e=t.options,n=t.drawingMode,r=t.onCircleComplete,i=t.onMarkerComplete,o=t.onOverlayComplete,s=t.onPolygonComplete,a=t.onPolylineComplete,l=t.onRectangleComplete,c=t.onLoad,f=t.onUnmount,d=u.useContext(ue),p=u.useState(null),v=p[0],g=p[1],h=u.useState(null),S=h[0],L=h[1],b=u.useState(null),y=b[0],x=b[1],E=u.useState(null),m=E[0],w=E[1],_=u.useState(null),P=_[0],M=_[1],O=u.useState(null),k=O[0],I=O[1],B=u.useState(null),H=B[0],Z=B[1];return u.useEffect(function(){v!==null&&v.setMap(d)},[d]),u.useEffect(function(){e&&v!==null&&v.setOptions(e)},[v,e]),u.useEffect(function(){n&&v!==null&&v.setDrawingMode(n)},[v,n]),u.useEffect(function(){v&&r&&(S!==null&&google.maps.event.removeListener(S),L(google.maps.event.addListener(v,"circlecomplete",r)))},[v,r]),u.useEffect(function(){v&&i&&(y!==null&&google.maps.event.removeListener(y),x(google.maps.event.addListener(v,"markercomplete",i)))},[v,i]),u.useEffect(function(){v&&o&&(m!==null&&google.maps.event.removeListener(m),w(google.maps.event.addListener(v,"overlaycomplete",o)))},[v,o]),u.useEffect(function(){v&&s&&(P!==null&&google.maps.event.removeListener(P),M(google.maps.event.addListener(v,"polygoncomplete",s)))},[v,s]),u.useEffect(function(){v&&a&&(k!==null&&google.maps.event.removeListener(k),I(google.maps.event.addListener(v,"polylinecomplete",a)))},[v,a]),u.useEffect(function(){v&&l&&(H!==null&&google.maps.event.removeListener(H),Z(google.maps.event.addListener(v,"rectanglecomplete",l)))},[v,l]),u.useEffect(function(){Ze(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing);var F=new google.maps.drawing.DrawingManager(ee(ee({},e||{}),{map:d}));return n&&F.setDrawingMode(n),r&&L(google.maps.event.addListener(F,"circlecomplete",r)),i&&x(google.maps.event.addListener(F,"markercomplete",i)),o&&w(google.maps.event.addListener(F,"overlaycomplete",o)),s&&M(google.maps.event.addListener(F,"polygoncomplete",s)),a&&I(google.maps.event.addListener(F,"polylinecomplete",a)),l&&Z(google.maps.event.addListener(F,"rectanglecomplete",l)),g(F),c&&c(F),function(){v!==null&&(S&&google.maps.event.removeListener(S),y&&google.maps.event.removeListener(y),m&&google.maps.event.removeListener(m),P&&google.maps.event.removeListener(P),k&&google.maps.event.removeListener(k),H&&google.maps.event.removeListener(H),f&&f(v),v.setMap(null))}},[]),null}u.memo(fh);(function(t){je(e,t);function e(n){var r=t.call(this,n)||this;return r.registeredEvents=[],r.state={drawingManager:null},r.setDrawingManagerCallback=function(){r.state.drawingManager!==null&&r.props.onLoad&&r.props.onLoad(r.state.drawingManager)},Ze(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing),r}return e.prototype.componentDidMount=function(){var n=new google.maps.drawing.DrawingManager(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=pe({updaterMap:za,eventMap:Fa,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{drawingManager:n}},this.setDrawingManagerCallback)},e.prototype.componentDidUpdate=function(n){this.state.drawingManager!==null&&(ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:za,eventMap:Fa,prevProps:n,nextProps:this.props,instance:this.state.drawingManager}))},e.prototype.componentWillUnmount=function(){this.state.drawingManager!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),ve(this.registeredEvents),this.state.drawingManager.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e})(u.PureComponent);var $a={onAnimationChanged:"animation_changed",onClick:"click",onClickableChanged:"clickable_changed",onCursorChanged:"cursor_changed",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDraggableChanged:"draggable_changed",onDragStart:"dragstart",onFlatChanged:"flat_changed",onIconChanged:"icon_changed",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onPositionChanged:"position_changed",onRightClick:"rightclick",onShapeChanged:"shape_changed",onTitleChanged:"title_changed",onVisibleChanged:"visible_changed",onZindexChanged:"zindex_changed"},Ha={animation:function(t,e){t.setAnimation(e)},clickable:function(t,e){t.setClickable(e)},cursor:function(t,e){t.setCursor(e)},draggable:function(t,e){t.setDraggable(e)},icon:function(t,e){t.setIcon(e)},label:function(t,e){t.setLabel(e)},map:function(t,e){t.setMap(e)},opacity:function(t,e){t.setOpacity(e)},options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},shape:function(t,e){t.setShape(e)},title:function(t,e){t.setTitle(e)},visible:function(t,e){t.setVisible(e)},zIndex:function(t,e){t.setZIndex(e)}},ao={};function dh(t){var e=t.position,n=t.options,r=t.clusterer,i=t.noClustererRedraw,o=t.children,s=t.draggable,a=t.visible,l=t.animation,c=t.clickable,f=t.cursor,d=t.icon,p=t.label,v=t.opacity,g=t.shape,h=t.title,S=t.zIndex,L=t.onClick,b=t.onDblClick,y=t.onDrag,x=t.onDragEnd,E=t.onDragStart,m=t.onMouseOut,w=t.onMouseOver,_=t.onMouseUp,P=t.onMouseDown,M=t.onRightClick,O=t.onClickableChanged,k=t.onCursorChanged,I=t.onAnimationChanged,B=t.onDraggableChanged,H=t.onFlatChanged,Z=t.onIconChanged,F=t.onPositionChanged,K=t.onShapeChanged,A=t.onTitleChanged,R=t.onVisibleChanged,T=t.onZindexChanged,V=t.onLoad,z=t.onUnmount,$=u.useContext(ue),Q=u.useState(null),N=Q[0],D=Q[1],W=u.useState(null),q=W[0],te=W[1],re=u.useState(null),ie=re[0],fe=re[1],Oe=u.useState(null),me=Oe[0],ye=Oe[1],Me=u.useState(null),Pe=Me[0],Te=Me[1],se=u.useState(null),ae=se[0],ze=se[1],Ye=u.useState(null),J=Ye[0],$e=Ye[1],Ne=u.useState(null),ft=Ne[0],ot=Ne[1],le=u.useState(null),bn=le[0],pi=le[1],_t=u.useState(null),Ht=_t[0],hi=_t[1],U=u.useState(null),ne=U[0],Y=U[1],he=u.useState(null),Ae=he[0],Ee=he[1],De=u.useState(null),ke=De[0],Be=De[1],ce=u.useState(null),be=ce[0],ct=ce[1],Gt=u.useState(null),st=Gt[0],qe=Gt[1],dt=u.useState(null),pt=dt[0],Xe=dt[1],Nt=u.useState(null),Ot=Nt[0],ht=Nt[1],Qt=u.useState(null),Wt=Qt[0],hr=Qt[1],gr=u.useState(null),Vn=gr[0],vr=gr[1],Fn=u.useState(null),wn=Fn[0],mr=Fn[1],en=u.useState(null),Sn=en[0],Ln=en[1],En=u.useState(null),xn=En[0],yr=En[1];u.useEffect(function(){N!==null&&N.setMap($)},[$]),u.useEffect(function(){typeof n<"u"&&N!==null&&N.setOptions(n)},[N,n]),u.useEffect(function(){typeof s<"u"&&N!==null&&N.setDraggable(s)},[N,s]),u.useEffect(function(){e&&N!==null&&N.setPosition(e)},[N,e]),u.useEffect(function(){typeof a<"u"&&N!==null&&N.setVisible(a)},[N,a]),u.useEffect(function(){N==null||N.setAnimation(l)},[N,l]),u.useEffect(function(){N&&b&&(q!==null&&google.maps.event.removeListener(q),te(google.maps.event.addListener(N,"dblclick",b)))},[b]),u.useEffect(function(){N&&x&&(ie!==null&&google.maps.event.removeListener(ie),fe(google.maps.event.addListener(N,"dragend",x)))},[x]),u.useEffect(function(){N&&E&&(me!==null&&google.maps.event.removeListener(me),ye(google.maps.event.addListener(N,"dragstart",E)))},[E]),u.useEffect(function(){N&&P&&(Pe!==null&&google.maps.event.removeListener(Pe),Te(google.maps.event.addListener(N,"mousedown",P)))},[P]),u.useEffect(function(){N&&m&&(ae!==null&&google.maps.event.removeListener(ae),ze(google.maps.event.addListener(N,"mouseout",m)))},[m]),u.useEffect(function(){N&&w&&(J!==null&&google.maps.event.removeListener(J),$e(google.maps.event.addListener(N,"mouseover",w)))},[w]),u.useEffect(function(){N&&_&&(ft!==null&&google.maps.event.removeListener(ft),ot(google.maps.event.addListener(N,"mouseup",_)))},[_]),u.useEffect(function(){N&&M&&(bn!==null&&google.maps.event.removeListener(bn),pi(google.maps.event.addListener(N,"rightclick",M)))},[M]),u.useEffect(function(){N&&L&&(Ht!==null&&google.maps.event.removeListener(Ht),hi(google.maps.event.addListener(N,"click",L)))},[L]),u.useEffect(function(){N&&y&&(ne!==null&&google.maps.event.removeListener(ne),Y(google.maps.event.addListener(N,"drag",y)))},[y]),u.useEffect(function(){N&&O&&(Ae!==null&&google.maps.event.removeListener(Ae),Ee(google.maps.event.addListener(N,"clickable_changed",O)))},[O]),u.useEffect(function(){N&&k&&(ke!==null&&google.maps.event.removeListener(ke),Be(google.maps.event.addListener(N,"cursor_changed",k)))},[k]),u.useEffect(function(){N&&I&&(be!==null&&google.maps.event.removeListener(be),ct(google.maps.event.addListener(N,"animation_changed",I)))},[I]),u.useEffect(function(){N&&B&&(st!==null&&google.maps.event.removeListener(st),qe(google.maps.event.addListener(N,"draggable_changed",B)))},[B]),u.useEffect(function(){N&&H&&(pt!==null&&google.maps.event.removeListener(pt),Xe(google.maps.event.addListener(N,"flat_changed",H)))},[H]),u.useEffect(function(){N&&Z&&(Ot!==null&&google.maps.event.removeListener(Ot),ht(google.maps.event.addListener(N,"icon_changed",Z)))},[Z]),u.useEffect(function(){N&&F&&(Wt!==null&&google.maps.event.removeListener(Wt),hr(google.maps.event.addListener(N,"position_changed",F)))},[F]),u.useEffect(function(){N&&K&&(Vn!==null&&google.maps.event.removeListener(Vn),vr(google.maps.event.addListener(N,"shape_changed",K)))},[K]),u.useEffect(function(){N&&A&&(wn!==null&&google.maps.event.removeListener(wn),mr(google.maps.event.addListener(N,"title_changed",A)))},[A]),u.useEffect(function(){N&&R&&(Sn!==null&&google.maps.event.removeListener(Sn),Ln(google.maps.event.addListener(N,"visible_changed",R)))},[R]),u.useEffect(function(){N&&T&&(xn!==null&&google.maps.event.removeListener(xn),yr(google.maps.event.addListener(N,"zindex_changed",T)))},[T]),u.useEffect(function(){var tn=ee(ee(ee({},n||ao),r?ao:{map:$}),{position:e}),oe=new google.maps.Marker(tn);return r?r.addMarker(oe,!!i):oe.setMap($),e&&oe.setPosition(e),typeof a<"u"&&oe.setVisible(a),typeof s<"u"&&oe.setDraggable(s),typeof c<"u"&&oe.setClickable(c),typeof f=="string"&&oe.setCursor(f),d&&oe.setIcon(d),typeof p<"u"&&oe.setLabel(p),typeof v<"u"&&oe.setOpacity(v),g&&oe.setShape(g),typeof h=="string"&&oe.setTitle(h),typeof S=="number"&&oe.setZIndex(S),b&&te(google.maps.event.addListener(oe,"dblclick",b)),x&&fe(google.maps.event.addListener(oe,"dragend",x)),E&&ye(google.maps.event.addListener(oe,"dragstart",E)),P&&Te(google.maps.event.addListener(oe,"mousedown",P)),m&&ze(google.maps.event.addListener(oe,"mouseout",m)),w&&$e(google.maps.event.addListener(oe,"mouseover",w)),_&&ot(google.maps.event.addListener(oe,"mouseup",_)),M&&pi(google.maps.event.addListener(oe,"rightclick",M)),L&&hi(google.maps.event.addListener(oe,"click",L)),y&&Y(google.maps.event.addListener(oe,"drag",y)),O&&Ee(google.maps.event.addListener(oe,"clickable_changed",O)),k&&Be(google.maps.event.addListener(oe,"cursor_changed",k)),I&&ct(google.maps.event.addListener(oe,"animation_changed",I)),B&&qe(google.maps.event.addListener(oe,"draggable_changed",B)),H&&Xe(google.maps.event.addListener(oe,"flat_changed",H)),Z&&ht(google.maps.event.addListener(oe,"icon_changed",Z)),F&&hr(google.maps.event.addListener(oe,"position_changed",F)),K&&vr(google.maps.event.addListener(oe,"shape_changed",K)),A&&mr(google.maps.event.addListener(oe,"title_changed",A)),R&&Ln(google.maps.event.addListener(oe,"visible_changed",R)),T&&yr(google.maps.event.addListener(oe,"zindex_changed",T)),D(oe),V&&V(oe),function(){q!==null&&google.maps.event.removeListener(q),ie!==null&&google.maps.event.removeListener(ie),me!==null&&google.maps.event.removeListener(me),Pe!==null&&google.maps.event.removeListener(Pe),ae!==null&&google.maps.event.removeListener(ae),J!==null&&google.maps.event.removeListener(J),ft!==null&&google.maps.event.removeListener(ft),bn!==null&&google.maps.event.removeListener(bn),Ht!==null&&google.maps.event.removeListener(Ht),Ae!==null&&google.maps.event.removeListener(Ae),ke!==null&&google.maps.event.removeListener(ke),be!==null&&google.maps.event.removeListener(be),st!==null&&google.maps.event.removeListener(st),pt!==null&&google.maps.event.removeListener(pt),Ot!==null&&google.maps.event.removeListener(Ot),Wt!==null&&google.maps.event.removeListener(Wt),wn!==null&&google.maps.event.removeListener(wn),Sn!==null&&google.maps.event.removeListener(Sn),xn!==null&&google.maps.event.removeListener(xn),z&&z(oe),r?r.removeMarker(oe,!!i):oe&&oe.setMap(null)}},[]);var br=u.useMemo(function(){return o?u.Children.map(o,function(tn){if(!u.isValidElement(tn))return tn;var oe=tn;return u.cloneElement(oe,{anchor:N})}):null},[o,N]);return C.jsx(C.Fragment,{children:br})||null}u.memo(dh);var gu=function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n}return e.prototype.componentDidMount=function(){var n=ee(ee(ee({},this.props.options||ao),this.props.clusterer?ao:{map:this.context}),{position:this.props.position});this.marker=new google.maps.Marker(n),this.props.clusterer?this.props.clusterer.addMarker(this.marker,!!this.props.noClustererRedraw):this.marker.setMap(this.context),this.registeredEvents=pe({updaterMap:Ha,eventMap:$a,prevProps:{},nextProps:this.props,instance:this.marker}),this.props.onLoad&&this.props.onLoad(this.marker)},e.prototype.componentDidUpdate=function(n){this.marker&&(ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:Ha,eventMap:$a,prevProps:n,nextProps:this.props,instance:this.marker}))},e.prototype.componentWillUnmount=function(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),ve(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.marker,!!this.props.noClustererRedraw):this.marker&&this.marker.setMap(null))},e.prototype.render=function(){var n=this,r=null;return this.props.children&&(r=u.Children.map(this.props.children,function(i){if(!u.isValidElement(i))return i;var o=i;return u.cloneElement(o,{anchor:n.marker})})),r||null},e.contextType=ue,e}(u.PureComponent),ph=function(){function t(e,n){e.getClusterer().extend(t,google.maps.OverlayView),this.cluster=e,this.clusterClassName=this.cluster.getClusterer().getClusterClass(),this.className=this.clusterClassName,this.styles=n,this.center=void 0,this.div=null,this.sums=null,this.visible=!1,this.boundsChangedListener=null,this.url="",this.height=0,this.width=0,this.anchorText=[0,0],this.anchorIcon=[0,0],this.textColor="black",this.textSize=11,this.textDecoration="none",this.fontWeight="bold",this.fontStyle="normal",this.fontFamily="Arial,sans-serif",this.backgroundPosition="0 0",this.cMouseDownInCluster=null,this.cDraggingMapByCluster=null,this.timeOut=null,this.setMap(e.getMap()),this.onBoundsChanged=this.onBoundsChanged.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onClick=this.onClick.bind(this),this.onMouseOver=this.onMouseOver.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.onAdd=this.onAdd.bind(this),this.onRemove=this.onRemove.bind(this),this.draw=this.draw.bind(this),this.hide=this.hide.bind(this),this.show=this.show.bind(this),this.useStyle=this.useStyle.bind(this),this.setCenter=this.setCenter.bind(this),this.getPosFromLatLng=this.getPosFromLatLng.bind(this)}return t.prototype.onBoundsChanged=function(){this.cDraggingMapByCluster=this.cMouseDownInCluster},t.prototype.onMouseDown=function(){this.cMouseDownInCluster=!0,this.cDraggingMapByCluster=!1},t.prototype.onClick=function(e){if(this.cMouseDownInCluster=!1,!this.cDraggingMapByCluster){var n=this.cluster.getClusterer();if(google.maps.event.trigger(n,"click",this.cluster),google.maps.event.trigger(n,"clusterclick",this.cluster),n.getZoomOnClick()){var r=n.getMaxZoom(),i=this.cluster.getBounds(),o=n.getMap();o!==null&&"fitBounds"in o&&o.fitBounds(i),this.timeOut=window.setTimeout(function(){var s=n.getMap();if(s!==null){"fitBounds"in s&&s.fitBounds(i);var a=s.getZoom()||0;r!==null&&a>r&&s.setZoom(r+1)}},100)}e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}},t.prototype.onMouseOver=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseover",this.cluster)},t.prototype.onMouseOut=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseout",this.cluster)},t.prototype.onAdd=function(){var e;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),(e=this.getPanes())===null||e===void 0||e.overlayMouseTarget.appendChild(this.div);var n=this.getMap();n!==null&&(this.boundsChangedListener=google.maps.event.addListener(n,"bounds_changed",this.onBoundsChanged),this.div.addEventListener("mousedown",this.onMouseDown),this.div.addEventListener("click",this.onClick),this.div.addEventListener("mouseover",this.onMouseOver),this.div.addEventListener("mouseout",this.onMouseOut))},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),this.boundsChangedListener!==null&&google.maps.event.removeListener(this.boundsChangedListener),this.div.removeEventListener("mousedown",this.onMouseDown),this.div.removeEventListener("click",this.onClick),this.div.removeEventListener("mouseover",this.onMouseOver),this.div.removeEventListener("mouseout",this.onMouseOut),this.div.parentNode.removeChild(this.div),this.timeOut!==null&&(window.clearTimeout(this.timeOut),this.timeOut=null),this.div=null)},t.prototype.draw=function(){if(this.visible&&this.div!==null&&this.center){var e=this.getPosFromLatLng(this.center);this.div.style.top=e!==null?"".concat(e.y,"px"):"0",this.div.style.left=e!==null?"".concat(e.x,"px"):"0"}},t.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},t.prototype.show=function(){var e,n,r,i,o,s;if(this.div&&this.center){var a=this.sums===null||typeof this.sums.title>"u"||this.sums.title===""?this.cluster.getClusterer().getTitle():this.sums.title,l=this.backgroundPosition.split(" "),c=parseInt(((e=l[0])===null||e===void 0?void 0:e.replace(/^\s+|\s+$/g,""))||"0",10),f=parseInt(((n=l[1])===null||n===void 0?void 0:n.replace(/^\s+|\s+$/g,""))||"0",10),d=this.getPosFromLatLng(this.center);this.div.className=this.className,this.div.setAttribute("style","cursor: pointer; position: absolute; top: ".concat(d!==null?"".concat(d.y,"px"):"0","; left: ").concat(d!==null?"".concat(d.x,"px"):"0","; width: ").concat(this.width,"px; height: ").concat(this.height,"px; "));var p=document.createElement("img");p.alt=a,p.src=this.url,p.width=this.width,p.height=this.height,p.setAttribute("style","position: absolute; top: ".concat(f,"px; left: ").concat(c,"px")),this.cluster.getClusterer().enableRetinaIcons||(p.style.clip="rect(-".concat(f,"px, -").concat(c+this.width,"px, -").concat(f+this.height,", -").concat(c,")"));var v=document.createElement("div");v.setAttribute("style","position: absolute; top: ".concat(this.anchorText[0],"px; left: ").concat(this.anchorText[1],"px; color: ").concat(this.textColor,"; font-size: ").concat(this.textSize,"px; font-family: ").concat(this.fontFamily,"; font-weight: ").concat(this.fontWeight,"; fontStyle: ").concat(this.fontStyle,"; text-decoration: ").concat(this.textDecoration,"; text-align: center; width: ").concat(this.width,"px; line-height: ").concat(this.height,"px")),!((r=this.sums)===null||r===void 0)&&r.text&&(v.innerText="".concat((i=this.sums)===null||i===void 0?void 0:i.text)),!((o=this.sums)===null||o===void 0)&&o.html&&(v.innerHTML="".concat((s=this.sums)===null||s===void 0?void 0:s.html)),this.div.innerHTML="",this.div.appendChild(p),this.div.appendChild(v),this.div.title=a,this.div.style.display=""}this.visible=!0},t.prototype.useStyle=function(e){this.sums=e;var n=this.cluster.getClusterer().getStyles(),r=n[Math.min(n.length-1,Math.max(0,e.index-1))];r&&(this.url=r.url,this.height=r.height,this.width=r.width,r.className&&(this.className="".concat(this.clusterClassName," ").concat(r.className)),this.anchorText=r.anchorText||[0,0],this.anchorIcon=r.anchorIcon||[this.height/2,this.width/2],this.textColor=r.textColor||"black",this.textSize=r.textSize||11,this.textDecoration=r.textDecoration||"none",this.fontWeight=r.fontWeight||"bold",this.fontStyle=r.fontStyle||"normal",this.fontFamily=r.fontFamily||"Arial,sans-serif",this.backgroundPosition=r.backgroundPosition||"0 0")},t.prototype.setCenter=function(e){this.center=e},t.prototype.getPosFromLatLng=function(e){var n=this.getProjection().fromLatLngToDivPixel(e);return n!==null&&(n.x-=this.anchorIcon[1],n.y-=this.anchorIcon[0]),n},t}(),hh=function(){function t(e){this.markerClusterer=e,this.map=this.markerClusterer.getMap(),this.gridSize=this.markerClusterer.getGridSize(),this.minClusterSize=this.markerClusterer.getMinimumClusterSize(),this.averageCenter=this.markerClusterer.getAverageCenter(),this.markers=[],this.center=void 0,this.bounds=null,this.clusterIcon=new ph(this,this.markerClusterer.getStyles()),this.getSize=this.getSize.bind(this),this.getMarkers=this.getMarkers.bind(this),this.getCenter=this.getCenter.bind(this),this.getMap=this.getMap.bind(this),this.getClusterer=this.getClusterer.bind(this),this.getBounds=this.getBounds.bind(this),this.remove=this.remove.bind(this),this.addMarker=this.addMarker.bind(this),this.isMarkerInClusterBounds=this.isMarkerInClusterBounds.bind(this),this.calculateBounds=this.calculateBounds.bind(this),this.updateIcon=this.updateIcon.bind(this),this.isMarkerAlreadyAdded=this.isMarkerAlreadyAdded.bind(this)}return t.prototype.getSize=function(){return this.markers.length},t.prototype.getMarkers=function(){return this.markers},t.prototype.getCenter=function(){return this.center},t.prototype.getMap=function(){return this.map},t.prototype.getClusterer=function(){return this.markerClusterer},t.prototype.getBounds=function(){for(var e=new google.maps.LatLngBounds(this.center,this.center),n=this.getMarkers(),r=0,i=n;r<i.length;r++){var o=i[r],s=o.getPosition();s&&e.extend(s)}return e},t.prototype.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},t.prototype.addMarker=function(e){var n;if(this.isMarkerAlreadyAdded(e))return!1;if(this.center){if(this.averageCenter){var r=e.getPosition();if(r){var i=this.markers.length+1;this.center=new google.maps.LatLng((this.center.lat()*(i-1)+r.lat())/i,(this.center.lng()*(i-1)+r.lng())/i),this.calculateBounds()}}}else{var r=e.getPosition();r&&(this.center=r,this.calculateBounds())}e.isAdded=!0,this.markers.push(e);var o=this.markers.length,s=this.markerClusterer.getMaxZoom(),a=(n=this.map)===null||n===void 0?void 0:n.getZoom();if(s!==null&&typeof a<"u"&&a>s)e.getMap()!==this.map&&e.setMap(this.map);else if(o<this.minClusterSize)e.getMap()!==this.map&&e.setMap(this.map);else if(o===this.minClusterSize)for(var l=0,c=this.markers;l<c.length;l++){var f=c[l];f.setMap(null)}else e.setMap(null);return!0},t.prototype.isMarkerInClusterBounds=function(e){if(this.bounds!==null){var n=e.getPosition();if(n)return this.bounds.contains(n)}return!1},t.prototype.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},t.prototype.updateIcon=function(){var e,n=this.markers.length,r=this.markerClusterer.getMaxZoom(),i=(e=this.map)===null||e===void 0?void 0:e.getZoom();if(r!==null&&typeof i<"u"&&i>r){this.clusterIcon.hide();return}if(n<this.minClusterSize){this.clusterIcon.hide();return}this.center&&this.clusterIcon.setCenter(this.center),this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers,this.markerClusterer.getStyles().length)),this.clusterIcon.show()},t.prototype.isMarkerAlreadyAdded=function(e){if(this.markers.includes)return this.markers.includes(e);for(var n=0;n<this.markers.length;n++)if(e===this.markers[n])return!0;return!1},t}();function gh(t,e){var n=t.length,r=n.toString().length,i=Math.min(r,e);return{text:n.toString(),index:i,title:""}}var vh=2e3,mh=500,yh="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",bh="png",wh=[53,56,66,78,90],Sh="cluster",vu=function(){function t(e,n,r){n===void 0&&(n=[]),r===void 0&&(r={}),this.getMinimumClusterSize=this.getMinimumClusterSize.bind(this),this.setMinimumClusterSize=this.setMinimumClusterSize.bind(this),this.getEnableRetinaIcons=this.getEnableRetinaIcons.bind(this),this.setEnableRetinaIcons=this.setEnableRetinaIcons.bind(this),this.addToClosestCluster=this.addToClosestCluster.bind(this),this.getImageExtension=this.getImageExtension.bind(this),this.setImageExtension=this.setImageExtension.bind(this),this.getExtendedBounds=this.getExtendedBounds.bind(this),this.getAverageCenter=this.getAverageCenter.bind(this),this.setAverageCenter=this.setAverageCenter.bind(this),this.getTotalClusters=this.getTotalClusters.bind(this),this.fitMapToMarkers=this.fitMapToMarkers.bind(this),this.getIgnoreHidden=this.getIgnoreHidden.bind(this),this.setIgnoreHidden=this.setIgnoreHidden.bind(this),this.getClusterClass=this.getClusterClass.bind(this),this.setClusterClass=this.setClusterClass.bind(this),this.getTotalMarkers=this.getTotalMarkers.bind(this),this.getZoomOnClick=this.getZoomOnClick.bind(this),this.setZoomOnClick=this.setZoomOnClick.bind(this),this.getBatchSizeIE=this.getBatchSizeIE.bind(this),this.setBatchSizeIE=this.setBatchSizeIE.bind(this),this.createClusters=this.createClusters.bind(this),this.onZoomChanged=this.onZoomChanged.bind(this),this.getImageSizes=this.getImageSizes.bind(this),this.setImageSizes=this.setImageSizes.bind(this),this.getCalculator=this.getCalculator.bind(this),this.setCalculator=this.setCalculator.bind(this),this.removeMarkers=this.removeMarkers.bind(this),this.resetViewport=this.resetViewport.bind(this),this.getImagePath=this.getImagePath.bind(this),this.setImagePath=this.setImagePath.bind(this),this.pushMarkerTo=this.pushMarkerTo.bind(this),this.removeMarker=this.removeMarker.bind(this),this.clearMarkers=this.clearMarkers.bind(this),this.setupStyles=this.setupStyles.bind(this),this.getGridSize=this.getGridSize.bind(this),this.setGridSize=this.setGridSize.bind(this),this.getClusters=this.getClusters.bind(this),this.getMaxZoom=this.getMaxZoom.bind(this),this.setMaxZoom=this.setMaxZoom.bind(this),this.getMarkers=this.getMarkers.bind(this),this.addMarkers=this.addMarkers.bind(this),this.getStyles=this.getStyles.bind(this),this.setStyles=this.setStyles.bind(this),this.addMarker=this.addMarker.bind(this),this.onRemove=this.onRemove.bind(this),this.getTitle=this.getTitle.bind(this),this.setTitle=this.setTitle.bind(this),this.repaint=this.repaint.bind(this),this.onIdle=this.onIdle.bind(this),this.redraw=this.redraw.bind(this),this.onAdd=this.onAdd.bind(this),this.draw=this.draw.bind(this),this.extend=this.extend.bind(this),this.extend(t,google.maps.OverlayView),this.markers=[],this.clusters=[],this.listeners=[],this.activeMap=null,this.ready=!1,this.gridSize=r.gridSize||60,this.minClusterSize=r.minimumClusterSize||2,this.maxZoom=r.maxZoom||null,this.styles=r.styles||[],this.title=r.title||"",this.zoomOnClick=!0,r.zoomOnClick!==void 0&&(this.zoomOnClick=r.zoomOnClick),this.averageCenter=!1,r.averageCenter!==void 0&&(this.averageCenter=r.averageCenter),this.ignoreHidden=!1,r.ignoreHidden!==void 0&&(this.ignoreHidden=r.ignoreHidden),this.enableRetinaIcons=!1,r.enableRetinaIcons!==void 0&&(this.enableRetinaIcons=r.enableRetinaIcons),this.imagePath=r.imagePath||yh,this.imageExtension=r.imageExtension||bh,this.imageSizes=r.imageSizes||wh,this.calculator=r.calculator||gh,this.batchSize=r.batchSize||vh,this.batchSizeIE=r.batchSizeIE||mh,this.clusterClass=r.clusterClass||Sh,navigator.userAgent.toLowerCase().indexOf("msie")!==-1&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(n,!0),this.setMap(e)}return t.prototype.onZoomChanged=function(){var e,n;this.resetViewport(!1),(((e=this.getMap())===null||e===void 0?void 0:e.getZoom())===(this.get("minZoom")||0)||((n=this.getMap())===null||n===void 0?void 0:n.getZoom())===this.get("maxZoom"))&&google.maps.event.trigger(this,"idle")},t.prototype.onIdle=function(){this.redraw()},t.prototype.onAdd=function(){var e=this.getMap();this.activeMap=e,this.ready=!0,this.repaint(),e!==null&&(this.listeners=[google.maps.event.addListener(e,"zoom_changed",this.onZoomChanged),google.maps.event.addListener(e,"idle",this.onIdle)])},t.prototype.onRemove=function(){for(var e=0,n=this.markers;e<n.length;e++){var r=n[e];r.getMap()!==this.activeMap&&r.setMap(this.activeMap)}for(var i=0,o=this.clusters;i<o.length;i++){var s=o[i];s.remove()}this.clusters=[];for(var a=0,l=this.listeners;a<l.length;a++){var c=l[a];google.maps.event.removeListener(c)}this.listeners=[],this.activeMap=null,this.ready=!1},t.prototype.draw=function(){},t.prototype.getMap=function(){return null},t.prototype.getPanes=function(){return null},t.prototype.getProjection=function(){return{fromContainerPixelToLatLng:function(){return null},fromDivPixelToLatLng:function(){return null},fromLatLngToContainerPixel:function(){return null},fromLatLngToDivPixel:function(){return null},getVisibleRegion:function(){return null},getWorldWidth:function(){return 0}}},t.prototype.setMap=function(){},t.prototype.addListener=function(){return{remove:function(){}}},t.prototype.bindTo=function(){},t.prototype.get=function(){},t.prototype.notify=function(){},t.prototype.set=function(){},t.prototype.setValues=function(){},t.prototype.unbind=function(){},t.prototype.unbindAll=function(){},t.prototype.setupStyles=function(){if(!(this.styles.length>0))for(var e=0;e<this.imageSizes.length;e++)this.styles.push({url:"".concat(this.imagePath+(e+1),".").concat(this.imageExtension),height:this.imageSizes[e]||0,width:this.imageSizes[e]||0})},t.prototype.fitMapToMarkers=function(){for(var e=this.getMarkers(),n=new google.maps.LatLngBounds,r=0,i=e;r<i.length;r++){var o=i[r],s=o.getPosition();s&&n.extend(s)}var a=this.getMap();a!==null&&"fitBounds"in a&&a.fitBounds(n)},t.prototype.getGridSize=function(){return this.gridSize},t.prototype.setGridSize=function(e){this.gridSize=e},t.prototype.getMinimumClusterSize=function(){return this.minClusterSize},t.prototype.setMinimumClusterSize=function(e){this.minClusterSize=e},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.setMaxZoom=function(e){this.maxZoom=e},t.prototype.getStyles=function(){return this.styles},t.prototype.setStyles=function(e){this.styles=e},t.prototype.getTitle=function(){return this.title},t.prototype.setTitle=function(e){this.title=e},t.prototype.getZoomOnClick=function(){return this.zoomOnClick},t.prototype.setZoomOnClick=function(e){this.zoomOnClick=e},t.prototype.getAverageCenter=function(){return this.averageCenter},t.prototype.setAverageCenter=function(e){this.averageCenter=e},t.prototype.getIgnoreHidden=function(){return this.ignoreHidden},t.prototype.setIgnoreHidden=function(e){this.ignoreHidden=e},t.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons},t.prototype.setEnableRetinaIcons=function(e){this.enableRetinaIcons=e},t.prototype.getImageExtension=function(){return this.imageExtension},t.prototype.setImageExtension=function(e){this.imageExtension=e},t.prototype.getImagePath=function(){return this.imagePath},t.prototype.setImagePath=function(e){this.imagePath=e},t.prototype.getImageSizes=function(){return this.imageSizes},t.prototype.setImageSizes=function(e){this.imageSizes=e},t.prototype.getCalculator=function(){return this.calculator},t.prototype.setCalculator=function(e){this.calculator=e},t.prototype.getBatchSizeIE=function(){return this.batchSizeIE},t.prototype.setBatchSizeIE=function(e){this.batchSizeIE=e},t.prototype.getClusterClass=function(){return this.clusterClass},t.prototype.setClusterClass=function(e){this.clusterClass=e},t.prototype.getMarkers=function(){return this.markers},t.prototype.getTotalMarkers=function(){return this.markers.length},t.prototype.getClusters=function(){return this.clusters},t.prototype.getTotalClusters=function(){return this.clusters.length},t.prototype.addMarker=function(e,n){this.pushMarkerTo(e),n||this.redraw()},t.prototype.addMarkers=function(e,n){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=e[r];i&&this.pushMarkerTo(i)}n||this.redraw()},t.prototype.pushMarkerTo=function(e){var n=this;e.getDraggable()&&google.maps.event.addListener(e,"dragend",function(){n.ready&&(e.isAdded=!1,n.repaint())}),e.isAdded=!1,this.markers.push(e)},t.prototype.removeMarker_=function(e){var n=-1;if(this.markers.indexOf)n=this.markers.indexOf(e);else for(var r=0;r<this.markers.length;r++)if(e===this.markers[r]){n=r;break}return n===-1?!1:(e.setMap(null),this.markers.splice(n,1),!0)},t.prototype.removeMarker=function(e,n){var r=this.removeMarker_(e);return!n&&r&&this.repaint(),r},t.prototype.removeMarkers=function(e,n){for(var r=!1,i=0,o=e;i<o.length;i++){var s=o[i];r=r||this.removeMarker_(s)}return!n&&r&&this.repaint(),r},t.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers=[]},t.prototype.repaint=function(){var e=this.clusters.slice();this.clusters=[],this.resetViewport(!1),this.redraw(),setTimeout(function(){for(var r=0,i=e;r<i.length;r++){var o=i[r];o.remove()}},0)},t.prototype.getExtendedBounds=function(e){var n=this.getProjection(),r=n.fromLatLngToDivPixel(new google.maps.LatLng(e.getNorthEast().lat(),e.getNorthEast().lng()));r!==null&&(r.x+=this.gridSize,r.y-=this.gridSize);var i=n.fromLatLngToDivPixel(new google.maps.LatLng(e.getSouthWest().lat(),e.getSouthWest().lng()));if(i!==null&&(i.x-=this.gridSize,i.y+=this.gridSize),r!==null){var o=n.fromDivPixelToLatLng(r);o!==null&&e.extend(o)}if(i!==null){var s=n.fromDivPixelToLatLng(i);s!==null&&e.extend(s)}return e},t.prototype.redraw=function(){this.createClusters(0)},t.prototype.resetViewport=function(e){for(var n=0,r=this.clusters;n<r.length;n++){var i=r[n];i.remove()}this.clusters=[];for(var o=0,s=this.markers;o<s.length;o++){var a=s[o];a.isAdded=!1,e&&a.setMap(null)}},t.prototype.distanceBetweenPoints=function(e,n){var r=6371,i=(n.lat()-e.lat())*Math.PI/180,o=(n.lng()-e.lng())*Math.PI/180,s=Math.sin(i/2)*Math.sin(i/2)+Math.cos(e.lat()*Math.PI/180)*Math.cos(n.lat()*Math.PI/180)*Math.sin(o/2)*Math.sin(o/2);return r*(2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s)))},t.prototype.isMarkerInBounds=function(e,n){var r=e.getPosition();return r?n.contains(r):!1},t.prototype.addToClosestCluster=function(e){for(var n,r=4e4,i=null,o=0,s=this.clusters;o<s.length;o++){var a=s[o];n=a;var l=n.getCenter(),c=e.getPosition();if(l&&c){var f=this.distanceBetweenPoints(l,c);f<r&&(r=f,i=n)}}i&&i.isMarkerInClusterBounds(e)?i.addMarker(e):(n=new hh(this),n.addMarker(e),this.clusters.push(n))},t.prototype.createClusters=function(e){var n=this;if(this.ready){e===0&&(google.maps.event.trigger(this,"clusteringbegin",this),this.timerRefStatic!==null&&(window.clearTimeout(this.timerRefStatic),delete this.timerRefStatic));for(var r=this.getMap(),i=r!==null&&("getBounds"in r)?r.getBounds():null,o=(r==null?void 0:r.getZoom())||0,s=o>3?new google.maps.LatLngBounds(i==null?void 0:i.getSouthWest(),i==null?void 0:i.getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),a=this.getExtendedBounds(s),l=Math.min(e+this.batchSize,this.markers.length),c=e;c<l;c++){var f=this.markers[c];f&&!f.isAdded&&this.isMarkerInBounds(f,a)&&(!this.ignoreHidden||this.ignoreHidden&&f.getVisible())&&this.addToClosestCluster(f)}if(l<this.markers.length)this.timerRefStatic=window.setTimeout(function(){n.createClusters(l)},0);else{this.timerRefStatic=null,google.maps.event.trigger(this,"clusteringend",this);for(var d=0,p=this.clusters;d<p.length;d++){var v=p[d];v.updateIcon()}}}},t.prototype.extend=function(e,n){return(function(i){for(var o in i.prototype){var s=o;this.prototype[s]=i.prototype[s]}return this}).apply(e,[n])},t}(),wt={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},xe={averageCenter:function(t,e){t.setAverageCenter(e)},batchSizeIE:function(t,e){t.setBatchSizeIE(e)},calculator:function(t,e){t.setCalculator(e)},clusterClass:function(t,e){t.setClusterClass(e)},enableRetinaIcons:function(t,e){t.setEnableRetinaIcons(e)},gridSize:function(t,e){t.setGridSize(e)},ignoreHidden:function(t,e){t.setIgnoreHidden(e)},imageExtension:function(t,e){t.setImageExtension(e)},imagePath:function(t,e){t.setImagePath(e)},imageSizes:function(t,e){t.setImageSizes(e)},maxZoom:function(t,e){t.setMaxZoom(e)},minimumClusterSize:function(t,e){t.setMinimumClusterSize(e)},styles:function(t,e){t.setStyles(e)},title:function(t,e){t.setTitle(e)},zoomOnClick:function(t,e){t.setZoomOnClick(e)}},Lh={};function Eh(t){var e=t.children,n=t.options,r=t.averageCenter,i=t.batchSizeIE,o=t.calculator,s=t.clusterClass,a=t.enableRetinaIcons,l=t.gridSize,c=t.ignoreHidden,f=t.imageExtension,d=t.imagePath,p=t.imageSizes,v=t.maxZoom,g=t.minimumClusterSize,h=t.styles,S=t.title,L=t.zoomOnClick,b=t.onClick,y=t.onClusteringBegin,x=t.onClusteringEnd,E=t.onMouseOver,m=t.onMouseOut,w=t.onLoad,_=t.onUnmount,P=u.useState(null),M=P[0],O=P[1],k=u.useContext(ue),I=u.useState(null),B=I[0],H=I[1],Z=u.useState(null),F=Z[0],K=Z[1],A=u.useState(null),R=A[0],T=A[1],V=u.useState(null),z=V[0],$=V[1],Q=u.useState(null),N=Q[0],D=Q[1];return u.useEffect(function(){M&&m&&(z!==null&&google.maps.event.removeListener(z),$(google.maps.event.addListener(M,wt.onMouseOut,m)))},[m]),u.useEffect(function(){M&&E&&(N!==null&&google.maps.event.removeListener(N),D(google.maps.event.addListener(M,wt.onMouseOver,E)))},[E]),u.useEffect(function(){M&&b&&(B!==null&&google.maps.event.removeListener(B),H(google.maps.event.addListener(M,wt.onClick,b)))},[b]),u.useEffect(function(){M&&y&&(F!==null&&google.maps.event.removeListener(F),K(google.maps.event.addListener(M,wt.onClusteringBegin,y)))},[y]),u.useEffect(function(){M&&x&&(R!==null&&google.maps.event.removeListener(R),K(google.maps.event.addListener(M,wt.onClusteringEnd,x)))},[x]),u.useEffect(function(){typeof r<"u"&&M!==null&&xe.averageCenter(M,r)},[M,r]),u.useEffect(function(){typeof i<"u"&&M!==null&&xe.batchSizeIE(M,i)},[M,i]),u.useEffect(function(){typeof o<"u"&&M!==null&&xe.calculator(M,o)},[M,o]),u.useEffect(function(){typeof s<"u"&&M!==null&&xe.clusterClass(M,s)},[M,s]),u.useEffect(function(){typeof a<"u"&&M!==null&&xe.enableRetinaIcons(M,a)},[M,a]),u.useEffect(function(){typeof l<"u"&&M!==null&&xe.gridSize(M,l)},[M,l]),u.useEffect(function(){typeof c<"u"&&M!==null&&xe.ignoreHidden(M,c)},[M,c]),u.useEffect(function(){typeof f<"u"&&M!==null&&xe.imageExtension(M,f)},[M,f]),u.useEffect(function(){typeof d<"u"&&M!==null&&xe.imagePath(M,d)},[M,d]),u.useEffect(function(){typeof p<"u"&&M!==null&&xe.imageSizes(M,p)},[M,p]),u.useEffect(function(){typeof v<"u"&&M!==null&&xe.maxZoom(M,v)},[M,v]),u.useEffect(function(){typeof g<"u"&&M!==null&&xe.minimumClusterSize(M,g)},[M,g]),u.useEffect(function(){typeof h<"u"&&M!==null&&xe.styles(M,h)},[M,h]),u.useEffect(function(){typeof S<"u"&&M!==null&&xe.title(M,S)},[M,S]),u.useEffect(function(){typeof L<"u"&&M!==null&&xe.zoomOnClick(M,L)},[M,L]),u.useEffect(function(){if(k){var W=ee({},n||Lh),q=new vu(k,[],W);return r&&xe.averageCenter(q,r),i&&xe.batchSizeIE(q,i),o&&xe.calculator(q,o),s&&xe.clusterClass(q,s),a&&xe.enableRetinaIcons(q,a),l&&xe.gridSize(q,l),c&&xe.ignoreHidden(q,c),f&&xe.imageExtension(q,f),d&&xe.imagePath(q,d),p&&xe.imageSizes(q,p),v&&xe.maxZoom(q,v),g&&xe.minimumClusterSize(q,g),h&&xe.styles(q,h),S&&xe.title(q,S),L&&xe.zoomOnClick(q,L),m&&$(google.maps.event.addListener(q,wt.onMouseOut,m)),E&&D(google.maps.event.addListener(q,wt.onMouseOver,E)),b&&H(google.maps.event.addListener(q,wt.onClick,b)),y&&K(google.maps.event.addListener(q,wt.onClusteringBegin,y)),x&&T(google.maps.event.addListener(q,wt.onClusteringEnd,x)),O(q),w&&w(q),function(){z!==null&&google.maps.event.removeListener(z),N!==null&&google.maps.event.removeListener(N),B!==null&&google.maps.event.removeListener(B),F!==null&&google.maps.event.removeListener(F),R!==null&&google.maps.event.removeListener(R),_&&_(q)}}},[]),M!==null&&e(M)||null}u.memo(Eh);var xh=function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={markerClusterer:null},n.setClustererCallback=function(){n.state.markerClusterer!==null&&n.props.onLoad&&n.props.onLoad(n.state.markerClusterer)},n}return e.prototype.componentDidMount=function(){if(this.context){var n=new vu(this.context,[],this.props.options);this.registeredEvents=pe({updaterMap:xe,eventMap:wt,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{markerClusterer:n}},this.setClustererCallback)}},e.prototype.componentDidUpdate=function(n){this.state.markerClusterer&&(ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:xe,eventMap:wt,prevProps:n,nextProps:this.props,instance:this.state.markerClusterer}))},e.prototype.componentWillUnmount=function(){this.state.markerClusterer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),ve(this.registeredEvents),this.state.markerClusterer.setMap(null))},e.prototype.render=function(){return this.state.markerClusterer!==null?this.props.children(this.state.markerClusterer):null},e.contextType=ue,e}(u.PureComponent);function Ga(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()}var mu=function(){function t(e){e===void 0&&(e={}),this.getCloseClickHandler=this.getCloseClickHandler.bind(this),this.closeClickHandler=this.closeClickHandler.bind(this),this.createInfoBoxDiv=this.createInfoBoxDiv.bind(this),this.addClickHandler=this.addClickHandler.bind(this),this.getCloseBoxImg=this.getCloseBoxImg.bind(this),this.getBoxWidths=this.getBoxWidths.bind(this),this.setBoxStyle=this.setBoxStyle.bind(this),this.setPosition=this.setPosition.bind(this),this.getPosition=this.getPosition.bind(this),this.setOptions=this.setOptions.bind(this),this.setContent=this.setContent.bind(this),this.setVisible=this.setVisible.bind(this),this.getContent=this.getContent.bind(this),this.getVisible=this.getVisible.bind(this),this.setZIndex=this.setZIndex.bind(this),this.getZIndex=this.getZIndex.bind(this),this.onRemove=this.onRemove.bind(this),this.panBox=this.panBox.bind(this),this.extend=this.extend.bind(this),this.close=this.close.bind(this),this.draw=this.draw.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.open=this.open.bind(this),this.extend(t,google.maps.OverlayView),this.content=e.content||"",this.disableAutoPan=e.disableAutoPan||!1,this.maxWidth=e.maxWidth||0,this.pixelOffset=e.pixelOffset||new google.maps.Size(0,0),this.position=e.position||new google.maps.LatLng(0,0),this.zIndex=e.zIndex||null,this.boxClass=e.boxClass||"infoBox",this.boxStyle=e.boxStyle||{},this.closeBoxMargin=e.closeBoxMargin||"2px",this.closeBoxURL=e.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif",e.closeBoxURL===""&&(this.closeBoxURL=""),this.infoBoxClearance=e.infoBoxClearance||new google.maps.Size(1,1),typeof e.visible>"u"&&(typeof e.isHidden>"u"?e.visible=!0:e.visible=!e.isHidden),this.isHidden=!e.visible,this.alignBottom=e.alignBottom||!1,this.pane=e.pane||"floatPane",this.enableEventPropagation=e.enableEventPropagation||!1,this.div=null,this.closeListener=null,this.moveListener=null,this.mapListener=null,this.contextListener=null,this.eventListeners=null,this.fixedWidthSet=null}return t.prototype.createInfoBoxDiv=function(){var e=this,n=function(c){c.returnValue=!1,c.preventDefault&&c.preventDefault(),e.enableEventPropagation||Ga(c)};if(!this.div){this.div=document.createElement("div"),this.setBoxStyle(),typeof this.content=="string"?this.div.innerHTML=this.getCloseBoxImg()+this.content:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(this.content));var r=this.getPanes();if(r!==null&&r[this.pane].appendChild(this.div),this.addClickHandler(),this.div.style.width)this.fixedWidthSet=!0;else if(this.maxWidth!==0&&this.div.offsetWidth>this.maxWidth)this.div.style.width=this.maxWidth+"px",this.fixedWidthSet=!0;else{var i=this.getBoxWidths();this.div.style.width=this.div.offsetWidth-i.left-i.right+"px",this.fixedWidthSet=!1}if(this.panBox(this.disableAutoPan),!this.enableEventPropagation){this.eventListeners=[];for(var o=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],s=0,a=o;s<a.length;s++){var l=a[s];this.eventListeners.push(google.maps.event.addListener(this.div,l,Ga))}this.eventListeners.push(google.maps.event.addListener(this.div,"mouseover",function(){e.div&&(e.div.style.cursor="default")}))}this.contextListener=google.maps.event.addListener(this.div,"contextmenu",n),google.maps.event.trigger(this,"domready")}},t.prototype.getCloseBoxImg=function(){var e="";return this.closeBoxURL!==""&&(e='<img alt=""',e+=' aria-hidden="true"',e+=" src='"+this.closeBoxURL+"'",e+=" align=right",e+=" style='",e+=" position: relative;",e+=" cursor: pointer;",e+=" margin: "+this.closeBoxMargin+";",e+="'>"),e},t.prototype.addClickHandler=function(){this.closeListener=this.div&&this.div.firstChild&&this.closeBoxURL!==""?google.maps.event.addListener(this.div.firstChild,"click",this.getCloseClickHandler()):null},t.prototype.closeClickHandler=function(e){e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation(),google.maps.event.trigger(this,"closeclick"),this.close()},t.prototype.getCloseClickHandler=function(){return this.closeClickHandler},t.prototype.panBox=function(e){if(this.div&&!e){var n=this.getMap();if(n instanceof google.maps.Map){var r=0,i=0,o=n.getBounds();o&&!o.contains(this.position)&&n.setCenter(this.position);var s=n.getDiv(),a=s.offsetWidth,l=s.offsetHeight,c=this.pixelOffset.width,f=this.pixelOffset.height,d=this.div.offsetWidth,p=this.div.offsetHeight,v=this.infoBoxClearance.width,g=this.infoBoxClearance.height,h=this.getProjection(),S=h.fromLatLngToContainerPixel(this.position);S!==null&&(S.x<-c+v?r=S.x+c-v:S.x+d+c+v>a&&(r=S.x+d+c+v-a),this.alignBottom?S.y<-f+g+p?i=S.y+f-g-p:S.y+f+g>l&&(i=S.y+f+g-l):S.y<-f+g?i=S.y+f-g:S.y+p+f+g>l&&(i=S.y+p+f+g-l)),r===0&&i===0||n.panBy(r,i)}}},t.prototype.setBoxStyle=function(){if(this.div){this.div.className=this.boxClass,this.div.style.cssText="";var e=this.boxStyle;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(this.div.style[n]=e[n]);if(this.div.style.webkitTransform="translateZ(0)",typeof this.div.style.opacity<"u"&&this.div.style.opacity!==""){var r=parseFloat(this.div.style.opacity||"");this.div.style.msFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+r*100+')"',this.div.style.filter="alpha(opacity="+r*100+")"}this.div.style.position="absolute",this.div.style.visibility="hidden",this.zIndex!==null&&(this.div.style.zIndex=this.zIndex+""),this.div.style.overflow||(this.div.style.overflow="auto")}},t.prototype.getBoxWidths=function(){var e={top:0,bottom:0,left:0,right:0};if(!this.div)return e;if(document.defaultView){var n=this.div.ownerDocument,r=n&&n.defaultView?n.defaultView.getComputedStyle(this.div,""):null;r&&(e.top=parseInt(r.borderTopWidth||"",10)||0,e.bottom=parseInt(r.borderBottomWidth||"",10)||0,e.left=parseInt(r.borderLeftWidth||"",10)||0,e.right=parseInt(r.borderRightWidth||"",10)||0)}else if(document.documentElement.currentStyle){var i=this.div.currentStyle;i&&(e.top=parseInt(i.borderTopWidth||"",10)||0,e.bottom=parseInt(i.borderBottomWidth||"",10)||0,e.left=parseInt(i.borderLeftWidth||"",10)||0,e.right=parseInt(i.borderRightWidth||"",10)||0)}return e},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.div.parentNode.removeChild(this.div),this.div=null)},t.prototype.draw=function(){if(this.createInfoBoxDiv(),this.div){var e=this.getProjection(),n=e.fromLatLngToDivPixel(this.position);n!==null&&(this.div.style.left=n.x+this.pixelOffset.width+"px",this.alignBottom?this.div.style.bottom=-(n.y+this.pixelOffset.height)+"px":this.div.style.top=n.y+this.pixelOffset.height+"px"),this.isHidden?this.div.style.visibility="hidden":this.div.style.visibility="visible"}},t.prototype.setOptions=function(e){e===void 0&&(e={}),typeof e.boxClass<"u"&&(this.boxClass=e.boxClass,this.setBoxStyle()),typeof e.boxStyle<"u"&&(this.boxStyle=e.boxStyle,this.setBoxStyle()),typeof e.content<"u"&&this.setContent(e.content),typeof e.disableAutoPan<"u"&&(this.disableAutoPan=e.disableAutoPan),typeof e.maxWidth<"u"&&(this.maxWidth=e.maxWidth),typeof e.pixelOffset<"u"&&(this.pixelOffset=e.pixelOffset),typeof e.alignBottom<"u"&&(this.alignBottom=e.alignBottom),typeof e.position<"u"&&this.setPosition(e.position),typeof e.zIndex<"u"&&this.setZIndex(e.zIndex),typeof e.closeBoxMargin<"u"&&(this.closeBoxMargin=e.closeBoxMargin),typeof e.closeBoxURL<"u"&&(this.closeBoxURL=e.closeBoxURL),typeof e.infoBoxClearance<"u"&&(this.infoBoxClearance=e.infoBoxClearance),typeof e.isHidden<"u"&&(this.isHidden=e.isHidden),typeof e.visible<"u"&&(this.isHidden=!e.visible),typeof e.enableEventPropagation<"u"&&(this.enableEventPropagation=e.enableEventPropagation),this.div&&this.draw()},t.prototype.setContent=function(e){this.content=e,this.div&&(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.fixedWidthSet||(this.div.style.width=""),typeof e=="string"?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e)),this.fixedWidthSet||(this.div.style.width=this.div.offsetWidth+"px",typeof e=="string"?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e))),this.addClickHandler()),google.maps.event.trigger(this,"content_changed")},t.prototype.setPosition=function(e){this.position=e,this.div&&this.draw(),google.maps.event.trigger(this,"position_changed")},t.prototype.setVisible=function(e){this.isHidden=!e,this.div&&(this.div.style.visibility=this.isHidden?"hidden":"visible")},t.prototype.setZIndex=function(e){this.zIndex=e,this.div&&(this.div.style.zIndex=e+""),google.maps.event.trigger(this,"zindex_changed")},t.prototype.getContent=function(){return this.content},t.prototype.getPosition=function(){return this.position},t.prototype.getZIndex=function(){return this.zIndex},t.prototype.getVisible=function(){var e=this.getMap();return typeof e>"u"||e===null?!1:!this.isHidden},t.prototype.show=function(){this.isHidden=!1,this.div&&(this.div.style.visibility="visible")},t.prototype.hide=function(){this.isHidden=!0,this.div&&(this.div.style.visibility="hidden")},t.prototype.open=function(e,n){var r=this;n&&(this.position=n.getPosition(),this.moveListener=google.maps.event.addListener(n,"position_changed",function(){var i=n.getPosition();r.setPosition(i)}),this.mapListener=google.maps.event.addListener(n,"map_changed",function(){r.setMap(n.map)})),this.setMap(e),this.div&&this.panBox()},t.prototype.close=function(){if(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.eventListeners){for(var e=0,n=this.eventListeners;e<n.length;e++){var r=n[e];google.maps.event.removeListener(r)}this.eventListeners=null}this.moveListener&&(google.maps.event.removeListener(this.moveListener),this.moveListener=null),this.mapListener&&(google.maps.event.removeListener(this.mapListener),this.mapListener=null),this.contextListener&&(google.maps.event.removeListener(this.contextListener),this.contextListener=null),this.setMap(null)},t.prototype.extend=function(e,n){return(function(i){for(var o in i.prototype)Object.prototype.hasOwnProperty.call(this,o)||(this.prototype[o]=i.prototype[o]);return this}).apply(e,[n])},t}(),Wa={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Za={options:function(t,e){t.setOptions(e)},position:function(t,e){e instanceof google.maps.LatLng?t.setPosition(e):t.setPosition(new google.maps.LatLng(e.lat,e.lng))},visible:function(t,e){t.setVisible(e)},zIndex:function(t,e){t.setZIndex(e)}},Ch={};function _h(t){var e=t.children,n=t.anchor,r=t.options,i=t.position,o=t.zIndex,s=t.onCloseClick,a=t.onDomReady,l=t.onContentChanged,c=t.onPositionChanged,f=t.onZindexChanged,d=t.onLoad,p=t.onUnmount,v=u.useContext(ue),g=u.useState(null),h=g[0],S=g[1],L=u.useState(null),b=L[0],y=L[1],x=u.useState(null),E=x[0],m=x[1],w=u.useState(null),_=w[0],P=w[1],M=u.useState(null),O=M[0],k=M[1],I=u.useState(null),B=I[0],H=I[1],Z=u.useRef(null);return u.useEffect(function(){v&&h!==null&&(h.close(),n?h.open(v,n):h.getPosition()&&h.open(v))},[v,h,n]),u.useEffect(function(){r&&h!==null&&h.setOptions(r)},[h,r]),u.useEffect(function(){if(i&&h!==null){var F=i instanceof google.maps.LatLng?i:new google.maps.LatLng(i.lat,i.lng);h.setPosition(F)}},[i]),u.useEffect(function(){typeof o=="number"&&h!==null&&h.setZIndex(o)},[o]),u.useEffect(function(){h&&s&&(b!==null&&google.maps.event.removeListener(b),y(google.maps.event.addListener(h,"closeclick",s)))},[s]),u.useEffect(function(){h&&a&&(E!==null&&google.maps.event.removeListener(E),m(google.maps.event.addListener(h,"domready",a)))},[a]),u.useEffect(function(){h&&l&&(_!==null&&google.maps.event.removeListener(_),P(google.maps.event.addListener(h,"content_changed",l)))},[l]),u.useEffect(function(){h&&c&&(O!==null&&google.maps.event.removeListener(O),k(google.maps.event.addListener(h,"position_changed",c)))},[c]),u.useEffect(function(){h&&f&&(B!==null&&google.maps.event.removeListener(B),H(google.maps.event.addListener(h,"zindex_changed",f)))},[f]),u.useEffect(function(){if(v){var F=r||Ch,K=F.position,A=ta(F,["position"]),R=void 0;K&&!(K instanceof google.maps.LatLng)&&(R=new google.maps.LatLng(K.lat,K.lng));var T=new mu(ee(ee({},A),R?{position:R}:{}));Z.current=document.createElement("div"),S(T),s&&y(google.maps.event.addListener(T,"closeclick",s)),a&&m(google.maps.event.addListener(T,"domready",a)),l&&P(google.maps.event.addListener(T,"content_changed",l)),c&&k(google.maps.event.addListener(T,"position_changed",c)),f&&H(google.maps.event.addListener(T,"zindex_changed",f)),T.setContent(Z.current),n?T.open(v,n):T.getPosition()?T.open(v):Ze(!1,"You must provide either an anchor or a position prop for <InfoBox>."),d&&d(T)}return function(){h!==null&&(b&&google.maps.event.removeListener(b),_&&google.maps.event.removeListener(_),E&&google.maps.event.removeListener(E),O&&google.maps.event.removeListener(O),B&&google.maps.event.removeListener(B),p&&p(h),h.close())}},[]),Z.current?ur.createPortal(u.Children.only(e),Z.current):null}u.memo(_h);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoBox:null},n.open=function(r,i){i?n.context!==null&&r.open(n.context,i):r.getPosition()?n.context!==null&&r.open(n.context):Ze(!1,"You must provide either an anchor or a position prop for <InfoBox>.")},n.setInfoBoxCallback=function(){n.state.infoBox!==null&&n.containerElement!==null&&(n.state.infoBox.setContent(n.containerElement),n.open(n.state.infoBox,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoBox))},n}return e.prototype.componentDidMount=function(){var n=this.props.options||{},r=n.position,i=ta(n,["position"]),o;r&&!(r instanceof google.maps.LatLng)&&(o=new google.maps.LatLng(r.lat,r.lng));var s=new mu(ee(ee({},i),o?{position:o}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=pe({updaterMap:Za,eventMap:Wa,prevProps:{},nextProps:this.props,instance:s}),this.setState({infoBox:s},this.setInfoBoxCallback)},e.prototype.componentDidUpdate=function(n){var r=this.state.infoBox;r!==null&&(ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:Za,eventMap:Wa,prevProps:n,nextProps:this.props,instance:r}))},e.prototype.componentWillUnmount=function(){var n=this.props.onUnmount,r=this.state.infoBox;r!==null&&(n&&n(r),ve(this.registeredEvents),r.close())},e.prototype.render=function(){return this.containerElement?ur.createPortal(u.Children.only(this.props.children),this.containerElement):null},e.contextType=ue,e})(u.PureComponent);var Oh=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n},qa=fu(Oh);const Ka=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],Zo=1,Sr=8;class ra{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[n,r]=new Uint8Array(e,0,2);if(n!==219)throw new Error("Data does not appear to be in a KDBush format.");const i=r>>4;if(i!==Zo)throw new Error(`Got v${i} data when expected v${Zo}.`);const o=Ka[r&15];if(!o)throw new Error("Unrecognized array type.");const[s]=new Uint16Array(e,2,1),[a]=new Uint32Array(e,4,1);return new ra(a,s,o,e)}constructor(e,n=64,r=Float64Array,i){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+n,2),65535),this.ArrayType=r,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const o=Ka.indexOf(this.ArrayType),s=e*2*this.ArrayType.BYTES_PER_ELEMENT,a=e*this.IndexArrayType.BYTES_PER_ELEMENT,l=(8-a%8)%8;if(o<0)throw new Error(`Unexpected typed array class: ${r}.`);i&&i instanceof ArrayBuffer?(this.data=i,this.ids=new this.IndexArrayType(this.data,Sr,e),this.coords=new this.ArrayType(this.data,Sr+a+l,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(Sr+s+a+l),this.ids=new this.IndexArrayType(this.data,Sr,e),this.coords=new this.ArrayType(this.data,Sr+a+l,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(Zo<<4)+o]),new Uint16Array(this.data,2,1)[0]=n,new Uint32Array(this.data,4,1)[0]=e)}add(e,n){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=e,this.coords[this._pos++]=n,r}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return xs(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,n,r,i){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:s,nodeSize:a}=this,l=[0,o.length-1,0],c=[];for(;l.length;){const f=l.pop()||0,d=l.pop()||0,p=l.pop()||0;if(d-p<=a){for(let S=p;S<=d;S++){const L=s[2*S],b=s[2*S+1];L>=e&&L<=r&&b>=n&&b<=i&&c.push(o[S])}continue}const v=p+d>>1,g=s[2*v],h=s[2*v+1];g>=e&&g<=r&&h>=n&&h<=i&&c.push(o[v]),(f===0?e<=g:n<=h)&&(l.push(p),l.push(v-1),l.push(1-f)),(f===0?r>=g:i>=h)&&(l.push(v+1),l.push(d),l.push(1-f))}return c}within(e,n,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:o,nodeSize:s}=this,a=[0,i.length-1,0],l=[],c=r*r;for(;a.length;){const f=a.pop()||0,d=a.pop()||0,p=a.pop()||0;if(d-p<=s){for(let S=p;S<=d;S++)Ya(o[2*S],o[2*S+1],e,n)<=c&&l.push(i[S]);continue}const v=p+d>>1,g=o[2*v],h=o[2*v+1];Ya(g,h,e,n)<=c&&l.push(i[v]),(f===0?e-r<=g:n-r<=h)&&(a.push(p),a.push(v-1),a.push(1-f)),(f===0?e+r>=g:n+r>=h)&&(a.push(v+1),a.push(d),a.push(1-f))}return l}}function xs(t,e,n,r,i,o){if(i-r<=n)return;const s=r+i>>1;yu(t,e,s,r,i,o),xs(t,e,n,r,s-1,1-o),xs(t,e,n,s+1,i,1-o)}function yu(t,e,n,r,i,o){for(;i>r;){if(i-r>600){const c=i-r+1,f=n-r+1,d=Math.log(c),p=.5*Math.exp(2*d/3),v=.5*Math.sqrt(d*p*(c-p)/c)*(f-c/2<0?-1:1),g=Math.max(r,Math.floor(n-f*p/c+v)),h=Math.min(i,Math.floor(n+(c-f)*p/c+v));yu(t,e,n,g,h,o)}const s=e[2*n+o];let a=r,l=i;for(Lr(t,e,r,n),e[2*i+o]>s&&Lr(t,e,r,i);a<l;){for(Lr(t,e,a,l),a++,l--;e[2*a+o]<s;)a++;for(;e[2*l+o]>s;)l--}e[2*r+o]===s?Lr(t,e,r,l):(l++,Lr(t,e,l,i)),l<=n&&(r=l+1),n<=l&&(i=l-1)}}function Lr(t,e,n,r){qo(t,n,r),qo(e,2*n,2*r),qo(e,2*n+1,2*r+1)}function qo(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Ya(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}const Mh={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},Ja=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1)),Cn=2,cn=3,Ko=4,ln=5,bu=6;class Ph{constructor(e){this.options=Object.assign(Object.create(Mh),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:n,minZoom:r,maxZoom:i}=this.options;n&&console.time("total time");const o=`prepare ${e.length} points`;n&&console.time(o),this.points=e;const s=[];for(let l=0;l<e.length;l++){const c=e[l];if(!c.geometry)continue;const[f,d]=c.geometry.coordinates,p=Ja(gi(f)),v=Ja(vi(d));s.push(p,v,1/0,l,-1,1),this.options.reduce&&s.push(0)}let a=this.trees[i+1]=this._createTree(s);n&&console.timeEnd(o);for(let l=i;l>=r;l--){const c=+Date.now();a=this.trees[l]=this._createTree(this._cluster(a,l)),n&&console.log("z%d: %d clusters in %dms",l,a.numItems,+Date.now()-c)}return n&&console.timeEnd("total time"),this}getClusters(e,n){let r=((e[0]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,e[1]));let o=e[2]===180?180:((e[2]+180)%360+360)%360-180;const s=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,o=180;else if(r>o){const d=this.getClusters([r,i,180,s],n),p=this.getClusters([-180,i,o,s],n);return d.concat(p)}const a=this.trees[this._limitZoom(n)],l=a.range(gi(r),vi(s),gi(o),vi(i)),c=a.data,f=[];for(const d of l){const p=this.stride*d;f.push(c[p+ln]>1?Xa(c,p,this.clusterProps):this.points[c[p+cn]])}return f}getChildren(e){const n=this._getOriginId(e),r=this._getOriginZoom(e),i="No cluster with the specified id.",o=this.trees[r];if(!o)throw new Error(i);const s=o.data;if(n*this.stride>=s.length)throw new Error(i);const a=this.options.radius/(this.options.extent*Math.pow(2,r-1)),l=s[n*this.stride],c=s[n*this.stride+1],f=o.within(l,c,a),d=[];for(const p of f){const v=p*this.stride;s[v+Ko]===e&&d.push(s[v+ln]>1?Xa(s,v,this.clusterProps):this.points[s[v+cn]])}if(d.length===0)throw new Error(i);return d}getLeaves(e,n,r){n=n||10,r=r||0;const i=[];return this._appendLeaves(i,e,n,r,0),i}getTile(e,n,r){const i=this.trees[this._limitZoom(e)],o=Math.pow(2,e),{extent:s,radius:a}=this.options,l=a/s,c=(r-l)/o,f=(r+1+l)/o,d={features:[]};return this._addTileFeatures(i.range((n-l)/o,c,(n+1+l)/o,f),i.data,n,r,o,d),n===0&&this._addTileFeatures(i.range(1-l/o,c,1,f),i.data,o,r,o,d),n===o-1&&this._addTileFeatures(i.range(0,c,l/o,f),i.data,-1,r,o,d),d.features.length?d:null}getClusterExpansionZoom(e){let n=this._getOriginZoom(e)-1;for(;n<=this.options.maxZoom;){const r=this.getChildren(e);if(n++,r.length!==1)break;e=r[0].properties.cluster_id}return n}_appendLeaves(e,n,r,i,o){const s=this.getChildren(n);for(const a of s){const l=a.properties;if(l&&l.cluster?o+l.point_count<=i?o+=l.point_count:o=this._appendLeaves(e,l.cluster_id,r,i,o):o<i?o++:e.push(a),e.length===r)break}return o}_createTree(e){const n=new ra(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<e.length;r+=this.stride)n.add(e[r],e[r+1]);return n.finish(),n.data=e,n}_addTileFeatures(e,n,r,i,o,s){for(const a of e){const l=a*this.stride,c=n[l+ln]>1;let f,d,p;if(c)f=wu(n,l,this.clusterProps),d=n[l],p=n[l+1];else{const h=this.points[n[l+cn]];f=h.properties;const[S,L]=h.geometry.coordinates;d=gi(S),p=vi(L)}const v={type:1,geometry:[[Math.round(this.options.extent*(d*o-r)),Math.round(this.options.extent*(p*o-i))]],tags:f};let g;c||this.options.generateId?g=n[l+cn]:g=this.points[n[l+cn]].id,g!==void 0&&(v.id=g),s.features.push(v)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,n){const{radius:r,extent:i,reduce:o,minPoints:s}=this.options,a=r/(i*Math.pow(2,n)),l=e.data,c=[],f=this.stride;for(let d=0;d<l.length;d+=f){if(l[d+Cn]<=n)continue;l[d+Cn]=n;const p=l[d],v=l[d+1],g=e.within(l[d],l[d+1],a),h=l[d+ln];let S=h;for(const L of g){const b=L*f;l[b+Cn]>n&&(S+=l[b+ln])}if(S>h&&S>=s){let L=p*h,b=v*h,y,x=-1;const E=((d/f|0)<<5)+(n+1)+this.points.length;for(const m of g){const w=m*f;if(l[w+Cn]<=n)continue;l[w+Cn]=n;const _=l[w+ln];L+=l[w]*_,b+=l[w+1]*_,l[w+Ko]=E,o&&(y||(y=this._map(l,d,!0),x=this.clusterProps.length,this.clusterProps.push(y)),o(y,this._map(l,w)))}l[d+Ko]=E,c.push(L/S,b/S,1/0,E,-1,S),o&&c.push(x)}else{for(let L=0;L<f;L++)c.push(l[d+L]);if(S>1)for(const L of g){const b=L*f;if(!(l[b+Cn]<=n)){l[b+Cn]=n;for(let y=0;y<f;y++)c.push(l[b+y])}}}}return c}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,n,r){if(e[n+ln]>1){const s=this.clusterProps[e[n+bu]];return r?Object.assign({},s):s}const i=this.points[e[n+cn]].properties,o=this.options.map(i);return r&&o===i?Object.assign({},o):o}}function Xa(t,e,n){return{type:"Feature",id:t[e+cn],properties:wu(t,e,n),geometry:{type:"Point",coordinates:[kh(t[e]),Rh(t[e+1])]}}}function wu(t,e,n){const r=t[e+ln],i=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,o=t[e+bu],s=o===-1?{}:Object.assign({},n[o]);return Object.assign(s,{cluster:!0,cluster_id:t[e+cn],point_count:r,point_count_abbreviated:i})}function gi(t){return t/360+.5}function vi(t){const e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function kh(t){return(t-.5)*360}function Rh(t){const e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}/*! *****************************************************************************
|
|
35
|
+
***************************************************************************** */function ih(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(f){try{c(r.next(f))}catch(d){s(d)}}function l(f){try{c(r.throw(f))}catch(d){s(d)}}function c(f){f.done?o(f.value):i(f.value).then(a,l)}c((r=r.apply(t,e||[])).next())})}var oh=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n};const Ba="__googleMapsScriptId";var Jn;(function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"})(Jn||(Jn={}));class Pn{constructor({apiKey:e,authReferrerPolicy:n,channel:r,client:i,id:o=Ba,language:s,libraries:a=[],mapIds:l,nonce:c,region:f,retries:d=3,url:p="https://maps.googleapis.com/maps/api/js",version:v}){if(this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=e,this.authReferrerPolicy=n,this.channel=r,this.client=i,this.id=o||Ba,this.language=s,this.libraries=a,this.mapIds=l,this.nonce=c,this.region=f,this.retries=d,this.url=p,this.version=v,Pn.instance){if(!oh(this.options,Pn.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(Pn.instance.options)}`);return Pn.instance}Pn.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?Jn.FAILURE:this.done?Jn.SUCCESS:this.loading?Jn.LOADING:Jn.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let e=this.url;return e+="?callback=__googleMapsCallback",this.apiKey&&(e+=`&key=${this.apiKey}`),this.channel&&(e+=`&channel=${this.channel}`),this.client&&(e+=`&client=${this.client}`),this.libraries.length>0&&(e+=`&libraries=${this.libraries.join(",")}`),this.language&&(e+=`&language=${this.language}`),this.region&&(e+=`®ion=${this.region}`),this.version&&(e+=`&v=${this.version}`),this.mapIds&&(e+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(e+=`&auth_referrer_policy=${this.authReferrerPolicy}`),e}deleteScript(){const e=document.getElementById(this.id);e&&e.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise((e,n)=>{this.loadCallback(r=>{r?n(r.error):e(window.google)})})}importLibrary(e){return this.execute(),google.maps.importLibrary(e)}loadCallback(e){this.callbacks.push(e),this.execute()}setScript(){var e,n;if(document.getElementById(this.id)){this.callback();return}const r={key:this.apiKey,channel:this.channel,client:this.client,libraries:this.libraries.length&&this.libraries,v:this.version,mapIds:this.mapIds,language:this.language,region:this.region,authReferrerPolicy:this.authReferrerPolicy};Object.keys(r).forEach(o=>!r[o]&&delete r[o]),!((n=(e=window==null?void 0:window.google)===null||e===void 0?void 0:e.maps)===null||n===void 0)&&n.importLibrary||(o=>{let s,a,l,c="The Google Maps JavaScript API",f="google",d="importLibrary",p="__ib__",v=document,g=window;g=g[f]||(g[f]={});const h=g.maps||(g.maps={}),S=new Set,E=new URLSearchParams,b=()=>s||(s=new Promise((y,x)=>ih(this,void 0,void 0,function*(){var L;yield a=v.createElement("script"),a.id=this.id,E.set("libraries",[...S]+"");for(l in o)E.set(l.replace(/[A-Z]/g,m=>"_"+m[0].toLowerCase()),o[l]);E.set("callback",f+".maps."+p),a.src=this.url+"?"+E,h[p]=y,a.onerror=()=>s=x(Error(c+" could not load.")),a.nonce=this.nonce||((L=v.querySelector("script[nonce]"))===null||L===void 0?void 0:L.nonce)||"",v.head.append(a)})));h[d]?console.warn(c+" only loads once. Ignoring:",o):h[d]=(y,...x)=>S.add(y)&&b().then(()=>h[d](y,...x))})(r);const i=this.libraries.map(o=>this.importLibrary(o));i.length||i.push(this.importLibrary("core")),Promise.all(i).then(()=>this.callback(),o=>{const s=new ErrorEvent("error",{error:o});this.loadErrorCallback(s)})}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(e){if(this.errors.push(e),this.errors.length<=this.retries){const n=this.errors.length*Math.pow(2,this.errors.length);console.error(`Failed to load Google Maps script, retrying in ${n} ms.`),setTimeout(()=>{this.deleteScript(),this.setScript()},n)}else this.onerrorEvent=e,this.callback()}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach(e=>{e(this.onerrorEvent)}),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version){console.warn("Google Maps already loaded outside @googlemaps/js-api-loader.This may result in undesirable behavior as options and script parameters may not match."),this.callback();return}this.loading||(this.loading=!0,this.setScript())}}}var sh=["maps"];function ah(t){var e=t.id,n=e===void 0?Xr.id:e,r=t.version,i=r===void 0?Xr.version:r,o=t.nonce,s=t.googleMapsApiKey,a=t.language,l=t.region,c=t.libraries,f=c===void 0?sh:c,d=t.preventGoogleFontsLoading,p=t.mapIds,v=t.authReferrerPolicy,g=u.useRef(!1),h=u.useState(!1),S=h[0],E=h[1],b=u.useState(void 0),y=b[0],x=b[1];u.useEffect(function(){return g.current=!0,function(){g.current=!1}},[]);var L=u.useMemo(function(){return new Pn({id:n,apiKey:s,version:i,libraries:f,language:a||"en",region:l||"US",mapIds:p||[],nonce:o||"",authReferrerPolicy:v||"origin"})},[n,s,i,f,a,l,p,o,v]);u.useEffect(function(){S||L.load().then(function(){g.current&&E(!0)}).catch(function(_){x(_)})},[]),u.useEffect(function(){hn&&d&&na()},[d]);var m=u.useRef();return u.useEffect(function(){m.current&&f!==m.current&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),m.current=f},[f]),{isLoaded:S,loadError:y}}var Ua={},Va={options:function(t,e){t.setOptions(e)}};function lh(t){var e=t.options,n=t.onLoad,r=t.onUnmount,i=u.useContext(ue),o=u.useState(null),s=o[0],a=o[1];return u.useEffect(function(){s!==null&&s.setMap(i)},[i]),u.useEffect(function(){e&&s!==null&&s.setOptions(e)},[s,e]),u.useEffect(function(){var l=new google.maps.TrafficLayer(ee(ee({},e||{}),{map:i}));return a(l),n&&n(l),function(){s!==null&&(r&&r(s),s.setMap(null))}},[]),null}u.memo(lh);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={trafficLayer:null},n.setTrafficLayerCallback=function(){n.state.trafficLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.trafficLayer)},n.registeredEvents=[],n}return e.prototype.componentDidMount=function(){var n=new google.maps.TrafficLayer(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=pe({updaterMap:Va,eventMap:Ua,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{trafficLayer:n}},this.setTrafficLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.trafficLayer!==null&&(ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:Va,eventMap:Ua,prevProps:n,nextProps:this.props,instance:this.state.trafficLayer}))},e.prototype.componentWillUnmount=function(){this.state.trafficLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),ve(this.registeredEvents),this.state.trafficLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e})(u.PureComponent);function ch(t){var e=t.onLoad,n=t.onUnmount,r=u.useContext(ue),i=u.useState(null),o=i[0],s=i[1];return u.useEffect(function(){o!==null&&o.setMap(r)},[r]),u.useEffect(function(){var a=new google.maps.BicyclingLayer;return s(a),a.setMap(r),e&&e(a),function(){a!==null&&(n&&n(a),a.setMap(null))}},[]),null}u.memo(ch);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={bicyclingLayer:null},n.setBicyclingLayerCallback=function(){n.state.bicyclingLayer!==null&&(n.state.bicyclingLayer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.bicyclingLayer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.BicyclingLayer;this.setState(function(){return{bicyclingLayer:n}},this.setBicyclingLayerCallback)},e.prototype.componentWillUnmount=function(){this.state.bicyclingLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e})(u.PureComponent);function uh(t){var e=t.onLoad,n=t.onUnmount,r=u.useContext(ue),i=u.useState(null),o=i[0],s=i[1];return u.useEffect(function(){o!==null&&o.setMap(r)},[r]),u.useEffect(function(){var a=new google.maps.TransitLayer;return s(a),a.setMap(r),e&&e(a),function(){o!==null&&(n&&n(o),o.setMap(null))}},[]),null}u.memo(uh);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={transitLayer:null},n.setTransitLayerCallback=function(){n.state.transitLayer!==null&&(n.state.transitLayer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.transitLayer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.TransitLayer;this.setState(function(){return{transitLayer:n}},this.setTransitLayerCallback)},e.prototype.componentWillUnmount=function(){this.state.transitLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.transitLayer),this.state.transitLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e})(u.PureComponent);var Fa={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},za={drawingMode:function(t,e){t.setDrawingMode(e)},options:function(t,e){t.setOptions(e)}};function fh(t){var e=t.options,n=t.drawingMode,r=t.onCircleComplete,i=t.onMarkerComplete,o=t.onOverlayComplete,s=t.onPolygonComplete,a=t.onPolylineComplete,l=t.onRectangleComplete,c=t.onLoad,f=t.onUnmount,d=u.useContext(ue),p=u.useState(null),v=p[0],g=p[1],h=u.useState(null),S=h[0],E=h[1],b=u.useState(null),y=b[0],x=b[1],L=u.useState(null),m=L[0],w=L[1],_=u.useState(null),P=_[0],M=_[1],O=u.useState(null),k=O[0],I=O[1],B=u.useState(null),H=B[0],Z=B[1];return u.useEffect(function(){v!==null&&v.setMap(d)},[d]),u.useEffect(function(){e&&v!==null&&v.setOptions(e)},[v,e]),u.useEffect(function(){n&&v!==null&&v.setDrawingMode(n)},[v,n]),u.useEffect(function(){v&&r&&(S!==null&&google.maps.event.removeListener(S),E(google.maps.event.addListener(v,"circlecomplete",r)))},[v,r]),u.useEffect(function(){v&&i&&(y!==null&&google.maps.event.removeListener(y),x(google.maps.event.addListener(v,"markercomplete",i)))},[v,i]),u.useEffect(function(){v&&o&&(m!==null&&google.maps.event.removeListener(m),w(google.maps.event.addListener(v,"overlaycomplete",o)))},[v,o]),u.useEffect(function(){v&&s&&(P!==null&&google.maps.event.removeListener(P),M(google.maps.event.addListener(v,"polygoncomplete",s)))},[v,s]),u.useEffect(function(){v&&a&&(k!==null&&google.maps.event.removeListener(k),I(google.maps.event.addListener(v,"polylinecomplete",a)))},[v,a]),u.useEffect(function(){v&&l&&(H!==null&&google.maps.event.removeListener(H),Z(google.maps.event.addListener(v,"rectanglecomplete",l)))},[v,l]),u.useEffect(function(){Ze(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing);var F=new google.maps.drawing.DrawingManager(ee(ee({},e||{}),{map:d}));return n&&F.setDrawingMode(n),r&&E(google.maps.event.addListener(F,"circlecomplete",r)),i&&x(google.maps.event.addListener(F,"markercomplete",i)),o&&w(google.maps.event.addListener(F,"overlaycomplete",o)),s&&M(google.maps.event.addListener(F,"polygoncomplete",s)),a&&I(google.maps.event.addListener(F,"polylinecomplete",a)),l&&Z(google.maps.event.addListener(F,"rectanglecomplete",l)),g(F),c&&c(F),function(){v!==null&&(S&&google.maps.event.removeListener(S),y&&google.maps.event.removeListener(y),m&&google.maps.event.removeListener(m),P&&google.maps.event.removeListener(P),k&&google.maps.event.removeListener(k),H&&google.maps.event.removeListener(H),f&&f(v),v.setMap(null))}},[]),null}u.memo(fh);(function(t){je(e,t);function e(n){var r=t.call(this,n)||this;return r.registeredEvents=[],r.state={drawingManager:null},r.setDrawingManagerCallback=function(){r.state.drawingManager!==null&&r.props.onLoad&&r.props.onLoad(r.state.drawingManager)},Ze(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing),r}return e.prototype.componentDidMount=function(){var n=new google.maps.drawing.DrawingManager(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=pe({updaterMap:za,eventMap:Fa,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{drawingManager:n}},this.setDrawingManagerCallback)},e.prototype.componentDidUpdate=function(n){this.state.drawingManager!==null&&(ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:za,eventMap:Fa,prevProps:n,nextProps:this.props,instance:this.state.drawingManager}))},e.prototype.componentWillUnmount=function(){this.state.drawingManager!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),ve(this.registeredEvents),this.state.drawingManager.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e})(u.PureComponent);var $a={onAnimationChanged:"animation_changed",onClick:"click",onClickableChanged:"clickable_changed",onCursorChanged:"cursor_changed",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDraggableChanged:"draggable_changed",onDragStart:"dragstart",onFlatChanged:"flat_changed",onIconChanged:"icon_changed",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onPositionChanged:"position_changed",onRightClick:"rightclick",onShapeChanged:"shape_changed",onTitleChanged:"title_changed",onVisibleChanged:"visible_changed",onZindexChanged:"zindex_changed"},Ha={animation:function(t,e){t.setAnimation(e)},clickable:function(t,e){t.setClickable(e)},cursor:function(t,e){t.setCursor(e)},draggable:function(t,e){t.setDraggable(e)},icon:function(t,e){t.setIcon(e)},label:function(t,e){t.setLabel(e)},map:function(t,e){t.setMap(e)},opacity:function(t,e){t.setOpacity(e)},options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},shape:function(t,e){t.setShape(e)},title:function(t,e){t.setTitle(e)},visible:function(t,e){t.setVisible(e)},zIndex:function(t,e){t.setZIndex(e)}},ao={};function dh(t){var e=t.position,n=t.options,r=t.clusterer,i=t.noClustererRedraw,o=t.children,s=t.draggable,a=t.visible,l=t.animation,c=t.clickable,f=t.cursor,d=t.icon,p=t.label,v=t.opacity,g=t.shape,h=t.title,S=t.zIndex,E=t.onClick,b=t.onDblClick,y=t.onDrag,x=t.onDragEnd,L=t.onDragStart,m=t.onMouseOut,w=t.onMouseOver,_=t.onMouseUp,P=t.onMouseDown,M=t.onRightClick,O=t.onClickableChanged,k=t.onCursorChanged,I=t.onAnimationChanged,B=t.onDraggableChanged,H=t.onFlatChanged,Z=t.onIconChanged,F=t.onPositionChanged,K=t.onShapeChanged,A=t.onTitleChanged,R=t.onVisibleChanged,T=t.onZindexChanged,V=t.onLoad,z=t.onUnmount,$=u.useContext(ue),X=u.useState(null),N=X[0],D=X[1],W=u.useState(null),q=W[0],te=W[1],re=u.useState(null),ie=re[0],fe=re[1],Oe=u.useState(null),me=Oe[0],ye=Oe[1],Me=u.useState(null),Pe=Me[0],Te=Me[1],se=u.useState(null),ae=se[0],ze=se[1],Je=u.useState(null),Y=Je[0],$e=Je[1],Ne=u.useState(null),ft=Ne[0],ot=Ne[1],le=u.useState(null),bn=le[0],pi=le[1],_t=u.useState(null),Ht=_t[0],hi=_t[1],U=u.useState(null),ne=U[0],J=U[1],he=u.useState(null),Ae=he[0],Le=he[1],De=u.useState(null),ke=De[0],Be=De[1],ce=u.useState(null),be=ce[0],ct=ce[1],Gt=u.useState(null),st=Gt[0],qe=Gt[1],dt=u.useState(null),pt=dt[0],Qe=dt[1],Nt=u.useState(null),Ot=Nt[0],ht=Nt[1],Xt=u.useState(null),Wt=Xt[0],hr=Xt[1],gr=u.useState(null),Vn=gr[0],vr=gr[1],Fn=u.useState(null),wn=Fn[0],mr=Fn[1],en=u.useState(null),Sn=en[0],En=en[1],Ln=u.useState(null),xn=Ln[0],yr=Ln[1];u.useEffect(function(){N!==null&&N.setMap($)},[$]),u.useEffect(function(){typeof n<"u"&&N!==null&&N.setOptions(n)},[N,n]),u.useEffect(function(){typeof s<"u"&&N!==null&&N.setDraggable(s)},[N,s]),u.useEffect(function(){e&&N!==null&&N.setPosition(e)},[N,e]),u.useEffect(function(){typeof a<"u"&&N!==null&&N.setVisible(a)},[N,a]),u.useEffect(function(){N==null||N.setAnimation(l)},[N,l]),u.useEffect(function(){N&&b&&(q!==null&&google.maps.event.removeListener(q),te(google.maps.event.addListener(N,"dblclick",b)))},[b]),u.useEffect(function(){N&&x&&(ie!==null&&google.maps.event.removeListener(ie),fe(google.maps.event.addListener(N,"dragend",x)))},[x]),u.useEffect(function(){N&&L&&(me!==null&&google.maps.event.removeListener(me),ye(google.maps.event.addListener(N,"dragstart",L)))},[L]),u.useEffect(function(){N&&P&&(Pe!==null&&google.maps.event.removeListener(Pe),Te(google.maps.event.addListener(N,"mousedown",P)))},[P]),u.useEffect(function(){N&&m&&(ae!==null&&google.maps.event.removeListener(ae),ze(google.maps.event.addListener(N,"mouseout",m)))},[m]),u.useEffect(function(){N&&w&&(Y!==null&&google.maps.event.removeListener(Y),$e(google.maps.event.addListener(N,"mouseover",w)))},[w]),u.useEffect(function(){N&&_&&(ft!==null&&google.maps.event.removeListener(ft),ot(google.maps.event.addListener(N,"mouseup",_)))},[_]),u.useEffect(function(){N&&M&&(bn!==null&&google.maps.event.removeListener(bn),pi(google.maps.event.addListener(N,"rightclick",M)))},[M]),u.useEffect(function(){N&&E&&(Ht!==null&&google.maps.event.removeListener(Ht),hi(google.maps.event.addListener(N,"click",E)))},[E]),u.useEffect(function(){N&&y&&(ne!==null&&google.maps.event.removeListener(ne),J(google.maps.event.addListener(N,"drag",y)))},[y]),u.useEffect(function(){N&&O&&(Ae!==null&&google.maps.event.removeListener(Ae),Le(google.maps.event.addListener(N,"clickable_changed",O)))},[O]),u.useEffect(function(){N&&k&&(ke!==null&&google.maps.event.removeListener(ke),Be(google.maps.event.addListener(N,"cursor_changed",k)))},[k]),u.useEffect(function(){N&&I&&(be!==null&&google.maps.event.removeListener(be),ct(google.maps.event.addListener(N,"animation_changed",I)))},[I]),u.useEffect(function(){N&&B&&(st!==null&&google.maps.event.removeListener(st),qe(google.maps.event.addListener(N,"draggable_changed",B)))},[B]),u.useEffect(function(){N&&H&&(pt!==null&&google.maps.event.removeListener(pt),Qe(google.maps.event.addListener(N,"flat_changed",H)))},[H]),u.useEffect(function(){N&&Z&&(Ot!==null&&google.maps.event.removeListener(Ot),ht(google.maps.event.addListener(N,"icon_changed",Z)))},[Z]),u.useEffect(function(){N&&F&&(Wt!==null&&google.maps.event.removeListener(Wt),hr(google.maps.event.addListener(N,"position_changed",F)))},[F]),u.useEffect(function(){N&&K&&(Vn!==null&&google.maps.event.removeListener(Vn),vr(google.maps.event.addListener(N,"shape_changed",K)))},[K]),u.useEffect(function(){N&&A&&(wn!==null&&google.maps.event.removeListener(wn),mr(google.maps.event.addListener(N,"title_changed",A)))},[A]),u.useEffect(function(){N&&R&&(Sn!==null&&google.maps.event.removeListener(Sn),En(google.maps.event.addListener(N,"visible_changed",R)))},[R]),u.useEffect(function(){N&&T&&(xn!==null&&google.maps.event.removeListener(xn),yr(google.maps.event.addListener(N,"zindex_changed",T)))},[T]),u.useEffect(function(){var tn=ee(ee(ee({},n||ao),r?ao:{map:$}),{position:e}),oe=new google.maps.Marker(tn);return r?r.addMarker(oe,!!i):oe.setMap($),e&&oe.setPosition(e),typeof a<"u"&&oe.setVisible(a),typeof s<"u"&&oe.setDraggable(s),typeof c<"u"&&oe.setClickable(c),typeof f=="string"&&oe.setCursor(f),d&&oe.setIcon(d),typeof p<"u"&&oe.setLabel(p),typeof v<"u"&&oe.setOpacity(v),g&&oe.setShape(g),typeof h=="string"&&oe.setTitle(h),typeof S=="number"&&oe.setZIndex(S),b&&te(google.maps.event.addListener(oe,"dblclick",b)),x&&fe(google.maps.event.addListener(oe,"dragend",x)),L&&ye(google.maps.event.addListener(oe,"dragstart",L)),P&&Te(google.maps.event.addListener(oe,"mousedown",P)),m&&ze(google.maps.event.addListener(oe,"mouseout",m)),w&&$e(google.maps.event.addListener(oe,"mouseover",w)),_&&ot(google.maps.event.addListener(oe,"mouseup",_)),M&&pi(google.maps.event.addListener(oe,"rightclick",M)),E&&hi(google.maps.event.addListener(oe,"click",E)),y&&J(google.maps.event.addListener(oe,"drag",y)),O&&Le(google.maps.event.addListener(oe,"clickable_changed",O)),k&&Be(google.maps.event.addListener(oe,"cursor_changed",k)),I&&ct(google.maps.event.addListener(oe,"animation_changed",I)),B&&qe(google.maps.event.addListener(oe,"draggable_changed",B)),H&&Qe(google.maps.event.addListener(oe,"flat_changed",H)),Z&&ht(google.maps.event.addListener(oe,"icon_changed",Z)),F&&hr(google.maps.event.addListener(oe,"position_changed",F)),K&&vr(google.maps.event.addListener(oe,"shape_changed",K)),A&&mr(google.maps.event.addListener(oe,"title_changed",A)),R&&En(google.maps.event.addListener(oe,"visible_changed",R)),T&&yr(google.maps.event.addListener(oe,"zindex_changed",T)),D(oe),V&&V(oe),function(){q!==null&&google.maps.event.removeListener(q),ie!==null&&google.maps.event.removeListener(ie),me!==null&&google.maps.event.removeListener(me),Pe!==null&&google.maps.event.removeListener(Pe),ae!==null&&google.maps.event.removeListener(ae),Y!==null&&google.maps.event.removeListener(Y),ft!==null&&google.maps.event.removeListener(ft),bn!==null&&google.maps.event.removeListener(bn),Ht!==null&&google.maps.event.removeListener(Ht),Ae!==null&&google.maps.event.removeListener(Ae),ke!==null&&google.maps.event.removeListener(ke),be!==null&&google.maps.event.removeListener(be),st!==null&&google.maps.event.removeListener(st),pt!==null&&google.maps.event.removeListener(pt),Ot!==null&&google.maps.event.removeListener(Ot),Wt!==null&&google.maps.event.removeListener(Wt),wn!==null&&google.maps.event.removeListener(wn),Sn!==null&&google.maps.event.removeListener(Sn),xn!==null&&google.maps.event.removeListener(xn),z&&z(oe),r?r.removeMarker(oe,!!i):oe&&oe.setMap(null)}},[]);var br=u.useMemo(function(){return o?u.Children.map(o,function(tn){if(!u.isValidElement(tn))return tn;var oe=tn;return u.cloneElement(oe,{anchor:N})}):null},[o,N]);return C.jsx(C.Fragment,{children:br})||null}u.memo(dh);var gu=function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n}return e.prototype.componentDidMount=function(){var n=ee(ee(ee({},this.props.options||ao),this.props.clusterer?ao:{map:this.context}),{position:this.props.position});this.marker=new google.maps.Marker(n),this.props.clusterer?this.props.clusterer.addMarker(this.marker,!!this.props.noClustererRedraw):this.marker.setMap(this.context),this.registeredEvents=pe({updaterMap:Ha,eventMap:$a,prevProps:{},nextProps:this.props,instance:this.marker}),this.props.onLoad&&this.props.onLoad(this.marker)},e.prototype.componentDidUpdate=function(n){this.marker&&(ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:Ha,eventMap:$a,prevProps:n,nextProps:this.props,instance:this.marker}))},e.prototype.componentWillUnmount=function(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),ve(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.marker,!!this.props.noClustererRedraw):this.marker&&this.marker.setMap(null))},e.prototype.render=function(){var n=this,r=null;return this.props.children&&(r=u.Children.map(this.props.children,function(i){if(!u.isValidElement(i))return i;var o=i;return u.cloneElement(o,{anchor:n.marker})})),r||null},e.contextType=ue,e}(u.PureComponent),ph=function(){function t(e,n){e.getClusterer().extend(t,google.maps.OverlayView),this.cluster=e,this.clusterClassName=this.cluster.getClusterer().getClusterClass(),this.className=this.clusterClassName,this.styles=n,this.center=void 0,this.div=null,this.sums=null,this.visible=!1,this.boundsChangedListener=null,this.url="",this.height=0,this.width=0,this.anchorText=[0,0],this.anchorIcon=[0,0],this.textColor="black",this.textSize=11,this.textDecoration="none",this.fontWeight="bold",this.fontStyle="normal",this.fontFamily="Arial,sans-serif",this.backgroundPosition="0 0",this.cMouseDownInCluster=null,this.cDraggingMapByCluster=null,this.timeOut=null,this.setMap(e.getMap()),this.onBoundsChanged=this.onBoundsChanged.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onClick=this.onClick.bind(this),this.onMouseOver=this.onMouseOver.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.onAdd=this.onAdd.bind(this),this.onRemove=this.onRemove.bind(this),this.draw=this.draw.bind(this),this.hide=this.hide.bind(this),this.show=this.show.bind(this),this.useStyle=this.useStyle.bind(this),this.setCenter=this.setCenter.bind(this),this.getPosFromLatLng=this.getPosFromLatLng.bind(this)}return t.prototype.onBoundsChanged=function(){this.cDraggingMapByCluster=this.cMouseDownInCluster},t.prototype.onMouseDown=function(){this.cMouseDownInCluster=!0,this.cDraggingMapByCluster=!1},t.prototype.onClick=function(e){if(this.cMouseDownInCluster=!1,!this.cDraggingMapByCluster){var n=this.cluster.getClusterer();if(google.maps.event.trigger(n,"click",this.cluster),google.maps.event.trigger(n,"clusterclick",this.cluster),n.getZoomOnClick()){var r=n.getMaxZoom(),i=this.cluster.getBounds(),o=n.getMap();o!==null&&"fitBounds"in o&&o.fitBounds(i),this.timeOut=window.setTimeout(function(){var s=n.getMap();if(s!==null){"fitBounds"in s&&s.fitBounds(i);var a=s.getZoom()||0;r!==null&&a>r&&s.setZoom(r+1)}},100)}e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}},t.prototype.onMouseOver=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseover",this.cluster)},t.prototype.onMouseOut=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseout",this.cluster)},t.prototype.onAdd=function(){var e;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),(e=this.getPanes())===null||e===void 0||e.overlayMouseTarget.appendChild(this.div);var n=this.getMap();n!==null&&(this.boundsChangedListener=google.maps.event.addListener(n,"bounds_changed",this.onBoundsChanged),this.div.addEventListener("mousedown",this.onMouseDown),this.div.addEventListener("click",this.onClick),this.div.addEventListener("mouseover",this.onMouseOver),this.div.addEventListener("mouseout",this.onMouseOut))},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),this.boundsChangedListener!==null&&google.maps.event.removeListener(this.boundsChangedListener),this.div.removeEventListener("mousedown",this.onMouseDown),this.div.removeEventListener("click",this.onClick),this.div.removeEventListener("mouseover",this.onMouseOver),this.div.removeEventListener("mouseout",this.onMouseOut),this.div.parentNode.removeChild(this.div),this.timeOut!==null&&(window.clearTimeout(this.timeOut),this.timeOut=null),this.div=null)},t.prototype.draw=function(){if(this.visible&&this.div!==null&&this.center){var e=this.getPosFromLatLng(this.center);this.div.style.top=e!==null?"".concat(e.y,"px"):"0",this.div.style.left=e!==null?"".concat(e.x,"px"):"0"}},t.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},t.prototype.show=function(){var e,n,r,i,o,s;if(this.div&&this.center){var a=this.sums===null||typeof this.sums.title>"u"||this.sums.title===""?this.cluster.getClusterer().getTitle():this.sums.title,l=this.backgroundPosition.split(" "),c=parseInt(((e=l[0])===null||e===void 0?void 0:e.replace(/^\s+|\s+$/g,""))||"0",10),f=parseInt(((n=l[1])===null||n===void 0?void 0:n.replace(/^\s+|\s+$/g,""))||"0",10),d=this.getPosFromLatLng(this.center);this.div.className=this.className,this.div.setAttribute("style","cursor: pointer; position: absolute; top: ".concat(d!==null?"".concat(d.y,"px"):"0","; left: ").concat(d!==null?"".concat(d.x,"px"):"0","; width: ").concat(this.width,"px; height: ").concat(this.height,"px; "));var p=document.createElement("img");p.alt=a,p.src=this.url,p.width=this.width,p.height=this.height,p.setAttribute("style","position: absolute; top: ".concat(f,"px; left: ").concat(c,"px")),this.cluster.getClusterer().enableRetinaIcons||(p.style.clip="rect(-".concat(f,"px, -").concat(c+this.width,"px, -").concat(f+this.height,", -").concat(c,")"));var v=document.createElement("div");v.setAttribute("style","position: absolute; top: ".concat(this.anchorText[0],"px; left: ").concat(this.anchorText[1],"px; color: ").concat(this.textColor,"; font-size: ").concat(this.textSize,"px; font-family: ").concat(this.fontFamily,"; font-weight: ").concat(this.fontWeight,"; fontStyle: ").concat(this.fontStyle,"; text-decoration: ").concat(this.textDecoration,"; text-align: center; width: ").concat(this.width,"px; line-height: ").concat(this.height,"px")),!((r=this.sums)===null||r===void 0)&&r.text&&(v.innerText="".concat((i=this.sums)===null||i===void 0?void 0:i.text)),!((o=this.sums)===null||o===void 0)&&o.html&&(v.innerHTML="".concat((s=this.sums)===null||s===void 0?void 0:s.html)),this.div.innerHTML="",this.div.appendChild(p),this.div.appendChild(v),this.div.title=a,this.div.style.display=""}this.visible=!0},t.prototype.useStyle=function(e){this.sums=e;var n=this.cluster.getClusterer().getStyles(),r=n[Math.min(n.length-1,Math.max(0,e.index-1))];r&&(this.url=r.url,this.height=r.height,this.width=r.width,r.className&&(this.className="".concat(this.clusterClassName," ").concat(r.className)),this.anchorText=r.anchorText||[0,0],this.anchorIcon=r.anchorIcon||[this.height/2,this.width/2],this.textColor=r.textColor||"black",this.textSize=r.textSize||11,this.textDecoration=r.textDecoration||"none",this.fontWeight=r.fontWeight||"bold",this.fontStyle=r.fontStyle||"normal",this.fontFamily=r.fontFamily||"Arial,sans-serif",this.backgroundPosition=r.backgroundPosition||"0 0")},t.prototype.setCenter=function(e){this.center=e},t.prototype.getPosFromLatLng=function(e){var n=this.getProjection().fromLatLngToDivPixel(e);return n!==null&&(n.x-=this.anchorIcon[1],n.y-=this.anchorIcon[0]),n},t}(),hh=function(){function t(e){this.markerClusterer=e,this.map=this.markerClusterer.getMap(),this.gridSize=this.markerClusterer.getGridSize(),this.minClusterSize=this.markerClusterer.getMinimumClusterSize(),this.averageCenter=this.markerClusterer.getAverageCenter(),this.markers=[],this.center=void 0,this.bounds=null,this.clusterIcon=new ph(this,this.markerClusterer.getStyles()),this.getSize=this.getSize.bind(this),this.getMarkers=this.getMarkers.bind(this),this.getCenter=this.getCenter.bind(this),this.getMap=this.getMap.bind(this),this.getClusterer=this.getClusterer.bind(this),this.getBounds=this.getBounds.bind(this),this.remove=this.remove.bind(this),this.addMarker=this.addMarker.bind(this),this.isMarkerInClusterBounds=this.isMarkerInClusterBounds.bind(this),this.calculateBounds=this.calculateBounds.bind(this),this.updateIcon=this.updateIcon.bind(this),this.isMarkerAlreadyAdded=this.isMarkerAlreadyAdded.bind(this)}return t.prototype.getSize=function(){return this.markers.length},t.prototype.getMarkers=function(){return this.markers},t.prototype.getCenter=function(){return this.center},t.prototype.getMap=function(){return this.map},t.prototype.getClusterer=function(){return this.markerClusterer},t.prototype.getBounds=function(){for(var e=new google.maps.LatLngBounds(this.center,this.center),n=this.getMarkers(),r=0,i=n;r<i.length;r++){var o=i[r],s=o.getPosition();s&&e.extend(s)}return e},t.prototype.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},t.prototype.addMarker=function(e){var n;if(this.isMarkerAlreadyAdded(e))return!1;if(this.center){if(this.averageCenter){var r=e.getPosition();if(r){var i=this.markers.length+1;this.center=new google.maps.LatLng((this.center.lat()*(i-1)+r.lat())/i,(this.center.lng()*(i-1)+r.lng())/i),this.calculateBounds()}}}else{var r=e.getPosition();r&&(this.center=r,this.calculateBounds())}e.isAdded=!0,this.markers.push(e);var o=this.markers.length,s=this.markerClusterer.getMaxZoom(),a=(n=this.map)===null||n===void 0?void 0:n.getZoom();if(s!==null&&typeof a<"u"&&a>s)e.getMap()!==this.map&&e.setMap(this.map);else if(o<this.minClusterSize)e.getMap()!==this.map&&e.setMap(this.map);else if(o===this.minClusterSize)for(var l=0,c=this.markers;l<c.length;l++){var f=c[l];f.setMap(null)}else e.setMap(null);return!0},t.prototype.isMarkerInClusterBounds=function(e){if(this.bounds!==null){var n=e.getPosition();if(n)return this.bounds.contains(n)}return!1},t.prototype.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},t.prototype.updateIcon=function(){var e,n=this.markers.length,r=this.markerClusterer.getMaxZoom(),i=(e=this.map)===null||e===void 0?void 0:e.getZoom();if(r!==null&&typeof i<"u"&&i>r){this.clusterIcon.hide();return}if(n<this.minClusterSize){this.clusterIcon.hide();return}this.center&&this.clusterIcon.setCenter(this.center),this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers,this.markerClusterer.getStyles().length)),this.clusterIcon.show()},t.prototype.isMarkerAlreadyAdded=function(e){if(this.markers.includes)return this.markers.includes(e);for(var n=0;n<this.markers.length;n++)if(e===this.markers[n])return!0;return!1},t}();function gh(t,e){var n=t.length,r=n.toString().length,i=Math.min(r,e);return{text:n.toString(),index:i,title:""}}var vh=2e3,mh=500,yh="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",bh="png",wh=[53,56,66,78,90],Sh="cluster",vu=function(){function t(e,n,r){n===void 0&&(n=[]),r===void 0&&(r={}),this.getMinimumClusterSize=this.getMinimumClusterSize.bind(this),this.setMinimumClusterSize=this.setMinimumClusterSize.bind(this),this.getEnableRetinaIcons=this.getEnableRetinaIcons.bind(this),this.setEnableRetinaIcons=this.setEnableRetinaIcons.bind(this),this.addToClosestCluster=this.addToClosestCluster.bind(this),this.getImageExtension=this.getImageExtension.bind(this),this.setImageExtension=this.setImageExtension.bind(this),this.getExtendedBounds=this.getExtendedBounds.bind(this),this.getAverageCenter=this.getAverageCenter.bind(this),this.setAverageCenter=this.setAverageCenter.bind(this),this.getTotalClusters=this.getTotalClusters.bind(this),this.fitMapToMarkers=this.fitMapToMarkers.bind(this),this.getIgnoreHidden=this.getIgnoreHidden.bind(this),this.setIgnoreHidden=this.setIgnoreHidden.bind(this),this.getClusterClass=this.getClusterClass.bind(this),this.setClusterClass=this.setClusterClass.bind(this),this.getTotalMarkers=this.getTotalMarkers.bind(this),this.getZoomOnClick=this.getZoomOnClick.bind(this),this.setZoomOnClick=this.setZoomOnClick.bind(this),this.getBatchSizeIE=this.getBatchSizeIE.bind(this),this.setBatchSizeIE=this.setBatchSizeIE.bind(this),this.createClusters=this.createClusters.bind(this),this.onZoomChanged=this.onZoomChanged.bind(this),this.getImageSizes=this.getImageSizes.bind(this),this.setImageSizes=this.setImageSizes.bind(this),this.getCalculator=this.getCalculator.bind(this),this.setCalculator=this.setCalculator.bind(this),this.removeMarkers=this.removeMarkers.bind(this),this.resetViewport=this.resetViewport.bind(this),this.getImagePath=this.getImagePath.bind(this),this.setImagePath=this.setImagePath.bind(this),this.pushMarkerTo=this.pushMarkerTo.bind(this),this.removeMarker=this.removeMarker.bind(this),this.clearMarkers=this.clearMarkers.bind(this),this.setupStyles=this.setupStyles.bind(this),this.getGridSize=this.getGridSize.bind(this),this.setGridSize=this.setGridSize.bind(this),this.getClusters=this.getClusters.bind(this),this.getMaxZoom=this.getMaxZoom.bind(this),this.setMaxZoom=this.setMaxZoom.bind(this),this.getMarkers=this.getMarkers.bind(this),this.addMarkers=this.addMarkers.bind(this),this.getStyles=this.getStyles.bind(this),this.setStyles=this.setStyles.bind(this),this.addMarker=this.addMarker.bind(this),this.onRemove=this.onRemove.bind(this),this.getTitle=this.getTitle.bind(this),this.setTitle=this.setTitle.bind(this),this.repaint=this.repaint.bind(this),this.onIdle=this.onIdle.bind(this),this.redraw=this.redraw.bind(this),this.onAdd=this.onAdd.bind(this),this.draw=this.draw.bind(this),this.extend=this.extend.bind(this),this.extend(t,google.maps.OverlayView),this.markers=[],this.clusters=[],this.listeners=[],this.activeMap=null,this.ready=!1,this.gridSize=r.gridSize||60,this.minClusterSize=r.minimumClusterSize||2,this.maxZoom=r.maxZoom||null,this.styles=r.styles||[],this.title=r.title||"",this.zoomOnClick=!0,r.zoomOnClick!==void 0&&(this.zoomOnClick=r.zoomOnClick),this.averageCenter=!1,r.averageCenter!==void 0&&(this.averageCenter=r.averageCenter),this.ignoreHidden=!1,r.ignoreHidden!==void 0&&(this.ignoreHidden=r.ignoreHidden),this.enableRetinaIcons=!1,r.enableRetinaIcons!==void 0&&(this.enableRetinaIcons=r.enableRetinaIcons),this.imagePath=r.imagePath||yh,this.imageExtension=r.imageExtension||bh,this.imageSizes=r.imageSizes||wh,this.calculator=r.calculator||gh,this.batchSize=r.batchSize||vh,this.batchSizeIE=r.batchSizeIE||mh,this.clusterClass=r.clusterClass||Sh,navigator.userAgent.toLowerCase().indexOf("msie")!==-1&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(n,!0),this.setMap(e)}return t.prototype.onZoomChanged=function(){var e,n;this.resetViewport(!1),(((e=this.getMap())===null||e===void 0?void 0:e.getZoom())===(this.get("minZoom")||0)||((n=this.getMap())===null||n===void 0?void 0:n.getZoom())===this.get("maxZoom"))&&google.maps.event.trigger(this,"idle")},t.prototype.onIdle=function(){this.redraw()},t.prototype.onAdd=function(){var e=this.getMap();this.activeMap=e,this.ready=!0,this.repaint(),e!==null&&(this.listeners=[google.maps.event.addListener(e,"zoom_changed",this.onZoomChanged),google.maps.event.addListener(e,"idle",this.onIdle)])},t.prototype.onRemove=function(){for(var e=0,n=this.markers;e<n.length;e++){var r=n[e];r.getMap()!==this.activeMap&&r.setMap(this.activeMap)}for(var i=0,o=this.clusters;i<o.length;i++){var s=o[i];s.remove()}this.clusters=[];for(var a=0,l=this.listeners;a<l.length;a++){var c=l[a];google.maps.event.removeListener(c)}this.listeners=[],this.activeMap=null,this.ready=!1},t.prototype.draw=function(){},t.prototype.getMap=function(){return null},t.prototype.getPanes=function(){return null},t.prototype.getProjection=function(){return{fromContainerPixelToLatLng:function(){return null},fromDivPixelToLatLng:function(){return null},fromLatLngToContainerPixel:function(){return null},fromLatLngToDivPixel:function(){return null},getVisibleRegion:function(){return null},getWorldWidth:function(){return 0}}},t.prototype.setMap=function(){},t.prototype.addListener=function(){return{remove:function(){}}},t.prototype.bindTo=function(){},t.prototype.get=function(){},t.prototype.notify=function(){},t.prototype.set=function(){},t.prototype.setValues=function(){},t.prototype.unbind=function(){},t.prototype.unbindAll=function(){},t.prototype.setupStyles=function(){if(!(this.styles.length>0))for(var e=0;e<this.imageSizes.length;e++)this.styles.push({url:"".concat(this.imagePath+(e+1),".").concat(this.imageExtension),height:this.imageSizes[e]||0,width:this.imageSizes[e]||0})},t.prototype.fitMapToMarkers=function(){for(var e=this.getMarkers(),n=new google.maps.LatLngBounds,r=0,i=e;r<i.length;r++){var o=i[r],s=o.getPosition();s&&n.extend(s)}var a=this.getMap();a!==null&&"fitBounds"in a&&a.fitBounds(n)},t.prototype.getGridSize=function(){return this.gridSize},t.prototype.setGridSize=function(e){this.gridSize=e},t.prototype.getMinimumClusterSize=function(){return this.minClusterSize},t.prototype.setMinimumClusterSize=function(e){this.minClusterSize=e},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.setMaxZoom=function(e){this.maxZoom=e},t.prototype.getStyles=function(){return this.styles},t.prototype.setStyles=function(e){this.styles=e},t.prototype.getTitle=function(){return this.title},t.prototype.setTitle=function(e){this.title=e},t.prototype.getZoomOnClick=function(){return this.zoomOnClick},t.prototype.setZoomOnClick=function(e){this.zoomOnClick=e},t.prototype.getAverageCenter=function(){return this.averageCenter},t.prototype.setAverageCenter=function(e){this.averageCenter=e},t.prototype.getIgnoreHidden=function(){return this.ignoreHidden},t.prototype.setIgnoreHidden=function(e){this.ignoreHidden=e},t.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons},t.prototype.setEnableRetinaIcons=function(e){this.enableRetinaIcons=e},t.prototype.getImageExtension=function(){return this.imageExtension},t.prototype.setImageExtension=function(e){this.imageExtension=e},t.prototype.getImagePath=function(){return this.imagePath},t.prototype.setImagePath=function(e){this.imagePath=e},t.prototype.getImageSizes=function(){return this.imageSizes},t.prototype.setImageSizes=function(e){this.imageSizes=e},t.prototype.getCalculator=function(){return this.calculator},t.prototype.setCalculator=function(e){this.calculator=e},t.prototype.getBatchSizeIE=function(){return this.batchSizeIE},t.prototype.setBatchSizeIE=function(e){this.batchSizeIE=e},t.prototype.getClusterClass=function(){return this.clusterClass},t.prototype.setClusterClass=function(e){this.clusterClass=e},t.prototype.getMarkers=function(){return this.markers},t.prototype.getTotalMarkers=function(){return this.markers.length},t.prototype.getClusters=function(){return this.clusters},t.prototype.getTotalClusters=function(){return this.clusters.length},t.prototype.addMarker=function(e,n){this.pushMarkerTo(e),n||this.redraw()},t.prototype.addMarkers=function(e,n){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=e[r];i&&this.pushMarkerTo(i)}n||this.redraw()},t.prototype.pushMarkerTo=function(e){var n=this;e.getDraggable()&&google.maps.event.addListener(e,"dragend",function(){n.ready&&(e.isAdded=!1,n.repaint())}),e.isAdded=!1,this.markers.push(e)},t.prototype.removeMarker_=function(e){var n=-1;if(this.markers.indexOf)n=this.markers.indexOf(e);else for(var r=0;r<this.markers.length;r++)if(e===this.markers[r]){n=r;break}return n===-1?!1:(e.setMap(null),this.markers.splice(n,1),!0)},t.prototype.removeMarker=function(e,n){var r=this.removeMarker_(e);return!n&&r&&this.repaint(),r},t.prototype.removeMarkers=function(e,n){for(var r=!1,i=0,o=e;i<o.length;i++){var s=o[i];r=r||this.removeMarker_(s)}return!n&&r&&this.repaint(),r},t.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers=[]},t.prototype.repaint=function(){var e=this.clusters.slice();this.clusters=[],this.resetViewport(!1),this.redraw(),setTimeout(function(){for(var r=0,i=e;r<i.length;r++){var o=i[r];o.remove()}},0)},t.prototype.getExtendedBounds=function(e){var n=this.getProjection(),r=n.fromLatLngToDivPixel(new google.maps.LatLng(e.getNorthEast().lat(),e.getNorthEast().lng()));r!==null&&(r.x+=this.gridSize,r.y-=this.gridSize);var i=n.fromLatLngToDivPixel(new google.maps.LatLng(e.getSouthWest().lat(),e.getSouthWest().lng()));if(i!==null&&(i.x-=this.gridSize,i.y+=this.gridSize),r!==null){var o=n.fromDivPixelToLatLng(r);o!==null&&e.extend(o)}if(i!==null){var s=n.fromDivPixelToLatLng(i);s!==null&&e.extend(s)}return e},t.prototype.redraw=function(){this.createClusters(0)},t.prototype.resetViewport=function(e){for(var n=0,r=this.clusters;n<r.length;n++){var i=r[n];i.remove()}this.clusters=[];for(var o=0,s=this.markers;o<s.length;o++){var a=s[o];a.isAdded=!1,e&&a.setMap(null)}},t.prototype.distanceBetweenPoints=function(e,n){var r=6371,i=(n.lat()-e.lat())*Math.PI/180,o=(n.lng()-e.lng())*Math.PI/180,s=Math.sin(i/2)*Math.sin(i/2)+Math.cos(e.lat()*Math.PI/180)*Math.cos(n.lat()*Math.PI/180)*Math.sin(o/2)*Math.sin(o/2);return r*(2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s)))},t.prototype.isMarkerInBounds=function(e,n){var r=e.getPosition();return r?n.contains(r):!1},t.prototype.addToClosestCluster=function(e){for(var n,r=4e4,i=null,o=0,s=this.clusters;o<s.length;o++){var a=s[o];n=a;var l=n.getCenter(),c=e.getPosition();if(l&&c){var f=this.distanceBetweenPoints(l,c);f<r&&(r=f,i=n)}}i&&i.isMarkerInClusterBounds(e)?i.addMarker(e):(n=new hh(this),n.addMarker(e),this.clusters.push(n))},t.prototype.createClusters=function(e){var n=this;if(this.ready){e===0&&(google.maps.event.trigger(this,"clusteringbegin",this),this.timerRefStatic!==null&&(window.clearTimeout(this.timerRefStatic),delete this.timerRefStatic));for(var r=this.getMap(),i=r!==null&&("getBounds"in r)?r.getBounds():null,o=(r==null?void 0:r.getZoom())||0,s=o>3?new google.maps.LatLngBounds(i==null?void 0:i.getSouthWest(),i==null?void 0:i.getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),a=this.getExtendedBounds(s),l=Math.min(e+this.batchSize,this.markers.length),c=e;c<l;c++){var f=this.markers[c];f&&!f.isAdded&&this.isMarkerInBounds(f,a)&&(!this.ignoreHidden||this.ignoreHidden&&f.getVisible())&&this.addToClosestCluster(f)}if(l<this.markers.length)this.timerRefStatic=window.setTimeout(function(){n.createClusters(l)},0);else{this.timerRefStatic=null,google.maps.event.trigger(this,"clusteringend",this);for(var d=0,p=this.clusters;d<p.length;d++){var v=p[d];v.updateIcon()}}}},t.prototype.extend=function(e,n){return(function(i){for(var o in i.prototype){var s=o;this.prototype[s]=i.prototype[s]}return this}).apply(e,[n])},t}(),wt={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},xe={averageCenter:function(t,e){t.setAverageCenter(e)},batchSizeIE:function(t,e){t.setBatchSizeIE(e)},calculator:function(t,e){t.setCalculator(e)},clusterClass:function(t,e){t.setClusterClass(e)},enableRetinaIcons:function(t,e){t.setEnableRetinaIcons(e)},gridSize:function(t,e){t.setGridSize(e)},ignoreHidden:function(t,e){t.setIgnoreHidden(e)},imageExtension:function(t,e){t.setImageExtension(e)},imagePath:function(t,e){t.setImagePath(e)},imageSizes:function(t,e){t.setImageSizes(e)},maxZoom:function(t,e){t.setMaxZoom(e)},minimumClusterSize:function(t,e){t.setMinimumClusterSize(e)},styles:function(t,e){t.setStyles(e)},title:function(t,e){t.setTitle(e)},zoomOnClick:function(t,e){t.setZoomOnClick(e)}},Eh={};function Lh(t){var e=t.children,n=t.options,r=t.averageCenter,i=t.batchSizeIE,o=t.calculator,s=t.clusterClass,a=t.enableRetinaIcons,l=t.gridSize,c=t.ignoreHidden,f=t.imageExtension,d=t.imagePath,p=t.imageSizes,v=t.maxZoom,g=t.minimumClusterSize,h=t.styles,S=t.title,E=t.zoomOnClick,b=t.onClick,y=t.onClusteringBegin,x=t.onClusteringEnd,L=t.onMouseOver,m=t.onMouseOut,w=t.onLoad,_=t.onUnmount,P=u.useState(null),M=P[0],O=P[1],k=u.useContext(ue),I=u.useState(null),B=I[0],H=I[1],Z=u.useState(null),F=Z[0],K=Z[1],A=u.useState(null),R=A[0],T=A[1],V=u.useState(null),z=V[0],$=V[1],X=u.useState(null),N=X[0],D=X[1];return u.useEffect(function(){M&&m&&(z!==null&&google.maps.event.removeListener(z),$(google.maps.event.addListener(M,wt.onMouseOut,m)))},[m]),u.useEffect(function(){M&&L&&(N!==null&&google.maps.event.removeListener(N),D(google.maps.event.addListener(M,wt.onMouseOver,L)))},[L]),u.useEffect(function(){M&&b&&(B!==null&&google.maps.event.removeListener(B),H(google.maps.event.addListener(M,wt.onClick,b)))},[b]),u.useEffect(function(){M&&y&&(F!==null&&google.maps.event.removeListener(F),K(google.maps.event.addListener(M,wt.onClusteringBegin,y)))},[y]),u.useEffect(function(){M&&x&&(R!==null&&google.maps.event.removeListener(R),K(google.maps.event.addListener(M,wt.onClusteringEnd,x)))},[x]),u.useEffect(function(){typeof r<"u"&&M!==null&&xe.averageCenter(M,r)},[M,r]),u.useEffect(function(){typeof i<"u"&&M!==null&&xe.batchSizeIE(M,i)},[M,i]),u.useEffect(function(){typeof o<"u"&&M!==null&&xe.calculator(M,o)},[M,o]),u.useEffect(function(){typeof s<"u"&&M!==null&&xe.clusterClass(M,s)},[M,s]),u.useEffect(function(){typeof a<"u"&&M!==null&&xe.enableRetinaIcons(M,a)},[M,a]),u.useEffect(function(){typeof l<"u"&&M!==null&&xe.gridSize(M,l)},[M,l]),u.useEffect(function(){typeof c<"u"&&M!==null&&xe.ignoreHidden(M,c)},[M,c]),u.useEffect(function(){typeof f<"u"&&M!==null&&xe.imageExtension(M,f)},[M,f]),u.useEffect(function(){typeof d<"u"&&M!==null&&xe.imagePath(M,d)},[M,d]),u.useEffect(function(){typeof p<"u"&&M!==null&&xe.imageSizes(M,p)},[M,p]),u.useEffect(function(){typeof v<"u"&&M!==null&&xe.maxZoom(M,v)},[M,v]),u.useEffect(function(){typeof g<"u"&&M!==null&&xe.minimumClusterSize(M,g)},[M,g]),u.useEffect(function(){typeof h<"u"&&M!==null&&xe.styles(M,h)},[M,h]),u.useEffect(function(){typeof S<"u"&&M!==null&&xe.title(M,S)},[M,S]),u.useEffect(function(){typeof E<"u"&&M!==null&&xe.zoomOnClick(M,E)},[M,E]),u.useEffect(function(){if(k){var W=ee({},n||Eh),q=new vu(k,[],W);return r&&xe.averageCenter(q,r),i&&xe.batchSizeIE(q,i),o&&xe.calculator(q,o),s&&xe.clusterClass(q,s),a&&xe.enableRetinaIcons(q,a),l&&xe.gridSize(q,l),c&&xe.ignoreHidden(q,c),f&&xe.imageExtension(q,f),d&&xe.imagePath(q,d),p&&xe.imageSizes(q,p),v&&xe.maxZoom(q,v),g&&xe.minimumClusterSize(q,g),h&&xe.styles(q,h),S&&xe.title(q,S),E&&xe.zoomOnClick(q,E),m&&$(google.maps.event.addListener(q,wt.onMouseOut,m)),L&&D(google.maps.event.addListener(q,wt.onMouseOver,L)),b&&H(google.maps.event.addListener(q,wt.onClick,b)),y&&K(google.maps.event.addListener(q,wt.onClusteringBegin,y)),x&&T(google.maps.event.addListener(q,wt.onClusteringEnd,x)),O(q),w&&w(q),function(){z!==null&&google.maps.event.removeListener(z),N!==null&&google.maps.event.removeListener(N),B!==null&&google.maps.event.removeListener(B),F!==null&&google.maps.event.removeListener(F),R!==null&&google.maps.event.removeListener(R),_&&_(q)}}},[]),M!==null&&e(M)||null}u.memo(Lh);var xh=function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={markerClusterer:null},n.setClustererCallback=function(){n.state.markerClusterer!==null&&n.props.onLoad&&n.props.onLoad(n.state.markerClusterer)},n}return e.prototype.componentDidMount=function(){if(this.context){var n=new vu(this.context,[],this.props.options);this.registeredEvents=pe({updaterMap:xe,eventMap:wt,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{markerClusterer:n}},this.setClustererCallback)}},e.prototype.componentDidUpdate=function(n){this.state.markerClusterer&&(ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:xe,eventMap:wt,prevProps:n,nextProps:this.props,instance:this.state.markerClusterer}))},e.prototype.componentWillUnmount=function(){this.state.markerClusterer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),ve(this.registeredEvents),this.state.markerClusterer.setMap(null))},e.prototype.render=function(){return this.state.markerClusterer!==null?this.props.children(this.state.markerClusterer):null},e.contextType=ue,e}(u.PureComponent);function Ga(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()}var mu=function(){function t(e){e===void 0&&(e={}),this.getCloseClickHandler=this.getCloseClickHandler.bind(this),this.closeClickHandler=this.closeClickHandler.bind(this),this.createInfoBoxDiv=this.createInfoBoxDiv.bind(this),this.addClickHandler=this.addClickHandler.bind(this),this.getCloseBoxImg=this.getCloseBoxImg.bind(this),this.getBoxWidths=this.getBoxWidths.bind(this),this.setBoxStyle=this.setBoxStyle.bind(this),this.setPosition=this.setPosition.bind(this),this.getPosition=this.getPosition.bind(this),this.setOptions=this.setOptions.bind(this),this.setContent=this.setContent.bind(this),this.setVisible=this.setVisible.bind(this),this.getContent=this.getContent.bind(this),this.getVisible=this.getVisible.bind(this),this.setZIndex=this.setZIndex.bind(this),this.getZIndex=this.getZIndex.bind(this),this.onRemove=this.onRemove.bind(this),this.panBox=this.panBox.bind(this),this.extend=this.extend.bind(this),this.close=this.close.bind(this),this.draw=this.draw.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.open=this.open.bind(this),this.extend(t,google.maps.OverlayView),this.content=e.content||"",this.disableAutoPan=e.disableAutoPan||!1,this.maxWidth=e.maxWidth||0,this.pixelOffset=e.pixelOffset||new google.maps.Size(0,0),this.position=e.position||new google.maps.LatLng(0,0),this.zIndex=e.zIndex||null,this.boxClass=e.boxClass||"infoBox",this.boxStyle=e.boxStyle||{},this.closeBoxMargin=e.closeBoxMargin||"2px",this.closeBoxURL=e.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif",e.closeBoxURL===""&&(this.closeBoxURL=""),this.infoBoxClearance=e.infoBoxClearance||new google.maps.Size(1,1),typeof e.visible>"u"&&(typeof e.isHidden>"u"?e.visible=!0:e.visible=!e.isHidden),this.isHidden=!e.visible,this.alignBottom=e.alignBottom||!1,this.pane=e.pane||"floatPane",this.enableEventPropagation=e.enableEventPropagation||!1,this.div=null,this.closeListener=null,this.moveListener=null,this.mapListener=null,this.contextListener=null,this.eventListeners=null,this.fixedWidthSet=null}return t.prototype.createInfoBoxDiv=function(){var e=this,n=function(c){c.returnValue=!1,c.preventDefault&&c.preventDefault(),e.enableEventPropagation||Ga(c)};if(!this.div){this.div=document.createElement("div"),this.setBoxStyle(),typeof this.content=="string"?this.div.innerHTML=this.getCloseBoxImg()+this.content:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(this.content));var r=this.getPanes();if(r!==null&&r[this.pane].appendChild(this.div),this.addClickHandler(),this.div.style.width)this.fixedWidthSet=!0;else if(this.maxWidth!==0&&this.div.offsetWidth>this.maxWidth)this.div.style.width=this.maxWidth+"px",this.fixedWidthSet=!0;else{var i=this.getBoxWidths();this.div.style.width=this.div.offsetWidth-i.left-i.right+"px",this.fixedWidthSet=!1}if(this.panBox(this.disableAutoPan),!this.enableEventPropagation){this.eventListeners=[];for(var o=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],s=0,a=o;s<a.length;s++){var l=a[s];this.eventListeners.push(google.maps.event.addListener(this.div,l,Ga))}this.eventListeners.push(google.maps.event.addListener(this.div,"mouseover",function(){e.div&&(e.div.style.cursor="default")}))}this.contextListener=google.maps.event.addListener(this.div,"contextmenu",n),google.maps.event.trigger(this,"domready")}},t.prototype.getCloseBoxImg=function(){var e="";return this.closeBoxURL!==""&&(e='<img alt=""',e+=' aria-hidden="true"',e+=" src='"+this.closeBoxURL+"'",e+=" align=right",e+=" style='",e+=" position: relative;",e+=" cursor: pointer;",e+=" margin: "+this.closeBoxMargin+";",e+="'>"),e},t.prototype.addClickHandler=function(){this.closeListener=this.div&&this.div.firstChild&&this.closeBoxURL!==""?google.maps.event.addListener(this.div.firstChild,"click",this.getCloseClickHandler()):null},t.prototype.closeClickHandler=function(e){e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation(),google.maps.event.trigger(this,"closeclick"),this.close()},t.prototype.getCloseClickHandler=function(){return this.closeClickHandler},t.prototype.panBox=function(e){if(this.div&&!e){var n=this.getMap();if(n instanceof google.maps.Map){var r=0,i=0,o=n.getBounds();o&&!o.contains(this.position)&&n.setCenter(this.position);var s=n.getDiv(),a=s.offsetWidth,l=s.offsetHeight,c=this.pixelOffset.width,f=this.pixelOffset.height,d=this.div.offsetWidth,p=this.div.offsetHeight,v=this.infoBoxClearance.width,g=this.infoBoxClearance.height,h=this.getProjection(),S=h.fromLatLngToContainerPixel(this.position);S!==null&&(S.x<-c+v?r=S.x+c-v:S.x+d+c+v>a&&(r=S.x+d+c+v-a),this.alignBottom?S.y<-f+g+p?i=S.y+f-g-p:S.y+f+g>l&&(i=S.y+f+g-l):S.y<-f+g?i=S.y+f-g:S.y+p+f+g>l&&(i=S.y+p+f+g-l)),r===0&&i===0||n.panBy(r,i)}}},t.prototype.setBoxStyle=function(){if(this.div){this.div.className=this.boxClass,this.div.style.cssText="";var e=this.boxStyle;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(this.div.style[n]=e[n]);if(this.div.style.webkitTransform="translateZ(0)",typeof this.div.style.opacity<"u"&&this.div.style.opacity!==""){var r=parseFloat(this.div.style.opacity||"");this.div.style.msFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+r*100+')"',this.div.style.filter="alpha(opacity="+r*100+")"}this.div.style.position="absolute",this.div.style.visibility="hidden",this.zIndex!==null&&(this.div.style.zIndex=this.zIndex+""),this.div.style.overflow||(this.div.style.overflow="auto")}},t.prototype.getBoxWidths=function(){var e={top:0,bottom:0,left:0,right:0};if(!this.div)return e;if(document.defaultView){var n=this.div.ownerDocument,r=n&&n.defaultView?n.defaultView.getComputedStyle(this.div,""):null;r&&(e.top=parseInt(r.borderTopWidth||"",10)||0,e.bottom=parseInt(r.borderBottomWidth||"",10)||0,e.left=parseInt(r.borderLeftWidth||"",10)||0,e.right=parseInt(r.borderRightWidth||"",10)||0)}else if(document.documentElement.currentStyle){var i=this.div.currentStyle;i&&(e.top=parseInt(i.borderTopWidth||"",10)||0,e.bottom=parseInt(i.borderBottomWidth||"",10)||0,e.left=parseInt(i.borderLeftWidth||"",10)||0,e.right=parseInt(i.borderRightWidth||"",10)||0)}return e},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.div.parentNode.removeChild(this.div),this.div=null)},t.prototype.draw=function(){if(this.createInfoBoxDiv(),this.div){var e=this.getProjection(),n=e.fromLatLngToDivPixel(this.position);n!==null&&(this.div.style.left=n.x+this.pixelOffset.width+"px",this.alignBottom?this.div.style.bottom=-(n.y+this.pixelOffset.height)+"px":this.div.style.top=n.y+this.pixelOffset.height+"px"),this.isHidden?this.div.style.visibility="hidden":this.div.style.visibility="visible"}},t.prototype.setOptions=function(e){e===void 0&&(e={}),typeof e.boxClass<"u"&&(this.boxClass=e.boxClass,this.setBoxStyle()),typeof e.boxStyle<"u"&&(this.boxStyle=e.boxStyle,this.setBoxStyle()),typeof e.content<"u"&&this.setContent(e.content),typeof e.disableAutoPan<"u"&&(this.disableAutoPan=e.disableAutoPan),typeof e.maxWidth<"u"&&(this.maxWidth=e.maxWidth),typeof e.pixelOffset<"u"&&(this.pixelOffset=e.pixelOffset),typeof e.alignBottom<"u"&&(this.alignBottom=e.alignBottom),typeof e.position<"u"&&this.setPosition(e.position),typeof e.zIndex<"u"&&this.setZIndex(e.zIndex),typeof e.closeBoxMargin<"u"&&(this.closeBoxMargin=e.closeBoxMargin),typeof e.closeBoxURL<"u"&&(this.closeBoxURL=e.closeBoxURL),typeof e.infoBoxClearance<"u"&&(this.infoBoxClearance=e.infoBoxClearance),typeof e.isHidden<"u"&&(this.isHidden=e.isHidden),typeof e.visible<"u"&&(this.isHidden=!e.visible),typeof e.enableEventPropagation<"u"&&(this.enableEventPropagation=e.enableEventPropagation),this.div&&this.draw()},t.prototype.setContent=function(e){this.content=e,this.div&&(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.fixedWidthSet||(this.div.style.width=""),typeof e=="string"?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e)),this.fixedWidthSet||(this.div.style.width=this.div.offsetWidth+"px",typeof e=="string"?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e))),this.addClickHandler()),google.maps.event.trigger(this,"content_changed")},t.prototype.setPosition=function(e){this.position=e,this.div&&this.draw(),google.maps.event.trigger(this,"position_changed")},t.prototype.setVisible=function(e){this.isHidden=!e,this.div&&(this.div.style.visibility=this.isHidden?"hidden":"visible")},t.prototype.setZIndex=function(e){this.zIndex=e,this.div&&(this.div.style.zIndex=e+""),google.maps.event.trigger(this,"zindex_changed")},t.prototype.getContent=function(){return this.content},t.prototype.getPosition=function(){return this.position},t.prototype.getZIndex=function(){return this.zIndex},t.prototype.getVisible=function(){var e=this.getMap();return typeof e>"u"||e===null?!1:!this.isHidden},t.prototype.show=function(){this.isHidden=!1,this.div&&(this.div.style.visibility="visible")},t.prototype.hide=function(){this.isHidden=!0,this.div&&(this.div.style.visibility="hidden")},t.prototype.open=function(e,n){var r=this;n&&(this.position=n.getPosition(),this.moveListener=google.maps.event.addListener(n,"position_changed",function(){var i=n.getPosition();r.setPosition(i)}),this.mapListener=google.maps.event.addListener(n,"map_changed",function(){r.setMap(n.map)})),this.setMap(e),this.div&&this.panBox()},t.prototype.close=function(){if(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.eventListeners){for(var e=0,n=this.eventListeners;e<n.length;e++){var r=n[e];google.maps.event.removeListener(r)}this.eventListeners=null}this.moveListener&&(google.maps.event.removeListener(this.moveListener),this.moveListener=null),this.mapListener&&(google.maps.event.removeListener(this.mapListener),this.mapListener=null),this.contextListener&&(google.maps.event.removeListener(this.contextListener),this.contextListener=null),this.setMap(null)},t.prototype.extend=function(e,n){return(function(i){for(var o in i.prototype)Object.prototype.hasOwnProperty.call(this,o)||(this.prototype[o]=i.prototype[o]);return this}).apply(e,[n])},t}(),Wa={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Za={options:function(t,e){t.setOptions(e)},position:function(t,e){e instanceof google.maps.LatLng?t.setPosition(e):t.setPosition(new google.maps.LatLng(e.lat,e.lng))},visible:function(t,e){t.setVisible(e)},zIndex:function(t,e){t.setZIndex(e)}},Ch={};function _h(t){var e=t.children,n=t.anchor,r=t.options,i=t.position,o=t.zIndex,s=t.onCloseClick,a=t.onDomReady,l=t.onContentChanged,c=t.onPositionChanged,f=t.onZindexChanged,d=t.onLoad,p=t.onUnmount,v=u.useContext(ue),g=u.useState(null),h=g[0],S=g[1],E=u.useState(null),b=E[0],y=E[1],x=u.useState(null),L=x[0],m=x[1],w=u.useState(null),_=w[0],P=w[1],M=u.useState(null),O=M[0],k=M[1],I=u.useState(null),B=I[0],H=I[1],Z=u.useRef(null);return u.useEffect(function(){v&&h!==null&&(h.close(),n?h.open(v,n):h.getPosition()&&h.open(v))},[v,h,n]),u.useEffect(function(){r&&h!==null&&h.setOptions(r)},[h,r]),u.useEffect(function(){if(i&&h!==null){var F=i instanceof google.maps.LatLng?i:new google.maps.LatLng(i.lat,i.lng);h.setPosition(F)}},[i]),u.useEffect(function(){typeof o=="number"&&h!==null&&h.setZIndex(o)},[o]),u.useEffect(function(){h&&s&&(b!==null&&google.maps.event.removeListener(b),y(google.maps.event.addListener(h,"closeclick",s)))},[s]),u.useEffect(function(){h&&a&&(L!==null&&google.maps.event.removeListener(L),m(google.maps.event.addListener(h,"domready",a)))},[a]),u.useEffect(function(){h&&l&&(_!==null&&google.maps.event.removeListener(_),P(google.maps.event.addListener(h,"content_changed",l)))},[l]),u.useEffect(function(){h&&c&&(O!==null&&google.maps.event.removeListener(O),k(google.maps.event.addListener(h,"position_changed",c)))},[c]),u.useEffect(function(){h&&f&&(B!==null&&google.maps.event.removeListener(B),H(google.maps.event.addListener(h,"zindex_changed",f)))},[f]),u.useEffect(function(){if(v){var F=r||Ch,K=F.position,A=ta(F,["position"]),R=void 0;K&&!(K instanceof google.maps.LatLng)&&(R=new google.maps.LatLng(K.lat,K.lng));var T=new mu(ee(ee({},A),R?{position:R}:{}));Z.current=document.createElement("div"),S(T),s&&y(google.maps.event.addListener(T,"closeclick",s)),a&&m(google.maps.event.addListener(T,"domready",a)),l&&P(google.maps.event.addListener(T,"content_changed",l)),c&&k(google.maps.event.addListener(T,"position_changed",c)),f&&H(google.maps.event.addListener(T,"zindex_changed",f)),T.setContent(Z.current),n?T.open(v,n):T.getPosition()?T.open(v):Ze(!1,"You must provide either an anchor or a position prop for <InfoBox>."),d&&d(T)}return function(){h!==null&&(b&&google.maps.event.removeListener(b),_&&google.maps.event.removeListener(_),L&&google.maps.event.removeListener(L),O&&google.maps.event.removeListener(O),B&&google.maps.event.removeListener(B),p&&p(h),h.close())}},[]),Z.current?ur.createPortal(u.Children.only(e),Z.current):null}u.memo(_h);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoBox:null},n.open=function(r,i){i?n.context!==null&&r.open(n.context,i):r.getPosition()?n.context!==null&&r.open(n.context):Ze(!1,"You must provide either an anchor or a position prop for <InfoBox>.")},n.setInfoBoxCallback=function(){n.state.infoBox!==null&&n.containerElement!==null&&(n.state.infoBox.setContent(n.containerElement),n.open(n.state.infoBox,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoBox))},n}return e.prototype.componentDidMount=function(){var n=this.props.options||{},r=n.position,i=ta(n,["position"]),o;r&&!(r instanceof google.maps.LatLng)&&(o=new google.maps.LatLng(r.lat,r.lng));var s=new mu(ee(ee({},i),o?{position:o}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=pe({updaterMap:Za,eventMap:Wa,prevProps:{},nextProps:this.props,instance:s}),this.setState({infoBox:s},this.setInfoBoxCallback)},e.prototype.componentDidUpdate=function(n){var r=this.state.infoBox;r!==null&&(ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:Za,eventMap:Wa,prevProps:n,nextProps:this.props,instance:r}))},e.prototype.componentWillUnmount=function(){var n=this.props.onUnmount,r=this.state.infoBox;r!==null&&(n&&n(r),ve(this.registeredEvents),r.close())},e.prototype.render=function(){return this.containerElement?ur.createPortal(u.Children.only(this.props.children),this.containerElement):null},e.contextType=ue,e})(u.PureComponent);var Oh=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n},qa=fu(Oh);const Ka=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],Zo=1,Sr=8;class ra{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[n,r]=new Uint8Array(e,0,2);if(n!==219)throw new Error("Data does not appear to be in a KDBush format.");const i=r>>4;if(i!==Zo)throw new Error(`Got v${i} data when expected v${Zo}.`);const o=Ka[r&15];if(!o)throw new Error("Unrecognized array type.");const[s]=new Uint16Array(e,2,1),[a]=new Uint32Array(e,4,1);return new ra(a,s,o,e)}constructor(e,n=64,r=Float64Array,i){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+n,2),65535),this.ArrayType=r,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const o=Ka.indexOf(this.ArrayType),s=e*2*this.ArrayType.BYTES_PER_ELEMENT,a=e*this.IndexArrayType.BYTES_PER_ELEMENT,l=(8-a%8)%8;if(o<0)throw new Error(`Unexpected typed array class: ${r}.`);i&&i instanceof ArrayBuffer?(this.data=i,this.ids=new this.IndexArrayType(this.data,Sr,e),this.coords=new this.ArrayType(this.data,Sr+a+l,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(Sr+s+a+l),this.ids=new this.IndexArrayType(this.data,Sr,e),this.coords=new this.ArrayType(this.data,Sr+a+l,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(Zo<<4)+o]),new Uint16Array(this.data,2,1)[0]=n,new Uint32Array(this.data,4,1)[0]=e)}add(e,n){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=e,this.coords[this._pos++]=n,r}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return xs(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,n,r,i){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:s,nodeSize:a}=this,l=[0,o.length-1,0],c=[];for(;l.length;){const f=l.pop()||0,d=l.pop()||0,p=l.pop()||0;if(d-p<=a){for(let S=p;S<=d;S++){const E=s[2*S],b=s[2*S+1];E>=e&&E<=r&&b>=n&&b<=i&&c.push(o[S])}continue}const v=p+d>>1,g=s[2*v],h=s[2*v+1];g>=e&&g<=r&&h>=n&&h<=i&&c.push(o[v]),(f===0?e<=g:n<=h)&&(l.push(p),l.push(v-1),l.push(1-f)),(f===0?r>=g:i>=h)&&(l.push(v+1),l.push(d),l.push(1-f))}return c}within(e,n,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:o,nodeSize:s}=this,a=[0,i.length-1,0],l=[],c=r*r;for(;a.length;){const f=a.pop()||0,d=a.pop()||0,p=a.pop()||0;if(d-p<=s){for(let S=p;S<=d;S++)Ja(o[2*S],o[2*S+1],e,n)<=c&&l.push(i[S]);continue}const v=p+d>>1,g=o[2*v],h=o[2*v+1];Ja(g,h,e,n)<=c&&l.push(i[v]),(f===0?e-r<=g:n-r<=h)&&(a.push(p),a.push(v-1),a.push(1-f)),(f===0?e+r>=g:n+r>=h)&&(a.push(v+1),a.push(d),a.push(1-f))}return l}}function xs(t,e,n,r,i,o){if(i-r<=n)return;const s=r+i>>1;yu(t,e,s,r,i,o),xs(t,e,n,r,s-1,1-o),xs(t,e,n,s+1,i,1-o)}function yu(t,e,n,r,i,o){for(;i>r;){if(i-r>600){const c=i-r+1,f=n-r+1,d=Math.log(c),p=.5*Math.exp(2*d/3),v=.5*Math.sqrt(d*p*(c-p)/c)*(f-c/2<0?-1:1),g=Math.max(r,Math.floor(n-f*p/c+v)),h=Math.min(i,Math.floor(n+(c-f)*p/c+v));yu(t,e,n,g,h,o)}const s=e[2*n+o];let a=r,l=i;for(Er(t,e,r,n),e[2*i+o]>s&&Er(t,e,r,i);a<l;){for(Er(t,e,a,l),a++,l--;e[2*a+o]<s;)a++;for(;e[2*l+o]>s;)l--}e[2*r+o]===s?Er(t,e,r,l):(l++,Er(t,e,l,i)),l<=n&&(r=l+1),n<=l&&(i=l-1)}}function Er(t,e,n,r){qo(t,n,r),qo(e,2*n,2*r),qo(e,2*n+1,2*r+1)}function qo(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Ja(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}const Mh={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},Ya=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1)),Cn=2,cn=3,Ko=4,ln=5,bu=6;class Ph{constructor(e){this.options=Object.assign(Object.create(Mh),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:n,minZoom:r,maxZoom:i}=this.options;n&&console.time("total time");const o=`prepare ${e.length} points`;n&&console.time(o),this.points=e;const s=[];for(let l=0;l<e.length;l++){const c=e[l];if(!c.geometry)continue;const[f,d]=c.geometry.coordinates,p=Ya(gi(f)),v=Ya(vi(d));s.push(p,v,1/0,l,-1,1),this.options.reduce&&s.push(0)}let a=this.trees[i+1]=this._createTree(s);n&&console.timeEnd(o);for(let l=i;l>=r;l--){const c=+Date.now();a=this.trees[l]=this._createTree(this._cluster(a,l)),n&&console.log("z%d: %d clusters in %dms",l,a.numItems,+Date.now()-c)}return n&&console.timeEnd("total time"),this}getClusters(e,n){let r=((e[0]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,e[1]));let o=e[2]===180?180:((e[2]+180)%360+360)%360-180;const s=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,o=180;else if(r>o){const d=this.getClusters([r,i,180,s],n),p=this.getClusters([-180,i,o,s],n);return d.concat(p)}const a=this.trees[this._limitZoom(n)],l=a.range(gi(r),vi(s),gi(o),vi(i)),c=a.data,f=[];for(const d of l){const p=this.stride*d;f.push(c[p+ln]>1?Qa(c,p,this.clusterProps):this.points[c[p+cn]])}return f}getChildren(e){const n=this._getOriginId(e),r=this._getOriginZoom(e),i="No cluster with the specified id.",o=this.trees[r];if(!o)throw new Error(i);const s=o.data;if(n*this.stride>=s.length)throw new Error(i);const a=this.options.radius/(this.options.extent*Math.pow(2,r-1)),l=s[n*this.stride],c=s[n*this.stride+1],f=o.within(l,c,a),d=[];for(const p of f){const v=p*this.stride;s[v+Ko]===e&&d.push(s[v+ln]>1?Qa(s,v,this.clusterProps):this.points[s[v+cn]])}if(d.length===0)throw new Error(i);return d}getLeaves(e,n,r){n=n||10,r=r||0;const i=[];return this._appendLeaves(i,e,n,r,0),i}getTile(e,n,r){const i=this.trees[this._limitZoom(e)],o=Math.pow(2,e),{extent:s,radius:a}=this.options,l=a/s,c=(r-l)/o,f=(r+1+l)/o,d={features:[]};return this._addTileFeatures(i.range((n-l)/o,c,(n+1+l)/o,f),i.data,n,r,o,d),n===0&&this._addTileFeatures(i.range(1-l/o,c,1,f),i.data,o,r,o,d),n===o-1&&this._addTileFeatures(i.range(0,c,l/o,f),i.data,-1,r,o,d),d.features.length?d:null}getClusterExpansionZoom(e){let n=this._getOriginZoom(e)-1;for(;n<=this.options.maxZoom;){const r=this.getChildren(e);if(n++,r.length!==1)break;e=r[0].properties.cluster_id}return n}_appendLeaves(e,n,r,i,o){const s=this.getChildren(n);for(const a of s){const l=a.properties;if(l&&l.cluster?o+l.point_count<=i?o+=l.point_count:o=this._appendLeaves(e,l.cluster_id,r,i,o):o<i?o++:e.push(a),e.length===r)break}return o}_createTree(e){const n=new ra(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<e.length;r+=this.stride)n.add(e[r],e[r+1]);return n.finish(),n.data=e,n}_addTileFeatures(e,n,r,i,o,s){for(const a of e){const l=a*this.stride,c=n[l+ln]>1;let f,d,p;if(c)f=wu(n,l,this.clusterProps),d=n[l],p=n[l+1];else{const h=this.points[n[l+cn]];f=h.properties;const[S,E]=h.geometry.coordinates;d=gi(S),p=vi(E)}const v={type:1,geometry:[[Math.round(this.options.extent*(d*o-r)),Math.round(this.options.extent*(p*o-i))]],tags:f};let g;c||this.options.generateId?g=n[l+cn]:g=this.points[n[l+cn]].id,g!==void 0&&(v.id=g),s.features.push(v)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,n){const{radius:r,extent:i,reduce:o,minPoints:s}=this.options,a=r/(i*Math.pow(2,n)),l=e.data,c=[],f=this.stride;for(let d=0;d<l.length;d+=f){if(l[d+Cn]<=n)continue;l[d+Cn]=n;const p=l[d],v=l[d+1],g=e.within(l[d],l[d+1],a),h=l[d+ln];let S=h;for(const E of g){const b=E*f;l[b+Cn]>n&&(S+=l[b+ln])}if(S>h&&S>=s){let E=p*h,b=v*h,y,x=-1;const L=((d/f|0)<<5)+(n+1)+this.points.length;for(const m of g){const w=m*f;if(l[w+Cn]<=n)continue;l[w+Cn]=n;const _=l[w+ln];E+=l[w]*_,b+=l[w+1]*_,l[w+Ko]=L,o&&(y||(y=this._map(l,d,!0),x=this.clusterProps.length,this.clusterProps.push(y)),o(y,this._map(l,w)))}l[d+Ko]=L,c.push(E/S,b/S,1/0,L,-1,S),o&&c.push(x)}else{for(let E=0;E<f;E++)c.push(l[d+E]);if(S>1)for(const E of g){const b=E*f;if(!(l[b+Cn]<=n)){l[b+Cn]=n;for(let y=0;y<f;y++)c.push(l[b+y])}}}}return c}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,n,r){if(e[n+ln]>1){const s=this.clusterProps[e[n+bu]];return r?Object.assign({},s):s}const i=this.points[e[n+cn]].properties,o=this.options.map(i);return r&&o===i?Object.assign({},o):o}}function Qa(t,e,n){return{type:"Feature",id:t[e+cn],properties:wu(t,e,n),geometry:{type:"Point",coordinates:[kh(t[e]),Rh(t[e+1])]}}}function wu(t,e,n){const r=t[e+ln],i=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,o=t[e+bu],s=o===-1?{}:Object.assign({},n[o]);return Object.assign(s,{cluster:!0,cluster_id:t[e+cn],point_count:r,point_count_abbreviated:i})}function gi(t){return t/360+.5}function vi(t){const e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function kh(t){return(t-.5)*360}function Rh(t){const e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}/*! *****************************************************************************
|
|
36
36
|
Copyright (c) Microsoft Corporation.
|
|
37
37
|
|
|
38
38
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -50,7 +50,7 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
50
50
|
<circle cx="120" cy="120" opacity=".3" r="90" />
|
|
51
51
|
<circle cx="120" cy="120" opacity=".2" r="110" />
|
|
52
52
|
<text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${e}</text>
|
|
53
|
-
</svg>`,a=`Cluster of ${e} markers`,l=Number(google.maps.Marker.MAX_ZINDEX)+e;if(yt.isAdvancedMarkerAvailable(i)){const f=document.createElement("div");f.innerHTML=s;const d=f.firstElementChild;d.setAttribute("transform","translate(0 25)");const p={map:i,position:n,zIndex:l,title:a,content:d};return new google.maps.marker.AdvancedMarkerElement(p)}const c={position:n,zIndex:l,title:a,icon:{url:`data:image/svg+xml;base64,${btoa(s)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(c)}}function Bh(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class ia{constructor(){Bh(ia,google.maps.OverlayView)}}var Br;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"})(Br||(Br={}));const Uh=(t,e,n)=>{n.fitBounds(e.bounds)};class Vh extends ia{constructor({map:e,markers:n=[],algorithmOptions:r={},algorithm:i=new Ih(r),renderer:o=new Nh,onClusterClick:s=Uh}){super(),this.markers=[...n],this.clusters=[],this.algorithm=i,this.renderer=o,this.onClusterClick=s,e&&this.setMap(e)}addMarker(e,n){this.markers.includes(e)||(this.markers.push(e),n||this.render())}addMarkers(e,n){e.forEach(r=>{this.addMarker(r,!0)}),n||this.render()}removeMarker(e,n){const r=this.markers.indexOf(e);return r===-1?!1:(yt.setMap(e,null),this.markers.splice(r,1),n||this.render(),!0)}removeMarkers(e,n){let r=!1;return e.forEach(i=>{r=this.removeMarker(i,!0)||r}),r&&!n&&this.render(),r}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,Br.CLUSTERING_BEGIN,this);const{clusters:n,changed:r}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(r||r==null){const i=new Set;for(const s of n)s.markers.length==1&&i.add(s.markers[0]);const o=[];for(const s of this.clusters)s.marker!=null&&(s.markers.length==1?i.has(s.marker)||yt.setMap(s.marker,null):o.push(s.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>o.forEach(s=>yt.setMap(s,null)))}google.maps.event.trigger(this,Br.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(e=>yt.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new jh(this.markers,this.clusters),n=this.getMap();this.clusters.forEach(r=>{r.markers.length===1?r.marker=r.markers[0]:(r.marker=this.renderer.render(r,e,n),r.markers.forEach(i=>yt.setMap(i,null)),this.onClusterClick&&r.marker.addListener("click",i=>{google.maps.event.trigger(this,Br.CLUSTER_CLICK,r),this.onClusterClick(i,r,n)})),yt.setMap(r.marker,n)})}}function Fh(t){var e=Zp(),n=u.useState(null),r=n[0],i=n[1];return u.useEffect(function(){if(e&&r===null){var o=new Vh(ee(ee({},t),{map:e}));i(o)}},[e]),r}function zh(t){var e=t.children,n=t.options,r=Fh(n);return r!==null?e(r):null}u.memo(zh);var Qa={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},el={options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},zIndex:function(t,e){t.setZIndex(e)}};function $h(t){var e=t.children,n=t.anchor,r=t.options,i=t.position,o=t.zIndex,s=t.onCloseClick,a=t.onDomReady,l=t.onContentChanged,c=t.onPositionChanged,f=t.onZindexChanged,d=t.onLoad,p=t.onUnmount,v=u.useContext(ue),g=u.useState(null),h=g[0],S=g[1],L=u.useState(null),b=L[0],y=L[1],x=u.useState(null),E=x[0],m=x[1],w=u.useState(null),_=w[0],P=w[1],M=u.useState(null),O=M[0],k=M[1],I=u.useState(null),B=I[0],H=I[1],Z=u.useRef(null);return u.useEffect(function(){h!==null&&(h.close(),n?h.open(v,n):h.getPosition()&&h.open(v))},[v,h,n]),u.useEffect(function(){r&&h!==null&&h.setOptions(r)},[h,r]),u.useEffect(function(){i&&h!==null&&h.setPosition(i)},[i]),u.useEffect(function(){typeof o=="number"&&h!==null&&h.setZIndex(o)},[o]),u.useEffect(function(){h&&s&&(b!==null&&google.maps.event.removeListener(b),y(google.maps.event.addListener(h,"closeclick",s)))},[s]),u.useEffect(function(){h&&a&&(E!==null&&google.maps.event.removeListener(E),m(google.maps.event.addListener(h,"domready",a)))},[a]),u.useEffect(function(){h&&l&&(_!==null&&google.maps.event.removeListener(_),P(google.maps.event.addListener(h,"content_changed",l)))},[l]),u.useEffect(function(){h&&c&&(O!==null&&google.maps.event.removeListener(O),k(google.maps.event.addListener(h,"position_changed",c)))},[c]),u.useEffect(function(){h&&f&&(B!==null&&google.maps.event.removeListener(B),H(google.maps.event.addListener(h,"zindex_changed",f)))},[f]),u.useEffect(function(){var F=new google.maps.InfoWindow(ee({},r||{}));return S(F),Z.current=document.createElement("div"),s&&y(google.maps.event.addListener(F,"closeclick",s)),a&&m(google.maps.event.addListener(F,"domready",a)),l&&P(google.maps.event.addListener(F,"content_changed",l)),c&&k(google.maps.event.addListener(F,"position_changed",c)),f&&H(google.maps.event.addListener(F,"zindex_changed",f)),F.setContent(Z.current),i&&F.setPosition(i),o&&F.setZIndex(o),n?F.open(v,n):F.getPosition()?F.open(v):Ze(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>."),d&&d(F),function(){b&&google.maps.event.removeListener(b),_&&google.maps.event.removeListener(_),E&&google.maps.event.removeListener(E),O&&google.maps.event.removeListener(O),B&&google.maps.event.removeListener(B),p&&p(F),F.close()}},[]),Z.current?ur.createPortal(u.Children.only(e),Z.current):null}u.memo($h);var Su=function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoWindow:null},n.open=function(r,i){i?r.open(n.context,i):r.getPosition()?r.open(n.context):Ze(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>.")},n.setInfoWindowCallback=function(){n.state.infoWindow!==null&&n.containerElement!==null&&(n.state.infoWindow.setContent(n.containerElement),n.open(n.state.infoWindow,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoWindow))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.InfoWindow(ee({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=pe({updaterMap:el,eventMap:Qa,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{infoWindow:n}},this.setInfoWindowCallback)},e.prototype.componentDidUpdate=function(n){this.state.infoWindow!==null&&(ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:el,eventMap:Qa,prevProps:n,nextProps:this.props,instance:this.state.infoWindow}))},e.prototype.componentWillUnmount=function(){this.state.infoWindow!==null&&(ve(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())},e.prototype.render=function(){return this.containerElement?ur.createPortal(u.Children.only(this.props.children),this.containerElement):null},e.contextType=ue,e}(u.PureComponent),tl={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},nl={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},visible:function(t,e){t.setVisible(e)}},Hh={};function Gh(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,o=t.path,s=t.onDblClick,a=t.onDragEnd,l=t.onDragStart,c=t.onMouseDown,f=t.onMouseMove,d=t.onMouseOut,p=t.onMouseOver,v=t.onMouseUp,g=t.onRightClick,h=t.onClick,S=t.onDrag,L=t.onLoad,b=t.onUnmount,y=u.useContext(ue),x=u.useState(null),E=x[0],m=x[1],w=u.useState(null),_=w[0],P=w[1],M=u.useState(null),O=M[0],k=M[1],I=u.useState(null),B=I[0],H=I[1],Z=u.useState(null),F=Z[0],K=Z[1],A=u.useState(null),R=A[0],T=A[1],V=u.useState(null),z=V[0],$=V[1],Q=u.useState(null),N=Q[0],D=Q[1],W=u.useState(null),q=W[0],te=W[1],re=u.useState(null),ie=re[0],fe=re[1],Oe=u.useState(null),me=Oe[0],ye=Oe[1],Me=u.useState(null),Pe=Me[0],Te=Me[1];return u.useEffect(function(){E!==null&&E.setMap(y)},[y]),u.useEffect(function(){typeof e<"u"&&E!==null&&E.setOptions(e)},[E,e]),u.useEffect(function(){typeof n<"u"&&E!==null&&E.setDraggable(n)},[E,n]),u.useEffect(function(){typeof r<"u"&&E!==null&&E.setEditable(r)},[E,r]),u.useEffect(function(){typeof i<"u"&&E!==null&&E.setVisible(i)},[E,i]),u.useEffect(function(){typeof o<"u"&&E!==null&&E.setPath(o)},[E,o]),u.useEffect(function(){E&&s&&(_!==null&&google.maps.event.removeListener(_),P(google.maps.event.addListener(E,"dblclick",s)))},[s]),u.useEffect(function(){E&&a&&(O!==null&&google.maps.event.removeListener(O),k(google.maps.event.addListener(E,"dragend",a)))},[a]),u.useEffect(function(){E&&l&&(B!==null&&google.maps.event.removeListener(B),H(google.maps.event.addListener(E,"dragstart",l)))},[l]),u.useEffect(function(){E&&c&&(F!==null&&google.maps.event.removeListener(F),K(google.maps.event.addListener(E,"mousedown",c)))},[c]),u.useEffect(function(){E&&f&&(R!==null&&google.maps.event.removeListener(R),T(google.maps.event.addListener(E,"mousemove",f)))},[f]),u.useEffect(function(){E&&d&&(z!==null&&google.maps.event.removeListener(z),$(google.maps.event.addListener(E,"mouseout",d)))},[d]),u.useEffect(function(){E&&p&&(N!==null&&google.maps.event.removeListener(N),D(google.maps.event.addListener(E,"mouseover",p)))},[p]),u.useEffect(function(){E&&v&&(q!==null&&google.maps.event.removeListener(q),te(google.maps.event.addListener(E,"mouseup",v)))},[v]),u.useEffect(function(){E&&g&&(ie!==null&&google.maps.event.removeListener(ie),fe(google.maps.event.addListener(E,"rightclick",g)))},[g]),u.useEffect(function(){E&&h&&(me!==null&&google.maps.event.removeListener(me),ye(google.maps.event.addListener(E,"click",h)))},[h]),u.useEffect(function(){E&&S&&(Pe!==null&&google.maps.event.removeListener(Pe),Te(google.maps.event.addListener(E,"drag",S)))},[S]),u.useEffect(function(){var se=new google.maps.Polyline(ee(ee({},e||Hh),{map:y}));return o&&se.setPath(o),typeof i<"u"&&se.setVisible(i),typeof r<"u"&&se.setEditable(r),typeof n<"u"&&se.setDraggable(n),s&&P(google.maps.event.addListener(se,"dblclick",s)),a&&k(google.maps.event.addListener(se,"dragend",a)),l&&H(google.maps.event.addListener(se,"dragstart",l)),c&&K(google.maps.event.addListener(se,"mousedown",c)),f&&T(google.maps.event.addListener(se,"mousemove",f)),d&&$(google.maps.event.addListener(se,"mouseout",d)),p&&D(google.maps.event.addListener(se,"mouseover",p)),v&&te(google.maps.event.addListener(se,"mouseup",v)),g&&fe(google.maps.event.addListener(se,"rightclick",g)),h&&ye(google.maps.event.addListener(se,"click",h)),S&&Te(google.maps.event.addListener(se,"drag",S)),m(se),L&&L(se),function(){_!==null&&google.maps.event.removeListener(_),O!==null&&google.maps.event.removeListener(O),B!==null&&google.maps.event.removeListener(B),F!==null&&google.maps.event.removeListener(F),R!==null&&google.maps.event.removeListener(R),z!==null&&google.maps.event.removeListener(z),N!==null&&google.maps.event.removeListener(N),q!==null&&google.maps.event.removeListener(q),ie!==null&&google.maps.event.removeListener(ie),me!==null&&google.maps.event.removeListener(me),b&&b(se),se.setMap(null)}},[]),null}u.memo(Gh);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polyline:null},n.setPolylineCallback=function(){n.state.polyline!==null&&n.props.onLoad&&n.props.onLoad(n.state.polyline)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polyline(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=pe({updaterMap:nl,eventMap:tl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polyline:n}},this.setPolylineCallback)},e.prototype.componentDidUpdate=function(n){this.state.polyline!==null&&(ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:nl,eventMap:tl,prevProps:n,nextProps:this.props,instance:this.state.polyline}))},e.prototype.componentWillUnmount=function(){this.state.polyline!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),ve(this.registeredEvents),this.state.polyline.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e})(u.PureComponent);var rl={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},il={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},paths:function(t,e){t.setPaths(e)},visible:function(t,e){t.setVisible(e)}};function Wh(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,o=t.path,s=t.paths,a=t.onDblClick,l=t.onDragEnd,c=t.onDragStart,f=t.onMouseDown,d=t.onMouseMove,p=t.onMouseOut,v=t.onMouseOver,g=t.onMouseUp,h=t.onRightClick,S=t.onClick,L=t.onDrag,b=t.onLoad,y=t.onUnmount,x=u.useContext(ue),E=u.useState(null),m=E[0],w=E[1],_=u.useState(null),P=_[0],M=_[1],O=u.useState(null),k=O[0],I=O[1],B=u.useState(null),H=B[0],Z=B[1],F=u.useState(null),K=F[0],A=F[1],R=u.useState(null),T=R[0],V=R[1],z=u.useState(null),$=z[0],Q=z[1],N=u.useState(null),D=N[0],W=N[1],q=u.useState(null),te=q[0],re=q[1],ie=u.useState(null),fe=ie[0],Oe=ie[1],me=u.useState(null),ye=me[0],Me=me[1],Pe=u.useState(null),Te=Pe[0],se=Pe[1];return u.useEffect(function(){m!==null&&m.setMap(x)},[x]),u.useEffect(function(){typeof e<"u"&&m!==null&&m.setOptions(e)},[m,e]),u.useEffect(function(){typeof n<"u"&&m!==null&&m.setDraggable(n)},[m,n]),u.useEffect(function(){typeof r<"u"&&m!==null&&m.setEditable(r)},[m,r]),u.useEffect(function(){typeof i<"u"&&m!==null&&m.setVisible(i)},[m,i]),u.useEffect(function(){typeof o<"u"&&m!==null&&m.setPath(o)},[m,o]),u.useEffect(function(){typeof s<"u"&&m!==null&&m.setPaths(s)},[m,s]),u.useEffect(function(){m&&a&&(P!==null&&google.maps.event.removeListener(P),M(google.maps.event.addListener(m,"dblclick",a)))},[a]),u.useEffect(function(){m&&l&&(k!==null&&google.maps.event.removeListener(k),I(google.maps.event.addListener(m,"dragend",l)))},[l]),u.useEffect(function(){m&&c&&(H!==null&&google.maps.event.removeListener(H),Z(google.maps.event.addListener(m,"dragstart",c)))},[c]),u.useEffect(function(){m&&f&&(K!==null&&google.maps.event.removeListener(K),A(google.maps.event.addListener(m,"mousedown",f)))},[f]),u.useEffect(function(){m&&d&&(T!==null&&google.maps.event.removeListener(T),V(google.maps.event.addListener(m,"mousemove",d)))},[d]),u.useEffect(function(){m&&p&&($!==null&&google.maps.event.removeListener($),Q(google.maps.event.addListener(m,"mouseout",p)))},[p]),u.useEffect(function(){m&&v&&(D!==null&&google.maps.event.removeListener(D),W(google.maps.event.addListener(m,"mouseover",v)))},[v]),u.useEffect(function(){m&&g&&(te!==null&&google.maps.event.removeListener(te),re(google.maps.event.addListener(m,"mouseup",g)))},[g]),u.useEffect(function(){m&&h&&(fe!==null&&google.maps.event.removeListener(fe),Oe(google.maps.event.addListener(m,"rightclick",h)))},[h]),u.useEffect(function(){m&&S&&(ye!==null&&google.maps.event.removeListener(ye),Me(google.maps.event.addListener(m,"click",S)))},[S]),u.useEffect(function(){m&&L&&(Te!==null&&google.maps.event.removeListener(Te),se(google.maps.event.addListener(m,"drag",L)))},[L]),u.useEffect(function(){var ae=new google.maps.Polygon(ee(ee({},e||{}),{map:x}));return o&&ae.setPath(o),s&&ae.setPaths(s),typeof i<"u"&&ae.setVisible(i),typeof r<"u"&&ae.setEditable(r),typeof n<"u"&&ae.setDraggable(n),a&&M(google.maps.event.addListener(ae,"dblclick",a)),l&&I(google.maps.event.addListener(ae,"dragend",l)),c&&Z(google.maps.event.addListener(ae,"dragstart",c)),f&&A(google.maps.event.addListener(ae,"mousedown",f)),d&&V(google.maps.event.addListener(ae,"mousemove",d)),p&&Q(google.maps.event.addListener(ae,"mouseout",p)),v&&W(google.maps.event.addListener(ae,"mouseover",v)),g&&re(google.maps.event.addListener(ae,"mouseup",g)),h&&Oe(google.maps.event.addListener(ae,"rightclick",h)),S&&Me(google.maps.event.addListener(ae,"click",S)),L&&se(google.maps.event.addListener(ae,"drag",L)),w(ae),b&&b(ae),function(){P!==null&&google.maps.event.removeListener(P),k!==null&&google.maps.event.removeListener(k),H!==null&&google.maps.event.removeListener(H),K!==null&&google.maps.event.removeListener(K),T!==null&&google.maps.event.removeListener(T),$!==null&&google.maps.event.removeListener($),D!==null&&google.maps.event.removeListener(D),te!==null&&google.maps.event.removeListener(te),fe!==null&&google.maps.event.removeListener(fe),ye!==null&&google.maps.event.removeListener(ye),y&&y(ae),ae.setMap(null)}},[]),null}u.memo(Wh);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polygon:null},n.setPolygonCallback=function(){n.state.polygon!==null&&n.props.onLoad&&n.props.onLoad(n.state.polygon)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polygon(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=pe({updaterMap:il,eventMap:rl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polygon:n}},this.setPolygonCallback)},e.prototype.componentDidUpdate=function(n){this.state.polygon!==null&&(ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:il,eventMap:rl,prevProps:n,nextProps:this.props,instance:this.state.polygon}))},e.prototype.componentWillUnmount=function(){this.state.polygon!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polygon),ve(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e})(u.PureComponent);var ol={onBoundsChanged:"bounds_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},sl={bounds:function(t,e){t.setBounds(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},visible:function(t,e){t.setVisible(e)}};function Zh(t){var e=t.options,n=t.bounds,r=t.draggable,i=t.editable,o=t.visible,s=t.onDblClick,a=t.onDragEnd,l=t.onDragStart,c=t.onMouseDown,f=t.onMouseMove,d=t.onMouseOut,p=t.onMouseOver,v=t.onMouseUp,g=t.onRightClick,h=t.onClick,S=t.onDrag,L=t.onBoundsChanged,b=t.onLoad,y=t.onUnmount,x=u.useContext(ue),E=u.useState(null),m=E[0],w=E[1],_=u.useState(null),P=_[0],M=_[1],O=u.useState(null),k=O[0],I=O[1],B=u.useState(null),H=B[0],Z=B[1],F=u.useState(null),K=F[0],A=F[1],R=u.useState(null),T=R[0],V=R[1],z=u.useState(null),$=z[0],Q=z[1],N=u.useState(null),D=N[0],W=N[1],q=u.useState(null),te=q[0],re=q[1],ie=u.useState(null),fe=ie[0],Oe=ie[1],me=u.useState(null),ye=me[0],Me=me[1],Pe=u.useState(null),Te=Pe[0],se=Pe[1],ae=u.useState(null),ze=ae[0],Ye=ae[1];return u.useEffect(function(){m!==null&&m.setMap(x)},[x]),u.useEffect(function(){typeof e<"u"&&m!==null&&m.setOptions(e)},[m,e]),u.useEffect(function(){typeof r<"u"&&m!==null&&m.setDraggable(r)},[m,r]),u.useEffect(function(){typeof i<"u"&&m!==null&&m.setEditable(i)},[m,i]),u.useEffect(function(){typeof o<"u"&&m!==null&&m.setVisible(o)},[m,o]),u.useEffect(function(){typeof n<"u"&&m!==null&&m.setBounds(n)},[m,n]),u.useEffect(function(){m&&s&&(P!==null&&google.maps.event.removeListener(P),M(google.maps.event.addListener(m,"dblclick",s)))},[s]),u.useEffect(function(){m&&a&&(k!==null&&google.maps.event.removeListener(k),I(google.maps.event.addListener(m,"dragend",a)))},[a]),u.useEffect(function(){m&&l&&(H!==null&&google.maps.event.removeListener(H),Z(google.maps.event.addListener(m,"dragstart",l)))},[l]),u.useEffect(function(){m&&c&&(K!==null&&google.maps.event.removeListener(K),A(google.maps.event.addListener(m,"mousedown",c)))},[c]),u.useEffect(function(){m&&f&&(T!==null&&google.maps.event.removeListener(T),V(google.maps.event.addListener(m,"mousemove",f)))},[f]),u.useEffect(function(){m&&d&&($!==null&&google.maps.event.removeListener($),Q(google.maps.event.addListener(m,"mouseout",d)))},[d]),u.useEffect(function(){m&&p&&(D!==null&&google.maps.event.removeListener(D),W(google.maps.event.addListener(m,"mouseover",p)))},[p]),u.useEffect(function(){m&&v&&(te!==null&&google.maps.event.removeListener(te),re(google.maps.event.addListener(m,"mouseup",v)))},[v]),u.useEffect(function(){m&&g&&(fe!==null&&google.maps.event.removeListener(fe),Oe(google.maps.event.addListener(m,"rightclick",g)))},[g]),u.useEffect(function(){m&&h&&(ye!==null&&google.maps.event.removeListener(ye),Me(google.maps.event.addListener(m,"click",h)))},[h]),u.useEffect(function(){m&&S&&(Te!==null&&google.maps.event.removeListener(Te),se(google.maps.event.addListener(m,"drag",S)))},[S]),u.useEffect(function(){m&&L&&(ze!==null&&google.maps.event.removeListener(ze),Ye(google.maps.event.addListener(m,"bounds_changed",L)))},[L]),u.useEffect(function(){var J=new google.maps.Rectangle(ee(ee({},e||{}),{map:x}));return typeof o<"u"&&J.setVisible(o),typeof i<"u"&&J.setEditable(i),typeof r<"u"&&J.setDraggable(r),typeof n<"u"&&J.setBounds(n),s&&M(google.maps.event.addListener(J,"dblclick",s)),a&&I(google.maps.event.addListener(J,"dragend",a)),l&&Z(google.maps.event.addListener(J,"dragstart",l)),c&&A(google.maps.event.addListener(J,"mousedown",c)),f&&V(google.maps.event.addListener(J,"mousemove",f)),d&&Q(google.maps.event.addListener(J,"mouseout",d)),p&&W(google.maps.event.addListener(J,"mouseover",p)),v&&re(google.maps.event.addListener(J,"mouseup",v)),g&&Oe(google.maps.event.addListener(J,"rightclick",g)),h&&Me(google.maps.event.addListener(J,"click",h)),S&&se(google.maps.event.addListener(J,"drag",S)),L&&Ye(google.maps.event.addListener(J,"bounds_changed",L)),w(J),b&&b(J),function(){P!==null&&google.maps.event.removeListener(P),k!==null&&google.maps.event.removeListener(k),H!==null&&google.maps.event.removeListener(H),K!==null&&google.maps.event.removeListener(K),T!==null&&google.maps.event.removeListener(T),$!==null&&google.maps.event.removeListener($),D!==null&&google.maps.event.removeListener(D),te!==null&&google.maps.event.removeListener(te),fe!==null&&google.maps.event.removeListener(fe),ye!==null&&google.maps.event.removeListener(ye),Te!==null&&google.maps.event.removeListener(Te),ze!==null&&google.maps.event.removeListener(ze),y&&y(J),J.setMap(null)}},[]),null}u.memo(Zh);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={rectangle:null},n.setRectangleCallback=function(){n.state.rectangle!==null&&n.props.onLoad&&n.props.onLoad(n.state.rectangle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Rectangle(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=pe({updaterMap:sl,eventMap:ol,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{rectangle:n}},this.setRectangleCallback)},e.prototype.componentDidUpdate=function(n){this.state.rectangle!==null&&(ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:sl,eventMap:ol,prevProps:n,nextProps:this.props,instance:this.state.rectangle}))},e.prototype.componentWillUnmount=function(){this.state.rectangle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),ve(this.registeredEvents),this.state.rectangle.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e})(u.PureComponent);var al={onCenterChanged:"center_changed",onRadiusChanged:"radius_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},ll={center:function(t,e){t.setCenter(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},radius:function(t,e){t.setRadius(e)},visible:function(t,e){t.setVisible(e)}},qh={};function Kh(t){var e=t.options,n=t.center,r=t.radius,i=t.draggable,o=t.editable,s=t.visible,a=t.onDblClick,l=t.onDragEnd,c=t.onDragStart,f=t.onMouseDown,d=t.onMouseMove,p=t.onMouseOut,v=t.onMouseOver,g=t.onMouseUp,h=t.onRightClick,S=t.onClick,L=t.onDrag,b=t.onCenterChanged,y=t.onRadiusChanged,x=t.onLoad,E=t.onUnmount,m=u.useContext(ue),w=u.useState(null),_=w[0],P=w[1],M=u.useState(null),O=M[0],k=M[1],I=u.useState(null),B=I[0],H=I[1],Z=u.useState(null),F=Z[0],K=Z[1],A=u.useState(null),R=A[0],T=A[1],V=u.useState(null),z=V[0],$=V[1],Q=u.useState(null),N=Q[0],D=Q[1],W=u.useState(null),q=W[0],te=W[1],re=u.useState(null),ie=re[0],fe=re[1],Oe=u.useState(null),me=Oe[0],ye=Oe[1],Me=u.useState(null),Pe=Me[0],Te=Me[1],se=u.useState(null),ae=se[0],ze=se[1],Ye=u.useState(null),J=Ye[0],$e=Ye[1],Ne=u.useState(null),ft=Ne[0],ot=Ne[1];return u.useEffect(function(){_!==null&&_.setMap(m)},[m]),u.useEffect(function(){typeof e<"u"&&_!==null&&_.setOptions(e)},[_,e]),u.useEffect(function(){typeof i<"u"&&_!==null&&_.setDraggable(i)},[_,i]),u.useEffect(function(){typeof o<"u"&&_!==null&&_.setEditable(o)},[_,o]),u.useEffect(function(){typeof s<"u"&&_!==null&&_.setVisible(s)},[_,s]),u.useEffect(function(){typeof r=="number"&&_!==null&&_.setRadius(r)},[_,r]),u.useEffect(function(){typeof n<"u"&&_!==null&&_.setCenter(n)},[_,n]),u.useEffect(function(){_&&a&&(O!==null&&google.maps.event.removeListener(O),k(google.maps.event.addListener(_,"dblclick",a)))},[a]),u.useEffect(function(){_&&l&&(B!==null&&google.maps.event.removeListener(B),H(google.maps.event.addListener(_,"dragend",l)))},[l]),u.useEffect(function(){_&&c&&(F!==null&&google.maps.event.removeListener(F),K(google.maps.event.addListener(_,"dragstart",c)))},[c]),u.useEffect(function(){_&&f&&(R!==null&&google.maps.event.removeListener(R),T(google.maps.event.addListener(_,"mousedown",f)))},[f]),u.useEffect(function(){_&&d&&(z!==null&&google.maps.event.removeListener(z),$(google.maps.event.addListener(_,"mousemove",d)))},[d]),u.useEffect(function(){_&&p&&(N!==null&&google.maps.event.removeListener(N),D(google.maps.event.addListener(_,"mouseout",p)))},[p]),u.useEffect(function(){_&&v&&(q!==null&&google.maps.event.removeListener(q),te(google.maps.event.addListener(_,"mouseover",v)))},[v]),u.useEffect(function(){_&&g&&(ie!==null&&google.maps.event.removeListener(ie),fe(google.maps.event.addListener(_,"mouseup",g)))},[g]),u.useEffect(function(){_&&h&&(me!==null&&google.maps.event.removeListener(me),ye(google.maps.event.addListener(_,"rightclick",h)))},[h]),u.useEffect(function(){_&&S&&(Pe!==null&&google.maps.event.removeListener(Pe),Te(google.maps.event.addListener(_,"click",S)))},[S]),u.useEffect(function(){_&&L&&(ae!==null&&google.maps.event.removeListener(ae),ze(google.maps.event.addListener(_,"drag",L)))},[L]),u.useEffect(function(){_&&b&&(J!==null&&google.maps.event.removeListener(J),$e(google.maps.event.addListener(_,"center_changed",b)))},[S]),u.useEffect(function(){_&&y&&(ft!==null&&google.maps.event.removeListener(ft),ot(google.maps.event.addListener(_,"radius_changed",y)))},[y]),u.useEffect(function(){var le=new google.maps.Circle(ee(ee({},e||qh),{map:m}));return typeof r=="number"&&le.setRadius(r),typeof n<"u"&&le.setCenter(n),typeof r=="number"&&le.setRadius(r),typeof s<"u"&&le.setVisible(s),typeof o<"u"&&le.setEditable(o),typeof i<"u"&&le.setDraggable(i),a&&k(google.maps.event.addListener(le,"dblclick",a)),l&&H(google.maps.event.addListener(le,"dragend",l)),c&&K(google.maps.event.addListener(le,"dragstart",c)),f&&T(google.maps.event.addListener(le,"mousedown",f)),d&&$(google.maps.event.addListener(le,"mousemove",d)),p&&D(google.maps.event.addListener(le,"mouseout",p)),v&&te(google.maps.event.addListener(le,"mouseover",v)),g&&fe(google.maps.event.addListener(le,"mouseup",g)),h&&ye(google.maps.event.addListener(le,"rightclick",h)),S&&Te(google.maps.event.addListener(le,"click",S)),L&&ze(google.maps.event.addListener(le,"drag",L)),b&&$e(google.maps.event.addListener(le,"center_changed",b)),y&&ot(google.maps.event.addListener(le,"radius_changed",y)),P(le),x&&x(le),function(){O!==null&&google.maps.event.removeListener(O),B!==null&&google.maps.event.removeListener(B),F!==null&&google.maps.event.removeListener(F),R!==null&&google.maps.event.removeListener(R),z!==null&&google.maps.event.removeListener(z),N!==null&&google.maps.event.removeListener(N),q!==null&&google.maps.event.removeListener(q),ie!==null&&google.maps.event.removeListener(ie),me!==null&&google.maps.event.removeListener(me),Pe!==null&&google.maps.event.removeListener(Pe),J!==null&&google.maps.event.removeListener(J),ft!==null&&google.maps.event.removeListener(ft),E&&E(le),le.setMap(null)}},[]),null}u.memo(Kh);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={circle:null},n.setCircleCallback=function(){n.state.circle!==null&&n.props.onLoad&&n.props.onLoad(n.state.circle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Circle(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=pe({updaterMap:ll,eventMap:al,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{circle:n}},this.setCircleCallback)},e.prototype.componentDidUpdate=function(n){this.state.circle!==null&&(ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:ll,eventMap:al,prevProps:n,nextProps:this.props,instance:this.state.circle}))},e.prototype.componentWillUnmount=function(){var n;this.state.circle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),ve(this.registeredEvents),(n=this.state.circle)===null||n===void 0||n.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e})(u.PureComponent);var cl={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},ul={add:function(t,e){t.add(e)},addgeojson:function(t,e,n){t.addGeoJson(e,n)},contains:function(t,e){t.contains(e)},foreach:function(t,e){t.forEach(e)},loadgeojson:function(t,e,n,r){t.loadGeoJson(e,n,r)},overridestyle:function(t,e,n){t.overrideStyle(e,n)},remove:function(t,e){t.remove(e)},revertstyle:function(t,e){t.revertStyle(e)},controlposition:function(t,e){t.setControlPosition(e)},controls:function(t,e){t.setControls(e)},drawingmode:function(t,e){t.setDrawingMode(e)},map:function(t,e){t.setMap(e)},style:function(t,e){t.setStyle(e)},togeojson:function(t,e){t.toGeoJson(e)}};function Yh(t){var e=t.options,n=t.onClick,r=t.onDblClick,i=t.onMouseDown,o=t.onMouseMove,s=t.onMouseOut,a=t.onMouseOver,l=t.onMouseUp,c=t.onRightClick,f=t.onAddFeature,d=t.onRemoveFeature,p=t.onRemoveProperty,v=t.onSetGeometry,g=t.onSetProperty,h=t.onLoad,S=t.onUnmount,L=u.useContext(ue),b=u.useState(null),y=b[0],x=b[1],E=u.useState(null),m=E[0],w=E[1],_=u.useState(null),P=_[0],M=_[1],O=u.useState(null),k=O[0],I=O[1],B=u.useState(null),H=B[0],Z=B[1],F=u.useState(null),K=F[0],A=F[1],R=u.useState(null),T=R[0],V=R[1],z=u.useState(null),$=z[0],Q=z[1],N=u.useState(null),D=N[0],W=N[1],q=u.useState(null),te=q[0],re=q[1],ie=u.useState(null),fe=ie[0],Oe=ie[1],me=u.useState(null),ye=me[0],Me=me[1],Pe=u.useState(null),Te=Pe[0],se=Pe[1],ae=u.useState(null),ze=ae[0],Ye=ae[1];return u.useEffect(function(){y!==null&&y.setMap(L)},[L]),u.useEffect(function(){y&&r&&(m!==null&&google.maps.event.removeListener(m),w(google.maps.event.addListener(y,"dblclick",r)))},[r]),u.useEffect(function(){y&&i&&(P!==null&&google.maps.event.removeListener(P),M(google.maps.event.addListener(y,"mousedown",i)))},[i]),u.useEffect(function(){y&&o&&(k!==null&&google.maps.event.removeListener(k),I(google.maps.event.addListener(y,"mousemove",o)))},[o]),u.useEffect(function(){y&&s&&(H!==null&&google.maps.event.removeListener(H),Z(google.maps.event.addListener(y,"mouseout",s)))},[s]),u.useEffect(function(){y&&a&&(K!==null&&google.maps.event.removeListener(K),A(google.maps.event.addListener(y,"mouseover",a)))},[a]),u.useEffect(function(){y&&l&&(T!==null&&google.maps.event.removeListener(T),V(google.maps.event.addListener(y,"mouseup",l)))},[l]),u.useEffect(function(){y&&c&&($!==null&&google.maps.event.removeListener($),Q(google.maps.event.addListener(y,"rightclick",c)))},[c]),u.useEffect(function(){y&&n&&(D!==null&&google.maps.event.removeListener(D),W(google.maps.event.addListener(y,"click",n)))},[n]),u.useEffect(function(){y&&f&&(te!==null&&google.maps.event.removeListener(te),re(google.maps.event.addListener(y,"addfeature",f)))},[f]),u.useEffect(function(){y&&d&&(fe!==null&&google.maps.event.removeListener(fe),Oe(google.maps.event.addListener(y,"removefeature",d)))},[d]),u.useEffect(function(){y&&p&&(ye!==null&&google.maps.event.removeListener(ye),Me(google.maps.event.addListener(y,"removeproperty",p)))},[p]),u.useEffect(function(){y&&v&&(Te!==null&&google.maps.event.removeListener(Te),se(google.maps.event.addListener(y,"setgeometry",v)))},[v]),u.useEffect(function(){y&&g&&(ze!==null&&google.maps.event.removeListener(ze),Ye(google.maps.event.addListener(y,"setproperty",g)))},[g]),u.useEffect(function(){if(L!==null){var J=new google.maps.Data(ee(ee({},e||{}),{map:L}));r&&w(google.maps.event.addListener(J,"dblclick",r)),i&&M(google.maps.event.addListener(J,"mousedown",i)),o&&I(google.maps.event.addListener(J,"mousemove",o)),s&&Z(google.maps.event.addListener(J,"mouseout",s)),a&&A(google.maps.event.addListener(J,"mouseover",a)),l&&V(google.maps.event.addListener(J,"mouseup",l)),c&&Q(google.maps.event.addListener(J,"rightclick",c)),n&&W(google.maps.event.addListener(J,"click",n)),f&&re(google.maps.event.addListener(J,"addfeature",f)),d&&Oe(google.maps.event.addListener(J,"removefeature",d)),p&&Me(google.maps.event.addListener(J,"removeproperty",p)),v&&se(google.maps.event.addListener(J,"setgeometry",v)),g&&Ye(google.maps.event.addListener(J,"setproperty",g)),x(J),h&&h(J)}return function(){y&&(m!==null&&google.maps.event.removeListener(m),P!==null&&google.maps.event.removeListener(P),k!==null&&google.maps.event.removeListener(k),H!==null&&google.maps.event.removeListener(H),K!==null&&google.maps.event.removeListener(K),T!==null&&google.maps.event.removeListener(T),$!==null&&google.maps.event.removeListener($),D!==null&&google.maps.event.removeListener(D),te!==null&&google.maps.event.removeListener(te),fe!==null&&google.maps.event.removeListener(fe),ye!==null&&google.maps.event.removeListener(ye),Te!==null&&google.maps.event.removeListener(Te),ze!==null&&google.maps.event.removeListener(ze),S&&S(y),y.setMap(null))}},[]),null}u.memo(Yh);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={data:null},n.setDataCallback=function(){n.state.data!==null&&n.props.onLoad&&n.props.onLoad(n.state.data)},n}return e.prototype.componentDidMount=function(){if(this.context!==null){var n=new google.maps.Data(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=pe({updaterMap:ul,eventMap:cl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{data:n}},this.setDataCallback)}},e.prototype.componentDidUpdate=function(n){this.state.data!==null&&(ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:ul,eventMap:cl,prevProps:n,nextProps:this.props,instance:this.state.data}))},e.prototype.componentWillUnmount=function(){this.state.data!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),ve(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e})(u.PureComponent);var fl={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},dl={options:function(t,e){t.setOptions(e)},url:function(t,e){t.setUrl(e)},zIndex:function(t,e){t.setZIndex(e)}};(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={kmlLayer:null},n.setKmlLayerCallback=function(){n.state.kmlLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.kmlLayer)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.KmlLayer(ee(ee({},this.props.options),{map:this.context}));this.registeredEvents=pe({updaterMap:dl,eventMap:fl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{kmlLayer:n}},this.setKmlLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.kmlLayer!==null&&(ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:dl,eventMap:fl,prevProps:n,nextProps:this.props,instance:this.state.kmlLayer}))},e.prototype.componentWillUnmount=function(){this.state.kmlLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),ve(this.registeredEvents),this.state.kmlLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e})(u.PureComponent);function Lu(t,e){return typeof e=="function"?e(t.offsetWidth,t.offsetHeight):{x:0,y:0}}function Jh(t,e){return new e(t.lat,t.lng)}function Xh(t,e){return new e(new google.maps.LatLng(t.ne.lat,t.ne.lng),new google.maps.LatLng(t.sw.lat,t.sw.lng))}function Qh(t,e,n){return t instanceof e?t:n(t,e)}function eg(t,e,n){return t instanceof e?t:n(t,e)}function tg(t,e,n){var r=t&&t.fromLatLngToDivPixel(n.getNorthEast()),i=t&&t.fromLatLngToDivPixel(n.getSouthWest());return r&&i?{left:"".concat(i.x+e.x,"px"),top:"".concat(r.y+e.y,"px"),width:"".concat(r.x-i.x-e.x,"px"),height:"".concat(i.y-r.y-e.y,"px")}:{left:"-9999px",top:"-9999px"}}function ng(t,e,n){var r=t&&t.fromLatLngToDivPixel(n);if(r){var i=r.x,o=r.y;return{left:"".concat(i+e.x,"px"),top:"".concat(o+e.y,"px")}}return{left:"-9999px",top:"-9999px"}}function Eu(t,e,n,r){return n!==void 0?tg(t,e,eg(n,google.maps.LatLngBounds,Xh)):ng(t,e,Qh(r,google.maps.LatLng,Jh))}function rg(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.height&&t.height===e.height}function ig(t,e,n,r,i){var o=function(s){je(a,s);function a(l,c,f,d){var p=s.call(this)||this;return p.container=l,p.pane=c,p.position=f,p.bounds=d,p}return a.prototype.onAdd=function(){var l,c=(l=this.getPanes())===null||l===void 0?void 0:l[this.pane];c==null||c.appendChild(this.container)},a.prototype.draw=function(){for(var l=this.getProjection(),c=ee({},this.container?Lu(this.container,i):{x:0,y:0}),f=Eu(l,c,this.bounds,this.position),d=0,p=Object.entries(f);d<p.length;d++){var v=p[d],g=v[0],h=v[1];this.container.style[g]=h}},a.prototype.onRemove=function(){this.container.parentNode!==null&&this.container.parentNode.removeChild(this.container)},a}(google.maps.OverlayView);return new o(t,e,n,r)}function pl(t){if(!t)return"";var e=t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng);return e+""}function hl(t){if(!t)return"";var e=t instanceof google.maps.LatLngBounds?t:new google.maps.LatLngBounds(new google.maps.LatLng(t.south,t.east),new google.maps.LatLng(t.north,t.west));return e+""}function og(t){var e=t.position,n=t.bounds,r=t.mapPaneName,i=t.zIndex,o=t.onLoad,s=t.onUnmount,a=t.getPixelPositionOffset,l=t.children,c=u.useContext(ue),f=u.useMemo(function(){var p=document.createElement("div");return p.style.position="absolute",p},[]),d=u.useMemo(function(){return ig(f,r,e,n,a)},[f,r,e,n]);return u.useEffect(function(){return o==null||o(d),d==null||d.setMap(c),function(){s==null||s(d),d==null||d.setMap(null)}},[c,d]),u.useEffect(function(){f.style.zIndex="".concat(i)},[i,f]),Yc.createPortal(l,f)}u.memo(og);(function(t){je(e,t);function e(n){var r=t.call(this,n)||this;r.state={paneEl:null,containerStyle:{position:"absolute"}},r.updatePane=function(){var o=r.props.mapPaneName,s=r.overlayView.getPanes();Ze(!!o,"OverlayView requires props.mapPaneName but got %s",o),s?r.setState({paneEl:s[o]}):r.setState({paneEl:null})},r.onAdd=function(){var o,s;r.updatePane(),(s=(o=r.props).onLoad)===null||s===void 0||s.call(o,r.overlayView)},r.onPositionElement=function(){var o,s=r.overlayView.getProjection(),a=ee({x:0,y:0},r.containerRef.current?Lu(r.containerRef.current,r.props.getPixelPositionOffset):{}),l=Eu(s,a,r.props.bounds,r.props.position),c=(o=r.state.containerStyle,o.left),f=o.top,d=o.width,p=o.height;rg(l,{left:c,top:f,width:d,height:p})||r.setState({containerStyle:{top:l.top||0,left:l.left||0,width:l.width||0,height:l.height||0,position:"absolute"}})},r.draw=function(){r.onPositionElement()},r.onRemove=function(){var o,s;r.setState(function(){return{paneEl:null}}),(s=(o=r.props).onUnmount)===null||s===void 0||s.call(o,r.overlayView)},r.containerRef=u.createRef();var i=new google.maps.OverlayView;return i.onAdd=r.onAdd,i.draw=r.draw,i.onRemove=r.onRemove,r.overlayView=i,r}return e.prototype.componentDidMount=function(){this.overlayView.setMap(this.context)},e.prototype.componentDidUpdate=function(n){var r=pl(n.position),i=pl(this.props.position),o=hl(n.bounds),s=hl(this.props.bounds);(r!==i||o!==s)&&this.overlayView.draw(),n.mapPaneName!==this.props.mapPaneName&&this.updatePane()},e.prototype.componentWillUnmount=function(){this.overlayView.setMap(null)},e.prototype.render=function(){var n=this.state.paneEl;return n?Yc.createPortal(C.jsx("div",{ref:this.containerRef,style:this.state.containerStyle,children:u.Children.only(this.props.children)}),n):null},e.FLOAT_PANE="floatPane",e.MAP_PANE="mapPane",e.MARKER_LAYER="markerLayer",e.OVERLAY_LAYER="overlayLayer",e.OVERLAY_MOUSE_TARGET="overlayMouseTarget",e.contextType=ue,e})(u.PureComponent);function sg(){}var gl={onDblClick:"dblclick",onClick:"click"},vl={opacity:function(t,e){t.setOpacity(e)}};function ag(t){var e=t.url,n=t.bounds,r=t.options,i=t.visible,o=u.useContext(ue),s=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east)),a=u.useMemo(function(){var l=new google.maps.GroundOverlay(e,s,ee({},r));return l},[]);return u.useEffect(function(){a!==null&&a.setMap(o)},[o]),u.useEffect(function(){typeof e<"u"&&a!==null&&(a.set("url",e),a.setMap(o))},[a,e]),u.useEffect(function(){typeof i<"u"&&a!==null&&a.setOpacity(i?1:0)},[a,i]),u.useEffect(function(){var l=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east));typeof n<"u"&&a!==null&&(a.set("bounds",l),a.setMap(o))},[a,n]),null}u.memo(ag);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={groundOverlay:null},n.setGroundOverlayCallback=function(){n.state.groundOverlay!==null&&n.props.onLoad&&n.props.onLoad(n.state.groundOverlay)},n}return e.prototype.componentDidMount=function(){Ze(!!this.props.url||!!this.props.bounds,"For GroundOverlay, url and bounds are passed in to constructor and are immutable after instantiated. This is the behavior of Google Maps JavaScript API v3 ( See https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay) Hence, use the corresponding two props provided by `react-google-maps-api`, url and bounds. In some cases, you'll need the GroundOverlay component to reflect the changes of url and bounds. You can leverage the React's key property to remount the component. Typically, just `key={url}` would serve your need. See https://github.com/tomchentw/react-google-maps/issues/655");var n=new google.maps.GroundOverlay(this.props.url,this.props.bounds,ee(ee({},this.props.options),{map:this.context}));this.registeredEvents=pe({updaterMap:vl,eventMap:gl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{groundOverlay:n}},this.setGroundOverlayCallback)},e.prototype.componentDidUpdate=function(n){this.state.groundOverlay!==null&&(ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:vl,eventMap:gl,prevProps:n,nextProps:this.props,instance:this.state.groundOverlay}))},e.prototype.componentWillUnmount=function(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))},e.prototype.render=function(){return null},e.defaultProps={onLoad:sg},e.contextType=ue,e})(u.PureComponent);var ml={},yl={data:function(t,e){t.setData(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)}};function lg(t){var e=t.data,n=t.onLoad,r=t.onUnmount,i=t.options,o=u.useContext(ue),s=u.useState(null),a=s[0],l=s[1];return u.useEffect(function(){google.maps.visualization||Ze(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),u.useEffect(function(){Ze(!!e,"data property is required in HeatmapLayer %s",e)},[e]),u.useEffect(function(){a!==null&&a.setMap(o)},[o]),u.useEffect(function(){i&&a!==null&&a.setOptions(i)},[a,i]),u.useEffect(function(){var c=new google.maps.visualization.HeatmapLayer(ee(ee({},i||{}),{data:e,map:o}));return l(c),n&&n(c),function(){a!==null&&(r&&r(a),a.setMap(null))}},[]),null}u.memo(lg);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={heatmapLayer:null},n.setHeatmapLayerCallback=function(){n.state.heatmapLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.heatmapLayer)},n}return e.prototype.componentDidMount=function(){Ze(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),Ze(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var n=new google.maps.visualization.HeatmapLayer(ee(ee({},this.props.options||{}),{data:this.props.data,map:this.context}));this.registeredEvents=pe({updaterMap:yl,eventMap:ml,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{heatmapLayer:n}},this.setHeatmapLayerCallback)},e.prototype.componentDidUpdate=function(n){ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:yl,eventMap:ml,prevProps:n,nextProps:this.props,instance:this.state.heatmapLayer})},e.prototype.componentWillUnmount=function(){this.state.heatmapLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),ve(this.registeredEvents),this.state.heatmapLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e})(u.PureComponent);var bl={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},wl={register:function(t,e,n){t.registerPanoProvider(e,n)},links:function(t,e){t.setLinks(e)},motionTracking:function(t,e){t.setMotionTracking(e)},options:function(t,e){t.setOptions(e)},pano:function(t,e){t.setPano(e)},position:function(t,e){t.setPosition(e)},pov:function(t,e){t.setPov(e)},visible:function(t,e){t.setVisible(e)},zoom:function(t,e){t.setZoom(e)}};(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={streetViewPanorama:null},n.setStreetViewPanoramaCallback=function(){n.state.streetViewPanorama!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewPanorama)},n}return e.prototype.componentDidMount=function(){var n,r,i=(r=(n=this.context)===null||n===void 0?void 0:n.getStreetView())!==null&&r!==void 0?r:null;this.registeredEvents=pe({updaterMap:wl,eventMap:bl,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{streetViewPanorama:i}},this.setStreetViewPanoramaCallback)},e.prototype.componentDidUpdate=function(n){this.state.streetViewPanorama!==null&&(ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:wl,eventMap:bl,prevProps:n,nextProps:this.props,instance:this.state.streetViewPanorama}))},e.prototype.componentWillUnmount=function(){this.state.streetViewPanorama!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),ve(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},e.prototype.render=function(){return null},e.contextType=ue,e})(u.PureComponent);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={streetViewService:null},n.setStreetViewServiceCallback=function(){n.state.streetViewService!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewService)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.StreetViewService;this.setState(function(){return{streetViewService:n}},this.setStreetViewServiceCallback)},e.prototype.componentWillUnmount=function(){this.state.streetViewService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)},e.prototype.render=function(){return null},e.contextType=ue,e})(u.PureComponent);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={directionsService:null},n.setDirectionsServiceCallback=function(){n.state.directionsService!==null&&n.props.onLoad&&n.props.onLoad(n.state.directionsService)},n}return e.prototype.componentDidMount=function(){Ze(!!this.props.options,"DirectionsService expected options object as parameter, but got %s",this.props.options);var n=new google.maps.DirectionsService;this.setState(function(){return{directionsService:n}},this.setDirectionsServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.directionsService!==null&&this.state.directionsService.route(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.directionsService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.directionsService)},e.prototype.render=function(){return null},e})(u.PureComponent);var Sl={onDirectionsChanged:"directions_changed"},Ll={directions:function(t,e){t.setDirections(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},panel:function(t,e){t.setPanel(e)},routeIndex:function(t,e){t.setRouteIndex(e)}};(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={directionsRenderer:null},n.setDirectionsRendererCallback=function(){n.state.directionsRenderer!==null&&(n.state.directionsRenderer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.directionsRenderer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=pe({updaterMap:Ll,eventMap:Sl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{directionsRenderer:n}},this.setDirectionsRendererCallback)},e.prototype.componentDidUpdate=function(n){this.state.directionsRenderer!==null&&(ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:Ll,eventMap:Sl,prevProps:n,nextProps:this.props,instance:this.state.directionsRenderer}))},e.prototype.componentWillUnmount=function(){this.state.directionsRenderer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),ve(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},e.prototype.render=function(){return C.jsx(C.Fragment,{})},e.contextType=ue,e})(u.PureComponent);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={distanceMatrixService:null},n.setDistanceMatrixServiceCallback=function(){n.state.distanceMatrixService!==null&&n.props.onLoad&&n.props.onLoad(n.state.distanceMatrixService)},n}return e.prototype.componentDidMount=function(){Ze(!!this.props.options,"DistanceMatrixService expected options object as parameter, but go %s",this.props.options);var n=new google.maps.DistanceMatrixService;this.setState(function(){return{distanceMatrixService:n}},this.setDistanceMatrixServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.distanceMatrixService!==null&&this.state.distanceMatrixService.getDistanceMatrix(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.distanceMatrixService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.distanceMatrixService)},e.prototype.render=function(){return null},e})(u.PureComponent);var El={onPlacesChanged:"places_changed"},xl={bounds:function(t,e){t.setBounds(e)}};(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=u.createRef(),n.state={searchBox:null},n.setSearchBoxCallback=function(){n.state.searchBox!==null&&n.props.onLoad&&n.props.onLoad(n.state.searchBox)},n}return e.prototype.componentDidMount=function(){if(Ze(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places),this.containerElement!==null&&this.containerElement.current!==null){var n=this.containerElement.current.querySelector("input");if(n!==null){var r=new google.maps.places.SearchBox(n,this.props.options);this.registeredEvents=pe({updaterMap:xl,eventMap:El,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{searchBox:r}},this.setSearchBoxCallback)}}},e.prototype.componentDidUpdate=function(n){this.state.searchBox!==null&&(ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:xl,eventMap:El,prevProps:n,nextProps:this.props,instance:this.state.searchBox}))},e.prototype.componentWillUnmount=function(){this.state.searchBox!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),ve(this.registeredEvents))},e.prototype.render=function(){return C.jsx("div",{ref:this.containerElement,children:u.Children.only(this.props.children)})},e.contextType=ue,e})(u.PureComponent);var Cl={onPlaceChanged:"place_changed"},_l={bounds:function(t,e){t.setBounds(e)},restrictions:function(t,e){t.setComponentRestrictions(e)},fields:function(t,e){t.setFields(e)},options:function(t,e){t.setOptions(e)},types:function(t,e){t.setTypes(e)}};(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=u.createRef(),n.state={autocomplete:null},n.setAutocompleteCallback=function(){n.state.autocomplete!==null&&n.props.onLoad&&n.props.onLoad(n.state.autocomplete)},n}return e.prototype.componentDidMount=function(){var n;Ze(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places);var r=(n=this.containerElement.current)===null||n===void 0?void 0:n.querySelector("input");if(r){var i=new google.maps.places.Autocomplete(r,this.props.options);this.registeredEvents=pe({updaterMap:_l,eventMap:Cl,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{autocomplete:i}},this.setAutocompleteCallback)}},e.prototype.componentDidUpdate=function(n){ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:_l,eventMap:Cl,prevProps:n,nextProps:this.props,instance:this.state.autocomplete})},e.prototype.componentWillUnmount=function(){this.state.autocomplete!==null&&ve(this.registeredEvents)},e.prototype.render=function(){return C.jsx("div",{ref:this.containerElement,className:this.props.className,children:u.Children.only(this.props.children)})},e.defaultProps={className:""},e.contextType=ue,e})(u.PureComponent);const cg=Ap().use(wp()).use(dp()).init({language:"en",defaultNs:"common",ns:["common","courier_balloon","current_location","details_modal","header","location_aside","location_selector","receive_filter","send_filter","type_filter"],apiUrl:"https://tms.omnic.solutions",apiKey:"tgpak_gfpwi2dimy3domrsnezham3ugbvw24tfm5vwk3bqgntxa"});var xu={exports:{}};/*!
|
|
53
|
+
</svg>`,a=`Cluster of ${e} markers`,l=Number(google.maps.Marker.MAX_ZINDEX)+e;if(yt.isAdvancedMarkerAvailable(i)){const f=document.createElement("div");f.innerHTML=s;const d=f.firstElementChild;d.setAttribute("transform","translate(0 25)");const p={map:i,position:n,zIndex:l,title:a,content:d};return new google.maps.marker.AdvancedMarkerElement(p)}const c={position:n,zIndex:l,title:a,icon:{url:`data:image/svg+xml;base64,${btoa(s)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(c)}}function Bh(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class ia{constructor(){Bh(ia,google.maps.OverlayView)}}var Br;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"})(Br||(Br={}));const Uh=(t,e,n)=>{n.fitBounds(e.bounds)};class Vh extends ia{constructor({map:e,markers:n=[],algorithmOptions:r={},algorithm:i=new Ih(r),renderer:o=new Nh,onClusterClick:s=Uh}){super(),this.markers=[...n],this.clusters=[],this.algorithm=i,this.renderer=o,this.onClusterClick=s,e&&this.setMap(e)}addMarker(e,n){this.markers.includes(e)||(this.markers.push(e),n||this.render())}addMarkers(e,n){e.forEach(r=>{this.addMarker(r,!0)}),n||this.render()}removeMarker(e,n){const r=this.markers.indexOf(e);return r===-1?!1:(yt.setMap(e,null),this.markers.splice(r,1),n||this.render(),!0)}removeMarkers(e,n){let r=!1;return e.forEach(i=>{r=this.removeMarker(i,!0)||r}),r&&!n&&this.render(),r}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,Br.CLUSTERING_BEGIN,this);const{clusters:n,changed:r}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(r||r==null){const i=new Set;for(const s of n)s.markers.length==1&&i.add(s.markers[0]);const o=[];for(const s of this.clusters)s.marker!=null&&(s.markers.length==1?i.has(s.marker)||yt.setMap(s.marker,null):o.push(s.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>o.forEach(s=>yt.setMap(s,null)))}google.maps.event.trigger(this,Br.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(e=>yt.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new jh(this.markers,this.clusters),n=this.getMap();this.clusters.forEach(r=>{r.markers.length===1?r.marker=r.markers[0]:(r.marker=this.renderer.render(r,e,n),r.markers.forEach(i=>yt.setMap(i,null)),this.onClusterClick&&r.marker.addListener("click",i=>{google.maps.event.trigger(this,Br.CLUSTER_CLICK,r),this.onClusterClick(i,r,n)})),yt.setMap(r.marker,n)})}}function Fh(t){var e=Zp(),n=u.useState(null),r=n[0],i=n[1];return u.useEffect(function(){if(e&&r===null){var o=new Vh(ee(ee({},t),{map:e}));i(o)}},[e]),r}function zh(t){var e=t.children,n=t.options,r=Fh(n);return r!==null?e(r):null}u.memo(zh);var Xa={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},el={options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},zIndex:function(t,e){t.setZIndex(e)}};function $h(t){var e=t.children,n=t.anchor,r=t.options,i=t.position,o=t.zIndex,s=t.onCloseClick,a=t.onDomReady,l=t.onContentChanged,c=t.onPositionChanged,f=t.onZindexChanged,d=t.onLoad,p=t.onUnmount,v=u.useContext(ue),g=u.useState(null),h=g[0],S=g[1],E=u.useState(null),b=E[0],y=E[1],x=u.useState(null),L=x[0],m=x[1],w=u.useState(null),_=w[0],P=w[1],M=u.useState(null),O=M[0],k=M[1],I=u.useState(null),B=I[0],H=I[1],Z=u.useRef(null);return u.useEffect(function(){h!==null&&(h.close(),n?h.open(v,n):h.getPosition()&&h.open(v))},[v,h,n]),u.useEffect(function(){r&&h!==null&&h.setOptions(r)},[h,r]),u.useEffect(function(){i&&h!==null&&h.setPosition(i)},[i]),u.useEffect(function(){typeof o=="number"&&h!==null&&h.setZIndex(o)},[o]),u.useEffect(function(){h&&s&&(b!==null&&google.maps.event.removeListener(b),y(google.maps.event.addListener(h,"closeclick",s)))},[s]),u.useEffect(function(){h&&a&&(L!==null&&google.maps.event.removeListener(L),m(google.maps.event.addListener(h,"domready",a)))},[a]),u.useEffect(function(){h&&l&&(_!==null&&google.maps.event.removeListener(_),P(google.maps.event.addListener(h,"content_changed",l)))},[l]),u.useEffect(function(){h&&c&&(O!==null&&google.maps.event.removeListener(O),k(google.maps.event.addListener(h,"position_changed",c)))},[c]),u.useEffect(function(){h&&f&&(B!==null&&google.maps.event.removeListener(B),H(google.maps.event.addListener(h,"zindex_changed",f)))},[f]),u.useEffect(function(){var F=new google.maps.InfoWindow(ee({},r||{}));return S(F),Z.current=document.createElement("div"),s&&y(google.maps.event.addListener(F,"closeclick",s)),a&&m(google.maps.event.addListener(F,"domready",a)),l&&P(google.maps.event.addListener(F,"content_changed",l)),c&&k(google.maps.event.addListener(F,"position_changed",c)),f&&H(google.maps.event.addListener(F,"zindex_changed",f)),F.setContent(Z.current),i&&F.setPosition(i),o&&F.setZIndex(o),n?F.open(v,n):F.getPosition()?F.open(v):Ze(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>."),d&&d(F),function(){b&&google.maps.event.removeListener(b),_&&google.maps.event.removeListener(_),L&&google.maps.event.removeListener(L),O&&google.maps.event.removeListener(O),B&&google.maps.event.removeListener(B),p&&p(F),F.close()}},[]),Z.current?ur.createPortal(u.Children.only(e),Z.current):null}u.memo($h);var Su=function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoWindow:null},n.open=function(r,i){i?r.open(n.context,i):r.getPosition()?r.open(n.context):Ze(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>.")},n.setInfoWindowCallback=function(){n.state.infoWindow!==null&&n.containerElement!==null&&(n.state.infoWindow.setContent(n.containerElement),n.open(n.state.infoWindow,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoWindow))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.InfoWindow(ee({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=pe({updaterMap:el,eventMap:Xa,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{infoWindow:n}},this.setInfoWindowCallback)},e.prototype.componentDidUpdate=function(n){this.state.infoWindow!==null&&(ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:el,eventMap:Xa,prevProps:n,nextProps:this.props,instance:this.state.infoWindow}))},e.prototype.componentWillUnmount=function(){this.state.infoWindow!==null&&(ve(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())},e.prototype.render=function(){return this.containerElement?ur.createPortal(u.Children.only(this.props.children),this.containerElement):null},e.contextType=ue,e}(u.PureComponent),tl={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},nl={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},visible:function(t,e){t.setVisible(e)}},Hh={};function Gh(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,o=t.path,s=t.onDblClick,a=t.onDragEnd,l=t.onDragStart,c=t.onMouseDown,f=t.onMouseMove,d=t.onMouseOut,p=t.onMouseOver,v=t.onMouseUp,g=t.onRightClick,h=t.onClick,S=t.onDrag,E=t.onLoad,b=t.onUnmount,y=u.useContext(ue),x=u.useState(null),L=x[0],m=x[1],w=u.useState(null),_=w[0],P=w[1],M=u.useState(null),O=M[0],k=M[1],I=u.useState(null),B=I[0],H=I[1],Z=u.useState(null),F=Z[0],K=Z[1],A=u.useState(null),R=A[0],T=A[1],V=u.useState(null),z=V[0],$=V[1],X=u.useState(null),N=X[0],D=X[1],W=u.useState(null),q=W[0],te=W[1],re=u.useState(null),ie=re[0],fe=re[1],Oe=u.useState(null),me=Oe[0],ye=Oe[1],Me=u.useState(null),Pe=Me[0],Te=Me[1];return u.useEffect(function(){L!==null&&L.setMap(y)},[y]),u.useEffect(function(){typeof e<"u"&&L!==null&&L.setOptions(e)},[L,e]),u.useEffect(function(){typeof n<"u"&&L!==null&&L.setDraggable(n)},[L,n]),u.useEffect(function(){typeof r<"u"&&L!==null&&L.setEditable(r)},[L,r]),u.useEffect(function(){typeof i<"u"&&L!==null&&L.setVisible(i)},[L,i]),u.useEffect(function(){typeof o<"u"&&L!==null&&L.setPath(o)},[L,o]),u.useEffect(function(){L&&s&&(_!==null&&google.maps.event.removeListener(_),P(google.maps.event.addListener(L,"dblclick",s)))},[s]),u.useEffect(function(){L&&a&&(O!==null&&google.maps.event.removeListener(O),k(google.maps.event.addListener(L,"dragend",a)))},[a]),u.useEffect(function(){L&&l&&(B!==null&&google.maps.event.removeListener(B),H(google.maps.event.addListener(L,"dragstart",l)))},[l]),u.useEffect(function(){L&&c&&(F!==null&&google.maps.event.removeListener(F),K(google.maps.event.addListener(L,"mousedown",c)))},[c]),u.useEffect(function(){L&&f&&(R!==null&&google.maps.event.removeListener(R),T(google.maps.event.addListener(L,"mousemove",f)))},[f]),u.useEffect(function(){L&&d&&(z!==null&&google.maps.event.removeListener(z),$(google.maps.event.addListener(L,"mouseout",d)))},[d]),u.useEffect(function(){L&&p&&(N!==null&&google.maps.event.removeListener(N),D(google.maps.event.addListener(L,"mouseover",p)))},[p]),u.useEffect(function(){L&&v&&(q!==null&&google.maps.event.removeListener(q),te(google.maps.event.addListener(L,"mouseup",v)))},[v]),u.useEffect(function(){L&&g&&(ie!==null&&google.maps.event.removeListener(ie),fe(google.maps.event.addListener(L,"rightclick",g)))},[g]),u.useEffect(function(){L&&h&&(me!==null&&google.maps.event.removeListener(me),ye(google.maps.event.addListener(L,"click",h)))},[h]),u.useEffect(function(){L&&S&&(Pe!==null&&google.maps.event.removeListener(Pe),Te(google.maps.event.addListener(L,"drag",S)))},[S]),u.useEffect(function(){var se=new google.maps.Polyline(ee(ee({},e||Hh),{map:y}));return o&&se.setPath(o),typeof i<"u"&&se.setVisible(i),typeof r<"u"&&se.setEditable(r),typeof n<"u"&&se.setDraggable(n),s&&P(google.maps.event.addListener(se,"dblclick",s)),a&&k(google.maps.event.addListener(se,"dragend",a)),l&&H(google.maps.event.addListener(se,"dragstart",l)),c&&K(google.maps.event.addListener(se,"mousedown",c)),f&&T(google.maps.event.addListener(se,"mousemove",f)),d&&$(google.maps.event.addListener(se,"mouseout",d)),p&&D(google.maps.event.addListener(se,"mouseover",p)),v&&te(google.maps.event.addListener(se,"mouseup",v)),g&&fe(google.maps.event.addListener(se,"rightclick",g)),h&&ye(google.maps.event.addListener(se,"click",h)),S&&Te(google.maps.event.addListener(se,"drag",S)),m(se),E&&E(se),function(){_!==null&&google.maps.event.removeListener(_),O!==null&&google.maps.event.removeListener(O),B!==null&&google.maps.event.removeListener(B),F!==null&&google.maps.event.removeListener(F),R!==null&&google.maps.event.removeListener(R),z!==null&&google.maps.event.removeListener(z),N!==null&&google.maps.event.removeListener(N),q!==null&&google.maps.event.removeListener(q),ie!==null&&google.maps.event.removeListener(ie),me!==null&&google.maps.event.removeListener(me),b&&b(se),se.setMap(null)}},[]),null}u.memo(Gh);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polyline:null},n.setPolylineCallback=function(){n.state.polyline!==null&&n.props.onLoad&&n.props.onLoad(n.state.polyline)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polyline(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=pe({updaterMap:nl,eventMap:tl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polyline:n}},this.setPolylineCallback)},e.prototype.componentDidUpdate=function(n){this.state.polyline!==null&&(ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:nl,eventMap:tl,prevProps:n,nextProps:this.props,instance:this.state.polyline}))},e.prototype.componentWillUnmount=function(){this.state.polyline!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),ve(this.registeredEvents),this.state.polyline.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e})(u.PureComponent);var rl={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},il={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},paths:function(t,e){t.setPaths(e)},visible:function(t,e){t.setVisible(e)}};function Wh(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,o=t.path,s=t.paths,a=t.onDblClick,l=t.onDragEnd,c=t.onDragStart,f=t.onMouseDown,d=t.onMouseMove,p=t.onMouseOut,v=t.onMouseOver,g=t.onMouseUp,h=t.onRightClick,S=t.onClick,E=t.onDrag,b=t.onLoad,y=t.onUnmount,x=u.useContext(ue),L=u.useState(null),m=L[0],w=L[1],_=u.useState(null),P=_[0],M=_[1],O=u.useState(null),k=O[0],I=O[1],B=u.useState(null),H=B[0],Z=B[1],F=u.useState(null),K=F[0],A=F[1],R=u.useState(null),T=R[0],V=R[1],z=u.useState(null),$=z[0],X=z[1],N=u.useState(null),D=N[0],W=N[1],q=u.useState(null),te=q[0],re=q[1],ie=u.useState(null),fe=ie[0],Oe=ie[1],me=u.useState(null),ye=me[0],Me=me[1],Pe=u.useState(null),Te=Pe[0],se=Pe[1];return u.useEffect(function(){m!==null&&m.setMap(x)},[x]),u.useEffect(function(){typeof e<"u"&&m!==null&&m.setOptions(e)},[m,e]),u.useEffect(function(){typeof n<"u"&&m!==null&&m.setDraggable(n)},[m,n]),u.useEffect(function(){typeof r<"u"&&m!==null&&m.setEditable(r)},[m,r]),u.useEffect(function(){typeof i<"u"&&m!==null&&m.setVisible(i)},[m,i]),u.useEffect(function(){typeof o<"u"&&m!==null&&m.setPath(o)},[m,o]),u.useEffect(function(){typeof s<"u"&&m!==null&&m.setPaths(s)},[m,s]),u.useEffect(function(){m&&a&&(P!==null&&google.maps.event.removeListener(P),M(google.maps.event.addListener(m,"dblclick",a)))},[a]),u.useEffect(function(){m&&l&&(k!==null&&google.maps.event.removeListener(k),I(google.maps.event.addListener(m,"dragend",l)))},[l]),u.useEffect(function(){m&&c&&(H!==null&&google.maps.event.removeListener(H),Z(google.maps.event.addListener(m,"dragstart",c)))},[c]),u.useEffect(function(){m&&f&&(K!==null&&google.maps.event.removeListener(K),A(google.maps.event.addListener(m,"mousedown",f)))},[f]),u.useEffect(function(){m&&d&&(T!==null&&google.maps.event.removeListener(T),V(google.maps.event.addListener(m,"mousemove",d)))},[d]),u.useEffect(function(){m&&p&&($!==null&&google.maps.event.removeListener($),X(google.maps.event.addListener(m,"mouseout",p)))},[p]),u.useEffect(function(){m&&v&&(D!==null&&google.maps.event.removeListener(D),W(google.maps.event.addListener(m,"mouseover",v)))},[v]),u.useEffect(function(){m&&g&&(te!==null&&google.maps.event.removeListener(te),re(google.maps.event.addListener(m,"mouseup",g)))},[g]),u.useEffect(function(){m&&h&&(fe!==null&&google.maps.event.removeListener(fe),Oe(google.maps.event.addListener(m,"rightclick",h)))},[h]),u.useEffect(function(){m&&S&&(ye!==null&&google.maps.event.removeListener(ye),Me(google.maps.event.addListener(m,"click",S)))},[S]),u.useEffect(function(){m&&E&&(Te!==null&&google.maps.event.removeListener(Te),se(google.maps.event.addListener(m,"drag",E)))},[E]),u.useEffect(function(){var ae=new google.maps.Polygon(ee(ee({},e||{}),{map:x}));return o&&ae.setPath(o),s&&ae.setPaths(s),typeof i<"u"&&ae.setVisible(i),typeof r<"u"&&ae.setEditable(r),typeof n<"u"&&ae.setDraggable(n),a&&M(google.maps.event.addListener(ae,"dblclick",a)),l&&I(google.maps.event.addListener(ae,"dragend",l)),c&&Z(google.maps.event.addListener(ae,"dragstart",c)),f&&A(google.maps.event.addListener(ae,"mousedown",f)),d&&V(google.maps.event.addListener(ae,"mousemove",d)),p&&X(google.maps.event.addListener(ae,"mouseout",p)),v&&W(google.maps.event.addListener(ae,"mouseover",v)),g&&re(google.maps.event.addListener(ae,"mouseup",g)),h&&Oe(google.maps.event.addListener(ae,"rightclick",h)),S&&Me(google.maps.event.addListener(ae,"click",S)),E&&se(google.maps.event.addListener(ae,"drag",E)),w(ae),b&&b(ae),function(){P!==null&&google.maps.event.removeListener(P),k!==null&&google.maps.event.removeListener(k),H!==null&&google.maps.event.removeListener(H),K!==null&&google.maps.event.removeListener(K),T!==null&&google.maps.event.removeListener(T),$!==null&&google.maps.event.removeListener($),D!==null&&google.maps.event.removeListener(D),te!==null&&google.maps.event.removeListener(te),fe!==null&&google.maps.event.removeListener(fe),ye!==null&&google.maps.event.removeListener(ye),y&&y(ae),ae.setMap(null)}},[]),null}u.memo(Wh);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polygon:null},n.setPolygonCallback=function(){n.state.polygon!==null&&n.props.onLoad&&n.props.onLoad(n.state.polygon)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polygon(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=pe({updaterMap:il,eventMap:rl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polygon:n}},this.setPolygonCallback)},e.prototype.componentDidUpdate=function(n){this.state.polygon!==null&&(ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:il,eventMap:rl,prevProps:n,nextProps:this.props,instance:this.state.polygon}))},e.prototype.componentWillUnmount=function(){this.state.polygon!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polygon),ve(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e})(u.PureComponent);var ol={onBoundsChanged:"bounds_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},sl={bounds:function(t,e){t.setBounds(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},visible:function(t,e){t.setVisible(e)}};function Zh(t){var e=t.options,n=t.bounds,r=t.draggable,i=t.editable,o=t.visible,s=t.onDblClick,a=t.onDragEnd,l=t.onDragStart,c=t.onMouseDown,f=t.onMouseMove,d=t.onMouseOut,p=t.onMouseOver,v=t.onMouseUp,g=t.onRightClick,h=t.onClick,S=t.onDrag,E=t.onBoundsChanged,b=t.onLoad,y=t.onUnmount,x=u.useContext(ue),L=u.useState(null),m=L[0],w=L[1],_=u.useState(null),P=_[0],M=_[1],O=u.useState(null),k=O[0],I=O[1],B=u.useState(null),H=B[0],Z=B[1],F=u.useState(null),K=F[0],A=F[1],R=u.useState(null),T=R[0],V=R[1],z=u.useState(null),$=z[0],X=z[1],N=u.useState(null),D=N[0],W=N[1],q=u.useState(null),te=q[0],re=q[1],ie=u.useState(null),fe=ie[0],Oe=ie[1],me=u.useState(null),ye=me[0],Me=me[1],Pe=u.useState(null),Te=Pe[0],se=Pe[1],ae=u.useState(null),ze=ae[0],Je=ae[1];return u.useEffect(function(){m!==null&&m.setMap(x)},[x]),u.useEffect(function(){typeof e<"u"&&m!==null&&m.setOptions(e)},[m,e]),u.useEffect(function(){typeof r<"u"&&m!==null&&m.setDraggable(r)},[m,r]),u.useEffect(function(){typeof i<"u"&&m!==null&&m.setEditable(i)},[m,i]),u.useEffect(function(){typeof o<"u"&&m!==null&&m.setVisible(o)},[m,o]),u.useEffect(function(){typeof n<"u"&&m!==null&&m.setBounds(n)},[m,n]),u.useEffect(function(){m&&s&&(P!==null&&google.maps.event.removeListener(P),M(google.maps.event.addListener(m,"dblclick",s)))},[s]),u.useEffect(function(){m&&a&&(k!==null&&google.maps.event.removeListener(k),I(google.maps.event.addListener(m,"dragend",a)))},[a]),u.useEffect(function(){m&&l&&(H!==null&&google.maps.event.removeListener(H),Z(google.maps.event.addListener(m,"dragstart",l)))},[l]),u.useEffect(function(){m&&c&&(K!==null&&google.maps.event.removeListener(K),A(google.maps.event.addListener(m,"mousedown",c)))},[c]),u.useEffect(function(){m&&f&&(T!==null&&google.maps.event.removeListener(T),V(google.maps.event.addListener(m,"mousemove",f)))},[f]),u.useEffect(function(){m&&d&&($!==null&&google.maps.event.removeListener($),X(google.maps.event.addListener(m,"mouseout",d)))},[d]),u.useEffect(function(){m&&p&&(D!==null&&google.maps.event.removeListener(D),W(google.maps.event.addListener(m,"mouseover",p)))},[p]),u.useEffect(function(){m&&v&&(te!==null&&google.maps.event.removeListener(te),re(google.maps.event.addListener(m,"mouseup",v)))},[v]),u.useEffect(function(){m&&g&&(fe!==null&&google.maps.event.removeListener(fe),Oe(google.maps.event.addListener(m,"rightclick",g)))},[g]),u.useEffect(function(){m&&h&&(ye!==null&&google.maps.event.removeListener(ye),Me(google.maps.event.addListener(m,"click",h)))},[h]),u.useEffect(function(){m&&S&&(Te!==null&&google.maps.event.removeListener(Te),se(google.maps.event.addListener(m,"drag",S)))},[S]),u.useEffect(function(){m&&E&&(ze!==null&&google.maps.event.removeListener(ze),Je(google.maps.event.addListener(m,"bounds_changed",E)))},[E]),u.useEffect(function(){var Y=new google.maps.Rectangle(ee(ee({},e||{}),{map:x}));return typeof o<"u"&&Y.setVisible(o),typeof i<"u"&&Y.setEditable(i),typeof r<"u"&&Y.setDraggable(r),typeof n<"u"&&Y.setBounds(n),s&&M(google.maps.event.addListener(Y,"dblclick",s)),a&&I(google.maps.event.addListener(Y,"dragend",a)),l&&Z(google.maps.event.addListener(Y,"dragstart",l)),c&&A(google.maps.event.addListener(Y,"mousedown",c)),f&&V(google.maps.event.addListener(Y,"mousemove",f)),d&&X(google.maps.event.addListener(Y,"mouseout",d)),p&&W(google.maps.event.addListener(Y,"mouseover",p)),v&&re(google.maps.event.addListener(Y,"mouseup",v)),g&&Oe(google.maps.event.addListener(Y,"rightclick",g)),h&&Me(google.maps.event.addListener(Y,"click",h)),S&&se(google.maps.event.addListener(Y,"drag",S)),E&&Je(google.maps.event.addListener(Y,"bounds_changed",E)),w(Y),b&&b(Y),function(){P!==null&&google.maps.event.removeListener(P),k!==null&&google.maps.event.removeListener(k),H!==null&&google.maps.event.removeListener(H),K!==null&&google.maps.event.removeListener(K),T!==null&&google.maps.event.removeListener(T),$!==null&&google.maps.event.removeListener($),D!==null&&google.maps.event.removeListener(D),te!==null&&google.maps.event.removeListener(te),fe!==null&&google.maps.event.removeListener(fe),ye!==null&&google.maps.event.removeListener(ye),Te!==null&&google.maps.event.removeListener(Te),ze!==null&&google.maps.event.removeListener(ze),y&&y(Y),Y.setMap(null)}},[]),null}u.memo(Zh);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={rectangle:null},n.setRectangleCallback=function(){n.state.rectangle!==null&&n.props.onLoad&&n.props.onLoad(n.state.rectangle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Rectangle(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=pe({updaterMap:sl,eventMap:ol,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{rectangle:n}},this.setRectangleCallback)},e.prototype.componentDidUpdate=function(n){this.state.rectangle!==null&&(ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:sl,eventMap:ol,prevProps:n,nextProps:this.props,instance:this.state.rectangle}))},e.prototype.componentWillUnmount=function(){this.state.rectangle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),ve(this.registeredEvents),this.state.rectangle.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e})(u.PureComponent);var al={onCenterChanged:"center_changed",onRadiusChanged:"radius_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},ll={center:function(t,e){t.setCenter(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},radius:function(t,e){t.setRadius(e)},visible:function(t,e){t.setVisible(e)}},qh={};function Kh(t){var e=t.options,n=t.center,r=t.radius,i=t.draggable,o=t.editable,s=t.visible,a=t.onDblClick,l=t.onDragEnd,c=t.onDragStart,f=t.onMouseDown,d=t.onMouseMove,p=t.onMouseOut,v=t.onMouseOver,g=t.onMouseUp,h=t.onRightClick,S=t.onClick,E=t.onDrag,b=t.onCenterChanged,y=t.onRadiusChanged,x=t.onLoad,L=t.onUnmount,m=u.useContext(ue),w=u.useState(null),_=w[0],P=w[1],M=u.useState(null),O=M[0],k=M[1],I=u.useState(null),B=I[0],H=I[1],Z=u.useState(null),F=Z[0],K=Z[1],A=u.useState(null),R=A[0],T=A[1],V=u.useState(null),z=V[0],$=V[1],X=u.useState(null),N=X[0],D=X[1],W=u.useState(null),q=W[0],te=W[1],re=u.useState(null),ie=re[0],fe=re[1],Oe=u.useState(null),me=Oe[0],ye=Oe[1],Me=u.useState(null),Pe=Me[0],Te=Me[1],se=u.useState(null),ae=se[0],ze=se[1],Je=u.useState(null),Y=Je[0],$e=Je[1],Ne=u.useState(null),ft=Ne[0],ot=Ne[1];return u.useEffect(function(){_!==null&&_.setMap(m)},[m]),u.useEffect(function(){typeof e<"u"&&_!==null&&_.setOptions(e)},[_,e]),u.useEffect(function(){typeof i<"u"&&_!==null&&_.setDraggable(i)},[_,i]),u.useEffect(function(){typeof o<"u"&&_!==null&&_.setEditable(o)},[_,o]),u.useEffect(function(){typeof s<"u"&&_!==null&&_.setVisible(s)},[_,s]),u.useEffect(function(){typeof r=="number"&&_!==null&&_.setRadius(r)},[_,r]),u.useEffect(function(){typeof n<"u"&&_!==null&&_.setCenter(n)},[_,n]),u.useEffect(function(){_&&a&&(O!==null&&google.maps.event.removeListener(O),k(google.maps.event.addListener(_,"dblclick",a)))},[a]),u.useEffect(function(){_&&l&&(B!==null&&google.maps.event.removeListener(B),H(google.maps.event.addListener(_,"dragend",l)))},[l]),u.useEffect(function(){_&&c&&(F!==null&&google.maps.event.removeListener(F),K(google.maps.event.addListener(_,"dragstart",c)))},[c]),u.useEffect(function(){_&&f&&(R!==null&&google.maps.event.removeListener(R),T(google.maps.event.addListener(_,"mousedown",f)))},[f]),u.useEffect(function(){_&&d&&(z!==null&&google.maps.event.removeListener(z),$(google.maps.event.addListener(_,"mousemove",d)))},[d]),u.useEffect(function(){_&&p&&(N!==null&&google.maps.event.removeListener(N),D(google.maps.event.addListener(_,"mouseout",p)))},[p]),u.useEffect(function(){_&&v&&(q!==null&&google.maps.event.removeListener(q),te(google.maps.event.addListener(_,"mouseover",v)))},[v]),u.useEffect(function(){_&&g&&(ie!==null&&google.maps.event.removeListener(ie),fe(google.maps.event.addListener(_,"mouseup",g)))},[g]),u.useEffect(function(){_&&h&&(me!==null&&google.maps.event.removeListener(me),ye(google.maps.event.addListener(_,"rightclick",h)))},[h]),u.useEffect(function(){_&&S&&(Pe!==null&&google.maps.event.removeListener(Pe),Te(google.maps.event.addListener(_,"click",S)))},[S]),u.useEffect(function(){_&&E&&(ae!==null&&google.maps.event.removeListener(ae),ze(google.maps.event.addListener(_,"drag",E)))},[E]),u.useEffect(function(){_&&b&&(Y!==null&&google.maps.event.removeListener(Y),$e(google.maps.event.addListener(_,"center_changed",b)))},[S]),u.useEffect(function(){_&&y&&(ft!==null&&google.maps.event.removeListener(ft),ot(google.maps.event.addListener(_,"radius_changed",y)))},[y]),u.useEffect(function(){var le=new google.maps.Circle(ee(ee({},e||qh),{map:m}));return typeof r=="number"&&le.setRadius(r),typeof n<"u"&&le.setCenter(n),typeof r=="number"&&le.setRadius(r),typeof s<"u"&&le.setVisible(s),typeof o<"u"&&le.setEditable(o),typeof i<"u"&&le.setDraggable(i),a&&k(google.maps.event.addListener(le,"dblclick",a)),l&&H(google.maps.event.addListener(le,"dragend",l)),c&&K(google.maps.event.addListener(le,"dragstart",c)),f&&T(google.maps.event.addListener(le,"mousedown",f)),d&&$(google.maps.event.addListener(le,"mousemove",d)),p&&D(google.maps.event.addListener(le,"mouseout",p)),v&&te(google.maps.event.addListener(le,"mouseover",v)),g&&fe(google.maps.event.addListener(le,"mouseup",g)),h&&ye(google.maps.event.addListener(le,"rightclick",h)),S&&Te(google.maps.event.addListener(le,"click",S)),E&&ze(google.maps.event.addListener(le,"drag",E)),b&&$e(google.maps.event.addListener(le,"center_changed",b)),y&&ot(google.maps.event.addListener(le,"radius_changed",y)),P(le),x&&x(le),function(){O!==null&&google.maps.event.removeListener(O),B!==null&&google.maps.event.removeListener(B),F!==null&&google.maps.event.removeListener(F),R!==null&&google.maps.event.removeListener(R),z!==null&&google.maps.event.removeListener(z),N!==null&&google.maps.event.removeListener(N),q!==null&&google.maps.event.removeListener(q),ie!==null&&google.maps.event.removeListener(ie),me!==null&&google.maps.event.removeListener(me),Pe!==null&&google.maps.event.removeListener(Pe),Y!==null&&google.maps.event.removeListener(Y),ft!==null&&google.maps.event.removeListener(ft),L&&L(le),le.setMap(null)}},[]),null}u.memo(Kh);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={circle:null},n.setCircleCallback=function(){n.state.circle!==null&&n.props.onLoad&&n.props.onLoad(n.state.circle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Circle(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=pe({updaterMap:ll,eventMap:al,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{circle:n}},this.setCircleCallback)},e.prototype.componentDidUpdate=function(n){this.state.circle!==null&&(ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:ll,eventMap:al,prevProps:n,nextProps:this.props,instance:this.state.circle}))},e.prototype.componentWillUnmount=function(){var n;this.state.circle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),ve(this.registeredEvents),(n=this.state.circle)===null||n===void 0||n.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e})(u.PureComponent);var cl={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},ul={add:function(t,e){t.add(e)},addgeojson:function(t,e,n){t.addGeoJson(e,n)},contains:function(t,e){t.contains(e)},foreach:function(t,e){t.forEach(e)},loadgeojson:function(t,e,n,r){t.loadGeoJson(e,n,r)},overridestyle:function(t,e,n){t.overrideStyle(e,n)},remove:function(t,e){t.remove(e)},revertstyle:function(t,e){t.revertStyle(e)},controlposition:function(t,e){t.setControlPosition(e)},controls:function(t,e){t.setControls(e)},drawingmode:function(t,e){t.setDrawingMode(e)},map:function(t,e){t.setMap(e)},style:function(t,e){t.setStyle(e)},togeojson:function(t,e){t.toGeoJson(e)}};function Jh(t){var e=t.options,n=t.onClick,r=t.onDblClick,i=t.onMouseDown,o=t.onMouseMove,s=t.onMouseOut,a=t.onMouseOver,l=t.onMouseUp,c=t.onRightClick,f=t.onAddFeature,d=t.onRemoveFeature,p=t.onRemoveProperty,v=t.onSetGeometry,g=t.onSetProperty,h=t.onLoad,S=t.onUnmount,E=u.useContext(ue),b=u.useState(null),y=b[0],x=b[1],L=u.useState(null),m=L[0],w=L[1],_=u.useState(null),P=_[0],M=_[1],O=u.useState(null),k=O[0],I=O[1],B=u.useState(null),H=B[0],Z=B[1],F=u.useState(null),K=F[0],A=F[1],R=u.useState(null),T=R[0],V=R[1],z=u.useState(null),$=z[0],X=z[1],N=u.useState(null),D=N[0],W=N[1],q=u.useState(null),te=q[0],re=q[1],ie=u.useState(null),fe=ie[0],Oe=ie[1],me=u.useState(null),ye=me[0],Me=me[1],Pe=u.useState(null),Te=Pe[0],se=Pe[1],ae=u.useState(null),ze=ae[0],Je=ae[1];return u.useEffect(function(){y!==null&&y.setMap(E)},[E]),u.useEffect(function(){y&&r&&(m!==null&&google.maps.event.removeListener(m),w(google.maps.event.addListener(y,"dblclick",r)))},[r]),u.useEffect(function(){y&&i&&(P!==null&&google.maps.event.removeListener(P),M(google.maps.event.addListener(y,"mousedown",i)))},[i]),u.useEffect(function(){y&&o&&(k!==null&&google.maps.event.removeListener(k),I(google.maps.event.addListener(y,"mousemove",o)))},[o]),u.useEffect(function(){y&&s&&(H!==null&&google.maps.event.removeListener(H),Z(google.maps.event.addListener(y,"mouseout",s)))},[s]),u.useEffect(function(){y&&a&&(K!==null&&google.maps.event.removeListener(K),A(google.maps.event.addListener(y,"mouseover",a)))},[a]),u.useEffect(function(){y&&l&&(T!==null&&google.maps.event.removeListener(T),V(google.maps.event.addListener(y,"mouseup",l)))},[l]),u.useEffect(function(){y&&c&&($!==null&&google.maps.event.removeListener($),X(google.maps.event.addListener(y,"rightclick",c)))},[c]),u.useEffect(function(){y&&n&&(D!==null&&google.maps.event.removeListener(D),W(google.maps.event.addListener(y,"click",n)))},[n]),u.useEffect(function(){y&&f&&(te!==null&&google.maps.event.removeListener(te),re(google.maps.event.addListener(y,"addfeature",f)))},[f]),u.useEffect(function(){y&&d&&(fe!==null&&google.maps.event.removeListener(fe),Oe(google.maps.event.addListener(y,"removefeature",d)))},[d]),u.useEffect(function(){y&&p&&(ye!==null&&google.maps.event.removeListener(ye),Me(google.maps.event.addListener(y,"removeproperty",p)))},[p]),u.useEffect(function(){y&&v&&(Te!==null&&google.maps.event.removeListener(Te),se(google.maps.event.addListener(y,"setgeometry",v)))},[v]),u.useEffect(function(){y&&g&&(ze!==null&&google.maps.event.removeListener(ze),Je(google.maps.event.addListener(y,"setproperty",g)))},[g]),u.useEffect(function(){if(E!==null){var Y=new google.maps.Data(ee(ee({},e||{}),{map:E}));r&&w(google.maps.event.addListener(Y,"dblclick",r)),i&&M(google.maps.event.addListener(Y,"mousedown",i)),o&&I(google.maps.event.addListener(Y,"mousemove",o)),s&&Z(google.maps.event.addListener(Y,"mouseout",s)),a&&A(google.maps.event.addListener(Y,"mouseover",a)),l&&V(google.maps.event.addListener(Y,"mouseup",l)),c&&X(google.maps.event.addListener(Y,"rightclick",c)),n&&W(google.maps.event.addListener(Y,"click",n)),f&&re(google.maps.event.addListener(Y,"addfeature",f)),d&&Oe(google.maps.event.addListener(Y,"removefeature",d)),p&&Me(google.maps.event.addListener(Y,"removeproperty",p)),v&&se(google.maps.event.addListener(Y,"setgeometry",v)),g&&Je(google.maps.event.addListener(Y,"setproperty",g)),x(Y),h&&h(Y)}return function(){y&&(m!==null&&google.maps.event.removeListener(m),P!==null&&google.maps.event.removeListener(P),k!==null&&google.maps.event.removeListener(k),H!==null&&google.maps.event.removeListener(H),K!==null&&google.maps.event.removeListener(K),T!==null&&google.maps.event.removeListener(T),$!==null&&google.maps.event.removeListener($),D!==null&&google.maps.event.removeListener(D),te!==null&&google.maps.event.removeListener(te),fe!==null&&google.maps.event.removeListener(fe),ye!==null&&google.maps.event.removeListener(ye),Te!==null&&google.maps.event.removeListener(Te),ze!==null&&google.maps.event.removeListener(ze),S&&S(y),y.setMap(null))}},[]),null}u.memo(Jh);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={data:null},n.setDataCallback=function(){n.state.data!==null&&n.props.onLoad&&n.props.onLoad(n.state.data)},n}return e.prototype.componentDidMount=function(){if(this.context!==null){var n=new google.maps.Data(ee(ee({},this.props.options||{}),{map:this.context}));this.registeredEvents=pe({updaterMap:ul,eventMap:cl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{data:n}},this.setDataCallback)}},e.prototype.componentDidUpdate=function(n){this.state.data!==null&&(ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:ul,eventMap:cl,prevProps:n,nextProps:this.props,instance:this.state.data}))},e.prototype.componentWillUnmount=function(){this.state.data!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),ve(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e})(u.PureComponent);var fl={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},dl={options:function(t,e){t.setOptions(e)},url:function(t,e){t.setUrl(e)},zIndex:function(t,e){t.setZIndex(e)}};(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={kmlLayer:null},n.setKmlLayerCallback=function(){n.state.kmlLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.kmlLayer)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.KmlLayer(ee(ee({},this.props.options),{map:this.context}));this.registeredEvents=pe({updaterMap:dl,eventMap:fl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{kmlLayer:n}},this.setKmlLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.kmlLayer!==null&&(ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:dl,eventMap:fl,prevProps:n,nextProps:this.props,instance:this.state.kmlLayer}))},e.prototype.componentWillUnmount=function(){this.state.kmlLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),ve(this.registeredEvents),this.state.kmlLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e})(u.PureComponent);function Eu(t,e){return typeof e=="function"?e(t.offsetWidth,t.offsetHeight):{x:0,y:0}}function Yh(t,e){return new e(t.lat,t.lng)}function Qh(t,e){return new e(new google.maps.LatLng(t.ne.lat,t.ne.lng),new google.maps.LatLng(t.sw.lat,t.sw.lng))}function Xh(t,e,n){return t instanceof e?t:n(t,e)}function eg(t,e,n){return t instanceof e?t:n(t,e)}function tg(t,e,n){var r=t&&t.fromLatLngToDivPixel(n.getNorthEast()),i=t&&t.fromLatLngToDivPixel(n.getSouthWest());return r&&i?{left:"".concat(i.x+e.x,"px"),top:"".concat(r.y+e.y,"px"),width:"".concat(r.x-i.x-e.x,"px"),height:"".concat(i.y-r.y-e.y,"px")}:{left:"-9999px",top:"-9999px"}}function ng(t,e,n){var r=t&&t.fromLatLngToDivPixel(n);if(r){var i=r.x,o=r.y;return{left:"".concat(i+e.x,"px"),top:"".concat(o+e.y,"px")}}return{left:"-9999px",top:"-9999px"}}function Lu(t,e,n,r){return n!==void 0?tg(t,e,eg(n,google.maps.LatLngBounds,Qh)):ng(t,e,Xh(r,google.maps.LatLng,Yh))}function rg(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.height&&t.height===e.height}function ig(t,e,n,r,i){var o=function(s){je(a,s);function a(l,c,f,d){var p=s.call(this)||this;return p.container=l,p.pane=c,p.position=f,p.bounds=d,p}return a.prototype.onAdd=function(){var l,c=(l=this.getPanes())===null||l===void 0?void 0:l[this.pane];c==null||c.appendChild(this.container)},a.prototype.draw=function(){for(var l=this.getProjection(),c=ee({},this.container?Eu(this.container,i):{x:0,y:0}),f=Lu(l,c,this.bounds,this.position),d=0,p=Object.entries(f);d<p.length;d++){var v=p[d],g=v[0],h=v[1];this.container.style[g]=h}},a.prototype.onRemove=function(){this.container.parentNode!==null&&this.container.parentNode.removeChild(this.container)},a}(google.maps.OverlayView);return new o(t,e,n,r)}function pl(t){if(!t)return"";var e=t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng);return e+""}function hl(t){if(!t)return"";var e=t instanceof google.maps.LatLngBounds?t:new google.maps.LatLngBounds(new google.maps.LatLng(t.south,t.east),new google.maps.LatLng(t.north,t.west));return e+""}function og(t){var e=t.position,n=t.bounds,r=t.mapPaneName,i=t.zIndex,o=t.onLoad,s=t.onUnmount,a=t.getPixelPositionOffset,l=t.children,c=u.useContext(ue),f=u.useMemo(function(){var p=document.createElement("div");return p.style.position="absolute",p},[]),d=u.useMemo(function(){return ig(f,r,e,n,a)},[f,r,e,n]);return u.useEffect(function(){return o==null||o(d),d==null||d.setMap(c),function(){s==null||s(d),d==null||d.setMap(null)}},[c,d]),u.useEffect(function(){f.style.zIndex="".concat(i)},[i,f]),Jc.createPortal(l,f)}u.memo(og);(function(t){je(e,t);function e(n){var r=t.call(this,n)||this;r.state={paneEl:null,containerStyle:{position:"absolute"}},r.updatePane=function(){var o=r.props.mapPaneName,s=r.overlayView.getPanes();Ze(!!o,"OverlayView requires props.mapPaneName but got %s",o),s?r.setState({paneEl:s[o]}):r.setState({paneEl:null})},r.onAdd=function(){var o,s;r.updatePane(),(s=(o=r.props).onLoad)===null||s===void 0||s.call(o,r.overlayView)},r.onPositionElement=function(){var o,s=r.overlayView.getProjection(),a=ee({x:0,y:0},r.containerRef.current?Eu(r.containerRef.current,r.props.getPixelPositionOffset):{}),l=Lu(s,a,r.props.bounds,r.props.position),c=(o=r.state.containerStyle,o.left),f=o.top,d=o.width,p=o.height;rg(l,{left:c,top:f,width:d,height:p})||r.setState({containerStyle:{top:l.top||0,left:l.left||0,width:l.width||0,height:l.height||0,position:"absolute"}})},r.draw=function(){r.onPositionElement()},r.onRemove=function(){var o,s;r.setState(function(){return{paneEl:null}}),(s=(o=r.props).onUnmount)===null||s===void 0||s.call(o,r.overlayView)},r.containerRef=u.createRef();var i=new google.maps.OverlayView;return i.onAdd=r.onAdd,i.draw=r.draw,i.onRemove=r.onRemove,r.overlayView=i,r}return e.prototype.componentDidMount=function(){this.overlayView.setMap(this.context)},e.prototype.componentDidUpdate=function(n){var r=pl(n.position),i=pl(this.props.position),o=hl(n.bounds),s=hl(this.props.bounds);(r!==i||o!==s)&&this.overlayView.draw(),n.mapPaneName!==this.props.mapPaneName&&this.updatePane()},e.prototype.componentWillUnmount=function(){this.overlayView.setMap(null)},e.prototype.render=function(){var n=this.state.paneEl;return n?Jc.createPortal(C.jsx("div",{ref:this.containerRef,style:this.state.containerStyle,children:u.Children.only(this.props.children)}),n):null},e.FLOAT_PANE="floatPane",e.MAP_PANE="mapPane",e.MARKER_LAYER="markerLayer",e.OVERLAY_LAYER="overlayLayer",e.OVERLAY_MOUSE_TARGET="overlayMouseTarget",e.contextType=ue,e})(u.PureComponent);function sg(){}var gl={onDblClick:"dblclick",onClick:"click"},vl={opacity:function(t,e){t.setOpacity(e)}};function ag(t){var e=t.url,n=t.bounds,r=t.options,i=t.visible,o=u.useContext(ue),s=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east)),a=u.useMemo(function(){var l=new google.maps.GroundOverlay(e,s,ee({},r));return l},[]);return u.useEffect(function(){a!==null&&a.setMap(o)},[o]),u.useEffect(function(){typeof e<"u"&&a!==null&&(a.set("url",e),a.setMap(o))},[a,e]),u.useEffect(function(){typeof i<"u"&&a!==null&&a.setOpacity(i?1:0)},[a,i]),u.useEffect(function(){var l=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east));typeof n<"u"&&a!==null&&(a.set("bounds",l),a.setMap(o))},[a,n]),null}u.memo(ag);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={groundOverlay:null},n.setGroundOverlayCallback=function(){n.state.groundOverlay!==null&&n.props.onLoad&&n.props.onLoad(n.state.groundOverlay)},n}return e.prototype.componentDidMount=function(){Ze(!!this.props.url||!!this.props.bounds,"For GroundOverlay, url and bounds are passed in to constructor and are immutable after instantiated. This is the behavior of Google Maps JavaScript API v3 ( See https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay) Hence, use the corresponding two props provided by `react-google-maps-api`, url and bounds. In some cases, you'll need the GroundOverlay component to reflect the changes of url and bounds. You can leverage the React's key property to remount the component. Typically, just `key={url}` would serve your need. See https://github.com/tomchentw/react-google-maps/issues/655");var n=new google.maps.GroundOverlay(this.props.url,this.props.bounds,ee(ee({},this.props.options),{map:this.context}));this.registeredEvents=pe({updaterMap:vl,eventMap:gl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{groundOverlay:n}},this.setGroundOverlayCallback)},e.prototype.componentDidUpdate=function(n){this.state.groundOverlay!==null&&(ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:vl,eventMap:gl,prevProps:n,nextProps:this.props,instance:this.state.groundOverlay}))},e.prototype.componentWillUnmount=function(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))},e.prototype.render=function(){return null},e.defaultProps={onLoad:sg},e.contextType=ue,e})(u.PureComponent);var ml={},yl={data:function(t,e){t.setData(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)}};function lg(t){var e=t.data,n=t.onLoad,r=t.onUnmount,i=t.options,o=u.useContext(ue),s=u.useState(null),a=s[0],l=s[1];return u.useEffect(function(){google.maps.visualization||Ze(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),u.useEffect(function(){Ze(!!e,"data property is required in HeatmapLayer %s",e)},[e]),u.useEffect(function(){a!==null&&a.setMap(o)},[o]),u.useEffect(function(){i&&a!==null&&a.setOptions(i)},[a,i]),u.useEffect(function(){var c=new google.maps.visualization.HeatmapLayer(ee(ee({},i||{}),{data:e,map:o}));return l(c),n&&n(c),function(){a!==null&&(r&&r(a),a.setMap(null))}},[]),null}u.memo(lg);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={heatmapLayer:null},n.setHeatmapLayerCallback=function(){n.state.heatmapLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.heatmapLayer)},n}return e.prototype.componentDidMount=function(){Ze(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),Ze(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var n=new google.maps.visualization.HeatmapLayer(ee(ee({},this.props.options||{}),{data:this.props.data,map:this.context}));this.registeredEvents=pe({updaterMap:yl,eventMap:ml,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{heatmapLayer:n}},this.setHeatmapLayerCallback)},e.prototype.componentDidUpdate=function(n){ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:yl,eventMap:ml,prevProps:n,nextProps:this.props,instance:this.state.heatmapLayer})},e.prototype.componentWillUnmount=function(){this.state.heatmapLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),ve(this.registeredEvents),this.state.heatmapLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=ue,e})(u.PureComponent);var bl={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},wl={register:function(t,e,n){t.registerPanoProvider(e,n)},links:function(t,e){t.setLinks(e)},motionTracking:function(t,e){t.setMotionTracking(e)},options:function(t,e){t.setOptions(e)},pano:function(t,e){t.setPano(e)},position:function(t,e){t.setPosition(e)},pov:function(t,e){t.setPov(e)},visible:function(t,e){t.setVisible(e)},zoom:function(t,e){t.setZoom(e)}};(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={streetViewPanorama:null},n.setStreetViewPanoramaCallback=function(){n.state.streetViewPanorama!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewPanorama)},n}return e.prototype.componentDidMount=function(){var n,r,i=(r=(n=this.context)===null||n===void 0?void 0:n.getStreetView())!==null&&r!==void 0?r:null;this.registeredEvents=pe({updaterMap:wl,eventMap:bl,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{streetViewPanorama:i}},this.setStreetViewPanoramaCallback)},e.prototype.componentDidUpdate=function(n){this.state.streetViewPanorama!==null&&(ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:wl,eventMap:bl,prevProps:n,nextProps:this.props,instance:this.state.streetViewPanorama}))},e.prototype.componentWillUnmount=function(){this.state.streetViewPanorama!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),ve(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},e.prototype.render=function(){return null},e.contextType=ue,e})(u.PureComponent);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={streetViewService:null},n.setStreetViewServiceCallback=function(){n.state.streetViewService!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewService)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.StreetViewService;this.setState(function(){return{streetViewService:n}},this.setStreetViewServiceCallback)},e.prototype.componentWillUnmount=function(){this.state.streetViewService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)},e.prototype.render=function(){return null},e.contextType=ue,e})(u.PureComponent);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={directionsService:null},n.setDirectionsServiceCallback=function(){n.state.directionsService!==null&&n.props.onLoad&&n.props.onLoad(n.state.directionsService)},n}return e.prototype.componentDidMount=function(){Ze(!!this.props.options,"DirectionsService expected options object as parameter, but got %s",this.props.options);var n=new google.maps.DirectionsService;this.setState(function(){return{directionsService:n}},this.setDirectionsServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.directionsService!==null&&this.state.directionsService.route(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.directionsService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.directionsService)},e.prototype.render=function(){return null},e})(u.PureComponent);var Sl={onDirectionsChanged:"directions_changed"},El={directions:function(t,e){t.setDirections(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},panel:function(t,e){t.setPanel(e)},routeIndex:function(t,e){t.setRouteIndex(e)}};(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={directionsRenderer:null},n.setDirectionsRendererCallback=function(){n.state.directionsRenderer!==null&&(n.state.directionsRenderer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.directionsRenderer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=pe({updaterMap:El,eventMap:Sl,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{directionsRenderer:n}},this.setDirectionsRendererCallback)},e.prototype.componentDidUpdate=function(n){this.state.directionsRenderer!==null&&(ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:El,eventMap:Sl,prevProps:n,nextProps:this.props,instance:this.state.directionsRenderer}))},e.prototype.componentWillUnmount=function(){this.state.directionsRenderer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),ve(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},e.prototype.render=function(){return C.jsx(C.Fragment,{})},e.contextType=ue,e})(u.PureComponent);(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={distanceMatrixService:null},n.setDistanceMatrixServiceCallback=function(){n.state.distanceMatrixService!==null&&n.props.onLoad&&n.props.onLoad(n.state.distanceMatrixService)},n}return e.prototype.componentDidMount=function(){Ze(!!this.props.options,"DistanceMatrixService expected options object as parameter, but go %s",this.props.options);var n=new google.maps.DistanceMatrixService;this.setState(function(){return{distanceMatrixService:n}},this.setDistanceMatrixServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.distanceMatrixService!==null&&this.state.distanceMatrixService.getDistanceMatrix(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.distanceMatrixService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.distanceMatrixService)},e.prototype.render=function(){return null},e})(u.PureComponent);var Ll={onPlacesChanged:"places_changed"},xl={bounds:function(t,e){t.setBounds(e)}};(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=u.createRef(),n.state={searchBox:null},n.setSearchBoxCallback=function(){n.state.searchBox!==null&&n.props.onLoad&&n.props.onLoad(n.state.searchBox)},n}return e.prototype.componentDidMount=function(){if(Ze(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places),this.containerElement!==null&&this.containerElement.current!==null){var n=this.containerElement.current.querySelector("input");if(n!==null){var r=new google.maps.places.SearchBox(n,this.props.options);this.registeredEvents=pe({updaterMap:xl,eventMap:Ll,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{searchBox:r}},this.setSearchBoxCallback)}}},e.prototype.componentDidUpdate=function(n){this.state.searchBox!==null&&(ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:xl,eventMap:Ll,prevProps:n,nextProps:this.props,instance:this.state.searchBox}))},e.prototype.componentWillUnmount=function(){this.state.searchBox!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),ve(this.registeredEvents))},e.prototype.render=function(){return C.jsx("div",{ref:this.containerElement,children:u.Children.only(this.props.children)})},e.contextType=ue,e})(u.PureComponent);var Cl={onPlaceChanged:"place_changed"},_l={bounds:function(t,e){t.setBounds(e)},restrictions:function(t,e){t.setComponentRestrictions(e)},fields:function(t,e){t.setFields(e)},options:function(t,e){t.setOptions(e)},types:function(t,e){t.setTypes(e)}};(function(t){je(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=u.createRef(),n.state={autocomplete:null},n.setAutocompleteCallback=function(){n.state.autocomplete!==null&&n.props.onLoad&&n.props.onLoad(n.state.autocomplete)},n}return e.prototype.componentDidMount=function(){var n;Ze(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places);var r=(n=this.containerElement.current)===null||n===void 0?void 0:n.querySelector("input");if(r){var i=new google.maps.places.Autocomplete(r,this.props.options);this.registeredEvents=pe({updaterMap:_l,eventMap:Cl,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{autocomplete:i}},this.setAutocompleteCallback)}},e.prototype.componentDidUpdate=function(n){ve(this.registeredEvents),this.registeredEvents=pe({updaterMap:_l,eventMap:Cl,prevProps:n,nextProps:this.props,instance:this.state.autocomplete})},e.prototype.componentWillUnmount=function(){this.state.autocomplete!==null&&ve(this.registeredEvents)},e.prototype.render=function(){return C.jsx("div",{ref:this.containerElement,className:this.props.className,children:u.Children.only(this.props.children)})},e.defaultProps={className:""},e.contextType=ue,e})(u.PureComponent);const cg=Ap().use(wp()).use(dp()).init({language:"en",defaultNs:"common",ns:["common","courier_balloon","current_location","details_modal","header","location_aside","location_selector","receive_filter","send_filter","type_filter"],apiUrl:"https://tms.omnic.solutions",apiKey:"tgpak_gfpwi2dimy3domrsnezham3ugbvw24tfm5vwk3bqgntxa"});var xu={exports:{}};/*!
|
|
54
54
|
Copyright (c) 2018 Jed Watson.
|
|
55
55
|
Licensed under the MIT License (MIT), see
|
|
56
56
|
http://jedwatson.github.io/classnames
|
|
@@ -62,7 +62,7 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
62
62
|
*
|
|
63
63
|
* This source code is licensed under the MIT license found in the
|
|
64
64
|
* LICENSE file in the root directory of this source tree.
|
|
65
|
-
*/var rr=u;function dg(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var pg=typeof Object.is=="function"?Object.is:dg,hg=rr.useState,gg=rr.useEffect,vg=rr.useLayoutEffect,mg=rr.useDebugValue;function yg(t,e){var n=e(),r=hg({inst:{value:n,getSnapshot:e}}),i=r[0].inst,o=r[1];return vg(function(){i.value=n,i.getSnapshot=e,
|
|
65
|
+
*/var rr=u;function dg(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var pg=typeof Object.is=="function"?Object.is:dg,hg=rr.useState,gg=rr.useEffect,vg=rr.useLayoutEffect,mg=rr.useDebugValue;function yg(t,e){var n=e(),r=hg({inst:{value:n,getSnapshot:e}}),i=r[0].inst,o=r[1];return vg(function(){i.value=n,i.getSnapshot=e,Jo(i)&&o({inst:i})},[t,n,e]),gg(function(){return Jo(i)&&o({inst:i}),t(function(){Jo(i)&&o({inst:i})})},[t]),mg(n),n}function Jo(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!pg(t,n)}catch{return!0}}function bg(t,e){return e()}var wg=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?bg:yg;Mu.useSyncExternalStore=rr.useSyncExternalStore!==void 0?rr.useSyncExternalStore:wg;Ou.exports=Mu;var Sg=Ou.exports;/**
|
|
66
66
|
* @license React
|
|
67
67
|
* use-sync-external-store-shim/with-selector.production.min.js
|
|
68
68
|
*
|
|
@@ -70,7 +70,7 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
70
70
|
*
|
|
71
71
|
* This source code is licensed under the MIT license found in the
|
|
72
72
|
* LICENSE file in the root directory of this source tree.
|
|
73
|
-
*/var Po=u,
|
|
73
|
+
*/var Po=u,Eg=Sg;function Lg(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var xg=typeof Object.is=="function"?Object.is:Lg,Cg=Eg.useSyncExternalStore,_g=Po.useRef,Og=Po.useEffect,Mg=Po.useMemo,Pg=Po.useDebugValue;_u.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var o=_g(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=Mg(function(){function l(v){if(!c){if(c=!0,f=v,v=r(v),i!==void 0&&s.hasValue){var g=s.value;if(i(g,v))return d=g}return d=v}if(g=d,xg(f,v))return g;var h=r(v);return i!==void 0&&i(g,h)?g:(f=v,d=h)}var c=!1,f,d,p=n===void 0?null:n;return[function(){return l(e())},p===null?void 0:function(){return l(p())}]},[e,n,r,i]);var a=Cg(t,o[0],o[1]);return Og(function(){s.hasValue=!0,s.value=a},[a]),Pg(a),a};Cu.exports=_u;var kg=Cu.exports;const Rg=Mo(kg),{useDebugValue:Tg}=u,{useSyncExternalStoreWithSelector:Ag}=Rg;function Dg(t,e=t.getState,n){const r=Ag(t.subscribe,t.getState,t.getServerState||t.getState,e,n);return Tg(r),r}const Ml=t=>{const e=typeof t=="function"?fg(t):t,n=(r,i)=>Dg(e,r,i);return Object.assign(n,e),n},mn=t=>t?Ml(t):Ml,Ig={map:null,mode:"self_pickup",bounds:null,blurred:!1,loaded:!1,loading:!0,detailsOpen:!1},Fe=mn()(t=>({...Ig,setLoaded(){t({loaded:!0,loading:!1})},setMode(e){t({mode:e})},setBounds(e){t({bounds:e})},setDetailsOpen(e){t({detailsOpen:e})},setBlurred(e){t({blurred:e})},setMap(e){t({map:e})}}));let mi;const jg=new Uint8Array(16);function Ng(){if(!mi&&(mi=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!mi))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return mi(jg)}const rt=[];for(let t=0;t<256;++t)rt.push((t+256).toString(16).slice(1));function Bg(t,e=0){return rt[t[e+0]]+rt[t[e+1]]+rt[t[e+2]]+rt[t[e+3]]+"-"+rt[t[e+4]]+rt[t[e+5]]+"-"+rt[t[e+6]]+rt[t[e+7]]+"-"+rt[t[e+8]]+rt[t[e+9]]+"-"+rt[t[e+10]]+rt[t[e+11]]+rt[t[e+12]]+rt[t[e+13]]+rt[t[e+14]]+rt[t[e+15]]}const Ug=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Pl={randomUUID:Ug};function Pu(t,e,n){if(Pl.randomUUID&&!e&&!t)return Pl.randomUUID();t=t||{};const r=t.random||(t.rng||Ng)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){n=n||0;for(let i=0;i<16;++i)e[n+i]=r[i];return e}return Bg(r)}const _s=Pu(),lo=Pu(),Yt=[48,66],Yn=[58,80],oa=6,co=[49.3478969,14.0983344],ku="en",Vg=["places","geocoding"],On={logo:"default",locale:ku,map:{provider:"google",center:co,initialZoom:oa}},Ru=u.createContext(On),mt=()=>u.useContext(Ru),Fg={courierPoint:null},bt=mn()(t=>({...Fg,setCourierPoint(e){t({courierPoint:e})}})),zg="Spinner-module__loader__HX--ed",$g={loader:zg},ei=({className:t})=>C.jsx("div",{className:Se($g.loader,t),children:"Loading..."}),Hg="Button-module__root__8NAnx6",Gg="Button-module__primary__UsjvpK",Wg="Button-module__secondary__VtNj8s",Zg="Button-module__loading__cIi2EH",qg="Button-module__spinner__3Fk2sH",Lr={root:Hg,primary:Gg,secondary:Wg,loading:Zg,spinner:qg},xt=({className:t,variant:e="primary",loading:n,children:r,...i})=>{const o=[Lr.root,t,Lr[e],{[Lr.loading]:n}];if(i.as==="link"){const{as:s,...a}=i;return C.jsxs("a",{className:Se(o),...a,children:[!n&&r,n&&C.jsx(ei,{className:Lr.spinner})]})}if(i.as==="button"){const{as:s,...a}=i;return C.jsxs("button",{className:Se(o),...a,children:[!n&&r,n&&C.jsx(ei,{className:Lr.spinner})]})}Jt(!1,"Invalid button type")};xt.defaultProps={as:"button"};const Kg=t=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:123,height:32,fill:"none",viewBox:"0 0 123 32",...t},de.createElement("path",{fill:"currentcolor",d:"M6.698 32a6.579 6.579 0 0 1-3.35-.889 6.718 6.718 0 0 1-2.443-2.4A6.285 6.285 0 0 1 0 25.422V6.578c0-1.215.302-2.311.905-3.29A6.718 6.718 0 0 1 3.35.889 6.579 6.579 0 0 1 6.698 0h19.188c1.207 0 2.308.296 3.304.889a6.72 6.72 0 0 1 2.444 2.4c.633.978.95 2.074.95 3.289v18.844a6.061 6.061 0 0 1-.95 3.29 6.72 6.72 0 0 1-2.444 2.4c-.996.592-2.097.888-3.304.888H6.698Zm.317-6.933h18.464V6.933H7.015v18.134ZM37.568 32V0h7.24l11.043 12.933L66.848 0h7.287v32h-7.06V10.533L55.85 23.69 44.582 10.578V32h-7.014Zm41.985 0V0h7.241l18.238 21.333V0h7.105v32h-7.241L86.568 10.578V32h-7.015Zm36.523 0V0H123v32h-6.924Z"})),Jg=t=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:192,height:20,fill:"none",viewBox:"0 0 192 20",...t},de.createElement("path",{fill:"#000",d:"M4.1 20a3.966 3.966 0 0 1-2.05-.555 4.15 4.15 0 0 1-1.496-1.498A3.982 3.982 0 0 1 0 15.895V4.133c0-.758.185-1.442.554-2.052A4.15 4.15 0 0 1 2.05.583 3.966 3.966 0 0 1 4.1.028h11.743c.738 0 1.412.185 2.022.555A4.15 4.15 0 0 1 19.36 2.08c.388.61.582 1.294.582 2.052v11.762a3.83 3.83 0 0 1-.582 2.052 4.15 4.15 0 0 1-1.495 1.498c-.61.37-1.284.555-2.022.555H4.099Zm.193-4.327h11.3V4.355h-11.3v11.318ZM22.992 20V.028h4.432L34.182 8.1l6.73-8.072h4.46V20H41.05V6.602l-6.87 8.21-6.896-8.182V20h-4.293Zm25.696 0V.028h4.431l11.162 13.315V.028h4.348V20h-4.431L52.98 6.63V20h-4.294Zm22.352 0V.028h4.238V20H71.04Zm14.963 0V0h4.293v15.673h12.554V20H86.003Zm18.489 0V0h4.293v15.673h12.554V20h-16.847Zm18.717 0V4.133c0-.758.185-1.442.554-2.052a4.156 4.156 0 0 1 1.496-1.498 3.966 3.966 0 0 1 2.049-.555h11.716c.757 0 1.441.185 2.05.555.628.37 1.126.869 1.495 1.498.388.61.582 1.294.582 2.052V20h-4.348v-6.435h-11.301V20h-4.293Zm4.293-10.763h11.301V4.355h-11.301v4.882ZM146.307 20V.028h4.432l6.758 8.072 6.73-8.072h4.459V20h-4.32V6.602l-6.869 8.21L150.6 6.63V20h-4.293Zm25.751 0V4.133c0-.758.185-1.442.554-2.052a4.148 4.148 0 0 1 1.496-1.498 3.966 3.966 0 0 1 2.049-.555h11.716c.757 0 1.44.185 2.05.555.628.37 1.126.869 1.496 1.498A3.75 3.75 0 0 1 192 4.133V20h-4.348v-6.435h-11.301V20h-4.293Zm4.293-10.763h11.301V4.355h-11.301v4.882Z"})),Yg="Header-module__root__HQYeJV",Qg="Header-module__nav__E5j1Pg",Xg="Header-module__navItem__9yWrFL",ev="Header-module__logo__RE3idO",Tr={root:Yg,nav:Qg,navItem:Xg,logo:ev},tv={llama:Jg,default:Kg},nv=()=>{const{logo:t="default",hideLogo:e}=mt();if(e)return null;const n=tv[t];return C.jsx("div",{className:Tr.logo,children:C.jsx(n,{})})},rv=t=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:28,fill:"none",viewBox:"0 0 24 28",...t},de.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M24 11.777C24 4.052 17.606 0 12 0S0 4.052 0 11.777C0 16.915 3.994 22.334 12 28c8.006-5.666 12-11.085 12-16.224ZM12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z",clipRule:"evenodd"})),iv={open:!1},uo=mn(t=>({...iv,toggle(e){t(n=>({open:e??!n.open}))}})),ov={place:null},yn=mn(t=>({...ov,setPlace(e,n){var i,o,s;const r=Fe.getState().map;t({place:e}),r&&((i=e==null?void 0:e.geometry)!=null&&i.viewport)?r.fitBounds(e.geometry.viewport):(o=e==null?void 0:e.geometry)!=null&&o.location&&(r==null||r.panTo((s=e.geometry)==null?void 0:s.location)),n!=null&&(r==null||r.setZoom(n))}})),sv={location:null},It=mn()(t=>({...sv,setSelectedPoint(e){t({location:e})}})),av="CurrentLocation-module__root__OP569R",lv="CurrentLocation-module__icon__tNWTkm",cv="CurrentLocation-module__text__r-F6NH",Yo={root:av,icon:lv,text:cv},Tu=({className:t})=>{var c;const{t:e}=jt("current_location"),n=uo(f=>f.toggle),r=yn(f=>f.place),i=Fe(f=>f.setDetailsOpen),o=bt(f=>f.setCourierPoint),s=It(f=>f.setSelectedPoint),a=()=>{n(!0),i(!1),o(null),s(null)},l=(c=r==null?void 0:r.address_components)==null?void 0:c.find(f=>f.types.includes("locality"));return C.jsxs("div",{className:Se(Yo.root,t),onClick:a,children:[C.jsx(rv,{className:Yo.icon}),C.jsxs("span",{className:Yo.text,children:[!r&&e("choose_from_map"),r&&`${(l==null?void 0:l.long_name)??r.formatted_address}`]})]})},uv=({className:t})=>{const{t:e}=jt("header"),{disableCourierDelivery:n}=mt(),r=bt(d=>d.courierPoint),i=bt(d=>d.setCourierPoint),o=Fe(d=>d.mode),s=Fe(d=>d.setMode);u.useEffect(()=>{s(r?"courier_delivery":"self_pickup")},[r,s]);const a=()=>{i(null),s("self_pickup")},l=()=>{i(null),s("courier_delivery")},c=o==="self_pickup",f=o==="courier_delivery";return C.jsxs("div",{className:Se(Tr.root,t),children:[C.jsx(nv,{}),C.jsxs("nav",{className:Tr.nav,children:[!n&&C.jsx(xt,{as:"link",className:Tr.navItem,variant:c?"primary":"secondary",onClick:a,children:e("self_pickup")}),!n&&C.jsx(xt,{as:"link",className:Tr.navItem,variant:f?"primary":"secondary",onClick:l,children:e("courier_delivery")}),C.jsx(Tu,{})]})]})},fv=u.memo(uv),dv={open:!1},ir=mn(t=>({...dv,toggle(e){Fe.getState().setDetailsOpen(!1),bt.getState().setCourierPoint(null),It.getState().setSelectedPoint(null),t(n=>({open:e??!n.open}))}})),pv="Layout-module__root__ahSFBs",hv="Layout-module__headerHidden__ko0ZcT",gv="Layout-module__sidebarHidden__6hkiQL",vv="Layout-module__sidebarOpen__vFWl9b",yi={root:pv,headerHidden:hv,sidebarHidden:gv,sidebarOpen:vv},mv=({children:t})=>{const{hideHeader:e,hideFilters:n}=mt(),r=ir(i=>i.open);return C.jsx("div",{className:Se(yi.root,{[yi.sidebarOpen]:r,[yi.headerHidden]:e,[yi.sidebarHidden]:n}),children:t})};var yv=bv()?u.useLayoutEffect:u.useEffect;function bv(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function wv(){var t=u.useState(Object.create(null)),e=t[1];return u.useCallback(function(){e(Object.create(null))},[])}var Sv=function(e){var n=e.children,r=e.type,i=r===void 0?"reach-portal":r,o=u.useRef(null),s=u.useRef(null),a=wv();return yv(function(){if(o.current){var l=o.current.ownerDocument;return s.current=l==null?void 0:l.createElement(i),l.body.appendChild(s.current),a(),function(){s.current&&s.current.ownerDocument&&s.current.ownerDocument.body.removeChild(s.current)}}},[i,a]),s.current?ur.createPortal(n,s.current):u.createElement("span",{ref:o})};/*! *****************************************************************************
|
|
74
74
|
Copyright (c) Microsoft Corporation.
|
|
75
75
|
|
|
76
76
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -83,20 +83,20 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
83
83
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
84
84
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
85
85
|
PERFORMANCE OF THIS SOFTWARE.
|
|
86
|
-
***************************************************************************** */var G=function(){return G=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},G.apply(this,arguments)};function sa(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function we(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ce(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o}function Ue(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}var Ie;(function(t){t.Start="xstate.start",t.Stop="xstate.stop",t.Raise="xstate.raise",t.Send="xstate.send",t.Cancel="xstate.cancel",t.NullEvent="",t.Assign="xstate.assign",t.After="xstate.after",t.DoneState="done.state",t.DoneInvoke="done.invoke",t.Log="xstate.log",t.Init="xstate.init",t.Invoke="xstate.invoke",t.ErrorExecution="error.execution",t.ErrorCommunication="error.communication",t.ErrorPlatform="error.platform",t.ErrorCustom="xstate.error",t.Update="xstate.update",t.Pure="xstate.pure",t.Choose="xstate.choose"})(Ie||(Ie={}));var or;(function(t){t.Parent="#_parent",t.Internal="#_internal"})(or||(or={}));var Os=Ie.Start,aa=Ie.Stop,ai=Ie.Raise,ko=Ie.Send,Au=Ie.Cancel,Lv=Ie.NullEvent,la=Ie.Assign;Ie.After;Ie.DoneState;var Du=Ie.Log,Ev=Ie.Init,Ms=Ie.Invoke;Ie.ErrorExecution;var kl=Ie.ErrorPlatform,xv=Ie.ErrorCustom,Iu=Ie.Update,Cv=Ie.Choose,_v=Ie.Pure,ju=".",Rl={},Ps="xstate.guard",Ov="",bi;function ca(t,e,n){n===void 0&&(n=ju);var r=Ur(t,n),i=Ur(e,n);return Re(i)?Re(r)?i===r:!1:Re(r)?r in i:Object.keys(r).every(function(o){return o in i?ca(r[o],i[o]):!1})}function Nu(t){try{return Re(t)||typeof t=="number"?"".concat(t):t.type}catch{throw new Error("Events must be strings or objects with a string event.type property.")}}function ks(t,e){try{return fr(t)?t:t.toString().split(e)}catch{throw new Error("'".concat(t,"' is not a valid state path."))}}function Mv(t){return typeof t=="object"&&"value"in t&&"context"in t&&"event"in t&&"_event"in t}function Ur(t,e){if(Mv(t))return t.value;if(fr(t))return fo(t);if(typeof t!="string")return t;var n=ks(t,e);return fo(n)}function fo(t){if(t.length===1)return t[0];for(var e={},n=e,r=0;r<t.length-1;r++)r===t.length-2?n[t[r]]=t[r+1]:(n[t[r]]={},n=n[t[r]]);return e}function Ar(t,e){for(var n={},r=Object.keys(t),i=0;i<r.length;i++){var o=r[i];n[o]=e(t[o],o,t,i)}return n}function Tl(t,e,n){var r,i,o={};try{for(var s=we(Object.keys(t)),a=s.next();!a.done;a=s.next()){var l=a.value,c=t[l];n(c)&&(o[l]=e(c,l,t))}}catch(f){r={error:f}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o}var Pv=function(t){return function(e){var n,r,i=e;try{for(var o=we(t),s=o.next();!s.done;s=o.next()){var a=s.value;i=i[a]}}catch(l){n={error:l}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}};function kv(t,e){return function(n){var r,i,o=n;try{for(var s=we(t),a=s.next();!a.done;a=s.next()){var l=a.value;o=o[e][l]}}catch(c){r={error:c}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o}}function Gi(t){if(!t)return[[]];if(Re(t))return[[t]];var e=He(Object.keys(t).map(function(n){var r=t[n];return typeof r!="string"&&(!r||!Object.keys(r).length)?[[n]]:Gi(t[n]).map(function(i){return[n].concat(i)})}));return e}function He(t){var e;return(e=[]).concat.apply(e,Ue([],Ce(t),!1))}function Bu(t){return fr(t)?t:[t]}function Mt(t){return t===void 0?[]:Bu(t)}function po(t,e,n){var r,i;if(_e(t))return t(e,n.data);var o={};try{for(var s=we(Object.keys(t)),a=s.next();!a.done;a=s.next()){var l=a.value,c=t[l];_e(c)?o[l]=c(e,n.data):o[l]=c}}catch(f){r={error:f}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o}function Rv(t){return/^(done|error)\./.test(t)}function Al(t){return!!(t instanceof Promise||t!==null&&(_e(t)||typeof t=="object")&&_e(t.then))}function Tv(t){return t!==null&&typeof t=="object"&&"transition"in t&&typeof t.transition=="function"}function Av(t,e){var n,r,i=Ce([[],[]],2),o=i[0],s=i[1];try{for(var a=we(t),l=a.next();!l.done;l=a.next()){var c=l.value;e(c)?o.push(c):s.push(c)}}catch(f){n={error:f}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[o,s]}function Uu(t,e){return Ar(t.states,function(n,r){if(n){var i=(Re(e)?void 0:e[r])||(n?n.current:void 0);if(i)return{current:i,states:Uu(n,i)}}})}function Dv(t,e){return{current:e,states:Uu(t,e)}}function Dl(t,e,n,r){var i=t&&n.reduce(function(o,s){var a,l,c=s.assignment,f={state:r,action:s,_event:e},d={};if(_e(c))d=c(o,e.data,f);else try{for(var p=we(Object.keys(c)),v=p.next();!v.done;v=p.next()){var g=v.value,h=c[g];d[g]=_e(h)?h(o,e.data,f):h}}catch(S){a={error:S}}finally{try{v&&!v.done&&(l=p.return)&&l.call(p)}finally{if(a)throw a.error}}return Object.assign({},o,d)},t);return i}var Iv=function(){};function fr(t){return Array.isArray(t)}function _e(t){return typeof t=="function"}function Re(t){return typeof t=="string"}function Vu(t,e){if(t)return Re(t)?{type:Ps,name:t,predicate:e?e[t]:void 0}:_e(t)?{type:Ps,name:t.name,predicate:t}:t}function jv(t){try{return"subscribe"in t&&_e(t.subscribe)}catch{return!1}}var fn=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();bi={},bi[fn]=function(){return this},bi[Symbol.observable]=function(){return this};function sr(t){return!!t&&"__xstatenode"in t}function Nv(t){return!!t&&typeof t.send=="function"}function Ro(t,e){return Re(t)||typeof t=="number"?G({type:t},e):t}function it(t,e){if(!Re(t)&&"$$type"in t&&t.$$type==="scxml")return t;var n=Ro(t);return G({name:n.type,data:n,$$type:"scxml",type:"external"},e)}function zn(t,e){var n=Bu(e).map(function(r){return typeof r>"u"||typeof r=="string"||sr(r)?{target:r,event:t}:G(G({},r),{event:t})});return n}function Bv(t){if(!(t===void 0||t===Ov))return Mt(t)}function Fu(t,e,n,r,i){var o=t.options.guards,s={state:i,cond:e,_event:r};if(e.type===Ps)return((o==null?void 0:o[e.name])||e.predicate)(n,r.data,s);var a=o==null?void 0:o[e.type];if(!a)throw new Error("Guard '".concat(e.type,"' is not implemented on machine '").concat(t.id,"'."));return a(n,r.data,s)}function zu(t){return typeof t=="string"?{type:t}:t}function Wi(t,e,n){var r=function(){},i=typeof t=="object",o=i?t:null;return{next:((i?t.next:t)||r).bind(o),error:((i?t.error:e)||r).bind(o),complete:((i?t.complete:n)||r).bind(o)}}function wi(t,e){return"".concat(t,":invocation[").concat(e,"]")}function Rs(t){return(t.type===ai||t.type===ko&&t.to===or.Internal)&&typeof t.delay!="number"}var Qn=it({type:Ev});function Ts(t,e){return e&&e[t]||void 0}function ti(t,e){var n;if(Re(t)||typeof t=="number"){var r=Ts(t,e);_e(r)?n={type:t,exec:r}:r?n=r:n={type:t,exec:void 0}}else if(_e(t))n={type:t.name||t.toString(),exec:t};else{var r=Ts(t.type,e);if(_e(r))n=G(G({},t),{exec:r});else if(r){var i=r.type||t.type;n=G(G(G({},r),t),{type:i})}else n=t}return n}var dn=function(t,e){if(!t)return[];var n=fr(t)?t:[t];return n.map(function(r){return ti(r,e)})};function ua(t){var e=ti(t);return G(G({id:Re(t)?t:e.id},e),{type:e.type})}function Uv(t,e){return{type:ai,event:typeof t=="function"?t:Ro(t),delay:e?e.delay:void 0,id:e==null?void 0:e.id}}function Vv(t,e,n,r){var i={_event:n},o=it(_e(t.event)?t.event(e,n.data,i):t.event),s;if(Re(t.delay)){var a=r&&r[t.delay];s=_e(a)?a(e,n.data,i):a}else s=_e(t.delay)?t.delay(e,n.data,i):t.delay;return G(G({},t),{type:ai,_event:o,delay:s})}function Fv(t,e){return{to:e?e.to:void 0,type:ko,event:_e(t)?t:Ro(t),delay:e?e.delay:void 0,id:e&&e.id!==void 0?e.id:_e(t)?t.name:Nu(t)}}function zv(t,e,n,r){var i={_event:n},o=it(_e(t.event)?t.event(e,n.data,i):t.event),s;if(Re(t.delay)){var a=r&&r[t.delay];s=_e(a)?a(e,n.data,i):a}else s=_e(t.delay)?t.delay(e,n.data,i):t.delay;var l=_e(t.to)?t.to(e,n.data,i):t.to;return G(G({},t),{to:l,_event:o,event:o.data,delay:s})}var $v=function(t,e,n){return G(G({},t),{value:Re(t.expr)?t.expr:t.expr(e,n.data,{_event:n})})},Hv=function(t){return{type:Au,sendId:t}};function Gv(t){var e=ua(t);return{type:Ie.Start,activity:e,exec:void 0}}function Wv(t){var e=_e(t)?t:ua(t);return{type:Ie.Stop,activity:e,exec:void 0}}function Zv(t,e,n){var r=_e(t.activity)?t.activity(e,n.data):t.activity,i=typeof r=="string"?{id:r}:r,o={type:Ie.Stop,activity:i};return o}var qv=function(t){return{type:la,assignment:t}};function Kv(t,e){var n=e?"#".concat(e):"";return"".concat(Ie.After,"(").concat(t,")").concat(n)}function Si(t,e){var n="".concat(Ie.DoneState,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function Zi(t,e){var n="".concat(Ie.DoneInvoke,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function Dr(t,e){var n="".concat(Ie.ErrorPlatform,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}var Yv=function(t){var e,n,r=[];try{for(var i=we(t),o=i.next();!o.done;o=i.next())for(var s=o.value,a=0;a<s.actions.length;){if(s.actions[a].type===la){r.push(s.actions[a]),s.actions.splice(a,1);continue}a++}}catch(l){e={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r};function ho(t,e,n,r,i,o,s){s===void 0&&(s=!1);var a=s?[]:Yv(i),l=a.length?Dl(n,r,a,e):n,c=s?[n]:void 0,f=[];function d(g,h){var S;switch(h.type){case ai:{var L=Vv(h,l,r,t.options.delays);return o&&typeof L.delay=="number"&&o(L,l,r),L}case ko:var b=zv(h,l,r,t.options.delays);return o&&b.to!==or.Internal&&(g==="entry"?f.push(b):o(b,l,r)),b;case Du:{var y=$v(h,l,r);return o==null||o(y,l,r),y}case Cv:{var x=h,E=(S=x.conds.find(function(Z){var F=Vu(Z.cond,t.options.guards);return!F||Fu(t,F,l,r,o?void 0:e)}))===null||S===void 0?void 0:S.actions;if(!E)return[];var m=Ce(ho(t,e,l,r,[{type:g,actions:dn(Mt(E),t.options.actions)}],o,s),2),w=m[0],_=m[1];return l=_,c==null||c.push(l),w}case _v:{var E=h.get(l,r.data);if(!E)return[];var P=Ce(ho(t,e,l,r,[{type:g,actions:dn(Mt(E),t.options.actions)}],o,s),2),M=P[0],O=P[1];return l=O,c==null||c.push(l),M}case aa:{var y=Zv(h,l,r);return o==null||o(y,n,r),y}case la:{l=Dl(l,r,[h],o?void 0:e),c==null||c.push(l);break}default:var k=ti(h,t.options.actions),I=k.exec;if(o)o(k,l,r);else if(I&&c){var B=c.length-1,H=G(G({},k),{exec:function(Z){for(var F=[],K=1;K<arguments.length;K++)F[K-1]=arguments[K];I.apply(void 0,Ue([c[B]],Ce(F),!1))}});k=H}return k}}function p(g){var h,S,L=[];try{for(var b=we(g.actions),y=b.next();!y.done;y=b.next()){var x=y.value,E=d(g.type,x);E&&(L=L.concat(E))}}catch(m){h={error:m}}finally{try{y&&!y.done&&(S=b.return)&&S.call(b)}finally{if(h)throw h.error}}return f.forEach(function(m){o(m,l,r)}),f.length=0,L}var v=He(i.map(p));return[v,l]}var Il=[],Kn=function(t,e){Il.push(t);var n=e(t);return Il.pop(),n};function $u(t){var e;return e={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:t}}},e[fn]=function(){return this},e}function Jv(t,e,n,r){var i,o=zu(t.src),s=(i=e==null?void 0:e.options.services)===null||i===void 0?void 0:i[o.type],a=t.data?po(t.data,n,r):void 0,l=s?Hu(s,t.id,a):$u(t.id);return l.meta=t,l}function Hu(t,e,n){var r=$u(e);if(r.deferred=!0,sr(t)){var i=r.state=Kn(void 0,function(){return(n?t.withContext(n):t).initialState});r.getSnapshot=function(){return i}}return r}function Xv(t){try{return typeof t.send=="function"}catch{return!1}}function Qv(t){return Xv(t)&&"id"in t}function em(t){var e;return G((e={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},e[fn]=function(){return this},e),t)}var go=function(t){return t.type==="atomic"||t.type==="final"};function Gu(t){return Object.keys(t.states).map(function(e){return t.states[e]})}function ni(t){return Gu(t).filter(function(e){return e.type!=="history"})}function Wu(t){var e=[t];return go(t)?e:e.concat(He(ni(t).map(Wu)))}function Ir(t,e){var n,r,i,o,s,a,l,c,f=new Set(t),d=As(f),p=new Set(e);try{for(var v=we(p),g=v.next();!g.done;g=v.next())for(var h=g.value,S=h.parent;S&&!p.has(S);)p.add(S),S=S.parent}catch(P){n={error:P}}finally{try{g&&!g.done&&(r=v.return)&&r.call(v)}finally{if(n)throw n.error}}var L=As(p);try{for(var b=we(p),y=b.next();!y.done;y=b.next()){var h=y.value;if(h.type==="compound"&&(!L.get(h)||!L.get(h).length))d.get(h)?d.get(h).forEach(function(M){return p.add(M)}):h.initialStateNodes.forEach(function(M){return p.add(M)});else if(h.type==="parallel")try{for(var x=(s=void 0,we(ni(h))),E=x.next();!E.done;E=x.next()){var m=E.value;p.has(m)||(p.add(m),d.get(m)?d.get(m).forEach(function(M){return p.add(M)}):m.initialStateNodes.forEach(function(M){return p.add(M)}))}}catch(M){s={error:M}}finally{try{E&&!E.done&&(a=x.return)&&a.call(x)}finally{if(s)throw s.error}}}}catch(P){i={error:P}}finally{try{y&&!y.done&&(o=b.return)&&o.call(b)}finally{if(i)throw i.error}}try{for(var w=we(p),_=w.next();!_.done;_=w.next())for(var h=_.value,S=h.parent;S&&!p.has(S);)p.add(S),S=S.parent}catch(P){l={error:P}}finally{try{_&&!_.done&&(c=w.return)&&c.call(w)}finally{if(l)throw l.error}}return p}function Zu(t,e){var n=e.get(t);if(!n)return{};if(t.type==="compound"){var r=n[0];if(r){if(go(r))return r.key}else return{}}var i={};return n.forEach(function(o){i[o.key]=Zu(o,e)}),i}function As(t){var e,n,r=new Map;try{for(var i=we(t),o=i.next();!o.done;o=i.next()){var s=o.value;r.has(s)||r.set(s,[]),s.parent&&(r.has(s.parent)||r.set(s.parent,[]),r.get(s.parent).push(s))}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}function tm(t,e){var n=Ir([t],e);return Zu(t,As(n))}function jr(t,e){return Array.isArray(t)?t.some(function(n){return n===e}):t instanceof Set?t.has(e):!1}function nm(t){return Ue([],Ce(new Set(He(Ue([],Ce(t.map(function(e){return e.ownEvents})),!1)))),!1)}function qi(t,e){return e.type==="compound"?ni(e).some(function(n){return n.type==="final"&&jr(t,n)}):e.type==="parallel"?ni(e).every(function(n){return qi(t,n)}):!1}function rm(t){return t===void 0&&(t=[]),t.reduce(function(e,n){return n.meta!==void 0&&(e[n.id]=n.meta),e},{})}function jl(t){return new Set(He(t.map(function(e){return e.tags})))}function qu(t,e){if(t===e)return!0;if(t===void 0||e===void 0)return!1;if(Re(t)||Re(e))return t===e;var n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(function(i){return qu(t[i],e[i])})}function im(t){return typeof t!="object"||t===null?!1:"value"in t&&"_event"in t}function om(t,e){var n=t.exec,r=G(G({},t),{exec:n!==void 0?function(){return n(e.context,e.event,{action:t,state:e,_event:e._event})}:void 0});return r}var St=function(){function t(e){var n=this,r;this.actions=[],this.activities=Rl,this.meta={},this.events=[],this.value=e.value,this.context=e.context,this._event=e._event,this._sessionid=e._sessionid,this.event=this._event.data,this.historyValue=e.historyValue,this.history=e.history,this.actions=e.actions||[],this.activities=e.activities||Rl,this.meta=rm(e.configuration),this.events=e.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=e.configuration,this.transitions=e.transitions,this.children=e.children,this.done=!!e.done,this.tags=(r=Array.isArray(e.tags)?new Set(e.tags):e.tags)!==null&&r!==void 0?r:new Set,this.machine=e.machine,Object.defineProperty(this,"nextEvents",{get:function(){return nm(n.configuration)}})}return t.from=function(e,n){if(e instanceof t)return e.context!==n?new t({value:e.value,context:n,_event:e._event,_sessionid:null,historyValue:e.historyValue,history:e.history,actions:[],activities:e.activities,meta:{},events:[],configuration:[],transitions:[],children:{}}):e;var r=Qn;return new t({value:e,context:n,_event:r,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,meta:void 0,events:[],configuration:[],transitions:[],children:{}})},t.create=function(e){return new t(e)},t.inert=function(e,n){if(e instanceof t){if(!e.actions.length)return e;var r=Qn;return new t({value:e.value,context:n,_event:r,_sessionid:null,historyValue:e.historyValue,history:e.history,activities:e.activities,configuration:e.configuration,transitions:[],children:{}})}return t.from(e,n)},t.prototype.toStrings=function(e,n){var r=this;if(e===void 0&&(e=this.value),n===void 0&&(n="."),Re(e))return[e];var i=Object.keys(e);return i.concat.apply(i,Ue([],Ce(i.map(function(o){return r.toStrings(e[o],n).map(function(s){return o+n+s})})),!1))},t.prototype.toJSON=function(){var e=this;e.configuration,e.transitions;var n=e.tags;e.machine;var r=sa(e,["configuration","transitions","tags","machine"]);return G(G({},r),{tags:Array.from(n)})},t.prototype.matches=function(e){return ca(e,this.value)},t.prototype.hasTag=function(e){return this.tags.has(e)},t.prototype.can=function(e){var n;Iv(!!this.machine);var r=(n=this.machine)===null||n===void 0?void 0:n.getTransitionData(this,e);return!!(r!=null&&r.transitions.length)&&r.transitions.some(function(i){return i.target!==void 0||i.actions.length})},t}(),sm={deferEvents:!1},Nl=function(){function t(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=G(G({},sm),e)}return t.prototype.initialize=function(e){if(this.initialized=!0,e){if(!this.options.deferEvents){this.schedule(e);return}this.process(e)}this.flushEvents()},t.prototype.schedule=function(e){if(!this.initialized||this.processingEvent){this.queue.push(e);return}if(this.queue.length!==0)throw new Error("Event queue should be empty when it is not processing events");this.process(e),this.flushEvents()},t.prototype.clear=function(){this.queue=[]},t.prototype.flushEvents=function(){for(var e=this.queue.shift();e;)this.process(e),e=this.queue.shift()},t.prototype.process=function(e){this.processingEvent=!0;try{e()}catch(n){throw this.clear(),n}finally{this.processingEvent=!1}},t}(),Xo=new Map,am=0,xr={bookId:function(){return"x:".concat(am++)},register:function(t,e){return Xo.set(t,e),t},get:function(t){return Xo.get(t)},free:function(t){Xo.delete(t)}};function fa(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}function lm(){var t=fa();if(t&&"__xstate__"in t)return t.__xstate__}function cm(t){if(fa()){var e=lm();e&&e.register(t)}}function um(t,e){e===void 0&&(e={});var n=t.initialState,r=new Set,i=[],o=!1,s=function(){if(!o){for(o=!0;i.length>0;){var c=i.shift();n=t.transition(n,c,l),r.forEach(function(f){return f.next(n)})}o=!1}},a=em({id:e.id,send:function(c){i.push(c),s()},getSnapshot:function(){return n},subscribe:function(c,f,d){var p=Wi(c,f,d);return r.add(p),p.next(n),{unsubscribe:function(){r.delete(p)}}}}),l={parent:e.parent,self:a,id:e.id||"anonymous",observers:r};return n=t.start?t.start(l):n,a}var fm={sync:!1,autoForward:!1},Qe;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(Qe||(Qe={}));var dm=function(){function t(e,n){n===void 0&&(n=t.defaultOptions);var r=this;this.machine=e,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=Qe.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(f,d){if(fr(f))return r.batch(f),r.state;var p=it(Ro(f,d));if(r.status===Qe.Stopped)return r.state;if(r.status!==Qe.Running&&!r.options.deferEvents)throw new Error('Event "'.concat(p.name,'" was sent to uninitialized service "').concat(r.machine.id,`". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.
|
|
87
|
-
Event: `).concat(JSON.stringify(p.data)));return r.scheduler.schedule(function(){r.forward(p);var v=r._nextState(p);r.update(v,p)}),r._state},this.sendTo=function(f,d,p){var v=r.parent&&(d===or.Parent||r.parent.id===d),g=v?r.parent:Re(d)?d===or.Internal?r:r.children.get(d)||xr.get(d):Nv(d)?d:void 0;if(!g){if(!v)throw new Error("Unable to send event to child '".concat(d,"' from service '").concat(r.id,"'."));return}if("machine"in g){if(r.status!==Qe.Stopped||r.parent!==g||r.state.done){var h=G(G({},f),{name:f.name===xv?"".concat(Dr(r.id)):f.name,origin:r.sessionId});!p&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([g,h]):g.send(h)}}else!p&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([g,f.data]):g.send(f.data)},this._exec=function(f,d,p,v){v===void 0&&(v=r.machine.options.actions);var g=f.exec||Ts(f.type,v),h=_e(g)?g:g?g.exec:f.exec;if(h)try{return h(d,p.data,r.machine.config.predictableActionArguments?{action:f,_event:p}:{action:f,state:r.state,_event:p})}catch(B){throw r.parent&&r.parent.send({type:"xstate.error",data:B}),B}switch(f.type){case ai:{var S=f;r.defer(S);break}case ko:var L=f;if(typeof L.delay=="number"){r.defer(L);return}else L.to?r.sendTo(L._event,L.to,p===Qn):r.send(L._event);break;case Au:r.cancel(f.sendId);break;case Os:{if(r.status!==Qe.Running)return;var b=f.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[b.id||b.type])break;if(b.type===Ie.Invoke){var y=zu(b.src),x=r.machine.options.services?r.machine.options.services[y.type]:void 0,E=b.id,m=b.data,w="autoForward"in b?b.autoForward:!!b.forward;if(!x)return;var _=m?po(m,d,p):void 0;if(typeof x=="string")return;var P=_e(x)?x(d,p.data,{data:_,src:y,meta:b.meta}):x;if(!P)return;var M=void 0;sr(P)&&(P=_?P.withContext(_):P,M={autoForward:w}),r.spawn(P,E,M)}else r.spawnActivity(b);break}case aa:{r.stopChild(f.activity.id);break}case Du:var O=f,k=O.label,I=O.value;k?r.logger(k,I):r.logger(I);break}};var i=G(G({},t.defaultOptions),n),o=i.clock,s=i.logger,a=i.parent,l=i.id,c=l!==void 0?l:e.id;this.id=c,this.logger=s,this.clock=o,this.parent=a,this.options=i,this.scheduler=new Nl({deferEvents:this.options.deferEvents}),this.sessionId=xr.bookId()}return Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:Kn(this,function(){return e._initialState=e.machine.initialState,e._initialState})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),t.prototype.execute=function(e,n){var r,i;try{for(var o=we(e.actions),s=o.next();!s.done;s=o.next()){var a=s.value;this.exec(a,e,n)}}catch(l){r={error:l}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},t.prototype.update=function(e,n){var r,i,o,s,a,l,c,f,d=this;if(e._sessionid=this.sessionId,this._state=e,(!this.machine.config.predictableActionArguments||n===Qn)&&this.options.execute)this.execute(this.state);else for(var p=void 0;p=this._outgoingQueue.shift();)p[0].send(p[1]);if(this.children.forEach(function(P){d.state.children[P.id]=P}),this.devTools&&this.devTools.send(n.data,e),e.event)try{for(var v=we(this.eventListeners),g=v.next();!g.done;g=v.next()){var h=g.value;h(e.event)}}catch(P){r={error:P}}finally{try{g&&!g.done&&(i=v.return)&&i.call(v)}finally{if(r)throw r.error}}try{for(var S=we(this.listeners),L=S.next();!L.done;L=S.next()){var h=L.value;h(e,e.event)}}catch(P){o={error:P}}finally{try{L&&!L.done&&(s=S.return)&&s.call(S)}finally{if(o)throw o.error}}try{for(var b=we(this.contextListeners),y=b.next();!y.done;y=b.next()){var x=y.value;x(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(P){a={error:P}}finally{try{y&&!y.done&&(l=b.return)&&l.call(b)}finally{if(a)throw a.error}}if(this.state.done){var E=e.configuration.find(function(P){return P.type==="final"&&P.parent===d.machine}),m=E&&E.doneData?po(E.doneData,e.context,n):void 0;this._doneEvent=Zi(this.id,m);try{for(var w=we(this.doneListeners),_=w.next();!_.done;_=w.next()){var h=_.value;h(this._doneEvent)}}catch(P){c={error:P}}finally{try{_&&!_.done&&(f=w.return)&&f.call(w)}finally{if(c)throw c.error}}this._stop(),this._stopChildren(),xr.free(this.sessionId)}},t.prototype.onTransition=function(e){return this.listeners.add(e),this.status===Qe.Running&&e(this.state,this.state.event),this},t.prototype.subscribe=function(e,n,r){var i=this,o=Wi(e,n,r);this.listeners.add(o.next),this.status!==Qe.NotStarted&&o.next(this.state);var s=function(){i.doneListeners.delete(s),i.stopListeners.delete(s),o.complete()};return this.status===Qe.Stopped?o.complete():(this.onDone(s),this.onStop(s)),{unsubscribe:function(){i.listeners.delete(o.next),i.doneListeners.delete(s),i.stopListeners.delete(s)}}},t.prototype.onEvent=function(e){return this.eventListeners.add(e),this},t.prototype.onSend=function(e){return this.sendListeners.add(e),this},t.prototype.onChange=function(e){return this.contextListeners.add(e),this},t.prototype.onStop=function(e){return this.stopListeners.add(e),this},t.prototype.onDone=function(e){return this.status===Qe.Stopped&&this._doneEvent?e(this._doneEvent):this.doneListeners.add(e),this},t.prototype.off=function(e){return this.listeners.delete(e),this.eventListeners.delete(e),this.sendListeners.delete(e),this.stopListeners.delete(e),this.doneListeners.delete(e),this.contextListeners.delete(e),this},t.prototype.start=function(e){var n=this;if(this.status===Qe.Running)return this;this.machine._init(),xr.register(this.sessionId,this),this.initialized=!0,this.status=Qe.Running;var r=e===void 0?this.initialState:Kn(this,function(){return im(e)?n.machine.resolveState(e):n.machine.resolveState(St.from(e,n.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){n.update(r,Qn)}),this},t.prototype._stopChildren=function(){this.children.forEach(function(e){_e(e.stop)&&e.stop()}),this.children.clear()},t.prototype._stop=function(){var e,n,r,i,o,s,a,l,c,f;try{for(var d=we(this.listeners),p=d.next();!p.done;p=d.next()){var v=p.value;this.listeners.delete(v)}}catch(w){e={error:w}}finally{try{p&&!p.done&&(n=d.return)&&n.call(d)}finally{if(e)throw e.error}}try{for(var g=we(this.stopListeners),h=g.next();!h.done;h=g.next()){var v=h.value;v(),this.stopListeners.delete(v)}}catch(w){r={error:w}}finally{try{h&&!h.done&&(i=g.return)&&i.call(g)}finally{if(r)throw r.error}}try{for(var S=we(this.contextListeners),L=S.next();!L.done;L=S.next()){var v=L.value;this.contextListeners.delete(v)}}catch(w){o={error:w}}finally{try{L&&!L.done&&(s=S.return)&&s.call(S)}finally{if(o)throw o.error}}try{for(var b=we(this.doneListeners),y=b.next();!y.done;y=b.next()){var v=y.value;this.doneListeners.delete(v)}}catch(w){a={error:w}}finally{try{y&&!y.done&&(l=b.return)&&l.call(b)}finally{if(a)throw a.error}}if(!this.initialized)return this;this.initialized=!1,this.status=Qe.Stopped,this._initialState=void 0;try{for(var x=we(Object.keys(this.delayedEventsMap)),E=x.next();!E.done;E=x.next()){var m=E.value;this.clock.clearTimeout(this.delayedEventsMap[m])}}catch(w){c={error:w}}finally{try{E&&!E.done&&(f=x.return)&&f.call(x)}finally{if(c)throw c.error}}this.scheduler.clear(),this.scheduler=new Nl({deferEvents:this.options.deferEvents})},t.prototype.stop=function(){var e=this,n=this.scheduler;return this._stop(),n.schedule(function(){var r=it({type:"xstate.stop"}),i=Kn(e,function(){var o=He(Ue([],Ce(e.state.configuration),!1).sort(function(f,d){return d.order-f.order}).map(function(f){return dn(f.onExit,e.machine.options.actions)})),s=Ce(ho(e.machine,e.state,e.state.context,r,[{type:"exit",actions:o}],e.machine.config.predictableActionArguments?e._exec:void 0,e.machine.config.predictableActionArguments||e.machine.config.preserveActionOrder),2),a=s[0],l=s[1],c=new St({value:e.state.value,context:l,_event:r,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:a.filter(function(f){return!Rs(f)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return c.changed=!0,c});e.update(i,r),e._stopChildren(),xr.free(e.sessionId)}),this},t.prototype.batch=function(e){var n=this;if(!(this.status===Qe.NotStarted&&this.options.deferEvents)){if(this.status!==Qe.Running)throw new Error("".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'))}if(e.length){var r=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule(function(){var i,o,s=n.state,a=!1,l=[],c=function(v){var g=it(v);n.forward(g),s=Kn(n,function(){return n.machine.transition(s,g,void 0,r||void 0)}),l.push.apply(l,Ue([],Ce(n.machine.config.predictableActionArguments?s.actions:s.actions.map(function(h){return om(h,s)})),!1)),a=a||!!s.changed};try{for(var f=we(e),d=f.next();!d.done;d=f.next()){var p=d.value;c(p)}}catch(v){i={error:v}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}s.changed=a,s.actions=l,n.update(s,it(e[e.length-1]))})}},t.prototype.sender=function(e){return this.send.bind(this,e)},t.prototype._nextState=function(e,n){var r=this;n===void 0&&(n=!!this.machine.config.predictableActionArguments&&this._exec);var i=it(e);if(i.name.indexOf(kl)===0&&!this.state.nextEvents.some(function(s){return s.indexOf(kl)===0}))throw i.data.data;var o=Kn(this,function(){return r.machine.transition(r.state,i,void 0,n||void 0)});return o},t.prototype.nextState=function(e){return this._nextState(e,!1)},t.prototype.forward=function(e){var n,r;try{for(var i=we(this.forwardTo),o=i.next();!o.done;o=i.next()){var s=o.value,a=this.children.get(s);if(!a)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(s,"'."));a.send(e)}}catch(l){n={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},t.prototype.defer=function(e){var n=this,r=this.clock.setTimeout(function(){"to"in e&&e.to?n.sendTo(e._event,e.to,!0):n.send(e._event)},e.delay);e.id&&(this.delayedEventsMap[e.id]=r)},t.prototype.cancel=function(e){this.clock.clearTimeout(this.delayedEventsMap[e]),delete this.delayedEventsMap[e]},t.prototype.exec=function(e,n,r){r===void 0&&(r=this.machine.options.actions),this._exec(e,n.context,n._event,r)},t.prototype.removeChild=function(e){var n;this.children.delete(e),this.forwardTo.delete(e),(n=this.state)===null||n===void 0||delete n.children[e]},t.prototype.stopChild=function(e){var n=this.children.get(e);n&&(this.removeChild(e),_e(n.stop)&&n.stop())},t.prototype.spawn=function(e,n,r){if(this.status!==Qe.Running)return Hu(e,n);if(Al(e))return this.spawnPromise(Promise.resolve(e),n);if(_e(e))return this.spawnCallback(e,n);if(Qv(e))return this.spawnActor(e,n);if(jv(e))return this.spawnObservable(e,n);if(sr(e))return this.spawnMachine(e,G(G({},r),{id:n}));if(Tv(e))return this.spawnBehavior(e,n);throw new Error('Unable to spawn entity "'.concat(n,'" of type "').concat(typeof e,'".'))},t.prototype.spawnMachine=function(e,n){var r=this;n===void 0&&(n={});var i=new t(e,G(G({},this.options),{parent:this,id:n.id||e.id})),o=G(G({},fm),n);o.sync&&i.onTransition(function(a){r.send(Iu,{state:a,id:i.id})});var s=i;return this.children.set(i.id,s),o.autoForward&&this.forwardTo.add(i.id),i.onDone(function(a){r.removeChild(i.id),r.send(it(a,{origin:i.id}))}).start(),s},t.prototype.spawnBehavior=function(e,n){var r=um(e,{id:n,parent:this});return this.children.set(n,r),r},t.prototype.spawnPromise=function(e,n){var r,i=this,o=!1,s;e.then(function(l){o||(s=l,i.removeChild(n),i.send(it(Zi(n,l),{origin:n})))},function(l){if(!o){i.removeChild(n);var c=Dr(n,l);try{i.send(it(c,{origin:n}))}catch{i.devTools&&i.devTools.send(c,i.state),i.machine.strict&&i.stop()}}});var a=(r={id:n,send:function(){},subscribe:function(l,c,f){var d=Wi(l,c,f),p=!1;return e.then(function(v){p||(d.next(v),!p&&d.complete())},function(v){p||d.error(v)}),{unsubscribe:function(){return p=!0}}},stop:function(){o=!0},toJSON:function(){return{id:n}},getSnapshot:function(){return s}},r[fn]=function(){return this},r);return this.children.set(n,a),a},t.prototype.spawnCallback=function(e,n){var r,i=this,o=!1,s=new Set,a=new Set,l,c=function(p){l=p,a.forEach(function(v){return v(p)}),!o&&i.send(it(p,{origin:n}))},f;try{f=e(c,function(p){s.add(p)})}catch(p){this.send(Dr(n,p))}if(Al(f))return this.spawnPromise(f,n);var d=(r={id:n,send:function(p){return s.forEach(function(v){return v(p)})},subscribe:function(p){var v=Wi(p);return a.add(v.next),{unsubscribe:function(){a.delete(v.next)}}},stop:function(){o=!0,_e(f)&&f()},toJSON:function(){return{id:n}},getSnapshot:function(){return l}},r[fn]=function(){return this},r);return this.children.set(n,d),d},t.prototype.spawnObservable=function(e,n){var r,i=this,o,s=e.subscribe(function(l){o=l,i.send(it(l,{origin:n}))},function(l){i.removeChild(n),i.send(it(Dr(n,l),{origin:n}))},function(){i.removeChild(n),i.send(it(Zi(n),{origin:n}))}),a=(r={id:n,send:function(){},subscribe:function(l,c,f){return e.subscribe(l,c,f)},stop:function(){return s.unsubscribe()},getSnapshot:function(){return o},toJSON:function(){return{id:n}}},r[fn]=function(){return this},r);return this.children.set(n,a),a},t.prototype.spawnActor=function(e,n){return this.children.set(n,e),e},t.prototype.spawnActivity=function(e){var n=this.machine.options&&this.machine.options.activities?this.machine.options.activities[e.type]:void 0;if(n){var r=n(this.state.context,e);this.spawnEffect(e.id,r)}},t.prototype.spawnEffect=function(e,n){var r;this.children.set(e,(r={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:n||void 0,getSnapshot:function(){},toJSON:function(){return{id:e}}},r[fn]=function(){return this},r))},t.prototype.attachDev=function(){var e=fa();if(this.options.devTools&&e){if(e.__REDUX_DEVTOOLS_EXTENSION__){var n=typeof this.options.devTools=="object"?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(G(G({name:this.id,autoPause:!0,stateSanitizer:function(r){return{value:r.value,context:r.context,actions:r.actions}}},n),{features:G({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}cm(this)}},t.prototype.toJSON=function(){return{id:this.id}},t.prototype[fn]=function(){return this},t.prototype.getSnapshot=function(){return this.status===Qe.NotStarted?this.initialState:this._state},t.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(e,n){return setTimeout(e,n)},clearTimeout:function(e){return clearTimeout(e)}},logger:console.log.bind(console),devTools:!1},t.interpret=Ku,t}();function Ku(t,e){var n=new dm(t,e);return n}function pm(t){if(typeof t=="string"){var e={type:t};return e.toString=function(){return t},e}return t}function Li(t){return G(G({type:Ms},t),{toJSON:function(){t.onDone,t.onError;var e=sa(t,["onDone","onError"]);return G(G({},e),{type:Ms,src:pm(t.src)})}})}var Ei="",Ds="#",Qo="*",$n={},Hn=function(t){return t[0]===Ds},hm=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},gm=function(){function t(e,n,r,i){r===void 0&&(r="context"in e?e.context:void 0);var o=this,s;this.config=e,this._context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign(hm(),n),this.parent=i==null?void 0:i.parent,this.key=this.config.key||(i==null?void 0:i.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:ju),this.id=this.config.id||Ue([this.machine.key],Ce(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:(s=this.config.schema)!==null&&s!==void 0?s:{},this.description=this.config.description,this.initial=this.config.initial,this.states=this.config.states?Ar(this.config.states,function(c,f){var d,p=new t(c,{},void 0,{parent:o,key:f});return Object.assign(o.idMap,G((d={},d[p.id]=p,d),p.idMap)),p}):$n;var a=0;function l(c){var f,d;c.order=a++;try{for(var p=we(Gu(c)),v=p.next();!v.done;v=p.next()){var g=v.value;l(g)}}catch(h){f={error:h}}finally{try{v&&!v.done&&(d=p.return)&&d.call(p)}finally{if(f)throw f.error}}}l(this),this.history=this.config.history===!0?"shallow":this.config.history||!1,this._transient=!!this.config.always||(this.config.on?Array.isArray(this.config.on)?this.config.on.some(function(c){var f=c.event;return f===Ei}):Ei in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=Mt(this.config.entry||this.config.onEntry).map(function(c){return ti(c)}),this.onExit=Mt(this.config.exit||this.config.onExit).map(function(c){return ti(c)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=Mt(this.config.invoke).map(function(c,f){var d,p;if(sr(c)){var v=wi(o.id,f);return o.machine.options.services=G((d={},d[v]=c,d),o.machine.options.services),Li({src:v,id:v})}else if(Re(c.src)){var v=c.id||wi(o.id,f);return Li(G(G({},c),{id:v,src:c.src}))}else if(sr(c.src)||_e(c.src)){var v=c.id||wi(o.id,f);return o.machine.options.services=G((p={},p[v]=c.src,p),o.machine.options.services),Li(G(G({id:v},c),{src:v}))}else{var g=c.src;return Li(G(G({id:wi(o.id,f)},c),{src:g}))}}),this.activities=Mt(this.config.activities).concat(this.invoke).map(function(c){return ua(c)}),this.transition=this.transition.bind(this),this.tags=Mt(this.config.tags)}return t.prototype._init=function(){this.__cache.transitions||Wu(this).forEach(function(e){return e.on})},t.prototype.withConfig=function(e,n){var r=this.options,i=r.actions,o=r.activities,s=r.guards,a=r.services,l=r.delays;return new t(this.config,{actions:G(G({},i),e.actions),activities:G(G({},o),e.activities),guards:G(G({},s),e.guards),services:G(G({},a),e.services),delays:G(G({},l),e.delays)},n??this.context)},t.prototype.withContext=function(e){return new t(this.config,this.options,e)},Object.defineProperty(t.prototype,"context",{get:function(){return _e(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:Ar(this.states,function(e){return e.definition}),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return this.definition},Object.defineProperty(t.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var e=this.transitions;return this.__cache.on=e.reduce(function(n,r){return n[r.eventType]=n[r.eventType]||[],n[r.eventType].push(r),n},{})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),t.prototype.getCandidates=function(e){if(this.__cache.candidates[e])return this.__cache.candidates[e];var n=e===Ei,r=this.transitions.filter(function(i){var o=i.eventType===e;return n?o:o||i.eventType===Qo});return this.__cache.candidates[e]=r,r},t.prototype.getDelayedTransitions=function(){var e=this,n=this.config.after;if(!n)return[];var r=function(o,s){var a=_e(o)?"".concat(e.id,":delay[").concat(s,"]"):o,l=Kv(a,e.id);return e.onEntry.push(Fv(l,{delay:o})),e.onExit.push(Hv(l)),l},i=fr(n)?n.map(function(o,s){var a=r(o.delay,s);return G(G({},o),{event:a})}):He(Object.keys(n).map(function(o,s){var a=n[o],l=Re(a)?{target:a}:a,c=isNaN(+o)?o:+o,f=r(c,s);return Mt(l).map(function(d){return G(G({},d),{event:f,delay:c})})}));return i.map(function(o){var s=o.delay;return G(G({},e.formatTransition(o)),{delay:s})})},t.prototype.getStateNodes=function(e){var n,r=this;if(!e)return[];var i=e instanceof St?e.value:Ur(e,this.delimiter);if(Re(i)){var o=this.getStateNode(i).initial;return o!==void 0?this.getStateNodes((n={},n[i]=o,n)):[this,this.states[i]]}var s=Object.keys(i),a=[this];return a.push.apply(a,Ue([],Ce(He(s.map(function(l){return r.getStateNode(l).getStateNodes(i[l])}))),!1)),a},t.prototype.handles=function(e){var n=Nu(e);return this.events.includes(n)},t.prototype.resolveState=function(e){var n=e instanceof St?e:St.create(e),r=Array.from(Ir([],this.getStateNodes(n.value)));return new St(G(G({},n),{value:this.resolve(n.value),configuration:r,done:qi(r,this),tags:jl(r),machine:this.machine}))},t.prototype.transitionLeafNode=function(e,n,r){var i=this.getStateNode(e),o=i.next(n,r);return!o||!o.transitions.length?this.next(n,r):o},t.prototype.transitionCompoundNode=function(e,n,r){var i=Object.keys(e),o=this.getStateNode(i[0]),s=o._transition(e[i[0]],n,r);return!s||!s.transitions.length?this.next(n,r):s},t.prototype.transitionParallelNode=function(e,n,r){var i,o,s={};try{for(var a=we(Object.keys(e)),l=a.next();!l.done;l=a.next()){var c=l.value,f=e[c];if(f){var d=this.getStateNode(c),p=d._transition(f,n,r);p&&(s[c]=p)}}}catch(L){i={error:L}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}var v=Object.keys(s).map(function(L){return s[L]}),g=He(v.map(function(L){return L.transitions})),h=v.some(function(L){return L.transitions.length>0});if(!h)return this.next(n,r);var S=He(Object.keys(s).map(function(L){return s[L].configuration}));return{transitions:g,exitSet:He(v.map(function(L){return L.exitSet})),configuration:S,source:n,actions:He(Object.keys(s).map(function(L){return s[L].actions}))}},t.prototype._transition=function(e,n,r){return Re(e)?this.transitionLeafNode(e,n,r):Object.keys(e).length===1?this.transitionCompoundNode(e,n,r):this.transitionParallelNode(e,n,r)},t.prototype.getTransitionData=function(e,n){return this._transition(e.value,e,it(n))},t.prototype.next=function(e,n){var r,i,o=this,s=n.name,a=[],l=[],c;try{for(var f=we(this.getCandidates(s)),d=f.next();!d.done;d=f.next()){var p=d.value,v=p.cond,g=p.in,h=e.context,S=g?Re(g)&&Hn(g)?e.matches(Ur(this.getStateNodeById(g).path,this.delimiter)):ca(Ur(g,this.delimiter),Pv(this.path.slice(0,-2))(e.value)):!0,L=!1;try{L=!v||Fu(this.machine,v,h,n,e)}catch(x){throw new Error("Unable to evaluate guard '".concat(v.name||v.type,"' in transition for event '").concat(s,"' in state node '").concat(this.id,`':
|
|
88
|
-
`).concat(x.message))}if(L&&S){p.target!==void 0&&(l=p.target),a.push.apply(a,Ue([],Ce(p.actions),!1)),c=p;break}}}catch(x){r={error:x}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}if(c){if(!l.length)return{transitions:[c],exitSet:[],configuration:e.value?[this]:[],source:e,actions:a};var b=He(l.map(function(x){return o.getRelativeStateNodes(x,e.historyValue)})),y=!!c.internal;return{transitions:[c],exitSet:y?[]:He(l.map(function(x){return o.getPotentiallyReenteringNodes(x)})),configuration:b,source:e,actions:a}}},t.prototype.getPotentiallyReenteringNodes=function(e){if(this.order<e.order)return[this];for(var n=[],r=this,i=e;r&&r!==i;)n.push(r),r=r.parent;return r!==i?[]:(n.push(i),n)},t.prototype.getActions=function(e,n,r,i,o,s,a){var l,c,f,d,p=this,v=s?Ir([],this.getStateNodes(s.value)):[],g=new Set;try{for(var h=we(Array.from(e).sort(function(O,k){return O.order-k.order})),S=h.next();!S.done;S=h.next()){var L=S.value;(!jr(v,L)||jr(r.exitSet,L)||L.parent&&g.has(L.parent))&&g.add(L)}}catch(O){l={error:O}}finally{try{S&&!S.done&&(c=h.return)&&c.call(h)}finally{if(l)throw l.error}}try{for(var b=we(v),y=b.next();!y.done;y=b.next()){var L=y.value;(!jr(e,L)||jr(r.exitSet,L.parent))&&r.exitSet.push(L)}}catch(O){f={error:O}}finally{try{y&&!y.done&&(d=b.return)&&d.call(b)}finally{if(f)throw f.error}}r.exitSet.sort(function(O,k){return k.order-O.order});var x=Array.from(g).sort(function(O,k){return O.order-k.order}),E=new Set(r.exitSet),m=He(x.map(function(O){var k=[];if(O.type!=="final")return k;var I=O.parent;if(!I.parent)return k;k.push(Si(O.id,O.doneData),Si(I.id,O.doneData?po(O.doneData,i,o):void 0));var B=I.parent;return B.type==="parallel"&&ni(B).every(function(H){return qi(r.configuration,H)})&&k.push(Si(B.id)),k})),w=x.map(function(O){var k=O.onEntry,I=O.activities.map(function(B){return Gv(B)});return{type:"entry",actions:dn(a?Ue(Ue([],Ce(k),!1),Ce(I),!1):Ue(Ue([],Ce(I),!1),Ce(k),!1),p.machine.options.actions)}}).concat({type:"state_done",actions:m.map(function(O){return Uv(O)})}),_=Array.from(E).map(function(O){return{type:"exit",actions:dn(Ue(Ue([],Ce(O.onExit),!1),Ce(O.activities.map(function(k){return Wv(k)})),!1),p.machine.options.actions)}}),P=_.concat({type:"transition",actions:dn(r.actions,this.machine.options.actions)}).concat(w);if(n){var M=dn(He(Ue([],Ce(e),!1).sort(function(O,k){return k.order-O.order}).map(function(O){return O.onExit})),this.machine.options.actions).filter(function(O){return!Rs(O)});return P.concat({type:"stop",actions:M})}return P},t.prototype.transition=function(e,n,r,i){e===void 0&&(e=this.initialState);var o=it(n),s;if(e instanceof St)s=r===void 0?e:this.resolveState(St.from(e,r));else{var a=Re(e)?this.resolve(fo(this.getResolvedPath(e))):this.resolve(e),l=r??this.machine.context;s=this.resolveState(St.from(a,l))}if(this.strict&&!this.events.includes(o.name)&&!Rv(o.name))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(o.name,"'"));var c=this._transition(s.value,s,o)||{transitions:[],configuration:[],exitSet:[],source:s,actions:[]},f=Ir([],this.getStateNodes(s.value)),d=c.configuration.length?Ir(f,c.configuration):f;return c.configuration=Ue([],Ce(d),!1),this.resolveTransition(c,s,s.context,i,o)},t.prototype.resolveRaisedTransition=function(e,n,r,i){var o,s=e.actions;return e=this.transition(e,n,void 0,i),e._event=r,e.event=r.data,(o=e.actions).unshift.apply(o,Ue([],Ce(s),!1)),e},t.prototype.resolveTransition=function(e,n,r,i,o){var s,a,l,c,f=this;o===void 0&&(o=Qn);var d=e.configuration,p=!n||e.transitions.length>0,v=p?e.configuration:n?n.configuration:[],g=qi(v,this),h=p?tm(this.machine,d):void 0,S=n?n.historyValue?n.historyValue:e.source?this.machine.historyValue(n.value):void 0:void 0,L=this.getActions(new Set(v),g,e,r,o,n,i),b=n?G({},n.activities):{};try{for(var y=we(L),x=y.next();!x.done;x=y.next()){var E=x.value;try{for(var m=(l=void 0,we(E.actions)),w=m.next();!w.done;w=m.next()){var _=w.value;_.type===Os?b[_.activity.id||_.activity.type]=_:_.type===aa&&(b[_.activity.id||_.activity.type]=!1)}}catch($){l={error:$}}finally{try{w&&!w.done&&(c=m.return)&&c.call(m)}finally{if(l)throw l.error}}}}catch($){s={error:$}}finally{try{x&&!x.done&&(a=y.return)&&a.call(y)}finally{if(s)throw s.error}}var P=Ce(ho(this,n,r,o,L,i,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),M=P[0],O=P[1],k=Ce(Av(M,Rs),2),I=k[0],B=k[1],H=M.filter(function($){var Q;return $.type===Os&&((Q=$.activity)===null||Q===void 0?void 0:Q.type)===Ms}),Z=H.reduce(function($,Q){return $[Q.activity.id]=Jv(Q.activity,f.machine,O,o),$},n?G({},n.children):{}),F=new St({value:h||n.value,context:O,_event:o,_sessionid:n?n._sessionid:null,historyValue:h?S?Dv(S,h):void 0:n?n.historyValue:void 0,history:!h||e.source?n:void 0,actions:h?B:[],activities:h?b:n?n.activities:{},events:[],configuration:v,transitions:e.transitions,children:Z,done:g,tags:jl(v),machine:this}),K=r!==O;F.changed=o.name===Iu||K;var A=F.history;A&&delete A.history;var R=!g&&(this._transient||d.some(function($){return $._transient}));if(!p&&(!R||o.name===Ei))return F;var T=F;if(!g)for(R&&(T=this.resolveRaisedTransition(T,{type:Lv},o,i));I.length;){var V=I.shift();T=this.resolveRaisedTransition(T,V._event,o,i)}var z=T.changed||(A?!!T.actions.length||K||typeof A.value!=typeof T.value||!qu(T.value,A.value):void 0);return T.changed=z,T.history=A,T},t.prototype.getStateNode=function(e){if(Hn(e))return this.machine.getStateNodeById(e);if(!this.states)throw new Error("Unable to retrieve child state '".concat(e,"' from '").concat(this.id,"'; no child states exist."));var n=this.states[e];if(!n)throw new Error("Child state '".concat(e,"' does not exist on '").concat(this.id,"'"));return n},t.prototype.getStateNodeById=function(e){var n=Hn(e)?e.slice(Ds.length):e;if(n===this.id)return this;var r=this.machine.idMap[n];if(!r)throw new Error("Child state node '#".concat(n,"' does not exist on machine '").concat(this.id,"'"));return r},t.prototype.getStateNodeByPath=function(e){if(typeof e=="string"&&Hn(e))try{return this.getStateNodeById(e.slice(1))}catch{}for(var n=ks(e,this.delimiter).slice(),r=this;n.length;){var i=n.shift();if(!i.length)break;r=r.getStateNode(i)}return r},t.prototype.resolve=function(e){var n,r=this;if(!e)return this.initialStateValue||$n;switch(this.type){case"parallel":return Ar(this.initialStateValue,function(o,s){return o?r.getStateNode(s).resolve(e[s]||o):$n});case"compound":if(Re(e)){var i=this.getStateNode(e);return i.type==="parallel"||i.type==="compound"?(n={},n[e]=i.initialStateValue,n):e}return Object.keys(e).length?Ar(e,function(o,s){return o?r.getStateNode(s).resolve(o):$n}):this.initialStateValue||{};default:return e||$n}},t.prototype.getResolvedPath=function(e){if(Hn(e)){var n=this.machine.idMap[e.slice(Ds.length)];if(!n)throw new Error("Unable to find state node '".concat(e,"'"));return n.path}return ks(e,this.delimiter)},Object.defineProperty(t.prototype,"initialStateValue",{get:function(){var e;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;var n;if(this.type==="parallel")n=Tl(this.states,function(r){return r.initialStateValue||$n},function(r){return r.type!=="history"});else if(this.initial!==void 0){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));n=go(this.states[this.initial])?this.initial:(e={},e[this.initial]=this.states[this.initial].initialStateValue,e)}else n={};return this.__cache.initialStateValue=n,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),t.prototype.getInitialState=function(e,n){this._init();var r=this.getStateNodes(e);return this.resolveTransition({configuration:r,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,n??this.machine.context,void 0)},Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this.initialStateValue;if(!e)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"target",{get:function(){var e;if(this.type==="history"){var n=this.config;Re(n.target)?e=Hn(n.target)?fo(this.machine.getStateNodeById(n.target).path.slice(this.path.length-1)):n.target:e=n.target}return e},enumerable:!1,configurable:!0}),t.prototype.getRelativeStateNodes=function(e,n,r){return r===void 0&&(r=!0),r?e.type==="history"?e.resolveHistory(n):e.initialStateNodes:[e]},Object.defineProperty(t.prototype,"initialStateNodes",{get:function(){var e=this;if(go(this))return[this];if(this.type==="compound"&&!this.initial)return[this];var n=Gi(this.initialStateValue);return He(n.map(function(r){return e.getFromRelativePath(r)}))},enumerable:!1,configurable:!0}),t.prototype.getFromRelativePath=function(e){if(!e.length)return[this];var n=Ce(e),r=n[0],i=n.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(r,"' from node with no states"));var o=this.getStateNode(r);if(o.type==="history")return o.resolveHistory();if(!this.states[r])throw new Error("Child state '".concat(r,"' does not exist on '").concat(this.id,"'"));return this.states[r].getFromRelativePath(i)},t.prototype.historyValue=function(e){if(Object.keys(this.states).length)return{current:e||this.initialStateValue,states:Tl(this.states,function(n,r){if(!e)return n.historyValue();var i=Re(e)?void 0:e[r];return n.historyValue(i||n.initialStateValue)},function(n){return!n.history})}},t.prototype.resolveHistory=function(e){var n=this;if(this.type!=="history")return[this];var r=this.parent;if(!e){var i=this.target;return i?He(Gi(i).map(function(s){return r.getFromRelativePath(s)})):r.initialStateNodes}var o=kv(r.path,"states")(e).current;return Re(o)?[r.getStateNode(o)]:He(Gi(o).map(function(s){return n.history==="deep"?r.getFromRelativePath(s):[r.states[s[0]]]}))},Object.defineProperty(t.prototype,"stateIds",{get:function(){var e=this,n=He(Object.keys(this.states).map(function(r){return e.states[r].stateIds}));return[this.id].concat(n)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"events",{get:function(){var e,n,r,i;if(this.__cache.events)return this.__cache.events;var o=this.states,s=new Set(this.ownEvents);if(o)try{for(var a=we(Object.keys(o)),l=a.next();!l.done;l=a.next()){var c=l.value,f=o[c];if(f.states)try{for(var d=(r=void 0,we(f.events)),p=d.next();!p.done;p=d.next()){var v=p.value;s.add("".concat(v))}}catch(g){r={error:g}}finally{try{p&&!p.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}}}catch(g){e={error:g}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return this.__cache.events=Array.from(s)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ownEvents",{get:function(){var e=new Set(this.transitions.filter(function(n){return!(!n.target&&!n.actions.length&&n.internal)}).map(function(n){return n.eventType}));return Array.from(e)},enumerable:!1,configurable:!0}),t.prototype.resolveTarget=function(e){var n=this;if(e!==void 0)return e.map(function(r){if(!Re(r))return r;var i=r[0]===n.delimiter;if(i&&!n.parent)return n.getStateNodeByPath(r.slice(1));var o=i?n.key+r:r;if(n.parent)try{var s=n.parent.getStateNodeByPath(o);return s}catch(a){throw new Error("Invalid transition definition for state node '".concat(n.id,`':
|
|
89
|
-
`).concat(a.message))}else return n.getStateNodeByPath(o)})},t.prototype.formatTransition=function(e){var n=this,r=Bv(e.target),i="internal"in e?e.internal:r?r.some(function(l){return Re(l)&&l[0]===n.delimiter}):!0,o=this.machine.options.guards,s=this.resolveTarget(r),a=G(G({},e),{actions:dn(Mt(e.actions)),cond:Vu(e.cond,o),target:s,source:this,internal:i,eventType:e.event,toJSON:function(){return G(G({},a),{target:a.target?a.target.map(function(l){return"#".concat(l.id)}):void 0,source:"#".concat(n.id)})}});return a},t.prototype.formatTransitions=function(){var e,n,r=this,i;if(!this.config.on)i=[];else if(Array.isArray(this.config.on))i=this.config.on;else{var o=this.config.on,s=Qo,a=o[s],l=a===void 0?[]:a,c=sa(o,[typeof s=="symbol"?s:s+""]);i=He(Object.keys(c).map(function(b){var y=zn(b,c[b]);return y}).concat(zn(Qo,l)))}var f=this.config.always?zn("",this.config.always):[],d=this.config.onDone?zn(String(Si(this.id)),this.config.onDone):[],p=He(this.invoke.map(function(b){var y=[];return b.onDone&&y.push.apply(y,Ue([],Ce(zn(String(Zi(b.id)),b.onDone)),!1)),b.onError&&y.push.apply(y,Ue([],Ce(zn(String(Dr(b.id)),b.onError)),!1)),y})),v=this.after,g=He(Ue(Ue(Ue(Ue([],Ce(d),!1),Ce(p),!1),Ce(i),!1),Ce(f),!1).map(function(b){return Mt(b).map(function(y){return r.formatTransition(y)})}));try{for(var h=we(v),S=h.next();!S.done;S=h.next()){var L=S.value;g.push(L)}}catch(b){e={error:b}}finally{try{S&&!S.done&&(n=h.return)&&n.call(h)}finally{if(e)throw e.error}}return g},t}();function vm(t,e,n){return n===void 0&&(n=t.context),new gm(t,e,n)}var mm=qv,Is;(function(t){t[t.Effect=1]="Effect",t[t.LayoutEffect=2]="LayoutEffect"})(Is||(Is={}));var Vr=u.useLayoutEffect;function Bl(t){var e=de.useRef();return e.current||(e.current={v:t()}),e.current.v}var ym=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},bm=globalThis&&globalThis.__values||function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function wm(t,e){var n,r,i=ym([[],[]],2),o=i[0],s=i[1];try{for(var a=bm(t),l=a.next();!l.done;l=a.next()){var c=l.value;e(c)?o.push(c):s.push(c)}}catch(f){n={error:f}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[o,s]}var Cr=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Ul=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))};function Vl(t,e){var n=t.exec,r=n(e.context,e._event.data,{action:t,state:e,_event:e._event});r()}function Sm(t){var e=u.useRef([]),n=u.useRef([]);Vr(function(){var r=t.subscribe(function(i){var o,s;if(i.actions.length){var a=i.actions.filter(function(d){return typeof d.exec=="function"&&"__effect"in d.exec}),l=Cr(wm(a,function(d){return d.exec.__effect===Is.Effect}),2),c=l[0],f=l[1];(o=e.current).push.apply(o,Ul([],Cr(c.map(function(d){return[d,i]})),!1)),(s=n.current).push.apply(s,Ul([],Cr(f.map(function(d){return[d,i]})),!1))}});return function(){r.unsubscribe()}},[]),Vr(function(){for(;n.current.length;){var r=Cr(n.current.shift(),2),i=r[0],o=r[1];Vl(i,o)}}),u.useEffect(function(){for(;e.current.length;){var r=Cr(e.current.shift(),2),i=r[0],o=r[1];Vl(i,o)}})}var Fr=globalThis&&globalThis.__assign||function(){return Fr=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Fr.apply(this,arguments)},Lm=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};globalThis&&globalThis.__read;function Em(t,e,n){if(typeof t=="object")return t;var r=function(){};return{next:t,error:e||r,complete:n||r}}function xm(t,e,n){e===void 0&&(e={});var r=Bl(function(){return typeof t=="function"?t():t}),i=e.context,o=e.guards,s=e.actions,a=e.activities,l=e.services,c=e.delays,f=e.state,d=Lm(e,["context","guards","actions","activities","services","delays","state"]),p=Bl(function(){var v={context:i,guards:o,actions:s,activities:a,services:l,delays:c},g=r.withConfig(v,function(){return Fr(Fr({},r.context),i)});return Ku(g,Fr({deferEvents:!0},d))});return Vr(function(){var v;return n&&(v=p.subscribe(Em(n))),function(){v==null||v.unsubscribe()}},[n]),Vr(function(){return p.start(f?St.create(f):void 0),function(){p.stop()}},[]),Vr(function(){Object.assign(p.machine.options.actions,s),Object.assign(p.machine.options.guards,o),Object.assign(p.machine.options.activities,a),Object.assign(p.machine.options.services,l),Object.assign(p.machine.options.delays,c)},[s,o,a,l,c]),Sm(p),p}var Cm=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};globalThis&&globalThis.__spreadArray;function _m(t,e){e===void 0&&(e={});var n=u.useCallback(function(a){var l=a.changed===void 0&&Object.keys(a.children).length;(a.changed||l)&&s(a)},[]),r=xm(t,e,n),i=Cm(u.useState(function(){var a=r.machine.initialState;return e.state?St.create(e.state):a}),2),o=i[0],s=i[1];return[o,r.send,r]}function Ge(){return Ge=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ge.apply(this,arguments)}function er(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}const ge={arr:Array.isArray,obj:t=>Object.prototype.toString.call(t)==="[object Object]",fun:t=>typeof t=="function",str:t=>typeof t=="string",num:t=>typeof t=="number",und:t=>t===void 0,nul:t=>t===null,set:t=>t instanceof Set,map:t=>t instanceof Map,equ(t,e){if(typeof t!=typeof e)return!1;if(ge.str(t)||ge.num(t))return t===e;if(ge.obj(t)&&ge.obj(e)&&Object.keys(t).length+Object.keys(e).length===0)return!0;let n;for(n in t)if(!(n in e))return!1;for(n in e)if(t[n]!==e[n])return!1;return ge.und(n)?t===e:!0}};function Om(t,e){return e===void 0&&(e=!0),n=>(ge.arr(n)?n:Object.keys(n)).reduce((r,i)=>{const o=e?i[0].toLowerCase()+i.substring(1):i;return r[o]=t(o),r},t)}function Mm(){const t=u.useState(!1),e=t[1];return u.useCallback(()=>e(r=>!r),[])}function _n(t,e){return ge.und(t)||ge.nul(t)?e:t}function xi(t){return ge.und(t)?[]:ge.arr(t)?t:[t]}function Xn(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return ge.fun(t)?t(...n):t}function Pm(t){return t.to,t.from,t.config,t.onStart,t.onRest,t.onFrame,t.children,t.reset,t.reverse,t.force,t.immediate,t.delay,t.attach,t.destroyed,t.interpolateTo,t.ref,t.lazy,er(t,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}function es(t){const e=Pm(t);if(ge.und(e))return Ge({to:e},t);const n=Object.keys(t).reduce((r,i)=>ge.und(e[i])?Ge({},r,{[i]:t[i]}):r,{});return Ge({to:e},n)}function km(t,e){return e&&(ge.fun(e)?e(t):ge.obj(e)&&(e.current=t)),t}class Rt{constructor(){this.payload=void 0,this.children=[]}getAnimatedValue(){return this.getValue()}getPayload(){return this.payload||this}attach(){}detach(){}getChildren(){return this.children}addChild(e){this.children.length===0&&this.attach(),this.children.push(e)}removeChild(e){const n=this.children.indexOf(e);this.children.splice(n,1),this.children.length===0&&this.detach()}}class js extends Rt{constructor(){super(...arguments),this.payload=[],this.attach=()=>this.payload.forEach(e=>e instanceof Rt&&e.addChild(this)),this.detach=()=>this.payload.forEach(e=>e instanceof Rt&&e.removeChild(this))}}class Yu extends Rt{constructor(){super(...arguments),this.payload={},this.attach=()=>Object.values(this.payload).forEach(e=>e instanceof Rt&&e.addChild(this)),this.detach=()=>Object.values(this.payload).forEach(e=>e instanceof Rt&&e.removeChild(this))}getValue(e){e===void 0&&(e=!1);const n={};for(const r in this.payload){const i=this.payload[r];e&&!(i instanceof Rt)||(n[r]=i instanceof Rt?i[e?"getAnimatedValue":"getValue"]():i)}return n}getAnimatedValue(){return this.getValue(!0)}}let da;function Rm(t,e){da={fn:t,transform:e}}let Ju;function Tm(t){Ju=t}let Xu=t=>typeof window<"u"?window.requestAnimationFrame(t):-1,vo;function Am(t){vo=t}let Qu=()=>Date.now(),Dm=t=>t.current,ef;function Im(t){ef=t}class jm extends Yu{constructor(e,n){super(),this.update=void 0,this.payload=e.style?Ge({},e,{style:ef(e.style)}):e,this.update=n,this.attach()}}const Nm=t=>ge.fun(t)&&!(t.prototype instanceof u.Component),Bm=t=>u.forwardRef((n,r)=>{const i=Mm(),o=u.useRef(!0),s=u.useRef(null),a=u.useRef(null),l=u.useCallback(p=>{const v=s.current,g=()=>{let h=!1;a.current&&(h=da.fn(a.current,s.current.getAnimatedValue())),(!a.current||h===!1)&&i()};s.current=new jm(p,g),v&&v.detach()},[]);u.useEffect(()=>()=>{o.current=!1,s.current&&s.current.detach()},[]),u.useImperativeHandle(r,()=>Dm(a)),l(n);const c=s.current.getValue();c.scrollTop,c.scrollLeft;const f=er(c,["scrollTop","scrollLeft"]),d=Nm(t)?void 0:p=>a.current=km(p,r);return u.createElement(t,Ge({},f,{ref:d}))});let zr=!1;const Tn=new Set,tf=()=>{if(!zr)return!1;let t=Qu();for(let e of Tn){let n=!1;for(let r=0;r<e.configs.length;r++){let i=e.configs[r],o,s;for(let a=0;a<i.animatedValues.length;a++){let l=i.animatedValues[a];if(l.done)continue;let c=i.fromValues[a],f=i.toValues[a],d=l.lastPosition,p=f instanceof Rt,v=Array.isArray(i.initialVelocity)?i.initialVelocity[a]:i.initialVelocity;if(p&&(f=f.getValue()),i.immediate){l.setValue(f),l.done=!0;continue}if(typeof c=="string"||typeof f=="string"){l.setValue(f),l.done=!0;continue}if(i.duration!==void 0)d=c+i.easing((t-l.startTime)/i.duration)*(f-c),o=t>=l.startTime+i.duration;else if(i.decay)d=c+v/(1-.998)*(1-Math.exp(-(1-.998)*(t-l.startTime))),o=Math.abs(l.lastPosition-d)<.1,o&&(f=d);else{s=l.lastTime!==void 0?l.lastTime:t,v=l.lastVelocity!==void 0?l.lastVelocity:i.initialVelocity,t>s+64&&(s=t);let g=Math.floor(t-s);for(let b=0;b<g;++b){let y=-i.tension*(d-f),x=-i.friction*v,E=(y+x)/i.mass;v=v+E*1/1e3,d=d+v*1/1e3}let h=i.clamp&&i.tension!==0?c<f?d>f:d<f:!1,S=Math.abs(v)<=i.precision,L=i.tension!==0?Math.abs(f-d)<=i.precision:!0;o=h||S&&L,l.lastVelocity=v,l.lastTime=t}p&&!i.toValues[a].done&&(o=!1),o?(l.value!==f&&(d=f),l.done=!0):n=!0,l.setValue(d),l.lastPosition=d}e.props.onFrame&&(e.values[i.name]=i.interpolation.getValue())}e.props.onFrame&&e.props.onFrame(e.values),n||(Tn.delete(e),e.stop(!0))}return Tn.size?Xu(tf):zr=!1,zr},Um=t=>{Tn.has(t)||Tn.add(t),zr||(zr=!0,Xu(tf))},Vm=t=>{Tn.has(t)&&Tn.delete(t)};function mo(t,e,n){if(typeof t=="function")return t;if(Array.isArray(t))return mo({range:t,output:e,extrapolate:n});if(vo&&typeof t.output[0]=="string")return vo(t);const r=t,i=r.output,o=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||(c=>c);return c=>{const f=zm(c,o);return Fm(c,o[f],o[f+1],i[f],i[f+1],l,s,a,r.map)}}function Fm(t,e,n,r,i,o,s,a,l){let c=l?l(t):t;if(c<e){if(s==="identity")return c;s==="clamp"&&(c=e)}if(c>n){if(a==="identity")return c;a==="clamp"&&(c=n)}return r===i?r:e===n?t<=e?r:i:(e===-1/0?c=-c:n===1/0?c=c-e:c=(c-e)/(n-e),c=o(c),r===-1/0?c=-c:i===1/0?c=c+r:c=c*(i-r)+r,c)}function zm(t,e){for(var n=1;n<e.length-1&&!(e[n]>=t);++n);return n-1}class ar extends js{constructor(e,n,r,i){super(),this.calc=void 0,this.payload=e instanceof js&&!(e instanceof ar)?e.getPayload():Array.isArray(e)?e:[e],this.calc=mo(n,r,i)}getValue(){return this.calc(...this.payload.map(e=>e.getValue()))}updateConfig(e,n,r){this.calc=mo(e,n,r)}interpolate(e,n,r){return new ar(this,e,n,r)}}const Gn=(t,e,n)=>t&&new ar(t,e,n),$m={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}};function nf(t,e){"update"in t?e.add(t):t.getChildren().forEach(n=>nf(n,e))}class Ns extends Rt{constructor(e){var n;super(),n=this,this.animatedStyles=new Set,this.value=void 0,this.startPosition=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.startTime=void 0,this.lastTime=void 0,this.done=!1,this.setValue=function(r,i){i===void 0&&(i=!0),n.value=r,i&&n.flush()},this.value=e,this.startPosition=e,this.lastPosition=e}flush(){this.animatedStyles.size===0&&nf(this,this.animatedStyles),this.animatedStyles.forEach(e=>e.update())}clearStyles(){this.animatedStyles.clear()}getValue(){return this.value}interpolate(e,n,r){return new ar(this,e,n,r)}}class Hm extends js{constructor(e){super(),this.payload=e.map(n=>new Ns(n))}setValue(e,n){n===void 0&&(n=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((r,i)=>this.payload[i].setValue(r,n)):this.payload.forEach(r=>r.setValue(e,n))}getValue(){return this.payload.map(e=>e.getValue())}interpolate(e,n){return new ar(this,e,n)}}let Gm=0,Wm=class{constructor(){this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=()=>this.interpolations,this.id=Gm++}update(e){if(!e)return this;const n=es(e),r=n.delay,i=r===void 0?0:r,o=n.to,s=er(n,["delay","to"]);if(ge.arr(o)||ge.fun(o))this.queue.push(Ge({},s,{delay:i,to:o}));else if(o){let a={};Object.entries(o).forEach(l=>{let c=l[0],f=l[1];const d=Ge({to:{[c]:f},delay:Xn(i,c)},s),p=a[d.delay]&&a[d.delay].to;a[d.delay]=Ge({},a[d.delay],d,{to:Ge({},p,d.to)})}),this.queue=Object.values(a)}return this.queue=this.queue.sort((a,l)=>a.delay-l.delay),this.diff(s),this}start(e){if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach(i=>{let o=i.from,s=o===void 0?{}:o,a=i.to,l=a===void 0?{}:a;ge.obj(s)&&(this.merged=Ge({},s,this.merged)),ge.obj(l)&&(this.merged=Ge({},this.merged,l))});const n=this.local=++this.guid,r=this.localQueue=this.queue;this.queue=[],r.forEach((i,o)=>{let s=i.delay,a=er(i,["delay"]);const l=f=>{o===r.length-1&&n===this.guid&&f&&(this.idle=!0,this.props.onRest&&this.props.onRest(this.merged)),e&&e()};let c=ge.arr(a.to)||ge.fun(a.to);s?setTimeout(()=>{n===this.guid&&(c?this.runAsync(a,l):this.diff(a).start(l))},s):c?this.runAsync(a,l):this.diff(a).start(l)})}else ge.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),Um(this);return this}stop(e){return this.listeners.forEach(n=>n(e)),this.listeners=[],this}pause(e){return this.stop(!0),e&&Vm(this),this}runAsync(e,n){var r=this;e.delay;let i=er(e,["delay"]);const o=this.local;let s=Promise.resolve(void 0);if(ge.arr(i.to))for(let a=0;a<i.to.length;a++){const l=a,c=Ge({},i,es(i.to[l]));ge.arr(c.config)&&(c.config=c.config[l]),s=s.then(()=>{if(o===this.guid)return new Promise(f=>this.diff(c).start(f))})}else if(ge.fun(i.to)){let a=0,l;s=s.then(()=>i.to(c=>{const f=Ge({},i,es(c));if(ge.arr(f.config)&&(f.config=f.config[a]),a++,o===this.guid)return l=new Promise(d=>this.diff(f).start(d))},function(c){return c===void 0&&(c=!0),r.stop(c)}).then(()=>l))}s.then(n)}diff(e){this.props=Ge({},this.props,e);let n=this.props,r=n.from,i=r===void 0?{}:r,o=n.to,s=o===void 0?{}:o,a=n.config,l=a===void 0?{}:a,c=n.reverse,f=n.attach,d=n.reset,p=n.immediate;if(c){var v=[s,i];i=v[0],s=v[1]}this.merged=Ge({},i,this.merged,s),this.hasChanged=!1;let g=f&&f(this);if(this.animations=Object.entries(this.merged).reduce((h,S)=>{let L=S[0],b=S[1],y=h[L]||{};const x=ge.num(b),E=ge.str(b)&&!b.startsWith("#")&&!/\d/.test(b)&&!Ju[b],m=ge.arr(b),w=!x&&!m&&!E;let _=ge.und(i[L])?b:i[L],P=x||m||E?b:1,M=Xn(l,L);g&&(P=g.animations[L].parent);let O=y.parent,k=y.interpolation,I=xi(g?P.getPayload():P),B,H=b;w&&(H=vo({range:[0,1],output:[b,b]})(1));let Z=k&&k.getValue();const K=!ge.und(O)&&y.animatedValues.some(V=>!V.done),A=!ge.equ(H,Z),R=!ge.equ(H,y.previous),T=!ge.equ(M,y.config);if(d||R&&A||T){if(x||E)O=k=y.parent||new Ns(_);else if(m)O=k=y.parent||new Hm(_);else if(w){let V=y.interpolation&&y.interpolation.calc(y.parent.value);V=V!==void 0&&!d?V:_,y.parent?(O=y.parent,O.setValue(0,!1)):O=new Ns(0);const z={output:[V,b]};y.interpolation?(k=y.interpolation,y.interpolation.updateConfig(z)):k=O.interpolate(z)}return I=xi(g?P.getPayload():P),B=xi(O.getPayload()),d&&!w&&O.setValue(_,!1),this.hasChanged=!0,B.forEach(V=>{V.startPosition=V.value,V.lastPosition=V.value,V.lastVelocity=K?V.lastVelocity:void 0,V.lastTime=K?V.lastTime:void 0,V.startTime=Qu(),V.done=!1,V.animatedStyles.clear()}),Xn(p,L)&&O.setValue(w?P:b,!1),Ge({},h,{[L]:Ge({},y,{name:L,parent:O,interpolation:k,animatedValues:B,toValues:I,previous:H,config:M,fromValues:xi(O.getValue()),immediate:Xn(p,L),initialVelocity:_n(M.velocity,0),clamp:_n(M.clamp,!1),precision:_n(M.precision,.01),tension:_n(M.tension,170),friction:_n(M.friction,26),mass:_n(M.mass,1),duration:M.duration,easing:_n(M.easing,V=>V),decay:M.decay})})}else return A?h:(w&&(O.setValue(1,!1),k.updateConfig({output:[H,H]})),O.done=!0,this.hasChanged=!0,Ge({},h,{[L]:Ge({},h[L],{previous:H})}))},this.animations),this.hasChanged){this.configs=Object.values(this.animations),this.values={},this.interpolations={};for(let h in this.animations)this.interpolations[h]=this.animations[h].interpolation,this.values[h]=this.animations[h].interpolation.getValue()}return this}destroy(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0}};const Zm=(t,e)=>{const n=u.useRef(!1),r=u.useRef(),i=ge.fun(e),o=u.useMemo(()=>{r.current&&(r.current.map(d=>d.destroy()),r.current=void 0);let f;return[new Array(t).fill().map((d,p)=>{const v=new Wm,g=i?Xn(e,p,v):e[p];return p===0&&(f=g.ref),v.update(g),f||v.start(),v}),f]},[t]),s=o[0],a=o[1];r.current=s,u.useImperativeHandle(a,()=>({start:()=>Promise.all(r.current.map(f=>new Promise(d=>f.start(d)))),stop:f=>r.current.forEach(d=>d.stop(f)),get controllers(){return r.current}}));const l=u.useMemo(()=>f=>r.current.map((d,p)=>{d.update(i?Xn(f,p,d):f[p]),a||d.start()}),[t]);u.useEffect(()=>{n.current?i||l(e):a||r.current.forEach(f=>f.start())}),u.useEffect(()=>(n.current=!0,()=>r.current.forEach(f=>f.destroy())),[]);const c=r.current.map(f=>f.getValues());return i?[c,l,f=>r.current.forEach(d=>d.pause(f))]:c},qm=t=>{const e=ge.fun(t),n=Zm(1,e?t:[t]),r=n[0],i=n[1],o=n[2];return e?[r[0],i,o]:r};class Km extends Yu{constructor(e){e===void 0&&(e={}),super(),e.transform&&!(e.transform instanceof Rt)&&(e=da.transform(e)),this.payload=e}}const yo={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Tt="[-+]?\\d*\\.?\\d+",bo=Tt+"%";function To(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}const Ym=new RegExp("rgb"+To(Tt,Tt,Tt)),Jm=new RegExp("rgba"+To(Tt,Tt,Tt,Tt)),Xm=new RegExp("hsl"+To(Tt,bo,bo)),Qm=new RegExp("hsla"+To(Tt,bo,bo,Tt)),ey=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ty=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ny=/^#([0-9a-fA-F]{6})$/,ry=/^#([0-9a-fA-F]{8})$/;function iy(t){let e;return typeof t=="number"?t>>>0===t&&t>=0&&t<=4294967295?t:null:(e=ny.exec(t))?parseInt(e[1]+"ff",16)>>>0:yo.hasOwnProperty(t)?yo[t]:(e=Ym.exec(t))?(Wn(e[1])<<24|Wn(e[2])<<16|Wn(e[3])<<8|255)>>>0:(e=Jm.exec(t))?(Wn(e[1])<<24|Wn(e[2])<<16|Wn(e[3])<<8|$l(e[4]))>>>0:(e=ey.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+"ff",16)>>>0:(e=ry.exec(t))?parseInt(e[1],16)>>>0:(e=ty.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+e[4]+e[4],16)>>>0:(e=Xm.exec(t))?(Fl(zl(e[1]),Ci(e[2]),Ci(e[3]))|255)>>>0:(e=Qm.exec(t))?(Fl(zl(e[1]),Ci(e[2]),Ci(e[3]))|$l(e[4]))>>>0:null}function ts(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Fl(t,e,n){const r=n<.5?n*(1+e):n+e-n*e,i=2*n-r,o=ts(i,r,t+1/3),s=ts(i,r,t),a=ts(i,r,t-1/3);return Math.round(o*255)<<24|Math.round(s*255)<<16|Math.round(a*255)<<8}function Wn(t){const e=parseInt(t,10);return e<0?0:e>255?255:e}function zl(t){return(parseFloat(t)%360+360)%360/360}function $l(t){const e=parseFloat(t);return e<0?0:e>1?255:Math.round(e*255)}function Ci(t){const e=parseFloat(t);return e<0?0:e>100?1:e/100}function Hl(t){let e=iy(t);if(e===null)return t;e=e||0;let n=(e&4278190080)>>>24,r=(e&16711680)>>>16,i=(e&65280)>>>8,o=(e&255)/255;return`rgba(${n}, ${r}, ${i}, ${o})`}const _i=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,oy=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,sy=new RegExp(`(${Object.keys(yo).join("|")})`,"g"),ay=t=>{const e=t.output.map(i=>i.replace(oy,Hl)).map(i=>i.replace(sy,Hl)),n=e[0].match(_i).map(()=>[]);e.forEach(i=>{i.match(_i).forEach((o,s)=>n[s].push(+o))});const r=e[0].match(_i).map((i,o)=>mo(Ge({},t,{output:n[o]})));return i=>{let o=0;return e[0].replace(_i,()=>r[o++](i)).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(s,a,l,c,f)=>`rgba(${Math.round(a)}, ${Math.round(l)}, ${Math.round(c)}, ${f})`)}};let $r={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};const ly=(t,e)=>t+e.charAt(0).toUpperCase()+e.substring(1),cy=["Webkit","Ms","Moz","O"];$r=Object.keys($r).reduce((t,e)=>(cy.forEach(n=>t[ly(n,e)]=t[e]),t),$r);function uy(t,e,n){return e==null||typeof e=="boolean"||e===""?"":!n&&typeof e=="number"&&e!==0&&!($r.hasOwnProperty(t)&&$r[t])?e+"px":(""+e).trim()}const Gl={};Im(t=>new Km(t));Am(ay);Tm(yo);Rm((t,e)=>{if(t.nodeType&&t.setAttribute!==void 0){const i=e.style,o=e.children,s=e.scrollTop,a=e.scrollLeft,l=er(e,["style","children","scrollTop","scrollLeft"]),c=t.nodeName==="filter"||t.parentNode&&t.parentNode.nodeName==="filter";s!==void 0&&(t.scrollTop=s),a!==void 0&&(t.scrollLeft=a),o!==void 0&&(t.textContent=o);for(let f in i)if(i.hasOwnProperty(f)){var n=f.indexOf("--")===0,r=uy(f,i[f],n);f==="float"&&(f="cssFloat"),n?t.style.setProperty(f,r):t.style[f]=r}for(let f in l){const d=c?f:Gl[f]||(Gl[f]=f.replace(/([A-Z])/g,p=>"-"+p.toLowerCase()));typeof t.getAttribute(d)<"u"&&t.setAttribute(d,l[f])}return}else return!1},t=>t);const fy=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],dy=Om(Bm,!1),py=dy(fy);function Wl(t,e){return t.map(function(n,r){return n+e[r]})}function rf(t,e){return t.map(function(n,r){return n-e[r]})}function Bs(t){return Math.hypot.apply(Math,t)}function hy(t,e,n){var r=Bs(e),i=r===0?0:1/r,o=n===0?0:1/n,s=o*r,a=e.map(function(f){return o*f}),l=e.map(function(f){return i*f}),c=Bs(t);return{velocities:a,velocity:s,distance:c,direction:l}}function Us(t){return Math.sign?Math.sign(t):+(t>0)-+(t<0)||+t}function gy(t,e,n){return Math.max(e,Math.min(t,n))}function vy(t,e){return Math.pow(t,e*5)}function Zl(t,e,n){return e===0||Math.abs(e)===1/0?vy(t,n):t*e*n/(e+n*t)}function Hr(t,e,n,r){return r===void 0&&(r=.15),r===0?gy(t,e,n):t<e?-Zl(e-t,n-e,r)+e:t>n?+Zl(t-n,n-e,r)+n:t}function ql(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,r.key,r)}}function my(t,e,n){return e&&ql(t.prototype,e),n&&ql(t,n),t}function ut(){return ut=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ut.apply(this,arguments)}function of(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function yy(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Oi(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function by(t,e){if(t){if(typeof t=="string")return Kl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Kl(t,e)}}function Kl(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ao(t,e){var n;if(typeof Symbol>"u"||t[Symbol.iterator]==null){if(Array.isArray(t)||(n=by(t))||e&&t&&typeof t.length=="number"){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.
|
|
90
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return n=t[Symbol.iterator](),n.next.bind(n)}function sf(){}function af(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.length===0?sf:e.length===1?e[0]:function(){for(var r,i=Ao(e),o;!(o=i()).done;){var s=o.value;r=s.apply(this,arguments)||r}return r}}function pn(t,e){if(t===void 0){if(e===void 0)throw new Error("Must define fallback value if undefined is expected");t=e}return Array.isArray(t)?t:[t,t]}function Mi(t){if(typeof t=="function"){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return t.apply(void 0,n)}else return t}function pa(t,e){t===void 0&&(t={});for(var n={},r=0,i=Object.entries(e);r<i.length;r++){var o=i[r],s=o[0],a=o[1];switch(typeof a){case"function":n[s]=a.call(n,t[s],s,t);break;case"object":n[s]=pa(t[s],a);break;case"boolean":a&&(n[s]=t[s]);break}}return n}var wy=180,Sy=.15,Ly=.5,Ey=60,xy={threshold:function(e){return e===void 0&&(e=0),pn(e)},rubberband:function(e){switch(e===void 0&&(e=0),e){case!0:return pn(Sy);case!1:return pn(0);default:return pn(e)}},enabled:function(e){return e===void 0&&(e=!0),e},triggerAllEvents:function(e){return e===void 0&&(e=!1),e},initial:function(e){return e===void 0&&(e=0),typeof e=="function"?e:pn(e)}},lf=ut({},xy,{axis:!0,lockDirection:function(e){return e===void 0&&(e=!1),e},bounds:function(e){if(e===void 0&&(e={}),typeof e=="function")return function(d){return lf.bounds(e(d))};var n=e,r=n.left,i=r===void 0?-1/0:r,o=n.right,s=o===void 0?1/0:o,a=n.top,l=a===void 0?-1/0:a,c=n.bottom,f=c===void 0?1/0:c;return[[i,s],[l,f]]}}),Cy=typeof window<"u"&&window.document&&window.document.createElement,_y={enabled:function(e){return e===void 0&&(e=!0),e},domTarget:!0,window:function(t){function e(n){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(t){return t===void 0&&(t=Cy?window:void 0),t}),eventOptions:function(e){var n=e===void 0?{}:e,r=n.passive,i=r===void 0?!0:r,o=n.capture,s=o===void 0?!1:o;return{passive:i,capture:s}}},Oy=ut({},lf,{threshold:function(e,n,r){var i=r.filterTaps,o=i===void 0?!1:i,s=r.lockDirection,a=s===void 0?!1:s,l=r.axis,c=l===void 0?void 0:l,f=pn(e,o?3:a||c?1:0);return this.filterTaps=o||f[0]+f[1]>0,f},swipeVelocity:function(e){return e===void 0&&(e=Ly),pn(e)},swipeDistance:function(e){return e===void 0&&(e=Ey),pn(e)},delay:function(e){switch(e===void 0&&(e=0),e){case!0:return wy;case!1:return 0;default:return e}}});function My(t){return t===void 0&&(t={}),pa(t,_y)}function Py(t){return t===void 0&&(t={}),pa(t,Oy)}function ky(t){var e=t.domTarget,n=t.eventOptions,r=t.window,i=t.enabled,o=yy(t,["domTarget","eventOptions","window","enabled"]),s=My({domTarget:e,eventOptions:n,window:r,enabled:i});return s.drag=Py(o),s}function _r(t){return ut({_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_bounds:[[-1/0,1/0],[-1/0,1/0]],_lastEventType:void 0,event:void 0,intentional:!1,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:sf,canceled:!1,memo:void 0,args:void 0},t)}function cf(){var t={hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1},e=_r({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0,_isTap:!0,_delayedEvent:!1,_pointerId:void 0,tap:!1,swipe:[0,0]}),n=_r({da:[0,0],vdva:[0,0],origin:void 0,turns:0}),r=_r({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),i=_r({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),o=_r({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0});return{shared:t,drag:e,pinch:n,wheel:r,move:i,scroll:o}}var Mn=new Map,Ry=function(){function t(n,r){var i=this;r===void 0&&(r=[]),this.controller=n,this.args=r,this.debounced=!0,this.setTimeout=function(o,s){var a;s===void 0&&(s=140),clearTimeout(i.controller.timeouts[i.stateKey]);for(var l=arguments.length,c=new Array(l>2?l-2:0),f=2;f<l;f++)c[f-2]=arguments[f];i.controller.timeouts[i.stateKey]=(a=window).setTimeout.apply(a,[o,s].concat(c))},this.clearTimeout=function(){clearTimeout(i.controller.timeouts[i.stateKey])},this.fireGestureHandler=function(o){if(o===void 0&&(o=!1),i.state._blocked)return i.debounced||(i.state._active=!1,i.clean()),null;if(!o&&!i.state.intentional&&!i.config.triggerAllEvents)return null;if(i.state.intentional){var s=i.state.active,a=i.state._active;i.state.active=a,i.state.first=a&&!s,i.state.last=s&&!a,i.controller.state.shared[i.ingKey]=a}var l=ut({},i.controller.state.shared,i.state,i.mapStateValues(i.state)),c=i.handler(l);return i.state.memo=c!==void 0?c:i.state.memo,i.state._active||i.clean(),l}}var e=t.prototype;return e.updateSharedState=function(r){Object.assign(this.controller.state.shared,r)},e.updateGestureState=function(r){Object.assign(this.state,r)},e.checkIntentionality=function(r,i){return{_intentional:r,_blocked:!1}},e.getMovement=function(r){var i=this.config,o=i.initial,s=i.bounds,a=i.rubberband,l=i.threshold,c=this.state,f=c._bounds,d=c._initial,p=c._active,v=c._intentional,g=c.lastOffset,h=c.movement,S=this.getInternalMovement(r,this.state),L=v[0]===!1?Yl(S[0],l[0]):v[0],b=v[1]===!1?Yl(S[1],l[1]):v[1],y=this.checkIntentionality([L,b],S);if(y._blocked)return ut({},y,{_movement:S,delta:[0,0]});var x=y._intentional,E=S,m,w;if(x[0]!==!1&&v[0]===!1&&(w=Mi(o,this.state),m=Mi(s,this.state),d[0]=w[0],f[0]=m[0]),x[1]!==!1&&v[1]===!1){var _,P;w=(_=w)!=null?_:Mi(o,this.state),m=(P=m)!=null?P:Mi(s,this.state),d[1]=w[1],f[1]=m[1]}var M=[x[0]!==!1?S[0]-x[0]:d[0],x[1]!==!1?S[1]-x[1]:d[1]],O=Wl(M,g),k=p?a:[0,0];return M=Jl(f,Wl(M,d),k),ut({},y,{intentional:x[0]!==!1||x[1]!==!1,_initial:d,_movement:E,movement:M,values:r,offset:Jl(f,O,k),delta:rf(M,h)})},e.clean=function(){this.clearTimeout()},my(t,[{key:"config",get:function(){return this.controller.config[this.stateKey]}},{key:"enabled",get:function(){return this.controller.config.enabled&&this.config.enabled}},{key:"state",get:function(){return this.controller.state[this.stateKey]}},{key:"handler",get:function(){return this.controller.handlers[this.stateKey]}}]),t}();function Yl(t,e){return Math.abs(t)>=e?Us(t)*e:!1}function Jl(t,e,n){var r=e[0],i=e[1],o=n[0],s=n[1],a=t[0],l=a[0],c=a[1],f=t[1],d=f[0],p=f[1];return[Hr(r,l,c,o),Hr(i,d,p,s)]}function ns(t,e,n){var r=t.state,i=t.args,o=e.timeStamp,s=e.type,a=r.values,l=n?0:o-r.startTime;return{_lastEventType:s,event:e,timeStamp:o,elapsedTime:l,args:i,previous:a}}function Ty(t,e,n){var r=t.state.offset,i=n.timeStamp;return ut({},cf()[t.stateKey],{_active:!0,values:e,initial:e,offset:r,lastOffset:r,startTime:i})}function Ay(t,e){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return t.call.apply(t,[this,ut({},e,{event:n})].concat(i))}}var Dy=function(e){var n=this;this.classes=e,this.bind=function(){for(var r={},i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];for(var a=Ao(n.classes),l;!(l=a()).done;){var c=l.value;new c(n,o).addBindings(r)}for(var f=0,d=Object.entries(n.nativeRefs);f<d.length;f++){var p=d[f],v=p[0],g=p[1];Vs(r,v,Ay(g,ut({},n.state.shared,{args:o})))}return n.config.domTarget?By(n,r):Uy(n,r)},this.effect=function(){return n.config.domTarget&&n.bind(),n.clean},this.clean=function(){var r=ff(n.config),i=n.config.eventOptions;r&&li(r,uf(n.domListeners),i),Object.values(n.timeouts).forEach(clearTimeout),Iy(n)},this.state=cf(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function Iy(t){var e=t.config,n=e.window,r=e.eventOptions,i=t.windowListeners;if(n){for(var o in i){var s=i[o];li(n,s,r)}t.windowListeners={}}}function jy(t,e){var n=t.config,r=t.windowListeners;n.window&&(li(n.window,r[e],n.eventOptions),delete r[e])}function Ny(t,e,n){var r=t.config,i=t.windowListeners;n===void 0&&(n=[]),r.window&&(li(r.window,i[e],r.eventOptions),df(r.window,i[e]=n,r.eventOptions))}function By(t,e){var n=t.config,r=t.domListeners,i=ff(n);if(!i)throw new Error("domTarget must be defined");var o=n.eventOptions;li(i,uf(r),o);for(var s=0,a=Object.entries(e);s<a.length;s++){var l=a[s],c=l[0],f=l[1],d=c.slice(2).toLowerCase();r.push([d,af.apply(void 0,f)])}df(i,r,o)}function Uy(t,e){for(var n=t.config,r={},i=n.eventOptions.capture?"Capture":"",o=0,s=Object.entries(e);o<s.length;o++){var a=s[o],l=a[0],c=a[1],f=Array.isArray(c)?c:[c],d=l+i;r[d]=af.apply(void 0,f)}return r}function uf(t){return t===void 0&&(t=[]),t.splice(0,t.length)}function ff(t){var e=t.domTarget;return e&&"current"in e?e.current:e}function Vs(t,e,n){t[e]||(t[e]=[]),t[e].push(n)}function df(t,e,n){e===void 0&&(e=[]),n===void 0&&(n={});for(var r=Ao(e),i;!(i=r()).done;){var o=i.value,s=o[0],a=o[1];t.addEventListener(s,a,n)}}function li(t,e,n){e===void 0&&(e=[]),n===void 0&&(n={});for(var r=Ao(e),i;!(i=r()).done;){var o=i.value,s=o[0],a=o[1];t.removeEventListener(s,a,n)}}function Vy(t,e,n){n===void 0&&(n={});var r=zy(t),i=u.useMemo(function(){return new Dy(r)},[]);return i.config=e,i.handlers=t,i.nativeRefs=n,u.useEffect(i.effect,[]),i.config.domTarget?Fy:i.bind}function Fy(){}function zy(t){var e=new Set;return t.drag&&e.add(Mn.get("drag")),t.wheel&&e.add(Mn.get("wheel")),t.scroll&&e.add(Mn.get("scroll")),t.move&&e.add(Mn.get("move")),t.pinch&&e.add(Mn.get("pinch")),t.hover&&e.add(Mn.get("hover")),e}var $y=function(t){of(e,t);function e(){return t.apply(this,arguments)||this}var n=e.prototype;return n.getInternalMovement=function(i,o){return rf(i,o.initial)},n.checkIntentionality=function(i,o){if(i[0]===!1&&i[1]===!1)return{_intentional:i,axis:this.state.axis};var s=o.map(Math.abs),a=s[0],l=s[1],c=this.state.axis||(a>l?"x":a<l?"y":void 0);return!this.config.axis&&!this.config.lockDirection?{_intentional:i,_blocked:!1,axis:c}:c?this.config.axis&&c!==this.config.axis?{_intentional:i,_blocked:!0,axis:c}:(i[c==="x"?1:0]=!1,{_intentional:i,_blocked:!1,axis:c}):{_intentional:[!1,!1],_blocked:!1,axis:c}},n.getKinematics=function(i,o){var s=this.getMovement(i);if(!s._blocked){var a=o.timeStamp-this.state.timeStamp;Object.assign(s,hy(s.movement,s.delta,a))}return s},n.mapStateValues=function(i){return{xy:i.values,vxvy:i.velocities}},e}(Ry);function pf(t){if("touches"in t){var e=t.targetTouches,n=t.changedTouches;return e.length>0?e:n}return null}function Xl(t){var e="buttons"in t?t.buttons:0,n=pf(t),r=n&&n.length||0,i=r>0||e>0,o=t.shiftKey,s=t.altKey,a=t.metaKey,l=t.ctrlKey;return{touches:r,down:i,buttons:e,shiftKey:o,altKey:s,metaKey:a,ctrlKey:l}}function Ql(t){var e=pf(t),n=e?e[0]:t,r=n.clientX,i=n.clientY;return[r,i]}var Hy=3,Gy=220,Wy=function(t){of(e,t);function e(){var r;return r=t.apply(this,arguments)||this,r.ingKey="dragging",r.stateKey="drag",r.onDragStart=function(i){!r.enabled||r.state._active||(Ny(r.controller,r.stateKey,[["pointermove",r.onDragChange],["pointerup",r.onDragEnd],["pointercancel",r.onDragEnd]]),r.updateGestureState({_pointerId:i.pointerId}),r.config.delay>0?(r.state._delayedEvent=!0,"persist"in i&&typeof i.persist=="function"&&i.persist(),r.setTimeout(r.startDrag.bind(Oi(r)),r.config.delay,i)):r.startDrag(i))},r.onDragChange=function(i){if(!r.state.canceled&&i.pointerId===r.state._pointerId){if(!r.state._active){r.state._delayedEvent&&(r.clearTimeout(),r.startDrag(i));return}var o=Xl(i);if(!o.down){r.onDragEnd(i);return}r.updateSharedState(o);var s=Ql(i),a=r.getKinematics(s,i),l=ns(Oi(r),i),c=r.state._isTap,f=Bs(a._movement);c&&f>=Hy&&(c=!1),r.updateGestureState(ut({},l,a,{_isTap:c})),r.fireGestureHandler()}},r.onDragEnd=function(i){if(i.pointerId===r.state._pointerId){r.state._active=!1,r.updateSharedState({down:!1,buttons:0,touches:0});var o=r.state._isTap,s=r.state.velocities,a=s[0],l=s[1],c=r.state.movement,f=c[0],d=c[1],p=r.state._intentional,v=p[0],g=p[1],h=r.config.swipeVelocity,S=h[0],L=h[1],b=r.config.swipeDistance,y=b[0],x=b[1],E=ut({},ns(Oi(r),i),r.getMovement(r.state.values)),m=[0,0];E.elapsedTime<Gy&&(v!==!1&&Math.abs(a)>S&&Math.abs(f)>y&&(m[0]=Us(a)),g!==!1&&Math.abs(l)>L&&Math.abs(d)>x&&(m[1]=Us(l))),r.updateGestureState(ut({},E,{tap:o,swipe:m})),r.fireGestureHandler(o===!0)}},r.clean=function(){t.prototype.clean.call(Oi(r)),r.state._delayedEvent=!1,jy(r.controller,r.stateKey)},r.onCancel=function(){r.state.canceled||(r.updateGestureState({canceled:!0}),r.state._active=!1,r.updateSharedState({down:!1,buttons:0,touches:0}),requestAnimationFrame(function(){return r.fireGestureHandler()}))},r.onClick=function(i){r.state._isTap||i.stopPropagation()},r}var n=e.prototype;return n.startDrag=function(i){var o=Ql(i);this.updateSharedState(Xl(i)),this.updateGestureState(ut({},Ty(this,o,i),ns(this,i,!0),{_pointerId:i.pointerId,cancel:this.onCancel})),this.updateGestureState(this.getMovement(o)),this.fireGestureHandler()},n.addBindings=function(i){if(Vs(i,"onPointerDown",this.onDragStart),this.config.filterTaps){var o=this.controller.config.eventOptions.capture?"onClick":"onClickCapture";Vs(i,o,this.onClick)}},e}($y);function Zy(t,e){var n,r=[],i,o=!1;function s(){for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];return o&&n===this&&e(l,r)||(i=t.apply(this,l),o=!0,n=this,r=l),i}return s}function Ki(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var n,r,i;if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Ki(t[r],e[r]))return!1;return!0}var o;if(typeof Map=="function"&&t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(o=t.entries();!(r=o.next()).done;)if(!e.has(r.value[0]))return!1;for(o=t.entries();!(r=o.next()).done;)if(!Ki(r.value[1],e.get(r.value[0])))return!1;return!0}if(typeof Set=="function"&&t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(o=t.entries();!(r=o.next()).done;)if(!e.has(r.value[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[r]))return!1;if(typeof Element<"u"&&t instanceof Element)return!1;for(r=n;r--!==0;)if(!(i[r]==="_owner"&&t.$$typeof)&&!Ki(t[i[r]],e[i[r]]))return!1;return!0}return t!==t&&e!==e}function qy(t,e){try{return Ki(t,e)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}function Ky(t,e){e===void 0&&(e={}),Mn.set("drag",Wy);var n=u.useRef();return n.current||(n.current=Zy(ky,qy)),Vy({drag:t},n.current(e))}/*!
|
|
86
|
+
***************************************************************************** */var G=function(){return G=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},G.apply(this,arguments)};function sa(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function we(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ce(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o}function Ue(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}var Ie;(function(t){t.Start="xstate.start",t.Stop="xstate.stop",t.Raise="xstate.raise",t.Send="xstate.send",t.Cancel="xstate.cancel",t.NullEvent="",t.Assign="xstate.assign",t.After="xstate.after",t.DoneState="done.state",t.DoneInvoke="done.invoke",t.Log="xstate.log",t.Init="xstate.init",t.Invoke="xstate.invoke",t.ErrorExecution="error.execution",t.ErrorCommunication="error.communication",t.ErrorPlatform="error.platform",t.ErrorCustom="xstate.error",t.Update="xstate.update",t.Pure="xstate.pure",t.Choose="xstate.choose"})(Ie||(Ie={}));var or;(function(t){t.Parent="#_parent",t.Internal="#_internal"})(or||(or={}));var Os=Ie.Start,aa=Ie.Stop,ai=Ie.Raise,ko=Ie.Send,Au=Ie.Cancel,Ev=Ie.NullEvent,la=Ie.Assign;Ie.After;Ie.DoneState;var Du=Ie.Log,Lv=Ie.Init,Ms=Ie.Invoke;Ie.ErrorExecution;var kl=Ie.ErrorPlatform,xv=Ie.ErrorCustom,Iu=Ie.Update,Cv=Ie.Choose,_v=Ie.Pure,ju=".",Rl={},Ps="xstate.guard",Ov="",bi;function ca(t,e,n){n===void 0&&(n=ju);var r=Ur(t,n),i=Ur(e,n);return Re(i)?Re(r)?i===r:!1:Re(r)?r in i:Object.keys(r).every(function(o){return o in i?ca(r[o],i[o]):!1})}function Nu(t){try{return Re(t)||typeof t=="number"?"".concat(t):t.type}catch{throw new Error("Events must be strings or objects with a string event.type property.")}}function ks(t,e){try{return fr(t)?t:t.toString().split(e)}catch{throw new Error("'".concat(t,"' is not a valid state path."))}}function Mv(t){return typeof t=="object"&&"value"in t&&"context"in t&&"event"in t&&"_event"in t}function Ur(t,e){if(Mv(t))return t.value;if(fr(t))return fo(t);if(typeof t!="string")return t;var n=ks(t,e);return fo(n)}function fo(t){if(t.length===1)return t[0];for(var e={},n=e,r=0;r<t.length-1;r++)r===t.length-2?n[t[r]]=t[r+1]:(n[t[r]]={},n=n[t[r]]);return e}function Ar(t,e){for(var n={},r=Object.keys(t),i=0;i<r.length;i++){var o=r[i];n[o]=e(t[o],o,t,i)}return n}function Tl(t,e,n){var r,i,o={};try{for(var s=we(Object.keys(t)),a=s.next();!a.done;a=s.next()){var l=a.value,c=t[l];n(c)&&(o[l]=e(c,l,t))}}catch(f){r={error:f}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o}var Pv=function(t){return function(e){var n,r,i=e;try{for(var o=we(t),s=o.next();!s.done;s=o.next()){var a=s.value;i=i[a]}}catch(l){n={error:l}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}};function kv(t,e){return function(n){var r,i,o=n;try{for(var s=we(t),a=s.next();!a.done;a=s.next()){var l=a.value;o=o[e][l]}}catch(c){r={error:c}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o}}function Gi(t){if(!t)return[[]];if(Re(t))return[[t]];var e=He(Object.keys(t).map(function(n){var r=t[n];return typeof r!="string"&&(!r||!Object.keys(r).length)?[[n]]:Gi(t[n]).map(function(i){return[n].concat(i)})}));return e}function He(t){var e;return(e=[]).concat.apply(e,Ue([],Ce(t),!1))}function Bu(t){return fr(t)?t:[t]}function Mt(t){return t===void 0?[]:Bu(t)}function po(t,e,n){var r,i;if(_e(t))return t(e,n.data);var o={};try{for(var s=we(Object.keys(t)),a=s.next();!a.done;a=s.next()){var l=a.value,c=t[l];_e(c)?o[l]=c(e,n.data):o[l]=c}}catch(f){r={error:f}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o}function Rv(t){return/^(done|error)\./.test(t)}function Al(t){return!!(t instanceof Promise||t!==null&&(_e(t)||typeof t=="object")&&_e(t.then))}function Tv(t){return t!==null&&typeof t=="object"&&"transition"in t&&typeof t.transition=="function"}function Av(t,e){var n,r,i=Ce([[],[]],2),o=i[0],s=i[1];try{for(var a=we(t),l=a.next();!l.done;l=a.next()){var c=l.value;e(c)?o.push(c):s.push(c)}}catch(f){n={error:f}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[o,s]}function Uu(t,e){return Ar(t.states,function(n,r){if(n){var i=(Re(e)?void 0:e[r])||(n?n.current:void 0);if(i)return{current:i,states:Uu(n,i)}}})}function Dv(t,e){return{current:e,states:Uu(t,e)}}function Dl(t,e,n,r){var i=t&&n.reduce(function(o,s){var a,l,c=s.assignment,f={state:r,action:s,_event:e},d={};if(_e(c))d=c(o,e.data,f);else try{for(var p=we(Object.keys(c)),v=p.next();!v.done;v=p.next()){var g=v.value,h=c[g];d[g]=_e(h)?h(o,e.data,f):h}}catch(S){a={error:S}}finally{try{v&&!v.done&&(l=p.return)&&l.call(p)}finally{if(a)throw a.error}}return Object.assign({},o,d)},t);return i}var Iv=function(){};function fr(t){return Array.isArray(t)}function _e(t){return typeof t=="function"}function Re(t){return typeof t=="string"}function Vu(t,e){if(t)return Re(t)?{type:Ps,name:t,predicate:e?e[t]:void 0}:_e(t)?{type:Ps,name:t.name,predicate:t}:t}function jv(t){try{return"subscribe"in t&&_e(t.subscribe)}catch{return!1}}var fn=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();bi={},bi[fn]=function(){return this},bi[Symbol.observable]=function(){return this};function sr(t){return!!t&&"__xstatenode"in t}function Nv(t){return!!t&&typeof t.send=="function"}function Ro(t,e){return Re(t)||typeof t=="number"?G({type:t},e):t}function it(t,e){if(!Re(t)&&"$$type"in t&&t.$$type==="scxml")return t;var n=Ro(t);return G({name:n.type,data:n,$$type:"scxml",type:"external"},e)}function zn(t,e){var n=Bu(e).map(function(r){return typeof r>"u"||typeof r=="string"||sr(r)?{target:r,event:t}:G(G({},r),{event:t})});return n}function Bv(t){if(!(t===void 0||t===Ov))return Mt(t)}function Fu(t,e,n,r,i){var o=t.options.guards,s={state:i,cond:e,_event:r};if(e.type===Ps)return((o==null?void 0:o[e.name])||e.predicate)(n,r.data,s);var a=o==null?void 0:o[e.type];if(!a)throw new Error("Guard '".concat(e.type,"' is not implemented on machine '").concat(t.id,"'."));return a(n,r.data,s)}function zu(t){return typeof t=="string"?{type:t}:t}function Wi(t,e,n){var r=function(){},i=typeof t=="object",o=i?t:null;return{next:((i?t.next:t)||r).bind(o),error:((i?t.error:e)||r).bind(o),complete:((i?t.complete:n)||r).bind(o)}}function wi(t,e){return"".concat(t,":invocation[").concat(e,"]")}function Rs(t){return(t.type===ai||t.type===ko&&t.to===or.Internal)&&typeof t.delay!="number"}var Xn=it({type:Lv});function Ts(t,e){return e&&e[t]||void 0}function ti(t,e){var n;if(Re(t)||typeof t=="number"){var r=Ts(t,e);_e(r)?n={type:t,exec:r}:r?n=r:n={type:t,exec:void 0}}else if(_e(t))n={type:t.name||t.toString(),exec:t};else{var r=Ts(t.type,e);if(_e(r))n=G(G({},t),{exec:r});else if(r){var i=r.type||t.type;n=G(G(G({},r),t),{type:i})}else n=t}return n}var dn=function(t,e){if(!t)return[];var n=fr(t)?t:[t];return n.map(function(r){return ti(r,e)})};function ua(t){var e=ti(t);return G(G({id:Re(t)?t:e.id},e),{type:e.type})}function Uv(t,e){return{type:ai,event:typeof t=="function"?t:Ro(t),delay:e?e.delay:void 0,id:e==null?void 0:e.id}}function Vv(t,e,n,r){var i={_event:n},o=it(_e(t.event)?t.event(e,n.data,i):t.event),s;if(Re(t.delay)){var a=r&&r[t.delay];s=_e(a)?a(e,n.data,i):a}else s=_e(t.delay)?t.delay(e,n.data,i):t.delay;return G(G({},t),{type:ai,_event:o,delay:s})}function Fv(t,e){return{to:e?e.to:void 0,type:ko,event:_e(t)?t:Ro(t),delay:e?e.delay:void 0,id:e&&e.id!==void 0?e.id:_e(t)?t.name:Nu(t)}}function zv(t,e,n,r){var i={_event:n},o=it(_e(t.event)?t.event(e,n.data,i):t.event),s;if(Re(t.delay)){var a=r&&r[t.delay];s=_e(a)?a(e,n.data,i):a}else s=_e(t.delay)?t.delay(e,n.data,i):t.delay;var l=_e(t.to)?t.to(e,n.data,i):t.to;return G(G({},t),{to:l,_event:o,event:o.data,delay:s})}var $v=function(t,e,n){return G(G({},t),{value:Re(t.expr)?t.expr:t.expr(e,n.data,{_event:n})})},Hv=function(t){return{type:Au,sendId:t}};function Gv(t){var e=ua(t);return{type:Ie.Start,activity:e,exec:void 0}}function Wv(t){var e=_e(t)?t:ua(t);return{type:Ie.Stop,activity:e,exec:void 0}}function Zv(t,e,n){var r=_e(t.activity)?t.activity(e,n.data):t.activity,i=typeof r=="string"?{id:r}:r,o={type:Ie.Stop,activity:i};return o}var qv=function(t){return{type:la,assignment:t}};function Kv(t,e){var n=e?"#".concat(e):"";return"".concat(Ie.After,"(").concat(t,")").concat(n)}function Si(t,e){var n="".concat(Ie.DoneState,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function Zi(t,e){var n="".concat(Ie.DoneInvoke,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function Dr(t,e){var n="".concat(Ie.ErrorPlatform,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}var Jv=function(t){var e,n,r=[];try{for(var i=we(t),o=i.next();!o.done;o=i.next())for(var s=o.value,a=0;a<s.actions.length;){if(s.actions[a].type===la){r.push(s.actions[a]),s.actions.splice(a,1);continue}a++}}catch(l){e={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r};function ho(t,e,n,r,i,o,s){s===void 0&&(s=!1);var a=s?[]:Jv(i),l=a.length?Dl(n,r,a,e):n,c=s?[n]:void 0,f=[];function d(g,h){var S;switch(h.type){case ai:{var E=Vv(h,l,r,t.options.delays);return o&&typeof E.delay=="number"&&o(E,l,r),E}case ko:var b=zv(h,l,r,t.options.delays);return o&&b.to!==or.Internal&&(g==="entry"?f.push(b):o(b,l,r)),b;case Du:{var y=$v(h,l,r);return o==null||o(y,l,r),y}case Cv:{var x=h,L=(S=x.conds.find(function(Z){var F=Vu(Z.cond,t.options.guards);return!F||Fu(t,F,l,r,o?void 0:e)}))===null||S===void 0?void 0:S.actions;if(!L)return[];var m=Ce(ho(t,e,l,r,[{type:g,actions:dn(Mt(L),t.options.actions)}],o,s),2),w=m[0],_=m[1];return l=_,c==null||c.push(l),w}case _v:{var L=h.get(l,r.data);if(!L)return[];var P=Ce(ho(t,e,l,r,[{type:g,actions:dn(Mt(L),t.options.actions)}],o,s),2),M=P[0],O=P[1];return l=O,c==null||c.push(l),M}case aa:{var y=Zv(h,l,r);return o==null||o(y,n,r),y}case la:{l=Dl(l,r,[h],o?void 0:e),c==null||c.push(l);break}default:var k=ti(h,t.options.actions),I=k.exec;if(o)o(k,l,r);else if(I&&c){var B=c.length-1,H=G(G({},k),{exec:function(Z){for(var F=[],K=1;K<arguments.length;K++)F[K-1]=arguments[K];I.apply(void 0,Ue([c[B]],Ce(F),!1))}});k=H}return k}}function p(g){var h,S,E=[];try{for(var b=we(g.actions),y=b.next();!y.done;y=b.next()){var x=y.value,L=d(g.type,x);L&&(E=E.concat(L))}}catch(m){h={error:m}}finally{try{y&&!y.done&&(S=b.return)&&S.call(b)}finally{if(h)throw h.error}}return f.forEach(function(m){o(m,l,r)}),f.length=0,E}var v=He(i.map(p));return[v,l]}var Il=[],Kn=function(t,e){Il.push(t);var n=e(t);return Il.pop(),n};function $u(t){var e;return e={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:t}}},e[fn]=function(){return this},e}function Yv(t,e,n,r){var i,o=zu(t.src),s=(i=e==null?void 0:e.options.services)===null||i===void 0?void 0:i[o.type],a=t.data?po(t.data,n,r):void 0,l=s?Hu(s,t.id,a):$u(t.id);return l.meta=t,l}function Hu(t,e,n){var r=$u(e);if(r.deferred=!0,sr(t)){var i=r.state=Kn(void 0,function(){return(n?t.withContext(n):t).initialState});r.getSnapshot=function(){return i}}return r}function Qv(t){try{return typeof t.send=="function"}catch{return!1}}function Xv(t){return Qv(t)&&"id"in t}function em(t){var e;return G((e={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},e[fn]=function(){return this},e),t)}var go=function(t){return t.type==="atomic"||t.type==="final"};function Gu(t){return Object.keys(t.states).map(function(e){return t.states[e]})}function ni(t){return Gu(t).filter(function(e){return e.type!=="history"})}function Wu(t){var e=[t];return go(t)?e:e.concat(He(ni(t).map(Wu)))}function Ir(t,e){var n,r,i,o,s,a,l,c,f=new Set(t),d=As(f),p=new Set(e);try{for(var v=we(p),g=v.next();!g.done;g=v.next())for(var h=g.value,S=h.parent;S&&!p.has(S);)p.add(S),S=S.parent}catch(P){n={error:P}}finally{try{g&&!g.done&&(r=v.return)&&r.call(v)}finally{if(n)throw n.error}}var E=As(p);try{for(var b=we(p),y=b.next();!y.done;y=b.next()){var h=y.value;if(h.type==="compound"&&(!E.get(h)||!E.get(h).length))d.get(h)?d.get(h).forEach(function(M){return p.add(M)}):h.initialStateNodes.forEach(function(M){return p.add(M)});else if(h.type==="parallel")try{for(var x=(s=void 0,we(ni(h))),L=x.next();!L.done;L=x.next()){var m=L.value;p.has(m)||(p.add(m),d.get(m)?d.get(m).forEach(function(M){return p.add(M)}):m.initialStateNodes.forEach(function(M){return p.add(M)}))}}catch(M){s={error:M}}finally{try{L&&!L.done&&(a=x.return)&&a.call(x)}finally{if(s)throw s.error}}}}catch(P){i={error:P}}finally{try{y&&!y.done&&(o=b.return)&&o.call(b)}finally{if(i)throw i.error}}try{for(var w=we(p),_=w.next();!_.done;_=w.next())for(var h=_.value,S=h.parent;S&&!p.has(S);)p.add(S),S=S.parent}catch(P){l={error:P}}finally{try{_&&!_.done&&(c=w.return)&&c.call(w)}finally{if(l)throw l.error}}return p}function Zu(t,e){var n=e.get(t);if(!n)return{};if(t.type==="compound"){var r=n[0];if(r){if(go(r))return r.key}else return{}}var i={};return n.forEach(function(o){i[o.key]=Zu(o,e)}),i}function As(t){var e,n,r=new Map;try{for(var i=we(t),o=i.next();!o.done;o=i.next()){var s=o.value;r.has(s)||r.set(s,[]),s.parent&&(r.has(s.parent)||r.set(s.parent,[]),r.get(s.parent).push(s))}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}function tm(t,e){var n=Ir([t],e);return Zu(t,As(n))}function jr(t,e){return Array.isArray(t)?t.some(function(n){return n===e}):t instanceof Set?t.has(e):!1}function nm(t){return Ue([],Ce(new Set(He(Ue([],Ce(t.map(function(e){return e.ownEvents})),!1)))),!1)}function qi(t,e){return e.type==="compound"?ni(e).some(function(n){return n.type==="final"&&jr(t,n)}):e.type==="parallel"?ni(e).every(function(n){return qi(t,n)}):!1}function rm(t){return t===void 0&&(t=[]),t.reduce(function(e,n){return n.meta!==void 0&&(e[n.id]=n.meta),e},{})}function jl(t){return new Set(He(t.map(function(e){return e.tags})))}function qu(t,e){if(t===e)return!0;if(t===void 0||e===void 0)return!1;if(Re(t)||Re(e))return t===e;var n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(function(i){return qu(t[i],e[i])})}function im(t){return typeof t!="object"||t===null?!1:"value"in t&&"_event"in t}function om(t,e){var n=t.exec,r=G(G({},t),{exec:n!==void 0?function(){return n(e.context,e.event,{action:t,state:e,_event:e._event})}:void 0});return r}var St=function(){function t(e){var n=this,r;this.actions=[],this.activities=Rl,this.meta={},this.events=[],this.value=e.value,this.context=e.context,this._event=e._event,this._sessionid=e._sessionid,this.event=this._event.data,this.historyValue=e.historyValue,this.history=e.history,this.actions=e.actions||[],this.activities=e.activities||Rl,this.meta=rm(e.configuration),this.events=e.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=e.configuration,this.transitions=e.transitions,this.children=e.children,this.done=!!e.done,this.tags=(r=Array.isArray(e.tags)?new Set(e.tags):e.tags)!==null&&r!==void 0?r:new Set,this.machine=e.machine,Object.defineProperty(this,"nextEvents",{get:function(){return nm(n.configuration)}})}return t.from=function(e,n){if(e instanceof t)return e.context!==n?new t({value:e.value,context:n,_event:e._event,_sessionid:null,historyValue:e.historyValue,history:e.history,actions:[],activities:e.activities,meta:{},events:[],configuration:[],transitions:[],children:{}}):e;var r=Xn;return new t({value:e,context:n,_event:r,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,meta:void 0,events:[],configuration:[],transitions:[],children:{}})},t.create=function(e){return new t(e)},t.inert=function(e,n){if(e instanceof t){if(!e.actions.length)return e;var r=Xn;return new t({value:e.value,context:n,_event:r,_sessionid:null,historyValue:e.historyValue,history:e.history,activities:e.activities,configuration:e.configuration,transitions:[],children:{}})}return t.from(e,n)},t.prototype.toStrings=function(e,n){var r=this;if(e===void 0&&(e=this.value),n===void 0&&(n="."),Re(e))return[e];var i=Object.keys(e);return i.concat.apply(i,Ue([],Ce(i.map(function(o){return r.toStrings(e[o],n).map(function(s){return o+n+s})})),!1))},t.prototype.toJSON=function(){var e=this;e.configuration,e.transitions;var n=e.tags;e.machine;var r=sa(e,["configuration","transitions","tags","machine"]);return G(G({},r),{tags:Array.from(n)})},t.prototype.matches=function(e){return ca(e,this.value)},t.prototype.hasTag=function(e){return this.tags.has(e)},t.prototype.can=function(e){var n;Iv(!!this.machine);var r=(n=this.machine)===null||n===void 0?void 0:n.getTransitionData(this,e);return!!(r!=null&&r.transitions.length)&&r.transitions.some(function(i){return i.target!==void 0||i.actions.length})},t}(),sm={deferEvents:!1},Nl=function(){function t(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=G(G({},sm),e)}return t.prototype.initialize=function(e){if(this.initialized=!0,e){if(!this.options.deferEvents){this.schedule(e);return}this.process(e)}this.flushEvents()},t.prototype.schedule=function(e){if(!this.initialized||this.processingEvent){this.queue.push(e);return}if(this.queue.length!==0)throw new Error("Event queue should be empty when it is not processing events");this.process(e),this.flushEvents()},t.prototype.clear=function(){this.queue=[]},t.prototype.flushEvents=function(){for(var e=this.queue.shift();e;)this.process(e),e=this.queue.shift()},t.prototype.process=function(e){this.processingEvent=!0;try{e()}catch(n){throw this.clear(),n}finally{this.processingEvent=!1}},t}(),Qo=new Map,am=0,xr={bookId:function(){return"x:".concat(am++)},register:function(t,e){return Qo.set(t,e),t},get:function(t){return Qo.get(t)},free:function(t){Qo.delete(t)}};function fa(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}function lm(){var t=fa();if(t&&"__xstate__"in t)return t.__xstate__}function cm(t){if(fa()){var e=lm();e&&e.register(t)}}function um(t,e){e===void 0&&(e={});var n=t.initialState,r=new Set,i=[],o=!1,s=function(){if(!o){for(o=!0;i.length>0;){var c=i.shift();n=t.transition(n,c,l),r.forEach(function(f){return f.next(n)})}o=!1}},a=em({id:e.id,send:function(c){i.push(c),s()},getSnapshot:function(){return n},subscribe:function(c,f,d){var p=Wi(c,f,d);return r.add(p),p.next(n),{unsubscribe:function(){r.delete(p)}}}}),l={parent:e.parent,self:a,id:e.id||"anonymous",observers:r};return n=t.start?t.start(l):n,a}var fm={sync:!1,autoForward:!1},Xe;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(Xe||(Xe={}));var dm=function(){function t(e,n){n===void 0&&(n=t.defaultOptions);var r=this;this.machine=e,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=Xe.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(f,d){if(fr(f))return r.batch(f),r.state;var p=it(Ro(f,d));if(r.status===Xe.Stopped)return r.state;if(r.status!==Xe.Running&&!r.options.deferEvents)throw new Error('Event "'.concat(p.name,'" was sent to uninitialized service "').concat(r.machine.id,`". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.
|
|
87
|
+
Event: `).concat(JSON.stringify(p.data)));return r.scheduler.schedule(function(){r.forward(p);var v=r._nextState(p);r.update(v,p)}),r._state},this.sendTo=function(f,d,p){var v=r.parent&&(d===or.Parent||r.parent.id===d),g=v?r.parent:Re(d)?d===or.Internal?r:r.children.get(d)||xr.get(d):Nv(d)?d:void 0;if(!g){if(!v)throw new Error("Unable to send event to child '".concat(d,"' from service '").concat(r.id,"'."));return}if("machine"in g){if(r.status!==Xe.Stopped||r.parent!==g||r.state.done){var h=G(G({},f),{name:f.name===xv?"".concat(Dr(r.id)):f.name,origin:r.sessionId});!p&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([g,h]):g.send(h)}}else!p&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([g,f.data]):g.send(f.data)},this._exec=function(f,d,p,v){v===void 0&&(v=r.machine.options.actions);var g=f.exec||Ts(f.type,v),h=_e(g)?g:g?g.exec:f.exec;if(h)try{return h(d,p.data,r.machine.config.predictableActionArguments?{action:f,_event:p}:{action:f,state:r.state,_event:p})}catch(B){throw r.parent&&r.parent.send({type:"xstate.error",data:B}),B}switch(f.type){case ai:{var S=f;r.defer(S);break}case ko:var E=f;if(typeof E.delay=="number"){r.defer(E);return}else E.to?r.sendTo(E._event,E.to,p===Xn):r.send(E._event);break;case Au:r.cancel(f.sendId);break;case Os:{if(r.status!==Xe.Running)return;var b=f.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[b.id||b.type])break;if(b.type===Ie.Invoke){var y=zu(b.src),x=r.machine.options.services?r.machine.options.services[y.type]:void 0,L=b.id,m=b.data,w="autoForward"in b?b.autoForward:!!b.forward;if(!x)return;var _=m?po(m,d,p):void 0;if(typeof x=="string")return;var P=_e(x)?x(d,p.data,{data:_,src:y,meta:b.meta}):x;if(!P)return;var M=void 0;sr(P)&&(P=_?P.withContext(_):P,M={autoForward:w}),r.spawn(P,L,M)}else r.spawnActivity(b);break}case aa:{r.stopChild(f.activity.id);break}case Du:var O=f,k=O.label,I=O.value;k?r.logger(k,I):r.logger(I);break}};var i=G(G({},t.defaultOptions),n),o=i.clock,s=i.logger,a=i.parent,l=i.id,c=l!==void 0?l:e.id;this.id=c,this.logger=s,this.clock=o,this.parent=a,this.options=i,this.scheduler=new Nl({deferEvents:this.options.deferEvents}),this.sessionId=xr.bookId()}return Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:Kn(this,function(){return e._initialState=e.machine.initialState,e._initialState})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),t.prototype.execute=function(e,n){var r,i;try{for(var o=we(e.actions),s=o.next();!s.done;s=o.next()){var a=s.value;this.exec(a,e,n)}}catch(l){r={error:l}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},t.prototype.update=function(e,n){var r,i,o,s,a,l,c,f,d=this;if(e._sessionid=this.sessionId,this._state=e,(!this.machine.config.predictableActionArguments||n===Xn)&&this.options.execute)this.execute(this.state);else for(var p=void 0;p=this._outgoingQueue.shift();)p[0].send(p[1]);if(this.children.forEach(function(P){d.state.children[P.id]=P}),this.devTools&&this.devTools.send(n.data,e),e.event)try{for(var v=we(this.eventListeners),g=v.next();!g.done;g=v.next()){var h=g.value;h(e.event)}}catch(P){r={error:P}}finally{try{g&&!g.done&&(i=v.return)&&i.call(v)}finally{if(r)throw r.error}}try{for(var S=we(this.listeners),E=S.next();!E.done;E=S.next()){var h=E.value;h(e,e.event)}}catch(P){o={error:P}}finally{try{E&&!E.done&&(s=S.return)&&s.call(S)}finally{if(o)throw o.error}}try{for(var b=we(this.contextListeners),y=b.next();!y.done;y=b.next()){var x=y.value;x(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(P){a={error:P}}finally{try{y&&!y.done&&(l=b.return)&&l.call(b)}finally{if(a)throw a.error}}if(this.state.done){var L=e.configuration.find(function(P){return P.type==="final"&&P.parent===d.machine}),m=L&&L.doneData?po(L.doneData,e.context,n):void 0;this._doneEvent=Zi(this.id,m);try{for(var w=we(this.doneListeners),_=w.next();!_.done;_=w.next()){var h=_.value;h(this._doneEvent)}}catch(P){c={error:P}}finally{try{_&&!_.done&&(f=w.return)&&f.call(w)}finally{if(c)throw c.error}}this._stop(),this._stopChildren(),xr.free(this.sessionId)}},t.prototype.onTransition=function(e){return this.listeners.add(e),this.status===Xe.Running&&e(this.state,this.state.event),this},t.prototype.subscribe=function(e,n,r){var i=this,o=Wi(e,n,r);this.listeners.add(o.next),this.status!==Xe.NotStarted&&o.next(this.state);var s=function(){i.doneListeners.delete(s),i.stopListeners.delete(s),o.complete()};return this.status===Xe.Stopped?o.complete():(this.onDone(s),this.onStop(s)),{unsubscribe:function(){i.listeners.delete(o.next),i.doneListeners.delete(s),i.stopListeners.delete(s)}}},t.prototype.onEvent=function(e){return this.eventListeners.add(e),this},t.prototype.onSend=function(e){return this.sendListeners.add(e),this},t.prototype.onChange=function(e){return this.contextListeners.add(e),this},t.prototype.onStop=function(e){return this.stopListeners.add(e),this},t.prototype.onDone=function(e){return this.status===Xe.Stopped&&this._doneEvent?e(this._doneEvent):this.doneListeners.add(e),this},t.prototype.off=function(e){return this.listeners.delete(e),this.eventListeners.delete(e),this.sendListeners.delete(e),this.stopListeners.delete(e),this.doneListeners.delete(e),this.contextListeners.delete(e),this},t.prototype.start=function(e){var n=this;if(this.status===Xe.Running)return this;this.machine._init(),xr.register(this.sessionId,this),this.initialized=!0,this.status=Xe.Running;var r=e===void 0?this.initialState:Kn(this,function(){return im(e)?n.machine.resolveState(e):n.machine.resolveState(St.from(e,n.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){n.update(r,Xn)}),this},t.prototype._stopChildren=function(){this.children.forEach(function(e){_e(e.stop)&&e.stop()}),this.children.clear()},t.prototype._stop=function(){var e,n,r,i,o,s,a,l,c,f;try{for(var d=we(this.listeners),p=d.next();!p.done;p=d.next()){var v=p.value;this.listeners.delete(v)}}catch(w){e={error:w}}finally{try{p&&!p.done&&(n=d.return)&&n.call(d)}finally{if(e)throw e.error}}try{for(var g=we(this.stopListeners),h=g.next();!h.done;h=g.next()){var v=h.value;v(),this.stopListeners.delete(v)}}catch(w){r={error:w}}finally{try{h&&!h.done&&(i=g.return)&&i.call(g)}finally{if(r)throw r.error}}try{for(var S=we(this.contextListeners),E=S.next();!E.done;E=S.next()){var v=E.value;this.contextListeners.delete(v)}}catch(w){o={error:w}}finally{try{E&&!E.done&&(s=S.return)&&s.call(S)}finally{if(o)throw o.error}}try{for(var b=we(this.doneListeners),y=b.next();!y.done;y=b.next()){var v=y.value;this.doneListeners.delete(v)}}catch(w){a={error:w}}finally{try{y&&!y.done&&(l=b.return)&&l.call(b)}finally{if(a)throw a.error}}if(!this.initialized)return this;this.initialized=!1,this.status=Xe.Stopped,this._initialState=void 0;try{for(var x=we(Object.keys(this.delayedEventsMap)),L=x.next();!L.done;L=x.next()){var m=L.value;this.clock.clearTimeout(this.delayedEventsMap[m])}}catch(w){c={error:w}}finally{try{L&&!L.done&&(f=x.return)&&f.call(x)}finally{if(c)throw c.error}}this.scheduler.clear(),this.scheduler=new Nl({deferEvents:this.options.deferEvents})},t.prototype.stop=function(){var e=this,n=this.scheduler;return this._stop(),n.schedule(function(){var r=it({type:"xstate.stop"}),i=Kn(e,function(){var o=He(Ue([],Ce(e.state.configuration),!1).sort(function(f,d){return d.order-f.order}).map(function(f){return dn(f.onExit,e.machine.options.actions)})),s=Ce(ho(e.machine,e.state,e.state.context,r,[{type:"exit",actions:o}],e.machine.config.predictableActionArguments?e._exec:void 0,e.machine.config.predictableActionArguments||e.machine.config.preserveActionOrder),2),a=s[0],l=s[1],c=new St({value:e.state.value,context:l,_event:r,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:a.filter(function(f){return!Rs(f)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return c.changed=!0,c});e.update(i,r),e._stopChildren(),xr.free(e.sessionId)}),this},t.prototype.batch=function(e){var n=this;if(!(this.status===Xe.NotStarted&&this.options.deferEvents)){if(this.status!==Xe.Running)throw new Error("".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'))}if(e.length){var r=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule(function(){var i,o,s=n.state,a=!1,l=[],c=function(v){var g=it(v);n.forward(g),s=Kn(n,function(){return n.machine.transition(s,g,void 0,r||void 0)}),l.push.apply(l,Ue([],Ce(n.machine.config.predictableActionArguments?s.actions:s.actions.map(function(h){return om(h,s)})),!1)),a=a||!!s.changed};try{for(var f=we(e),d=f.next();!d.done;d=f.next()){var p=d.value;c(p)}}catch(v){i={error:v}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}s.changed=a,s.actions=l,n.update(s,it(e[e.length-1]))})}},t.prototype.sender=function(e){return this.send.bind(this,e)},t.prototype._nextState=function(e,n){var r=this;n===void 0&&(n=!!this.machine.config.predictableActionArguments&&this._exec);var i=it(e);if(i.name.indexOf(kl)===0&&!this.state.nextEvents.some(function(s){return s.indexOf(kl)===0}))throw i.data.data;var o=Kn(this,function(){return r.machine.transition(r.state,i,void 0,n||void 0)});return o},t.prototype.nextState=function(e){return this._nextState(e,!1)},t.prototype.forward=function(e){var n,r;try{for(var i=we(this.forwardTo),o=i.next();!o.done;o=i.next()){var s=o.value,a=this.children.get(s);if(!a)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(s,"'."));a.send(e)}}catch(l){n={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},t.prototype.defer=function(e){var n=this,r=this.clock.setTimeout(function(){"to"in e&&e.to?n.sendTo(e._event,e.to,!0):n.send(e._event)},e.delay);e.id&&(this.delayedEventsMap[e.id]=r)},t.prototype.cancel=function(e){this.clock.clearTimeout(this.delayedEventsMap[e]),delete this.delayedEventsMap[e]},t.prototype.exec=function(e,n,r){r===void 0&&(r=this.machine.options.actions),this._exec(e,n.context,n._event,r)},t.prototype.removeChild=function(e){var n;this.children.delete(e),this.forwardTo.delete(e),(n=this.state)===null||n===void 0||delete n.children[e]},t.prototype.stopChild=function(e){var n=this.children.get(e);n&&(this.removeChild(e),_e(n.stop)&&n.stop())},t.prototype.spawn=function(e,n,r){if(this.status!==Xe.Running)return Hu(e,n);if(Al(e))return this.spawnPromise(Promise.resolve(e),n);if(_e(e))return this.spawnCallback(e,n);if(Xv(e))return this.spawnActor(e,n);if(jv(e))return this.spawnObservable(e,n);if(sr(e))return this.spawnMachine(e,G(G({},r),{id:n}));if(Tv(e))return this.spawnBehavior(e,n);throw new Error('Unable to spawn entity "'.concat(n,'" of type "').concat(typeof e,'".'))},t.prototype.spawnMachine=function(e,n){var r=this;n===void 0&&(n={});var i=new t(e,G(G({},this.options),{parent:this,id:n.id||e.id})),o=G(G({},fm),n);o.sync&&i.onTransition(function(a){r.send(Iu,{state:a,id:i.id})});var s=i;return this.children.set(i.id,s),o.autoForward&&this.forwardTo.add(i.id),i.onDone(function(a){r.removeChild(i.id),r.send(it(a,{origin:i.id}))}).start(),s},t.prototype.spawnBehavior=function(e,n){var r=um(e,{id:n,parent:this});return this.children.set(n,r),r},t.prototype.spawnPromise=function(e,n){var r,i=this,o=!1,s;e.then(function(l){o||(s=l,i.removeChild(n),i.send(it(Zi(n,l),{origin:n})))},function(l){if(!o){i.removeChild(n);var c=Dr(n,l);try{i.send(it(c,{origin:n}))}catch{i.devTools&&i.devTools.send(c,i.state),i.machine.strict&&i.stop()}}});var a=(r={id:n,send:function(){},subscribe:function(l,c,f){var d=Wi(l,c,f),p=!1;return e.then(function(v){p||(d.next(v),!p&&d.complete())},function(v){p||d.error(v)}),{unsubscribe:function(){return p=!0}}},stop:function(){o=!0},toJSON:function(){return{id:n}},getSnapshot:function(){return s}},r[fn]=function(){return this},r);return this.children.set(n,a),a},t.prototype.spawnCallback=function(e,n){var r,i=this,o=!1,s=new Set,a=new Set,l,c=function(p){l=p,a.forEach(function(v){return v(p)}),!o&&i.send(it(p,{origin:n}))},f;try{f=e(c,function(p){s.add(p)})}catch(p){this.send(Dr(n,p))}if(Al(f))return this.spawnPromise(f,n);var d=(r={id:n,send:function(p){return s.forEach(function(v){return v(p)})},subscribe:function(p){var v=Wi(p);return a.add(v.next),{unsubscribe:function(){a.delete(v.next)}}},stop:function(){o=!0,_e(f)&&f()},toJSON:function(){return{id:n}},getSnapshot:function(){return l}},r[fn]=function(){return this},r);return this.children.set(n,d),d},t.prototype.spawnObservable=function(e,n){var r,i=this,o,s=e.subscribe(function(l){o=l,i.send(it(l,{origin:n}))},function(l){i.removeChild(n),i.send(it(Dr(n,l),{origin:n}))},function(){i.removeChild(n),i.send(it(Zi(n),{origin:n}))}),a=(r={id:n,send:function(){},subscribe:function(l,c,f){return e.subscribe(l,c,f)},stop:function(){return s.unsubscribe()},getSnapshot:function(){return o},toJSON:function(){return{id:n}}},r[fn]=function(){return this},r);return this.children.set(n,a),a},t.prototype.spawnActor=function(e,n){return this.children.set(n,e),e},t.prototype.spawnActivity=function(e){var n=this.machine.options&&this.machine.options.activities?this.machine.options.activities[e.type]:void 0;if(n){var r=n(this.state.context,e);this.spawnEffect(e.id,r)}},t.prototype.spawnEffect=function(e,n){var r;this.children.set(e,(r={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:n||void 0,getSnapshot:function(){},toJSON:function(){return{id:e}}},r[fn]=function(){return this},r))},t.prototype.attachDev=function(){var e=fa();if(this.options.devTools&&e){if(e.__REDUX_DEVTOOLS_EXTENSION__){var n=typeof this.options.devTools=="object"?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(G(G({name:this.id,autoPause:!0,stateSanitizer:function(r){return{value:r.value,context:r.context,actions:r.actions}}},n),{features:G({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}cm(this)}},t.prototype.toJSON=function(){return{id:this.id}},t.prototype[fn]=function(){return this},t.prototype.getSnapshot=function(){return this.status===Xe.NotStarted?this.initialState:this._state},t.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(e,n){return setTimeout(e,n)},clearTimeout:function(e){return clearTimeout(e)}},logger:console.log.bind(console),devTools:!1},t.interpret=Ku,t}();function Ku(t,e){var n=new dm(t,e);return n}function pm(t){if(typeof t=="string"){var e={type:t};return e.toString=function(){return t},e}return t}function Ei(t){return G(G({type:Ms},t),{toJSON:function(){t.onDone,t.onError;var e=sa(t,["onDone","onError"]);return G(G({},e),{type:Ms,src:pm(t.src)})}})}var Li="",Ds="#",Xo="*",$n={},Hn=function(t){return t[0]===Ds},hm=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},gm=function(){function t(e,n,r,i){r===void 0&&(r="context"in e?e.context:void 0);var o=this,s;this.config=e,this._context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign(hm(),n),this.parent=i==null?void 0:i.parent,this.key=this.config.key||(i==null?void 0:i.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:ju),this.id=this.config.id||Ue([this.machine.key],Ce(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:(s=this.config.schema)!==null&&s!==void 0?s:{},this.description=this.config.description,this.initial=this.config.initial,this.states=this.config.states?Ar(this.config.states,function(c,f){var d,p=new t(c,{},void 0,{parent:o,key:f});return Object.assign(o.idMap,G((d={},d[p.id]=p,d),p.idMap)),p}):$n;var a=0;function l(c){var f,d;c.order=a++;try{for(var p=we(Gu(c)),v=p.next();!v.done;v=p.next()){var g=v.value;l(g)}}catch(h){f={error:h}}finally{try{v&&!v.done&&(d=p.return)&&d.call(p)}finally{if(f)throw f.error}}}l(this),this.history=this.config.history===!0?"shallow":this.config.history||!1,this._transient=!!this.config.always||(this.config.on?Array.isArray(this.config.on)?this.config.on.some(function(c){var f=c.event;return f===Li}):Li in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=Mt(this.config.entry||this.config.onEntry).map(function(c){return ti(c)}),this.onExit=Mt(this.config.exit||this.config.onExit).map(function(c){return ti(c)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=Mt(this.config.invoke).map(function(c,f){var d,p;if(sr(c)){var v=wi(o.id,f);return o.machine.options.services=G((d={},d[v]=c,d),o.machine.options.services),Ei({src:v,id:v})}else if(Re(c.src)){var v=c.id||wi(o.id,f);return Ei(G(G({},c),{id:v,src:c.src}))}else if(sr(c.src)||_e(c.src)){var v=c.id||wi(o.id,f);return o.machine.options.services=G((p={},p[v]=c.src,p),o.machine.options.services),Ei(G(G({id:v},c),{src:v}))}else{var g=c.src;return Ei(G(G({id:wi(o.id,f)},c),{src:g}))}}),this.activities=Mt(this.config.activities).concat(this.invoke).map(function(c){return ua(c)}),this.transition=this.transition.bind(this),this.tags=Mt(this.config.tags)}return t.prototype._init=function(){this.__cache.transitions||Wu(this).forEach(function(e){return e.on})},t.prototype.withConfig=function(e,n){var r=this.options,i=r.actions,o=r.activities,s=r.guards,a=r.services,l=r.delays;return new t(this.config,{actions:G(G({},i),e.actions),activities:G(G({},o),e.activities),guards:G(G({},s),e.guards),services:G(G({},a),e.services),delays:G(G({},l),e.delays)},n??this.context)},t.prototype.withContext=function(e){return new t(this.config,this.options,e)},Object.defineProperty(t.prototype,"context",{get:function(){return _e(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:Ar(this.states,function(e){return e.definition}),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return this.definition},Object.defineProperty(t.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var e=this.transitions;return this.__cache.on=e.reduce(function(n,r){return n[r.eventType]=n[r.eventType]||[],n[r.eventType].push(r),n},{})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),t.prototype.getCandidates=function(e){if(this.__cache.candidates[e])return this.__cache.candidates[e];var n=e===Li,r=this.transitions.filter(function(i){var o=i.eventType===e;return n?o:o||i.eventType===Xo});return this.__cache.candidates[e]=r,r},t.prototype.getDelayedTransitions=function(){var e=this,n=this.config.after;if(!n)return[];var r=function(o,s){var a=_e(o)?"".concat(e.id,":delay[").concat(s,"]"):o,l=Kv(a,e.id);return e.onEntry.push(Fv(l,{delay:o})),e.onExit.push(Hv(l)),l},i=fr(n)?n.map(function(o,s){var a=r(o.delay,s);return G(G({},o),{event:a})}):He(Object.keys(n).map(function(o,s){var a=n[o],l=Re(a)?{target:a}:a,c=isNaN(+o)?o:+o,f=r(c,s);return Mt(l).map(function(d){return G(G({},d),{event:f,delay:c})})}));return i.map(function(o){var s=o.delay;return G(G({},e.formatTransition(o)),{delay:s})})},t.prototype.getStateNodes=function(e){var n,r=this;if(!e)return[];var i=e instanceof St?e.value:Ur(e,this.delimiter);if(Re(i)){var o=this.getStateNode(i).initial;return o!==void 0?this.getStateNodes((n={},n[i]=o,n)):[this,this.states[i]]}var s=Object.keys(i),a=[this];return a.push.apply(a,Ue([],Ce(He(s.map(function(l){return r.getStateNode(l).getStateNodes(i[l])}))),!1)),a},t.prototype.handles=function(e){var n=Nu(e);return this.events.includes(n)},t.prototype.resolveState=function(e){var n=e instanceof St?e:St.create(e),r=Array.from(Ir([],this.getStateNodes(n.value)));return new St(G(G({},n),{value:this.resolve(n.value),configuration:r,done:qi(r,this),tags:jl(r),machine:this.machine}))},t.prototype.transitionLeafNode=function(e,n,r){var i=this.getStateNode(e),o=i.next(n,r);return!o||!o.transitions.length?this.next(n,r):o},t.prototype.transitionCompoundNode=function(e,n,r){var i=Object.keys(e),o=this.getStateNode(i[0]),s=o._transition(e[i[0]],n,r);return!s||!s.transitions.length?this.next(n,r):s},t.prototype.transitionParallelNode=function(e,n,r){var i,o,s={};try{for(var a=we(Object.keys(e)),l=a.next();!l.done;l=a.next()){var c=l.value,f=e[c];if(f){var d=this.getStateNode(c),p=d._transition(f,n,r);p&&(s[c]=p)}}}catch(E){i={error:E}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}var v=Object.keys(s).map(function(E){return s[E]}),g=He(v.map(function(E){return E.transitions})),h=v.some(function(E){return E.transitions.length>0});if(!h)return this.next(n,r);var S=He(Object.keys(s).map(function(E){return s[E].configuration}));return{transitions:g,exitSet:He(v.map(function(E){return E.exitSet})),configuration:S,source:n,actions:He(Object.keys(s).map(function(E){return s[E].actions}))}},t.prototype._transition=function(e,n,r){return Re(e)?this.transitionLeafNode(e,n,r):Object.keys(e).length===1?this.transitionCompoundNode(e,n,r):this.transitionParallelNode(e,n,r)},t.prototype.getTransitionData=function(e,n){return this._transition(e.value,e,it(n))},t.prototype.next=function(e,n){var r,i,o=this,s=n.name,a=[],l=[],c;try{for(var f=we(this.getCandidates(s)),d=f.next();!d.done;d=f.next()){var p=d.value,v=p.cond,g=p.in,h=e.context,S=g?Re(g)&&Hn(g)?e.matches(Ur(this.getStateNodeById(g).path,this.delimiter)):ca(Ur(g,this.delimiter),Pv(this.path.slice(0,-2))(e.value)):!0,E=!1;try{E=!v||Fu(this.machine,v,h,n,e)}catch(x){throw new Error("Unable to evaluate guard '".concat(v.name||v.type,"' in transition for event '").concat(s,"' in state node '").concat(this.id,`':
|
|
88
|
+
`).concat(x.message))}if(E&&S){p.target!==void 0&&(l=p.target),a.push.apply(a,Ue([],Ce(p.actions),!1)),c=p;break}}}catch(x){r={error:x}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}if(c){if(!l.length)return{transitions:[c],exitSet:[],configuration:e.value?[this]:[],source:e,actions:a};var b=He(l.map(function(x){return o.getRelativeStateNodes(x,e.historyValue)})),y=!!c.internal;return{transitions:[c],exitSet:y?[]:He(l.map(function(x){return o.getPotentiallyReenteringNodes(x)})),configuration:b,source:e,actions:a}}},t.prototype.getPotentiallyReenteringNodes=function(e){if(this.order<e.order)return[this];for(var n=[],r=this,i=e;r&&r!==i;)n.push(r),r=r.parent;return r!==i?[]:(n.push(i),n)},t.prototype.getActions=function(e,n,r,i,o,s,a){var l,c,f,d,p=this,v=s?Ir([],this.getStateNodes(s.value)):[],g=new Set;try{for(var h=we(Array.from(e).sort(function(O,k){return O.order-k.order})),S=h.next();!S.done;S=h.next()){var E=S.value;(!jr(v,E)||jr(r.exitSet,E)||E.parent&&g.has(E.parent))&&g.add(E)}}catch(O){l={error:O}}finally{try{S&&!S.done&&(c=h.return)&&c.call(h)}finally{if(l)throw l.error}}try{for(var b=we(v),y=b.next();!y.done;y=b.next()){var E=y.value;(!jr(e,E)||jr(r.exitSet,E.parent))&&r.exitSet.push(E)}}catch(O){f={error:O}}finally{try{y&&!y.done&&(d=b.return)&&d.call(b)}finally{if(f)throw f.error}}r.exitSet.sort(function(O,k){return k.order-O.order});var x=Array.from(g).sort(function(O,k){return O.order-k.order}),L=new Set(r.exitSet),m=He(x.map(function(O){var k=[];if(O.type!=="final")return k;var I=O.parent;if(!I.parent)return k;k.push(Si(O.id,O.doneData),Si(I.id,O.doneData?po(O.doneData,i,o):void 0));var B=I.parent;return B.type==="parallel"&&ni(B).every(function(H){return qi(r.configuration,H)})&&k.push(Si(B.id)),k})),w=x.map(function(O){var k=O.onEntry,I=O.activities.map(function(B){return Gv(B)});return{type:"entry",actions:dn(a?Ue(Ue([],Ce(k),!1),Ce(I),!1):Ue(Ue([],Ce(I),!1),Ce(k),!1),p.machine.options.actions)}}).concat({type:"state_done",actions:m.map(function(O){return Uv(O)})}),_=Array.from(L).map(function(O){return{type:"exit",actions:dn(Ue(Ue([],Ce(O.onExit),!1),Ce(O.activities.map(function(k){return Wv(k)})),!1),p.machine.options.actions)}}),P=_.concat({type:"transition",actions:dn(r.actions,this.machine.options.actions)}).concat(w);if(n){var M=dn(He(Ue([],Ce(e),!1).sort(function(O,k){return k.order-O.order}).map(function(O){return O.onExit})),this.machine.options.actions).filter(function(O){return!Rs(O)});return P.concat({type:"stop",actions:M})}return P},t.prototype.transition=function(e,n,r,i){e===void 0&&(e=this.initialState);var o=it(n),s;if(e instanceof St)s=r===void 0?e:this.resolveState(St.from(e,r));else{var a=Re(e)?this.resolve(fo(this.getResolvedPath(e))):this.resolve(e),l=r??this.machine.context;s=this.resolveState(St.from(a,l))}if(this.strict&&!this.events.includes(o.name)&&!Rv(o.name))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(o.name,"'"));var c=this._transition(s.value,s,o)||{transitions:[],configuration:[],exitSet:[],source:s,actions:[]},f=Ir([],this.getStateNodes(s.value)),d=c.configuration.length?Ir(f,c.configuration):f;return c.configuration=Ue([],Ce(d),!1),this.resolveTransition(c,s,s.context,i,o)},t.prototype.resolveRaisedTransition=function(e,n,r,i){var o,s=e.actions;return e=this.transition(e,n,void 0,i),e._event=r,e.event=r.data,(o=e.actions).unshift.apply(o,Ue([],Ce(s),!1)),e},t.prototype.resolveTransition=function(e,n,r,i,o){var s,a,l,c,f=this;o===void 0&&(o=Xn);var d=e.configuration,p=!n||e.transitions.length>0,v=p?e.configuration:n?n.configuration:[],g=qi(v,this),h=p?tm(this.machine,d):void 0,S=n?n.historyValue?n.historyValue:e.source?this.machine.historyValue(n.value):void 0:void 0,E=this.getActions(new Set(v),g,e,r,o,n,i),b=n?G({},n.activities):{};try{for(var y=we(E),x=y.next();!x.done;x=y.next()){var L=x.value;try{for(var m=(l=void 0,we(L.actions)),w=m.next();!w.done;w=m.next()){var _=w.value;_.type===Os?b[_.activity.id||_.activity.type]=_:_.type===aa&&(b[_.activity.id||_.activity.type]=!1)}}catch($){l={error:$}}finally{try{w&&!w.done&&(c=m.return)&&c.call(m)}finally{if(l)throw l.error}}}}catch($){s={error:$}}finally{try{x&&!x.done&&(a=y.return)&&a.call(y)}finally{if(s)throw s.error}}var P=Ce(ho(this,n,r,o,E,i,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),M=P[0],O=P[1],k=Ce(Av(M,Rs),2),I=k[0],B=k[1],H=M.filter(function($){var X;return $.type===Os&&((X=$.activity)===null||X===void 0?void 0:X.type)===Ms}),Z=H.reduce(function($,X){return $[X.activity.id]=Yv(X.activity,f.machine,O,o),$},n?G({},n.children):{}),F=new St({value:h||n.value,context:O,_event:o,_sessionid:n?n._sessionid:null,historyValue:h?S?Dv(S,h):void 0:n?n.historyValue:void 0,history:!h||e.source?n:void 0,actions:h?B:[],activities:h?b:n?n.activities:{},events:[],configuration:v,transitions:e.transitions,children:Z,done:g,tags:jl(v),machine:this}),K=r!==O;F.changed=o.name===Iu||K;var A=F.history;A&&delete A.history;var R=!g&&(this._transient||d.some(function($){return $._transient}));if(!p&&(!R||o.name===Li))return F;var T=F;if(!g)for(R&&(T=this.resolveRaisedTransition(T,{type:Ev},o,i));I.length;){var V=I.shift();T=this.resolveRaisedTransition(T,V._event,o,i)}var z=T.changed||(A?!!T.actions.length||K||typeof A.value!=typeof T.value||!qu(T.value,A.value):void 0);return T.changed=z,T.history=A,T},t.prototype.getStateNode=function(e){if(Hn(e))return this.machine.getStateNodeById(e);if(!this.states)throw new Error("Unable to retrieve child state '".concat(e,"' from '").concat(this.id,"'; no child states exist."));var n=this.states[e];if(!n)throw new Error("Child state '".concat(e,"' does not exist on '").concat(this.id,"'"));return n},t.prototype.getStateNodeById=function(e){var n=Hn(e)?e.slice(Ds.length):e;if(n===this.id)return this;var r=this.machine.idMap[n];if(!r)throw new Error("Child state node '#".concat(n,"' does not exist on machine '").concat(this.id,"'"));return r},t.prototype.getStateNodeByPath=function(e){if(typeof e=="string"&&Hn(e))try{return this.getStateNodeById(e.slice(1))}catch{}for(var n=ks(e,this.delimiter).slice(),r=this;n.length;){var i=n.shift();if(!i.length)break;r=r.getStateNode(i)}return r},t.prototype.resolve=function(e){var n,r=this;if(!e)return this.initialStateValue||$n;switch(this.type){case"parallel":return Ar(this.initialStateValue,function(o,s){return o?r.getStateNode(s).resolve(e[s]||o):$n});case"compound":if(Re(e)){var i=this.getStateNode(e);return i.type==="parallel"||i.type==="compound"?(n={},n[e]=i.initialStateValue,n):e}return Object.keys(e).length?Ar(e,function(o,s){return o?r.getStateNode(s).resolve(o):$n}):this.initialStateValue||{};default:return e||$n}},t.prototype.getResolvedPath=function(e){if(Hn(e)){var n=this.machine.idMap[e.slice(Ds.length)];if(!n)throw new Error("Unable to find state node '".concat(e,"'"));return n.path}return ks(e,this.delimiter)},Object.defineProperty(t.prototype,"initialStateValue",{get:function(){var e;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;var n;if(this.type==="parallel")n=Tl(this.states,function(r){return r.initialStateValue||$n},function(r){return r.type!=="history"});else if(this.initial!==void 0){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));n=go(this.states[this.initial])?this.initial:(e={},e[this.initial]=this.states[this.initial].initialStateValue,e)}else n={};return this.__cache.initialStateValue=n,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),t.prototype.getInitialState=function(e,n){this._init();var r=this.getStateNodes(e);return this.resolveTransition({configuration:r,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,n??this.machine.context,void 0)},Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this.initialStateValue;if(!e)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"target",{get:function(){var e;if(this.type==="history"){var n=this.config;Re(n.target)?e=Hn(n.target)?fo(this.machine.getStateNodeById(n.target).path.slice(this.path.length-1)):n.target:e=n.target}return e},enumerable:!1,configurable:!0}),t.prototype.getRelativeStateNodes=function(e,n,r){return r===void 0&&(r=!0),r?e.type==="history"?e.resolveHistory(n):e.initialStateNodes:[e]},Object.defineProperty(t.prototype,"initialStateNodes",{get:function(){var e=this;if(go(this))return[this];if(this.type==="compound"&&!this.initial)return[this];var n=Gi(this.initialStateValue);return He(n.map(function(r){return e.getFromRelativePath(r)}))},enumerable:!1,configurable:!0}),t.prototype.getFromRelativePath=function(e){if(!e.length)return[this];var n=Ce(e),r=n[0],i=n.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(r,"' from node with no states"));var o=this.getStateNode(r);if(o.type==="history")return o.resolveHistory();if(!this.states[r])throw new Error("Child state '".concat(r,"' does not exist on '").concat(this.id,"'"));return this.states[r].getFromRelativePath(i)},t.prototype.historyValue=function(e){if(Object.keys(this.states).length)return{current:e||this.initialStateValue,states:Tl(this.states,function(n,r){if(!e)return n.historyValue();var i=Re(e)?void 0:e[r];return n.historyValue(i||n.initialStateValue)},function(n){return!n.history})}},t.prototype.resolveHistory=function(e){var n=this;if(this.type!=="history")return[this];var r=this.parent;if(!e){var i=this.target;return i?He(Gi(i).map(function(s){return r.getFromRelativePath(s)})):r.initialStateNodes}var o=kv(r.path,"states")(e).current;return Re(o)?[r.getStateNode(o)]:He(Gi(o).map(function(s){return n.history==="deep"?r.getFromRelativePath(s):[r.states[s[0]]]}))},Object.defineProperty(t.prototype,"stateIds",{get:function(){var e=this,n=He(Object.keys(this.states).map(function(r){return e.states[r].stateIds}));return[this.id].concat(n)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"events",{get:function(){var e,n,r,i;if(this.__cache.events)return this.__cache.events;var o=this.states,s=new Set(this.ownEvents);if(o)try{for(var a=we(Object.keys(o)),l=a.next();!l.done;l=a.next()){var c=l.value,f=o[c];if(f.states)try{for(var d=(r=void 0,we(f.events)),p=d.next();!p.done;p=d.next()){var v=p.value;s.add("".concat(v))}}catch(g){r={error:g}}finally{try{p&&!p.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}}}catch(g){e={error:g}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return this.__cache.events=Array.from(s)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ownEvents",{get:function(){var e=new Set(this.transitions.filter(function(n){return!(!n.target&&!n.actions.length&&n.internal)}).map(function(n){return n.eventType}));return Array.from(e)},enumerable:!1,configurable:!0}),t.prototype.resolveTarget=function(e){var n=this;if(e!==void 0)return e.map(function(r){if(!Re(r))return r;var i=r[0]===n.delimiter;if(i&&!n.parent)return n.getStateNodeByPath(r.slice(1));var o=i?n.key+r:r;if(n.parent)try{var s=n.parent.getStateNodeByPath(o);return s}catch(a){throw new Error("Invalid transition definition for state node '".concat(n.id,`':
|
|
89
|
+
`).concat(a.message))}else return n.getStateNodeByPath(o)})},t.prototype.formatTransition=function(e){var n=this,r=Bv(e.target),i="internal"in e?e.internal:r?r.some(function(l){return Re(l)&&l[0]===n.delimiter}):!0,o=this.machine.options.guards,s=this.resolveTarget(r),a=G(G({},e),{actions:dn(Mt(e.actions)),cond:Vu(e.cond,o),target:s,source:this,internal:i,eventType:e.event,toJSON:function(){return G(G({},a),{target:a.target?a.target.map(function(l){return"#".concat(l.id)}):void 0,source:"#".concat(n.id)})}});return a},t.prototype.formatTransitions=function(){var e,n,r=this,i;if(!this.config.on)i=[];else if(Array.isArray(this.config.on))i=this.config.on;else{var o=this.config.on,s=Xo,a=o[s],l=a===void 0?[]:a,c=sa(o,[typeof s=="symbol"?s:s+""]);i=He(Object.keys(c).map(function(b){var y=zn(b,c[b]);return y}).concat(zn(Xo,l)))}var f=this.config.always?zn("",this.config.always):[],d=this.config.onDone?zn(String(Si(this.id)),this.config.onDone):[],p=He(this.invoke.map(function(b){var y=[];return b.onDone&&y.push.apply(y,Ue([],Ce(zn(String(Zi(b.id)),b.onDone)),!1)),b.onError&&y.push.apply(y,Ue([],Ce(zn(String(Dr(b.id)),b.onError)),!1)),y})),v=this.after,g=He(Ue(Ue(Ue(Ue([],Ce(d),!1),Ce(p),!1),Ce(i),!1),Ce(f),!1).map(function(b){return Mt(b).map(function(y){return r.formatTransition(y)})}));try{for(var h=we(v),S=h.next();!S.done;S=h.next()){var E=S.value;g.push(E)}}catch(b){e={error:b}}finally{try{S&&!S.done&&(n=h.return)&&n.call(h)}finally{if(e)throw e.error}}return g},t}();function vm(t,e,n){return n===void 0&&(n=t.context),new gm(t,e,n)}var mm=qv,Is;(function(t){t[t.Effect=1]="Effect",t[t.LayoutEffect=2]="LayoutEffect"})(Is||(Is={}));var Vr=u.useLayoutEffect;function Bl(t){var e=de.useRef();return e.current||(e.current={v:t()}),e.current.v}var ym=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},bm=globalThis&&globalThis.__values||function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function wm(t,e){var n,r,i=ym([[],[]],2),o=i[0],s=i[1];try{for(var a=bm(t),l=a.next();!l.done;l=a.next()){var c=l.value;e(c)?o.push(c):s.push(c)}}catch(f){n={error:f}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[o,s]}var Cr=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Ul=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))};function Vl(t,e){var n=t.exec,r=n(e.context,e._event.data,{action:t,state:e,_event:e._event});r()}function Sm(t){var e=u.useRef([]),n=u.useRef([]);Vr(function(){var r=t.subscribe(function(i){var o,s;if(i.actions.length){var a=i.actions.filter(function(d){return typeof d.exec=="function"&&"__effect"in d.exec}),l=Cr(wm(a,function(d){return d.exec.__effect===Is.Effect}),2),c=l[0],f=l[1];(o=e.current).push.apply(o,Ul([],Cr(c.map(function(d){return[d,i]})),!1)),(s=n.current).push.apply(s,Ul([],Cr(f.map(function(d){return[d,i]})),!1))}});return function(){r.unsubscribe()}},[]),Vr(function(){for(;n.current.length;){var r=Cr(n.current.shift(),2),i=r[0],o=r[1];Vl(i,o)}}),u.useEffect(function(){for(;e.current.length;){var r=Cr(e.current.shift(),2),i=r[0],o=r[1];Vl(i,o)}})}var Fr=globalThis&&globalThis.__assign||function(){return Fr=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Fr.apply(this,arguments)},Em=globalThis&&globalThis.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};globalThis&&globalThis.__read;function Lm(t,e,n){if(typeof t=="object")return t;var r=function(){};return{next:t,error:e||r,complete:n||r}}function xm(t,e,n){e===void 0&&(e={});var r=Bl(function(){return typeof t=="function"?t():t}),i=e.context,o=e.guards,s=e.actions,a=e.activities,l=e.services,c=e.delays,f=e.state,d=Em(e,["context","guards","actions","activities","services","delays","state"]),p=Bl(function(){var v={context:i,guards:o,actions:s,activities:a,services:l,delays:c},g=r.withConfig(v,function(){return Fr(Fr({},r.context),i)});return Ku(g,Fr({deferEvents:!0},d))});return Vr(function(){var v;return n&&(v=p.subscribe(Lm(n))),function(){v==null||v.unsubscribe()}},[n]),Vr(function(){return p.start(f?St.create(f):void 0),function(){p.stop()}},[]),Vr(function(){Object.assign(p.machine.options.actions,s),Object.assign(p.machine.options.guards,o),Object.assign(p.machine.options.activities,a),Object.assign(p.machine.options.services,l),Object.assign(p.machine.options.delays,c)},[s,o,a,l,c]),Sm(p),p}var Cm=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o};globalThis&&globalThis.__spreadArray;function _m(t,e){e===void 0&&(e={});var n=u.useCallback(function(a){var l=a.changed===void 0&&Object.keys(a.children).length;(a.changed||l)&&s(a)},[]),r=xm(t,e,n),i=Cm(u.useState(function(){var a=r.machine.initialState;return e.state?St.create(e.state):a}),2),o=i[0],s=i[1];return[o,r.send,r]}function Ge(){return Ge=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ge.apply(this,arguments)}function er(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}const ge={arr:Array.isArray,obj:t=>Object.prototype.toString.call(t)==="[object Object]",fun:t=>typeof t=="function",str:t=>typeof t=="string",num:t=>typeof t=="number",und:t=>t===void 0,nul:t=>t===null,set:t=>t instanceof Set,map:t=>t instanceof Map,equ(t,e){if(typeof t!=typeof e)return!1;if(ge.str(t)||ge.num(t))return t===e;if(ge.obj(t)&&ge.obj(e)&&Object.keys(t).length+Object.keys(e).length===0)return!0;let n;for(n in t)if(!(n in e))return!1;for(n in e)if(t[n]!==e[n])return!1;return ge.und(n)?t===e:!0}};function Om(t,e){return e===void 0&&(e=!0),n=>(ge.arr(n)?n:Object.keys(n)).reduce((r,i)=>{const o=e?i[0].toLowerCase()+i.substring(1):i;return r[o]=t(o),r},t)}function Mm(){const t=u.useState(!1),e=t[1];return u.useCallback(()=>e(r=>!r),[])}function _n(t,e){return ge.und(t)||ge.nul(t)?e:t}function xi(t){return ge.und(t)?[]:ge.arr(t)?t:[t]}function Qn(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return ge.fun(t)?t(...n):t}function Pm(t){return t.to,t.from,t.config,t.onStart,t.onRest,t.onFrame,t.children,t.reset,t.reverse,t.force,t.immediate,t.delay,t.attach,t.destroyed,t.interpolateTo,t.ref,t.lazy,er(t,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}function es(t){const e=Pm(t);if(ge.und(e))return Ge({to:e},t);const n=Object.keys(t).reduce((r,i)=>ge.und(e[i])?Ge({},r,{[i]:t[i]}):r,{});return Ge({to:e},n)}function km(t,e){return e&&(ge.fun(e)?e(t):ge.obj(e)&&(e.current=t)),t}class Rt{constructor(){this.payload=void 0,this.children=[]}getAnimatedValue(){return this.getValue()}getPayload(){return this.payload||this}attach(){}detach(){}getChildren(){return this.children}addChild(e){this.children.length===0&&this.attach(),this.children.push(e)}removeChild(e){const n=this.children.indexOf(e);this.children.splice(n,1),this.children.length===0&&this.detach()}}class js extends Rt{constructor(){super(...arguments),this.payload=[],this.attach=()=>this.payload.forEach(e=>e instanceof Rt&&e.addChild(this)),this.detach=()=>this.payload.forEach(e=>e instanceof Rt&&e.removeChild(this))}}class Ju extends Rt{constructor(){super(...arguments),this.payload={},this.attach=()=>Object.values(this.payload).forEach(e=>e instanceof Rt&&e.addChild(this)),this.detach=()=>Object.values(this.payload).forEach(e=>e instanceof Rt&&e.removeChild(this))}getValue(e){e===void 0&&(e=!1);const n={};for(const r in this.payload){const i=this.payload[r];e&&!(i instanceof Rt)||(n[r]=i instanceof Rt?i[e?"getAnimatedValue":"getValue"]():i)}return n}getAnimatedValue(){return this.getValue(!0)}}let da;function Rm(t,e){da={fn:t,transform:e}}let Yu;function Tm(t){Yu=t}let Qu=t=>typeof window<"u"?window.requestAnimationFrame(t):-1,vo;function Am(t){vo=t}let Xu=()=>Date.now(),Dm=t=>t.current,ef;function Im(t){ef=t}class jm extends Ju{constructor(e,n){super(),this.update=void 0,this.payload=e.style?Ge({},e,{style:ef(e.style)}):e,this.update=n,this.attach()}}const Nm=t=>ge.fun(t)&&!(t.prototype instanceof u.Component),Bm=t=>u.forwardRef((n,r)=>{const i=Mm(),o=u.useRef(!0),s=u.useRef(null),a=u.useRef(null),l=u.useCallback(p=>{const v=s.current,g=()=>{let h=!1;a.current&&(h=da.fn(a.current,s.current.getAnimatedValue())),(!a.current||h===!1)&&i()};s.current=new jm(p,g),v&&v.detach()},[]);u.useEffect(()=>()=>{o.current=!1,s.current&&s.current.detach()},[]),u.useImperativeHandle(r,()=>Dm(a)),l(n);const c=s.current.getValue();c.scrollTop,c.scrollLeft;const f=er(c,["scrollTop","scrollLeft"]),d=Nm(t)?void 0:p=>a.current=km(p,r);return u.createElement(t,Ge({},f,{ref:d}))});let zr=!1;const Tn=new Set,tf=()=>{if(!zr)return!1;let t=Xu();for(let e of Tn){let n=!1;for(let r=0;r<e.configs.length;r++){let i=e.configs[r],o,s;for(let a=0;a<i.animatedValues.length;a++){let l=i.animatedValues[a];if(l.done)continue;let c=i.fromValues[a],f=i.toValues[a],d=l.lastPosition,p=f instanceof Rt,v=Array.isArray(i.initialVelocity)?i.initialVelocity[a]:i.initialVelocity;if(p&&(f=f.getValue()),i.immediate){l.setValue(f),l.done=!0;continue}if(typeof c=="string"||typeof f=="string"){l.setValue(f),l.done=!0;continue}if(i.duration!==void 0)d=c+i.easing((t-l.startTime)/i.duration)*(f-c),o=t>=l.startTime+i.duration;else if(i.decay)d=c+v/(1-.998)*(1-Math.exp(-(1-.998)*(t-l.startTime))),o=Math.abs(l.lastPosition-d)<.1,o&&(f=d);else{s=l.lastTime!==void 0?l.lastTime:t,v=l.lastVelocity!==void 0?l.lastVelocity:i.initialVelocity,t>s+64&&(s=t);let g=Math.floor(t-s);for(let b=0;b<g;++b){let y=-i.tension*(d-f),x=-i.friction*v,L=(y+x)/i.mass;v=v+L*1/1e3,d=d+v*1/1e3}let h=i.clamp&&i.tension!==0?c<f?d>f:d<f:!1,S=Math.abs(v)<=i.precision,E=i.tension!==0?Math.abs(f-d)<=i.precision:!0;o=h||S&&E,l.lastVelocity=v,l.lastTime=t}p&&!i.toValues[a].done&&(o=!1),o?(l.value!==f&&(d=f),l.done=!0):n=!0,l.setValue(d),l.lastPosition=d}e.props.onFrame&&(e.values[i.name]=i.interpolation.getValue())}e.props.onFrame&&e.props.onFrame(e.values),n||(Tn.delete(e),e.stop(!0))}return Tn.size?Qu(tf):zr=!1,zr},Um=t=>{Tn.has(t)||Tn.add(t),zr||(zr=!0,Qu(tf))},Vm=t=>{Tn.has(t)&&Tn.delete(t)};function mo(t,e,n){if(typeof t=="function")return t;if(Array.isArray(t))return mo({range:t,output:e,extrapolate:n});if(vo&&typeof t.output[0]=="string")return vo(t);const r=t,i=r.output,o=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||(c=>c);return c=>{const f=zm(c,o);return Fm(c,o[f],o[f+1],i[f],i[f+1],l,s,a,r.map)}}function Fm(t,e,n,r,i,o,s,a,l){let c=l?l(t):t;if(c<e){if(s==="identity")return c;s==="clamp"&&(c=e)}if(c>n){if(a==="identity")return c;a==="clamp"&&(c=n)}return r===i?r:e===n?t<=e?r:i:(e===-1/0?c=-c:n===1/0?c=c-e:c=(c-e)/(n-e),c=o(c),r===-1/0?c=-c:i===1/0?c=c+r:c=c*(i-r)+r,c)}function zm(t,e){for(var n=1;n<e.length-1&&!(e[n]>=t);++n);return n-1}class ar extends js{constructor(e,n,r,i){super(),this.calc=void 0,this.payload=e instanceof js&&!(e instanceof ar)?e.getPayload():Array.isArray(e)?e:[e],this.calc=mo(n,r,i)}getValue(){return this.calc(...this.payload.map(e=>e.getValue()))}updateConfig(e,n,r){this.calc=mo(e,n,r)}interpolate(e,n,r){return new ar(this,e,n,r)}}const Gn=(t,e,n)=>t&&new ar(t,e,n),$m={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}};function nf(t,e){"update"in t?e.add(t):t.getChildren().forEach(n=>nf(n,e))}class Ns extends Rt{constructor(e){var n;super(),n=this,this.animatedStyles=new Set,this.value=void 0,this.startPosition=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.startTime=void 0,this.lastTime=void 0,this.done=!1,this.setValue=function(r,i){i===void 0&&(i=!0),n.value=r,i&&n.flush()},this.value=e,this.startPosition=e,this.lastPosition=e}flush(){this.animatedStyles.size===0&&nf(this,this.animatedStyles),this.animatedStyles.forEach(e=>e.update())}clearStyles(){this.animatedStyles.clear()}getValue(){return this.value}interpolate(e,n,r){return new ar(this,e,n,r)}}class Hm extends js{constructor(e){super(),this.payload=e.map(n=>new Ns(n))}setValue(e,n){n===void 0&&(n=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((r,i)=>this.payload[i].setValue(r,n)):this.payload.forEach(r=>r.setValue(e,n))}getValue(){return this.payload.map(e=>e.getValue())}interpolate(e,n){return new ar(this,e,n)}}let Gm=0,Wm=class{constructor(){this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=()=>this.interpolations,this.id=Gm++}update(e){if(!e)return this;const n=es(e),r=n.delay,i=r===void 0?0:r,o=n.to,s=er(n,["delay","to"]);if(ge.arr(o)||ge.fun(o))this.queue.push(Ge({},s,{delay:i,to:o}));else if(o){let a={};Object.entries(o).forEach(l=>{let c=l[0],f=l[1];const d=Ge({to:{[c]:f},delay:Qn(i,c)},s),p=a[d.delay]&&a[d.delay].to;a[d.delay]=Ge({},a[d.delay],d,{to:Ge({},p,d.to)})}),this.queue=Object.values(a)}return this.queue=this.queue.sort((a,l)=>a.delay-l.delay),this.diff(s),this}start(e){if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach(i=>{let o=i.from,s=o===void 0?{}:o,a=i.to,l=a===void 0?{}:a;ge.obj(s)&&(this.merged=Ge({},s,this.merged)),ge.obj(l)&&(this.merged=Ge({},this.merged,l))});const n=this.local=++this.guid,r=this.localQueue=this.queue;this.queue=[],r.forEach((i,o)=>{let s=i.delay,a=er(i,["delay"]);const l=f=>{o===r.length-1&&n===this.guid&&f&&(this.idle=!0,this.props.onRest&&this.props.onRest(this.merged)),e&&e()};let c=ge.arr(a.to)||ge.fun(a.to);s?setTimeout(()=>{n===this.guid&&(c?this.runAsync(a,l):this.diff(a).start(l))},s):c?this.runAsync(a,l):this.diff(a).start(l)})}else ge.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),Um(this);return this}stop(e){return this.listeners.forEach(n=>n(e)),this.listeners=[],this}pause(e){return this.stop(!0),e&&Vm(this),this}runAsync(e,n){var r=this;e.delay;let i=er(e,["delay"]);const o=this.local;let s=Promise.resolve(void 0);if(ge.arr(i.to))for(let a=0;a<i.to.length;a++){const l=a,c=Ge({},i,es(i.to[l]));ge.arr(c.config)&&(c.config=c.config[l]),s=s.then(()=>{if(o===this.guid)return new Promise(f=>this.diff(c).start(f))})}else if(ge.fun(i.to)){let a=0,l;s=s.then(()=>i.to(c=>{const f=Ge({},i,es(c));if(ge.arr(f.config)&&(f.config=f.config[a]),a++,o===this.guid)return l=new Promise(d=>this.diff(f).start(d))},function(c){return c===void 0&&(c=!0),r.stop(c)}).then(()=>l))}s.then(n)}diff(e){this.props=Ge({},this.props,e);let n=this.props,r=n.from,i=r===void 0?{}:r,o=n.to,s=o===void 0?{}:o,a=n.config,l=a===void 0?{}:a,c=n.reverse,f=n.attach,d=n.reset,p=n.immediate;if(c){var v=[s,i];i=v[0],s=v[1]}this.merged=Ge({},i,this.merged,s),this.hasChanged=!1;let g=f&&f(this);if(this.animations=Object.entries(this.merged).reduce((h,S)=>{let E=S[0],b=S[1],y=h[E]||{};const x=ge.num(b),L=ge.str(b)&&!b.startsWith("#")&&!/\d/.test(b)&&!Yu[b],m=ge.arr(b),w=!x&&!m&&!L;let _=ge.und(i[E])?b:i[E],P=x||m||L?b:1,M=Qn(l,E);g&&(P=g.animations[E].parent);let O=y.parent,k=y.interpolation,I=xi(g?P.getPayload():P),B,H=b;w&&(H=vo({range:[0,1],output:[b,b]})(1));let Z=k&&k.getValue();const K=!ge.und(O)&&y.animatedValues.some(V=>!V.done),A=!ge.equ(H,Z),R=!ge.equ(H,y.previous),T=!ge.equ(M,y.config);if(d||R&&A||T){if(x||L)O=k=y.parent||new Ns(_);else if(m)O=k=y.parent||new Hm(_);else if(w){let V=y.interpolation&&y.interpolation.calc(y.parent.value);V=V!==void 0&&!d?V:_,y.parent?(O=y.parent,O.setValue(0,!1)):O=new Ns(0);const z={output:[V,b]};y.interpolation?(k=y.interpolation,y.interpolation.updateConfig(z)):k=O.interpolate(z)}return I=xi(g?P.getPayload():P),B=xi(O.getPayload()),d&&!w&&O.setValue(_,!1),this.hasChanged=!0,B.forEach(V=>{V.startPosition=V.value,V.lastPosition=V.value,V.lastVelocity=K?V.lastVelocity:void 0,V.lastTime=K?V.lastTime:void 0,V.startTime=Xu(),V.done=!1,V.animatedStyles.clear()}),Qn(p,E)&&O.setValue(w?P:b,!1),Ge({},h,{[E]:Ge({},y,{name:E,parent:O,interpolation:k,animatedValues:B,toValues:I,previous:H,config:M,fromValues:xi(O.getValue()),immediate:Qn(p,E),initialVelocity:_n(M.velocity,0),clamp:_n(M.clamp,!1),precision:_n(M.precision,.01),tension:_n(M.tension,170),friction:_n(M.friction,26),mass:_n(M.mass,1),duration:M.duration,easing:_n(M.easing,V=>V),decay:M.decay})})}else return A?h:(w&&(O.setValue(1,!1),k.updateConfig({output:[H,H]})),O.done=!0,this.hasChanged=!0,Ge({},h,{[E]:Ge({},h[E],{previous:H})}))},this.animations),this.hasChanged){this.configs=Object.values(this.animations),this.values={},this.interpolations={};for(let h in this.animations)this.interpolations[h]=this.animations[h].interpolation,this.values[h]=this.animations[h].interpolation.getValue()}return this}destroy(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0}};const Zm=(t,e)=>{const n=u.useRef(!1),r=u.useRef(),i=ge.fun(e),o=u.useMemo(()=>{r.current&&(r.current.map(d=>d.destroy()),r.current=void 0);let f;return[new Array(t).fill().map((d,p)=>{const v=new Wm,g=i?Qn(e,p,v):e[p];return p===0&&(f=g.ref),v.update(g),f||v.start(),v}),f]},[t]),s=o[0],a=o[1];r.current=s,u.useImperativeHandle(a,()=>({start:()=>Promise.all(r.current.map(f=>new Promise(d=>f.start(d)))),stop:f=>r.current.forEach(d=>d.stop(f)),get controllers(){return r.current}}));const l=u.useMemo(()=>f=>r.current.map((d,p)=>{d.update(i?Qn(f,p,d):f[p]),a||d.start()}),[t]);u.useEffect(()=>{n.current?i||l(e):a||r.current.forEach(f=>f.start())}),u.useEffect(()=>(n.current=!0,()=>r.current.forEach(f=>f.destroy())),[]);const c=r.current.map(f=>f.getValues());return i?[c,l,f=>r.current.forEach(d=>d.pause(f))]:c},qm=t=>{const e=ge.fun(t),n=Zm(1,e?t:[t]),r=n[0],i=n[1],o=n[2];return e?[r[0],i,o]:r};class Km extends Ju{constructor(e){e===void 0&&(e={}),super(),e.transform&&!(e.transform instanceof Rt)&&(e=da.transform(e)),this.payload=e}}const yo={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Tt="[-+]?\\d*\\.?\\d+",bo=Tt+"%";function To(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}const Jm=new RegExp("rgb"+To(Tt,Tt,Tt)),Ym=new RegExp("rgba"+To(Tt,Tt,Tt,Tt)),Qm=new RegExp("hsl"+To(Tt,bo,bo)),Xm=new RegExp("hsla"+To(Tt,bo,bo,Tt)),ey=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ty=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ny=/^#([0-9a-fA-F]{6})$/,ry=/^#([0-9a-fA-F]{8})$/;function iy(t){let e;return typeof t=="number"?t>>>0===t&&t>=0&&t<=4294967295?t:null:(e=ny.exec(t))?parseInt(e[1]+"ff",16)>>>0:yo.hasOwnProperty(t)?yo[t]:(e=Jm.exec(t))?(Wn(e[1])<<24|Wn(e[2])<<16|Wn(e[3])<<8|255)>>>0:(e=Ym.exec(t))?(Wn(e[1])<<24|Wn(e[2])<<16|Wn(e[3])<<8|$l(e[4]))>>>0:(e=ey.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+"ff",16)>>>0:(e=ry.exec(t))?parseInt(e[1],16)>>>0:(e=ty.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+e[4]+e[4],16)>>>0:(e=Qm.exec(t))?(Fl(zl(e[1]),Ci(e[2]),Ci(e[3]))|255)>>>0:(e=Xm.exec(t))?(Fl(zl(e[1]),Ci(e[2]),Ci(e[3]))|$l(e[4]))>>>0:null}function ts(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Fl(t,e,n){const r=n<.5?n*(1+e):n+e-n*e,i=2*n-r,o=ts(i,r,t+1/3),s=ts(i,r,t),a=ts(i,r,t-1/3);return Math.round(o*255)<<24|Math.round(s*255)<<16|Math.round(a*255)<<8}function Wn(t){const e=parseInt(t,10);return e<0?0:e>255?255:e}function zl(t){return(parseFloat(t)%360+360)%360/360}function $l(t){const e=parseFloat(t);return e<0?0:e>1?255:Math.round(e*255)}function Ci(t){const e=parseFloat(t);return e<0?0:e>100?1:e/100}function Hl(t){let e=iy(t);if(e===null)return t;e=e||0;let n=(e&4278190080)>>>24,r=(e&16711680)>>>16,i=(e&65280)>>>8,o=(e&255)/255;return`rgba(${n}, ${r}, ${i}, ${o})`}const _i=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,oy=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,sy=new RegExp(`(${Object.keys(yo).join("|")})`,"g"),ay=t=>{const e=t.output.map(i=>i.replace(oy,Hl)).map(i=>i.replace(sy,Hl)),n=e[0].match(_i).map(()=>[]);e.forEach(i=>{i.match(_i).forEach((o,s)=>n[s].push(+o))});const r=e[0].match(_i).map((i,o)=>mo(Ge({},t,{output:n[o]})));return i=>{let o=0;return e[0].replace(_i,()=>r[o++](i)).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(s,a,l,c,f)=>`rgba(${Math.round(a)}, ${Math.round(l)}, ${Math.round(c)}, ${f})`)}};let $r={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};const ly=(t,e)=>t+e.charAt(0).toUpperCase()+e.substring(1),cy=["Webkit","Ms","Moz","O"];$r=Object.keys($r).reduce((t,e)=>(cy.forEach(n=>t[ly(n,e)]=t[e]),t),$r);function uy(t,e,n){return e==null||typeof e=="boolean"||e===""?"":!n&&typeof e=="number"&&e!==0&&!($r.hasOwnProperty(t)&&$r[t])?e+"px":(""+e).trim()}const Gl={};Im(t=>new Km(t));Am(ay);Tm(yo);Rm((t,e)=>{if(t.nodeType&&t.setAttribute!==void 0){const i=e.style,o=e.children,s=e.scrollTop,a=e.scrollLeft,l=er(e,["style","children","scrollTop","scrollLeft"]),c=t.nodeName==="filter"||t.parentNode&&t.parentNode.nodeName==="filter";s!==void 0&&(t.scrollTop=s),a!==void 0&&(t.scrollLeft=a),o!==void 0&&(t.textContent=o);for(let f in i)if(i.hasOwnProperty(f)){var n=f.indexOf("--")===0,r=uy(f,i[f],n);f==="float"&&(f="cssFloat"),n?t.style.setProperty(f,r):t.style[f]=r}for(let f in l){const d=c?f:Gl[f]||(Gl[f]=f.replace(/([A-Z])/g,p=>"-"+p.toLowerCase()));typeof t.getAttribute(d)<"u"&&t.setAttribute(d,l[f])}return}else return!1},t=>t);const fy=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],dy=Om(Bm,!1),py=dy(fy);function Wl(t,e){return t.map(function(n,r){return n+e[r]})}function rf(t,e){return t.map(function(n,r){return n-e[r]})}function Bs(t){return Math.hypot.apply(Math,t)}function hy(t,e,n){var r=Bs(e),i=r===0?0:1/r,o=n===0?0:1/n,s=o*r,a=e.map(function(f){return o*f}),l=e.map(function(f){return i*f}),c=Bs(t);return{velocities:a,velocity:s,distance:c,direction:l}}function Us(t){return Math.sign?Math.sign(t):+(t>0)-+(t<0)||+t}function gy(t,e,n){return Math.max(e,Math.min(t,n))}function vy(t,e){return Math.pow(t,e*5)}function Zl(t,e,n){return e===0||Math.abs(e)===1/0?vy(t,n):t*e*n/(e+n*t)}function Hr(t,e,n,r){return r===void 0&&(r=.15),r===0?gy(t,e,n):t<e?-Zl(e-t,n-e,r)+e:t>n?+Zl(t-n,n-e,r)+n:t}function ql(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,r.key,r)}}function my(t,e,n){return e&&ql(t.prototype,e),n&&ql(t,n),t}function ut(){return ut=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ut.apply(this,arguments)}function of(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function yy(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Oi(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function by(t,e){if(t){if(typeof t=="string")return Kl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Kl(t,e)}}function Kl(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ao(t,e){var n;if(typeof Symbol>"u"||t[Symbol.iterator]==null){if(Array.isArray(t)||(n=by(t))||e&&t&&typeof t.length=="number"){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.
|
|
90
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return n=t[Symbol.iterator](),n.next.bind(n)}function sf(){}function af(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.length===0?sf:e.length===1?e[0]:function(){for(var r,i=Ao(e),o;!(o=i()).done;){var s=o.value;r=s.apply(this,arguments)||r}return r}}function pn(t,e){if(t===void 0){if(e===void 0)throw new Error("Must define fallback value if undefined is expected");t=e}return Array.isArray(t)?t:[t,t]}function Mi(t){if(typeof t=="function"){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return t.apply(void 0,n)}else return t}function pa(t,e){t===void 0&&(t={});for(var n={},r=0,i=Object.entries(e);r<i.length;r++){var o=i[r],s=o[0],a=o[1];switch(typeof a){case"function":n[s]=a.call(n,t[s],s,t);break;case"object":n[s]=pa(t[s],a);break;case"boolean":a&&(n[s]=t[s]);break}}return n}var wy=180,Sy=.15,Ey=.5,Ly=60,xy={threshold:function(e){return e===void 0&&(e=0),pn(e)},rubberband:function(e){switch(e===void 0&&(e=0),e){case!0:return pn(Sy);case!1:return pn(0);default:return pn(e)}},enabled:function(e){return e===void 0&&(e=!0),e},triggerAllEvents:function(e){return e===void 0&&(e=!1),e},initial:function(e){return e===void 0&&(e=0),typeof e=="function"?e:pn(e)}},lf=ut({},xy,{axis:!0,lockDirection:function(e){return e===void 0&&(e=!1),e},bounds:function(e){if(e===void 0&&(e={}),typeof e=="function")return function(d){return lf.bounds(e(d))};var n=e,r=n.left,i=r===void 0?-1/0:r,o=n.right,s=o===void 0?1/0:o,a=n.top,l=a===void 0?-1/0:a,c=n.bottom,f=c===void 0?1/0:c;return[[i,s],[l,f]]}}),Cy=typeof window<"u"&&window.document&&window.document.createElement,_y={enabled:function(e){return e===void 0&&(e=!0),e},domTarget:!0,window:function(t){function e(n){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(t){return t===void 0&&(t=Cy?window:void 0),t}),eventOptions:function(e){var n=e===void 0?{}:e,r=n.passive,i=r===void 0?!0:r,o=n.capture,s=o===void 0?!1:o;return{passive:i,capture:s}}},Oy=ut({},lf,{threshold:function(e,n,r){var i=r.filterTaps,o=i===void 0?!1:i,s=r.lockDirection,a=s===void 0?!1:s,l=r.axis,c=l===void 0?void 0:l,f=pn(e,o?3:a||c?1:0);return this.filterTaps=o||f[0]+f[1]>0,f},swipeVelocity:function(e){return e===void 0&&(e=Ey),pn(e)},swipeDistance:function(e){return e===void 0&&(e=Ly),pn(e)},delay:function(e){switch(e===void 0&&(e=0),e){case!0:return wy;case!1:return 0;default:return e}}});function My(t){return t===void 0&&(t={}),pa(t,_y)}function Py(t){return t===void 0&&(t={}),pa(t,Oy)}function ky(t){var e=t.domTarget,n=t.eventOptions,r=t.window,i=t.enabled,o=yy(t,["domTarget","eventOptions","window","enabled"]),s=My({domTarget:e,eventOptions:n,window:r,enabled:i});return s.drag=Py(o),s}function _r(t){return ut({_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_bounds:[[-1/0,1/0],[-1/0,1/0]],_lastEventType:void 0,event:void 0,intentional:!1,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:sf,canceled:!1,memo:void 0,args:void 0},t)}function cf(){var t={hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1},e=_r({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0,_isTap:!0,_delayedEvent:!1,_pointerId:void 0,tap:!1,swipe:[0,0]}),n=_r({da:[0,0],vdva:[0,0],origin:void 0,turns:0}),r=_r({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),i=_r({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),o=_r({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0});return{shared:t,drag:e,pinch:n,wheel:r,move:i,scroll:o}}var Mn=new Map,Ry=function(){function t(n,r){var i=this;r===void 0&&(r=[]),this.controller=n,this.args=r,this.debounced=!0,this.setTimeout=function(o,s){var a;s===void 0&&(s=140),clearTimeout(i.controller.timeouts[i.stateKey]);for(var l=arguments.length,c=new Array(l>2?l-2:0),f=2;f<l;f++)c[f-2]=arguments[f];i.controller.timeouts[i.stateKey]=(a=window).setTimeout.apply(a,[o,s].concat(c))},this.clearTimeout=function(){clearTimeout(i.controller.timeouts[i.stateKey])},this.fireGestureHandler=function(o){if(o===void 0&&(o=!1),i.state._blocked)return i.debounced||(i.state._active=!1,i.clean()),null;if(!o&&!i.state.intentional&&!i.config.triggerAllEvents)return null;if(i.state.intentional){var s=i.state.active,a=i.state._active;i.state.active=a,i.state.first=a&&!s,i.state.last=s&&!a,i.controller.state.shared[i.ingKey]=a}var l=ut({},i.controller.state.shared,i.state,i.mapStateValues(i.state)),c=i.handler(l);return i.state.memo=c!==void 0?c:i.state.memo,i.state._active||i.clean(),l}}var e=t.prototype;return e.updateSharedState=function(r){Object.assign(this.controller.state.shared,r)},e.updateGestureState=function(r){Object.assign(this.state,r)},e.checkIntentionality=function(r,i){return{_intentional:r,_blocked:!1}},e.getMovement=function(r){var i=this.config,o=i.initial,s=i.bounds,a=i.rubberband,l=i.threshold,c=this.state,f=c._bounds,d=c._initial,p=c._active,v=c._intentional,g=c.lastOffset,h=c.movement,S=this.getInternalMovement(r,this.state),E=v[0]===!1?Jl(S[0],l[0]):v[0],b=v[1]===!1?Jl(S[1],l[1]):v[1],y=this.checkIntentionality([E,b],S);if(y._blocked)return ut({},y,{_movement:S,delta:[0,0]});var x=y._intentional,L=S,m,w;if(x[0]!==!1&&v[0]===!1&&(w=Mi(o,this.state),m=Mi(s,this.state),d[0]=w[0],f[0]=m[0]),x[1]!==!1&&v[1]===!1){var _,P;w=(_=w)!=null?_:Mi(o,this.state),m=(P=m)!=null?P:Mi(s,this.state),d[1]=w[1],f[1]=m[1]}var M=[x[0]!==!1?S[0]-x[0]:d[0],x[1]!==!1?S[1]-x[1]:d[1]],O=Wl(M,g),k=p?a:[0,0];return M=Yl(f,Wl(M,d),k),ut({},y,{intentional:x[0]!==!1||x[1]!==!1,_initial:d,_movement:L,movement:M,values:r,offset:Yl(f,O,k),delta:rf(M,h)})},e.clean=function(){this.clearTimeout()},my(t,[{key:"config",get:function(){return this.controller.config[this.stateKey]}},{key:"enabled",get:function(){return this.controller.config.enabled&&this.config.enabled}},{key:"state",get:function(){return this.controller.state[this.stateKey]}},{key:"handler",get:function(){return this.controller.handlers[this.stateKey]}}]),t}();function Jl(t,e){return Math.abs(t)>=e?Us(t)*e:!1}function Yl(t,e,n){var r=e[0],i=e[1],o=n[0],s=n[1],a=t[0],l=a[0],c=a[1],f=t[1],d=f[0],p=f[1];return[Hr(r,l,c,o),Hr(i,d,p,s)]}function ns(t,e,n){var r=t.state,i=t.args,o=e.timeStamp,s=e.type,a=r.values,l=n?0:o-r.startTime;return{_lastEventType:s,event:e,timeStamp:o,elapsedTime:l,args:i,previous:a}}function Ty(t,e,n){var r=t.state.offset,i=n.timeStamp;return ut({},cf()[t.stateKey],{_active:!0,values:e,initial:e,offset:r,lastOffset:r,startTime:i})}function Ay(t,e){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return t.call.apply(t,[this,ut({},e,{event:n})].concat(i))}}var Dy=function(e){var n=this;this.classes=e,this.bind=function(){for(var r={},i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];for(var a=Ao(n.classes),l;!(l=a()).done;){var c=l.value;new c(n,o).addBindings(r)}for(var f=0,d=Object.entries(n.nativeRefs);f<d.length;f++){var p=d[f],v=p[0],g=p[1];Vs(r,v,Ay(g,ut({},n.state.shared,{args:o})))}return n.config.domTarget?By(n,r):Uy(n,r)},this.effect=function(){return n.config.domTarget&&n.bind(),n.clean},this.clean=function(){var r=ff(n.config),i=n.config.eventOptions;r&&li(r,uf(n.domListeners),i),Object.values(n.timeouts).forEach(clearTimeout),Iy(n)},this.state=cf(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function Iy(t){var e=t.config,n=e.window,r=e.eventOptions,i=t.windowListeners;if(n){for(var o in i){var s=i[o];li(n,s,r)}t.windowListeners={}}}function jy(t,e){var n=t.config,r=t.windowListeners;n.window&&(li(n.window,r[e],n.eventOptions),delete r[e])}function Ny(t,e,n){var r=t.config,i=t.windowListeners;n===void 0&&(n=[]),r.window&&(li(r.window,i[e],r.eventOptions),df(r.window,i[e]=n,r.eventOptions))}function By(t,e){var n=t.config,r=t.domListeners,i=ff(n);if(!i)throw new Error("domTarget must be defined");var o=n.eventOptions;li(i,uf(r),o);for(var s=0,a=Object.entries(e);s<a.length;s++){var l=a[s],c=l[0],f=l[1],d=c.slice(2).toLowerCase();r.push([d,af.apply(void 0,f)])}df(i,r,o)}function Uy(t,e){for(var n=t.config,r={},i=n.eventOptions.capture?"Capture":"",o=0,s=Object.entries(e);o<s.length;o++){var a=s[o],l=a[0],c=a[1],f=Array.isArray(c)?c:[c],d=l+i;r[d]=af.apply(void 0,f)}return r}function uf(t){return t===void 0&&(t=[]),t.splice(0,t.length)}function ff(t){var e=t.domTarget;return e&&"current"in e?e.current:e}function Vs(t,e,n){t[e]||(t[e]=[]),t[e].push(n)}function df(t,e,n){e===void 0&&(e=[]),n===void 0&&(n={});for(var r=Ao(e),i;!(i=r()).done;){var o=i.value,s=o[0],a=o[1];t.addEventListener(s,a,n)}}function li(t,e,n){e===void 0&&(e=[]),n===void 0&&(n={});for(var r=Ao(e),i;!(i=r()).done;){var o=i.value,s=o[0],a=o[1];t.removeEventListener(s,a,n)}}function Vy(t,e,n){n===void 0&&(n={});var r=zy(t),i=u.useMemo(function(){return new Dy(r)},[]);return i.config=e,i.handlers=t,i.nativeRefs=n,u.useEffect(i.effect,[]),i.config.domTarget?Fy:i.bind}function Fy(){}function zy(t){var e=new Set;return t.drag&&e.add(Mn.get("drag")),t.wheel&&e.add(Mn.get("wheel")),t.scroll&&e.add(Mn.get("scroll")),t.move&&e.add(Mn.get("move")),t.pinch&&e.add(Mn.get("pinch")),t.hover&&e.add(Mn.get("hover")),e}var $y=function(t){of(e,t);function e(){return t.apply(this,arguments)||this}var n=e.prototype;return n.getInternalMovement=function(i,o){return rf(i,o.initial)},n.checkIntentionality=function(i,o){if(i[0]===!1&&i[1]===!1)return{_intentional:i,axis:this.state.axis};var s=o.map(Math.abs),a=s[0],l=s[1],c=this.state.axis||(a>l?"x":a<l?"y":void 0);return!this.config.axis&&!this.config.lockDirection?{_intentional:i,_blocked:!1,axis:c}:c?this.config.axis&&c!==this.config.axis?{_intentional:i,_blocked:!0,axis:c}:(i[c==="x"?1:0]=!1,{_intentional:i,_blocked:!1,axis:c}):{_intentional:[!1,!1],_blocked:!1,axis:c}},n.getKinematics=function(i,o){var s=this.getMovement(i);if(!s._blocked){var a=o.timeStamp-this.state.timeStamp;Object.assign(s,hy(s.movement,s.delta,a))}return s},n.mapStateValues=function(i){return{xy:i.values,vxvy:i.velocities}},e}(Ry);function pf(t){if("touches"in t){var e=t.targetTouches,n=t.changedTouches;return e.length>0?e:n}return null}function Ql(t){var e="buttons"in t?t.buttons:0,n=pf(t),r=n&&n.length||0,i=r>0||e>0,o=t.shiftKey,s=t.altKey,a=t.metaKey,l=t.ctrlKey;return{touches:r,down:i,buttons:e,shiftKey:o,altKey:s,metaKey:a,ctrlKey:l}}function Xl(t){var e=pf(t),n=e?e[0]:t,r=n.clientX,i=n.clientY;return[r,i]}var Hy=3,Gy=220,Wy=function(t){of(e,t);function e(){var r;return r=t.apply(this,arguments)||this,r.ingKey="dragging",r.stateKey="drag",r.onDragStart=function(i){!r.enabled||r.state._active||(Ny(r.controller,r.stateKey,[["pointermove",r.onDragChange],["pointerup",r.onDragEnd],["pointercancel",r.onDragEnd]]),r.updateGestureState({_pointerId:i.pointerId}),r.config.delay>0?(r.state._delayedEvent=!0,"persist"in i&&typeof i.persist=="function"&&i.persist(),r.setTimeout(r.startDrag.bind(Oi(r)),r.config.delay,i)):r.startDrag(i))},r.onDragChange=function(i){if(!r.state.canceled&&i.pointerId===r.state._pointerId){if(!r.state._active){r.state._delayedEvent&&(r.clearTimeout(),r.startDrag(i));return}var o=Ql(i);if(!o.down){r.onDragEnd(i);return}r.updateSharedState(o);var s=Xl(i),a=r.getKinematics(s,i),l=ns(Oi(r),i),c=r.state._isTap,f=Bs(a._movement);c&&f>=Hy&&(c=!1),r.updateGestureState(ut({},l,a,{_isTap:c})),r.fireGestureHandler()}},r.onDragEnd=function(i){if(i.pointerId===r.state._pointerId){r.state._active=!1,r.updateSharedState({down:!1,buttons:0,touches:0});var o=r.state._isTap,s=r.state.velocities,a=s[0],l=s[1],c=r.state.movement,f=c[0],d=c[1],p=r.state._intentional,v=p[0],g=p[1],h=r.config.swipeVelocity,S=h[0],E=h[1],b=r.config.swipeDistance,y=b[0],x=b[1],L=ut({},ns(Oi(r),i),r.getMovement(r.state.values)),m=[0,0];L.elapsedTime<Gy&&(v!==!1&&Math.abs(a)>S&&Math.abs(f)>y&&(m[0]=Us(a)),g!==!1&&Math.abs(l)>E&&Math.abs(d)>x&&(m[1]=Us(l))),r.updateGestureState(ut({},L,{tap:o,swipe:m})),r.fireGestureHandler(o===!0)}},r.clean=function(){t.prototype.clean.call(Oi(r)),r.state._delayedEvent=!1,jy(r.controller,r.stateKey)},r.onCancel=function(){r.state.canceled||(r.updateGestureState({canceled:!0}),r.state._active=!1,r.updateSharedState({down:!1,buttons:0,touches:0}),requestAnimationFrame(function(){return r.fireGestureHandler()}))},r.onClick=function(i){r.state._isTap||i.stopPropagation()},r}var n=e.prototype;return n.startDrag=function(i){var o=Xl(i);this.updateSharedState(Ql(i)),this.updateGestureState(ut({},Ty(this,o,i),ns(this,i,!0),{_pointerId:i.pointerId,cancel:this.onCancel})),this.updateGestureState(this.getMovement(o)),this.fireGestureHandler()},n.addBindings=function(i){if(Vs(i,"onPointerDown",this.onDragStart),this.config.filterTaps){var o=this.controller.config.eventOptions.capture?"onClick":"onClickCapture";Vs(i,o,this.onClick)}},e}($y);function Zy(t,e){var n,r=[],i,o=!1;function s(){for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];return o&&n===this&&e(l,r)||(i=t.apply(this,l),o=!0,n=this,r=l),i}return s}function Ki(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var n,r,i;if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Ki(t[r],e[r]))return!1;return!0}var o;if(typeof Map=="function"&&t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(o=t.entries();!(r=o.next()).done;)if(!e.has(r.value[0]))return!1;for(o=t.entries();!(r=o.next()).done;)if(!Ki(r.value[1],e.get(r.value[0])))return!1;return!0}if(typeof Set=="function"&&t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(o=t.entries();!(r=o.next()).done;)if(!e.has(r.value[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[r]))return!1;if(typeof Element<"u"&&t instanceof Element)return!1;for(r=n;r--!==0;)if(!(i[r]==="_owner"&&t.$$typeof)&&!Ki(t[i[r]],e[i[r]]))return!1;return!0}return t!==t&&e!==e}function qy(t,e){try{return Ki(t,e)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}function Ky(t,e){e===void 0&&(e={}),Mn.set("drag",Wy);var n=u.useRef();return n.current||(n.current=Zy(ky,qy)),Vy({drag:t},n.current(e))}/*!
|
|
91
91
|
* tabbable 5.3.3
|
|
92
92
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
93
|
-
*/var hf=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],wo=hf.join(","),gf=typeof Element>"u",In=gf?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Fs=!gf&&Element.prototype.getRootNode?function(t){return t.getRootNode()}:function(t){return t.ownerDocument},vf=function(e,n,r){var i=Array.prototype.slice.apply(e.querySelectorAll(wo));return n&&In.call(e,wo)&&i.unshift(e),i=i.filter(r),i},mf=function t(e,n,r){for(var i=[],o=Array.from(e);o.length;){var s=o.shift();if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=t(l,!0,r);r.flatten?i.push.apply(i,c):i.push({scope:s,candidates:c})}else{var f=In.call(s,wo);f&&r.filter(s)&&(n||!e.includes(s))&&i.push(s);var d=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),p=!r.shadowRootFilter||r.shadowRootFilter(s);if(d&&p){var v=t(d===!0?s.children:d.children,!0,r);r.flatten?i.push.apply(i,v):i.push({scope:s,candidates:v})}else o.unshift.apply(o,s.children)}}return i},yf=function(e,n){return e.tabIndex<0&&(n||/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||e.isContentEditable)&&isNaN(parseInt(e.getAttribute("tabindex"),10))?0:e.tabIndex},
|
|
93
|
+
*/var hf=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],wo=hf.join(","),gf=typeof Element>"u",In=gf?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Fs=!gf&&Element.prototype.getRootNode?function(t){return t.getRootNode()}:function(t){return t.ownerDocument},vf=function(e,n,r){var i=Array.prototype.slice.apply(e.querySelectorAll(wo));return n&&In.call(e,wo)&&i.unshift(e),i=i.filter(r),i},mf=function t(e,n,r){for(var i=[],o=Array.from(e);o.length;){var s=o.shift();if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=t(l,!0,r);r.flatten?i.push.apply(i,c):i.push({scope:s,candidates:c})}else{var f=In.call(s,wo);f&&r.filter(s)&&(n||!e.includes(s))&&i.push(s);var d=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),p=!r.shadowRootFilter||r.shadowRootFilter(s);if(d&&p){var v=t(d===!0?s.children:d.children,!0,r);r.flatten?i.push.apply(i,v):i.push({scope:s,candidates:v})}else o.unshift.apply(o,s.children)}}return i},yf=function(e,n){return e.tabIndex<0&&(n||/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||e.isContentEditable)&&isNaN(parseInt(e.getAttribute("tabindex"),10))?0:e.tabIndex},Jy=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},bf=function(e){return e.tagName==="INPUT"},Yy=function(e){return bf(e)&&e.type==="hidden"},Qy=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},Xy=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},e0=function(e){if(!e.name)return!0;var n=e.form||Fs(e),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(e.name));else try{i=r(e.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var o=Xy(i,e.form);return!o||o===e},t0=function(e){return bf(e)&&e.type==="radio"},n0=function(e){return t0(e)&&!e0(e)},ec=function(e){var n=e.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},r0=function(e,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var o=In.call(e,"details>summary:first-of-type"),s=o?e.parentElement:e;if(In.call(s,"details:not([open]) *"))return!0;var a=Fs(e).host,l=(a==null?void 0:a.ownerDocument.contains(a))||e.ownerDocument.contains(e);if(!r||r==="full"){if(typeof i=="function"){for(var c=e;e;){var f=e.parentElement,d=Fs(e);if(f&&!f.shadowRoot&&i(f)===!0)return ec(e);e.assignedSlot?e=e.assignedSlot:!f&&d!==e.ownerDocument?e=d.host:e=f}e=c}if(l)return!e.getClientRects().length}else if(r==="non-zero-area")return ec(e);return!1},i0=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return In.call(n,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}n=n.parentElement}return!1},So=function(e,n){return!(n.disabled||Yy(n)||r0(n,e)||Qy(n)||i0(n))},zs=function(e,n){return!(n0(n)||yf(n)<0||!So(e,n))},o0=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},s0=function t(e){var n=[],r=[];return e.forEach(function(i,o){var s=!!i.scope,a=s?i.scope:i,l=yf(a,s),c=s?t(i.candidates):a;l===0?s?n.push.apply(n,c):n.push(a):r.push({documentOrder:o,tabIndex:l,item:i,isScope:s,content:c})}),r.sort(Jy).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},a0=function(e,n){n=n||{};var r;return n.getShadowRoot?r=mf([e],n.includeContainer,{filter:zs.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:o0}):r=vf(e,n.includeContainer,zs.bind(null,n)),s0(r)},l0=function(e,n){n=n||{};var r;return n.getShadowRoot?r=mf([e],n.includeContainer,{filter:So.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=vf(e,n.includeContainer,So.bind(null,n)),r},Pi=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return In.call(e,wo)===!1?!1:zs(n,e)},c0=hf.concat("iframe").join(","),rs=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return In.call(e,c0)===!1?!1:So(n,e)};/*!
|
|
94
94
|
* focus-trap 6.9.4
|
|
95
95
|
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
96
|
-
*/function tc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function nc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?tc(Object(n),!0).forEach(function(r){u0(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function u0(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var rc=function(){var t=[];return{activateTrap:function(n){if(t.length>0){var r=t[t.length-1];r!==n&&r.pause()}var i=t.indexOf(n);i===-1||t.splice(i,1),t.push(n)},deactivateTrap:function(n){var r=t.indexOf(n);r!==-1&&t.splice(r,1),t.length>0&&t[t.length-1].unpause()}}}(),f0=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},d0=function(e){return e.key==="Escape"||e.key==="Esc"||e.keyCode===27},p0=function(e){return e.key==="Tab"||e.keyCode===9},ic=function(e){return setTimeout(e,0)},oc=function(e,n){var r=-1;return e.every(function(i,o){return n(i)?(r=o,!1):!0}),r},Or=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return typeof e=="function"?e.apply(void 0,r):e},ki=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},h0=function(e,n){var r=(n==null?void 0:n.document)||document,i=nc({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},n),o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},s,a=function(m,w,_){return m&&m[w]!==void 0?m[w]:i[_||w]},l=function(m){return o.containerGroups.findIndex(function(w){var _=w.container,P=w.tabbableNodes;return _.contains(m)||P.find(function(M){return M===m})})},c=function(m){var w=i[m];if(typeof w=="function"){for(var _=arguments.length,P=new Array(_>1?_-1:0),M=1;M<_;M++)P[M-1]=arguments[M];w=w.apply(void 0,P)}if(w===!0&&(w=void 0),!w){if(w===void 0||w===!1)return w;throw new Error("`".concat(m,"` was specified but was not a node, or did not return a node"))}var O=w;if(typeof w=="string"&&(O=r.querySelector(w),!O))throw new Error("`".concat(m,"` as selector refers to no known node"));return O},f=function(){var m=c("initialFocus");if(m===!1)return!1;if(m===void 0)if(l(r.activeElement)>=0)m=r.activeElement;else{var w=o.tabbableGroups[0],_=w&&w.firstTabbableNode;m=_||c("fallbackFocus")}if(!m)throw new Error("Your focus-trap needs to have at least one focusable element");return m},d=function(){if(o.containerGroups=o.containers.map(function(m){var w=a0(m,i.tabbableOptions),_=l0(m,i.tabbableOptions);return{container:m,tabbableNodes:w,focusableNodes:_,firstTabbableNode:w.length>0?w[0]:null,lastTabbableNode:w.length>0?w[w.length-1]:null,nextTabbableNode:function(M){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,k=_.findIndex(function(I){return I===M});if(!(k<0))return O?_.slice(k+1).find(function(I){return Pi(I,i.tabbableOptions)}):_.slice(0,k).reverse().find(function(I){return Pi(I,i.tabbableOptions)})}}}),o.tabbableGroups=o.containerGroups.filter(function(m){return m.tabbableNodes.length>0}),o.tabbableGroups.length<=0&&!c("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},p=function E(m){if(m!==!1&&m!==r.activeElement){if(!m||!m.focus){E(f());return}m.focus({preventScroll:!!i.preventScroll}),o.mostRecentlyFocusedNode=m,f0(m)&&m.select()}},v=function(m){var w=c("setReturnFocus",m);return w||(w===!1?!1:m)},g=function(m){var w=ki(m);if(!(l(w)>=0)){if(Or(i.clickOutsideDeactivates,m)){s.deactivate({returnFocus:i.returnFocusOnDeactivate&&!rs(w,i.tabbableOptions)});return}Or(i.allowOutsideClick,m)||m.preventDefault()}},h=function(m){var w=ki(m),_=l(w)>=0;_||w instanceof Document?_&&(o.mostRecentlyFocusedNode=w):(m.stopImmediatePropagation(),p(o.mostRecentlyFocusedNode||f()))},S=function(m){var w=ki(m);d();var _=null;if(o.tabbableGroups.length>0){var P=l(w),M=P>=0?o.containerGroups[P]:void 0;if(P<0)m.shiftKey?_=o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:_=o.tabbableGroups[0].firstTabbableNode;else if(m.shiftKey){var O=oc(o.tabbableGroups,function(F){var K=F.firstTabbableNode;return w===K});if(O<0&&(M.container===w||rs(w,i.tabbableOptions)&&!Pi(w,i.tabbableOptions)&&!M.nextTabbableNode(w,!1))&&(O=P),O>=0){var k=O===0?o.tabbableGroups.length-1:O-1,I=o.tabbableGroups[k];_=I.lastTabbableNode}}else{var B=oc(o.tabbableGroups,function(F){var K=F.lastTabbableNode;return w===K});if(B<0&&(M.container===w||rs(w,i.tabbableOptions)&&!Pi(w,i.tabbableOptions)&&!M.nextTabbableNode(w))&&(B=P),B>=0){var H=B===o.tabbableGroups.length-1?0:B+1,Z=o.tabbableGroups[H];_=Z.firstTabbableNode}}}else _=c("fallbackFocus");_&&(m.preventDefault(),p(_))},L=function(m){if(d0(m)&&Or(i.escapeDeactivates,m)!==!1){m.preventDefault(),s.deactivate();return}if(p0(m)){S(m);return}},b=function(m){var w=ki(m);l(w)>=0||Or(i.clickOutsideDeactivates,m)||Or(i.allowOutsideClick,m)||(m.preventDefault(),m.stopImmediatePropagation())},y=function(){if(o.active)return rc.activateTrap(s),o.delayInitialFocusTimer=i.delayInitialFocus?ic(function(){p(f())}):p(f()),r.addEventListener("focusin",h,!0),r.addEventListener("mousedown",g,{capture:!0,passive:!1}),r.addEventListener("touchstart",g,{capture:!0,passive:!1}),r.addEventListener("click",b,{capture:!0,passive:!1}),r.addEventListener("keydown",L,{capture:!0,passive:!1}),s},x=function(){if(o.active)return r.removeEventListener("focusin",h,!0),r.removeEventListener("mousedown",g,!0),r.removeEventListener("touchstart",g,!0),r.removeEventListener("click",b,!0),r.removeEventListener("keydown",L,!0),s};return s={get active(){return o.active},get paused(){return o.paused},activate:function(m){if(o.active)return this;var w=a(m,"onActivate"),_=a(m,"onPostActivate"),P=a(m,"checkCanFocusTrap");P||d(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,w&&w();var M=function(){P&&d(),y(),_&&_()};return P?(P(o.containers.concat()).then(M,M),this):(M(),this)},deactivate:function(m){if(!o.active)return this;var w=nc({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},m);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,x(),o.active=!1,o.paused=!1,rc.deactivateTrap(s);var _=a(w,"onDeactivate"),P=a(w,"onPostDeactivate"),M=a(w,"checkCanReturnFocus"),O=a(w,"returnFocus","returnFocusOnDeactivate");_&&_();var k=function(){ic(function(){O&&p(v(o.nodeFocusedBeforeActivation)),P&&P()})};return O&&M?(M(v(o.nodeFocusedBeforeActivation)).then(k,k),this):(k(),this)},pause:function(){return o.paused||!o.active?this:(o.paused=!0,x(),this)},unpause:function(){return!o.paused||!o.active?this:(o.paused=!1,d(),y(),this)},updateContainerElements:function(m){var w=[].concat(m).filter(Boolean);return o.containers=w.map(function(_){return typeof _=="string"?r.querySelector(_):_}),o.active&&d(),this}},s.updateContainerElements(e),s};function g0(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}else return Array.from(t)}var ha=!1;if(typeof window<"u"){var sc={get passive(){ha=!0}};window.addEventListener("testPassive",null,sc),window.removeEventListener("testPassive",null,sc)}var wf=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),gn=[],Lo=!1,Sf=-1,Gr=void 0,Wr=void 0,Lf=function(e){return gn.some(function(n){return!!(n.options.allowTouchMove&&n.options.allowTouchMove(e))})},Eo=function(e){var n=e||window.event;return Lf(n.target)||n.touches.length>1?!0:(n.preventDefault&&n.preventDefault(),!1)},v0=function(e){if(Wr===void 0){var n=!!e&&e.reserveScrollBarGap===!0,r=window.innerWidth-document.documentElement.clientWidth;n&&r>0&&(Wr=document.body.style.paddingRight,document.body.style.paddingRight=r+"px")}Gr===void 0&&(Gr=document.body.style.overflow,document.body.style.overflow="hidden")},m0=function(){Wr!==void 0&&(document.body.style.paddingRight=Wr,Wr=void 0),Gr!==void 0&&(document.body.style.overflow=Gr,Gr=void 0)},y0=function(e){return e?e.scrollHeight-e.scrollTop<=e.clientHeight:!1},b0=function(e,n){var r=e.targetTouches[0].clientY-Sf;return Lf(e.target)?!1:n&&n.scrollTop===0&&r>0||y0(n)&&r<0?Eo(e):(e.stopPropagation(),!0)},w0=function(e,n){if(!e){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!gn.some(function(i){return i.targetElement===e})){var r={targetElement:e,options:n||{}};gn=[].concat(g0(gn),[r]),wf?(e.ontouchstart=function(i){i.targetTouches.length===1&&(Sf=i.targetTouches[0].clientY)},e.ontouchmove=function(i){i.targetTouches.length===1&&b0(i,e)},Lo||(document.addEventListener("touchmove",Eo,ha?{passive:!1}:void 0),Lo=!0)):v0(n)}},S0=function(e){if(!e){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}gn=gn.filter(function(n){return n.targetElement!==e}),wf?(e.ontouchstart=null,e.ontouchmove=null,Lo&&gn.length===0&&(document.removeEventListener("touchmove",Eo,ha?{passive:!1}:void 0),Lo=!1)):gn.length||m0()},An=[],L0=function(){return An.some(function(t){return t.activeTargets.length>0})},E0=function(){return An.some(function(t){return t.skippedTargets.length>0})},ac="ResizeObserver loop completed with undelivered notifications.",x0=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:ac}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=ac),window.dispatchEvent(t)},ri;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(ri||(ri={}));var Dn=function(t){return Object.freeze(t)},C0=function(){function t(e,n){this.inlineSize=e,this.blockSize=n,Dn(this)}return t}(),Ef=function(){function t(e,n,r,i){return this.x=e,this.y=n,this.width=r,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Dn(this)}return t.prototype.toJSON=function(){var e=this,n=e.x,r=e.y,i=e.top,o=e.right,s=e.bottom,a=e.left,l=e.width,c=e.height;return{x:n,y:r,top:i,right:o,bottom:s,left:a,width:l,height:c}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),ga=function(t){return t instanceof SVGElement&&"getBBox"in t},xf=function(t){if(ga(t)){var e=t.getBBox(),n=e.width,r=e.height;return!n&&!r}var i=t,o=i.offsetWidth,s=i.offsetHeight;return!(o||s||t.getClientRects().length)},lc=function(t){var e;if(t instanceof Element)return!0;var n=(e=t==null?void 0:t.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(n&&t instanceof n.Element)},_0=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Zr=typeof window<"u"?window:{},Ri=new WeakMap,cc=/auto|scroll/,O0=/^tb|vertical/,M0=/msie|trident/i.test(Zr.navigator&&Zr.navigator.userAgent),Bt=function(t){return parseFloat(t||"0")},tr=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new C0((n?e:t)||0,(n?t:e)||0)},uc=Dn({devicePixelContentBoxSize:tr(),borderBoxSize:tr(),contentBoxSize:tr(),contentRect:new Ef(0,0,0,0)}),Cf=function(t,e){if(e===void 0&&(e=!1),Ri.has(t)&&!e)return Ri.get(t);if(xf(t))return Ri.set(t,uc),uc;var n=getComputedStyle(t),r=ga(t)&&t.ownerSVGElement&&t.getBBox(),i=!M0&&n.boxSizing==="border-box",o=O0.test(n.writingMode||""),s=!r&&cc.test(n.overflowY||""),a=!r&&cc.test(n.overflowX||""),l=r?0:Bt(n.paddingTop),c=r?0:Bt(n.paddingRight),f=r?0:Bt(n.paddingBottom),d=r?0:Bt(n.paddingLeft),p=r?0:Bt(n.borderTopWidth),v=r?0:Bt(n.borderRightWidth),g=r?0:Bt(n.borderBottomWidth),h=r?0:Bt(n.borderLeftWidth),S=d+c,L=l+f,b=h+v,y=p+g,x=a?t.offsetHeight-y-t.clientHeight:0,E=s?t.offsetWidth-b-t.clientWidth:0,m=i?S+b:0,w=i?L+y:0,_=r?r.width:Bt(n.width)-m-E,P=r?r.height:Bt(n.height)-w-x,M=_+S+E+b,O=P+L+x+y,k=Dn({devicePixelContentBoxSize:tr(Math.round(_*devicePixelRatio),Math.round(P*devicePixelRatio),o),borderBoxSize:tr(M,O,o),contentBoxSize:tr(_,P,o),contentRect:new Ef(d,l,_,P)});return Ri.set(t,k),k},_f=function(t,e,n){var r=Cf(t,n),i=r.borderBoxSize,o=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(e){case ri.DEVICE_PIXEL_CONTENT_BOX:return s;case ri.BORDER_BOX:return i;default:return o}},P0=function(){function t(e){var n=Cf(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=Dn([n.borderBoxSize]),this.contentBoxSize=Dn([n.contentBoxSize]),this.devicePixelContentBoxSize=Dn([n.devicePixelContentBoxSize])}return t}(),Of=function(t){if(xf(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},k0=function(){var t=1/0,e=[];An.forEach(function(s){if(s.activeTargets.length!==0){var a=[];s.activeTargets.forEach(function(c){var f=new P0(c.target),d=Of(c.target);a.push(f),c.lastReportedSize=_f(c.target,c.observedBox),d<t&&(t=d)}),e.push(function(){s.callback.call(s.observer,a,s.observer)}),s.activeTargets.splice(0,s.activeTargets.length)}});for(var n=0,r=e;n<r.length;n++){var i=r[n];i()}return t},fc=function(t){An.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(Of(i.target)>t?n.activeTargets.push(i):n.skippedTargets.push(i))})})},R0=function(){var t=0;for(fc(t);L0();)t=k0(),fc(t);return E0()&&x0(),t>0},is,Mf=[],T0=function(){return Mf.splice(0).forEach(function(t){return t()})},A0=function(t){if(!is){var e=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return T0()}).observe(n,r),is=function(){n.textContent="".concat(e?e--:e++)}}Mf.push(t),is()},D0=function(t){A0(function(){requestAnimationFrame(t)})},Yi=0,I0=function(){return!!Yi},j0=250,N0={attributes:!0,characterData:!0,childList:!0,subtree:!0},dc=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],pc=function(t){return t===void 0&&(t=0),Date.now()+t},os=!1,B0=function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var n=this;if(e===void 0&&(e=j0),!os){os=!0;var r=pc(e);D0(function(){var i=!1;try{i=R0()}finally{if(os=!1,e=r-pc(),!I0())return;i?n.run(1e3):e>0?n.run(e):n.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,n=function(){return e.observer&&e.observer.observe(document.body,N0)};document.body?n():Zr.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),dc.forEach(function(n){return Zr.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),dc.forEach(function(n){return Zr.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t}(),$s=new B0,hc=function(t){!Yi&&t>0&&$s.start(),Yi+=t,!Yi&&$s.stop()},U0=function(t){return!ga(t)&&!_0(t)&&getComputedStyle(t).display==="inline"},V0=function(){function t(e,n){this.target=e,this.observedBox=n||ri.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=_f(this.target,this.observedBox,!0);return U0(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),F0=function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t}(),Ti=new WeakMap,gc=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},Ai=function(){function t(){}return t.connect=function(e,n){var r=new F0(e,n);Ti.set(e,r)},t.observe=function(e,n,r){var i=Ti.get(e),o=i.observationTargets.length===0;gc(i.observationTargets,n)<0&&(o&&An.push(i),i.observationTargets.push(new V0(n,r&&r.box)),hc(1),$s.schedule())},t.unobserve=function(e,n){var r=Ti.get(e),i=gc(r.observationTargets,n),o=r.observationTargets.length===1;i>=0&&(o&&An.splice(An.indexOf(r),1),r.observationTargets.splice(i,1),hc(-1))},t.disconnect=function(e){var n=this,r=Ti.get(e);r.observationTargets.slice().forEach(function(i){return n.unobserve(e,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},t}(),z0=function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Ai.connect(this,e)}return t.prototype.observe=function(e,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!lc(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Ai.observe(this,e,n)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!lc(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Ai.unobserve(this,e)},t.prototype.disconnect=function(){Ai.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();function lt(){return lt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},lt.apply(this,arguments)}function Ji(t,e){if(t==null)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)e.indexOf(n=o[r])>=0||(i[n]=t[n]);return i}var qr=typeof window<"u"?u.useLayoutEffect:u.useEffect;function Mr(t,e,n){return e=(e=+e)==e?e:0,n=(n=+n)==n?n:0,(t=+t)==t&&(t=(t=t<=n?t:n)>=e?t:e),t}function Di(t){var e=Math.round(t);if(Number.isNaN(t))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return e}var $0={box:"border-box"};function ss(t,e){var n=e.label,r=e.enabled,i=e.resizeSourceRef,o=u.useState(0),s=o[0],a=o[1];u.useDebugValue(n+": "+s);var l=u.useCallback(function(c){a(c[0].borderBoxSize[0].blockSize),i.current="element"},[i]);return qr(function(){if(t.current&&r){var c=new z0(l);return c.observe(t.current,$0),function(){c.disconnect()}}},[t,l,r]),r?s:0}function at(t){return t===void 0&&(t=1e3),new Promise(function(e){return setTimeout(e,t)})}var vc={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},mc={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},H0=vm({id:"overlay",initial:"closed",context:{initialState:"CLOSED"},states:{closed:{on:{OPEN:"opening",CLOSE:void 0}},opening:{initial:"start",states:{start:{invoke:{src:"onOpenStart",onDone:"transition"}},transition:{always:[{target:"immediately",cond:"initiallyOpen"},{target:"smoothly",cond:"initiallyClosed"}]},immediately:{initial:"open",states:{open:{invoke:{src:"openImmediately",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"#overlay.opening.end"},on:lt({},vc,mc)}}},smoothly:{initial:"visuallyHidden",states:{visuallyHidden:{invoke:{src:"renderVisuallyHidden",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"open"}},open:{invoke:{src:"openSmoothly",onDone:"#overlay.opening.end"},on:lt({},vc,mc)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:lt({},{CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}}),onDone:"open"},open:{on:{DRAG:"#overlay.dragging",SNAP:"snapping",RESIZE:"resizing"}},dragging:{on:{SNAP:"snapping"}},snapping:{initial:"start",states:{start:{invoke:{src:"onSnapStart",onDone:"snappingSmoothly"},entry:[mm({y:function(t,e){return e.payload.y},velocity:function(t,e){return e.payload.velocity},snapSource:function(t,e){var n=e.payload.source;return n===void 0?"custom":n}})]},snappingSmoothly:{invoke:{src:"snapSmoothly",onDone:"end"}},end:{invoke:{src:"onSnapEnd",onDone:"done"},on:{RESIZE:"#overlay.resizing",SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{SNAP:{target:"snapping",actions:"onSnapEnd"},RESIZE:{target:"#overlay.resizing",actions:"onSnapCancel"},DRAG:{target:"#overlay.dragging",actions:"onSnapCancel"},CLOSE:{target:"#overlay.closing",actions:"onSnapCancel"}},onDone:"open"},resizing:{initial:"start",states:{start:{invoke:{src:"onResizeStart",onDone:"resizingSmoothly"}},resizingSmoothly:{invoke:{src:"resizeSmoothly",onDone:"end"}},end:{invoke:{src:"onResizeEnd",onDone:"done"},on:{SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{RESIZE:{target:"resizing",actions:"onResizeEnd"},SNAP:{target:"snapping",actions:"onResizeCancel"},DRAG:{target:"#overlay.dragging",actions:"onResizeCancel"},CLOSE:{target:"#overlay.closing",actions:"onResizeCancel"}},onDone:"open"},closing:{initial:"start",states:{start:{invoke:{src:"onCloseStart",onDone:"deactivating"},on:{OPEN:{target:"#overlay.open",actions:"onCloseCancel"}}},deactivating:{invoke:{src:"deactivate",onDone:"closingSmoothly"}},closingSmoothly:{invoke:{src:"closeSmoothly",onDone:"end"}},end:{invoke:{src:"onCloseEnd",onDone:"done"},on:{OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}}},done:{type:"final"}},on:{CLOSE:void 0,OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}},onDone:"closed"}},on:{CLOSE:"closing"}},{actions:{onOpenCancel:function(t,e){},onSnapCancel:function(t,e){},onResizeCancel:function(t,e){},onCloseCancel:function(t,e){},onOpenEnd:function(t,e){},onSnapEnd:function(t,e){},onRezizeEnd:function(t,e){}},services:{onSnapStart:function(){try{return Promise.resolve(at()).then(function(){})}catch(t){return Promise.reject(t)}},onOpenStart:function(){try{return Promise.resolve(at()).then(function(){})}catch(t){return Promise.reject(t)}},onCloseStart:function(){try{return Promise.resolve(at()).then(function(){})}catch(t){return Promise.reject(t)}},onResizeStart:function(){try{return Promise.resolve(at()).then(function(){})}catch(t){return Promise.reject(t)}},onSnapEnd:function(){try{return Promise.resolve(at()).then(function(){})}catch(t){return Promise.reject(t)}},onOpenEnd:function(){try{return Promise.resolve(at()).then(function(){})}catch(t){return Promise.reject(t)}},onCloseEnd:function(){try{return Promise.resolve(at()).then(function(){})}catch(t){return Promise.reject(t)}},onResizeEnd:function(){try{return Promise.resolve(at()).then(function(){})}catch(t){return Promise.reject(t)}},renderVisuallyHidden:function(t,e){try{return Promise.resolve(at()).then(function(){})}catch(n){return Promise.reject(n)}},activate:function(t,e){try{return Promise.resolve(at()).then(function(){})}catch(n){return Promise.reject(n)}},deactivate:function(t,e){try{return Promise.resolve(at()).then(function(){})}catch(n){return Promise.reject(n)}},openSmoothly:function(t,e){try{return Promise.resolve(at()).then(function(){})}catch(n){return Promise.reject(n)}},openImmediately:function(t,e){try{return Promise.resolve(at()).then(function(){})}catch(n){return Promise.reject(n)}},snapSmoothly:function(t,e){try{return Promise.resolve(at()).then(function(){})}catch(n){return Promise.reject(n)}},resizeSmoothly:function(t,e){try{return Promise.resolve(at()).then(function(){})}catch(n){return Promise.reject(n)}},closeSmoothly:function(t,e){try{return Promise.resolve(at()).then(function(){})}catch(n){return Promise.reject(n)}}},guards:{initiallyClosed:function(t){return t.initialState==="CLOSED"},initiallyOpen:function(t){return t.initialState==="OPEN"}}}),G0=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],W0=["velocity"],Z0=["onRest","config"],Pf=$m.default,q0=Pf.tension,Ii=Pf.friction,K0=u.forwardRef(function(t,e){var n=t.children,r=t.sibling,i=t.className,o=t.footer,s=t.header,a=t.open,l=t.initialState,c=t.lastSnapRef,f=t.initialFocusRef,d=t.onDismiss,p=t.maxHeight,v=t.defaultSnap,g=v===void 0?J0:v,h=t.snapPoints,S=h===void 0?X0:h,L=t.blocking,b=L===void 0||L,y=t.scrollLocking,x=y===void 0||y,E=t.style,m=t.onSpringStart,w=t.onSpringCancel,_=t.onSpringEnd,P=t.reserveScrollBarGap,M=P===void 0?b:P,O=t.expandOnContentDrag,k=O!==void 0&&O,I=Ji(t,G0),B=function(){var U=u.useState(!1),ne=U[0],Y=U[1],he=u.useState({}),Ae=he[0],Ee=he[1],De=u.useCallback(function(ke){return Ee(function(Be){var ce;return lt({},Be,((ce={})[ke]=!1,ce))}),function(){Ee(function(Be){var ce;return lt({},Be,((ce={})[ke]=!0,ce))})}},[]);return u.useEffect(function(){var ke=Object.values(Ae);ke.length!==0&&ke.every(Boolean)&&Y(!0)},[Ae]),{ready:ne,registerReady:De}}(),H=B.ready,Z=B.registerReady,F=u.useRef(!1),K=u.useRef(m),A=u.useRef(w),R=u.useRef(_);u.useEffect(function(){K.current=m,A.current=w,R.current=_},[w,m,_]);var T,V,z=qm(function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}}),$=z[0],Q=z[1],N=u.useRef(null),D=u.useRef(null),W=u.useRef(null),q=u.useRef(null),te=u.useRef(null),re=u.useRef(null),ie=u.useRef(0),fe=u.useRef(),Oe=u.useRef(!1),me=(T=u.useMemo(function(){return typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null},[]),V=u.useRef(T==null?void 0:T.matches),u.useDebugValue(V.current?"reduce":"no-preference"),u.useEffect(function(){var U=function(ne){V.current=ne.matches};return T==null||T.addListener(U),function(){return T==null?void 0:T.removeListener(U)}},[T]),V),ye=function(U){var ne=U.targetRef,Y=U.enabled,he=U.reserveScrollBarGap,Ae=u.useRef({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return u.useDebugValue(Y?"Enabled":"Disabled"),u.useEffect(function(){if(!Y)return Ae.current.deactivate(),void(Ae.current={activate:function(){},deactivate:function(){}});var Ee=ne.current,De=!1;Ae.current={activate:function(){De||(De=!0,w0(Ee,{allowTouchMove:function(ke){return ke.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:he}))},deactivate:function(){De&&(De=!1,S0(Ee))}}},[Y,ne,he]),Ae}({targetRef:D,enabled:H&&x,reserveScrollBarGap:M}),Me=function(U){var ne=U.targetRef,Y=U.enabled,he=u.useRef({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return u.useDebugValue(Y?"Enabled":"Disabled"),u.useEffect(function(){if(!Y)return he.current.deactivate(),void(he.current={activate:function(){},deactivate:function(){}});var Ae=ne.current,Ee=!1,De=[],ke=[];he.current={activate:function(){if(!Ee){Ee=!0;var Be=Ae.parentNode;document.querySelectorAll("body > *").forEach(function(ce){if(ce!==Be){var be=ce.getAttribute("aria-hidden");be!==null&&be!=="false"||(De.push(be),ke.push(ce),ce.setAttribute("aria-hidden","true"))}})}},deactivate:function(){Ee&&(Ee=!1,ke.forEach(function(Be,ce){var be=De[ce];be===null?Be.removeAttribute("aria-hidden"):Be.setAttribute("aria-hidden",be)}),De=[],ke=[])}}},[ne,Y]),he}({targetRef:N,enabled:H&&b}),Pe=function(U){var ne=U.targetRef,Y=U.fallbackRef,he=U.initialFocusRef,Ae=U.enabled,Ee=u.useRef({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return u.useDebugValue(Ae?"Enabled":"Disabled"),u.useEffect(function(){if(!Ae)return Ee.current.deactivate(),void(Ee.current={activate:function(){},deactivate:function(){}});var De=Y.current,ke=h0(ne.current,{onActivate:void 0,initialFocus:he?function(){return(he==null?void 0:he.current)||De}:void 0,fallbackFocus:De,escapeDeactivates:!1,clickOutsideDeactivates:!1}),Be=!1;Ee.current={activate:function(){try{return Be?Promise.resolve():(Be=!0,Promise.resolve(ke.activate()).then(function(){return Promise.resolve(new Promise(function(ce){return setTimeout(function(){return ce(void 0)},0)})).then(function(){})}))}catch(ce){return Promise.reject(ce)}},deactivate:function(){Be&&(Be=!1,ke.deactivate())}}},[Ae,Y,he,ne]),Ee}({targetRef:N,fallbackRef:re,initialFocusRef:f||void 0,enabled:H&&b&&f!==!1}),Te=function(U){var ne=U.getSnapPoints,Y=U.heightRef,he=U.lastSnapRef,Ae=U.ready,Ee=function(qe){var dt=qe.contentRef,pt=qe.controlledMaxHeight,Xe=qe.footerEnabled,Nt=qe.footerRef,Ot=qe.headerEnabled,ht=qe.headerRef,Qt=qe.registerReady,Wt=qe.resizeSourceRef,hr=u.useMemo(function(){return Qt("contentHeight")},[Qt]),gr=function(en,Sn,Ln){var En=u.useMemo(function(){return Sn("maxHeight")},[Sn]),xn=u.useState(function(){return Di(en)||typeof window<"u"?window.innerHeight:0}),yr=xn[0],br=xn[1],tn=yr>0,oe=u.useRef(0);return u.useDebugValue(en?"controlled":"auto"),u.useEffect(function(){tn&&En()},[tn,En]),qr(function(){if(en)return br(Di(en)),void(Ln.current="maxheightprop");var Ma=function(){oe.current||(oe.current=requestAnimationFrame(function(){br(window.innerHeight),Ln.current="window",oe.current=0}))};return window.addEventListener("resize",Ma),br(window.innerHeight),Ln.current="window",En(),function(){window.removeEventListener("resize",Ma),cancelAnimationFrame(oe.current)}},[en,En,Ln]),yr}(pt,Qt,Wt),Vn=ss(ht,{label:"headerHeight",enabled:Ot,resizeSourceRef:Wt}),vr=ss(dt,{label:"contentHeight",enabled:!0,resizeSourceRef:Wt}),Fn=ss(Nt,{label:"footerHeight",enabled:Xe,resizeSourceRef:Wt}),wn=Math.min(gr-Vn-Fn,vr)+Vn+Fn;u.useDebugValue("minHeight: "+wn);var mr=vr>0;return u.useEffect(function(){mr&&hr()},[mr,hr]),{maxHeight:gr,minHeight:wn,headerHeight:Vn,footerHeight:Fn}}({contentRef:U.contentRef,controlledMaxHeight:U.controlledMaxHeight,footerEnabled:U.footerEnabled,footerRef:U.footerRef,headerEnabled:U.headerEnabled,headerRef:U.headerRef,registerReady:U.registerReady,resizeSourceRef:U.resizeSourceRef}),De=Ee.maxHeight,ke=Ee.minHeight,Be=Ee.headerHeight,ce=Ee.footerHeight,be=function(qe,dt){var pt=[].concat(qe).map(Di).reduce(function(ht,Qt){return ht.add(Mr(Qt,0,dt)),ht},new Set),Xe=Array.from(pt),Nt=Math.min.apply(Math,Xe);if(Number.isNaN(Nt))throw new TypeError("minSnap is NaN");var Ot=Math.max.apply(Math,Xe);if(Number.isNaN(Ot))throw new TypeError("maxSnap is NaN");return{snapPoints:Xe,minSnap:Nt,maxSnap:Ot}}(Ae?ne({height:Y.current,footerHeight:ce,headerHeight:Be,minHeight:ke,maxHeight:De}):[0],De),ct=be.snapPoints,Gt=be.minSnap,st=be.maxSnap;return u.useDebugValue("minSnap: "+Gt+", maxSnap:"+st),{minSnap:Gt,maxSnap:st,findSnap:function(qe){var dt=Di(typeof qe=="function"?qe({footerHeight:ce,headerHeight:Be,height:Y.current,minHeight:ke,maxHeight:De,snapPoints:ct,lastSnap:he.current}):qe);return ct.reduce(function(pt,Xe){return Math.abs(Xe-dt)<Math.abs(pt-dt)?Xe:pt},Gt)},maxHeight:De}}({contentRef:W,controlledMaxHeight:p,footerEnabled:!!o,footerRef:te,getSnapPoints:S,headerEnabled:s!==!1,headerRef:q,heightRef:ie,lastSnapRef:c,ready:H,registerReady:Z,resizeSourceRef:fe}),se=Te.minSnap,ae=Te.maxSnap,ze=Te.maxHeight,Ye=Te.findSnap,J=u.useRef(ze),$e=u.useRef(se),Ne=u.useRef(ae),ft=u.useRef(Ye),ot=u.useRef(0);qr(function(){J.current=ze,Ne.current=ae,$e.current=se,ft.current=Ye,ot.current=Ye(g)},[Ye,g,ze,ae,se]);var le=u.useCallback(function(U){var ne=U.onRest,Y=U.config,he=(Y=Y===void 0?{}:Y).velocity,Ae=he===void 0?1:he,Ee=Ji(Y,W0),De=Ji(U,Z0);return new Promise(function(ke){return Q(lt({},De,{config:lt({velocity:Ae},Ee,{mass:1,tension:q0,friction:Math.max(Ii,Ii+(Ii-Ii*Ae))}),onRest:function(){var Be=[].slice.call(arguments);ke.apply(void 0,Be),ne==null||ne.apply(void 0,Be)}}))})},[Q]),bn=_m(H0,{devTools:!1,actions:{onOpenCancel:u.useCallback(function(){return A.current==null?void 0:A.current({type:"OPEN"})},[]),onSnapCancel:u.useCallback(function(U){return A.current==null?void 0:A.current({type:"SNAP",source:U.snapSource})},[]),onCloseCancel:u.useCallback(function(){return A.current==null?void 0:A.current({type:"CLOSE"})},[]),onResizeCancel:u.useCallback(function(){return A.current==null?void 0:A.current({type:"RESIZE",source:fe.current})},[]),onOpenEnd:u.useCallback(function(){return R.current==null?void 0:R.current({type:"OPEN"})},[]),onSnapEnd:u.useCallback(function(U,ne){return R.current==null?void 0:R.current({type:"SNAP",source:U.snapSource})},[]),onResizeEnd:u.useCallback(function(){return R.current==null?void 0:R.current({type:"RESIZE",source:fe.current})},[])},context:{initialState:l},services:{onSnapStart:u.useCallback(function(U,ne){try{return Promise.resolve(K.current==null?void 0:K.current({type:"SNAP",source:ne.payload.source||"custom"}))}catch(Y){return Promise.reject(Y)}},[]),onOpenStart:u.useCallback(function(){try{return Promise.resolve(K.current==null?void 0:K.current({type:"OPEN"}))}catch(U){return Promise.reject(U)}},[]),onCloseStart:u.useCallback(function(){try{return Promise.resolve(K.current==null?void 0:K.current({type:"CLOSE"}))}catch(U){return Promise.reject(U)}},[]),onResizeStart:u.useCallback(function(){try{return Promise.resolve(K.current==null?void 0:K.current({type:"RESIZE",source:fe.current}))}catch(U){return Promise.reject(U)}},[]),onSnapEnd:u.useCallback(function(U,ne){try{return Promise.resolve(R.current==null?void 0:R.current({type:"SNAP",source:U.snapSource}))}catch(Y){return Promise.reject(Y)}},[]),onOpenEnd:u.useCallback(function(){try{return Promise.resolve(R.current==null?void 0:R.current({type:"OPEN"}))}catch(U){return Promise.reject(U)}},[]),onCloseEnd:u.useCallback(function(){try{return Promise.resolve(R.current==null?void 0:R.current({type:"CLOSE"}))}catch(U){return Promise.reject(U)}},[]),onResizeEnd:u.useCallback(function(){try{return Promise.resolve(R.current==null?void 0:R.current({type:"RESIZE",source:fe.current}))}catch(U){return Promise.reject(U)}},[]),renderVisuallyHidden:u.useCallback(function(U,ne){try{return Promise.resolve(le({y:ot.current,ready:0,maxHeight:J.current,maxSnap:Ne.current,minSnap:ot.current,immediate:!0})).then(function(){})}catch(Y){return Promise.reject(Y)}},[le]),activate:u.useCallback(function(U,ne){try{return F.current=!0,Promise.resolve(Promise.all([ye.current.activate(),Pe.current.activate(),Me.current.activate()])).then(function(){})}catch(Y){return Promise.reject(Y)}},[Me,Pe,ye]),deactivate:u.useCallback(function(){try{return ye.current.deactivate(),Pe.current.deactivate(),Me.current.deactivate(),F.current=!1,Promise.resolve()}catch(U){return Promise.reject(U)}},[Me,Pe,ye]),openImmediately:u.useCallback(function(){try{return ie.current=ot.current,Promise.resolve(le({y:ot.current,ready:1,maxHeight:J.current,maxSnap:Ne.current,minSnap:ot.current,immediate:!0})).then(function(){})}catch(U){return Promise.reject(U)}},[le]),openSmoothly:u.useCallback(function(){try{return Promise.resolve(le({y:0,ready:1,maxHeight:J.current,maxSnap:Ne.current,minSnap:ot.current,immediate:!0})).then(function(){return ie.current=ot.current,Promise.resolve(le({y:ot.current,ready:1,maxHeight:J.current,maxSnap:Ne.current,minSnap:ot.current,immediate:me.current})).then(function(){})})}catch(U){return Promise.reject(U)}},[le,me]),snapSmoothly:u.useCallback(function(U,ne){try{var Y=ft.current(U.y);return ie.current=Y,c.current=Y,Promise.resolve(le({y:Y,ready:1,maxHeight:J.current,maxSnap:Ne.current,minSnap:$e.current,immediate:me.current,config:{velocity:U.velocity}})).then(function(){})}catch(he){return Promise.reject(he)}},[le,c,me]),resizeSmoothly:u.useCallback(function(){try{var U=ft.current(ie.current);return ie.current=U,c.current=U,Promise.resolve(le({y:U,ready:1,maxHeight:J.current,maxSnap:Ne.current,minSnap:$e.current,immediate:fe.current!=="element"||me.current})).then(function(){})}catch(ne){return Promise.reject(ne)}},[le,c,me]),closeSmoothly:u.useCallback(function(U,ne){try{return le({minSnap:ie.current,immediate:!0}),ie.current=0,Promise.resolve(le({y:0,maxHeight:J.current,maxSnap:Ne.current,immediate:me.current})).then(function(){return Promise.resolve(le({ready:0,immediate:!0})).then(function(){})})}catch(Y){return Promise.reject(Y)}},[le,me])}}),pi=bn[0],_t=bn[1];u.useEffect(function(){H&&_t(a?"OPEN":"CLOSE")},[a,_t,H]),qr(function(){(ze||ae||se)&&_t("RESIZE")},[ze,ae,se,_t]),u.useEffect(function(){return function(){ye.current.deactivate(),Pe.current.deactivate(),Me.current.deactivate()}},[Me,Pe,ye]),u.useImperativeHandle(e,function(){return{snapTo:function(U,ne){var Y=ne===void 0?{}:ne,he=Y.velocity,Ae=he===void 0?1:he,Ee=Y.source,De=Ee===void 0?"custom":Ee;_t("SNAP",{payload:{y:ft.current(U),velocity:Ae,source:De}})},get height(){return ie.current}}},[_t]),u.useEffect(function(){var U=D.current,ne=function(he){Oe.current&&he.preventDefault()},Y=function(he){U.scrollTop<0&&(requestAnimationFrame(function(){U.style.overflow="hidden",U.scrollTop=0,U.style.removeProperty("overflow")}),he.preventDefault())};return k&&(U.addEventListener("scroll",ne),U.addEventListener("touchmove",ne),U.addEventListener("touchstart",Y)),function(){U.removeEventListener("scroll",ne),U.removeEventListener("touchmove",ne),U.removeEventListener("touchstart",Y)}},[k,D]);var Ht=Ky(function(U){var ne=U.args,Y=(ne=ne===void 0?[]:ne)[0],he=(Y=Y===void 0?{}:Y).closeOnTap,Ae=he!==void 0&&he,Ee=Y.isContentDragging,De=Ee!==void 0&&Ee,ke=U.cancel,Be=U.direction[1],ce=U.down,be=U.first,ct=U.last,Gt=U.memo,st=Gt===void 0?$.y.getValue():Gt,qe=U.tap,dt=U.velocity,pt=-1*U.movement[1];if(!F.current)return ke(),st;if(d&&Ae&&qe)return ke(),setTimeout(function(){return d()},0),st;if(qe)return st;var Xe=st+pt,Nt=pt*dt,Ot=Math.max($e.current,Math.min(Ne.current,Xe+2*Nt));if(!ce&&d&&Be>0&&Xe+Nt<$e.current/2)return ke(),d(),st;var ht=ce?d||$e.current!==Ne.current?Hr(Xe,d?0:$e.current,Ne.current,.55):Xe<$e.current?Hr(Xe,$e.current,2*Ne.current,.55):Hr(Xe,$e.current/2,Ne.current,.55):Ot;return k&&De?(ht>=Ne.current&&(ht=Ne.current),st===Ne.current&&D.current.scrollTop>0&&(ht=Ne.current),Oe.current=ht<Ne.current):Oe.current=!1,be&&_t("DRAG"),ct?(_t("SNAP",{payload:{y:ht,velocity:dt>.05?dt:1,source:"dragging"}}),st):(Q({y:ht,ready:1,maxHeight:J.current,maxSnap:Ne.current,minSnap:$e.current,immediate:!0,config:{velocity:dt}}),st)},{filterTaps:!0});if(Number.isNaN(Ne.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN($e.current))throw new TypeError("minSnapRef is NaN!!");var hi=function(U){var ne,Y=U.spring,he=Gn([Y.y,Y.maxHeight],function(ce,be){return Math.round(Mr(be-ce,0,16))+"px"}),Ae=Gn([Y.y,Y.minSnap,Y.maxSnap],function(ce,be,ct){return Mr(ce,be,ct)+"px"}),Ee=Gn([Y.y,Y.minSnap,Y.maxSnap],function(ce,be,ct){return ce<be?be-ce+"px":ce>ct?ct-ce+"px":"0px"}),De=Gn([Y.y,Y.maxSnap],function(ce,be){return ce>=be?Math.ceil(ce-be):0}),ke=Gn([Y.y,Y.minSnap],function(ce,be){if(!be)return 0;var ct=Math.max(be/2-45,0);return Mr((ce-ct)*(1/(Math.min(be/2+45,be)-ct)+0),0,1)}),Be=Gn([Y.y,Y.minSnap],function(ce,be){return be?Mr(ce/be,0,1):0});return(ne={})["--rsbs-content-opacity"]=ke,ne["--rsbs-backdrop-opacity"]=Be,ne["--rsbs-antigap-scale-y"]=De,ne["--rsbs-overlay-translate-y"]=Ee,ne["--rsbs-overlay-rounded"]=he,ne["--rsbs-overlay-h"]=Ae,ne}({spring:$});return u.createElement(py.div,lt({},I,{"data-rsbs-root":!0,"data-rsbs-state":Y0.find(pi.matches),"data-rsbs-is-blocking":b,"data-rsbs-is-dismissable":!!d,"data-rsbs-has-header":!!s,"data-rsbs-has-footer":!!o,className:i,ref:N,style:lt({},hi,E,{opacity:$.ready})}),r,b&&u.createElement("div",lt({key:"backdrop","data-rsbs-backdrop":!0},Ht({closeOnTap:!0}))),u.createElement("div",{key:"overlay","aria-modal":"true",role:"dialog","data-rsbs-overlay":!0,tabIndex:-1,ref:re,onKeyDown:function(U){U.key==="Escape"&&(U.stopPropagation(),d&&d())}},s!==!1&&u.createElement("div",lt({key:"header","data-rsbs-header":!0,ref:q},Ht()),s),u.createElement("div",lt({key:"scroll","data-rsbs-scroll":!0,ref:D},k?Ht({isContentDragging:!0}):{}),u.createElement("div",{"data-rsbs-content":!0,ref:W},n)),o&&u.createElement("div",lt({key:"footer",ref:te,"data-rsbs-footer":!0},Ht()),o)))}),Y0=["closed","opening","open","closing","dragging","snapping","resizing"];function J0(t){var e=t.lastSnap;return e??Math.min.apply(Math,t.snapPoints)}function X0(t){return t.minHeight}var Q0=["onSpringStart","onSpringEnd","skipInitialTransition"],kf=u.forwardRef(function(t,e){var n=t.onSpringStart,r=t.onSpringEnd,i=t.skipInitialTransition,o=Ji(t,Q0),s=u.useState(!1),a=s[0],l=s[1],c=u.useRef(),f=u.useRef(null),d=u.useRef(i&&o.open?"OPEN":"CLOSED");qr(function(){if(o.open)return cancelAnimationFrame(c.current),l(!0),function(){d.current="CLOSED"}},[o.open]);var p=u.useCallback(function(g){return Promise.resolve(n==null?void 0:n(g)).then(function(){g.type==="OPEN"&&cancelAnimationFrame(c.current)})},[n]),v=u.useCallback(function(g){return Promise.resolve(r==null?void 0:r(g)).then(function(){g.type==="CLOSE"&&(c.current=requestAnimationFrame(function(){return l(!1)}))})},[r]);return a?u.createElement(Sv,{"data-rsbs-portal":!0},u.createElement(K0,lt({},o,{lastSnapRef:f,ref:e,initialState:d.current,onSpringStart:p,onSpringEnd:v}))):null});function Rf(t,e){return function(){return t.apply(e,arguments)}}const{toString:eb}=Object.prototype,{getPrototypeOf:va}=Object,Do=(t=>e=>{const n=eb.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),$t=t=>(t=t.toLowerCase(),e=>Do(e)===t),Io=t=>e=>typeof e===t,{isArray:dr}=Array,ii=Io("undefined");function tb(t){return t!==null&&!ii(t)&&t.constructor!==null&&!ii(t.constructor)&&Ct(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Tf=$t("ArrayBuffer");function nb(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Tf(t.buffer),e}const rb=Io("string"),Ct=Io("function"),Af=Io("number"),jo=t=>t!==null&&typeof t=="object",ib=t=>t===!0||t===!1,Xi=t=>{if(Do(t)!=="object")return!1;const e=va(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},ob=$t("Date"),sb=$t("File"),ab=$t("Blob"),lb=$t("FileList"),cb=t=>jo(t)&&Ct(t.pipe),ub=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Ct(t.append)&&((e=Do(t))==="formdata"||e==="object"&&Ct(t.toString)&&t.toString()==="[object FormData]"))},fb=$t("URLSearchParams"),db=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ci(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),dr(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{const o=n?Object.getOwnPropertyNames(t):Object.keys(t),s=o.length;let a;for(r=0;r<s;r++)a=o[r],e.call(null,t[a],a,t)}}function Df(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 If=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),jf=t=>!ii(t)&&t!==If;function Hs(){const{caseless:t}=jf(this)&&this||{},e={},n=(r,i)=>{const o=t&&Df(e,i)||i;Xi(e[o])&&Xi(r)?e[o]=Hs(e[o],r):Xi(r)?e[o]=Hs({},r):dr(r)?e[o]=r.slice():e[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&ci(arguments[r],n);return e}const pb=(t,e,n,{allOwnKeys:r}={})=>(ci(e,(i,o)=>{n&&Ct(i)?t[o]=Rf(i,n):t[o]=i},{allOwnKeys:r}),t),hb=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),gb=(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)},vb=(t,e,n,r)=>{let i,o,s;const a={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)s=i[o],(!r||r(s,t,e))&&!a[s]&&(e[s]=t[s],a[s]=!0);t=n!==!1&&va(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},mb=(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},yb=t=>{if(!t)return null;if(dr(t))return t;let e=t.length;if(!Af(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},bb=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&va(Uint8Array)),wb=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=r.next())&&!i.done;){const o=i.value;e.call(t,o[0],o[1])}},Sb=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},Lb=$t("HTMLFormElement"),Eb=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),yc=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),xb=$t("RegExp"),Nf=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};ci(n,(i,o)=>{let s;(s=e(i,o,t))!==!1&&(r[o]=s||i)}),Object.defineProperties(t,r)},Cb=t=>{Nf(t,(e,n)=>{if(Ct(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(Ct(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(o=>{n[o]=!0})};return dr(t)?r(t):r(String(t).split(e)),n},Ob=()=>{},Mb=(t,e)=>(t=+t,Number.isFinite(t)?t:e),as="abcdefghijklmnopqrstuvwxyz",bc="0123456789",Bf={DIGIT:bc,ALPHA:as,ALPHA_DIGIT:as+as.toUpperCase()+bc},Pb=(t=16,e=Bf.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function kb(t){return!!(t&&Ct(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Rb=t=>{const e=new Array(10),n=(r,i)=>{if(jo(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const o=dr(r)?[]:{};return ci(r,(s,a)=>{const l=n(s,i+1);!ii(l)&&(o[a]=l)}),e[i]=void 0,o}}return r};return n(t,0)},Tb=$t("AsyncFunction"),Ab=t=>t&&(jo(t)||Ct(t))&&Ct(t.then)&&Ct(t.catch),j={isArray:dr,isArrayBuffer:Tf,isBuffer:tb,isFormData:ub,isArrayBufferView:nb,isString:rb,isNumber:Af,isBoolean:ib,isObject:jo,isPlainObject:Xi,isUndefined:ii,isDate:ob,isFile:sb,isBlob:ab,isRegExp:xb,isFunction:Ct,isStream:cb,isURLSearchParams:fb,isTypedArray:bb,isFileList:lb,forEach:ci,merge:Hs,extend:pb,trim:db,stripBOM:hb,inherits:gb,toFlatObject:vb,kindOf:Do,kindOfTest:$t,endsWith:mb,toArray:yb,forEachEntry:wb,matchAll:Sb,isHTMLForm:Lb,hasOwnProperty:yc,hasOwnProp:yc,reduceDescriptors:Nf,freezeMethods:Cb,toObjectSet:_b,toCamelCase:Eb,noop:Ob,toFiniteNumber:Mb,findKey:Df,global:If,isContextDefined:jf,ALPHABET:Bf,generateString:Pb,isSpecCompliantForm:kb,toJSONObject:Rb,isAsyncFn:Tb,isThenable:Ab};function Le(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)}j.inherits(Le,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:j.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Uf=Le.prototype,Vf={};["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=>{Vf[t]={value:t}});Object.defineProperties(Le,Vf);Object.defineProperty(Uf,"isAxiosError",{value:!0});Le.from=(t,e,n,r,i,o)=>{const s=Object.create(Uf);return j.toFlatObject(t,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),Le.call(s,t.message,e,n,r,i),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};const Db=null;function Gs(t){return j.isPlainObject(t)||j.isArray(t)}function Ff(t){return j.endsWith(t,"[]")?t.slice(0,-2):t}function wc(t,e,n){return t?t.concat(e).map(function(i,o){return i=Ff(i),!n&&o?"["+i+"]":i}).join(n?".":""):e}function Ib(t){return j.isArray(t)&&!t.some(Gs)}const jb=j.toFlatObject(j,{},null,function(e){return/^is[A-Z]/.test(e)});function No(t,e,n){if(!j.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=j.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,S){return!j.isUndefined(S[h])});const r=n.metaTokens,i=n.visitor||f,o=n.dots,s=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&j.isSpecCompliantForm(e);if(!j.isFunction(i))throw new TypeError("visitor must be a function");function c(g){if(g===null)return"";if(j.isDate(g))return g.toISOString();if(!l&&j.isBlob(g))throw new Le("Blob is not supported. Use a Buffer instead.");return j.isArrayBuffer(g)||j.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function f(g,h,S){let L=g;if(g&&!S&&typeof g=="object"){if(j.endsWith(h,"{}"))h=r?h:h.slice(0,-2),g=JSON.stringify(g);else if(j.isArray(g)&&Ib(g)||(j.isFileList(g)||j.endsWith(h,"[]"))&&(L=j.toArray(g)))return h=Ff(h),L.forEach(function(y,x){!(j.isUndefined(y)||y===null)&&e.append(s===!0?wc([h],x,o):s===null?h:h+"[]",c(y))}),!1}return Gs(g)?!0:(e.append(wc(S,h,o),c(g)),!1)}const d=[],p=Object.assign(jb,{defaultVisitor:f,convertValue:c,isVisitable:Gs});function v(g,h){if(!j.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+h.join("."));d.push(g),j.forEach(g,function(L,b){(!(j.isUndefined(L)||L===null)&&i.call(e,L,j.isString(b)?b.trim():b,h,p))===!0&&v(L,h?h.concat(b):[b])}),d.pop()}}if(!j.isObject(t))throw new TypeError("data must be an object");return v(t),e}function Sc(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function ma(t,e){this._pairs=[],t&&No(t,this,e)}const zf=ma.prototype;zf.append=function(e,n){this._pairs.push([e,n])};zf.toString=function(e){const n=e?function(r){return e.call(this,r,Sc)}:Sc;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Nb(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function $f(t,e,n){if(!e)return t;const r=n&&n.encode||Nb,i=n&&n.serialize;let o;if(i?o=i(e,n):o=j.isURLSearchParams(e)?e.toString():new ma(e,n).toString(r),o){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class Bb{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){j.forEach(this.handlers,function(r){r!==null&&e(r)})}}const Lc=Bb,Hf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ub=typeof URLSearchParams<"u"?URLSearchParams:ma,Vb=typeof FormData<"u"?FormData:null,Fb=typeof Blob<"u"?Blob:null,zb=(()=>{let t;return typeof navigator<"u"&&((t=navigator.product)==="ReactNative"||t==="NativeScript"||t==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),$b=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Vt={isBrowser:!0,classes:{URLSearchParams:Ub,FormData:Vb,Blob:Fb},isStandardBrowserEnv:zb,isStandardBrowserWebWorkerEnv:$b,protocols:["http","https","file","blob","url","data"]};function Hb(t,e){return No(t,new Vt.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Vt.isNode&&j.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function Gb(t){return j.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Wb(t){const e={},n=Object.keys(t);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],e[o]=t[o];return e}function Gf(t){function e(n,r,i,o){let s=n[o++];const a=Number.isFinite(+s),l=o>=n.length;return s=!s&&j.isArray(i)?i.length:s,l?(j.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!j.isObject(i[s]))&&(i[s]=[]),e(n,r,i[s],o)&&j.isArray(i[s])&&(i[s]=Wb(i[s])),!a)}if(j.isFormData(t)&&j.isFunction(t.entries)){const n={};return j.forEachEntry(t,(r,i)=>{e(Gb(r),i,n,0)}),n}return null}function Zb(t,e,n){if(j.isString(t))try{return(e||JSON.parse)(t),j.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const ya={transitional:Hf,adapter:["xhr","http"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=j.isObject(e);if(o&&j.isHTMLForm(e)&&(e=new FormData(e)),j.isFormData(e))return i&&i?JSON.stringify(Gf(e)):e;if(j.isArrayBuffer(e)||j.isBuffer(e)||j.isStream(e)||j.isFile(e)||j.isBlob(e))return e;if(j.isArrayBufferView(e))return e.buffer;if(j.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Hb(e,this.formSerializer).toString();if((a=j.isFileList(e))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return No(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),Zb(e)):e}],transformResponse:[function(e){const n=this.transitional||ya.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(e&&j.isString(e)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(a){if(s)throw a.name==="SyntaxError"?Le.from(a,Le.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Vt.classes.FormData,Blob:Vt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};j.forEach(["delete","get","head","post","put","patch"],t=>{ya.headers[t]={}});const ba=ya,qb=j.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"]),Kb=t=>{const e={};let n,r,i;return t&&t.split(`
|
|
97
|
-
`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||e[n]&&qb[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},
|
|
98
|
-
`)}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[
|
|
96
|
+
*/function tc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function nc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?tc(Object(n),!0).forEach(function(r){u0(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function u0(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var rc=function(){var t=[];return{activateTrap:function(n){if(t.length>0){var r=t[t.length-1];r!==n&&r.pause()}var i=t.indexOf(n);i===-1||t.splice(i,1),t.push(n)},deactivateTrap:function(n){var r=t.indexOf(n);r!==-1&&t.splice(r,1),t.length>0&&t[t.length-1].unpause()}}}(),f0=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},d0=function(e){return e.key==="Escape"||e.key==="Esc"||e.keyCode===27},p0=function(e){return e.key==="Tab"||e.keyCode===9},ic=function(e){return setTimeout(e,0)},oc=function(e,n){var r=-1;return e.every(function(i,o){return n(i)?(r=o,!1):!0}),r},Or=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return typeof e=="function"?e.apply(void 0,r):e},ki=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},h0=function(e,n){var r=(n==null?void 0:n.document)||document,i=nc({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},n),o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},s,a=function(m,w,_){return m&&m[w]!==void 0?m[w]:i[_||w]},l=function(m){return o.containerGroups.findIndex(function(w){var _=w.container,P=w.tabbableNodes;return _.contains(m)||P.find(function(M){return M===m})})},c=function(m){var w=i[m];if(typeof w=="function"){for(var _=arguments.length,P=new Array(_>1?_-1:0),M=1;M<_;M++)P[M-1]=arguments[M];w=w.apply(void 0,P)}if(w===!0&&(w=void 0),!w){if(w===void 0||w===!1)return w;throw new Error("`".concat(m,"` was specified but was not a node, or did not return a node"))}var O=w;if(typeof w=="string"&&(O=r.querySelector(w),!O))throw new Error("`".concat(m,"` as selector refers to no known node"));return O},f=function(){var m=c("initialFocus");if(m===!1)return!1;if(m===void 0)if(l(r.activeElement)>=0)m=r.activeElement;else{var w=o.tabbableGroups[0],_=w&&w.firstTabbableNode;m=_||c("fallbackFocus")}if(!m)throw new Error("Your focus-trap needs to have at least one focusable element");return m},d=function(){if(o.containerGroups=o.containers.map(function(m){var w=a0(m,i.tabbableOptions),_=l0(m,i.tabbableOptions);return{container:m,tabbableNodes:w,focusableNodes:_,firstTabbableNode:w.length>0?w[0]:null,lastTabbableNode:w.length>0?w[w.length-1]:null,nextTabbableNode:function(M){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,k=_.findIndex(function(I){return I===M});if(!(k<0))return O?_.slice(k+1).find(function(I){return Pi(I,i.tabbableOptions)}):_.slice(0,k).reverse().find(function(I){return Pi(I,i.tabbableOptions)})}}}),o.tabbableGroups=o.containerGroups.filter(function(m){return m.tabbableNodes.length>0}),o.tabbableGroups.length<=0&&!c("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},p=function L(m){if(m!==!1&&m!==r.activeElement){if(!m||!m.focus){L(f());return}m.focus({preventScroll:!!i.preventScroll}),o.mostRecentlyFocusedNode=m,f0(m)&&m.select()}},v=function(m){var w=c("setReturnFocus",m);return w||(w===!1?!1:m)},g=function(m){var w=ki(m);if(!(l(w)>=0)){if(Or(i.clickOutsideDeactivates,m)){s.deactivate({returnFocus:i.returnFocusOnDeactivate&&!rs(w,i.tabbableOptions)});return}Or(i.allowOutsideClick,m)||m.preventDefault()}},h=function(m){var w=ki(m),_=l(w)>=0;_||w instanceof Document?_&&(o.mostRecentlyFocusedNode=w):(m.stopImmediatePropagation(),p(o.mostRecentlyFocusedNode||f()))},S=function(m){var w=ki(m);d();var _=null;if(o.tabbableGroups.length>0){var P=l(w),M=P>=0?o.containerGroups[P]:void 0;if(P<0)m.shiftKey?_=o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:_=o.tabbableGroups[0].firstTabbableNode;else if(m.shiftKey){var O=oc(o.tabbableGroups,function(F){var K=F.firstTabbableNode;return w===K});if(O<0&&(M.container===w||rs(w,i.tabbableOptions)&&!Pi(w,i.tabbableOptions)&&!M.nextTabbableNode(w,!1))&&(O=P),O>=0){var k=O===0?o.tabbableGroups.length-1:O-1,I=o.tabbableGroups[k];_=I.lastTabbableNode}}else{var B=oc(o.tabbableGroups,function(F){var K=F.lastTabbableNode;return w===K});if(B<0&&(M.container===w||rs(w,i.tabbableOptions)&&!Pi(w,i.tabbableOptions)&&!M.nextTabbableNode(w))&&(B=P),B>=0){var H=B===o.tabbableGroups.length-1?0:B+1,Z=o.tabbableGroups[H];_=Z.firstTabbableNode}}}else _=c("fallbackFocus");_&&(m.preventDefault(),p(_))},E=function(m){if(d0(m)&&Or(i.escapeDeactivates,m)!==!1){m.preventDefault(),s.deactivate();return}if(p0(m)){S(m);return}},b=function(m){var w=ki(m);l(w)>=0||Or(i.clickOutsideDeactivates,m)||Or(i.allowOutsideClick,m)||(m.preventDefault(),m.stopImmediatePropagation())},y=function(){if(o.active)return rc.activateTrap(s),o.delayInitialFocusTimer=i.delayInitialFocus?ic(function(){p(f())}):p(f()),r.addEventListener("focusin",h,!0),r.addEventListener("mousedown",g,{capture:!0,passive:!1}),r.addEventListener("touchstart",g,{capture:!0,passive:!1}),r.addEventListener("click",b,{capture:!0,passive:!1}),r.addEventListener("keydown",E,{capture:!0,passive:!1}),s},x=function(){if(o.active)return r.removeEventListener("focusin",h,!0),r.removeEventListener("mousedown",g,!0),r.removeEventListener("touchstart",g,!0),r.removeEventListener("click",b,!0),r.removeEventListener("keydown",E,!0),s};return s={get active(){return o.active},get paused(){return o.paused},activate:function(m){if(o.active)return this;var w=a(m,"onActivate"),_=a(m,"onPostActivate"),P=a(m,"checkCanFocusTrap");P||d(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,w&&w();var M=function(){P&&d(),y(),_&&_()};return P?(P(o.containers.concat()).then(M,M),this):(M(),this)},deactivate:function(m){if(!o.active)return this;var w=nc({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},m);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,x(),o.active=!1,o.paused=!1,rc.deactivateTrap(s);var _=a(w,"onDeactivate"),P=a(w,"onPostDeactivate"),M=a(w,"checkCanReturnFocus"),O=a(w,"returnFocus","returnFocusOnDeactivate");_&&_();var k=function(){ic(function(){O&&p(v(o.nodeFocusedBeforeActivation)),P&&P()})};return O&&M?(M(v(o.nodeFocusedBeforeActivation)).then(k,k),this):(k(),this)},pause:function(){return o.paused||!o.active?this:(o.paused=!0,x(),this)},unpause:function(){return!o.paused||!o.active?this:(o.paused=!1,d(),y(),this)},updateContainerElements:function(m){var w=[].concat(m).filter(Boolean);return o.containers=w.map(function(_){return typeof _=="string"?r.querySelector(_):_}),o.active&&d(),this}},s.updateContainerElements(e),s};function g0(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}else return Array.from(t)}var ha=!1;if(typeof window<"u"){var sc={get passive(){ha=!0}};window.addEventListener("testPassive",null,sc),window.removeEventListener("testPassive",null,sc)}var wf=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),gn=[],Eo=!1,Sf=-1,Gr=void 0,Wr=void 0,Ef=function(e){return gn.some(function(n){return!!(n.options.allowTouchMove&&n.options.allowTouchMove(e))})},Lo=function(e){var n=e||window.event;return Ef(n.target)||n.touches.length>1?!0:(n.preventDefault&&n.preventDefault(),!1)},v0=function(e){if(Wr===void 0){var n=!!e&&e.reserveScrollBarGap===!0,r=window.innerWidth-document.documentElement.clientWidth;n&&r>0&&(Wr=document.body.style.paddingRight,document.body.style.paddingRight=r+"px")}Gr===void 0&&(Gr=document.body.style.overflow,document.body.style.overflow="hidden")},m0=function(){Wr!==void 0&&(document.body.style.paddingRight=Wr,Wr=void 0),Gr!==void 0&&(document.body.style.overflow=Gr,Gr=void 0)},y0=function(e){return e?e.scrollHeight-e.scrollTop<=e.clientHeight:!1},b0=function(e,n){var r=e.targetTouches[0].clientY-Sf;return Ef(e.target)?!1:n&&n.scrollTop===0&&r>0||y0(n)&&r<0?Lo(e):(e.stopPropagation(),!0)},w0=function(e,n){if(!e){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!gn.some(function(i){return i.targetElement===e})){var r={targetElement:e,options:n||{}};gn=[].concat(g0(gn),[r]),wf?(e.ontouchstart=function(i){i.targetTouches.length===1&&(Sf=i.targetTouches[0].clientY)},e.ontouchmove=function(i){i.targetTouches.length===1&&b0(i,e)},Eo||(document.addEventListener("touchmove",Lo,ha?{passive:!1}:void 0),Eo=!0)):v0(n)}},S0=function(e){if(!e){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}gn=gn.filter(function(n){return n.targetElement!==e}),wf?(e.ontouchstart=null,e.ontouchmove=null,Eo&&gn.length===0&&(document.removeEventListener("touchmove",Lo,ha?{passive:!1}:void 0),Eo=!1)):gn.length||m0()},An=[],E0=function(){return An.some(function(t){return t.activeTargets.length>0})},L0=function(){return An.some(function(t){return t.skippedTargets.length>0})},ac="ResizeObserver loop completed with undelivered notifications.",x0=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:ac}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=ac),window.dispatchEvent(t)},ri;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(ri||(ri={}));var Dn=function(t){return Object.freeze(t)},C0=function(){function t(e,n){this.inlineSize=e,this.blockSize=n,Dn(this)}return t}(),Lf=function(){function t(e,n,r,i){return this.x=e,this.y=n,this.width=r,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Dn(this)}return t.prototype.toJSON=function(){var e=this,n=e.x,r=e.y,i=e.top,o=e.right,s=e.bottom,a=e.left,l=e.width,c=e.height;return{x:n,y:r,top:i,right:o,bottom:s,left:a,width:l,height:c}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),ga=function(t){return t instanceof SVGElement&&"getBBox"in t},xf=function(t){if(ga(t)){var e=t.getBBox(),n=e.width,r=e.height;return!n&&!r}var i=t,o=i.offsetWidth,s=i.offsetHeight;return!(o||s||t.getClientRects().length)},lc=function(t){var e;if(t instanceof Element)return!0;var n=(e=t==null?void 0:t.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(n&&t instanceof n.Element)},_0=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Zr=typeof window<"u"?window:{},Ri=new WeakMap,cc=/auto|scroll/,O0=/^tb|vertical/,M0=/msie|trident/i.test(Zr.navigator&&Zr.navigator.userAgent),Bt=function(t){return parseFloat(t||"0")},tr=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new C0((n?e:t)||0,(n?t:e)||0)},uc=Dn({devicePixelContentBoxSize:tr(),borderBoxSize:tr(),contentBoxSize:tr(),contentRect:new Lf(0,0,0,0)}),Cf=function(t,e){if(e===void 0&&(e=!1),Ri.has(t)&&!e)return Ri.get(t);if(xf(t))return Ri.set(t,uc),uc;var n=getComputedStyle(t),r=ga(t)&&t.ownerSVGElement&&t.getBBox(),i=!M0&&n.boxSizing==="border-box",o=O0.test(n.writingMode||""),s=!r&&cc.test(n.overflowY||""),a=!r&&cc.test(n.overflowX||""),l=r?0:Bt(n.paddingTop),c=r?0:Bt(n.paddingRight),f=r?0:Bt(n.paddingBottom),d=r?0:Bt(n.paddingLeft),p=r?0:Bt(n.borderTopWidth),v=r?0:Bt(n.borderRightWidth),g=r?0:Bt(n.borderBottomWidth),h=r?0:Bt(n.borderLeftWidth),S=d+c,E=l+f,b=h+v,y=p+g,x=a?t.offsetHeight-y-t.clientHeight:0,L=s?t.offsetWidth-b-t.clientWidth:0,m=i?S+b:0,w=i?E+y:0,_=r?r.width:Bt(n.width)-m-L,P=r?r.height:Bt(n.height)-w-x,M=_+S+L+b,O=P+E+x+y,k=Dn({devicePixelContentBoxSize:tr(Math.round(_*devicePixelRatio),Math.round(P*devicePixelRatio),o),borderBoxSize:tr(M,O,o),contentBoxSize:tr(_,P,o),contentRect:new Lf(d,l,_,P)});return Ri.set(t,k),k},_f=function(t,e,n){var r=Cf(t,n),i=r.borderBoxSize,o=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(e){case ri.DEVICE_PIXEL_CONTENT_BOX:return s;case ri.BORDER_BOX:return i;default:return o}},P0=function(){function t(e){var n=Cf(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=Dn([n.borderBoxSize]),this.contentBoxSize=Dn([n.contentBoxSize]),this.devicePixelContentBoxSize=Dn([n.devicePixelContentBoxSize])}return t}(),Of=function(t){if(xf(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},k0=function(){var t=1/0,e=[];An.forEach(function(s){if(s.activeTargets.length!==0){var a=[];s.activeTargets.forEach(function(c){var f=new P0(c.target),d=Of(c.target);a.push(f),c.lastReportedSize=_f(c.target,c.observedBox),d<t&&(t=d)}),e.push(function(){s.callback.call(s.observer,a,s.observer)}),s.activeTargets.splice(0,s.activeTargets.length)}});for(var n=0,r=e;n<r.length;n++){var i=r[n];i()}return t},fc=function(t){An.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(Of(i.target)>t?n.activeTargets.push(i):n.skippedTargets.push(i))})})},R0=function(){var t=0;for(fc(t);E0();)t=k0(),fc(t);return L0()&&x0(),t>0},is,Mf=[],T0=function(){return Mf.splice(0).forEach(function(t){return t()})},A0=function(t){if(!is){var e=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return T0()}).observe(n,r),is=function(){n.textContent="".concat(e?e--:e++)}}Mf.push(t),is()},D0=function(t){A0(function(){requestAnimationFrame(t)})},Ji=0,I0=function(){return!!Ji},j0=250,N0={attributes:!0,characterData:!0,childList:!0,subtree:!0},dc=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],pc=function(t){return t===void 0&&(t=0),Date.now()+t},os=!1,B0=function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var n=this;if(e===void 0&&(e=j0),!os){os=!0;var r=pc(e);D0(function(){var i=!1;try{i=R0()}finally{if(os=!1,e=r-pc(),!I0())return;i?n.run(1e3):e>0?n.run(e):n.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,n=function(){return e.observer&&e.observer.observe(document.body,N0)};document.body?n():Zr.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),dc.forEach(function(n){return Zr.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),dc.forEach(function(n){return Zr.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t}(),$s=new B0,hc=function(t){!Ji&&t>0&&$s.start(),Ji+=t,!Ji&&$s.stop()},U0=function(t){return!ga(t)&&!_0(t)&&getComputedStyle(t).display==="inline"},V0=function(){function t(e,n){this.target=e,this.observedBox=n||ri.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=_f(this.target,this.observedBox,!0);return U0(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),F0=function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t}(),Ti=new WeakMap,gc=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},Ai=function(){function t(){}return t.connect=function(e,n){var r=new F0(e,n);Ti.set(e,r)},t.observe=function(e,n,r){var i=Ti.get(e),o=i.observationTargets.length===0;gc(i.observationTargets,n)<0&&(o&&An.push(i),i.observationTargets.push(new V0(n,r&&r.box)),hc(1),$s.schedule())},t.unobserve=function(e,n){var r=Ti.get(e),i=gc(r.observationTargets,n),o=r.observationTargets.length===1;i>=0&&(o&&An.splice(An.indexOf(r),1),r.observationTargets.splice(i,1),hc(-1))},t.disconnect=function(e){var n=this,r=Ti.get(e);r.observationTargets.slice().forEach(function(i){return n.unobserve(e,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},t}(),z0=function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Ai.connect(this,e)}return t.prototype.observe=function(e,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!lc(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Ai.observe(this,e,n)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!lc(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Ai.unobserve(this,e)},t.prototype.disconnect=function(){Ai.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();function lt(){return lt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},lt.apply(this,arguments)}function Yi(t,e){if(t==null)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)e.indexOf(n=o[r])>=0||(i[n]=t[n]);return i}var qr=typeof window<"u"?u.useLayoutEffect:u.useEffect;function Mr(t,e,n){return e=(e=+e)==e?e:0,n=(n=+n)==n?n:0,(t=+t)==t&&(t=(t=t<=n?t:n)>=e?t:e),t}function Di(t){var e=Math.round(t);if(Number.isNaN(t))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return e}var $0={box:"border-box"};function ss(t,e){var n=e.label,r=e.enabled,i=e.resizeSourceRef,o=u.useState(0),s=o[0],a=o[1];u.useDebugValue(n+": "+s);var l=u.useCallback(function(c){a(c[0].borderBoxSize[0].blockSize),i.current="element"},[i]);return qr(function(){if(t.current&&r){var c=new z0(l);return c.observe(t.current,$0),function(){c.disconnect()}}},[t,l,r]),r?s:0}function at(t){return t===void 0&&(t=1e3),new Promise(function(e){return setTimeout(e,t)})}var vc={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},mc={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},H0=vm({id:"overlay",initial:"closed",context:{initialState:"CLOSED"},states:{closed:{on:{OPEN:"opening",CLOSE:void 0}},opening:{initial:"start",states:{start:{invoke:{src:"onOpenStart",onDone:"transition"}},transition:{always:[{target:"immediately",cond:"initiallyOpen"},{target:"smoothly",cond:"initiallyClosed"}]},immediately:{initial:"open",states:{open:{invoke:{src:"openImmediately",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"#overlay.opening.end"},on:lt({},vc,mc)}}},smoothly:{initial:"visuallyHidden",states:{visuallyHidden:{invoke:{src:"renderVisuallyHidden",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"open"}},open:{invoke:{src:"openSmoothly",onDone:"#overlay.opening.end"},on:lt({},vc,mc)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:lt({},{CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}}),onDone:"open"},open:{on:{DRAG:"#overlay.dragging",SNAP:"snapping",RESIZE:"resizing"}},dragging:{on:{SNAP:"snapping"}},snapping:{initial:"start",states:{start:{invoke:{src:"onSnapStart",onDone:"snappingSmoothly"},entry:[mm({y:function(t,e){return e.payload.y},velocity:function(t,e){return e.payload.velocity},snapSource:function(t,e){var n=e.payload.source;return n===void 0?"custom":n}})]},snappingSmoothly:{invoke:{src:"snapSmoothly",onDone:"end"}},end:{invoke:{src:"onSnapEnd",onDone:"done"},on:{RESIZE:"#overlay.resizing",SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{SNAP:{target:"snapping",actions:"onSnapEnd"},RESIZE:{target:"#overlay.resizing",actions:"onSnapCancel"},DRAG:{target:"#overlay.dragging",actions:"onSnapCancel"},CLOSE:{target:"#overlay.closing",actions:"onSnapCancel"}},onDone:"open"},resizing:{initial:"start",states:{start:{invoke:{src:"onResizeStart",onDone:"resizingSmoothly"}},resizingSmoothly:{invoke:{src:"resizeSmoothly",onDone:"end"}},end:{invoke:{src:"onResizeEnd",onDone:"done"},on:{SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{RESIZE:{target:"resizing",actions:"onResizeEnd"},SNAP:{target:"snapping",actions:"onResizeCancel"},DRAG:{target:"#overlay.dragging",actions:"onResizeCancel"},CLOSE:{target:"#overlay.closing",actions:"onResizeCancel"}},onDone:"open"},closing:{initial:"start",states:{start:{invoke:{src:"onCloseStart",onDone:"deactivating"},on:{OPEN:{target:"#overlay.open",actions:"onCloseCancel"}}},deactivating:{invoke:{src:"deactivate",onDone:"closingSmoothly"}},closingSmoothly:{invoke:{src:"closeSmoothly",onDone:"end"}},end:{invoke:{src:"onCloseEnd",onDone:"done"},on:{OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}}},done:{type:"final"}},on:{CLOSE:void 0,OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}},onDone:"closed"}},on:{CLOSE:"closing"}},{actions:{onOpenCancel:function(t,e){},onSnapCancel:function(t,e){},onResizeCancel:function(t,e){},onCloseCancel:function(t,e){},onOpenEnd:function(t,e){},onSnapEnd:function(t,e){},onRezizeEnd:function(t,e){}},services:{onSnapStart:function(){try{return Promise.resolve(at()).then(function(){})}catch(t){return Promise.reject(t)}},onOpenStart:function(){try{return Promise.resolve(at()).then(function(){})}catch(t){return Promise.reject(t)}},onCloseStart:function(){try{return Promise.resolve(at()).then(function(){})}catch(t){return Promise.reject(t)}},onResizeStart:function(){try{return Promise.resolve(at()).then(function(){})}catch(t){return Promise.reject(t)}},onSnapEnd:function(){try{return Promise.resolve(at()).then(function(){})}catch(t){return Promise.reject(t)}},onOpenEnd:function(){try{return Promise.resolve(at()).then(function(){})}catch(t){return Promise.reject(t)}},onCloseEnd:function(){try{return Promise.resolve(at()).then(function(){})}catch(t){return Promise.reject(t)}},onResizeEnd:function(){try{return Promise.resolve(at()).then(function(){})}catch(t){return Promise.reject(t)}},renderVisuallyHidden:function(t,e){try{return Promise.resolve(at()).then(function(){})}catch(n){return Promise.reject(n)}},activate:function(t,e){try{return Promise.resolve(at()).then(function(){})}catch(n){return Promise.reject(n)}},deactivate:function(t,e){try{return Promise.resolve(at()).then(function(){})}catch(n){return Promise.reject(n)}},openSmoothly:function(t,e){try{return Promise.resolve(at()).then(function(){})}catch(n){return Promise.reject(n)}},openImmediately:function(t,e){try{return Promise.resolve(at()).then(function(){})}catch(n){return Promise.reject(n)}},snapSmoothly:function(t,e){try{return Promise.resolve(at()).then(function(){})}catch(n){return Promise.reject(n)}},resizeSmoothly:function(t,e){try{return Promise.resolve(at()).then(function(){})}catch(n){return Promise.reject(n)}},closeSmoothly:function(t,e){try{return Promise.resolve(at()).then(function(){})}catch(n){return Promise.reject(n)}}},guards:{initiallyClosed:function(t){return t.initialState==="CLOSED"},initiallyOpen:function(t){return t.initialState==="OPEN"}}}),G0=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],W0=["velocity"],Z0=["onRest","config"],Pf=$m.default,q0=Pf.tension,Ii=Pf.friction,K0=u.forwardRef(function(t,e){var n=t.children,r=t.sibling,i=t.className,o=t.footer,s=t.header,a=t.open,l=t.initialState,c=t.lastSnapRef,f=t.initialFocusRef,d=t.onDismiss,p=t.maxHeight,v=t.defaultSnap,g=v===void 0?Y0:v,h=t.snapPoints,S=h===void 0?Q0:h,E=t.blocking,b=E===void 0||E,y=t.scrollLocking,x=y===void 0||y,L=t.style,m=t.onSpringStart,w=t.onSpringCancel,_=t.onSpringEnd,P=t.reserveScrollBarGap,M=P===void 0?b:P,O=t.expandOnContentDrag,k=O!==void 0&&O,I=Yi(t,G0),B=function(){var U=u.useState(!1),ne=U[0],J=U[1],he=u.useState({}),Ae=he[0],Le=he[1],De=u.useCallback(function(ke){return Le(function(Be){var ce;return lt({},Be,((ce={})[ke]=!1,ce))}),function(){Le(function(Be){var ce;return lt({},Be,((ce={})[ke]=!0,ce))})}},[]);return u.useEffect(function(){var ke=Object.values(Ae);ke.length!==0&&ke.every(Boolean)&&J(!0)},[Ae]),{ready:ne,registerReady:De}}(),H=B.ready,Z=B.registerReady,F=u.useRef(!1),K=u.useRef(m),A=u.useRef(w),R=u.useRef(_);u.useEffect(function(){K.current=m,A.current=w,R.current=_},[w,m,_]);var T,V,z=qm(function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}}),$=z[0],X=z[1],N=u.useRef(null),D=u.useRef(null),W=u.useRef(null),q=u.useRef(null),te=u.useRef(null),re=u.useRef(null),ie=u.useRef(0),fe=u.useRef(),Oe=u.useRef(!1),me=(T=u.useMemo(function(){return typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null},[]),V=u.useRef(T==null?void 0:T.matches),u.useDebugValue(V.current?"reduce":"no-preference"),u.useEffect(function(){var U=function(ne){V.current=ne.matches};return T==null||T.addListener(U),function(){return T==null?void 0:T.removeListener(U)}},[T]),V),ye=function(U){var ne=U.targetRef,J=U.enabled,he=U.reserveScrollBarGap,Ae=u.useRef({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return u.useDebugValue(J?"Enabled":"Disabled"),u.useEffect(function(){if(!J)return Ae.current.deactivate(),void(Ae.current={activate:function(){},deactivate:function(){}});var Le=ne.current,De=!1;Ae.current={activate:function(){De||(De=!0,w0(Le,{allowTouchMove:function(ke){return ke.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:he}))},deactivate:function(){De&&(De=!1,S0(Le))}}},[J,ne,he]),Ae}({targetRef:D,enabled:H&&x,reserveScrollBarGap:M}),Me=function(U){var ne=U.targetRef,J=U.enabled,he=u.useRef({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return u.useDebugValue(J?"Enabled":"Disabled"),u.useEffect(function(){if(!J)return he.current.deactivate(),void(he.current={activate:function(){},deactivate:function(){}});var Ae=ne.current,Le=!1,De=[],ke=[];he.current={activate:function(){if(!Le){Le=!0;var Be=Ae.parentNode;document.querySelectorAll("body > *").forEach(function(ce){if(ce!==Be){var be=ce.getAttribute("aria-hidden");be!==null&&be!=="false"||(De.push(be),ke.push(ce),ce.setAttribute("aria-hidden","true"))}})}},deactivate:function(){Le&&(Le=!1,ke.forEach(function(Be,ce){var be=De[ce];be===null?Be.removeAttribute("aria-hidden"):Be.setAttribute("aria-hidden",be)}),De=[],ke=[])}}},[ne,J]),he}({targetRef:N,enabled:H&&b}),Pe=function(U){var ne=U.targetRef,J=U.fallbackRef,he=U.initialFocusRef,Ae=U.enabled,Le=u.useRef({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return u.useDebugValue(Ae?"Enabled":"Disabled"),u.useEffect(function(){if(!Ae)return Le.current.deactivate(),void(Le.current={activate:function(){},deactivate:function(){}});var De=J.current,ke=h0(ne.current,{onActivate:void 0,initialFocus:he?function(){return(he==null?void 0:he.current)||De}:void 0,fallbackFocus:De,escapeDeactivates:!1,clickOutsideDeactivates:!1}),Be=!1;Le.current={activate:function(){try{return Be?Promise.resolve():(Be=!0,Promise.resolve(ke.activate()).then(function(){return Promise.resolve(new Promise(function(ce){return setTimeout(function(){return ce(void 0)},0)})).then(function(){})}))}catch(ce){return Promise.reject(ce)}},deactivate:function(){Be&&(Be=!1,ke.deactivate())}}},[Ae,J,he,ne]),Le}({targetRef:N,fallbackRef:re,initialFocusRef:f||void 0,enabled:H&&b&&f!==!1}),Te=function(U){var ne=U.getSnapPoints,J=U.heightRef,he=U.lastSnapRef,Ae=U.ready,Le=function(qe){var dt=qe.contentRef,pt=qe.controlledMaxHeight,Qe=qe.footerEnabled,Nt=qe.footerRef,Ot=qe.headerEnabled,ht=qe.headerRef,Xt=qe.registerReady,Wt=qe.resizeSourceRef,hr=u.useMemo(function(){return Xt("contentHeight")},[Xt]),gr=function(en,Sn,En){var Ln=u.useMemo(function(){return Sn("maxHeight")},[Sn]),xn=u.useState(function(){return Di(en)||typeof window<"u"?window.innerHeight:0}),yr=xn[0],br=xn[1],tn=yr>0,oe=u.useRef(0);return u.useDebugValue(en?"controlled":"auto"),u.useEffect(function(){tn&&Ln()},[tn,Ln]),qr(function(){if(en)return br(Di(en)),void(En.current="maxheightprop");var Ma=function(){oe.current||(oe.current=requestAnimationFrame(function(){br(window.innerHeight),En.current="window",oe.current=0}))};return window.addEventListener("resize",Ma),br(window.innerHeight),En.current="window",Ln(),function(){window.removeEventListener("resize",Ma),cancelAnimationFrame(oe.current)}},[en,Ln,En]),yr}(pt,Xt,Wt),Vn=ss(ht,{label:"headerHeight",enabled:Ot,resizeSourceRef:Wt}),vr=ss(dt,{label:"contentHeight",enabled:!0,resizeSourceRef:Wt}),Fn=ss(Nt,{label:"footerHeight",enabled:Qe,resizeSourceRef:Wt}),wn=Math.min(gr-Vn-Fn,vr)+Vn+Fn;u.useDebugValue("minHeight: "+wn);var mr=vr>0;return u.useEffect(function(){mr&&hr()},[mr,hr]),{maxHeight:gr,minHeight:wn,headerHeight:Vn,footerHeight:Fn}}({contentRef:U.contentRef,controlledMaxHeight:U.controlledMaxHeight,footerEnabled:U.footerEnabled,footerRef:U.footerRef,headerEnabled:U.headerEnabled,headerRef:U.headerRef,registerReady:U.registerReady,resizeSourceRef:U.resizeSourceRef}),De=Le.maxHeight,ke=Le.minHeight,Be=Le.headerHeight,ce=Le.footerHeight,be=function(qe,dt){var pt=[].concat(qe).map(Di).reduce(function(ht,Xt){return ht.add(Mr(Xt,0,dt)),ht},new Set),Qe=Array.from(pt),Nt=Math.min.apply(Math,Qe);if(Number.isNaN(Nt))throw new TypeError("minSnap is NaN");var Ot=Math.max.apply(Math,Qe);if(Number.isNaN(Ot))throw new TypeError("maxSnap is NaN");return{snapPoints:Qe,minSnap:Nt,maxSnap:Ot}}(Ae?ne({height:J.current,footerHeight:ce,headerHeight:Be,minHeight:ke,maxHeight:De}):[0],De),ct=be.snapPoints,Gt=be.minSnap,st=be.maxSnap;return u.useDebugValue("minSnap: "+Gt+", maxSnap:"+st),{minSnap:Gt,maxSnap:st,findSnap:function(qe){var dt=Di(typeof qe=="function"?qe({footerHeight:ce,headerHeight:Be,height:J.current,minHeight:ke,maxHeight:De,snapPoints:ct,lastSnap:he.current}):qe);return ct.reduce(function(pt,Qe){return Math.abs(Qe-dt)<Math.abs(pt-dt)?Qe:pt},Gt)},maxHeight:De}}({contentRef:W,controlledMaxHeight:p,footerEnabled:!!o,footerRef:te,getSnapPoints:S,headerEnabled:s!==!1,headerRef:q,heightRef:ie,lastSnapRef:c,ready:H,registerReady:Z,resizeSourceRef:fe}),se=Te.minSnap,ae=Te.maxSnap,ze=Te.maxHeight,Je=Te.findSnap,Y=u.useRef(ze),$e=u.useRef(se),Ne=u.useRef(ae),ft=u.useRef(Je),ot=u.useRef(0);qr(function(){Y.current=ze,Ne.current=ae,$e.current=se,ft.current=Je,ot.current=Je(g)},[Je,g,ze,ae,se]);var le=u.useCallback(function(U){var ne=U.onRest,J=U.config,he=(J=J===void 0?{}:J).velocity,Ae=he===void 0?1:he,Le=Yi(J,W0),De=Yi(U,Z0);return new Promise(function(ke){return X(lt({},De,{config:lt({velocity:Ae},Le,{mass:1,tension:q0,friction:Math.max(Ii,Ii+(Ii-Ii*Ae))}),onRest:function(){var Be=[].slice.call(arguments);ke.apply(void 0,Be),ne==null||ne.apply(void 0,Be)}}))})},[X]),bn=_m(H0,{devTools:!1,actions:{onOpenCancel:u.useCallback(function(){return A.current==null?void 0:A.current({type:"OPEN"})},[]),onSnapCancel:u.useCallback(function(U){return A.current==null?void 0:A.current({type:"SNAP",source:U.snapSource})},[]),onCloseCancel:u.useCallback(function(){return A.current==null?void 0:A.current({type:"CLOSE"})},[]),onResizeCancel:u.useCallback(function(){return A.current==null?void 0:A.current({type:"RESIZE",source:fe.current})},[]),onOpenEnd:u.useCallback(function(){return R.current==null?void 0:R.current({type:"OPEN"})},[]),onSnapEnd:u.useCallback(function(U,ne){return R.current==null?void 0:R.current({type:"SNAP",source:U.snapSource})},[]),onResizeEnd:u.useCallback(function(){return R.current==null?void 0:R.current({type:"RESIZE",source:fe.current})},[])},context:{initialState:l},services:{onSnapStart:u.useCallback(function(U,ne){try{return Promise.resolve(K.current==null?void 0:K.current({type:"SNAP",source:ne.payload.source||"custom"}))}catch(J){return Promise.reject(J)}},[]),onOpenStart:u.useCallback(function(){try{return Promise.resolve(K.current==null?void 0:K.current({type:"OPEN"}))}catch(U){return Promise.reject(U)}},[]),onCloseStart:u.useCallback(function(){try{return Promise.resolve(K.current==null?void 0:K.current({type:"CLOSE"}))}catch(U){return Promise.reject(U)}},[]),onResizeStart:u.useCallback(function(){try{return Promise.resolve(K.current==null?void 0:K.current({type:"RESIZE",source:fe.current}))}catch(U){return Promise.reject(U)}},[]),onSnapEnd:u.useCallback(function(U,ne){try{return Promise.resolve(R.current==null?void 0:R.current({type:"SNAP",source:U.snapSource}))}catch(J){return Promise.reject(J)}},[]),onOpenEnd:u.useCallback(function(){try{return Promise.resolve(R.current==null?void 0:R.current({type:"OPEN"}))}catch(U){return Promise.reject(U)}},[]),onCloseEnd:u.useCallback(function(){try{return Promise.resolve(R.current==null?void 0:R.current({type:"CLOSE"}))}catch(U){return Promise.reject(U)}},[]),onResizeEnd:u.useCallback(function(){try{return Promise.resolve(R.current==null?void 0:R.current({type:"RESIZE",source:fe.current}))}catch(U){return Promise.reject(U)}},[]),renderVisuallyHidden:u.useCallback(function(U,ne){try{return Promise.resolve(le({y:ot.current,ready:0,maxHeight:Y.current,maxSnap:Ne.current,minSnap:ot.current,immediate:!0})).then(function(){})}catch(J){return Promise.reject(J)}},[le]),activate:u.useCallback(function(U,ne){try{return F.current=!0,Promise.resolve(Promise.all([ye.current.activate(),Pe.current.activate(),Me.current.activate()])).then(function(){})}catch(J){return Promise.reject(J)}},[Me,Pe,ye]),deactivate:u.useCallback(function(){try{return ye.current.deactivate(),Pe.current.deactivate(),Me.current.deactivate(),F.current=!1,Promise.resolve()}catch(U){return Promise.reject(U)}},[Me,Pe,ye]),openImmediately:u.useCallback(function(){try{return ie.current=ot.current,Promise.resolve(le({y:ot.current,ready:1,maxHeight:Y.current,maxSnap:Ne.current,minSnap:ot.current,immediate:!0})).then(function(){})}catch(U){return Promise.reject(U)}},[le]),openSmoothly:u.useCallback(function(){try{return Promise.resolve(le({y:0,ready:1,maxHeight:Y.current,maxSnap:Ne.current,minSnap:ot.current,immediate:!0})).then(function(){return ie.current=ot.current,Promise.resolve(le({y:ot.current,ready:1,maxHeight:Y.current,maxSnap:Ne.current,minSnap:ot.current,immediate:me.current})).then(function(){})})}catch(U){return Promise.reject(U)}},[le,me]),snapSmoothly:u.useCallback(function(U,ne){try{var J=ft.current(U.y);return ie.current=J,c.current=J,Promise.resolve(le({y:J,ready:1,maxHeight:Y.current,maxSnap:Ne.current,minSnap:$e.current,immediate:me.current,config:{velocity:U.velocity}})).then(function(){})}catch(he){return Promise.reject(he)}},[le,c,me]),resizeSmoothly:u.useCallback(function(){try{var U=ft.current(ie.current);return ie.current=U,c.current=U,Promise.resolve(le({y:U,ready:1,maxHeight:Y.current,maxSnap:Ne.current,minSnap:$e.current,immediate:fe.current!=="element"||me.current})).then(function(){})}catch(ne){return Promise.reject(ne)}},[le,c,me]),closeSmoothly:u.useCallback(function(U,ne){try{return le({minSnap:ie.current,immediate:!0}),ie.current=0,Promise.resolve(le({y:0,maxHeight:Y.current,maxSnap:Ne.current,immediate:me.current})).then(function(){return Promise.resolve(le({ready:0,immediate:!0})).then(function(){})})}catch(J){return Promise.reject(J)}},[le,me])}}),pi=bn[0],_t=bn[1];u.useEffect(function(){H&&_t(a?"OPEN":"CLOSE")},[a,_t,H]),qr(function(){(ze||ae||se)&&_t("RESIZE")},[ze,ae,se,_t]),u.useEffect(function(){return function(){ye.current.deactivate(),Pe.current.deactivate(),Me.current.deactivate()}},[Me,Pe,ye]),u.useImperativeHandle(e,function(){return{snapTo:function(U,ne){var J=ne===void 0?{}:ne,he=J.velocity,Ae=he===void 0?1:he,Le=J.source,De=Le===void 0?"custom":Le;_t("SNAP",{payload:{y:ft.current(U),velocity:Ae,source:De}})},get height(){return ie.current}}},[_t]),u.useEffect(function(){var U=D.current,ne=function(he){Oe.current&&he.preventDefault()},J=function(he){U.scrollTop<0&&(requestAnimationFrame(function(){U.style.overflow="hidden",U.scrollTop=0,U.style.removeProperty("overflow")}),he.preventDefault())};return k&&(U.addEventListener("scroll",ne),U.addEventListener("touchmove",ne),U.addEventListener("touchstart",J)),function(){U.removeEventListener("scroll",ne),U.removeEventListener("touchmove",ne),U.removeEventListener("touchstart",J)}},[k,D]);var Ht=Ky(function(U){var ne=U.args,J=(ne=ne===void 0?[]:ne)[0],he=(J=J===void 0?{}:J).closeOnTap,Ae=he!==void 0&&he,Le=J.isContentDragging,De=Le!==void 0&&Le,ke=U.cancel,Be=U.direction[1],ce=U.down,be=U.first,ct=U.last,Gt=U.memo,st=Gt===void 0?$.y.getValue():Gt,qe=U.tap,dt=U.velocity,pt=-1*U.movement[1];if(!F.current)return ke(),st;if(d&&Ae&&qe)return ke(),setTimeout(function(){return d()},0),st;if(qe)return st;var Qe=st+pt,Nt=pt*dt,Ot=Math.max($e.current,Math.min(Ne.current,Qe+2*Nt));if(!ce&&d&&Be>0&&Qe+Nt<$e.current/2)return ke(),d(),st;var ht=ce?d||$e.current!==Ne.current?Hr(Qe,d?0:$e.current,Ne.current,.55):Qe<$e.current?Hr(Qe,$e.current,2*Ne.current,.55):Hr(Qe,$e.current/2,Ne.current,.55):Ot;return k&&De?(ht>=Ne.current&&(ht=Ne.current),st===Ne.current&&D.current.scrollTop>0&&(ht=Ne.current),Oe.current=ht<Ne.current):Oe.current=!1,be&&_t("DRAG"),ct?(_t("SNAP",{payload:{y:ht,velocity:dt>.05?dt:1,source:"dragging"}}),st):(X({y:ht,ready:1,maxHeight:Y.current,maxSnap:Ne.current,minSnap:$e.current,immediate:!0,config:{velocity:dt}}),st)},{filterTaps:!0});if(Number.isNaN(Ne.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN($e.current))throw new TypeError("minSnapRef is NaN!!");var hi=function(U){var ne,J=U.spring,he=Gn([J.y,J.maxHeight],function(ce,be){return Math.round(Mr(be-ce,0,16))+"px"}),Ae=Gn([J.y,J.minSnap,J.maxSnap],function(ce,be,ct){return Mr(ce,be,ct)+"px"}),Le=Gn([J.y,J.minSnap,J.maxSnap],function(ce,be,ct){return ce<be?be-ce+"px":ce>ct?ct-ce+"px":"0px"}),De=Gn([J.y,J.maxSnap],function(ce,be){return ce>=be?Math.ceil(ce-be):0}),ke=Gn([J.y,J.minSnap],function(ce,be){if(!be)return 0;var ct=Math.max(be/2-45,0);return Mr((ce-ct)*(1/(Math.min(be/2+45,be)-ct)+0),0,1)}),Be=Gn([J.y,J.minSnap],function(ce,be){return be?Mr(ce/be,0,1):0});return(ne={})["--rsbs-content-opacity"]=ke,ne["--rsbs-backdrop-opacity"]=Be,ne["--rsbs-antigap-scale-y"]=De,ne["--rsbs-overlay-translate-y"]=Le,ne["--rsbs-overlay-rounded"]=he,ne["--rsbs-overlay-h"]=Ae,ne}({spring:$});return u.createElement(py.div,lt({},I,{"data-rsbs-root":!0,"data-rsbs-state":J0.find(pi.matches),"data-rsbs-is-blocking":b,"data-rsbs-is-dismissable":!!d,"data-rsbs-has-header":!!s,"data-rsbs-has-footer":!!o,className:i,ref:N,style:lt({},hi,L,{opacity:$.ready})}),r,b&&u.createElement("div",lt({key:"backdrop","data-rsbs-backdrop":!0},Ht({closeOnTap:!0}))),u.createElement("div",{key:"overlay","aria-modal":"true",role:"dialog","data-rsbs-overlay":!0,tabIndex:-1,ref:re,onKeyDown:function(U){U.key==="Escape"&&(U.stopPropagation(),d&&d())}},s!==!1&&u.createElement("div",lt({key:"header","data-rsbs-header":!0,ref:q},Ht()),s),u.createElement("div",lt({key:"scroll","data-rsbs-scroll":!0,ref:D},k?Ht({isContentDragging:!0}):{}),u.createElement("div",{"data-rsbs-content":!0,ref:W},n)),o&&u.createElement("div",lt({key:"footer",ref:te,"data-rsbs-footer":!0},Ht()),o)))}),J0=["closed","opening","open","closing","dragging","snapping","resizing"];function Y0(t){var e=t.lastSnap;return e??Math.min.apply(Math,t.snapPoints)}function Q0(t){return t.minHeight}var X0=["onSpringStart","onSpringEnd","skipInitialTransition"],kf=u.forwardRef(function(t,e){var n=t.onSpringStart,r=t.onSpringEnd,i=t.skipInitialTransition,o=Yi(t,X0),s=u.useState(!1),a=s[0],l=s[1],c=u.useRef(),f=u.useRef(null),d=u.useRef(i&&o.open?"OPEN":"CLOSED");qr(function(){if(o.open)return cancelAnimationFrame(c.current),l(!0),function(){d.current="CLOSED"}},[o.open]);var p=u.useCallback(function(g){return Promise.resolve(n==null?void 0:n(g)).then(function(){g.type==="OPEN"&&cancelAnimationFrame(c.current)})},[n]),v=u.useCallback(function(g){return Promise.resolve(r==null?void 0:r(g)).then(function(){g.type==="CLOSE"&&(c.current=requestAnimationFrame(function(){return l(!1)}))})},[r]);return a?u.createElement(Sv,{"data-rsbs-portal":!0},u.createElement(K0,lt({},o,{lastSnapRef:f,ref:e,initialState:d.current,onSpringStart:p,onSpringEnd:v}))):null});function Rf(t,e){return function(){return t.apply(e,arguments)}}const{toString:eb}=Object.prototype,{getPrototypeOf:va}=Object,Do=(t=>e=>{const n=eb.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),$t=t=>(t=t.toLowerCase(),e=>Do(e)===t),Io=t=>e=>typeof e===t,{isArray:dr}=Array,ii=Io("undefined");function tb(t){return t!==null&&!ii(t)&&t.constructor!==null&&!ii(t.constructor)&&Ct(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Tf=$t("ArrayBuffer");function nb(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Tf(t.buffer),e}const rb=Io("string"),Ct=Io("function"),Af=Io("number"),jo=t=>t!==null&&typeof t=="object",ib=t=>t===!0||t===!1,Qi=t=>{if(Do(t)!=="object")return!1;const e=va(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},ob=$t("Date"),sb=$t("File"),ab=$t("Blob"),lb=$t("FileList"),cb=t=>jo(t)&&Ct(t.pipe),ub=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Ct(t.append)&&((e=Do(t))==="formdata"||e==="object"&&Ct(t.toString)&&t.toString()==="[object FormData]"))},fb=$t("URLSearchParams"),db=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ci(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),dr(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{const o=n?Object.getOwnPropertyNames(t):Object.keys(t),s=o.length;let a;for(r=0;r<s;r++)a=o[r],e.call(null,t[a],a,t)}}function Df(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 If=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),jf=t=>!ii(t)&&t!==If;function Hs(){const{caseless:t}=jf(this)&&this||{},e={},n=(r,i)=>{const o=t&&Df(e,i)||i;Qi(e[o])&&Qi(r)?e[o]=Hs(e[o],r):Qi(r)?e[o]=Hs({},r):dr(r)?e[o]=r.slice():e[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&ci(arguments[r],n);return e}const pb=(t,e,n,{allOwnKeys:r}={})=>(ci(e,(i,o)=>{n&&Ct(i)?t[o]=Rf(i,n):t[o]=i},{allOwnKeys:r}),t),hb=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),gb=(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)},vb=(t,e,n,r)=>{let i,o,s;const a={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)s=i[o],(!r||r(s,t,e))&&!a[s]&&(e[s]=t[s],a[s]=!0);t=n!==!1&&va(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},mb=(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},yb=t=>{if(!t)return null;if(dr(t))return t;let e=t.length;if(!Af(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},bb=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&va(Uint8Array)),wb=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=r.next())&&!i.done;){const o=i.value;e.call(t,o[0],o[1])}},Sb=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},Eb=$t("HTMLFormElement"),Lb=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),yc=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),xb=$t("RegExp"),Nf=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};ci(n,(i,o)=>{let s;(s=e(i,o,t))!==!1&&(r[o]=s||i)}),Object.defineProperties(t,r)},Cb=t=>{Nf(t,(e,n)=>{if(Ct(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(Ct(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(o=>{n[o]=!0})};return dr(t)?r(t):r(String(t).split(e)),n},Ob=()=>{},Mb=(t,e)=>(t=+t,Number.isFinite(t)?t:e),as="abcdefghijklmnopqrstuvwxyz",bc="0123456789",Bf={DIGIT:bc,ALPHA:as,ALPHA_DIGIT:as+as.toUpperCase()+bc},Pb=(t=16,e=Bf.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function kb(t){return!!(t&&Ct(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Rb=t=>{const e=new Array(10),n=(r,i)=>{if(jo(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const o=dr(r)?[]:{};return ci(r,(s,a)=>{const l=n(s,i+1);!ii(l)&&(o[a]=l)}),e[i]=void 0,o}}return r};return n(t,0)},Tb=$t("AsyncFunction"),Ab=t=>t&&(jo(t)||Ct(t))&&Ct(t.then)&&Ct(t.catch),j={isArray:dr,isArrayBuffer:Tf,isBuffer:tb,isFormData:ub,isArrayBufferView:nb,isString:rb,isNumber:Af,isBoolean:ib,isObject:jo,isPlainObject:Qi,isUndefined:ii,isDate:ob,isFile:sb,isBlob:ab,isRegExp:xb,isFunction:Ct,isStream:cb,isURLSearchParams:fb,isTypedArray:bb,isFileList:lb,forEach:ci,merge:Hs,extend:pb,trim:db,stripBOM:hb,inherits:gb,toFlatObject:vb,kindOf:Do,kindOfTest:$t,endsWith:mb,toArray:yb,forEachEntry:wb,matchAll:Sb,isHTMLForm:Eb,hasOwnProperty:yc,hasOwnProp:yc,reduceDescriptors:Nf,freezeMethods:Cb,toObjectSet:_b,toCamelCase:Lb,noop:Ob,toFiniteNumber:Mb,findKey:Df,global:If,isContextDefined:jf,ALPHABET:Bf,generateString:Pb,isSpecCompliantForm:kb,toJSONObject:Rb,isAsyncFn:Tb,isThenable:Ab};function Ee(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)}j.inherits(Ee,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:j.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Uf=Ee.prototype,Vf={};["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=>{Vf[t]={value:t}});Object.defineProperties(Ee,Vf);Object.defineProperty(Uf,"isAxiosError",{value:!0});Ee.from=(t,e,n,r,i,o)=>{const s=Object.create(Uf);return j.toFlatObject(t,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),Ee.call(s,t.message,e,n,r,i),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};const Db=null;function Gs(t){return j.isPlainObject(t)||j.isArray(t)}function Ff(t){return j.endsWith(t,"[]")?t.slice(0,-2):t}function wc(t,e,n){return t?t.concat(e).map(function(i,o){return i=Ff(i),!n&&o?"["+i+"]":i}).join(n?".":""):e}function Ib(t){return j.isArray(t)&&!t.some(Gs)}const jb=j.toFlatObject(j,{},null,function(e){return/^is[A-Z]/.test(e)});function No(t,e,n){if(!j.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=j.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,S){return!j.isUndefined(S[h])});const r=n.metaTokens,i=n.visitor||f,o=n.dots,s=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&j.isSpecCompliantForm(e);if(!j.isFunction(i))throw new TypeError("visitor must be a function");function c(g){if(g===null)return"";if(j.isDate(g))return g.toISOString();if(!l&&j.isBlob(g))throw new Ee("Blob is not supported. Use a Buffer instead.");return j.isArrayBuffer(g)||j.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function f(g,h,S){let E=g;if(g&&!S&&typeof g=="object"){if(j.endsWith(h,"{}"))h=r?h:h.slice(0,-2),g=JSON.stringify(g);else if(j.isArray(g)&&Ib(g)||(j.isFileList(g)||j.endsWith(h,"[]"))&&(E=j.toArray(g)))return h=Ff(h),E.forEach(function(y,x){!(j.isUndefined(y)||y===null)&&e.append(s===!0?wc([h],x,o):s===null?h:h+"[]",c(y))}),!1}return Gs(g)?!0:(e.append(wc(S,h,o),c(g)),!1)}const d=[],p=Object.assign(jb,{defaultVisitor:f,convertValue:c,isVisitable:Gs});function v(g,h){if(!j.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+h.join("."));d.push(g),j.forEach(g,function(E,b){(!(j.isUndefined(E)||E===null)&&i.call(e,E,j.isString(b)?b.trim():b,h,p))===!0&&v(E,h?h.concat(b):[b])}),d.pop()}}if(!j.isObject(t))throw new TypeError("data must be an object");return v(t),e}function Sc(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function ma(t,e){this._pairs=[],t&&No(t,this,e)}const zf=ma.prototype;zf.append=function(e,n){this._pairs.push([e,n])};zf.toString=function(e){const n=e?function(r){return e.call(this,r,Sc)}:Sc;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Nb(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function $f(t,e,n){if(!e)return t;const r=n&&n.encode||Nb,i=n&&n.serialize;let o;if(i?o=i(e,n):o=j.isURLSearchParams(e)?e.toString():new ma(e,n).toString(r),o){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class Bb{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){j.forEach(this.handlers,function(r){r!==null&&e(r)})}}const Ec=Bb,Hf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ub=typeof URLSearchParams<"u"?URLSearchParams:ma,Vb=typeof FormData<"u"?FormData:null,Fb=typeof Blob<"u"?Blob:null,zb=(()=>{let t;return typeof navigator<"u"&&((t=navigator.product)==="ReactNative"||t==="NativeScript"||t==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),$b=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Vt={isBrowser:!0,classes:{URLSearchParams:Ub,FormData:Vb,Blob:Fb},isStandardBrowserEnv:zb,isStandardBrowserWebWorkerEnv:$b,protocols:["http","https","file","blob","url","data"]};function Hb(t,e){return No(t,new Vt.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Vt.isNode&&j.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function Gb(t){return j.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Wb(t){const e={},n=Object.keys(t);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],e[o]=t[o];return e}function Gf(t){function e(n,r,i,o){let s=n[o++];const a=Number.isFinite(+s),l=o>=n.length;return s=!s&&j.isArray(i)?i.length:s,l?(j.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!j.isObject(i[s]))&&(i[s]=[]),e(n,r,i[s],o)&&j.isArray(i[s])&&(i[s]=Wb(i[s])),!a)}if(j.isFormData(t)&&j.isFunction(t.entries)){const n={};return j.forEachEntry(t,(r,i)=>{e(Gb(r),i,n,0)}),n}return null}function Zb(t,e,n){if(j.isString(t))try{return(e||JSON.parse)(t),j.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const ya={transitional:Hf,adapter:["xhr","http"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=j.isObject(e);if(o&&j.isHTMLForm(e)&&(e=new FormData(e)),j.isFormData(e))return i&&i?JSON.stringify(Gf(e)):e;if(j.isArrayBuffer(e)||j.isBuffer(e)||j.isStream(e)||j.isFile(e)||j.isBlob(e))return e;if(j.isArrayBufferView(e))return e.buffer;if(j.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Hb(e,this.formSerializer).toString();if((a=j.isFileList(e))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return No(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),Zb(e)):e}],transformResponse:[function(e){const n=this.transitional||ya.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(e&&j.isString(e)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(a){if(s)throw a.name==="SyntaxError"?Ee.from(a,Ee.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Vt.classes.FormData,Blob:Vt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};j.forEach(["delete","get","head","post","put","patch"],t=>{ya.headers[t]={}});const ba=ya,qb=j.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"]),Kb=t=>{const e={};let n,r,i;return t&&t.split(`
|
|
97
|
+
`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||e[n]&&qb[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Lc=Symbol("internals");function Pr(t){return t&&String(t).trim().toLowerCase()}function Xi(t){return t===!1||t==null?t:j.isArray(t)?t.map(Xi):String(t)}function Jb(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 Yb=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function ls(t,e,n,r,i){if(j.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!j.isString(e)){if(j.isString(r))return e.indexOf(r)!==-1;if(j.isRegExp(r))return r.test(e)}}function Qb(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function Xb(t,e){const n=j.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,o,s){return this[r].call(this,e,i,o,s)},configurable:!0})})}class Bo{constructor(e){e&&this.set(e)}set(e,n,r){const i=this;function o(a,l,c){const f=Pr(l);if(!f)throw new Error("header name must be a non-empty string");const d=j.findKey(i,f);(!d||i[d]===void 0||c===!0||c===void 0&&i[d]!==!1)&&(i[d||l]=Xi(a))}const s=(a,l)=>j.forEach(a,(c,f)=>o(c,f,l));return j.isPlainObject(e)||e instanceof this.constructor?s(e,n):j.isString(e)&&(e=e.trim())&&!Yb(e)?s(Kb(e),n):e!=null&&o(n,e,r),this}get(e,n){if(e=Pr(e),e){const r=j.findKey(this,e);if(r){const i=this[r];if(!n)return i;if(n===!0)return Jb(i);if(j.isFunction(n))return n.call(this,i,r);if(j.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Pr(e),e){const r=j.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||ls(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let i=!1;function o(s){if(s=Pr(s),s){const a=j.findKey(r,s);a&&(!n||ls(r,r[a],a,n))&&(delete r[a],i=!0)}}return j.isArray(e)?e.forEach(o):o(e),i}clear(e){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!e||ls(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const n=this,r={};return j.forEach(this,(i,o)=>{const s=j.findKey(r,o);if(s){n[s]=Xi(i),delete n[o];return}const a=e?Qb(o):String(o).trim();a!==o&&delete n[o],n[a]=Xi(i),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return j.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&j.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(`
|
|
98
|
+
`)}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[Lc]=this[Lc]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=Pr(s);r[a]||(Xb(i,s),r[a]=!0)}return j.isArray(e)?e.forEach(o):o(e),this}}Bo.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);j.reduceDescriptors(Bo.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});j.freezeMethods(Bo);const Qt=Bo;function cs(t,e){const n=this||ba,r=e||n,i=Qt.from(r.headers);let o=r.data;return j.forEach(t,function(a){o=a.call(n,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function Wf(t){return!!(t&&t.__CANCEL__)}function ui(t,e,n){Ee.call(this,t??"canceled",Ee.ERR_CANCELED,e,n),this.name="CanceledError"}j.inherits(ui,Ee,{__CANCEL__:!0});function ew(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Ee("Request failed with status code "+n.status,[Ee.ERR_BAD_REQUEST,Ee.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const tw=Vt.isStandardBrowserEnv?function(){return{write:function(n,r,i,o,s,a){const l=[];l.push(n+"="+encodeURIComponent(r)),j.isNumber(i)&&l.push("expires="+new Date(i).toGMTString()),j.isString(o)&&l.push("path="+o),j.isString(s)&&l.push("domain="+s),a===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function nw(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function rw(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}function Zf(t,e){return t&&!nw(e)?rw(t,e):e}const iw=Vt.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(o){let s=o;return e&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{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(s){const a=j.isString(s)?i(s):s;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function ow(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function sw(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i=0,o=0,s;return e=e!==void 0?e:1e3,function(l){const c=Date.now(),f=r[o];s||(s=c),n[i]=l,r[i]=c;let d=o,p=0;for(;d!==i;)p+=n[d++],d=d%t;if(i=(i+1)%t,i===o&&(o=(o+1)%t),c-s<e)return;const v=f&&c-f;return v?Math.round(p*1e3/v):void 0}}function xc(t,e){let n=0;const r=sw(50,250);return i=>{const o=i.loaded,s=i.lengthComputable?i.total:void 0,a=o-n,l=r(a),c=o<=s;n=o;const f={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&c?(s-o)/l:void 0,event:i};f[e?"download":"upload"]=!0,t(f)}}const aw=typeof XMLHttpRequest<"u",lw=aw&&function(t){return new Promise(function(n,r){let i=t.data;const o=Qt.from(t.headers).normalize(),s=t.responseType;let a;function l(){t.cancelToken&&t.cancelToken.unsubscribe(a),t.signal&&t.signal.removeEventListener("abort",a)}let c;j.isFormData(i)&&(Vt.isStandardBrowserEnv||Vt.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.getContentType(/^\s*multipart\/form-data/)?j.isString(c=o.getContentType())&&o.setContentType(c.replace(/^\s*(multipart\/form-data);+/,"$1")):o.setContentType("multipart/form-data"));let f=new XMLHttpRequest;if(t.auth){const g=t.auth.username||"",h=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(g+":"+h))}const d=Zf(t.baseURL,t.url);f.open(t.method.toUpperCase(),$f(d,t.params,t.paramsSerializer),!0),f.timeout=t.timeout;function p(){if(!f)return;const g=Qt.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),S={data:!s||s==="text"||s==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:g,config:t,request:f};ew(function(b){n(b),l()},function(b){r(b),l()},S),f=null}if("onloadend"in f?f.onloadend=p:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(p)},f.onabort=function(){f&&(r(new Ee("Request aborted",Ee.ECONNABORTED,t,f)),f=null)},f.onerror=function(){r(new Ee("Network Error",Ee.ERR_NETWORK,t,f)),f=null},f.ontimeout=function(){let h=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const S=t.transitional||Hf;t.timeoutErrorMessage&&(h=t.timeoutErrorMessage),r(new Ee(h,S.clarifyTimeoutError?Ee.ETIMEDOUT:Ee.ECONNABORTED,t,f)),f=null},Vt.isStandardBrowserEnv){const g=iw(d)&&t.xsrfCookieName&&tw.read(t.xsrfCookieName);g&&o.set(t.xsrfHeaderName,g)}i===void 0&&o.setContentType(null),"setRequestHeader"in f&&j.forEach(o.toJSON(),function(h,S){f.setRequestHeader(S,h)}),j.isUndefined(t.withCredentials)||(f.withCredentials=!!t.withCredentials),s&&s!=="json"&&(f.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&f.addEventListener("progress",xc(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&f.upload&&f.upload.addEventListener("progress",xc(t.onUploadProgress)),(t.cancelToken||t.signal)&&(a=g=>{f&&(r(!g||g.type?new ui(null,t,f):g),f.abort(),f=null)},t.cancelToken&&t.cancelToken.subscribe(a),t.signal&&(t.signal.aborted?a():t.signal.addEventListener("abort",a)));const v=ow(d);if(v&&Vt.protocols.indexOf(v)===-1){r(new Ee("Unsupported protocol "+v+":",Ee.ERR_BAD_REQUEST,t));return}f.send(i||null)})},Ws={http:Db,xhr:lw};j.forEach(Ws,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Cc=t=>`- ${t}`,cw=t=>j.isFunction(t)||t===null||t===!1,qf={getAdapter:t=>{t=j.isArray(t)?t:[t];const{length:e}=t;let n,r;const i={};for(let o=0;o<e;o++){n=t[o];let s;if(r=n,!cw(n)&&(r=Ws[(s=String(n)).toLowerCase()],r===void 0))throw new Ee(`Unknown adapter '${s}'`);if(r)break;i[s||"#"+o]=r}if(!r){const o=Object.entries(i).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=e?o.length>1?`since :
|
|
99
99
|
`+o.map(Cc).join(`
|
|
100
|
-
`):" "+Cc(o[0]):"as no adapter specified";throw new Le("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:Ws};function us(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ui(null,t)}function _c(t){return us(t),t.headers=Xt.from(t.headers),t.data=cs.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),qf.getAdapter(t.adapter||ba.adapter)(t).then(function(r){return us(t),r.data=cs.call(t,t.transformResponse,r),r.headers=Xt.from(r.headers),r},function(r){return Wf(r)||(us(t),r&&r.response&&(r.response.data=cs.call(t,t.transformResponse,r.response),r.response.headers=Xt.from(r.response.headers))),Promise.reject(r)})}const Oc=t=>t instanceof Xt?t.toJSON():t;function lr(t,e){e=e||{};const n={};function r(c,f,d){return j.isPlainObject(c)&&j.isPlainObject(f)?j.merge.call({caseless:d},c,f):j.isPlainObject(f)?j.merge({},f):j.isArray(f)?f.slice():f}function i(c,f,d){if(j.isUndefined(f)){if(!j.isUndefined(c))return r(void 0,c,d)}else return r(c,f,d)}function o(c,f){if(!j.isUndefined(f))return r(void 0,f)}function s(c,f){if(j.isUndefined(f)){if(!j.isUndefined(c))return r(void 0,c)}else return r(void 0,f)}function a(c,f,d){if(d in e)return r(c,f);if(d in t)return r(void 0,c)}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(c,f)=>i(Oc(c),Oc(f),!0)};return j.forEach(Object.keys(Object.assign({},t,e)),function(f){const d=l[f]||i,p=d(t[f],e[f],f);j.isUndefined(p)&&d!==a||(n[f]=p)}),n}const Kf="1.6.0",wa={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{wa[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const Mc={};wa.transitional=function(e,n,r){function i(o,s){return"[Axios v"+Kf+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,a)=>{if(e===!1)throw new Le(i(s," has been removed"+(n?" in "+n:"")),Le.ERR_DEPRECATED);return n&&!Mc[s]&&(Mc[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(o,s,a):!0}};function uw(t,e,n){if(typeof t!="object")throw new Le("options must be an object",Le.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const o=r[i],s=e[o];if(s){const a=t[o],l=a===void 0||s(a,o,t);if(l!==!0)throw new Le("option "+o+" must be "+l,Le.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Le("Unknown option "+o,Le.ERR_BAD_OPTION)}}const Zs={assertOptions:uw,validators:wa},rn=Zs.validators;class xo{constructor(e){this.defaults=e,this.interceptors={request:new Lc,response:new Lc}}request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=lr(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Zs.assertOptions(r,{silentJSONParsing:rn.transitional(rn.boolean),forcedJSONParsing:rn.transitional(rn.boolean),clarifyTimeoutError:rn.transitional(rn.boolean)},!1),i!=null&&(j.isFunction(i)?n.paramsSerializer={serialize:i}:Zs.assertOptions(i,{encode:rn.function,serialize:rn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&j.merge(o.common,o[n.method]);o&&j.forEach(["delete","get","head","post","put","patch","common"],g=>{delete o[g]}),n.headers=Xt.concat(s,o);const a=[];let l=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(l=l&&h.synchronous,a.unshift(h.fulfilled,h.rejected))});const c=[];this.interceptors.response.forEach(function(h){c.push(h.fulfilled,h.rejected)});let f,d=0,p;if(!l){const g=[_c.bind(this),void 0];for(g.unshift.apply(g,a),g.push.apply(g,c),p=g.length,f=Promise.resolve(n);d<p;)f=f.then(g[d++],g[d++]);return f}p=a.length;let v=n;for(d=0;d<p;){const g=a[d++],h=a[d++];try{v=g(v)}catch(S){h.call(this,S);break}}try{f=_c.call(this,v)}catch(g){return Promise.reject(g)}for(d=0,p=c.length;d<p;)f=f.then(c[d++],c[d++]);return f}getUri(e){e=lr(this.defaults,e);const n=Zf(e.baseURL,e.url);return $f(n,e.params,e.paramsSerializer)}}j.forEach(["delete","get","head","options"],function(e){xo.prototype[e]=function(n,r){return this.request(lr(r||{},{method:e,url:n,data:(r||{}).data}))}});j.forEach(["post","put","patch"],function(e){function n(r){return function(o,s,a){return this.request(lr(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}xo.prototype[e]=n(),xo.prototype[e+"Form"]=n(!0)});const eo=xo;class Sa{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{r.subscribe(a),o=a}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},e(function(o,s,a){r.reason||(r.reason=new ui(o,s,a),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)}static source(){let e;return{token:new Sa(function(i){e=i}),cancel:e}}}const fw=Sa;function dw(t){return function(n){return t.apply(null,n)}}function pw(t){return j.isObject(t)&&t.isAxiosError===!0}const qs={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(qs).forEach(([t,e])=>{qs[e]=t});const hw=qs;function Yf(t){const e=new eo(t),n=Rf(eo.prototype.request,e);return j.extend(n,eo.prototype,e,{allOwnKeys:!0}),j.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return Yf(lr(t,i))},n}const Ke=Yf(ba);Ke.Axios=eo;Ke.CanceledError=ui;Ke.CancelToken=fw;Ke.isCancel=Wf;Ke.VERSION=Kf;Ke.toFormData=No;Ke.AxiosError=Le;Ke.Cancel=Ke.CanceledError;Ke.all=function(e){return Promise.all(e)};Ke.spread=dw;Ke.isAxiosError=pw;Ke.mergeConfig=lr;Ke.AxiosHeaders=Xt;Ke.formToJSON=t=>Gf(j.isHTMLForm(t)?new FormData(t):t);Ke.getAdapter=qf.getAdapter;Ke.HttpStatusCode=hw;Ke.default=Ke;const gw=Ke,oi=gw.create({baseURL:"https://ecomgate.omnic.solutions/api/1.0.0/type-1/public/"}),vw=512;var qt=(t=>(t[t.All=0]="All",t[t.PickPoint=20]="PickPoint",t[t.PostOffice=30]="PostOffice",t))(qt||{}),At=(t=>(t[t.PayByCash=0]="PayByCash",t[t.DressingRoom=1]="DressingRoom",t[t.CheckOrder=2]="CheckOrder",t))(At||{}),Dt=(t=>(t[t.Return=0]="Return",t[t.Payment=1]="Payment",t[t.Shipping=2]="Shipping",t))(Dt||{});const mw={[At.CheckOrder]:["is_check_order","is_delivery"],[At.DressingRoom]:["is_dressing_room","is_delivery"],[At.PayByCash]:["pay_by_cash","pay_by_card","is_delivery"]},yw={[Dt.Return]:["is_pickup"],[Dt.Shipping]:["is_pickup"],[Dt.Payment]:["pay_by_cash","pay_by_card","is_pickup"]};async function*Ks({q:t,filter:e,bounds:n}={},{controller:r}={}){const i={status:30,page_size:vw};if(t&&(i.q=t),e!=null&&e.type&&(i.type=e.type),e!=null&&e.receive)for(const[l,c]of Object.entries(e==null?void 0:e.receive)){if(!c)continue;const f=mw[l];for(const d of f)i[d]=!0}if(e!=null&&e.send)for(const[l,c]of Object.entries(e==null?void 0:e.send)){if(!c)continue;const f=yw[l];for(const d of f)i[d]=!0}n&&(i.start_latitude=n[0][0],i.end_latitude=n[0][1],i.start_longitude=n[1][0],i.end_longitude=n[1][1]);let o=await oi.get("/locations/points",{params:i,signal:r==null?void 0:r.signal}),s=o.data.data.num_pages,a=o.data.data.current_page;for(;a<s;){yield o,i.page=a+1;const l=await oi.get("/locations/points",{params:i,signal:r==null?void 0:r.signal});o.data.data.results=[...o.data.data.results,...l.data.data.results],o=l,a=l.data.data.current_page,s=l.data.data.num_pages}return yield o,o}const Pc=[],kc=(t,e,n)=>{var i;const r=new AbortController;return t&&((i=Pc.pop())==null||i.abort()),Pc.push(r),async o=>{const s={controller:r};if(!n){const l=await Ks({filter:e},s).next();o(l.value.data);return}for await(const a of Ks({filter:e,bounds:n},s))o(a.data)}},Jf=":root",La=(t,e)=>{var n;(n=document.querySelector(Jf))==null||n.style.setProperty(t,e)},Rc=t=>{t.stopImmediatePropagation()};var Xf={},Qf={exports:{}};(function(t){var e=function(n){var r=Object.prototype,i=r.hasOwnProperty,o=Object.defineProperty||function(A,R,T){A[R]=T.value},s,a=typeof Symbol=="function"?Symbol:{},l=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",f=a.toStringTag||"@@toStringTag";function d(A,R,T){return Object.defineProperty(A,R,{value:T,enumerable:!0,configurable:!0,writable:!0}),A[R]}try{d({},"")}catch{d=function(R,T,V){return R[T]=V}}function p(A,R,T,V){var z=R&&R.prototype instanceof y?R:y,$=Object.create(z.prototype),Q=new Z(V||[]);return o($,"_invoke",{value:k(A,T,Q)}),$}n.wrap=p;function v(A,R,T){try{return{type:"normal",arg:A.call(R,T)}}catch(V){return{type:"throw",arg:V}}}var g="suspendedStart",h="suspendedYield",S="executing",L="completed",b={};function y(){}function x(){}function E(){}var m={};d(m,l,function(){return this});var w=Object.getPrototypeOf,_=w&&w(w(F([])));_&&_!==r&&i.call(_,l)&&(m=_);var P=E.prototype=y.prototype=Object.create(m);x.prototype=E,o(P,"constructor",{value:E,configurable:!0}),o(E,"constructor",{value:x,configurable:!0}),x.displayName=d(E,f,"GeneratorFunction");function M(A){["next","throw","return"].forEach(function(R){d(A,R,function(T){return this._invoke(R,T)})})}n.isGeneratorFunction=function(A){var R=typeof A=="function"&&A.constructor;return R?R===x||(R.displayName||R.name)==="GeneratorFunction":!1},n.mark=function(A){return Object.setPrototypeOf?Object.setPrototypeOf(A,E):(A.__proto__=E,d(A,f,"GeneratorFunction")),A.prototype=Object.create(P),A},n.awrap=function(A){return{__await:A}};function O(A,R){function T($,Q,N,D){var W=v(A[$],A,Q);if(W.type==="throw")D(W.arg);else{var q=W.arg,te=q.value;return te&&typeof te=="object"&&i.call(te,"__await")?R.resolve(te.__await).then(function(re){T("next",re,N,D)},function(re){T("throw",re,N,D)}):R.resolve(te).then(function(re){q.value=re,N(q)},function(re){return T("throw",re,N,D)})}}var V;function z($,Q){function N(){return new R(function(D,W){T($,Q,D,W)})}return V=V?V.then(N,N):N()}o(this,"_invoke",{value:z})}M(O.prototype),d(O.prototype,c,function(){return this}),n.AsyncIterator=O,n.async=function(A,R,T,V,z){z===void 0&&(z=Promise);var $=new O(p(A,R,T,V),z);return n.isGeneratorFunction(R)?$:$.next().then(function(Q){return Q.done?Q.value:$.next()})};function k(A,R,T){var V=g;return function($,Q){if(V===S)throw new Error("Generator is already running");if(V===L){if($==="throw")throw Q;return K()}for(T.method=$,T.arg=Q;;){var N=T.delegate;if(N){var D=I(N,T);if(D){if(D===b)continue;return D}}if(T.method==="next")T.sent=T._sent=T.arg;else if(T.method==="throw"){if(V===g)throw V=L,T.arg;T.dispatchException(T.arg)}else T.method==="return"&&T.abrupt("return",T.arg);V=S;var W=v(A,R,T);if(W.type==="normal"){if(V=T.done?L:h,W.arg===b)continue;return{value:W.arg,done:T.done}}else W.type==="throw"&&(V=L,T.method="throw",T.arg=W.arg)}}}function I(A,R){var T=R.method,V=A.iterator[T];if(V===s)return R.delegate=null,T==="throw"&&A.iterator.return&&(R.method="return",R.arg=s,I(A,R),R.method==="throw")||T!=="return"&&(R.method="throw",R.arg=new TypeError("The iterator does not provide a '"+T+"' method")),b;var z=v(V,A.iterator,R.arg);if(z.type==="throw")return R.method="throw",R.arg=z.arg,R.delegate=null,b;var $=z.arg;if(!$)return R.method="throw",R.arg=new TypeError("iterator result is not an object"),R.delegate=null,b;if($.done)R[A.resultName]=$.value,R.next=A.nextLoc,R.method!=="return"&&(R.method="next",R.arg=s);else return $;return R.delegate=null,b}M(P),d(P,f,"Generator"),d(P,l,function(){return this}),d(P,"toString",function(){return"[object Generator]"});function B(A){var R={tryLoc:A[0]};1 in A&&(R.catchLoc=A[1]),2 in A&&(R.finallyLoc=A[2],R.afterLoc=A[3]),this.tryEntries.push(R)}function H(A){var R=A.completion||{};R.type="normal",delete R.arg,A.completion=R}function Z(A){this.tryEntries=[{tryLoc:"root"}],A.forEach(B,this),this.reset(!0)}n.keys=function(A){var R=Object(A),T=[];for(var V in R)T.push(V);return T.reverse(),function z(){for(;T.length;){var $=T.pop();if($ in R)return z.value=$,z.done=!1,z}return z.done=!0,z}};function F(A){if(A){var R=A[l];if(R)return R.call(A);if(typeof A.next=="function")return A;if(!isNaN(A.length)){var T=-1,V=function z(){for(;++T<A.length;)if(i.call(A,T))return z.value=A[T],z.done=!1,z;return z.value=s,z.done=!0,z};return V.next=V}}return{next:K}}n.values=F;function K(){return{value:s,done:!0}}return Z.prototype={constructor:Z,reset:function(A){if(this.prev=0,this.next=0,this.sent=this._sent=s,this.done=!1,this.delegate=null,this.method="next",this.arg=s,this.tryEntries.forEach(H),!A)for(var R in this)R.charAt(0)==="t"&&i.call(this,R)&&!isNaN(+R.slice(1))&&(this[R]=s)},stop:function(){this.done=!0;var A=this.tryEntries[0],R=A.completion;if(R.type==="throw")throw R.arg;return this.rval},dispatchException:function(A){if(this.done)throw A;var R=this;function T(D,W){return $.type="throw",$.arg=A,R.next=D,W&&(R.method="next",R.arg=s),!!W}for(var V=this.tryEntries.length-1;V>=0;--V){var z=this.tryEntries[V],$=z.completion;if(z.tryLoc==="root")return T("end");if(z.tryLoc<=this.prev){var Q=i.call(z,"catchLoc"),N=i.call(z,"finallyLoc");if(Q&&N){if(this.prev<z.catchLoc)return T(z.catchLoc,!0);if(this.prev<z.finallyLoc)return T(z.finallyLoc)}else if(Q){if(this.prev<z.catchLoc)return T(z.catchLoc,!0)}else if(N){if(this.prev<z.finallyLoc)return T(z.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(A,R){for(var T=this.tryEntries.length-1;T>=0;--T){var V=this.tryEntries[T];if(V.tryLoc<=this.prev&&i.call(V,"finallyLoc")&&this.prev<V.finallyLoc){var z=V;break}}z&&(A==="break"||A==="continue")&&z.tryLoc<=R&&R<=z.finallyLoc&&(z=null);var $=z?z.completion:{};return $.type=A,$.arg=R,z?(this.method="next",this.next=z.finallyLoc,b):this.complete($)},complete:function(A,R){if(A.type==="throw")throw A.arg;return A.type==="break"||A.type==="continue"?this.next=A.arg:A.type==="return"?(this.rval=this.arg=A.arg,this.method="return",this.next="end"):A.type==="normal"&&R&&(this.next=R),b},finish:function(A){for(var R=this.tryEntries.length-1;R>=0;--R){var T=this.tryEntries[R];if(T.finallyLoc===A)return this.complete(T.completion,T.afterLoc),H(T),b}},catch:function(A){for(var R=this.tryEntries.length-1;R>=0;--R){var T=this.tryEntries[R];if(T.tryLoc===A){var V=T.completion;if(V.type==="throw"){var z=V.arg;H(T)}return z}}throw new Error("illegal catch attempt")},delegateYield:function(A,R,T){return this.delegate={iterator:F(A),resultName:R,nextLoc:T},this.method==="next"&&(this.arg=s),b}},n}(t.exports);try{regeneratorRuntime=e}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}})(Qf);var bw=Qf.exports;(function(t){var e=bw;function n(g,h,S,L,b,y,x){try{var E=g[y](x),m=E.value}catch(w){return void S(w)}E.done?h(m):Promise.resolve(m).then(L,b)}function r(g){return function(){var h=this,S=arguments;return new Promise(function(L,b){var y=g.apply(h,S);function x(m){n(y,L,b,x,E,"next",m)}function E(m){n(y,L,b,x,E,"throw",m)}x(void 0)})}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=!1,o=null,s="en",a=null,l=null,c="https://maps.googleapis.com/maps/api/geocode/json";function f(g){var h=arguments.length>1&&arguments[1]!==void 0&&arguments[1];i&&(h?console.warn(g):console.log(g))}function d(g){return p.apply(this,arguments)}function p(){return(p=r(e.mark(function g(h){var S,L;return e.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,fetch(h).catch(function(){return Promise.reject(new Error("Error fetching data"))});case 2:return S=b.sent,b.next=5,S.json().catch(function(){return f("Error parsing server response"),Promise.reject(new Error("Error parsing server response"))});case 5:if((L=b.sent).status!=="OK"){b.next=9;break}return f(L),b.abrupt("return",L);case 9:return f("".concat(L.error_message,`.
|
|
101
|
-
Server returned status code `).concat(
|
|
102
|
-
Server returned status code `).concat(L.status))));case 11:case"end":return b.stop()}},g)}))).apply(this,arguments)}var v={setApiKey:function(g){o=g},setLanguage:function(g){s=g},setRegion:function(g){a=g},setLocationType:function(g){l=g},enableDebug:function(){var g=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];i=g},fromLatLng:function(g,h,S,L,b,y){return r(e.mark(function x(){var E,m;return e.wrap(function(w){for(;;)switch(w.prev=w.next){case 0:if(g&&h){w.next=3;break}return f("Provided coordinates are invalid",!0),w.abrupt("return",Promise.reject(new Error("Provided coordinates are invalid")));case 3:return E="".concat(g,",").concat(h),m="".concat(c,"?latlng=").concat(encodeURIComponent(E)),(S||o)&&(m+="&key=".concat(o=S||o)),(L||s)&&(m+="&language=".concat(s=L||s)),(b||a)&&(a=b||a,m+="®ion=".concat(encodeURIComponent(a))),(y||l)&&(l=y||l,m+="&location_type=".concat(encodeURIComponent(l))),w.abrupt("return",d(m));case 9:case"end":return w.stop()}},x)}))()},fromAddress:function(g,h,S,L){return r(e.mark(function b(){var y;return e.wrap(function(x){for(;;)switch(x.prev=x.next){case 0:if(g){x.next=3;break}return f("Provided address is invalid",!0),x.abrupt("return",Promise.reject(new Error("Provided address is invalid")));case 3:return y="".concat(c,"?address=").concat(encodeURIComponent(g)),(h||o)&&(y+="&key=".concat(o=h||o)),(S||s)&&(y+="&language=".concat(s=S||s)),(L||a)&&(a=L||a,y+="®ion=".concat(encodeURIComponent(a))),x.abrupt("return",d(y));case 8:case"end":return x.stop()}},b)}))()}};t.default=v})(Xf);const Co=Mo(Xf),si=async(t,e="ROOFTOP")=>{var i;Co.setLocationType(e);const n=await Co.fromLatLng(t[0].toString(),t[1].toString()),r=(i=n.results)==null?void 0:i.map(o=>{var l,c;const s=(l=o.geometry)==null?void 0:l.viewport,a=(c=o.geometry)==null?void 0:c.location;return{...o,geometry:{...o.geometry,viewport:new google.maps.LatLngBounds(s.southwest,s.northeast),location:new google.maps.LatLng(a)}}});return{...n,results:r}},ed=(t,e)=>{if(!navigator.geolocation){e==null||e(new GeolocationPositionError),console.error("Geolocation is not supported by your browser");return}navigator.geolocation.getCurrentPosition(t,e,{maximumAge:6e4,timeout:5e3,enableHighAccuracy:!0})},ww=t=>t.status===200,td=t=>{const e=document.querySelector(Jf);return e?getComputedStyle(e).getPropertyValue(t):null},un=t=>{const e=new Blob([t],{type:"image/svg+xml;charset=utf-8"});return URL.createObjectURL(e)},Pt=(t,e)=>t.replaceAll("currentColor",td(e)||""),Sw={points:[],error:!1,loaded:!1,loading:!1,reloading:!1},zt=mn()((t,e)=>({...Sw,async loadNext(n,r){const i=e().reloading;t({error:!1,reloading:!0}),Fe.getState().setBounds(n);let o=0;try{await kc(i,r,n)(a=>{t(o===0?{points:a.data.results}:{points:[...e().points,...a.data.results]}),o++})}catch{t({error:!0})}finally{t({reloading:!1})}},async loadFirst(n){const r=e().loading,i=Fe.getState().bounds;t({error:!1,loading:!0});let o=0;try{await kc(r,n,i)(a=>{o>=1&&t({loading:!1,loaded:!0}),t(o===0?{points:a.data.results}:{points:[...e().points,...a.data.results]}),o++}),t({loading:!1,loaded:!0})}catch{t({error:!0,loading:!1})}finally{t({loading:!1})}}})),Lw={query:"",type:qt.All,hours:["08:00","22:00"],send:{[Dt.Return]:!1,[Dt.Payment]:!1,[Dt.Shipping]:!1},receive:{[At.PayByCash]:!1,[At.CheckOrder]:!1,[At.DressingRoom]:!1}},Nn=mn(t=>({...Lw,setFilter(e){Fe.getState().setDetailsOpen(!1),bt.getState().setCourierPoint(null),It.getState().setSelectedPoint(null),t(e)}})),Ew=()=>{u.useEffect(()=>{zt.getState().loadFirst();const t=Nn.subscribe(e=>{zt.getState().loadFirst(e)});return()=>{t()}},[])},kr=".",Ea=Symbol("target"),nd=Symbol("unsubscribe");function Ys(t){return t instanceof Date||t instanceof Set||t instanceof Map||t instanceof WeakSet||t instanceof WeakMap||ArrayBuffer.isView(t)}function xw(t){return(typeof t=="object"?t===null:typeof t!="function")||t instanceof RegExp}const Ut=Array.isArray;function xa(t){return typeof t=="symbol"}const Lt={after:(t,e)=>Ut(t)?t.slice(e.length):e===""?t:t.slice(e.length+1),concat:(t,e)=>Ut(t)?(t=[...t],e&&t.push(e),t):e&&e.toString!==void 0?(t!==""&&(t+=kr),xa(e)?t+e.toString():t+e):t,initial:t=>{if(Ut(t))return t.slice(0,-1);if(t==="")return t;const e=t.lastIndexOf(kr);return e===-1?"":t.slice(0,e)},last:t=>{if(Ut(t))return t[t.length-1]||"";if(t==="")return t;const e=t.lastIndexOf(kr);return e===-1?t:t.slice(e+1)},walk:(t,e)=>{if(Ut(t))for(const n of t)e(n);else if(t!==""){let n=0,r=t.indexOf(kr);if(r===-1)e(t);else for(;n<t.length;)r===-1&&(r=t.length),e(t.slice(n,r)),n=r+1,r=t.indexOf(kr,n)}},get(t,e){return this.walk(e,n=>{t&&(t=t[n])}),t}};function Cw(t){return typeof t=="object"&&typeof t.next=="function"}function _w(t,e,n,r,i){const o=t.next;if(e.name==="entries")t.next=function(){const s=o.call(this);return s.done===!1&&(s.value[0]=i(s.value[0],e,s.value[0],r),s.value[1]=i(s.value[1],e,s.value[0],r)),s};else if(e.name==="values"){const s=n[Ea].keys();t.next=function(){const a=o.call(this);return a.done===!1&&(a.value=i(a.value,e,s.next().value,r)),a}}else t.next=function(){const s=o.call(this);return s.done===!1&&(s.value=i(s.value,e,s.value,r)),s};return t}function Tc(t,e,n){return t.isUnsubscribed||e.ignoreSymbols&&xa(n)||e.ignoreUnderscores&&n.charAt(0)==="_"||"ignoreKeys"in e&&e.ignoreKeys.includes(n)}class Ow{constructor(e){this._equals=e,this._proxyCache=new WeakMap,this._pathCache=new WeakMap,this.isUnsubscribed=!1}_getDescriptorCache(){return this._descriptorCache===void 0&&(this._descriptorCache=new WeakMap),this._descriptorCache}_getProperties(e){const n=this._getDescriptorCache();let r=n.get(e);return r===void 0&&(r={},n.set(e,r)),r}_getOwnPropertyDescriptor(e,n){if(this.isUnsubscribed)return Reflect.getOwnPropertyDescriptor(e,n);const r=this._getProperties(e);let i=r[n];return i===void 0&&(i=Reflect.getOwnPropertyDescriptor(e,n),r[n]=i),i}getProxy(e,n,r,i){if(this.isUnsubscribed)return e;const o=e[i],s=o||e;this._pathCache.set(s,n);let a=this._proxyCache.get(s);return a===void 0&&(a=o===void 0?new Proxy(e,r):e,this._proxyCache.set(s,a)),a}getPath(e){return this.isUnsubscribed?void 0:this._pathCache.get(e)}isDetached(e,n){return!Object.is(e,Lt.get(n,this.getPath(e)))}defineProperty(e,n,r){return Reflect.defineProperty(e,n,r)?(this.isUnsubscribed||(this._getProperties(e)[n]=r),!0):!1}setProperty(e,n,r,i,o){if(!this._equals(o,r)||!(n in e)){const s=this._getOwnPropertyDescriptor(e,n);return s!==void 0&&"set"in s?Reflect.set(e,n,r,i):Reflect.set(e,n,r)}return!0}deleteProperty(e,n,r){if(Reflect.deleteProperty(e,n)){if(!this.isUnsubscribed){const i=this._getDescriptorCache().get(e);i&&(delete i[n],this._pathCache.delete(r))}return!0}return!1}isSameDescriptor(e,n,r){const i=this._getOwnPropertyDescriptor(n,r);return e!==void 0&&i!==void 0&&Object.is(e.value,i.value)&&(e.writable||!1)===(i.writable||!1)&&(e.enumerable||!1)===(i.enumerable||!1)&&(e.configurable||!1)===(i.configurable||!1)&&e.get===i.get&&e.set===i.set}isGetInvariant(e,n){const r=this._getOwnPropertyDescriptor(e,n);return r!==void 0&&r.configurable!==!0&&r.writable!==!0}unsubscribe(){this._descriptorCache=null,this._pathCache=null,this._proxyCache=null,this.isUnsubscribed=!0}}function Js(t){return toString.call(t)==="[object Object]"}function ji(){return!0}function Zn(t,e){return t.length!==e.length||t.some((n,r)=>e[r]!==n)}const rd=new Set(["hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Mw=new Set(["concat","includes","indexOf","join","keys","lastIndexOf"]),id={push:ji,pop:ji,shift:ji,unshift:ji,copyWithin:Zn,reverse:Zn,sort:Zn,splice:Zn,flat:Zn,fill:Zn},Pw=new Set([...rd,...Mw,...Object.keys(id)]);function Ni(t,e){if(t.size!==e.size)return!0;for(const n of t)if(!e.has(n))return!0;return!1}const od=["keys","values","entries"],sd=new Set(["has","toString"]),ad={add:Ni,clear:Ni,delete:Ni,forEach:Ni},kw=new Set([...sd,...Object.keys(ad),...od]);function Bi(t,e){if(t.size!==e.size)return!0;let n;for(const[r,i]of t)if(n=e.get(r),n!==i||n===void 0&&!e.has(r))return!0;return!1}const Rw=new Set([...sd,"get"]),ld={set:Bi,clear:Bi,delete:Bi,forEach:Bi},Tw=new Set([...Rw,...Object.keys(ld),...od]);class vn{constructor(e,n,r,i){this._path=n,this._isChanged=!1,this._clonedCache=new Set,this._hasOnValidate=i,this._changes=i?[]:null,this.clone=n===void 0?e:this._shallowClone(e)}static isHandledMethod(e){return rd.has(e)}_shallowClone(e){let n=e;if(Js(e))n={...e};else if(Ut(e)||ArrayBuffer.isView(e))n=[...e];else if(e instanceof Date)n=new Date(e);else if(e instanceof Set)n=new Set([...e].map(r=>this._shallowClone(r)));else if(e instanceof Map){n=new Map;for(const[r,i]of e.entries())n.set(r,this._shallowClone(i))}return this._clonedCache.add(n),n}preferredThisArg(e,n,r,i){return e?(Ut(i)?this._onIsChanged=id[n]:i instanceof Set?this._onIsChanged=ad[n]:i instanceof Map&&(this._onIsChanged=ld[n]),i):r}update(e,n,r){const i=Lt.after(e,this._path);if(n!=="length"){let o=this.clone;Lt.walk(i,s=>{o&&o[s]&&(this._clonedCache.has(o[s])||(o[s]=this._shallowClone(o[s])),o=o[s])}),this._hasOnValidate&&this._changes.push({path:i,property:n,previous:r}),o&&o[n]&&(o[n]=r)}this._isChanged=!0}undo(e){let n;for(let r=this._changes.length-1;r!==-1;r--)n=this._changes[r],Lt.get(e,n.path)[n.property]=n.previous}isChanged(e){return this._onIsChanged===void 0?this._isChanged:this._onIsChanged(this.clone,e)}}class Ac extends vn{static isHandledMethod(e){return Pw.has(e)}}class Aw extends vn{undo(e){e.setTime(this.clone.getTime())}isChanged(e,n){return!n(this.clone.valueOf(),e.valueOf())}}class Dc extends vn{static isHandledMethod(e){return kw.has(e)}undo(e){for(const n of this.clone)e.add(n);for(const n of e)this.clone.has(n)||e.delete(n)}}class Ic extends vn{static isHandledMethod(e){return Tw.has(e)}undo(e){for(const[n,r]of this.clone.entries())e.set(n,r);for(const n of e.keys())this.clone.has(n)||e.delete(n)}}class Dw extends vn{constructor(e,n,r,i){super(void 0,n,r,i),this._arg1=r[0],this._weakValue=e.has(this._arg1)}isChanged(e){return this._weakValue!==e.has(this._arg1)}undo(e){this._weakValue&&!e.has(this._arg1)?e.add(this._arg1):e.delete(this._arg1)}}class Iw extends vn{constructor(e,n,r,i){super(void 0,n,r,i),this._weakKey=r[0],this._weakHas=e.has(this._weakKey),this._weakValue=e.get(this._weakKey)}isChanged(e){return this._weakValue!==e.get(this._weakKey)}undo(e){const n=e.has(this._weakKey);this._weakHas&&!n?e.set(this._weakKey,this._weakValue):!this._weakHas&&n?e.delete(this._weakKey):this._weakValue!==e.get(this._weakKey)&&e.set(this._weakKey,this._weakValue)}}class kn{constructor(e){this._stack=[],this._hasOnValidate=e}static isHandledType(e){return Js(e)||Ut(e)||Ys(e)}static isHandledMethod(e,n){return Js(e)?vn.isHandledMethod(n):Ut(e)?Ac.isHandledMethod(n):e instanceof Set?Dc.isHandledMethod(n):e instanceof Map?Ic.isHandledMethod(n):Ys(e)}get isCloning(){return this._stack.length>0}start(e,n,r){let i=vn;Ut(e)?i=Ac:e instanceof Date?i=Aw:e instanceof Set?i=Dc:e instanceof Map?i=Ic:e instanceof WeakSet?i=Dw:e instanceof WeakMap&&(i=Iw),this._stack.push(new i(e,n,r,this._hasOnValidate))}update(e,n,r){this._stack[this._stack.length-1].update(e,n,r)}preferredThisArg(e,n,r){const{name:i}=e,o=kn.isHandledMethod(r,i);return this._stack[this._stack.length-1].preferredThisArg(o,i,n,r)}isChanged(e,n,r){return this._stack[this._stack.length-1].isChanged(e,n,r)}undo(e){this._previousClone!==void 0&&this._previousClone.undo(e)}stop(){return this._previousClone=this._stack.pop(),this._previousClone.clone}}const jw={equals:Object.is,isShallow:!1,pathAsArray:!1,ignoreSymbols:!1,ignoreUnderscores:!1,ignoreDetached:!1,details:!1},Kr=(t,e,n={})=>{n={...jw,...n};const r=Symbol("ProxyTarget"),{equals:i,isShallow:o,ignoreDetached:s,details:a}=n,l=new Ow(i),c=typeof n.onValidate=="function",f=new kn(c),d=(b,y,x,E,m)=>!c||f.isCloning||n.onValidate(Lt.concat(l.getPath(b),y),x,E,m)===!0,p=(b,y,x,E)=>{!Tc(l,n,y)&&!(s&&l.isDetached(b,t))&&v(l.getPath(b),y,x,E)},v=(b,y,x,E,m)=>{f.isCloning?f.update(b,y,E):e(Lt.concat(b,y),x,E,m)},g=b=>b&&(b[r]||b),h=(b,y,x,E)=>xw(b)||x==="constructor"||o&&!kn.isHandledMethod(y,x)||Tc(l,n,x)||l.isGetInvariant(y,x)||s&&l.isDetached(y,t)?b:(E===void 0&&(E=l.getPath(y)),l.getProxy(b,Lt.concat(E,x),S,r)),S={get(b,y,x){if(xa(y)){if(y===r||y===Ea)return b;if(y===nd&&!l.isUnsubscribed&&l.getPath(b).length===0)return l.unsubscribe(),b}const E=Ys(b)?Reflect.get(b,y):Reflect.get(b,y,x);return h(E,b,y)},set(b,y,x,E){x=g(x);const m=b[r]||b,w=m[y];if(i(w,x)&&y in b)return!0;const _=d(b,y,x,w);return _&&l.setProperty(m,y,x,E,w)?(p(b,y,b[y],w),!0):!_},defineProperty(b,y,x){if(!l.isSameDescriptor(x,b,y)){const E=b[y];d(b,y,x.value,E)&&l.defineProperty(b,y,x,E)&&p(b,y,x.value,E)}return!0},deleteProperty(b,y){if(!Reflect.has(b,y))return!0;const x=Reflect.get(b,y),E=d(b,y,void 0,x);return E&&l.deleteProperty(b,y,x)?(p(b,y,void 0,x),!0):!E},apply(b,y,x){const E=y[r]||y;if(l.isUnsubscribed)return Reflect.apply(b,E,x);if((a===!1||a!==!0&&!a.includes(b.name))&&kn.isHandledType(E)){let m=Lt.initial(l.getPath(b));const w=kn.isHandledMethod(E,b.name);f.start(E,m,x);let _=Reflect.apply(b,f.preferredThisArg(b,y,E),w?x.map(O=>g(O)):x);const P=f.isChanged(E,i),M=f.stop();if(kn.isHandledType(_)&&w&&(y instanceof Map&&b.name==="get"&&(m=Lt.concat(m,x[0])),_=l.getProxy(_,m,S)),P){const O={name:b.name,args:x,result:_},k=f.isCloning?Lt.initial(m):m,I=f.isCloning?Lt.last(m):"";d(Lt.get(t,k),I,E,M,O)?v(k,I,E,M,O):f.undo(E)}return(y instanceof Map||y instanceof Set)&&Cw(_)?_w(_,b,y,m,h):_}return Reflect.apply(b,y,x)}},L=l.getProxy(t,n.pathAsArray?[]:"",S);return e=e.bind(L),c&&(n.onValidate=n.onValidate.bind(L)),L};Kr.target=t=>t&&t[Ea]||t;Kr.unsubscribe=t=>t[nd]||t;const Nw=t=>{const e=t??window.OMNIC_WIDGET_LOCATIONS_CONFIG,[n,r]=u.useState({...On,...e,map:{...On.map,...e==null?void 0:e.map},palette:{...On.palette,...e==null?void 0:e.palette}}),i=t&&!window.OMNIC_WIDGET_LOCATIONS_CONFIG,o=!t&&window.OMNIC_WIDGET_LOCATIONS_CONFIG;return u.useEffect(()=>{i&&r({...On,...t,map:{...On.map,...t.map},palette:{...On.palette,...t.palette}})},[t,i]),u.useEffect(()=>{if(o)return window.OMNIC_WIDGET_LOCATIONS_CONFIG=Kr(window.OMNIC_WIDGET_LOCATIONS_CONFIG,function(){const s=Kr.target(this);s.map&&(s.map={...s.map}),s.palette&&(s.palette={...s.palette}),r({...s})}),()=>{window.OMNIC_WIDGET_LOCATIONS_CONFIG&&Kr.unsubscribe(window.OMNIC_WIDGET_LOCATIONS_CONFIG)}},[o]),n},Bw=(t,e)=>{oi.defaults.headers.get.Authorization=`INN ${t}`,e!=null&&e.baseURL&&(oi.defaults.baseURL=e.baseURL)},Uw="Overlay-module__root__y8tkGi",Vw={root:Uw},Ca=({children:t,className:e})=>C.jsx("div",{className:Se(Vw.root,e),children:t}),Fw={clickableIcons:!1,disableDefaultUI:!0,minZoom:4,maxZoom:20,restriction:{strictBounds:!0,latLngBounds:{north:85,south:-85,west:-179,east:179}}},cd={optimized:!0},zw="MapGoogle-module__root__iB2RTt",$w="MapGoogle-module__hideUI__zGYpjY",Hw="MapGoogle-module__mapContainer__qTVsu4",Gw="MapGoogle-module__balloon__nNM3fV",Ww="MapGoogle-module__details__MuhoyT",Zw="MapGoogle-module__cluster__KIS2sn",qw="MapGoogle-module__overlay__z03Yoa",Kw="MapGoogle-module__mapControl__Iu3xc4",Yw="MapGoogle-module__geolocationControl__cwYVsw",Jw="MapGoogle-module__bottomSheet__ql8eoC",Xw="MapGoogle-module__locationViewContent__LYJkkK",Qw="MapGoogle-module__locationViewHeader__hzc7Ip",eS="MapGoogle-module__courierDetailsViewContent__CIg-RD",tS="MapGoogle-module__courierDetailsViewHeader__vMFQjI",nS="MapGoogle-module__sheetSubmit__pjGRS0",Je={root:zw,hideUI:$w,mapContainer:Hw,balloon:Gw,details:Ww,cluster:Zw,overlay:qw,mapControl:Kw,geolocationControl:Yw,bottomSheet:Jw,locationViewContent:Xw,locationViewHeader:Qw,courierDetailsViewContent:eS,courierDetailsViewHeader:tS,sheetSubmit:nS},rS=({children:t,className:e,onLoad:n,onIdle:r,onUnmount:i})=>{const{map:o,disableCourierDelivery:s,hideMapUI:a}=mt(),l=Fe(g=>g.setDetailsOpen),c=yn(g=>g.setPlace),f=bt(g=>g.setCourierPoint),d=It(g=>g.setSelectedPoint),p=u.useMemo(()=>{var g,h;return{lat:((g=o==null?void 0:o.center)==null?void 0:g[0])??co[0],lng:((h=o==null?void 0:o.center)==null?void 0:h[1])??co[1]}},[o==null?void 0:o.center]),v=u.useCallback(async g=>{var L;const{latLng:h}=g;if(!h||s)return;l(!1),d(null);const S=[h.lat(),h.lng()];try{const b=await si(S),y=(L=b==null?void 0:b.results)==null?void 0:L[0],x=y==null?void 0:y.formatted_address;c(y),Yt(x,"Address is not defined"),f({address:x,coords:S})}catch{f({address:null,coords:S})}},[s,f,l,c,d]);return C.jsx(eh,{zoom:o==null?void 0:o.initialZoom,center:p,options:Fw,mapContainerClassName:Se(Je.root,e,{[Je.hideUI]:a}),onLoad:n,onIdle:r,onUnmount:i,onClick:v,children:t})},iS='<svg xmlns="http://www.w3.org/2000/svg" width="48" height="66" fill="none" viewBox="0 0 48 66"><path fill="url(#a)" fill-opacity=".4" d="M23.999 66C35.045 66 44 63.314 44 60s-8.955-6-20.001-6C12.955 54 4 56.686 4 60s8.955 6 19.999 6Z" style="mix-blend-mode:darken"/><g filter="url(#b)"><path fill="currentColor" fill-rule="evenodd" d="M24 0c11.211 0 24 8.288 24 24.088C48 34.6 40.011 48.411 24 60 7.989 48.41 0 34.6 0 24.088 0 8.288 12.789 0 24 0Z" clip-rule="evenodd"/></g><g fill="#fff"><path fill-rule="evenodd" d="M15.878 16.411c0-.34.273-.617.61-.617h15.024c.337 0 .61.276.61.617v10.103H15.878V16.41Zm1.22.617v8.253h13.803v-8.253H17.1Z" clip-rule="evenodd"/><path fill-rule="evenodd" d="M15.878 25.28h16.244v9.155c0 .864-.694 1.565-1.55 1.565H17.428c-.855 0-1.55-.7-1.55-1.565V25.28Zm1.22 1.234v7.92a.33.33 0 0 0 .33.333h13.145a.33.33 0 0 0 .328-.332v-7.921H17.1ZM14 13.565c0-.864.694-1.565 1.55-1.565h16.9c.856 0 1.55.7 1.55 1.565v1.898c0 .864-.694 1.565-1.55 1.565h-16.9c-.856 0-1.55-.701-1.55-1.565v-1.898Zm1.55-.332a.33.33 0 0 0-.33.332v1.898a.33.33 0 0 0 .33.332h16.9a.33.33 0 0 0 .33-.332v-1.898a.33.33 0 0 0-.33-.332h-16.9Z" clip-rule="evenodd"/><path fill-rule="evenodd" d="M20.573 24c0-1.912 1.535-3.462 3.427-3.462 1.893 0 3.428 1.55 3.428 3.462v1.872a.639.639 0 0 1-.636.642H21.21a.639.639 0 0 1-.636-.642V24ZM24 21.77A2.218 2.218 0 0 0 21.794 24v1.28h4.413V24c0-1.231-.988-2.23-2.207-2.23Z" clip-rule="evenodd"/><path d="m26.765 29.18-2.724-1.376a.093.093 0 0 0-.083 0l-2.724 1.376a.094.094 0 0 0-.051.084v2.752c0 .036.02.069.05.084l2.725 1.376a.09.09 0 0 0 .042.01.09.09 0 0 0 .041-.01l2.724-1.376a.094.094 0 0 0 .051-.084v-2.751a.095.095 0 0 0-.05-.085ZM24 27.994l2.624 1.326-1.26.637-2.525-1.378 1.16-.585Zm0 2.651-2.625-1.325 1.261-.637 2.524 1.377-1.16.585Zm-2.631-1.118 2.538 1.282v2.431l-2.538-1.282v-2.431Zm2.723 3.713V30.81l2.538-1.282v2.432l-2.538 1.281Z"/><path fill-rule="evenodd" d="M26.892 28.926a.38.38 0 0 1 .206.339v2.751a.379.379 0 0 1-.207.339l-2.723 1.375a.369.369 0 0 1-.338 0l-2.722-1.375a.379.379 0 0 1-.208-.339v-2.752c0-.142.079-.274.207-.339l2.727-1.377a.373.373 0 0 1 .33 0l.002.002 2.726 1.376ZM21.233 32.1a.094.094 0 0 1-.05-.084v-2.752c0-.035.019-.068.05-.084l2.724-1.376a.093.093 0 0 1 .084 0l2.724 1.376a.095.095 0 0 1 .05.085v2.751c0 .035-.019.068-.05.084l-2.724 1.376a.09.09 0 0 1-.042.01.09.09 0 0 1-.042-.01L21.233 32.1Zm5.397-.141v-2.432l-2.538 1.282v2.431l2.538-1.281Zm-.282-.176v-1.796l-1.974.998v1.795l1.974-.997Zm-2.442-.974-2.538-1.282v2.431l2.538 1.282V30.81Zm-2.256-.822 1.974.998v1.795l-1.974-.998v-1.795Zm2.349.658 1.16-.585-2.524-1.377-1.26.637 2.624 1.325Zm.55-.595-.55.277-1.995-1.008.626-.316 1.918 1.047Zm.814-.094 1.26-.636L24 27.994l-1.16.585 2.524 1.377Zm.005-.32-1.918-1.047.549-.277 1.995 1.008-.627.316Z" clip-rule="evenodd"/></g><defs><radialGradient id="a" cx="0" cy="0" r="1" gradientTransform="matrix(0 6 -20 0 24 60)" gradientUnits="userSpaceOnUse"><stop/><stop offset="1" stop-opacity="0"/></radialGradient><filter id="b" width="56" height="68" x="-4" y="-4" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feGaussianBlur in="BackgroundImageFix" stdDeviation="2"/><feComposite in2="SourceAlpha" operator="in" result="effect1_backgroundBlur_958_9661"/><feBlend in="SourceGraphic" in2="effect1_backgroundBlur_958_9661" result="shape"/></filter></defs></svg>',oS='<svg xmlns="http://www.w3.org/2000/svg" width="48" height="66" fill="none" viewBox="0 0 48 66"><path fill="url(#a)" fill-opacity=".4" d="M23.999 66C35.045 66 44 63.314 44 60s-8.955-6-20.001-6C12.955 54 4 56.686 4 60s8.955 6 19.999 6Z" style="mix-blend-mode:darken"/><g filter="url(#b)"><path fill="currentColor" fill-opacity=".8" fill-rule="evenodd" d="M24 0c11.211 0 24 8.288 24 24.088C48 34.6 40.011 48.411 24 60 7.989 48.41 0 34.6 0 24.088 0 8.288 12.789 0 24 0Z" clip-rule="evenodd"/></g><path fill="#fff" fill-rule="evenodd" d="M36.503 33.501V19.625a3 3 0 0 0-1.583-2.645l-9.502-5.091a3 3 0 0 0-2.834 0l-9.501 5.091a3 3 0 0 0-1.583 2.645V33.5a3 3 0 0 0 3 3h19.003a3 3 0 0 0 3-3Zm-7.752 1h4.752a1 1 0 0 0 1-1V19.625a1 1 0 0 0-.528-.882l-9.501-5.091a1 1 0 0 0-.945 0l-9.501 5.091a1 1 0 0 0-.528.882V33.5a1 1 0 0 0 1 1h4.75a2.516 2.516 0 0 1-.05-.5V23.747a2.5 2.5 0 0 1 2.5-2.5h4.602a2.5 2.5 0 0 1 2.5 2.5V34c0 .172-.018.339-.05.5Zm-2.434 0a.5.5 0 0 0 .485-.5V23.747a.5.5 0 0 0-.5-.5H21.7a.5.5 0 0 0-.5.5V34a.5.5 0 0 0 .484.5h4.632Z" clip-rule="evenodd"/><defs><radialGradient id="a" cx="0" cy="0" r="1" gradientTransform="matrix(0 6 -20 0 24 60)" gradientUnits="userSpaceOnUse"><stop/><stop offset="1" stop-opacity="0"/></radialGradient><filter id="b" width="56" height="68" x="-4" y="-4" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feGaussianBlur in="BackgroundImageFix" stdDeviation="2"/><feComposite in2="SourceAlpha" operator="in" result="effect1_backgroundBlur_1068_16960"/><feBlend in="SourceGraphic" in2="effect1_backgroundBlur_1068_16960" result="shape"/></filter></defs></svg>',sS='<svg xmlns="http://www.w3.org/2000/svg" width="48" height="66" fill="none" viewBox="0 0 48 66"><path fill="url(#a)" fill-opacity=".4" d="M23.999 66C35.045 66 44 63.314 44 60s-8.955-6-20.001-6C12.955 54 4 56.686 4 60s8.955 6 19.999 6Z"/><g fill-rule="evenodd" clip-rule="evenodd" filter="url(#b)"><path fill="currentColor" d="M24 0c11.211 0 24 8.288 24 24.088C48 34.6 40.011 48.411 24 60 7.989 48.41 0 34.6 0 24.088 0 8.288 12.789 0 24 0Z"/><path fill="#fff" d="M33.913 12H14.087A2.087 2.087 0 0 0 12 14.087v19.826c0 1.153.934 2.087 2.087 2.087h19.826A2.087 2.087 0 0 0 36 33.913V14.087A2.087 2.087 0 0 0 33.913 12Zm-20.348 2.087c0-.288.234-.522.522-.522h7.826v4.07h-8.348v-3.548Zm9.913 9.13v-9.652h4.696v9.652h-4.696Zm4.696 1.566h-4.696v9.652h4.696v-9.652Zm1.565 9.652h4.174a.523.523 0 0 0 .522-.522v-9.13h-4.696v9.652Zm0-11.218v-9.652h4.174c.288 0 .522.234.522.522v9.13h-4.696ZM21.913 19.2v4.017h-8.348V19.2h8.348Zm0 9.6v-4.017h-8.348V28.8h8.348Zm-8.348 1.565h8.348v4.07h-7.826a.522.522 0 0 1-.522-.522v-3.548Z"/></g><defs><radialGradient id="a" cx="0" cy="0" r="1" gradientTransform="matrix(0 6 -20 0 24 60)" gradientUnits="userSpaceOnUse"><stop stop-color="#1D3665"/><stop offset="1" stop-color="#1D3665" stop-opacity="0"/></radialGradient><filter id="b" width="56" height="68" x="-4" y="-4" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feGaussianBlur in="BackgroundImageFix" stdDeviation="2"/><feComposite in2="SourceAlpha" operator="in" result="effect1_backgroundBlur_2412_6054"/><feBlend in="SourceGraphic" in2="effect1_backgroundBlur_2412_6054" result="shape"/></filter></defs></svg>',kt={PinPvz:iS,PinHome:oS,PinLocker:sS},ud=28,fd=({open:t,children:e,hideFooter:n,minSnapHeight:r,submitDisabled:i,onSubmitClick:o,...s})=>C.jsx(kf,{open:t,expandOnContentDrag:!0,initialFocusRef:!1,defaultSnap:({snapPoints:a})=>Math.min(...a),snapPoints:({headerHeight:a,minHeight:l,footerHeight:c,maxHeight:f})=>[r==null?l:a+c+r,f-ud],footer:n?null:C.jsx(xt,{disabled:i,variant:"primary",className:Je.sheetSubmit,onClick:o,children:C.jsx(Rn,{keyName:"choose",ns:"common"})}),sibling:C.jsx("div",{"data-rsbs-backdrop":"true",onClick:a=>{var l;a.stopPropagation(),a.preventDefault(),(l=s.onDismiss)==null||l.call(s)}}),blocking:!1,children:C.jsx("div",{className:Je.bottomSheet,children:e})}),dd=t=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:42,height:42,fill:"none",viewBox:"0 0 42 42",...t},de.createElement("rect",{width:42,height:42,fill:"#fff",rx:21}),de.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M31.003 28V17.766a3 3 0 0 0-1.579-2.643l-7.003-3.765a3 3 0 0 0-2.842 0l-7.003 3.765a3 3 0 0 0-1.58 2.643V28a3 3 0 0 0 3 3h14.008a3 3 0 0 0 3-3Zm-5.919 1h2.92a1 1 0 0 0 1-1V17.766a1 1 0 0 0-.527-.881l-7.003-3.766a1 1 0 0 0-.948 0l-7.003 3.766a1 1 0 0 0-.527.88v10.237a1 1 0 0 0 1 1h2.92a2.513 2.513 0 0 1-.05-.5v-7.606a2.5 2.5 0 0 1 2.5-2.5h3.268a2.5 2.5 0 0 1 2.5 2.5V28.5c0 .171-.017.338-.05.5Zm-2.426 0a.5.5 0 0 0 .476-.499v-7.606a.5.5 0 0 0-.5-.5h-3.269a.5.5 0 0 0-.5.5V28.5a.5.5 0 0 0 .476.5h3.317Z",clipRule:"evenodd"}),de.createElement("rect",{width:41,height:41,x:.5,y:.5,stroke:"#1D3665",strokeOpacity:.1,rx:20.5})),aS=t=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},de.createElement("g",{clipPath:"url(#a)"},de.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M17.071 3.071a1.25 1.25 0 0 0-1.768 0L10 8.375 4.697 3.07a1.25 1.25 0 1 0-1.768 1.77l5.303 5.303-5.303 5.303a1.25 1.25 0 0 0 1.768 1.768L10 11.91l5.303 5.303a1.25 1.25 0 1 0 1.768-1.768l-5.303-5.303L17.07 4.84a1.25 1.25 0 0 0 0-1.768Z",clipRule:"evenodd"})),de.createElement("defs",null,de.createElement("clipPath",{id:"a"},de.createElement("path",{fill:"#fff",d:"M0 0h20v20H0z"})))),lS="CloseButton-module__root__233rOd",cS="CloseButton-module__absolutePositionVariant__MMkQ0-",uS="CloseButton-module__relativePositionVariant__fdYFY4",jc={root:lS,absolutePositionVariant:cS,relativePositionVariant:uS},fi=({position:t="absolute",className:e,...n})=>C.jsx("div",{...n,className:Se(jc.root,e,jc[`${t}PositionVariant`]),children:C.jsx(aS,{})}),fS="CourierBalloon-module__root__4MUq03",dS="CourierBalloon-module__details__Ji6B9l",pS="CourierBalloon-module__header__SAzGF6",hS="CourierBalloon-module__title__FdGkJ2",gS="CourierBalloon-module__description__Su359i",vS="CourierBalloon-module__actions__zJkpDW",mS="CourierBalloon-module__errorVariant__TjUPgn",yS="CourierBalloon-module__logo__DMba5H",on={root:fS,details:dS,header:pS,title:hS,description:gS,actions:vS,errorVariant:mS,logo:yS},Xs=({SSR:t,variant:e,address:n,className:r,hideDetails:i,hasCloseButton:o,onDetails:s,onClose:a})=>{const l=e==="error",c=e==="default",f=t?"{ courier_balloon.title }":C.jsx(Rn,{keyName:"title",ns:"courier_balloon"}),d=t?"{ courier_balloon.error_title }":C.jsx(Rn,{keyName:"error_title",ns:"courier_balloon"}),p=t?"{ courier_balloon.error_description }":C.jsx(Rn,{keyName:"error_description",ns:"courier_balloon"});return C.jsxs("div",{className:Se(on.root,r,on[`${e}Variant`]),children:[C.jsxs("div",{className:on.header,children:[C.jsx(dd,{className:on.logo}),C.jsx("span",{className:on.title,children:l?d:f}),o&&C.jsx(fi,{onClick:a})]}),C.jsx("div",{className:on.description,children:l?p:n||"{{ properties.address }}"}),c&&!i&&C.jsx("div",{className:on.actions,children:C.jsx(xt,{id:lo,as:"button",variant:"primary",className:on.details,onClick:s,children:t?"{ details }":C.jsx(Rn,{keyName:"details",ns:"common"})})})]})},pd=({isSelectedPoint:t})=>{const[e,n]=u.useState(!0),r=Fe(i=>i.detailsOpen);return u.useEffect(()=>{n(t?!r:!0)},[r,t]),e},bS="Chip-module__root__A1duWr",wS="Chip-module__active__PmXa7K",Nc={root:bS,active:wS},Bc=({active:t,children:e,className:n,...r})=>C.jsx("div",{...r,className:Se(Nc.root,n,{[Nc.active]:t}),children:e}),SS="TextArea-module__root__l-RDfr",LS={root:SS},Uc=u.forwardRef(({className:t,inputRef:e,onChange:n,onBlur:r,onFocus:i,...o},s)=>{const a=u.useRef(null);u.useImperativeHandle(s,()=>({focus:()=>{var c,f;(c=a.current)==null||c.focus(),i&&i({target:{value:(f=a.current)==null?void 0:f.value}})},blur:()=>{var c,f;(c=a.current)==null||c.blur(),r&&r({target:{value:(f=a.current)==null?void 0:f.value}})},setValue:c=>{n&&n({target:{value:c}}),a.current&&(a.current.value=c)}}),[r,n,i]);const l=_d(e,a);return C.jsx("textarea",{...o,ref:l,className:Se(LS.root,t),onBlur:r,onFocus:i,onChange:n})}),ES=({set:t})=>(e,n)=>{let r={...e};switch(n.type){case"SET_COMMENT":{r={...e,comment:n.payload};break}case"SET_DELIVERY_TIME":{r={...e,delivery_time:n.payload};break}case"SET_APARTMENT_NUMBER":{r={...e,apartment_number:n.payload};break}}return t==null||t(r),r},hd=t=>{const{delivery_time:e,apartment_number:n}=t;return!!e&&!!n},xS="CourierDetailsView-module__title__erksdV",CS="CourierDetailsView-module__logo__qYbLKL",_S="CourierDetailsView-module__header__JofwHC",OS="CourierDetailsView-module__content__8xEbUb",MS="CourierDetailsView-module__section__NQlWki",PS="CourierDetailsView-module__chips__T1ep8H",kS="CourierDetailsView-module__actions__IgFrOE",RS="CourierDetailsView-module__submit__Z-6fPa",TS="CourierDetailsView-module__actionsHidden__VfVd-Y",AS="CourierDetailsView-module__commentSection__vN110S",DS="CourierDetailsView-module__comment__rOoPVP",gt={title:xS,logo:CS,header:_S,content:OS,section:MS,chips:PS,actions:kS,submit:RS,actionsHidden:TS,commentSection:AS,comment:DS},IS=({classes:t,location:e,hideActions:n,onClose:r,onChange:i,onSubmit:o})=>{const{inputs:s,locale:a}=mt(),{t:l}=jt(["details_modal","courier_balloon","common"]),c=u.useMemo(()=>ES({set:i}),[i]),[f,d]=u.useState(!1),[p,v]=u.useReducer(c,{...e,address:null,comment:"",delivery_time:"",apartment_number:""}),g=async()=>{d(!0);try{Yt(e.address,"Address is required");const E=await Vd({address:e.address,algorithm:10,service:10,language:a||ku});if(!ww(E))return;const m=E==null?void 0:E.data.data;o==null||o({...p,address:m})}finally{d(!1)}},h=E=>()=>{v({payload:E,type:"SET_DELIVERY_TIME"})},S=E=>{v({payload:E.target.value,type:"SET_APARTMENT_NUMBER"})},L=E=>{v({payload:E.target.value,type:"SET_COMMENT"})},b=hd(p),y=_o(s==null?void 0:s.apartment),x=_o(s==null?void 0:s.comment);return C.jsxs(C.Fragment,{children:[C.jsxs("div",{className:Se(gt.header,t==null?void 0:t.header),children:[C.jsx(fi,{onClick:r}),C.jsxs("div",{className:gt.title,children:[C.jsx(dd,{className:gt.logo}),C.jsx("span",{children:l("title",{ns:"courier_balloon"})})]})]}),C.jsxs("div",{className:Se(gt.content,t==null?void 0:t.content),children:[C.jsxs("section",{className:gt.section,children:[C.jsxs("label",{children:[l("address"),":"]}),C.jsx("p",{children:e.address})]}),C.jsxs("section",{className:gt.section,children:[C.jsxs("label",{children:[l("delivery_time"),":"]}),C.jsxs("div",{className:gt.chips,children:[C.jsx(Bc,{active:p.delivery_time==="8:00-13:00",onClick:h("8:00-13:00"),children:"8:00 - 13:00"}),C.jsx(Bc,{active:p.delivery_time==="14:00-22:00",onClick:h("14:00-22:00"),children:"14:00 - 22:00"})]})]}),C.jsxs("section",{className:gt.section,children:[C.jsxs("label",{children:[l("apartment_number"),":"]}),C.jsx(Uc,{...y,rows:1,onChange:S})]}),C.jsxs("section",{className:Se(gt.section,gt.commentSection),children:[C.jsxs("label",{children:[l("comment"),":"]}),C.jsx(Uc,{...x,className:gt.comment,onChange:L})]})]}),C.jsx("div",{className:Se(gt.actions,{[gt.actionsHidden]:n}),children:C.jsx(xt,{loading:f,disabled:!b||f,variant:"primary",className:gt.submit,onClick:g,children:l("choose",{ns:"common"})})})]})},gd=u.memo(IS),jS={header:Je.courierDetailsViewHeader,content:Je.courierDetailsViewContent},NS=({hideDetails:t,point:e,setOpenDetails:n,setCourierPoint:r,onPointClick:i})=>{const o=pd({isSelectedPoint:!0}),[s,a]=u.useState({...e,comment:"",delivery_time:"",apartment_number:""});u.useEffect(()=>{a({...e,comment:"",delivery_time:"",apartment_number:""})},[e]);const[l,c]=u.useState(null),f=di("screenSm"),d=u.useMemo(()=>({lat:s.coords[0],lng:s.coords[1]}),[s.coords]),p=()=>{n==null||n(!0)},v=()=>{r==null||r(null)},g=u.useMemo(()=>({url:un(Pt(kt.PinHome,"--owl-color-success")),scaledSize:new google.maps.Size(...Jt)}),[]),h=()=>{i==null||i(s),n==null||n(!1),r==null||r(null)},S=C.jsx(Xs,{...s,hideDetails:t,hasCloseButton:f,variant:s.address?"default":"error",className:Je.balloon,onDetails:p,onClose:v}),L=hd(s),b=o&&!!(l!=null&&l.getVisible());return C.jsxs(gu,{noClustererRedraw:!0,icon:g,position:d,options:cd,onLoad:c,children:[f&&C.jsxs(fd,{minSnapHeight:s.address?200:void 0,submitDisabled:!L,hideFooter:!s.address,open:b,onDismiss:v,onSubmitClick:h,children:[s.address&&C.jsx(gd,{classes:jS,hideActions:!0,location:e,onChange:a,onClose:v}),!s.address&&S]}),!f&&b&&C.jsx(Su,{onCloseClick:v,children:S})]})},vd=t=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:26,height:8,fill:"none",viewBox:"0 0 26 8",...t},de.createElement("g",{fill:"#000"},de.createElement("path",{d:"M1.416 7.5c-.255 0-.491-.065-.708-.194A1.445 1.445 0 0 1 0 6.06V1.94A1.445 1.445 0 0 1 .708.695C.925.564 1.16.5 1.416.5h4.056c.255 0 .488.065.698.194.217.13.39.305.517.525.134.214.2.454.2.72V6.06c0 .26-.066.5-.2.72-.128.22-.3.395-.517.525-.21.13-.443.194-.698.194H1.416Zm.067-1.517h3.903V2.017H1.483v3.966ZM7.941 7.5v-7h1.53l2.335 2.83L14.13.5h1.54v7h-1.493V2.804l-2.372 2.878-2.382-2.868V7.5H7.94ZM16.816 7.5v-7h1.53l3.856 4.667V.5h1.502v7h-1.53l-3.875-4.686V7.5h-1.483ZM24.536 7.5v-7H26v7h-1.464Z"}))),md=t=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:26,height:14,fill:"none",viewBox:"0 0 26 14",...t},de.createElement("g",{fill:"#000"},de.createElement("path",{d:"M0 13.252V8.346h1.053v3.844h3.08v1.062H0ZM4.535 13.252V8.346h1.053v3.844h3.08v1.062H4.535ZM9.126 13.252V9.36a1.02 1.02 0 0 1 .503-.87.973.973 0 0 1 .503-.137h2.874a.95.95 0 0 1 .502.136c.154.09.277.213.367.367.095.15.143.318.143.504v3.892H12.95v-1.58H10.18v1.58H9.126Zm1.053-2.64h2.772V9.413H10.18v1.197ZM14.792 13.252v-4.9h1.087l1.658 1.98 1.65-1.98h1.094v4.9h-1.06V9.965l-1.684 2.014-1.692-2.007v3.28h-1.053ZM21.108 13.252V9.36a1.018 1.018 0 0 1 .503-.87.973.973 0 0 1 .503-.137h2.874a.95.95 0 0 1 .503.136c.153.09.276.213.366.367A.92.92 0 0 1 26 9.36v3.892h-1.067v-1.58h-2.771v1.58h-1.054Zm1.053-2.64h2.772V9.413h-2.771v1.197ZM1.005 5.648a.973.973 0 0 1-.502-.137A1.018 1.018 0 0 1 0 4.641V1.756a1.018 1.018 0 0 1 .503-.87.973.973 0 0 1 .502-.137h2.881c.181 0 .347.045.496.136.154.09.276.213.367.367a.92.92 0 0 1 .143.504V4.64c0 .181-.048.349-.143.503-.09.154-.213.277-.367.367a.937.937 0 0 1-.496.137h-2.88Zm.048-1.062h2.772V1.81H1.053v2.776ZM5.64 5.648v-4.9h1.087l1.657 1.98 1.651-1.98h1.094v4.9h-1.06V2.36L8.384 4.375 6.693 2.368v3.28H5.64ZM11.943 5.648v-4.9h1.087l2.738 3.267V.749h1.066v4.899h-1.087l-2.751-3.28v3.28h-1.053ZM17.425 5.648v-4.9h1.04v4.9h-1.04Z"}))),BS="LocationView-module__title__QP69kD",US="LocationView-module__logo__nlPQaG",VS="LocationView-module__header__9DDuVU",FS="LocationView-module__content__Se2TSy",zS="LocationView-module__section__9m1x1v",$S="LocationView-module__chips__6j-ZAh",HS="LocationView-module__services__rwbp2x",GS="LocationView-module__images__zfnQMA",WS="LocationView-module__image__JKvt9J",ZS="LocationView-module__actions__AGih3C",qS="LocationView-module__actionsHidden__DBV1vj",KS="LocationView-module__submit__6mD2w-",YS="LocationView-module__scheduleItem__snTLMb",nt={title:BS,logo:US,header:VS,content:FS,section:zS,chips:$S,services:HS,images:GS,image:WS,actions:ZS,actionsHidden:qS,submit:KS,scheduleItem:YS},JS={default:vd,llama:md},XS=({location:t,hideActions:e,classes:n,onClose:r,onSubmit:i})=>{const{t:o}=jt(["details_modal","common"]),{logo:s="default"}=mt(),a=JS[s];return C.jsxs(C.Fragment,{children:[C.jsxs("div",{className:Se(nt.header,n==null?void 0:n.header),children:[C.jsx(fi,{onClick:r}),C.jsxs("div",{className:nt.title,children:[C.jsx("div",{className:nt.logo,children:C.jsx(a,{})}),C.jsx("span",{children:t.name})]})]}),C.jsxs("div",{className:Se(nt.content,n==null?void 0:n.content),children:[C.jsxs("section",{className:nt.section,children:[C.jsxs("label",{children:[o("address"),":"]}),C.jsx("p",{children:t.location.full_address})]}),t.schedule.length>0&&C.jsxs("section",{className:nt.section,children:[C.jsxs("label",{children:[o("schedule"),":"]}),t.schedule.map((l,c)=>C.jsx("p",{className:nt.scheduleItem,children:l},c))]}),(t.pay_by_card||t.pay_by_card)&&C.jsxs("section",{className:nt.section,children:[C.jsxs("label",{children:[o("payment_method"),":"]}),C.jsxs("div",{className:nt.chips,children:[t.pay_by_cash&&o("pay_by_cash"),t.pay_by_card&&t.pay_by_cash&&", ",t.pay_by_card&&o("pay_by_card")]})]}),C.jsxs("section",{className:nt.section,children:[C.jsxs("label",{children:[o("services"),":"]}),C.jsxs("div",{className:nt.services,children:[t.is_pickup&&C.jsx("span",{children:o("is_pickup")}),t.is_delivery&&C.jsx("span",{children:o("is_delivery")}),t.is_dressing_room&&C.jsx("span",{children:o("is_dressing_room")}),t.is_check_order&&C.jsx("span",{children:o("is_check_order")})]})]}),C.jsxs("section",{className:nt.section,children:[C.jsxs("label",{children:[o("location"),":"]}),C.jsx("p",{children:t.location_name})]}),t.images.length>0&&C.jsx("section",{className:nt.images,children:t.images.map(l=>C.jsx("img",{src:l,alt:t.name,className:nt.image},l))})]}),C.jsx("div",{className:Se(nt.actions,{[nt.actionsHidden]:e}),children:C.jsx(xt,{variant:"primary",className:nt.submit,onClick:i,children:o("choose",{ns:"common"})})})]})},yd=u.memo(XS),QS=t=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...t},de.createElement("path",{fill:"currentcolor",d:"M12.5 8c0 .287-.108.573-.324.792l-6.789 6.88a1.095 1.095 0 0 1-1.563 0 1.131 1.131 0 0 1 0-1.585L9.83 8 3.824 1.913a1.131 1.131 0 0 1 0-1.585 1.095 1.095 0 0 1 1.564 0l6.789 6.88c.215.219.323.505.323.792Z"})),eL="LocationBalloon-module__root__D5p9cL",tL="LocationBalloon-module__submit__Ri5JaR",nL="LocationBalloon-module__details__6et6aX",rL="LocationBalloon-module__icon__U-zpx7",iL="LocationBalloon-module__header__LCvDj0",oL="LocationBalloon-module__title__octhrc",sL="LocationBalloon-module__description__r7vFbw",aL="LocationBalloon-module__actions__-jdejn",sn={root:eL,submit:tL,details:nL,icon:rL,header:iL,title:oL,description:sL,actions:aL},lL={default:vd,llama:md},bd=({SSR:t,name:e,location:n,onSubmit:r,className:i,onDetails:o,hideDetails:s,location_name:a})=>{const{logo:l="default"}=mt(),c=lL[l];return C.jsxs("div",{className:Se(sn.root,i),children:[C.jsxs("div",{className:sn.header,children:[C.jsx("div",{className:sn.icon,children:C.jsx(c,{})}),C.jsx("span",{className:sn.title,children:e||"{{ properties.point.name }}"})]}),C.jsxs("div",{className:sn.description,children:[(n==null?void 0:n.full_address)||"{{ properties.point.location.full_address }}",","," ",a||"{{ properties.point.location_name }}"]}),C.jsxs("div",{className:sn.actions,children:[C.jsx(xt,{id:_s,variant:"primary",className:sn.submit,onClick:r,children:t?"{ choose }":C.jsx(Rn,{keyName:"choose",ns:"common"})}),!s&&C.jsxs(xt,{id:lo,as:"link",variant:"primary",className:sn.details,onClick:o,children:[t?"{ details }":C.jsx(Rn,{keyName:"details",ns:"common"}),C.jsx(QS,{})]})]})]})},cL={header:Je.locationViewHeader,content:Je.locationViewContent},uL=({point:t,clusterer:e,hideDetails:n,onPointClick:r,selectedPoint:i,setOpenDetails:o,onPointSelected:s})=>{const a=di("screenSm"),[l,c]=u.useState(null),f=()=>{o==null||o(!1),s==null||s(t)},d=()=>{s==null||s(null)},p=()=>{o==null||o(!0),s==null||s(t)},v=()=>{r==null||r(t),o==null||o(!1),s==null||s(null)},g=(i==null?void 0:i.uid)===t.uid,h=g?Jn:Jt,S=pd({isSelectedPoint:g}),L=u.useMemo(()=>{let x;switch(!0){case(t.type===30&&!g):{x=Pt(kt.PinLocker,"--owl-color-primary");break}case(t.type!==30&&!g):{x=Pt(kt.PinPvz,"--owl-color-grey-80");break}case(t.type===30&&g):{x=Pt(kt.PinLocker,"--owl-color-success");break}case(t.type!==30&&g):{x=Pt(kt.PinPvz,"--owl-color-black");break}}return Yt(x,"Icon url is not defined"),{scaledSize:new google.maps.Size(...h),url:un(x)}},[g,h,t.type]),b=u.useMemo(()=>({lat:t.location.latitude,lng:t.location.longitude}),[t.location.latitude,t.location.longitude]),y=g&&S&&!!(l!=null&&l.getVisible());return C.jsxs(gu,{noClustererRedraw:!0,icon:L,position:b,clusterer:e,options:cd,onLoad:c,onClick:f,children:[a&&C.jsx(fd,{minSnapHeight:200,open:y,onDismiss:d,onSubmitClick:v,children:C.jsx(yd,{classes:cL,hideActions:!0,location:t,onClose:d})}),y&&!a&&C.jsx(Su,{onCloseClick:d,children:C.jsx(bd,{...t,hideDetails:n,className:Je.balloon,onSubmit:v,onDetails:p})})]},t.uid)},fL=({points:t,hideDetails:e,selectedPoint:n,onOpenDetails:r,onPointClick:i,onPointSelected:o})=>C.jsx(xh,{clusterClass:Je.cluster,onClusteringEnd:()=>{setTimeout(()=>{const s=document.getElementsByClassName(Je.cluster);for(const a of s)a.addEventListener("touchstart",Rc,{passive:!0})},100)},onUnmount:()=>{const s=document.getElementsByClassName(Je.cluster);for(const a of s)a.removeEventListener("touchstart",Rc)},children:s=>C.jsx(u.Fragment,{children:t.map(a=>C.jsx(uL,{point:a,clusterer:s,hideDetails:e,selectedPoint:n,setOpenDetails:r,onPointClick:i,onPointSelected:o},a.uid))})}),dL=u.memo(fL),pL=({onOpenDetails:t,onPointClick:e,onPointSelected:n})=>{const{locale:r,hideDetails:i}=mt(),o=zt(c=>c.points),s=It(c=>c.location),a=yn(c=>c.place),l=JSON.stringify([o.length,r,a==null?void 0:a.place_id]);return C.jsx(dL,{points:o,hideDetails:i,selectedPoint:s,onOpenDetails:t,onPointClick:e,onPointSelected:n},l)},hL=u.memo(pL),gL=t=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},de.createElement("rect",{width:2,height:20,x:9,fill:"#fff",rx:1}),de.createElement("rect",{width:2,height:20,x:20,y:9,fill:"#fff",rx:1,transform:"rotate(90 20 9)"}),de.createElement("circle",{cx:10,cy:10,r:8,fill:"#fff"}),de.createElement("circle",{cx:10,cy:10,r:6,fill:"currentcolor"}),de.createElement("circle",{cx:10,cy:10,r:4,fill:"#fff"})),vL=t=>{const e=document.createElement("div"),n=document.createElement("div");e.classList.add(Je.mapControl),n.classList.add(Je.mapControl),e.innerHTML="+",n.innerHTML="—",t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(n),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{const r=t.getZoom()||0;return t.setZoom(r+1)}),n.addEventListener("click",()=>{const r=t.getZoom()||0;return t.setZoom(r-1)})},mL=t=>{const e=document.createElement("div");e.classList.add(Je.mapControl),e.classList.add(Je.geolocationControl),e.innerHTML=zi.renderToString(C.jsx(gL,{})),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{ed(async n=>{var a;const{latitude:r,longitude:i}=n.coords,s=await si([r,i]);yn.getState().setPlace((a=s.results)==null?void 0:a[0])})})},yL=({className:t})=>{const e=Fe(x=>x.map),n=Fe(x=>x.setMap),r=Fe(x=>x.loading),i=Fe(x=>x.setDetailsOpen),o=Nn(),s=zt(x=>x.loading),a=zt(x=>x.loadNext),l=yn(x=>x.setPlace),c=bt(x=>x.courierPoint),f=bt(x=>x.setCourierPoint),d=It(x=>x.setSelectedPoint),{hideMapControls:p,hideDetails:v,disableGeolocation:g,onPointClick:h}=mt(),S=u.useCallback(x=>{n(x),p||(vL(x),g||mL(x))},[g,p,n]),L=u.useCallback(()=>{n(null)},[n]),b=u.useCallback(()=>{if(!e)return;const x=e==null?void 0:e.getBounds();x&&a([[x.getSouthWest().lat(),x.getNorthEast().lat()],[x.getSouthWest().lng(),x.getNorthEast().lng()]],o)},[o,a,e]),y=u.useCallback(async x=>{var w;if(f(null),d(x),!x)return;const E=[x.location.latitude,x.location.longitude],m=await si(E);l((w=m.results)==null?void 0:w[0])},[f,l,d]);return C.jsxs("div",{className:Se(Je.mapContainer,t),children:[C.jsxs(rS,{onIdle:b,onLoad:S,onUnmount:L,children:[c&&C.jsx(NS,{hideDetails:v,point:c,onPointClick:h,setOpenDetails:i,setCourierPoint:f}),C.jsx(hL,{onPointClick:h,onOpenDetails:i,onPointSelected:y})]}),(s||r)&&C.jsx(Ca,{className:Je.overlay,children:C.jsx(ei,{})})]})},bL=u.memo(yL);function jn(){return jn=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},jn.apply(this,arguments)}const wd=(t,e)=>{const n={};for(const r in t)e.indexOf(r)===-1&&(n[r]=t[r]);return n},Sd=u.createContext(null),Uo=u.createContext(null),Ld=t=>e=>u.createElement(Uo.Consumer,null,n=>u.createElement(t,jn({parent:n},e))),wL=(t=[])=>{const[e,n]=u.useState(!1),r=u.useRef(t),i=(()=>{const s=u.useContext(Sd);if(s===null)throw new Error("Couldn't find Yandex.Maps API in the context. Make sure that hook useYMaps is inside <YMaps /> provider");return s})(),o=i.getApi();return u.useEffect(()=>{i.load().then(()=>Promise.all(r.current.map(i.loadModule))).then(()=>n(!0))},[]),e&&o?o:null},SL=()=>{},LL=["onLoad","onError","modules","apiLoader"];function _a(t,e=!1,n=[]){return r=>{const{width:i,height:o,modules:s=[],onLoad:a=SL}=r,l=wL(n.concat(s)),c=!e||!!l,f=wd(r,LL);return u.useEffect(()=>l?a(l):void 0,[l]),c?u.createElement(t,jn({ymaps:l},f)):u.createElement("div",{style:{width:i,height:o}})}}const EL=typeof window<"u",Vc={lang:"ru_RU",load:"",ns:"",mode:"release"},xL=t=>{const{version:e="2.1",enterprise:n=!1,query:r={lang:"ru_RU",load:"",ns:""},preload:i=!1,children:o}=t,s=u.useRef((a=>{const{query:l=Vc}=a,c=Date.now().toString(32),f=l.ns||"",d="__yandex-maps-api-onload__$$"+c,p="__yandex-maps-api-onerror__$$"+c,v=EL?window:{},g={};let h;const S=()=>f?v[f]:h,L=()=>{delete v[d],delete v[p]};return{load:()=>{if(S())return Promise.resolve(h);if(g[f])return g[f];const b={onload:d,onerror:p,...Vc,...l},y=Object.keys(b).map(E=>`${E}=${b[E]}`).join("&"),x=[`https://${a.enterprise?"enterprise.":""}api-maps.yandex.ru`,a.version,"?"+y].join("/");return g[f]=new Promise((E,m)=>{v[d]=w=>{L(),w.ready(()=>{h=w,E(w)})},v[p]=w=>{L(),m(w)},(w=>new Promise((_,P)=>{const M=document.createElement("script");M.type="text/javascript",M.onload=_,M.onerror=P,M.src=w,M.async=!0,document.head.appendChild(M)}))(x).catch(v[p])}),g[f]},getApi:S,loadModule:b=>new Promise((y,x)=>{h.modules.require(b).done(E=>{E.forEach(m=>{((w,_,P,M=!1)=>{const O=typeof _=="string"?_.split("."):_.slice();let k,I=w;for(;O.length>1;)k=O.shift(),I[k]||(I[k]={}),I=I[k];const B=O[0];I[B]=M===!0&&I[B]||P})(h,b,m,!0)}),y(h)},x)})}})({version:e,enterprise:n,query:r,preload:i}));return u.useEffect(()=>{i&&s.current.load()},[s.current]),u.createElement(Sd.Provider,{value:s.current},o)},Fc=/^on(?=[A-Z])/;function Ve(t){return Object.keys(t).reduce((e,n)=>{if(Fc.test(n)){const r=n.replace(Fc,"").toLowerCase();e._events[r]=t[n]}else e[n]=t[n];return e},{_events:{}})}function Bn(t,e,n){typeof n=="function"&&t.events.add(e,n)}function Un(t,e,n){typeof n=="function"&&t.events.remove(e,n)}function pr(t,e,n){Object.keys(Object.assign({},e,n)).forEach(r=>{e[r]!==n[r]&&(Un(t,r,e[r]),Bn(t,r,n[r]))})}const Ed=t=>"default"+t.charAt(0).toUpperCase()+t.slice(1);function et(t,e){return t[e]!==void 0||t[Ed(e)]===void 0}function X(t,e,n){return(et(t,e)?t[e]:t[Ed(e)])||n}function tt(t,e,n=null){if(t!==e){if(t&&("current"in t?t.current=null:typeof t=="function"&&t(null)),!e)return;"current"in e?e.current=n:typeof e=="function"&&e(n)}}function xd(t){const{width:e,height:n,style:r,className:i}=t;return r!==void 0||i!==void 0?Object.assign({},r&&{style:r},i&&{className:i}):{style:{width:e,height:n}}}class CL extends u.Component{constructor(e){super(e),this.state={error:null,errorInfo:null}}componentDidCatch(e,n){const{onError:r=()=>{}}=this.props;r(e),this.setState({error:e,errorInfo:n})}render(){return this.state.error?null:this.props.children}}const Oa=t=>({onError:e,...n})=>u.createElement(CL,{onError:e},u.createElement(t,n));class Yr extends u.Component{constructor(){super(),this.instance=null,this.state={instance:null},this._parentElement=null,this._getRef=e=>{this._parentElement=e}}componentDidMount(){this.instance=Yr.mountObject(this._parentElement,this.props.ymaps.Map,this.props),this.setState({instance:this.instance})}componentDidUpdate(e){this.instance!==null&&Yr.updateObject(this.instance,e,this.props)}componentWillUnmount(){Yr.unmountObject(this.instance,this.props)}render(){const e=xd(this.props),n=Ve(this.props),r=wd(n,["_events","state","defaultState","options","defaultOptions","instanceRef","ymaps","children","width","height","style","className"]);return u.createElement(Uo.Provider,{value:this.state.instance},u.createElement("div",jn({ref:this._getRef},e,r),this.props.children))}static mountObject(e,n,r){const{instanceRef:i,_events:o}=Ve(r),s=new n(e,X(r,"state"),X(r,"options"));return Object.keys(o).forEach(a=>Bn(s,a,o[a])),tt(null,i,s),s}static updateObject(e,n,r){const{_events:i,instanceRef:o}=Ve(r),{_events:s,instanceRef:a}=Ve(n);if(et(r,"state")){const l=X(n,"state",{}),c=X(r,"state",{});l.type!==c.type&&e.setType(c.type),l.behaviors!==c.behaviors&&(l.behaviors&&e.behaviors.disable(l.behaviors),c.behaviors&&e.behaviors.enable(c.behaviors)),c.zoom&&l.zoom!==c.zoom&&e.setZoom(c.zoom),c.center&&l.center!==c.center&&e.setCenter(c.center),c.bounds&&l.bounds!==c.bounds&&e.setBounds(c.bounds)}if(et(r,"options")){const l=X(n,"options"),c=X(r,"options",{});l!==c&&e.options.set(c)}X(n,"width")===X(r,"width")&&X(n,"height")===X(r,"height")||e.container.fitToViewport(),pr(e,s,i),tt(a,o,e)}static unmountObject(e,n){const{instanceRef:r,_events:i}=Ve(n);e!==null&&(Object.keys(i).forEach(o=>Un(e,o,i[o])),e.destroy(),tt(r))}}const Cd=Oa(_a(Yr,!0,["Map"]));Cd.defaultProps={width:320,height:240};class to extends u.Component{constructor(){super(),this.state={instance:null},this._parentElement=null,this._getRef=e=>{this._parentElement=e}}componentDidMount(){this._mounted=!0,this.props.ymaps.panorama.isSupported()&&to.mountObject(this._parentElement,this.props.ymaps.panorama,this.props).then(e=>this._mounted&&this.setState({instance:e}))}componentDidUpdate(e){this.state.instance!==null&&to.updateObject(this.state.instance,e,this.props)}componentWillUnmount(){this._mounted=!1,to.unmountObject(this.state.instance,this.props)}render(){const e=xd(this.props);return u.createElement("div",jn({ref:this._getRef},e))}static mountObject(e,n,r){const{instanceRef:i,_events:o}=Ve(r),s=X(r,"point"),a=X(r,"locateOptions"),l=X(r,"options");return new Promise((c,f)=>{n.locate(s,a).done(d=>{if(d.length>0){const p=new n.Player(e,d[0],l);tt(null,i,p),Object.keys(o).forEach(v=>Bn(p,v,o[v])),c(p)}},f)})}static updateObject(e,n,r){const{_events:i,instanceRef:o}=Ve(r),{_events:s,instanceRef:a}=Ve(n);if(et(r,"options")){const l=X(n,"options"),c=X(r,"options");l!==c&&e.options.set(c)}if(et(r,"point")){const l=X(r,"point"),c=X(n,"point"),f=X(r,"locateOptions");l!==c&&e.moveTo(l,f)}pr(e,s,i),tt(a,o,e)}static unmountObject(e,n){const{instanceRef:r,_events:i}=Ve(n);e!==null&&(Object.keys(i).forEach(o=>Un(e,o,i[o])),tt(r))}}class no extends u.Component{constructor(){super(),this.state={instance:null},this.instance=null}componentDidMount(){const e=no.mountControl(this.props.ymaps.control[this.props.name],this.props);this.instance=e,this.setState({instance:e})}componentDidUpdate(e){this.instance!==null&&no.updateControl(this.instance,e,this.props)}componentWillUnmount(){no.unmountControl(this.instance,this.props)}render(){return u.createElement(Uo.Provider,{value:this.state.instance},this.props.children)}static mountControl(e,n){const{instanceRef:r,parent:i,lazy:o,_events:s}=Ve(n),a=new e({data:X(n,"data"),options:X(n,"options"),state:X(n,"state"),mapTypes:X(n,"mapTypes"),lazy:o});if(Object.keys(s).forEach(l=>Bn(a,l,s[l])),i&&i.controls&&typeof i.controls.add=="function")i.controls.add(a);else{if(!i||!i.add||typeof i.add!="function")throw new Error(`No parent found to mount ${n.name}`);i.add(a)}return tt(null,r,a),a}static updateControl(e,n,r){const{_events:i,instanceRef:o}=Ve(r),{_events:s,instanceRef:a}=Ve(n);if(et(r,"options")){const l=X(n,"options"),c=X(r,"options");l!==c&&e.options.set(c)}if(et(r,"data")){const l=X(n,"data"),c=X(r,"data");l!==c&&e.data.set(c)}if(et(r,"state")){const l=X(n,"state"),c=X(r,"state");l!==c&&e.state.set(c)}if(et(r,"mapTypes")){const l=X(n,"mapTypes"),c=X(r,"mapTypes");l!==c&&(e.removeAllMapTypes(),c.forEach(f=>e.addMapType(f)))}pr(e,s,i),tt(a,o,e)}static unmountControl(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n);e!==null&&(Object.keys(o).forEach(s=>Un(e,s,o[s])),i.controls&&typeof i.controls.remove=="function"?i.controls.remove(e):i.remove&&typeof i.remove=="function"&&i.remove(e),tt(r))}}class ro extends u.Component{constructor(){super(),this.state={instance:null},this.instance=null}componentDidMount(){const e=ro.mountObject(this.props.ymaps.Clusterer,this.props);this.instance=e,this.setState({instance:e})}componentDidUpdate(e){this.state.instance!==null&&ro.updateObject(this.instance,e,this.props)}componentWillUnmount(){ro.unmountObject(this.instance,this.props)}render(){return u.createElement(Uo.Provider,{value:this.state.instance},this.props.children)}static mountObject(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n),s=new e(X(n,"options"));if(Object.keys(o).forEach(a=>Bn(s,a,o[a])),i.geoObjects&&typeof i.geoObjects.add=="function")i.geoObjects.add(s);else{if(!i.add||typeof i.add!="function")throw new Error("No parent found to mount Clusterer");i.add(s)}return tt(null,r,s),s}static updateObject(e,n,r){const{_events:i,instanceRef:o}=Ve(r),{_events:s,instanceRef:a}=Ve(n);if(et(r,"options")){const l=X(n,"options"),c=X(r,"options");l!==c&&e.options.set(c)}pr(e,s,i),tt(a,o,e)}static unmountObject(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n);e!==null&&(Object.keys(o).forEach(s=>Un(e,s,o[s])),i.geoObjects&&typeof i.geoObjects.remove=="function"?i.geoObjects.remove(e):i.remove&&typeof i.remove=="function"&&i.remove(e),tt(r))}}class Jr extends u.Component{constructor(){super(),this.state={instance:null}}componentDidMount(){const e=Jr.mountObject(this.props.ymaps.ObjectManager,this.props);this.instance=e,this.setState({instance:e})}componentDidUpdate(e){this.instance!==null&&Jr.updateObject(this.instance,e,this.props)}componentWillUnmount(){Jr.unmountObject(this.instance,this.props)}render(){return null}static mountObject(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n),s=X(n,"options",{}),a=X(n,"features",{}),l=X(n,"filter",null),c=X(n,"objects",{}),f=X(n,"clusters",{}),d=new e(s);if(d.add(a||[]),d.setFilter(l),d.objects.options.set(c),d.clusters.options.set(f),Object.keys(o).forEach(p=>Bn(d,p,o[p])),i.geoObjects&&typeof i.geoObjects.add=="function")i.geoObjects.add(d);else{if(!i.add||typeof i.add!="function")throw new Error("No parent found to mount ObjectManager");i.add(d)}return tt(null,r,d),d}static updateObject(e,n,r){const{_events:i,instanceRef:o}=Ve(r),{_events:s,instanceRef:a}=Ve(n);if(et(r,"options")){const l=X(n,"options"),c=X(r,"options");l!==c&&e.options.set(c)}if(et(r,"objects")){const l=X(n,"objects"),c=X(r,"objects");l!==c&&e.objects.options.set(c)}if(et(r,"clusters")){const l=X(n,"clusters"),c=X(r,"clusters");l!==c&&e.clusters.options.set(c)}if(et(r,"filter")){const l=X(n,"filter"),c=X(r,"filter");l!==c&&e.setFilter(c)}if(et(r,"features")){const l=X(n,"features"),c=X(r,"features");l!==c&&(e.remove(l),e.add(c))}pr(e,s,i),tt(a,o,e)}static unmountObject(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n);e!==null&&(Object.keys(o).forEach(s=>Un(e,s,o[s])),i.geoObjects&&typeof i.geoObjects.remove=="function"?i.geoObjects.remove(e):i.remove&&typeof i.remove=="function"&&i.remove(e),tt(r))}}var _L=Oa(Ld(_a(Jr,!0,["ObjectManager"])));class Xr extends u.Component{constructor(){super(),this.state={instance:null},this.instance=null}componentDidMount(){const{name:e,ymaps:n,dangerZone:r}=this.props,i=Xr.mountObject(r&&typeof r.modifyConstructor=="function"?r.modifyConstructor(n[e]):n[e],this.props);this.instance=i,this.setState({instance:i})}componentDidUpdate(e){this.instance!==null&&Xr.updateObject(this.instance,e,this.props)}componentWillUnmount(){Xr.unmountObject(this.instance,this.props)}render(){return null}static mountObject(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n),s=new e(X(n,"geometry"),X(n,"properties"),X(n,"options"));if(Object.keys(o).forEach(a=>Bn(s,a,o[a])),i&&i.geoObjects&&typeof i.geoObjects.add=="function")i.geoObjects.add(s);else{if(!i||!i.add||typeof i.add!="function")throw new Error(`No parent found to mount ${n.name}`);i.add(s)}return tt(null,r,s),s}static updateObject(e,n,r){const{_events:i,instanceRef:o}=Ve(r),{_events:s,instanceRef:a}=Ve(n);if(et(r,"geometry")){const l=X(n,"geometry",{}),c=X(r,"geometry",{});Array.isArray(c)&&c!==l?Array.isArray(c[0])&&typeof c[1]=="number"?(e.geometry.setCoordinates(c[0]),e.geometry.setRadius(c[1])):e.geometry.setCoordinates(c):typeof c=="object"&&(c.coordinates!==l.coordinates&&e.geometry.setCoordinates(c.coordinates),c.radius!==l.radius&&e.geometry.setRadius(c.radius))}if(et(r,"properties")){const l=X(n,"properties"),c=X(r,"properties");l!==c&&e.properties.set(c)}if(et(r,"options")){const l=X(n,"options"),c=X(r,"options");l!==c&&e.options.set(c)}pr(e,s,i),tt(a,o,e)}static unmountObject(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n);e!==null&&(Object.keys(o).forEach(s=>Un(e,s,o[s])),i.geoObjects&&typeof i.geoObjects.remove=="function"?i.geoObjects.remove(e):i.remove&&typeof i.remove=="function"&&i.remove(e),tt(r))}}var zc=Oa(Ld(_a(t=>u.createElement(Xr,jn({},t,{name:"Placemark"})),!0,["Placemark"])));const $c=(t,e,n)=>t==null?void 0:t.map(r=>{var i;return{id:r.uid,type:"Feature",properties:{point:r},geometry:{type:"Point",coordinates:[r.location.latitude,r.location.longitude]},options:{hideIconOnBalloonOpen:!1,preset:io(r.type),balloonOffset:[0,-Jn[1]],balloonContentLayout:(i=e==null?void 0:e.templateLayoutFactory)==null?void 0:i.createClass(n)}}}),io=(t,e)=>t===30?`custom#pin-locker${e?`__${e}`:""}`:`custom#pin-pvz${e?`__${e}`:""}`,Nr=t=>[-(t[0]/2),-t[1]],OL={en:"en_US",ru:"ru_RU"},ML={load:"suggest",apikey:"5298a725-4baa-457a-a2a7-c3abac81db20"},PL=["templateLayoutFactory","option.presetStorage","geocode"],kL=["objectManager.addon.objectsBalloon"],Hc=["geoObject.addon.balloon"],RL={yandexMapDisablePoiInteractivity:!1},TL={clusterize:!0},Gc={iconImageSize:Jt,iconLayout:"default#image",hideIconOnBalloonOpen:!1,balloonOffset:[0,-Jt[1]],iconImageOffset:Nr(Jt)},AL="MapYandex-module__root__r3kDJ8",DL="MapYandex-module__overlay__f7UGYS",IL="MapYandex-module__details__E3bDvL",fs={root:AL,overlay:DL,details:IL},jL=({className:t})=>{const{t:e}=jt(["courier_balloon","common"]),n=u.useRef(),r=u.useRef(null),{map:i,locale:o,disableCourierDelivery:s,hideDetails:a,hideMapUI:l,onPointClick:c}=mt(),[f,d]=u.useState(null),[p,v]=u.useState([]),[g,h]=u.useState(TL),S=Fe(D=>D.setLoaded),L=Fe(D=>D.setDetailsOpen),b=Nn(),y=zt(D=>D.points),x=zt(D=>D.loading),E=zt(D=>D.loadNext),m=bt(D=>D.courierPoint),w=bt(D=>D.setCourierPoint),_=It(D=>D.location),P=It(D=>D.setSelectedPoint),M=u.useRef([]),O=u.useMemo(()=>zi.renderToString(C.jsx(bd,{SSR:!0,hideDetails:a})).replace("{ choose }",e("choose")).replace("{ details }",e("details")),[e,o,a]),k=u.useMemo(()=>zi.renderToString(C.jsx(Xs,{SSR:!0,variant:"default",hideDetails:a})).replace("{ details }",e("details",{ns:"common"})).replace("{ courier_balloon.title }",e("title")),[e,o,a]),I=u.useMemo(()=>zi.renderToString(C.jsx(Xs,{SSR:!0,variant:"error",hideDetails:a})).replace("{ courier_balloon.error_title }",e("error_title")).replace("{ courier_balloon.error_description }",e("error_description")),[e,o,a]),B=u.useMemo(()=>({zoom:(i==null?void 0:i.initialZoom)??oa,center:(i==null?void 0:i.center)??co,behaviors:["default","scrollZoom"]}),[i==null?void 0:i.center,i==null?void 0:i.initialZoom]);u.useEffect(()=>{var D,W;(W=n.current)==null||W.events.fire("boundschange",{newBounds:(D=n.current)==null?void 0:D.getBounds()})},[f]),u.useEffect(()=>{var W;if(!f||!r.current)return;for(const q of M.current)q.id!==(_==null?void 0:_.uid)&&((W=r.current)==null||W.remove(q));const D=$c(y,f,O);M.current=D,r.current.add(D)},[O,f,y,_==null?void 0:_.uid]);const H=u.useCallback(D=>{const W=D.get("newBounds");E([[W[0][0],W[1][0]],[W[0][1],W[1][1]]],b)},[b,E]),Z=u.useRef(_),F=u.useCallback(D=>{var W,q,te,re;d(D),S(),(W=D==null?void 0:D.option)==null||W.presetStorage.add("custom#pin-locker",{iconImageSize:Jt,iconLayout:"default#image",iconImageHref:un(Pt(kt.PinLocker,"--owl-color-primary")),iconImageOffset:Nr(Jt)}),(q=D==null?void 0:D.option)==null||q.presetStorage.add("custom#pin-locker__active",{iconLayout:"default#image",iconImageHref:un(Pt(kt.PinLocker,"--owl-color-success")),iconImageSize:Jn,iconImageOffset:Nr(Jn)}),(te=D==null?void 0:D.option)==null||te.presetStorage.add("custom#pin-pvz",{iconImageSize:Jt,iconLayout:"default#image",iconImageHref:un(Pt(kt.PinPvz,"--owl-color-grey-80")),iconImageOffset:Nr(Jt)}),(re=D==null?void 0:D.option)==null||re.presetStorage.add("custom#pin-pvz__active",{iconLayout:"default#image",iconImageHref:un(Pt(kt.PinPvz,"--owl-color-black")),iconImageSize:Jn,iconImageOffset:Nr(Jn)}),h(ie=>({...ie,clusterIconColor:td("--owl-color-primary")})),v($c(y,D,O))},[O,y,S]),K=u.useCallback(()=>{L(!0)},[L]),A=u.useCallback(()=>{var D;Z.current&&(c==null||c(Z.current),L(!1),P(null),w(null),(D=n.current)==null||D.balloon.close())},[c,w,L,P]),R=u.useCallback(()=>{var D,W;(D=document.getElementById(lo))==null||D.addEventListener("click",K),(W=document.getElementById(_s))==null||W.addEventListener("click",A)},[A,K]),T=u.useCallback(D=>{var q,te,re,ie,fe,Oe;const W=D.get("objectId");((q=Z.current)==null?void 0:q.uid)===W&&((ie=r.current)==null||ie.objects.setObjectOptions((te=Z.current)==null?void 0:te.uid,{preset:io((re=Z.current)==null?void 0:re.type)}),w(null),P(null),w(null),Z.current=null),(fe=document.getElementById(lo))==null||fe.removeEventListener("click",K),(Oe=document.getElementById(_s))==null||Oe.removeEventListener("click",A)},[A,K,w,P]),V=u.useCallback(D=>{var re,ie,fe,Oe;const W=D.get("objectId"),q=(ie=(re=r.current)==null?void 0:re.objects)==null?void 0:ie.getById(W);if(!q)return;const te=q.properties.point;L(!1),w(null),P(te),(fe=r.current)==null||fe.objects.each(me=>{var Me;const ye=me;(Me=r.current)==null||Me.objects.setObjectOptions(ye.id,{preset:io(ye.properties.point.type)})}),(Oe=r.current)==null||Oe.objects.setObjectOptions(W,{preset:io(te.type,"active")}),Z.current=te},[w,L,P]),z=u.useCallback(async D=>{if(!f||s)return;const W=D.get("coords"),{geoObjects:q}=await f.geocode(W),te=q.get(0),re=te.getAddressLine(),ie=te.properties.get("metaDataProperty.GeocoderMetaData.precision",{});if(P(null),ie!=="exact"){w({coords:W,address:null});return}w({coords:W,address:re})},[s,f,w,P]),$=u.useMemo(()=>{var D;return{...Gc,iconImageHref:un(Pt(kt.PinHome,"--owl-color-success")),balloonContentLayout:(D=f==null?void 0:f.templateLayoutFactory)==null?void 0:D.createClass(k)}},[k,f==null?void 0:f.templateLayoutFactory]),Q=u.useMemo(()=>{var D;return{...Gc,iconImageHref:un(Pt(kt.PinHome,"--owl-color-success")),balloonContentLayout:(D=f==null?void 0:f.templateLayoutFactory)==null?void 0:D.createClass(I)}},[I,f==null?void 0:f.templateLayoutFactory]),N=u.useCallback(D=>{var W,q,te,re,ie;(W=D==null?void 0:D.balloon)==null||W.open(),(te=(q=D==null?void 0:D.balloon)==null?void 0:q.events)==null||te.add("open",R),(ie=(re=D==null?void 0:D.balloon)==null?void 0:re.events)==null||ie.add("close",T)},[T,R]);return C.jsxs("div",{className:Se(fs.root,t,{[fs.hideUI]:l}),children:[C.jsx(xL,{query:{...ML,lang:OL[o??"ru"]},children:C.jsxs(Cd,{width:"100%",height:"100%",state:B,instanceRef:n,options:RL,modules:PL,onLoad:F,onClick:z,onBoundsChange:H,children:[(m==null?void 0:m.address)&&C.jsx(zc,{properties:m,modules:Hc,geometry:m.coords,options:$,instanceRef:N},JSON.stringify(m.coords)),m&&!m.address&&C.jsx(zc,{modules:Hc,geometry:m.coords,instanceRef:N,options:Q},JSON.stringify(m.coords)),C.jsx(_L,{features:p,instanceRef:r,modules:kL,options:g,onClick:V,onBalloonOpen:R,onBalloonClose:T})]})},o),x&&C.jsx(Ca,{className:fs.overlay,children:C.jsx(ei,{})})]})},NL=u.memo(jL),BL=t=>({google:bL,yandex:NL})[t];function _d(...t){return u.useCallback(e=>{for(const n of t)typeof n=="function"?n(e):n&&typeof n=="object"&&(n.current=e)},t)}const _o=t=>{const e=u.useCallback(()=>{var n;(n=t==null?void 0:t.onClick)==null||n.call(t,t.name)},[t]);return{ref:t==null?void 0:t.ref,name:t==null?void 0:t.name,onClick:e}},UL=()=>{throw new Error("useMediaQuery is a client-only hook")};function VL(t){const e=u.useCallback(r=>{const i=window.matchMedia(t);return i.addEventListener("change",r),()=>{i.removeEventListener("change",r)}},[t]),n=()=>window.matchMedia(t).matches;return u.useSyncExternalStore(e,n,UL)}const FL="768px",zL="1024px",$L="1280px",HL="1536px",GL={screenSm:FL,screenMd:zL,screenLg:$L,screenXl:HL};function di(t){return VL(`(max-width: calc(${GL[t]} - 1px))`)}const WL="Hr-module__root__tBRShh",ZL={root:WL},ds=({className:t,...e})=>C.jsx("hr",{className:Se(ZL.root,t),...e}),qL="Sidebar-module__root__hxXudu",KL="Sidebar-module__closeButton__8k-Ph3",YL="Sidebar-module__open__qMGUBV",JL="Sidebar-module__header__Eu-wRc",XL="Sidebar-module__typeFilter__-lxVdY",QL="Sidebar-module__separator__XDb6rs",eE="Sidebar-module__withRightPadding__knvmuY",tE="Sidebar-module__sheetContent__4iWeTf",nE="Sidebar-module__doneButton__chvXVP",Kt={root:qL,closeButton:KL,open:YL,header:JL,typeFilter:XL,separator:QL,withRightPadding:eE,sheetContent:tE,doneButton:nE},rE=()=>{const{t}=jt("common"),e=di("screenSm"),n=ir(i=>i.toggle),r=()=>{n(!1)};return C.jsxs("div",{className:Kt.header,children:[e&&C.jsx("div",{className:Kt.doneButton,onClick:r,children:t("done")}),!e&&C.jsx(fi,{className:Kt.closeButton,onClick:r})]})},iE="TypeFilter-module__root__FEaBBU",oE="TypeFilter-module__button__RYOzBQ",Ui={root:iE,button:oE},sE=({value:t,onChange:e,className:n})=>{const{t:r}=jt("type_filter"),i=o=>()=>e==null?void 0:e(o);return C.jsxs("div",{className:Se(Ui.root,n),children:[C.jsx(xt,{className:Ui.button,variant:t===qt.All?"primary":"secondary",onClick:i(qt.All),children:r("all")}),C.jsx(xt,{className:Ui.button,variant:t===qt.PostOffice?"primary":"secondary",onClick:i(qt.PostOffice),children:r("post_office")}),C.jsx(xt,{className:Ui.button,variant:t===qt.PickPoint?"primary":"secondary",onClick:i(qt.PickPoint),children:r("pick_point")})]})},aE=({className:t,onChange:e})=>{const n=Nn(r=>r.type);return C.jsx(sE,{value:n,className:t,onChange:e})},lE=u.memo(aE),cE="Radio-module__root__FMbfCi",uE="Radio-module__label__-LLJSR",Wc={root:cE,label:uE},fE=({label:t,className:e,labelProps:n={},...r})=>{const{className:i,...o}=n;return C.jsxs("label",{className:Se(Wc.label,i),...o,children:[C.jsx("input",{type:"radio",className:Se(Wc.root,e),...r}),t]})},nr=t=>C.jsx(fE,{...t,type:"checkbox"}),dE="RadioGroup-module__root__wNjmrq",pE="RadioGroup-module__body__n4Ho0-",hE="RadioGroup-module__legend__ECksBN",ps={root:dE,body:pE,legend:hE},Od=({label:t,value:e,onChange:n,children:r,className:i,...o})=>C.jsxs("div",{className:Se(ps.root,i),...o,children:[t&&C.jsx("span",{className:ps.legend,children:t}),C.jsx("div",{className:ps.body,children:u.Children.map(r,s=>u.isValidElement(s)?u.cloneElement(s,{checked:!!(e!=null&&e[s.props.value]),onChange:a=>n==null?void 0:n({...e,[a.target.value]:a.target.checked})}):null)})]}),gE=({className:t,onChange:e})=>{const{t:n}=jt("send_filter"),r=Nn(i=>i.send);return C.jsxs(Od,{className:t,value:r,label:n("title"),onChange:e,children:[C.jsx(nr,{name:"send",value:Dt.Return,label:n("sending_returns")}),C.jsx(nr,{name:"send",value:Dt.Shipping,label:n("shipping")}),C.jsx(nr,{name:"send",value:Dt.Payment,label:n("payment")})]})},vE=u.memo(gE),mE=({className:t,onChange:e})=>{const{t:n}=jt("receive_filter"),r=Nn(i=>i.receive);return C.jsxs(Od,{value:r,label:n("title"),onChange:e,className:t,children:[C.jsx(nr,{name:"receive",value:At.DressingRoom,label:n("dressing_room")}),C.jsx(nr,{name:"receive",value:At.CheckOrder,label:n("check_order")}),C.jsx(nr,{name:"receive",value:At.PayByCash,label:n("pay_by_cash")})]})},yE=u.memo(mE);const bE=({className:t})=>{const e=di("screenSm"),n=ir(f=>f.open),r=ir(f=>f.toggle),i=Nn(f=>f.setFilter),o=u.useCallback(f=>i({type:f}),[i]),s=u.useCallback(f=>i({send:f}),[i]),a=u.useCallback(f=>i({receive:f}),[i]),l=u.useCallback(()=>r(!1),[r]),c=C.jsxs(C.Fragment,{children:[C.jsx(rE,{}),C.jsxs("div",{className:Kt.withRightPadding,children:[C.jsx(lE,{className:Kt.typeFilter,onChange:o}),C.jsx(ds,{className:Kt.separator}),C.jsx(yE,{onChange:a}),C.jsx(ds,{}),C.jsx(vE,{onChange:s}),C.jsx(ds,{})]})]});return e?C.jsx(kf,{initialFocusRef:!1,open:n,snapPoints:({maxHeight:f})=>f-ud,onDismiss:l,children:C.jsx("div",{className:Kt.sheetContent,children:c})}):C.jsx("div",{className:Se(Kt.root,t,{[Kt.open]:n}),children:c})},wE=t=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:60,height:40,fill:"none",viewBox:"0 0 60 40",...t},de.createElement("path",{d:"M0 0h52a8 8 0 0 1 8 8v24a8 8 0 0 1-8 8H0V0Z"}),de.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,strokeWidth:1.5,d:"M32.093 10h13.814c1.151 0 2.093.91 2.093 2.02v2.223c0 .808-.523 1.818-1.047 2.324l-4.5 3.839c-.627.505-1.046 1.515-1.046 2.323v4.344c0 .607-.419 1.415-.942 1.718L39 29.7c-1.36.808-3.244-.101-3.244-1.717v-5.355c0-.707-.419-1.616-.837-2.121l-3.977-4.041c-.523-.506-.942-1.415-.942-2.02V12.12c0-1.21.942-2.12 2.093-2.12Z"})),SE=t=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:28,height:28,fill:"none",viewBox:"0 0 28 28",...t},de.createElement("rect",{width:28,height:28,fill:"#333",rx:4}),de.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,d:"M9.165 7h9.67c.806 0 1.465.636 1.465 1.414V9.97c0 .566-.366 1.273-.733 1.627l-3.15 2.687c-.44.353-.732 1.06-.732 1.627v3.04c0 .425-.293.99-.66 1.203L14 20.79c-.952.566-2.271-.07-2.271-1.202V15.84c0-.495-.293-1.132-.586-1.485l-2.784-2.83c-.366-.353-.659-.99-.659-1.413V8.485C7.7 7.636 8.36 7 9.165 7Z"})),LE="MapContainer-module__root__nze9pB",EE="MapContainer-module__mapWrapper__twRo4C",xE="MapContainer-module__wrapperBlurred__U-Ohae",CE="MapContainer-module__locationSelector__lEiSKq",_E="MapContainer-module__filterButton__jIRGu9",OE="MapContainer-module__sidebarOpen__sUhaH-",ME="MapContainer-module__filterIcon__-2Qd2d",PE="MapContainer-module__details__sAP6T2",Ft={root:LE,mapWrapper:EE,wrapperBlurred:xE,locationSelector:CE,filterButton:_E,sidebarOpen:OE,filterIcon:ME,details:PE},kE=()=>{const t=ir(i=>i.open),e=ir(i=>i.toggle),n=di("screenSm"),r=()=>{e(!0)};return C.jsxs("div",{className:Se(Ft.filterButton,{[Ft.sidebarOpen]:t}),onClick:n?void 0:r,children:[n&&C.jsx(Tu,{}),n?C.jsx(SE,{className:Ft.filterIcon,onClick:r}):C.jsx(wE,{className:Ft.filterIcon})]})};var Md={},Vo={},Pd={exports:{}},RE="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",TE=RE,AE=TE;function kd(){}function Rd(){}Rd.resetWarningCache=kd;var DE=function(){function t(r,i,o,s,a,l){if(l!==AE){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:Rd,resetWarningCache:kd};return n.PropTypes=n,n};Pd.exports=DE();var IE=Pd.exports,Fo={},cr={};Object.defineProperty(cr,"__esModule",{value:!0});cr.loadGoogleMapScript=cr.isBrowser=void 0;var Td=typeof window<"u"&&window.document;cr.isBrowser=Td;var jE=function(e,n){if(!Td||typeof google<"u"&&google.maps&&google.maps.api)return Promise.resolve();var r=document.querySelectorAll('script[src*="'.concat(e,'"]'));if(r&&r.length)return new Promise(function(s){if(typeof google<"u")return s();r[0].addEventListener("load",function(){return s()})});var i=new URL(n);i.searchParams.set("callback","__REACT_GOOGLE_AUTOCOMPLETE_CALLBACK__");var o=document.createElement("script");return o.src=i.toString(),new Promise(function(s){window.__REACT_GOOGLE_AUTOCOMPLETE_CALLBACK__=s,document.body.appendChild(o)})};cr.loadGoogleMapScript=jE;var zo={};Object.defineProperty(zo,"__esModule",{value:!0});zo.GOOGLE_MAP_SCRIPT_BASE_URL=void 0;var NE="https://maps.googleapis.com/maps/api/js";zo.GOOGLE_MAP_SCRIPT_BASE_URL=NE;function oo(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?oo=function(n){return typeof n}:oo=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},oo(t)}Object.defineProperty(Fo,"__esModule",{value:!0});Fo.default=$E;var vt=UE(u),hs=cr,BE=zo;function Ad(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(Ad=function(i){return i?n:e})(t)}function UE(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||oo(t)!=="object"&&typeof t!="function")return{default:t};var n=Ad(e);if(n&&n.has(t))return n.get(t);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(o!=="default"&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}return r.default=t,n&&n.set(t,r),r}function Zc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function qc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Zc(Object(n),!0).forEach(function(r){VE(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Zc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function VE(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function FE(t,e){if(t==null)return{};var n=zE(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function zE(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function $E(t){var e=t.ref,n=t.onPlaceSelected,r=t.apiKey,i=t.libraries,o=i===void 0?"places":i,s=t.inputAutocompleteValue,a=s===void 0?"new-password":s,l=t.options;l=l===void 0?{}:l;var c=l.types,f=c===void 0?["(cities)"]:c,d=l.componentRestrictions,p=l.fields,v=p===void 0?["address_components","geometry.location","place_id","formatted_address"]:p,g=l.bounds,h=FE(l,["types","componentRestrictions","fields","bounds"]),S=t.googleMapsScriptBaseUrl,L=S===void 0?BE.GOOGLE_MAP_SCRIPT_BASE_URL:S,b=t.language,y=(0,vt.useRef)(null),x=(0,vt.useRef)(null),E=(0,vt.useRef)(null),m=(0,vt.useRef)(null),w=b?"&language=".concat(b):"",_="".concat(L,"?libraries=").concat(o,"&key=").concat(r).concat(w),P=(0,vt.useCallback)(function(){return(0,hs.loadGoogleMapScript)(L,_)},[L,_]);return(0,vt.useEffect)(function(){var M=qc(qc({},h),{},{fields:v,types:f,bounds:g});if(d&&(M.componentRestrictions=d),!(E.current||!y.current||!hs.isBrowser)){e&&!e.current&&(e.current=y.current);var O=function(){var I;if(typeof google>"u")return console.error("Google has not been found. Make sure your provide apiKey prop.");if(!((I=google.maps)!==null&&I!==void 0&&I.places))return console.error("Google maps places API must be loaded.");if(!y.current instanceof HTMLInputElement)return console.error("Input ref must be HTMLInputElement.");E.current=new google.maps.places.Autocomplete(y.current,M),E.current&&(x.current=E.current.addListener("place_changed",function(){n&&E&&E.current&&n(E.current.getPlace(),y.current,E.current)}))};return r?P().then(function(){return O()}):O(),function(){return x.current?x.current.remove():void 0}}},[]),(0,vt.useEffect)(function(){var M;!(vt.default!==null&&vt.default!==void 0&&(M=vt.default.version)!==null&&M!==void 0&&M.startsWith("18"))&&hs.isBrowser&&window.MutationObserver&&y.current&&y.current instanceof HTMLInputElement&&(m.current=new MutationObserver(function(){m.current.disconnect(),y.current&&(y.current.autocomplete=a)}),m.current.observe(y.current,{attributes:!0,attributeFilter:["autocomplete"]}))},[a]),(0,vt.useEffect)(function(){E.current&&E.current.setFields(v)},[v]),(0,vt.useEffect)(function(){E.current&&E.current.setBounds(g)},[g]),(0,vt.useEffect)(function(){E.current&&E.current.setComponentRestrictions(d)},[d]),(0,vt.useEffect)(function(){E.current&&E.current.setOptions(h)},[h]),{ref:y,autocompleteRef:E}}function so(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?so=function(n){return typeof n}:so=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},so(t)}Object.defineProperty(Vo,"__esModule",{value:!0});Vo.default=void 0;var Qs=GE(u),We=Dd(IE),HE=Dd(Fo);function Dd(t){return t&&t.__esModule?t:{default:t}}function Id(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(Id=function(i){return i?n:e})(t)}function GE(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||so(t)!=="object"&&typeof t!="function")return{default:t};var n=Id(e);if(n&&n.has(t))return n.get(t);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(o!=="default"&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}return r.default=t,n&&n.set(t,r),r}function Oo(){return Oo=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Oo.apply(this,arguments)}function WE(t,e){if(t==null)return{};var n=ZE(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function ZE(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function jd(t){var e=t.onPlaceSelected,n=t.apiKey,r=t.libraries,i=t.inputAutocompleteValue,o=t.options,s=t.googleMapsScriptBaseUrl,a=t.refProp,l=t.language,c=WE(t,["onPlaceSelected","apiKey","libraries","inputAutocompleteValue","options","googleMapsScriptBaseUrl","refProp","language"]),f=(0,HE.default)({ref:a,googleMapsScriptBaseUrl:s,onPlaceSelected:e,apiKey:n,libraries:r,inputAutocompleteValue:i,options:o,language:l}),d=f.ref;return Qs.default.createElement("input",Oo({ref:d},c))}jd.propTypes={apiKey:We.default.string,libraries:We.default.arrayOf(We.default.string),ref:We.default.oneOfType([We.default.func,We.default.shape({current:We.default.any})]),googleMapsScriptBaseUrl:We.default.string,onPlaceSelected:We.default.func,inputAutocompleteValue:We.default.string,options:We.default.shape({componentRestrictions:We.default.object,bounds:We.default.object,location:We.default.object,offset:We.default.number,origin:We.default.object,radius:We.default.number,sessionToken:We.default.object,types:We.default.arrayOf(We.default.string)}),language:We.default.string};var qE=(0,Qs.forwardRef)(function(t,e){return Qs.default.createElement(jd,Oo({},t,{refProp:e}))});Vo.default=qE;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(t,"usePlacesWidget",{enumerable:!0,get:function(){return n.default}});var e=r(Vo),n=r(Fo);function r(i){return i&&i.__esModule?i:{default:i}}})(Md);var Nd=Md;const KE=t=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},de.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M14.617 16.032a9 9 0 1 1 1.414-1.414l3.676 3.675a1 1 0 0 1-1.414 1.414l-3.676-3.675ZM2 9a7 7 0 1 1 12.04 4.858 1.005 1.005 0 0 0-.182.182A7 7 0 0 1 2 9Z",clipRule:"evenodd"})),YE="Input-module__root__4cwtKq",JE="Input-module__endAdornment__Tv4vyT",XE="Input-module__input__qeMAQB",QE="Input-module__startAdornment__4bXzn1",e1="Input-module__label__N2eUZ2",t1="Input-module__inputContainer__Ticemx",qn={root:YE,endAdornment:JE,input:XE,startAdornment:QE,label:e1,inputContainer:t1},Bd=u.forwardRef(({label:t,className:e,startAdornment:n,endAdornment:r,onChange:i,onBlur:o,inputRef:s,...a},l)=>{const c=u.useRef(null);u.useImperativeHandle(l,()=>({focus:()=>{var d;(d=c.current)==null||d.focus()},blur:()=>{var d;(d=c.current)==null||d.blur()},setValue:d=>{if(i){i({target:{value:d}});return}if(o){o({target:{value:d}});return}c.current&&(c.current.value=d)}}),[o,i]);const f=_d(s,c);return C.jsxs("label",{className:Se(qn.root,e),children:[t&&C.jsx("span",{className:qn.label,children:t}),C.jsxs("div",{className:qn.inputContainer,children:[n&&C.jsx("div",{className:qn.startAdornment,children:n}),C.jsx("input",{...a,ref:f,className:qn.input,onChange:i,onBlur:o}),r&&C.jsx("div",{className:qn.endAdornment,children:r})]})]})}),n1=({className:t})=>{const{t:e}=jt("location_selector"),{country:n,inputs:r,onLocationSelect:i}=mt(),[o,s]=u.useState(""),[a,l]=u.useState(!1),c=Fe(w=>w.setBlurred),f=Fe(w=>w.setDetailsOpen),d=yn(w=>w.setPlace),p=bt(w=>w.setCourierPoint),v=It(w=>w.setSelectedPoint),g=[],h=n?{componentRestrictions:{country:n},types:g}:{types:g},S=w=>{d(w),i==null||i(w)},{ref:L}=Nd.usePlacesWidget({libraries:["places"],options:h,onPlaceSelected:S,inputAutocompleteValue:o}),b=w=>{a&&c(!!w.target.value),s(w.target.value)},y=()=>{o&&c(!0),f(!1),p(null),v(null),l(!0)},x=()=>{c(!1),l(!1)},E=w=>{w.key==="Enter"&&w.preventDefault()},m=_o(r==null?void 0:r.address);return C.jsx(Bd,{...m,inputRef:L,value:o,className:t,endAdornment:C.jsx(KE,{}),placeholder:e("placeholder"),onChange:b,onFocus:y,onBlur:x,onKeyDown:E})},r1=({className:t})=>Fe(n=>n.loaded)?C.jsx(n1,{className:t}):null,i1=u.memo(r1),o1="CourierDetailsModal-module__root__gLu0VW",s1={root:o1},a1=({onClose:t,onSubmit:e,location:n,className:r})=>C.jsx("div",{className:Se(s1.root,r),children:C.jsx(gd,{location:n,onClose:t,onSubmit:e})}),l1="LocationDetailsModal-module__root__AzUydF",c1={root:l1},u1=({onClose:t,onSubmit:e,location:n,className:r})=>{const i=()=>{e==null||e(n)};return C.jsx("div",{className:Se(c1.root,r),children:C.jsx(yd,{location:n,onClose:t,onSubmit:i})})},f1=()=>{const{onPointClick:t}=mt(),e=Fe(c=>c.detailsOpen),n=Fe(c=>c.setDetailsOpen),r=It(c=>c.location),i=It(c=>c.setSelectedPoint),o=bt(c=>c.courierPoint),s=bt(c=>c.setCourierPoint),a=u.useCallback(()=>{n(!1)},[n]),l=u.useCallback(c=>{t==null||t(c),n(!1),i(null),s(null)},[t,s,n,i]);return C.jsxs(C.Fragment,{children:[(o==null?void 0:o.address)&&e&&C.jsx(a1,{location:o,className:Ft.details,onClose:a,onSubmit:l}),r&&e&&C.jsx(u1,{location:r,className:Ft.details,onClose:a,onSubmit:l})]})},d1=({className:t,children:e})=>{const{hideFilters:n,hideSearchInput:r}=mt(),i=Fe(s=>s.blurred),o=Fe(s=>s.detailsOpen);return C.jsxs("div",{className:Se(Ft.root,t),children:[!r&&!o&&C.jsx(i1,{className:Ft.locationSelector}),!n&&C.jsx(kE,{}),C.jsx("div",{className:Se(Ft.mapWrapper,{[Ft.wrapperBlurred]:i}),children:e}),C.jsx(f1,{})]})},p1=u.memo(d1),h1="Aside-module__root__JSqCyF",g1="Aside-module__open__t8OMLZ",v1="Aside-module__overlay__0UAvMb",m1="Aside-module__container__KJNP0t",Vi={root:h1,open:g1,overlay:v1,container:m1},y1=({open:t,children:e,className:n})=>C.jsxs("div",{className:Se(Vi.root,n,{[Vi.open]:t}),children:[C.jsx("div",{className:Vi.overlay}),C.jsx("div",{className:Vi.container,children:e})]}),b1="LocationAside-module__submit__hx8LTK",w1="LocationAside-module__container__KEGf9s",S1="LocationAside-module__selector__ogsvtz",L1="LocationAside-module__label__-FWqoq",E1="LocationAside-module__header__qmaQaV",x1="LocationAside-module__close__bklFI7",Fi={submit:b1,container:w1,selector:S1,label:L1,header:E1,close:x1},C1=u.forwardRef((t,e)=>{const{t:n}=jt(["location_aside","common"]),{country:r,inputs:i,hideCloseButtonOnLocationScreen:o,onLocationSelect:s,onCloseLocationSelector:a}=mt(),l=u.useRef(null),c=yn(x=>x.setPlace),[f,d]=u.useState(""),p=uo(x=>x.open),v=uo(x=>x.toggle);u.useImperativeHandle(e,()=>({open:()=>v(!0),close:()=>v(!1)}),[v]);const g=x=>{v(!1),c(x),s==null||s(x),x!=null&&x.formatted_address&&d(x==null?void 0:x.formatted_address)},h=()=>{v(!1),a==null||a()},S=r?{componentRestrictions:{country:r}}:void 0,L=x=>{d(x.target.value)},{ref:b}=Nd.usePlacesWidget({libraries:["places"],options:S,onPlaceSelected:g,apiKey:"AIzaSyBO9gABz5DPTW3DcJuNCLx6Q7GmDYDRwRA",inputAutocompleteValue:f}),y=_o(i==null?void 0:i.city);return C.jsx(y1,{open:p,children:C.jsx("div",{ref:l,className:Fi.container,children:C.jsxs("div",{className:Fi.selector,children:[C.jsxs("div",{className:Fi.header,children:[C.jsx("div",{className:Fi.label,children:n("choose_city")}),!o&&C.jsx(fi,{position:"relative",onClick:h})]}),C.jsx(Bd,{...y,inputRef:b,value:f,placeholder:n("placeholder"),onChange:L})]})})})}),_1=u.memo(C1),O1=t=>{const e=Vp(["language"]);u.useEffect(()=>{t&&(e.changeLanguage(t),Co.setLanguage(t))},[t,e])},M1=t=>{u.useEffect(()=>{if(t){const e=Object.keys(t);for(const n of e){const r=t[n];r&&La(`--owl-color-${n}`,r)}}},[t])},P1=t=>{u.useEffect(()=>{t&&t!==void 0&&La("--owl-button-radius",`${t}px`)},[t])},k1=t=>{u.useEffect(()=>{t&&t!==void 0&&La("--font",t)},[t])},R1=t=>{const e=uo(r=>r.toggle),n=t==="selector";u.useEffect(()=>{n&&e(!0)},[n,e])},T1=(t,e,n,r)=>{const i=Fe(c=>c.map),o=Fe(c=>c.setLoaded),s=yn(c=>c.setPlace);u.useEffect(()=>{n&&i&&o()},[n,i,o]);const a=t[0],l=t[1];u.useEffect(()=>{if(!n||!i)return;const c=[a,l],f=async()=>{var p;const d=await si(c,"GEOMETRIC_CENTER");s((p=d.results)==null?void 0:p[0],oa)};if(r){f();return}ed(async d=>{var h;const{latitude:p,longitude:v}=d.coords,g=await si([p,v],"GEOMETRIC_CENTER");s((h=g.results)==null?void 0:h[0])},()=>f())},[n,a,l,i,s,e,r])},A1=({children:t,locale:e})=>(O1(e),C.jsx(C.Fragment,{children:t})),Ud=()=>C.jsx(Ca,{children:C.jsx(ei,{})}),D1=({children:t})=>{const e=zt(r=>r.loaded);return zt(r=>r.loading)&&!e?C.jsx(Ud,{}):C.jsx(C.Fragment,{children:t})};Co.setApiKey("AIzaSyBO9gABz5DPTW3DcJuNCLx6Q7GmDYDRwRA");const I1="Widget-module__map__GhmuPO",j1="Widget-module__sidebar__5gQrb3",N1="Widget-module__header__QlBK5m",gs={map:I1,sidebar:j1,header:N1},B1=({config:t,options:e})=>{const n=Nw(t),{map:r,font:i,radius:o,locale:s,palette:a,startScreen:l,hideHeader:c,hideFilters:f,disableGeolocation:d,INN:p}=n;Yt(p,"INN is required"),Bw(p,e),Yt(r==null?void 0:r.provider,"Map provider is required");const v=BL(r.provider);Ew(),k1(i),M1(a),P1(o),R1(l),Yt(s,"Locale is required");const g=u.useRef(s),{isLoaded:h}=ah({language:g.current,libraries:Vg,googleMapsApiKey:"AIzaSyBO9gABz5DPTW3DcJuNCLx6Q7GmDYDRwRA"});return Yt(r.center,"Map center is required"),Yt(r.initialZoom,"Map initial zoom is required"),T1(r==null?void 0:r.center,r.initialZoom,h,d),C.jsx(Ip,{tolgee:cg,fallback:C.jsx(Ud,{}),children:C.jsx(A1,{locale:s,children:C.jsx(Ru.Provider,{value:n,children:C.jsx(mv,{children:C.jsxs(D1,{children:[!c&&C.jsx(fv,{className:gs.header}),!f&&C.jsx(bE,{className:gs.sidebar}),C.jsx(p1,{className:gs.map,children:C.jsx(v,{})}),C.jsx(_1,{})]})})})})})},Vd=async t=>oi.request({baseURL:"https://api.geo-data.omnic.solutions/api/1.0/",method:"POST",url:"normalize/address",data:t,headers:{Authorization:"Token 9877f9631b2e30570cc1c5aa8c740b0c912efe99a8b6c45c21cf4bd394adc7e9"}});exports.EReceiveFilter=At;exports.ESendFilter=Dt;exports.ETypeFilter=qt;exports.Widget=B1;exports.fetchPointsRequest=Ks;exports.getNormalizedAddress=Vd;
|
|
100
|
+
`):" "+Cc(o[0]):"as no adapter specified";throw new Ee("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:Ws};function us(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ui(null,t)}function _c(t){return us(t),t.headers=Qt.from(t.headers),t.data=cs.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),qf.getAdapter(t.adapter||ba.adapter)(t).then(function(r){return us(t),r.data=cs.call(t,t.transformResponse,r),r.headers=Qt.from(r.headers),r},function(r){return Wf(r)||(us(t),r&&r.response&&(r.response.data=cs.call(t,t.transformResponse,r.response),r.response.headers=Qt.from(r.response.headers))),Promise.reject(r)})}const Oc=t=>t instanceof Qt?t.toJSON():t;function lr(t,e){e=e||{};const n={};function r(c,f,d){return j.isPlainObject(c)&&j.isPlainObject(f)?j.merge.call({caseless:d},c,f):j.isPlainObject(f)?j.merge({},f):j.isArray(f)?f.slice():f}function i(c,f,d){if(j.isUndefined(f)){if(!j.isUndefined(c))return r(void 0,c,d)}else return r(c,f,d)}function o(c,f){if(!j.isUndefined(f))return r(void 0,f)}function s(c,f){if(j.isUndefined(f)){if(!j.isUndefined(c))return r(void 0,c)}else return r(void 0,f)}function a(c,f,d){if(d in e)return r(c,f);if(d in t)return r(void 0,c)}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(c,f)=>i(Oc(c),Oc(f),!0)};return j.forEach(Object.keys(Object.assign({},t,e)),function(f){const d=l[f]||i,p=d(t[f],e[f],f);j.isUndefined(p)&&d!==a||(n[f]=p)}),n}const Kf="1.6.0",wa={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{wa[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const Mc={};wa.transitional=function(e,n,r){function i(o,s){return"[Axios v"+Kf+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,a)=>{if(e===!1)throw new Ee(i(s," has been removed"+(n?" in "+n:"")),Ee.ERR_DEPRECATED);return n&&!Mc[s]&&(Mc[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(o,s,a):!0}};function uw(t,e,n){if(typeof t!="object")throw new Ee("options must be an object",Ee.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const o=r[i],s=e[o];if(s){const a=t[o],l=a===void 0||s(a,o,t);if(l!==!0)throw new Ee("option "+o+" must be "+l,Ee.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ee("Unknown option "+o,Ee.ERR_BAD_OPTION)}}const Zs={assertOptions:uw,validators:wa},rn=Zs.validators;class xo{constructor(e){this.defaults=e,this.interceptors={request:new Ec,response:new Ec}}request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=lr(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Zs.assertOptions(r,{silentJSONParsing:rn.transitional(rn.boolean),forcedJSONParsing:rn.transitional(rn.boolean),clarifyTimeoutError:rn.transitional(rn.boolean)},!1),i!=null&&(j.isFunction(i)?n.paramsSerializer={serialize:i}:Zs.assertOptions(i,{encode:rn.function,serialize:rn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&j.merge(o.common,o[n.method]);o&&j.forEach(["delete","get","head","post","put","patch","common"],g=>{delete o[g]}),n.headers=Qt.concat(s,o);const a=[];let l=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(l=l&&h.synchronous,a.unshift(h.fulfilled,h.rejected))});const c=[];this.interceptors.response.forEach(function(h){c.push(h.fulfilled,h.rejected)});let f,d=0,p;if(!l){const g=[_c.bind(this),void 0];for(g.unshift.apply(g,a),g.push.apply(g,c),p=g.length,f=Promise.resolve(n);d<p;)f=f.then(g[d++],g[d++]);return f}p=a.length;let v=n;for(d=0;d<p;){const g=a[d++],h=a[d++];try{v=g(v)}catch(S){h.call(this,S);break}}try{f=_c.call(this,v)}catch(g){return Promise.reject(g)}for(d=0,p=c.length;d<p;)f=f.then(c[d++],c[d++]);return f}getUri(e){e=lr(this.defaults,e);const n=Zf(e.baseURL,e.url);return $f(n,e.params,e.paramsSerializer)}}j.forEach(["delete","get","head","options"],function(e){xo.prototype[e]=function(n,r){return this.request(lr(r||{},{method:e,url:n,data:(r||{}).data}))}});j.forEach(["post","put","patch"],function(e){function n(r){return function(o,s,a){return this.request(lr(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}xo.prototype[e]=n(),xo.prototype[e+"Form"]=n(!0)});const eo=xo;class Sa{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{r.subscribe(a),o=a}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},e(function(o,s,a){r.reason||(r.reason=new ui(o,s,a),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)}static source(){let e;return{token:new Sa(function(i){e=i}),cancel:e}}}const fw=Sa;function dw(t){return function(n){return t.apply(null,n)}}function pw(t){return j.isObject(t)&&t.isAxiosError===!0}const qs={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(qs).forEach(([t,e])=>{qs[e]=t});const hw=qs;function Jf(t){const e=new eo(t),n=Rf(eo.prototype.request,e);return j.extend(n,eo.prototype,e,{allOwnKeys:!0}),j.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return Jf(lr(t,i))},n}const Ke=Jf(ba);Ke.Axios=eo;Ke.CanceledError=ui;Ke.CancelToken=fw;Ke.isCancel=Wf;Ke.VERSION=Kf;Ke.toFormData=No;Ke.AxiosError=Ee;Ke.Cancel=Ke.CanceledError;Ke.all=function(e){return Promise.all(e)};Ke.spread=dw;Ke.isAxiosError=pw;Ke.mergeConfig=lr;Ke.AxiosHeaders=Qt;Ke.formToJSON=t=>Gf(j.isHTMLForm(t)?new FormData(t):t);Ke.getAdapter=qf.getAdapter;Ke.HttpStatusCode=hw;Ke.default=Ke;const gw=Ke,oi=gw.create({baseURL:"https://ecomgate.omnic.solutions/api/1.0.0/type-1/public/"}),vw=512;var qt=(t=>(t[t.All=0]="All",t[t.PickPoint=20]="PickPoint",t[t.PostOffice=30]="PostOffice",t))(qt||{}),At=(t=>(t[t.PayByCash=0]="PayByCash",t[t.DressingRoom=1]="DressingRoom",t[t.CheckOrder=2]="CheckOrder",t))(At||{}),Dt=(t=>(t[t.Return=0]="Return",t[t.Payment=1]="Payment",t[t.Shipping=2]="Shipping",t))(Dt||{});const mw={[At.CheckOrder]:["is_check_order","is_delivery"],[At.DressingRoom]:["is_dressing_room","is_delivery"],[At.PayByCash]:["pay_by_cash","pay_by_card","is_delivery"]},yw={[Dt.Return]:["is_pickup"],[Dt.Shipping]:["is_pickup"],[Dt.Payment]:["pay_by_cash","pay_by_card","is_pickup"]};async function*Ks({q:t,filter:e,bounds:n}={},{controller:r}={}){const i={status:30,page_size:vw};if(t&&(i.q=t),e!=null&&e.type&&(i.type=e.type),e!=null&&e.receive)for(const[l,c]of Object.entries(e==null?void 0:e.receive)){if(!c)continue;const f=mw[l];for(const d of f)i[d]=!0}if(e!=null&&e.send)for(const[l,c]of Object.entries(e==null?void 0:e.send)){if(!c)continue;const f=yw[l];for(const d of f)i[d]=!0}n&&(i.start_latitude=n[0][0],i.end_latitude=n[0][1],i.start_longitude=n[1][0],i.end_longitude=n[1][1]);let o=await oi.get("/locations/points",{params:i,signal:r==null?void 0:r.signal}),s=o.data.data.num_pages,a=o.data.data.current_page;for(;a<s;){yield o,i.page=a+1;const l=await oi.get("/locations/points",{params:i,signal:r==null?void 0:r.signal});o.data.data.results=[...o.data.data.results,...l.data.data.results],o=l,a=l.data.data.current_page,s=l.data.data.num_pages}return yield o,o}const Pc=[],kc=(t,e,n)=>{var i;const r=new AbortController;return t&&((i=Pc.pop())==null||i.abort()),Pc.push(r),async o=>{const s={controller:r};if(!n){const l=await Ks({filter:e},s).next();o(l.value.data);return}for await(const a of Ks({filter:e,bounds:n},s))o(a.data)}},Yf=":root",Ea=(t,e)=>{var n;(n=document.querySelector(Yf))==null||n.style.setProperty(t,e)},Rc=t=>{t.stopImmediatePropagation()};var Qf={},Xf={exports:{}};(function(t){var e=function(n){var r=Object.prototype,i=r.hasOwnProperty,o=Object.defineProperty||function(A,R,T){A[R]=T.value},s,a=typeof Symbol=="function"?Symbol:{},l=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",f=a.toStringTag||"@@toStringTag";function d(A,R,T){return Object.defineProperty(A,R,{value:T,enumerable:!0,configurable:!0,writable:!0}),A[R]}try{d({},"")}catch{d=function(R,T,V){return R[T]=V}}function p(A,R,T,V){var z=R&&R.prototype instanceof y?R:y,$=Object.create(z.prototype),X=new Z(V||[]);return o($,"_invoke",{value:k(A,T,X)}),$}n.wrap=p;function v(A,R,T){try{return{type:"normal",arg:A.call(R,T)}}catch(V){return{type:"throw",arg:V}}}var g="suspendedStart",h="suspendedYield",S="executing",E="completed",b={};function y(){}function x(){}function L(){}var m={};d(m,l,function(){return this});var w=Object.getPrototypeOf,_=w&&w(w(F([])));_&&_!==r&&i.call(_,l)&&(m=_);var P=L.prototype=y.prototype=Object.create(m);x.prototype=L,o(P,"constructor",{value:L,configurable:!0}),o(L,"constructor",{value:x,configurable:!0}),x.displayName=d(L,f,"GeneratorFunction");function M(A){["next","throw","return"].forEach(function(R){d(A,R,function(T){return this._invoke(R,T)})})}n.isGeneratorFunction=function(A){var R=typeof A=="function"&&A.constructor;return R?R===x||(R.displayName||R.name)==="GeneratorFunction":!1},n.mark=function(A){return Object.setPrototypeOf?Object.setPrototypeOf(A,L):(A.__proto__=L,d(A,f,"GeneratorFunction")),A.prototype=Object.create(P),A},n.awrap=function(A){return{__await:A}};function O(A,R){function T($,X,N,D){var W=v(A[$],A,X);if(W.type==="throw")D(W.arg);else{var q=W.arg,te=q.value;return te&&typeof te=="object"&&i.call(te,"__await")?R.resolve(te.__await).then(function(re){T("next",re,N,D)},function(re){T("throw",re,N,D)}):R.resolve(te).then(function(re){q.value=re,N(q)},function(re){return T("throw",re,N,D)})}}var V;function z($,X){function N(){return new R(function(D,W){T($,X,D,W)})}return V=V?V.then(N,N):N()}o(this,"_invoke",{value:z})}M(O.prototype),d(O.prototype,c,function(){return this}),n.AsyncIterator=O,n.async=function(A,R,T,V,z){z===void 0&&(z=Promise);var $=new O(p(A,R,T,V),z);return n.isGeneratorFunction(R)?$:$.next().then(function(X){return X.done?X.value:$.next()})};function k(A,R,T){var V=g;return function($,X){if(V===S)throw new Error("Generator is already running");if(V===E){if($==="throw")throw X;return K()}for(T.method=$,T.arg=X;;){var N=T.delegate;if(N){var D=I(N,T);if(D){if(D===b)continue;return D}}if(T.method==="next")T.sent=T._sent=T.arg;else if(T.method==="throw"){if(V===g)throw V=E,T.arg;T.dispatchException(T.arg)}else T.method==="return"&&T.abrupt("return",T.arg);V=S;var W=v(A,R,T);if(W.type==="normal"){if(V=T.done?E:h,W.arg===b)continue;return{value:W.arg,done:T.done}}else W.type==="throw"&&(V=E,T.method="throw",T.arg=W.arg)}}}function I(A,R){var T=R.method,V=A.iterator[T];if(V===s)return R.delegate=null,T==="throw"&&A.iterator.return&&(R.method="return",R.arg=s,I(A,R),R.method==="throw")||T!=="return"&&(R.method="throw",R.arg=new TypeError("The iterator does not provide a '"+T+"' method")),b;var z=v(V,A.iterator,R.arg);if(z.type==="throw")return R.method="throw",R.arg=z.arg,R.delegate=null,b;var $=z.arg;if(!$)return R.method="throw",R.arg=new TypeError("iterator result is not an object"),R.delegate=null,b;if($.done)R[A.resultName]=$.value,R.next=A.nextLoc,R.method!=="return"&&(R.method="next",R.arg=s);else return $;return R.delegate=null,b}M(P),d(P,f,"Generator"),d(P,l,function(){return this}),d(P,"toString",function(){return"[object Generator]"});function B(A){var R={tryLoc:A[0]};1 in A&&(R.catchLoc=A[1]),2 in A&&(R.finallyLoc=A[2],R.afterLoc=A[3]),this.tryEntries.push(R)}function H(A){var R=A.completion||{};R.type="normal",delete R.arg,A.completion=R}function Z(A){this.tryEntries=[{tryLoc:"root"}],A.forEach(B,this),this.reset(!0)}n.keys=function(A){var R=Object(A),T=[];for(var V in R)T.push(V);return T.reverse(),function z(){for(;T.length;){var $=T.pop();if($ in R)return z.value=$,z.done=!1,z}return z.done=!0,z}};function F(A){if(A){var R=A[l];if(R)return R.call(A);if(typeof A.next=="function")return A;if(!isNaN(A.length)){var T=-1,V=function z(){for(;++T<A.length;)if(i.call(A,T))return z.value=A[T],z.done=!1,z;return z.value=s,z.done=!0,z};return V.next=V}}return{next:K}}n.values=F;function K(){return{value:s,done:!0}}return Z.prototype={constructor:Z,reset:function(A){if(this.prev=0,this.next=0,this.sent=this._sent=s,this.done=!1,this.delegate=null,this.method="next",this.arg=s,this.tryEntries.forEach(H),!A)for(var R in this)R.charAt(0)==="t"&&i.call(this,R)&&!isNaN(+R.slice(1))&&(this[R]=s)},stop:function(){this.done=!0;var A=this.tryEntries[0],R=A.completion;if(R.type==="throw")throw R.arg;return this.rval},dispatchException:function(A){if(this.done)throw A;var R=this;function T(D,W){return $.type="throw",$.arg=A,R.next=D,W&&(R.method="next",R.arg=s),!!W}for(var V=this.tryEntries.length-1;V>=0;--V){var z=this.tryEntries[V],$=z.completion;if(z.tryLoc==="root")return T("end");if(z.tryLoc<=this.prev){var X=i.call(z,"catchLoc"),N=i.call(z,"finallyLoc");if(X&&N){if(this.prev<z.catchLoc)return T(z.catchLoc,!0);if(this.prev<z.finallyLoc)return T(z.finallyLoc)}else if(X){if(this.prev<z.catchLoc)return T(z.catchLoc,!0)}else if(N){if(this.prev<z.finallyLoc)return T(z.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(A,R){for(var T=this.tryEntries.length-1;T>=0;--T){var V=this.tryEntries[T];if(V.tryLoc<=this.prev&&i.call(V,"finallyLoc")&&this.prev<V.finallyLoc){var z=V;break}}z&&(A==="break"||A==="continue")&&z.tryLoc<=R&&R<=z.finallyLoc&&(z=null);var $=z?z.completion:{};return $.type=A,$.arg=R,z?(this.method="next",this.next=z.finallyLoc,b):this.complete($)},complete:function(A,R){if(A.type==="throw")throw A.arg;return A.type==="break"||A.type==="continue"?this.next=A.arg:A.type==="return"?(this.rval=this.arg=A.arg,this.method="return",this.next="end"):A.type==="normal"&&R&&(this.next=R),b},finish:function(A){for(var R=this.tryEntries.length-1;R>=0;--R){var T=this.tryEntries[R];if(T.finallyLoc===A)return this.complete(T.completion,T.afterLoc),H(T),b}},catch:function(A){for(var R=this.tryEntries.length-1;R>=0;--R){var T=this.tryEntries[R];if(T.tryLoc===A){var V=T.completion;if(V.type==="throw"){var z=V.arg;H(T)}return z}}throw new Error("illegal catch attempt")},delegateYield:function(A,R,T){return this.delegate={iterator:F(A),resultName:R,nextLoc:T},this.method==="next"&&(this.arg=s),b}},n}(t.exports);try{regeneratorRuntime=e}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}})(Xf);var bw=Xf.exports;(function(t){var e=bw;function n(g,h,S,E,b,y,x){try{var L=g[y](x),m=L.value}catch(w){return void S(w)}L.done?h(m):Promise.resolve(m).then(E,b)}function r(g){return function(){var h=this,S=arguments;return new Promise(function(E,b){var y=g.apply(h,S);function x(m){n(y,E,b,x,L,"next",m)}function L(m){n(y,E,b,x,L,"throw",m)}x(void 0)})}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=!1,o=null,s="en",a=null,l=null,c="https://maps.googleapis.com/maps/api/geocode/json";function f(g){var h=arguments.length>1&&arguments[1]!==void 0&&arguments[1];i&&(h?console.warn(g):console.log(g))}function d(g){return p.apply(this,arguments)}function p(){return(p=r(e.mark(function g(h){var S,E;return e.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,fetch(h).catch(function(){return Promise.reject(new Error("Error fetching data"))});case 2:return S=b.sent,b.next=5,S.json().catch(function(){return f("Error parsing server response"),Promise.reject(new Error("Error parsing server response"))});case 5:if((E=b.sent).status!=="OK"){b.next=9;break}return f(E),b.abrupt("return",E);case 9:return f("".concat(E.error_message,`.
|
|
101
|
+
Server returned status code `).concat(E.status),!0),b.abrupt("return",Promise.reject(new Error("".concat(E.error_message,`.
|
|
102
|
+
Server returned status code `).concat(E.status))));case 11:case"end":return b.stop()}},g)}))).apply(this,arguments)}var v={setApiKey:function(g){o=g},setLanguage:function(g){s=g},setRegion:function(g){a=g},setLocationType:function(g){l=g},enableDebug:function(){var g=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];i=g},fromLatLng:function(g,h,S,E,b,y){return r(e.mark(function x(){var L,m;return e.wrap(function(w){for(;;)switch(w.prev=w.next){case 0:if(g&&h){w.next=3;break}return f("Provided coordinates are invalid",!0),w.abrupt("return",Promise.reject(new Error("Provided coordinates are invalid")));case 3:return L="".concat(g,",").concat(h),m="".concat(c,"?latlng=").concat(encodeURIComponent(L)),(S||o)&&(m+="&key=".concat(o=S||o)),(E||s)&&(m+="&language=".concat(s=E||s)),(b||a)&&(a=b||a,m+="®ion=".concat(encodeURIComponent(a))),(y||l)&&(l=y||l,m+="&location_type=".concat(encodeURIComponent(l))),w.abrupt("return",d(m));case 9:case"end":return w.stop()}},x)}))()},fromAddress:function(g,h,S,E){return r(e.mark(function b(){var y;return e.wrap(function(x){for(;;)switch(x.prev=x.next){case 0:if(g){x.next=3;break}return f("Provided address is invalid",!0),x.abrupt("return",Promise.reject(new Error("Provided address is invalid")));case 3:return y="".concat(c,"?address=").concat(encodeURIComponent(g)),(h||o)&&(y+="&key=".concat(o=h||o)),(S||s)&&(y+="&language=".concat(s=S||s)),(E||a)&&(a=E||a,y+="®ion=".concat(encodeURIComponent(a))),x.abrupt("return",d(y));case 8:case"end":return x.stop()}},b)}))()}};t.default=v})(Qf);const Co=Mo(Qf),si=async(t,e="ROOFTOP")=>{var i;Co.setLocationType(e);const n=await Co.fromLatLng(t[0].toString(),t[1].toString()),r=(i=n.results)==null?void 0:i.map(o=>{var l,c;const s=(l=o.geometry)==null?void 0:l.viewport,a=(c=o.geometry)==null?void 0:c.location;return{...o,geometry:{...o.geometry,viewport:new google.maps.LatLngBounds(s.southwest,s.northeast),location:new google.maps.LatLng(a)}}});return{...n,results:r}},ed=(t,e)=>{if(!navigator.geolocation){e==null||e(new GeolocationPositionError),console.error("Geolocation is not supported by your browser");return}navigator.geolocation.getCurrentPosition(t,e,{maximumAge:6e4,timeout:5e3,enableHighAccuracy:!0})},ww=t=>t.status===200,td=t=>{const e=document.querySelector(Yf);return e?getComputedStyle(e).getPropertyValue(t):null},un=t=>{const e=new Blob([t],{type:"image/svg+xml;charset=utf-8"});return URL.createObjectURL(e)},Pt=(t,e)=>t.replaceAll("currentColor",td(e)||""),Sw={points:[],error:!1,loaded:!1,loading:!1,reloading:!1},zt=mn()((t,e)=>({...Sw,async loadNext(n,r){const i=e().reloading;t({error:!1,reloading:!0}),Fe.getState().setBounds(n);let o=0;try{await kc(i,r,n)(a=>{t(o===0?{points:a.data.results}:{points:[...e().points,...a.data.results]}),o++})}catch{t({error:!0})}finally{t({reloading:!1})}},async loadFirst(n){const r=e().loading,i=Fe.getState().bounds;t({error:!1,loading:!0});let o=0;try{await kc(r,n,i)(a=>{o>=1&&t({loading:!1,loaded:!0}),t(o===0?{points:a.data.results}:{points:[...e().points,...a.data.results]}),o++}),t({loading:!1,loaded:!0})}catch{t({error:!0,loading:!1})}finally{t({loading:!1})}}})),Ew={query:"",type:qt.All,hours:["08:00","22:00"],send:{[Dt.Return]:!1,[Dt.Payment]:!1,[Dt.Shipping]:!1},receive:{[At.PayByCash]:!1,[At.CheckOrder]:!1,[At.DressingRoom]:!1}},Nn=mn(t=>({...Ew,setFilter(e){Fe.getState().setDetailsOpen(!1),bt.getState().setCourierPoint(null),It.getState().setSelectedPoint(null),t(e)}})),Lw=()=>{u.useEffect(()=>{zt.getState().loadFirst();const t=Nn.subscribe(e=>{zt.getState().loadFirst(e)});return()=>{t()}},[])},kr=".",La=Symbol("target"),nd=Symbol("unsubscribe");function Js(t){return t instanceof Date||t instanceof Set||t instanceof Map||t instanceof WeakSet||t instanceof WeakMap||ArrayBuffer.isView(t)}function xw(t){return(typeof t=="object"?t===null:typeof t!="function")||t instanceof RegExp}const Ut=Array.isArray;function xa(t){return typeof t=="symbol"}const Et={after:(t,e)=>Ut(t)?t.slice(e.length):e===""?t:t.slice(e.length+1),concat:(t,e)=>Ut(t)?(t=[...t],e&&t.push(e),t):e&&e.toString!==void 0?(t!==""&&(t+=kr),xa(e)?t+e.toString():t+e):t,initial:t=>{if(Ut(t))return t.slice(0,-1);if(t==="")return t;const e=t.lastIndexOf(kr);return e===-1?"":t.slice(0,e)},last:t=>{if(Ut(t))return t[t.length-1]||"";if(t==="")return t;const e=t.lastIndexOf(kr);return e===-1?t:t.slice(e+1)},walk:(t,e)=>{if(Ut(t))for(const n of t)e(n);else if(t!==""){let n=0,r=t.indexOf(kr);if(r===-1)e(t);else for(;n<t.length;)r===-1&&(r=t.length),e(t.slice(n,r)),n=r+1,r=t.indexOf(kr,n)}},get(t,e){return this.walk(e,n=>{t&&(t=t[n])}),t}};function Cw(t){return typeof t=="object"&&typeof t.next=="function"}function _w(t,e,n,r,i){const o=t.next;if(e.name==="entries")t.next=function(){const s=o.call(this);return s.done===!1&&(s.value[0]=i(s.value[0],e,s.value[0],r),s.value[1]=i(s.value[1],e,s.value[0],r)),s};else if(e.name==="values"){const s=n[La].keys();t.next=function(){const a=o.call(this);return a.done===!1&&(a.value=i(a.value,e,s.next().value,r)),a}}else t.next=function(){const s=o.call(this);return s.done===!1&&(s.value=i(s.value,e,s.value,r)),s};return t}function Tc(t,e,n){return t.isUnsubscribed||e.ignoreSymbols&&xa(n)||e.ignoreUnderscores&&n.charAt(0)==="_"||"ignoreKeys"in e&&e.ignoreKeys.includes(n)}class Ow{constructor(e){this._equals=e,this._proxyCache=new WeakMap,this._pathCache=new WeakMap,this.isUnsubscribed=!1}_getDescriptorCache(){return this._descriptorCache===void 0&&(this._descriptorCache=new WeakMap),this._descriptorCache}_getProperties(e){const n=this._getDescriptorCache();let r=n.get(e);return r===void 0&&(r={},n.set(e,r)),r}_getOwnPropertyDescriptor(e,n){if(this.isUnsubscribed)return Reflect.getOwnPropertyDescriptor(e,n);const r=this._getProperties(e);let i=r[n];return i===void 0&&(i=Reflect.getOwnPropertyDescriptor(e,n),r[n]=i),i}getProxy(e,n,r,i){if(this.isUnsubscribed)return e;const o=e[i],s=o||e;this._pathCache.set(s,n);let a=this._proxyCache.get(s);return a===void 0&&(a=o===void 0?new Proxy(e,r):e,this._proxyCache.set(s,a)),a}getPath(e){return this.isUnsubscribed?void 0:this._pathCache.get(e)}isDetached(e,n){return!Object.is(e,Et.get(n,this.getPath(e)))}defineProperty(e,n,r){return Reflect.defineProperty(e,n,r)?(this.isUnsubscribed||(this._getProperties(e)[n]=r),!0):!1}setProperty(e,n,r,i,o){if(!this._equals(o,r)||!(n in e)){const s=this._getOwnPropertyDescriptor(e,n);return s!==void 0&&"set"in s?Reflect.set(e,n,r,i):Reflect.set(e,n,r)}return!0}deleteProperty(e,n,r){if(Reflect.deleteProperty(e,n)){if(!this.isUnsubscribed){const i=this._getDescriptorCache().get(e);i&&(delete i[n],this._pathCache.delete(r))}return!0}return!1}isSameDescriptor(e,n,r){const i=this._getOwnPropertyDescriptor(n,r);return e!==void 0&&i!==void 0&&Object.is(e.value,i.value)&&(e.writable||!1)===(i.writable||!1)&&(e.enumerable||!1)===(i.enumerable||!1)&&(e.configurable||!1)===(i.configurable||!1)&&e.get===i.get&&e.set===i.set}isGetInvariant(e,n){const r=this._getOwnPropertyDescriptor(e,n);return r!==void 0&&r.configurable!==!0&&r.writable!==!0}unsubscribe(){this._descriptorCache=null,this._pathCache=null,this._proxyCache=null,this.isUnsubscribed=!0}}function Ys(t){return toString.call(t)==="[object Object]"}function ji(){return!0}function Zn(t,e){return t.length!==e.length||t.some((n,r)=>e[r]!==n)}const rd=new Set(["hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Mw=new Set(["concat","includes","indexOf","join","keys","lastIndexOf"]),id={push:ji,pop:ji,shift:ji,unshift:ji,copyWithin:Zn,reverse:Zn,sort:Zn,splice:Zn,flat:Zn,fill:Zn},Pw=new Set([...rd,...Mw,...Object.keys(id)]);function Ni(t,e){if(t.size!==e.size)return!0;for(const n of t)if(!e.has(n))return!0;return!1}const od=["keys","values","entries"],sd=new Set(["has","toString"]),ad={add:Ni,clear:Ni,delete:Ni,forEach:Ni},kw=new Set([...sd,...Object.keys(ad),...od]);function Bi(t,e){if(t.size!==e.size)return!0;let n;for(const[r,i]of t)if(n=e.get(r),n!==i||n===void 0&&!e.has(r))return!0;return!1}const Rw=new Set([...sd,"get"]),ld={set:Bi,clear:Bi,delete:Bi,forEach:Bi},Tw=new Set([...Rw,...Object.keys(ld),...od]);class vn{constructor(e,n,r,i){this._path=n,this._isChanged=!1,this._clonedCache=new Set,this._hasOnValidate=i,this._changes=i?[]:null,this.clone=n===void 0?e:this._shallowClone(e)}static isHandledMethod(e){return rd.has(e)}_shallowClone(e){let n=e;if(Ys(e))n={...e};else if(Ut(e)||ArrayBuffer.isView(e))n=[...e];else if(e instanceof Date)n=new Date(e);else if(e instanceof Set)n=new Set([...e].map(r=>this._shallowClone(r)));else if(e instanceof Map){n=new Map;for(const[r,i]of e.entries())n.set(r,this._shallowClone(i))}return this._clonedCache.add(n),n}preferredThisArg(e,n,r,i){return e?(Ut(i)?this._onIsChanged=id[n]:i instanceof Set?this._onIsChanged=ad[n]:i instanceof Map&&(this._onIsChanged=ld[n]),i):r}update(e,n,r){const i=Et.after(e,this._path);if(n!=="length"){let o=this.clone;Et.walk(i,s=>{o&&o[s]&&(this._clonedCache.has(o[s])||(o[s]=this._shallowClone(o[s])),o=o[s])}),this._hasOnValidate&&this._changes.push({path:i,property:n,previous:r}),o&&o[n]&&(o[n]=r)}this._isChanged=!0}undo(e){let n;for(let r=this._changes.length-1;r!==-1;r--)n=this._changes[r],Et.get(e,n.path)[n.property]=n.previous}isChanged(e){return this._onIsChanged===void 0?this._isChanged:this._onIsChanged(this.clone,e)}}class Ac extends vn{static isHandledMethod(e){return Pw.has(e)}}class Aw extends vn{undo(e){e.setTime(this.clone.getTime())}isChanged(e,n){return!n(this.clone.valueOf(),e.valueOf())}}class Dc extends vn{static isHandledMethod(e){return kw.has(e)}undo(e){for(const n of this.clone)e.add(n);for(const n of e)this.clone.has(n)||e.delete(n)}}class Ic extends vn{static isHandledMethod(e){return Tw.has(e)}undo(e){for(const[n,r]of this.clone.entries())e.set(n,r);for(const n of e.keys())this.clone.has(n)||e.delete(n)}}class Dw extends vn{constructor(e,n,r,i){super(void 0,n,r,i),this._arg1=r[0],this._weakValue=e.has(this._arg1)}isChanged(e){return this._weakValue!==e.has(this._arg1)}undo(e){this._weakValue&&!e.has(this._arg1)?e.add(this._arg1):e.delete(this._arg1)}}class Iw extends vn{constructor(e,n,r,i){super(void 0,n,r,i),this._weakKey=r[0],this._weakHas=e.has(this._weakKey),this._weakValue=e.get(this._weakKey)}isChanged(e){return this._weakValue!==e.get(this._weakKey)}undo(e){const n=e.has(this._weakKey);this._weakHas&&!n?e.set(this._weakKey,this._weakValue):!this._weakHas&&n?e.delete(this._weakKey):this._weakValue!==e.get(this._weakKey)&&e.set(this._weakKey,this._weakValue)}}class kn{constructor(e){this._stack=[],this._hasOnValidate=e}static isHandledType(e){return Ys(e)||Ut(e)||Js(e)}static isHandledMethod(e,n){return Ys(e)?vn.isHandledMethod(n):Ut(e)?Ac.isHandledMethod(n):e instanceof Set?Dc.isHandledMethod(n):e instanceof Map?Ic.isHandledMethod(n):Js(e)}get isCloning(){return this._stack.length>0}start(e,n,r){let i=vn;Ut(e)?i=Ac:e instanceof Date?i=Aw:e instanceof Set?i=Dc:e instanceof Map?i=Ic:e instanceof WeakSet?i=Dw:e instanceof WeakMap&&(i=Iw),this._stack.push(new i(e,n,r,this._hasOnValidate))}update(e,n,r){this._stack[this._stack.length-1].update(e,n,r)}preferredThisArg(e,n,r){const{name:i}=e,o=kn.isHandledMethod(r,i);return this._stack[this._stack.length-1].preferredThisArg(o,i,n,r)}isChanged(e,n,r){return this._stack[this._stack.length-1].isChanged(e,n,r)}undo(e){this._previousClone!==void 0&&this._previousClone.undo(e)}stop(){return this._previousClone=this._stack.pop(),this._previousClone.clone}}const jw={equals:Object.is,isShallow:!1,pathAsArray:!1,ignoreSymbols:!1,ignoreUnderscores:!1,ignoreDetached:!1,details:!1},Kr=(t,e,n={})=>{n={...jw,...n};const r=Symbol("ProxyTarget"),{equals:i,isShallow:o,ignoreDetached:s,details:a}=n,l=new Ow(i),c=typeof n.onValidate=="function",f=new kn(c),d=(b,y,x,L,m)=>!c||f.isCloning||n.onValidate(Et.concat(l.getPath(b),y),x,L,m)===!0,p=(b,y,x,L)=>{!Tc(l,n,y)&&!(s&&l.isDetached(b,t))&&v(l.getPath(b),y,x,L)},v=(b,y,x,L,m)=>{f.isCloning?f.update(b,y,L):e(Et.concat(b,y),x,L,m)},g=b=>b&&(b[r]||b),h=(b,y,x,L)=>xw(b)||x==="constructor"||o&&!kn.isHandledMethod(y,x)||Tc(l,n,x)||l.isGetInvariant(y,x)||s&&l.isDetached(y,t)?b:(L===void 0&&(L=l.getPath(y)),l.getProxy(b,Et.concat(L,x),S,r)),S={get(b,y,x){if(xa(y)){if(y===r||y===La)return b;if(y===nd&&!l.isUnsubscribed&&l.getPath(b).length===0)return l.unsubscribe(),b}const L=Js(b)?Reflect.get(b,y):Reflect.get(b,y,x);return h(L,b,y)},set(b,y,x,L){x=g(x);const m=b[r]||b,w=m[y];if(i(w,x)&&y in b)return!0;const _=d(b,y,x,w);return _&&l.setProperty(m,y,x,L,w)?(p(b,y,b[y],w),!0):!_},defineProperty(b,y,x){if(!l.isSameDescriptor(x,b,y)){const L=b[y];d(b,y,x.value,L)&&l.defineProperty(b,y,x,L)&&p(b,y,x.value,L)}return!0},deleteProperty(b,y){if(!Reflect.has(b,y))return!0;const x=Reflect.get(b,y),L=d(b,y,void 0,x);return L&&l.deleteProperty(b,y,x)?(p(b,y,void 0,x),!0):!L},apply(b,y,x){const L=y[r]||y;if(l.isUnsubscribed)return Reflect.apply(b,L,x);if((a===!1||a!==!0&&!a.includes(b.name))&&kn.isHandledType(L)){let m=Et.initial(l.getPath(b));const w=kn.isHandledMethod(L,b.name);f.start(L,m,x);let _=Reflect.apply(b,f.preferredThisArg(b,y,L),w?x.map(O=>g(O)):x);const P=f.isChanged(L,i),M=f.stop();if(kn.isHandledType(_)&&w&&(y instanceof Map&&b.name==="get"&&(m=Et.concat(m,x[0])),_=l.getProxy(_,m,S)),P){const O={name:b.name,args:x,result:_},k=f.isCloning?Et.initial(m):m,I=f.isCloning?Et.last(m):"";d(Et.get(t,k),I,L,M,O)?v(k,I,L,M,O):f.undo(L)}return(y instanceof Map||y instanceof Set)&&Cw(_)?_w(_,b,y,m,h):_}return Reflect.apply(b,y,x)}},E=l.getProxy(t,n.pathAsArray?[]:"",S);return e=e.bind(E),c&&(n.onValidate=n.onValidate.bind(E)),E};Kr.target=t=>t&&t[La]||t;Kr.unsubscribe=t=>t[nd]||t;const Nw=t=>{const e=t??window.OMNIC_WIDGET_LOCATIONS_CONFIG,[n,r]=u.useState({...On,...e,map:{...On.map,...e==null?void 0:e.map},palette:{...On.palette,...e==null?void 0:e.palette}}),i=t&&!window.OMNIC_WIDGET_LOCATIONS_CONFIG,o=!t&&window.OMNIC_WIDGET_LOCATIONS_CONFIG;return u.useEffect(()=>{i&&r({...On,...t,map:{...On.map,...t.map},palette:{...On.palette,...t.palette}})},[t,i]),u.useEffect(()=>{if(o)return window.OMNIC_WIDGET_LOCATIONS_CONFIG=Kr(window.OMNIC_WIDGET_LOCATIONS_CONFIG,function(){const s=Kr.target(this);s.map&&(s.map={...s.map}),s.palette&&(s.palette={...s.palette}),r({...s})}),()=>{window.OMNIC_WIDGET_LOCATIONS_CONFIG&&Kr.unsubscribe(window.OMNIC_WIDGET_LOCATIONS_CONFIG)}},[o]),n},Bw=(t,e)=>{oi.defaults.headers.get.Authorization=`INN ${t}`,e!=null&&e.baseURL&&(oi.defaults.baseURL=e.baseURL)},Uw="Overlay-module__root__y8tkGi",Vw={root:Uw},Ca=({children:t,className:e})=>C.jsx("div",{className:Se(Vw.root,e),children:t}),Fw={clickableIcons:!1,disableDefaultUI:!0,minZoom:4,maxZoom:20,restriction:{strictBounds:!0,latLngBounds:{north:85,south:-85,west:-179,east:179}}},cd={optimized:!0},zw="MapGoogle-module__root__iB2RTt",$w="MapGoogle-module__hideUI__zGYpjY",Hw="MapGoogle-module__mapContainer__qTVsu4",Gw="MapGoogle-module__balloon__nNM3fV",Ww="MapGoogle-module__details__MuhoyT",Zw="MapGoogle-module__cluster__KIS2sn",qw="MapGoogle-module__overlay__z03Yoa",Kw="MapGoogle-module__mapControl__Iu3xc4",Jw="MapGoogle-module__geolocationControl__cwYVsw",Yw="MapGoogle-module__bottomSheet__ql8eoC",Qw="MapGoogle-module__locationViewContent__LYJkkK",Xw="MapGoogle-module__locationViewHeader__hzc7Ip",eS="MapGoogle-module__courierDetailsViewContent__CIg-RD",tS="MapGoogle-module__courierDetailsViewHeader__vMFQjI",nS="MapGoogle-module__sheetSubmit__pjGRS0",Ye={root:zw,hideUI:$w,mapContainer:Hw,balloon:Gw,details:Ww,cluster:Zw,overlay:qw,mapControl:Kw,geolocationControl:Jw,bottomSheet:Yw,locationViewContent:Qw,locationViewHeader:Xw,courierDetailsViewContent:eS,courierDetailsViewHeader:tS,sheetSubmit:nS},rS=({children:t,className:e,onLoad:n,onIdle:r,onUnmount:i})=>{const{map:o,disableCourierDelivery:s,hideMapUI:a}=mt(),l=Fe(g=>g.setDetailsOpen),c=yn(g=>g.setPlace),f=bt(g=>g.setCourierPoint),d=It(g=>g.setSelectedPoint),p=u.useMemo(()=>{var g,h;return{lat:((g=o==null?void 0:o.center)==null?void 0:g[0])??co[0],lng:((h=o==null?void 0:o.center)==null?void 0:h[1])??co[1]}},[o==null?void 0:o.center]),v=u.useCallback(async g=>{var E;const{latLng:h}=g;if(!h||s)return;l(!1),d(null);const S=[h.lat(),h.lng()];try{const b=await si(S),y=(E=b==null?void 0:b.results)==null?void 0:E[0],x=y==null?void 0:y.formatted_address;c(y),Jt(x,"Address is not defined"),f({address:x,coords:S})}catch{f({address:null,coords:S})}},[s,f,l,c,d]);return C.jsx(eh,{zoom:o==null?void 0:o.initialZoom,center:p,options:Fw,mapContainerClassName:Se(Ye.root,e,{[Ye.hideUI]:a}),onLoad:n,onIdle:r,onUnmount:i,onClick:v,children:t})},iS='<svg xmlns="http://www.w3.org/2000/svg" width="48" height="66" fill="none" viewBox="0 0 48 66"><path fill="url(#a)" fill-opacity=".4" d="M23.999 66C35.045 66 44 63.314 44 60s-8.955-6-20.001-6C12.955 54 4 56.686 4 60s8.955 6 19.999 6Z" style="mix-blend-mode:darken"/><g filter="url(#b)"><path fill="currentColor" fill-rule="evenodd" d="M24 0c11.211 0 24 8.288 24 24.088C48 34.6 40.011 48.411 24 60 7.989 48.41 0 34.6 0 24.088 0 8.288 12.789 0 24 0Z" clip-rule="evenodd"/></g><g fill="#fff"><path fill-rule="evenodd" d="M15.878 16.411c0-.34.273-.617.61-.617h15.024c.337 0 .61.276.61.617v10.103H15.878V16.41Zm1.22.617v8.253h13.803v-8.253H17.1Z" clip-rule="evenodd"/><path fill-rule="evenodd" d="M15.878 25.28h16.244v9.155c0 .864-.694 1.565-1.55 1.565H17.428c-.855 0-1.55-.7-1.55-1.565V25.28Zm1.22 1.234v7.92a.33.33 0 0 0 .33.333h13.145a.33.33 0 0 0 .328-.332v-7.921H17.1ZM14 13.565c0-.864.694-1.565 1.55-1.565h16.9c.856 0 1.55.7 1.55 1.565v1.898c0 .864-.694 1.565-1.55 1.565h-16.9c-.856 0-1.55-.701-1.55-1.565v-1.898Zm1.55-.332a.33.33 0 0 0-.33.332v1.898a.33.33 0 0 0 .33.332h16.9a.33.33 0 0 0 .33-.332v-1.898a.33.33 0 0 0-.33-.332h-16.9Z" clip-rule="evenodd"/><path fill-rule="evenodd" d="M20.573 24c0-1.912 1.535-3.462 3.427-3.462 1.893 0 3.428 1.55 3.428 3.462v1.872a.639.639 0 0 1-.636.642H21.21a.639.639 0 0 1-.636-.642V24ZM24 21.77A2.218 2.218 0 0 0 21.794 24v1.28h4.413V24c0-1.231-.988-2.23-2.207-2.23Z" clip-rule="evenodd"/><path d="m26.765 29.18-2.724-1.376a.093.093 0 0 0-.083 0l-2.724 1.376a.094.094 0 0 0-.051.084v2.752c0 .036.02.069.05.084l2.725 1.376a.09.09 0 0 0 .042.01.09.09 0 0 0 .041-.01l2.724-1.376a.094.094 0 0 0 .051-.084v-2.751a.095.095 0 0 0-.05-.085ZM24 27.994l2.624 1.326-1.26.637-2.525-1.378 1.16-.585Zm0 2.651-2.625-1.325 1.261-.637 2.524 1.377-1.16.585Zm-2.631-1.118 2.538 1.282v2.431l-2.538-1.282v-2.431Zm2.723 3.713V30.81l2.538-1.282v2.432l-2.538 1.281Z"/><path fill-rule="evenodd" d="M26.892 28.926a.38.38 0 0 1 .206.339v2.751a.379.379 0 0 1-.207.339l-2.723 1.375a.369.369 0 0 1-.338 0l-2.722-1.375a.379.379 0 0 1-.208-.339v-2.752c0-.142.079-.274.207-.339l2.727-1.377a.373.373 0 0 1 .33 0l.002.002 2.726 1.376ZM21.233 32.1a.094.094 0 0 1-.05-.084v-2.752c0-.035.019-.068.05-.084l2.724-1.376a.093.093 0 0 1 .084 0l2.724 1.376a.095.095 0 0 1 .05.085v2.751c0 .035-.019.068-.05.084l-2.724 1.376a.09.09 0 0 1-.042.01.09.09 0 0 1-.042-.01L21.233 32.1Zm5.397-.141v-2.432l-2.538 1.282v2.431l2.538-1.281Zm-.282-.176v-1.796l-1.974.998v1.795l1.974-.997Zm-2.442-.974-2.538-1.282v2.431l2.538 1.282V30.81Zm-2.256-.822 1.974.998v1.795l-1.974-.998v-1.795Zm2.349.658 1.16-.585-2.524-1.377-1.26.637 2.624 1.325Zm.55-.595-.55.277-1.995-1.008.626-.316 1.918 1.047Zm.814-.094 1.26-.636L24 27.994l-1.16.585 2.524 1.377Zm.005-.32-1.918-1.047.549-.277 1.995 1.008-.627.316Z" clip-rule="evenodd"/></g><defs><radialGradient id="a" cx="0" cy="0" r="1" gradientTransform="matrix(0 6 -20 0 24 60)" gradientUnits="userSpaceOnUse"><stop/><stop offset="1" stop-opacity="0"/></radialGradient><filter id="b" width="56" height="68" x="-4" y="-4" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feGaussianBlur in="BackgroundImageFix" stdDeviation="2"/><feComposite in2="SourceAlpha" operator="in" result="effect1_backgroundBlur_958_9661"/><feBlend in="SourceGraphic" in2="effect1_backgroundBlur_958_9661" result="shape"/></filter></defs></svg>',oS='<svg xmlns="http://www.w3.org/2000/svg" width="48" height="66" fill="none" viewBox="0 0 48 66"><path fill="url(#a)" fill-opacity=".4" d="M23.999 66C35.045 66 44 63.314 44 60s-8.955-6-20.001-6C12.955 54 4 56.686 4 60s8.955 6 19.999 6Z" style="mix-blend-mode:darken"/><g filter="url(#b)"><path fill="currentColor" fill-opacity=".8" fill-rule="evenodd" d="M24 0c11.211 0 24 8.288 24 24.088C48 34.6 40.011 48.411 24 60 7.989 48.41 0 34.6 0 24.088 0 8.288 12.789 0 24 0Z" clip-rule="evenodd"/></g><path fill="#fff" fill-rule="evenodd" d="M36.503 33.501V19.625a3 3 0 0 0-1.583-2.645l-9.502-5.091a3 3 0 0 0-2.834 0l-9.501 5.091a3 3 0 0 0-1.583 2.645V33.5a3 3 0 0 0 3 3h19.003a3 3 0 0 0 3-3Zm-7.752 1h4.752a1 1 0 0 0 1-1V19.625a1 1 0 0 0-.528-.882l-9.501-5.091a1 1 0 0 0-.945 0l-9.501 5.091a1 1 0 0 0-.528.882V33.5a1 1 0 0 0 1 1h4.75a2.516 2.516 0 0 1-.05-.5V23.747a2.5 2.5 0 0 1 2.5-2.5h4.602a2.5 2.5 0 0 1 2.5 2.5V34c0 .172-.018.339-.05.5Zm-2.434 0a.5.5 0 0 0 .485-.5V23.747a.5.5 0 0 0-.5-.5H21.7a.5.5 0 0 0-.5.5V34a.5.5 0 0 0 .484.5h4.632Z" clip-rule="evenodd"/><defs><radialGradient id="a" cx="0" cy="0" r="1" gradientTransform="matrix(0 6 -20 0 24 60)" gradientUnits="userSpaceOnUse"><stop/><stop offset="1" stop-opacity="0"/></radialGradient><filter id="b" width="56" height="68" x="-4" y="-4" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feGaussianBlur in="BackgroundImageFix" stdDeviation="2"/><feComposite in2="SourceAlpha" operator="in" result="effect1_backgroundBlur_1068_16960"/><feBlend in="SourceGraphic" in2="effect1_backgroundBlur_1068_16960" result="shape"/></filter></defs></svg>',sS='<svg xmlns="http://www.w3.org/2000/svg" width="48" height="66" fill="none" viewBox="0 0 48 66"><path fill="url(#a)" fill-opacity=".4" d="M23.999 66C35.045 66 44 63.314 44 60s-8.955-6-20.001-6C12.955 54 4 56.686 4 60s8.955 6 19.999 6Z"/><g fill-rule="evenodd" clip-rule="evenodd" filter="url(#b)"><path fill="currentColor" d="M24 0c11.211 0 24 8.288 24 24.088C48 34.6 40.011 48.411 24 60 7.989 48.41 0 34.6 0 24.088 0 8.288 12.789 0 24 0Z"/><path fill="#fff" d="M33.913 12H14.087A2.087 2.087 0 0 0 12 14.087v19.826c0 1.153.934 2.087 2.087 2.087h19.826A2.087 2.087 0 0 0 36 33.913V14.087A2.087 2.087 0 0 0 33.913 12Zm-20.348 2.087c0-.288.234-.522.522-.522h7.826v4.07h-8.348v-3.548Zm9.913 9.13v-9.652h4.696v9.652h-4.696Zm4.696 1.566h-4.696v9.652h4.696v-9.652Zm1.565 9.652h4.174a.523.523 0 0 0 .522-.522v-9.13h-4.696v9.652Zm0-11.218v-9.652h4.174c.288 0 .522.234.522.522v9.13h-4.696ZM21.913 19.2v4.017h-8.348V19.2h8.348Zm0 9.6v-4.017h-8.348V28.8h8.348Zm-8.348 1.565h8.348v4.07h-7.826a.522.522 0 0 1-.522-.522v-3.548Z"/></g><defs><radialGradient id="a" cx="0" cy="0" r="1" gradientTransform="matrix(0 6 -20 0 24 60)" gradientUnits="userSpaceOnUse"><stop stop-color="#1D3665"/><stop offset="1" stop-color="#1D3665" stop-opacity="0"/></radialGradient><filter id="b" width="56" height="68" x="-4" y="-4" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feGaussianBlur in="BackgroundImageFix" stdDeviation="2"/><feComposite in2="SourceAlpha" operator="in" result="effect1_backgroundBlur_2412_6054"/><feBlend in="SourceGraphic" in2="effect1_backgroundBlur_2412_6054" result="shape"/></filter></defs></svg>',kt={PinPvz:iS,PinHome:oS,PinLocker:sS},ud=28,fd=({open:t,children:e,hideFooter:n,minSnapHeight:r,submitDisabled:i,onSubmitClick:o,...s})=>C.jsx(kf,{open:t,expandOnContentDrag:!0,initialFocusRef:!1,defaultSnap:({snapPoints:a})=>Math.min(...a),snapPoints:({headerHeight:a,minHeight:l,footerHeight:c,maxHeight:f})=>[r==null?l:a+c+r,f-ud],footer:n?null:C.jsx(xt,{disabled:i,variant:"primary",className:Ye.sheetSubmit,onClick:o,children:C.jsx(Rn,{keyName:"choose",ns:"common"})}),sibling:C.jsx("div",{"data-rsbs-backdrop":"true",onClick:a=>{var l;a.stopPropagation(),a.preventDefault(),(l=s.onDismiss)==null||l.call(s)}}),blocking:!1,children:C.jsx("div",{className:Ye.bottomSheet,children:e})}),dd=t=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:42,height:42,fill:"none",viewBox:"0 0 42 42",...t},de.createElement("rect",{width:42,height:42,fill:"#fff",rx:21}),de.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M31.003 28V17.766a3 3 0 0 0-1.579-2.643l-7.003-3.765a3 3 0 0 0-2.842 0l-7.003 3.765a3 3 0 0 0-1.58 2.643V28a3 3 0 0 0 3 3h14.008a3 3 0 0 0 3-3Zm-5.919 1h2.92a1 1 0 0 0 1-1V17.766a1 1 0 0 0-.527-.881l-7.003-3.766a1 1 0 0 0-.948 0l-7.003 3.766a1 1 0 0 0-.527.88v10.237a1 1 0 0 0 1 1h2.92a2.513 2.513 0 0 1-.05-.5v-7.606a2.5 2.5 0 0 1 2.5-2.5h3.268a2.5 2.5 0 0 1 2.5 2.5V28.5c0 .171-.017.338-.05.5Zm-2.426 0a.5.5 0 0 0 .476-.499v-7.606a.5.5 0 0 0-.5-.5h-3.269a.5.5 0 0 0-.5.5V28.5a.5.5 0 0 0 .476.5h3.317Z",clipRule:"evenodd"}),de.createElement("rect",{width:41,height:41,x:.5,y:.5,stroke:"#1D3665",strokeOpacity:.1,rx:20.5})),aS=t=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},de.createElement("g",{clipPath:"url(#a)"},de.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M17.071 3.071a1.25 1.25 0 0 0-1.768 0L10 8.375 4.697 3.07a1.25 1.25 0 1 0-1.768 1.77l5.303 5.303-5.303 5.303a1.25 1.25 0 0 0 1.768 1.768L10 11.91l5.303 5.303a1.25 1.25 0 1 0 1.768-1.768l-5.303-5.303L17.07 4.84a1.25 1.25 0 0 0 0-1.768Z",clipRule:"evenodd"})),de.createElement("defs",null,de.createElement("clipPath",{id:"a"},de.createElement("path",{fill:"#fff",d:"M0 0h20v20H0z"})))),lS="CloseButton-module__root__233rOd",cS="CloseButton-module__absolutePositionVariant__MMkQ0-",uS="CloseButton-module__relativePositionVariant__fdYFY4",jc={root:lS,absolutePositionVariant:cS,relativePositionVariant:uS},fi=({position:t="absolute",className:e,...n})=>C.jsx("div",{...n,className:Se(jc.root,e,jc[`${t}PositionVariant`]),children:C.jsx(aS,{})}),fS="CourierBalloon-module__root__4MUq03",dS="CourierBalloon-module__details__Ji6B9l",pS="CourierBalloon-module__header__SAzGF6",hS="CourierBalloon-module__title__FdGkJ2",gS="CourierBalloon-module__description__Su359i",vS="CourierBalloon-module__actions__zJkpDW",mS="CourierBalloon-module__errorVariant__TjUPgn",yS="CourierBalloon-module__logo__DMba5H",on={root:fS,details:dS,header:pS,title:hS,description:gS,actions:vS,errorVariant:mS,logo:yS},Qs=({SSR:t,variant:e,address:n,className:r,hideDetails:i,hasCloseButton:o,onDetails:s,onClose:a})=>{const l=e==="error",c=e==="default",f=t?"{ courier_balloon.title }":C.jsx(Rn,{keyName:"title",ns:"courier_balloon"}),d=t?"{ courier_balloon.error_title }":C.jsx(Rn,{keyName:"error_title",ns:"courier_balloon"}),p=t?"{ courier_balloon.error_description }":C.jsx(Rn,{keyName:"error_description",ns:"courier_balloon"});return C.jsxs("div",{className:Se(on.root,r,on[`${e}Variant`]),children:[C.jsxs("div",{className:on.header,children:[C.jsx(dd,{className:on.logo}),C.jsx("span",{className:on.title,children:l?d:f}),o&&C.jsx(fi,{onClick:a})]}),C.jsx("div",{className:on.description,children:l?p:n||"{{ properties.address }}"}),c&&!i&&C.jsx("div",{className:on.actions,children:C.jsx(xt,{id:lo,as:"button",variant:"primary",className:on.details,onClick:s,children:t?"{ details }":C.jsx(Rn,{keyName:"details",ns:"common"})})})]})},pd=({isSelectedPoint:t})=>{const[e,n]=u.useState(!0),r=Fe(i=>i.detailsOpen);return u.useEffect(()=>{n(t?!r:!0)},[r,t]),e},bS="Chip-module__root__A1duWr",wS="Chip-module__active__PmXa7K",Nc={root:bS,active:wS},Bc=({active:t,children:e,className:n,...r})=>C.jsx("div",{...r,className:Se(Nc.root,n,{[Nc.active]:t}),children:e}),SS="TextArea-module__root__l-RDfr",ES={root:SS},Uc=u.forwardRef(({className:t,inputRef:e,onChange:n,onBlur:r,onFocus:i,...o},s)=>{const a=u.useRef(null);u.useImperativeHandle(s,()=>({focus:()=>{var c,f;(c=a.current)==null||c.focus(),i&&i({target:{value:(f=a.current)==null?void 0:f.value}})},blur:()=>{var c,f;(c=a.current)==null||c.blur(),r&&r({target:{value:(f=a.current)==null?void 0:f.value}})},setValue:c=>{n&&n({target:{value:c}}),a.current&&(a.current.value=c)}}),[r,n,i]);const l=_d(e,a);return C.jsx("textarea",{...o,ref:l,className:Se(ES.root,t),onBlur:r,onFocus:i,onChange:n})}),LS=({set:t})=>(e,n)=>{let r={...e};switch(n.type){case"SET_COMMENT":{r={...e,comment:n.payload};break}case"SET_DELIVERY_TIME":{r={...e,delivery_time:n.payload};break}case"SET_APARTMENT_NUMBER":{r={...e,apartment_number:n.payload};break}}return t==null||t(r),r},hd=t=>{const{delivery_time:e,apartment_number:n}=t;return!!e&&!!n},xS="CourierDetailsView-module__title__erksdV",CS="CourierDetailsView-module__logo__qYbLKL",_S="CourierDetailsView-module__header__JofwHC",OS="CourierDetailsView-module__content__8xEbUb",MS="CourierDetailsView-module__section__NQlWki",PS="CourierDetailsView-module__chips__T1ep8H",kS="CourierDetailsView-module__actions__IgFrOE",RS="CourierDetailsView-module__submit__Z-6fPa",TS="CourierDetailsView-module__actionsHidden__VfVd-Y",AS="CourierDetailsView-module__commentSection__vN110S",DS="CourierDetailsView-module__comment__rOoPVP",gt={title:xS,logo:CS,header:_S,content:OS,section:MS,chips:PS,actions:kS,submit:RS,actionsHidden:TS,commentSection:AS,comment:DS},IS=({classes:t,location:e,hideActions:n,onClose:r,onChange:i,onSubmit:o})=>{const{inputs:s,locale:a}=mt(),{t:l}=jt(["details_modal","courier_balloon","common"]),c=u.useMemo(()=>LS({set:i}),[i]),[f,d]=u.useState(!1),[p,v]=u.useReducer(c,{...e,address:null,comment:"",delivery_time:"",apartment_number:""}),g=async()=>{d(!0);try{Jt(e.address,"Address is required");const L=await Vd({address:e.address,algorithm:10,service:10,language:a||ku});if(!ww(L))return;const m=L==null?void 0:L.data.data;o==null||o({...p,address:m})}finally{d(!1)}},h=L=>()=>{v({payload:L,type:"SET_DELIVERY_TIME"})},S=L=>{v({payload:L.target.value,type:"SET_APARTMENT_NUMBER"})},E=L=>{v({payload:L.target.value,type:"SET_COMMENT"})},b=hd(p),y=_o(s==null?void 0:s.apartment),x=_o(s==null?void 0:s.comment);return C.jsxs(C.Fragment,{children:[C.jsxs("div",{className:Se(gt.header,t==null?void 0:t.header),children:[C.jsx(fi,{onClick:r}),C.jsxs("div",{className:gt.title,children:[C.jsx(dd,{className:gt.logo}),C.jsx("span",{children:l("title",{ns:"courier_balloon"})})]})]}),C.jsxs("div",{className:Se(gt.content,t==null?void 0:t.content),children:[C.jsxs("section",{className:gt.section,children:[C.jsxs("label",{children:[l("address"),":"]}),C.jsx("p",{children:e.address})]}),C.jsxs("section",{className:gt.section,children:[C.jsxs("label",{children:[l("delivery_time"),":"]}),C.jsxs("div",{className:gt.chips,children:[C.jsx(Bc,{active:p.delivery_time==="8:00-13:00",onClick:h("8:00-13:00"),children:"8:00 - 13:00"}),C.jsx(Bc,{active:p.delivery_time==="14:00-22:00",onClick:h("14:00-22:00"),children:"14:00 - 22:00"})]})]}),C.jsxs("section",{className:gt.section,children:[C.jsxs("label",{children:[l("apartment_number"),":"]}),C.jsx(Uc,{...y,rows:1,onChange:S})]}),C.jsxs("section",{className:Se(gt.section,gt.commentSection),children:[C.jsxs("label",{children:[l("comment"),":"]}),C.jsx(Uc,{...x,className:gt.comment,onChange:E})]})]}),C.jsx("div",{className:Se(gt.actions,{[gt.actionsHidden]:n}),children:C.jsx(xt,{loading:f,disabled:!b||f,variant:"primary",className:gt.submit,onClick:g,children:l("choose",{ns:"common"})})})]})},gd=u.memo(IS),jS={header:Ye.courierDetailsViewHeader,content:Ye.courierDetailsViewContent},NS=({hideDetails:t,point:e,setOpenDetails:n,setCourierPoint:r,onPointClick:i})=>{const o=pd({isSelectedPoint:!0}),[s,a]=u.useState({...e,comment:"",delivery_time:"",apartment_number:""});u.useEffect(()=>{a({...e,comment:"",delivery_time:"",apartment_number:""})},[e]);const[l,c]=u.useState(null),f=di("screenSm"),d=u.useMemo(()=>({lat:s.coords[0],lng:s.coords[1]}),[s.coords]),p=()=>{n==null||n(!0)},v=()=>{r==null||r(null)},g=u.useMemo(()=>({url:un(Pt(kt.PinHome,"--owl-color-success")),scaledSize:new google.maps.Size(...Yt)}),[]),h=()=>{i==null||i(s),n==null||n(!1),r==null||r(null)},S=C.jsx(Qs,{...s,hideDetails:t,hasCloseButton:f,variant:s.address?"default":"error",className:Ye.balloon,onDetails:p,onClose:v}),E=hd(s),b=o&&!!(l!=null&&l.getVisible());return C.jsxs(gu,{noClustererRedraw:!0,icon:g,position:d,options:cd,onLoad:c,children:[f&&C.jsxs(fd,{minSnapHeight:s.address?200:void 0,submitDisabled:!E,hideFooter:!s.address,open:b,onDismiss:v,onSubmitClick:h,children:[s.address&&C.jsx(gd,{classes:jS,hideActions:!0,location:e,onChange:a,onClose:v}),!s.address&&S]}),!f&&b&&C.jsx(Su,{onCloseClick:v,children:S})]})},vd=t=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:26,height:8,fill:"none",viewBox:"0 0 26 8",...t},de.createElement("g",{fill:"#000"},de.createElement("path",{d:"M1.416 7.5c-.255 0-.491-.065-.708-.194A1.445 1.445 0 0 1 0 6.06V1.94A1.445 1.445 0 0 1 .708.695C.925.564 1.16.5 1.416.5h4.056c.255 0 .488.065.698.194.217.13.39.305.517.525.134.214.2.454.2.72V6.06c0 .26-.066.5-.2.72-.128.22-.3.395-.517.525-.21.13-.443.194-.698.194H1.416Zm.067-1.517h3.903V2.017H1.483v3.966ZM7.941 7.5v-7h1.53l2.335 2.83L14.13.5h1.54v7h-1.493V2.804l-2.372 2.878-2.382-2.868V7.5H7.94ZM16.816 7.5v-7h1.53l3.856 4.667V.5h1.502v7h-1.53l-3.875-4.686V7.5h-1.483ZM24.536 7.5v-7H26v7h-1.464Z"}))),md=t=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:26,height:14,fill:"none",viewBox:"0 0 26 14",...t},de.createElement("g",{fill:"#000"},de.createElement("path",{d:"M0 13.252V8.346h1.053v3.844h3.08v1.062H0ZM4.535 13.252V8.346h1.053v3.844h3.08v1.062H4.535ZM9.126 13.252V9.36a1.02 1.02 0 0 1 .503-.87.973.973 0 0 1 .503-.137h2.874a.95.95 0 0 1 .502.136c.154.09.277.213.367.367.095.15.143.318.143.504v3.892H12.95v-1.58H10.18v1.58H9.126Zm1.053-2.64h2.772V9.413H10.18v1.197ZM14.792 13.252v-4.9h1.087l1.658 1.98 1.65-1.98h1.094v4.9h-1.06V9.965l-1.684 2.014-1.692-2.007v3.28h-1.053ZM21.108 13.252V9.36a1.018 1.018 0 0 1 .503-.87.973.973 0 0 1 .503-.137h2.874a.95.95 0 0 1 .503.136c.153.09.276.213.366.367A.92.92 0 0 1 26 9.36v3.892h-1.067v-1.58h-2.771v1.58h-1.054Zm1.053-2.64h2.772V9.413h-2.771v1.197ZM1.005 5.648a.973.973 0 0 1-.502-.137A1.018 1.018 0 0 1 0 4.641V1.756a1.018 1.018 0 0 1 .503-.87.973.973 0 0 1 .502-.137h2.881c.181 0 .347.045.496.136.154.09.276.213.367.367a.92.92 0 0 1 .143.504V4.64c0 .181-.048.349-.143.503-.09.154-.213.277-.367.367a.937.937 0 0 1-.496.137h-2.88Zm.048-1.062h2.772V1.81H1.053v2.776ZM5.64 5.648v-4.9h1.087l1.657 1.98 1.651-1.98h1.094v4.9h-1.06V2.36L8.384 4.375 6.693 2.368v3.28H5.64ZM11.943 5.648v-4.9h1.087l2.738 3.267V.749h1.066v4.899h-1.087l-2.751-3.28v3.28h-1.053ZM17.425 5.648v-4.9h1.04v4.9h-1.04Z"}))),BS="LocationView-module__title__QP69kD",US="LocationView-module__logo__nlPQaG",VS="LocationView-module__header__9DDuVU",FS="LocationView-module__content__Se2TSy",zS="LocationView-module__section__9m1x1v",$S="LocationView-module__chips__6j-ZAh",HS="LocationView-module__services__rwbp2x",GS="LocationView-module__images__zfnQMA",WS="LocationView-module__image__JKvt9J",ZS="LocationView-module__actions__AGih3C",qS="LocationView-module__actionsHidden__DBV1vj",KS="LocationView-module__submit__6mD2w-",JS="LocationView-module__scheduleItem__snTLMb",nt={title:BS,logo:US,header:VS,content:FS,section:zS,chips:$S,services:HS,images:GS,image:WS,actions:ZS,actionsHidden:qS,submit:KS,scheduleItem:JS},YS={default:vd,llama:md},QS=({location:t,hideActions:e,classes:n,onClose:r,onSubmit:i})=>{const{t:o}=jt(["details_modal","common"]),{logo:s="default"}=mt(),a=YS[s];return C.jsxs(C.Fragment,{children:[C.jsxs("div",{className:Se(nt.header,n==null?void 0:n.header),children:[C.jsx(fi,{onClick:r}),C.jsxs("div",{className:nt.title,children:[C.jsx("div",{className:nt.logo,children:C.jsx(a,{})}),C.jsx("span",{children:t.name})]})]}),C.jsxs("div",{className:Se(nt.content,n==null?void 0:n.content),children:[C.jsxs("section",{className:nt.section,children:[C.jsxs("label",{children:[o("address"),":"]}),C.jsx("p",{children:t.location.full_address})]}),t.schedule.length>0&&C.jsxs("section",{className:nt.section,children:[C.jsxs("label",{children:[o("schedule"),":"]}),t.schedule.map((l,c)=>C.jsx("p",{className:nt.scheduleItem,children:l},c))]}),(t.pay_by_card||t.pay_by_card)&&C.jsxs("section",{className:nt.section,children:[C.jsxs("label",{children:[o("payment_method"),":"]}),C.jsxs("div",{className:nt.chips,children:[t.pay_by_cash&&o("pay_by_cash"),t.pay_by_card&&t.pay_by_cash&&", ",t.pay_by_card&&o("pay_by_card")]})]}),C.jsxs("section",{className:nt.section,children:[C.jsxs("label",{children:[o("services"),":"]}),C.jsxs("div",{className:nt.services,children:[t.is_pickup&&C.jsx("span",{children:o("is_pickup")}),t.is_delivery&&C.jsx("span",{children:o("is_delivery")}),t.is_dressing_room&&C.jsx("span",{children:o("is_dressing_room")}),t.is_check_order&&C.jsx("span",{children:o("is_check_order")})]})]}),C.jsxs("section",{className:nt.section,children:[C.jsxs("label",{children:[o("location"),":"]}),C.jsx("p",{children:t.location_name})]}),t.images.length>0&&C.jsx("section",{className:nt.images,children:t.images.map(l=>C.jsx("img",{src:l,alt:t.name,className:nt.image},l))})]}),C.jsx("div",{className:Se(nt.actions,{[nt.actionsHidden]:e}),children:C.jsx(xt,{variant:"primary",className:nt.submit,onClick:i,children:o("choose",{ns:"common"})})})]})},yd=u.memo(QS),XS=t=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...t},de.createElement("path",{fill:"currentcolor",d:"M12.5 8c0 .287-.108.573-.324.792l-6.789 6.88a1.095 1.095 0 0 1-1.563 0 1.131 1.131 0 0 1 0-1.585L9.83 8 3.824 1.913a1.131 1.131 0 0 1 0-1.585 1.095 1.095 0 0 1 1.564 0l6.789 6.88c.215.219.323.505.323.792Z"})),eE="LocationBalloon-module__root__D5p9cL",tE="LocationBalloon-module__submit__Ri5JaR",nE="LocationBalloon-module__details__6et6aX",rE="LocationBalloon-module__icon__U-zpx7",iE="LocationBalloon-module__header__LCvDj0",oE="LocationBalloon-module__title__octhrc",sE="LocationBalloon-module__description__r7vFbw",aE="LocationBalloon-module__actions__-jdejn",sn={root:eE,submit:tE,details:nE,icon:rE,header:iE,title:oE,description:sE,actions:aE},lE={default:vd,llama:md},bd=({SSR:t,name:e,location:n,onSubmit:r,className:i,onDetails:o,hideDetails:s,location_name:a})=>{const{logo:l="default"}=mt(),c=lE[l];return C.jsxs("div",{className:Se(sn.root,i),children:[C.jsxs("div",{className:sn.header,children:[C.jsx("div",{className:sn.icon,children:C.jsx(c,{})}),C.jsx("span",{className:sn.title,children:e||"{{ properties.point.name }}"})]}),C.jsxs("div",{className:sn.description,children:[(n==null?void 0:n.full_address)||"{{ properties.point.location.full_address }}",","," ",a||"{{ properties.point.location_name }}"]}),C.jsxs("div",{className:sn.actions,children:[C.jsx(xt,{id:_s,variant:"primary",className:sn.submit,onClick:r,children:t?"{ choose }":C.jsx(Rn,{keyName:"choose",ns:"common"})}),!s&&C.jsxs(xt,{id:lo,as:"link",variant:"primary",className:sn.details,onClick:o,children:[t?"{ details }":C.jsx(Rn,{keyName:"details",ns:"common"}),C.jsx(XS,{})]})]})]})},cE={header:Ye.locationViewHeader,content:Ye.locationViewContent},uE=({point:t,clusterer:e,hideDetails:n,onPointClick:r,selectedPoint:i,setOpenDetails:o,onPointSelected:s})=>{const a=di("screenSm"),[l,c]=u.useState(null),f=()=>{o==null||o(!1),s==null||s(t)},d=()=>{s==null||s(null)},p=()=>{o==null||o(!0),s==null||s(t)},v=()=>{r==null||r(t),o==null||o(!1),s==null||s(null)},g=(i==null?void 0:i.uid)===t.uid,h=g?Yn:Yt,S=pd({isSelectedPoint:g}),E=u.useMemo(()=>{let x;switch(!0){case(t.type===30&&!g):{x=Pt(kt.PinLocker,"--owl-color-primary");break}case(t.type!==30&&!g):{x=Pt(kt.PinPvz,"--owl-color-grey-80");break}case(t.type===30&&g):{x=Pt(kt.PinLocker,"--owl-color-success");break}case(t.type!==30&&g):{x=Pt(kt.PinPvz,"--owl-color-black");break}}return Jt(x,"Icon url is not defined"),{scaledSize:new google.maps.Size(...h),url:un(x)}},[g,h,t.type]),b=u.useMemo(()=>({lat:t.location.latitude,lng:t.location.longitude}),[t.location.latitude,t.location.longitude]),y=g&&S&&!!(l!=null&&l.getVisible());return C.jsxs(gu,{noClustererRedraw:!0,icon:E,position:b,clusterer:e,options:cd,onLoad:c,onClick:f,children:[a&&C.jsx(fd,{minSnapHeight:200,open:y,onDismiss:d,onSubmitClick:v,children:C.jsx(yd,{classes:cE,hideActions:!0,location:t,onClose:d})}),y&&!a&&C.jsx(Su,{onCloseClick:d,children:C.jsx(bd,{...t,hideDetails:n,className:Ye.balloon,onSubmit:v,onDetails:p})})]},t.uid)},fE=({points:t,hideDetails:e,selectedPoint:n,onOpenDetails:r,onPointClick:i,onPointSelected:o})=>C.jsx(xh,{clusterClass:Ye.cluster,onClusteringEnd:()=>{setTimeout(()=>{const s=document.getElementsByClassName(Ye.cluster);for(const a of s)a.addEventListener("touchstart",Rc,{passive:!0})},100)},onUnmount:()=>{const s=document.getElementsByClassName(Ye.cluster);for(const a of s)a.removeEventListener("touchstart",Rc)},children:s=>C.jsx(u.Fragment,{children:t.map(a=>C.jsx(uE,{point:a,clusterer:s,hideDetails:e,selectedPoint:n,setOpenDetails:r,onPointClick:i,onPointSelected:o},a.uid))})}),dE=u.memo(fE),pE=({onOpenDetails:t,onPointClick:e,onPointSelected:n})=>{const{locale:r,hideDetails:i}=mt(),o=zt(c=>c.points),s=It(c=>c.location),a=yn(c=>c.place),l=JSON.stringify([o.length,r,a==null?void 0:a.place_id]);return C.jsx(dE,{points:o,hideDetails:i,selectedPoint:s,onOpenDetails:t,onPointClick:e,onPointSelected:n},l)},hE=u.memo(pE),gE=t=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},de.createElement("rect",{width:2,height:20,x:9,fill:"#fff",rx:1}),de.createElement("rect",{width:2,height:20,x:20,y:9,fill:"#fff",rx:1,transform:"rotate(90 20 9)"}),de.createElement("circle",{cx:10,cy:10,r:8,fill:"#fff"}),de.createElement("circle",{cx:10,cy:10,r:6,fill:"currentcolor"}),de.createElement("circle",{cx:10,cy:10,r:4,fill:"#fff"})),vE=t=>{const e=document.createElement("div"),n=document.createElement("div");e.classList.add(Ye.mapControl),n.classList.add(Ye.mapControl),e.innerHTML="+",n.innerHTML="—",t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(n),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{const r=t.getZoom()||0;return t.setZoom(r+1)}),n.addEventListener("click",()=>{const r=t.getZoom()||0;return t.setZoom(r-1)})},mE=t=>{const e=document.createElement("div");e.classList.add(Ye.mapControl),e.classList.add(Ye.geolocationControl),e.innerHTML=zi.renderToString(C.jsx(gE,{})),t.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(e),e.addEventListener("click",()=>{ed(async n=>{var a;const{latitude:r,longitude:i}=n.coords,s=await si([r,i]);yn.getState().setPlace((a=s.results)==null?void 0:a[0])})})},yE=({className:t})=>{const e=Fe(x=>x.map),n=Fe(x=>x.setMap),r=Fe(x=>x.loading),i=Fe(x=>x.setDetailsOpen),o=Nn(),s=zt(x=>x.loading),a=zt(x=>x.loadNext),l=yn(x=>x.setPlace),c=bt(x=>x.courierPoint),f=bt(x=>x.setCourierPoint),d=It(x=>x.setSelectedPoint),{hideMapControls:p,hideDetails:v,disableGeolocation:g,onPointClick:h}=mt(),S=u.useCallback(x=>{n(x),p||(vE(x),g||mE(x))},[g,p,n]),E=u.useCallback(()=>{n(null)},[n]),b=u.useCallback(()=>{if(!e)return;const x=e==null?void 0:e.getBounds();x&&a([[x.getSouthWest().lat(),x.getNorthEast().lat()],[x.getSouthWest().lng(),x.getNorthEast().lng()]],o)},[o,a,e]),y=u.useCallback(async x=>{var w;if(f(null),d(x),!x)return;const L=[x.location.latitude,x.location.longitude],m=await si(L);l((w=m.results)==null?void 0:w[0])},[f,l,d]);return C.jsxs("div",{className:Se(Ye.mapContainer,t),children:[C.jsxs(rS,{onIdle:b,onLoad:S,onUnmount:E,children:[c&&C.jsx(NS,{hideDetails:v,point:c,onPointClick:h,setOpenDetails:i,setCourierPoint:f}),C.jsx(hE,{onPointClick:h,onOpenDetails:i,onPointSelected:y})]}),(s||r)&&C.jsx(Ca,{className:Ye.overlay,children:C.jsx(ei,{})})]})},bE=u.memo(yE);function jn(){return jn=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},jn.apply(this,arguments)}const wd=(t,e)=>{const n={};for(const r in t)e.indexOf(r)===-1&&(n[r]=t[r]);return n},Sd=u.createContext(null),Uo=u.createContext(null),Ed=t=>e=>u.createElement(Uo.Consumer,null,n=>u.createElement(t,jn({parent:n},e))),wE=(t=[])=>{const[e,n]=u.useState(!1),r=u.useRef(t),i=(()=>{const s=u.useContext(Sd);if(s===null)throw new Error("Couldn't find Yandex.Maps API in the context. Make sure that hook useYMaps is inside <YMaps /> provider");return s})(),o=i.getApi();return u.useEffect(()=>{i.load().then(()=>Promise.all(r.current.map(i.loadModule))).then(()=>n(!0))},[]),e&&o?o:null},SE=()=>{},EE=["onLoad","onError","modules","apiLoader"];function _a(t,e=!1,n=[]){return r=>{const{width:i,height:o,modules:s=[],onLoad:a=SE}=r,l=wE(n.concat(s)),c=!e||!!l,f=wd(r,EE);return u.useEffect(()=>l?a(l):void 0,[l]),c?u.createElement(t,jn({ymaps:l},f)):u.createElement("div",{style:{width:i,height:o}})}}const LE=typeof window<"u",Vc={lang:"ru_RU",load:"",ns:"",mode:"release"},xE=t=>{const{version:e="2.1",enterprise:n=!1,query:r={lang:"ru_RU",load:"",ns:""},preload:i=!1,children:o}=t,s=u.useRef((a=>{const{query:l=Vc}=a,c=Date.now().toString(32),f=l.ns||"",d="__yandex-maps-api-onload__$$"+c,p="__yandex-maps-api-onerror__$$"+c,v=LE?window:{},g={};let h;const S=()=>f?v[f]:h,E=()=>{delete v[d],delete v[p]};return{load:()=>{if(S())return Promise.resolve(h);if(g[f])return g[f];const b={onload:d,onerror:p,...Vc,...l},y=Object.keys(b).map(L=>`${L}=${b[L]}`).join("&"),x=[`https://${a.enterprise?"enterprise.":""}api-maps.yandex.ru`,a.version,"?"+y].join("/");return g[f]=new Promise((L,m)=>{v[d]=w=>{E(),w.ready(()=>{h=w,L(w)})},v[p]=w=>{E(),m(w)},(w=>new Promise((_,P)=>{const M=document.createElement("script");M.type="text/javascript",M.onload=_,M.onerror=P,M.src=w,M.async=!0,document.head.appendChild(M)}))(x).catch(v[p])}),g[f]},getApi:S,loadModule:b=>new Promise((y,x)=>{h.modules.require(b).done(L=>{L.forEach(m=>{((w,_,P,M=!1)=>{const O=typeof _=="string"?_.split("."):_.slice();let k,I=w;for(;O.length>1;)k=O.shift(),I[k]||(I[k]={}),I=I[k];const B=O[0];I[B]=M===!0&&I[B]||P})(h,b,m,!0)}),y(h)},x)})}})({version:e,enterprise:n,query:r,preload:i}));return u.useEffect(()=>{i&&s.current.load()},[s.current]),u.createElement(Sd.Provider,{value:s.current},o)},Fc=/^on(?=[A-Z])/;function Ve(t){return Object.keys(t).reduce((e,n)=>{if(Fc.test(n)){const r=n.replace(Fc,"").toLowerCase();e._events[r]=t[n]}else e[n]=t[n];return e},{_events:{}})}function Bn(t,e,n){typeof n=="function"&&t.events.add(e,n)}function Un(t,e,n){typeof n=="function"&&t.events.remove(e,n)}function pr(t,e,n){Object.keys(Object.assign({},e,n)).forEach(r=>{e[r]!==n[r]&&(Un(t,r,e[r]),Bn(t,r,n[r]))})}const Ld=t=>"default"+t.charAt(0).toUpperCase()+t.slice(1);function et(t,e){return t[e]!==void 0||t[Ld(e)]===void 0}function Q(t,e,n){return(et(t,e)?t[e]:t[Ld(e)])||n}function tt(t,e,n=null){if(t!==e){if(t&&("current"in t?t.current=null:typeof t=="function"&&t(null)),!e)return;"current"in e?e.current=n:typeof e=="function"&&e(n)}}function xd(t){const{width:e,height:n,style:r,className:i}=t;return r!==void 0||i!==void 0?Object.assign({},r&&{style:r},i&&{className:i}):{style:{width:e,height:n}}}class CE extends u.Component{constructor(e){super(e),this.state={error:null,errorInfo:null}}componentDidCatch(e,n){const{onError:r=()=>{}}=this.props;r(e),this.setState({error:e,errorInfo:n})}render(){return this.state.error?null:this.props.children}}const Oa=t=>({onError:e,...n})=>u.createElement(CE,{onError:e},u.createElement(t,n));class Jr extends u.Component{constructor(){super(),this.instance=null,this.state={instance:null},this._parentElement=null,this._getRef=e=>{this._parentElement=e}}componentDidMount(){this.instance=Jr.mountObject(this._parentElement,this.props.ymaps.Map,this.props),this.setState({instance:this.instance})}componentDidUpdate(e){this.instance!==null&&Jr.updateObject(this.instance,e,this.props)}componentWillUnmount(){Jr.unmountObject(this.instance,this.props)}render(){const e=xd(this.props),n=Ve(this.props),r=wd(n,["_events","state","defaultState","options","defaultOptions","instanceRef","ymaps","children","width","height","style","className"]);return u.createElement(Uo.Provider,{value:this.state.instance},u.createElement("div",jn({ref:this._getRef},e,r),this.props.children))}static mountObject(e,n,r){const{instanceRef:i,_events:o}=Ve(r),s=new n(e,Q(r,"state"),Q(r,"options"));return Object.keys(o).forEach(a=>Bn(s,a,o[a])),tt(null,i,s),s}static updateObject(e,n,r){const{_events:i,instanceRef:o}=Ve(r),{_events:s,instanceRef:a}=Ve(n);if(et(r,"state")){const l=Q(n,"state",{}),c=Q(r,"state",{});l.type!==c.type&&e.setType(c.type),l.behaviors!==c.behaviors&&(l.behaviors&&e.behaviors.disable(l.behaviors),c.behaviors&&e.behaviors.enable(c.behaviors)),c.zoom&&l.zoom!==c.zoom&&e.setZoom(c.zoom),c.center&&l.center!==c.center&&e.setCenter(c.center),c.bounds&&l.bounds!==c.bounds&&e.setBounds(c.bounds)}if(et(r,"options")){const l=Q(n,"options"),c=Q(r,"options",{});l!==c&&e.options.set(c)}Q(n,"width")===Q(r,"width")&&Q(n,"height")===Q(r,"height")||e.container.fitToViewport(),pr(e,s,i),tt(a,o,e)}static unmountObject(e,n){const{instanceRef:r,_events:i}=Ve(n);e!==null&&(Object.keys(i).forEach(o=>Un(e,o,i[o])),e.destroy(),tt(r))}}const Cd=Oa(_a(Jr,!0,["Map"]));Cd.defaultProps={width:320,height:240};class to extends u.Component{constructor(){super(),this.state={instance:null},this._parentElement=null,this._getRef=e=>{this._parentElement=e}}componentDidMount(){this._mounted=!0,this.props.ymaps.panorama.isSupported()&&to.mountObject(this._parentElement,this.props.ymaps.panorama,this.props).then(e=>this._mounted&&this.setState({instance:e}))}componentDidUpdate(e){this.state.instance!==null&&to.updateObject(this.state.instance,e,this.props)}componentWillUnmount(){this._mounted=!1,to.unmountObject(this.state.instance,this.props)}render(){const e=xd(this.props);return u.createElement("div",jn({ref:this._getRef},e))}static mountObject(e,n,r){const{instanceRef:i,_events:o}=Ve(r),s=Q(r,"point"),a=Q(r,"locateOptions"),l=Q(r,"options");return new Promise((c,f)=>{n.locate(s,a).done(d=>{if(d.length>0){const p=new n.Player(e,d[0],l);tt(null,i,p),Object.keys(o).forEach(v=>Bn(p,v,o[v])),c(p)}},f)})}static updateObject(e,n,r){const{_events:i,instanceRef:o}=Ve(r),{_events:s,instanceRef:a}=Ve(n);if(et(r,"options")){const l=Q(n,"options"),c=Q(r,"options");l!==c&&e.options.set(c)}if(et(r,"point")){const l=Q(r,"point"),c=Q(n,"point"),f=Q(r,"locateOptions");l!==c&&e.moveTo(l,f)}pr(e,s,i),tt(a,o,e)}static unmountObject(e,n){const{instanceRef:r,_events:i}=Ve(n);e!==null&&(Object.keys(i).forEach(o=>Un(e,o,i[o])),tt(r))}}class no extends u.Component{constructor(){super(),this.state={instance:null},this.instance=null}componentDidMount(){const e=no.mountControl(this.props.ymaps.control[this.props.name],this.props);this.instance=e,this.setState({instance:e})}componentDidUpdate(e){this.instance!==null&&no.updateControl(this.instance,e,this.props)}componentWillUnmount(){no.unmountControl(this.instance,this.props)}render(){return u.createElement(Uo.Provider,{value:this.state.instance},this.props.children)}static mountControl(e,n){const{instanceRef:r,parent:i,lazy:o,_events:s}=Ve(n),a=new e({data:Q(n,"data"),options:Q(n,"options"),state:Q(n,"state"),mapTypes:Q(n,"mapTypes"),lazy:o});if(Object.keys(s).forEach(l=>Bn(a,l,s[l])),i&&i.controls&&typeof i.controls.add=="function")i.controls.add(a);else{if(!i||!i.add||typeof i.add!="function")throw new Error(`No parent found to mount ${n.name}`);i.add(a)}return tt(null,r,a),a}static updateControl(e,n,r){const{_events:i,instanceRef:o}=Ve(r),{_events:s,instanceRef:a}=Ve(n);if(et(r,"options")){const l=Q(n,"options"),c=Q(r,"options");l!==c&&e.options.set(c)}if(et(r,"data")){const l=Q(n,"data"),c=Q(r,"data");l!==c&&e.data.set(c)}if(et(r,"state")){const l=Q(n,"state"),c=Q(r,"state");l!==c&&e.state.set(c)}if(et(r,"mapTypes")){const l=Q(n,"mapTypes"),c=Q(r,"mapTypes");l!==c&&(e.removeAllMapTypes(),c.forEach(f=>e.addMapType(f)))}pr(e,s,i),tt(a,o,e)}static unmountControl(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n);e!==null&&(Object.keys(o).forEach(s=>Un(e,s,o[s])),i.controls&&typeof i.controls.remove=="function"?i.controls.remove(e):i.remove&&typeof i.remove=="function"&&i.remove(e),tt(r))}}class ro extends u.Component{constructor(){super(),this.state={instance:null},this.instance=null}componentDidMount(){const e=ro.mountObject(this.props.ymaps.Clusterer,this.props);this.instance=e,this.setState({instance:e})}componentDidUpdate(e){this.state.instance!==null&&ro.updateObject(this.instance,e,this.props)}componentWillUnmount(){ro.unmountObject(this.instance,this.props)}render(){return u.createElement(Uo.Provider,{value:this.state.instance},this.props.children)}static mountObject(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n),s=new e(Q(n,"options"));if(Object.keys(o).forEach(a=>Bn(s,a,o[a])),i.geoObjects&&typeof i.geoObjects.add=="function")i.geoObjects.add(s);else{if(!i.add||typeof i.add!="function")throw new Error("No parent found to mount Clusterer");i.add(s)}return tt(null,r,s),s}static updateObject(e,n,r){const{_events:i,instanceRef:o}=Ve(r),{_events:s,instanceRef:a}=Ve(n);if(et(r,"options")){const l=Q(n,"options"),c=Q(r,"options");l!==c&&e.options.set(c)}pr(e,s,i),tt(a,o,e)}static unmountObject(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n);e!==null&&(Object.keys(o).forEach(s=>Un(e,s,o[s])),i.geoObjects&&typeof i.geoObjects.remove=="function"?i.geoObjects.remove(e):i.remove&&typeof i.remove=="function"&&i.remove(e),tt(r))}}class Yr extends u.Component{constructor(){super(),this.state={instance:null}}componentDidMount(){const e=Yr.mountObject(this.props.ymaps.ObjectManager,this.props);this.instance=e,this.setState({instance:e})}componentDidUpdate(e){this.instance!==null&&Yr.updateObject(this.instance,e,this.props)}componentWillUnmount(){Yr.unmountObject(this.instance,this.props)}render(){return null}static mountObject(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n),s=Q(n,"options",{}),a=Q(n,"features",{}),l=Q(n,"filter",null),c=Q(n,"objects",{}),f=Q(n,"clusters",{}),d=new e(s);if(d.add(a||[]),d.setFilter(l),d.objects.options.set(c),d.clusters.options.set(f),Object.keys(o).forEach(p=>Bn(d,p,o[p])),i.geoObjects&&typeof i.geoObjects.add=="function")i.geoObjects.add(d);else{if(!i.add||typeof i.add!="function")throw new Error("No parent found to mount ObjectManager");i.add(d)}return tt(null,r,d),d}static updateObject(e,n,r){const{_events:i,instanceRef:o}=Ve(r),{_events:s,instanceRef:a}=Ve(n);if(et(r,"options")){const l=Q(n,"options"),c=Q(r,"options");l!==c&&e.options.set(c)}if(et(r,"objects")){const l=Q(n,"objects"),c=Q(r,"objects");l!==c&&e.objects.options.set(c)}if(et(r,"clusters")){const l=Q(n,"clusters"),c=Q(r,"clusters");l!==c&&e.clusters.options.set(c)}if(et(r,"filter")){const l=Q(n,"filter"),c=Q(r,"filter");l!==c&&e.setFilter(c)}if(et(r,"features")){const l=Q(n,"features"),c=Q(r,"features");l!==c&&(e.remove(l),e.add(c))}pr(e,s,i),tt(a,o,e)}static unmountObject(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n);e!==null&&(Object.keys(o).forEach(s=>Un(e,s,o[s])),i.geoObjects&&typeof i.geoObjects.remove=="function"?i.geoObjects.remove(e):i.remove&&typeof i.remove=="function"&&i.remove(e),tt(r))}}var _E=Oa(Ed(_a(Yr,!0,["ObjectManager"])));class Qr extends u.Component{constructor(){super(),this.state={instance:null},this.instance=null}componentDidMount(){const{name:e,ymaps:n,dangerZone:r}=this.props,i=Qr.mountObject(r&&typeof r.modifyConstructor=="function"?r.modifyConstructor(n[e]):n[e],this.props);this.instance=i,this.setState({instance:i})}componentDidUpdate(e){this.instance!==null&&Qr.updateObject(this.instance,e,this.props)}componentWillUnmount(){Qr.unmountObject(this.instance,this.props)}render(){return null}static mountObject(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n),s=new e(Q(n,"geometry"),Q(n,"properties"),Q(n,"options"));if(Object.keys(o).forEach(a=>Bn(s,a,o[a])),i&&i.geoObjects&&typeof i.geoObjects.add=="function")i.geoObjects.add(s);else{if(!i||!i.add||typeof i.add!="function")throw new Error(`No parent found to mount ${n.name}`);i.add(s)}return tt(null,r,s),s}static updateObject(e,n,r){const{_events:i,instanceRef:o}=Ve(r),{_events:s,instanceRef:a}=Ve(n);if(et(r,"geometry")){const l=Q(n,"geometry",{}),c=Q(r,"geometry",{});Array.isArray(c)&&c!==l?Array.isArray(c[0])&&typeof c[1]=="number"?(e.geometry.setCoordinates(c[0]),e.geometry.setRadius(c[1])):e.geometry.setCoordinates(c):typeof c=="object"&&(c.coordinates!==l.coordinates&&e.geometry.setCoordinates(c.coordinates),c.radius!==l.radius&&e.geometry.setRadius(c.radius))}if(et(r,"properties")){const l=Q(n,"properties"),c=Q(r,"properties");l!==c&&e.properties.set(c)}if(et(r,"options")){const l=Q(n,"options"),c=Q(r,"options");l!==c&&e.options.set(c)}pr(e,s,i),tt(a,o,e)}static unmountObject(e,n){const{instanceRef:r,parent:i,_events:o}=Ve(n);e!==null&&(Object.keys(o).forEach(s=>Un(e,s,o[s])),i.geoObjects&&typeof i.geoObjects.remove=="function"?i.geoObjects.remove(e):i.remove&&typeof i.remove=="function"&&i.remove(e),tt(r))}}var zc=Oa(Ed(_a(t=>u.createElement(Qr,jn({},t,{name:"Placemark"})),!0,["Placemark"])));const $c=(t,e,n)=>t==null?void 0:t.map(r=>{var i;return{id:r.uid,type:"Feature",properties:{point:r},geometry:{type:"Point",coordinates:[r.location.latitude,r.location.longitude]},options:{hideIconOnBalloonOpen:!1,preset:io(r.type),balloonOffset:[0,-Yn[1]],balloonContentLayout:(i=e==null?void 0:e.templateLayoutFactory)==null?void 0:i.createClass(n)}}}),io=(t,e)=>t===30?`custom#pin-locker${e?`__${e}`:""}`:`custom#pin-pvz${e?`__${e}`:""}`,Nr=t=>[-(t[0]/2),-t[1]],OE={en:"en_US",ru:"ru_RU"},ME={load:"suggest",apikey:"5298a725-4baa-457a-a2a7-c3abac81db20"},PE=["templateLayoutFactory","option.presetStorage","geocode"],kE=["objectManager.addon.objectsBalloon"],Hc=["geoObject.addon.balloon"],RE={yandexMapDisablePoiInteractivity:!1},TE={clusterize:!0},Gc={iconImageSize:Yt,iconLayout:"default#image",hideIconOnBalloonOpen:!1,balloonOffset:[0,-Yt[1]],iconImageOffset:Nr(Yt)},AE="MapYandex-module__root__r3kDJ8",DE="MapYandex-module__overlay__f7UGYS",IE="MapYandex-module__details__E3bDvL",fs={root:AE,overlay:DE,details:IE},jE=({className:t})=>{const{t:e}=jt(["courier_balloon","common"]),n=u.useRef(),r=u.useRef(null),{map:i,locale:o,disableCourierDelivery:s,hideDetails:a,hideMapUI:l,onPointClick:c}=mt(),[f,d]=u.useState(null),[p,v]=u.useState([]),[g,h]=u.useState(TE),S=Fe(D=>D.setLoaded),E=Fe(D=>D.setDetailsOpen),b=Nn(),y=zt(D=>D.points),x=zt(D=>D.loading),L=zt(D=>D.loadNext),m=bt(D=>D.courierPoint),w=bt(D=>D.setCourierPoint),_=It(D=>D.location),P=It(D=>D.setSelectedPoint),M=u.useRef([]),O=u.useMemo(()=>zi.renderToString(C.jsx(bd,{SSR:!0,hideDetails:a})).replace("{ choose }",e("choose")).replace("{ details }",e("details")),[e,o,a]),k=u.useMemo(()=>zi.renderToString(C.jsx(Qs,{SSR:!0,variant:"default",hideDetails:a})).replace("{ details }",e("details",{ns:"common"})).replace("{ courier_balloon.title }",e("title")),[e,o,a]),I=u.useMemo(()=>zi.renderToString(C.jsx(Qs,{SSR:!0,variant:"error",hideDetails:a})).replace("{ courier_balloon.error_title }",e("error_title")).replace("{ courier_balloon.error_description }",e("error_description")),[e,o,a]),B=u.useMemo(()=>({zoom:(i==null?void 0:i.initialZoom)??oa,center:(i==null?void 0:i.center)??co,behaviors:["default","scrollZoom"]}),[i==null?void 0:i.center,i==null?void 0:i.initialZoom]);u.useEffect(()=>{var D,W;(W=n.current)==null||W.events.fire("boundschange",{newBounds:(D=n.current)==null?void 0:D.getBounds()})},[f]),u.useEffect(()=>{var W;if(!f||!r.current)return;for(const q of M.current)q.id!==(_==null?void 0:_.uid)&&((W=r.current)==null||W.remove(q));const D=$c(y,f,O);M.current=D,r.current.add(D)},[O,f,y,_==null?void 0:_.uid]);const H=u.useCallback(D=>{const W=D.get("newBounds");L([[W[0][0],W[1][0]],[W[0][1],W[1][1]]],b)},[b,L]),Z=u.useRef(_),F=u.useCallback(D=>{var W,q,te,re;d(D),S(),(W=D==null?void 0:D.option)==null||W.presetStorage.add("custom#pin-locker",{iconImageSize:Yt,iconLayout:"default#image",iconImageHref:un(Pt(kt.PinLocker,"--owl-color-primary")),iconImageOffset:Nr(Yt)}),(q=D==null?void 0:D.option)==null||q.presetStorage.add("custom#pin-locker__active",{iconLayout:"default#image",iconImageHref:un(Pt(kt.PinLocker,"--owl-color-success")),iconImageSize:Yn,iconImageOffset:Nr(Yn)}),(te=D==null?void 0:D.option)==null||te.presetStorage.add("custom#pin-pvz",{iconImageSize:Yt,iconLayout:"default#image",iconImageHref:un(Pt(kt.PinPvz,"--owl-color-grey-80")),iconImageOffset:Nr(Yt)}),(re=D==null?void 0:D.option)==null||re.presetStorage.add("custom#pin-pvz__active",{iconLayout:"default#image",iconImageHref:un(Pt(kt.PinPvz,"--owl-color-black")),iconImageSize:Yn,iconImageOffset:Nr(Yn)}),h(ie=>({...ie,clusterIconColor:td("--owl-color-primary")})),v($c(y,D,O))},[O,y,S]),K=u.useCallback(()=>{E(!0)},[E]),A=u.useCallback(()=>{var D;Z.current&&(c==null||c(Z.current),E(!1),P(null),w(null),(D=n.current)==null||D.balloon.close())},[c,w,E,P]),R=u.useCallback(()=>{var D,W;(D=document.getElementById(lo))==null||D.addEventListener("click",K),(W=document.getElementById(_s))==null||W.addEventListener("click",A)},[A,K]),T=u.useCallback(D=>{var q,te,re,ie,fe,Oe;const W=D.get("objectId");((q=Z.current)==null?void 0:q.uid)===W&&((ie=r.current)==null||ie.objects.setObjectOptions((te=Z.current)==null?void 0:te.uid,{preset:io((re=Z.current)==null?void 0:re.type)}),w(null),P(null),w(null),Z.current=null),(fe=document.getElementById(lo))==null||fe.removeEventListener("click",K),(Oe=document.getElementById(_s))==null||Oe.removeEventListener("click",A)},[A,K,w,P]),V=u.useCallback(D=>{var re,ie,fe,Oe;const W=D.get("objectId"),q=(ie=(re=r.current)==null?void 0:re.objects)==null?void 0:ie.getById(W);if(!q)return;const te=q.properties.point;E(!1),w(null),P(te),(fe=r.current)==null||fe.objects.each(me=>{var Me;const ye=me;(Me=r.current)==null||Me.objects.setObjectOptions(ye.id,{preset:io(ye.properties.point.type)})}),(Oe=r.current)==null||Oe.objects.setObjectOptions(W,{preset:io(te.type,"active")}),Z.current=te},[w,E,P]),z=u.useCallback(async D=>{if(!f||s)return;const W=D.get("coords"),{geoObjects:q}=await f.geocode(W),te=q.get(0),re=te.getAddressLine(),ie=te.properties.get("metaDataProperty.GeocoderMetaData.precision",{});if(P(null),ie!=="exact"){w({coords:W,address:null});return}w({coords:W,address:re})},[s,f,w,P]),$=u.useMemo(()=>{var D;return{...Gc,iconImageHref:un(Pt(kt.PinHome,"--owl-color-success")),balloonContentLayout:(D=f==null?void 0:f.templateLayoutFactory)==null?void 0:D.createClass(k)}},[k,f==null?void 0:f.templateLayoutFactory]),X=u.useMemo(()=>{var D;return{...Gc,iconImageHref:un(Pt(kt.PinHome,"--owl-color-success")),balloonContentLayout:(D=f==null?void 0:f.templateLayoutFactory)==null?void 0:D.createClass(I)}},[I,f==null?void 0:f.templateLayoutFactory]),N=u.useCallback(D=>{var W,q,te,re,ie;(W=D==null?void 0:D.balloon)==null||W.open(),(te=(q=D==null?void 0:D.balloon)==null?void 0:q.events)==null||te.add("open",R),(ie=(re=D==null?void 0:D.balloon)==null?void 0:re.events)==null||ie.add("close",T)},[T,R]);return C.jsxs("div",{className:Se(fs.root,t,{[fs.hideUI]:l}),children:[C.jsx(xE,{query:{...ME,lang:OE[o??"ru"]},children:C.jsxs(Cd,{width:"100%",height:"100%",state:B,instanceRef:n,options:RE,modules:PE,onLoad:F,onClick:z,onBoundsChange:H,children:[(m==null?void 0:m.address)&&C.jsx(zc,{properties:m,modules:Hc,geometry:m.coords,options:$,instanceRef:N},JSON.stringify(m.coords)),m&&!m.address&&C.jsx(zc,{modules:Hc,geometry:m.coords,instanceRef:N,options:X},JSON.stringify(m.coords)),C.jsx(_E,{features:p,instanceRef:r,modules:kE,options:g,onClick:V,onBalloonOpen:R,onBalloonClose:T})]})},o),x&&C.jsx(Ca,{className:fs.overlay,children:C.jsx(ei,{})})]})},NE=u.memo(jE),BE=t=>({google:bE,yandex:NE})[t];function _d(...t){return u.useCallback(e=>{for(const n of t)typeof n=="function"?n(e):n&&typeof n=="object"&&(n.current=e)},t)}const _o=t=>{const e=u.useCallback(()=>{var n;(n=t==null?void 0:t.onClick)==null||n.call(t,t.name)},[t]);return{ref:t==null?void 0:t.ref,name:t==null?void 0:t.name,onClick:e}},UE=()=>{throw new Error("useMediaQuery is a client-only hook")};function VE(t){const e=u.useCallback(r=>{const i=window.matchMedia(t);return i.addEventListener("change",r),()=>{i.removeEventListener("change",r)}},[t]),n=()=>window.matchMedia(t).matches;return u.useSyncExternalStore(e,n,UE)}const FE="768px",zE="1024px",$E="1280px",HE="1536px",GE={screenSm:FE,screenMd:zE,screenLg:$E,screenXl:HE};function di(t){return VE(`(max-width: calc(${GE[t]} - 1px))`)}const WE="Hr-module__root__tBRShh",ZE={root:WE},ds=({className:t,...e})=>C.jsx("hr",{className:Se(ZE.root,t),...e}),qE="Sidebar-module__root__hxXudu",KE="Sidebar-module__closeButton__8k-Ph3",JE="Sidebar-module__open__qMGUBV",YE="Sidebar-module__header__Eu-wRc",QE="Sidebar-module__typeFilter__-lxVdY",XE="Sidebar-module__separator__XDb6rs",eL="Sidebar-module__withRightPadding__knvmuY",tL="Sidebar-module__sheetContent__4iWeTf",nL="Sidebar-module__doneButton__chvXVP",Kt={root:qE,closeButton:KE,open:JE,header:YE,typeFilter:QE,separator:XE,withRightPadding:eL,sheetContent:tL,doneButton:nL},rL=()=>{const{t}=jt("common"),e=di("screenSm"),n=ir(i=>i.toggle),r=()=>{n(!1)};return C.jsxs("div",{className:Kt.header,children:[e&&C.jsx("div",{className:Kt.doneButton,onClick:r,children:t("done")}),!e&&C.jsx(fi,{className:Kt.closeButton,onClick:r})]})},iL="TypeFilter-module__root__FEaBBU",oL="TypeFilter-module__button__RYOzBQ",Ui={root:iL,button:oL},sL=({value:t,onChange:e,className:n})=>{const{t:r}=jt("type_filter"),i=o=>()=>e==null?void 0:e(o);return C.jsxs("div",{className:Se(Ui.root,n),children:[C.jsx(xt,{className:Ui.button,variant:t===qt.All?"primary":"secondary",onClick:i(qt.All),children:r("all")}),C.jsx(xt,{className:Ui.button,variant:t===qt.PostOffice?"primary":"secondary",onClick:i(qt.PostOffice),children:r("post_office")}),C.jsx(xt,{className:Ui.button,variant:t===qt.PickPoint?"primary":"secondary",onClick:i(qt.PickPoint),children:r("pick_point")})]})},aL=({className:t,onChange:e})=>{const n=Nn(r=>r.type);return C.jsx(sL,{value:n,className:t,onChange:e})},lL=u.memo(aL),cL="Radio-module__root__FMbfCi",uL="Radio-module__label__-LLJSR",Wc={root:cL,label:uL},fL=({label:t,className:e,labelProps:n={},...r})=>{const{className:i,...o}=n;return C.jsxs("label",{className:Se(Wc.label,i),...o,children:[C.jsx("input",{type:"radio",className:Se(Wc.root,e),...r}),t]})},nr=t=>C.jsx(fL,{...t,type:"checkbox"}),dL="RadioGroup-module__root__wNjmrq",pL="RadioGroup-module__body__n4Ho0-",hL="RadioGroup-module__legend__ECksBN",ps={root:dL,body:pL,legend:hL},Od=({label:t,value:e,onChange:n,children:r,className:i,...o})=>C.jsxs("div",{className:Se(ps.root,i),...o,children:[t&&C.jsx("span",{className:ps.legend,children:t}),C.jsx("div",{className:ps.body,children:u.Children.map(r,s=>u.isValidElement(s)?u.cloneElement(s,{checked:!!(e!=null&&e[s.props.value]),onChange:a=>n==null?void 0:n({...e,[a.target.value]:a.target.checked})}):null)})]}),gL=({className:t,onChange:e})=>{const{t:n}=jt("send_filter"),r=Nn(i=>i.send);return C.jsxs(Od,{className:t,value:r,label:n("title"),onChange:e,children:[C.jsx(nr,{name:"send",value:Dt.Return,label:n("sending_returns")}),C.jsx(nr,{name:"send",value:Dt.Shipping,label:n("shipping")}),C.jsx(nr,{name:"send",value:Dt.Payment,label:n("payment")})]})},vL=u.memo(gL),mL=({className:t,onChange:e})=>{const{t:n}=jt("receive_filter"),r=Nn(i=>i.receive);return C.jsxs(Od,{value:r,label:n("title"),onChange:e,className:t,children:[C.jsx(nr,{name:"receive",value:At.DressingRoom,label:n("dressing_room")}),C.jsx(nr,{name:"receive",value:At.CheckOrder,label:n("check_order")}),C.jsx(nr,{name:"receive",value:At.PayByCash,label:n("pay_by_cash")})]})},yL=u.memo(mL);const bL=({className:t})=>{const e=di("screenSm"),n=ir(f=>f.open),r=ir(f=>f.toggle),i=Nn(f=>f.setFilter),o=u.useCallback(f=>i({type:f}),[i]),s=u.useCallback(f=>i({send:f}),[i]),a=u.useCallback(f=>i({receive:f}),[i]),l=u.useCallback(()=>r(!1),[r]),c=C.jsxs(C.Fragment,{children:[C.jsx(rL,{}),C.jsxs("div",{className:Kt.withRightPadding,children:[C.jsx(lL,{className:Kt.typeFilter,onChange:o}),C.jsx(ds,{className:Kt.separator}),C.jsx(yL,{onChange:a}),C.jsx(ds,{}),C.jsx(vL,{onChange:s}),C.jsx(ds,{})]})]});return e?C.jsx(kf,{initialFocusRef:!1,open:n,snapPoints:({maxHeight:f})=>f-ud,onDismiss:l,children:C.jsx("div",{className:Kt.sheetContent,children:c})}):C.jsx("div",{className:Se(Kt.root,t,{[Kt.open]:n}),children:c})},wL=t=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:60,height:40,fill:"none",viewBox:"0 0 60 40",...t},de.createElement("path",{d:"M0 0h52a8 8 0 0 1 8 8v24a8 8 0 0 1-8 8H0V0Z"}),de.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,strokeWidth:1.5,d:"M32.093 10h13.814c1.151 0 2.093.91 2.093 2.02v2.223c0 .808-.523 1.818-1.047 2.324l-4.5 3.839c-.627.505-1.046 1.515-1.046 2.323v4.344c0 .607-.419 1.415-.942 1.718L39 29.7c-1.36.808-3.244-.101-3.244-1.717v-5.355c0-.707-.419-1.616-.837-2.121l-3.977-4.041c-.523-.506-.942-1.415-.942-2.02V12.12c0-1.21.942-2.12 2.093-2.12Z"})),SL=t=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:28,height:28,fill:"none",viewBox:"0 0 28 28",...t},de.createElement("rect",{width:28,height:28,fill:"#333",rx:4}),de.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,d:"M9.165 7h9.67c.806 0 1.465.636 1.465 1.414V9.97c0 .566-.366 1.273-.733 1.627l-3.15 2.687c-.44.353-.732 1.06-.732 1.627v3.04c0 .425-.293.99-.66 1.203L14 20.79c-.952.566-2.271-.07-2.271-1.202V15.84c0-.495-.293-1.132-.586-1.485l-2.784-2.83c-.366-.353-.659-.99-.659-1.413V8.485C7.7 7.636 8.36 7 9.165 7Z"})),EL="MapContainer-module__root__nze9pB",LL="MapContainer-module__mapWrapper__twRo4C",xL="MapContainer-module__wrapperBlurred__U-Ohae",CL="MapContainer-module__locationSelector__lEiSKq",_L="MapContainer-module__filterButton__jIRGu9",OL="MapContainer-module__sidebarOpen__sUhaH-",ML="MapContainer-module__filterIcon__-2Qd2d",PL="MapContainer-module__details__sAP6T2",Ft={root:EL,mapWrapper:LL,wrapperBlurred:xL,locationSelector:CL,filterButton:_L,sidebarOpen:OL,filterIcon:ML,details:PL},kL=()=>{const t=ir(i=>i.open),e=ir(i=>i.toggle),n=di("screenSm"),r=()=>{e(!0)};return C.jsxs("div",{className:Se(Ft.filterButton,{[Ft.sidebarOpen]:t}),onClick:n?void 0:r,children:[n&&C.jsx(Tu,{}),n?C.jsx(SL,{className:Ft.filterIcon,onClick:r}):C.jsx(wL,{className:Ft.filterIcon})]})};var Md={},Vo={},Pd={exports:{}},RL="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",TL=RL,AL=TL;function kd(){}function Rd(){}Rd.resetWarningCache=kd;var DL=function(){function t(r,i,o,s,a,l){if(l!==AL){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:Rd,resetWarningCache:kd};return n.PropTypes=n,n};Pd.exports=DL();var IL=Pd.exports,Fo={},cr={};Object.defineProperty(cr,"__esModule",{value:!0});cr.loadGoogleMapScript=cr.isBrowser=void 0;var Td=typeof window<"u"&&window.document;cr.isBrowser=Td;var jL=function(e,n){if(!Td||typeof google<"u"&&google.maps&&google.maps.api)return Promise.resolve();var r=document.querySelectorAll('script[src*="'.concat(e,'"]'));if(r&&r.length)return new Promise(function(s){if(typeof google<"u")return s();r[0].addEventListener("load",function(){return s()})});var i=new URL(n);i.searchParams.set("callback","__REACT_GOOGLE_AUTOCOMPLETE_CALLBACK__");var o=document.createElement("script");return o.src=i.toString(),new Promise(function(s){window.__REACT_GOOGLE_AUTOCOMPLETE_CALLBACK__=s,document.body.appendChild(o)})};cr.loadGoogleMapScript=jL;var zo={};Object.defineProperty(zo,"__esModule",{value:!0});zo.GOOGLE_MAP_SCRIPT_BASE_URL=void 0;var NL="https://maps.googleapis.com/maps/api/js";zo.GOOGLE_MAP_SCRIPT_BASE_URL=NL;function oo(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?oo=function(n){return typeof n}:oo=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},oo(t)}Object.defineProperty(Fo,"__esModule",{value:!0});Fo.default=$L;var vt=UL(u),hs=cr,BL=zo;function Ad(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(Ad=function(i){return i?n:e})(t)}function UL(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||oo(t)!=="object"&&typeof t!="function")return{default:t};var n=Ad(e);if(n&&n.has(t))return n.get(t);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(o!=="default"&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}return r.default=t,n&&n.set(t,r),r}function Zc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function qc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Zc(Object(n),!0).forEach(function(r){VL(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Zc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function VL(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function FL(t,e){if(t==null)return{};var n=zL(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function zL(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function $L(t){var e=t.ref,n=t.onPlaceSelected,r=t.apiKey,i=t.libraries,o=i===void 0?"places":i,s=t.inputAutocompleteValue,a=s===void 0?"new-password":s,l=t.options;l=l===void 0?{}:l;var c=l.types,f=c===void 0?["(cities)"]:c,d=l.componentRestrictions,p=l.fields,v=p===void 0?["address_components","geometry.location","place_id","formatted_address"]:p,g=l.bounds,h=FL(l,["types","componentRestrictions","fields","bounds"]),S=t.googleMapsScriptBaseUrl,E=S===void 0?BL.GOOGLE_MAP_SCRIPT_BASE_URL:S,b=t.language,y=(0,vt.useRef)(null),x=(0,vt.useRef)(null),L=(0,vt.useRef)(null),m=(0,vt.useRef)(null),w=b?"&language=".concat(b):"",_="".concat(E,"?libraries=").concat(o,"&key=").concat(r).concat(w),P=(0,vt.useCallback)(function(){return(0,hs.loadGoogleMapScript)(E,_)},[E,_]);return(0,vt.useEffect)(function(){var M=qc(qc({},h),{},{fields:v,types:f,bounds:g});if(d&&(M.componentRestrictions=d),!(L.current||!y.current||!hs.isBrowser)){e&&!e.current&&(e.current=y.current);var O=function(){var I;if(typeof google>"u")return console.error("Google has not been found. Make sure your provide apiKey prop.");if(!((I=google.maps)!==null&&I!==void 0&&I.places))return console.error("Google maps places API must be loaded.");if(!y.current instanceof HTMLInputElement)return console.error("Input ref must be HTMLInputElement.");L.current=new google.maps.places.Autocomplete(y.current,M),L.current&&(x.current=L.current.addListener("place_changed",function(){n&&L&&L.current&&n(L.current.getPlace(),y.current,L.current)}))};return r?P().then(function(){return O()}):O(),function(){return x.current?x.current.remove():void 0}}},[]),(0,vt.useEffect)(function(){var M;!(vt.default!==null&&vt.default!==void 0&&(M=vt.default.version)!==null&&M!==void 0&&M.startsWith("18"))&&hs.isBrowser&&window.MutationObserver&&y.current&&y.current instanceof HTMLInputElement&&(m.current=new MutationObserver(function(){m.current.disconnect(),y.current&&(y.current.autocomplete=a)}),m.current.observe(y.current,{attributes:!0,attributeFilter:["autocomplete"]}))},[a]),(0,vt.useEffect)(function(){L.current&&L.current.setFields(v)},[v]),(0,vt.useEffect)(function(){L.current&&L.current.setBounds(g)},[g]),(0,vt.useEffect)(function(){L.current&&L.current.setComponentRestrictions(d)},[d]),(0,vt.useEffect)(function(){L.current&&L.current.setOptions(h)},[h]),{ref:y,autocompleteRef:L}}function so(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?so=function(n){return typeof n}:so=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},so(t)}Object.defineProperty(Vo,"__esModule",{value:!0});Vo.default=void 0;var Xs=GL(u),We=Dd(IL),HL=Dd(Fo);function Dd(t){return t&&t.__esModule?t:{default:t}}function Id(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(Id=function(i){return i?n:e})(t)}function GL(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||so(t)!=="object"&&typeof t!="function")return{default:t};var n=Id(e);if(n&&n.has(t))return n.get(t);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(o!=="default"&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}return r.default=t,n&&n.set(t,r),r}function Oo(){return Oo=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Oo.apply(this,arguments)}function WL(t,e){if(t==null)return{};var n=ZL(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function ZL(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function jd(t){var e=t.onPlaceSelected,n=t.apiKey,r=t.libraries,i=t.inputAutocompleteValue,o=t.options,s=t.googleMapsScriptBaseUrl,a=t.refProp,l=t.language,c=WL(t,["onPlaceSelected","apiKey","libraries","inputAutocompleteValue","options","googleMapsScriptBaseUrl","refProp","language"]),f=(0,HL.default)({ref:a,googleMapsScriptBaseUrl:s,onPlaceSelected:e,apiKey:n,libraries:r,inputAutocompleteValue:i,options:o,language:l}),d=f.ref;return Xs.default.createElement("input",Oo({ref:d},c))}jd.propTypes={apiKey:We.default.string,libraries:We.default.arrayOf(We.default.string),ref:We.default.oneOfType([We.default.func,We.default.shape({current:We.default.any})]),googleMapsScriptBaseUrl:We.default.string,onPlaceSelected:We.default.func,inputAutocompleteValue:We.default.string,options:We.default.shape({componentRestrictions:We.default.object,bounds:We.default.object,location:We.default.object,offset:We.default.number,origin:We.default.object,radius:We.default.number,sessionToken:We.default.object,types:We.default.arrayOf(We.default.string)}),language:We.default.string};var qL=(0,Xs.forwardRef)(function(t,e){return Xs.default.createElement(jd,Oo({},t,{refProp:e}))});Vo.default=qL;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(t,"usePlacesWidget",{enumerable:!0,get:function(){return n.default}});var e=r(Vo),n=r(Fo);function r(i){return i&&i.__esModule?i:{default:i}}})(Md);var Nd=Md;const KL=t=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20",...t},de.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M14.617 16.032a9 9 0 1 1 1.414-1.414l3.676 3.675a1 1 0 0 1-1.414 1.414l-3.676-3.675ZM2 9a7 7 0 1 1 12.04 4.858 1.005 1.005 0 0 0-.182.182A7 7 0 0 1 2 9Z",clipRule:"evenodd"})),JL="Input-module__root__4cwtKq",YL="Input-module__endAdornment__Tv4vyT",QL="Input-module__input__qeMAQB",XL="Input-module__startAdornment__4bXzn1",e1="Input-module__label__N2eUZ2",t1="Input-module__inputContainer__Ticemx",qn={root:JL,endAdornment:YL,input:QL,startAdornment:XL,label:e1,inputContainer:t1},Bd=u.forwardRef(({label:t,className:e,startAdornment:n,endAdornment:r,onChange:i,onBlur:o,inputRef:s,...a},l)=>{const c=u.useRef(null);u.useImperativeHandle(l,()=>({focus:()=>{var d;(d=c.current)==null||d.focus()},blur:()=>{var d;(d=c.current)==null||d.blur()},setValue:d=>{if(i){i({target:{value:d}});return}if(o){o({target:{value:d}});return}c.current&&(c.current.value=d)}}),[o,i]);const f=_d(s,c);return C.jsxs("label",{className:Se(qn.root,e),children:[t&&C.jsx("span",{className:qn.label,children:t}),C.jsxs("div",{className:qn.inputContainer,children:[n&&C.jsx("div",{className:qn.startAdornment,children:n}),C.jsx("input",{...a,ref:f,className:qn.input,onChange:i,onBlur:o}),r&&C.jsx("div",{className:qn.endAdornment,children:r})]})]})}),n1=({className:t})=>{const{t:e}=jt("location_selector"),{country:n,inputs:r,onLocationSelect:i}=mt(),[o,s]=u.useState(""),[a,l]=u.useState(!1),c=Fe(w=>w.setBlurred),f=Fe(w=>w.setDetailsOpen),d=yn(w=>w.setPlace),p=bt(w=>w.setCourierPoint),v=It(w=>w.setSelectedPoint),g=[],h=n?{componentRestrictions:{country:n},types:g}:{types:g},S=w=>{d(w),i==null||i(w)},{ref:E}=Nd.usePlacesWidget({libraries:["places"],options:h,onPlaceSelected:S,inputAutocompleteValue:o}),b=w=>{a&&c(!!w.target.value),s(w.target.value)},y=()=>{o&&c(!0),f(!1),p(null),v(null),l(!0)},x=()=>{c(!1),l(!1)},L=w=>{w.key==="Enter"&&w.preventDefault()},m=_o(r==null?void 0:r.address);return C.jsx(Bd,{...m,inputRef:E,value:o,className:t,endAdornment:C.jsx(KL,{}),placeholder:e("placeholder"),onChange:b,onFocus:y,onBlur:x,onKeyDown:L})},r1=({className:t})=>Fe(n=>n.loaded)?C.jsx(n1,{className:t}):null,i1=u.memo(r1),o1="CourierDetailsModal-module__root__gLu0VW",s1={root:o1},a1=({onClose:t,onSubmit:e,location:n,className:r})=>C.jsx("div",{className:Se(s1.root,r),children:C.jsx(gd,{location:n,onClose:t,onSubmit:e})}),l1="LocationDetailsModal-module__root__AzUydF",c1={root:l1},u1=({onClose:t,onSubmit:e,location:n,className:r})=>{const i=()=>{e==null||e(n)};return C.jsx("div",{className:Se(c1.root,r),children:C.jsx(yd,{location:n,onClose:t,onSubmit:i})})},f1=()=>{const{onPointClick:t}=mt(),e=Fe(c=>c.detailsOpen),n=Fe(c=>c.setDetailsOpen),r=It(c=>c.location),i=It(c=>c.setSelectedPoint),o=bt(c=>c.courierPoint),s=bt(c=>c.setCourierPoint),a=u.useCallback(()=>{n(!1)},[n]),l=u.useCallback(c=>{t==null||t(c),n(!1),i(null),s(null)},[t,s,n,i]);return C.jsxs(C.Fragment,{children:[(o==null?void 0:o.address)&&e&&C.jsx(a1,{location:o,className:Ft.details,onClose:a,onSubmit:l}),r&&e&&C.jsx(u1,{location:r,className:Ft.details,onClose:a,onSubmit:l})]})},d1=({className:t,children:e})=>{const{hideFilters:n,hideSearchInput:r}=mt(),i=Fe(s=>s.blurred),o=Fe(s=>s.detailsOpen);return C.jsxs("div",{className:Se(Ft.root,t),children:[!r&&!o&&C.jsx(i1,{className:Ft.locationSelector}),!n&&C.jsx(kL,{}),C.jsx("div",{className:Se(Ft.mapWrapper,{[Ft.wrapperBlurred]:i}),children:e}),C.jsx(f1,{})]})},p1=u.memo(d1),h1="Aside-module__root__JSqCyF",g1="Aside-module__open__t8OMLZ",v1="Aside-module__overlay__0UAvMb",m1="Aside-module__container__KJNP0t",Vi={root:h1,open:g1,overlay:v1,container:m1},y1=({open:t,children:e,className:n})=>C.jsxs("div",{className:Se(Vi.root,n,{[Vi.open]:t}),children:[C.jsx("div",{className:Vi.overlay}),C.jsx("div",{className:Vi.container,children:e})]}),b1="LocationAside-module__submit__hx8LTK",w1="LocationAside-module__container__KEGf9s",S1="LocationAside-module__selector__ogsvtz",E1="LocationAside-module__label__-FWqoq",L1="LocationAside-module__header__qmaQaV",x1="LocationAside-module__close__bklFI7",Fi={submit:b1,container:w1,selector:S1,label:E1,header:L1,close:x1},C1=u.forwardRef((t,e)=>{const{t:n}=jt(["location_aside","common"]),{country:r,inputs:i,hideCloseButtonOnLocationScreen:o,onLocationSelect:s,onCloseLocationSelector:a}=mt(),l=u.useRef(null),c=yn(x=>x.setPlace),[f,d]=u.useState(""),p=uo(x=>x.open),v=uo(x=>x.toggle);u.useImperativeHandle(e,()=>({open:()=>v(!0),close:()=>v(!1)}),[v]);const g=x=>{v(!1),c(x),s==null||s(x),x!=null&&x.formatted_address&&d(x==null?void 0:x.formatted_address)},h=()=>{v(!1),a==null||a()},S=r?{componentRestrictions:{country:r}}:void 0,E=x=>{d(x.target.value)},{ref:b}=Nd.usePlacesWidget({libraries:["places"],options:S,onPlaceSelected:g,apiKey:"AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA",inputAutocompleteValue:f}),y=_o(i==null?void 0:i.city);return C.jsx(y1,{open:p,children:C.jsx("div",{ref:l,className:Fi.container,children:C.jsxs("div",{className:Fi.selector,children:[C.jsxs("div",{className:Fi.header,children:[C.jsx("div",{className:Fi.label,children:n("choose_city")}),!o&&C.jsx(fi,{position:"relative",onClick:h})]}),C.jsx(Bd,{...y,inputRef:b,value:f,placeholder:n("placeholder"),onChange:E})]})})})}),_1=u.memo(C1),O1=t=>{const e=Vp(["language"]);u.useEffect(()=>{t&&(e.changeLanguage(t),Co.setLanguage(t))},[t,e])},M1=t=>{u.useEffect(()=>{if(t){const e=Object.keys(t);for(const n of e){const r=t[n];r&&Ea(`--owl-color-${n}`,r)}}},[t])},P1=t=>{u.useEffect(()=>{t&&t!==void 0&&Ea("--owl-button-radius",`${t}px`)},[t])},k1=t=>{u.useEffect(()=>{t&&t!==void 0&&Ea("--font",t)},[t])},R1=t=>{const e=uo(r=>r.toggle),n=t==="selector";u.useEffect(()=>{n&&e(!0)},[n,e])},T1=(t,e,n,r)=>{const i=Fe(c=>c.map),o=Fe(c=>c.setLoaded),s=yn(c=>c.setPlace);u.useEffect(()=>{n&&i&&o()},[n,i,o]);const a=t[0],l=t[1];u.useEffect(()=>{if(!n||!i)return;const c=[a,l],f=async()=>{var p;const d=await si(c,"GEOMETRIC_CENTER");s((p=d.results)==null?void 0:p[0],oa)};if(r){f();return}ed(async d=>{var h;const{latitude:p,longitude:v}=d.coords,g=await si([p,v],"GEOMETRIC_CENTER");s((h=g.results)==null?void 0:h[0])},()=>f())},[n,a,l,i,s,e,r])},A1=({children:t,locale:e})=>(O1(e),C.jsx(C.Fragment,{children:t})),Ud=()=>C.jsx(Ca,{children:C.jsx(ei,{})}),D1=({children:t})=>{const e=zt(r=>r.loaded);return zt(r=>r.loading)&&!e?C.jsx(Ud,{}):C.jsx(C.Fragment,{children:t})};Co.setApiKey("AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA");const I1="Widget-module__map__GhmuPO",j1="Widget-module__sidebar__5gQrb3",N1="Widget-module__header__QlBK5m",gs={map:I1,sidebar:j1,header:N1},B1=({config:t,options:e})=>{const n=Nw(t),{map:r,font:i,radius:o,locale:s,palette:a,startScreen:l,hideHeader:c,hideFilters:f,disableGeolocation:d,INN:p}=n;Jt(p,"INN is required"),Bw(p,e),Jt(r==null?void 0:r.provider,"Map provider is required");const v=BE(r.provider);Lw(),k1(i),M1(a),P1(o),R1(l),Jt(s,"Locale is required");const g=u.useRef(s),{isLoaded:h}=ah({language:g.current,libraries:Vg,googleMapsApiKey:"AIzaSyBEboFjQh8dJQlWwWZy-2Zzmw7Dsr6-NiA"});return Jt(r.center,"Map center is required"),Jt(r.initialZoom,"Map initial zoom is required"),T1(r==null?void 0:r.center,r.initialZoom,h,d),C.jsx(Ip,{tolgee:cg,fallback:C.jsx(Ud,{}),children:C.jsx(A1,{locale:s,children:C.jsx(Ru.Provider,{value:n,children:C.jsx(mv,{children:C.jsxs(D1,{children:[!c&&C.jsx(fv,{className:gs.header}),!f&&C.jsx(bL,{className:gs.sidebar}),C.jsx(p1,{className:gs.map,children:C.jsx(v,{})}),C.jsx(_1,{})]})})})})})},Vd=async t=>oi.request({baseURL:"https://api.geo-data.omnic.solutions/api/1.0/",method:"POST",url:"normalize/address",data:t,headers:{Authorization:"Token 9877f9631b2e30570cc1c5aa8c740b0c912efe99a8b6c45c21cf4bd394adc7e9"}});exports.EReceiveFilter=At;exports.ESendFilter=Dt;exports.ETypeFilter=qt;exports.Widget=B1;exports.fetchPointsRequest=Ks;exports.getNormalizedAddress=Vd;
|