@everymatrix/player-account-vault 1.86.2 → 1.86.3
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/components/{PlayerAccountVault-BzYwq2kZ.js → PlayerAccountVault-AwL4VxKN.js} +1753 -1772
- package/components/PlayerAccountVault-B__qzjVG.cjs +18 -0
- package/components/{PlayerAccountVault-DELuJE13.js → PlayerAccountVault-tFy7Dieo.js} +1088 -1107
- package/es2015/player-account-vault.cjs +1 -1
- package/es2015/player-account-vault.js +1 -1
- package/package.json +1 -1
- package/components/PlayerAccountVault-CcbEUTOL.cjs +0 -18
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";var hi=Object.defineProperty,fi=Object.defineProperties;var pi=Object.getOwnPropertyDescriptors;var Mn=Object.getOwnPropertySymbols;var di=Object.prototype.hasOwnProperty,mi=Object.prototype.propertyIsEnumerable;var Qt=(e,t,n)=>t in e?hi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ie=(e,t)=>{for(var n in t||(t={}))di.call(t,n)&&Qt(e,n,t[n]);if(Mn)for(var n of Mn(t))mi.call(t,n)&&Qt(e,n,t[n]);return e},Yt=(e,t)=>fi(e,pi(t));var ae=(e,t,n)=>(Qt(e,typeof t!="symbol"?t+"":t,n),n);var Bt=(e,t,n)=>new Promise((r,i)=>{var o=l=>{try{s(n.next(l))}catch(u){i(u)}},a=l=>{try{s(n.throw(l))}catch(u){i(u)}},s=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,a);s((n=n.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function I(){}function Ar(e){return e()}function kn(){return Object.create(null)}function we(e){e.forEach(Ar)}function vt(e){return typeof e=="function"}function Gt(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function gi(e){return Object.keys(e).length===0}function Tr(e,...t){if(e==null){for(const r of t)r(void 0);return I}const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function bi(e){let t;return Tr(e,n=>t=n)(),t}function yi(e){return e&&vt(e.destroy)?e.destroy:I}function x(e,t){e.appendChild(t)}function Hn(e,t,n){const r=vi(e);if(!r.getElementById(t)){const i=T("style");i.id=t,i.textContent=n,_i(r,i)}}function vi(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function _i(e,t){return x(e.head||e,t),t.sheet}function H(e,t,n){e.insertBefore(t,n||null)}function B(e){e.parentNode&&e.parentNode.removeChild(e)}function Cr(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function T(e){return document.createElement(e)}function Fn(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function z(e){return document.createTextNode(e)}function D(){return z(" ")}function Ei(){return z("")}function ne(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function xi(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function v(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function kt(e){return e===""?null:+e}function wi(e){return Array.from(e.childNodes)}function re(e,t){t=""+t,e.data!==t&&(e.data=t)}function Ht(e,t){e.value=t==null?"":t}function se(e,t,n){e.classList.toggle(t,!!n)}function Ai(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}let mt;function dt(e){mt=e}function Sr(){if(!mt)throw new Error("Function called outside component initialization");return mt}function Br(e){Sr().$$.on_mount.push(e)}function Ti(e){Sr().$$.on_destroy.push(e)}const Ke=[],Ye=[];let qe=[];const un=[],Hr=Promise.resolve();let cn=!1;function Pr(){cn||(cn=!0,Hr.then(U))}function Ci(){return Pr(),Hr}function hn(e){qe.push(e)}function Un(e){un.push(e)}const Jt=new Set;let ze=0;function U(){if(ze!==0)return;const e=mt;do{try{for(;ze<Ke.length;){const t=Ke[ze];ze++,dt(t),Si(t.$$)}}catch(t){throw Ke.length=0,ze=0,t}for(dt(null),Ke.length=0,ze=0;Ye.length;)Ye.pop()();for(let t=0;t<qe.length;t+=1){const n=qe[t];Jt.has(n)||(Jt.add(n),n())}qe.length=0}while(Ke.length);for(;un.length;)un.pop()();cn=!1,Jt.clear(),dt(e)}function Si(e){if(e.fragment!==null){e.update(),we(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(hn)}}function Bi(e){const t=[],n=[];qe.forEach(r=>e.indexOf(r)===-1?t.push(r):n.push(r)),n.forEach(r=>r()),qe=t}const Rt=new Set;let Me;function ke(){Me={r:0,c:[],p:Me}}function Fe(){Me.r||we(Me.c),Me=Me.p}function G(e,t){e&&e.i&&(Rt.delete(e),e.i(t))}function X(e,t,n,r){if(e&&e.o){if(Rt.has(e))return;Rt.add(e),Me.c.push(()=>{Rt.delete(e),r&&(n&&e.d(1),r())}),e.o(t)}else r&&r()}function Ft(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function Vn(e,t,n){const r=e.$$.props[t];r!==void 0&&(e.$$.bound[r]=n,n(e.$$.ctx[r]))}function gt(e){e&&e.c()}function Je(e,t,n){const{fragment:r,after_update:i}=e.$$;r&&r.m(t,n),hn(()=>{const o=e.$$.on_mount.map(Ar).filter(vt);e.$$.on_destroy?e.$$.on_destroy.push(...o):we(o),e.$$.on_mount=[]}),i.forEach(hn)}function et(e,t){const n=e.$$;n.fragment!==null&&(Bi(n.after_update),we(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Hi(e,t){e.$$.dirty[0]===-1&&(Ke.push(e),Pr(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Pn(e,t,n,r,i,o,a=null,s=[-1]){const l=mt;dt(e);const u=e.$$={fragment:null,ctx:[],props:o,update:I,not_equal:i,bound:kn(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:kn(),dirty:s,skip_bound:!1,root:t.target||l.$$.root};a&&a(u.root);let h=!1;if(u.ctx=n?n(e,t.props||{},(f,c,...m)=>{const _=m.length?m[0]:c;return u.ctx&&i(u.ctx[f],u.ctx[f]=_)&&(!u.skip_bound&&u.bound[f]&&u.bound[f](_),h&&Hi(e,f)),c}):[],u.update(),h=!0,we(u.before_update),u.fragment=r?r(u.ctx):!1,t.target){if(t.hydrate){const f=wi(t.target);u.fragment&&u.fragment.l(f),f.forEach(B)}else u.fragment&&u.fragment.c();t.intro&&G(e.$$.fragment),Je(e,t.target,t.anchor),U()}dt(l)}let Ir;typeof HTMLElement=="function"&&(Ir=class extends HTMLElement{constructor(t,n,r){super();ae(this,"$$ctor");ae(this,"$$s");ae(this,"$$c");ae(this,"$$cn",!1);ae(this,"$$d",{});ae(this,"$$r",!1);ae(this,"$$p_d",{});ae(this,"$$l",{});ae(this,"$$l_u",new Map);this.$$ctor=t,this.$$s=n,r&&this.attachShadow({mode:"open"})}addEventListener(t,n,r){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(n),this.$$c){const i=this.$$c.$on(t,n);this.$$l_u.set(n,i)}super.addEventListener(t,n,r)}removeEventListener(t,n,r){if(super.removeEventListener(t,n,r),this.$$c){const i=this.$$l_u.get(n);i&&(i(),this.$$l_u.delete(n))}}connectedCallback(){return Bt(this,null,function*(){if(this.$$cn=!0,!this.$$c){let t=function(o){return()=>{let a;return{c:function(){a=T("slot"),o!=="default"&&v(a,"name",o)},m:function(u,h){H(u,a,h)},d:function(u){u&&B(a)}}}};if(yield Promise.resolve(),!this.$$cn||this.$$c)return;const n={},r=Ai(this);for(const o of this.$$s)o in r&&(n[o]=[t(o)]);for(const o of this.attributes){const a=this.$$g_p(o.name);a in this.$$d||(this.$$d[a]=Ot(a,o.value,this.$$p_d,"toProp"))}for(const o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:Yt(Ie({},this.$$d),{$$slots:n,$$scope:{ctx:[]}})});const i=()=>{this.$$r=!0;for(const o in this.$$p_d)if(this.$$d[o]=this.$$c.$$.ctx[this.$$c.$$.props[o]],this.$$p_d[o].reflect){const a=Ot(o,this.$$d[o],this.$$p_d,"toAttribute");a==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,a)}this.$$r=!1};this.$$c.$$.after_update.push(i),i();for(const o in this.$$l)for(const a of this.$$l[o]){const s=this.$$c.$on(o,a);this.$$l_u.set(a,s)}this.$$l={}}})}attributeChangedCallback(t,n,r){var i;this.$$r||(t=this.$$g_p(t),this.$$d[t]=Ot(t,r,this.$$p_d,"toProp"),(i=this.$$c)==null||i.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(t){return Object.keys(this.$$p_d).find(n=>this.$$p_d[n].attribute===t||!this.$$p_d[n].attribute&&n.toLowerCase()===t)||t}});function Ot(e,t,n,r){var o;const i=(o=n[e])==null?void 0:o.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!r||!n[e])return t;if(r==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t==null?null:t;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function In(e,t,n,r,i,o){let a=class extends Ir{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map(s=>(t[s].attribute||s).toLowerCase())}};return Object.keys(t).forEach(s=>{Object.defineProperty(a.prototype,s,{get(){return this.$$c&&s in this.$$c?this.$$c[s]:this.$$d[s]},set(l){var u;l=Ot(s,l,t),this.$$d[s]=l,(u=this.$$c)==null||u.$set({[s]:l})}})}),r.forEach(s=>{Object.defineProperty(a.prototype,s,{get(){var l;return(l=this.$$c)==null?void 0:l[s]}})}),e.element=a,a}class Ln{constructor(){ae(this,"$$");ae(this,"$$set")}$destroy(){et(this,1),this.$destroy=I}$on(t,n){if(!vt(n))return I;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),()=>{const i=r.indexOf(n);i!==-1&&r.splice(i,1)}}$set(t){this.$$set&&!gi(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Pi="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Pi);const Ze=[];function Ii(e,t){return{subscribe:$t(e,t).subscribe}}function $t(e,t=I){let n;const r=new Set;function i(s){if(Gt(e,s)&&(e=s,n)){const l=!Ze.length;for(const u of r)u[1](),Ze.push(u,e);if(l){for(let u=0;u<Ze.length;u+=2)Ze[u][0](Ze[u+1]);Ze.length=0}}}function o(s){i(s(e))}function a(s,l=I){const u=[s,l];return r.add(u),r.size===1&&(n=t(i,o)||I),s(e),()=>{r.delete(u),r.size===0&&n&&(n(),n=null)}}return{set:i,update:o,subscribe:a}}function ot(e,t,n){const r=!Array.isArray(e),i=r?[e]:e;if(!i.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const o=t.length<2;return Ii(n,(a,s)=>{let l=!1;const u=[];let h=0,f=I;const c=()=>{if(h)return;f();const _=t(r?u[0]:u,a,s);o?a(_):f=vt(_)?_:I},m=i.map((_,g)=>Tr(_,w=>{u[g]=w,h&=~(1<<g),l&&c()},()=>{h|=1<<g}));return l=!0,c(),function(){we(m),f(),l=!1}})}function Li(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ri=function(t){return Oi(t)&&!Ni(t)};function Oi(e){return!!e&&typeof e=="object"}function Ni(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||ki(e)}var Di=typeof Symbol=="function"&&Symbol.for,Mi=Di?Symbol.for("react.element"):60103;function ki(e){return e.$$typeof===Mi}function Fi(e){return Array.isArray(e)?[]:{}}function bt(e,t){return t.clone!==!1&&t.isMergeableObject(e)?tt(Fi(e),e,t):e}function Ui(e,t,n){return e.concat(t).map(function(r){return bt(r,n)})}function Vi(e,t){if(!t.customMerge)return tt;var n=t.customMerge(e);return typeof n=="function"?n:tt}function Gi(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function Gn(e){return Object.keys(e).concat(Gi(e))}function Lr(e,t){try{return t in e}catch(n){return!1}}function $i(e,t){return Lr(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function ji(e,t,n){var r={};return n.isMergeableObject(e)&&Gn(e).forEach(function(i){r[i]=bt(e[i],n)}),Gn(t).forEach(function(i){$i(e,i)||(Lr(e,i)&&n.isMergeableObject(t[i])?r[i]=Vi(i,n)(e[i],t[i],n):r[i]=bt(t[i],n))}),r}function tt(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||Ui,n.isMergeableObject=n.isMergeableObject||Ri,n.cloneUnlessOtherwiseSpecified=bt;var r=Array.isArray(t),i=Array.isArray(e),o=r===i;return o?r?n.arrayMerge(e,t,n):ji(e,t,n):bt(t,n)}tt.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return tt(r,i,n)},{})};var Wi=tt,Xi=Wi;const zi=Li(Xi);/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation.
|
|
3
|
+
|
|
4
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
5
|
+
purpose with or without fee is hereby granted.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
8
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
9
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
10
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
11
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
+
***************************************************************************** */var fn=function(e,t){return fn=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])},fn(e,t)};function Ae(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");fn(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var N=function(){return N=Object.assign||function(t){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)&&(t[o]=n[o])}return t},N.apply(this,arguments)};function Zi(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function pn(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function dn(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function Qe(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||t)}function en(e,t){var n=t&&t.cache?t.cache:eo,r=t&&t.serializer?t.serializer:Ji,i=t&&t.strategy?t.strategy:qi;return i(e,{cache:n,serializer:r})}function Ki(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Rr(e,t,n,r){var i=Ki(r)?r:n(r),o=t.get(i);return typeof o=="undefined"&&(o=e.call(this,r),t.set(i,o)),o}function Or(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),o=t.get(i);return typeof o=="undefined"&&(o=e.apply(this,r),t.set(i,o)),o}function Rn(e,t,n,r,i){return n.bind(t,e,r,i)}function qi(e,t){var n=e.length===1?Rr:Or;return Rn(e,this,n,t.cache.create(),t.serializer)}function Qi(e,t){return Rn(e,this,Or,t.cache.create(),t.serializer)}function Yi(e,t){return Rn(e,this,Rr,t.cache.create(),t.serializer)}var Ji=function(){return JSON.stringify(arguments)};function On(){this.cache=Object.create(null)}On.prototype.get=function(e){return this.cache[e]};On.prototype.set=function(e,t){this.cache[e]=t};var eo={create:function(){return new On}},tn={variadic:Qi,monadic:Yi},P;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(P||(P={}));var V;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(V||(V={}));var nt;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(nt||(nt={}));function $n(e){return e.type===V.literal}function to(e){return e.type===V.argument}function Nr(e){return e.type===V.number}function Dr(e){return e.type===V.date}function Mr(e){return e.type===V.time}function kr(e){return e.type===V.select}function Fr(e){return e.type===V.plural}function no(e){return e.type===V.pound}function Ur(e){return e.type===V.tag}function Vr(e){return!!(e&&typeof e=="object"&&e.type===nt.number)}function mn(e){return!!(e&&typeof e=="object"&&e.type===nt.dateTime)}var Gr=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,ro=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function io(e){var t={};return e.replace(ro,function(n){var r=n.length;switch(n[0]){case"G":t.era=r===4?"long":r===5?"narrow":"short";break;case"y":t.year=r===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=r===4?"long":r===5?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var oo=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function ao(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(oo).filter(function(c){return c.length>0}),n=[],r=0,i=t;r<i.length;r++){var o=i[r],a=o.split("/");if(a.length===0)throw new Error("Invalid number skeleton");for(var s=a[0],l=a.slice(1),u=0,h=l;u<h.length;u++){var f=h[u];if(f.length===0)throw new Error("Invalid number skeleton")}n.push({stem:s,options:l})}return n}function so(e){return e.replace(/^(.*?)-/,"")}var jn=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,$r=/^(@+)?(\+|#+)?[rs]?$/g,lo=/(\*)(0+)|(#+)(0+)|(0+)/g,jr=/^(0+)$/;function Wn(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace($r,function(n,r,i){return typeof i!="string"?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):i==="+"?t.minimumSignificantDigits=r.length:r[0]==="#"?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+(typeof i=="string"?i.length:0)),""}),t}function Wr(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function uo(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!jr.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Xn(e){var t={},n=Wr(e);return n||t}function co(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=so(i.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=N(N(N({},t),{notation:"scientific"}),i.options.reduce(function(l,u){return N(N({},l),Xn(u))},{}));continue;case"engineering":t=N(N(N({},t),{notation:"engineering"}),i.options.reduce(function(l,u){return N(N({},l),Xn(u))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(i.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(lo,function(l,u,h,f,c,m){if(u)t.minimumIntegerDigits=h.length;else{if(f&&c)throw new Error("We currently do not support maximum integer digits");if(m)throw new Error("We currently do not support exact integer digits")}return""});continue}if(jr.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(jn.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(jn,function(l,u,h,f,c,m){return h==="*"?t.minimumFractionDigits=u.length:f&&f[0]==="#"?t.maximumFractionDigits=f.length:c&&m?(t.minimumFractionDigits=c.length,t.maximumFractionDigits=c.length+m.length):(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length),""});var o=i.options[0];o==="w"?t=N(N({},t),{trailingZeroDisplay:"stripIfInteger"}):o&&(t=N(N({},t),Wn(o)));continue}if($r.test(i.stem)){t=N(N({},t),Wn(i.stem));continue}var a=Wr(i.stem);a&&(t=N(N({},t),a));var s=uo(i.stem);s&&(t=N(N({},t),s))}return t}var Pt={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function ho(e,t){for(var n="",r=0;r<e.length;r++){var i=e.charAt(r);if(i==="j"){for(var o=0;r+1<e.length&&e.charAt(r+1)===i;)o++,r++;var a=1+(o&1),s=o<2?1:3+(o>>1),l="a",u=fo(t);for((u=="H"||u=="k")&&(s=0);s-- >0;)n+=l;for(;a-- >0;)n=u+n}else i==="J"?n+="H":n+=i}return n}function fo(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=e.language,r;n!=="root"&&(r=e.maximize().region);var i=Pt[r||""]||Pt[n||""]||Pt["".concat(n,"-001")]||Pt["001"];return i[0]}var nn,po=new RegExp("^".concat(Gr.source,"*")),mo=new RegExp("".concat(Gr.source,"*$"));function R(e,t){return{start:e,end:t}}var go=!!String.prototype.startsWith&&"_a".startsWith("a",1),bo=!!String.fromCodePoint,yo=!!Object.fromEntries,vo=!!String.prototype.codePointAt,_o=!!String.prototype.trimStart,Eo=!!String.prototype.trimEnd,xo=!!Number.isSafeInteger,wo=xo?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},gn=!0;try{var Ao=zr("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");gn=((nn=Ao.exec("a"))===null||nn===void 0?void 0:nn[0])==="a"}catch(e){gn=!1}var zn=go?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},bn=bo?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",i=t.length,o=0,a;i>o;){if(a=t[o++],a>1114111)throw RangeError(a+" is not a valid code point");r+=a<65536?String.fromCharCode(a):String.fromCharCode(((a-=65536)>>10)+55296,a%1024+56320)}return r},Zn=yo?Object.fromEntries:function(t){for(var n={},r=0,i=t;r<i.length;r++){var o=i[r],a=o[0],s=o[1];n[a]=s}return n},Xr=vo?function(t,n){return t.codePointAt(n)}:function(t,n){var r=t.length;if(!(n<0||n>=r)){var i=t.charCodeAt(n),o;return i<55296||i>56319||n+1===r||(o=t.charCodeAt(n+1))<56320||o>57343?i:(i-55296<<10)+(o-56320)+65536}},To=_o?function(t){return t.trimStart()}:function(t){return t.replace(po,"")},Co=Eo?function(t){return t.trimEnd()}:function(t){return t.replace(mo,"")};function zr(e,t){return new RegExp(e,t)}var yn;if(gn){var Kn=zr("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");yn=function(t,n){var r;Kn.lastIndex=n;var i=Kn.exec(t);return(r=i[1])!==null&&r!==void 0?r:""}}else yn=function(t,n){for(var r=[];;){var i=Xr(t,n);if(i===void 0||Zr(i)||Po(i))break;r.push(i),n+=i>=65536?2:1}return bn.apply(void 0,r)};var So=function(){function e(t,n){n===void 0&&(n={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,n,r){for(var i=[];!this.isEOF();){var o=this.char();if(o===123){var a=this.parseArgument(t,r);if(a.err)return a;i.push(a.val)}else{if(o===125&&t>0)break;if(o===35&&(n==="plural"||n==="selectordinal")){var s=this.clonePosition();this.bump(),i.push({type:V.pound,location:R(s,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(P.UNMATCHED_CLOSING_TAG,R(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&vn(this.peek()||0)){var a=this.parseTag(t,n);if(a.err)return a;i.push(a.val)}else{var a=this.parseLiteral(t,n);if(a.err)return a;i.push(a.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,n){var r=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:V.literal,value:"<".concat(i,"/>"),location:R(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(t+1,n,!0);if(o.err)return o;var a=o.val,s=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!vn(this.char()))return this.error(P.INVALID_TAG,R(s,this.clonePosition()));var l=this.clonePosition(),u=this.parseTagName();return i!==u?this.error(P.UNMATCHED_CLOSING_TAG,R(l,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:V.tag,value:i,children:a,location:R(r,this.clonePosition())},err:null}:this.error(P.INVALID_TAG,R(s,this.clonePosition())))}else return this.error(P.UNCLOSED_TAG,R(r,this.clonePosition()))}else return this.error(P.INVALID_TAG,R(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&Ho(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),i="";;){var o=this.tryParseQuote(n);if(o){i+=o;continue}var a=this.tryParseUnquoted(t,n);if(a){i+=a;continue}var s=this.tryParseLeftAngleBracket();if(s){i+=s;continue}break}var l=R(r,this.clonePosition());return{val:{type:V.literal,value:i,location:l},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Bo(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(r===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(r);this.bump()}return bn.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var r=this.char();return r===60||r===123||r===35&&(n==="plural"||n==="selectordinal")||r===125&&t>0?null:(this.bump(),bn(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(P.EXPECT_ARGUMENT_CLOSING_BRACE,R(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(P.EMPTY_ARGUMENT,R(r,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(P.MALFORMED_ARGUMENT,R(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(P.EXPECT_ARGUMENT_CLOSING_BRACE,R(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:V.argument,value:i,location:R(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(P.EXPECT_ARGUMENT_CLOSING_BRACE,R(r,this.clonePosition())):this.parseArgumentOptions(t,n,i,r);default:return this.error(P.MALFORMED_ARGUMENT,R(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=yn(this.message,n),i=n+r.length;this.bumpTo(i);var o=this.clonePosition(),a=R(t,o);return{value:r,location:a}},e.prototype.parseArgumentOptions=function(t,n,r,i){var o,a=this.clonePosition(),s=this.parseIdentifierIfPossible().value,l=this.clonePosition();switch(s){case"":return this.error(P.EXPECT_ARGUMENT_TYPE,R(a,l));case"number":case"date":case"time":{this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var h=this.clonePosition(),f=this.parseSimpleArgStyleIfPossible();if(f.err)return f;var c=Co(f.val);if(c.length===0)return this.error(P.EXPECT_ARGUMENT_STYLE,R(this.clonePosition(),this.clonePosition()));var m=R(h,this.clonePosition());u={style:c,styleLocation:m}}var _=this.tryParseArgumentClose(i);if(_.err)return _;var g=R(i,this.clonePosition());if(u&&zn(u==null?void 0:u.style,"::",0)){var w=To(u.style.slice(2));if(s==="number"){var f=this.parseNumberSkeletonFromString(w,u.styleLocation);return f.err?f:{val:{type:V.number,value:r,location:g,style:f.val},err:null}}else{if(w.length===0)return this.error(P.EXPECT_DATE_TIME_SKELETON,g);var O=w;this.locale&&(O=ho(w,this.locale));var c={type:nt.dateTime,pattern:O,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?io(O):{}},E=s==="date"?V.date:V.time;return{val:{type:E,value:r,location:g,style:c},err:null}}}return{val:{type:s==="number"?V.number:s==="date"?V.date:V.time,value:r,location:g,style:(o=u==null?void 0:u.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var b=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(P.EXPECT_SELECT_ARGUMENT_OPTIONS,R(b,N({},b)));this.bumpSpace();var C=this.parseIdentifierIfPossible(),M=0;if(s!=="select"&&C.value==="offset"){if(!this.bumpIf(":"))return this.error(P.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,R(this.clonePosition(),this.clonePosition()));this.bumpSpace();var f=this.tryParseDecimalInteger(P.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,P.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(f.err)return f;this.bumpSpace(),C=this.parseIdentifierIfPossible(),M=f.val}var K=this.tryParsePluralOrSelectOptions(t,s,n,C);if(K.err)return K;var _=this.tryParseArgumentClose(i);if(_.err)return _;var $=R(i,this.clonePosition());return s==="select"?{val:{type:V.select,value:r,options:Zn(K.val),location:$},err:null}:{val:{type:V.plural,value:r,options:Zn(K.val),offset:M,pluralType:s==="plural"?"cardinal":"ordinal",location:$},err:null}}default:return this.error(P.INVALID_ARGUMENT_TYPE,R(a,l))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(P.EXPECT_ARGUMENT_CLOSING_BRACE,R(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,n=this.clonePosition();!this.isEOF();){var r=this.char();switch(r){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(P.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,R(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,n){var r=[];try{r=ao(t)}catch(i){return this.error(P.INVALID_NUMBER_SKELETON,n)}return{val:{type:nt.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?co(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,i){for(var o,a=!1,s=[],l=new Set,u=i.value,h=i.location;;){if(u.length===0){var f=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var c=this.tryParseDecimalInteger(P.EXPECT_PLURAL_ARGUMENT_SELECTOR,P.INVALID_PLURAL_ARGUMENT_SELECTOR);if(c.err)return c;h=R(f,this.clonePosition()),u=this.message.slice(f.offset,this.offset())}else break}if(l.has(u))return this.error(n==="select"?P.DUPLICATE_SELECT_ARGUMENT_SELECTOR:P.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,h);u==="other"&&(a=!0),this.bumpSpace();var m=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?P.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:P.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,R(this.clonePosition(),this.clonePosition()));var _=this.parseMessage(t+1,n,r);if(_.err)return _;var g=this.tryParseArgumentClose(m);if(g.err)return g;s.push([u,{value:_.val,location:R(m,this.clonePosition())}]),l.add(u),this.bumpSpace(),o=this.parseIdentifierIfPossible(),u=o.value,h=o.location}return s.length===0?this.error(n==="select"?P.EXPECT_SELECT_ARGUMENT_SELECTOR:P.EXPECT_PLURAL_ARGUMENT_SELECTOR,R(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(P.MISSING_OTHER_CLAUSE,R(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var o=!1,a=0;!this.isEOF();){var s=this.char();if(s>=48&&s<=57)o=!0,a=a*10+(s-48),this.bump();else break}var l=R(i,this.clonePosition());return o?(a*=r,wo(a)?{val:a,err:null}:this.error(n,l)):this.error(t,l)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var n=Xr(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(zn(this.message,t,this.offset())){for(var n=0;n<t.length;n++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var n=this.offset(),r=this.message.indexOf(t,n);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var n=this.offset();if(n===t)break;if(n>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Zr(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),r=this.message.charCodeAt(n+(t>=65536?2:1));return r!=null?r:null},e}();function vn(e){return e>=97&&e<=122||e>=65&&e<=90}function Bo(e){return vn(e)||e===47}function Ho(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Zr(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Po(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function _n(e){e.forEach(function(t){if(delete t.location,kr(t)||Fr(t))for(var n in t.options)delete t.options[n].location,_n(t.options[n].value);else Nr(t)&&Vr(t.style)||(Dr(t)||Mr(t))&&mn(t.style)?delete t.style.location:Ur(t)&&_n(t.children)})}function Io(e,t){t===void 0&&(t={}),t=N({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new So(e,t).parse();if(n.err){var r=SyntaxError(P[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||_n(n.val),n.val}var rt;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(rt||(rt={}));var jt=function(e){Ae(t,e);function t(n,r,i){var o=e.call(this,n)||this;return o.code=r,o.originalMessage=i,o}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),qn=function(e){Ae(t,e);function t(n,r,i,o){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(i).join('", "'),'"'),rt.INVALID_VALUE,o)||this}return t}(jt),Lo=function(e){Ae(t,e);function t(n,r,i){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),rt.INVALID_VALUE,i)||this}return t}(jt),Ro=function(e){Ae(t,e);function t(n,r){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(r,'"'),rt.MISSING_VALUE,r)||this}return t}(jt),te;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(te||(te={}));function Oo(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==te.literal||n.type!==te.literal?t.push(n):r.value+=n.value,t},[])}function No(e){return typeof e=="function"}function Nt(e,t,n,r,i,o,a){if(e.length===1&&$n(e[0]))return[{type:te.literal,value:e[0].value}];for(var s=[],l=0,u=e;l<u.length;l++){var h=u[l];if($n(h)){s.push({type:te.literal,value:h.value});continue}if(no(h)){typeof o=="number"&&s.push({type:te.literal,value:n.getNumberFormat(t).format(o)});continue}var f=h.value;if(!(i&&f in i))throw new Ro(f,a);var c=i[f];if(to(h)){(!c||typeof c=="string"||typeof c=="number")&&(c=typeof c=="string"||typeof c=="number"?String(c):""),s.push({type:typeof c=="string"?te.literal:te.object,value:c});continue}if(Dr(h)){var m=typeof h.style=="string"?r.date[h.style]:mn(h.style)?h.style.parsedOptions:void 0;s.push({type:te.literal,value:n.getDateTimeFormat(t,m).format(c)});continue}if(Mr(h)){var m=typeof h.style=="string"?r.time[h.style]:mn(h.style)?h.style.parsedOptions:r.time.medium;s.push({type:te.literal,value:n.getDateTimeFormat(t,m).format(c)});continue}if(Nr(h)){var m=typeof h.style=="string"?r.number[h.style]:Vr(h.style)?h.style.parsedOptions:void 0;m&&m.scale&&(c=c*(m.scale||1)),s.push({type:te.literal,value:n.getNumberFormat(t,m).format(c)});continue}if(Ur(h)){var _=h.children,g=h.value,w=i[g];if(!No(w))throw new Lo(g,"function",a);var O=Nt(_,t,n,r,i,o),E=w(O.map(function(M){return M.value}));Array.isArray(E)||(E=[E]),s.push.apply(s,E.map(function(M){return{type:typeof M=="string"?te.literal:te.object,value:M}}))}if(kr(h)){var b=h.options[c]||h.options.other;if(!b)throw new qn(h.value,c,Object.keys(h.options),a);s.push.apply(s,Nt(b.value,t,n,r,i));continue}if(Fr(h)){var b=h.options["=".concat(c)];if(!b){if(!Intl.PluralRules)throw new jt(`Intl.PluralRules is not available in this environment.
|
|
15
|
+
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
16
|
+
`,rt.MISSING_INTL_API,a);var C=n.getPluralRules(t,{type:h.pluralType}).select(c-(h.offset||0));b=h.options[C]||h.options.other}if(!b)throw new qn(h.value,c,Object.keys(h.options),a);s.push.apply(s,Nt(b.value,t,n,r,i,c-(h.offset||0)));continue}}return Oo(s)}function Do(e,t){return t?N(N(N({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=N(N({},e[r]),t[r]||{}),n},{})):e}function Mo(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=Do(e[r],t[r]),n},N({},e)):e}function rn(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function ko(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:en(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,Qe([void 0],n,!1)))},{cache:rn(e.number),strategy:tn.variadic}),getDateTimeFormat:en(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,Qe([void 0],n,!1)))},{cache:rn(e.dateTime),strategy:tn.variadic}),getPluralRules:en(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,Qe([void 0],n,!1)))},{cache:rn(e.pluralRules),strategy:tn.variadic})}}var Fo=function(){function e(t,n,r,i){n===void 0&&(n=e.defaultLocale);var o=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(l){var u=o.formatToParts(l);if(u.length===1)return u[0].value;var h=u.reduce(function(f,c){return!f.length||c.type!==te.literal||typeof f[f.length-1]!="string"?f.push(c.value):f[f.length-1]+=c.value,f},[]);return h.length<=1?h[0]||"":h},this.formatToParts=function(l){return Nt(o.ast,o.locales,o.formatters,o.formats,l,void 0,o.message)},this.resolvedOptions=function(){var l;return{locale:((l=o.resolvedLocale)===null||l===void 0?void 0:l.toString())||Intl.NumberFormat.supportedLocalesOf(o.locales)[0]}},this.getAst=function(){return o.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var a=i||{};a.formatters;var s=Zi(a,["formatters"]);this.ast=e.__parse(t,N(N({},s),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=Mo(e.formats,r),this.formatters=i&&i.formatters||ko(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(typeof Intl.Locale!="undefined"){var n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=Io,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();function Uo(e,t){if(t==null)return;if(t in e)return e[t];const n=t.split(".");let r=e;for(let i=0;i<n.length;i++)if(typeof r=="object"){if(i>0){const o=n.slice(i,n.length).join(".");if(o in r){r=r[o];break}}r=r[n[i]]}else r=void 0;return r}const Re={},Vo=(e,t,n)=>n&&(t in Re||(Re[t]={}),e in Re[t]||(Re[t][e]=n),n),Kr=(e,t)=>{if(t==null)return;if(t in Re&&e in Re[t])return Re[t][e];const n=Wt(t);for(let r=0;r<n.length;r++){const i=n[r],o=$o(i,e);if(o)return Vo(e,t,o)}};let Nn;const at=$t({});function Go(e){return Nn[e]||null}function qr(e){return e in Nn}function $o(e,t){if(!qr(e))return null;const n=Go(e);return Uo(n,t)}function jo(e){if(e==null)return;const t=Wt(e);for(let n=0;n<t.length;n++){const r=t[n];if(qr(r))return r}}function Qr(e,...t){delete Re[e],at.update(n=>(n[e]=zi.all([n[e]||{},...t]),n))}ot([at],([e])=>Object.keys(e));at.subscribe(e=>Nn=e);const Dt={};function Wo(e,t){Dt[e].delete(t),Dt[e].size===0&&delete Dt[e]}function Yr(e){return Dt[e]}function Xo(e){return Wt(e).map(t=>{const n=Yr(t);return[t,n?[...n]:[]]}).filter(([,t])=>t.length>0)}function En(e){return e==null?!1:Wt(e).some(t=>{var n;return(n=Yr(t))==null?void 0:n.size})}function zo(e,t){return Promise.all(t.map(r=>(Wo(e,r),r().then(i=>i.default||i)))).then(r=>Qr(e,...r))}const pt={};function Jr(e){if(!En(e))return e in pt?pt[e]:Promise.resolve();const t=Xo(e);return pt[e]=Promise.all(t.map(([n,r])=>zo(n,r))).then(()=>{if(En(e))return Jr(e);delete pt[e]}),pt[e]}const Zo={number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},Ko={fallbackLocale:null,loadingDelay:200,formats:Zo,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},qo=Ko;function it(){return qo}const on=$t(!1);var Qo=Object.defineProperty,Yo=Object.defineProperties,Jo=Object.getOwnPropertyDescriptors,Qn=Object.getOwnPropertySymbols,ea=Object.prototype.hasOwnProperty,ta=Object.prototype.propertyIsEnumerable,Yn=(e,t,n)=>t in e?Qo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,na=(e,t)=>{for(var n in t||(t={}))ea.call(t,n)&&Yn(e,n,t[n]);if(Qn)for(var n of Qn(t))ta.call(t,n)&&Yn(e,n,t[n]);return e},ra=(e,t)=>Yo(e,Jo(t));let xn;const Ut=$t(null);function Jn(e){return e.split("-").map((t,n,r)=>r.slice(0,n+1).join("-")).reverse()}function Wt(e,t=it().fallbackLocale){const n=Jn(e);return t?[...new Set([...n,...Jn(t)])]:n}function Ue(){return xn!=null?xn:void 0}Ut.subscribe(e=>{xn=e!=null?e:void 0,typeof window!="undefined"&&e!=null&&document.documentElement.setAttribute("lang",e)});const ia=e=>{if(e&&jo(e)&&En(e)){const{loadingDelay:t}=it();let n;return typeof window!="undefined"&&Ue()!=null&&t?n=window.setTimeout(()=>on.set(!0),t):on.set(!0),Jr(e).then(()=>{Ut.set(e)}).finally(()=>{clearTimeout(n),on.set(!1)})}return Ut.set(e)},Oe=ra(na({},Ut),{set:ia}),Xt=e=>{const t=Object.create(null);return r=>{const i=JSON.stringify(r);return i in t?t[i]:t[i]=e(r)}};var oa=Object.defineProperty,Vt=Object.getOwnPropertySymbols,ei=Object.prototype.hasOwnProperty,ti=Object.prototype.propertyIsEnumerable,er=(e,t,n)=>t in e?oa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Dn=(e,t)=>{for(var n in t||(t={}))ei.call(t,n)&&er(e,n,t[n]);if(Vt)for(var n of Vt(t))ti.call(t,n)&&er(e,n,t[n]);return e},st=(e,t)=>{var n={};for(var r in e)ei.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Vt)for(var r of Vt(e))t.indexOf(r)<0&&ti.call(e,r)&&(n[r]=e[r]);return n};const yt=(e,t)=>{const{formats:n}=it();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},aa=Xt(e=>{var t=e,{locale:n,format:r}=t,i=st(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return r&&(i=yt("number",r)),new Intl.NumberFormat(n,i)}),sa=Xt(e=>{var t=e,{locale:n,format:r}=t,i=st(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return r?i=yt("date",r):Object.keys(i).length===0&&(i=yt("date","short")),new Intl.DateTimeFormat(n,i)}),la=Xt(e=>{var t=e,{locale:n,format:r}=t,i=st(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return r?i=yt("time",r):Object.keys(i).length===0&&(i=yt("time","short")),new Intl.DateTimeFormat(n,i)}),ua=(e={})=>{var t=e,{locale:n=Ue()}=t,r=st(t,["locale"]);return aa(Dn({locale:n},r))},ca=(e={})=>{var t=e,{locale:n=Ue()}=t,r=st(t,["locale"]);return sa(Dn({locale:n},r))},ha=(e={})=>{var t=e,{locale:n=Ue()}=t,r=st(t,["locale"]);return la(Dn({locale:n},r))},fa=Xt((e,t=Ue())=>new Fo(e,t,it().formats,{ignoreTag:it().ignoreTag})),pa=(e,t={})=>{var n,r,i,o;let a=t;typeof e=="object"&&(a=e,e=a.id);const{values:s,locale:l=Ue(),default:u}=a;if(l==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let h=Kr(e,l);if(!h)h=(o=(i=(r=(n=it()).handleMissingMessage)==null?void 0:r.call(n,{locale:l,id:e,defaultValue:u}))!=null?i:u)!=null?o:e;else if(typeof h!="string")return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof h}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),h;if(!s)return h;let f=h;try{f=fa(h,l).format(s)}catch(c){c instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,c.message)}return f},da=(e,t)=>ha(t).format(e),ma=(e,t)=>ca(t).format(e),ga=(e,t)=>ua(t).format(e),ba=(e,t=Ue())=>Kr(e,t),ya=ot([Oe,at],()=>pa);ot([Oe],()=>da);ot([Oe],()=>ma);ot([Oe],()=>ga);ot([Oe,at],()=>ba);function va({withLocale:e,translations:t}){Oe.subscribe(n=>{n==null&&(at.set(t),Oe.set(e))})}function tr(e,t){Qr(e,t)}function _a(e){Oe.set(e)}const k=bi(ya),nr={en:{vaultExchange:"Vault Exchange",debitPlaceHolder:"Debit amount",creditPlaceHolder:"Credit amount",totalBalance:"Total balance",currentBalance:"Balance",balanceUnavailable:"Balance unavailable. Please try again.",exchangeFrom:"From",exchangeTo:"To",creditAmount:"Credit Amount",debitAmount:"Debit Amount",exchange:"Exchange",accept:"Accept",decline:"Decline",reset:"Reset",select:"Select",exchangeSuccess:"Exchange completed successfully!",feesIncluded:"Fees included",feesUnavailable:"Fees unavailable.",invalidValue:"Invalid value",exceededValue:"Amount exceeds balance",generalError:"An error occurred during the wallet exchange. Please try again.",InternalError:"A technical error occurred. Please try again.",InvalidSession:"Invalid session. Please try again.",1001:"A technical error occurred. Please try again later.",1002:"A database error occurred. Please try again later.",1003:"Invalid parameters provided. Please check your input.",1004:"No changes were detected.",1005:"The data was updated by someone else. Please try again.",1006:"An API error occurred. Please try again later.",1007:"The request timed out. Please try again later.",1008:"Failed to acquire necessary lock. Please try again.",1009:"This feature is currently not enabled.",1010:"Database connection timed out. Please try again later.",1011:"Database command timed out. Please try again later.",1012:"Database is not properly configured. Please contact support.",1013:"Failed to update internal state. Please try again.",1103:"A transaction error occurred. Please try again later.",1105:"Wallet not found.",1504:"You are not permitted to perform this action.",1506:"Fee has been invalidated. Please recalculate.",1507:"This fee addition type is not supported.",1508:"Insufficient funds to apply the fee.",10101:"An unknown technical error occurred.",10102:"User is blocked from performing this action.",10103:"User not found.",10104:"Insufficient funds to withdraw. Requested amount is greater than available balance.",10106:"The selected currency is not supported.",10107:"Transaction is currently being processed. Please wait.",10108:"Transaction not found.",10113:"User is self-excluded. Action cannot be performed.",10114:"User account is not active.",10115:"Transaction intent not found."},tr:{vaultExchange:"Kasa Değişimi",debitPlaceHolder:"Borç miktarı",creditPlaceHolder:"Alacak miktarı",totalBalance:"Toplam bakiye",currentBalance:"Bakiye",balanceUnavailable:"Bakiye kullanılamıyor. Lütfen tekrar deneyin.",exchangeFrom:"Şuradan Değiştir",exchangeTo:"Şuraya Değiştir",creditAmount:"Kredi Tutarı",debitAmount:"Borç Tutarı",exchange:"Değiştir",accept:"Kabul etmek",decline:"Reddetmek",reset:"Sıfırla",select:"Seç",feesIncluded:"Ücretler dahil",feesUnavailable:"Ücretler mevcut değil.",exchangeSuccess:"Değişim başarıyla tamamlandı!",invalidValue:"Geçersiz değer",exceededValue:"Tutar, bakiyeyi aşıyor",generalError:"Cüzdan değişimi sırasında bir hata oluştu. Lütfen tekrar deneyin.",InternalError:"Teknik bir hata oluştu. Lütfen tekrar deneyin.",InvalidSession:"Geçersiz oturum. Lütfen tekrar deneyin.",1001:"Bir teknik hata oluştu. Lütfen daha sonra tekrar deneyin.",1002:"Bir veritabanı hatası oluştu. Lütfen daha sonra tekrar deneyin.",1003:"Geçersiz parametreler sağlandı. Lütfen girdilerinizi kontrol edin.",1004:"Herhangi bir değişiklik tespit edilmedi.",1005:"Veri başka biri tarafından güncellendi. Lütfen tekrar deneyin.",1006:"Bir API hatası oluştu. Lütfen daha sonra tekrar deneyin.",1007:"İstek zaman aşımına uğradı. Lütfen daha sonra tekrar deneyin.",1008:"Gerekli kilit alınamadı. Lütfen tekrar deneyin.",1009:"Bu özellik şu anda etkin değil.",1010:"Veritabanı bağlantısı zaman aşımına uğradı. Lütfen daha sonra tekrar deneyin.",1011:"Veritabanı komutu zaman aşımına uğradı. Lütfen daha sonra tekrar deneyin.",1012:"Veritabanı düzgün yapılandırılmamış. Lütfen destek ile iletişime geçin.",1013:"İç durum güncellenemedi. Lütfen tekrar deneyin.",1103:"Bir işlem hatası oluştu. Lütfen daha sonra tekrar deneyin.",1105:"Cüzdan bulunamadı.",1504:"Bu işlemi gerçekleştirme izniniz yok.",1506:"Ücret geçersiz hale getirildi. Lütfen yeniden hesaplayın.",1507:"Bu ücret ekleme türü desteklenmiyor.",1508:"Ücreti uygulamak için yetersiz bakiye.",10101:"Bilinmeyen bir teknik hata oluştu.",10102:"Kullanıcı bu işlemi gerçekleştirmekten engellenmiştir.",10103:"Kullanıcı bulunamadı.",10104:"Yetersiz bakiye. Talep edilen tutar, mevcut bakiyeden fazladır.",10106:"Seçilen para birimi desteklenmiyor.",10107:"İşlem şu anda işleniyor. Lütfen bekleyin.",10108:"İşlem bulunamadı.",10113:"Kullanıcı kendini dışladı. İşlem gerçekleştirilemez.",10114:"Kullanıcı hesabı aktif değil.",10115:"İşlem niyeti bulunamadı."}};function xe(e){return typeof e=="function"}function ni(e){var t=function(r){Error.call(r),r.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var an=ni(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
|
|
17
|
+
`+n.map(function(r,i){return i+1+") "+r.toString()}).join(`
|
|
18
|
+
`):"",this.name="UnsubscriptionError",this.errors=n}});function wn(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var zt=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=pn(a),l=s.next();!l.done;l=s.next()){var u=l.value;u.remove(this)}}catch(g){t={error:g}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}else a.remove(this);var h=this.initialTeardown;if(xe(h))try{h()}catch(g){o=g instanceof an?g.errors:[g]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var c=pn(f),m=c.next();!m.done;m=c.next()){var _=m.value;try{rr(_)}catch(g){o=o!=null?o:[],g instanceof an?o=Qe(Qe([],dn(o)),dn(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{m&&!m.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}}if(o)throw new an(o)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)rr(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&wn(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&wn(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),ri=zt.EMPTY;function ii(e){return e instanceof zt||e&&"closed"in e&&xe(e.remove)&&xe(e.add)&&xe(e.unsubscribe)}function rr(e){xe(e)?e():e.unsubscribe()}var oi={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Ea={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Qe([e,t],dn(n)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function xa(e){Ea.setTimeout(function(){throw e})}function ir(){}function Mt(e){e()}var ai=function(e){Ae(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,ii(n)&&n.add(r)):r.destination=Ca,r}return t.create=function(n,r,i){return new An(n,r,i)},t.prototype.next=function(n){this.isStopped||this._next(n)},t.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(n){this.destination.next(n)},t.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(zt),wa=Function.prototype.bind;function sn(e,t){return wa.call(e,t)}var Aa=function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(r){It(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){It(r)}else It(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){It(n)}},e}(),An=function(e){Ae(t,e);function t(n,r,i){var o=e.call(this)||this,a;if(xe(n)||!n)a={next:n!=null?n:void 0,error:r!=null?r:void 0,complete:i!=null?i:void 0};else{var s;o&&oi.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&sn(n.next,s),error:n.error&&sn(n.error,s),complete:n.complete&&sn(n.complete,s)}):a=n}return o.destination=new Aa(a),o}return t}(ai);function It(e){xa(e)}function Ta(e){throw e}var Ca={closed:!0,next:ir,error:Ta,complete:ir},Sa=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Ba(e){return e}function Ha(e){return e.length===0?Ba:e.length===1?e[0]:function(n){return e.reduce(function(r,i){return i(r)},n)}}var or=function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(t,n,r){var i=this,o=Ia(t)?t:new An(t,n,r);return Mt(function(){var a=i,s=a.operator,l=a.source;o.add(s?s.call(o,l):l?i._subscribe(o):i._trySubscribe(o))}),o},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},e.prototype.forEach=function(t,n){var r=this;return n=ar(n),new n(function(i,o){var a=new An({next:function(s){try{t(s)}catch(l){o(l),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[Sa]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Ha(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=ar(t),new t(function(r,i){var o;n.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},e.create=function(t){return new e(t)},e}();function ar(e){var t;return(t=e!=null?e:oi.Promise)!==null&&t!==void 0?t:Promise}function Pa(e){return e&&xe(e.next)&&xe(e.error)&&xe(e.complete)}function Ia(e){return e&&e instanceof ai||Pa(e)&&ii(e)}var La=ni(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),si=function(e){Ae(t,e);function t(){var n=e.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return t.prototype.lift=function(n){var r=new sr(this,this);return r.operator=n,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new La},t.prototype.next=function(n){var r=this;Mt(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=pn(r.currentObservers),s=a.next();!s.done;s=a.next()){var l=s.value;l.next(n)}}catch(u){i={error:u}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},t.prototype.error=function(n){var r=this;Mt(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},t.prototype.complete=function(){var n=this;Mt(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},t.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},t.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?ri:(this.currentObservers=null,s.push(n),new zt(function(){r.currentObservers=null,wn(s,n)}))},t.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?n.error(o):a&&n.complete()},t.prototype.asObservable=function(){var n=new or;return n.source=this,n},t.create=function(n,r){return new sr(n,r)},t}(or),sr=function(e){Ae(t,e);function t(n,r){var i=e.call(this)||this;return i.destination=n,i.source=r,i}return t.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},t.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},t.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},t.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:ri},t}(si),li={now:function(){return(li.delegate||Date).now()},delegate:void 0},Ra=function(e){Ae(t,e);function t(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=li);var o=e.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return t.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,a=r._infiniteTimeWindow,s=r._timestampProvider,l=r._windowTime;i||(o.push(n),!a&&o.push(s.now()+l)),this._trimBuffer(),e.prototype.next.call(this,n)},t.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,a=i._buffer,s=a.slice(),l=0;l<s.length&&!n.closed;l+=o?1:2)n.next(s[l]);return this._checkFinalizedStatuses(n),r},t.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,o=n._buffer,a=n._infiniteTimeWindow,s=(a?1:2)*r;if(r<1/0&&s<o.length&&o.splice(0,o.length-s),!a){for(var l=i.now(),u=0,h=1;h<o.length&&o[h]<=l;h+=2)u=h;u&&o.splice(0,u+1)}},t}(si);const lr=[],ur={},Oa=(e,t=0)=>{if(lr.indexOf(e)==-1){const n=new Ra(t);ur[e]=n,lr.push(e)}return ur[e]};let Tn="en-UK",ui="true",Cn=0,Sn="";const Na=(e,t,n,r)=>{Tn=e||"en-UK",ui=t||"true",Cn=+r||0,Sn=n||""},cr=({local:e,options:t={},amount:n})=>{try{return new Intl.NumberFormat(e,t)}catch(r){return console.info(r),new Intl.NumberFormat(e,{minimumFractionDigits:t.minimumFractionDigits,maximumFractionDigits:t.maximumFractionDigits})}},Ne=(e,t,n={},r=!0)=>{const i=Ie(Ie({maximumFractionDigits:Cn,minimumFractionDigits:Cn},r&&{style:"currency",currency:t,currencyDisplay:ui==="true"?"symbol":"code"}),n);if(!Sn)return cr({local:Tn,options:i}).format(e);const a=cr({local:Tn,options:i}).formatToParts(e),s=a.find(({type:h=""}={})=>h==="currency")||{},l=a.filter(({type:h=""}={})=>h!=="currency").map(({value:h=""}={})=>h).join("");return Sn==="before"?`${s.value||t||""} ${l}`:`${l} ${s.value||t||""}`};window.emWidgets={topic:Oa};const Da={"1INCH":"",AAVE:"",ADA:"₳",ADF:"",ADP:"",AED:"د.إ",AFN:"؋",ALGO:"Ⱥ",ALL:"L",AMD:"Դ",AMP:"",ANG:"ƒ",AOA:"Kz",AQAQAAUKXMYQOUSOUJHLTNBOI:"",AQAQAAUXKBXDCWFVEDYIDYHWD:"",AQAQADPGMAZQICGIVARVFRSQS:"",AQAQAFDJIKCUBVVVGVQNBWRDX:"",AQAQAFMRIPFFPCHYHKSGDDGOF:"",AQAQAFRMNSQNCLRLEJGEIDLDO:"",AQAQAJMRAJIZSQTNLYHHJNUIA:"",AQAQAOLFQBZJAPJMVXZDAXXKJ:"",AR:"",ARS:"$",ATOM:"",AUD:"$",AVAX:"",AWG:"ƒ",AXS:"",AZN:"₼",BAM:"KM",BAT:"",BBD:"$",BCH:"Ƀ",BDT:"৳",BGN:"лв",BHD:"ب.د",BIF:"FBu",BMD:"$",BNB:"",BND:"$",BOB:"$b",BORA:"",BRL:"R$",BSD:"$",BSV:"Ɓ",BTC:"₿",BTCB:"",BTN:"Nu.",BTT:"",BUSD:"₮",BWP:"P",BYN:"Br",BYR:"p.",BZD:"BZ$",CAD:"$",CAKE:"",CDF:"FC",CEL:"",CELO:"",CHF:"CHF",CHZ:"",CLP:"$",CNY:"¥",COMP:"",COP:"$",CRC:"₡",CUC:"$",CRO:"",CRV:"",CUC:"",CUP:"₱",CVE:"",CZK:"Kč",DAI:"◈",DASH:"Đ",DCR:"",DJF:"Fdj",DKK:"KR",DOGE:"Ð",DOP:"RD$",DOT:"●",DZD:"د.ج",EEK:"kr",EGLD:"",EGP:"£",ELON:"",ERN:"Nfk",ETB:"Br",ENJ:"",EOS:"ε",ETC:"ξ",ETH:"Ξ",EUR:"€",FIL:"⨎",FJD:"$",FKP:"£",FLOW:"",FTM:"",FTT:"",FUN:"",GALA:"",GBP:"£",GEL:"₾",GGP:"£",GHC:"₵",GCC:"",GHS:"¢",GMD:"D",GNF:"FG",GIP:"£",GRT:"",GTQ:"Q",GYD:"$",HBAR:"",HKD:"$",HNL:"L",HNT:"",HOT:"",HRK:"kn",HTG:"G",HT:"",HUF:"Ft",ICP:"∞",ICX:"",IDR:"Rp",ILS:"₪",IMP:"£",INR:"₹",IOTX:"",IQD:"د.ع",IRR:"﷼",ISK:"KR",JMD:"J$",JOD:"د.ا",JPY:"¥",KCS:"",KDA:"",KMF:"CF",KES:"KSh",KGS:"лв",KHR:"៛",KLAY:"",KPW:"₩",KRW:"₩",KSM:"",KWD:"د.ك",KYD:"$",KZT:"лв",LAK:"₭",LBP:"£",LEO:"",LINK:"",LKR:"₨",LPT:"",LRC:"",LRD:"$",LSL:"M",LTC:"Ł",LUNA:"",LTL:"Lt",LVL:"Ls",MDL:"lei",MGA:"Ar",LYD:"د.ل",MAD:"د.م",MANA:"",MATIC:"",MINA:"",MIOTA:"ɨ",MKD:"ден",MKR:"Μ",MMK:"K",MNT:"₮",MOP:"MOP$",MRO:"UM",MUR:"₨",MVR:"Rf",MWK:"MK",MXN:"$",MYR:"RM",MZN:"MT",NAD:"$",NEAR:"",NEO:"",NEXO:"",NGN:"₦",NIO:"C$",NOK:"KR",NPR:"₨",NZD:"$",OKB:"",OMG:"",OMR:"﷼",ONE:"",PAB:"B/.",PEN:"S/.",PGK:"K",PHP:"₱",PKR:"₨",PLN:"zł",PYG:"₲",QAR:"﷼",QNT:"",QTUM:"",RON:"LEI",ROSE:"",RMB:"¥",RSD:"Дин.",RUB:"₽",RUNE:"",RVN:"",RWF:"R₣",SAND:"",SAR:"﷼",SBD:"$",SCC:"",SCR:"₨",SDG:"د.س",SEK:"KR",SGD:"$",SHIB:"",SHP:"£",SLL:"Le",SSP:"£",STD:"Db",SOL:"",SOS:"S",SRD:"$",STX:"",SUSHI:"",SVC:"$",SYP:"£",SZL:"E",TES:"",TFUEL:"",TJS:"SM",TMT:"T",THB:"฿",THETA:"ϑ",TND:"د.ت",TOP:"T$",TVD:"$",TRL:"₤",TRX:"",TRY:"₺",TTD:"TT$",TUSD:"",TWD:"NT$",TZS:"TSh",UAH:"₴",UGX:"USh",UNI:"",USD:"$",USDC:"",USDT:"₮",UST:"",UYU:"$U",UZS:"лв",VEF:"Bs",VES:"",VET:"",VND:"₫",VUV:"VT",WAVES:"",WBTC:"₿",WST:"WS$",XAF:"FCFA",XPF:"₣",XBT:"Ƀ",XCD:"$",XDC:"",XEC:"",XEM:"",XFUN:"",XLM:"✕",XMR:"ɱ",XOF:"CFA",XRP:"✕",XTZ:"ꜩ",YER:"﷼",YFI:"",ZAR:"R",ZEC:"ⓩ",ZMK:"",ZMW:"",ZWD:"Z$"};function Ma(e,t){let n;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>{e.apply(r)},t)}}const hr=(e,t=null,n=2)=>{try{return JSON.stringify(e,t,n)}catch(r){return console.warn("Failed to stringify:",r),null}};function ka(e){if(e){if(e=e.toString(),isNaN(e))throw Error("Parameter is not a number: "+e);e[0]=="+"&&(e=e.substring(1))}else e="0";if(e.startsWith(".")?e="0"+e:e.startsWith("-.")&&(e="-0"+e.substr(1)),/e/i.test(e)){let[t,n]=e.split(/[eE]/);t=trim(t);let r="";t[0]==="-"&&(r="-",t=t.substring(1)),t.indexOf(".")>=0?(n=parseInt(n)+t.indexOf("."),t=t.replace(".","")):n=parseInt(n)+t.length,t.length<n?e=r+t+new Array(n-t.length+1).join("0"):t.length>=n&&n>0?e=r+trim(t.substring(0,n))+(t.length>n?"."+t.substring(n):""):e=r+"0."+new Array(-n+1).join("0")+t}return e}const Ee=String(Number.MAX_SAFE_INTEGER).length,Fa=6e3,Ua={InvalidSession:"Invalid session"},J={BalanceError:"BalanceError",CheckWalletExchangeError:"CheckWalletExchangeError",WalletExchangeError:"WalletExchangeError",ExchangeSuccess:"ExchangeSuccess",CurrenciesError:"CurrenciesError"},fr={ResetVaultWidget:"ResetVaultWidget",CloseVaultWidget:"CloseVaultWidget"},ln={VaultWidgetReset:"VaultWidgetReset",VaultWidgetClosed:"VaultWidgetClosed",VaultDropdownToggled:"VaultDropdownToggled"},pr={Real:"Real",Vault:"Vault"},Le={success:"success",error:"error"},Lt={ArrowDown:"ArrowDown",ArrowUp:"ArrowUp",Enter:"Enter",Escape:"Escape"},le={true:"true",false:"false"},dr={Fiat:"Fiat",CryptoCurrency:"CryptoCurrency"},Va={Credit:"Credit"};function Ga(e){const t=n=>{e.contains(n.target)||e.dispatchEvent(new CustomEvent("outclick"))};return document.addEventListener("click",t),{destroy(){document.removeEventListener("click",t)}}}function $a(e){Hn(e,"svelte-1g9pqha",".selectWrapper.svelte-1g9pqha.svelte-1g9pqha{position:relative;min-width:96px;font-family:inherit;height:var(--emw--base-height, 36px);font-size:var(--emw--font-size-small, 12px);border-radius:var(--emw--border-radius-small, 8px)}.selectButton.svelte-1g9pqha.svelte-1g9pqha{width:100%;height:100%;cursor:pointer;text-align:left;border:unset;display:flex;align-items:center;justify-content:space-between;color:var(--emw--select-typography, #595959);background-color:rgba(255, 255, 255, var(--emw--background-opacity, 0.9));-webkit-backdrop-filter:blur(var(--emw--filter-blur, 31.5px));backdrop-filter:blur(var(--emw--filter-blur, 31.5px));padding:0 var(--emw--spacing-small, 10px);font-size:var(--emw--font-size-small, 12px);border-radius:var(--emw--border-radius-small, 8px);font-family:inherit}.selectButton.svelte-1g9pqha.svelte-1g9pqha:focus-visible{outline:none}.label.svelte-1g9pqha.svelte-1g9pqha{display:flex;align-items:center}.selectDropdownWrapper.svelte-1g9pqha.svelte-1g9pqha{position:absolute;top:calc(100% + 2px);left:0;right:0;overflow:hidden;z-index:100;background-color:rgba(255, 255, 255, var(--emw--background-opacity, 0.9));-webkit-backdrop-filter:blur(var(--emw--filter-blur, 31.5px));backdrop-filter:blur(var(--emw--filter-blur, 31.5px));border-radius:var(--emw--border-radius-small, 8px)}.selectDropdown.svelte-1g9pqha.svelte-1g9pqha{display:flex;flex-direction:column;gap:4px;max-height:150px;overflow-y:auto;scrollbar-width:thin}.selectDropdown.svelte-1g9pqha li.svelte-1g9pqha{height:24px;flex:0 0 24px;display:flex;align-items:center;;;padding:0 var(--emw--spacing-small, 10px);cursor:pointer;transition:all 0.3s ease}.selectDropdown.svelte-1g9pqha li.svelte-1g9pqha:hover,.selectDropdown.svelte-1g9pqha li.active.svelte-1g9pqha{background:var(--emw--selected-option, #f0f0f0)}.symbol.svelte-1g9pqha.svelte-1g9pqha{display:inline-flex;width:14px;height:14px;border-radius:50%;align-items:center;justify-content:center;line-height:0;margin-right:5px;overflow:hidden;background:var(--emw--symbol-background, #595959);font-size:var(--emw--font-size-small, 12px);color:var(--emw--symbol-typography, #fff)}")}function mr(e,t,n){const r=e.slice();return r[16]=t[n],r[18]=n,r}function gr(e){var i;let t,n=(((i=e[0])==null?void 0:i.symbol)||"")+"",r;return{c(){t=T("span"),r=z(n),v(t,"class","symbol svelte-1g9pqha")},m(o,a){H(o,t,a),x(t,r)},p(o,a){var s;a&1&&n!==(n=(((s=o[0])==null?void 0:s.symbol)||"")+"")&&re(r,n)},d(o){o&&B(t)}}}function br(e){let t,n,r=Ft(e[1]),i=[];for(let o=0;o<r.length;o+=1)i[o]=yr(mr(e,r,o));return{c(){t=T("div"),n=T("ul");for(let o=0;o<i.length;o+=1)i[o].c();v(n,"class","selectDropdown svelte-1g9pqha"),v(t,"class","selectDropdownWrapper svelte-1g9pqha")},m(o,a){H(o,t,a),x(t,n);for(let s=0;s<i.length;s+=1)i[s]&&i[s].m(n,null);e[14](n)},p(o,a){if(a&547){r=Ft(o[1]);let s;for(s=0;s<r.length;s+=1){const l=mr(o,r,s);i[s]?i[s].p(l,a):(i[s]=yr(l),i[s].c(),i[s].m(n,null))}for(;s<i.length;s+=1)i[s].d(1);i.length=r.length}},d(o){o&&B(t),Cr(i,o),e[14](null)}}}function yr(e){var c,m;let t,n,r=((c=e[16])==null?void 0:c.symbol)+"",i,o,a=((m=e[16])==null?void 0:m.currency)+"",s,l,u,h,f;return{c(){var _,g,w,O;t=T("li"),n=T("span"),i=z(r),o=D(),s=z(a),l=D(),v(n,"class","symbol svelte-1g9pqha"),v(t,"role","option"),v(t,"aria-selected",u=((_=e[16])==null?void 0:_.currency)===((g=e[0])==null?void 0:g.currency)||e[18]===e[5]),v(t,"class","svelte-1g9pqha"),se(t,"active",((w=e[16])==null?void 0:w.currency)===((O=e[0])==null?void 0:O.currency)||e[18]===e[5])},m(_,g){H(_,t,g),x(t,n),x(n,i),x(t,o),x(t,s),x(t,l),h||(f=[ne(t,"keydown",Wa),ne(t,"click",function(){vt(e[9](e[16],e[18]))&&e[9](e[16],e[18]).apply(this,arguments)})],h=!0)},p(_,g){var w,O,E,b,C,M;e=_,g&2&&r!==(r=((w=e[16])==null?void 0:w.symbol)+"")&&re(i,r),g&2&&a!==(a=((O=e[16])==null?void 0:O.currency)+"")&&re(s,a),g&35&&u!==(u=((E=e[16])==null?void 0:E.currency)===((b=e[0])==null?void 0:b.currency)||e[18]===e[5])&&v(t,"aria-selected",u),g&35&&se(t,"active",((C=e[16])==null?void 0:C.currency)===((M=e[0])==null?void 0:M.currency)||e[18]===e[5])},d(_){_&&B(t),h=!1,we(f)}}}function ja(e){var _,g;let t,n,r,i,o=(((_=e[0])==null?void 0:_.currency)||e[2])+"",a,s,l,u,h,f,c=((g=e[0])==null?void 0:g.symbol)&&e[3]===le.true&&gr(e),m=e[7]&&br(e);return{c(){t=T("div"),n=T("button"),r=T("span"),c&&c.c(),i=D(),a=z(o),s=D(),l=T("span"),l.innerHTML='<svg width="12" height="7" viewBox="0 0 12 7" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M0.984228 0.664666C0.928537 0.612038 0.863025 0.570896 0.791433 0.543587C0.719842 0.516278 0.643572 0.503337 0.566979 0.505504C0.490386 0.50767 0.41497 0.524902 0.345037 0.556215C0.275103 0.587527 0.212022 0.632308 0.159395 0.687999C0.106768 0.74369 0.0656252 0.809203 0.0383161 0.880794C0.0110071 0.952386 -0.00193361 1.02866 0.000233093 1.10525C0.0023998 1.18184 0.0196314 1.25726 0.050944 1.32719C0.0822566 1.39712 0.127037 1.46021 0.182728 1.51283L5.43273 6.47117C5.54104 6.57356 5.68443 6.63061 5.83348 6.63061C5.98253 6.63061 6.12592 6.57356 6.23423 6.47117L11.4848 1.51283C11.5417 1.46055 11.5877 1.39748 11.62 1.32729C11.6523 1.2571 11.6704 1.18119 11.6731 1.10396C11.6759 1.02673 11.6633 0.949723 11.636 0.877415C11.6087 0.805107 11.5674 0.738937 11.5143 0.68275C11.4612 0.626563 11.3976 0.581479 11.3269 0.550115C11.2563 0.518751 11.1801 0.501734 11.1029 0.500051C11.0256 0.498369 10.9488 0.512054 10.8769 0.540313C10.8049 0.568572 10.7393 0.610841 10.6839 0.664665L5.83348 5.245L0.984228 0.664666Z" fill="currentColor"></path></svg>',u=D(),m&&m.c(),v(r,"class","label svelte-1g9pqha"),v(l,"class","arrow"),se(l,"open",e[7]),v(n,"class","selectButton svelte-1g9pqha"),v(n,"aria-haspopup","listbox"),v(n,"aria-expanded",e[7]),v(n,"aria-controls","custom-select"),v(n,"tabindex","0"),n.disabled=e[4],v(t,"class","selectWrapper svelte-1g9pqha")},m(w,O){H(w,t,O),x(t,n),x(n,r),c&&c.m(r,null),x(r,i),x(r,a),x(n,s),x(n,l),x(t,u),m&&m.m(t,null),h||(f=[ne(n,"keydown",e[11]),ne(n,"click",xi(e[8])),yi(Ga.call(null,t)),ne(t,"outclick",e[10])],h=!0)},p(w,[O]){var E,b;(E=w[0])!=null&&E.symbol&&w[3]===le.true?c?c.p(w,O):(c=gr(w),c.c(),c.m(r,i)):c&&(c.d(1),c=null),O&5&&o!==(o=(((b=w[0])==null?void 0:b.currency)||w[2])+"")&&re(a,o),O&128&&se(l,"open",w[7]),O&128&&v(n,"aria-expanded",w[7]),O&16&&(n.disabled=w[4]),w[7]?m?m.p(w,O):(m=br(w),m.c(),m.m(t,null)):m&&(m.d(1),m=null)},i:I,o:I,d(w){w&&B(t),c&&c.d(),m&&m.d(),h=!1,we(f)}}}const Wa=e=>e.preventDefault();function Xa(e,t,n){let{options:r=[]}=t,{selected:i=null}=t,{placeholder:o=k("select")}=t,{withSymbol:a="true"}=t,{id:s}=t,{disabled:l=!1}=t,{onChange:u=()=>{}}=t,h=-1,f,c=!1;const m=()=>Bt(this,null,function*(){var b;r.length!==0&&(n(7,c=!c),c&&(n(5,h=r.findIndex(C=>(C==null?void 0:C.currency)===(i==null?void 0:i.currency))),window.dispatchEvent(new CustomEvent("dropdown-opened",{detail:s})),yield Ci(),f==null||f.focus(),(b=f==null?void 0:f.querySelector('li[aria-selected="true"]'))==null||b.scrollIntoView({block:"nearest"})))}),_=b=>{b.detail!==s&&c&&n(7,c=!1)},g=(b,C)=>()=>{n(7,c=!1),n(0,i=b),u&&typeof u=="function"&&u(b,C)},w=()=>{n(7,c=!1)},O=b=>{c&&(b.key===Lt.ArrowDown?(b.preventDefault(),n(5,h=(h+1)%r.length)):b.key===Lt.ArrowUp?(b.preventDefault(),n(5,h=(h-1+r.length)%r.length)):b.key===Lt.Enter?(b.preventDefault(),g(i,h)()):b.key===Lt.Escape&&n(7,c=!1))};Br(()=>{window.addEventListener("dropdown-opened",_)}),Ti(()=>{window.removeEventListener("dropdown-opened",_)});function E(b){Ye[b?"unshift":"push"](()=>{f=b,n(6,f)})}return e.$$set=b=>{"options"in b&&n(1,r=b.options),"selected"in b&&n(0,i=b.selected),"placeholder"in b&&n(2,o=b.placeholder),"withSymbol"in b&&n(3,a=b.withSymbol),"id"in b&&n(12,s=b.id),"disabled"in b&&n(4,l=b.disabled),"onChange"in b&&n(13,u=b.onChange)},[i,r,o,a,l,h,f,c,m,g,w,O,s,u,E]}class Bn extends Ln{constructor(t){super(),Pn(this,t,Xa,ja,Gt,{options:1,selected:0,placeholder:2,withSymbol:3,id:12,disabled:4,onChange:13},$a)}get options(){return this.$$.ctx[1]}set options(t){this.$$set({options:t}),U()}get selected(){return this.$$.ctx[0]}set selected(t){this.$$set({selected:t}),U()}get placeholder(){return this.$$.ctx[2]}set placeholder(t){this.$$set({placeholder:t}),U()}get withSymbol(){return this.$$.ctx[3]}set withSymbol(t){this.$$set({withSymbol:t}),U()}get id(){return this.$$.ctx[12]}set id(t){this.$$set({id:t}),U()}get disabled(){return this.$$.ctx[4]}set disabled(t){this.$$set({disabled:t}),U()}get onChange(){return this.$$.ctx[13]}set onChange(t){this.$$set({onChange:t}),U()}}In(Bn,{options:{},selected:{},placeholder:{},withSymbol:{},id:{},disabled:{type:"Boolean"},onChange:{}},[],[],!0);function za(e){Hn(e,"svelte-2fhtvy",".warningIcon.svelte-2fhtvy{line-height:1;margin-right:0.4rem}")}function Za(e){let t,n,r=k("balanceUnavailable")+"",i;return{c(){t=T("span"),t.innerHTML='<svg fill="currentColor" width="20px" height="20px" viewBox="0 0 64 64" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve"><g><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z" style="fill-rule:nonzero;"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z" style="fill-rule:nonzero;"></path></g></svg>',n=D(),i=z(r),v(t,"class","warningIcon svelte-2fhtvy")},m(o,a){H(o,t,a),H(o,n,a),H(o,i,a)},p:I,i:I,o:I,d(o){o&&(B(t),B(n),B(i))}}}class Zt extends Ln{constructor(t){super(),Pn(this,t,null,Za,Gt,{},za)}}In(Zt,{},[],[],!0);function Ka(e){Hn(e,"svelte-1mw4zse",'@charset "UTF-8";*{margin:0;padding:0}.playerAccountVault{max-width:400px;display:flex;flex-direction:column;justify-content:center;align-items:center;margin:auto;font-family:inherit;overflow:hidden;gap:var(--emw--spacing-small, 10px);font-size:var(--emw--font-size-small, 12px);background:var(--emw--widget-background, #F8F8F8);color:var(--emw--typography, #595959);padding:var(--emw--spacing-medium, 16px);position:relative}.playerAccountVault .closeButton{position:absolute;background:none;border:none;top:var(--emw--spacing-medium, 16px);right:var(--emw--spacing-small, 10px);line-height:0;cursor:pointer}.playerAccountVault .closeButton svg{fill:var(--emw--color-faded, #A0A29F)}.playerAccountVault .playerVaultContainer{width:100%;display:flex;justify-content:space-between;align-items:center;gap:var(--emw--spacing-small, 10px);border-radius:var(--emw--border-radius-smaller, 5px);box-sizing:border-box}.playerAccountVault .amountContainer{display:flex;align-items:center}.playerAccountVault .headerContainer{display:flex;width:100%;gap:var(--emw--spacing-small, 10px);justify-content:space-between;flex-direction:column}.playerAccountVault .headerContainer .headerTitle{font-family:inherit;color:var(--emw--color-secondary, #24B04F);font-size:var(--emw--font-size-large, 16px);font-weight:var(--emw--font-weight-normal, 400)}.playerAccountVault .headerContainer .totalAmount{margin-right:4px;color:var(--emw--color-faded, #A0A29F)}.playerAccountVault .exchangesContainer{width:100%;height:100%;box-sizing:border-box;position:relative;display:flex;flex-direction:column;gap:var(--emw--spacing-small, 10px)}.playerAccountVault .exchangesContainer .containerExchangeFrom .exchangeHeader,.playerAccountVault .exchangesContainer .containerExchangeTo .exchangeHeader{font-size:inherit;font-family:inherit;font-family:inherit}.playerAccountVault .exchangesContainer .containerExchangeFrom .flexingContainerRow,.playerAccountVault .exchangesContainer .containerExchangeTo .flexingContainerRow{display:flex;align-items:center;gap:var(--emw--spacing-small, 10px)}.playerAccountVault .exchangesContainer .containerExchangeFrom .flexingContainerRow input[type=number]::-webkit-inner-spin-button,.playerAccountVault .exchangesContainer .containerExchangeFrom .flexingContainerRow input[type=number]::-webkit-outer-spin-button,.playerAccountVault .exchangesContainer .containerExchangeTo .flexingContainerRow input[type=number]::-webkit-inner-spin-button,.playerAccountVault .exchangesContainer .containerExchangeTo .flexingContainerRow input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.playerAccountVault .exchangesContainer .containerExchangeFrom .flexingContainerRow input[type=number],.playerAccountVault .exchangesContainer .containerExchangeTo .flexingContainerRow input[type=number]{-moz-appearance:textfield}.playerAccountVault .exchangesContainer .containerExchangeFrom .flexingContainerRow .exchangeInput,.playerAccountVault .exchangesContainer .containerExchangeTo .flexingContainerRow .exchangeInput{flex:1;min-width:50px;border:unset;height:var(--emw--base-height, 36px);font-size:var(--emw--font-size-medium, 14px);padding:0 var(--emw--spacing-small, 10px);border-radius:var(--emw--border-radius-small, 8px);background-color:rgba(255, 255, 255, var(--emw--background-opacity, 0.9));-webkit-backdrop-filter:blur(var(--emw--filter-blur, 31.5px));backdrop-filter:blur(var(--emw--filter-blur, 31.5px));font-family:inherit;color:var(--emw--input-typography, #000)}.playerAccountVault .exchangesContainer .containerExchangeFrom .flexingContainerRow .exchangeInput:focus,.playerAccountVault .exchangesContainer .containerExchangeTo .flexingContainerRow .exchangeInput:focus{outline:none}.playerAccountVault .exchangesContainer .containerExchangeFrom .flexingContainerRow .exchangeInput[disabled],.playerAccountVault .exchangesContainer .containerExchangeTo .flexingContainerRow .exchangeInput[disabled]{color:var(--emw--input-disabled, #a0a29f)}.playerAccountVault .exchangesContainer .containerExchangeFrom .flexingContainerRow .exchangeInput::placeholder,.playerAccountVault .exchangesContainer .containerExchangeTo .flexingContainerRow .exchangeInput::placeholder{color:var(--emw--input-placeholder, #a0a29f)}.playerAccountVault .exchangesContainer .containerExchangeFrom .flexingContainerRow .currenciesSelect,.playerAccountVault .exchangesContainer .containerExchangeTo .flexingContainerRow .currenciesSelect{min-width:96px;border:unset;white-space:nowrap;height:var(--emw--base-height, 36px);padding:0 var(--emw--spacing-small, 10px)}.playerAccountVault .exchangesContainer .containerExchangeFrom .flexingContainerRow .currenciesSelect:focus,.playerAccountVault .exchangesContainer .containerExchangeTo .flexingContainerRow .currenciesSelect:focus{outline:none}.playerAccountVault .exchangesContainer .containerExchangeFrom .balanceContainer,.playerAccountVault .exchangesContainer .containerExchangeTo .balanceContainer{display:flex;justify-content:space-between;gap:var(--emw--spacing-small, 10px)}.playerAccountVault .exchangesContainer .containerExchangeFrom .balanceContainer.hasError,.playerAccountVault .exchangesContainer .containerExchangeTo .balanceContainer.hasError{color:var(--emw--color-error, #ed0909)}.playerAccountVault .exchangesContainer .containerExchangeFrom .balanceContainer.hasError span,.playerAccountVault .exchangesContainer .containerExchangeTo .balanceContainer.hasError span{color:var(--emw--color-error, #ed0909)}.playerAccountVault .exchangesContainer .containerExchangeFrom .balanceContainer .validationError,.playerAccountVault .exchangesContainer .containerExchangeTo .balanceContainer .validationError{flex:1}.playerAccountVault .exchangesContainer .containerExchangeFrom .playerBalance,.playerAccountVault .exchangesContainer .containerExchangeTo .playerBalance{white-space:nowrap;justify-content:flex-end}.playerAccountVault .exchangesContainer .containerExchangeFrom .playerBalance .amount,.playerAccountVault .exchangesContainer .containerExchangeTo .playerBalance .amount{color:var(--emw--color-faded, #A0A29F);margin-right:4px}.playerAccountVault .vaultsContainer{display:flex;flex-direction:column;width:100%}.playerAccountVault .vaultsContainer .vaultToggleButton{display:flex;align-items:center;justify-content:center;width:35px;height:35px;cursor:pointer;border:unset;align-self:flex-end;padding:var(--emw--spacing-small, 10px);background:var(--emw--color-primary, #24B04F);border-radius:var(--emw--border-radius-small, 8px)}.playerAccountVault .vaultsContainer .vaultToggleButton .vaultToggleIcon{transform:rotateZ(0deg);transition:all 0.3s ease-in-out}.playerAccountVault .vaultsContainer .vaultToggleButton .vaultToggleIcon path{fill:var(--emw--color-white, #fff)}.playerAccountVault .vaultsContainer .vaultToggleButton.active .vaultToggleIcon{transform:rotateZ(180deg)}.playerAccountVault .vaultsContainer .vaultDropdown{width:80%;max-height:0;height:200px;margin:0 auto;display:flex;flex-direction:column;overflow:auto;opacity:0;scrollbar-width:thin;gap:var(--emw--spacing-small, 10px);font-size:var(--emw--font-size-medium, 14px);color:var(--emw--color-white, #fff);font-family:inherit;transition:max-height 0.4s ease-out, opacity 0.4s ease-out}.playerAccountVault .vaultsContainer .vaultDropdown .vaultItem{display:inherit;font-size:var(--emw--font-size-medium, 14px);justify-content:space-between;width:100%;margin:0 auto;box-sizing:border-box;height:var(--emw--base-height, 36px);padding:var(--emw--spacing-small, 10px);background:var(--emw--color-primary, #24B04F);border-radius:var(--emw--border-radius-small, 8px)}.playerAccountVault .vaultsContainer .vaultDropdown.expanded{transition:max-height 1s ease-in, opacity 0.4s ease-in;max-height:1000vh;opacity:1}.playerAccountVault .notificationsContainer{width:100%;min-height:var(--emw--base-height, 36px);padding:0px}.playerAccountVault .notificationsContainer.error{color:var(--emw--color-error, #FF2424)}.playerAccountVault .notificationsContainer.success{color:var(--emw--color-success, #24B04F)}.playerAccountVault .feesContainer{width:100%;height:var(--emw--base-height, 36px);display:flex;align-items:center;justify-content:space-between;background-color:rgba(255, 255, 255, var(--emw--background-opacity, 0.9));-webkit-backdrop-filter:blur(var(--emw--filter-blur, 31.5px));backdrop-filter:blur(var(--emw--filter-blur, 31.5px));border-radius:var(--emw--border-radius-small, 8px);padding:0 var(--emw--spacing-small, 10px);box-sizing:border-box}.playerAccountVault .feesContainer .feesLabel{color:var(--emw--color-faded, #A0A29F)}.playerAccountVault .actionsContainer{width:100%;height:100%;display:flex;justify-content:space-between;align-items:center;box-sizing:border-box;gap:var(--emw--spacing-small, 10px)}.playerAccountVault .actionsContainer button{flex:1;height:var(--emw--base-height, 36px);border:none;cursor:pointer;font-family:inherit;font-size:var(--emw--button-font-size, 14px);border-radius:var(--emw--border-radius-small, 8px);font-weight:var(--emw--font-weight-bold, 500);transition:background 0.3s ease, color 0.3s ease, filter 0.3s ease}.playerAccountVault .actionsContainer .exchangeButton{background:var(--emw--color-primary, #24B04F);color:var(--emw--button-typography, #fff)}.playerAccountVault .actionsContainer .exchangeButton:hover{filter:brightness(110%)}.playerAccountVault .actionsContainer .resetButton{background:transparent;color:var(--emw--color-primary, #24B04F);border:1px solid var(--emw--color-primary, #24B04F)}.playerAccountVault .actionsContainer .resetButton:hover{background:var(--emw--color-primary, #24B04F);color:var(--emw--button-typography, #fff)}.playerAccountVault .actionsContainer .exchangeButton.disabled{cursor:default;filter:none;background:var(--emw--button-disabled, #595959)}.playerAccountVault .actionsContainer .exchangeButton.disabled:hover{background:var(--emw--button-disabled, #595959)}.playerAccountVault .actionsContainer .exchangeButton.disabled.pending{background:var(--emw--color-primary, #24B04F);pointer-events:none;opacity:0.5}.playerAccountVault .skeleton{background-color:rgba(0, 0, 0, 0.11);height:auto;min-height:0.1rem;-webkit-animation:loading 1.5s ease-in-out 0.5s infinite;animation:loading 1.5s ease-in-out 0.5s infinite}.playerAccountVault .skeleton::before{content:" "}@keyframes loading{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.playerAccountVault .exchangeContainer{display:flex;flex-direction:column;gap:4px}')}function vr(e,t,n){const r=e.slice();return r[65]=t[n],r}function _r(e){let t,n,r;return{c(){t=T("button"),t.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M13.414 12l4.95-4.95-1.414-1.414-4.95 4.95-4.95-4.95L5.636 7.05l4.95 4.95-4.95 4.95 1.414 1.414 4.95-4.95 4.95 4.95 1.414-1.414-4.95-4.95z"></path></svg>',v(t,"type","button"),v(t,"class","closeButton")},m(i,o){H(i,t,o),n||(r=ne(t,"click",e[24]),n=!0)},p:I,d(i){i&&B(t),n=!1,r()}}}function Er(e){let t,n,r,i;const o=[Qa,qa],a=[];function s(l,u){return!l[17]||!l[18]?0:1}return t=s(e),n=a[t]=o[t](e),{c(){n.c(),r=Ei()},m(l,u){a[t].m(l,u),H(l,r,u),i=!0},p(l,u){let h=t;t=s(l),t===h?a[t].p(l,u):(ke(),X(a[h],1,1,()=>{a[h]=null}),Fe(),n=a[t],n?n.p(l,u):(n=a[t]=o[t](l),n.c()),G(n,1),n.m(r.parentNode,r))},i(l){i||(G(n),i=!0)},o(l){X(n),i=!1},d(l){l&&B(r),a[t].d(l)}}}function qa(e){let t,n,r,i;const o=[Ja,Ya],a=[];function s(l,u){var h;return((h=l[13])==null?void 0:h.source)===J.BalanceError?0:1}return n=s(e),r=a[n]=o[n](e),{c(){t=T("div"),r.c(),v(t,"class","headerPlayerBalance amountContainer")},m(l,u){H(l,t,u),a[n].m(t,null),i=!0},p(l,u){let h=n;n=s(l),n===h?a[n].p(l,u):(ke(),X(a[h],1,1,()=>{a[h]=null}),Fe(),r=a[n],r?r.p(l,u):(r=a[n]=o[n](l),r.c()),G(r,1),r.m(t,null))},i(l){i||(G(r),i=!0)},o(l){X(r),i=!1},d(l){l&&B(t),a[n].d()}}}function Qa(e){let t;return{c(){t=T("div"),v(t,"class","skeleton")},m(n,r){H(n,t,r)},p:I,i:I,o:I,d(n){n&&B(t)}}}function Ya(e){var l,u,h;let t,n,r=Ne(((l=e[11])==null?void 0:l.amount)||0,(u=e[11])==null?void 0:u.currency,{minimumFractionDigits:0},!1)+"",i,o,a=(((h=e[11])==null?void 0:h.currency)||"")+"",s;return{c(){t=T("span"),t.textContent=`${k("totalBalance")}`,n=D(),i=z(r),o=D(),s=z(a),v(t,"class","totalAmount")},m(f,c){H(f,t,c),H(f,n,c),H(f,i,c),H(f,o,c),H(f,s,c)},p(f,c){var m,_,g;c[0]&2048&&r!==(r=Ne(((m=f[11])==null?void 0:m.amount)||0,(_=f[11])==null?void 0:_.currency,{minimumFractionDigits:0},!1)+"")&&re(i,r),c[0]&2048&&a!==(a=(((g=f[11])==null?void 0:g.currency)||"")+"")&&re(s,a)},i:I,o:I,d(f){f&&(B(t),B(n),B(i),B(o),B(s))}}}function Ja(e){let t,n;return t=new Zt({}),{c(){gt(t.$$.fragment)},m(r,i){Je(t,r,i),n=!0},p:I,i(r){n||(G(t.$$.fragment,r),n=!0)},o(r){X(t.$$.fragment,r),n=!1},d(r){et(t,r)}}}function es(e){let t,n,r,i,o,a,s,l,u;const h=[rs,ns],f=[];function c(m,_){var g;return((g=m[13])==null?void 0:g.source)===J.BalanceError?0:1}return a=c(e),s=f[a]=h[a](e),{c(){t=T("div"),n=T("p"),r=z(e[14]),i=D(),o=T("div"),s.c(),v(n,"class","validationError"),v(o,"class","playerBalance amountContainer"),v(t,"class",l="balanceContainer "+(e[14]?"hasError":""))},m(m,_){H(m,t,_),x(t,n),x(n,r),x(t,i),x(t,o),f[a].m(o,null),u=!0},p(m,_){(!u||_[0]&16384)&&re(r,m[14]);let g=a;a=c(m),a===g?f[a].p(m,_):(ke(),X(f[g],1,1,()=>{f[g]=null}),Fe(),s=f[a],s?s.p(m,_):(s=f[a]=h[a](m),s.c()),G(s,1),s.m(o,null)),(!u||_[0]&16384&&l!==(l="balanceContainer "+(m[14]?"hasError":"")))&&v(t,"class",l)},i(m){u||(G(s),u=!0)},o(m){X(s),u=!1},d(m){m&&B(t),f[a].d()}}}function ts(e){let t;return{c(){t=T("div"),v(t,"class","skeleton")},m(n,r){H(n,t,r)},p:I,i:I,o:I,d(n){n&&B(t)}}}function ns(e){var l,u,h;let t,n,r=Ne(((l=e[6])==null?void 0:l.amount)||0,(u=e[6])==null?void 0:u.currency,{minimumFractionDigits:0},!1)+"",i,o,a=(((h=e[6])==null?void 0:h.currency)||"")+"",s;return{c(){t=T("span"),t.textContent=`${k("currentBalance")}`,n=D(),i=z(r),o=D(),s=z(a),v(t,"class","amount")},m(f,c){H(f,t,c),H(f,n,c),H(f,i,c),H(f,o,c),H(f,s,c)},p(f,c){var m,_,g;c[0]&64&&r!==(r=Ne(((m=f[6])==null?void 0:m.amount)||0,(_=f[6])==null?void 0:_.currency,{minimumFractionDigits:0},!1)+"")&&re(i,r),c[0]&64&&a!==(a=(((g=f[6])==null?void 0:g.currency)||"")+"")&&re(s,a)},i:I,o:I,d(f){f&&(B(t),B(n),B(i),B(o),B(s))}}}function rs(e){let t,n;return t=new Zt({}),{c(){gt(t.$$.fragment)},m(r,i){Je(t,r,i),n=!0},p:I,i(r){n||(G(t.$$.fragment,r),n=!0)},o(r){X(t.$$.fragment,r),n=!1},d(r){et(t,r)}}}function is(e){let t,n,r,i;const o=[ss,as],a=[];function s(l,u){var h;return((h=l[13])==null?void 0:h.source)===J.BalanceError?0:1}return n=s(e),r=a[n]=o[n](e),{c(){t=T("div"),r.c(),v(t,"class","playerBalance amountContainer")},m(l,u){H(l,t,u),a[n].m(t,null),i=!0},p(l,u){let h=n;n=s(l),n===h?a[n].p(l,u):(ke(),X(a[h],1,1,()=>{a[h]=null}),Fe(),r=a[n],r?r.p(l,u):(r=a[n]=o[n](l),r.c()),G(r,1),r.m(t,null))},i(l){i||(G(r),i=!0)},o(l){X(r),i=!1},d(l){l&&B(t),a[n].d()}}}function os(e){let t;return{c(){t=T("div"),v(t,"class","skeleton")},m(n,r){H(n,t,r)},p:I,i:I,o:I,d(n){n&&B(t)}}}function as(e){var l,u,h;let t,n,r=Ne(((l=e[7])==null?void 0:l.amount)||0,(u=e[6])==null?void 0:u.currency,{minimumFractionDigits:0},!1)+"",i,o,a=(((h=e[7])==null?void 0:h.currency)||"")+"",s;return{c(){t=T("span"),t.textContent=`${k("currentBalance")}`,n=D(),i=z(r),o=D(),s=z(a),v(t,"class","amount")},m(f,c){H(f,t,c),H(f,n,c),H(f,i,c),H(f,o,c),H(f,s,c)},p(f,c){var m,_,g;c[0]&192&&r!==(r=Ne(((m=f[7])==null?void 0:m.amount)||0,(_=f[6])==null?void 0:_.currency,{minimumFractionDigits:0},!1)+"")&&re(i,r),c[0]&128&&a!==(a=(((g=f[7])==null?void 0:g.currency)||"")+"")&&re(s,a)},i:I,o:I,d(f){f&&(B(t),B(n),B(i),B(o),B(s))}}}function ss(e){let t,n;return t=new Zt({}),{c(){gt(t.$$.fragment)},m(r,i){Je(t,r,i),n=!0},p:I,i(r){n||(G(t.$$.fragment,r),n=!0)},o(r){X(t.$$.fragment,r),n=!1},d(r){et(t,r)}}}function xr(e){let t,n,r,i,o,a,s,l,u,h,f=Ft(e[20]),c=[];for(let m=0;m<f.length;m+=1)c[m]=wr(vr(e,f,m));return{c(){t=T("div"),n=T("button"),r=Fn("svg"),i=Fn("path"),a=D(),s=T("div");for(let m=0;m<c.length;m+=1)c[m].c();v(i,"d","M0.984228 0.664666C0.928537 0.612038 0.863025 0.570896 0.791433 0.543587C0.719842 0.516278 0.643572 0.503337 0.566979 0.505504C0.490386 0.50767 0.41497 0.524902 0.345037 0.556215C0.275103 0.587527 0.212022 0.632308 0.159395 0.687999C0.106768 0.74369 0.0656252 0.809203 0.0383161 0.880794C0.0110071 0.952386 -0.00193361 1.02866 0.000233093 1.10525C0.0023998 1.18184 0.0196314 1.25726 0.050944 1.32719C0.0822566 1.39712 0.127037 1.46021 0.182728 1.51283L5.43273 6.47117C5.54104 6.57356 5.68443 6.63061 5.83348 6.63061C5.98253 6.63061 6.12592 6.57356 6.23423 6.47117L11.4848 1.51283C11.5417 1.46055 11.5877 1.39748 11.62 1.32729C11.6523 1.2571 11.6704 1.18119 11.6731 1.10396C11.6759 1.02673 11.6633 0.949723 11.636 0.877415C11.6087 0.805107 11.5674 0.738937 11.5143 0.68275C11.4612 0.626563 11.3976 0.581479 11.3269 0.550115C11.2563 0.518751 11.1801 0.501734 11.1029 0.500051C11.0256 0.498369 10.9488 0.512054 10.8769 0.540313C10.8049 0.568572 10.7393 0.610841 10.6839 0.664665L5.83348 5.245L0.984228 0.664666Z"),v(i,"fill","currentColor"),v(r,"class","vaultToggleIcon"),v(r,"width","12"),v(r,"height","7"),v(r,"viewBox","0 0 12 7"),v(r,"fill","currentColor"),v(r,"xmlns","http://www.w3.org/2000/svg"),v(n,"type","button"),v(n,"class",o="vaultToggleButton "+(e[16]&&e[20].length>0?"active":"")),v(s,"class",l="vaultDropdown "+(e[16]&&e[20].length>0?"expanded":"")),v(t,"class","vaultsContainer")},m(m,_){H(m,t,_),x(t,n),x(n,r),x(r,i),x(t,a),x(t,s);for(let g=0;g<c.length;g+=1)c[g]&&c[g].m(s,null);u||(h=ne(n,"click",e[23]),u=!0)},p(m,_){if(_[0]&1114112&&o!==(o="vaultToggleButton "+(m[16]&&m[20].length>0?"active":""))&&v(n,"class",o),_[0]&1048608){f=Ft(m[20]);let g;for(g=0;g<f.length;g+=1){const w=vr(m,f,g);c[g]?c[g].p(w,_):(c[g]=wr(w),c[g].c(),c[g].m(s,null))}for(;g<c.length;g+=1)c[g].d(1);c.length=f.length}_[0]&1114112&&l!==(l="vaultDropdown "+(m[16]&&m[20].length>0?"expanded":""))&&v(s,"class",l)},d(m){m&&B(t),Cr(c,m),u=!1,h()}}}function wr(e){var h,f,c,m,_;let t,n,r=((h=e[65])==null?void 0:h.currency)+"",i,o,a,s=Ne((f=e[65])==null?void 0:f.amount,(c=e[65])==null?void 0:c.currency,{minimumFractionDigits:0,maximumFractionDigits:(((m=e[65])==null?void 0:m.precision)>Ee?Ee:(_=e[65])==null?void 0:_.precision)||Number(e[5])},!1)+"",l,u;return{c(){t=T("div"),n=T("p"),i=z(r),o=D(),a=T("p"),l=z(s),u=D(),v(t,"class","vaultItem")},m(g,w){H(g,t,w),x(t,n),x(n,i),x(t,o),x(t,a),x(a,l),x(t,u)},p(g,w){var O,E,b,C,M;w[0]&1048576&&r!==(r=((O=g[65])==null?void 0:O.currency)+"")&&re(i,r),w[0]&1048608&&s!==(s=Ne((E=g[65])==null?void 0:E.amount,(b=g[65])==null?void 0:b.currency,{minimumFractionDigits:0,maximumFractionDigits:(((C=g[65])==null?void 0:C.precision)>Ee?Ee:(M=g[65])==null?void 0:M.precision)||Number(g[5])},!1)+"")&&re(l,s)},d(g){g&&B(t)}}}function ls(e){var r,i,o,a;let t=`${((i=(r=e[12])==null?void 0:r.fees[0])==null?void 0:i.amount)||0} ${((a=(o=e[12])==null?void 0:o.fees[0])==null?void 0:a.currency)||""}`,n;return{c(){n=z(t)},m(s,l){H(s,n,l)},p(s,l){var u,h,f,c;l[0]&4096&&t!==(t=`${((h=(u=s[12])==null?void 0:u.fees[0])==null?void 0:h.amount)||0} ${((c=(f=s[12])==null?void 0:f.fees[0])==null?void 0:c.currency)||""}`)&&re(n,t)},d(s){s&&B(n)}}}function us(e){let t=k("feesUnavailable")+"",n;return{c(){n=z(t)},m(r,i){H(r,n,i)},p:I,d(r){r&&B(n)}}}function cs(e){var A;let t,n,r,i,o,a,s,l,u,h,f,c,m,_,g,w,O,E,b,C,M,K,$,ue,F,Te,me,ie,ge,be,q,Z,Ce,Ve,ye,oe,_t,Ge,Et,ce,$e=k(((A=e[13])==null?void 0:A.message)||"")+"",lt,fe,he,Se,ee,xt=k("exchange")+"",je,We,W,ut,De,Q=e[3]===le.true&&_r(e),j=e[2]===le.true&&Er(e);function wt(d){e[42](d)}let Kt={id:"senderSelect",withSymbol:e[4],disabled:!e[17]||!e[18],options:e[21],onChange:e[26]};e[6]!==void 0&&(Kt.selected=e[6]),g=new Bn({props:Kt}),Ye.push(()=>Vn(g,"selected",wt));const ct=[ts,es],pe=[];function At(d,y){return!d[17]||!d[18]?0:1}E=At(e),b=pe[E]=ct[E](e);function qt(d){e[44](d)}let Tt={id:"destinationSelect",withSymbol:e[4],disabled:!e[0]||!!e[14]||!e[17]||!e[18],options:e[22],onChange:e[26]};e[7]!==void 0&&(Tt.selected=e[7]),ie=new Bn({props:Tt}),Ye.push(()=>Vn(ie,"selected",qt));const ht=[os,is],de=[];function Ct(d,y){return!d[17]||!d[18]?0:1}q=Ct(e),Z=de[q]=ht[q](e);let Y=e[1]===le.true&&xr(e);function St(d,y){var L;return((L=d[13])==null?void 0:L.source)===J.CheckWalletExchangeError?us:ls}let Xe=St(e),p=Xe(e);return{c(){var d,y,L;t=T("div"),Q&&Q.c(),n=D(),r=T("div"),i=T("h1"),i.textContent=`${k("vaultExchange")}`,o=D(),j&&j.c(),a=D(),s=T("div"),l=T("div"),u=T("p"),u.textContent=`${k("exchangeFrom")}`,h=D(),f=T("div"),c=T("input"),_=D(),gt(g.$$.fragment),O=D(),b.c(),C=D(),M=T("div"),K=T("p"),K.textContent=`${k("exchangeTo")}`,$=D(),ue=T("div"),F=T("input"),me=D(),gt(ie.$$.fragment),be=D(),Z.c(),Ce=D(),Y&&Y.c(),Ve=D(),ye=T("div"),oe=T("span"),oe.textContent=`${k("feesIncluded")}`,_t=D(),Ge=T("span"),p.c(),Et=D(),ce=T("div"),lt=D(),fe=T("div"),he=T("button"),he.textContent=`${k("reset")}`,Se=D(),ee=T("button"),je=z(xt),v(i,"class","headerTitle"),v(r,"class","headerContainer"),v(u,"class","exchangeHeader"),v(c,"id","senderInput"),c.disabled=m=!e[0]||!e[17]||!e[18],v(c,"placeholder",k("debitPlaceHolder")),v(c,"class","exchangeInput"),v(c,"type","number"),v(c,"aria-label","Enter exchange amount"),v(c,"inputmode","decimal"),v(c,"step","0.000000000000001"),v(c,"min","0"),v(f,"class","flexingContainerRow"),v(l,"class","containerExchangeFrom exchangeContainer"),v(K,"class","exchangeHeader"),v(F,"id","destinationInput"),F.disabled=Te=!e[0]||!e[17]||!e[18],v(F,"placeholder",k("creditPlaceHolder")),v(F,"class","exchangeInput"),v(F,"type","number"),F.readOnly=!0,v(F,"min","0"),v(ue,"class","flexingContainerRow"),v(M,"class","containerExchangeTo exchangeContainer"),v(s,"class","exchangesContainer"),v(oe,"class","feesLabel"),v(ye,"class","feesContainer"),v(ce,"class","notificationsContainer"),se(ce,"error",((d=e[13])==null?void 0:d.type)==="error"),se(ce,"success",((y=e[13])==null?void 0:y.type)==="success"),v(he,"class","resetButton"),v(he,"type","button"),v(ee,"type","button"),v(ee,"class","exchangeButton"),ee.disabled=We=e[15]||e[19]||e[9]===0&&!((L=e[6])!=null&&L.amount),se(ee,"disabled",e[15]||e[19]),se(ee,"pending",e[19]),v(fe,"class","actionsContainer"),v(t,"class","playerAccountVault")},m(d,y){H(d,t,y),Q&&Q.m(t,null),x(t,n),x(t,r),x(r,i),x(r,o),j&&j.m(r,null),x(t,a),x(t,s),x(s,l),x(l,u),x(l,h),x(l,f),x(f,c),Ht(c,e[9]),x(f,_),Je(g,f,null),x(l,O),pe[E].m(l,null),x(s,C),x(s,M),x(M,K),x(M,$),x(M,ue),x(ue,F),Ht(F,e[10]),x(ue,me),Je(ie,ue,null),x(M,be),de[q].m(M,null),x(t,Ce),Y&&Y.m(t,null),x(t,Ve),x(t,ye),x(ye,oe),x(ye,_t),x(ye,Ge),p.m(Ge,null),x(t,Et),x(t,ce),ce.innerHTML=$e,x(t,lt),x(t,fe),x(fe,he),x(fe,Se),x(fe,ee),x(ee,je),e[45](t),W=!0,ut||(De=[ne(c,"input",e[41]),ne(c,"input",e[27]),ne(c,"beforeinput",e[28]),ne(c,"focus",e[29]),ne(F,"input",e[43]),ne(he,"click",e[25]),ne(ee,"click",e[30])],ut=!0)},p(d,y){var ft,S,He,Pe;d[3]===le.true?Q?Q.p(d,y):(Q=_r(d),Q.c(),Q.m(t,n)):Q&&(Q.d(1),Q=null),d[2]===le.true?j?(j.p(d,y),y[0]&4&&G(j,1)):(j=Er(d),j.c(),G(j,1),j.m(r,null)):j&&(ke(),X(j,1,1,()=>{j=null}),Fe()),(!W||y[0]&393217&&m!==(m=!d[0]||!d[17]||!d[18]))&&(c.disabled=m),y[0]&512&&kt(c.value)!==d[9]&&Ht(c,d[9]);const L={};y[0]&16&&(L.withSymbol=d[4]),y[0]&393216&&(L.disabled=!d[17]||!d[18]),y[0]&2097152&&(L.options=d[21]),!w&&y[0]&64&&(w=!0,L.selected=d[6],Un(()=>w=!1)),g.$set(L);let Be=E;E=At(d),E===Be?pe[E].p(d,y):(ke(),X(pe[Be],1,1,()=>{pe[Be]=null}),Fe(),b=pe[E],b?b.p(d,y):(b=pe[E]=ct[E](d),b.c()),G(b,1),b.m(l,null)),(!W||y[0]&393217&&Te!==(Te=!d[0]||!d[17]||!d[18]))&&(F.disabled=Te),y[0]&1024&&kt(F.value)!==d[10]&&Ht(F,d[10]);const ve={};y[0]&16&&(ve.withSymbol=d[4]),y[0]&409601&&(ve.disabled=!d[0]||!!d[14]||!d[17]||!d[18]),y[0]&4194304&&(ve.options=d[22]),!ge&&y[0]&128&&(ge=!0,ve.selected=d[7],Un(()=>ge=!1)),ie.$set(ve);let _e=q;q=Ct(d),q===_e?de[q].p(d,y):(ke(),X(de[_e],1,1,()=>{de[_e]=null}),Fe(),Z=de[q],Z?Z.p(d,y):(Z=de[q]=ht[q](d),Z.c()),G(Z,1),Z.m(M,null)),d[1]===le.true?Y?Y.p(d,y):(Y=xr(d),Y.c(),Y.m(t,Ve)):Y&&(Y.d(1),Y=null),Xe===(Xe=St(d))&&p?p.p(d,y):(p.d(1),p=Xe(d),p&&(p.c(),p.m(Ge,null))),(!W||y[0]&8192)&&$e!==($e=k(((ft=d[13])==null?void 0:ft.message)||"")+"")&&(ce.innerHTML=$e),(!W||y[0]&8192)&&se(ce,"error",((S=d[13])==null?void 0:S.type)==="error"),(!W||y[0]&8192)&&se(ce,"success",((He=d[13])==null?void 0:He.type)==="success"),(!W||y[0]&557632&&We!==(We=d[15]||d[19]||d[9]===0&&!((Pe=d[6])!=null&&Pe.amount)))&&(ee.disabled=We),(!W||y[0]&557056)&&se(ee,"disabled",d[15]||d[19]),(!W||y[0]&524288)&&se(ee,"pending",d[19])},i(d){W||(G(j),G(g.$$.fragment,d),G(b),G(ie.$$.fragment,d),G(Z),W=!0)},o(d){X(j),X(g.$$.fragment,d),X(b),X(ie.$$.fragment,d),X(Z),W=!1},d(d){d&&B(t),Q&&Q.d(),j&&j.d(),et(g),pe[E].d(),et(ie),de[q].d(),Y&&Y.d(),p.d(),e[45](null),ut=!1,we(De)}}}function hs(e,t,n){let{session:r=""}=t,{userid:i=""}=t,{endpoint:o=""}=t,{lang:a="en"}=t,{clientstyling:s=""}=t,{clientstylingurl:l=""}=t,{translationurl:u=""}=t,{playercurrency:h=""}=t,{showvaults:f=le.true}=t,{showtotalbalance:c=le.true}=t,{showclosebutton:m=le.true}=t,{showcurrencysymbol:_=le.true}=t,{currencyposition:g=""}=t,{currencydecimals:w="2"}=t,{local:O="en-US"}=t,E=null,b=null,C=0,M=0,K=0,$=null,ue=null,F=null,Te="",me=!0,ie=!1,ge=!1,be=!1,q=!1,Z=[],Ce=[],Ve=[],ye=[],oe;va({withLocale:"en",translations:{}}),Object.keys(nr).forEach(p=>{tr(p,nr[p])});const _t=()=>{_a(a)},Ge=()=>{fetch(u).then(p=>p.json()).then(p=>{Object.keys(p).forEach(A=>{tr(A,p[A])})}).catch(p=>{console.error("There was a problem with the translations request.",p)})},Et=()=>{let p=document.createElement("style");p.innerHTML=s,oe.appendChild(p)},ce=()=>{let p,A=new URL(l),d=document.createElement("style");fetch(A.href).then(y=>y.text()).then(y=>{d.innerHTML=y,p&&clearTimeout(p),p=setTimeout(()=>{oe.appendChild(d)},1)})},$e=()=>{Ce.length!==0&&(n(16,ie=!ie),window.postMessage({type:ln.VaultDropdownToggled,state:ie},window.location.href))},lt=()=>{window.postMessage({type:ln.VaultWidgetClosed},window.location.href)},fe=()=>{n(15,me=!0),Se(),ee(),xt(),je(),window.postMessage({type:ln.VaultWidgetReset},window.location.href)},he=()=>{n(15,me=!0),n(10,K=0)},Se=()=>{n(12,ue=null)},ee=()=>{n(9,C=0),n(10,K=0)},xt=()=>{n(14,Te="")},je=()=>{n(13,F=null)},We=p=>{p&&n(14,Te=p)},W=({type:p,message:A,source:d=""})=>{let y;switch(n(13,F={message:A,source:d,type:p}),p){case Le.error:n(15,me=!0),window.postMessage({type:d,data:{type:p,message:A}},window.location.href);break;case Le.success:n(15,me=!0),window.postMessage({type:d,data:{type:p,message:A}},window.location.href),y&&clearTimeout(y),y=setTimeout(()=>{je()},Fa);break}},ut=()=>new Promise((p,A)=>{const d=F==null?void 0:F.message.includes(Ua.InvalidSession);d&&A(),isNaN(Number(C))&&(he(),Se(),A(k("invalidValue"))),C>(E==null?void 0:E.amount)&&(he(),Se(),A(k("exceededValue"))),C===null&&!d&&(he(),Se(),A()),C===0&&C===0&&!d&&(fe(),A()),(!E||!b)&&!d&&A(),xt(),p()}),De=(p,A)=>Bt(this,null,function*(){var y,L;const d=yield p.json();return(p==null?void 0:p.status)>=200&&(p==null?void 0:p.status)<400?d:(A===J.CheckWalletExchangeError&&he(),!ge&&A===J.BalanceError&&(n(17,ge=!0),n(18,be=!0)),!be&&A===J.CurrenciesError&&n(18,be=!0),W({type:Le.error,message:k((y=d==null?void 0:d.thirdPartyResponse)==null?void 0:y.code)||k((L=d==null?void 0:d.thirdPartyResponse)==null?void 0:L.errorCode)||"generalError",source:A}))}),Q=()=>new Promise((p,A)=>{const d=new URL(`${o}/v1/player/${i}/wallet-exchange/currencies`);fetch(d,{method:"GET",headers:{"X-SessionId":r,"Content-Type":"application/json",Accept:"application/json"}}).then(L=>De(L,J.CurrenciesError)).then(L=>{p(L==null?void 0:L.currencies)}).catch(L=>{n(18,be=!0),console.error("There was an error on the allowed currencies request.",L),W({type:Le.error,message:k("generalError"),source:J.CurrenciesError}),A()}).finally(()=>{n(18,be=!0)})}),j=({data:p,shouldUpdateSelectedCurrencies:A,allowed:d=[]})=>{var ft;const{items:y=[],totalAmount:L={},totalRealAmount:Be}=p||{};n(11,$=Object.entries(Be||L).map(([S="",He=0])=>({currency:S,amount:He}))[0]);let ve=null;const _e=new Map(d.map(S=>[S.code,S]));for(const S of y)if((S==null?void 0:S.type)===pr.Real){const He=_e.get(S==null?void 0:S.currency);if(He&&He.code===(S==null?void 0:S.currency)){const Pe=Yt(Ie(Ie({},S),He),{symbol:((ft=Da[S==null?void 0:S.currency])==null?void 0:ft[0])||(S==null?void 0:S.currency[0])});n(40,Z=[...Z,Pe]),(S==null?void 0:S.currency)===($==null?void 0:$.currency)&&n(11,$=Ie(Ie({},$),Pe)),(S==null?void 0:S.currency)!==($==null?void 0:$.currency)&&(S==null?void 0:S.walletAccountType)===pr.Vault&&n(20,Ce=[...Ce,Pe]),A&&(S==null?void 0:S.amount)>0&&n(6,E=$!=null&&$.currency?$:ve),E&&(E==null?void 0:E.currency)===(S==null?void 0:S.currency)&&n(6,E=Pe),b&&(b==null?void 0:b.currency)===(S==null?void 0:S.currency)&&n(7,b=Pe)}}},wt=(p=!0)=>{const A=new URL(`${o}/v2/player/${i}/balance`);fetch(A,{method:"GET",headers:{"X-SessionId":r,"Content-Type":"application/json",Accept:"application/json"}}).then(y=>De(y,J.BalanceError)).then(y=>{y&&(Q().then(L=>{n(40,Z=[]),n(20,Ce=[]),j({data:y,shouldUpdateSelectedCurrencies:p,allowed:L})}),window.postMessage({type:"playerBalanceInfo",balance:y},window.location.href))}).catch(y=>{n(17,ge=!0),console.error("There was an error with the player balance request.",y),W({type:Le.error,message:k("generalError"),source:J.BalanceError})}).finally(()=>{n(17,ge=!0)})},ct=Ma(()=>{ut().then(()=>{const p=new URL(`${o}/v2/player/${i}/check/wallet-exchange`),A={userId:i,amount:C,currency:E==null?void 0:E.currency,fromCurrency:E==null?void 0:E.currency,toCurrency:b==null?void 0:b.currency,payload:{PlayerCurrency:h}},d={method:"POST",headers:{"X-SessionId":r,"Content-Type":"application/json",Accept:"application/json"},body:hr(A)};fetch(p,d).then(y=>De(y,J.CheckWalletExchangeError)).then(y=>{var L,Be;if(y){if((F==null?void 0:F.source)===J.CheckWalletExchangeError&&je(),Array.isArray((L=y==null?void 0:y.fees)==null?void 0:L.fees)&&n(12,ue=y.fees),Array.isArray(y==null?void 0:y.walletActions)){const ve=((Be=y.walletActions.find(_e=>(_e==null?void 0:_e.directionName)===Va.Credit))==null?void 0:Be.amount)||0;n(10,K=ka(ve))}C>0&&K>0&&(E!=null&&E.currency)&&(b!=null&&b.currency)&&h&&n(15,me=!1)}}).catch(y=>{W({type:Le.error,message:k("generalError"),source:J.CheckWalletExchangeError}),console.error("There was a problem with the wallet exchange request.",y)})}).catch(p=>{We(p)})},500),pe=p=>{const A=p.target.value,[d,y]=A.split(".");!y&&A.length>=Ee&&n(9,C=A.slice(0,Ee));const L=Number((E==null?void 0:E.precision)||"2");y&&(E==null?void 0:E.type)===dr.Fiat&&(y.length<=L?(n(9,C=A),M=A):n(9,C=M)),y&&(E==null?void 0:E.type)===dr.CryptoCurrency&&(L<=Ee&&y.length<=L?(n(9,C=A),M=A):n(9,C=M),L>Ee&&y.length<=Ee?(n(9,C=A),M=A):n(9,C=M)),ct()},At=p=>{const A=p.data;[">","<",","].includes(A)&&p.preventDefault(),A&&!A.match(/[\d.]/)&&p.preventDefault(),A==="."&&p.target.value.includes(".")&&p.preventDefault()},qt=()=>{C===0&&n(9,C=null)},Tt=()=>{const p=new URL(`${o}/v2/player/${i}/wallet-exchange`);n(19,q=!0);const A={feeDetails:ue,userId:i,amount:C,currency:E==null?void 0:E.currency,fromCurrency:E==null?void 0:E.currency,toCurrency:b==null?void 0:b.currency,payload:{PlayerCurrency:h}},d={method:"PUT",headers:{"X-SessionId":r,"Content-Type":"application/json",Accept:"application/json"},body:hr(A)};fetch(p,d).then(y=>De(y,J.WalletExchangeError)).then(y=>{y&&(W({type:Le.success,message:k("exchangeSuccess"),source:"ExchangeSuccess"}),wt(!1))}).catch(y=>{W({type:Le.error,message:k("generalError"),source:J.WalletExchangeError}),console.error("There was an error with the wallet exchange request.",y)}).finally(()=>{n(19,q=!1),ee(),Se()})},ht=p=>{const{data:{type:A}={}}=p||{};switch(A){case fr.ResetVaultWidget:fe();break;case fr.CloseVaultWidget:lt();break}};Br(()=>(Na(O,_,g,w),window.addEventListener("message",ht),()=>{window.removeEventListener("message",ht)}));function de(){C=kt(this.value),n(9,C)}function Ct(p){E=p,n(6,E)}function Y(){K=kt(this.value),n(10,K)}function St(p){b=p,n(7,b)}function Xe(p){Ye[p?"unshift":"push"](()=>{oe=p,n(8,oe)})}return e.$$set=p=>{"session"in p&&n(0,r=p.session),"userid"in p&&n(31,i=p.userid),"endpoint"in p&&n(32,o=p.endpoint),"lang"in p&&n(33,a=p.lang),"clientstyling"in p&&n(34,s=p.clientstyling),"clientstylingurl"in p&&n(35,l=p.clientstylingurl),"translationurl"in p&&n(36,u=p.translationurl),"playercurrency"in p&&n(37,h=p.playercurrency),"showvaults"in p&&n(1,f=p.showvaults),"showtotalbalance"in p&&n(2,c=p.showtotalbalance),"showclosebutton"in p&&n(3,m=p.showclosebutton),"showcurrencysymbol"in p&&n(4,_=p.showcurrencysymbol),"currencyposition"in p&&n(38,g=p.currencyposition),"currencydecimals"in p&&n(5,w=p.currencydecimals),"local"in p&&n(39,O=p.local)},e.$$.update=()=>{e.$$.dirty[1]&4&&a&&_t(),e.$$.dirty[0]&256|e.$$.dirty[1]&8&&s&&oe&&Et(),e.$$.dirty[0]&256|e.$$.dirty[1]&16&&l&&oe&&ce(),e.$$.dirty[1]&32&&u&&Ge(),e.$$.dirty[0]&1|e.$$.dirty[1]&67&&r&&i&&o&&h&&wt(),e.$$.dirty[0]&128|e.$$.dirty[1]&512&&n(21,Ve=Z.filter(p=>(p==null?void 0:p.amount)>0&&(p==null?void 0:p.currency)!==(b==null?void 0:b.currency))),e.$$.dirty[0]&64|e.$$.dirty[1]&512&&n(22,ye=Z.filter(p=>(E==null?void 0:E.currency)!==(p==null?void 0:p.currency)))},[r,f,c,m,_,w,E,b,oe,C,K,$,ue,F,Te,me,ie,ge,be,q,Ce,Ve,ye,$e,lt,fe,ct,pe,At,qt,Tt,i,o,a,s,l,u,h,g,O,Z,de,Ct,Y,St,Xe]}class ci extends Ln{constructor(t){super(),Pn(this,t,hs,cs,Gt,{session:0,userid:31,endpoint:32,lang:33,clientstyling:34,clientstylingurl:35,translationurl:36,playercurrency:37,showvaults:1,showtotalbalance:2,showclosebutton:3,showcurrencysymbol:4,currencyposition:38,currencydecimals:5,local:39},Ka,[-1,-1,-1])}get session(){return this.$$.ctx[0]}set session(t){this.$$set({session:t}),U()}get userid(){return this.$$.ctx[31]}set userid(t){this.$$set({userid:t}),U()}get endpoint(){return this.$$.ctx[32]}set endpoint(t){this.$$set({endpoint:t}),U()}get lang(){return this.$$.ctx[33]}set lang(t){this.$$set({lang:t}),U()}get clientstyling(){return this.$$.ctx[34]}set clientstyling(t){this.$$set({clientstyling:t}),U()}get clientstylingurl(){return this.$$.ctx[35]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),U()}get translationurl(){return this.$$.ctx[36]}set translationurl(t){this.$$set({translationurl:t}),U()}get playercurrency(){return this.$$.ctx[37]}set playercurrency(t){this.$$set({playercurrency:t}),U()}get showvaults(){return this.$$.ctx[1]}set showvaults(t){this.$$set({showvaults:t}),U()}get showtotalbalance(){return this.$$.ctx[2]}set showtotalbalance(t){this.$$set({showtotalbalance:t}),U()}get showclosebutton(){return this.$$.ctx[3]}set showclosebutton(t){this.$$set({showclosebutton:t}),U()}get showcurrencysymbol(){return this.$$.ctx[4]}set showcurrencysymbol(t){this.$$set({showcurrencysymbol:t}),U()}get currencyposition(){return this.$$.ctx[38]}set currencyposition(t){this.$$set({currencyposition:t}),U()}get currencydecimals(){return this.$$.ctx[5]}set currencydecimals(t){this.$$set({currencydecimals:t}),U()}get local(){return this.$$.ctx[39]}set local(t){this.$$set({local:t}),U()}}In(ci,{session:{},userid:{},endpoint:{},lang:{},clientstyling:{},clientstylingurl:{},translationurl:{},playercurrency:{},showvaults:{},showtotalbalance:{},showclosebutton:{},showcurrencysymbol:{},currencyposition:{},currencydecimals:{},local:{}},[],[],!0);exports.default=ci;
|