xendit-components-web 0.0.12 → 0.0.13

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.
@@ -1,8 +0,0 @@
1
- /*! Copyright (c) 2026 Xendit Inc. Licensed under the MIT License (MIT). */
2
- var e,t,n,r,a,o,i,d,s,l,c,u,h,p={},f=[],m=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function _(e,t){for(var n in t)e[n]=t[n];return e}function $(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function y(t,n,r){var a,o,i,d={};for(i in n)"key"==i?a=n[i]:"ref"==i?o=n[i]:d[i]=n[i];if(arguments.length>2&&(d.children=arguments.length>3?e.call(arguments,2):r),"function"==typeof t&&null!=t.defaultProps)for(i in t.defaultProps)void 0===d[i]&&(d[i]=t.defaultProps[i]);return b(t,d,a,o,null)}function b(e,r,a,o,i){var d={type:e,props:r,key:a,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==i?++n:i,__i:-1,__u:0};return null==i&&null!=t.vnode&&t.vnode(d),d}function v(e){return e.children}function x(e,t){this.props=e,this.context=t}function w(e,t){if(null==t)return e.__?w(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?w(e):null}function C(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return C(e)}}function k(e){(!e.__d&&(e.__d=!0)&&r.push(e)&&!E.__r++||a!=t.debounceRendering)&&((a=t.debounceRendering)||o)(E)}function E(){for(var e,n,a,o,d,s,l,c=1;r.length;)r.length>c&&r.sort(i),e=r.shift(),c=r.length,e.__d&&(a=void 0,o=void 0,d=(o=(n=e).__v).__e,s=[],l=[],n.__P&&((a=_({},o)).__v=o.__v+1,t.vnode&&t.vnode(a),O(n.__P,a,o,n.__n,n.__P.namespaceURI,32&o.__u?[d]:null,s,null==d?w(o):d,!!(32&o.__u),l),a.__v=o.__v,a.__.__k[a.__i]=a,M(s,a,l),o.__e=o.__=null,a.__e!=d&&C(a)));E.__r=0}function P(e,t,n,r,a,o,i,d,s,l,c){var u,h,m,_,$,y,x,C=r&&r.__k||f,k=t.length;for(s=function(e,t,n,r,a){var o,i,d,s,l,c=n.length,u=c,h=0;for(e.__k=new Array(a),o=0;o<a;o++)null!=(i=t[o])&&"boolean"!=typeof i&&"function"!=typeof i?("string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?i=e.__k[o]=b(null,i,null,null,null):g(i)?i=e.__k[o]=b(v,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?i=e.__k[o]=b(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):e.__k[o]=i,s=o+h,i.__=e,i.__b=e.__b+1,d=null,-1!=(l=i.__i=T(i,n,s,u))&&(u--,(d=n[l])&&(d.__u|=2)),null==d||null==d.__v?(-1==l&&(a>c?h--:a<c&&h++),"function"!=typeof i.type&&(i.__u|=4)):l!=s&&(l==s-1?h--:l==s+1?h++:(l>s?h--:h++,i.__u|=4))):e.__k[o]=null;if(u)for(o=0;o<c;o++)null!=(d=n[o])&&!(2&d.__u)&&(d.__e==r&&(r=w(d)),F(d,d));return r}(n,t,C,s,k),u=0;u<k;u++)null!=(m=n.__k[u])&&(h=-1==m.__i?p:C[m.__i]||p,m.__i=u,y=O(e,m,h,a,o,i,d,s,l,c),_=m.__e,m.ref&&h.ref!=m.ref&&(h.ref&&B(h.ref,null,m),c.push(m.ref,m.__c||_,m)),null==$&&null!=_&&($=_),(x=!!(4&m.__u))||h.__k===m.__k?s=S(m,s,e,x):"function"==typeof m.type&&void 0!==y?s=y:_&&(s=_.nextSibling),m.__u&=-7);return n.__e=$,s}function S(e,t,n,r){var a,o;if("function"==typeof e.type){for(a=e.__k,o=0;a&&o<a.length;o++)a[o]&&(a[o].__=e,t=S(a[o],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=w(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function N(e,t){return t=t||[],null==e||"boolean"==typeof e||(g(e)?e.some(function(e){N(e,t)}):t.push(e)),t}function T(e,t,n,r){var a,o,i,d=e.key,s=e.type,l=t[n],c=null!=l&&!(2&l.__u);if(null===l&&null==d||c&&d==l.key&&s==l.type)return n;if(r>(c?1:0))for(a=n-1,o=n+1;a>=0||o<t.length;)if(null!=(l=t[i=a>=0?a--:o++])&&!(2&l.__u)&&d==l.key&&s==l.type)return i;return-1}function A(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||m.test(t)?n:n+"px"}function R(e,t,n,r,a){var o,i;e:if("style"==t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||A(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||A(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])o=t!=(t=t.replace(d,"$1")),i=t.toLowerCase(),t=i in e||"onFocusOut"==t||"onFocusIn"==t?i.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=s,e.addEventListener(t,o?c:l,o)):e.removeEventListener(t,o?c:l,o);else{if("http://www.w3.org/2000/svg"==a)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function I(e){return function(n){if(this.l){var r=this.l[n.type+e];if(null==n.t)n.t=s++;else if(n.t<r.u)return;return r(t.event?t.event(n):n)}}}function O(e,n,r,a,o,i,d,s,l,c){var u,h,p,f,m,y,b,w,C,k,E,S,N,T,A,R,I,O=n.type;if(void 0!==n.constructor)return null;128&r.__u&&(l=!!(32&r.__u),i=[s=n.__e=r.__e]),(u=t.__b)&&u(n);e:if("function"==typeof O)try{if(w=n.props,C="prototype"in O&&O.prototype.render,k=(u=O.contextType)&&a[u.__c],E=u?k?k.props.value:u.__:a,r.__c?b=(h=n.__c=r.__c).__=h.__E:(C?n.__c=h=new O(w,E):(n.__c=h=new x(w,E),h.constructor=O,h.render=j),k&&k.sub(h),h.state||(h.state={}),h.__n=a,p=h.__d=!0,h.__h=[],h._sb=[]),C&&null==h.__s&&(h.__s=h.state),C&&null!=O.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=_({},h.__s)),_(h.__s,O.getDerivedStateFromProps(w,h.__s))),f=h.props,m=h.state,h.__v=n,p)C&&null==O.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),C&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(C&&null==O.getDerivedStateFromProps&&w!==f&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(w,E),n.__v==r.__v||!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(w,h.__s,E)){for(n.__v!=r.__v&&(h.props=w,h.state=h.__s,h.__d=!1),n.__e=r.__e,n.__k=r.__k,n.__k.some(function(e){e&&(e.__=n)}),S=0;S<h._sb.length;S++)h.__h.push(h._sb[S]);h._sb=[],h.__h.length&&d.push(h);break e}null!=h.componentWillUpdate&&h.componentWillUpdate(w,h.__s,E),C&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(f,m,y)})}if(h.context=E,h.props=w,h.__P=e,h.__e=!1,N=t.__r,T=0,C){for(h.state=h.__s,h.__d=!1,N&&N(n),u=h.render(h.props,h.state,h.context),A=0;A<h._sb.length;A++)h.__h.push(h._sb[A]);h._sb=[]}else do{h.__d=!1,N&&N(n),u=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++T<25);h.state=h.__s,null!=h.getChildContext&&(a=_(_({},a),h.getChildContext())),C&&!p&&null!=h.getSnapshotBeforeUpdate&&(y=h.getSnapshotBeforeUpdate(f,m)),R=u,null!=u&&u.type===v&&null==u.key&&(R=D(u.props.children)),s=P(e,g(R)?R:[R],n,r,a,o,i,d,s,l,c),h.base=n.__e,n.__u&=-161,h.__h.length&&d.push(h),b&&(h.__E=h.__=null)}catch(e){if(n.__v=null,l||null!=i)if(e.then){for(n.__u|=l?160:128;s&&8==s.nodeType&&s.nextSibling;)s=s.nextSibling;i[i.indexOf(s)]=null,n.__e=s}else{for(I=i.length;I--;)$(i[I]);L(n)}else n.__e=r.__e,n.__k=r.__k,e.then||L(n);t.__e(e,n,r)}else null==i&&n.__v==r.__v?(n.__k=r.__k,n.__e=r.__e):s=n.__e=U(r.__e,n,r,a,o,i,d,l,c);return(u=t.diffed)&&u(n),128&n.__u?void 0:s}function L(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(L)}function M(e,n,r){for(var a=0;a<r.length;a++)B(r[a],r[++a],r[++a]);t.__c&&t.__c(n,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(e){e.call(n)})}catch(e){t.__e(e,n.__v)}})}function D(e){return"object"!=typeof e||null==e||e.__b&&e.__b>0?e:g(e)?e.map(D):_({},e)}function U(n,r,a,o,i,d,s,l,c){var u,h,f,m,_,y,b,v=a.props||p,x=r.props,C=r.type;if("svg"==C?i="http://www.w3.org/2000/svg":"math"==C?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),null!=d)for(u=0;u<d.length;u++)if((_=d[u])&&"setAttribute"in _==!!C&&(C?_.localName==C:3==_.nodeType)){n=_,d[u]=null;break}if(null==n){if(null==C)return document.createTextNode(x);n=document.createElementNS(i,C,x.is&&x),l&&(t.__m&&t.__m(r,d),l=!1),d=null}if(null==C)v===x||l&&n.data==x||(n.data=x);else{if(d=d&&e.call(n.childNodes),!l&&null!=d)for(v={},u=0;u<n.attributes.length;u++)v[(_=n.attributes[u]).name]=_.value;for(u in v)if(_=v[u],"children"==u);else if("dangerouslySetInnerHTML"==u)f=_;else if(!(u in x)){if("value"==u&&"defaultValue"in x||"checked"==u&&"defaultChecked"in x)continue;R(n,u,null,_,i)}for(u in x)_=x[u],"children"==u?m=_:"dangerouslySetInnerHTML"==u?h=_:"value"==u?y=_:"checked"==u?b=_:l&&"function"!=typeof _||v[u]===_||R(n,u,_,v[u],i);if(h)l||f&&(h.__html==f.__html||h.__html==n.innerHTML)||(n.innerHTML=h.__html),r.__k=[];else if(f&&(n.innerHTML=""),P("template"==r.type?n.content:n,g(m)?m:[m],r,a,o,"foreignObject"==C?"http://www.w3.org/1999/xhtml":i,d,s,d?d[0]:a.__k&&w(a,0),l,c),null!=d)for(u=d.length;u--;)$(d[u]);l||(u="value","progress"==C&&null==y?n.removeAttribute("value"):null!=y&&(y!==n[u]||"progress"==C&&!y||"option"==C&&y!=v[u])&&R(n,u,y,v[u],i),u="checked",null!=b&&b!=n[u]&&R(n,u,b,v[u],i))}return n}function B(e,n,r){try{if("function"==typeof e){var a="function"==typeof e.__u;a&&e.__u(),a&&null==n||(e.__u=e(n))}else e.current=n}catch(e){t.__e(e,r)}}function F(e,n,r){var a,o;if(t.unmount&&t.unmount(e),(a=e.ref)&&(a.current&&a.current!=e.__e||B(a,null,n)),null!=(a=e.__c)){if(a.componentWillUnmount)try{a.componentWillUnmount()}catch(e){t.__e(e,n)}a.base=a.__P=null}if(a=e.__k)for(o=0;o<a.length;o++)a[o]&&F(a[o],n,r||"function"!=typeof e.type);r||$(e.__e),e.__c=e.__=e.__e=void 0}function j(e,t,n){return this.constructor(e,n)}function q(n,r,a){var o,i,d;r==document&&(r=document.documentElement),t.__&&t.__(n,r),o=!1?null:r.__k,i=[],d=[],O(r,n=r.__k=y(v,null,[n]),o||p,p,r.namespaceURI,o?null:r.firstChild?e.call(r.childNodes):null,i,o?o.__e:r.firstChild,false,d),M(i,n,d)}function K(e){function t(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach(function(e){e.__e=!0,k(e)})},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c="__cC"+u++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}e=f.slice,t={__e:function(e,t,n,r){for(var a,o,i;t=t.__;)if((a=t.__c)&&!a.__)try{if((o=a.constructor)&&null!=o.getDerivedStateFromError&&(a.setState(o.getDerivedStateFromError(e)),i=a.__d),null!=a.componentDidCatch&&(a.componentDidCatch(e,r||{}),i=a.__d),i)return a.__E=a}catch(t){e=t}throw e}},n=0,x.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=_({},this.state),"function"==typeof e&&(e=e(_({},n),this.props)),e&&_(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),k(this))},x.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),k(this))},x.prototype.render=v,r=[],o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,i=function(e,t){return e.__v.__b-t.__v.__b},E.__r=0,d=/(PointerCapture)$|Capture$/i,s=0,l=I(!1),c=I(!0),u=0,null!=(h="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0)&&h.__PREACT_DEVTOOLS__&&h.__PREACT_DEVTOOLS__.attachPreact("10.28.2",t,{Fragment:v,Component:x});var V={};function H(e){return e.type===v?"Fragment":"function"==typeof e.type?e.type.displayName||e.type.name:"string"==typeof e.type?e.type:"#text"}var G=[],W=[];function Y(){return G.length>0?G[G.length-1]:null}var z=!0;function X(e){return"function"==typeof e.type&&e.type!=v}function Z(e){for(var t=[e],n=e;null!=n.__o;)t.push(n.__o),n=n.__o;return t.reduce(function(e,t){e+=" in "+H(t);var n=t.__source;return n?e+=" (at "+n.fileName+":"+n.lineNumber+")":z&&console.warn("Add @babel/plugin-transform-react-jsx-source to get a more detailed component stack. Note that you should not add it to production builds of your App for bundle size reasons."),z=!1,e+"\n"},"")}var J="function"==typeof WeakMap;function Q(e){var t=[];return e.__k?(e.__k.forEach(function(e){e&&"function"==typeof e.type?t.push.apply(t,Q(e)):e&&"string"==typeof e.type&&t.push(e.type)}),t):t}function ee(e){return e?"function"==typeof e.type?null==e.__?null!=e.__e&&null!=e.__e.parentNode?e.__e.parentNode.localName:"":ee(e.__):e.type:""}var te=x.prototype.setState;function ne(e){return"table"===e||"tfoot"===e||"tbody"===e||"thead"===e||"td"===e||"tr"===e||"th"===e}x.prototype.setState=function(e,t){return null==this.__v&&null==this.state&&console.warn('Calling "this.setState" inside the constructor of a component is a no-op and might be a bug in your application. Instead, set "this.state = {}" directly.\n\n'+Z(Y())),te.call(this,e,t)};var re=/^(address|article|aside|blockquote|details|div|dl|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|main|menu|nav|ol|p|pre|search|section|table|ul)$/,ae=x.prototype.forceUpdate;function oe(e){var t=e.props,n=H(e),r="";for(var a in t)if(t.hasOwnProperty(a)&&"children"!==a){var o=t[a];"function"==typeof o&&(o="function "+(o.displayName||o.name)+"() {}"),o=Object(o)!==o||o.toString?o+"":Object.prototype.toString.call(o),r+=" "+a+"="+JSON.stringify(o)}var i=t.children;return"<"+n+r+(i&&i.length?">..</"+n+">":" />")}x.prototype.forceUpdate=function(e){return null==this.__v?console.warn('Calling "this.forceUpdate" inside the constructor of a component is a no-op and might be a bug in your application.\n\n'+Z(Y())):null==this.__P&&console.warn('Can\'t call "this.forceUpdate" on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.\n\n'+Z(this.__v)),ae.call(this,e)},t.__m=function(e,t){var n=e.type,r=t.map(function(e){return e&&e.localName}).filter(Boolean);console.error('Expected a DOM node of type "'+n+'" but found "'+r.join(", ")+"\" as available DOM-node(s), this is caused by the SSR'd HTML containing different DOM-nodes compared to the hydrated one.\n\n"+Z(e))},function(){!function(){var e=t.__b,n=t.diffed,r=t.__,a=t.vnode,o=t.__r;t.diffed=function(e){X(e)&&W.pop(),G.pop(),n&&n(e)},t.__b=function(t){X(t)&&G.push(t),e&&e(t)},t.__=function(e,t){W=[],r&&r(e,t)},t.vnode=function(e){e.__o=W.length>0?W[W.length-1]:null,a&&a(e)},t.__r=function(e){X(e)&&W.push(e),o&&o(e)}}();var e=!1,n=t.__b,r=t.diffed,a=t.vnode,o=t.__r,i=t.__e,d=t.__,s=t.__h,l=J?{useEffect:new WeakMap,useLayoutEffect:new WeakMap,lazyPropTypes:new WeakMap}:null,c=[];t.__e=function(e,t,n,r){if(t&&t.__c&&"function"==typeof e.then){var a=e;e=new Error("Missing Suspense. The throwing component was: "+H(t));for(var o=t;o;o=o.__)if(o.__c&&o.__c.__c){e=a;break}if(e instanceof Error)throw e}try{(r=r||{}).componentStack=Z(t),i(e,t,n,r),"function"!=typeof e.then&&setTimeout(function(){throw e})}catch(e){throw e}},t.__=function(e,t){if(!t)throw new Error("Undefined parent passed to render(), this is the second argument.\nCheck if the element is available in the DOM/has the correct id.");var n;switch(t.nodeType){case 1:case 11:case 9:n=!0;break;default:n=!1}if(!n){var r=H(e);throw new Error("Expected a valid HTML node as a second argument to render.\tReceived "+t+" instead: render(<"+r+" />, "+t+");")}d&&d(e,t)},t.__b=function(t){var r=t.type;if(e=!0,void 0===r)throw new Error("Undefined component passed to createElement()\n\nYou likely forgot to export your component or might have mixed up default and named imports"+oe(t)+"\n\n"+Z(t));if(null!=r&&"object"==typeof r){if(void 0!==r.__k&&void 0!==r.__e)throw new Error("Invalid type passed to createElement(): "+r+"\n\nDid you accidentally pass a JSX literal as JSX twice?\n\n let My"+H(t)+" = "+oe(r)+";\n let vnode = <My"+H(t)+" />;\n\nThis usually happens when you export a JSX literal and not the component.\n\n"+Z(t));throw new Error("Invalid type passed to createElement(): "+(Array.isArray(r)?"array":r))}if(void 0!==t.ref&&"function"!=typeof t.ref&&"object"!=typeof t.ref&&!("$$typeof"in t))throw new Error('Component\'s "ref" property should be a function, or an object created by createRef(), but got ['+typeof t.ref+"] instead\n"+oe(t)+"\n\n"+Z(t));if("string"==typeof t.type)for(var a in t.props)if("o"===a[0]&&"n"===a[1]&&"function"!=typeof t.props[a]&&null!=t.props[a])throw new Error("Component's \""+a+'" property should be a function, but got ['+typeof t.props[a]+"] instead\n"+oe(t)+"\n\n"+Z(t));if("function"==typeof t.type&&t.type.propTypes){if("Lazy"===t.type.displayName&&l&&!l.lazyPropTypes.has(t.type)){var o="PropTypes are not supported on lazy(). Use propTypes on the wrapped component itself. ";try{var i=t.type();l.lazyPropTypes.set(t.type,!0),console.warn(o+"Component wrapped in lazy() is "+H(i))}catch(e){console.warn(o+"We will log the wrapped component's name once it is loaded.")}}var d=t.props;t.type.__f&&delete(d=function(e,t){for(var n in t)e[n]=t[n];return e}({},d)).ref,function(e,t,n,r,a){Object.keys(e).forEach(function(n){var o;try{o=e[n](t,n,r,"prop",null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){o=e}o&&!(o.message in V)&&(V[o.message]=!0,console.error("Failed prop type: "+o.message+(a&&"\n"+a()||"")))})}(t.type.propTypes,d,0,H(t),function(){return Z(t)})}n&&n(t)};var u,h=0;t.__r=function(t){o&&o(t),e=!0;var n=t.__c;if(n===u?h++:h=1,h>=25)throw new Error("Too many re-renders. This is limited to prevent an infinite loop which may lock up your browser. The component causing this is: "+H(t));u=n},t.__h=function(t,n,r){if(!t||!e)throw new Error("Hook can only be invoked from render methods.");s&&s(t,n,r)};var p=function(e,t){return{get:function(){var n="get"+e+t;c&&c.indexOf(n)<0&&(c.push(n),console.warn("getting vnode."+e+" is deprecated, "+t))},set:function(){var n="set"+e+t;c&&c.indexOf(n)<0&&(c.push(n),console.warn("setting vnode."+e+" is not allowed, "+t))}}},f={nodeName:p("nodeName","use vnode.type"),attributes:p("attributes","use vnode.props"),children:p("children","use vnode.props.children")},m=Object.create({},f);t.vnode=function(e){var t=e.props;if(null!==e.type&&null!=t&&("__source"in t||"__self"in t)){var n=e.props={};for(var r in t){var o=t[r];"__source"===r?e.__source=o:"__self"===r?e.__self=o:n[r]=o}}e.__proto__=m,a&&a(e)},t.diffed=function(t){var n,a=t.type,o=t.__;if(t.__k&&t.__k.forEach(function(e){if("object"==typeof e&&e&&void 0===e.type){var n=Object.keys(e).join(",");throw new Error("Objects are not valid as a child. Encountered an object with the keys {"+n+"}.\n\n"+Z(t))}}),t.__c===u&&(h=0),"string"==typeof a&&(ne(a)||"p"===a||"a"===a||"button"===a)){var i=ee(o);if(""!==i&&ne(a))"table"===a&&"td"!==i&&ne(i)?console.error("Improper nesting of table. Your <table> should not have a table-node parent."+oe(t)+"\n\n"+Z(t)):"thead"!==a&&"tfoot"!==a&&"tbody"!==a||"table"===i?"tr"===a&&"thead"!==i&&"tfoot"!==i&&"tbody"!==i?console.error("Improper nesting of table. Your <tr> should have a <thead/tbody/tfoot> parent."+oe(t)+"\n\n"+Z(t)):"td"===a&&"tr"!==i?console.error("Improper nesting of table. Your <td> should have a <tr> parent."+oe(t)+"\n\n"+Z(t)):"th"===a&&"tr"!==i&&console.error("Improper nesting of table. Your <th> should have a <tr>."+oe(t)+"\n\n"+Z(t)):console.error("Improper nesting of table. Your <thead/tbody/tfoot> should have a <table> parent."+oe(t)+"\n\n"+Z(t));else if("p"===a){var d=Q(t).filter(function(e){return re.test(e)});d.length&&console.error("Improper nesting of paragraph. Your <p> should not have "+d.join(", ")+" as child-elements."+oe(t)+"\n\n"+Z(t))}else"a"!==a&&"button"!==a||-1!==Q(t).indexOf(a)&&console.error("Improper nesting of interactive content. Your <"+a+"> should not have other "+("a"===a?"anchor":"button")+" tags as child-elements."+oe(t)+"\n\n"+Z(t))}if(e=!1,r&&r(t),null!=t.__k)for(var s=[],l=0;l<t.__k.length;l++){var c=t.__k[l];if(c&&null!=c.key){var p=c.key;if(-1!==s.indexOf(p)){console.error('Following component has two or more children with the same key attribute: "'+p+'". This may cause glitches and misbehavior in rendering process. Component: \n\n'+oe(t)+"\n\n"+Z(t));break}s.push(p)}}if(null!=t.__c&&null!=t.__c.__H){var f=t.__c.__H.__;if(f)for(var m=0;m<f.length;m+=1){var g=f[m];if(g.__H)for(var _=0;_<g.__H.length;_++)if((n=g.__H[_])!=n){var $=H(t);console.warn("Invalid argument passed to hook. Hooks should not be called with NaN in the dependency array. Hook index "+m+" in component "+$+" was called with NaN.")}}}}}();var ie,de,se,le,ce=0,ue=[],he=t,pe=he.__b,fe=he.__r,me=he.diffed,ge=he.__c,_e=he.unmount,$e=he.__;function ye(e,t){he.__h&&he.__h(de,e,ce||t),ce=0;var n=de.__H||(de.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function be(e){return ce=1,function(e,t,n){var r=ye(ie++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Ie(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=de,!de.__f)){var a=function(e,t,n){if(!r.__c.__H)return!0;var a=r.__c.__H.__.filter(function(e){return!!e.__c});if(a.every(function(e){return!e.__N}))return!o||o.call(this,e,t,n);var i=r.__c.props!==e;return a.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(i=!0)}}),o&&o.call(this,e,t,n)||i};de.__f=!0;var o=de.shouldComponentUpdate,i=de.componentWillUpdate;de.componentWillUpdate=function(e,t,n){if(this.__e){var r=o;o=void 0,a(e,t,n),o=r}i&&i.call(this,e,t,n)},de.shouldComponentUpdate=a}return r.__N||r.__}(Ie,e)}function ve(e,t){var n=ye(ie++,3);!he.__s&&Re(n.__H,t)&&(n.__=e,n.u=t,de.__H.__h.push(n))}function xe(e,t){var n=ye(ie++,4);!he.__s&&Re(n.__H,t)&&(n.__=e,n.u=t,de.__h.push(n))}function we(e){return ce=5,Ce(function(){return{current:e}},[])}function Ce(e,t){var n=ye(ie++,7);return Re(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function ke(e,t){return ce=8,Ce(function(){return e},t)}function Ee(e){var t=de.context[e.__c],n=ye(ie++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(de)),t.props.value):e.__}function Pe(){for(var e;e=ue.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Te),e.__H.__h.forEach(Ae),e.__H.__h=[]}catch(t){e.__H.__h=[],he.__e(t,e.__v)}}he.__b=function(e){de=null,pe&&pe(e)},he.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),$e&&$e(e,t)},he.__r=function(e){fe&&fe(e),ie=0;var t=(de=e.__c).__H;t&&(se===de?(t.__h=[],de.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(Te),t.__h.forEach(Ae),t.__h=[],ie=0)),se=de},he.diffed=function(e){me&&me(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==ue.push(t)&&le===he.requestAnimationFrame||((le=he.requestAnimationFrame)||Ne)(Pe)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),se=de=null},he.__c=function(e,t){t.some(function(e){try{e.__h.forEach(Te),e.__h=e.__h.filter(function(e){return!e.__||Ae(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],he.__e(n,e.__v)}}),ge&&ge(e,t)},he.unmount=function(e){_e&&_e(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{Te(e)}catch(e){t=e}}),n.__H=void 0,t&&he.__e(t,n.__v))};var Se="function"==typeof requestAnimationFrame;function Ne(e){var t,n=function(){clearTimeout(r),Se&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Se&&(t=requestAnimationFrame(n))}function Te(e){var t=de,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),de=t}function Ae(e){var t=de;e.__c=e.__(),de=t}function Re(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function Ie(e,t){return"function"==typeof t?t(e):t}function Oe(e,t){for(var n in t)e[n]=t[n];return e}function Le(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function Me(e,t){this.props=e,this.context=t}(Me.prototype=new x).isPureReactComponent=!0,Me.prototype.shouldComponentUpdate=function(e,t){return Le(this.props,e)||Le(this.state,t)};var De=t.__b;t.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),De&&De(e)};var Ue="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var Be=t.__e;t.__e=function(e,t,n,r){if(e.then)for(var a,o=t;o=o.__;)if((a=o.__c)&&a.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),a.__c(e,t);Be(e,t,n,r)};var Fe=t.unmount;function je(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),e.__c.__H=null),null!=(e=Oe({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return je(e,t,n)})),e}function qe(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return qe(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Ke(){this.__u=0,this.o=null,this.__b=null}function Ve(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function He(){this.i=null,this.l=null}t.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Fe&&Fe(e)},(Ke.prototype=new x).__c=function(e,t){var n=t.__c,r=this;null==r.o&&(r.o=[]),r.o.push(n);var a=Ve(r.__v),o=!1,i=function(){o||(o=!0,n.__R=null,a?a(d):d())};n.__R=i;var d=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=qe(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(i,i)},Ke.prototype.componentWillUnmount=function(){this.o=[]},Ke.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=je(this.__b,n,r.__O=r.__P)}this.__b=null}var a=t.__a&&y(v,null,e.fallback);return a&&(a.__u&=-33),[y(v,null,t.__a?null:e.children),a]};var Ge=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};(He.prototype=new x).__a=function(e){var t=this,n=Ve(t.__v),r=t.l.get(e);return r[0]++,function(a){var o=function(){t.props.revealOrder?(r.push(a),Ge(t,e,r)):a()};n?n(o):o()}},He.prototype.render=function(e){this.i=null,this.l=new Map;var t=N(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},He.prototype.componentDidUpdate=He.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){Ge(e,n,t)})};var We="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Ye=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ze=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Xe=/[A-Z0-9]/g,Ze="undefined"!=typeof document,Je=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};x.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(x.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Qe=t.event;function et(){}function tt(){return this.cancelBubble}function nt(){return this.defaultPrevented}t.event=function(e){return Qe&&(e=Qe(e)),e.persist=et,e.isPropagationStopped=tt,e.isDefaultPrevented=nt,e.nativeEvent=e};var rt={enumerable:!1,configurable:!0,get:function(){return this.class}},at=t.vnode;t.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={},a=-1===n.indexOf("-");for(var o in t){var i=t[o];if(!("value"===o&&"defaultValue"in t&&null==i||Ze&&"children"===o&&"noscript"===n||"class"===o||"className"===o)){var d=o.toLowerCase();"defaultValue"===o&&"value"in t&&null==t.value?o="value":"download"===o&&!0===i?i="":"translate"===d&&"no"===i?i=!1:"o"===d[0]&&"n"===d[1]?"ondoubleclick"===d?o="ondblclick":"onchange"!==d||"input"!==n&&"textarea"!==n||Je(t.type)?"onfocus"===d?o="onfocusin":"onblur"===d?o="onfocusout":ze.test(o)&&(o=d):d=o="oninput":a&&Ye.test(o)?o=o.replace(Xe,"-$&").toLowerCase():null===i&&(i=void 0),"oninput"===d&&r[o=d]&&(o="oninputCapture"),r[o]=i}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=N(t.children).forEach(function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)})),"select"==n&&null!=r.defaultValue&&(r.value=N(t.children).forEach(function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value})),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",rt)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=We,at&&at(e)};var ot=t.__r;t.__r=function(e){ot&&ot(e),e.__c};var it=t.diffed;t.diffed=function(e){it&&it(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value)};var dt=0;function st(e,n,r,a,o,i){n||(n={});var d,s,l=n;if("ref"in l)for(s in l={},n)"ref"==s?d=n[s]:l[s]=n[s];var c={type:e,props:l,key:r,ref:d,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--dt,__i:-1,__u:0,__source:o,__self:i};if("function"==typeof e&&(d=e.defaultProps))for(s in d)void 0===l[s]&&(l[s]=d[s]);return t.vnode&&t.vnode(c),c}const lt=e=>{const{name:t,size:n,direction:r}=e;let a;switch(r){case"left":a="rotate(0 12 12)";break;case"right":a="rotate(180 12 12)";break;case"up":a="rotate(90 12 12)";break;case"down":a="rotate(-90 12 12)"}return st("svg",{className:`xendit-icon ${e.className??""}`,width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:"none",children:st("g",{transform:a,children:ut.find(e=>e.name===t)?.node??null})})};function ct(e,t,n){return{name:e,node:st("g",{id:`xendit-icon-${e}`,transform:`scale(${1/n} ${1/n})`,children:t})}}const ut=[ct("chevron",st("path",{d:"M15 19.5L7.5 12L15 4.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),1),ct("check",st("path",{d:"M13.5 4.5L6.5 11.5L3 8",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),16/24),ct("x",st(v,{children:[st("path",{d:"M18.75 5.25L5.25 18.75",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),st("path",{d:"M18.75 18.75L5.25 5.25",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]}),1),ct("card",st("path",{fill:"currentColor",d:"M17.5 3.75H2.5C2.16848 3.75 1.85054 3.8817 1.61612 4.11612C1.3817 4.35054 1.25 4.66848 1.25 5V15C1.25 15.3315 1.3817 15.6495 1.61612 15.8839C1.85054 16.1183 2.16848 16.25 2.5 16.25H17.5C17.8315 16.25 18.1495 16.1183 18.3839 15.8839C18.6183 15.6495 18.75 15.3315 18.75 15V5C18.75 4.66848 18.6183 4.35054 18.3839 4.11612C18.1495 3.8817 17.8315 3.75 17.5 3.75ZM10.625 13.75H9.375C9.20924 13.75 9.05027 13.6842 8.93306 13.5669C8.81585 13.4497 8.75 13.2908 8.75 13.125C8.75 12.9592 8.81585 12.8003 8.93306 12.6831C9.05027 12.5658 9.20924 12.5 9.375 12.5H10.625C10.7908 12.5 10.9497 12.5658 11.0669 12.6831C11.1842 12.8003 11.25 12.9592 11.25 13.125C11.25 13.2908 11.1842 13.4497 11.0669 13.5669C10.9497 13.6842 10.7908 13.75 10.625 13.75ZM15.625 13.75H13.125C12.9592 13.75 12.8003 13.6842 12.6831 13.5669C12.5658 13.4497 12.5 13.2908 12.5 13.125C12.5 12.9592 12.5658 12.8003 12.6831 12.6831C12.8003 12.5658 12.9592 12.5 13.125 12.5H15.625C15.7908 12.5 15.9497 12.5658 16.0669 12.6831C16.1842 12.8003 16.25 12.9592 16.25 13.125C16.25 13.2908 16.1842 13.4497 16.0669 13.5669C15.9497 13.6842 15.7908 13.75 15.625 13.75ZM2.5 6.875V5H17.5V6.875H2.5Z"}),20/24),ct("dummy",st("path",{fill:"currentColor",d:"M17.5 11.875V15C17.5 15.3315 17.3683 15.6495 17.1339 15.8839C16.8995 16.1183 16.5815 16.25 16.25 16.25H3.75C3.41848 16.25 3.10054 16.1183 2.86612 15.8839C2.6317 15.6495 2.5 15.3315 2.5 15V11.875C2.5 11.5435 2.6317 11.2255 2.86612 10.9911C3.10054 10.7567 3.41848 10.625 3.75 10.625H16.25C16.5815 10.625 16.8995 10.7567 17.1339 10.9911C17.3683 11.2255 17.5 11.5435 17.5 11.875ZM16.25 3.75H3.75C3.41848 3.75 3.10054 3.8817 2.86612 4.11612C2.6317 4.35054 2.5 4.66848 2.5 5V8.125C2.5 8.45652 2.6317 8.77446 2.86612 9.00888C3.10054 9.2433 3.41848 9.375 3.75 9.375H16.25C16.5815 9.375 16.8995 9.2433 17.1339 9.00888C17.3683 8.77446 17.5 8.45652 17.5 8.125V5C17.5 4.66848 17.3683 4.35054 17.1339 4.11612C16.8995 3.8817 16.5815 3.75 16.25 3.75Z"}),20/24)];let ht=!1;const pt=Symbol("xendit-internal"),ft=e=>st("div",{class:"xendit-accordion",children:e.children});function mt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var gt,_t={exports:{}};
3
- /*!
4
- Copyright (c) 2018 Jed Watson.
5
- Licensed under the MIT License (MIT), see
6
- http://jedwatson.github.io/classnames
7
- */var $t,yt=(gt||(gt=1,$t=_t,function(){var e={}.hasOwnProperty;function t(){for(var e="",t=0;t<arguments.length;t++){var a=arguments[t];a&&(e=r(e,n(a)))}return e}function n(n){if("string"==typeof n||"number"==typeof n)return n;if("object"!=typeof n)return"";if(Array.isArray(n))return t.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var a="";for(var o in n)e.call(n,o)&&n[o]&&(a=r(a,o));return a}function r(e,t){return t?e?e+" "+t:e+t:e}$t.exports?(t.default=t,$t.exports=t):window.classNames=t}()),_t.exports),bt=mt(yt);const vt=e=>{const{id:t,title:n,subtitle:r,disabled:a,open:o,onClick:i,children:d}=e,s=o?"up":"down",l=ke(()=>{a||i(t)},[a,i,t]),c=ke(e=>{"Enter"!==e.key&&" "!==e.key||(l(),e.preventDefault())},[l]),u=ke(()=>{l()},[l]);return st("div",{className:bt("xendit-accordion-item",a?"xendit-accordion-item-disabled":"",o?"xendit-accordion-item-open":"xendit-accordion-item-closed"),children:[st("div",{className:"xendit-accordion-item-header",onClick:u,onKeyDown:c,role:"button",tabIndex:a?-1:0,children:[st(lt,{className:"xendit-accordion-item-header-icon",name:"dummy",size:24}),st("div",{className:"xendit-accordion-item-header-title xendit-text-16 xendit-text-bold",children:[n,r?st("div",{className:"xendit-accordion-item-header-subtitle xendit-text-14",children:r}):null]}),st(lt,{className:"xendit-accordion-item-chevron",name:"chevron",size:24,direction:s})]}),st("div",{className:"xendit-accordion-item-content",inert:!o,children:st("div",{className:"xendit-accordion-item-padding",children:d})})]})},xt=K(null);xt.displayName="SessionContext";const wt=K(null);wt.displayName="BusinessContext";const Ct=K(null);Ct.displayName="CustomerContext";const kt=K(null);kt.displayName="ChannelsContext";const Et=K(null);Et.displayName="ChannelUiGroupsContext";const Pt=K(null);Pt.displayName="SdkContext";const St=K(null);St.displayName="CurrentChannelContext";const Nt=()=>{const e=Ee(xt);if(null===e)throw new Error("useSession must be used within a XenditSessionProvider");return e},Tt=()=>{const e=Ee(kt);if(null===e)throw new Error("useChannels must be used within a XenditSessionProvider");return e},At=()=>{const e=Ee(Pt);if(null===e)throw new Error("useSdk must be used within a XenditSessionProvider");return e},Rt=()=>Ee(St),It=({children:e,data:t,sdk:n})=>{const{session:r,business:a,customer:o,channels:i,channelUiGroups:d}=t,s=n.getCurrentChannel()?.[pt]?.[0]??null;return st(Pt.Provider,{value:n,children:st(St.Provider,{value:s,children:st(xt.Provider,{value:r,children:st(wt.Provider,{value:a,children:st(Ct.Provider,{value:o,children:st(kt.Provider,{value:i,children:st(Et.Provider,{value:d,children:e})})})})})})})},Ot=300;function Lt(e){if(null==e)throw new Error("Assertion failed: argument is null or undefined; this is a bug, please contact support.")}function Mt(e,t){if(e!==t)throw new Error("Assertion failed; this is a bug, please contact support.")}function Dt(e){return new Promise(t=>setTimeout(t,1*e))}class AbortError extends Error{constructor(){super("AbortError"),this.name="AbortError"}}function Ut(e){return e instanceof AbortError&&"AbortError"===e.name}function Bt(e,t){return new Promise((n,r)=>{function a(){t.removeEventListener("abort",a),clearTimeout(o),r(new AbortError)}const o=setTimeout(()=>{t.removeEventListener("abort",a),n()},1*e);t.aborted?a():t.addEventListener("abort",a)})}function Ft(e){if(!e.length)throw new Error("Cannot search the actions list because it's empty.");const t=e.find(e=>{switch(e.type){case"REDIRECT_CUSTOMER":switch(e.descriptor){case"WEB_URL":return!0;case"DEEPLINK_URL":return function(){const e=navigator.userAgent;if(!e)return!1;if(/android/i.test(e))return!0;if(/iPad|iPhone|iPod/.test(e))return!0;return!1}();case"WEB_GOOGLE_PAYLINK":return!1}break;case"PRESENT_TO_CUSTOMER":return!0;case"API_POST_REQUEST":return!1}return!1});return t||e[0]}const jt="mock",qt={pl:"https://checkout-ui-gateway.xendit.co",pd:"https://checkout-ui-gateway-prod-dev.xendit.co",sl:"https://checkout-ui-gateway-live.stg.tidnex.dev",sd:"https://checkout-ui-gateway-dev.stg.tidnex.dev"};function Kt(e){return qt[e]??null}function Vt(e,t){const n={...e};for(const e of Object.keys(t)){const r=t[e];void 0!==r&&(n[e]=r)}return n}function Ht(e){const t=we();return xe(()=>{t.current=e}),t.current}function Gt(e){let t;if("string"==typeof e.channel_property)t=e.channel_property;else{t=Object.values(e.channel_property).join("__")}return t}const Wt=Math.floor(255*Math.random());function Yt(e){const t=Gt(e).split("").map(e=>(e.charCodeAt(0)%256^Wt).toString(16)).join("");return`xendit-id-${t}`}function zt(e){Lt(e%2==0);const t=function(e){const t=new Uint8Array(e);for(let n=0;n<e;n++)t[n]=Math.floor(256*Math.random());return t}(e/2);return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}function Xt(){return`xendit-id-${we(zt(12)).current}`}function Zt(e){if(e instanceof Error)return e.stack??e.message;if("string"==typeof e)return e;try{return`Unknown error: ${JSON.stringify(e)}`}catch{return"Unknown error"}}function Jt(e){for(const t of Object.keys(e)){if("symbol"==typeof t)continue;const n=Object.getOwnPropertyDescriptor(e,t);void 0!==n&&("function"!=typeof n.get&&void 0===n.value&&delete e[t])}return e}function Qt(e,t){let n=e;if(!t)return;if(Array.isArray(n))throw new Error("Getting values from channel property arrays is not supported.");let r=t;for(;;){if(!r||"object"!=typeof r||Array.isArray(r))return;const e=n.indexOf(".");if(-1===e)return r?r[n]:void 0;{const t=n.slice(0,e);r=r?r[t]:void 0,n=n.slice(e+1)}}}const en=new WeakMap;let tn=1;function nn(e,t){return Lt(e.length>0),Lt(e.length<=2),2===e.length?t?(Lt(!0===e[1].allow_save),e[1]):(Lt(!1===e[0].allow_save),e[0]):e[0]}function rn(e,t){if("PAY"!==e.session_type)return!0;const n=e.amount,r=t.min_amount??0,a=t.max_amount??Number.MAX_VALUE;return!(n<r||n>a)}function an(e){Object.defineProperty(e,pt,{enumerable:!1,writable:!1,configurable:!1,value:e[pt]})}const on={CARDS:!0};const dn=e=>{const{id:t,options:n,onChange:r,defaultIndex:a=-1,selectedIndex:o,className:i,placeholder:d}=e,s=At().t,l=Xt(),c=t||l,u="number"==typeof o,[h,p]=be(a),f=u?o:h,[m,g]=be(f>=0?f:0),[_,$]=be(!1),[y,b]=be(""),v=we(null),x=we(null),w=we(null),C=we(null),k=we(null),E=Ce(()=>{const e=n.map(ln).filter(({item:e})=>{if(""===y.trim())return!0;const t=y.toLowerCase();return e.title.toLowerCase().includes(t)||e.description?.toLowerCase().includes(t)||e.value.toLowerCase().includes(t)});return e.length>0?e:n.map(ln)},[y,n]),P=Math.max(0,Math.min(E.length-1,m));xe(()=>{if(!_)return;const e=e=>{const t=v.current;t&&(t.contains(e.target)||$(!1))};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[_]),xe(()=>{if(!_)return;const e=e=>{const t=v.current;t&&e.relatedTarget&&(t.contains(e.relatedTarget)||$(!1))};return document.body.addEventListener("focusout",e),()=>document.body.removeEventListener("focusout",e)},[_]),xe(()=>{_&&f>=0&&g(f)},[_,f]),xe(()=>{if(!_)return;if(!C.current)return;if(!w.current)return;const e=w.current.parentElement;e&&(e.scrollTop=C.current.offsetTop-e.clientHeight/2+C.current.clientHeight/2)},[_,m]);const S=ke(()=>{_||($(!0),queueMicrotask(()=>k.current?.focus()))},[_]),N=ke(()=>{_&&($(!1),b(""),x.current?.focus())},[_]),T=ke(()=>{_?N():S()},[N,_,S]),A=ke(e=>{const t=n[e];t&&(t.disabled||(u||p(e),r(t,e),N()))},[N,u,r,n]),R=ke(e=>{"ArrowDown"!==e.key&&"ArrowUp"!==e.key&&" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),S())},[S]),I=ke(e=>{const t=e.target===k.current;if("Escape"===e.key)return e.preventDefault(),void N();if("Enter"===e.key||" "===e.key){if(t&&" "===e.key)return;e.preventDefault();const n=E[P];return void(n&&A(n.originalIndex))}return"ArrowDown"===e.key?(e.preventDefault(),void g(e=>Math.min(E.length-1,e+1))):"ArrowUp"===e.key?(e.preventDefault(),void g(e=>Math.max(0,e-1))):"Home"===e.key?(e.preventDefault(),void g(0)):"End"===e.key?(e.preventDefault(),void g(E.length-1)):void 0},[P,N,A,E]),O=ke(e=>{e.stopPropagation(),e.preventDefault(),A(Number(e.currentTarget.dataset.index))},[A]),L=ke(e=>{b(e.currentTarget.value),g(0)},[]),M=f>=0?n[f]:void 0;return st("div",{ref:v,className:`xendit-dropdown ${i??""}`,children:[st("button",{id:c,ref:x,type:"button",className:M?.leadingAsset?"xendit-dropdown-has-asset":"","aria-expanded":_?"true":"false",onClick:T,onKeyDown:R,children:[M?.leadingAsset?M.leadingAsset:null,st("span",M?{className:"xendit-dropdown-button-title xendit-text-14",children:M.shortTitle??M.title}:{className:"xendit-dropdown-button-title xendit-text-14 xendit-text-secondary",children:d}),st(lt,{className:"xendit-dropdown-chevron",name:"chevron",size:16,direction:"down"})]}),_?st("div",{className:"xendit-dropdown-menu",children:[st("div",{className:"xendit-dropdown-search",children:st("input",{ref:k,placeholder:s("combobox.default_search_placeholder"),value:y,onInput:L,onClick:sn,onKeyDown:I})}),st("ul",{ref:w,role:"listbox",tabIndex:-1,onKeyDown:I,children:E.map(({item:e,originalIndex:t},n)=>{const r=t===f,a=n===P;return st("li",{role:"option","data-index":t,"aria-disabled":!!e.disabled||void 0,"aria-selected":r,onClick:O,ref:a?C:void 0,children:st("div",{className:`xendit-dropdown-item xendit-text-14 ${a?"xendit-dropdown-item-active":""} ${e.leadingAsset?"xendit-dropdown-has-asset":""} ${e.disabled?"xendit-dropdown-item-disabled":""}`,children:[e.leadingAsset?e.leadingAsset:null,st("div",{className:"xendit-dropdown-item-text xendit-text-14",children:[st("span",{className:"xendit-dropdown-item-title",children:e.title}),e.description&&st("span",{className:"xendit-dropdown-item-description xendit-text-12",children:e.description})]}),r?st(lt,{name:"check",size:16,className:"xendit-dropdown-item-selected"}):null]})},t)})})]}):null]})};function sn(e){e.stopPropagation()}function ln(e,t){return{item:e,originalIndex:t}}function cn(e){return function(e,t){if(e===t)throw new Error("Assertion failed; this is a bug, please contact support.")}(e.session_type,"AUTHORIZATION"),Mt(e.mode,"COMPONENTS"),Jt({id:e.payment_session_id,description:e.description||void 0,sessionType:e.session_type,mode:e.mode,referenceId:e.reference_id,country:e.country,currency:e.currency,amount:e.amount,channelProperties:e.channel_properties||void 0,expiresAt:new Date(e.expires_at),locale:e.locale,status:e.status,items:e.items?.map(e=>Jt({type:e.type,referenceId:e.reference_id,name:e.name,netUnitAmount:e.net_unit_amount,quantity:e.quantity,url:e.url,imageUrl:e.image_url,category:e.category,subcategory:e.subcategory,description:e.description,metadata:e.metadata}))})}function un(e,t,n,r){const a=Jt({groupId:e.id,label:e.label,get channels(){return(t[e.id]||[]).map(e=>pn(e,t,n,r))},[pt]:e});return an(a),a}function hn(e,t){return pn(e,{},{},t)}function pn(e,t,n,r){Lt(!r.pairChannels.paired[e.channel_code]);const a=Jt({channelCode:r.pairChannels.pairs[e.channel_code]?.map(e=>e.channel_code)??e.channel_code,brandName:e.brand_name,brandColor:e.brand_color,brandLogoUrl:e.brand_logo_url,get uiGroup(){if(!n[e.ui_group])throw new Error("UI group not found");return un(n[e.ui_group],t,n,r)},minAmount:e.min_amount,maxAmount:e.max_amount,cardBrands:e.card?.brands.map(e=>({name:e.name,logoUrl:e.logo_url})),[pt]:r.pairChannels.pairs[e.channel_code]??[e]});return an(a),a}function fn(e){const t={};for(const n of e)t[n.id]=n;return t}function mn(e,t){if(t.pairChannels.paired[e.channel_code])return!1;if(t.options.filterMinMax&&!rn(t.session,e))return!1;const n=t.options.filter;return!(n&&!function(e,t){if("string"==typeof e&&t===e)return!0;if(Array.isArray(e)&&e.includes(t))return!0;if(e instanceof RegExp&&e.test(t))return!0;return!1}(n,e.channel_code))}function gn(e,t){const n={};for(const r of e){if(!mn(r,t))continue;const e=r.ui_group;n[e]||(n[e]=[]),n[e].push(r)}return n}function _n(e){const t=new Map;for(const n of e){const e=n.brand_name;t.has(e)||t.set(e,[]),t.get(e).push(n)}const n={},r={};for(const[e,a]of t)for(const e of a){if(!1===a[0].allow_save){const t=a.find(t=>e.channel_code!==t.channel_code&&e.ui_group===t.ui_group&&!0===t.allow_save);t&&(n[e.channel_code]=[e,t],r[t.channel_code]=!0)}}return{pairs:n,paired:r}}const $n=e=>{const{group:t,open:n}=e,r=At(),{t:a}=r,o=Nt(),i=Tt(),d=Rt(),s=o.session_type,l=Xt(),[c,u]=be(null),h=we(null),[p,f]=be(!1),m=we(null),g=Ce(()=>_n(i),[i]),_=Ce(()=>({pairChannels:g,session:{amount:o.amount,session_type:o.session_type},options:{filterMinMax:!1}}),[g,o.amount,o.session_type]),$=Ce(()=>i.filter(e=>mn(e,_)&&e.ui_group===t.id),[i,t.id,_]);xe(()=>{if(!h.current)return;if(!d)return;if(!n)return;$.find(e=>e.channel_code===d.channel_code)&&(m.current=r.createChannelComponent(hn(d,_)),m.current.parentElement!==h.current&&(f(!0),h.current.replaceChildren(m.current)))},[$,d,_,n,r]);const y=Ht(n);xe(()=>{if(n&&!y&&null===d&&null!==c){const e=$.find(e=>e.channel_code===c);e&&r.setCurrentChannel(hn(e,_))}},[$,d,c,_,n,y,r]);const b=ke(e=>{const t=i.find(t=>t.channel_code===e.value)||null;u(t?.channel_code??null),r.setCurrentChannel(t?hn(t,_):null)},[i,_,r]),v=Ce(()=>$.map(e=>({leadingAsset:st("img",{className:"xendit-channel-logo",src:e.brand_logo_url},e.channel_code),title:e.brand_name,value:e.channel_code,disabled:!rn(o,e),description:yn(a,o,e)||void 0})),[$,o,a]);return st("div",{className:"xendit-channel-picker-group",children:[1===$.length&&"CARDS"===$[0].channel_code?null:st("div",{className:"xendit-channel-form-field-group",children:[st("label",{htmlFor:l,className:"xendit-text-14",children:"SAVE"===s?a("payment_methods.add_payment_method",{groupName:t.label??"",ns:"session"}):a("payment_methods.pay_with")}),st(dn,{id:l,selectedIndex:function(){const e=v.findIndex(e=>e.value===d?.channel_code);if(-1!==e)return e;const t=v.findIndex(e=>e.value===c);return-1!==t?t:-1}(),options:v,onChange:b,placeholder:a("payment_methods.select_channel_placeholder",{groupName:t.label,ns:"session"})})]}),st("div",{style:{display:p?"":"none"},ref:h})]})};function yn(e,t,n){return rn(t,n)?null:n.min_amount&&t.amount<n.min_amount?e("payment_methods.channel_disabled_amount_too_small"):e("payment_methods.channel_disabled_amount_too_large")}const bn=e=>{const t=At(),n=Nt(),r=(()=>{const e=Ee(Et);if(null===e)throw new Error("useChannelUiGroups must be used within a XenditSessionProvider");return e})(),a=Rt(),o=Tt(),{t:i}=At(),d=Ce(()=>gn(o,{options:{filterMinMax:!1},pairChannels:_n(o),session:n}),[o,n]),s=we(null),l=Ce(()=>_n(o),[o]),c=Ce(()=>({pairChannels:l,session:{amount:n.amount,session_type:n.session_type},options:{filterMinMax:!1}}),[l,n.amount,n.session_type]),u=a?.ui_group??null,[h,p]=be(null),f=ke(e=>{if(u===e||h===e)u===e&&s.current?.dispatchEvent(new XenditClearCurrentChannelEvent(e)),h===e&&p(null);else{const a=r.find(t=>t.id===e);Lt(a);const s=vn(n,a,o,i).enabledChannels;if(0===s)return;if(1===s){const n=d[e][0];t.setCurrentChannel(hn(n,c)),p(null)}else p(e),t.setCurrentChannel(null)}},[r,o,d,c,h,t,u,n,i]);return xe(()=>{null!==a&&null!==h&&p(null)},[a,h]),"ACTIVE"!==t.getSdkStatus()||"ACTIVE"!==n.status?null:st("div",{ref:s,children:st(ft,{children:r.filter(e=>(d[e.id]||[]).length>0).map(e=>{const t=null!==u?u===e.id:h===e.id,r=vn(n,e,o,i),a=0===r.enabledChannels,d=r.firstDisabledChannelReason;return st(vt,{id:e.id,title:e.label,subtitle:d??void 0,open:t,disabled:a,onClick:f,children:st($n,{group:e,open:t})},e.id)})})})};function vn(e,t,n,r){let a=null,o=0;for(const i of n)i.ui_group===t.id&&(rn(e,i)?o++:null===a&&(a=yn(r,e,i)));return{enabledChannels:o,firstDisabledChannelReason:a}}class XenditClearCurrentChannelEvent extends Event{static type="xendit-clear-current-channel";uiGroup;constructor(e){super(XenditClearCurrentChannelEvent.type,{bubbles:!0,composed:!0}),this.uiGroup=e}}var xn={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]","(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:241|349)0\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|91(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79]))))\\d{3}|(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8])|8(?:55|6[0-8]|[78]\\d|9[02-9]))\\d{6}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|2[23]"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","(?:[025-7]\\d|44)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[024-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","(?:01\\d|8)\\d{7}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["0"]]]],BL:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","8001\\d{5}|(?:[2-467]\\d|50)\\d{6}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[235]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","[1-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37|86)","300|4(?:0(?:0|20)|370|864)"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[178]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-6]|7[246]|8[2-4]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|[78]"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","[2-9]\\d{9}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|5[07]|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|3[23]|44|66|77|88)|6(?:22|33))[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["5"],"0$1"]],"0"],CF:["236","00","(?:[27]\\d{3}|8776)\\d{4}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[278]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["60|809"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9(?:10|[2-9])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["46"]],["(\\d{3})(\\d{7})","$1 $2",["6|90"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|9[14]"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9,10,11,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|3[13])"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,"528[89]"],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,"0|180020",0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-5])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|5[01]))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","(?:[56]94\\d|7093)\\d{5}|(?:80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0|180020","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","(?:[235]\\d{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}",[7,8,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","[2-589]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13,14,15,16,17],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0|180020","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|8(?:28[235-7]|3))|73179|807(?:1|9[1-3])|(?:1552|6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689])\\d|8(?:[14-6]\\d|2[0-79]))|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["16|[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["18[06]","18[06]0"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11,12],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[03]"]]],0,0,0,0,0,0,[["0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],["3[2-8]\\d{9,10}",[11,12]],0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0|180020","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|427|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[47]"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["3|4(?:2[09]|7[01])|6[1-9]","3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[25-9]"],"0$1"]],"0",0,"(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33622|7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["3"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|78|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2679]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{4})(\\d{5})","$1-$2",["892"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8(?:0[0-7]|9)"],"0$1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[5-8]"],"0$1"]],"0",0,0,0,0,0,[["5(?:(?:18|4[0679]|5[03])\\d|2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-7])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9]))\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[016-8]\\d|2[0-8]|5[0-5]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],MC:["377","00","(?:[3489]|[67]\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[67]"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|452|678|86","[12]|452|6788|86"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","(?:596\\d|7091)\\d{5}|(?:69|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|8(?:0[6-9]|[36])"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","[2-9]\\d{9}",[10],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]]],0,0,0,0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[0467]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","(?:20|9\\d)\\d{8}|[78]\\d{9,13}",[10,11,12,13,14],[["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[24-9]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[45]\\d{5}|(?:708|8\\d\\d)\\d{6}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[136]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","709\\d{6}|(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"],"0$1"]],"0",0,0,0,0,0,[["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"],["(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,0,[["336(?:[013-9]\\d|2[013-9])\\d{5}|(?:3(?:0[12]|4[1-35-79]|5[1-3]|65|8[1-58]|9[0145])|4(?:01|1[1356]|2[13467]|7[1-5]|8[1-7]|9[1-689])|8(?:1[1-8]|2[01]|3[13-6]|4[0-8]|5[15-7]|6[0-35-79]|7[1-37-9]))\\d{7}",[10]],["9\\d{9}",[10]],["8(?:0[04]|108\\d{3})\\d{7}"],["80[39]\\d{7}",[10]],["808\\d{7}",[10]]],"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","(?:[15]\\d|800|92)\\d{7}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","[6-9]\\d{6}|[1-6]\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","(?:[2489]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10,12],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|7[67]|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|[6-8]\\d|90)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-9]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[25-7]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[25-7]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-359]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-4]|5[1-3]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[59]"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|30|[689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[236-9]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","(?:[0-57-9]\\d|66)\\d{7}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3(?:[1245]|3[12])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["\\d"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","(?:[1-6]\\d|71)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-59]|61)","5(?:[0-59]|61[06])","5(?:[0-59]|61[06]1)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["(?:2742|(?:472|983)[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013-79]|3[0-24679]|4[167]|5[0-3]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-247]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}",[4,5,6,7,8,9,10,11,12,13],[["(\\d{4,5})","$1",["21"]],["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","00","(?:20|33|[5-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"]]]],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11,12],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[47-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","7093\\d{5}|(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,0,[["269(?:0[0-467]|15|5[0-4]|6\\d|[78]0)\\d{4}"],["(?:639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|[579]\\d|63)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[579]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[235-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"],0,0,0,0,0,0,["2\\d{8}",[9]]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|51"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}",[7,8,9,10,12]],0,0,0,["348[57]\\d{7}",[11]],0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};function wn(e,t){var n=Array.prototype.slice.call(t);return n.push(xn),e.apply(this,n)}function Cn(e,t){e=e.split("-"),t=t.split("-");for(var n=e[0].split("."),r=t[0].split("."),a=0;a<3;a++){var o=Number(n[a]),i=Number(r[a]);if(o>i)return 1;if(i>o)return-1;if(!isNaN(o)&&isNaN(i))return 1;if(isNaN(o)&&!isNaN(i))return-1}return e[1]&&t[1]?e[1]>t[1]?1:e[1]<t[1]?-1:0:!e[1]&&t[1]?1:e[1]&&!t[1]?-1:0}var kn={}.constructor;function En(e){return null!=e&&e.constructor===kn}function Pn(e){return Pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pn(e)}function Sn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nn(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Tn(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Tn(e){var t=function(e,t){if("object"!=Pn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Pn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==Pn(t)?t:t+""}var An=" ext. ",Rn=/^\d+$/,In=function(){return Nn(function e(t){Sn(this,e),Bn(t),this.metadata=t,qn.call(this,t)},[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter(function(e){return"001"!==e})}},{key:"getCountryMetadata",value:function(e){return this.metadata.countries[e]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(e){return void 0!==this.getCountryMetadata(e)}},{key:"hasCallingCode",value:function(e){if(this.getCountryCodesForCallingCode(e))return!0;if(this.nonGeographic()){if(this.nonGeographic()[e])return!0}else{var t=this.countryCallingCodes()[e];if(t&&1===t.length&&"001"===t[0])return!0}}},{key:"isNonGeographicCallingCode",value:function(e){return this.nonGeographic()?!!this.nonGeographic()[e]:!this.getCountryCodesForCallingCode(e)}},{key:"country",value:function(e){return this.selectNumberingPlan(e)}},{key:"selectNumberingPlan",value:function(e,t){if(e&&Rn.test(e)&&(t=e,e=null),e&&"001"!==e){if(!this.hasCountry(e))throw new Error("Unknown country: ".concat(e));this.numberingPlan=new On(this.getCountryMetadata(e),this)}else if(t){if(!this.hasCallingCode(t))throw new Error("Unknown calling code: ".concat(t));this.numberingPlan=new On(this.getNumberingPlanMetadata(t),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(e){var t=this.countryCallingCodes()[e];if(t){if(1===t.length&&3===t[0].length)return;return t}}},{key:"getCountryCodeForCallingCode",value:function(e){var t=this.getCountryCodesForCallingCode(e);if(t)return t[0]}},{key:"getNumberingPlanMetadata",value:function(e){var t=this.getCountryCodeForCallingCode(e);if(t)return this.getCountryMetadata(t);if(this.nonGeographic()){var n=this.nonGeographic()[e];if(n)return n}else{var r=this.countryCallingCodes()[e];if(r&&1===r.length&&"001"===r[0])return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(e){return this.numberingPlan.type(e)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(e){return this.selectNumberingPlan(e)}},{key:"hasSelectedNumberingPlan",value:function(){return void 0!==this.numberingPlan}}])}(),On=function(){return Nn(function e(t,n){Sn(this,e),this.globalMetadataObject=n,this.metadata=t,qn.call(this,n.metadata)},[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(e){return e[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var e=this,t=this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[];return t.map(function(t){return new Ln(t,e)})}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(e){return e[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return(!this.types()||0!==this.types().length)&&!!this.types()}},{key:"type",value:function(e){if(this.hasTypes()&&Un(this.types(),e))return new Dn(Un(this.types(),e),this)}},{key:"ext",value:function(){return this.v1||this.v2?An:this.metadata[13]||An}}])}(),Ln=function(){return Nn(function e(t,n){Sn(this,e),this._format=t,this.metadata=n},[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!(!this.nationalPrefixFormattingRule()||Mn.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}])}(),Mn=/^\(?\$1\)?$/,Dn=function(){return Nn(function e(t,n){Sn(this,e),this.type=t,this.metadata=n},[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}])}();function Un(e,t){switch(t){case"FIXED_LINE":return e[0];case"MOBILE":return e[1];case"TOLL_FREE":return e[2];case"PREMIUM_RATE":return e[3];case"PERSONAL_NUMBER":return e[4];case"VOICEMAIL":return e[5];case"UAN":return e[6];case"PAGER":return e[7];case"VOIP":return e[8];case"SHARED_COST":return e[9]}}function Bn(e){if(!e)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!En(e)||!En(e.countries))throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(En(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+Fn(e)+": "+e,"."))}var Fn=function(e){return Pn(e)};function jn(e,t){if((t=new In(t)).hasCountry(e))return t.selectNumberingPlan(e).countryCallingCode();throw new Error("Unknown country: ".concat(e))}function qn(e){var t=e.version;"number"==typeof t?(this.v1=1===t,this.v2=2===t,this.v3=3===t,this.v4=4===t):t?-1===Cn(t,"1.2.0")?this.v2=!0:-1===Cn(t,"1.7.35")?this.v3=!0:this.v4=!0:this.v1=!0}function Kn(e,t,n){return function(e,t,n,r){t&&(r=new In(r.metadata)).selectNumberingPlan(t);var a=r.type(n),o=a&&a.possibleLengths()||r.possibleLengths();if(!o)return"IS_POSSIBLE";var i=e.length,d=o[0];if(d===i)return"IS_POSSIBLE";if(d>i)return"TOO_SHORT";if(o[o.length-1]<i)return"TOO_LONG";return o.indexOf(i,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}(e,t,void 0,n)}function Vn(e,t,n){return"IS_POSSIBLE"===Kn(e,t,n)}function Hn(e,t){return e=e||"",new RegExp("^(?:"+t+")$").test(e)}function Gn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Wn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wn(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Wn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Yn=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function zn(e,t,n){if(t=t||{},e.country||e.countryCallingCode){(n=new In(n)).selectNumberingPlan(e.country,e.countryCallingCode);var r=t.v2?e.nationalNumber:e.phone;if(Hn(r,n.nationalNumberPattern())){if(Xn(r,"FIXED_LINE",n))return n.type("MOBILE")&&""===n.type("MOBILE").pattern()?"FIXED_LINE_OR_MOBILE":n.type("MOBILE")?Xn(r,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE":"FIXED_LINE_OR_MOBILE";for(var a,o=Gn(Yn);!(a=o()).done;){var i=a.value;if(Xn(r,i,n))return i}}}}function Xn(e,t,n){return!(!(t=n.type(t))||!t.pattern())&&(!(t.possibleLengths()&&t.possibleLengths().indexOf(e.length)<0)&&Hn(e,t.pattern()))}function Zn(e,t,n){var r=new In(n).getCountryCodesForCallingCode(e);return r?r.filter(function(e){return function(e,t,n){var r=new In(n);if(r.selectNumberingPlan(t),r.numberingPlan.possibleLengths().indexOf(e.length)>=0)return!0;return!1}(t,e,n)}):[]}var Jn="0-90-9٠-٩۰-۹",Qn="".concat("-‐-―−ー-").concat("//").concat("..").concat("  ­​⁠ ").concat("()()[]\\[\\]").concat("~⁓∼~"),er=new RegExp("(["+Jn+"])");function tr(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return nr(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nr(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function nr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function rr(e,t){var n=t.nationalNumber,r=t.metadata,a=r.getCountryCodesForCallingCode(e);if(a)return 1===a.length?a[0]:function(e,t){var n=t.countries,r=t.metadata;r=new In(r);for(var a,o=tr(n);!(a=o()).done;){var i=a.value;if(r.selectNumberingPlan(i),r.leadingDigits()){if(e&&0===e.search(r.leadingDigits()))return i}else if(zn({phone:e,country:i},void 0,r.metadata))return i}}(n,{countries:a,metadata:r.metadata})}function ar(e,t,n){var r=function(e,t){if(e&&t.numberingPlan.nationalPrefixForParsing()){var n=new RegExp("^(?:"+t.numberingPlan.nationalPrefixForParsing()+")"),r=n.exec(e);if(r){var a,o,i,d=r.length-1,s=d>0&&r[d];if(t.nationalPrefixTransformRule()&&s)a=e.replace(n,t.nationalPrefixTransformRule()),d>1&&(o=r[1]);else{var l=r[0];a=e.slice(l.length),s&&(o=r[1])}if(s){var c=e.indexOf(r[1]);e.slice(0,c)===t.numberingPlan.nationalPrefix()&&(i=t.numberingPlan.nationalPrefix())}else i=r[0];return{nationalNumber:a,nationalPrefix:i,carrierCode:o}}}return{nationalNumber:e}}(e,n),a=r.carrierCode,o=r.nationalNumber;if(o!==e){if(!function(e,t,n){if(Hn(e,n.nationalNumberPattern())&&!Hn(t,n.nationalNumberPattern()))return!1;return!0}(e,o,n))return{nationalNumber:e};if(n.numberingPlan.possibleLengths()&&(t||(t=rr(n.numberingPlan.callingCode(),{nationalNumber:o,metadata:n})),!function(e,t,n){switch(Kn(e,t,n)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}(o,t,n)))return{nationalNumber:e}}return{nationalNumber:o,carrierCode:a}}function or(e,t,n,r,a){if(!e)return{};var o;if("+"!==e[0]){var i=function(e,t,n,r){if(t){var a=new In(r);a.selectNumberingPlan(t,n);var o=new RegExp(a.IDDPrefix());if(0===e.search(o)){var i=(e=e.slice(e.match(o)[0].length)).match(er);if(!(i&&null!=i[1]&&i[1].length>0&&"0"===i[1]))return e}}}(e,n,r,a);if(!i||i===e){if(n||r){var d=function(e,t,n,r,a){var o=n?jn(n,a):r;if(0===e.indexOf(o)){(a=new In(a)).selectNumberingPlan(n,o);var i=e.slice(o.length),d=ar(i,t,a).nationalNumber,s=ar(e,t,a).nationalNumber;if(!Hn(s,a.nationalNumberPattern())&&Hn(d,a.nationalNumberPattern())||"TOO_LONG"===Kn(s,t,a))return{countryCallingCode:o,number:i}}return{number:e}}(e,t,n,r,a),s=d.countryCallingCode,l=d.number;if(s)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:s,number:l}}return{number:e}}o=!0,e="+"+i}if("0"===e[1])return{};a=new In(a);for(var c=2;c-1<=3&&c<=e.length;){var u=e.slice(1,c);if(a.hasCallingCode(u))return a.selectNumberingPlan(u),{countryCallingCodeSource:o?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:u,number:e.slice(c)};c++}return{}}var ir=/(\$\d)/;function dr(e,t,n){var r=n.useInternationalFormat,a=n.withNationalPrefix,o=e.replace(new RegExp(t.pattern()),r?t.internationalFormat():a&&t.nationalPrefixFormattingRule()?t.format().replace(ir,t.nationalPrefixFormattingRule()):t.format());return r?function(e){return e.replace(new RegExp("[".concat(Qn,"]+"),"g")," ").trim()}(o):o}var sr=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;var lr=function(e){return"([".concat(Jn,"]{1,").concat(e,"})")};function cr(e){var t="[  \\t,]*",n="[:\\..]?[  \\t,-]*",r="#?",a="[  \\t]*";return";ext="+lr("20")+"|"+(t+"(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)"+n+lr("20")+r)+"|"+(t+"(?:[xx##~~]|int|int)"+n+lr("9")+r)+"|"+("[- ]+"+lr("6")+"#")+"|"+(a+"(?:,{2}|;)"+n+lr("15")+r)+"|"+(a+"(?:,)+"+n+lr("9")+r)}var ur="["+Jn+"]{2}",hr="[++]{0,1}(?:["+Qn+"]*["+Jn+"]){3,}["+Qn+Jn+"]*",pr=new RegExp("^[++]{0,1}(?:["+Qn+"]*["+Jn+"]){1,2}$","i"),fr=hr+"(?:"+cr()+")?",mr=new RegExp("^"+ur+"$|^"+fr+"$","i");var gr={formatExtension:function(e,t,n){return"".concat(e).concat(n.ext()).concat(t)}};function _r(e,t,n,r){if(n=n?function(){for(var e=1,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(;e<n.length;){if(n[e])for(var a in n[e])n[0][a]=n[e][a];e++}return n[0]}({},gr,n):gr,r=new In(r),e.country&&"001"!==e.country){if(!r.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));r.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)return e.phone||"";r.selectNumberingPlan(e.countryCallingCode)}var a,o=r.countryCallingCode(),i=n.v2?e.nationalNumber:e.phone;switch(t){case"NATIONAL":return i?yr(a=$r(i,e.carrierCode,"NATIONAL",r,n),e.ext,r,n.formatExtension):"";case"INTERNATIONAL":return i?(a=$r(i,null,"INTERNATIONAL",r,n),yr(a="+".concat(o," ").concat(a),e.ext,r,n.formatExtension)):"+".concat(o);case"E.164":return"+".concat(o).concat(i);case"RFC3966":return function(e){var t=e.number,n=e.ext;if(!t)return"";if("+"!==t[0])throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(t).concat(n?";ext="+n:"")}({number:"+".concat(o).concat(i),ext:e.ext});case"IDD":if(!n.fromCountry)return;var d=function(e,t,n,r,a){var o=jn(r,a.metadata);if(o===n){var i=$r(e,t,"NATIONAL",a);return"1"===n?n+" "+i:i}var d=function(e,t,n){var r=new In(n);return r.selectNumberingPlan(e,t),r.defaultIDDPrefix()?r.defaultIDDPrefix():sr.test(r.IDDPrefix())?r.IDDPrefix():void 0}(r,void 0,a.metadata);if(d)return"".concat(d," ").concat(n," ").concat($r(e,null,"INTERNATIONAL",a))}(i,e.carrierCode,o,n.fromCountry,r);if(!d)return;return yr(d,e.ext,r,n.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(t,'"'))}}function $r(e,t,n,r,a){var o,i,d=(o=r.formats(),i=e,function(e,t){for(var n=0;n<e.length;){if(t(e[n]))return e[n];n++}}(o,function(e){if(e.leadingDigitsPatterns().length>0){var t=e.leadingDigitsPatterns()[e.leadingDigitsPatterns().length-1];if(0!==i.search(t))return!1}return Hn(i,e.pattern())}));return d?dr(e,d,{useInternationalFormat:"INTERNATIONAL"===n,withNationalPrefix:!d.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!a||!1!==a.nationalPrefix}):e}function yr(e,t,n,r){return t?r(e,t,n):e}function br(e){return br="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},br(e)}function vr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function xr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vr(Object(n),!0).forEach(function(t){wr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function wr(e,t,n){return(t=kr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cr(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,kr(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function kr(e){var t=function(e,t){if("object"!=br(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=br(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==br(t)?t:t+""}var Er=function(){return Cr(function e(t,n,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new TypeError("First argument is required");if("string"!=typeof t)throw new TypeError("First argument must be a string");if("+"===t[0]&&!n)throw new TypeError("`metadata` argument not passed");if(En(n)&&En(n.countries)){r=n;var a=t;if(!Sr.test(a))throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');var o=or(a,void 0,void 0,void 0,r);if(t=o.countryCallingCode,!(n=o.number))throw new Error("Invalid `number` argument passed: too short")}if(!n)throw new TypeError("`nationalNumber` argument is required");if("string"!=typeof n)throw new TypeError("`nationalNumber` argument must be a string");Bn(r);var i=function(e,t){var n,r,a=new In(t);Pr(e)?(n=e,a.selectNumberingPlan(n),r=a.countryCallingCode()):r=e;return{country:n,countryCallingCode:r}}(t,r),d=i.country,s=i.countryCallingCode;this.country=d,this.countryCallingCode=s,this.nationalNumber=n,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return r}},[{key:"setExt",value:function(e){this.ext=e}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:Zn(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return function(e,t,n){if(void 0===t&&(t={}),n=new In(n),t.v2){if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}else{if(!e.phone)return!1;if(e.country){if(!n.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));n.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}}if(n.possibleLengths())return Vn(e.phone||e.nationalNumber,e.country,n);if(e.countryCallingCode&&n.isNonGeographicCallingCode(e.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return function(e,t,n){return t=t||{},(n=new In(n)).selectNumberingPlan(e.country,e.countryCallingCode),n.hasTypes()?void 0!==zn(e,t,n.metadata):Hn(t.v2?e.nationalNumber:e.phone,n.nationalNumberPattern())}(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){return new In(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(e){return this.number===e.number&&this.ext===e.ext}},{key:"getType",value:function(){return zn(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(e,t){return _r(this,e,t?xr(xr({},t),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(e){return this.format("NATIONAL",e)}},{key:"formatInternational",value:function(e){return this.format("INTERNATIONAL",e)}},{key:"getURI",value:function(e){return this.format("RFC3966",e)}}])}(),Pr=function(e){return/^[A-Z]{2}$/.test(e)};var Sr=/^\+\d+$/;function Nr(e){return Nr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nr(e)}function Tr(e,t,n){return t=Or(t),function(e,t){if(t&&("object"==Nr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Rr()?Reflect.construct(t,n||[],Or(e).constructor):t.apply(e,n))}function Ar(e){var t="function"==typeof Map?new Map:void 0;return Ar=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(Rr())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var a=new(e.bind.apply(e,r));return n&&Ir(a,n.prototype),a}(e,arguments,Or(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Ir(n,e)},Ar(e)}function Rr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Rr=function(){return!!e})()}function Ir(e,t){return Ir=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ir(e,t)}function Or(e){return Or=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Or(e)}var Lr=function(){function e(t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n=Tr(this,e,[t]),Object.setPrototypeOf(n,e.prototype),n.name=n.constructor.name,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ir(e,t)}(e,Ar(Error)),function(e){return Object.defineProperty(e,"prototype",{writable:!1}),e}(e)}(),Mr=new RegExp("(?:"+cr()+")$","i");var Dr={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function Ur(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Br(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Br(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Br(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Fr(e){for(var t,n="",r=Ur(e.split(""));!(t=r()).done;){n+=jr(t.value,n)||""}return n}function jr(e,t,n){if("+"===e){if(t)return;return"+"}return function(e){return Dr[e]}(e)}var qr="(["+Jn+"]|[\\-\\.\\(\\)]?)",Kr=new RegExp("^\\+"+qr+"*["+Jn+"]"+qr+"*$","g"),Vr=new RegExp("^("+("["+Jn+"]+((\\-)*["+Jn+"])*")+"\\.)*"+("[a-zA-Z]+((\\-)*["+Jn+"])*")+"\\.?$","g"),Hr="tel:",Gr=";phone-context=";function Wr(e,t){var n,r=t.extractFormattedPhoneNumber,a=function(e){var t=e.indexOf(Gr);if(t<0)return null;var n=t+15;if(n>=e.length)return"";var r=e.indexOf(";",n);return r>=0?e.substring(n,r):e.substring(n)}(e);if(!function(e){return null===e||0!==e.length&&(Kr.test(e)||Vr.test(e))}(a))throw new Lr("NOT_A_NUMBER");if(null===a)n=r(e)||"";else{n="","+"===a.charAt(0)&&(n+=a);var o,i=e.indexOf(Hr);o=i>=0?i+4:0;var d=e.indexOf(Gr);n+=e.substring(o,d)}var s=n.indexOf(";isub=");if(s>0&&(n=n.substring(0,s)),""!==n)return n}var Yr=new RegExp("[++"+Jn+"]"),zr=new RegExp("[^"+Jn+"#]+$");function Xr(e,t,n){if(t=t||{},n=new In(n),t.defaultCountry&&!n.hasCountry(t.defaultCountry)){if(t.v2)throw new Lr("INVALID_COUNTRY");throw new Error("Unknown country: ".concat(t.defaultCountry))}var r=function(e,t,n){var r=Wr(e,{extractFormattedPhoneNumber:function(e){return function(e,t,n){if(!e)return;if(e.length>250){if(n)throw new Lr("TOO_LONG");return}if(!1===t)return e;var r=e.search(Yr);if(r<0)return;return e.slice(r).replace(zr,"")}(e,n,t)}});if(!r)return{};if(!function(e){return e.length>=2&&mr.test(e)}(r))return function(e){return pr.test(e)}(r)?{error:"TOO_SHORT"}:{};var a=function(e){var t=e.search(Mr);if(t<0)return{};for(var n=e.slice(0,t),r=e.match(Mr),a=1;a<r.length;){if(r[a])return{number:n,ext:r[a]};a++}}(r);if(a.ext)return a;return{number:r}}(e,t.v2,t.extract),a=r.number,o=r.ext,i=r.error;if(!a){if(t.v2){if("TOO_SHORT"===i)throw new Lr("TOO_SHORT");throw new Lr("NOT_A_NUMBER")}return{}}var d=function(e,t,n,r){var a,o=or(Fr(e),void 0,t,n,r.metadata),i=o.countryCallingCodeSource,d=o.countryCallingCode,s=o.number;if(d)r.selectNumberingPlan(d);else{if(!s||!t&&!n)return{};r.selectNumberingPlan(t,n),t&&(a=t),d=n||jn(t,r.metadata)}if(!s)return{countryCallingCodeSource:i,countryCallingCode:d};var l=ar(Fr(s),a,r),c=l.nationalNumber,u=l.carrierCode,h=rr(d,{nationalNumber:c,metadata:r});h&&(a=h,"001"===h||r.selectNumberingPlan(a));return{country:a,countryCallingCode:d,countryCallingCodeSource:i,nationalNumber:c,carrierCode:u}}(a,t.defaultCountry,t.defaultCallingCode,n),s=d.country,l=d.nationalNumber,c=d.countryCallingCode,u=d.countryCallingCodeSource,h=d.carrierCode;if(!n.hasSelectedNumberingPlan()){if(t.v2)throw new Lr("INVALID_COUNTRY");return{}}if(!l||l.length<2){if(t.v2)throw new Lr("TOO_SHORT");return{}}if(l.length>17){if(t.v2)throw new Lr("TOO_LONG");return{}}if(t.v2){var p=new Er(c,l,n.metadata);return s&&(p.country=s),h&&(p.carrierCode=h),o&&(p.ext=o),p.__countryCallingCodeSource=u,p}var f=!!(t.extended?n.hasSelectedNumberingPlan():s)&&Hn(l,n.nationalNumberPattern());return t.extended?{country:s,countryCallingCode:c,carrierCode:h,valid:f,possible:!!f||!(!0!==t.extended||!n.possibleLengths()||!Vn(l,s,n)),phone:l,ext:o}:f?function(e,t,n){var r={country:e,phone:t};n&&(r.ext=n);return r}(s,l,o):{}}function Zr(e){return Zr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zr(e)}function Jr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jr(Object(n),!0).forEach(function(t){ea(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ea(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Zr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Zr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Zr(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ta(e){return ta="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ta(e)}function na(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ra(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=ta(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=ta(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ta(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aa(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,d=[],s=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(s=(r=o.call(n)).done)&&(d.push(r.value),d.length!==t);s=!0);}catch(e){l=!0,a=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(l)throw a}}return d}}(e,t)||function(e,t){if(e){if("string"==typeof e)return oa(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?oa(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oa(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ia(e){var t,n,r,a=aa(Array.prototype.slice.call(e),4),o=a[0],i=a[1],d=a[2],s=a[3];if("string"!=typeof o)throw new TypeError("A text for parsing must be a string.");if(t=o,i&&"string"!=typeof i){if(!En(i))throw new Error("Invalid second argument: ".concat(i));d?(n=i,r=d):r=i}else s?(n=d,r=s):(n=void 0,r=d),i&&(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?na(Object(n),!0).forEach(function(t){ra(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):na(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({defaultCountry:i},n));return{text:t,options:n,metadata:r}}function da(e){return da="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},da(e)}function sa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function la(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sa(Object(n),!0).forEach(function(t){ca(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sa(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ca(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=da(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=da(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==da(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ua(e,t,n){t&&t.defaultCountry&&!function(e,t){return t.countries.hasOwnProperty(e)}(t.defaultCountry,n)&&(t=la(la({},t),{},{defaultCountry:void 0}));try{return function(e,t,n){return Xr(e,Qr(Qr({},t),{},{v2:!0}),n)}(e,t,n)}catch(e){if(!(e instanceof Lr))throw e}}function ha(){var e=ia(arguments);return ua(e.text,e.options,e.metadata)}function pa(e){return new In(e).getCountries()}function fa(e,t,n){if(t[e])return new Er(e,t[e],n)}function ma(){return wn(ha,arguments)}function ga(){return wn(jn,arguments)}const _a=({countryCode:e,size:t=16})=>st("div",{style:{width:`${t}px`,height:`${t}px`,borderRadius:"50%",backgroundImage:`url(https://assets.xendit.co/payment-session/flags/circle/${e.toLowerCase()}.svg)`,backgroundSize:"cover",backgroundPosition:"center"}}),$a=e=>{const{field:t,onChange:n}=e,r=Yt(t),a=Gt(t),[o,i]=be(void 0),d=ya.findIndex(e=>e.value===o),s=we(null);ba(e=>{if(s.current){const t=ya.find(t=>t.value===e);t&&l(t)}});const l=ke(e=>{i(e.value),s.current&&(s.current.value=e.value),n()},[n]);return st("div",{children:[st("input",{type:"hidden",name:a,defaultValue:"",ref:s}),st(dn,{id:r,options:ya,onChange:l,placeholder:t.placeholder,selectedIndex:d})]})},ya=function(){return wn(pa,arguments)}().map(e=>({title:new Intl.DisplayNames(["en"],{type:"region"}).of(e),value:e,leadingAsset:st(_a,{countryCode:e})})).sort((e,t)=>e.title.localeCompare(t.title));function ba(e){const t=ti()?.cardDetails,n=t?.details?.country_codes[0],r=Ht(n);xe(()=>{n&&n!==r&&e(n)})}const va=e=>{const{field:t,onChange:n}=e,r=Yt(t),a=Gt(t),o=we(null),i=ke(e=>{o.current&&(o.current.value=e.value),n()},[n]);if(!function(e){return"dropdown"===e.type.name}(t))throw new Error("DropdownField expects field.type.name to be 'dropdown'");return st(v,{children:[st(dn,{id:r,placeholder:t.placeholder,options:(d=t.type.options,d.map(e=>({title:e.label,description:e.subtitle,value:e.value}))),onChange:i}),st("input",{type:"hidden",name:a,defaultValue:"",ref:o})]});var d};const xa="undefined"!=typeof window&&window.HTMLElement?window.HTMLElement:EventTarget;class XenditFormAssociatedFocusTrap extends xa{static tag="xendit-form-associated-focus-trap";static formAssociated=!0;internals;constructor(){super(),this.internals=this.attachInternals()}}var wa;wa=XenditFormAssociatedFocusTrap,"undefined"!=typeof window&&window.customElements&&customElements.define(wa.tag,wa);class InternalUpdateWorldState extends Event{data;static type="xendit-update-world-state";constructor(e){super(InternalUpdateWorldState.type,{bubbles:!1}),this.data=e}}class InternalUpdateChannelComponentData extends Event{channelCode;data;static type="xendit-update-channel-component-data";constructor(e,t){super(InternalUpdateChannelComponentData.type,{bubbles:!1}),this.channelCode=e,this.data=t}}class InternalSetFieldTouchedEvent extends Event{static type="xendit-internal-set-field-touched";constructor(){super(InternalSetFieldTouchedEvent.type,{bubbles:!0})}}class InternalBehaviorTreeUpdateEvent extends Event{static type="xendit-internal-behavior-tree-update";constructor(){super(InternalBehaviorTreeUpdateEvent.type,{})}}class InternalNeedsRerenderEvent extends Event{static type="xendit-internal-needs-rerender";constructor(){super(InternalNeedsRerenderEvent.type,{})}}class InternalScheduleMockUpdateEvent extends Event{mockData;static type="xendit-internal-schedule-mock-update";constructor(e){super(InternalScheduleMockUpdateEvent.type,{}),this.mockData=e}}Lt("https://assets.xendit.co/components/secure-iframe-v0.0.12.html");const Ca=new URL("https://assets.xendit.co/components/secure-iframe-v0.0.12.html"),ka=Ca.toString(),Ea=Ca.origin,Pa=e=>{const{field:t,onChange:n}=e,r=At(),a=Yt(t),o=Gt(t),i=Nt(),d=we(null),s=we(null),[l,c]=be(),[u,h]=be(!1),[p,f]=be(null),{card:m}=Qo()??{},g=ke(e=>{if(!d.current)return;const r=d.current.contentWindow;if(e.source!==r)return;if(e.origin!==Ea)return;const a=e.data;switch(a.type){case"xendit-iframe-ready":c(a.ecdhPublicKey);break;case"xendit-iframe-change":{if(!s.current)return;f(a.cardBrand);const e=a.encrypted,t=1,r=e.map(e=>{if(a.empty)return"";const n=["xendit-encrypted",t,l,e.iv,e.value];return!a.valid&&a.validationErrorCodes.length&&n.push("invalid",btoa(a.validationErrorCodes[0].localeKey)),n.join("-")});if(0===r.length)break;s.current.value=r.length>1?JSON.stringify(r):r[0],n?.();break}case"xendit-iframe-focus":h(!0);break;case"xendit-iframe-blur":h(!1),s.current?.value&&s.current?.dispatchEvent(new InternalSetFieldTouchedEvent);break;case"xendit-iframe-failed-init":console.error(`Iframe field for ${t.channel_property} failed to initialize securely`)}},[t.channel_property,l,n]),_=ke(()=>{d.current?.contentWindow&&d.current.contentWindow.postMessage({type:"xendit-iframe-focus"},Ea)},[]);xe(()=>(window.addEventListener("message",g),()=>{window.removeEventListener("message",g)}),[g]);const $=new URL(ka);$.searchParams.set("input_type",t.type.name),$.searchParams.set("embedder",window.location.origin),$.searchParams.set("session_id",i.payment_session_id),$.searchParams.set("pk",r[pt].sdkKey.publicKey),$.searchParams.set("sig",r[pt].sdkKey.signature),r[pt].options.iframeFieldAppearance&&$.searchParams.set("appearance",JSON.stringify(r[pt].options.iframeFieldAppearance));return st("div",{className:`xendit-iframe-container ${u?"xendit-field-focus":""}`,children:[st(XenditFormAssociatedFocusTrap.tag,{id:a,onFocus:_,tabIndex:-1}),st("input",{type:"hidden",name:o,defaultValue:"",ref:s}),st("iframe",{src:$.toString(),ref:d,sandbox:"allow-scripts allow-same-origin"}),"credit_card_number"===t.type.name&&m&&st(Sa,{cardsBrandList:m.brands,selectedCardBrand:p})]})},Sa=({cardsBrandList:e,selectedCardBrand:t})=>{if(!e)return null;const n=e.find(e=>e.name===t)?.logo_url;return st("div",{className:"xendit-card-brands-list",children:t?n&&st("img",{className:"xendit-card-brand-logo",src:n,alt:t}):e.map(({name:e,logo_url:t})=>st("img",{className:"xendit-card-brand-logo",src:t,alt:e},e))})};var Na={AC:"40123",AD:"312345",AE:"501234567",AF:"701234567",AG:"2684641234",AI:"2642351234",AL:"672123456",AM:"77123456",AO:"923123456",AR:"91123456789",AS:"6847331234",AT:"664123456",AU:"412345678",AW:"5601234",AX:"412345678",AZ:"401234567",BA:"61123456",BB:"2462501234",BD:"1812345678",BE:"470123456",BF:"70123456",BG:"43012345",BH:"36001234",BI:"79561234",BJ:"0195123456",BL:"690001234",BM:"4413701234",BN:"7123456",BO:"71234567",BQ:"3181234",BR:"11961234567",BS:"2423591234",BT:"17123456",BW:"71123456",BY:"294911911",BZ:"6221234",CA:"5062345678",CC:"412345678",CD:"991234567",CF:"70012345",CG:"061234567",CH:"781234567",CI:"0123456789",CK:"71234",CL:"221234567",CM:"671234567",CN:"13123456789",CO:"3211234567",CR:"83123456",CU:"51234567",CV:"9911234",CW:"95181234",CX:"412345678",CY:"96123456",CZ:"601123456",DE:"15123456789",DJ:"77831001",DK:"34412345",DM:"7672251234",DO:"8092345678",DZ:"551234567",EC:"991234567",EE:"51234567",EG:"1001234567",EH:"650123456",ER:"7123456",ES:"612345678",ET:"911234567",FI:"412345678",FJ:"7012345",FK:"51234",FM:"3501234",FO:"211234",FR:"612345678",GA:"06031234",GB:"7400123456",GD:"4734031234",GE:"555123456",GF:"694201234",GG:"7781123456",GH:"231234567",GI:"57123456",GL:"221234",GM:"3012345",GN:"601123456",GP:"690001234",GQ:"222123456",GR:"6912345678",GT:"51234567",GU:"6713001234",GW:"955012345",GY:"6091234",HK:"51234567",HN:"91234567",HR:"921234567",HT:"34101234",HU:"201234567",ID:"812345678",IE:"850123456",IL:"502345678",IM:"7924123456",IN:"8123456789",IO:"3801234",IQ:"7912345678",IR:"9123456789",IS:"6111234",IT:"3123456789",JE:"7797712345",JM:"8762101234",JO:"790123456",JP:"9012345678",KE:"712123456",KG:"700123456",KH:"91234567",KI:"72001234",KM:"3212345",KN:"8697652917",KP:"1921234567",KR:"1020000000",KW:"50012345",KY:"3453231234",KZ:"7710009998",LA:"2023123456",LB:"71123456",LC:"7582845678",LI:"660234567",LK:"712345678",LR:"770123456",LS:"50123456",LT:"61234567",LU:"628123456",LV:"21234567",LY:"912345678",MA:"650123456",MC:"612345678",MD:"62112345",ME:"60123456",MF:"690001234",MG:"321234567",MH:"2351234",MK:"72345678",ML:"65012345",MM:"92123456",MN:"88123456",MO:"66123456",MP:"6702345678",MQ:"696201234",MR:"22123456",MS:"6644923456",MT:"96961234",MU:"52512345",MV:"7712345",MW:"991234567",MX:"2221234567",MY:"123456789",MZ:"821234567",NA:"811234567",NC:"751234",NE:"93123456",NF:"381234",NG:"8021234567",NI:"81234567",NL:"612345678",NO:"40612345",NP:"9841234567",NR:"5551234",NU:"8884012",NZ:"211234567",OM:"92123456",PA:"61234567",PE:"912345678",PF:"87123456",PG:"70123456",PH:"9051234567",PK:"3012345678",PL:"512345678",PM:"551234",PR:"7872345678",PS:"599123456",PT:"912345678",PW:"6201234",PY:"961456789",QA:"33123456",RE:"692123456",RO:"712034567",RS:"601234567",RU:"9123456789",RW:"720123456",SA:"512345678",SB:"7421234",SC:"2510123",SD:"911231234",SE:"701234567",SG:"81234567",SH:"51234",SI:"31234567",SJ:"41234567",SK:"912123456",SL:"25123456",SM:"66661212",SN:"701234567",SO:"71123456",SR:"7412345",SS:"977123456",ST:"9812345",SV:"70123456",SX:"7215205678",SY:"944567890",SZ:"76123456",TA:"8999",TC:"6492311234",TD:"63012345",TG:"90112345",TH:"812345678",TJ:"917123456",TK:"7290",TL:"77212345",TM:"66123456",TN:"20123456",TO:"7715123",TR:"5012345678",TT:"8682911234",TV:"901234",TW:"912345678",TZ:"621234567",UA:"501234567",UG:"712345678",US:"2015550123",UY:"94231234",UZ:"912345678",VA:"3123456789",VC:"7844301234",VE:"4121234567",VG:"2843001234",VI:"3406421234",VN:"912345678",VU:"5912345",WF:"821234",WS:"7212345",XK:"43201234",YE:"712345678",YT:"639012345",ZA:"711234567",ZM:"955123456",ZW:"712345678"};const Ta=e=>{const{field:t,onChange:n}=e,r=Yt(t),a=Gt(t),o=Nt(),i=we(null),[d,s]=be(o.country),l=Ce(()=>{const e=Aa.findIndex(e=>e.value===d);return-1===e?0:e},[d]),c=Aa[l],[u,h]=be(""),p=we(null),f=ke((e,t)=>{const n=Ra(e,t);return n?n.number:`+${e.dial}${t}`},[]),m=ke((e,t)=>{i.current&&(i.current.value=f(e,t))},[f]);function g(e){const t=e;s(t.value),m(t,u),n()}return ba(e=>{const t=Aa.find(t=>t.value===e);t&&t.value!==d&&!u&&g(t)}),st("div",{className:"xendit-input-phone",children:[st("div",{className:"xendit-combobox",children:[st(dn,{options:Aa,selectedIndex:l,onChange:g}),st("input",{id:r,ref:p,type:"tel",inputMode:"tel",placeholder:function(){return wn(fa,arguments)}(c.value,Na)?.formatInternational()?.replace(`+${ga(c.value)} `,"")||"",className:"xendit-text-14 xendit-phone-number-input",onBlur:function(e){!function(){const e=Ra(c,u);if(e){const t=e.formatInternational();h(t.replace(`+${ga(c.value)} `,""))}}(),e.currentTarget?.value&&p.current?.dispatchEvent(new InternalSetFieldTouchedEvent)},onChange:function(e){const t=e.target.value;h(t),m(c,t),n()},value:u,autoComplete:"tel"})]}),st("input",{type:"hidden",name:a,ref:i})]})},Aa=ya.map(e=>{const t=ga(e.value);return t?{...e,shortTitle:`+${t}`,title:`${e.title} (+${t})`,dial:t}:null}).filter(e=>Boolean(e)),Ra=(e,t)=>{const n=ma(t,e.value);return n&&n.isPossible()?n:null};function Ia(e){return{title:e.name,value:e.value}}const Oa=[{name:"Alabama",value:"AL"},{name:"Alaska",value:"AK"},{name:"American Samoa",value:"AS"},{name:"Arizona",value:"AZ"},{name:"Arkansas",value:"AR"},{name:"California",value:"CA"},{name:"Colorado",value:"CO"},{name:"Connecticut",value:"CT"},{name:"Delaware",value:"DE"},{name:"District Of Columbia",value:"DC"},{name:"Federated States Of Micronesia",value:"FM"},{name:"Florida",value:"FL"},{name:"Georgia",value:"GA"},{name:"Guam",value:"GU"},{name:"Hawaii",value:"HI"},{name:"Idaho",value:"ID"},{name:"Illinois",value:"IL"},{name:"Indiana",value:"IN"},{name:"Iowa",value:"IA"},{name:"Kansas",value:"KS"},{name:"Kentucky",value:"KY"},{name:"Louisiana",value:"LA"},{name:"Maine",value:"ME"},{name:"Marshall Islands",value:"MH"},{name:"Maryland",value:"MD"},{name:"Massachusetts",value:"MA"},{name:"Michigan",value:"MI"},{name:"Minnesota",value:"MN"},{name:"Mississippi",value:"MS"},{name:"Missouri",value:"MO"},{name:"Montana",value:"MT"},{name:"Nebraska",value:"NE"},{name:"Nevada",value:"NV"},{name:"New Hampshire",value:"NH"},{name:"New Jersey",value:"NJ"},{name:"New Mexico",value:"NM"},{name:"New York",value:"NY"},{name:"North Carolina",value:"NC"},{name:"North Dakota",value:"ND"},{name:"Northern Mariana Islands",value:"MP"},{name:"Ohio",value:"OH"},{name:"Oklahoma",value:"OK"},{name:"Oregon",value:"OR"},{name:"Palau",value:"PW"},{name:"Pennsylvania",value:"PA"},{name:"Puerto Rico",value:"PR"},{name:"Rhode Island",value:"RI"},{name:"South Carolina",value:"SC"},{name:"South Dakota",value:"SD"},{name:"Tennessee",value:"TN"},{name:"Texas",value:"TX"},{name:"Utah",value:"UT"},{name:"Vermont",value:"VT"},{name:"Virgin Islands",value:"VI"},{name:"Virginia",value:"VA"},{name:"Washington",value:"WA"},{name:"West Virginia",value:"WV"},{name:"Wisconsin",value:"WI"},{name:"Wyoming",value:"WY"}].map(Ia),La=[{name:"Alberta",value:"AB"},{name:"British Columbia",value:"BC"},{name:"Manitoba",value:"MB"},{name:"New Brunswick",value:"NB"},{name:"Newfoundland and Labrador",value:"NL"},{name:"Northwest Territories",value:"NT"},{name:"Nova Scotia",value:"NS"},{name:"Nunavut",value:"NU"},{name:"Ontario",value:"ON"},{name:"Prince Edward Island",value:"PE"},{name:"Quebec",value:"QC"},{name:"Saskatchewan",value:"SK"},{name:"Yukon Territory",value:"YT"}].map(Ia),Ma=[{name:"Avon"},{name:"Bedfordshire"},{name:"Berkshire"},{name:"Buckinghamshire"},{name:"Cambridgeshire"},{name:"Cheshire"},{name:"Cleveland"},{name:"Cornwall"},{name:"Cumbria"},{name:"Derbyshire"},{name:"Devon"},{name:"Dorset"},{name:"Durham"},{name:"East Sussex"},{name:"Essex"},{name:"Gloucestershire"},{name:"Hampshire"},{name:"Herefordshire"},{name:"Hertfordshire"},{name:"Isle of Wight"},{name:"Kent"},{name:"Lancashire"},{name:"Leicestershire"},{name:"Lincolnshire"},{name:"London"},{name:"Merseyside"},{name:"Norfolk"},{name:"Northamptonshire"},{name:"Northumberland"},{name:"North Yorkshire"},{name:"Nottinghamshire"},{name:"Oxfordshire"},{name:"Rutland"},{name:"Shropshire"},{name:"Somerset"},{name:"South Yorkshire"},{name:"Staffordshire"},{name:"Suffolk"},{name:"Surrey"},{name:"Tyne and Wear"},{name:"Warwickshire"},{name:"West Midlands"},{name:"West Sussex"},{name:"West Yorkshire"},{name:"Wiltshire"},{name:"Worcestershire"},{name:"Clwyd"},{name:"Dyfed"},{name:"Gwent"},{name:"Gwynedd"},{name:"Mid Glamorgan"},{name:"Powys"},{name:"South Glamorgan"},{name:"West Glamorgan"},{name:"Aberdeenshire"},{name:"Angus"},{name:"Argyll"},{name:"Ayrshire"},{name:"Banffshire"},{name:"Berwickshire"},{name:"Bute"},{name:"Caithness"},{name:"Clackmannanshire"},{name:"Dumfriesshire"},{name:"Dunbartonshire"},{name:"East Lothian"},{name:"Fife"},{name:"Inverness-shire"},{name:"Kincardineshire"},{name:"Kinross-shire"},{name:"Kirkcudbrightshire"},{name:"Lanarkshire"},{name:"Midlothian"},{name:"Moray"},{name:"Nairnshire"},{name:"Orkney"},{name:"Peeblesshire"},{name:"Perthshire"},{name:"Renfrewshire"},{name:"Ross-shire"},{name:"Roxburghshire"},{name:"Selkirkshire"},{name:"Shetland"},{name:"Stirlingshire"},{name:"Sutherland"},{name:"West Lothian"},{name:"Wigtownshire"},{name:"Antrim"},{name:"Armagh"},{name:"Down"},{name:"Fermanagh"},{name:"Londonderry"},{name:"Tyrone"}].map(e=>({title:e.name,value:e.name})),Da=e=>{const{field:t,onChange:n}=e,r=Yt(t),a=Gt(t),o=Nt(),i=Qo()?.form,d=Ko(),s=we(null),l=ke(()=>{s.current&&(s.current.value=""),n()},[n]),c=ke(e=>{s.current&&(s.current.value=e.value),n(),s.current?.dispatchEvent(new InternalSetFieldTouchedEvent)},[n]),u=ke(e=>{s.current&&(s.current.value=e.target.value),n(),s.current?.dispatchEvent(new InternalSetFieldTouchedEvent)},[n]),h=function(e){switch(e){case"US":return Oa;case"CA":return La;case"GB":return Ma;default:return null}}(function(e,t,n,r){if(t)for(let r=0;r<t.length;r++){const a=t[r];if(r>0&&a===e){const e=t[r-1];if("country"===e.type.name){const t=Qt(e.channel_property,n);if(t&&"string"==typeof t)return t}}}return r.country}(t,i??[],d??{},o)),p=Ht(h);return xe(()=>{p!==h&&l()},[l,h,p]),st(v,{children:[st("input",{type:"hidden",name:a,defaultValue:"",ref:s}),h?st(dn,{id:r,options:h,onChange:c,placeholder:t.placeholder},(f=h,en.has(f)||en.set(f,tn++),en.get(f).toString())):st("input",{type:"text",id:r,onChange:u,placeholder:t.placeholder,className:"xendit-input xendit-text-14"})]});var f};const Ua=e=>{const{field:t,onChange:n}=e,r=Yt(t),a=Gt(t),o=we(null);return st("input",{id:r,name:a,ref:o,type:"text",placeholder:t.placeholder,className:"xendit-text-14",onBlur:function(e){e.currentTarget?.value&&o.current?.dispatchEvent(new InternalSetFieldTouchedEvent)},onChange:function(e){n()},minLength:Ba(t)?t.type.min_length:void 0,maxLength:Ba(t)?t.type.max_length:void 0})};function Ba(e){return"text"===e.type.name}const Fa=e=>{const{field:t,className:n}=e;return st("div",{className:`${n} xendit-channel-form-field xendit-form-field-span-${t.span}`,children:function(){switch(t.type.name){case"credit_card_number":case"credit_card_expiry":case"credit_card_cvn":return st(Pa,{...e});case"phone_number":return st(Ta,{...e});case"text":case"email":case"postal_code":return st(Ua,{...e});case"dropdown":return st(va,{...e});case"installment_plan":return null;case"country":return st($a,{...e});case"province":return st(Da,{...e})}throw t.type,new Error(`Unsupported field type: ${t.type.name}`)}()})},ja=e=>"string"==typeof e,qa=()=>{let e,t;const n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},Ka=e=>null==e?"":""+e,Va=/###/g,Ha=e=>e&&e.indexOf("###")>-1?e.replace(Va,"."):e,Ga=e=>!e||ja(e),Wa=(e,t,n)=>{const r=ja(t)?t.split("."):t;let a=0;for(;a<r.length-1;){if(Ga(e))return{};const t=Ha(r[a]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++a}return Ga(e)?{}:{obj:e,k:Ha(r[a])}},Ya=(e,t,n)=>{const{obj:r,k:a}=Wa(e,t,Object);if(void 0!==r||1===t.length)return void(r[a]=n);let o=t[t.length-1],i=t.slice(0,t.length-1),d=Wa(e,i,Object);for(;void 0===d.obj&&i.length;)o=`${i[i.length-1]}.${o}`,i=i.slice(0,i.length-1),d=Wa(e,i,Object),d?.obj&&void 0!==d.obj[`${d.k}.${o}`]&&(d.obj=void 0);d.obj[`${d.k}.${o}`]=n},za=(e,t)=>{const{obj:n,k:r}=Wa(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Xa=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?ja(e[r])||e[r]instanceof String||ja(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Xa(e[r],t[r],n):e[r]=t[r]);return e},Za=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Ja={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const Qa=e=>ja(e)?e.replace(/[&<>"'\/]/g,e=>Ja[e]):e;const eo=[" ",",","?","!",";"],to=new class RegExpCache{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),no=(e,t,n=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const r=t.split(n);let a=e;for(let e=0;e<r.length;){if(!a||"object"!=typeof a)return;let t,o="";for(let i=e;i<r.length;++i)if(i!==e&&(o+=n),o+=r[i],t=a[o],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&i<r.length-1)continue;e+=i-e+1;break}a=t}return a},ro=e=>e?.replace("_","-"),ao={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class Logger{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||ao,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(ja(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new Logger(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new Logger(this.logger,e)}}var oo=new Logger;class EventEmitter{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e,...t){if(this.observers[e]){Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(([n,r])=>{for(let a=0;a<r;a++)n.apply(n,[e,...t])})}}}class ResourceStore extends EventEmitter{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){const a=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let i;e.indexOf(".")>-1?i=e.split("."):(i=[e,t],n&&(Array.isArray(n)?i.push(...n):ja(n)&&a?i.push(...n.split(a)):i.push(n)));const d=za(this.data,i);return!d&&!t&&!n&&e.indexOf(".")>-1&&(e=i[0],t=i[1],n=i.slice(2).join(".")),!d&&o&&ja(n)?no(this.data?.[e]?.[t],n,a):d}addResource(e,t,n,r,a={silent:!1}){const o=void 0!==a.keySeparator?a.keySeparator:this.options.keySeparator;let i=[e,t];n&&(i=i.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(i=e.split("."),r=t,t=i[1]),this.addNamespaces(t),Ya(this.data,i,r),a.silent||this.emit("added",e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(const r in n)(ja(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,a,o={silent:!1,skipCopy:!1}){let i=[e,t];e.indexOf(".")>-1&&(i=e.split("."),r=n,n=t,t=i[1]),this.addNamespaces(t);let d=za(this.data,i)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Xa(d,n,a):d={...d,...n},Ya(this.data,i,d),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var io={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,a){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,a)??t}),t}};const so=Symbol("i18next/PATH_KEY");function lo(e,t){const{[so]:n}=e(function(){const e=[],t=Object.create(null);let n;return t.get=(r,a)=>(n?.revoke?.(),a===so?e:(e.push(a),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}());return n.join(t?.keySeparator??".")}const co={},uo=e=>!ja(e)&&"boolean"!=typeof e&&"number"!=typeof e;class Translator extends EventEmitter{constructor(e,t={}){super(),((e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=oo.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const n={...t};if(null==e)return!1;const r=this.resolve(e,n);if(void 0===r?.res)return!1;const a=uo(r.res);return!1!==n.returnObjects||!a}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let a=t.ns||this.options.defaultNS||[];const o=n&&e.indexOf(n)>-1,i=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const r=eo.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===r.length)return!0;const a=to.getRegExp(`(${r.map(e=>"?"===e?"\\?":e).join("|")})`);let o=!a.test(e);if(!o){const t=e.indexOf(n);t>0&&!a.test(e.substring(0,t))&&(o=!0)}return o})(e,n,r));if(o&&!i){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:ja(a)?[a]:a};const o=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(o[0])>-1)&&(a=o.shift()),e=o.join(r)}return{key:e,namespaces:ja(a)?[a]:a}}translate(e,t,n){let r="object"==typeof t?{...t}:t;if("object"!=typeof r&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof r&&(r={...r}),r||(r={}),null==e)return"";"function"==typeof e&&(e=lo(e,{...this.options,...r})),Array.isArray(e)||(e=[String(e)]);const a=void 0!==r.returnDetails?r.returnDetails:this.options.returnDetails,o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,{key:i,namespaces:d}=this.extractFromKey(e[e.length-1],r),s=d[d.length-1];let l=void 0!==r.nsSeparator?r.nsSeparator:this.options.nsSeparator;void 0===l&&(l=":");const c=r.lng||this.language,u=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===c?.toLowerCase())return u?a?{res:`${s}${l}${i}`,usedKey:i,exactUsedKey:i,usedLng:c,usedNS:s,usedParams:this.getUsedParamsDetails(r)}:`${s}${l}${i}`:a?{res:i,usedKey:i,exactUsedKey:i,usedLng:c,usedNS:s,usedParams:this.getUsedParamsDetails(r)}:i;const h=this.resolve(e,r);let p=h?.res;const f=h?.usedKey||i,m=h?.exactUsedKey||i,g=void 0!==r.joinArrays?r.joinArrays:this.options.joinArrays,_=!this.i18nFormat||this.i18nFormat.handleAsObject,$=void 0!==r.count&&!ja(r.count),y=Translator.hasDefaultValue(r),b=$?this.pluralResolver.getSuffix(c,r.count,r):"",v=r.ordinal&&$?this.pluralResolver.getSuffix(c,r.count,{ordinal:!1}):"",x=$&&!r.ordinal&&0===r.count,w=x&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${b}`]||r[`defaultValue${v}`]||r.defaultValue;let C=p;_&&!p&&y&&(C=w);const k=uo(C),E=Object.prototype.toString.apply(C);if(!(_&&C&&k&&["[object Number]","[object Function]","[object RegExp]"].indexOf(E)<0)||ja(g)&&Array.isArray(C))if(_&&ja(g)&&Array.isArray(p))p=p.join(g),p&&(p=this.extendTranslation(p,e,r,n));else{let t=!1,a=!1;!this.isValidLookup(p)&&y&&(t=!0,p=w),this.isValidLookup(p)||(a=!0,p=i);const d=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:p,u=y&&w!==p&&this.options.updateMissing;if(a||t||u){if(this.logger.log(u?"updateKey":"missingKey",c,s,i,u?w:p),o){const e=this.resolve(i,{...r,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(r.lng||this.language):e.push(r.lng||this.language);const n=(e,t,n)=>{const a=y&&n!==p?n:d;this.options.missingKeyHandler?this.options.missingKeyHandler(e,s,t,a,u,r):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,s,t,a,u,r),this.emit("missingKey",e,s,t,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&$?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,r);x&&r[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],i+t,r[`defaultValue${t}`]||w)})}):n(e,i,w))}p=this.extendTranslation(p,e,r,h,n),a&&p===i&&this.options.appendNamespaceToMissingKey&&(p=`${s}${l}${i}`),(a||t)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}${l}${i}`:i,t?p:void 0,r))}else{if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,C,{...r,ns:d}):`key '${i} (${this.language})' returned an object instead of string.`;return a?(h.res=e,h.usedParams=this.getUsedParamsDetails(r),h):e}if(o){const e=Array.isArray(C),t=e?[]:{},n=e?m:f;for(const e in C)if(Object.prototype.hasOwnProperty.call(C,e)){const a=`${n}${o}${e}`;t[e]=y&&!p?this.translate(a,{...r,defaultValue:uo(w)?w[e]:void 0,joinArrays:!1,ns:d}):this.translate(a,{...r,joinArrays:!1,ns:d}),t[e]===a&&(t[e]=C[e])}p=t}}return a?(h.res=p,h.usedParams=this.getUsedParamsDetails(r),h):p}extendTranslation(e,t,n,r,a){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const o=ja(e)&&(void 0!==n?.interpolation?.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let i;if(o){const t=e.match(this.interpolator.nestingRegexp);i=t&&t.length}let d=n.replace&&!ja(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),e=this.interpolator.interpolate(e,d,n.lng||this.language||r.usedLng,n),o){const t=e.match(this.interpolator.nestingRegexp);i<(t&&t.length)&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(...e)=>a?.[0]!==e[0]||n.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),n)),n.interpolation&&this.interpolator.reset()}const o=n.postProcess||this.options.postProcess,i=ja(o)?[o]:o;return null!=e&&i?.length&&!1!==n.applyPostProcessor&&(e=io.handle(i,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,a,o,i;return ja(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(n))return;const d=this.extractFromKey(e,t),s=d.key;r=s;let l=d.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));const c=void 0!==t.count&&!ja(t.count),u=c&&!t.ordinal&&0===t.count,h=void 0!==t.context&&(ja(t.context)||"number"==typeof t.context)&&""!==t.context,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(i=e,co[`${p[0]}-${e}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(i)||(co[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(", ")}" won't get resolved as namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach(r=>{if(this.isValidLookup(n))return;o=r;const i=[s];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(i,s,r,e,t);else{let e;c&&(e=this.pluralResolver.getSuffix(r,t.count,t));const n=`${this.options.pluralSeparator}zero`,a=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(t.ordinal&&0===e.indexOf(a)&&i.push(s+e.replace(a,this.options.pluralSeparator)),i.push(s+e),u&&i.push(s+n)),h){const r=`${s}${this.options.contextSeparator||"_"}${t.context}`;i.push(r),c&&(t.ordinal&&0===e.indexOf(a)&&i.push(r+e.replace(a,this.options.pluralSeparator)),i.push(r+e),u&&i.push(r+n))}}let d;for(;d=i.pop();)this.isValidLookup(n)||(a=d,n=this.getResource(r,e,d,t))}))})}),{res:n,usedKey:r,exactUsedKey:a,usedLng:o,usedNS:i}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!ja(e.replace);let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}class LanguageUtil{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=oo.create("languageUtils")}getScriptPartFromCode(e){if(!(e=ro(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=ro(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(ja(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;const r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?e:e.indexOf("-")<0&&r.indexOf("-")<0?void 0:e.indexOf("-")>0&&r.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===r||0===e.indexOf(r)&&r.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),ja(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),r=[],a=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return ja(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&a(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&a(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&a(this.getLanguagePartFromCode(e))):ja(e)&&a(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&a(this.formatLanguageCode(e))}),r}}const ho={zero:0,one:1,two:2,few:3,many:4,other:5},po={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class PluralResolver{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=oo.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=ro("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:n,type:r});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let o;try{o=new Intl.PluralRules(n,{type:r})}catch(n){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),po;if(!e.match(/-|_/))return po;const r=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(r,t)}return this.pluralRulesCache[a]=o,o}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((e,t)=>ho[e]-ho[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,n={}){const r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const fo=(e,t,n,r=".",a=!0)=>{let o=((e,t,n)=>{const r=za(e,n);return void 0!==r?r:za(t,n)})(e,t,n);return!o&&a&&ja(n)&&(o=no(e,n,r),void 0===o&&(o=no(t,n,r))),o},mo=e=>e.replace(/\$/g,"$$$$");class Interpolator{constructor(e={}){this.logger=oo.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:a,prefixEscaped:o,suffix:i,suffixEscaped:d,formatSeparator:s,unescapeSuffix:l,unescapePrefix:c,nestingPrefix:u,nestingPrefixEscaped:h,nestingSuffix:p,nestingSuffixEscaped:f,nestingOptionsSeparator:m,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=void 0!==t?t:Qa,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=a?Za(a):o||"{{",this.suffix=i?Za(i):d||"}}",this.formatSeparator=s||",",this.unescapePrefix=l?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=u?Za(u):h||Za("$t("),this.nestingSuffix=p?Za(p):f||Za(")"),this.nestingOptionsSeparator=m||",",this.maxReplaces=g||1e3,this.alwaysFormat=void 0!==_&&_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let a,o,i;const d=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},s=e=>{if(e.indexOf(this.formatSeparator)<0){const a=fo(t,d,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(a,void 0,n,{...r,...t,interpolationkey:e}):a}const a=e.split(this.formatSeparator),o=a.shift().trim(),i=a.join(this.formatSeparator).trim();return this.format(fo(t,d,o,this.options.keySeparator,this.options.ignoreJSONStructure),i,n,{...r,...t,interpolationkey:o})};this.resetRegExp();const l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,c=void 0!==r?.interpolation?.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>mo(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?mo(this.escape(e)):mo(e)}].forEach(t=>{for(i=0;a=t.regex.exec(e);){const n=a[1].trim();if(o=s(n),void 0===o)if("function"==typeof l){const t=l(e,a,r);o=ja(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))o="";else{if(c){o=a[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),o=""}else ja(o)||this.useRawValueToEscape||(o=Ka(o));const d=t.safeValue(o);if(e=e.replace(a[0],d),c?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=a[0].length):t.regex.lastIndex=0,i++,i>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,a,o;const i=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let a=`{${r[1]}`;e=r[0],a=this.interpolate(a,o);const i=a.match(/'/g),d=a.match(/"/g);((i?.length??0)%2==0&&!d||d.length%2!=0)&&(a=a.replace(/'/g,'"'));try{o=JSON.parse(a),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${a}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let d=[];o={...n},o=o.replace&&!ja(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;const s=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(-1!==s&&(d=r[1].slice(s).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,s)),a=t(i.call(this,r[1].trim(),o),o),a&&r[0]===e&&!ja(a))return a;ja(a)||(a=Ka(a)),a||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),a=""),d.length&&(a=d.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),a.trim())),e=e.replace(r[0],a),this.regexp.lastIndex=0}return e}}const go=e=>{const t={};return(n,r,a)=>{let o=a;a&&a.interpolationkey&&a.formatParams&&a.formatParams[a.interpolationkey]&&a[a.interpolationkey]&&(o={...o,[a.interpolationkey]:void 0});const i=r+JSON.stringify(o);let d=t[i];return d||(d=e(ro(r),a),t[i]=d),d(n)}},_o=e=>(t,n,r)=>e(ro(n),r)(t);class Formatter{constructor(e={}){this.logger=oo.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?go:_o;this.formats={number:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:n((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:n((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=go(t)}format(e,t,n,r={}){const a=t.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(e=>e.indexOf(")")>-1)){const e=a.findIndex(e=>e.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,e)].join(this.formatSeparator)}const o=a.reduce((e,t)=>{const{formatName:a,formatOptions:o}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const a=r[1].substring(0,r[1].length-1);"currency"===t&&a.indexOf(":")<0?n.currency||(n.currency=a.trim()):"relativetime"===t&&a.indexOf(":")<0?n.range||(n.range=a.trim()):a.split(";").forEach(e=>{if(e){const[t,...r]=e.split(":"),a=r.join(":").trim().replace(/^'+|'+$/g,""),o=t.trim();n[o]||(n[o]=a),"false"===a&&(n[o]=!1),"true"===a&&(n[o]=!0),isNaN(a)||(n[o]=parseInt(a,10))}})}return{formatName:t,formatOptions:n}})(t);if(this.formats[a]){let t=e;try{const i=r?.formatParams?.[r.interpolationkey]||{},d=i.locale||i.lng||r.locale||r.lng||n;t=this.formats[a](e,d,{...o,...r,...i})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${a}`),e},e);return o}}class Connector extends EventEmitter{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=oo.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){const a={},o={},i={},d={};return e.forEach(e=>{let r=!0;t.forEach(t=>{const i=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[i]=2:this.state[i]<0||(1===this.state[i]?void 0===o[i]&&(o[i]=!0):(this.state[i]=1,r=!1,void 0===o[i]&&(o[i]=!0),void 0===a[i]&&(a[i]=!0),void 0===d[t]&&(d[t]=!0)))}),r||(i[e]=!0)}),(Object.keys(a).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(a),pending:Object.keys(o),toLoadLanguages:Object.keys(i),toLoadNamespaces:Object.keys(d)}}loaded(e,t,n){const r=e.split("|"),a=r[0],o=r[1];t&&this.emit("failedLoading",a,o,t),!t&&n&&this.store.addResourceBundle(a,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const i={};this.queue.forEach(n=>{((e,t,n)=>{const{obj:r,k:a}=Wa(e,t,Object);r[a]=r[a]||[],r[a].push(n)})(n.loaded,[a],o),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{i[e]||(i[e]={});const t=n.loaded[e];t.length&&t.forEach(t=>{void 0===i[e][t]&&(i[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",i),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,a=this.retryTimeout,o){if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:a,callback:o});this.readingCalls++;const i=(i,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}i&&d&&r<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,r+1,2*a,o)},a):o(i,d)},d=this.backend[n].bind(this.backend);if(2!==d.length)return d(e,t,i);try{const n=d(e,t);n&&"function"==typeof n.then?n.then(e=>i(null,e)).catch(i):i(null,n)}catch(e){i(e)}}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();ja(e)&&(e=this.languageUtils.toResolveHierarchy(e)),ja(t)&&(t=[t]);const a=this.queueLoad(e,t,n,r);if(!a.toLoad.length)return a.pending.length||r(),null;a.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){const n=e.split("|"),r=n[0],a=n[1];this.read(r,a,"read",void 0,void 0,(n,o)=>{n&&this.logger.warn(`${t}loading namespace ${a} for language ${r} failed`,n),!n&&o&&this.logger.log(`${t}loaded namespace ${a} for language ${r}`,o),this.loaded(e,n,o)})}saveMissing(e,t,n,r,a,o={},i=()=>{}){if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(t)){if(null!=n&&""!==n){if(this.backend?.create){const d={...o,isUpdate:a},s=this.backend.create.bind(this.backend);if(s.length<6)try{let a;a=5===s.length?s(e,t,n,r,d):s(e,t,n,r),a&&"function"==typeof a.then?a.then(e=>i(null,e)).catch(i):i(null,a)}catch(e){i(e)}else s(e,t,n,r,i,d)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}else this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const $o=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),ja(e[1])&&(t.defaultValue=e[1]),ja(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),yo=e=>(ja(e.ns)&&(e.ns=[e.ns]),ja(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),ja(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),bo=()=>{};class I18n extends EventEmitter{constructor(e={},t){var n;if(super(),this.options=yo(e),this.services={},this.logger=oo,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))}),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(ja(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=$o();this.options={...n,...this.options,...yo(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler),!0===this.options.debug&&"undefined"!=typeof console&&console.warn("i18next is maintained with support from locize.com — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com");const r=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?oo.init(r(this.modules.logger),this.options):oo.init(null,this.options),e=this.modules.formatter?this.modules.formatter:Formatter;const t=new LanguageUtil(this.options);this.store=new ResourceStore(this.options.resources,this.options);const a=this.services;a.logger=oo,a.resourceStore=this.store,a.languageUtils=t,a.pluralResolver=new PluralResolver(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix});this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!e||this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format||(a.formatter=r(e),a.formatter.init&&a.formatter.init(a,this.options),this.options.interpolation.format=a.formatter.format.bind(a.formatter)),a.interpolator=new Interpolator(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new Connector(r(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(a.languageDetector=r(this.modules.languageDetector),a.languageDetector.init&&a.languageDetector.init(a,this.options.detection,this.options)),this.modules.i18nFormat&&(a.i18nFormat=r(this.modules.i18nFormat),a.i18nFormat.init&&a.i18nFormat.init(this)),this.translator=new Translator(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=bo),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});const a=qa(),o=()=>{const e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?o():setTimeout(o,0),a}loadResources(e,t=bo){let n=t;const r=ja(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===r?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return n();const e=[],t=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};if(r)t(r);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e))}this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){const r=qa();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=bo),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&io.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const n=qa();this.emit("languageChanging",e);const r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},a=(a,o)=>{o?this.isLanguageChangingTo===e&&(r(o),this.translator.changeLanguage(o),this.isLanguageChangingTo=void 0,this.emit("languageChanged",o),this.logger.log("languageChanged",o)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(a,(...e)=>this.t(...e))},o=t=>{e||t||!this.services.languageDetector||(t=[]);const n=ja(t)?t:t&&t[0],o=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(ja(t)?[t]:t);o&&(this.language||r(o),this.translator.language||this.translator.changeLanguage(o),this.services.languageDetector?.cacheUserLanguage?.(o)),this.loadResources(o,e=>{a(e,o)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),n}getFixedT(e,t,n){const r=(e,t,...a)=>{let o;o="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(a)):{...t},o.lng=o.lng||r.lng,o.lngs=o.lngs||r.lngs,o.ns=o.ns||r.ns,""!==o.keyPrefix&&(o.keyPrefix=o.keyPrefix||n||r.keyPrefix);const i=this.options.keySeparator||".";let d;return o.keyPrefix&&Array.isArray(e)?d=e.map(e=>("function"==typeof e&&(e=lo(e,{...this.options,...t})),`${o.keyPrefix}${i}${e}`)):("function"==typeof e&&(e=lo(e,{...this.options,...t})),d=o.keyPrefix?`${o.keyPrefix}${i}${e}`:e),this.t(d,o)};return ja(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,a=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const o=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,o);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!o(n,e)||r&&!o(a,e)))}loadNamespaces(e,t){const n=qa();return this.options.ns?(ja(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=qa();ja(e)&&(e=[e]);const r=this.options.preload||[],a=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return a.length?(this.options.preload=r.concat(a),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const t=new Intl.Locale(e);if(t&&t.getTextInfo){const e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}const t=this.services?.languageUtils||new LanguageUtil($o());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const n=new I18n(e,t);return n.createInstance=I18n.createInstance,n}cloneInstance(e={},t=bo){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},a=new I18n(r);void 0===e.debug&&void 0===e.prefix||(a.logger=a.logger.clone(e));if(["store","services","language"].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},n){const e=Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{});a.store=new ResourceStore(e,r),a.services.resourceStore=a.store}if(e.interpolation){const t={...$o().interpolation,...this.options.interpolation,...e.interpolation},n={...r,interpolation:t};a.services.interpolator=new Interpolator(n)}return a.translator=new Translator(a.services,r),a.translator.on("*",(e,...t)=>{a.emit(e,...t)}),a.init(r,t),a.translator.options=r,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const vo=I18n.createInstance(),xo=vo.createInstance;vo.dir,vo.init,vo.loadResources,vo.reloadResources,vo.use,vo.changeLanguage,vo.getFixedT,vo.t,vo.exists,vo.setDefaultNamespace,vo.hasLoadedNamespace,vo.loadNamespaces,vo.loadLanguages;var wo={session:{"validation.card_cvn_invalid":"CVN is not valid","validation.card_expiry_invalid":"Card expiry is not valid","validation.card_number_incomplete":"Card number is incomplete","validation.card_number_invalid":"Card number is not valid","validation.generic_invalid":"{{field}} is not valid","validation.required":"{{field}} is required","validation.text_too_long":"{{field}} is too long","validation.text_too_short":"{{field}} is too short","payment.save_checkbox_label":"Save for faster payment next time","payment_methods.add_payment_method":"Add payment method","payment_methods.channel_disabled_amount_too_large":"Not available for this payment","payment_methods.channel_disabled_amount_too_small":"Not available for this payment","payment_methods.pay_with":"Pay with","payment_methods.select_channel_placeholder":"Select {{groupName}}","default_error.message_1":"There was a problem with the request.","default_error.message_2":"Please try again later.","default_error.title":"Error","combobox.default_search_placeholder":"Search...","failure_code.account_access_blocked":"Your payment was declined. Please try again or use a different payment method.","failure_code.account_already_linked":"Your account has already been linked. Please use a different payment method.","failure_code.account_not_activated":"Your payment couldn’t be processed because your account hasn’t been activated. Please activate your account and try again.","failure_code.authentication_failed":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.capture_amount_exceeded":"Your payment couldn't be processed. Please make sure your payment details are correct and try again, or use a different payment method.","failure_code.card_declined":"Your card was declined. Please try again with another card or payment method.","failure_code.channel_unavailable":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.declined_by_issuer":"Your payment was declined. Please try again or use a different payment method.","failure_code.declined_by_processor":"Your payment was declined. Please try again or use a different payment method.","failure_code.expired_card":"Your card was declined because it is expired. Please try again or use a different payment method.","failure_code.expired_otp":"Your payment couldn’t be processed because your verification code is invalid. Please try again or use a different payment method.","failure_code.failure_details_unavailable":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.inactive_or_unauthorized_card":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.insufficient_balance":"Your payment couldn’t be processed because your account balance is insufficient. Please make sure you have enough funds and try again.","failure_code.invalid_account_details":"Your payment information is incorrect. Please double-check your card details or try a different payment method.","failure_code.invalid_cvv":"The CVN entered was incorrect. Please try again.","failure_code.invalid_merchant_settings":"Your payment couldn’t be processed. Please contact the seller or try a different payment method.","failure_code.invalid_otp":"Your payment couldn’t be processed because your verification code is invalid. Please try again or use a different payment method.","failure_code.invalid_token":"Your payment couldn’t be processed because your verification code is invalid. Please try again or use a different payment method.","failure_code.issuer_unavailable":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.otp_attempt_counts_exceeded":"Your payment couldn’t be processed because there were too many failed OTP attempts. Please make the payment again or use a different payment method.","failure_code.partner_timeout_error":"Your payment couldn't be processed. Please try again or use a different payment method.","failure_code.payment_amount_limits_exceeded":"Your payment couldn’t be processed because you’ve exceeded your transaction limit. Please use a different payment method.","failure_code.payment_attempt_counts_exceeded":"Your payment couldn’t be processed due to too many failed attempts.","failure_code.payment_request_expired":"Your payment couldn’t be processed because the link has expired. Please try again or use a different payment method.","failure_code.processor_error":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.server_error":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.stolen_card":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.suspected_fraudulent":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.timeout_error":"Your payment couldn’t be processed. Please try again or use a different payment method.","failure_code.user_declined_payment":"Your payment was declined. Please try again or use a different payment method.","failure_code.user_device_unreachable":"Your payment couldn’t be processed due to a network issue. Please try again or use a different payment method.","failure_code.user_did_not_authorize":"Your payment couldn’t be processed because it wasn’t authorized in time. Please try again.",failure_code_unknown:"A failure occurred with code {{failureCode}}","payment_request_status.canceled.subtext":"Please try to check out again or contact the seller if the problem persists.","payment_request_status.canceled.title":"This page is no longer available","payment_request_status.expired.subtext":"Your payment couldn’t be processed. Please try again or use a different payment method.","payment_request_status.expired.title":"Payment unsuccessful","payment_request_status.failed.subtext":"Your payment couldn't be processed. Please try a different payment method or submit an inquiry to the seller by sharing your Unique Identifiers.","payment_request_status.failed.title":"Payment failed","payment_token_status.canceled.subtext":"Please try again or use a different payment method.","payment_token_status.canceled.title":"Payment method couldn't be added","payment_token_status.expired.subtext":"Please try again or use a different payment method.","payment_token_status.expired.title":"Payment method couldn't be added","payment_token_status.failed.subtext":"Your payment couldn't be processed. Please try a different payment method or submit an inquiry to the seller by sharing your Unique Identifiers.","payment_token_status.failed.title":"Payment method couldn't be added","action.payment_confirmation_instructions":"Once you've paid, click the button above to get your payment confirmation.","action.payment_made":"I've made this payment"}},Co={session:{"validation.card_cvn_invalid":"CVN tidak valid","validation.card_expiry_invalid":"Tanggal kedaluwarsa kartu tidak valid","validation.card_number_incomplete":"Nomor kartu tidak lengkap","validation.card_number_invalid":"Nomor kartu tidak valid","validation.generic_invalid":"{{field}} tidak valid","validation.required":"{{field}} wajib diisi","validation.text_too_long":"{{field}} terlalu panjang","validation.text_too_short":"{{field}} terlalu pendek","payment.save_checkbox_label":"Simpan untuk pembayaran lebih cepat lain kali","payment_methods.add_payment_method":"Tambah metode pembayaran","payment_methods.channel_disabled_amount_too_large":"Tidak tersedia untuk pembayaran ini","payment_methods.channel_disabled_amount_too_small":"Tidak tersedia untuk pembayaran ini","payment_methods.pay_with":"Bayar dengan","payment_methods.select_channel_placeholder":"Pilih {{groupName}}","default_error.message_1":"Ada masalah dengan permintaan ini.","default_error.message_2":"Silakan coba lagi nanti.","default_error.title":"Error","failure_code.account_access_blocked":"Pembayaran Anda ditolak. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.account_already_linked":"Akun Anda sudah di-link. Silakan gunakan metode pembayaran lain.","failure_code.account_not_activated":"Pembayaran Anda tidak dapat diproses karena akun Anda belum diaktifkan. Harap aktifkan akun Anda dan coba lagi.","failure_code.authentication_failed":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.capture_amount_exceeded":"Pembayaran Anda tidak dapat diproses. Pastikan detail pembayaran Anda benar dan coba lagi, atau gunakan metode pembayaran lain.","failure_code.card_declined":"Kartu Anda ditolak. Silakan coba lagi dengan kartu atau metode pembayaran lain.","failure_code.channel_unavailable":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.declined_by_issuer":"Pembayaran Anda ditolak. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.declined_by_processor":"Pembayaran Anda ditolak. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.expired_card":"Kartu Anda ditolak karena sudah kedaluwarsa. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.expired_otp":"Pembayaran Anda tidak dapat diproses karena kode verifikasi tidak valid. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.failure_details_unavailable":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.inactive_or_unauthorized_card":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.insufficient_balance":"Pembayaran Anda tidak dapat diproses karena saldo akun Anda tidak mencukupi. Pastikan Anda memiliki dana yang cukup dan coba lagi.","failure_code.invalid_account_details":"Informasi pembayaran Anda salah. Harap periksa kembali detail kartu Anda atau coba gunakan metode pembayaran lain.","failure_code.invalid_cvv":"CVN yang dimasukkan salah. Silakan coba lagi.","failure_code.invalid_merchant_settings":"Pembayaran Anda tidak dapat diproses. Silakan hubungi penjual atau coba metode pembayaran lain.","failure_code.invalid_otp":"Pembayaran Anda tidak dapat diproses karena kode verifikasi tidak valid. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.invalid_token":"Pembayaran Anda tidak dapat diproses karena kode verifikasi tidak valid. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.issuer_unavailable":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.otp_attempt_counts_exceeded":"Pembayaran Anda tidak dapat diproses karena terlalu banyak percobaan OTP yang gagal. Harap lakukan pembayaran lagi atau gunakan metode pembayaran lain.","failure_code.partner_timeout_error":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.payment_amount_limits_exceeded":"Pembayaran Anda tidak dapat diproses karena Anda telah melampaui batas transaksi. Silakan gunakan metode pembayaran lain.","failure_code.payment_attempt_counts_exceeded":"Pembayaran Anda tidak dapat diproses karena terlalu banyak percobaan yang gagal.","failure_code.payment_request_expired":"Pembayaran Anda tidak dapat diproses karena link telah kedaluwarsa. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.processor_error":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.server_error":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.stolen_card":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.suspected_fraudulent":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.timeout_error":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.user_declined_payment":"Pembayaran Anda ditolak. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.user_device_unreachable":"Pembayaran Anda tidak dapat diproses karena masalah jaringan. Silakan coba lagi atau gunakan metode pembayaran lain.","failure_code.user_did_not_authorize":"Pembayaran Anda tidak dapat diproses karena waktu pembayaran telah habis. Silakan coba lagi.",failure_code_unknown:"Terjadi kegagalan dengan kode {{failureCode}}","payment_request_status.canceled.subtext":"Silakan coba check out lagi atau hubungi penjual jika masalah terus berlanjut.","payment_request_status.canceled.title":"Halaman ini tidak tersedia lagi","payment_request_status.expired.subtext":"Pembayaran Anda tidak dapat diproses. Silakan coba lagi atau gunakan metode pembayaran lain.","payment_request_status.expired.title":"Pembayaran tidak berhasil","payment_request_status.failed.subtext":"Pembayaran Anda tidak dapat diproses. Silakan coba metode pembayaran lain atau ajukan pertanyaan kepada penjual dengan membagikan ID Unik Anda.","payment_request_status.failed.title":"Pembayaran gagal","payment_token_status.canceled.subtext":"Silakan coba lagi atau gunakan metode pembayaran lain.","payment_token_status.canceled.title":"Metode pembayaran tidak dapat ditambahkan","payment_token_status.expired.subtext":"Silakan coba lagi atau gunakan metode pembayaran lain.","payment_token_status.expired.title":"Metode pembayaran tidak dapat ditambahkan","payment_token_status.failed.subtext":"Pembayaran Anda tidak dapat diproses. Silakan coba metode pembayaran lain atau ajukan pertanyaan kepada penjual dengan membagikan ID Unik Anda.","payment_token_status.failed.title":"Metode pembayaran tidak dapat ditambahkan","action.payment_confirmation_instructions":"Setelah Anda bayar, klik tombol di atas untuk mendapatkan konfirmasi pembayaran Anda.","action.payment_made":"Saya telah melakukan pembayaran ini"}},ko={session:{"validation.card_cvn_invalid":"CVN ไม่ถูกต้อง","validation.card_expiry_invalid":"วันหมดอายุของบัตรไม่ถูกต้อง","validation.card_number_incomplete":"หมายเลขบัตรไม่ครบถ้วน","validation.card_number_invalid":"หมายเลขบัตรไม่ถูกต้อง","validation.generic_invalid":"{{field}} ไม่ถูกต้อง","validation.required":"กรุณากรอก {{field}}","validation.text_too_long":"{{field}} ยาวเกินไป","validation.text_too_short":"{{field}} สั้นเกินไป","payment.save_checkbox_label":"บันทึกไว้สำหรับการชำระเงินที่เร็วขึ้นในครั้งถัดไป","payment_methods.add_payment_method":"เพิ่มวิธีการชำระเงิน","payment_methods.channel_disabled_amount_too_large":"ไม่สามารถใช้ได้กับการชำระเงินนี้","payment_methods.channel_disabled_amount_too_small":"ไม่สามารถใช้ได้กับการชำระเงินนี้","payment_methods.pay_with":"ชำระเงินด้วย","payment_methods.select_channel_placeholder":"เลือก {{groupName}}","default_error.message_1":"มีปัญหาในการประมวลผลคำขอ","default_error.message_2":"โปรดลองอีกครั้งในภายหลัง","default_error.title":"ข้อผิดพลาด","failure_code.account_access_blocked":"การชำระเงินของคุณถูกปฏิเสธ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.account_already_linked":"บัญชีนี้มีการเชื่อมต่อไว้แล้ว กรุณาเลือกวิธีการชำระเงินอื่น","failure_code.account_not_activated":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากบัญชีของคุณยังไม่ได้เปิดใช้งาน กรุณาเปิดใช้งานบัญชีและลองใหม่อีกครั้ง","failure_code.authentication_failed":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.capture_amount_exceeded":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาตรวจสอบรายละเอียดการชำระเงินให้ถูกต้องแล้วลองใหม่อีกครั้ง หรือใช้วิธีการชำระเงินอื่น","failure_code.card_declined":"บัตรของคุณถูกปฏิเสธ กรุณาลองใหม่ด้วยบัตรหรือวิธีการชำระเงินอื่น","failure_code.channel_unavailable":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือเลือกวิธีการชำระเงินอื่น","failure_code.declined_by_issuer":"การชำระเงินของคุณถูกปฏิเสธ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.declined_by_processor":"การชำระเงินของคุณถูกปฏิเสธ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.expired_card":"บัตรของคุณถูกปฏิเสธเนื่องจากบัตรหมดอายุ กรุณาลองใหม่อีกครั้งหรือใช้วิธีการชําระเงินอื่น","failure_code.expired_otp":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากรหัสยืนยันของคุณไม่ถูกต้อง กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.failure_details_unavailable":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.inactive_or_unauthorized_card":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือเลือกวิธีการชำระเงินอื่น","failure_code.insufficient_balance":"ไม่สามารถดำเนินการชำระเงินได้ เนื่องจากยอดเงินในบัญชีไม่เพียงพอ กรุณาตรวจสอบให้แน่ใจว่ามียอดเงินเพียงพอแล้วลองใหม่อีกครั้ง","failure_code.invalid_account_details":"ข้อมูลการชำระเงินไม่ถูกต้อง กรุณาตรวจสอบรายละเอียดบัตรอีกครั้ง หรือใช้วิธีการชำระเงินอื่น","failure_code.invalid_cvv":"CVN ที่กรอกไม่ถูกต้อง กรุณาลองใหม่อีกครั้ง","failure_code.invalid_merchant_settings":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาติดต่อผู้ขายหรือลองใช้วิธีชำระเงินอื่น","failure_code.invalid_otp":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากรหัสยืนยันของคุณไม่ถูกต้อง กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.invalid_token":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากรหัสยืนยันของคุณไม่ถูกต้อง กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.issuer_unavailable":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือเลือกวิธีการชำระเงินอื่น","failure_code.otp_attempt_counts_exceeded":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากมีการกรอกรหัส OTP ผิดพลาดมากเกินไป กรุณาชำระเงินใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.partner_timeout_error":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.payment_amount_limits_exceeded":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากคุณทำธุรกรรมเกินขีดจำกัด กรุณาใช้วิธีชำระเงินอื่น","failure_code.payment_attempt_counts_exceeded":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากพยายามล้มเหลวหลายครั้งเกินไป","failure_code.payment_request_expired":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากลิงก์หมดอายุแล้ว กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.processor_error":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือเลือกวิธีการชำระเงินอื่น","failure_code.server_error":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.stolen_card":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือเลือกวิธีการชำระเงินอื่น","failure_code.suspected_fraudulent":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือเลือกวิธีการชำระเงินอื่น","failure_code.timeout_error":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.user_declined_payment":"การชำระเงินของคุณถูกปฏิเสธ กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.user_device_unreachable":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากปัญหาเครือข่าย กรุณาลองใหม่อีกครั้งหรือใช้วิธีชำระเงินอื่น","failure_code.user_did_not_authorize":"ไม่สามารถดำเนินการชำระเงินได้เนื่องจากไม่ได้รับการอนุมัติภายในเวลาที่กำหนด กรุณาลองใหม่อีกครั้ง",failure_code_unknown:"เกิดข้อผิดพลาดขึ้น (รหัส: {{failureCode}})","payment_request_status.canceled.subtext":"กรุณาลองชำระเงินอีกครั้ง หรือ ติดต่อผู้ขายหากปัญหายังคงเกิดขึ้น","payment_request_status.canceled.title":"หน้านี้ไม่สามารถใช้งานได้แล้ว","payment_request_status.expired.subtext":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใหม่อีกครั้งหรือลองใช้วิธีชำระเงินอื่น","payment_request_status.expired.title":"ชำระเงินไม่สำเร็จ","payment_request_status.failed.subtext":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใช้วิธีการชำระเงินอื่น หรือส่งคำถามไปยังผู้ขายโดยแชร์ Unique Identifiers ของคุณ","payment_request_status.failed.title":"ชำระเงินไม่สำเร็จ","payment_token_status.canceled.subtext":"กรุณาลองใหม่อีกครั้งหรือใช้วิธีการชําระเงินอื่น","payment_token_status.canceled.title":"ไม่สามารถเพิ่มวิธีการชําระเงินได้","payment_token_status.expired.subtext":"กรุณาลองใหม่อีกครั้งหรือใช้วิธีการชําระเงินอื่น","payment_token_status.expired.title":"ไม่สามารถเพิ่มวิธีการชําระเงินได้","payment_token_status.failed.subtext":"ไม่สามารถดำเนินการชำระเงินได้ กรุณาลองใช้วิธีการชำระเงินอื่น หรือส่งคำถามไปยังผู้ขายโดยแชร์ Unique Identifiers ของคุณ","payment_token_status.failed.title":"ไม่สามารถเพิ่มวิธีการชําระเงินได้","action.payment_confirmation_instructions":"เมื่อคุณชำระเงินแล้ว คลิกที่ปุ่มด้านบนเพื่อยืนยันการชำระเงิน","action.payment_made":"ฉันได้ชำระเงินแล้ว"}},Eo={session:{"validation.card_cvn_invalid":"CVN không hợp lệ","validation.card_expiry_invalid":"Ngày hết hạn thẻ không hợp lệ","validation.card_number_incomplete":"Số thẻ chưa đầy đủ","validation.card_number_invalid":"Số thẻ không hợp lệ","validation.generic_invalid":"{{field}} không hợp lệ","validation.required":"Vui lòng nhập {{field}}","validation.text_too_long":"{{field}} quá dài","validation.text_too_short":"{{field}} quá ngắn","payment.save_checkbox_label":"Lưu để thanh toán nhanh hơn lần sau","payment_methods.add_payment_method":"Thêm phương thức thanh toán","payment_methods.channel_disabled_amount_too_large":"Không khả dụng cho khoản thanh toán này","payment_methods.channel_disabled_amount_too_small":"Không khả dụng cho khoản thanh toán này","payment_methods.pay_with":"Thanh toán bằng","payment_methods.select_channel_placeholder":"Chọn {{groupName}}","default_error.message_1":"Có vấn đề với yêu cầu.","default_error.message_2":"Vui lòng thử lại sau.","default_error.title":"Lỗi","failure_code.account_access_blocked":"Thanh toán của bạn bị từ chối. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.account_already_linked":"Tài khoản của bạn đã được liên kết. Vui lòng dùng phương thức khác.","failure_code.account_not_activated":"Không thể thực hiện thanh toán vì tài khoản chưa được kích hoạt. Vui lòng kích hoạt và thử lại.","failure_code.authentication_failed":"Không thể thực hiện thanh toán. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.capture_amount_exceeded":"Không thể thực hiện thanh toán. Vui lòng kiểm tra thông tin thanh toán và thử lại, hoặc dùng phương thức khác.","failure_code.card_declined":"Thẻ của bạn đã bị từ chối. Vui lòng thử lại bằng thẻ khác hoặc phương thức khác.","failure_code.channel_unavailable":"Không thể thực hiện thanh toán. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.declined_by_issuer":"Thanh toán của bạn bị từ chối. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.declined_by_processor":"Thanh toán của bạn bị từ chối. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.expired_card":"Thẻ của bạn bị từ chối do đã hết hạn. Vui lòng thử lại hoặc sử dụng phương thức thanh toán khác.","failure_code.expired_otp":"Không thể thực hiện thanh toán vì mã xác minh không hợp lệ. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.failure_details_unavailable":"Không thể thực hiện thanh toán. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.inactive_or_unauthorized_card":"Không thể xử lý thanh toán của bạn. Vui lòng thử lại hoặc sử dụng phương thức thanh toán khác.","failure_code.insufficient_balance":"Không thể thực hiện thanh toán vì số dư tài khoản không đủ. Vui lòng nạp thêm tiền và thử lại.","failure_code.invalid_account_details":"Thông tin thanh toán không chính xác. Vui lòng kiểm tra lại hoặc dùng phương thức khác.","failure_code.invalid_cvv":"Mã CVN nhập không đúng. Vui lòng thử lại.","failure_code.invalid_merchant_settings":"Không thể thực hiện thanh toán. Vui lòng liên hệ người bán hoặc dùng phương thức khác.","failure_code.invalid_otp":"Không thể thực hiện thanh toán vì mã xác minh không hợp lệ. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.invalid_token":"Không thể thực hiện thanh toán vì mã xác minh không hợp lệ. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.issuer_unavailable":"Không thể thực hiện thanh toán. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.otp_attempt_counts_exceeded":"Không thể thực hiện thanh toán vì đã nhập sai OTP quá nhiều lần. Vui lòng thanh toán lại hoặc dùng phương thức khác.","failure_code.partner_timeout_error":"Không thể thực hiện thanh toán. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.payment_amount_limits_exceeded":"Không thể thực hiện thanh toán vì bạn đã vượt quá hạn mức giao dịch. Vui lòng dùng phương thức khác.","failure_code.payment_attempt_counts_exceeded":"Không thể thực hiện thanh toán do quá nhiều lần thử thất bại.","failure_code.payment_request_expired":"Không thể thực hiện thanh toán vì liên kết đã hết hạn. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.processor_error":"Không thể xử lý thanh toán của bạn. Vui lòng thử lại hoặc sử dụng phương thức thanh toán khác.","failure_code.server_error":"Không thể thực hiện thanh toán. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.stolen_card":"Không thể xử lý thanh toán của bạn. Vui lòng thử lại hoặc sử dụng phương thức thanh toán khác.","failure_code.suspected_fraudulent":"Không thể xử lý thanh toán của bạn. Vui lòng thử lại hoặc sử dụng phương thức thanh toán khác.","failure_code.timeout_error":"Không thể thực hiện thanh toán. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.user_declined_payment":"Thanh toán của bạn bị từ chối. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.user_device_unreachable":"Không thể thực hiện thanh toán do sự cố mạng. Vui lòng thử lại hoặc dùng phương thức khác.","failure_code.user_did_not_authorize":"Không thể thực hiện thanh toán vì không được xác nhận kịp thời. Vui lòng thử lại.",failure_code_unknown:"Có lỗi xảy ra với mã {{failureCode}}","payment_request_status.canceled.subtext":"Vui lòng thử thanh toán lại hoặc liên hệ người bán nếu vấn đề vẫn tiếp diễn.","payment_request_status.canceled.title":"Trang này không còn khả dụng","payment_request_status.expired.subtext":"Thanh toán của bạn không thể xử lý. Vui lòng thử lại hoặc chọn phương thức khác.","payment_request_status.expired.title":"Thanh toán không thành công","payment_request_status.failed.subtext":"Không thể thực hiện thanh toán. Vui lòng thử phương thức khác hoặc gửi yêu cầu đến người bán bằng cách chia sẻ Mã định danh duy nhất.","payment_request_status.failed.title":"Thanh toán thất bại","payment_token_status.canceled.subtext":"Vui lòng thử lại hoặc dùng phương thức khác.","payment_token_status.canceled.title":"Không thể thêm phương thức thanh toán","payment_token_status.expired.subtext":"Vui lòng thử lại hoặc dùng phương thức khác.","payment_token_status.expired.title":"Không thể thêm phương thức thanh toán","payment_token_status.failed.subtext":"Không thể thực hiện thanh toán. Vui lòng thử phương thức khác hoặc gửi yêu cầu đến người bán bằng cách chia sẻ Mã định danh duy nhất.","payment_token_status.failed.title":"Không thể thêm phương thức thanh toán","action.payment_confirmation_instructions":"Sau khi bạn đã thanh toán, hãy nhấp nút phía trên để nhận xác nhận thanh toán.","action.payment_made":"Tôi đã thực hiện thanh toán này"}};const Po=(e,t,n)=>t?(e=>"object"==typeof e&&null!==e&&"localeKey"in e)(t)?e(t.localeKey,{field:n.label}):t.value:null;function So(e){return e.startsWith("/")&&e.endsWith("/")?e.slice(1,-1):e}function No(e,t){if(0===t.length)return e.required?{localeKey:"validation.required"}:void 0;switch(e.type.name){case"credit_card_number":case"credit_card_expiry":case"credit_card_cvn":return function(e){const t=e.split("-");if("xendit"!==t[0]||"encrypted"!==t[1])throw new Error("Unexpected value in encrypted field, this is a bug, please contact support.");if(6!==t.length){if(8===t.length&&"invalid"===t[6]){const e=t[7];return{localeKey:atob(e)}}throw new Error("Unexpected value in encrypted field, this is a bug, please contact support.")}}(t);case"phone_number":return(e=>{const t=ma(e);if(!t||!t.isValid())return{localeKey:"validation.generic_invalid"}})(t);case"email":return(e=>{if(!/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[A-Za-z]{2,}$/.test(e))return{localeKey:"validation.generic_invalid"}})(t);case"postal_code":return(e=>{if(!/^(?![-\s]+)[A-Za-z0-9\s-]+$/.test(e))return{localeKey:"validation.generic_invalid"}})(t);case"text":return((e,t)=>{if(Array.isArray(e.type.regex_validators))for(const n of e.type.regex_validators)if(!new RegExp(So(n.regex)).test(t))return{value:n.message};return void 0!==e.type.min_length&&t.length<e.type.min_length?{localeKey:"validation.text_too_short"}:t.length>e.type.max_length?{localeKey:"validation.text_too_long"}:void 0})(e,t);case"country":case"province":case"installment_plan":case"dropdown":return;default:throw e.type,new Error(`Unsupported input type: ${e.type.name}; this is a bug, please contact support.`)}}function To(e,t){const n=Array.isArray(e.channel_property)?e.channel_property:[e.channel_property];for(const r of n){let n=Ao(t,r);if(void 0===n&&(n=""),"string"!=typeof n)continue;const a=No(e,n);if(a)return a}}function Ao(e,t){const n=t.split("."),r=e[n[0]];if(void 0!==r){if("object"!=typeof r||Array.isArray(r)){if(1!==n.length)throw new Error(`Attempted to read channel property "${t}" expecting an object but found a primitive value; this is a bug, please contact support.`);return r}return Ao(r,n.slice(1).join("."))}}const Ro="field-radius-bl-0",Io="field-radius-br-0",Oo="field-radius-tl-0",Lo="field-radius-tr-0",Mo="field-collapse-r",Do="field-collapse-l",Uo="field-collapse-t",Bo="field-collapse-b",Fo=({fieldGroup:e,groupIndex:t,handleFieldChanged:n,channelProperties:r})=>{const{t:a}=At(),o=we(null),[i,d]=be({}),s=e.map(e=>e.span),l=Math.ceil(e.reduce((e,t)=>e+t.span,0)/2);xe(()=>{const e=o.current;if(e)return e.addEventListener(InternalSetFieldTouchedEvent.type,t),()=>{e.removeEventListener(InternalSetFieldTouchedEvent.type,t)};function t(e){const t=e.target.name;d(e=>({...e,[t]:!0}))}},[]);const c=(()=>{for(const t of e){if(!i[Gt(t)])continue;const e=To(t,r??{});if(e)return st("span",{className:"xendit-error-message xendit-text-12",children:Po(a,e,t)})}return null})();return st("div",{className:"xendit-channel-form-field-group",children:[st("label",{htmlFor:Yt(e[0]),className:"xendit-text-14",children:e[0].group_label??e[0].label??""}),st("div",{ref:o,className:"xendit-form-field-group "+(c?"invalid":""),children:e.map((e,t)=>{const r=(e=>{const t=s.slice(0,e).reduce((e,t)=>e+t,0),n=0===e?0:Math.floor(t/2);return{fieldPositionBySpan:t,fieldRow:n,fieldColumn:t%2,isLastRow:n===l-1}})(t),a=((e,t,n)=>{const{fieldPositionBySpan:r,fieldRow:a,fieldColumn:o,isLastRow:i}=n;return bt({[Ro]:l>a+1||r%2==1,[Io]:!!s[t+1],[Oo]:t>0,[Lo]:!(0===a&&1===o||0===a&&0===o&&2===e.span),[Mo]:1===e.span&&0===o,[Do]:1===e.span&&1===o,[Uo]:r>=2,[Bo]:!i})})(e,t,r);return st(Fa,{className:a,field:e,onChange:n},t)})},t),c]})},jo=function(e){function t(t){var n=Oe({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=Ue,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}(({form:e,onChannelPropertiesChanged:t},n)=>{const r=Nt(),a=ti()?.cardDetails,o=we(null),[i,d]=be(null);!function(e,t,n){ce=6,xe(function(){if("function"==typeof e){var n=e(t());return function(){e(null),n&&"function"==typeof n&&n()}}if(e)return e.current=t(),function(){return e.current=null}},null==n?n:n.concat(e))}(n,()=>({setAllFieldsTouched(){const e=o.current;e&&Array.from(e.elements).filter(e=>e instanceof HTMLInputElement).forEach(e=>{e.name&&e.dispatchEvent(new InternalSetFieldTouchedEvent)})}}));const s=ke(()=>{if(!o.current)return{};return function(e){const t={};for(const[n,r]of e){if(r instanceof Blob)continue;const e=n.split("__"),a=Vo(e,r);e:for(const n of e){const e=n.split(".");let r=t;for(;e.length>1;){const t=e.shift();let n=r[t];if(void 0===n&&(n=r[t]={}),n&&"object"==typeof n){if(Array.isArray(n))continue e;r=n}}const o=a.length?a.shift():"";r[e[0]]=o}}return t}(new FormData(o.current).entries())},[]),l=ke(()=>{if(!o.current)return;const e=s();d(e),t(e)},[s,t]),c=function(e,t,n){const r=Ce(()=>Ho(e.session_type,t,n?.require_billing_information??!1),[n?.require_billing_information,t,e.session_type]);return r}(r,e,a?.details??null),u=Ht(c);ve(()=>{u!==c&&l()},[c,l,u]);const h=function(e){const t=[[]];for(const n of e)1!==n.span||1!==t[t.length-1].length||1!==t[t.length-1][0].span?n.join?t[t.length-1].push(n):t.push([n]):t[t.length-1].push(n);return t}(c).filter(e=>e.length);return 0===h.length?null:st("div",{class:"xendit-channel-form",children:st("form",{ref:o,children:st(qo.Provider,{value:i,children:h.map((e,t)=>st(Fo,{fieldGroup:e,groupIndex:t,handleFieldChanged:l,channelProperties:i},t))})})})}),qo=K(null),Ko=()=>Ee(qo);function Vo(e,t){if(0===e.length)return[];if(1===e.length)return[t];if(""===t)return[];try{return JSON.parse(t)}catch(e){return[t]}}function Ho(e,t,n){return t.filter(t=>{if(t.flags?.require_billing_information){if("PAY"!==e)return!1;if(!n)return!1}return!0})}const Go=e=>{const t=we(null),n=we(null),r=void 0!==HTMLElement.prototype.animate;return xe(()=>{r&&(t.current?.animate(Wo,Yo),n.current?.animate(zo,Xo))},[r]),st("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[st("g",{opacity:"0.5",children:[st("path",{d:"M8.79453 10.2303C7.1791 10.2303 5.86953 11.5399 5.86953 13.1553V28.9503C5.86953 31.535 7.96484 33.6303 10.5495 33.6303H26.3445C27.96 33.6303 29.2695 32.3208 29.2695 30.7053",fill:"#F1F1F1"}),st("path",{d:"M8.79453 10.2303V10.2303C7.1791 10.2303 5.86953 11.5399 5.86953 13.1553V28.9503C5.86953 31.535 7.96484 33.6303 10.5495 33.6303H26.3445C27.96 33.6303 29.2695 32.3208 29.2695 30.7053V30.7053",stroke:"#D0D0D0",strokeWidth:"1.755",strokeLinecap:"round",strokeLinejoin:"round"})]}),st("g",{ref:n,style:{transformOrigin:"20px 20px"},children:[st("path",{d:"M28.8177 6.00256H14.7777C12.193 6.00256 10.0977 8.09787 10.0977 10.6826V24.7226C10.0977 27.3073 12.193 29.4026 14.7777 29.4026H28.8177C31.4023 29.4026 33.4977 27.3073 33.4977 24.7226V10.6826C33.4977 8.09787 31.4024 6.00256 28.8177 6.00256Z",fill:"white",stroke:"#EDEDED",strokeWidth:"1.755",strokeLinecap:"round",strokeLinejoin:"round"}),st("g",{style:{transformOrigin:"10px 30px"},ref:t,children:[st("path",{d:"M26.7697 20.5301V12.7301H18.9697",stroke:"#7C7C7C",strokeWidth:"1.872",strokeLinecap:"round",strokeLinejoin:"round"}),st("path",{d:"M17.4102 22.0901L26.7702 12.7301",stroke:"#7C7C7C",strokeWidth:"1.872",strokeLinecap:"round",strokeLinejoin:"round"})]})]})]})},Wo=[{transform:"scale(0.1)"},{transform:"scale(1)"}],Yo={duration:500,easing:"ease-out"},zo=[{transform:"rotate(0deg)"},{transform:"rotate(5deg)"},{transform:"rotate(-5deg)"},{transform:"rotate(0deg)"}],Xo={duration:1e3,easing:"ease-out",iterations:1/0,delay:2e3},Zo=e=>{const{id:t,label:n,checked:r,onChange:a,disabled:o}=e,i=Xt(),d=t||i;return st("div",{className:"xendit-checkbox",children:[st("div",{className:"xendit-checkbox-box",children:[st("input",{id:d,type:"checkbox",onChange:e=>{a?.(e)},checked:r,disabled:o}),st("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",className:"xendit-checkbox-graphic",children:st("polyline",{points:"40 144 96 200 224 72",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"16"})})]}),st("label",{htmlFor:d,className:"xendit-text-14",children:n})]})},Jo=K(null),Qo=()=>{const e=Ee(Jo);if(void 0===e)throw new Error("useChannel must be used within a ChannelProvider");return e},ei=K(null);ei.displayName="ChannelComponentDataContext";const ti=()=>Ee(ei),ni=e=>{const{channelOrPair:t,channelData:n,savePaymentMethod:r,formRef:a}=e,o=we(null),i=At(),{t:d}=i,s=Nt(),l=t[0],c=t.length>1,u=nn(t,r),h=function(e){if(e&&2===e.length)return[e[0],e[1]];return null}(u.instructions),p="OPTIONAL"===s.allow_save_payment_method&&(u.allow_save||c);return"ACTIVE"!==i.getSdkStatus()||"ACTIVE"!==s.status?null:st(Jo.Provider,{value:u,children:st(ei.Provider,{value:n,children:st("div",{className:"xendit-payment-channel",ref:o,children:[st(jo,{ref:a,form:u.form,onChannelPropertiesChanged:e=>{const t=new XenditChannelPropertiesChangedEvent(l.channel_code,e);o.current?.dispatchEvent(t)}}),u.banner?st(ri,{banner:u.banner}):null,p&&st(Zo,{label:d("payment.save_checkbox_label"),onChange:e=>{const t=e.target?.checked;i?.dispatchEvent(new InternalUpdateChannelComponentData(l.channel_code,{savePaymentMethod:t}))},checked:r}),h?st("div",{className:"xendit-payment-channel-instructions",children:["QR_CODE"===u.pm_type?st("img",{src:u.brand_logo_url,alt:u.brand_name,className:"xendit-payment-channel-instructions-logo"}):st(Go,{}),st("div",{className:"xendit-payment-channel-instructions-text xendit-text-12",children:h.map((e,t)=>st("p",{className:0===t?"xendit-text-semibold":void 0,children:e},t))})]}):null]})})})},ri=e=>e.banner?.link_url?st("a",{href:e.banner.link_url,target:"_blank",rel:"noopener noreferrer",children:st("img",{src:e.banner.image_url,alt:e.banner.alt_text,className:"xendit-payment-channel-banner",style:{aspectRatio:e.banner.aspect_ratio}})}):st("img",{src:e.banner.image_url,alt:e.banner.alt_text,className:"xendit-payment-channel-banner",style:{aspectRatio:e.banner.aspect_ratio}});class XenditChannelPropertiesChangedEvent extends Event{static type="xendit-channel-properties-changed";channel;channelProperties;constructor(e,t){super(XenditChannelPropertiesChangedEvent.type,{bubbles:!0,composed:!0}),this.channel=e,this.channelProperties=t}}class NetworkError extends Error{errorResponse;constructor(e){super(e.message),this.errorResponse=e}}function ai(e){const t=new URLSearchParams;return t.append("payload",JSON.stringify(e)),t}function oi(e,t,n){return async function(...r){let a,o,i,d,s;switch(e){case"GET":[a,o,i,s]=r;break;case"POST":[a,d,o,i,s]=r;break;default:throw new Error(`Unable to call endpoint with method ${e}; this is a bug, please contact support.`)}const l="v0.0.12";Lt(l),Lt(l.startsWith("v"));const c=a.hostId;if(c===jt)throw new Error("A network request was made in mock mode; this is a bug.");const u=Kt(c);if(!u)throw new Error(`Unknown hostId ${c} in sdkKey; this is a bug, please contact support.`);const h=new URL(t(o),u);if(n&&!i)throw new Error("Query string argument is missing; this is a bug, please contact support.");const p=n?.(i)??new URLSearchParams;p.set("components_version",l),h.search=p.toString();const f={method:e,body:d?ai(d):void 0,headers:{"Content-Type":"application/x-www-form-urlencoded"},signal:s},m=await fetch(h,f);if(!m.ok){const e=await m.json();if(!e||!e.error_code)throw new Error("Unexpected error response from server");throw new NetworkError(e)}return m.json()}}const ii=oi("GET",e=>`/api/sessions/${e}`),di=oi("POST",()=>"/api/sessions/payment_tokens"),si=oi("POST",()=>"/api/sessions/payment_requests"),li=oi("POST",e=>`/api/sessions/${e.sessionAuthKey}/payment_requests/${e.paymentRequestId}/simulate`),ci=oi("GET",e=>`/api/sessions/${e}/poll`,e=>new URLSearchParams(e?{token_request_id:e}:{})),ui=oi("POST",e=>`/api/sessions/${e}/card_info`);function hi(e,t,n){return{impl:e,key:t??"",child:n,instance:void 0}}class BehaviorTree{fn;bb;root=hi(class{});updating=!1;again=!1;constructor(e,t){this.fn=e,this.bb=t}update(){if(this.again=!0,this.updating)return;let e=0;try{for(this.updating=!0;this.again;){this.again=!1,e+=1,pi(e);const t=this.root??void 0,n=this.fn(this.bb);this.root=n,fi(t,n,this.bb,0)}}finally{this.updating=!1}}findBehavior(e){let t=this.root;for(;t;){if(t.impl===e)return t.instance?t.instance:null;t=t.child}return null}}function pi(e){if(e>32)throw new Error("Max recursion depth exceeded; this is a bug, please contact support.")}function fi(e,t,n,r){pi(r);void 0===e||void 0===t||e.impl!==t.impl||e.key!==t.key?(e&&gi(e,r+1),t&&mi(t,n,r+1)):(t&&(t.instance=e?.instance),e&&(e.instance=void 0),fi(e?.child,t?.child,n,r+1),t?.instance?.update?.())}function mi(e,t,n){pi(n),e.instance=new e.impl(t,e.key),e.instance.enter?.(),e.child&&mi(e.child,t,n+1)}function gi(e,t){pi(t),e.child&&gi(e.child,t+1),e.instance?.exit?.(),e.instance=void 0}class XenditInitEvent extends Event{static type="init";constructor(){super(XenditInitEvent.type,{})}}class XenditFatalErrorEvent extends Event{message;static type="fatal-error";constructor(e){super(XenditFatalErrorEvent.type,{}),this.message=e}}class XenditReadyEvent extends Event{channelCode;static type="submission-ready";constructor(e){super(XenditReadyEvent.type,{}),this.channelCode=e}}class XenditNotReadyEvent extends Event{static type="submission-not-ready";constructor(){super(XenditNotReadyEvent.type,{})}}class XenditSubmissionBeginEvent extends Event{static type="submission-begin";constructor(){super(XenditSubmissionBeginEvent.type,{})}}class XenditSubmissionEndEvent extends Event{reason;userErrorMessage;developerErrorMessage;static type="submission-end";constructor(e,t,n){super(XenditSubmissionEndEvent.type,{}),this.reason=e,this.userErrorMessage=t,this.developerErrorMessage=n}}class XenditActionBeginEvent extends Event{static type="action-begin";constructor(){super(XenditActionBeginEvent.type,{})}}class XenditActionEndEvent extends Event{static type="action-end";constructor(){super(XenditActionEndEvent.type,{})}}class XenditWillRedirectEvent extends Event{static type="will-redirect";constructor(){super(XenditWillRedirectEvent.type,{})}}class XenditSessionCompleteEvent extends Event{static type="session-complete";constructor(){super(XenditSessionCompleteEvent.type,{})}}class XenditSessionExpiredOrCanceledEvent extends Event{static type="session-expired-or-canceled";constructor(){super(XenditSessionExpiredOrCanceledEvent.type,{})}}class XenditPaymentRequestCreatedEvent extends Event{paymentRequestId;static type="payment-request-created";constructor(e){super(XenditPaymentRequestCreatedEvent.type,{}),this.paymentRequestId=e}}class XenditPaymentTokenCreatedEvent extends Event{paymentTokenId;static type="payment-token-created";constructor(e){super(XenditPaymentTokenCreatedEvent.type,{}),this.paymentTokenId=e}}class XenditPaymentRequestDiscardedEvent extends Event{paymentRequestId;static type="payment-request-discarded";constructor(e){super(XenditPaymentRequestDiscardedEvent.type,{}),this.paymentRequestId=e}}class XenditPaymentTokenDiscardedEvent extends Event{paymentTokenId;static type="payment-token-discarded";constructor(e){super(XenditPaymentTokenDiscardedEvent.type,{}),this.paymentTokenId=e}}var _i;function $i(e){return"payment_request_id"in e?{id:e.payment_request_id,type:_i.PaymentRequest,entity:e}:{id:e.payment_token_id,type:_i.PaymentToken,entity:e}}function yi(e,t,n){return`${e===_i.PaymentRequest?"payment_request":"payment_token"}_status.${t.toLowerCase()}.${n}`}!function(e){e.PaymentRequest="REQUEST",e.PaymentToken="TOKEN"}(_i||(_i={}));function bi(){return`session-${xi(32)}-mock-MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEyCADI5pdf6KmN8+Fxl2ES3yolUKXunNeY3gGScGNEvDcrcHAPKxIInAo5DVnDvTtYtqZvx/bu7HLeBJNMXwHhie/uyNEtT8dSaLc9bd0WSlYdxI+iUsTv2Qu0LiiPrZs-NKf7whM9meUs/eRCvG0oc180MDiyeli3kH6EQ3ZahECHsZQi5G2IpH6vk3cYMtf01Y1L4OBn1SZCOv1kwpjIUet4DJeoTwwq2nM5b+K7rD+/WFTi3AEX4NWJNkKi0a91`}function vi(){return[xi(8),xi(4),xi(4),xi(4),xi(12)].join("-")}function xi(e){Lt(e%2==0);const t=function(e){const t=new Uint8Array(e);for(let n=0;n<e;n++)t[n]=Math.floor(256*Math.random());return t}(e/2);return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}function wi(e,t){const n=t.type===_i.PaymentRequest?t.entity:void 0,r=t.type===_i.PaymentToken?t.entity:void 0;return{session:{...e,status:"COMPLETED",payment_request_id:n?.payment_request_id,payment_token_id:r?.payment_token_id},payment_request:ki(n,"SUCCEEDED"),payment_token:ki(r,"ACTIVE"),succeeded_channel:{channel_code:t.entity.channel_code,logo_url:"https://placehold.co/48"}}}function Ci(e,t){const n=t.type===_i.PaymentRequest?t.entity:void 0,r=t.type===_i.PaymentToken?t.entity:void 0;return{session:{...e,status:"ACTIVE"},payment_request:ki(n,"FAILED"),payment_token:ki(r,"FAILED")}}function ki(e,t){return e?{...e,status:t}:e}function Ei(e,t){return t?{payment_request_id:`pr-${vi()}`,status:"REQUIRES_ACTION",channel_code:e,actions:Si(t),session_token_request_id:vi()}:{payment_request_id:`pr-${vi()}`,status:"SUCCEEDED",channel_code:e,actions:[],session_token_request_id:vi()}}function Pi(e,t){return t?{payment_token_id:`pt-${vi()}`,status:"REQUIRES_ACTION",channel_code:e,actions:Si(t),session_token_request_id:vi()}:{payment_token_id:`pt-${vi()}`,status:"ACTIVE",channel_code:e,actions:[],session_token_request_id:vi()}}function Si(e){return e?[Ni(e)]:[]}function Ni(e){switch(e){case"IFRAME":return{type:"REDIRECT_CUSTOMER",descriptor:"WEB_URL",value:"https://example.com/iframe",iframe_capable:!0};case"REDIRECT":return{type:"REDIRECT_CUSTOMER",descriptor:"WEB_URL",value:"https://example.com/redirect",iframe_capable:!1};case"QR":return{type:"PRESENT_TO_CUSTOMER",descriptor:"QR_STRING",value:"https://example.com/qr-code-data",action_title:"Pay with QR Code",action_subtitle:"Scan the QR code below",action_graphic:"",instructions:null};case"BARCODE":return{type:"PRESENT_TO_CUSTOMER",descriptor:"PAYMENT_CODE",value:"1234567890",action_title:"Pay at a Store",action_subtitle:"Show this barcode to the cashier",action_graphic:"",instructions:null};case"VA":return{type:"PRESENT_TO_CUSTOMER",descriptor:"VIRTUAL_ACCOUNT_NUMBER",value:"1234567890",action_title:"Pay with Virtual Account",action_subtitle:"Protect yourself from fraud - ensure all details are correct",action_graphic:"",instructions:null}}throw new Error(`Unknown mock action type: ${e}`)}var Ti=Object.freeze({__proto__:null,makeMockActions:Si,makeOneMockAction:Ni,makeTestBffData:function(){const e=(new Date).toISOString(),t=new Date(Date.now()+2592e6).toISOString();return{session:{payment_session_id:`ps-${xi(24)}`,created:e,updated:e,status:"ACTIVE",reference_id:vi(),description:"Test session",currency:"IDR",amount:1e4,country:"ID",expires_at:t,session_type:"PAY",mode:"COMPONENTS",locale:"en",business_id:xi(24),customer_id:`cust-${vi()}`,capture_method:"AUTOMATIC",allow_save_payment_method:"OPTIONAL",items:[{reference_id:vi(),type:"DIGITAL_PRODUCT",name:"Item 1",net_unit_amount:5e4,quantity:1,category:""},{reference_id:vi(),type:"DIGITAL_SERVICE",name:"Item 2",net_unit_amount:5e4,quantity:1,category:""}]},business:{name:"Components Mock Merchant",country_of_operation:"Indonesia",merchant_profile_picture_url:"https://placehold.co/256x256.png?text=Logo"},customer:{type:"INDIVIDUAL",id:`cust-${vi()}`,email:"exa**@example.com",mobile_number:null,phone_number:null,individual_detail:{given_names:"exa********",surname:null},business_detail:null},channels:[{brand_name:"Cards",channel_code:"CARDS",brand_logo_url:"https://assets.xendit.co/payment-session/logos/CARDS.svg",ui_group:"cards",allow_pay_without_save:!0,allow_save:!0,brand_color:"#000000",min_amount:5e3,max_amount:2e8,requires_customer_details:!1,_mock_action_type:"IFRAME",card:{brands:[{name:"VISA",logo_url:"https://assets.xendit.co/payment-session/logos/VISA.svg"},{name:"MASTERCARD",logo_url:"https://assets.xendit.co/payment-session/logos/MASTERCARD.svg"},{name:"JCB",logo_url:"https://assets.xendit.co/payment-session/logos/JCB.svg"}]},form:[{group_label:"Card Details",label:"Card Number",placeholder:"1234 1234 1234 1234",type:{name:"credit_card_number"},channel_property:"card_details.card_number",required:!0,span:2},{label:"Card Expiry Date",placeholder:"MM/YY",type:{name:"credit_card_expiry"},channel_property:["card_details.expiry_month","card_details.expiry_year"],required:!0,span:1,join:!0},{label:"CVN",placeholder:"CVV",type:{name:"credit_card_cvn"},channel_property:"card_details.cvn",required:!0,span:1,join:!0},{group_label:"Cardholder Name",label:"First Name",placeholder:"First Name",type:{name:"text",min_length:1,max_length:50,regex_validators:[{regex:"/^[a-zA-Z\\u00C0-\\u017F\\s]+$/",message:"Invalid input. Please use alphabetic characters only"}]},channel_property:"card_details.cardholder_first_name",required:!0,span:1},{label:"Last Name",placeholder:"Last Name",type:{name:"text",min_length:1,max_length:50,regex_validators:[{regex:"/^[ -~]+$/",message:"Invalid input. Please use alphabetic characters only"}]},channel_property:"card_details.cardholder_last_name",required:!0,span:1},{label:"Email",placeholder:"john.doe@example.com",type:{name:"email"},channel_property:"card_details.cardholder_email",required:!0,span:2},{label:"Mobile Number",placeholder:"8000032341",type:{name:"phone_number"},channel_property:"card_details.cardholder_phone_number",required:!0,span:2},{group_label:"Billing Address",label:"First Name",placeholder:"First Name",type:{name:"text",max_length:255},channel_property:"billing_information.first_name",span:1,required:!0,flags:{require_billing_information:!0}},{label:"Last Name",placeholder:"Last Name",type:{name:"text",max_length:255},channel_property:"billing_information.last_name",span:1,required:!0,flags:{require_billing_information:!0},join:!0},{label:"Email",placeholder:"Email",type:{name:"text",max_length:255},channel_property:"billing_information.email",span:2,required:!0,flags:{require_billing_information:!0},join:!0},{label:"Country",placeholder:"Country",type:{name:"country"},channel_property:"billing_information.country",span:1,required:!0,flags:{require_billing_information:!0},join:!0},{label:"Province",placeholder:"State / Province",type:{name:"province"},channel_property:"billing_information.province_state",span:1,required:!0,flags:{require_billing_information:!0},join:!0},{label:"City",placeholder:"City",type:{name:"text",max_length:255},channel_property:"billing_information.city",span:2,required:!0,flags:{require_billing_information:!0},join:!0},{label:"Address Line 1",placeholder:"Address Line 1",type:{name:"text",max_length:255},channel_property:"billing_information.street_line1",span:2,required:!0,flags:{require_billing_information:!0},join:!0},{label:"Address Line 2",placeholder:"Address Line 2",type:{name:"text",max_length:255},channel_property:"billing_information.street_line2",span:2,required:!0,flags:{require_billing_information:!0},join:!0},{label:"Postal Code",placeholder:"Postal Code",type:{name:"postal_code"},channel_property:"billing_information.postal_code",span:2,required:!0,flags:{require_billing_information:!0},join:!0}],instructions:["Mock Cards channel","This mock channel behaves similarly to the production CARDS channel."]},{brand_name:"Mock E-Wallet Channel",channel_code:"MOCK_EWALLET",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,_mock_action_type:"REDIRECT",form:[],instructions:["Mock E-Wallet channel","This mock channel behaves similarly to production E-Wallets channels with no user input."]},{brand_name:"Mock E-Wallet Channel (Iframe action)",channel_code:"MOCK_EWALLET_IFRAME",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,_mock_action_type:"IFRAME",form:[],instructions:["Mock E-Wallet channel","This mock channel has as iframe action."]},{brand_name:"Mock E-Wallet Channel (Phone input)",channel_code:"MOCK_EWALLET_WITH_PHONE",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,_mock_action_type:"REDIRECT",form:[{label:"Phone Number",placeholder:"123 123 132",type:{name:"phone_number"},channel_property:"phone_number_field",required:!0,span:2}],instructions:["Mock E-Wallet channel","This mock channel behaves similarly to production E-Wallets channels with a phone number input."]},{brand_name:"Mock QR Channel",channel_code:"MOCK_QR",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,_mock_action_type:"QR",form:[],instructions:["Mock QR channel","This mock channel behaves similarly to production QR channels."],pm_type:"QR_CODE"},{brand_name:"Mock Direct Debit Channel",channel_code:"MOCK_DIRECT_DEBIT",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[],instructions:["Mock Direct Debit channel","This mock channel behaves similarly to production Direct Debit channels."]},{brand_name:"Mock OTC Channel",channel_code:"MOCK_OTC",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,_mock_action_type:"BARCODE",form:[{label:"Payer Name",placeholder:"Payer Name",type:{name:"text",max_length:50},channel_property:"payer_name",required:!0,span:2}],instructions:["Mock OTC channel","This mock channel behaves similarly to production OTC channels."]},{brand_name:"Input Test",channel_code:"UI_INPUT_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{label:"Card Number (Iframe)",placeholder:"1234 1234 1234 1234",type:{name:"credit_card_number"},channel_property:"card_number",required:!1,span:2},{label:"Card Expiry Date (Iframe)",placeholder:"MM/YY",type:{name:"credit_card_expiry"},channel_property:["expiry_month","expiry_year"],required:!1,span:2},{label:"CVN (Iframe)",placeholder:"CVV",type:{name:"credit_card_cvn"},channel_property:"cvn",required:!1,span:2},{label:"Text",placeholder:"Text",type:{name:"text",max_length:50},channel_property:"text_field",required:!1,span:2},{label:"Phone Number",placeholder:"123 123 123",type:{name:"phone_number"},channel_property:"phone_number_field",required:!1,span:2},{label:"Email",placeholder:"test@example.com",type:{name:"email"},channel_property:"email_field",required:!1,span:2},{label:"Postal Code",placeholder:"123456",type:{name:"postal_code"},channel_property:"postal_code_field",required:!1,span:2},{label:"Country",placeholder:"Select",type:{name:"country"},channel_property:"country_field",required:!1,span:2},{label:"Dropdown",placeholder:"Select",type:{name:"dropdown",options:[{label:"Option 1",value:"option_1"},{label:"Option 2",value:"option_2"},{label:"Option 3",value:"option_3"}]},channel_property:"dropdown_field",required:!1,span:2},{label:"Dropdown With Icons",placeholder:"Select",type:{name:"dropdown",options:[{label:"Option 1",value:"option_1",icon_url:"https://placehold.co/16"},{label:"Option 2",value:"option_2",icon_url:"https://placehold.co/16"},{label:"Option 3",value:"option_3",icon_url:"https://placehold.co/16"}]},channel_property:"dropdown_field_with_icons",required:!1,span:2}],instructions:["This test demonstrates basic usage of all input types.","All fields here are optional and blank values should pass validation."]},{brand_name:"Field Grouping Test",channel_code:"UI_FIELD_GROUPING_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{group_label:"Vertical Grouping",label:"Top",placeholder:"Top",type:{name:"text",max_length:50},channel_property:"a1",required:!1,span:2},{label:"Middle",placeholder:"Middle",type:{name:"text",max_length:50},channel_property:"a2",required:!1,span:2,join:!0},{label:"Bottom",placeholder:"Bottom",type:{name:"text",max_length:50},channel_property:"a3",required:!1,span:2,join:!0},{group_label:"Horizontal Grouping",label:"Text",placeholder:"Left",type:{name:"text",max_length:50},channel_property:"b1",required:!1,span:1},{label:"Text",placeholder:"Right",type:{name:"text",max_length:50},channel_property:"b1",required:!1,span:1,join:!0},{group_label:"Mixed Grouping",label:"Text",placeholder:"Top Left",type:{name:"text",max_length:50},channel_property:"c1",required:!1,span:1},{label:"Text",placeholder:"Top Right",type:{name:"text",max_length:50},channel_property:"c2",required:!1,span:1,join:!0},{label:"Text",placeholder:"Middle Left",type:{name:"text",max_length:50},channel_property:"c3",required:!1,span:1,join:!0},{label:"Text",placeholder:"Middle Right",type:{name:"text",max_length:50},channel_property:"c4",required:!1,span:1,join:!0},{label:"Text",placeholder:"Bottom Left",type:{name:"text",max_length:50},channel_property:"c5",required:!1,span:1,join:!0},{label:"Text",placeholder:"Bottom Right",type:{name:"text",max_length:50},channel_property:"c6",required:!1,span:1,join:!0}],instructions:["This test demonstrates field grouping.","Fields can be 1 or 2 cells wide and can be grouped in any arrangement."]},{brand_name:"Text Validation Test",channel_code:"UI_TEXT_VALIDATION_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{label:"Required Text Field",placeholder:"Required",type:{name:"text",max_length:50},channel_property:"required",required:!0,span:2},{label:"Validate Minimum Length (5)",placeholder:"Min 5 characters",type:{name:"text",min_length:5,max_length:50},channel_property:"min_5_chars",required:!1,span:2},{label:"Validate Using Regexp (/^[a-zA-Z0-9]+$/)",placeholder:"Alphanumeric only",type:{name:"text",max_length:50,regex_validators:[{regex:"/^[a-zA-Z0-9]+$/",message:"Invalid input. Please use alphanumeric characters only"}]},channel_property:"regexp_validation",required:!1,span:2}],instructions:["This test demonstrates text field validation.","Fields should validate on blur or `submit()` or `revealValidationErrors()`. Blurring a blank field does not trigger validation."]},{brand_name:"State/Province Field Test",channel_code:"UI_STATE_PROVINCE_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{group_label:"Country + State/Province Fields",label:"Country",placeholder:"Country",type:{name:"country"},channel_property:"country_field",required:!0,span:2},{label:"State / Province",placeholder:"State / Province",type:{name:"province"},channel_property:"province_field",required:!0,span:2,join:!0},{group_label:"Country + State/Province Fields (Horizontal Grouping)",label:"Country",placeholder:"Country",type:{name:"country"},channel_property:"country_field_2",required:!0,span:1},{label:"State / Province",placeholder:"State / Province",type:{name:"province"},channel_property:"province_field_2",required:!0,span:1,join:!0}],instructions:["This test demonstrates the country + state/province field combination.","Selecting certain countries (US, CA, GB) should change the state/province field to a dropdown with predefined options."]},{brand_name:"Conditional Field Test",channel_code:"UI_CONDITIONAL_FIELD_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{label:"Toggle Hidden Field",placeholder:"Select",type:{name:"dropdown",options:[{label:"Show",value:"show"},{label:"Hide",value:"hide"}]},channel_property:"toggle",required:!0,span:2},{label:"Conditional Field",placeholder:"This field is conditionally shown",type:{name:"text",max_length:50},channel_property:"conditional_field",required:!0,span:2,join:!0,display_if:[["toggle","equals","show"]]}],instructions:["This test demonstrates conditional field display based on another field's value.","The second field should only appear if 'Show' is selected in the first field."]},{brand_name:"Save Payment Details Test",channel_code:"UI_SAVE_PAYMENT_DETAILS_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!0,allow_save:!0,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[],instructions:["This channel supports both one-time payment and pay-and-save.","A checkbox should be displayed."]},{brand_name:"Paired Channels Test",channel_code:"UI_PAIRED_CHANNELS_TEST_1",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!0,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{label:"This should show if the save checkbox is unchecked",placeholder:"Unchecked",type:{name:"text",max_length:50},channel_property:"nonsave",required:!1,span:2}],instructions:["This channel does not support save, but has a paired channel that does.","Changing the save checkbox switches between the two channels."]},{brand_name:"Paired Channels Test",channel_code:"UI_PAIRED_CHANNELS_TEST_2",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!1,allow_save:!0,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{label:"This should show if the save checkbox is checked",placeholder:"Checked",type:{name:"text",max_length:50},channel_property:"save",required:!1,span:2}],instructions:["This channel can only be used for pay-and-save, but has a paired channel that supports one time payment.","Changing the save checkbox switches between the two channels."]},{brand_name:"Banner Test",channel_code:"UI_BANNER_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"ui_tests",allow_pay_without_save:!0,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,banner:{image_url:"https://placehold.co/256x32.png?text=Banner",alt_text:""},form:[],instructions:["This channel has a banner image.","It should be displayed above this text."]},{brand_name:"Single Item Test",channel_code:"GROUP_SINGLE_ITEM_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"single_item",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[],instructions:["This channel is in a group by itself.","The channel picker should automatically select it when the group is opened."]},{brand_name:"Disabled Group Test",channel_code:"GROUP_DISABLED_GROUP_TEST",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"disabled",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:999999999,max_amount:9999999999,requires_customer_details:!1,form:[],instructions:["This channel is in a disabled group.","Since all channels in this group are disabled, the group should not be selectable. You should never see this text because creating this channel will throw an error."]},{brand_name:"Partial Disabled Group (Enabled)",channel_code:"GROUP_PARTIAL_DISABLED_1",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"partial_disabled",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[],instructions:["This channel is in a partially disabled group.","This channel is enabled, but the other channel in the group is disabled. This channel should be automatically selected by the channel picker because it's the only enabled option."]},{brand_name:"Partial Disabled Group (Disabled)",channel_code:"GROUP_PARTIAL_DISABLED_2",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"partial_disabled",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:999999999,max_amount:9999999999,requires_customer_details:!1,form:[],instructions:["This channel is in a partially disabled group.","This channel is disabled. You should never see this text because creating this channel will throw an error."]}],channel_ui_groups:[{id:"cards",label:"Mock Cards",icon_url:"https://assets.xendit.co/payment-session/logos/CARDS.svg"},{id:"other",label:"Other Mock Channels",icon_url:"https://placehold.co/48x48.png?text=Logo"},{id:"ui_tests",label:"Channel UI Test Cases",icon_url:"https://placehold.co/48x48.png?text=Logo"},{id:"single_item",label:"Mock Single Item Group",icon_url:"https://placehold.co/48x48.png?text=Logo"},{id:"disabled",label:"Mock Disabled Group",icon_url:"https://placehold.co/48x48.png?text=Logo"},{id:"partial_disabled",label:"Mock Partial Disabled Group",icon_url:"https://placehold.co/48x48.png?text=Logo"}]}},makeTestPaymentRequest:Ei,makeTestPaymentToken:Pi,makeTestPollResponseForFailure:Ci,makeTestPollResponseForSuccess:wi,makeTestSdkKey:bi,withPaymentEntityStatus:ki});function Ai(e){const{url:t,mock:n,onIframeComplete:r}=e,a=we(null),o=ke(e=>{if(!a.current)return;const t=a.current.contentWindow;e.source===t&&"xendit-iframe-action-complete"===e.data?.type&&r(e.data)},[r]);return ve(()=>(window.addEventListener("message",o),()=>{window.removeEventListener("message",o)}),[o]),st("iframe",n?{ref:a,srcDoc:Ri,className:"xendit-action-iframe"}:{ref:a,src:t,className:"xendit-action-iframe"})}const Ri="\n <html>\n <head>\n <title>Xendit Mock Action Iframe</title>\n <style>\n body {\n font-family: Arial, sans-serif;\n font-size: 14px;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 12px;\n }\n p {\n margin: 0;\n }\n .buttons {\n display: flex;\n gap: 8px;\n }\n button {\n font-size: 12px;\n display: flex;\n align-items: center;\n text-align: left;\n background-color: white;\n border: 1px solid rgba(243, 243, 243);\n border-radius: 4px;\n justify-content: space-between;\n padding: 4px;\n cursor: pointer;\n }\n button:hover {\n border-color: #1762ee;\n background-color: #1762ee;\n color: white;\n }\n </style>\n </head>\n <body>\n <p>This is a mock action page.</p>\n <p>Normally, this would be a 3DS authentication page.</p>\n <p>Click a button below to simulate the result of the action.</p>\n <div class=\"buttons\">\n <button onclick=\"parent.postMessage({type: 'xendit-iframe-action-complete', mockStatus: 'success'}, '*')\">\n Simulate Success\n </button>\n <button onclick=\"parent.postMessage({type: 'xendit-iframe-action-complete', mockStatus: 'fail'}, '*')\">\n Simulate Failure\n </button>\n </div>\n </body>\n </html>\n";var Ii,Oi,Li={};function Mi(){return Oi?Ii:(Oi=1,Ii=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then})}var Di,Ui={},Bi={};function Fi(){if(Di)return Bi;let e;Di=1;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return Bi.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},Bi.getSymbolTotalCodewords=function(e){return t[e]},Bi.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},Bi.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');e=t},Bi.isKanjiModeEnabled=function(){return void 0!==e},Bi.toSJIS=function(t){return e(t)},Bi}var ji,qi,Ki,Vi,Hi,Gi={};function Wi(){return ji||(ji=1,(e=Gi).L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(e){return n}}),Gi;var e}var Yi,zi={};var Xi,Zi={};var Ji,Qi={};var ed,td={};function nd(){if(ed)return td;ed=1;const e=Wi(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return td.getBlocksCount=function(n,r){switch(r){case e.L:return t[4*(n-1)+0];case e.M:return t[4*(n-1)+1];case e.Q:return t[4*(n-1)+2];case e.H:return t[4*(n-1)+3];default:return}},td.getTotalCodewordsCount=function(t,r){switch(r){case e.L:return n[4*(t-1)+0];case e.M:return n[4*(t-1)+1];case e.Q:return n[4*(t-1)+2];case e.H:return n[4*(t-1)+3];default:return}},td}var rd,ad,od,id,dd={},sd={};function ld(){return ad||(ad=1,function(e){const t=function(){if(rd)return sd;rd=1;const e=new Uint8Array(512),t=new Uint8Array(256);return function(){let n=1;for(let r=0;r<255;r++)e[r]=n,t[n]=r,n<<=1,256&n&&(n^=285);for(let t=255;t<512;t++)e[t]=e[t-255]}(),sd.log=function(e){if(e<1)throw new Error("log("+e+")");return t[e]},sd.exp=function(t){return e[t]},sd.mul=function(n,r){return 0===n||0===r?0:e[t[n]+t[r]]},sd}();e.mul=function(e,n){const r=new Uint8Array(e.length+n.length-1);for(let a=0;a<e.length;a++)for(let o=0;o<n.length;o++)r[a+o]^=t.mul(e[a],n[o]);return r},e.mod=function(e,n){let r=new Uint8Array(e);for(;r.length-n.length>=0;){const e=r[0];for(let a=0;a<n.length;a++)r[a]^=t.mul(n[a],e);let a=0;for(;a<r.length&&0===r[a];)a++;r=r.slice(a)}return r},e.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let a=0;a<n;a++)r=e.mul(r,new Uint8Array([1,t.exp(a)]));return r}}(dd)),dd}var cd,ud={},hd={},pd={};function fd(){return cd||(cd=1,pd.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),pd}var md,gd,_d,$d={};function yd(){if(md)return $d;md=1;const e="[0-9]+";let t="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";t=t.replace(/u/g,"\\u");const n="(?:(?![A-Z0-9 $%*+\\-./:]|"+t+")(?:.|[\r\n]))+";$d.KANJI=new RegExp(t,"g"),$d.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),$d.BYTE=new RegExp(n,"g"),$d.NUMERIC=new RegExp(e,"g"),$d.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const r=new RegExp("^"+t+"$"),a=new RegExp("^"+e+"$"),o=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return $d.testKanji=function(e){return r.test(e)},$d.testNumeric=function(e){return a.test(e)},$d.testAlphanumeric=function(e){return o.test(e)},$d}function bd(){return gd||(gd=1,function(e){const t=fd(),n=yd();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,n){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!t.isValid(n))throw new Error("Invalid version: "+n);return n>=1&&n<10?e.ccBits[0]:n<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(t){return n.testNumeric(t)?e.NUMERIC:n.testAlphanumeric(t)?e.ALPHANUMERIC:n.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},e.isValid=function(e){return e&&e.bit&&e.ccBits},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(e){return n}}}(hd)),hd}function vd(){return _d||(_d=1,function(e){const t=Fi(),n=nd(),r=Wi(),a=bd(),o=fd(),i=t.getBCHDigit(7973);function d(e,t){return a.getCharCountIndicator(e,t)+4}function s(e,t){let n=0;return e.forEach(function(e){const r=d(e.mode,t);n+=r+e.getBitsLength()}),n}e.from=function(e,t){return o.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,r,i){if(!o.isValid(e))throw new Error("Invalid QR Code version");void 0===i&&(i=a.BYTE);const s=8*(t.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,r));if(i===a.MIXED)return s;const l=s-d(i,e);switch(i){case a.NUMERIC:return Math.floor(l/10*3);case a.ALPHANUMERIC:return Math.floor(l/11*2);case a.KANJI:return Math.floor(l/13);case a.BYTE:default:return Math.floor(l/8)}},e.getBestVersionForData=function(t,n){let o;const i=r.from(n,r.M);if(Array.isArray(t)){if(t.length>1)return function(t,n){for(let r=1;r<=40;r++)if(s(t,r)<=e.getCapacity(r,n,a.MIXED))return r}(t,i);if(0===t.length)return 1;o=t[0]}else o=t;return function(t,n,r){for(let a=1;a<=40;a++)if(n<=e.getCapacity(a,r,t))return a}(o.mode,o.getLength(),i)},e.getEncodedBits=function(e){if(!o.isValid(e)||e<7)throw new Error("Invalid QR Code version");let n=e<<12;for(;t.getBCHDigit(n)-i>=0;)n^=7973<<t.getBCHDigit(n)-i;return e<<12|n}}(ud)),ud}var xd,wd={};var Cd,kd,Ed,Pd,Sd,Nd,Td,Ad,Rd={};var Id,Od,Ld,Md={exports:{}};function Dd(){return Id||(Id=1,function(e){var t={single_source_shortest_paths:function(e,n,r){var a={},o={};o[n]=0;var i,d,s,l,c,u,h,p=t.PriorityQueue.make();for(p.push(n,0);!p.empty();)for(s in d=(i=p.pop()).value,l=i.cost,c=e[d]||{})c.hasOwnProperty(s)&&(u=l+c[s],h=o[s],(void 0===o[s]||h>u)&&(o[s]=u,p.push(s,u),a[s]=d));if(void 0!==r&&void 0===o[r]){var f=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(f)}return a},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],r=t;r;)n.push(r),e[r],r=e[r];return n.reverse(),n},find_path:function(e,n,r){var a=t.single_source_shortest_paths(e,n,r);return t.extract_shortest_path_from_predecessor_list(a,r)},PriorityQueue:{make:function(e){var n,r=t.PriorityQueue,a={};for(n in e=e||{},r)r.hasOwnProperty(n)&&(a[n]=r[n]);return a.queue=[],a.sorter=e.sorter||r.default_sorter,a},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t}(Md)),Md.exports}function Ud(){return Od||(Od=1,function(e){const t=bd(),n=function(){if(kd)return Cd;kd=1;const e=bd();function t(t){this.mode=e.NUMERIC,this.data=t.toString()}return t.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(e){let t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);const a=this.data.length-t;a>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,3*a+1))},Cd=t}(),r=function(){if(Pd)return Ed;Pd=1;const e=bd(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(t){this.mode=e.ALPHANUMERIC,this.data=t}return n.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){let n;for(n=0;n+2<=this.data.length;n+=2){let r=45*t.indexOf(this.data[n]);r+=t.indexOf(this.data[n+1]),e.put(r,11)}this.data.length%2&&e.put(t.indexOf(this.data[n]),6)},Ed=n}(),a=function(){if(Nd)return Sd;Nd=1;const e=bd();function t(t){this.mode=e.BYTE,this.data="string"==typeof t?(new TextEncoder).encode(t):new Uint8Array(t)}return t.getBitsLength=function(e){return 8*e},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},Sd=t}(),o=function(){if(Ad)return Td;Ad=1;const e=bd(),t=Fi();function n(t){this.mode=e.KANJI,this.data=t}return n.getBitsLength=function(e){return 13*e},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){let n;for(n=0;n<this.data.length;n++){let r=t.toSJIS(this.data[n]);if(r>=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[n]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),e.put(r,13)}},Td=n}(),i=yd(),d=Fi(),s=Dd();function l(e){return unescape(encodeURIComponent(e)).length}function c(e,t,n){const r=[];let a;for(;null!==(a=e.exec(n));)r.push({data:a[0],index:a.index,mode:t,length:a[0].length});return r}function u(e){const n=c(i.NUMERIC,t.NUMERIC,e),r=c(i.ALPHANUMERIC,t.ALPHANUMERIC,e);let a,o;d.isKanjiModeEnabled()?(a=c(i.BYTE,t.BYTE,e),o=c(i.KANJI,t.KANJI,e)):(a=c(i.BYTE_KANJI,t.BYTE,e),o=[]);return n.concat(r,a,o).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function h(e,i){switch(i){case t.NUMERIC:return n.getBitsLength(e);case t.ALPHANUMERIC:return r.getBitsLength(e);case t.KANJI:return o.getBitsLength(e);case t.BYTE:return a.getBitsLength(e)}}function p(e,i){let s;const l=t.getBestModeForData(e);if(s=t.from(i,l),s!==t.BYTE&&s.bit<l.bit)throw new Error('"'+e+'" cannot be encoded with mode '+t.toString(s)+".\n Suggested mode is: "+t.toString(l));switch(s!==t.KANJI||d.isKanjiModeEnabled()||(s=t.BYTE),s){case t.NUMERIC:return new n(e);case t.ALPHANUMERIC:return new r(e);case t.KANJI:return new o(e);case t.BYTE:return new a(e)}}e.fromArray=function(e){return e.reduce(function(e,t){return"string"==typeof t?e.push(p(t,null)):t.data&&e.push(p(t.data,t.mode)),e},[])},e.fromString=function(n,r){const a=function(e){const n=[];for(let r=0;r<e.length;r++){const a=e[r];switch(a.mode){case t.NUMERIC:n.push([a,{data:a.data,mode:t.ALPHANUMERIC,length:a.length},{data:a.data,mode:t.BYTE,length:a.length}]);break;case t.ALPHANUMERIC:n.push([a,{data:a.data,mode:t.BYTE,length:a.length}]);break;case t.KANJI:n.push([a,{data:a.data,mode:t.BYTE,length:l(a.data)}]);break;case t.BYTE:n.push([{data:a.data,mode:t.BYTE,length:l(a.data)}])}}return n}(u(n,d.isKanjiModeEnabled())),o=function(e,n){const r={},a={start:{}};let o=["start"];for(let i=0;i<e.length;i++){const d=e[i],s=[];for(let e=0;e<d.length;e++){const l=d[e],c=""+i+e;s.push(c),r[c]={node:l,lastCount:0},a[c]={};for(let e=0;e<o.length;e++){const i=o[e];r[i]&&r[i].node.mode===l.mode?(a[i][c]=h(r[i].lastCount+l.length,l.mode)-h(r[i].lastCount,l.mode),r[i].lastCount+=l.length):(r[i]&&(r[i].lastCount=l.length),a[i][c]=h(l.length,l.mode)+4+t.getCharCountIndicator(l.mode,n))}}o=s}for(let e=0;e<o.length;e++)a[o[e]].end=0;return{map:a,table:r}}(a,r),i=s.find_path(o.map,"start","end"),c=[];for(let e=1;e<i.length-1;e++)c.push(o.table[i[e]].node);return e.fromArray(function(e){return e.reduce(function(e,t){const n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)},[])}(c))},e.rawSplit=function(t){return e.fromArray(u(t,d.isKanjiModeEnabled()))}}(Rd)),Rd}function Bd(){if(Ld)return Ui;Ld=1;const e=Fi(),t=Wi(),n=function(){if(Ki)return qi;function e(){this.buffer=[],this.length=0}return Ki=1,e.prototype={get:function(e){const t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(let n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},qi=e}(),r=function(){if(Hi)return Vi;function e(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}return Hi=1,e.prototype.set=function(e,t,n,r){const a=e*this.size+t;this.data[a]=n,r&&(this.reservedBit[a]=!0)},e.prototype.get=function(e,t){return this.data[e*this.size+t]},e.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},e.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},Vi=e}(),a=(Yi||(Yi=1,function(e){const t=Fi().getSymbolSize;e.getRowColCoords=function(e){if(1===e)return[];const n=Math.floor(e/7)+2,r=t(e),a=145===r?26:2*Math.ceil((r-13)/(2*n-2)),o=[r-7];for(let e=1;e<n-1;e++)o[e]=o[e-1]-a;return o.push(6),o.reverse()},e.getPositions=function(t){const n=[],r=e.getRowColCoords(t),a=r.length;for(let e=0;e<a;e++)for(let t=0;t<a;t++)0===e&&0===t||0===e&&t===a-1||e===a-1&&0===t||n.push([r[e],r[t]]);return n}}(zi)),zi),o=function(){if(Xi)return Zi;Xi=1;const e=Fi().getSymbolSize;return Zi.getPositions=function(t){const n=e(t);return[[0,0],[n-7,0],[0,n-7]]},Zi}(),i=(Ji||(Ji=1,function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t=3,n=3,r=40,a=10;function o(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){const n=e.size;let r=0,a=0,o=0,i=null,d=null;for(let s=0;s<n;s++){a=o=0,i=d=null;for(let l=0;l<n;l++){let n=e.get(s,l);n===i?a++:(a>=5&&(r+=t+(a-5)),i=n,a=1),n=e.get(l,s),n===d?o++:(o>=5&&(r+=t+(o-5)),d=n,o=1)}a>=5&&(r+=t+(a-5)),o>=5&&(r+=t+(o-5))}return r},e.getPenaltyN2=function(e){const t=e.size;let r=0;for(let n=0;n<t-1;n++)for(let a=0;a<t-1;a++){const t=e.get(n,a)+e.get(n,a+1)+e.get(n+1,a)+e.get(n+1,a+1);4!==t&&0!==t||r++}return r*n},e.getPenaltyN3=function(e){const t=e.size;let n=0,a=0,o=0;for(let r=0;r<t;r++){a=o=0;for(let i=0;i<t;i++)a=a<<1&2047|e.get(r,i),i>=10&&(1488===a||93===a)&&n++,o=o<<1&2047|e.get(i,r),i>=10&&(1488===o||93===o)&&n++}return n*r},e.getPenaltyN4=function(e){let t=0;const n=e.data.length;for(let r=0;r<n;r++)t+=e.data[r];return Math.abs(Math.ceil(100*t/n/5)-10)*a},e.applyMask=function(e,t){const n=t.size;for(let r=0;r<n;r++)for(let a=0;a<n;a++)t.isReserved(a,r)||t.xor(a,r,o(e,a,r))},e.getBestMask=function(t,n){const r=Object.keys(e.Patterns).length;let a=0,o=1/0;for(let i=0;i<r;i++){n(i),e.applyMask(i,t);const r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(i,t),r<o&&(o=r,a=i)}return a}}(Qi)),Qi),d=nd(),s=function(){if(id)return od;id=1;const e=ld();function t(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(t){this.degree=t,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(t.length+this.degree);n.set(t);const r=e.mod(n,this.genPoly),a=this.degree-r.length;if(a>0){const e=new Uint8Array(this.degree);return e.set(r,a),e}return r},od=t}(),l=vd(),c=function(){if(xd)return wd;xd=1;const e=Fi(),t=e.getBCHDigit(1335);return wd.getEncodedBits=function(n,r){const a=n.bit<<3|r;let o=a<<10;for(;e.getBCHDigit(o)-t>=0;)o^=1335<<e.getBCHDigit(o)-t;return 21522^(a<<10|o)},wd}(),u=bd(),h=Ud();function p(e,t,n){const r=e.size,a=c.getEncodedBits(t,n);let o,i;for(o=0;o<15;o++)i=1==(a>>o&1),o<6?e.set(o,8,i,!0):o<8?e.set(o+1,8,i,!0):e.set(r-15+o,8,i,!0),o<8?e.set(8,r-o-1,i,!0):o<9?e.set(8,15-o-1+1,i,!0):e.set(8,15-o-1,i,!0);e.set(r-8,8,1,!0)}function f(t,r,a){const o=new n;a.forEach(function(e){o.put(e.mode.bit,4),o.put(e.getLength(),u.getCharCountIndicator(e.mode,t)),e.write(o)});const i=8*(e.getSymbolTotalCodewords(t)-d.getTotalCodewordsCount(t,r));for(o.getLengthInBits()+4<=i&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(0);const l=(i-o.getLengthInBits())/8;for(let e=0;e<l;e++)o.put(e%2?17:236,8);return function(t,n,r){const a=e.getSymbolTotalCodewords(n),o=d.getTotalCodewordsCount(n,r),i=a-o,l=d.getBlocksCount(n,r),c=a%l,u=l-c,h=Math.floor(a/l),p=Math.floor(i/l),f=p+1,m=h-p,g=new s(m);let _=0;const $=new Array(l),y=new Array(l);let b=0;const v=new Uint8Array(t.buffer);for(let e=0;e<l;e++){const t=e<u?p:f;$[e]=v.slice(_,_+t),y[e]=g.encode($[e]),_+=t,b=Math.max(b,t)}const x=new Uint8Array(a);let w,C,k=0;for(w=0;w<b;w++)for(C=0;C<l;C++)w<$[C].length&&(x[k++]=$[C][w]);for(w=0;w<m;w++)for(C=0;C<l;C++)x[k++]=y[C][w];return x}(o,t,r)}function m(t,n,d,s){let c;if(Array.isArray(t))c=h.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");{let e=n;if(!e){const n=h.rawSplit(t);e=l.getBestVersionForData(n,d)}c=h.fromString(t,e||40)}}const u=l.getBestVersionForData(c,d);if(!u)throw new Error("The amount of data is too big to be stored in a QR Code");if(n){if(n<u)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+u+".\n")}else n=u;const m=f(n,d,c),g=e.getSymbolSize(n),_=new r(g);return function(e,t){const n=e.size,r=o.getPositions(t);for(let t=0;t<r.length;t++){const a=r[t][0],o=r[t][1];for(let t=-1;t<=7;t++)if(!(a+t<=-1||n<=a+t))for(let r=-1;r<=7;r++)o+r<=-1||n<=o+r||(t>=0&&t<=6&&(0===r||6===r)||r>=0&&r<=6&&(0===t||6===t)||t>=2&&t<=4&&r>=2&&r<=4?e.set(a+t,o+r,!0,!0):e.set(a+t,o+r,!1,!0))}}(_,n),function(e){const t=e.size;for(let n=8;n<t-8;n++){const t=n%2==0;e.set(n,6,t,!0),e.set(6,n,t,!0)}}(_),function(e,t){const n=a.getPositions(t);for(let t=0;t<n.length;t++){const r=n[t][0],a=n[t][1];for(let t=-2;t<=2;t++)for(let n=-2;n<=2;n++)-2===t||2===t||-2===n||2===n||0===t&&0===n?e.set(r+t,a+n,!0,!0):e.set(r+t,a+n,!1,!0)}}(_,n),p(_,d,0),n>=7&&function(e,t){const n=e.size,r=l.getEncodedBits(t);let a,o,i;for(let t=0;t<18;t++)a=Math.floor(t/3),o=t%3+n-8-3,i=1==(r>>t&1),e.set(a,o,i,!0),e.set(o,a,i,!0)}(_,n),function(e,t){const n=e.size;let r=-1,a=n-1,o=7,i=0;for(let d=n-1;d>0;d-=2)for(6===d&&d--;;){for(let n=0;n<2;n++)if(!e.isReserved(a,d-n)){let r=!1;i<t.length&&(r=1==(t[i]>>>o&1)),e.set(a,d-n,r),o--,-1===o&&(i++,o=7)}if(a+=r,a<0||n<=a){a-=r,r=-r;break}}}(_,m),isNaN(s)&&(s=i.getBestMask(_,p.bind(null,_,d))),i.applyMask(s,_),p(_,d,s),{modules:_,version:n,errorCorrectionLevel:d,maskPattern:s,segments:c}}return Ui.create=function(n,r){if(void 0===n||""===n)throw new Error("No input text");let a,o,d=t.M;return void 0!==r&&(d=t.from(r.errorCorrectionLevel,t.M),a=l.from(r.version),o=i.from(r.maskPattern),r.toSJISFunc&&e.setToSJISFunction(r.toSJISFunc)),m(n,a,d,o)},Ui}var Fd,jd,qd={},Kd={};function Vd(){return Fd||(Fd=1,function(e){function t(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),6===t.length&&t.push("F","F");const n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+t.slice(0,6).join("")}}e.getOptions=function(e){e||(e={}),e.color||(e.color={});const n=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,a=e.scale||4;return{width:r,scale:r?4:a,margin:n,color:{dark:t(e.color.dark||"#000000ff"),light:t(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},e.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},e.getImageWidth=function(t,n){const r=e.getScale(t,n);return Math.floor((t+2*n.margin)*r)},e.qrToImageData=function(t,n,r){const a=n.modules.size,o=n.modules.data,i=e.getScale(a,r),d=Math.floor((a+2*r.margin)*i),s=r.margin*i,l=[r.color.light,r.color.dark];for(let e=0;e<d;e++)for(let n=0;n<d;n++){let c=4*(e*d+n),u=r.color.light;if(e>=s&&n>=s&&e<d-s&&n<d-s){u=l[o[Math.floor((e-s)/i)*a+Math.floor((n-s)/i)]?1:0]}t[c++]=u.r,t[c++]=u.g,t[c++]=u.b,t[c]=u.a}}}(Kd)),Kd}function Hd(){return jd||(jd=1,function(e){const t=Vd();e.render=function(e,n,r){let a=r,o=n;void 0!==a||n&&n.getContext||(a=n,n=void 0),n||(o=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),a=t.getOptions(a);const i=t.getImageWidth(e.modules.size,a),d=o.getContext("2d"),s=d.createImageData(i,i);return t.qrToImageData(s.data,e,a),function(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=n,t.width=n,t.style.height=n+"px",t.style.width=n+"px"}(d,o,i),d.putImageData(s,0,0),o},e.renderToDataURL=function(t,n,r){let a=r;void 0!==a||n&&n.getContext||(a=n,n=void 0),a||(a={});const o=e.render(t,n,a),i=a.type||"image/png",d=a.rendererOpts||{};return o.toDataURL(i,d.quality)}}(qd)),qd}var Gd,Wd,Yd={};function zd(){if(Gd)return Yd;Gd=1;const e=Vd();function t(e,t){const n=e.a/255,r=t+'="'+e.hex+'"';return n<1?r+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function n(e,t,n){let r=e+t;return void 0!==n&&(r+=" "+n),r}return Yd.render=function(r,a,o){const i=e.getOptions(a),d=r.modules.size,s=r.modules.data,l=d+2*i.margin,c=i.color.light.a?"<path "+t(i.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",u="<path "+t(i.color.dark,"stroke")+' d="'+function(e,t,r){let a="",o=0,i=!1,d=0;for(let s=0;s<e.length;s++){const l=Math.floor(s%t),c=Math.floor(s/t);l||i||(i=!0),e[s]?(d++,s>0&&l>0&&e[s-1]||(a+=i?n("M",l+r,.5+c+r):n("m",o,0),o=0,i=!1),l+1<t&&e[s+1]||(a+=n("h",d),d=0)):o++}return a}(s,d,i.margin)+'"/>',h='viewBox="0 0 '+l+" "+l+'"',p='<svg xmlns="http://www.w3.org/2000/svg" '+(i.width?'width="'+i.width+'" height="'+i.width+'" ':"")+h+' shape-rendering="crispEdges">'+c+u+"</svg>\n";return"function"==typeof o&&o(null,p),p},Yd}var Xd=function(){if(Wd)return Li;Wd=1;const e=Mi(),t=Bd(),n=Hd(),r=zd();function a(n,r,a,o,i){const d=[].slice.call(arguments,1),s=d.length,l="function"==typeof d[s-1];if(!l&&!e())throw new Error("Callback required as last argument");if(!l){if(s<1)throw new Error("Too few arguments provided");return 1===s?(a=r,r=o=void 0):2!==s||r.getContext||(o=a,a=r,r=void 0),new Promise(function(e,i){try{const i=t.create(a,o);e(n(i,r,o))}catch(e){i(e)}})}if(s<2)throw new Error("Too few arguments provided");2===s?(i=a,a=r,r=o=void 0):3===s&&(r.getContext&&void 0===i?(i=o,o=void 0):(i=o,o=a,a=r,r=void 0));try{const e=t.create(a,o);i(null,n(e,r,o))}catch(e){i(e)}}return Li.create=t.create,Li.toCanvas=a.bind(null,n.render),Li.toDataURL=a.bind(null,n.renderToDataURL),Li.toString=a.bind(null,function(e,t,n){return r.render(e,n)}),Li}(),Zd=mt(Xd),Jd=mt(zd());const Qd={IDR:"id",VND:"vi",BRL:"pt-BR",RUB:"ru",CZK:"cs",RON:"ro",UAH:"uk",CLP:"es-CL",COP:"es-CO",UYU:"es-UY",ARS:"es-AR",INR:"hi-IN",NPR:"hi-IN",LKR:"hi-IN",BDT:"hi-IN"},es={USD:"US$",CAD:"CA$",EUR:"€",AFN:"؋",ALL:"Lek",AMD:"֏",ARS:"AR$",AUD:"AU$",AZN:"₼",BAM:"KM",BDT:"৳",BIF:"FBu",BND:"BN$",BOB:"Bs",BRL:"R$",BWP:"P",BYN:"Br",BZD:"BZ$",CDF:"FrCD",CHF:"CHF",CLP:"CL$",CNY:"CN¥",COP:"CO$",CRC:"₡",CVE:"CV$",CZK:"Kč",DJF:"Fdj",DKK:"kr",DOP:"RD$",ERN:"Nfk",ETB:"Br",GBP:"£",GEL:"₾",GHS:"GH₵",GNF:"FG",GTQ:"Q",HKD:"HK$",HNL:"L",HUF:"Ft",IDR:"Rp",ILS:"₪",INR:"₹",IRR:"IRR",ISK:"kr",JMD:"J$",JPY:"¥",KES:"Ksh",KHR:"៛",KMF:"FC",KRW:"₩",KZT:"₸",LKR:"SL Re",MDL:"lei",MGA:"MGA",MKD:"MKD",MMK:"K",MOP:"MOP$",MUR:"₨",MXN:"MX$",MYR:"RM",MZN:"MTn",NAD:"N$",NGN:"₦",NIO:"C$",NOK:"kr",NPR:"रु",NZD:"NZ$",PAB:"B/.",PEN:"S/.",PHP:"₱",PKR:"₨",PLN:"zł",PYG:"₲",RON:"RON",RSD:"RSD",RUB:"₽",RWF:"FR",SDG:"SDG",SEK:"kr",SGD:"S$",SOS:"Ssh",THB:"฿",TOP:"T$",TRY:"TL",TTD:"TT$",TWD:"NT$",TZS:"TSh",UAH:"₴",UGX:"USh",UYU:"$U",UZS:"сум",VND:"₫",XAF:"FCFA",XOF:"CFA",ZAR:"R",ZMW:"K",ZWL:"ZWL$"},ts={ALL:"1 $",BAM:"1 $",BYN:"1 $",CZK:"1 $",DKK:"1 $",GEL:"1 $",HUF:"1 $",ISK:"1 $",IRR:"1 $",KHR:"1$",MDL:"1 $",MKD:"1 $",NOK:"1 $",PLN:"1 $",RON:"1 $",RSD:"1 $",RUB:"1$",SEK:"1 $",UZS:"1 $",VND:"1$"},ns={BHD:3,JOD:3,KWD:3,LYD:3,OMR:3,TND:3};function rs(e,t){let n="";const r=e<0,a=Qd[t]??"en",o=ns[t]??2;if(n=new Intl.NumberFormat(a,{style:"decimal",minimumFractionDigits:o,maximumFractionDigits:20}).format(Math.abs(e)),n=n.replace(/(\.|,)000?$/,""),es[t]){const e=es[t]??t;n=(ts[t]??"$1").replace("$",e).replace("1",n)}else n=t+" "+n;return r&&(n="-"+n),n}var as;!function(e){e.BARE="bare",e.PRIMARY_ROUNDED="primary-rounded",e.WHITE_ROUNDED="white-rounded"}(as||(as={}));const os=e=>{const{children:t,variant:n,type:r="button",...a}=e,o={[as.BARE]:void 0,[as.PRIMARY_ROUNDED]:"xendit-button-primary-rounded",[as.WHITE_ROUNDED]:"xendit-button-white-rounded"}[n];return st("button",{...a,className:bt(e.className,"xendit-button",o),type:r,children:t})},is=()=>{const e=.4*Math.PI,t=.4;return st("svg",{className:"xendit-button-loading-spinner",viewBox:"-0.5 -0.5 1 1",children:st("path",{d:`M ${Math.cos(e)*t} ${Math.sin(e)*t} A 0.4 0.4 0 0 0 ${Math.cos(0)*t} ${Math.sin(0)*t}`,fill:"none",stroke:"currentColor",strokeWidth:"0.1",strokeLinecap:"round"})})};function ds(e){const{amount:t,channelLogo:n,currency:r,mock:a,onAffirm:o,qrString:i,t:d,title:s}=e,[l,c]=be(!1),u=ke(()=>{c(!0),a&&o()},[a,o]),h=Ce(()=>function(e){const t=Zd.create(e),n=1,r=Jd.render(t,{margin:n}),a=(new DOMParser).parseFromString(r,"image/svg+xml").documentElement;return a.style.width="100%",a.style.height="100%",a.setAttribute("width",String(t.modules.size+2*n)),a.setAttribute("height",String(t.modules.size+2*n)),a}(i),[i]);return e.hideUi?st("div",{"data-testid":"qr-code",ref:e=>{!e||1===e.childNodes.length&&e.firstChild===h||e?.replaceChildren(h)}}):st("div",{className:"xendit-action-present-to-customer",children:[st("div",{className:"xendit-action-present-to-customer-header",children:st("div",{className:"xendit-text-20 xendit-text-semibold xendit-text-center",children:s})}),st("div",{className:"xendit-action-present-to-customer-content",children:[st("div",{className:"xendit-action-qr-content",children:[st("div",{className:"xendit-action-qr-channel-logo-container",children:st("img",{src:n,alt:"Channel Logo",className:"xendit-action-qr-channel-logo"})}),st("div",{"data-testid":"qr-code",className:"xendit-action-qr-qrcode-container",ref:e=>{!e||1===e.childNodes.length&&e.firstChild===h||e?.replaceChildren(h)}}),st("div",{className:"xendit-action-qr-amount-container",children:st("div",{className:"xendit-text-18 xendit-text-semibold xendit-text-center",children:rs(t,r)})})]}),st("hr",{className:"xendit-dotted-line"}),st("div",{children:[st(os,{variant:as.WHITE_ROUNDED,disabled:l,onClick:u,className:"xendit-button-block",children:l?st(is,{}):d("action.payment_made")}),st("p",{className:"xendit-text-12 xendit-text-secondary xendit-text-center",children:d("action.payment_confirmation_instructions")})]})]})]})}const ss=e=>{const{title:t,onClose:n,children:r}=e,a=we(!1),o=we(!1),i=we(null),d=we(null),s=ke(()=>{a.current||(a.current=!0,n())},[n]),l=ke(()=>{if(!i.current||!d.current||o.current)return;o.current=!0,d.current.animate?.(us,ls);const e=i.current.animate?.(ps,ls);e.onfinish=s},[s]);return xe(()=>{d.current?.animate?.(cs,ls),i.current?.animate?.(hs,ls)},[]),xe(()=>{e.close&&l()},[e.close,l]),st("div",{className:"xendit-dialog-backdrop",ref:d,children:st("div",{className:"xendit-dialog",ref:i,children:[st("div",{className:"xendit-dialog-header xendit-text-16 xendit-text-semibold",children:[t,st("button",{"aria-label":"Close",onClick:l,children:st(lt,{name:"x",size:20})})]}),st("div",{className:"xendit-dialog-body",children:r})]})})},ls={duration:200,easing:"ease-in-out",fill:"forwards"},cs=[{backgroundColor:"rgba(0, 0, 0, 0)"},{backgroundColor:"rgba(0, 0, 0, 0.5)"}],us=cs.slice().reverse(),hs=[{opacity:0,transform:"scale(0.9) translateY(-20px)"},{opacity:1,transform:""}],ps=hs.slice().reverse();function fs(e){const{sdk:t,title:n,onClose:r,width:a,height:o}=e,i=we(null);return xe(()=>{const e=t.createActionContainerComponent(pt);return i.current?.replaceChildren(e),()=>{t.destroyComponent(e)}},[t]),st(ss,{title:n,onClose:r,close:e.close,children:st("div",{className:"xendit-default-action-container",ref:i,style:{width:a?`calc(min(100vw - 64px, ${a}px))`:"calc(100vw - 64px)",height:o?`calc(min(100vh - 64px, ${o}px))`:void 0}})})}class ContainerActionBehavior{bb;cleanupFn=null;defaultContainerHeight=0;defaultContainerWidth=400;title="Complete your payment";constructor(e){this.bb=e}ensureHasActionContainer(){if(this.bb.sdk[pt].liveComponents.actionContainer)return()=>{this.emptyActionContainer()};let e=!1,t=!1;const n=document.createElement("div");n.setAttribute("class","xendit-default-action-container");const r={sdk:this.bb.sdk,title:this.title,width:this.defaultContainerWidth,height:this.defaultContainerHeight,onClose:()=>{e=!0,q(null,n),n.remove(),t||this.bb.sdk.abortSubmission()}};return q(y(fs,r),n),document.body.appendChild(n),a=>{a||(t=!0),e||q(y(fs,{...r,close:!0}),n)}}cleanupActionContainer(e){this.cleanupFn&&(this.cleanupFn(e),this.cleanupFn=null)}emptyActionContainer(){const e=this.bb.sdk[pt].liveComponents.actionContainer;e&&q(null,e)}populateActionContainer(e){const t=this.bb.sdk[pt].liveComponents.actionContainer;if(!t)throw new Error("Trying to populate action container, but it is missing; A default action container should have been created. This is a bug, please contact support.");q(e(),t)}exit(){this.cleanupActionContainer(!1),this.emptyActionContainer()}}class ActionCompletedBehavior{bb;constructor(e){this.bb=e}enter(){}}class ActionRedirectBehavior{bb;url;constructor(e,t){this.bb=e,this.url=t}enter(){this.bb.dispatchEvent(new XenditWillRedirectEvent),window.location.href=this.url}}class ActionIframeBehavior extends ContainerActionBehavior{bb;url;constructor(e,t){super(e),this.bb=e,this.url=t,this.defaultContainerHeight=600}enter(){this.cleanupFn=this.ensureHasActionContainer(),this.populateActionContainer(()=>y(Ai,{url:this.url,mock:this.bb.mock,onIframeComplete:e=>{this.cleanupActionContainer(!1),this.updateMocksOnIframeCompletion("success"===e.mockStatus),this.bb.actionCompleted=!0,this.bb.pollImmediatelyRequested=!0,this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent)}}))}updateMocksOnIframeCompletion(e){Lt(this.bb.world?.paymentEntity),this.bb.mock&&(e?this.bb.dispatchEvent(new InternalScheduleMockUpdateEvent(wi(this.bb.world.session,this.bb.world.paymentEntity))):this.bb.dispatchEvent(new InternalScheduleMockUpdateEvent(Ci(this.bb.world.session,this.bb.world.paymentEntity))))}}class ActionQrBehavior extends ContainerActionBehavior{bb;actionIndex;constructor(e,t){super(e),this.bb=e,this.actionIndex=t}enter(){const e=this.bb.world?.paymentEntity?.entity.actions[Number(this.actionIndex)];Mt(e?.type,"PRESENT_TO_CUSTOMER"),Lt(this.bb.world),Lt(this.bb.channel);const t=this.bb.sdk[pt].liveComponents.actionContainer,n={amount:this.bb.world.session.amount,channelLogo:this.bb.channel.brand_logo_url,currency:this.bb.world.session.currency,hideUi:"true"===t?.getAttribute("data-qr-code-only")||!1,mock:this.bb.mock,onAffirm:this.affirmPayment.bind(this),qrString:e.value,t:this.bb.sdk.t.bind(this.bb.sdk),title:e.action_subtitle};this.title=e.action_title,this.cleanupFn=this.ensureHasActionContainer(),this.populateActionContainer(()=>y(ds,n))}affirmPayment(){this.bb.mock?this.updateMocksOnSimulatePaymentCompletion():"pl"===this.bb.sdkKey.hostId?this.bb.pollImmediatelyRequested=!0:this.bb.simulatePaymentRequested=!0}updateMocksOnSimulatePaymentCompletion(){Lt(this.bb.world?.paymentEntity),this.bb.mock&&this.bb.dispatchEvent(new InternalScheduleMockUpdateEvent(wi(this.bb.world.session,this.bb.world.paymentEntity)))}}class CardInfoBehavior{bb;channelCode;cardDetailsRequest=null;constructor(e,t){this.bb=e,this.channelCode=t}enter(){this.lookupCardDetails()}update(){this.lookupCardDetails()}exit(){this.abortLookupCardDetails()}abortLookupCardDetails(){this.cardDetailsRequest&&(this.cardDetailsRequest.abortController.abort(new AbortError),this.cardDetailsRequest=null)}lookupCardDetails(){const e=function(e){const t=Qt("card_details.card_number",e);return"string"!=typeof t?null:t}(this.bb.channelProperties);if(!e)return;if(this.cardDetailsRequest?.cardNumber===e)return;if(this.bb.channelData?.cardDetails?.cardNumber===e)return;this.cardDetailsRequest&&this.abortLookupCardDetails();const t=new AbortController,n=Bt(300,t.signal).then(()=>{if(this.bb.mock){const t=e.split("-")[5];try{return JSON.parse(atob(t))}catch{}return{schemes:["VISA"],country_codes:["ID"],require_billing_information:!1}}{const n=e.split("-").slice(0,6).join("-");return ui(this.bb.sdkKey,{card_number:n},this.bb.sdkKey.sessionAuthKey,void 0,t.signal)}}).then(t=>{this.bb.dispatchEvent(new InternalUpdateChannelComponentData(this.channelCode,{cardDetails:{cardNumber:e,details:t}}))}).catch(e=>{if(!Ut(e))throw e});this.cardDetailsRequest={cardNumber:e,promise:n,abortController:t}}}class ChannelValidBehavior{bb;lastChannelCode=null;constructor(e){this.bb=e}enter(){this.sendReadyEventIfChanged()}update(){this.sendReadyEventIfChanged()}sendReadyEventIfChanged(){const e=this.bb.channel?.channel_code??null;e&&e!==this.lastChannelCode&&(this.bb.dispatchEvent(new XenditReadyEvent(e)),this.lastChannelCode=e)}exit(){this.bb.dispatchEvent(new XenditNotReadyEvent)}}class ChannelInvalidBehavior{bb;channelCode;constructor(e,t){this.bb=e,this.channelCode=t}enter(){}}class PollWorker{sdkKey;sdk;sessionTokenRequestId;onPollResult;started=!1;stopped=!1;constructor(e,t,n,r){this.sdkKey=e,this.sdk=t,this.sessionTokenRequestId=n,this.onPollResult=r}async start(){if(this.stopped)throw new Error("PollWorker has been stopped, make a new instance instead of calling start again");this.started=!0;for await(const e of async function*(e,t,n=2){yield 0;let r=e;for(let e=1;e<t;e++)r*=n,await Dt(r),yield e}(5e3,100,1.06)){if(this.stopped)return;let e;if(this.sdk.isMock()){if(!(this.sdk instanceof XenditComponentsTest&&this.sdk.nextMockUpdate))continue;await Dt(Ot),e=this.sdk.nextMockUpdate,this.sdk.nextMockUpdate=null}else try{e=await ci(this.sdkKey,this.sdkKey.sessionAuthKey,this.sessionTokenRequestId)}catch(e){continue}if(this.stopped)return;if(!e.session)throw new Error("Session is not defined");let t=null;e.payment_token?t=$i(e.payment_token):e.payment_request&&(t=$i(e.payment_request)),this.onPollResult(e,t),await Dt(1)}}isPolling(){return this.started&&!this.stopped}stop(){this.started=!1,this.stopped=!0}}class PePendingBehavior{bb;pollWorker;constructor(e){this.bb=e,this.pollWorker=new PollWorker(this.bb.sdkKey,this.bb.sdk,this.bb.world?.sessionTokenRequestId??null,this.onPollResult)}enter(){if(this.bb.mock)switch(Lt(this.bb.world?.paymentEntity),this.bb.world?.paymentEntity.entity.status){case"ACTIVE":case"AUTHORIZED":case"SUCCEEDED":this.bb.dispatchEvent(new InternalScheduleMockUpdateEvent(wi(this.bb.world.session,this.bb.world.paymentEntity)));break;case"FAILED":case"CANCELED":case"EXPIRED":this.bb.dispatchEvent(new InternalScheduleMockUpdateEvent(Ci(this.bb.world.session,this.bb.world.paymentEntity)))}this.pollWorker.start()}exit(){this.pollWorker.stop()}onPollResult=(e,t)=>{this.bb.dispatchEvent(new InternalUpdateWorldState({session:e.session,paymentEntity:t??void 0,succeededChannel:e.succeeded_channel??null}))}}class PeRequiresActionBehavior{bb;pollWorker=null;canCreateActionContainer=!0;constructor(e){this.bb=e,this.resetPolling()}enter(){this.bb.dispatchEvent(new XenditActionBeginEvent),this.canCreateActionContainer=!1,this.pollWorker?.start()}update(){this.bb.pollImmediatelyRequested&&(this.bb.pollImmediatelyRequested=!1,this.resetPolling())}exit(){this.pollWorker?.stop(),this.bb.dispatchEvent(new XenditActionEndEvent),this.bb.actionCompleted=!1}onPollResult=(e,t)=>{this.bb.dispatchEvent(new InternalUpdateWorldState({session:e.session,paymentEntity:t??void 0,succeededChannel:e.succeeded_channel??null}))};resetPolling(){const e=this.pollWorker?.isPolling()??!1;this.pollWorker?.stop(),this.pollWorker=new PollWorker(this.bb.sdkKey,this.bb.sdk,this.bb.world?.sessionTokenRequestId??null,this.onPollResult),e&&this.pollWorker.start()}}class PeFailedBehavior{bb;constructor(e){this.bb=e}enter(){this.bb.submissionRequested=!1,this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent)}}class SdkLoadingBehavior{bb;constructor(e){this.bb=e}enter(){}}class SdkActiveBehavior{bb;constructor(e){this.bb=e}enter(){this.bb.dispatchEvent(new XenditInitEvent),this.bb.dispatchEvent(new InternalNeedsRerenderEvent)}exit(){this.bb.dispatchEvent(new InternalNeedsRerenderEvent)}}class SdkFatalErrorBehavior{bb;constructor(e){this.bb=e}enter(){this.bb.dispatchEvent(new XenditFatalErrorEvent(this.bb.sdkFatalErrorMessage??"Unknown error"))}}class SessionActiveBehavior{bb;constructor(e){this.bb=e}enter(){this.bb.dispatchEvent(new InternalNeedsRerenderEvent)}exit(){this.bb.dispatchEvent(new InternalNeedsRerenderEvent)}}class SessionCompletedBehavior{bb;constructor(e){this.bb=e}enter(){this.bb.dispatchEvent(new XenditSessionCompleteEvent)}}class SessionFailedBehavior{bb;constructor(e){this.bb=e}enter(){Lt(this.bb.world?.session),this.bb.dispatchEvent(new XenditSessionExpiredOrCanceledEvent)}}class SimulatePaymentBehavior{bb;exited=!1;simulationRequest=null;constructor(e){this.bb=e}enter(){this.simulatePayment()}exit(){this.exited=!0,this.bb.simulatePaymentRequested=!1,this.abortSimulation()}abortSimulation(){this.simulationRequest&&(this.simulationRequest.abortController.abort(new AbortError),this.simulationRequest=null)}simulatePayment(){if(this.simulationRequest&&this.abortSimulation(),!this.bb.channel)throw new Error("Channel is missing");if(!this.bb.world?.paymentEntity)throw new Error("Payment entity is missing");if(this.bb.world?.paymentEntity?.type!==_i.PaymentRequest)throw new Error("Payment entity is not a payment request");const e=this.bb.world?.paymentEntity.id,t=this.bb.channel?.channel_code;if(this.bb.mock)throw new Error("Simulate payment not supported for mock mode");const n=new AbortController,r=li(this.bb.sdkKey,{channel_code:t},{sessionAuthKey:this.bb.sdkKey.sessionAuthKey,paymentRequestId:e},void 0,n.signal).then(()=>{this.bb.actionCompleted=!0,this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent)}).catch(e=>{Ut(e)||this.exited||(this.bb.simulatePaymentRequested=!1,console.error("Simulate Payment failed:",e))});this.simulationRequest={promise:r,abortController:n}}}class SubmissionBehavior{bb;exited=!1;submission=null;submissionError=null;constructor(e){this.bb=e}enter(){this.bb.dispatchEvent(new XenditSubmissionBeginEvent),this.bb.dispatchEvent(new InternalScheduleMockUpdateEvent(null)),this.submit()}exit(){this.exited=!0,Lt(this.bb.world?.session);const e=this.bb.sdk.t,t=this.bb.world.paymentEntity;if("COMPLETED"!==this.bb.world.session.status&&t){switch(t.type){case _i.PaymentRequest:this.bb.dispatchEvent(new XenditPaymentRequestDiscardedEvent(t.id));break;case _i.PaymentToken:this.bb.dispatchEvent(new XenditPaymentTokenDiscardedEvent(t.id))}this.bb.dispatchEvent(new InternalUpdateWorldState({paymentEntity:null,sessionTokenRequestId:null}))}let n,r,a;"ACTIVE"!==this.bb.world.session.status?n=`SESSION_${this.bb.world.session.status}`:!t||"FAILED"!==t.entity.status&&"CANCELED"!==t.entity.status&&"EXPIRED"!==t.entity.status?this.submissionError?(n="REQUEST_FAILED",this.submissionError instanceof NetworkError?(r=[this.submissionError.errorResponse.error_content?.title,this.submissionError.errorResponse.error_content?.message_1,this.submissionError.errorResponse.error_content?.message_2].filter(e=>void 0!==e),a={type:"ERROR",code:this.submissionError.errorResponse.error_code||"UNKNOWN"}):(r=function(e){return[e("default_error.title"),e("default_error.message_1"),e("default_error.message_2")]}(e),a={type:"NETWORK_ERROR",code:"NETWORK_ERROR"})):n=this.submission?"REQUEST_ABORTED":"ACTION_ABORTED":(n=`PAYMENT_${t.type}_${t.entity.status}`,r=function(e,t,n,r){const a=e(yi(t,n,"title")),o=r?e(function(e){return`failure_code.${e.toLowerCase()}`}(r),e("failure_code_unknown",{failureCode:r})):e(yi(t,n,"subtext"));return[a,o]}(e,t.type,t.entity.status,t.entity.failure_code),a={type:"FAILURE",code:t.entity.failure_code??"UNKNOWN"}),this.bb.dispatchEvent(new XenditSubmissionEndEvent(n,r,a)),this.submission&&(this.submission?.abortController.abort(new AbortError),this.submission=null),this.bb.submissionRequested=!1,this.bb.dispatchEvent(new InternalNeedsRerenderEvent)}submit(){if(!this.bb.world?.session||!this.bb.channel)throw new Error("Session object missing");const e="OPTIONAL"===this.bb.world.session.allow_save_payment_method&&this.bb.channel?.allow_save,t=this.bb.world?.session?.session_type,n=this.bb.channel.channel_code,r=this.bb.channel._mock_action_type,a=this.bb.channelProperties??{},o=new AbortController,i=async function(e,t,n,r,a,o,i,d){let s;if(t)switch(n){case"PAY":await Bt(Ot,i.signal),s=Ei(r,a);break;case"SAVE":await Bt(Ot,i.signal),s=Pi(r,a);break;default:throw new Error(`The session type ${n} is not supported.`)}else switch(n){case"PAY":s=await si(e,{session_id:e.sessionAuthKey,channel_code:r,channel_properties:o,save_payment_method:d},null,null,i.signal);break;case"SAVE":s=await di(e,{session_id:e.sessionAuthKey,channel_code:r,channel_properties:o},null,null,i.signal);break;default:throw new Error(`The session type ${n} is not supported.`)}return $i(s)}(this.bb.sdkKey,this.bb.mock,t,n,r,a,o,e?this.bb.channelData?.savePaymentMethod??!1:void 0).then(e=>{switch(this.submission=null,e.type){case _i.PaymentRequest:this.bb.dispatchEvent(new XenditPaymentRequestCreatedEvent(e.id));break;case _i.PaymentToken:this.bb.dispatchEvent(new XenditPaymentTokenCreatedEvent(e.id))}this.bb.dispatchEvent(new InternalUpdateWorldState({paymentEntity:e,sessionTokenRequestId:e.entity.session_token_request_id}))}).catch(e=>{Ut(e)||(console.error("Submission failed:",e),this.exited||(this.bb.submissionRequested=!1,this.submissionError=e,this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent)))});this.submission={abortController:o,promise:i}}}function ms(e){switch(e.sdkStatus){case"LOADING":return hi(SdkLoadingBehavior);case"ACTIVE":if(!e.world?.session)throw new Error("Session is required when SDK is active");return hi(SdkActiveBehavior,"active",function(e){if(!e.world?.session)throw new Error("Session is required to create behavior tree for session");switch(e.world.session.status){case"ACTIVE":return hi(SessionActiveBehavior,"active",e.submissionRequested?function(e){if(!e.world)throw new Error("SDK not initialized in behaviorTreeForSubmission");return hi(SubmissionBehavior,"submission",e.world.paymentEntity&&null!==e.world.sessionTokenRequestId?function(e){if(!e.world?.paymentEntity)throw new Error("Payment entity is required to create behavior tree for payment entity");switch(e.world.paymentEntity.entity.status){case"PENDING":return hi(PePendingBehavior);case"REQUIRES_ACTION":return hi(PeRequiresActionBehavior,e.world.paymentEntity.id,function(e){if(!e.world?.paymentEntity)throw new Error("Payment entity is missing");if(!e.world.paymentEntity.entity.actions.length)throw new Error("No actions available while in ACTION_REQUIRED state");if(e.actionCompleted)return hi(ActionCompletedBehavior);if(e.simulatePaymentRequested)return hi(SimulatePaymentBehavior);const t=Ft(e.world.paymentEntity.entity.actions),n=e.world.paymentEntity.entity.actions.indexOf(t);switch(t.type){case"REDIRECT_CUSTOMER":switch(t.descriptor){case"WEB_URL":return function(e){return"REDIRECT_CUSTOMER"===e.type&&!1!==e.iframe_capable}(t)?hi(ActionIframeBehavior,t.value):hi(ActionRedirectBehavior,t.value);case"DEEPLINK_URL":case"WEB_GOOGLE_PAYLINK":throw new Error(`Unsupported action type ${t.type} ${t.descriptor}`)}break;case"PRESENT_TO_CUSTOMER":switch(t.descriptor){case"QR_STRING":return hi(ActionQrBehavior,String(n));case"PAYMENT_CODE":case"VIRTUAL_ACCOUNT_NUMBER":throw new Error(`Unsupported action type ${t.type} ${t.descriptor}`)}break;case"API_POST_REQUEST":switch(t.descriptor){case"CAPTURE_PAYMENT":case"VALIDATE_OTP":case"RESEND_OTP":throw new Error(`Unsupported action type ${t.type} ${t.descriptor}`)}}throw new Error(`Unknown action type: ${t.type} ${t.descriptor}`)}(e));case"FAILED":case"EXPIRED":case"CANCELED":return hi(PeFailedBehavior);case"ACCEPTING_PAYMENTS":throw new Error("Status ACCEPTING_PAYMENTS should not happen");case"AUTHORIZED":case"ACTIVE":case"SUCCEEDED":return hi(PePendingBehavior,e.world.paymentEntity.id);default:throw e.world.paymentEntity.entity,new Error(`Unknown payment entity status: ${e.world.paymentEntity.entity.status}`)}}(e):void 0)}(e):function(e){if(!e.channel||!e.world?.session)return;const t=e.channelData?.cardDetails?.details?.require_billing_information??!1,n=function(e,t,n,r){n||(n={});for(const a of Ho(e,t.form,r))if(To(a,n))return!1;return!0}(e.world.session.session_type,e.channel,e.channelProperties??null,t),r=hi(n?ChannelValidBehavior:ChannelInvalidBehavior);return"CARDS"===e.channel.channel_code?hi(CardInfoBehavior,e.channel.channel_code,r):r}(e));case"COMPLETED":return hi(SessionCompletedBehavior);case"EXPIRED":case"CANCELED":return hi(SessionFailedBehavior,e.world.session.status);default:throw e.world.session.status,new Error(`Unknown session status: ${e.world.session.status}`)}}(e));case"FATAL_ERROR":return hi(SdkFatalErrorBehavior);default:throw e.sdkStatus,new Error(`Unknown SDK status: ${e.sdkStatus}`)}}class XenditComponents extends EventTarget{t=e=>{throw new Error("Localization used before initialization; this is a bug.")};[pt];constructor(e){if(super(),"undefined"==typeof window||"undefined"==typeof document)throw new Error("XenditComponents can only be instantiated in a browser");const t=function(e){if(!e)throw new Error("The componentsSdkKey option is missing; check the constructor parameters.");const t=e.split("-");if(t.length<4||t[2]!==jt&&null===Kt(t[2]))throw new Error("The componentsSdkKey option has the wrong format. Ensure you pass the value returned from the `components_sdk_key` property of the `POST /sessions` response.");return{sessionAuthKey:[t[0],t[1]].join("-"),hostId:t[2],publicKey:t[3],signature:t[4]}}(e.componentsSdkKey);this[pt]={sdkKey:t,options:e,worldState:null,liveComponents:{channelPicker:null,paymentChannels:new Map,actionContainer:null},behaviorTree:new BehaviorTree(ms,{sdk:this,sdkKey:t,mock:this.isMock(),sdkStatus:"LOADING",sdkFatalErrorMessage:null,channel:null,channelProperties:null,channelData:null,dispatchEvent:this.dispatchEvent.bind(this),world:null,submissionRequested:!1,simulatePaymentRequested:!1,actionCompleted:!1,pollImmediatelyRequested:!1}),currentChannelCode:null,eventListenersPresent:new Map},an(this),this.addEventListener("fatal-error",e=>{const t=e;this[pt].eventListenersPresent.get("fatal-error")||console.error(`XenditComponents: A "fatal-error" event occurred but no event listener was attached: ${t.message}`)}),this[pt].eventListenersPresent.set("fatal-error",!1),this.behaviorTreeUpdate(),this.addEventListener(InternalUpdateWorldState.type,this.onUpdateWorldState.bind(this)),this.addEventListener(InternalUpdateChannelComponentData.type,this.onUpdateChannelComponentData.bind(this)),this.addEventListener(InternalBehaviorTreeUpdateEvent.type,this.behaviorTreeUpdate.bind(this));let n=!1;this.addEventListener(InternalNeedsRerenderEvent.type,()=>{n||(n=!0,queueMicrotask(()=>{n=!1,this.rerenderAllComponents(),this.syncInertAttribute()}))}),this.initializeAsync()}async initializeAsync(){let e;try{e=await ii(this[pt].sdkKey,this[pt].sdkKey.sessionAuthKey),e.channels=e.channels.filter(e=>on[e.channel_code])}catch(e){return this[pt].behaviorTree.bb.sdkStatus="FATAL_ERROR",this[pt].behaviorTree.bb.sdkFatalErrorMessage=Zt(e),void this.behaviorTreeUpdate()}this.dispatchEvent(new InternalUpdateWorldState({business:e.business,customer:e.customer,session:e.session,channels:e.channels,channelUiGroups:e.channel_ui_groups,paymentEntity:null,sessionTokenRequestId:null,succeededChannel:null}))}assertInitialized(){if(!this[pt].worldState)throw new Error("The session data is not loaded. Listen for the `init` event. Only `createChannelPickerComponent` can be called before initialization.")}isMock(){return!1}findChannel(e){this.assertInitialized();return this[pt].worldState.channels.find(t=>t.channel_code===e)??null}onUpdateWorldState(e){const t=e.data;this[pt].worldState=Vt(this[pt].worldState??{},t);const n=this[pt].worldState.session.locale,r=(e=>{const t=xo();return t.init({lng:e,fallbackLng:"en",supportedLngs:["en","id","th","vi"],debug:!1,defaultNS:"session",interpolation:{escapeValue:!1},resources:{en:wo,id:Co,th:ko,vi:Eo}}),t})(n);this.t=r.getFixedT(n,"session"),this.behaviorTreeUpdate(),this.rerenderAllComponents()}onUpdateChannelComponentData(e){const t=e.channelCode,n=e.data,r=this[pt].liveComponents.paymentChannels.get(t);r&&(r.data=Vt(r.data,n),this.behaviorTreeUpdate(),this.rerenderAllComponents())}behaviorTreeUpdate(){const e=this[pt].behaviorTree.bb;"LOADING"===e.sdkStatus&&this[pt].worldState&&(e.sdkStatus="ACTIVE"),e.world=this[pt].worldState;const t=this[pt].currentChannelCode?this[pt].liveComponents.paymentChannels.get(this[pt].currentChannelCode):null;e.channel=t?nn(t.channel[pt],t.data.savePaymentMethod):null,e.channelProperties=t?t.channelProperties:null,e.channelData=t?t.data:null;try{this[pt].behaviorTree.update()}catch(e){this[pt].behaviorTree.bb.sdkStatus="FATAL_ERROR",this[pt].behaviorTree.bb.sdkFatalErrorMessage=Zt(e),this[pt].behaviorTree.update()}}getSdkStatus(){return this[pt].behaviorTree.bb.sdkStatus}rerenderAllComponents(){this.renderChannelPicker();for(const e of this[pt].liveComponents.paymentChannels.keys())this.renderPaymentChannel(e)}getSession(){return this.assertInitialized(),cn(this[pt].worldState.session)}getCustomer(){return this.assertInitialized(),this[pt].worldState.customer?(Mt((e=this[pt].worldState.customer).type,"INDIVIDUAL"),Lt(e.individual_detail),{id:e.id,type:e.type,email:e.email??void 0,mobileNumber:e.mobile_number??void 0,individualDetail:{givenNames:e.individual_detail.given_names??void 0,surname:e.individual_detail.surname??void 0}}):null;var e}getActiveChannelGroups(e){return this.assertInitialized(),function(e,t,n){const r=fn(t),a=gn(e,n);return t.filter(e=>a[e.id]?.length).map(e=>un(e,a,r,n))}(this[pt].worldState.channels,this[pt].worldState.channelUiGroups,{options:{filter:e?.filter,filterMinMax:e?.filterMinMax??!0},session:this[pt].worldState.session,pairChannels:_n(this[pt].worldState.channels)})}getActiveChannels(e){return this.assertInitialized(),function(e,t,n){const r=fn(t),a=gn(e,n);return e.filter(e=>mn(e,n)).map(e=>pn(e,a,r,n))}(this[pt].worldState.channels,this[pt].worldState.channelUiGroups,{options:{filter:e?.filter,filterMinMax:e?.filterMinMax??!0},session:this[pt].worldState.session,pairChannels:_n(this[pt].worldState.channels)})}createChannelPickerComponent(){this[pt].liveComponents.channelPicker&&this.destroyComponent(this[pt].liveComponents.channelPicker);const e=document.createElement("xendit-channel-picker");return e.setAttribute("translate","no"),this[pt].liveComponents.channelPicker=e,this[pt].worldState&&this.renderChannelPicker(),this.setupUiEventsForChannelPicker(e),e}renderChannelPicker(){this.assertInitialized();const e=this[pt].liveComponents.channelPicker;e&&q(y(It,{data:this[pt].worldState,sdk:this,children:y(bn,{})}),e)}setupUiEventsForChannelPicker(e){e.addEventListener(XenditClearCurrentChannelEvent.type,e=>{this.assertInitialized();const t=e,n=this[pt].currentChannelCode;if(!n)return;const r=this[pt].worldState.channels.find(e=>e.channel_code===n);r&&r.ui_group===t.uiGroup&&this.setCurrentChannel(null)})}createChannelComponent(e,t=!0){if(this.assertInitialized(),!rn(this[pt].worldState.session,e[pt][0]))throw new Error("Cannot create channel component: `session.amount` is outside of the channel's min/max amount.");const n=e[pt][0].channel_code;t&&(this[pt].currentChannelCode=n);const r=this[pt].liveComponents.paymentChannels.get(n);let a,o={current:null};return r?(a=r.element,o=r.channelFormRef):(a=document.createElement("xendit-payment-channel"),a.setAttribute("data-channel-code",n),a.setAttribute("inert",""),a.setAttribute("translate","no"),this.setupUiEventsForPaymentChannel(a),this[pt].liveComponents.paymentChannels.set(n,{element:a,channel:e,channelProperties:null,channelFormRef:o,data:{savePaymentMethod:!1,cardDetails:null,paymentOptions:null}})),this.renderPaymentChannel(n),t&&(this.behaviorTreeUpdate(),this.syncInertAttribute()),this.dispatchEvent(new InternalNeedsRerenderEvent),a}renderPaymentChannel(e){this.assertInitialized();const t=this[pt].liveComponents.paymentChannels.get(e);if(!t)return;const n=t.channel;q(y(It,{data:this[pt].worldState,sdk:this,children:y(ni,{channelOrPair:n[pt],channelData:t.data,savePaymentMethod:t.data.savePaymentMethod,formRef:t.channelFormRef})}),t.element)}getCurrentChannel(){const e=this[pt].currentChannelCode;return e?this.getActiveChannels().find(t=>{if(t.channelCode===e||Array.isArray(t.channelCode)&&t.channelCode.includes(e))return!0})??null:null}setCurrentChannel(e){const t=this[pt].currentChannelCode,n=e?.[pt][0].channel_code??null;if(t===n)return;this[pt].currentChannelCode=n;let r=null;e&&n&&(r=this[pt].liveComponents.paymentChannels.get(n)??null,r||(this.createChannelComponent(e,!1),r=this[pt].liveComponents.paymentChannels.get(n)??null)),this.behaviorTreeUpdate(),this.syncInertAttribute(),this.renderChannelPicker()}syncInertAttribute(){const e=this[pt].behaviorTree.bb.submissionRequested,t=this[pt].liveComponents.paymentChannels;for(const[n,r]of t){(Array.isArray(r.channel.channelCode)?r.channel.channelCode[0]:r.channel.channelCode)!==this[pt].currentChannelCode||e?r.element.setAttribute("inert",""):r.element.hasAttribute("inert")&&r.element.removeAttribute("inert")}}setupUiEventsForPaymentChannel(e){e.addEventListener(XenditChannelPropertiesChangedEvent.type,e=>{const t=e,n=t.channel,r=this[pt].liveComponents.paymentChannels.get(n);r&&(r.channelProperties=t.channelProperties,this.behaviorTreeUpdate())})}showValidationErrors(){if(!this[pt].behaviorTree.findBehavior(ChannelInvalidBehavior))return;const e=this[pt].currentChannelCode;if(!e)return;const t=this[pt].liveComponents.paymentChannels.get(e);if(!t)throw new Error("Current channel is set but component is missing; this is a bug, please contact support.");const n=t.channelFormRef.current;n?.setAllFieldsTouched()}createActionContainerComponent(e){this.assertInitialized(),this[pt].liveComponents.actionContainer&&this.destroyComponent(this[pt].liveComponents.actionContainer);const t=e===pt,n=t?void 0:e,r=this[pt].behaviorTree.findBehavior(PeRequiresActionBehavior);if(!t&&r&&!r.canCreateActionContainer)throw new Error("Unable to create action container; there is an action in progress. Create an action before or during the `action-begin` event.");const a=document.createElement("xendit-action-container");return a.setAttribute("translate","no"),n?.qrCode&&void 0!==n.qrCode.qrCodeOnly&&a.setAttribute("data-qr-code-only",n.qrCode.qrCodeOnly.toString()),this[pt].liveComponents.actionContainer=a,a}destroyComponent(e){if(!e.tagName.startsWith("XENDIT-"))throw new Error("Unable to destroy component; only elements created by this SDK can be destroyed.");if(this[pt].liveComponents.channelPicker===e)return this[pt].liveComponents.channelPicker=null,q(null,e),void e.remove();for(const[t,n]of this[pt].liveComponents.paymentChannels)if(n.element===e)return this[pt].liveComponents.paymentChannels.delete(t),this[pt].currentChannelCode===t&&this.setCurrentChannel(null),q(null,e),void e.remove();if(this[pt].liveComponents.actionContainer===e)return this[pt].liveComponents.actionContainer=null,q(null,e),void e.remove();throw new Error("Unable to destroy component; component not found. It may have already been destroyed.")}submit(){this.assertInitialized();if(!this[pt].behaviorTree.findBehavior(SessionActiveBehavior))throw new Error("Unable to submit; the session is not in the active state. Listen to the `session-complete` and `session-expired-or-canceled` events and display success or failure states accordingly.");const e=this[pt].currentChannelCode;if(!e)throw new Error("Unable to submit; there is no current payment channel. Create a payment component with `createChannelComponent` or make an existing one active with `setCurrentChannel`.");if(!this[pt].liveComponents.paymentChannels.get(e))throw new Error("Current channel is set but component is missing; this is a bug, please contact support.");this.showValidationErrors();if(this[pt].behaviorTree.findBehavior(ChannelInvalidBehavior))throw new Error("Unable to submit; the form for the current channel has errors. Listen to the `submission-ready` and `submission-not-ready` events, do not allow submission while in the not-ready state.");if(!this[pt].behaviorTree.findBehavior(ChannelValidBehavior))throw new Error("Unable to submit; the SDK is not in a valid state for submission. Listen to the `submission-ready` and `submission-not-ready` events, do not allow submission while in the not-ready state.");this[pt].behaviorTree.bb.submissionRequested=!0,this.behaviorTreeUpdate(),this.syncInertAttribute()}abortSubmission(){this.assertInitialized();this[pt].behaviorTree.findBehavior(SubmissionBehavior)&&(this[pt].behaviorTree.bb.submissionRequested=!1,this.behaviorTreeUpdate())}simulatePayment(){if(this.assertInitialized(),"PAY"!==this[pt].worldState.session.session_type)throw new Error('Unable to simulate payment, the session type is not "PAY".');if(!this[pt].behaviorTree.findBehavior(PeRequiresActionBehavior))throw new Error("Unable to simulate payment; there is no action in progress. You can simulate payments any time between the `action-begin` and `action-end` events.");const e=this[pt].worldState.paymentEntity;if(!e)throw new Error("The PeRequiresActionBehavior is present but there is no payment entity. This is a bug, please contact support.");const t=this.findChannel(e.entity.channel_code);if(!t)throw new Error("Channel not found; this is a bug, please contact support.");if(!function(e){switch(e.pm_type){case"QR_CODE":case"VIRTUAL_ACCOUNT":case"OVER_THE_COUNTER":return!0;default:return!1}}(t))throw new Error("Unable to simulate payment; the payment channel does not support simulation.");this[pt].behaviorTree.bb.simulatePaymentRequested=!0,this.behaviorTreeUpdate()}pollImmediately(){if(this.assertInitialized(),"ACTIVE"!==this[pt].worldState.session.status)throw new Error("Unable to poll immediately; the session is not longer active.");this[pt].behaviorTree.bb.pollImmediatelyRequested=!0,this.behaviorTreeUpdate()}getState(){const e=this[pt].currentChannelCode,t=this[pt].liveComponents.paymentChannels.get(e??"");return{channelCode:e,channelProperties:t?.channelProperties||null,behaviorTree:this[pt].behaviorTree}}addEventListener(e,t,n){return this[pt].eventListenersPresent.set(e,!0),super.addEventListener(e,t,n)}removeEventListener(e,t,n){return super.removeEventListener(e,t,n)}static amountFormat(e,t){return rs(e,t)}}class XenditComponentsTest extends XenditComponents{nextMockUpdate=null;constructor(e){super({...e,componentsSdkKey:bi()}),this.addEventListener(InternalScheduleMockUpdateEvent.type,this.setNextMockUpdate.bind(this))}async initializeAsync(){await Dt(Ot);const e=(await Promise.resolve().then(function(){return Ti})).makeTestBffData();this.dispatchEvent(new InternalUpdateWorldState({business:e.business,customer:e.customer,session:e.session,channels:e.channels,channelUiGroups:e.channel_ui_groups,paymentEntity:null,sessionTokenRequestId:null,succeededChannel:null}))}isMock(){return!0}setNextMockUpdate(e){const t=e;this.nextMockUpdate=t.mockData}}"undefined"==typeof window||"undefined"==typeof document||(ht||(ht=!0,t.debounceRendering=e=>queueMicrotask(e)),function(){const e=document.createElement("style");e.textContent='@font-face {\n font-family: "Proxima Nova";\n font-style: normal;\n font-weight: 300;\n font-display: swap;\n src:\n local("Proxima Nova Light"),\n local("Proxima Nova"),\n url("https://assets.xendit.co/payment-session/fonts/proxima-nova/proximanova_light.otf")\n format("opentype");\n}\n\n@font-face {\n font-family: "Proxima Nova";\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src:\n local("Proximanova Regular"),\n local("Proxima Nova"),\n url("https://assets.xendit.co/payment-session/fonts/proxima-nova/proximanova_regular.ttf")\n format("truetype");\n}\n\n@font-face {\n font-family: "Proxima Nova";\n font-style: normal;\n font-weight: 700;\n font-display: swap;\n src:\n local("Proxima Nova Bold"),\n local("Proxima Nova"),\n url("https://assets.xendit.co/payment-session/fonts/proxima-nova/proximanova_bold.otf")\n format("opentype"),\n url("https://assets.xendit.co/payment-session/fonts/proxima-nova/proximanova_boldit.otf")\n format("opentype"),\n url("https://assets.xendit.co/payment-session/fonts/proxima-nova/proximanova_extrabold.otf")\n format("opentype");\n}\n\n@font-face {\n font-family: "Proxima Nova";\n font-style: normal;\n font-weight: 900;\n font-display: swap;\n src:\n local("Proxima Nova Black"),\n local("Proxima Nova"),\n url("https://assets.xendit.co/payment-session/fonts/proxima-nova/proximanova_black.otf")\n format("opentype"),\n url("https://assets.xendit.co/payment-session/fonts/proxima-nova/proximanova_blackit.otf")\n format("opentype"),\n url("https://assets.xendit.co/payment-session/fonts/proxima-nova/proximanova_black.ttf")\n format("truetype");\n}\n\n/* variables */\nhtml {\n --xendit-font-family: "Proxima Nova", sans-serif;\n --xendit-color-primary: #1762ee;\n --xendit-color-text: #252525;\n --xendit-color-text-secondary: #585858;\n --xendit-color-text-placeholder: #7d7d7d;\n --xendit-color-disabled: #f7f7f7;\n --xendit-color-danger: #d1414d;\n --xendit-color-border: #f3f3f3;\n --xendit-color-background: #ffffff;\n --xendit-focus-shadow: 0px 0px 0px 2px\n color-mix(in srgb, var(--xendit-color-primary) 15%, transparent);\n --xendit-animation-duration: 0.3s;\n --xendit-animation-ease: ease-in-out;\n --xendit-radius-1: 8px;\n --xendit-z-index-focus: 2;\n\n /* Browser-specific border collapse margins */\n --xendit-border-collapse-offset: -0.5px; /* Default for Chrome/Edge */\n --xendit-border-collapse-webkit-gecko: -1.5px; /* Fix Safari and Firefox subpixel rendering */\n}\n\n/* Set default font for root components */\nxendit-channel-picker,\nxendit-action-container,\nxendit-payment-channel {\n display: block;\n unicode-bidi: isolate;\n font-family: var(--xendit-font-family, sans-serif);\n color: var(--xendit-color-text);\n}\n\n.xendit-default-action-container {\n font-family: var(--xendit-font-family, sans-serif);\n}\n\nxendit-action-container {\n background-color: var(--xendit-color-background);\n flex: 1; /* Action container usually wants to stretch to fit, assuming the parent is a flexbox. */\n}\n\nxendit-payment-channel button,\nxendit-payment-channel textarea,\nxendit-payment-channel select,\nxendit-payment-channel input,\nxendit-payment-channel input::placeholder {\n font-family: inherit;\n}\n\nxendit-payment-channel input::placeholder,\nxendit-payment-channel textarea::placeholder,\nxendit-payment-channel select::placeholder {\n color: var(--xendit-color-text-placeholder);\n}\n\n/* Reusable typography classes */\n.xendit-text-12 {\n font-size: 12px;\n line-height: 16px;\n letter-spacing: -0.01px;\n}\n\n.xendit-text-14 {\n font-size: 14px;\n line-height: 16px;\n letter-spacing: -0.09px;\n}\n\n.xendit-text-16 {\n font-size: 16px;\n line-height: 16px;\n letter-spacing: -0.09px;\n}\n\n.xendit-text-18 {\n font-size: 18px;\n line-height: 24px;\n letter-spacing: -0.26px;\n}\n\n.xendit-text-20 {\n font-size: 20px;\n line-height: 28px;\n letter-spacing: -0.33px;\n}\n\n.xendit-text-12,\n.xendit-text-14,\n.xendit-text-16 {\n font-weight: 400;\n}\n\n.xendit-text-semibold {\n font-weight: 600;\n}\n\n.xendit-text-bold {\n font-weight: 700;\n}\n\n.xendit-text-secondary {\n color: var(--xendit-color-text-secondary);\n}\n\n.xendit-text-center {\n text-align: center;\n}\n\n/* Accordion component */\n\n.xendit-accordion {\n display: flex;\n flex-direction: column;\n border: 1px solid var(--xendit-color-border);\n border-radius: var(--xendit-radius-1);\n background: var(--xendit-color-background);\n}\n\n.xendit-accordion-item:not(:first-child) {\n border-top: 1px solid var(--xendit-color-border);\n border-top-left-radius: var(--xendit-radius-1);\n border-top-right-radius: var(--xendit-radius-1);\n}\n\n.xendit-accordion-item-header {\n display: grid;\n grid-template-columns: auto 1fr auto;\n grid-gap: 16px;\n align-items: center;\n cursor: pointer;\n padding: 24px 16px;\n color: var(--xendit-color-text);\n border-radius: 8px;\n}\n\n.xendit-accordion-item-disabled .xendit-accordion-item-header {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.xendit-accordion-item-header-title {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.xendit-accordion-item-disabled .xendit-accordion-item-header-title,\n.xendit-accordion-item-disabled .xendit-accordion-item-header-icon {\n opacity: 0.5;\n}\n\n.xendit-accordion-item.xendit-accordion-item-open\n .xendit-accordion-item-header {\n color: var(--xendit-color-primary);\n}\n\n.xendit-accordion-item-chevron {\n color: var(--xendit-color-text);\n}\n\n.xendit-accordion-item-disabled .xendit-accordion-item-chevron {\n display: none;\n}\n\n.xendit-accordion-item-chevron g {\n transition: transform var(--xendit-animation-duration)\n var(--xendit-animation-ease);\n}\n\n.xendit-accordion-item-header:focus-visible {\n border-radius: 8px;\n box-shadow: 0px 0px 0px 2px\n color-mix(in srgb, var(--xendit-color-primary) 15%, transparent);\n outline: none;\n}\n\n.xendit-accordion-item-content {\n overflow: hidden;\n transition: height var(--xendit-animation-duration)\n var(--xendit-animation-ease);\n}\n\n.xendit-accordion-item.xendit-accordion-item-closed\n .xendit-accordion-item-content {\n height: 0;\n}\n\n.xendit-accordion-item.xendit-accordion-item-open\n .xendit-accordion-item-content {\n height: calc-size(auto, size);\n}\n\n.xendit-accordion-item-padding {\n padding: 16px;\n}\n\n/* Channel picker group */\n\n.xendit-channel-picker-group {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n.xendit-channel-picker-group select {\n border: 1px solid var(--xendit-color-border);\n border-radius: 8px;\n padding: 12px;\n appearance: none;\n outline: none;\n}\n\n.xendit-channel-picker-group select:focus {\n box-shadow: 0px 0px 0px 2px\n color-mix(in srgb, var(--xendit-color-primary) 15%, transparent);\n}\n\n.xendit-channel-logo {\n width: 24px;\n height: 16px;\n margin: -5px 0;\n padding: 4px;\n border: 1px solid var(--xendit-color-border);\n border-radius: 4px;\n background-color: white; /* always white, not --xendit-color-background */\n object-fit: contain;\n}\n\n/* Payment channel */\n\nxendit-payment-channel[inert] {\n filter: opacity(0.5) grayscale(1);\n}\n\n.xendit-payment-channel {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n.xendit-payment-channel-banner {\n width: 100%;\n height: auto;\n object-fit: contain;\n}\n\n.xendit-payment-channel-instructions {\n display: grid;\n grid-template-columns: auto 1fr;\n grid-gap: 12px;\n color: var(--xendit-color-text-secondary);\n}\n\n.xendit-payment-channel-instructions-logo {\n height: 40px;\n width: auto;\n object-fit: contain;\n}\n\n.xendit-payment-channel-instructions-text {\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: 4px;\n}\n\n.xendit-payment-channel-instructions-text p {\n margin: 0;\n}\n\n/* Forms */\n\n.xendit-channel-form {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n.xendit-channel-form > form {\n display: contents;\n}\n\n.xendit-form-field-group {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n\n.xendit-channel-form-field {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.xendit-channel-form-field-group {\n display: grid;\n gap: 8px;\n}\n\n.xendit-channel-form-field-group label {\n width: fit-content;\n cursor: pointer;\n}\n\n.xendit-form-field-group.invalid .xendit-channel-form-field input,\n.xendit-form-field-group.invalid\n .xendit-channel-form-field\n .xendit-iframe-container,\n.xendit-form-field-group.invalid .xendit-dropdown button {\n border: 1px solid var(--xendit-color-danger);\n}\n\n.xendit-channel-form-field input:not([type="checkbox"]),\n.xendit-channel-form-field select,\n.xendit-channel-form-field .xendit-iframe-container {\n display: flex;\n border: 1px solid var(--xendit-color-border);\n background: var(--xendit-color-background);\n border-radius: 8px;\n padding: 12px;\n appearance: none;\n}\n\n/* TODO: Refine these class usages */\n.xendit-channel-form-field.field-radius-tl-0 input,\n.xendit-channel-form-field.field-radius-tl-0 button,\n.xendit-channel-form-field.field-radius-tl-0 .xendit-iframe-container {\n border-top-left-radius: 0;\n}\n\n.xendit-channel-form-field.field-radius-tr-0 input,\n.xendit-channel-form-field.field-radius-tr-0 button,\n.xendit-channel-form-field.field-radius-tr-0 .xendit-iframe-container {\n border-top-right-radius: 0;\n}\n\n.xendit-channel-form-field.field-radius-bl-0 input,\n.xendit-channel-form-field.field-radius-bl-0 button,\n.xendit-channel-form-field.field-radius-bl-0 .xendit-iframe-container {\n border-bottom-left-radius: 0;\n}\n\n.xendit-channel-form-field.field-radius-br-0 input,\n.xendit-channel-form-field.field-radius-br-0 button,\n.xendit-channel-form-field.field-radius-br-0 .xendit-iframe-container {\n border-bottom-right-radius: 0;\n}\n\n.xendit-channel-form-field.field-collapse-l,\n.xendit-channel-form-field.field-collapse-l {\n margin-left: var(--xendit-border-collapse-offset);\n}\n\n.xendit-channel-form-field.field-collapse-r,\n.xendit-channel-form-field.field-collapse-r {\n margin-right: var(--xendit-border-collapse-offset);\n}\n\n.xendit-channel-form-field.field-collapse-l .xendit-iframe-container {\n margin-left: calc(var(--xendit-border-collapse-offset) * 2);\n width: calc(100% + abs(var(--xendit-border-collapse-offset) * 2));\n}\n\n.xendit-channel-form-field.field-collapse-r .xendit-iframe-container {\n margin-right: 0;\n}\n\n.xendit-channel-form-field.field-collapse-t input,\n.xendit-channel-form-field.field-collapse-t button,\n.xendit-channel-form-field.field-collapse-t .xendit-iframe-container {\n margin-top: var(--xendit-border-collapse-offset);\n}\n\n.xendit-channel-form-field.field-collapse-b input,\n.xendit-channel-form-field.field-collapse-b button,\n.xendit-channel-form-field.field-collapse-b .xendit-iframe-container {\n margin-bottom: var(--xendit-border-collapse-offset);\n}\n\n/* Safari and Firefox specific adjustments */\n@supports (font: -apple-system-body) or (-moz-appearance: none) {\n .xendit-channel-form-field.field-collapse-l .xendit-iframe-container {\n margin-left: 0;\n width: 100%;\n }\n\n .xendit-channel-form-field.field-collapse-b input,\n .xendit-channel-form-field.field-collapse-b button {\n margin-bottom: var(--xendit-border-collapse-webkit-gecko);\n height: calc(100% + abs(var(--xendit-border-collapse-webkit-gecko) * 2));\n }\n}\n\n.xendit-channel-form-field.field-collapse-r .xendit-iframe-container:focus {\n border-right: none;\n}\n\n.xendit-channel-form-field.field-collapse-l .xendit-iframe-container:focus {\n border-left: none;\n}\n/* Ends TODO */\n\n.xendit-card-brand-logo {\n width: 24px;\n height: 16px;\n border: 1px solid var(--xendit-color-border);\n border-radius: 4px;\n padding: 4px;\n background-color: white; /* always white, not --xendit-color-background */\n}\n\n.xendit-card-brands-list {\n display: flex;\n align-items: center;\n padding: 8px 12px;\n gap: 4px;\n}\n\n.xendit-channel-form-field input:focus,\n.xendit-channel-form-field select:focus,\n.xendit-channel-form-field .xendit-iframe-container.xendit-field-focus {\n border-color: var(--xendit-color-primary);\n box-shadow: var(--xendit-focus-shadow);\n outline: none;\n z-index: var(--xendit-z-index-focus);\n}\n\n.xendit-channel-form-field button:focus {\n position: relative;\n z-index: var(--xendit-z-index-focus);\n}\n\n.xendit-channel-form-field .xendit-iframe-container {\n height: 40px;\n width: 100%;\n padding: 0;\n overflow: hidden;\n box-sizing: border-box;\n}\n\n.xendit-channel-form-field .xendit-iframe-container iframe {\n height: 40px;\n width: 100%;\n border: none;\n min-width: 0;\n}\n\n.xendit-channel-form-field.xendit-form-field-span-1 {\n grid-column: span 1;\n}\n\n.xendit-channel-form-field.xendit-form-field-span-2 {\n grid-column: span 2;\n}\n\n.xendit-checkbox {\n display: flex;\n align-items: center;\n}\n\n.xendit-checkbox-box {\n display: flex;\n}\n\n.xendit-checkbox input {\n width: 16px;\n height: 16px;\n margin: 0;\n cursor: pointer;\n}\n\n.xendit-checkbox label {\n cursor: pointer;\n padding-left: 8px;\n}\n\n.xendit-checkbox input {\n opacity: 0;\n position: absolute;\n}\n\n.xendit-checkbox input + .xendit-checkbox-graphic {\n width: 16px;\n height: 16px;\n border: 1px solid var(--xendit-color-border);\n border-radius: 4px;\n box-sizing: border-box;\n color: transparent;\n}\n\n.xendit-checkbox input:checked + .xendit-checkbox-graphic {\n color: var(--xendit-color-background);\n background-color: var(--xendit-color-primary);\n border-color: var(--xendit-color-primary);\n}\n\n/* Dialog */\n\n.xendit-dialog-backdrop {\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background: rgba(0, 0, 0, 0.5);\n display: flex;\n padding: 48px;\n justify-content: center;\n align-items: center;\n}\n\n.xendit-dialog {\n background-color: var(--xendit-color-background);\n border-radius: 8px;\n}\n\n.xendit-dialog-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n color: var(--xendit-color-text);\n padding: 16px;\n gap: 16px;\n line-height: 20px;\n border-bottom: 1px solid var(--xendit-color-border);\n}\n\n.xendit-dialog-header button {\n background: none;\n border: none;\n color: var(--xendit-color-text);\n cursor: pointer;\n padding: 0;\n}\n\n.xendit-dialog-body {\n display: flex;\n padding: 8px;\n}\n\n.xendit-error-message {\n color: var(--xendit-color-danger);\n}\n\n/* Phone input Dropdown */\n.xendit-input-phone .xendit-combobox {\n display: flex;\n gap: 8px;\n}\n\n.xendit-phone-number-input {\n width: 100%;\n}\n\n.xendit-input-phone .xendit-dropdown button {\n width: 64px;\n}\n\n.xendit-input-phone .xendit-dropdown button .xendit-dropdown-button-title {\n display: none;\n}\n\n.xendit-dropdown .xendit-dropdown-search input {\n padding: 8px;\n border: 1px solid var(--xendit-color-border);\n border-radius: var(--xendit-radius-1);\n box-sizing: border-box;\n}\n\n.xendit-dropdown-search input:focus {\n outline: none;\n border-color: var(--xendit-color-primary);\n box-shadow: var(--xendit-focus-shadow);\n}\n\n/* Phone input Dropdown ends */\n\n/* Dropdown */\n.xendit-dropdown button {\n width: 100%;\n display: grid;\n grid-template-columns: 1fr auto;\n align-items: center;\n gap: 8px;\n text-align: left;\n background-color: var(--xendit-color-background);\n border: 1px solid var(--xendit-color-border);\n border-radius: var(--xendit-radius-1);\n justify-content: space-between;\n padding: 12px;\n cursor: pointer;\n}\n\n.xendit-dropdown button.xendit-dropdown-has-asset {\n grid-template-columns: auto 1fr auto;\n}\n\n.xendit-dropdown button:disabled {\n background: var(--xendit-color-disabled);\n}\n\n.xendit-dropdown button:focus {\n outline: none;\n border: 1px solid var(--xendit-color-primary);\n box-shadow: 0px 0px 0px 2px #1762ee26;\n}\n\n.xendit-dropdown-menu {\n position: absolute;\n z-index: 1;\n display: flex;\n flex-direction: column;\n gap: 4px;\n max-height: 168px;\n width: 257px;\n padding: 4px;\n margin: 4px 0;\n background-color: var(--xendit-color-background);\n border: 1px solid var(--xendit-color-border);\n border-radius: var(--xendit-radius-1);\n list-style: none;\n box-shadow: 0px 4px 8px 0px #25252514;\n overflow-y: auto;\n}\n\n.xendit-dropdown-menu ul {\n list-style: none;\n padding: 4px;\n margin-top: 0;\n}\n\n.xendit-dropdown-search {\n position: sticky;\n top: 0;\n z-index: 1;\n}\n\n.xendit-dropdown-search input {\n width: 100%;\n}\n\n.xendit-dropdown-item {\n display: grid;\n grid-template-columns: 1fr auto;\n align-items: center;\n gap: 8px;\n padding: 8px 12px 8px 4px;\n border-radius: var(--xendit-radius-1);\n cursor: pointer;\n z-index: 0;\n --xendit-dropdown-item-hover-color: var(--xendit-color-background);\n --xendit-dropdown-item-hover-bg-color: var(--xendit-color-primary);\n}\n\n.xendit-dropdown-item-disabled {\n --xendit-dropdown-item-hover-color: var(--xendit-color-text);\n --xendit-dropdown-item-hover-bg-color: var(--xendit-color-disabled);\n}\n\n.xendit-dropdown-item-active {\n box-shadow: var(--xendit-focus-shadow);\n}\n\n.xendit-dropdown-item:hover {\n background-color: var(--xendit-dropdown-item-hover-bg-color);\n}\n\n.xendit-dropdown-item:hover .xendit-dropdown-item-text,\n.xendit-dropdown-item:hover .xendit-dropdown-item-description {\n color: var(--xendit-dropdown-item-hover-color);\n}\n\n.xendit-dropdown-item-selected {\n color: var(--xendit-color-primary);\n}\n\n.xendit-dropdown-item:hover .xendit-dropdown-item-selected {\n color: var(--xendit-dropdown-item-hover-color);\n}\n\n.xendit-dropdown-item.xendit-dropdown-has-asset {\n grid-template-columns: auto 1fr auto;\n}\n\n.xendit-dropdown-item-text {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.xendit-dropdown-item-disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.xendit-dropdown-item-disabled:hover,\n.xendit-dropdown-item-disabled.xendit-dropdown-item-active {\n background-color: var(--xendit-color-disabled);\n}\n\n/* Dropdown ends */\n\n/* Button */\n.xendit-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n padding: 12px 16px;\n font-family: var(--xendit-font-family);\n font-size: 14px;\n font-weight: 600;\n line-height: 16px;\n letter-spacing: -0.09px;\n cursor: pointer;\n transition: background-color var(--xendit-animation-duration)\n var(--xendit-animation-ease);\n}\n.xendit-button-primary-rounded {\n border: 1px solid transparent;\n background-color: var(--xendit-color-primary);\n color: var(--xendit-color-background);\n border-radius: var(--xendit-radius-1);\n}\n.xendit-button-white-rounded {\n background-color: var(--xendit-color-background);\n color: var(--xendit-color-text);\n border: 1px solid var(--xendit-color-border);\n border-radius: var(--xendit-radius-1);\n}\n.xendit-button-block {\n width: 100%;\n}\n\n@keyframes xendit-button-loading-spinner-spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n\n.xendit-button-loading-spinner {\n width: 16px;\n height: 16px;\n animation: xendit-button-loading-spinner-spin 1s linear infinite;\n}\n\n/* Button ends */\n\n.xendit-dotted-line {\n height: 1px;\n border: none;\n background: repeating-linear-gradient(\n to right,\n var(--xendit-color-border) 0px 4px,\n transparent 4px 8px\n );\n margin: 16px 0;\n}\n\n.xendit-default-action-container {\n display: flex;\n flex-direction: column;\n border: none;\n}\n\n.xendit-action-iframe {\n border: none;\n width: 100%;\n height: 100%;\n}\n\n.xendit-action-present-to-customer {\n display: flex;\n flex-direction: column;\n background: var(--xendit-color-background);\n border-radius: var(--xendit-radius-1);\n border: 1px solid var(--xendit-color-border);\n}\n.xendit-action-present-to-customer-header {\n padding: 12px 16px;\n text-align: center;\n border-bottom: 1px solid var(--xendit-color-border);\n}\n.xendit-action-present-to-customer-content {\n display: flex;\n flex-direction: column;\n padding: 20px;\n}\n.xendit-action-qr-content {\n display: flex;\n flex-direction: column;\n}\n.xendit-action-qr-channel-logo-container {\n display: flex;\n justify-content: center;\n margin: 0 4px;\n padding-top: 2px;\n padding-bottom: 4px;\n border-top-left-radius: var(--xendit-radius-1);\n border-top-right-radius: var(--xendit-radius-1);\n border: 1px solid var(--xendit-color-border);\n border-bottom: none;\n}\n.xendit-action-qr-channel-logo {\n height: 40px;\n object-fit: contain;\n}\n.xendit-action-qr-qrcode-container {\n border: 1px solid var(--xendit-color-border);\n border-radius: var(--xendit-radius-1);\n padding: 12px;\n}\n.xendit-action-qr-amount-container {\n display: flex;\n justify-content: center;\n margin: 0 4px;\n padding-top: 4px;\n padding-bottom: 2px;\n border-bottom-left-radius: var(--xendit-radius-1);\n border-bottom-right-radius: var(--xendit-radius-1);\n border: 1px solid var(--xendit-color-border);\n border-top: none;\n}\n';const t=document.querySelector("style, link");t?t.insertAdjacentElement("beforebegin",e):document.head.appendChild(e)}(),function(){const e=document.createElement("svg");e.id="xendit-icon-set",e.style.display="none",q(st("defs",{children:ut.map(e=>e.node)}),e),document.head.appendChild(e)}());export{XenditActionBeginEvent,XenditActionEndEvent,XenditComponents,XenditComponentsTest,XenditFatalErrorEvent,XenditInitEvent,XenditNotReadyEvent,XenditPaymentRequestCreatedEvent,XenditPaymentRequestDiscardedEvent,XenditPaymentTokenCreatedEvent,XenditPaymentTokenDiscardedEvent,XenditReadyEvent,XenditSessionCompleteEvent,XenditSessionExpiredOrCanceledEvent,XenditSubmissionBeginEvent,XenditSubmissionEndEvent,XenditWillRedirectEvent};
8
- //# sourceMappingURL=index.esm.js.map