xendit-components-web 0.0.21 → 0.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -2
- package/README.md +23 -2
- package/package.json +1 -2
- package/sdk/dist/cjs/index.cjs +1 -1
- package/sdk/dist/cjs/index.cjs.map +1 -1
- package/sdk/dist/cjs/test-data.cjs +1 -1
- package/sdk/dist/cjs/test-data.cjs.map +1 -1
- package/sdk/dist/esm-bundled/index.mjs +2 -2
- package/sdk/dist/esm-bundled/index.mjs.map +1 -1
- package/sdk/dist/esm-bundled/test-data.mjs +1 -1
- package/sdk/dist/esm-bundled/test-data.mjs.map +1 -1
- package/sdk/dist/esm-external/index.mjs +1 -1
- package/sdk/dist/esm-external/index.mjs.map +1 -1
- package/sdk/dist/esm-external/test-data.mjs +1 -1
- package/sdk/dist/esm-external/test-data.mjs.map +1 -1
- package/sdk/dist/index.d.ts +26 -11
- package/sdk/dist/index.umd.js +2 -2
- package/sdk/dist/index.umd.js.map +1 -1
package/sdk/dist/index.umd.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*! Copyright (c) 2026 Xendit Inc. Licensed under the MIT License (MIT). */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Xendit={})}(this,function(e){"use strict";var t,n,r,o,i,a,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,y=Array.isArray;function b(e,t){for(var n in t)e[n]=t[n];return e}function g(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function v(e,n,r){var o,i,a,d={};for(a in n)"key"==a?o=n[a]:"ref"==a?i=n[a]:d[a]=n[a];if(arguments.length>2&&(d.children=arguments.length>3?t.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===d[a]&&(d[a]=e.defaultProps[a]);return $(e,d,o,i,null)}function $(e,t,o,i,a){var d={type:e,props:t,key:o,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==a?++r:a,__i:-1,__u:0};return null==a&&null!=n.vnode&&n.vnode(d),d}function x(e){return e.children}function w(e,t){this.props=e,this.context=t}function E(e,t){if(null==t)return e.__?E(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?E(e):null}function C(e){if(e.__P&&e.__d){var t=e.__v,r=t.__e,o=[],i=[],a=b({},t);a.__v=t.__v+1,n.vnode&&n.vnode(a),L(e.__P,a,t,e.__n,e.__P.namespaceURI,32&t.__u?[r]:null,o,null==r?E(t):r,!!(32&t.__u),i),a.__v=t.__v,a.__.__k[a.__i]=a,q(o,a,i),t.__e=t.__=null,a.__e!=r&&k(a)}}function k(e){if(null!=(e=e.__)&&null!=e.__c)return e.__e=e.__c.base=null,e.__k.some(function(t){if(null!=t&&null!=t.__e)return e.__e=e.__c.base=t.__e}),k(e)}function P(e){(!e.__d&&(e.__d=!0)&&o.push(e)&&!A.__r++||i!=n.debounceRendering)&&((i=n.debounceRendering)||a)(A)}function A(){try{for(var e,t=1;o.length;)o.length>t&&o.sort(d),e=o.shift(),t=o.length,C(e)}finally{o.length=A.__r=0}}function S(e,t,n,r,o,i,a,d,s,l,c){var u,h,p,_,b,g,v,w=r&&r.__k||m,C=t.length;for(s=function(e,t,n,r,o){var i,a,d,s,l,c=n.length,u=c,h=0;for(e.__k=new Array(o),i=0;i<o;i++)null!=(a=t[i])&&"boolean"!=typeof a&&"function"!=typeof a?("string"==typeof a||"number"==typeof a||"bigint"==typeof a||a.constructor==String?a=e.__k[i]=$(null,a,null,null,null):y(a)?a=e.__k[i]=$(x,{children:a},null,null,null):void 0===a.constructor&&a.__b>0?a=e.__k[i]=$(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):e.__k[i]=a,s=i+h,a.__=e,a.__b=e.__b+1,d=null,-1!=(l=a.__i=N(a,n,s,u))&&(u--,(d=n[l])&&(d.__u|=2)),null==d||null==d.__v?(-1==l&&(o>c?h--:o<c&&h++),"function"!=typeof a.type&&(a.__u|=4)):l!=s&&(l==s-1?h--:l==s+1?h++:(l>s?h--:h++,a.__u|=4))):e.__k[i]=null;if(u)for(i=0;i<c;i++)null!=(d=n[i])&&!(2&d.__u)&&(d.__e==r&&(r=E(d)),F(d,d));return r}(n,t,w,s,C),u=0;u<C;u++)null!=(p=n.__k[u])&&(h=-1!=p.__i&&w[p.__i]||f,p.__i=u,g=L(e,p,h,o,i,a,d,s,l,c),_=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&j(h.ref,null,p),c.push(p.ref,p.__c||_,p)),null==b&&null!=_&&(b=_),(v=!!(4&p.__u))||h.__k===p.__k?s=O(p,s,e,v):"function"==typeof p.type&&void 0!==g?s=g:_&&(s=_.nextSibling),p.__u&=-7);return n.__e=b,s}function O(e,t,n,r){var o,i;if("function"==typeof e.type){for(o=e.__k,i=0;o&&i<o.length;i++)o[i]&&(o[i].__=e,t=O(o[i],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=E(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function T(e,t){return t=t||[],null==e||"boolean"==typeof e||(y(e)?e.some(function(e){T(e,t)}):t.push(e)),t}function N(e,t,n,r){var o,i,a,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(o=n-1,i=n+1;o>=0||i<t.length;)if(null!=(l=t[a=o>=0?o--:i++])&&!(2&l.__u)&&d==l.key&&s==l.type)return a;return-1}function I(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||_.test(t)?n:n+"px"}function R(e,t,n,r,o){var i,a;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||I(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||I(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])i=t!=(t=t.replace(s,"$1")),a=t.toLowerCase(),t=a in e||"onFocusOut"==t||"onFocusIn"==t?a.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=l,e.addEventListener(t,i?u:c,i)):e.removeEventListener(t,i?u:c,i);else{if("http://www.w3.org/2000/svg"==o)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 M(e){return function(t){if(this.l){var r=this.l[t.type+e];if(null==t.t)t.t=l++;else if(t.t<r.u)return;return r(n.event?n.event(t):t)}}}function L(e,t,r,o,i,a,d,s,l,c){var u,h,p,f,_,v,$,E,C,k,P,A,O,T,N,I=t.type;if(void 0!==t.constructor)return null;128&r.__u&&(l=!!(32&r.__u),a=[s=t.__e=r.__e]),(u=n.__b)&&u(t);e:if("function"==typeof I)try{if(E=t.props,C=I.prototype&&I.prototype.render,k=(u=I.contextType)&&o[u.__c],P=u?k?k.props.value:u.__:o,r.__c?$=(h=t.__c=r.__c).__=h.__E:(C?t.__c=h=new I(E,P):(t.__c=h=new w(E,P),h.constructor=I,h.render=G),k&&k.sub(h),h.state||(h.state={}),h.__n=o,p=h.__d=!0,h.__h=[],h._sb=[]),C&&null==h.__s&&(h.__s=h.state),C&&null!=I.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=b({},h.__s)),b(h.__s,I.getDerivedStateFromProps(E,h.__s))),f=h.props,_=h.state,h.__v=t,p)C&&null==I.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),C&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(C&&null==I.getDerivedStateFromProps&&E!==f&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(E,P),t.__v==r.__v||!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(E,h.__s,P)){t.__v!=r.__v&&(h.props=E,h.state=h.__s,h.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(e){e&&(e.__=t)}),m.push.apply(h.__h,h._sb),h._sb=[],h.__h.length&&d.push(h);break e}null!=h.componentWillUpdate&&h.componentWillUpdate(E,h.__s,P),C&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(f,_,v)})}if(h.context=P,h.props=E,h.__P=e,h.__e=!1,A=n.__r,O=0,C)h.state=h.__s,h.__d=!1,A&&A(t),u=h.render(h.props,h.state,h.context),m.push.apply(h.__h,h._sb),h._sb=[];else do{h.__d=!1,A&&A(t),u=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++O<25);h.state=h.__s,null!=h.getChildContext&&(o=b(b({},o),h.getChildContext())),C&&!p&&null!=h.getSnapshotBeforeUpdate&&(v=h.getSnapshotBeforeUpdate(f,_)),T=null!=u&&u.type===x&&null==u.key?B(u.props.children):u,s=S(e,y(T)?T:[T],t,r,o,i,a,d,s,l,c),h.base=t.__e,t.__u&=-161,h.__h.length&&d.push(h),$&&(h.__E=h.__=null)}catch(e){if(t.__v=null,l||null!=a)if(e.then){for(t.__u|=l?160:128;s&&8==s.nodeType&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__e=s}else{for(N=a.length;N--;)g(a[N]);D(t)}else t.__e=r.__e,t.__k=r.__k,e.then||D(t);n.__e(e,t,r)}else null==a&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):s=t.__e=U(r.__e,t,r,o,i,a,d,l,c);return(u=n.diffed)&&u(t),128&t.__u?void 0:s}function D(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(D))}function q(e,t,r){for(var o=0;o<r.length;o++)j(r[o],r[++o],r[++o]);n.__c&&n.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){n.__e(e,t.__v)}})}function B(e){return"object"!=typeof e||null==e||e.__b>0?e:y(e)?e.map(B):b({},e)}function U(e,r,o,i,a,d,s,l,c){var u,h,p,m,_,b,v,$=o.props||f,x=r.props,w=r.type;if("svg"==w?a="http://www.w3.org/2000/svg":"math"==w?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),null!=d)for(u=0;u<d.length;u++)if((_=d[u])&&"setAttribute"in _==!!w&&(w?_.localName==w:3==_.nodeType)){e=_,d[u]=null;break}if(null==e){if(null==w)return document.createTextNode(x);e=document.createElementNS(a,w,x.is&&x),l&&(n.__m&&n.__m(r,d),l=!1),d=null}if(null==w)$===x||l&&e.data==x||(e.data=x);else{if(d=d&&t.call(e.childNodes),!l&&null!=d)for($={},u=0;u<e.attributes.length;u++)$[(_=e.attributes[u]).name]=_.value;for(u in $)_=$[u],"dangerouslySetInnerHTML"==u?p=_:"children"==u||u in x||"value"==u&&"defaultValue"in x||"checked"==u&&"defaultChecked"in x||R(e,u,null,_,a);for(u in x)_=x[u],"children"==u?m=_:"dangerouslySetInnerHTML"==u?h=_:"value"==u?b=_:"checked"==u?v=_:l&&"function"!=typeof _||$[u]===_||R(e,u,_,$[u],a);if(h)l||p&&(h.__html==p.__html||h.__html==e.innerHTML)||(e.innerHTML=h.__html),r.__k=[];else if(p&&(e.innerHTML=""),S("template"==r.type?e.content:e,y(m)?m:[m],r,o,i,"foreignObject"==w?"http://www.w3.org/1999/xhtml":a,d,s,d?d[0]:o.__k&&E(o,0),l,c),null!=d)for(u=d.length;u--;)g(d[u]);l||(u="value","progress"==w&&null==b?e.removeAttribute("value"):null!=b&&(b!==e[u]||"progress"==w&&!b||"option"==w&&b!=$[u])&&R(e,u,b,$[u],a),u="checked",null!=v&&v!=e[u]&&R(e,u,v,$[u],a))}return e}function j(e,t,r){try{if("function"==typeof e){var o="function"==typeof e.__u;o&&e.__u(),o&&null==t||(e.__u=e(t))}else e.current=t}catch(e){n.__e(e,r)}}function F(e,t,r){var o,i;if(n.unmount&&n.unmount(e),(o=e.ref)&&(o.current&&o.current!=e.__e||j(o,null,t)),null!=(o=e.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(e){n.__e(e,t)}o.base=o.__P=null}if(o=e.__k)for(i=0;i<o.length;i++)o[i]&&F(o[i],t,r||"function"!=typeof e.type);r||g(e.__e),e.__c=e.__=e.__e=void 0}function G(e,t,n){return this.constructor(e,n)}function V(e,r,o){var i,a,d;r==document&&(r=document.documentElement),n.__&&n.__(e,r),i=!1?null:r.__k,a=[],d=[],L(r,e=r.__k=v(x,null,[e]),i||f,f,r.namespaceURI,i?null:r.firstChild?t.call(r.childNodes):null,a,i?i.__e:r.firstChild,false,d),q(a,e,d)}function H(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,P(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"+h++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}t=m.slice,n={__e:function(e,t,n,r){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),a=o.__d),a)return o.__E=o}catch(t){e=t}throw e}},r=0,w.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=b({},this.state),"function"==typeof e&&(e=e(b({},n),this.props)),e&&b(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),P(this))},w.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),P(this))},w.prototype.render=x,o=[],a="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,d=function(e,t){return e.__v.__b-t.__v.__b},A.__r=0,s=/(PointerCapture)$|Capture$/i,l=0,c=M(!1),u=M(!0),h=0,null!=(p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0)&&p.__PREACT_DEVTOOLS__&&p.__PREACT_DEVTOOLS__.attachPreact("10.29.0",n,{Fragment:x,Component:w});var W={};function K(e){return e.type===x?"Fragment":"function"==typeof e.type?e.type.displayName||e.type.name:"string"==typeof e.type?e.type:"#text"}var X=[],z=[];function Y(){return X.length>0?X[X.length-1]:null}var Q=!0;function Z(e){return"function"==typeof e.type&&e.type!=x}function J(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 "+K(t);var n=t.__source;return n?e+=" (at "+n.fileName+":"+n.lineNumber+")":Q&&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."),Q=!1,e+"\n"},"")}var ee="function"==typeof WeakMap;function te(e){var t=[];return e.__k?(e.__k.forEach(function(e){e&&"function"==typeof e.type?t.push.apply(t,te(e)):e&&"string"==typeof e.type&&t.push(e.type)}),t):t}function ne(e){return e?"function"==typeof e.type?null==e.__?null!=e.__e&&null!=e.__e.parentNode?e.__e.parentNode.localName:"":ne(e.__):e.type:""}var re=w.prototype.setState;function oe(e){return"table"===e||"tfoot"===e||"tbody"===e||"thead"===e||"td"===e||"tr"===e||"th"===e}w.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'+J(Y())),re.call(this,e,t)};var ie=/^(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=w.prototype.forceUpdate;function de(e){var t=e.props,n=K(e),r="";for(var o in t)if(t.hasOwnProperty(o)&&"children"!==o){var i=t[o];"function"==typeof i&&(i="function "+(i.displayName||i.name)+"() {}"),i=Object(i)!==i||i.toString?i+"":Object.prototype.toString.call(i),r+=" "+o+"="+JSON.stringify(i)}var a=t.children;return"<"+n+r+(a&&a.length?">..</"+n+">":" />")}w.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'+J(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'+J(this.__v)),ae.call(this,e)},n.__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"+J(e))},function(){!function(){var e=n.__b,t=n.diffed,r=n.__,o=n.vnode,i=n.__r;n.diffed=function(e){Z(e)&&z.pop(),X.pop(),t&&t(e)},n.__b=function(t){Z(t)&&X.push(t),e&&e(t)},n.__=function(e,t){z=[],r&&r(e,t)},n.vnode=function(e){e.__o=z.length>0?z[z.length-1]:null,o&&o(e)},n.__r=function(e){Z(e)&&z.push(e),i&&i(e)}}();var e=!1,t=n.__b,r=n.diffed,o=n.vnode,i=n.__r,a=n.__e,d=n.__,s=n.__h,l=ee?{useEffect:new WeakMap,useLayoutEffect:new WeakMap,lazyPropTypes:new WeakMap}:null,c=[];n.__e=function(e,t,n,r){if(t&&t.__c&&"function"==typeof e.then){var o=e;e=new Error("Missing Suspense. The throwing component was: "+K(t));for(var i=t;i;i=i.__)if(i.__c&&i.__c.__c){e=o;break}if(e instanceof Error)throw e}try{(r=r||{}).componentStack=J(t),a(e,t,n,r),"function"!=typeof e.then&&setTimeout(function(){throw e})}catch(e){throw e}},n.__=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=K(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)},n.__b=function(n){var r=n.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"+de(n)+"\n\n"+J(n));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"+K(n)+" = "+de(r)+";\n let vnode = <My"+K(n)+" />;\n\nThis usually happens when you export a JSX literal and not the component.\n\n"+J(n));throw new Error("Invalid type passed to createElement(): "+(Array.isArray(r)?"array":r))}if(void 0!==n.ref&&"function"!=typeof n.ref&&"object"!=typeof n.ref&&!("$$typeof"in n))throw new Error('Component\'s "ref" property should be a function, or an object created by createRef(), but got ['+typeof n.ref+"] instead\n"+de(n)+"\n\n"+J(n));if("string"==typeof n.type)for(var o in n.props)if("o"===o[0]&&"n"===o[1]&&"function"!=typeof n.props[o]&&null!=n.props[o])throw new Error("Component's \""+o+'" property should be a function, but got ['+typeof n.props[o]+"] instead\n"+de(n)+"\n\n"+J(n));if("function"==typeof n.type&&n.type.propTypes){if("Lazy"===n.type.displayName&&l&&!l.lazyPropTypes.has(n.type)){var i="PropTypes are not supported on lazy(). Use propTypes on the wrapped component itself. ";try{var a=n.type();l.lazyPropTypes.set(n.type,!0),console.warn(i+"Component wrapped in lazy() is "+K(a))}catch(e){console.warn(i+"We will log the wrapped component's name once it is loaded.")}}var d=n.props;n.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,o){Object.keys(e).forEach(function(n){var i;try{i=e[n](t,n,r,"prop",null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){i=e}i&&!(i.message in W)&&(W[i.message]=!0,console.error("Failed prop type: "+i.message+(o&&"\n"+o()||"")))})}(n.type.propTypes,d,0,K(n),function(){return J(n)})}t&&t(n)};var u,h=0;n.__r=function(t){i&&i(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: "+K(t));u=n},n.__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);n.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 i=t[r];"__source"===r?e.__source=i:"__self"===r?e.__self=i:n[r]=i}}e.__proto__=m,o&&o(e)},n.diffed=function(t){var n,o=t.type,i=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"+J(t))}}),t.__c===u&&(h=0),"string"==typeof o&&(oe(o)||"p"===o||"a"===o||"button"===o)){var a=ne(i);if(""!==a&&oe(o))"table"===o&&"td"!==a&&oe(a)?console.error("Improper nesting of table. Your <table> should not have a table-node parent."+de(t)+"\n\n"+J(t)):"thead"!==o&&"tfoot"!==o&&"tbody"!==o||"table"===a?"tr"===o&&"thead"!==a&&"tfoot"!==a&&"tbody"!==a?console.error("Improper nesting of table. Your <tr> should have a <thead/tbody/tfoot> parent."+de(t)+"\n\n"+J(t)):"td"===o&&"tr"!==a?console.error("Improper nesting of table. Your <td> should have a <tr> parent."+de(t)+"\n\n"+J(t)):"th"===o&&"tr"!==a&&console.error("Improper nesting of table. Your <th> should have a <tr>."+de(t)+"\n\n"+J(t)):console.error("Improper nesting of table. Your <thead/tbody/tfoot> should have a <table> parent."+de(t)+"\n\n"+J(t));else if("p"===o){var d=te(t).filter(function(e){return ie.test(e)});d.length&&console.error("Improper nesting of paragraph. Your <p> should not have "+d.join(", ")+" as child-elements."+de(t)+"\n\n"+J(t))}else"a"!==o&&"button"!==o||-1!==te(t).indexOf(o)&&console.error("Improper nesting of interactive content. Your <"+o+"> should not have other "+("a"===o?"anchor":"button")+" tags as child-elements."+de(t)+"\n\n"+J(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'+de(t)+"\n\n"+J(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 _=f[m];if(_.__H)for(var y=0;y<_.__H.length;y++)if((n=_.__H[y])!=n){var b=K(t);console.warn("Invalid argument passed to hook. Hooks should not be called with NaN in the dependency array. Hook index "+m+" in component "+b+" was called with NaN.")}}}}}();let se=!1;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 XenditSessionPendingEvent extends Event{static type="session-pending";constructor(){super(XenditSessionPendingEvent.type,{})}}class XenditSessionNotPendingEvent extends Event{static type="session-not-pending";constructor(){super(XenditSessionNotPendingEvent.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}}const le=Symbol("xendit-internal");var ce=0;function ue(e,t,r,o,i,a){t||(t={});var d,s,l=t;if("ref"in l)for(s in l={},t)"ref"==s?d=t[s]:l[s]=t[s];var c={type:e,props:l,key:r,ref:d,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--ce,__i:-1,__u:0,__source:i,__self:a};if("function"==typeof e&&(d=e.defaultProps))for(s in d)void 0===l[s]&&(l[s]=d[s]);return n.vnode&&n.vnode(c),c}const he=e=>ue("div",{class:"xendit-accordion",children:e.children});var pe,fe,me,_e,ye=0,be=[],ge=n,ve=ge.__b,$e=ge.__r,xe=ge.diffed,we=ge.__c,Ee=ge.unmount,Ce=ge.__;function ke(e,t){ge.__h&&ge.__h(fe,e,ye||t),ye=0;var n=fe.__H||(fe.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function Pe(e){return ye=1,function(e,t,n){var r=ke(pe++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Be(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=fe,!fe.__f)){var o=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter(function(e){return e.__c});if(o.every(function(e){return!e.__N}))return!i||i.call(this,e,t,n);var a=r.__c.props!==e;return o.some(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}}),i&&i.call(this,e,t,n)||a};fe.__f=!0;var i=fe.shouldComponentUpdate,a=fe.componentWillUpdate;fe.componentWillUpdate=function(e,t,n){if(this.__e){var r=i;i=void 0,o(e,t,n),i=r}a&&a.call(this,e,t,n)},fe.shouldComponentUpdate=o}return r.__N||r.__}(Be,e)}function Ae(e,t){var n=ke(pe++,4);!ge.__s&&qe(n.__H,t)&&(n.__=e,n.u=t,fe.__h.push(n))}function Se(e){return ye=5,Oe(function(){return{current:e}},[])}function Oe(e,t){var n=ke(pe++,7);return qe(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Te(e,t){return ye=8,Oe(function(){return e},t)}function Ne(e){var t=fe.context[e.__c],n=ke(pe++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(fe)),t.props.value):e.__}function Ie(){for(var e;e=be.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Le),t.__h.some(De),t.__h=[]}catch(n){t.__h=[],ge.__e(n,e.__v)}}}ge.__b=function(e){fe=null,ve&&ve(e)},ge.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Ce&&Ce(e,t)},ge.__r=function(e){$e&&$e(e),pe=0;var t=(fe=e.__c).__H;t&&(me===fe?(t.__h=[],fe.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(Le),t.__h.some(De),t.__h=[],pe=0)),me=fe},ge.diffed=function(e){xe&&xe(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==be.push(t)&&_e===ge.requestAnimationFrame||((_e=ge.requestAnimationFrame)||Me)(Ie)),t.__H.__.some(function(e){e.u&&(e.__H=e.u),e.u=void 0})),me=fe=null},ge.__c=function(e,t){t.some(function(e){try{e.__h.some(Le),e.__h=e.__h.filter(function(e){return!e.__||De(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],ge.__e(n,e.__v)}}),we&&we(e,t)},ge.unmount=function(e){Ee&&Ee(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{Le(e)}catch(e){t=e}}),n.__H=void 0,t&&ge.__e(t,n.__v))};var Re="function"==typeof requestAnimationFrame;function Me(e){var t,n=function(){clearTimeout(r),Re&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Re&&(t=requestAnimationFrame(n))}function Le(e){var t=fe,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),fe=t}function De(e){var t=fe;e.__c=e.__(),fe=t}function qe(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function Be(e,t){return"function"==typeof t?t(e):t}const Ue=e=>{const{name:t,size:n,direction:r}=e;let o,i;switch(r){case"right":o="rotate(180 12 12)";break;case"up":o="rotate(90 12 12)";break;case"down":o="rotate(-90 12 12)";break;default:o="rotate(0 12 12)"}switch(t){case"chevron":i=ue("path",{d:"M15 19.5L7.5 12L15 4.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"});break;case"check":i=je(ue("path",{d:"M13.5 4.5L6.5 11.5L3 8",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),16/24);break;case"x":i=ue(x,{children:[ue("path",{d:"M18.75 5.25L5.25 18.75",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),ue("path",{d:"M18.75 18.75L5.25 5.25",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]});break;case"card":i=je(ue("path",{fill:"currentColor",d:"M17.25 3.75H2.75A1.25 1.25 0 0 0 1.5 5v10a1.25 1.25 0 0 0 1.25 1.25h14.5A1.25 1.25 0 0 0 18.5 15V5a1.25 1.25 0 0 0-1.25-1.25m-.875 9.5a1 1 0 0 1-1 1h-2.5a1 1 0 0 1-1-1V13a1 1 0 0 1 1-1h2.5a1 1 0 0 1 1 1zM1.5 8V6h17v2z"}),20/24);break;case"qr":i=je(ue(x,{children:[ue("path",{fill:"currentColor",d:"M8.125 3.125h-3.75c-.69 0-1.25.56-1.25 1.25v3.75c0 .69.56 1.25 1.25 1.25h3.75c.69 0 1.25-.56 1.25-1.25v-3.75c0-.69-.56-1.25-1.25-1.25M8.125 10.625h-3.75c-.69 0-1.25.56-1.25 1.25v3.75c0 .69.56 1.25 1.25 1.25h3.75c.69 0 1.25-.56 1.25-1.25v-3.75c0-.69-.56-1.25-1.25-1.25M15.625 3.125h-3.75c-.69 0-1.25.56-1.25 1.25v3.75c0 .69.56 1.25 1.25 1.25h3.75c.69 0 1.25-.56 1.25-1.25v-3.75c0-.69-.56-1.25-1.25-1.25M11.25 14.375a.624.624 0 0 0 .625-.625v-2.5a.624.624 0 1 0-1.25 0v2.5a.624.624 0 0 0 .625.625"}),ue("path",{fill:"currentColor",d:"M16.25 11.875h-1.875v-.625a.624.624 0 1 0-1.25 0v4.375H11.25a.624.624 0 1 0 0 1.25h2.5a.624.624 0 0 0 .625-.625v-3.125h1.875a.624.624 0 1 0 0-1.25M16.25 14.375a.624.624 0 0 0-.625.625v1.25a.624.624 0 1 0 1.25 0V15a.624.624 0 0 0-.625-.625"})]}),20/24);break;case"otc":i=je(ue(x,{children:[ue("path",{fill:"currentColor","fill-rule":"evenodd",d:"M16.972 9.547c.092-.107.207-.021.207.12v6.924c0 .283-.23.513-.512.513h-7.18v-5.129a.513.513 0 0 0-.514-.512h-3.59a.513.513 0 0 0-.513.512v5.13H3.332a.514.514 0 0 1-.513-.514V9.853c0-.244.149-.33.331-.168.268.238.586.428.936.556a3.2 3.2 0 0 0 2.209 0c.35-.128.669-.318.936-.556a.56.56 0 0 1 .728 0c.267.238.586.428.935.556a3.2 3.2 0 0 0 2.209 0c.35-.128.669-.318.937-.556a.56.56 0 0 1 .727 0c.267.238.586.428.935.556a3.2 3.2 0 0 0 2.21 0c.349-.128.668-.318.936-.556.04-.036.081-.088.124-.138m-4.409 1.915a.513.513 0 0 0-.512.513v1.283c0 .283.23.512.512.513h2.052c.283 0 .513-.23.513-.513v-1.283a.513.513 0 0 0-.513-.512z","clip-rule":"evenodd"}),ue("path",{fill:"currentColor",d:"M16.325 3c.148 0 .293.054.412.153.118.1.204.24.245.398l.99 2.872a.51.51 0 0 1-.333.654 2.4 2.4 0 0 1-.166.495c-.145.31-.357.593-.625.831a2.9 2.9 0 0 1-.936.556 3.2 3.2 0 0 1-2.209 0 2.9 2.9 0 0 1-.936-.556.56.56 0 0 0-.727 0 2.9 2.9 0 0 1-.936.556 3.2 3.2 0 0 1-2.209 0 2.9 2.9 0 0 1-.936-.556.56.56 0 0 0-.728 0 2.9 2.9 0 0 1-.935.556 3.2 3.2 0 0 1-2.21 0 2.9 2.9 0 0 1-.936-.556 2.6 2.6 0 0 1-.624-.831 2.4 2.4 0 0 1-.167-.495.51.51 0 0 1-.33-.654l.99-2.872a.77.77 0 0 1 .244-.397A.64.64 0 0 1 3.675 3z"})]}),20/24);break;case"ewallet":i=je(ue("path",{fill:"currentColor","fill-rule":"evenodd",d:"M11.313 2.07c.94-.23 2.112.266 2.63 1.145H9.331c-1.242 0-2.295.021-3.171.053 1.648-.683 3.44-.78 5.153-1.198M4.338 17.855c1.061.072 2.691.145 4.971.145s3.91-.073 4.972-.145c1.168-.08 2.09-.963 2.186-2.134q.029-.335.054-.747a40 40 0 0 1-2.644-.012c-1.298-.052-2.345-1.039-2.405-2.362a26 26 0 0 1-.023-1.153q.002-.67.023-1.153c.06-1.323 1.107-2.31 2.405-2.362q.745-.029 1.494-.027.654 0 1.15.016a36 36 0 0 0-.054-.748c-.096-1.17-1.018-2.053-2.186-2.133-1.062-.073-2.692-.146-4.972-.146s-3.91.073-4.971.146c-1.169.08-2.09.962-2.187 2.133A53 53 0 0 0 2 11.447c0 1.922.073 3.326.151 4.274.096 1.171 1.018 2.053 2.187 2.134m8.675-5.325c.03.662.544 1.155 1.21 1.181q.508.022 1.274.024.766-.002 1.273-.024c.667-.026 1.18-.52 1.21-1.181q.019-.404.02-.971-.001-.569-.02-.971c-.03-.662-.544-1.156-1.21-1.182a32 32 0 0 0-1.273-.024c-.512 0-.934.01-1.274.024-.667.026-1.18.52-1.21 1.182q-.019.403-.02.97.001.569.02.972m2.041-1.749c.159 0 .311.05.424.137a.42.42 0 0 1 .175.33v.622a.42.42 0 0 1-.175.33.7.7 0 0 1-.424.136.7.7 0 0 1-.423-.137.42.42 0 0 1-.176-.33v-.621c0-.124.063-.242.176-.33a.7.7 0 0 1 .423-.137","clip-rule":"evenodd"}),20/24);break;case"bank_transfer":i=je(ue("path",{fill:"currentColor",d:"M9.195 1.947a1.46 1.46 0 0 1 1.72 0l6.184 4.514c.814.593.629 1.463-.378 1.466H3.388C2.38 7.924 2.196 7.054 3.01 6.46zm.235 11.196a.2.2 0 0 1-.2.2H7.963a.2.2 0 0 1-.2-.2V9.377c0-.11.09-.2.2-.2H9.23c.11 0 .2.09.2.2zm2.916 0a.2.2 0 0 1-.2.2H10.88a.2.2 0 0 1-.2-.2V9.377c0-.11.09-.2.2-.2h1.267c.11 0 .2.09.2.2zm3.125 0a.2.2 0 0 1-.2.2h-1.475a.2.2 0 0 1-.2-.2V9.377c0-.11.09-.2.2-.2h1.475c.11 0 .2.09.2.2zm-12.916 1.45v1.875c0 .346.28.625.625.625h13.75a.625.625 0 0 0 .625-.625v-1.875s-12.07-.128-15 0m3.958-1.45a.2.2 0 0 1-.2.2H4.838a.2.2 0 0 1-.2-.2V9.377c0-.11.09-.2.2-.2h1.475c.11 0 .2.09.2.2z"}),20/24);break;case"online_banking":i=je(ue(x,{children:[ue("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.25",d:"M14.25 17.708a3.75 3.75 0 1 0 0-7.5 3.75 3.75 0 0 0 0 7.5"}),ue("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",d:"M10.5 13.958H18m-3.75-3.75a5.437 5.437 0 0 0 0 7.5 5.44 5.44 0 0 0 0-7.5"}),ue("path",{fill:"currentColor",d:"M8.706 14.537c.15.97.574 1.848 1.188 2.556H3.18a.625.625 0 0 1-.625-.625v-1.875c1.115-.049 3.556-.06 6.151-.056M6.346 9.177c.092 0 .167.074.167.166v3.833a.167.167 0 0 1-.167.167H4.805a.167.167 0 0 1-.167-.167V9.343c0-.092.075-.166.167-.166zM9.263 9.177c.092 0 .167.074.167.166v1.69a5.1 5.1 0 0 0-.767 2.31H7.93a.167.167 0 0 1-.167-.167V9.343c0-.092.075-.166.167-.166zM11.484 9.177q-.428.21-.804.495v-.329c0-.092.074-.166.166-.166zM10.055 1.667c.309 0 .61.098.86.28l6.184 4.514c.814.593.629 1.463-.378 1.466H3.388c-1.007-.003-1.192-.873-.379-1.466l6.185-4.513c.25-.183.551-.281.86-.281"})]}),20/24);break;case"copy":i=je(ue(x,{children:[ue("path",{d:"M6 9.5H10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),ue("path",{d:"M6 7.5H10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),ue("path",{d:"M10 2.5H12.5C12.6326 2.5 12.7598 2.55268 12.8536 2.64645C12.9473 2.74021 13 2.86739 13 3V13.5C13 13.6326 12.9473 13.7598 12.8536 13.8536C12.7598 13.9473 12.6326 14 12.5 14H3.5C3.36739 14 3.24021 13.9473 3.14645 13.8536C3.05268 13.7598 3 13.6326 3 13.5V3C3 2.86739 3.05268 2.74021 3.14645 2.64645C3.24021 2.55268 3.36739 2.5 3.5 2.5H6",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),ue("path",{d:"M5.5 4.5V4C5.5 3.33696 5.76339 2.70107 6.23223 2.23223C6.70107 1.76339 7.33696 1.5 8 1.5C8.66304 1.5 9.29893 1.76339 9.76777 2.23223C10.2366 2.70107 10.5 3.33696 10.5 4V4.5H5.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]}),16/24);break;case"dummy":i=je(ue("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);break;default:throw new Error(`Icon with name ${t} does not exist`)}return ue("svg",{className:`xendit-icon ${e.className??""}`,width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:"none",children:ue("g",{transform:o,children:i})})};function je(e,t){return ue("g",{transform:`scale(${1/t} ${1/t})`,children:e})}function Fe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ge,Ve={exports:{}};
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Xendit={})}(this,function(e){"use strict";var t,n,r,o,i,a,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,y=Array.isArray;function b(e,t){for(var n in t)e[n]=t[n];return e}function g(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function v(e,n,r){var o,i,a,d={};for(a in n)"key"==a?o=n[a]:"ref"==a?i=n[a]:d[a]=n[a];if(arguments.length>2&&(d.children=arguments.length>3?t.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===d[a]&&(d[a]=e.defaultProps[a]);return $(e,d,o,i,null)}function $(e,t,o,i,a){var d={type:e,props:t,key:o,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==a?++r:a,__i:-1,__u:0};return null==a&&null!=n.vnode&&n.vnode(d),d}function x(e){return e.children}function w(e,t){this.props=e,this.context=t}function E(e,t){if(null==t)return e.__?E(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?E(e):null}function C(e){if(e.__P&&e.__d){var t=e.__v,r=t.__e,o=[],i=[],a=b({},t);a.__v=t.__v+1,n.vnode&&n.vnode(a),L(e.__P,a,t,e.__n,e.__P.namespaceURI,32&t.__u?[r]:null,o,null==r?E(t):r,!!(32&t.__u),i),a.__v=t.__v,a.__.__k[a.__i]=a,B(o,a,i),t.__e=t.__=null,a.__e!=r&&k(a)}}function k(e){if(null!=(e=e.__)&&null!=e.__c)return e.__e=e.__c.base=null,e.__k.some(function(t){if(null!=t&&null!=t.__e)return e.__e=e.__c.base=t.__e}),k(e)}function P(e){(!e.__d&&(e.__d=!0)&&o.push(e)&&!A.__r++||i!=n.debounceRendering)&&((i=n.debounceRendering)||a)(A)}function A(){try{for(var e,t=1;o.length;)o.length>t&&o.sort(d),e=o.shift(),t=o.length,C(e)}finally{o.length=A.__r=0}}function N(e,t,n,r,o,i,a,d,s,l,c){var u,h,p,m,b,g,v,w=r&&r.__k||_,C=t.length;for(s=function(e,t,n,r,o){var i,a,d,s,l,c=n.length,u=c,h=0;for(e.__k=new Array(o),i=0;i<o;i++)null!=(a=t[i])&&"boolean"!=typeof a&&"function"!=typeof a?("string"==typeof a||"number"==typeof a||"bigint"==typeof a||a.constructor==String?a=e.__k[i]=$(null,a,null,null,null):y(a)?a=e.__k[i]=$(x,{children:a},null,null,null):void 0===a.constructor&&a.__b>0?a=e.__k[i]=$(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):e.__k[i]=a,s=i+h,a.__=e,a.__b=e.__b+1,d=null,-1!=(l=a.__i=T(a,n,s,u))&&(u--,(d=n[l])&&(d.__u|=2)),null==d||null==d.__v?(-1==l&&(o>c?h--:o<c&&h++),"function"!=typeof a.type&&(a.__u|=4)):l!=s&&(l==s-1?h--:l==s+1?h++:(l>s?h--:h++,a.__u|=4))):e.__k[i]=null;if(u)for(i=0;i<c;i++)null!=(d=n[i])&&!(2&d.__u)&&(d.__e==r&&(r=E(d)),F(d,d));return r}(n,t,w,s,C),u=0;u<C;u++)null!=(p=n.__k[u])&&(h=-1!=p.__i&&w[p.__i]||f,p.__i=u,g=L(e,p,h,o,i,a,d,s,l,c),m=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&j(h.ref,null,p),c.push(p.ref,p.__c||m,p)),null==b&&null!=m&&(b=m),(v=!!(4&p.__u))||h.__k===p.__k?s=S(p,s,e,v):"function"==typeof p.type&&void 0!==g?s=g:m&&(s=m.nextSibling),p.__u&=-7);return n.__e=b,s}function S(e,t,n,r){var o,i;if("function"==typeof e.type){for(o=e.__k,i=0;o&&i<o.length;i++)o[i]&&(o[i].__=e,t=S(o[i],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=E(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function O(e,t){return t=t||[],null==e||"boolean"==typeof e||(y(e)?e.some(function(e){O(e,t)}):t.push(e)),t}function T(e,t,n,r){var o,i,a,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(o=n-1,i=n+1;o>=0||i<t.length;)if(null!=(l=t[a=o>=0?o--:i++])&&!(2&l.__u)&&d==l.key&&s==l.type)return a;return-1}function I(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,o){var i,a;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||I(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||I(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])i=t!=(t=t.replace(s,"$1")),a=t.toLowerCase(),t=a in e||"onFocusOut"==t||"onFocusIn"==t?a.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=l,e.addEventListener(t,i?u:c,i)):e.removeEventListener(t,i?u:c,i);else{if("http://www.w3.org/2000/svg"==o)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 M(e){return function(t){if(this.l){var r=this.l[t.type+e];if(null==t.t)t.t=l++;else if(t.t<r.u)return;return r(n.event?n.event(t):t)}}}function L(e,t,r,o,i,a,d,s,l,c){var u,h,p,f,m,v,$,E,C,k,P,A,S,O,T,I=t.type;if(void 0!==t.constructor)return null;128&r.__u&&(l=!!(32&r.__u),a=[s=t.__e=r.__e]),(u=n.__b)&&u(t);e:if("function"==typeof I)try{if(E=t.props,C=I.prototype&&I.prototype.render,k=(u=I.contextType)&&o[u.__c],P=u?k?k.props.value:u.__:o,r.__c?$=(h=t.__c=r.__c).__=h.__E:(C?t.__c=h=new I(E,P):(t.__c=h=new w(E,P),h.constructor=I,h.render=G),k&&k.sub(h),h.state||(h.state={}),h.__n=o,p=h.__d=!0,h.__h=[],h._sb=[]),C&&null==h.__s&&(h.__s=h.state),C&&null!=I.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=b({},h.__s)),b(h.__s,I.getDerivedStateFromProps(E,h.__s))),f=h.props,m=h.state,h.__v=t,p)C&&null==I.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),C&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(C&&null==I.getDerivedStateFromProps&&E!==f&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(E,P),t.__v==r.__v||!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(E,h.__s,P)){t.__v!=r.__v&&(h.props=E,h.state=h.__s,h.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(e){e&&(e.__=t)}),_.push.apply(h.__h,h._sb),h._sb=[],h.__h.length&&d.push(h);break e}null!=h.componentWillUpdate&&h.componentWillUpdate(E,h.__s,P),C&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(f,m,v)})}if(h.context=P,h.props=E,h.__P=e,h.__e=!1,A=n.__r,S=0,C)h.state=h.__s,h.__d=!1,A&&A(t),u=h.render(h.props,h.state,h.context),_.push.apply(h.__h,h._sb),h._sb=[];else do{h.__d=!1,A&&A(t),u=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++S<25);h.state=h.__s,null!=h.getChildContext&&(o=b(b({},o),h.getChildContext())),C&&!p&&null!=h.getSnapshotBeforeUpdate&&(v=h.getSnapshotBeforeUpdate(f,m)),O=null!=u&&u.type===x&&null==u.key?q(u.props.children):u,s=N(e,y(O)?O:[O],t,r,o,i,a,d,s,l,c),h.base=t.__e,t.__u&=-161,h.__h.length&&d.push(h),$&&(h.__E=h.__=null)}catch(e){if(t.__v=null,l||null!=a)if(e.then){for(t.__u|=l?160:128;s&&8==s.nodeType&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__e=s}else{for(T=a.length;T--;)g(a[T]);D(t)}else t.__e=r.__e,t.__k=r.__k,e.then||D(t);n.__e(e,t,r)}else null==a&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):s=t.__e=U(r.__e,t,r,o,i,a,d,l,c);return(u=n.diffed)&&u(t),128&t.__u?void 0:s}function D(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(D))}function B(e,t,r){for(var o=0;o<r.length;o++)j(r[o],r[++o],r[++o]);n.__c&&n.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){n.__e(e,t.__v)}})}function q(e){return"object"!=typeof e||null==e||e.__b>0?e:y(e)?e.map(q):b({},e)}function U(e,r,o,i,a,d,s,l,c){var u,h,p,_,m,b,v,$=o.props||f,x=r.props,w=r.type;if("svg"==w?a="http://www.w3.org/2000/svg":"math"==w?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),null!=d)for(u=0;u<d.length;u++)if((m=d[u])&&"setAttribute"in m==!!w&&(w?m.localName==w:3==m.nodeType)){e=m,d[u]=null;break}if(null==e){if(null==w)return document.createTextNode(x);e=document.createElementNS(a,w,x.is&&x),l&&(n.__m&&n.__m(r,d),l=!1),d=null}if(null==w)$===x||l&&e.data==x||(e.data=x);else{if(d=d&&t.call(e.childNodes),!l&&null!=d)for($={},u=0;u<e.attributes.length;u++)$[(m=e.attributes[u]).name]=m.value;for(u in $)m=$[u],"dangerouslySetInnerHTML"==u?p=m:"children"==u||u in x||"value"==u&&"defaultValue"in x||"checked"==u&&"defaultChecked"in x||R(e,u,null,m,a);for(u in x)m=x[u],"children"==u?_=m:"dangerouslySetInnerHTML"==u?h=m:"value"==u?b=m:"checked"==u?v=m:l&&"function"!=typeof m||$[u]===m||R(e,u,m,$[u],a);if(h)l||p&&(h.__html==p.__html||h.__html==e.innerHTML)||(e.innerHTML=h.__html),r.__k=[];else if(p&&(e.innerHTML=""),N("template"==r.type?e.content:e,y(_)?_:[_],r,o,i,"foreignObject"==w?"http://www.w3.org/1999/xhtml":a,d,s,d?d[0]:o.__k&&E(o,0),l,c),null!=d)for(u=d.length;u--;)g(d[u]);l||(u="value","progress"==w&&null==b?e.removeAttribute("value"):null!=b&&(b!==e[u]||"progress"==w&&!b||"option"==w&&b!=$[u])&&R(e,u,b,$[u],a),u="checked",null!=v&&v!=e[u]&&R(e,u,v,$[u],a))}return e}function j(e,t,r){try{if("function"==typeof e){var o="function"==typeof e.__u;o&&e.__u(),o&&null==t||(e.__u=e(t))}else e.current=t}catch(e){n.__e(e,r)}}function F(e,t,r){var o,i;if(n.unmount&&n.unmount(e),(o=e.ref)&&(o.current&&o.current!=e.__e||j(o,null,t)),null!=(o=e.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(e){n.__e(e,t)}o.base=o.__P=null}if(o=e.__k)for(i=0;i<o.length;i++)o[i]&&F(o[i],t,r||"function"!=typeof e.type);r||g(e.__e),e.__c=e.__=e.__e=void 0}function G(e,t,n){return this.constructor(e,n)}function V(e,r,o){var i,a,d;r==document&&(r=document.documentElement),n.__&&n.__(e,r),i=!1?null:r.__k,a=[],d=[],L(r,e=r.__k=v(x,null,[e]),i||f,f,r.namespaceURI,i?null:r.firstChild?t.call(r.childNodes):null,a,i?i.__e:r.firstChild,false,d),B(a,e,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,P(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"+h++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}t=_.slice,n={__e:function(e,t,n,r){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),a=o.__d),a)return o.__E=o}catch(t){e=t}throw e}},r=0,w.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=b({},this.state),"function"==typeof e&&(e=e(b({},n),this.props)),e&&b(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),P(this))},w.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),P(this))},w.prototype.render=x,o=[],a="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,d=function(e,t){return e.__v.__b-t.__v.__b},A.__r=0,s=/(PointerCapture)$|Capture$/i,l=0,c=M(!1),u=M(!0),h=0,null!=(p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0)&&p.__PREACT_DEVTOOLS__&&p.__PREACT_DEVTOOLS__.attachPreact("10.29.0",n,{Fragment:x,Component:w});var H={};function W(e){return e.type===x?"Fragment":"function"==typeof e.type?e.type.displayName||e.type.name:"string"==typeof e.type?e.type:"#text"}var X=[],z=[];function Y(){return X.length>0?X[X.length-1]:null}var Q=!0;function Z(e){return"function"==typeof e.type&&e.type!=x}function J(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 "+W(t);var n=t.__source;return n?e+=" (at "+n.fileName+":"+n.lineNumber+")":Q&&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."),Q=!1,e+"\n"},"")}var ee="function"==typeof WeakMap;function te(e){var t=[];return e.__k?(e.__k.forEach(function(e){e&&"function"==typeof e.type?t.push.apply(t,te(e)):e&&"string"==typeof e.type&&t.push(e.type)}),t):t}function ne(e){return e?"function"==typeof e.type?null==e.__?null!=e.__e&&null!=e.__e.parentNode?e.__e.parentNode.localName:"":ne(e.__):e.type:""}var re=w.prototype.setState;function oe(e){return"table"===e||"tfoot"===e||"tbody"===e||"thead"===e||"td"===e||"tr"===e||"th"===e}w.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'+J(Y())),re.call(this,e,t)};var ie=/^(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=w.prototype.forceUpdate;function de(e){var t=e.props,n=W(e),r="";for(var o in t)if(t.hasOwnProperty(o)&&"children"!==o){var i=t[o];"function"==typeof i&&(i="function "+(i.displayName||i.name)+"() {}"),i=Object(i)!==i||i.toString?i+"":Object.prototype.toString.call(i),r+=" "+o+"="+JSON.stringify(i)}var a=t.children;return"<"+n+r+(a&&a.length?">..</"+n+">":" />")}w.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'+J(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'+J(this.__v)),ae.call(this,e)},n.__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"+J(e))},function(){!function(){var e=n.__b,t=n.diffed,r=n.__,o=n.vnode,i=n.__r;n.diffed=function(e){Z(e)&&z.pop(),X.pop(),t&&t(e)},n.__b=function(t){Z(t)&&X.push(t),e&&e(t)},n.__=function(e,t){z=[],r&&r(e,t)},n.vnode=function(e){e.__o=z.length>0?z[z.length-1]:null,o&&o(e)},n.__r=function(e){Z(e)&&z.push(e),i&&i(e)}}();var e=!1,t=n.__b,r=n.diffed,o=n.vnode,i=n.__r,a=n.__e,d=n.__,s=n.__h,l=ee?{useEffect:new WeakMap,useLayoutEffect:new WeakMap,lazyPropTypes:new WeakMap}:null,c=[];n.__e=function(e,t,n,r){if(t&&t.__c&&"function"==typeof e.then){var o=e;e=new Error("Missing Suspense. The throwing component was: "+W(t));for(var i=t;i;i=i.__)if(i.__c&&i.__c.__c){e=o;break}if(e instanceof Error)throw e}try{(r=r||{}).componentStack=J(t),a(e,t,n,r),"function"!=typeof e.then&&setTimeout(function(){throw e})}catch(e){throw e}},n.__=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=W(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)},n.__b=function(n){var r=n.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"+de(n)+"\n\n"+J(n));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"+W(n)+" = "+de(r)+";\n let vnode = <My"+W(n)+" />;\n\nThis usually happens when you export a JSX literal and not the component.\n\n"+J(n));throw new Error("Invalid type passed to createElement(): "+(Array.isArray(r)?"array":r))}if(void 0!==n.ref&&"function"!=typeof n.ref&&"object"!=typeof n.ref&&!("$$typeof"in n))throw new Error('Component\'s "ref" property should be a function, or an object created by createRef(), but got ['+typeof n.ref+"] instead\n"+de(n)+"\n\n"+J(n));if("string"==typeof n.type)for(var o in n.props)if("o"===o[0]&&"n"===o[1]&&"function"!=typeof n.props[o]&&null!=n.props[o])throw new Error("Component's \""+o+'" property should be a function, but got ['+typeof n.props[o]+"] instead\n"+de(n)+"\n\n"+J(n));if("function"==typeof n.type&&n.type.propTypes){if("Lazy"===n.type.displayName&&l&&!l.lazyPropTypes.has(n.type)){var i="PropTypes are not supported on lazy(). Use propTypes on the wrapped component itself. ";try{var a=n.type();l.lazyPropTypes.set(n.type,!0),console.warn(i+"Component wrapped in lazy() is "+W(a))}catch(e){console.warn(i+"We will log the wrapped component's name once it is loaded.")}}var d=n.props;n.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,o){Object.keys(e).forEach(function(n){var i;try{i=e[n](t,n,r,"prop",null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){i=e}i&&!(i.message in H)&&(H[i.message]=!0,console.error("Failed prop type: "+i.message+(o&&"\n"+o()||"")))})}(n.type.propTypes,d,0,W(n),function(){return J(n)})}t&&t(n)};var u,h=0;n.__r=function(t){i&&i(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: "+W(t));u=n},n.__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")},_=Object.create({},f);n.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 i=t[r];"__source"===r?e.__source=i:"__self"===r?e.__self=i:n[r]=i}}e.__proto__=_,o&&o(e)},n.diffed=function(t){var n,o=t.type,i=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"+J(t))}}),t.__c===u&&(h=0),"string"==typeof o&&(oe(o)||"p"===o||"a"===o||"button"===o)){var a=ne(i);if(""!==a&&oe(o))"table"===o&&"td"!==a&&oe(a)?console.error("Improper nesting of table. Your <table> should not have a table-node parent."+de(t)+"\n\n"+J(t)):"thead"!==o&&"tfoot"!==o&&"tbody"!==o||"table"===a?"tr"===o&&"thead"!==a&&"tfoot"!==a&&"tbody"!==a?console.error("Improper nesting of table. Your <tr> should have a <thead/tbody/tfoot> parent."+de(t)+"\n\n"+J(t)):"td"===o&&"tr"!==a?console.error("Improper nesting of table. Your <td> should have a <tr> parent."+de(t)+"\n\n"+J(t)):"th"===o&&"tr"!==a&&console.error("Improper nesting of table. Your <th> should have a <tr>."+de(t)+"\n\n"+J(t)):console.error("Improper nesting of table. Your <thead/tbody/tfoot> should have a <table> parent."+de(t)+"\n\n"+J(t));else if("p"===o){var d=te(t).filter(function(e){return ie.test(e)});d.length&&console.error("Improper nesting of paragraph. Your <p> should not have "+d.join(", ")+" as child-elements."+de(t)+"\n\n"+J(t))}else"a"!==o&&"button"!==o||-1!==te(t).indexOf(o)&&console.error("Improper nesting of interactive content. Your <"+o+"> should not have other "+("a"===o?"anchor":"button")+" tags as child-elements."+de(t)+"\n\n"+J(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'+de(t)+"\n\n"+J(t));break}s.push(p)}}if(null!=t.__c&&null!=t.__c.__H){var f=t.__c.__H.__;if(f)for(var _=0;_<f.length;_+=1){var m=f[_];if(m.__H)for(var y=0;y<m.__H.length;y++)if((n=m.__H[y])!=n){var b=W(t);console.warn("Invalid argument passed to hook. Hooks should not be called with NaN in the dependency array. Hook index "+_+" in component "+b+" was called with NaN.")}}}}}();let se=!1;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{succeededChannel;static type="session-complete";constructor(e){super(XenditSessionCompleteEvent.type,{}),this.succeededChannel=e}}class XenditSessionExpiredOrCanceledEvent extends Event{static type="session-expired-or-canceled";constructor(){super(XenditSessionExpiredOrCanceledEvent.type,{})}}class XenditSessionPendingEvent extends Event{static type="session-pending";constructor(){super(XenditSessionPendingEvent.type,{})}}class XenditSessionNotPendingEvent extends Event{static type="session-not-pending";constructor(){super(XenditSessionNotPendingEvent.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}}const le=Symbol("xendit-internal");var ce=0;function ue(e,t,r,o,i,a){t||(t={});var d,s,l=t;if("ref"in l)for(s in l={},t)"ref"==s?d=t[s]:l[s]=t[s];var c={type:e,props:l,key:r,ref:d,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--ce,__i:-1,__u:0,__source:i,__self:a};if("function"==typeof e&&(d=e.defaultProps))for(s in d)void 0===l[s]&&(l[s]=d[s]);return n.vnode&&n.vnode(c),c}const he=e=>ue("div",{class:"xendit-accordion",children:e.children});var pe,fe,_e,me,ye=0,be=[],ge=n,ve=ge.__b,$e=ge.__r,xe=ge.diffed,we=ge.__c,Ee=ge.unmount,Ce=ge.__;function ke(e,t){ge.__h&&ge.__h(fe,e,ye||t),ye=0;var n=fe.__H||(fe.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function Pe(e){return ye=1,function(e,t,n){var r=ke(pe++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Ue(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=fe,!fe.__f)){var o=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter(function(e){return e.__c});if(o.every(function(e){return!e.__N}))return!i||i.call(this,e,t,n);var a=r.__c.props!==e;return o.some(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}}),i&&i.call(this,e,t,n)||a};fe.__f=!0;var i=fe.shouldComponentUpdate,a=fe.componentWillUpdate;fe.componentWillUpdate=function(e,t,n){if(this.__e){var r=i;i=void 0,o(e,t,n),i=r}a&&a.call(this,e,t,n)},fe.shouldComponentUpdate=o}return r.__N||r.__}(Ue,e)}function Ae(e,t){var n=ke(pe++,4);!ge.__s&&qe(n.__H,t)&&(n.__=e,n.u=t,fe.__h.push(n))}function Ne(e){return ye=5,Oe(function(){return{current:e}},[])}function Se(e,t,n){ye=6,Ae(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))}function Oe(e,t){var n=ke(pe++,7);return qe(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Te(e,t){return ye=8,Oe(function(){return e},t)}function Ie(e){var t=fe.context[e.__c],n=ke(pe++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(fe)),t.props.value):e.__}function Re(){for(var e;e=be.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(De),t.__h.some(Be),t.__h=[]}catch(n){t.__h=[],ge.__e(n,e.__v)}}}ge.__b=function(e){fe=null,ve&&ve(e)},ge.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Ce&&Ce(e,t)},ge.__r=function(e){$e&&$e(e),pe=0;var t=(fe=e.__c).__H;t&&(_e===fe?(t.__h=[],fe.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(De),t.__h.some(Be),t.__h=[],pe=0)),_e=fe},ge.diffed=function(e){xe&&xe(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==be.push(t)&&me===ge.requestAnimationFrame||((me=ge.requestAnimationFrame)||Le)(Re)),t.__H.__.some(function(e){e.u&&(e.__H=e.u),e.u=void 0})),_e=fe=null},ge.__c=function(e,t){t.some(function(e){try{e.__h.some(De),e.__h=e.__h.filter(function(e){return!e.__||Be(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],ge.__e(n,e.__v)}}),we&&we(e,t)},ge.unmount=function(e){Ee&&Ee(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{De(e)}catch(e){t=e}}),n.__H=void 0,t&&ge.__e(t,n.__v))};var Me="function"==typeof requestAnimationFrame;function Le(e){var t,n=function(){clearTimeout(r),Me&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Me&&(t=requestAnimationFrame(n))}function De(e){var t=fe,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),fe=t}function Be(e){var t=fe;e.__c=e.__(),fe=t}function qe(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function Ue(e,t){return"function"==typeof t?t(e):t}const je=e=>{const{name:t,size:n,direction:r}=e;let o,i;switch(r){case"right":o="rotate(180 12 12)";break;case"up":o="rotate(90 12 12)";break;case"down":o="rotate(-90 12 12)";break;default:o="rotate(0 12 12)"}switch(t){case"chevron":i=ue("path",{d:"M15 19.5L7.5 12L15 4.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"});break;case"check":i=Fe(ue("path",{d:"M13.5 4.5L6.5 11.5L3 8",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),16/24);break;case"x":i=ue(x,{children:[ue("path",{d:"M18.75 5.25L5.25 18.75",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),ue("path",{d:"M18.75 18.75L5.25 5.25",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]});break;case"card":i=Fe(ue("path",{fill:"currentColor",d:"M17.25 3.75H2.75A1.25 1.25 0 0 0 1.5 5v10a1.25 1.25 0 0 0 1.25 1.25h14.5A1.25 1.25 0 0 0 18.5 15V5a1.25 1.25 0 0 0-1.25-1.25m-.875 9.5a1 1 0 0 1-1 1h-2.5a1 1 0 0 1-1-1V13a1 1 0 0 1 1-1h2.5a1 1 0 0 1 1 1zM1.5 8V6h17v2z"}),20/24);break;case"qr":i=Fe(ue(x,{children:[ue("path",{fill:"currentColor",d:"M8.125 3.125h-3.75c-.69 0-1.25.56-1.25 1.25v3.75c0 .69.56 1.25 1.25 1.25h3.75c.69 0 1.25-.56 1.25-1.25v-3.75c0-.69-.56-1.25-1.25-1.25M8.125 10.625h-3.75c-.69 0-1.25.56-1.25 1.25v3.75c0 .69.56 1.25 1.25 1.25h3.75c.69 0 1.25-.56 1.25-1.25v-3.75c0-.69-.56-1.25-1.25-1.25M15.625 3.125h-3.75c-.69 0-1.25.56-1.25 1.25v3.75c0 .69.56 1.25 1.25 1.25h3.75c.69 0 1.25-.56 1.25-1.25v-3.75c0-.69-.56-1.25-1.25-1.25M11.25 14.375a.624.624 0 0 0 .625-.625v-2.5a.624.624 0 1 0-1.25 0v2.5a.624.624 0 0 0 .625.625"}),ue("path",{fill:"currentColor",d:"M16.25 11.875h-1.875v-.625a.624.624 0 1 0-1.25 0v4.375H11.25a.624.624 0 1 0 0 1.25h2.5a.624.624 0 0 0 .625-.625v-3.125h1.875a.624.624 0 1 0 0-1.25M16.25 14.375a.624.624 0 0 0-.625.625v1.25a.624.624 0 1 0 1.25 0V15a.624.624 0 0 0-.625-.625"})]}),20/24);break;case"otc":i=Fe(ue(x,{children:[ue("path",{fill:"currentColor","fill-rule":"evenodd",d:"M16.972 9.547c.092-.107.207-.021.207.12v6.924c0 .283-.23.513-.512.513h-7.18v-5.129a.513.513 0 0 0-.514-.512h-3.59a.513.513 0 0 0-.513.512v5.13H3.332a.514.514 0 0 1-.513-.514V9.853c0-.244.149-.33.331-.168.268.238.586.428.936.556a3.2 3.2 0 0 0 2.209 0c.35-.128.669-.318.936-.556a.56.56 0 0 1 .728 0c.267.238.586.428.935.556a3.2 3.2 0 0 0 2.209 0c.35-.128.669-.318.937-.556a.56.56 0 0 1 .727 0c.267.238.586.428.935.556a3.2 3.2 0 0 0 2.21 0c.349-.128.668-.318.936-.556.04-.036.081-.088.124-.138m-4.409 1.915a.513.513 0 0 0-.512.513v1.283c0 .283.23.512.512.513h2.052c.283 0 .513-.23.513-.513v-1.283a.513.513 0 0 0-.513-.512z","clip-rule":"evenodd"}),ue("path",{fill:"currentColor",d:"M16.325 3c.148 0 .293.054.412.153.118.1.204.24.245.398l.99 2.872a.51.51 0 0 1-.333.654 2.4 2.4 0 0 1-.166.495c-.145.31-.357.593-.625.831a2.9 2.9 0 0 1-.936.556 3.2 3.2 0 0 1-2.209 0 2.9 2.9 0 0 1-.936-.556.56.56 0 0 0-.727 0 2.9 2.9 0 0 1-.936.556 3.2 3.2 0 0 1-2.209 0 2.9 2.9 0 0 1-.936-.556.56.56 0 0 0-.728 0 2.9 2.9 0 0 1-.935.556 3.2 3.2 0 0 1-2.21 0 2.9 2.9 0 0 1-.936-.556 2.6 2.6 0 0 1-.624-.831 2.4 2.4 0 0 1-.167-.495.51.51 0 0 1-.33-.654l.99-2.872a.77.77 0 0 1 .244-.397A.64.64 0 0 1 3.675 3z"})]}),20/24);break;case"ewallet":i=Fe(ue("path",{fill:"currentColor","fill-rule":"evenodd",d:"M11.313 2.07c.94-.23 2.112.266 2.63 1.145H9.331c-1.242 0-2.295.021-3.171.053 1.648-.683 3.44-.78 5.153-1.198M4.338 17.855c1.061.072 2.691.145 4.971.145s3.91-.073 4.972-.145c1.168-.08 2.09-.963 2.186-2.134q.029-.335.054-.747a40 40 0 0 1-2.644-.012c-1.298-.052-2.345-1.039-2.405-2.362a26 26 0 0 1-.023-1.153q.002-.67.023-1.153c.06-1.323 1.107-2.31 2.405-2.362q.745-.029 1.494-.027.654 0 1.15.016a36 36 0 0 0-.054-.748c-.096-1.17-1.018-2.053-2.186-2.133-1.062-.073-2.692-.146-4.972-.146s-3.91.073-4.971.146c-1.169.08-2.09.962-2.187 2.133A53 53 0 0 0 2 11.447c0 1.922.073 3.326.151 4.274.096 1.171 1.018 2.053 2.187 2.134m8.675-5.325c.03.662.544 1.155 1.21 1.181q.508.022 1.274.024.766-.002 1.273-.024c.667-.026 1.18-.52 1.21-1.181q.019-.404.02-.971-.001-.569-.02-.971c-.03-.662-.544-1.156-1.21-1.182a32 32 0 0 0-1.273-.024c-.512 0-.934.01-1.274.024-.667.026-1.18.52-1.21 1.182q-.019.403-.02.97.001.569.02.972m2.041-1.749c.159 0 .311.05.424.137a.42.42 0 0 1 .175.33v.622a.42.42 0 0 1-.175.33.7.7 0 0 1-.424.136.7.7 0 0 1-.423-.137.42.42 0 0 1-.176-.33v-.621c0-.124.063-.242.176-.33a.7.7 0 0 1 .423-.137","clip-rule":"evenodd"}),20/24);break;case"bank_transfer":i=Fe(ue("path",{fill:"currentColor",d:"M9.195 1.947a1.46 1.46 0 0 1 1.72 0l6.184 4.514c.814.593.629 1.463-.378 1.466H3.388C2.38 7.924 2.196 7.054 3.01 6.46zm.235 11.196a.2.2 0 0 1-.2.2H7.963a.2.2 0 0 1-.2-.2V9.377c0-.11.09-.2.2-.2H9.23c.11 0 .2.09.2.2zm2.916 0a.2.2 0 0 1-.2.2H10.88a.2.2 0 0 1-.2-.2V9.377c0-.11.09-.2.2-.2h1.267c.11 0 .2.09.2.2zm3.125 0a.2.2 0 0 1-.2.2h-1.475a.2.2 0 0 1-.2-.2V9.377c0-.11.09-.2.2-.2h1.475c.11 0 .2.09.2.2zm-12.916 1.45v1.875c0 .346.28.625.625.625h13.75a.625.625 0 0 0 .625-.625v-1.875s-12.07-.128-15 0m3.958-1.45a.2.2 0 0 1-.2.2H4.838a.2.2 0 0 1-.2-.2V9.377c0-.11.09-.2.2-.2h1.475c.11 0 .2.09.2.2z"}),20/24);break;case"online_banking":i=Fe(ue(x,{children:[ue("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.25",d:"M14.25 17.708a3.75 3.75 0 1 0 0-7.5 3.75 3.75 0 0 0 0 7.5"}),ue("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",d:"M10.5 13.958H18m-3.75-3.75a5.437 5.437 0 0 0 0 7.5 5.44 5.44 0 0 0 0-7.5"}),ue("path",{fill:"currentColor",d:"M8.706 14.537c.15.97.574 1.848 1.188 2.556H3.18a.625.625 0 0 1-.625-.625v-1.875c1.115-.049 3.556-.06 6.151-.056M6.346 9.177c.092 0 .167.074.167.166v3.833a.167.167 0 0 1-.167.167H4.805a.167.167 0 0 1-.167-.167V9.343c0-.092.075-.166.167-.166zM9.263 9.177c.092 0 .167.074.167.166v1.69a5.1 5.1 0 0 0-.767 2.31H7.93a.167.167 0 0 1-.167-.167V9.343c0-.092.075-.166.167-.166zM11.484 9.177q-.428.21-.804.495v-.329c0-.092.074-.166.166-.166zM10.055 1.667c.309 0 .61.098.86.28l6.184 4.514c.814.593.629 1.463-.378 1.466H3.388c-1.007-.003-1.192-.873-.379-1.466l6.185-4.513c.25-.183.551-.281.86-.281"})]}),20/24);break;case"copy":i=Fe(ue(x,{children:[ue("path",{d:"M6 9.5H10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),ue("path",{d:"M6 7.5H10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),ue("path",{d:"M10 2.5H12.5C12.6326 2.5 12.7598 2.55268 12.8536 2.64645C12.9473 2.74021 13 2.86739 13 3V13.5C13 13.6326 12.9473 13.7598 12.8536 13.8536C12.7598 13.9473 12.6326 14 12.5 14H3.5C3.36739 14 3.24021 13.9473 3.14645 13.8536C3.05268 13.7598 3 13.6326 3 13.5V3C3 2.86739 3.05268 2.74021 3.14645 2.64645C3.24021 2.55268 3.36739 2.5 3.5 2.5H6",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),ue("path",{d:"M5.5 4.5V4C5.5 3.33696 5.76339 2.70107 6.23223 2.23223C6.70107 1.76339 7.33696 1.5 8 1.5C8.66304 1.5 9.29893 1.76339 9.76777 2.23223C10.2366 2.70107 10.5 3.33696 10.5 4V4.5H5.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]}),16/24);break;case"dummy":i=Fe(ue("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);break;default:throw new Error(`Icon with name ${t} does not exist`)}return ue("svg",{className:`xendit-icon ${e.className??""}`,width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:"none",children:ue("g",{transform:o,children:i})})};function Fe(e,t){return ue("g",{transform:`scale(${1/t} ${1/t})`,children:e})}function Ge(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ve,Ke={exports:{}};
|
|
3
3
|
/*!
|
|
4
4
|
Copyright (c) 2018 Jed Watson.
|
|
5
5
|
Licensed under the MIT License (MIT), see
|
|
6
6
|
http://jedwatson.github.io/classnames
|
|
7
|
-
*/var He=(Ge||(Ge=1,function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=o(e,r(n)))}return e}function r(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var r="";for(var i in e)t.call(e,i)&&e[i]&&(r=o(r,i));return r}function o(e,t){return t?e?e+" "+t:e+t:e}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}(Ve)),Ve.exports),We=Fe(He);const Ke=e=>{const{id:t,title:n,iconName:r,subtitle:o,disabled:i,open:a,onClick:d,children:s}=e,l=a?"up":"down",c=Te(()=>{i||d(t)},[i,d,t]),u=Te(e=>{"Enter"!==e.key&&" "!==e.key||(c(),e.preventDefault())},[c]),h=Te(()=>{c()},[c]);return ue("div",{className:We("xendit-accordion-item",i?"xendit-accordion-item-disabled":"",a?"xendit-accordion-item-open":"xendit-accordion-item-closed"),children:[ue("div",{className:"xendit-accordion-item-header",onClick:h,onKeyDown:u,role:"button",tabIndex:i?-1:0,children:[ue(Ue,{className:"xendit-accordion-item-header-icon",name:r,size:24}),ue("div",{className:"xendit-accordion-item-header-title xendit-text-16 xendit-text-bold",children:[n,o?ue("div",{className:"xendit-accordion-item-header-subtitle xendit-text-14",children:o}):null]}),ue(Ue,{className:"xendit-accordion-item-chevron",name:"chevron",size:24,direction:l})]}),ue("div",{className:"xendit-accordion-item-content",inert:!a,children:ue("div",{className:"xendit-accordion-item-padding",children:s})})]})},Xe=H(null);Xe.displayName="SessionContext";const ze=H(null);ze.displayName="BusinessContext";const Ye=H(null);Ye.displayName="CustomerContext";const Qe=H(null);Qe.displayName="ChannelsContext";const Ze=H(null);Ze.displayName="ChannelUiGroupsContext";const Je=H(null);Je.displayName="DigitalWalletsContext";const et=H(null);et.displayName="SdkContext";const tt=H(null);tt.displayName="CurrentChannelContext";const nt=()=>{const e=Ne(Xe);if(null===e)throw new Error("useSession must be used within a XenditSessionProvider");return e},rt=()=>{const e=Ne(Qe);if(null===e)throw new Error("useChannels must be used within a XenditSessionProvider");return e},ot=()=>Ne(Je),it=()=>{const e=Ne(et);if(null===e)throw new Error("useSdk must be used within a XenditSessionProvider");return e},at=()=>Ne(tt),dt=({children:e,data:t,sdk:n})=>{const{session:r,business:o,customer:i,channels:a,digitalWallets:d,channelUiGroups:s}=t,l=n.getCurrentChannel()?.[le]?.[0]??null;return"ACTIVE"!==n.getSdkStatus()||"ACTIVE"!==r.status?null:ue(et.Provider,{value:n,children:ue(tt.Provider,{value:l,children:ue(Xe.Provider,{value:r,children:ue(ze.Provider,{value:o,children:ue(Ye.Provider,{value:i,children:ue(Qe.Provider,{value:a,children:ue(Je.Provider,{value:d,children:ue(Ze.Provider,{value:s,children:e})})})})})})})})},st=300;function lt(e){if(!e)throw new Error("Assertion failed: argument is null or undefined; this is a bug, please contact support.")}function ct(e){if(!Array.isArray(e))throw new Error("Assertion failed: expected array; this is a bug, please contact support.")}function ut(e){if(Array.isArray(e))throw new Error("Assertion failed: expected array; this is a bug, please contact support.")}function ht(e,t){if(e!==t)throw new Error("Assertion failed; this is a bug, please contact support.")}function pt(e){return new Promise(t=>setTimeout(t,1*e))}class AbortError extends Error{constructor(){super("AbortError"),this.name="AbortError"}}function ft(e){return e instanceof AbortError&&"AbortError"===e.name}function mt(e,t){return new Promise((n,r)=>{function o(){t.removeEventListener("abort",o),clearTimeout(i),r(new AbortError)}const i=setTimeout(()=>{t.removeEventListener("abort",o),n()},1*e);t.aborted?o():t.addEventListener("abort",o)})}function _t(e){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]}function yt(e,t){if(e[le].options.enablePaylinks)return t.find(e=>"REDIRECT_CUSTOMER"===e.type&&"WEB_GOOGLE_PAYLINK"===e.descriptor)}const bt="mock",gt={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 vt(e){return gt[e]??null}function $t(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 xt(e){const t=Se();return Ae(()=>{t.current=e}),t.current}function wt(e){let t;if("string"==typeof e.channel_property)t=e.channel_property;else{t=Object.values(e.channel_property).join("__")}return t}const Et=Math.floor(255*Math.random());function Ct(e){const t=wt(e).split("").map(e=>(e.charCodeAt(0)%256^Et).toString(16)).join("");return`xendit-id-${t}`}function kt(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 Pt(){return[kt(8),kt(4),kt(4),kt(4),kt(12)].join("-")}function At(){return`xendit-id-${Se(kt(12)).current}`}function St(e){return"PRESENT_TO_CUSTOMER"===e.type}function Ot(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 Tt(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 Nt(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)}}}function It(e){const t=Nt("card_details.card_number",e);return"string"!=typeof t?null:t}function Rt(e){const t={version:0,publicKey:"",iv:"",cipherText:"",valid:!1,validationError:null,withoutValidationError:e};if(!e)return t;const n=e.split("-");if(n.length<6)throw new Error("Invalid encrypted field value format.");if("xendit"!==n[0])throw new Error("Invalid encrypted field value format.");if("encrypted"!==n[1])throw new Error("Invalid encrypted field value format.");const r=parseInt(n[2],10);if(isNaN(r)||r<=0)throw new Error("Invalid encrypted field value format.");if(t.version=r,t.publicKey=n[3],t.iv=n[4],t.cipherText=n[5],n.length>6){if("invalid"!==n[6])throw new Error("Invalid encrypted field value format.");t.validationError=atob(n[7]),t.withoutValidationError=n.slice(0,6).join("-")}else t.valid=!0;return t}const Mt=new WeakMap;let Lt=1;function Dt(e){return Mt.has(e)||Mt.set(e,Lt++),Mt.get(e).toString()}function qt(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 Bt(e,t){if("PAY"!==e.session_type)return!0;const n=e.amount,r=t.min_amount??0,o=t.max_amount??Number.MAX_VALUE;return!(n<r||n>o)}function Ut(e){Object.defineProperty(e,le,{enumerable:!1,writable:!1,configurable:!1,value:e[le]})}const jt={CARDS:!0,QRIS:!0,QR_PH:!0,PROMPTPAY:!0,SGQR:!0,ALIPAY:!0,APPOTA:!0,ASTRAPAY:!0,DANA:!0,GCASH:!0,GRABPAY:!0,JENIUSPAY:!0,LINEPAY:!0,LINKAJA:!0,NEXCASH:!0,OVO:!0,PAYMAYA:!0,SHOPEEPAY:!0,TOUCHNGO:!0,TRUEMONEY:!0,VNPTWALLET:!0,WECHATPAY:!0,ZALOPAY:!0,GOPAY:!0,GOPAY_RECURRING:!0};function Ft(e,t){for(const n of e)if(n.type.name===t)return!0;return!1}var Gt,Vt;!function(e){e.BARE="bare",e.PRIMARY_ROUNDED="primary-rounded",e.WHITE_ROUNDED="white-rounded"}(Gt||(Gt={})),function(e){e.SM="sm",e.MD="md"}(Vt||(Vt={}));const Ht=e=>{const{children:t,variant:n,size:r,type:o="button",...i}=e,a={[Gt.BARE]:void 0,[Gt.PRIMARY_ROUNDED]:"xendit-button-primary-rounded",[Gt.WHITE_ROUNDED]:"xendit-button-white-rounded"}[n],d={[Vt.SM]:"xendit-button-sm",[Vt.MD]:void 0}[r??Vt.MD];return ue("button",{...i,className:We(e.className,"xendit-button",a,d),type:o,children:t})},Wt=()=>{const e=.4*Math.PI,t=.4;return ue("svg",{className:"xendit-button-loading-spinner",viewBox:"-0.5 -0.5 1 1",children:ue("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"})})},Kt=e=>{const{id:t,options:n,onChange:r,defaultIndex:o=-1,selectedIndex:i,placeholder:a,disabled:d,className:s,fixedOverlayWidth:l,enableSearch:c}=e,u=it().t,h=At(),p=t||h,f="number"==typeof i,[m,_]=Pe(o),y=f?i:m,[b,g]=Pe(y>=0?y:0),[v,$]=Pe(!1),x=v&&!d&&n.length>0,[w,E]=Pe(""),[C,k]=Pe(0),P=Se(null),A=Se(null),S=Se(null),O=Se(null),T=Se(null),N=Se(null),I=Oe(()=>{const e=n.map(Qt).filter(({item:e})=>{if(""===w.trim())return!0;const t=w.toLowerCase();return e.title.toLowerCase().includes(t)||e.description?.toLowerCase().includes(t)||e.value.toLowerCase().includes(t)});return e.length>0?e:n.map(Qt)},[w,n]),R=Math.max(0,Math.min(I.length-1,b));Ae(()=>{if(l)return void k(l);const e=P.current;if(!e)return;const t=e.getBoundingClientRect().width;if(k(t),!window.ResizeObserver)return;const n=new ResizeObserver(t=>{for(const n of t)n.target===e&&n.borderBoxSize?.length&&k(n.borderBoxSize[0].inlineSize)});return n.observe(e),()=>n.disconnect()},[l]),Ae(()=>{if(!x)return;const e=N.current;if(!e)return;const t=P.current;if(!t)return;if(!window.ResizeObserver)return;function n(){if(!e)return;if(!t)return;const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();window.innerHeight-n.bottom<r.height?(e.style.position="fixed",e.style.bottom="0"):(e.style.position="",e.style.bottom="")}n();const r=new ResizeObserver(n);return r.observe(e),window.addEventListener("resize",n),window.addEventListener("scroll",n,!0),()=>{r.disconnect(),window.removeEventListener("resize",n),window.removeEventListener("scroll",n,!0)}},[x]),Ae(()=>{if(!x)return;const e=e=>{const t=A.current;t&&(t.contains(e.target)||$(!1))};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[x]),Ae(()=>{if(!x)return;const e=e=>{const t=A.current;t&&e.relatedTarget&&(t.contains(e.relatedTarget)||$(!1))};return document.body.addEventListener("focusout",e),()=>document.body.removeEventListener("focusout",e)},[x]),Ae(()=>{x&&y>=0&&g(y)},[x,y]),Ae(()=>{if(!x)return;if(!O.current)return;if(!S.current)return;const e=S.current.parentElement;e&&(e.scrollTop=O.current.offsetTop-e.clientHeight/2+O.current.clientHeight/2)},[x,b]);const M=Te(()=>{x||($(!0),queueMicrotask(()=>T.current?.focus()))},[x]),L=Te(()=>{x&&($(!1),E(""),P.current?.focus())},[x]),D=Te(()=>{x?L():M()},[L,x,M]),q=Te(e=>{const t=n[e];t&&(t.disabled||(f||_(e),r(t,e),L()))},[L,f,r,n]),B=Te(e=>{const t=e.target===T.current;if("Escape"===e.key)return e.preventDefault(),void L();if("Enter"===e.key||" "===e.key){if(t&&" "===e.key)return;e.preventDefault();const n=I[R];return void(n&&q(n.originalIndex))}return"ArrowDown"===e.key?(e.preventDefault(),void g(e=>Math.min(I.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(I.length-1)):void 0},[R,L,q,I]),U=Te(e=>{if(x)return B(e);"ArrowDown"!==e.key&&"ArrowUp"!==e.key&&" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),M())},[B,x,M]),j=Te(e=>{e.stopPropagation(),e.preventDefault(),q(Number(e.currentTarget.dataset.index))},[q]),F=Te(e=>{E(e.currentTarget.value),g(0)},[]),G=y>=0?n[y]:void 0;return ue("div",{className:"xendit-dropdown-container",ref:A,style:{"--xendit-dropdown-width":C+"px"},children:[ue("button",{id:p,ref:P,type:"button",className:`xendit-dropdown ${s} ${x?"xendit-dropdown-open":""} ${zt(G)?"xendit-dropdown-has-asset":""}`,"aria-expanded":x?"true":"false",onClick:D,onKeyDown:U,disabled:d,children:[G?.leadingAsset??null,ue("span",G?{className:"xendit-dropdown-text xendit-text-14",children:G.shortTitle??G.title}:{className:"xendit-dropdown-text xendit-text-14",children:a}),ue(Ue,{className:"xendit-dropdown-chevron",name:"chevron",size:16,direction:"down"})]}),x?ue("div",{className:"xendit-dropdown-overlay",style:{width:"var(--xendit-dropdown-width)"},ref:N,children:[c?ue("div",{className:"xendit-dropdown-search",children:ue("input",{ref:T,placeholder:u("combobox.default_search_placeholder"),value:w,onInput:F,onClick:Yt,onKeyDown:B})}):null,ue("ul",{ref:S,role:"listbox",tabIndex:-1,onKeyDown:B,children:I.map(({item:e,originalIndex:t},n)=>{const r=t===y,o=n===R;return ue("li",{role:"option","data-index":t,"aria-disabled":!!e.disabled||void 0,"aria-selected":r,onClick:j,ref:o?O:void 0,children:ue("div",{className:`xendit-dropdown-item xendit-text-14 ${o?"xendit-dropdown-item-active":""} ${e.leadingAsset?"xendit-dropdown-has-asset":""} ${e.disabled?"xendit-dropdown-item-disabled":""}`,children:[e.leadingAssetInOverlay??e.leadingAsset??null,ue("div",{className:"xendit-dropdown-item-text xendit-text-14",children:[ue("span",{className:"xendit-dropdown-item-title",children:e.title}),e.description&&ue("span",{className:"xendit-dropdown-item-description xendit-text-12",children:e.description})]}),r?ue(Ue,{name:"check",size:16,className:"xendit-dropdown-item-selected"}):null]})},t)})})]}):null]})},Xt=e=>ue("div",{className:"xendit-dropdown-container xendit-skeleton-field",children:ue("button",{className:`xendit-dropdown ${e.className}`,inert:!0,id:e.id,disabled:!0,type:"button",children:ue(Wt,{})})});function zt(e){return!!e&&!(!e.leadingAssetInOverlay&&!e.leadingAsset)}function Yt(e){e.stopPropagation()}function Qt(e,t){return{item:e,originalIndex:t}}function Zt(e){return function(e,t){if(e===t)throw new Error("Assertion failed; this is a bug, please contact support.")}(e.session_type,"AUTHORIZATION"),ht(e.mode,"COMPONENTS"),Tt({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,subscription:e.subscription?{immediatePayment:e.subscription.immediate_payment,schedule:{anchorDate:new Date(e.subscription.schedule.anchor_date),interval:e.subscription.schedule.interval,intervalCount:e.subscription.schedule.interval_count,retryInterval:e.subscription.schedule.retry_interval,retryIntervalCount:e.subscription.schedule.retry_interval_count,totalRecurrence:e.subscription.schedule.total_recurrence,totalRetry:e.subscription.schedule.total_retry}}:void 0,items:e.items?.map(e=>Tt({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 Jt(e,t,n,r){const o=Tt({groupId:e.id,label:e.label,get channels(){return(t[e.id]||[]).map(e=>tn(e,t,n,r))},[le]:e});return Ut(o),o}function en(e,t){return tn(e,{},{},t)}function tn(e,t,n,r){lt(!r.pairChannels.paired[e.channel_code]);const o=Tt({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 Jt(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})),[le]:r.pairChannels.pairs[e.channel_code]??[e]});return Ut(o),o}function nn(e){const t={};for(const n of e)t[n.id]=n;return t}function rn(e,t){if(t.pairChannels.paired[e.channel_code])return!1;if(t.options.filterMinMax&&!Bt(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 on(e,t){const n={};for(const r of e){if(!rn(r,t))continue;const e=r.ui_group;n[e]||(n[e]=[]),n[e].push(r)}return n}function an(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,o]of t)for(const e of o){if(!1===o[0].allow_save){const t=o.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 dn=e=>ue("hr",{className:"xendit-dotted-line"}),sn=e=>{const{group:t,open:n}=e,r=it(),{t:o}=r,i=nt(),a=rt(),d=at(),s=i.session_type,l=At(),[c,u]=Pe(null),h=Se(null),[p,f]=Pe(!1),m=Se(null),_=Oe(()=>an(a),[a]),y=Oe(()=>({pairChannels:_,session:{amount:i.amount,session_type:i.session_type},options:{filterMinMax:!1}}),[_,i.amount,i.session_type]),b=Oe(()=>a.filter(e=>rn(e,y)&&e.ui_group===t.id),[a,t.id,y]);Ae(()=>{if(!h.current)return;if(!d)return;if(!n)return;b.find(e=>e.channel_code===d.channel_code)&&(m.current=r.createChannelComponent(en(d,y)),m.current.parentElement!==h.current&&(f(!0),h.current.replaceChildren(m.current)))},[b,d,y,n,r]);const g=xt(n);Ae(()=>{if(n&&!g&&null===d&&null!==c){const e=b.find(e=>e.channel_code===c);e&&r.setCurrentChannel(en(e,y))}},[b,d,c,y,n,g,r]);const v=Te(e=>{const t=a.find(t=>t.channel_code===e.value)||null;u(t?.channel_code??null),r.setCurrentChannel(t?en(t,y):null)},[a,y,r]),$=Oe(()=>b.map(e=>({leadingAsset:ue("img",{className:"xendit-dropdown-channel-logo",src:e.brand_logo_url},e.channel_code),leadingAssetInOverlay:ue("img",{className:"xendit-channel-logo",src:e.brand_logo_url},e.channel_code),title:e.brand_name,value:e.channel_code,disabled:!Bt(i,e),description:ln(o,i,e)||void 0})),[b,i,o]),x=1===b.length&&"CARDS"===b[0].channel_code;return ue("div",{className:"xendit-channel-picker-group",children:[x?null:ue("div",{className:"xendit-channel-form-field-group",children:[ue("label",{htmlFor:l,className:"xendit-text-14",children:"SAVE"===s?o("payment_methods.add_payment_method",{groupName:t.label??"",ns:"session"}):o("payment_methods.pay_with")}),ue(Kt,{id:l,selectedIndex:function(){const e=$.findIndex(e=>e.value===d?.channel_code);if(-1!==e)return e;const t=$.findIndex(e=>e.value===c);return-1!==t?t:1===$.length?0:-1}(),options:$,disabled:$.length<=1,onChange:v,placeholder:o("payment_methods.select_channel_placeholder",{groupName:t.label,ns:"session"})})]}),!x&&p?ue(dn,{}):null,ue("div",{style:{display:p?"":"none"},ref:h})]})};function ln(e,t,n){return Bt(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 cn=e=>{const t=it(),n=Se(null),r=ot(),o=r?.google_pay;return Ae(()=>{if(n.current&&o){const e=t.createDigitalWalletComponent("GOOGLE_PAY");return n.current.appendChild(e),()=>{e.remove()}}},[o,t]),ue("div",{ref:n,className:"xendit-channel-picker-digital-wallet-section"})},un=e=>{const t=it(),n=nt(),r=(()=>{const e=Ne(Ze);if(null===e)throw new Error("useChannelUiGroups must be used within a XenditSessionProvider");return e})(),o=at(),i=rt(),{t:a}=it(),d=Oe(()=>on(i,{options:{filterMinMax:!1},pairChannels:an(i),session:n}),[i,n]),s=Se(null),l=Oe(()=>an(i),[i]),c=Oe(()=>({pairChannels:l,session:{amount:n.amount,session_type:n.session_type},options:{filterMinMax:!1}}),[l,n.amount,n.session_type]),u=o?.ui_group??null,[h,p]=Pe(null),f=Te(e=>{if(u===e||h===e)u===e&&s.current?.dispatchEvent(new XenditClearCurrentChannelEvent(e)),h===e&&p(null);else{const o=r.find(t=>t.id===e);lt(o);const s=hn(n,o,i,a).enabledChannels;if(0===s)return;if(1===s){const n=d[e][0];t.setCurrentChannel(en(n,c)),p(null)}else p(e),t.setCurrentChannel(null)}},[r,i,d,c,h,t,u,n,a]);Ae(()=>{null!==o&&null!==h&&p(null)},[o,h]);const m=t[le].options.enableDigitalWallets??!1;return ue("div",{ref:s,children:[m?ue(cn,{}):null,ue(he,{children:r.filter(e=>(d[e.id]||[]).length>0).map(e=>{const t=null!==u?u===e.id:h===e.id,r=hn(n,e,i,a),s=0===r.enabledChannels,l=r.firstDisabledChannelReason;return ue(Ke,{id:e.id,title:e.label,iconName:fn(u===e.id?o:null,d[e.id]),subtitle:l??void 0,open:t,disabled:s,onClick:f,children:ue(sn,{group:e,open:t})},e.id)})})]})};function hn(e,t,n,r){let o=null,i=0;for(const a of n)a.ui_group===t.id&&(Bt(e,a)?i++:null===o&&(o=ln(r,e,a)));return{enabledChannels:i,firstDisabledChannelReason:o}}const pn={CARDS:"card",QR_CODE:"qr",OVER_THE_COUNTER:"otc",EWALLET:"ewallet",BANK_TRANSFER:"bank_transfer",DIRECT_DEBIT:"bank_transfer",VIRTUAL_ACCOUNT:"bank_transfer",ONLINE_BANKING:"online_banking"};function fn(e,t){if(e&&e.pm_type&&pn[e.pm_type])return pn[e.pm_type];for(const e of t)if(e.pm_type&&pn[e.pm_type])return pn[e.pm_type];return"dummy"}class XenditClearCurrentChannelEvent extends Event{static type="xendit-clear-current-channel";uiGroup;constructor(e){super(XenditClearCurrentChannelEvent.type,{bubbles:!0,composed:!0}),this.uiGroup=e}}var mn={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","[024-7]\\d{7}",[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","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["(?:59(?:0(?:2[7-9]|3[3-7]|5[12]|87)|87\\d)|80[6-9]\\d\\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}"],["8[129]\\d{7}"],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","8776\\d{4}|(?:[27]\\d|61)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-8]"]]]],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,0,[["528[89]\\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}"]]],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","(?:694\\d|7093)\\d{5}|(?:59|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]|80[6-9]|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{8}|800\\d{5,6}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2358]"],"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","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|80[6-9]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["(?:59(?:0(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)|87\\d)|80[6-9]\\d\\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}"],["8[129]\\d{7}"],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","8\\d{13}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"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",["20"]],["(\\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]"]],["(\\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",["20"]]],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,"[5-8]"],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","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["(?:59(?:0(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)|87\\d)|80[6-9]\\d\\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}"],["8[129]\\d{7}"],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","7091\\d{5}|(?:[56]9|[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",["30|(?: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","30|(?: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","[78]\\d{8}|[2-9]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[2-9]"],"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","[36-8]\\d{5,8}|4\\d{6,8}|59\\d{6}|9\\d{5,10}|(?:2\\d|5[0-8])\\d{6,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",["3[289]|4[246-8]|61|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,"[3489]",0,"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|[3689]\\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-579]|61)","5(?:[0-579]|61[06])","5(?:[0-579]|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,[["(?:274[27]|(?: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-2478]|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|5[12]"]],["(\\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})|5(?:0\\d{3}|2[0-2]))\\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 _n(e,t){var n=Array.prototype.slice.call(t);return n.push(mn),e.apply(this,n)}function yn(e,t){e=e.split("-"),t=t.split("-");for(var n=e[0].split("."),r=t[0].split("."),o=0;o<3;o++){var i=Number(n[o]),a=Number(r[o]);if(i>a)return 1;if(a>i)return-1;if(!isNaN(i)&&isNaN(a))return 1;if(isNaN(i)&&!isNaN(a))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 bn={}.constructor;function gn(e){return null!=e&&e.constructor===bn}function vn(e){return vn="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},vn(e)}function $n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xn(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,wn(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function wn(e){var t=function(e,t){if("object"!=vn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=vn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==vn(t)?t:t+""}var En=" ext. ",Cn=/^\d+$/,kn=function(){return xn(function e(t){$n(this,e),Nn(t),this.metadata=t,Mn.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&&Cn.test(e)&&(t=e,e=null),e&&"001"!==e){if(!this.hasCountry(e))throw new Error("Unknown country: ".concat(e));this.numberingPlan=new Pn(this.getCountryMetadata(e),this)}else if(t){if(!this.hasCallingCode(t))throw new Error("Unknown calling code: ".concat(t));this.numberingPlan=new Pn(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}}])}(),Pn=function(){return xn(function e(t,n){$n(this,e),this.globalMetadataObject=n,this.metadata=t,Mn.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 An(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()&&Tn(this.types(),e))return new On(Tn(this.types(),e),this)}},{key:"ext",value:function(){return this.v1||this.v2?En:this.metadata[13]||En}}])}(),An=function(){return xn(function e(t,n){$n(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()||Sn.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}])}(),Sn=/^\(?\$1\)?$/,On=function(){return xn(function e(t,n){$n(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 Tn(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 Nn(e){if(!e)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!gn(e)||!gn(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(gn(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+In(e)+": "+e,"."))}var In=function(e){return vn(e)};function Rn(e,t){if((t=new kn(t)).hasCountry(e))return t.selectNumberingPlan(e).countryCallingCode();throw new Error("Unknown country: ".concat(e))}function Mn(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===yn(t,"1.2.0")?this.v2=!0:-1===yn(t,"1.7.35")?this.v3=!0:this.v4=!0:this.v1=!0}function Ln(e,t,n){return function(e,t,n,r){t&&(r=new kn(r.metadata)).selectNumberingPlan(t);var o=r.type(n),i=o&&o.possibleLengths()||r.possibleLengths();if(!i)return"IS_POSSIBLE";var a=e.length,d=i[0];if(d===a)return"IS_POSSIBLE";if(d>a)return"TOO_SHORT";if(i[i.length-1]<a)return"TOO_LONG";return i.indexOf(a,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}(e,t,void 0,n)}function Dn(e,t,n){return"IS_POSSIBLE"===Ln(e,t,n)}function qn(e,t){return e=e||"",new RegExp("^(?:"+t+")$").test(e)}function Bn(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 Un(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)?Un(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 Un(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 jn=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function Fn(e,t,n){if(t=t||{},e.country||e.countryCallingCode){(n=new kn(n)).selectNumberingPlan(e.country,e.countryCallingCode);var r=t.v2?e.nationalNumber:e.phone;if(qn(r,n.nationalNumberPattern())){if(Gn(r,"FIXED_LINE",n))return n.type("MOBILE")&&""===n.type("MOBILE").pattern()?"FIXED_LINE_OR_MOBILE":n.type("MOBILE")?Gn(r,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE":"FIXED_LINE_OR_MOBILE";for(var o,i=Bn(jn);!(o=i()).done;){var a=o.value;if(Gn(r,a,n))return a}}}}function Gn(e,t,n){var r=n.type(t);return!(!r||!r.pattern())&&(!(r.possibleLengths()&&r.possibleLengths().indexOf(e.length)<0)&&qn(e,r.pattern()))}function Vn(e,t,n){var r=new kn(n).getCountryCodesForCallingCode(e);return r?r.filter(function(e){return function(e,t,n){var r=new kn(n);if(r.selectNumberingPlan(t),r.numberingPlan.possibleLengths().indexOf(e.length)>=0)return!0;return!1}(t,e,n)}):[]}var Hn="0-90-9٠-٩۰-۹",Wn="".concat("-‐-―−ー-").concat("//").concat("..").concat(" ").concat("()()[]\\[\\]").concat("~⁓∼~"),Kn=new RegExp("(["+Hn+"])");function Xn(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 zn(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)?zn(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 zn(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 Yn(e,t){var n=t.nationalNumber,r=t.metadata,o=r.getCountryCodesForCallingCode(e);if(o)return 1===o.length?o[0]:function(e,t){var n=t.countries,r=t.metadata;r=new kn(r);for(var o,i=Xn(n);!(o=i()).done;){var a=o.value;if(r.selectNumberingPlan(a),r.leadingDigits()){if(e&&0===e.search(r.leadingDigits()))return a}else if(Fn({phone:e,country:a},void 0,r.metadata))return a}}(n,{countries:o,metadata:r.metadata})}function Qn(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 o,i,a,d=r.length-1,s=d>0&&r[d];if(t.nationalPrefixTransformRule()&&s)o=e.replace(n,t.nationalPrefixTransformRule()),d>1&&(i=r[1]);else{var l=r[0];o=e.slice(l.length),s&&(i=r[1])}if(s){var c=e.indexOf(r[1]);e.slice(0,c)===t.numberingPlan.nationalPrefix()&&(a=t.numberingPlan.nationalPrefix())}else a=r[0];return{nationalNumber:o,nationalPrefix:a,carrierCode:i}}}return{nationalNumber:e}}(e,n),o=r.carrierCode,i=r.nationalNumber;if(i!==e){if(!function(e,t,n){if(qn(e,n.nationalNumberPattern())&&!qn(t,n.nationalNumberPattern()))return!1;return!0}(e,i,n))return{nationalNumber:e};if(n.numberingPlan.possibleLengths()&&(t||(t=Yn(n.numberingPlan.callingCode(),{nationalNumber:i,metadata:n})),!function(e,t,n){switch(Ln(e,t,n)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}(i,t,n)))return{nationalNumber:e}}return{nationalNumber:i,carrierCode:o}}function Zn(e,t,n,r,o){if(!e)return{};var i;if("+"!==e[0]){var a=function(e,t,n,r){if(t){var o=new kn(r);o.selectNumberingPlan(t,n);var i=new RegExp(o.IDDPrefix());if(0===e.search(i)){var a=(e=e.slice(e.match(i)[0].length)).match(Kn);if(!(a&&null!=a[1]&&a[1].length>0&&"0"===a[1]))return e}}}(e,n,r,o);if(!a||a===e){if(n||r){var d=function(e,t,n,r,o){var i=n?Rn(n,o):r;if(0===e.indexOf(i)){(o=new kn(o)).selectNumberingPlan(n,i);var a=e.slice(i.length),d=Qn(a,t,o).nationalNumber,s=Qn(e,t,o).nationalNumber;if(!qn(s,o.nationalNumberPattern())&&qn(d,o.nationalNumberPattern())||"TOO_LONG"===Ln(s,t,o))return{countryCallingCode:i,number:a}}return{number:e}}(e,t,n,r,o),s=d.countryCallingCode,l=d.number;if(s)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:s,number:l}}return{number:e}}i=!0,e="+"+a}if("0"===e[1])return{};o=new kn(o);for(var c=2;c-1<=3&&c<=e.length;){var u=e.slice(1,c);if(o.hasCallingCode(u))return o.selectNumberingPlan(u),{countryCallingCodeSource:i?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:u,number:e.slice(c)};c++}return{}}var Jn=/(\$\d)/;function er(e,t,n){var r=n.useInternationalFormat,o=n.withNationalPrefix,i=e.replace(new RegExp(t.pattern()),r?t.internationalFormat():o&&t.nationalPrefixFormattingRule()?t.format().replace(Jn,t.nationalPrefixFormattingRule()):t.format());return r?function(e){return e.replace(new RegExp("[".concat(Wn,"]+"),"g")," ").trim()}(i):i}var tr=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;var nr=function(e){return"([".concat(Hn,"]{1,").concat(e,"})")};function rr(e){var t="[ \\t,]*",n="[:\\..]?[ \\t,-]*",r="#?",o="[ \\t]*";return";ext="+nr("20")+"|"+(t+"(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)"+n+nr("20")+r)+"|"+(t+"(?:[xx##~~]|int|int)"+n+nr("9")+r)+"|"+("[- ]+"+nr("6")+"#")+"|"+(o+"(?:,{2}|;)"+n+nr("15")+r)+"|"+(o+"(?:,)+"+n+nr("9")+r)}var or="["+Hn+"]{2}",ir="[++]{0,1}(?:["+Wn+"]*["+Hn+"]){3,}["+Wn+Hn+"]*",ar=new RegExp("^[++]{0,1}(?:["+Wn+"]*["+Hn+"]){1,2}$","i"),dr=ir+"(?:"+rr()+")?",sr=new RegExp("^"+or+"$|^"+dr+"$","i");var lr={formatExtension:function(e,t,n){return"".concat(e).concat(n.ext()).concat(t)}};function cr(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 o in n[e])n[0][o]=n[e][o];e++}return n[0]}({},lr,n):lr,r=new kn(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 o,i=r.countryCallingCode(),a=n.v2?e.nationalNumber:e.phone;switch(t){case"NATIONAL":return a?hr(o=ur(a,e.carrierCode,"NATIONAL",r,n),e.ext,r,n.formatExtension):"";case"INTERNATIONAL":return a?(o=ur(a,null,"INTERNATIONAL",r,n),hr(o="+".concat(i," ").concat(o),e.ext,r,n.formatExtension)):"+".concat(i);case"E.164":return"+".concat(i).concat(a);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(i).concat(a),ext:e.ext});case"IDD":if(!n.fromCountry)return;var d=function(e,t,n,r,o){var i=Rn(r,o.metadata);if(i===n){var a=ur(e,t,"NATIONAL",o);return"1"===n?n+" "+a:a}var d=function(e,t,n){var r=new kn(n);return r.selectNumberingPlan(e,t),r.defaultIDDPrefix()?r.defaultIDDPrefix():tr.test(r.IDDPrefix())?r.IDDPrefix():void 0}(r,void 0,o.metadata);if(d)return"".concat(d," ").concat(n," ").concat(ur(e,null,"INTERNATIONAL",o))}(a,e.carrierCode,i,n.fromCountry,r);if(!d)return;return hr(d,e.ext,r,n.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(t,'"'))}}function ur(e,t,n,r,o){var i,a,d=(i=r.formats(),a=e,function(e,t){for(var n=0;n<e.length;){if(t(e[n]))return e[n];n++}}(i,function(e){if(e.leadingDigitsPatterns().length>0){var t=e.leadingDigitsPatterns()[e.leadingDigitsPatterns().length-1];if(0!==a.search(t))return!1}return qn(a,e.pattern())}));return d?er(e,d,{useInternationalFormat:"INTERNATIONAL"===n,withNationalPrefix:!d.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!o||!1!==o.nationalPrefix}):e}function hr(e,t,n,r){return t?r(e,t,n):e}function pr(e){return pr="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},pr(e)}function fr(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 mr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fr(Object(n),!0).forEach(function(t){_r(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _r(e,t,n){return(t=br(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yr(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,br(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function br(e){var t=function(e,t){if("object"!=pr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=pr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==pr(t)?t:t+""}var gr=function(){return yr(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(gn(n)&&gn(n.countries)){r=n;var o=t;if(!$r.test(o))throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');var i=Zn(o,void 0,void 0,void 0,r);if(t=i.countryCallingCode,!(n=i.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");Nn(r);var a=function(e,t){var n,r,o=new kn(t);vr(e)?(n=e,o.selectNumberingPlan(n),r=o.countryCallingCode()):r=e;return{country:n,countryCallingCode:r}}(t,r),d=a.country,s=a.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]:Vn(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return function(e,t,n){if(void 0===t&&(t={}),n=new kn(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 Dn(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 kn(n)).selectNumberingPlan(e.country,e.countryCallingCode),n.hasTypes()?void 0!==Fn(e,t,n.metadata):qn(t.v2?e.nationalNumber:e.phone,n.nationalNumberPattern())}(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){return new kn(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(e){return this.number===e.number&&this.ext===e.ext}},{key:"getType",value:function(){return Fn(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(e,t){return cr(this,e,t?mr(mr({},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)}}])}(),vr=function(e){return/^[A-Z]{2}$/.test(e)};var $r=/^\+\d+$/;function xr(e){return xr="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},xr(e)}function wr(e,t,n){return t=Pr(t),function(e,t){if(t&&("object"==xr(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,Cr()?Reflect.construct(t,n||[],Pr(e).constructor):t.apply(e,n))}function Er(e){var t="function"==typeof Map?new Map:void 0;return Er=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(Cr())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&kr(o,n.prototype),o}(e,arguments,Pr(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),kr(n,e)},Er(e)}function Cr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Cr=function(){return!!e})()}function kr(e,t){return kr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kr(e,t)}function Pr(e){return Pr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pr(e)}var Ar=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=wr(this,t,[e]),Object.setPrototypeOf(n,t.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&&kr(e,t)}(t,e),function(e){return Object.defineProperty(e,"prototype",{writable:!1}),e}(t)}(Er(Error)),Sr=new RegExp("(?:"+rr()+")$","i");var Or={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 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 Ir(e){for(var t,n="",r=Tr(e.split(""));!(t=r()).done;){n+=Rr(t.value,n)||""}return n}function Rr(e,t,n){if("+"===e){if(t)return;return"+"}return function(e){return Or[e]}(e)}var Mr="(["+Hn+"]|[\\-\\.\\(\\)]?)",Lr=new RegExp("^\\+"+Mr+"*["+Hn+"]"+Mr+"*$","g"),Dr=new RegExp("^("+("["+Hn+"]+((\\-)*["+Hn+"])*")+"\\.)*"+("[a-zA-Z]+((\\-)*["+Hn+"])*")+"\\.?$","g"),qr="tel:",Br=";phone-context=";function Ur(e,t){var n,r=t.extractFormattedPhoneNumber,o=function(e){var t=e.indexOf(Br);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&&(Lr.test(e)||Dr.test(e))}(o))throw new Ar("NOT_A_NUMBER");if(null===o)n=r(e)||"";else{n="","+"===o.charAt(0)&&(n+=o);var i,a=e.indexOf(qr);i=a>=0?a+4:0;var d=e.indexOf(Br);n+=e.substring(i,d)}var s=n.indexOf(";isub=");if(s>0&&(n=n.substring(0,s)),""!==n)return n}var jr=new RegExp("[++"+Hn+"]"),Fr=new RegExp("[^"+Hn+"#]+$");function Gr(e,t,n){if(t=t||{},n=new kn(n),t.defaultCountry&&!n.hasCountry(t.defaultCountry)){if(t.v2)throw new Ar("INVALID_COUNTRY");throw new Error("Unknown country: ".concat(t.defaultCountry))}var r=function(e,t,n){var r=Ur(e,{extractFormattedPhoneNumber:function(e){return function(e,t,n){if(!e)return;if(e.length>250){if(n)throw new Ar("TOO_LONG");return}if(!1===t)return e;var r=e.search(jr);if(r<0)return;return e.slice(r).replace(Fr,"")}(e,n,t)}});if(!r)return{};if(!function(e){return e.length>=2&&sr.test(e)}(r))return function(e){return ar.test(e)}(r)?{error:"TOO_SHORT"}:{};var o=function(e){var t=e.search(Sr);if(t<0)return{};for(var n=e.slice(0,t),r=e.match(Sr),o=1;o<r.length;){if(r[o])return{number:n,ext:r[o]};o++}}(r);if(o.ext)return o;return{number:r}}(e,t.v2,t.extract),o=r.number,i=r.ext,a=r.error;if(!o){if(t.v2){if("TOO_SHORT"===a)throw new Ar("TOO_SHORT");throw new Ar("NOT_A_NUMBER")}return{}}var d=function(e,t,n,r){var o,i=Zn(Ir(e),void 0,t,n,r.metadata),a=i.countryCallingCodeSource,d=i.countryCallingCode,s=i.number;if(d)r.selectNumberingPlan(d);else{if(!s||!t&&!n)return{};r.selectNumberingPlan(t,n),t&&(o=t),d=n||Rn(t,r.metadata)}if(!s)return{countryCallingCodeSource:a,countryCallingCode:d};var l=Qn(Ir(s),o,r),c=l.nationalNumber,u=l.carrierCode,h=Yn(d,{nationalNumber:c,metadata:r});h&&(o=h,"001"===h||r.selectNumberingPlan(o));return{country:o,countryCallingCode:d,countryCallingCodeSource:a,nationalNumber:c,carrierCode:u}}(o,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 Ar("INVALID_COUNTRY");return{}}if(!l||l.length<2){if(t.v2)throw new Ar("TOO_SHORT");return{}}if(l.length>17){if(t.v2)throw new Ar("TOO_LONG");return{}}if(t.v2){var p=new gr(c,l,n.metadata);return s&&(p.country=s),h&&(p.carrierCode=h),i&&(p.ext=i),p.__countryCallingCodeSource=u,p}var f=!!(t.extended?n.hasSelectedNumberingPlan():s)&&qn(l,n.nationalNumberPattern());return t.extended?{country:s,countryCallingCode:c,carrierCode:h,valid:f,possible:!!f||!(!0!==t.extended||!n.possibleLengths()||!Dn(l,s,n)),phone:l,ext:i}:f?function(e,t,n){var r={country:e,phone:t};n&&(r.ext=n);return r}(s,l,i):{}}function Vr(e){return Vr="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},Vr(e)}function Hr(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 Wr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hr(Object(n),!0).forEach(function(t){Kr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Kr(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Vr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Vr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Vr(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xr(e){return Xr="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},Xr(e)}function zr(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 Yr(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Xr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Xr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Xr(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qr(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,o,i,a,d=[],s=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t);else for(;!(s=(r=i.call(n)).done)&&(d.push(r.value),d.length!==t);s=!0);}catch(e){l=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return d}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Zr(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)?Zr(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 Zr(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 Jr(e){var t,n,r,o=Qr(Array.prototype.slice.call(e),4),i=o[0],a=o[1],d=o[2],s=o[3];if("string"!=typeof i)throw new TypeError("A text for parsing must be a string.");if(t=i,a&&"string"!=typeof a){if(!gn(a))throw new Error("Invalid second argument: ".concat(a));d?(n=a,r=d):r=a}else s?(n=d,r=s):(n=void 0,r=d),a&&(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zr(Object(n),!0).forEach(function(t){Yr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({defaultCountry:a},n));return{text:t,options:n,metadata:r}}function eo(e){return eo="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},eo(e)}function to(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 no(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?to(Object(n),!0).forEach(function(t){ro(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):to(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ro(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=eo(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=eo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==eo(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oo(e,t,n){t&&t.defaultCountry&&!function(e,t){return t.countries.hasOwnProperty(e)}(t.defaultCountry,n)&&(t=no(no({},t),{},{defaultCountry:void 0}));try{return function(e,t,n){return Gr(e,Wr(Wr({},t),{},{v2:!0}),n)}(e,t,n)}catch(e){if(!(e instanceof Ar))throw e}}function io(){var e=Jr(arguments);return oo(e.text,e.options,e.metadata)}function ao(e){return new kn(e).getCountries()}function so(e,t,n){if(t[e])return new gr(e,t[e],n)}function lo(){return _n(io,arguments)}function co(){return _n(Rn,arguments)}const uo=({countryCode:e,size:t=16})=>ue("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"}}),ho=e=>{const{field:t,onChange:n}=e,r=Ct(t),o=wt(t),[i,a]=Pe(void 0),d=po.findIndex(e=>e.value===i),s=Se(null);fo(e=>{if(s.current){const t=po.find(t=>t.value===e);t&&l(t)}});const l=Te(e=>{a(e.value),s.current&&(s.current.value=e.value),n()},[n]);return ue("div",{children:[ue("input",{type:"hidden",name:o,defaultValue:"",ref:s}),ue(Kt,{id:r,options:po,onChange:l,placeholder:t.placeholder,selectedIndex:d,enableSearch:!0,className:"xendit-form-field-inner"})]})},po=function(){return _n(ao,arguments)}().map(e=>({title:new Intl.DisplayNames(["en"],{type:"region"}).of(e),value:e,leadingAsset:ue(uo,{countryCode:e})})).sort((e,t)=>e.title.localeCompare(t.title));function fo(e){const t=na()?.cardDetails,n=t?.details?.country_codes[0],r=xt(n);Ae(()=>{n&&n!==r&&e(n)})}const mo=e=>{const{field:t,onChange:n}=e,r=Ct(t),o=wt(t);if(!function(e){return"dropdown"===e.type.name}(t))throw new Error("DropdownField expects field.type.name to be 'dropdown'");const i=Se(null),a=Oe(()=>t.type.options.map(e=>({title:e.label,description:e.subtitle,value:e.value})),[t.type.options]),[d,s]=Pe(a[0]?.value??""),l=Te(e=>{i.current&&(i.current.value=e.value),s(e.value),n()},[n]);Ae(()=>{a.length&&l(a[0])},[]);const c=a.findIndex(e=>e.value===d);return ue(x,{children:[ue(Kt,{id:r,placeholder:t.placeholder,options:a,onChange:l,selectedIndex:c,className:"xendit-form-field-inner"}),ue("input",{type:"hidden",name:o,defaultValue:"",ref:i})]})};const _o="undefined"!=typeof window&&window.HTMLElement?window.HTMLElement:EventTarget;class XenditFormAssociatedFocusTrap extends _o{static tag="xendit-form-associated-focus-trap";static formAssociated=!0;internals;constructor(){super(),this.internals=this.attachInternals()}}var yo;yo=XenditFormAssociatedFocusTrap,"undefined"!=typeof window&&window.customElements&&customElements.define(yo.tag,yo);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}}const bo=H(null);lt("https://assets.xendit.co/components/secure-iframe-v0.0.21.html");const go=new URL("https://assets.xendit.co/components/secure-iframe-v0.0.21.html").origin,vo=({children:e})=>{const t=Se(new Map),n={registerIframe:(e,n)=>{n.current&&t.current.set(e,n.current)},unregisterIframe:e=>t.current.delete(e),postMessageToIframe:(e,n)=>{const r=t.current.get(e);r?.contentWindow&&r.contentWindow.postMessage(n,go)}};return ue(bo.Provider,{value:n,children:e})};lt("https://assets.xendit.co/components/secure-iframe-v0.0.21.html");const $o=new URL("https://assets.xendit.co/components/secure-iframe-v0.0.21.html"),xo=$o.toString(),wo=$o.origin,Eo=e=>{const{field:t,onChange:n}=e,r=it(),o=Ct(t),i=wt(t),a=nt(),d=Se(null),s=Se(null),[l,c]=Pe(),[u,h]=Pe(!1),[p,f]=Pe(null),{card:m}=ea()??{},_=Te(e=>{if(!d.current)return;const r=d.current.contentWindow;if(e.source!==r)return;if(e.origin!==wo)return;const o=e.data;switch(o.type){case"xendit-iframe-ready":c(o.ecdhPublicKey);break;case"xendit-iframe-change":{if(!s.current)return;f(o.cardBrand);const e=o.encrypted,t=1,r=e.map(e=>{if(o.empty)return"";const n=["xendit-encrypted",t,l,e.iv,e.value];return!o.valid&&o.validationErrorCodes.length&&n.push("invalid",btoa(o.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]),y=Te(()=>{d.current?.contentWindow&&d.current.contentWindow.postMessage({type:"xendit-iframe-focus"},wo)},[]);Ae(()=>(window.addEventListener("message",_),()=>{window.removeEventListener("message",_)}),[_]);const b=Ne(bo);Ae(()=>(b?.registerIframe(i,d),()=>b?.unregisterIframe(i)),[i,b]);const g=new URL(xo);g.searchParams.set("input_type",t.type.name),g.searchParams.set("embedder",window.location.origin),g.searchParams.set("session_id",a.payment_session_id),g.searchParams.set("pk",r[le].sdkKey.publicKey),g.searchParams.set("sig",r[le].sdkKey.signature),r[le].options.iframeFieldAppearance&&g.searchParams.set("appearance",JSON.stringify(r[le].options.iframeFieldAppearance));return ue("div",{className:`xendit-iframe-container xendit-form-field-inner ${u?"xendit-field-focus":""}`,children:[ue(XenditFormAssociatedFocusTrap.tag,{id:o,onFocus:y,tabIndex:-1}),ue("input",{type:"hidden",name:i,defaultValue:"",ref:s}),ue("iframe",{src:g.toString(),ref:d,sandbox:"allow-scripts allow-same-origin"}),"credit_card_number"===t.type.name&&m&&ue(Co,{cardsBrandList:m.brands,selectedCardBrand:p})]})},Co=({cardsBrandList:e,selectedCardBrand:t})=>{if(!e)return null;const n=e.find(e=>e.name===t)?.logo_url;return ue("div",{className:"xendit-card-brands-list",children:t?n&&ue("img",{className:"xendit-card-brand-logo",src:n,alt:t}):e.map(({name:e,logo_url:t})=>ue("img",{className:"xendit-card-brand-logo",src:t,alt:e},e))})};var ko={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:"450001234",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 Po=e=>{const{field:t,onChange:n}=e,r=Ct(t),o=wt(t),i=nt(),a=Se(null),[d,s]=Pe(i.country),l=Oe(()=>{const e=Ao.findIndex(e=>e.value===d);return-1===e?0:e},[d]),c=Ao[l],[u,h]=Pe(""),p=Se(null),f=Te((e,t)=>{const n=So(e,t);return n?n.number:`+${e.dial}${t}`},[]),m=Te((e,t)=>{a.current&&(a.current.value=f(e,t))},[f]);function _(e){const t=e;s(t.value),m(t,u),n()}return fo(e=>{const t=Ao.find(t=>t.value===e);t&&t.value!==d&&!u&&_(t)}),ue("div",{className:"xendit-input-phone",children:[ue(Kt,{options:Ao,selectedIndex:l,onChange:_,fixedOverlayWidth:300,enableSearch:!0,className:"xendit-form-field-inner"}),ue("input",{id:r,ref:p,type:"tel",inputMode:"tel",placeholder:function(){return _n(so,arguments)}(c.value,ko)?.formatInternational()?.replace(`+${co(c.value)} `,"")||"",className:"xendit-text-14 xendit-form-field-inner xendit-phone-number-input",onBlur:function(e){!function(){const e=So(c,u);if(e){const t=e.formatInternational();h(t.replace(`+${co(c.value)} `,""))}}(),e.currentTarget?.value&&a.current?.dispatchEvent(new InternalSetFieldTouchedEvent)},onChange:function(e){const t=e.target.value;h(t),m(c,t),n()},value:u,autoComplete:"tel"}),ue("input",{type:"hidden",name:o,ref:a})]})},Ao=po.map(e=>{const t=co(e.value);return t?{...e,shortTitle:`+${t}`,title:`${e.title} (+${t})`,dial:t}:null}).filter(e=>Boolean(e)),So=(e,t)=>{const n=lo(t,e.value);return n&&n.isPossible()?n:null};function Oo(e){return{title:e.name,value:e.value}}const To=[{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(Oo),No=[{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(Oo),Io=[{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})),Ro=e=>{const{field:t,onChange:n}=e,r=Ct(t),o=wt(t),i=nt(),a=ea()?.form,d=Bi(),s=Se(null),l=Te(()=>{s.current&&(s.current.value=""),n()},[n]),c=Te(e=>{s.current&&(s.current.value=e.value),n(),s.current?.dispatchEvent(new InternalSetFieldTouchedEvent)},[n]),u=Te(e=>{s.current&&(s.current.value=e.target.value),n(),s.current?.dispatchEvent(new InternalSetFieldTouchedEvent)},[n]),h=function(e){switch(e){case"US":return To;case"CA":return No;case"GB":return Io;default:return null}}(function(e,t,n,r){if(t)for(let r=0;r<t.length;r++){const o=t[r];if(r>0&&o===e){const e=t[r-1];if("country"===e.type.name){const t=Nt(e.channel_property,n);if(t&&"string"==typeof t)return t}}}return r.country}(t,a??[],d??{},i)),p=xt(h);return Ae(()=>{p!==h&&l()},[l,h,p]),ue(x,{children:[ue("input",{type:"hidden",name:o,defaultValue:"",ref:s}),h?ue(Kt,{id:r,options:h,onChange:c,placeholder:t.placeholder,enableSearch:!0,className:"xendit-form-field-inner"},Dt(h)):ue("input",{type:"text",id:r,onChange:u,placeholder:t.placeholder,className:"xendit-form-field-inner xendit-text-14"})]})};const Mo=e=>{const{field:t,onChange:n}=e,r=Ct(t),o=wt(t),i=Se(null);return ue("input",{id:r,name:o,ref:i,type:"text",placeholder:t.placeholder,className:"xendit-form-field-inner xendit-text-14",onBlur:function(e){e.currentTarget?.value&&i.current?.dispatchEvent(new InternalSetFieldTouchedEvent)},onChange:function(e){n()},minLength:Lo(t)?t.type.min_length:void 0,maxLength:Lo(t)?t.type.max_length:void 0,autoComplete:Lo(t)?t.type.autocomplete:void 0})};function Lo(e){return"text"===e.type.name}const Do={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"},qo={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$"},Bo={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$"},Uo={BHD:3,JOD:3,KWD:3,LYD:3,OMR:3,TND:3};function jo(e,t){let n;const r=e<0,o=Do[t]??"en",i=Uo[t]??2;if(n=new Intl.NumberFormat(o,{style:"decimal",minimumFractionDigits:i,maximumFractionDigits:20}).format(Math.abs(e)),n=n.replace(/(\.|,)000?$/,""),qo[t]){const e=qo[t]??t;n=(Bo[t]??"$1").replace("$",e).replace("1",n)}else n=t+" "+n;return r&&(n="-"+n),n}const Fo=e=>{const{field:t,onChange:n}=e,{t:r}=it(),o=nt(),i=Ct(t),a=wt(t),d=Se(null),s=ea();lt(s);const l=Oe(()=>Ft(s.form,"credit_card_number"),[s.form]),c=na()?.paymentOptions,u=c?.options?.installment_plans,[h,p]=Pe(null),f=Oe(()=>{const e=u?.map(e=>({title:r("installment_plan.pay_in_installments",{installments:e.terms,amount:jo(e.installment_amount,o.currency)}),subtitle:e.interest_rate,value:Go(e)}))??[];return l&&e.unshift({title:r("installment_plan.pay_in_full",{amount:jo(o.amount,o.currency)}),value:""}),e},[l,u,o.amount,o.currency,r]);let m=f?.findIndex(e=>e.value===h);-1===m&&(m=0);const _=Te(()=>{p(null),d.current&&(d.current.value="")},[]),y=Te(e=>{if(d.current){const t=u?.find(t=>Go(t)===e.value);t?t.code?d.current.value=JSON.stringify([t.terms,t.interval,t.code]):d.current.value=JSON.stringify([t.terms,t.interval]):d.current.value="",d.current?.dispatchEvent(new InternalSetFieldTouchedEvent)}p(e.value),n()},[u,n]);Ae(()=>{f.length&&y(f[0])},[]);const b=xt(f);return Ae(()=>{f===b||u?.some(e=>Go(e)===h)||(f.length?y(f[0]):_())},[_,f,y,u,b,h]),ue(x,{children:[c?ue(Kt,{id:i,placeholder:t.placeholder,onChange:y,options:f,selectedIndex:m,className:"xendit-form-field-inner"}):ue(Xt,{id:i,className:"xendit-form-field-inner"}),ue("input",{type:"hidden",name:a,ref:d})]})};function Go(e){return`${e.terms}_${e.interval}_${e.code??""}`}const Vo=e=>{const{field:t,className:n}=e;return ue("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 ue(Eo,{...e});case"phone_number":return ue(Po,{...e});case"text":case"email":case"postal_code":return ue(Mo,{...e});case"dropdown":return ue(mo,{...e});case"installment_plan":return ue(Fo,{...e});case"country":return ue(ho,{...e});case"province":return ue(Ro,{...e})}throw t.type,new Error(`Unsupported field type: ${t.type.name}`)}()})};const Ho={en:{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...","installment_plan.pay_in_full":"Pay in Full — {{amount}}","installment_plan.pay_in_installments":"{{installments}}x Installments — {{amount}}","google_pay_errors.developer_error.title":"Google Pay Error","google_pay_errors.developer_error.message":"Something went wrong with Google Pay. Please try again or use a different payment method.","google_pay_errors.buyer_account_error.title":"Google Pay Error","google_pay_errors.buyer_account_error.message":"Your Google account is unable to make this payment. Use a different Google account or a different payment method.","google_pay_errors.merchant_account_error.title":"Google Pay Error","google_pay_errors.merchant_account_error.message":"Something went wrong with Google Pay. Please try again or use a different payment method.","google_pay_errors.internal_error.title":"Google Pay Error","google_pay_errors.internal_error.message":"Something went wrong with Google Pay. Please try again or use a different payment method.","google_pay_errors.unknown_error.title":"Google Pay Error","google_pay_errors.unknown_error.message":"An unknown error occurred with Google Pay. The error code is {{statusCode}}.","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","action_va.merchant_name":"Virtual Account Name","action_va.amount_to_pay":"Amount to Pay","action_va.virtual_account_number":"Virtual Account Number","action_va.copy":"Copy","action_va.copied_to_clipboard":"Copied to clipboard","action_barcode.merchant_name":"Seller","action_barcode.amount_to_pay":"Amount to Pay","action_barcode.barcode_content":"Payment Code","action_barcode.unable_to_generate":"Unable to generate barcode","action_qr.unable_to_generate":"Unable to generate QR code","action_deeplink.button":"Open App","action_deeplink.instructions":"Please complete your payment on your {{channelName}} app.","action_deeplink.title":"Awaiting payment...","action_empty_list_push_notification.subtext":"Check the notification in your {{channelName}} app to complete your payment.","action_empty_list_push_notification.title":"Awaiting payment...","image_alt.channel_logo":"{{channelName}} logo","simulation.simulate_scenario":"Simulate scenario","simulation.simulate_test_scenario":"Simulate a test scenario","simulation.select_scenario":"Select a scenario","simulation.want_to_test_all_scenarios":"Want to test different scenarios?","simulation.see_all_scenarios":"See the full list here."}}.session,id:{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","action_va.amount_to_pay":"Jumlah Pembayaran","action_va.virtual_account_number":"Nomor Virtual Account","action_qr.unable_to_generate":"Tidak dapat membuat kode QR"}}.session,th:{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":"ฉันได้ชำระเงินแล้ว","action_va.amount_to_pay":"ยอดชำระ","action_va.virtual_account_number":"หมายเลข Virtual Account","action_qr.unable_to_generate":"ไม่สามารถสร้างคิวอาร์โค้ดได้"}}.session,vi:{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","action_va.amount_to_pay":"Số tiền cần thanh toán","action_va.virtual_account_number":"Số tài khoản định danh (Virtual Account)","action_qr.unable_to_generate":"Không thể tạo mã QR"}}.session};const Wo=(e,t,n)=>t?(e=>"object"==typeof e&&null!==e&&"localeKey"in e)(t)?e(t.localeKey,{field:n.label}):t.value:null;function Ko(e){return e.startsWith("/")&&e.endsWith("/")?e.slice(1,-1):e}function Xo(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=Rt(e);if(!t.valid){if(t.validationError)return{localeKey:t.validationError};throw new Error("Unexpected value in encrypted field, this is a bug, please contact support.")}}(t);case"phone_number":return(e=>{const t=lo(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(Ko(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 zo(e,t){const n=Array.isArray(e.channel_property)?e.channel_property:[e.channel_property];for(const r of n){let n=Yo(t,r);if(void 0===n&&(n=""),"string"!=typeof n)continue;const o=Xo(e,n);if(o)return o}}function Yo(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 Yo(r,n.slice(1).join("."))}}const Qo=H(null),Zo=({scenarios:e,onSelect:t,children:n})=>{const[r,o]=Pe(!1),i=Se(null);return Ae(()=>{if(!r)return;const e=e=>{const t=i.current;t&&(t.contains(e.target)||o(!1))};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[r]),ue("div",{ref:i,children:ue(Qo.Provider,{value:{open:r,setOpen:o,scenarios:e,onSelect:t},children:n})})},Jo=({children:e})=>ue("div",{className:"xendit-form-simulation-root",children:e}),ei=({children:e})=>{const{open:t,setOpen:n}=Ne(Qo)||{};return ue("button",{type:"button",className:"xendit-form-simulation-trigger",onClick:()=>n?.(!t),children:e})},ti=()=>{const e=Ne(Qo);lt(e);const{open:t,setOpen:n,scenarios:r,onSelect:o}=e,{t:i}=it();return t&&r?ue("div",{className:"xendit-form-simulation-popover",children:[ue("div",{className:"xendit-text-12 xendit-text-semibold",children:i("simulation.simulate_test_scenario")}),ue(Kt,{onChange:e=>{o?.(e.value),n?.(!1)},placeholder:i("simulation.select_scenario"),options:r.scenarios.map(e=>({title:e.description,value:e.name,leadingAsset:ue("img",{src:e.imageUrl,className:"xendit-channel-logo"})}))}),r?.docsLink?ue("div",{className:"xendit-text-14",children:[i("simulation.want_to_test_all_scenarios")," ",ue("a",{href:r.docsLink,target:"_blank",rel:"noopener noreferrer",className:"xendit-text-link",children:i("simulation.see_all_scenarios")})]}):null]}):null},ni="field-radius-bl-0",ri="field-radius-br-0",oi="field-radius-tl-0",ii="field-radius-tr-0",ai="field-collapse-r",di="field-collapse-l",si="field-collapse-t",li="field-collapse-b",ci=({fieldGroup:e,groupIndex:t,handleFieldChanged:n,channelProperties:r,simulationScenarios:o})=>{const{t:i}=it(),a=Se(null),[d,s]=Pe({}),l=e.map(e=>e.span),c=Math.ceil(e.reduce((e,t)=>e+t.span,0)/2);Ae(()=>{const e=a.current;if(e)return e.addEventListener(InternalSetFieldTouchedEvent.type,t),()=>{e.removeEventListener(InternalSetFieldTouchedEvent.type,t)};function t(e){const t=e.target.name;s(e=>({...e,[t]:!0}))}},[]);const u=(()=>{for(const t of e){if(!d[wt(t)])continue;const e=zo(t,r??{});if(e)return ue("span",{className:"xendit-error-message xendit-text-12",children:Wo(i,e,t)})}return null})();return ue(vo,{children:ue("div",{className:"xendit-channel-form-field-group",children:[ue("div",{className:"xendit-channel-form-field-group-label-container",children:[ue("label",{htmlFor:Ct(e[0]),className:"xendit-text-14",children:e[0].group_label??e[0].label??""}),o?ue(ui,{simulationScenarios:o,fieldGroup:e}):null]}),ue("div",{ref:a,className:"xendit-form-field-group "+(u?"invalid":""),children:e.map((e,t)=>{const r=(e=>{const t=l.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===c-1}})(t),o=((e,t,n)=>{const{fieldPositionBySpan:r,fieldRow:o,fieldColumn:i,isLastRow:a}=n;return We({[ni]:c>o+1||r%2==1,[ri]:!!l[t+1],[oi]:t>0,[ii]:!(0===o&&1===i||0===o&&0===i&&2===e.span),[ai]:1===e.span&&0===i,[di]:1===e.span&&1===i,[si]:r>=2,[li]:!a})})(e,t,r);return ue(Vo,{className:o,field:e,onChange:n},t)})},t),u]})})},ui=({simulationScenarios:e,fieldGroup:t})=>{const n=Ne(bo),{t:r}=it();return ue(Zo,{scenarios:e,onSelect:r=>{const o=e.scenarios.find(e=>e.name===r);if(o?.values)for(const[e,r]of Object.entries(o.values)){const o=t.find(t=>wt(t)===e);o&&("credit_card_number"!==o.type.name&&"credit_card_expiry"!==o.type.name&&"credit_card_cvn"!==o.type.name||n?.postMessageToIframe(e,{type:"xendit-iframe-populate-for-simulation",scenario:r}))}},children:ue(Jo,{children:[ue(ei,{children:ue("div",{className:"xendit-text-12 xendit-text-semibold xendit-text-link",children:r("simulation.simulate_scenario")})}),ue(ti,{})]})})};function hi(e,t){for(var n in t)e[n]=t[n];return e}function pi(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 fi(e,t){this.props=e,this.context=t}(fi.prototype=new w).isPureReactComponent=!0,fi.prototype.shouldComponentUpdate=function(e,t){return pi(this.props,e)||pi(this.state,t)};var mi=n.__b;n.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),mi&&mi(e)};var _i="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var yi=n.__e;n.__e=function(e,t,n,r){if(e.then)for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);yi(e,t,n,r)};var bi=n.unmount;function gi(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=hi({},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 gi(e,t,n)})),e}function vi(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return vi(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 $i(){this.__u=0,this.o=null,this.__b=null}function xi(e){var t=e.__&&e.__.__c;return t&&t.__a&&t.__a(e)}function wi(){this.i=null,this.l=null}n.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),bi&&bi(e)},($i.prototype=new w).__c=function(e,t){var n=t.__c,r=this;null==r.o&&(r.o=[]),r.o.push(n);var o=xi(r.__v),i=!1,a=function(){i||r.__z||(i=!0,n.__R=null,o?o(s):s())};n.__R=a;var d=n.__P;n.__P=null;var s=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=vi(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.__P=d,t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},$i.prototype.componentWillUnmount=function(){this.o=[]},$i.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]=gi(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&v(x,null,e.fallback);return o&&(o.__u&=-33),[v(x,null,t.__a?null:e.children),o]};var Ei=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]}};(wi.prototype=new w).__a=function(e){var t=this,n=xi(t.__v),r=t.l.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),Ei(t,e,r)):o()};n?n(i):i()}},wi.prototype.render=function(e){this.i=null,this.l=new Map;var t=T(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},wi.prototype.componentDidUpdate=wi.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){Ei(e,n,t)})};var Ci="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,ki=/^(?: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]/,Pi=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Ai=/[A-Z0-9]/g,Si="undefined"!=typeof document,Oi=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};w.prototype.isReactComponent=!0,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(w.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Ti=n.event;n.event=function(e){return Ti&&(e=Ti(e)),e.persist=function(){},e.isPropagationStopped=function(){return this.cancelBubble},e.isDefaultPrevented=function(){return this.defaultPrevented},e.nativeEvent=e};var Ni={configurable:!0,get:function(){return this.class}},Ii=n.vnode;n.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={},o=-1==n.indexOf("-");for(var i in t){var a=t[i];if(!("value"===i&&"defaultValue"in t&&null==a||Si&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var d=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===a?a="":"translate"===d&&"no"===a?a=!1:"o"===d[0]&&"n"===d[1]?"ondoubleclick"===d?i="ondblclick":"onchange"!==d||"input"!==n&&"textarea"!==n||Oi(t.type)?"onfocus"===d?i="onfocusin":"onblur"===d?i="onfocusout":Pi.test(i)&&(i=d):d=i="oninput":o&&ki.test(i)?i=i.replace(Ai,"-$&").toLowerCase():null===a&&(a=void 0),"oninput"===d&&r[i=d]&&(i="oninputCapture"),r[i]=a}}"select"==n&&(r.multiple&&Array.isArray(r.value)&&(r.value=T(t.children).forEach(function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)})),null!=r.defaultValue&&(r.value=T(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",Ni)):t.className&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=Ci,Ii&&Ii(e)};var Ri=n.__r;n.__r=function(e){Ri&&Ri(e),e.__c};var Mi=n.diffed;n.diffed=function(e){Mi&&Mi(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)};const Li={scenarios:[{imageUrl:"https://assets.xendit.co/payment-session/logos/VISA.svg",description:"3DS Challenge",name:"3_ds_challenge_authentication_is_successful_if_otp_is_correct_visa",values:{"card_details.card_number":"3_ds_challenge_authentication_is_successful_if_otp_is_correct_visa","card_details.expiry_month__card_details.expiry_year":"3_ds_challenge_authentication_is_successful_if_otp_is_correct_visa","card_details.cvn":"3_ds_challenge_authentication_is_successful_if_otp_is_correct_visa"}},{imageUrl:"https://assets.xendit.co/payment-session/logos/VISA.svg",description:"3DS Frictionless, success",name:"3_ds_frictionless_authentication_is_successful_visa",values:{"card_details.card_number":"3_ds_frictionless_authentication_is_successful_visa","card_details.expiry_month__card_details.expiry_year":"3_ds_frictionless_authentication_is_successful_visa","card_details.cvn":"3_ds_frictionless_authentication_is_successful_visa"}},{imageUrl:"https://assets.xendit.co/payment-session/logos/MASTERCARD.svg",description:"3DS Challenge",name:"3_ds_challenge_authentication_is_successful_if_otp_is_correct_mastercard",values:{"card_details.card_number":"3_ds_challenge_authentication_is_successful_if_otp_is_correct_mastercard","card_details.expiry_month__card_details.expiry_year":"3_ds_challenge_authentication_is_successful_if_otp_is_correct_mastercard","card_details.cvn":"3_ds_challenge_authentication_is_successful_if_otp_is_correct_mastercard"}},{imageUrl:"https://assets.xendit.co/payment-session/logos/MASTERCARD.svg",description:"3DS Frictionless, success",name:"3_ds_frictionless_authentication_is_successful_mastercard",values:{"card_details.card_number":"3_ds_frictionless_authentication_is_successful_mastercard","card_details.expiry_month__card_details.expiry_year":"3_ds_frictionless_authentication_is_successful_mastercard","card_details.cvn":"3_ds_frictionless_authentication_is_successful_mastercard"}},{imageUrl:"https://assets.xendit.co/payment-session/logos/VISA.svg",description:"3DS Frictionless, success",name:"3_ds_frictionless_authentication_is_successful_visa2",values:{"card_details.card_number":"3_ds_frictionless_authentication_is_successful_visa2","card_details.expiry_month__card_details.expiry_year":"3_ds_frictionless_authentication_is_successful_visa2","card_details.cvn":"3_ds_frictionless_authentication_is_successful_visa2"}},{imageUrl:"https://assets.xendit.co/payment-session/logos/MASTERCARD.svg",description:"3DS Frictionless, success",name:"3_ds_frictionless_authentication_is_successful_mastercard2",values:{"card_details.card_number":"3_ds_frictionless_authentication_is_successful_mastercard2","card_details.expiry_month__card_details.expiry_year":"3_ds_frictionless_authentication_is_successful_mastercard2","card_details.cvn":"3_ds_frictionless_authentication_is_successful_mastercard2"}},{imageUrl:"https://assets.xendit.co/payment-session/logos/VISA.svg",description:"Failure",name:"failing_transaction_visa",values:{"card_details.card_number":"failing_transaction_visa","card_details.expiry_month__card_details.expiry_year":"failing_transaction_visa","card_details.cvn":"failing_transaction_visa"}},{imageUrl:"https://assets.xendit.co/payment-session/logos/MASTERCARD.svg",description:"Failure",name:"failing_transaction_mastercard",values:{"card_details.card_number":"failing_transaction_mastercard","card_details.expiry_month__card_details.expiry_year":"failing_transaction_mastercard","card_details.cvn":"failing_transaction_mastercard"}},{imageUrl:"https://assets.xendit.co/payment-session/logos/AMEX.svg",description:"3DS Frictionless, success",name:"3_ds_frictionless_authentication_successful_use_a_4_digit_cvn",values:{"card_details.card_number":"3_ds_frictionless_authentication_successful_use_a_4_digit_cvn","card_details.expiry_month__card_details.expiry_year":"3_ds_frictionless_authentication_successful_use_a_4_digit_cvn","card_details.cvn":"3_ds_frictionless_authentication_successful_use_a_4_digit_cvn"}},{imageUrl:"https://assets.xendit.co/payment-session/logos/AMEX.svg",description:"3DS Frictionless, success",name:"3_ds_frictionless_authentication_successful_use_a_4_digit_cvn2",values:{"card_details.card_number":"3_ds_frictionless_authentication_successful_use_a_4_digit_cvn2","card_details.expiry_month__card_details.expiry_year":"3_ds_frictionless_authentication_successful_use_a_4_digit_cvn2","card_details.cvn":"3_ds_frictionless_authentication_successful_use_a_4_digit_cvn2"}},{imageUrl:"https://assets.xendit.co/payment-session/logos/AMEX.svg",description:"3DS Challenge",name:"3_ds_challenge_use_a_4_digit_cvn",values:{"card_details.card_number":"3_ds_challenge_use_a_4_digit_cvn","card_details.expiry_month__card_details.expiry_year":"3_ds_challenge_use_a_4_digit_cvn","card_details.cvn":"3_ds_challenge_use_a_4_digit_cvn"}}],docsLink:"https://docs.xendit.co/docs/cards-simulate-card-scenarios"},Di=function(e){function t(t){var n=hi({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=_i,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(),o=ea(),i=it(),a=na(),d=Se(null),[s,l]=Pe(null);!function(e,t,n){ye=6,Ae(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=d.current;e&&Array.from(e.elements).filter(e=>e instanceof HTMLInputElement).forEach(e=>{e.name&&e.dispatchEvent(new InternalSetFieldTouchedEvent)})}}));const c=Te(()=>{if(!d.current)return{};return function(e){const t={};for(const[n,r]of e){if(r instanceof Blob)continue;const e=n.split("__"),o=Ui(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 i=o.length?o.shift():"";r[e[0]]=i}}return t}(new FormData(d.current).entries())},[]),u=Te(()=>{if(!d.current)return;const e=c();l(e),t(e)},[c,t]),h=function(e,t,n,r){const o=Oe(()=>ji(e.session_type,t,n,r),[r,n,t,e.session_type]);return o}(r,e,s||{},a??null),p=xt(h);!function(e,t){var n=ke(pe++,3);!ge.__s&&qe(n.__H,t)&&(n.__=e,n.u=t,fe.__H.__h.push(n))}(()=>{(function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0})(p||[],h)||u()},[h,u,p]);const f=Te(e=>i.supportsSimulationScenarios()&&"CARDS"===o?.channel_code&&e.some(e=>"credit_card_number"===e.type.name)?Li:null,[o,i]),m=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}(h).filter(e=>e.length);return 0===m.length?null:ue("div",{class:"xendit-channel-form",children:ue("form",{ref:d,children:ue(qi.Provider,{value:s,children:m.map((e,t)=>ue(ci,{fieldGroup:e,groupIndex:t,handleFieldChanged:u,channelProperties:s,simulationScenarios:f(e)},t))})})})}),qi=H(null),Bi=()=>Ne(qi);function Ui(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 ji(e,t,n,r){const o=Ft(t,"credit_card_number"),i=r?.cardDetails?.details?.require_billing_information,a=!!r?.paymentOptions?.options?.installment_plans?.length;return t.filter(t=>{if(t.flags?.require_billing_information){if("PAY"!==e)return!1;if(!i)return!1}if("installment_plan"===t.type.name&&!a&&o)return!1;for(const e of t.display_if||[]){const[t,r,o]=e,i=Yo(n,t);switch(r){case"equals":if(i!==o)return!1;break;case"not_equals":if(i===o)return!1}}return!0})}const Fi=e=>{const t=Se(null),n=Se(null),r=void 0!==HTMLElement.prototype.animate;return Ae(()=>{r&&(t.current?.animate(Gi,Vi),n.current?.animate(Hi,Wi))},[r]),ue("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[ue("g",{opacity:"0.5",children:[ue("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"}),ue("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"})]}),ue("g",{ref:n,style:{transformOrigin:"20px 20px"},children:[ue("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"}),ue("g",{style:{transformOrigin:"10px 30px"},ref:t,children:[ue("path",{d:"M26.7697 20.5301V12.7301H18.9697",stroke:"#7C7C7C",strokeWidth:"1.872",strokeLinecap:"round",strokeLinejoin:"round"}),ue("path",{d:"M17.4102 22.0901L26.7702 12.7301",stroke:"#7C7C7C",strokeWidth:"1.872",strokeLinecap:"round",strokeLinejoin:"round"})]})]})]})},Gi=[{transform:"scale(0.1)"},{transform:"scale(1)"}],Vi={duration:500,easing:"ease-out"},Hi=[{transform:"rotate(0deg)"},{transform:"rotate(5deg)"},{transform:"rotate(-5deg)"},{transform:"rotate(0deg)"}],Wi={duration:1e3,easing:"ease-out",iterations:1/0,delay:2e3},Ki=[{transform:"translateY(0)"},{transform:"translateY(44px)"}],Xi={duration:1e3,delay:1e3,easing:"ease-out"},zi={duration:1e3,direction:"reverse",delay:500,easing:"ease-in"},Yi=[{opacity:1},{opacity:0},{opacity:1}],Qi={duration:1e3},Zi=e=>{const{id:t,label:n,checked:r,onChange:o,disabled:i}=e,a=At(),d=t||a;return ue("div",{className:"xendit-checkbox",children:[ue("div",{className:"xendit-checkbox-box",children:[ue("input",{id:d,type:"checkbox",onChange:e=>{o?.(e)},checked:r,disabled:i}),ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",className:"xendit-checkbox-graphic",children:ue("polyline",{points:"40 144 96 200 224 72",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"16"})})]}),ue("label",{htmlFor:d,className:"xendit-text-14",children:n})]})},Ji=H(null),ea=()=>{const e=Ne(Ji);if(void 0===e)throw new Error("useChannel must be used within a ChannelProvider");return e},ta=H(null);ta.displayName="ChannelComponentDataContext";const na=()=>Ne(ta),ra=e=>{const{channelOrPair:t,channelData:n,savePaymentMethod:r,formRef:o}=e,i=Se(null),a=it(),{t:d}=a,s=nt(),l=t[0],c=t.length>1,u=qt(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 Ae(()=>{h||u.form.length||u.banner||console.error(`Missing display data for ${u.channel_code}, this is a bug, please contact support`)},[h,u.banner,u.channel_code,u.form]),ue(Ji.Provider,{value:u,children:ue(ta.Provider,{value:n,children:ue("div",{className:"xendit-payment-channel",ref:i,children:[ue(Di,{ref:o,form:u.form,onChannelPropertiesChanged:e=>{let t=e;if("CARDS"===l.channel_code&&e.installment_configuration){const n=Object.fromEntries(Object.entries(e.installment_configuration).filter(([e,t])=>""!==t));t=0===Object.keys(n).length?{...e,installment_configuration:void 0}:{...e,installment_configuration:n}}const n=new XenditChannelPropertiesChangedEvent(l.channel_code,t);i.current?.dispatchEvent(n)}}),u.banner?ue(ia,{banner:u.banner}):null,p&&ue(Zi,{label:d("payment.save_checkbox_label"),onChange:e=>{const t=e.target?.checked;a?.dispatchEvent(new InternalUpdateChannelComponentData(l.channel_code,{savePaymentMethod:t}))},checked:r}),h?ue("div",{className:"xendit-payment-channel-instructions",children:[oa[u.pm_type??""]??ue(Fi,{}),ue("div",{className:"xendit-payment-channel-instructions-text xendit-text-12",children:h.map((e,t)=>ue("p",{className:0===t?"xendit-text-semibold":void 0,children:e},t))})]}):null]})})})},oa={EWALLET:ue(Fi,{}),QR_CODE:ue(e=>{const t=Se(null),n=Se(null),r=At(),o=void 0!==HTMLElement.prototype.animate;return Ae(()=>{if(o&&t.current){const e=()=>{if(!t.current)return;const r=t.current.animate(Ki,Xi);setTimeout(()=>{n.current?.animate(Yi,Qi)},1e3),r.onfinish=()=>{const r=t.current?.animate(Ki,zi);setTimeout(()=>{n.current?.animate(Yi,Qi)},500),r&&(r.onfinish=e)}};e()}},[o]),ue("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"var(--xendit-color-icon-primary)",xmlns:"http://www.w3.org/2000/svg",...e,children:[ue("g",{"clip-path":`url(#${r})`,children:[ue("rect",{x:"8",y:"8",width:"24",height:"24",fill:"var(--xendit-color-icon-secondary)",ref:n}),ue("path",{d:"M11.5 13.1528C11.5 12.24 12.24 11.5 13.1528 11.5H17.4028C18.3156 11.5 19.0556 12.24 19.0556 13.1528V17.4028C19.0556 18.3156 18.3156 19.0556 17.4028 19.0556H13.1528C12.24 19.0556 11.5 18.3156 11.5 17.4028V13.1528Z"}),ue("path",{d:"M20.9444 13.1528C20.9444 12.24 21.6844 11.5 22.5972 11.5H26.8472C27.76 11.5 28.5 12.24 28.5 13.1528V17.4028C28.5 18.3156 27.76 19.0556 26.8472 19.0556H22.5972C21.6844 19.0556 20.9444 18.3156 20.9444 17.4028V13.1528Z"}),ue("path",{d:"M11.5 22.5972C11.5 21.6844 12.24 20.9444 13.1528 20.9444H17.4028C18.3156 20.9444 19.0556 21.6844 19.0556 22.5972V26.8472C19.0556 27.76 18.3156 28.5 17.4028 28.5H13.1528C12.24 28.5 11.5 27.76 11.5 26.8472V22.5972Z"}),ue("path",{d:"M20.9444 22.5972C20.9444 21.6844 21.6844 20.9444 22.5972 20.9444H26.8472C27.76 20.9444 28.5 21.6844 28.5 22.5972V26.8472C28.5 27.76 27.76 28.5 26.8472 28.5H22.5972C21.6844 28.5 20.9444 27.76 20.9444 26.8472V22.5972Z"}),ue("path",{d:"M7.875 23C8.35825 23 8.75 23.3918 8.75 23.875V30.2754C8.75021 30.6755 9.07451 30.9998 9.47461 31H15.875C16.3582 31 16.75 31.3918 16.75 31.875C16.75 32.3582 16.3582 32.75 15.875 32.75H9.47461C8.10801 32.7498 7.00021 31.642 7 30.2754V23.875C7 23.3918 7.39175 23 7.875 23Z"}),ue("path",{d:"M31.875 23C32.3582 23 32.75 23.3918 32.75 23.875V30.2754C32.7498 31.642 31.642 32.7498 30.2754 32.75H23.875C23.3918 32.75 23 32.3582 23 31.875C23 31.3918 23.3918 31 23.875 31H30.2754C30.6755 30.9998 30.9998 30.6755 31 30.2754V23.875C31 23.3918 31.3918 23 31.875 23Z"}),ue("path",{d:"M15.875 7C16.3582 7 16.75 7.39175 16.75 7.875C16.75 8.35825 16.3582 8.75 15.875 8.75H9.47461C9.07451 8.75021 8.75021 9.07451 8.75 9.47461V15.875C8.75 16.3582 8.35825 16.75 7.875 16.75C7.39175 16.75 7 16.3582 7 15.875V9.47461C7.00021 8.10801 8.10801 7.00021 9.47461 7H15.875Z"}),ue("path",{d:"M30.2754 7C31.642 7.00021 32.7498 8.10801 32.75 9.47461V15.875C32.75 16.3582 32.3582 16.75 31.875 16.75C31.3918 16.75 31 16.3582 31 15.875V9.47461C30.9998 9.07451 30.6755 8.75021 30.2754 8.75H23.875C23.3918 8.75 23 8.35825 23 7.875C23 7.39175 23.3918 7 23.875 7H30.2754Z"}),ue("rect",{x:"3",y:"-4",width:"34",height:"4",rx:"1.75",ref:t})]}),ue("defs",{children:ue("clipPath",{id:r,children:ue("rect",{width:"40",height:"40",fill:"white"})})})]})},{})},ia=e=>{const t="number"==typeof e.banner.aspect_ratio?String(e.banner.aspect_ratio):void 0;return e.banner?.link_url?ue("a",{href:e.banner.link_url,target:"_blank",rel:"noopener noreferrer",children:ue("img",{src:e.banner.image_url,alt:e.banner.alt_text,className:"xendit-payment-channel-banner",style:{aspectRatio:t}})}):ue("img",{src:e.banner.image_url,alt:e.banner.alt_text,className:"xendit-payment-channel-banner",style:{aspectRatio:t}})};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 aa(e){const t=new URLSearchParams;return t.append("payload",JSON.stringify(e)),t}function da(e,t,n){return async function(...r){let o,i,a,d,s;switch(e){case"GET":[o,i,a,s]=r;break;case"POST":[o,d,i,a,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.21";lt(l),lt(l.startsWith("v"));const c=o.hostId;if(c===bt)throw new Error("A network request was made in mock mode; this is a bug.");const u=vt(c);if(!u)throw new Error(`Unknown hostId ${c} in sdkKey; this is a bug, please contact support.`);const h=new URL(t(i),u);if(n&&!a)throw new Error("Query string argument is missing; this is a bug, please contact support.");const p=n?.(a)??new URLSearchParams;p.set("components_version",l),h.search=p.toString();const f={method:e,body:d?aa(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 sa=da("GET",e=>`/api/sessions/${e}`),la=da("POST",()=>"/api/sessions/payment_tokens"),ca=da("POST",()=>"/api/sessions/payment_requests"),ua=da("POST",e=>`/api/sessions/${e.sessionAuthKey}/payment_requests/${e.paymentRequestId}/simulate`),ha=da("GET",e=>`/api/sessions/${e}/poll`,e=>new URLSearchParams(e?{token_request_id:e}:{})),pa=da("POST",e=>`/api/sessions/${e}/card_info`),fa=da("POST",e=>`/api/sessions/${e}/payment_options`);function ma(e,t,n){return{impl:e,key:t??"",child:n,instance:void 0}}class BehaviorTree{fn;bb;root=ma(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,_a(e);const t=this.root??void 0,n=this.fn(this.bb);this.root=n,ya(t,n,this.bb,0)}}finally{this.updating=!1}}findBehavior(e){return va(this.root,e)}}function _a(e){if(e>32)throw new Error("Max recursion depth exceeded; this is a bug, please contact support.")}function ya(e,t,n,r){if(_a(r),function(e,t){return void 0===e||void 0===t||Array.isArray(e)!==Array.isArray(t)||(!Array.isArray(e)||!Array.isArray(t))&&(ut(e),ut(t),e.impl!==t.impl||e.key!==t.key)}(e,t))e&&ga(e,r+1),t&&ba(t,n,r+1);else if(Array.isArray(e)||Array.isArray(t)){ct(e),ct(t);const o=Math.max(e.length,t.length);for(let i=0;i<o;i++)ya(e[i],t[i],n,r+1)}else t&&(t.instance=e?.instance),e&&(e.instance=void 0),ya(e?.child,t?.child,n,r+1),t?.instance?.update?.()}function ba(e,t,n){if(_a(n),Array.isArray(e))for(const r of e)r&&ba(r,t,n+1);else e.instance=new e.impl(t,e.key),e.instance.enter?.(),e.child&&ba(e.child,t,n+1)}function ga(e,t){if(_a(t),Array.isArray(e))for(const n of e)n&&ga(n,t+1);else e.child&&ga(e.child,t+1),e.instance?.exit?.(),e.instance=void 0}function va(e,t){if(Array.isArray(e))for(const n of e){if(!n)continue;const e=va(n,t);if(e)return e}else{if(e.impl===t)return e.instance??null;if(e.child)return va(e.child,t)}return null}class ActionCompletedBehavior{bb;constructor(e){this.bb=e}enter(){}}const $a=e=>ue("div",{className:"xendit-redirect-instructions",children:[ue("div",{className:"xendit-redirect-instructions-logo",children:ue("img",{src:e.logoUrl,alt:e.logoAlt})}),ue("div",{className:"xendit-redirect-instructions-text",children:[ue("div",{className:"xendit-text-16",children:e.title}),e.subtitle?ue("div",{className:"xendit-text-14 xendit-text-secondary",children:e.subtitle}):null]}),e.redirectUrl?ue("a",{href:e.redirectUrl,className:"xendit-redirect-instructions-button xendit-text-14",children:e.redirectButtonLabel??""}):null]}),xa=e=>{const t=e.t,n=e.channel,r=n.brand_name;return ue($a,{title:t("action_deeplink.title"),subtitle:t("action_deeplink.instructions",{channelName:r}),logoUrl:n.brand_logo_url,logoAlt:t("image_alt.channel_logo",{channelName:r}),redirectUrl:e.redirectUrl,redirectButtonLabel:t("action_deeplink.button",{channelName:r})})},wa=e=>{const{title:t,onClose:n,children:r,seamless:o,borderColor:i}=e,a=Se(!1),d=Se(!1),s=Se(null),l=Se(null),c=void 0!==HTMLElement.prototype.animate,u=Te(()=>{a.current||(a.current=!0,n())},[n]),h=Te(()=>{if(!s.current||!l.current||d.current)return;if(d.current=!0,!c)return void u();l.current.animate?.(Pa,Ca);const e=s.current.animate?.(Sa,Ca);e.onfinish=u},[u,c]);return Ae(()=>{c&&(l.current?.animate?.(ka,Ea),s.current?.animate?.(Aa,Ea))},[c]),Ae(()=>{e.close&&h()},[e.close,h]),ue("div",{className:"xendit-dialog-backdrop",ref:l,children:ue("div",{className:"xendit-dialog",ref:s,style:i?{border:`4px solid ${i}`}:void 0,children:[o?null:ue("div",{className:"xendit-dialog-header xendit-text-16 xendit-text-semibold",children:[t,ue("button",{"aria-label":"Close",onClick:h,children:ue(Ue,{name:"x",size:20})})]}),ue("div",{className:"xendit-dialog-body",style:e.noPadding?{padding:"0"}:void 0,children:r}),o?ue("button",{"aria-label":"Close",onClick:h,className:"xendit-dialog-floating-close",children:ue(Ue,{name:"x",size:20})}):null]})})},Ea={duration:500,easing:"cubic-bezier(.32,.23,0,.92)",fill:"forwards"},Ca={duration:200,easing:"linear",fill:"forwards"},ka=[{backgroundColor:"rgba(0, 0, 0, 0)"},{backgroundColor:"rgba(0, 0, 0, 0.2)",offset:.1},{backgroundColor:"rgba(0, 0, 0, 0.6)"}],Pa=ka.slice().reverse(),Aa=[{opacity:0,transform:"scale(0.98) translateY(-40px) rotateX(15deg)"},{opacity:0,transform:"scale(0.98) translateY(-40px) rotateX(15deg)"},{opacity:1,transform:""}],Sa=[{opacity:1,transform:""},{opacity:0,transform:"scale(0.92) translateY(-10px)"}];function Oa(e){const{sdk:t,title:n,onClose:r,width:o,height:i,borderColor:a}=e,d=Se(null);return Ae(()=>{const e=t.createActionContainerComponent(le);return d.current?.replaceChildren(e),()=>{t.destroyComponent(e)}},[t]),ue(wa,{title:n,onClose:r,close:e.close,borderColor:a,noPadding:e.defaultActionContainerType===Ta.QrWithCustomArt,seamless:!0,children:ue("div",{className:"xendit-default-action-container",ref:d,style:{width:o?`calc(min(100vw - 64px, ${o}px))`:"calc(100vw - 64px)",height:i?`calc(min(100vh - 64px, ${i}px))`:void 0}})})}var Ta;!function(e){e.QrWithCustomArt="qr-with-custom-art",e.Generic="generic"}(Ta||(Ta={}));class ContainerActionBehavior{bb;cleanupFn=null;defaultContainerHeight=0;defaultContainerWidth=400;title="Complete your payment";constructor(e){this.bb=e}ensureHasActionContainer(e=Ta.Generic){if(lt(this.bb.channel),this.bb.sdk[le].liveComponents.actionContainer)return()=>{this.emptyActionContainer()};let t=!1,n=!1;const r=document.createElement("div");r.setAttribute("class","xendit-default-action-container");const o={sdk:this.bb.sdk,title:this.title,width:this.defaultContainerWidth,height:this.defaultContainerHeight,borderColor:void 0,defaultActionContainerType:e,onClose:()=>{t=!0,V(null,r),r.remove(),n||this.bb.sdk.abortSubmission()}};return V(v(Oa,o),r),document.body.appendChild(r),e=>{e||(n=!0),t||V(v(Oa,{...o,close:!0}),r)}}cleanupActionContainer(e){this.cleanupFn&&(this.cleanupFn(e),this.cleanupFn=null)}emptyActionContainer(){const e=this.bb.sdk[le].liveComponents.actionContainer;e&&V(null,e)}updateActionContainerBrandColor(){lt(this.bb.channel);const e=this.bb.sdk[le].liveComponents.actionContainer;e&&e.style.setProperty("--xendit-channel-brand-color",this.bb.channel.brand_color)}populateActionContainer(e){const t=this.bb.sdk[le].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.");this.updateActionContainerBrandColor(),V(e(),t)}exit(){this.cleanupActionContainer(!1),this.emptyActionContainer()}}class ActionDeepLinkBehavior extends ContainerActionBehavior{bb;actionIndex;constructor(e,t){super(e),this.bb=e,this.actionIndex=t}enter(){lt(this.bb.world);const e=this.bb.world?.paymentEntity?.entity.actions[Number(this.actionIndex)];if(ht(e?.type,"REDIRECT_CUSTOMER"),"DEEPLINK_URL"!==e.descriptor&&"WEB_URL"!==e.descriptor)throw new Error("Unexpected action type in ActionDeepLinkBehavior");const t=this.bb.sdk.t.bind(this.bb.sdk),n=this.bb.channel;lt(n),this.cleanupFn=this.ensureHasActionContainer(),this.populateActionContainer(()=>v(xa,{t:t,channel:n,redirectUrl:e.value}))}exit(){super.exit()}}const Na=e=>{const t=e.t,n=e.channel,r=n.brand_name;return ue($a,{title:t("action_empty_list_push_notification.title"),subtitle:t("action_empty_list_push_notification.subtext",{channelName:r}),logoUrl:n.brand_logo_url,logoAlt:t("image_alt.channel_logo",{channelName:r}),redirectUrl:null,redirectButtonLabel:null})};var Ia;function Ra(e){return"payment_request_id"in e?{id:e.payment_request_id,type:Ia.PaymentRequest,entity:e}:{id:e.payment_token_id,type:Ia.PaymentToken,entity:e}}function Ma(e,t,n){return`${e===Ia.PaymentRequest?"payment_request":"payment_token"}_status.${t.toLowerCase()}.${n}`}!function(e){e.PaymentRequest="REQUEST",e.PaymentToken="TOKEN"}(Ia||(Ia={}));function La(e,t,n){const{session:r,paymentEntity:o}=e;switch(lt(r),lt(o),lt(t),n){case"PENDING":return Da(r);case"PENDING_PAYMENT_ENTITY_ONLY":return function(e,t){const n=t.type===Ia.PaymentRequest?t.entity:void 0,r=t.type===Ia.PaymentToken?t.entity:void 0;return{session:e,payment_request:qa(n,"PENDING"),payment_token:qa(r,"PENDING")}}(r,o);case"SUCCESS":return"PENDING"===t._mock_action_type?Da(r):function(e,t){const n=t.type===Ia.PaymentRequest?t.entity:void 0,r=t.type===Ia.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:qa(n,"SUCCEEDED"),payment_token:qa(r,"ACTIVE"),succeeded_channel:{channel_code:t.entity.channel_code,logo_url:"https://placehold.co/48"}}}(r,o);case"FAILURE":return function(e,t){const n=t.type===Ia.PaymentRequest?t.entity:void 0,r=t.type===Ia.PaymentToken?t.entity:void 0;return{session:{...e,status:"ACTIVE"},payment_request:qa(n,"FAILED"),payment_token:qa(r,"FAILED")}}(r,o)}}function Da(e){return{session:{...e,status:"PENDING"}}}function qa(e,t){return e?{...e,status:t}:e}function Ba(e,t){return"PENDING"===t?{payment_request_id:`pr-${Pt()}`,status:"PENDING",channel_code:e,actions:[],session_token_request_id:Pt()}:t?{payment_request_id:`pr-${Pt()}`,status:"REQUIRES_ACTION",channel_code:e,actions:Ua(t),session_token_request_id:Pt()}:{payment_request_id:`pr-${Pt()}`,status:"SUCCEEDED",channel_code:e,actions:[],session_token_request_id:Pt()}}function Ua(e){if(!e)return[];return(Array.isArray(e)?e:[e]).map(e=>function(e){if("PENDING"===e)throw new Error("PENDING mock action type should not generate an action");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"PAYLINK":return{type:"REDIRECT_CUSTOMER",descriptor:"WEB_GOOGLE_PAYLINK",value:"https://example.com/paylink"};case"DEEP_LINK":return{type:"REDIRECT_CUSTOMER",descriptor:"DEEPLINK_URL",value:"mockapp://mock-deep-link"};case"PUSH_NOTIFICATION":return null;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:[{title:"Mobile Banking",content:[{type:"text",text:"Open Mobile App"},{type:"text",text:"Select <b>Mock VA</b>, then select <b>Transfer</b>"},{type:"text",text:"Enter your Virtual Account Number, for example 3816523906568, then press <b>OK</b>"},{type:"text",text:"Click on <b>Send</b> button at the top right corner to proceed"},{type:"text",text:"Click <b>OK</b> to proceed"},{type:"text",text:"Enter your PIN to authorize the transaction"}]},{title:"Internet Banking",content:[{type:"text",text:"Login to the website"},{type:"text",text:"Select <b>Transfer</b>, then select <b>Transfer to Mock VA Virtual Account</b>"},{type:"text",text:"Enter the Virtual Account Number, for example 3816523906568"},{type:"text",text:"Select <b>Continue</b> to proceed your payment"}]},{title:"ATM",content:[{type:"text",text:"Insert your ATM card and PIN"},{type:"text",text:"Enter your ATM PIN"},{type:"text",text:"Select <b>Transfer</b>"},{type:"text",text:"Select <b>To Mock VA Virtual Account</b>"},{type:"text",text:"Enter Virtual Account Number, for example 3816523906568. Press <b>Correct</b> to proceed"},{type:"text",text:"Verify Virtual Account details and then enter amount to be transferred and select <b>Correct</b> to confirm"},{type:"text",text:"Confirm your transaction details displayed"},{type:"text",text:"Select <b>Yes</b> if the details are correct or <b>No</b> if the details are not correct"}]}]}}throw new Error(`Unknown mock action type: ${e}`)}(e)).filter(e=>null!==e)}class ActionEmptyListPushNotificationBehavior extends ContainerActionBehavior{bb;constructor(e){super(e),this.bb=e}enter(){lt(this.bb.world),this.bb.hackyOvoActionLatch=!0;const e=this.bb.sdk.t.bind(this.bb.sdk),t=this.bb.channel;lt(t),this.cleanupFn=this.ensureHasActionContainer(),this.populateActionContainer(()=>v(Na,{t:e,channel:t})),this.bb.mock&&this.bb.dispatchEvent(new InternalScheduleMockUpdateEvent(La(this.bb.world,this.bb.channel,"PENDING_PAYMENT_ENTITY_ONLY")))}exit(){this.bb.hackyOvoActionLatch=void 0,super.exit()}}function ja(e){const{url:t,channelCode:n,mock:r,onIframeComplete:o}=e,i=Se(null),a=Te(e=>{if(!i.current)return;const t=i.current.contentWindow;e.source===t&&"xendit-iframe-action-complete"===e.data?.type&&o(e.data)},[o]);if(Ae(()=>(window.addEventListener("message",a),()=>{window.removeEventListener("message",a)}),[a]),r){const e=Fa("CARDS"===n?"a 3DS authentication page":"an authentication page");return ue("iframe",{ref:i,srcDoc:e,className:"xendit-action-iframe"})}return ue("iframe",{ref:i,src:t,className:"xendit-action-iframe"})}const Fa=e=>`\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 ${e}.</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`;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(()=>(lt(this.bb.channel),v(ja,{url:this.url,channelCode:this.bb.channel.channel_code,mock:this.bb.mock,onIframeComplete:e=>{this.cleanupActionContainer(!1);const t="success"===e.mockStatus?"SUCCESS":"FAILURE";this.updateMocksOnIframeCompletion(t),this.bb.actionCompleted=!0,this.bb.pollImmediatelyRequested=!0,this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent)}})))}updateMocksOnIframeCompletion(e){lt(this.bb.world?.paymentEntity),this.bb.mock&&this.bb.dispatchEvent(new InternalScheduleMockUpdateEvent(La(this.bb.world,this.bb.channel,e)))}exit(){super.exit()}}var Ga,Va,Ha={},Wa={},Ka={};function Xa(){if(Ga)return Ka;Ga=1,Object.defineProperty(Ka,"__esModule",{value:!0});return Ka.default=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.data=t,this.text=n.text||t,this.options=n},Ka}function za(){if(Va)return Wa;Va=1,Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.CODE39=void 0;var e,t=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=Xa();var r=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),e=e.toUpperCase(),t.mod43&&(e+=function(e){return o[e]}(function(e){for(var t=0,n=0;n<e.length;n++)t+=d(e[n]);return t%=43}(e))),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:"encode",value:function(){for(var e=a("*"),t=0;t<this.data.length;t++)e+=a(this.data[t])+"0";return{data:e+=a("*"),text:this.text}}},{key:"valid",value:function(){return-1!==this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)}}]),n}(((e=n)&&e.__esModule?e:{default:e}).default),o=["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","-","."," ","$","/","+","%","*"],i=[20957,29783,23639,30485,20951,29813,23669,20855,29789,23645,29975,23831,30533,22295,30149,24005,21623,29981,23837,22301,30023,23879,30545,22343,30161,24017,21959,30065,23921,22385,29015,18263,29141,17879,29045,18293,17783,29021,18269,17477,17489,17681,20753,35770];function a(e){return function(e){return i[e].toString(2)}(d(e))}function d(e){return o.indexOf(e)}return Wa.CODE39=r,Wa}var Ya,Qa,Za={},Ja={},ed={},td={};function nd(){if(Ya)return td;var e;function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Ya=1,Object.defineProperty(td,"__esModule",{value:!0});var n=td.SET_A=0,r=td.SET_B=1,o=td.SET_C=2;td.SHIFT=98;var i=td.START_A=103,a=td.START_B=104,d=td.START_C=105;return td.MODULO=103,td.STOP=106,td.FNC1=207,td.SET_BY_CODE=(t(e={},i,n),t(e,a,r),t(e,d,o),e),td.SWAP={101:n,100:r,99:o},td.A_START_CHAR=String.fromCharCode(208),td.B_START_CHAR=String.fromCharCode(209),td.C_START_CHAR=String.fromCharCode(210),td.A_CHARS="[\0-_È-Ï]",td.B_CHARS="[ -È-Ï]",td.C_CHARS="(Ï*[0-9]{2}Ï*)",td.BARS=[11011001100,11001101100,11001100110,10010011e3,10010001100,10001001100,10011001e3,10011000100,10001100100,11001001e3,11001000100,11000100100,10110011100,10011011100,10011001110,10111001100,10011101100,10011100110,11001110010,11001011100,11001001110,11011100100,11001110100,11101101110,11101001100,11100101100,11100100110,11101100100,11100110100,11100110010,11011011e3,11011000110,11000110110,10100011e3,10001011e3,10001000110,10110001e3,10001101e3,10001100010,11010001e3,11000101e3,11000100010,10110111e3,10110001110,10001101110,10111011e3,10111000110,10001110110,11101110110,11010001110,11000101110,11011101e3,11011100010,11011101110,11101011e3,11101000110,11100010110,11101101e3,11101100010,11100011010,11101111010,11001000010,11110001010,1010011e4,10100001100,1001011e4,10010000110,10000101100,10000100110,1011001e4,10110000100,1001101e4,10011000010,10000110100,10000110010,11000010010,1100101e4,11110111010,11000010100,10001111010,10100111100,10010111100,10010011110,10111100100,10011110100,10011110010,11110100100,11110010100,11110010010,11011011110,11011110110,11110110110,10101111e3,10100011110,10001011110,10111101e3,10111100010,11110101e3,11110100010,10111011110,10111101110,11101011110,11110101110,11010000100,1101001e4,11010011100,1100011101011],td}function rd(){if(Qa)return ed;Qa=1,Object.defineProperty(ed,"__esModule",{value:!0});var e,t=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=Xa(),r=(e=n)&&e.__esModule?e:{default:e},o=nd();var i=function(e){function n(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e.substring(1),t));return r.bytes=e.split("").map(function(e){return e.charCodeAt(0)}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var e=this.bytes,t=e.shift()-105,r=o.SET_BY_CODE[t];if(void 0===r)throw new RangeError("The encoding does not start with a start character.");!0===this.shouldEncodeAsEan128()&&e.unshift(o.FNC1);var i=n.next(e,1,r);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:n.getBar(t)+i.result+n.getBar((i.checksum+t)%o.MODULO)+n.getBar(o.STOP)}}},{key:"shouldEncodeAsEan128",value:function(){var e=this.options.ean128||!1;return"string"==typeof e&&(e="true"===e.toLowerCase()),e}}],[{key:"getBar",value:function(e){return o.BARS[e]?o.BARS[e].toString():""}},{key:"correctIndex",value:function(e,t){if(t===o.SET_A){var n=e.shift();return n<32?n+64:n-32}return t===o.SET_B?e.shift()-32:10*(e.shift()-48)+e.shift()-48}},{key:"next",value:function(e,t,r){if(!e.length)return{result:"",checksum:0};var i=void 0,a=void 0;if(e[0]>=200){a=e.shift()-105;var d=o.SWAP[a];void 0!==d?i=n.next(e,t+1,d):(r!==o.SET_A&&r!==o.SET_B||a!==o.SHIFT||(e[0]=r===o.SET_A?e[0]>95?e[0]-96:e[0]:e[0]<32?e[0]+96:e[0]),i=n.next(e,t+1,r))}else a=n.correctIndex(e,r),i=n.next(e,t+1,r);var s=a*t;return{result:n.getBar(a)+i.result,checksum:s+i.checksum}}}]),n}(r.default);return ed.default=i,ed}var od,id,ad={};function dd(){if(id)return Ja;id=1,Object.defineProperty(Ja,"__esModule",{value:!0});var e=n(rd()),t=n(function(){if(od)return ad;od=1,Object.defineProperty(ad,"__esModule",{value:!0});var e=nd(),t=function(t){return t.match(new RegExp("^"+e.A_CHARS+"*"))[0].length},n=function(t){return t.match(new RegExp("^"+e.B_CHARS+"*"))[0].length},r=function(t){return t.match(new RegExp("^"+e.C_CHARS+"*"))[0]};function o(t,n){var r=n?e.A_CHARS:e.B_CHARS,a=t.match(new RegExp("^("+r+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(a)return a[1]+String.fromCharCode(204)+i(t.substring(a[1].length));var d=t.match(new RegExp("^"+r+"+"))[0];return d.length===t.length?t:d+String.fromCharCode(n?205:206)+o(t.substring(d.length),!n)}function i(e){var i=r(e),a=i.length;if(a===e.length)return e;e=e.substring(a);var d=t(e)>=n(e);return i+String.fromCharCode(d?206:205)+o(e,d)}return ad.default=function(a){var d=void 0;if(r(a).length>=2)d=e.C_START_CHAR+i(a);else{var s=t(a)>n(a);d=(s?e.A_START_CHAR:e.B_START_CHAR)+o(a,s)}return d.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(e,t){return String.fromCharCode(203)+t})},ad}());function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var o=function(e){function n(e,o){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),/^[\x00-\x7F\xC8-\xD3]+$/.test(e))var i=r(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,(0,t.default)(e),o));else i=r(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,o));return r(i)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),n}(e.default);return Ja.default=o,Ja}var sd,ld={};function cd(){if(sd)return ld;sd=1,Object.defineProperty(ld,"__esModule",{value:!0});var e,t=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=rd(),r=(e=n)&&e.__esModule?e:{default:e},o=nd();var i=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,o.A_START_CHAR+e,t))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:"valid",value:function(){return new RegExp("^"+o.A_CHARS+"+$").test(this.data)}}]),n}(r.default);return ld.default=i,ld}var ud,hd={};function pd(){if(ud)return hd;ud=1,Object.defineProperty(hd,"__esModule",{value:!0});var e,t=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=rd(),r=(e=n)&&e.__esModule?e:{default:e},o=nd();var i=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,o.B_START_CHAR+e,t))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:"valid",value:function(){return new RegExp("^"+o.B_CHARS+"+$").test(this.data)}}]),n}(r.default);return hd.default=i,hd}var fd,md,_d={};function yd(){if(fd)return _d;fd=1,Object.defineProperty(_d,"__esModule",{value:!0});var e,t=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=rd(),r=(e=n)&&e.__esModule?e:{default:e},o=nd();var i=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,o.C_START_CHAR+e,t))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:"valid",value:function(){return new RegExp("^"+o.C_CHARS+"+$").test(this.data)}}]),n}(r.default);return _d.default=i,_d}var bd,gd={},vd={},$d={};function xd(){return bd||(bd=1,Object.defineProperty($d,"__esModule",{value:!0}),$d.SIDE_BIN="101",$d.MIDDLE_BIN="01010",$d.BINARIES={L:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],G:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"],R:["1110010","1100110","1101100","1000010","1011100","1001110","1010000","1000100","1001000","1110100"],O:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],E:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"]},$d.EAN2_STRUCTURE=["LL","LG","GL","GG"],$d.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],$d.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"]),$d}var wd,Ed,Cd,kd={},Pd={};function Ad(){if(wd)return Pd;wd=1,Object.defineProperty(Pd,"__esModule",{value:!0});var e=xd();return Pd.default=function(t,n,r){var o=t.split("").map(function(t,r){return e.BINARIES[n[r]]}).map(function(e,n){return e?e[t[n]]:""});if(r){var i=t.length-1;o=o.map(function(e,t){return t<i?e+r:e})}return o.join("")},Pd}function Sd(){if(Ed)return kd;Ed=1,Object.defineProperty(kd,"__esModule",{value:!0});var e=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t=xd(),n=r(Ad());function r(e){return e&&e.__esModule?e:{default:e}}var o=function(r){function o(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,e,t));return n.fontSize=!t.flat&&t.fontSize>10*t.width?10*t.width:t.fontSize,n.guardHeight=t.height+n.fontSize/2+t.textMargin,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,r),e(o,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(e,t){return this.text.substr(e,t)}},{key:"leftEncode",value:function(e,t){return(0,n.default)(e,t)}},{key:"rightText",value:function(e,t){return this.text.substr(e,t)}},{key:"rightEncode",value:function(e,t){return(0,n.default)(e,t)}},{key:"encodeGuarded",value:function(){var e={fontSize:this.fontSize},n={height:this.guardHeight};return[{data:t.SIDE_BIN,options:n},{data:this.leftEncode(),text:this.leftText(),options:e},{data:t.MIDDLE_BIN,options:n},{data:this.rightEncode(),text:this.rightText(),options:e},{data:t.SIDE_BIN,options:n}]}},{key:"encodeFlat",value:function(){return{data:[t.SIDE_BIN,this.leftEncode(),t.MIDDLE_BIN,this.rightEncode(),t.SIDE_BIN].join(""),text:this.text}}}]),o}(r(Xa()).default);return kd.default=o,kd}function Od(){if(Cd)return vd;Cd=1,Object.defineProperty(vd,"__esModule",{value:!0});var e,t=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},r=xd(),o=Sd(),i=(e=o)&&e.__esModule?e:{default:e};var a=function(e){var t=e.substr(0,12).split("").map(function(e){return+e}).reduce(function(e,t,n){return n%2?e+3*t:e+t},0);return(10-t%10)%10},d=function(e){function o(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),-1!==e.search(/^[0-9]{12}$/)&&(e+=a(e));var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,e,t));return n.lastChar=t.lastChar,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,e),t(o,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{13}$/)&&+this.data[12]===a(this.data)}},{key:"leftText",value:function(){return n(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var e=this.data.substr(1,6),t=r.EAN13_STRUCTURE[this.data[0]];return n(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"leftEncode",this).call(this,e,t)}},{key:"rightText",value:function(){return n(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var e=this.data.substr(7,6);return n(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"rightEncode",this).call(this,e,"RRRRRR")}},{key:"encodeGuarded",value:function(){var e=n(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(e.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(e.push({data:"00"}),e.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),e}}]),o}(i.default);return vd.default=d,vd}var Td,Nd={};function Id(){if(Td)return Nd;Td=1,Object.defineProperty(Nd,"__esModule",{value:!0});var e,t=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},r=Sd(),o=(e=r)&&e.__esModule?e:{default:e};var i=function(e){var t=e.substr(0,7).split("").map(function(e){return+e}).reduce(function(e,t,n){return n%2?e+t:e+3*t},0);return(10-t%10)%10},a=function(e){function r(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),-1!==e.search(/^[0-9]{7}$/)&&(e+=i(e)),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,e),t(r,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{8}$/)&&+this.data[7]===i(this.data)}},{key:"leftText",value:function(){return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"leftText",this).call(this,0,4)}},{key:"leftEncode",value:function(){var e=this.data.substr(0,4);return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"leftEncode",this).call(this,e,"LLLL")}},{key:"rightText",value:function(){return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"rightText",this).call(this,4,4)}},{key:"rightEncode",value:function(){var e=this.data.substr(4,4);return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"rightEncode",this).call(this,e,"RRRR")}}]),r}(o.default);return Nd.default=a,Nd}var Rd,Md={};function Ld(){if(Rd)return Md;Rd=1,Object.defineProperty(Md,"__esModule",{value:!0});var e=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t=xd(),n=o(Ad()),r=o(Xa());function o(e){return e&&e.__esModule?e:{default:e}}var i=function(r){function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,e,t))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,r),e(o,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{5}$/)}},{key:"encode",value:function(){var e=t.EAN5_STRUCTURE[function(e){var t=e.split("").map(function(e){return+e}).reduce(function(e,t,n){return n%2?e+9*t:e+3*t},0);return t%10}(this.data)];return{data:"1011"+(0,n.default)(this.data,e,"01"),text:this.text}}}]),o}(r.default);return Md.default=i,Md}var Dd,qd={};function Bd(){if(Dd)return qd;Dd=1,Object.defineProperty(qd,"__esModule",{value:!0});var e=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t=xd(),n=r(Ad());function r(e){return e&&e.__esModule?e:{default:e}}var o=function(r){function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,e,t))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,r),e(o,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{2}$/)}},{key:"encode",value:function(){var e=t.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,n.default)(this.data,e,"01"),text:this.text}}}]),o}(r(Xa()).default);return qd.default=o,qd}var Ud,jd={};function Fd(){if(Ud)return jd;Ud=1,Object.defineProperty(jd,"__esModule",{value:!0});var e=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();jd.checksum=o;var t=n(Ad());function n(e){return e&&e.__esModule?e:{default:e}}var r=function(n){function r(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),-1!==e.search(/^[0-9]{11}$/)&&(e+=o(e));var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t));return n.displayValue=t.displayValue,t.fontSize>10*t.width?n.fontSize=10*t.width:n.fontSize=t.fontSize,n.guardHeight=t.height+n.fontSize/2+t.textMargin,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,n),e(r,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{12}$/)&&this.data[11]==o(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var e="";return e+="101",e+=(0,t.default)(this.data.substr(0,6),"LLLLLL"),e+="01010",e+=(0,t.default)(this.data.substr(6,6),"RRRRRR"),{data:e+="101",text:this.text}}},{key:"guardedEncoding",value:function(){var e=[];return this.displayValue&&e.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),e.push({data:"101"+(0,t.default)(this.data[0],"L"),options:{height:this.guardHeight}}),e.push({data:(0,t.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),e.push({data:"01010",options:{height:this.guardHeight}}),e.push({data:(0,t.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),e.push({data:(0,t.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&e.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),e}}]),r}(n(Xa()).default);function o(e){var t,n=0;for(t=1;t<11;t+=2)n+=parseInt(e[t]);for(t=0;t<11;t+=2)n+=3*parseInt(e[t]);return(10-n%10)%10}return jd.default=r,jd}var Gd,Vd,Hd={};function Wd(){if(Gd)return Hd;Gd=1,Object.defineProperty(Hd,"__esModule",{value:!0});var e=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t=o(Ad()),n=o(Xa()),r=Fd();function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var a=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],d=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]],s=function(n){function r(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);var n=i(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t));if(n.isValid=!1,-1!==e.search(/^[0-9]{6}$/))n.middleDigits=e,n.upcA=l(e,"0"),n.text=t.text||""+n.upcA[0]+e+n.upcA[n.upcA.length-1],n.isValid=!0;else{if(-1===e.search(/^[01][0-9]{7}$/))return i(n);if(n.middleDigits=e.substring(1,e.length-1),n.upcA=l(n.middleDigits,e[0]),n.upcA[n.upcA.length-1]!==e[e.length-1])return i(n);n.isValid=!0}return n.displayValue=t.displayValue,t.fontSize>10*t.width?n.fontSize=10*t.width:n.fontSize=t.fontSize,n.guardHeight=t.height+n.fontSize/2+t.textMargin,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,n),e(r,[{key:"valid",value:function(){return this.isValid}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var e="";return e+="101",e+=this.encodeMiddleDigits(),{data:e+="010101",text:this.text}}},{key:"guardedEncoding",value:function(){var e=[];return this.displayValue&&e.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),e.push({data:"101",options:{height:this.guardHeight}}),e.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),e.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&e.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),e}},{key:"encodeMiddleDigits",value:function(){var e=this.upcA[0],n=this.upcA[this.upcA.length-1],r=d[parseInt(n)][parseInt(e)];return(0,t.default)(this.middleDigits,r)}}]),r}(n.default);function l(e,t){for(var n=parseInt(e[e.length-1]),o=a[n],i="",d=0,s=0;s<o.length;s++){var l=o[s];i+="X"===l?e[d++]:l}return""+(i=""+t+i)+(0,r.checksum)(i)}return Hd.default=s,Hd}var Kd,Xd,zd={},Yd={},Qd={};function Zd(){if(Xd)return Yd;Xd=1,Object.defineProperty(Yd,"__esModule",{value:!0});var e,t=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(Kd||(Kd=1,Object.defineProperty(Qd,"__esModule",{value:!0}),Qd.START_BIN="1010",Qd.END_BIN="11101",Qd.BINARIES=["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"]),Qd),r=Xa();var o=function(e){function r(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,e),t(r,[{key:"valid",value:function(){return-1!==this.data.search(/^([0-9]{2})+$/)}},{key:"encode",value:function(){var e=this,t=this.data.match(/.{2}/g).map(function(t){return e.encodePair(t)}).join("");return{data:n.START_BIN+t+n.END_BIN,text:this.text}}},{key:"encodePair",value:function(e){var t=n.BINARIES[e[1]];return n.BINARIES[e[0]].split("").map(function(e,n){return("1"===e?"111":"1")+("1"===t[n]?"000":"0")}).join("")}}]),r}(((e=r)&&e.__esModule?e:{default:e}).default);return Yd.default=o,Yd}var Jd,es,ts={};function ns(){if(Jd)return ts;Jd=1,Object.defineProperty(ts,"__esModule",{value:!0});var e,t=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=Zd(),r=(e=n)&&e.__esModule?e:{default:e};var o=function(e){var t=e.substr(0,13).split("").map(function(e){return parseInt(e,10)}).reduce(function(e,t,n){return e+t*(3-n%2*2)},0);return 10*Math.ceil(t/10)-t},i=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),-1!==e.search(/^[0-9]{13}$/)&&(e+=o(e)),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{14}$/)&&+this.data[13]===o(this.data)}}]),n}(r.default);return ts.default=i,ts}var rs,os={},is={};function as(){if(rs)return is;rs=1,Object.defineProperty(is,"__esModule",{value:!0});var e,t=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=Xa();var r=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:"encode",value:function(){for(var e="110",t=0;t<this.data.length;t++){var n=parseInt(this.data[t]).toString(2);n=o(n,4-n.length);for(var r=0;r<n.length;r++)e+="0"==n[r]?"100":"110"}return{data:e+="1001",text:this.text}}},{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]+$/)}}]),n}(((e=n)&&e.__esModule?e:{default:e}).default);function o(e,t){for(var n=0;n<t;n++)e="0"+e;return e}return is.default=r,is}var ds,ss,ls={},cs={};function us(){if(ds)return cs;return ds=1,Object.defineProperty(cs,"__esModule",{value:!0}),cs.mod10=function(e){for(var t=0,n=0;n<e.length;n++){var r=parseInt(e[n]);(n+e.length)%2==0?t+=r:t+=2*r%10+Math.floor(2*r/10)}return(10-t%10)%10},cs.mod11=function(e){for(var t=0,n=[2,3,4,5,6,7],r=0;r<e.length;r++){var o=parseInt(e[e.length-1-r]);t+=n[r%n.length]*o}return(11-t%11)%11},cs}function hs(){if(ss)return ls;ss=1,Object.defineProperty(ls,"__esModule",{value:!0});var e,t=as(),n=(e=t)&&e.__esModule?e:{default:e},r=us();var o=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e+(0,r.mod10)(e),n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(n.default);return ls.default=o,ls}var ps,fs={};function ms(){if(ps)return fs;ps=1,Object.defineProperty(fs,"__esModule",{value:!0});var e,t=as(),n=(e=t)&&e.__esModule?e:{default:e},r=us();var o=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e+(0,r.mod11)(e),n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(n.default);return fs.default=o,fs}var _s,ys={};function bs(){if(_s)return ys;_s=1,Object.defineProperty(ys,"__esModule",{value:!0});var e,t=as(),n=(e=t)&&e.__esModule?e:{default:e},r=us();var o=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e+=(0,r.mod10)(e),e+=(0,r.mod10)(e),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(n.default);return ys.default=o,ys}var gs,vs,$s={};function xs(){if(gs)return $s;gs=1,Object.defineProperty($s,"__esModule",{value:!0});var e,t=as(),n=(e=t)&&e.__esModule?e:{default:e},r=us();var o=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e+=(0,r.mod11)(e),e+=(0,r.mod10)(e),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(n.default);return $s.default=o,$s}var ws,Es={};function Cs(){if(ws)return Es;ws=1,Object.defineProperty(Es,"__esModule",{value:!0}),Es.pharmacode=void 0;var e,t=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=Xa();var r=function(e){function n(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t));return r.number=parseInt(e,10),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:"encode",value:function(){for(var e=this.number,t="";!isNaN(e)&&0!=e;)e%2==0?(t="11100"+t,e=(e-2)/2):(t="100"+t,e=(e-1)/2);return{data:t=t.slice(0,-2),text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),n}(((e=n)&&e.__esModule?e:{default:e}).default);return Es.pharmacode=r,Es}var ks,Ps={};function As(){if(ks)return Ps;ks=1,Object.defineProperty(Ps,"__esModule",{value:!0}),Ps.codabar=void 0;var e,t=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=Xa();var r=function(e){function n(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),0===e.search(/^[0-9\-\$\:\.\+\/]+$/)&&(e="A"+e+"A");var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e.toUpperCase(),t));return r.text=r.options.text||r.text.replace(/[A-D]/g,""),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:"valid",value:function(){return-1!==this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)}},{key:"encode",value:function(){for(var e=[],t=this.getEncodings(),n=0;n<this.data.length;n++)e.push(t[this.data.charAt(n)]),n!==this.data.length-1&&e.push("0");return{text:this.text,data:e.join("")}}},{key:"getEncodings",value:function(){return{0:"101010011",1:"101011001",2:"101001011",3:"110010101",4:"101101001",5:"110101001",6:"100101011",7:"100101101",8:"100110101",9:"110100101","-":"101001101",$:"101100101",":":"1101011011","/":"1101101011",".":"1101101101","+":"1011011011",A:"1011001001",B:"1001001011",C:"1010010011",D:"1010011001"}}}]),n}(((e=n)&&e.__esModule?e:{default:e}).default);return Ps.codabar=r,Ps}var Ss,Os,Ts={},Ns={},Is={};function Rs(){if(Os)return Ns;Os=1,Object.defineProperty(Ns,"__esModule",{value:!0});var e,t=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(Ss||(Ss=1,Object.defineProperty(Is,"__esModule",{value:!0}),Is.SYMBOLS=["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","-","."," ","$","/","+","%","($)","(%)","(/)","(+)","ÿ"],Is.BINARIES=["100010100","101001000","101000100","101000010","100101000","100100100","100100010","101010000","100010010","100001010","110101000","110100100","110100010","110010100","110010010","110001010","101101000","101100100","101100010","100110100","100011010","101011000","101001100","101000110","100101100","100010110","110110100","110110010","110101100","110100110","110010110","110011010","101101100","101100110","100110110","100111010","100101110","111010100","111010010","111001010","101101110","101110110","110101110","100100110","111011010","111010110","100110010","101011110"],Is.MULTI_SYMBOLS={"\0":["(%)","U"],"":["($)","A"],"":["($)","B"],"":["($)","C"],"":["($)","D"],"":["($)","E"],"":["($)","F"],"":["($)","G"],"\b":["($)","H"],"\t":["($)","I"],"\n":["($)","J"],"\v":["($)","K"],"\f":["($)","L"],"\r":["($)","M"],"":["($)","N"],"":["($)","O"],"":["($)","P"],"":["($)","Q"],"":["($)","R"],"":["($)","S"],"":["($)","T"],"":["($)","U"],"":["($)","V"],"":["($)","W"],"":["($)","X"],"":["($)","Y"],"":["($)","Z"],"":["(%)","A"],"":["(%)","B"],"":["(%)","C"],"":["(%)","D"],"":["(%)","E"],"!":["(/)","A"],'"':["(/)","B"],"#":["(/)","C"],"&":["(/)","F"],"'":["(/)","G"],"(":["(/)","H"],")":["(/)","I"],"*":["(/)","J"],",":["(/)","L"],":":["(/)","Z"],";":["(%)","F"],"<":["(%)","G"],"=":["(%)","H"],">":["(%)","I"],"?":["(%)","J"],"@":["(%)","V"],"[":["(%)","K"],"\\":["(%)","L"],"]":["(%)","M"],"^":["(%)","N"],_:["(%)","O"],"`":["(%)","W"],a:["(+)","A"],b:["(+)","B"],c:["(+)","C"],d:["(+)","D"],e:["(+)","E"],f:["(+)","F"],g:["(+)","G"],h:["(+)","H"],i:["(+)","I"],j:["(+)","J"],k:["(+)","K"],l:["(+)","L"],m:["(+)","M"],n:["(+)","N"],o:["(+)","O"],p:["(+)","P"],q:["(+)","Q"],r:["(+)","R"],s:["(+)","S"],t:["(+)","T"],u:["(+)","U"],v:["(+)","V"],w:["(+)","W"],x:["(+)","X"],y:["(+)","Y"],z:["(+)","Z"],"{":["(%)","P"],"|":["(%)","Q"],"}":["(%)","R"],"~":["(%)","S"],"":["(%)","T"]}),Is),r=Xa();var o=function(e){function r(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,e),t(r,[{key:"valid",value:function(){return/^[0-9A-Z\-. $/+%]+$/.test(this.data)}},{key:"encode",value:function(){var e=this.data.split("").flatMap(function(e){return n.MULTI_SYMBOLS[e]||e}),t=e.map(function(e){return r.getEncoding(e)}).join(""),o=r.checksum(e,20),i=r.checksum(e.concat(o),15);return{text:this.text,data:r.getEncoding("ÿ")+t+r.getEncoding(o)+r.getEncoding(i)+r.getEncoding("ÿ")+"1"}}}],[{key:"getEncoding",value:function(e){return n.BINARIES[r.symbolValue(e)]}},{key:"getSymbol",value:function(e){return n.SYMBOLS[e]}},{key:"symbolValue",value:function(e){return n.SYMBOLS.indexOf(e)}},{key:"checksum",value:function(e,t){var n=e.slice().reverse().reduce(function(e,n,o){var i=o%t+1;return e+r.symbolValue(n)*i},0);return r.getSymbol(n%47)}}]),r}(((e=r)&&e.__esModule?e:{default:e}).default);return Ns.default=o,Ns}var Ms,Ls,Ds={};function qs(){if(Ms)return Ds;Ms=1,Object.defineProperty(Ds,"__esModule",{value:!0});var e,t=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=Rs();var r=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:"valid",value:function(){return/^[\x00-\x7f]+$/.test(this.data)}}]),n}(((e=n)&&e.__esModule?e:{default:e}).default);return Ds.default=r,Ds}var Bs,Us,js={};function Fs(){if(Bs)return js;Bs=1,Object.defineProperty(js,"__esModule",{value:!0}),js.GenericBarcode=void 0;var e,t=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=Xa();var r=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),n}(((e=n)&&e.__esModule?e:{default:e}).default);return js.GenericBarcode=r,js}function Gs(){if(Us)return Ha;Us=1,Object.defineProperty(Ha,"__esModule",{value:!0});var e=za(),t=function(){if(md)return Za;md=1,Object.defineProperty(Za,"__esModule",{value:!0}),Za.CODE128C=Za.CODE128B=Za.CODE128A=Za.CODE128=void 0;var e=o(dd()),t=o(cd()),n=o(pd()),r=o(yd());function o(e){return e&&e.__esModule?e:{default:e}}return Za.CODE128=e.default,Za.CODE128A=t.default,Za.CODE128B=n.default,Za.CODE128C=r.default,Za}(),n=function(){if(Vd)return gd;Vd=1,Object.defineProperty(gd,"__esModule",{value:!0}),gd.UPCE=gd.UPC=gd.EAN2=gd.EAN5=gd.EAN8=gd.EAN13=void 0;var e=a(Od()),t=a(Id()),n=a(Ld()),r=a(Bd()),o=a(Fd()),i=a(Wd());function a(e){return e&&e.__esModule?e:{default:e}}return gd.EAN13=e.default,gd.EAN8=t.default,gd.EAN5=n.default,gd.EAN2=r.default,gd.UPC=o.default,gd.UPCE=i.default,gd}(),r=function(){if(es)return zd;es=1,Object.defineProperty(zd,"__esModule",{value:!0}),zd.ITF14=zd.ITF=void 0;var e=n(Zd()),t=n(ns());function n(e){return e&&e.__esModule?e:{default:e}}return zd.ITF=e.default,zd.ITF14=t.default,zd}(),o=function(){if(vs)return os;vs=1,Object.defineProperty(os,"__esModule",{value:!0}),os.MSI1110=os.MSI1010=os.MSI11=os.MSI10=os.MSI=void 0;var e=i(as()),t=i(hs()),n=i(ms()),r=i(bs()),o=i(xs());function i(e){return e&&e.__esModule?e:{default:e}}return os.MSI=e.default,os.MSI10=t.default,os.MSI11=n.default,os.MSI1010=r.default,os.MSI1110=o.default,os}(),i=Cs(),a=As(),d=function(){if(Ls)return Ts;Ls=1,Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.CODE93FullASCII=Ts.CODE93=void 0;var e=n(Rs()),t=n(qs());function n(e){return e&&e.__esModule?e:{default:e}}return Ts.CODE93=e.default,Ts.CODE93FullASCII=t.default,Ts}(),s=Fs();return Ha.default={CODE39:e.CODE39,CODE128:t.CODE128,CODE128A:t.CODE128A,CODE128B:t.CODE128B,CODE128C:t.CODE128C,EAN13:n.EAN13,EAN8:n.EAN8,EAN5:n.EAN5,EAN2:n.EAN2,UPC:n.UPC,UPCE:n.UPCE,ITF14:r.ITF14,ITF:r.ITF,MSI:o.MSI,MSI10:o.MSI10,MSI11:o.MSI11,MSI1010:o.MSI1010,MSI1110:o.MSI1110,pharmacode:i.pharmacode,codabar:a.codabar,CODE93:d.CODE93,CODE93FullASCII:d.CODE93FullASCII,GenericBarcode:s.GenericBarcode},Ha}var Vs,Hs={};function Ws(){if(Vs)return Hs;Vs=1,Object.defineProperty(Hs,"__esModule",{value:!0});var e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};return Hs.default=function(t,n){return e({},t,n)},Hs}var Ks,Xs={};var zs,Ys={};var Qs,Zs={},Js={},el={};function tl(){if(Qs)return el;return Qs=1,Object.defineProperty(el,"__esModule",{value:!0}),el.default=function(e){var t=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var n in t)t.hasOwnProperty(n)&&"string"==typeof e[n=t[n]]&&(e[n]=parseInt(e[n],10));"string"==typeof e.displayValue&&(e.displayValue="false"!=e.displayValue);return e},el}var nl,rl,ol={};function il(){if(nl)return ol;nl=1,Object.defineProperty(ol,"__esModule",{value:!0});var e={width:2,height:100,format:"auto",displayValue:!0,fontOptions:"",font:"monospace",text:void 0,textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:20,background:"#ffffff",lineColor:"#000000",margin:10,marginTop:void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,valid:function(){}};return ol.default=e,ol}var al,dl,sl={},ll={},cl={};function ul(){if(al)return cl;al=1,Object.defineProperty(cl,"__esModule",{value:!0}),cl.getTotalWidthOfEncodings=cl.calculateEncodingAttributes=cl.getBarcodePadding=cl.getEncodingHeight=cl.getMaximumHeightOfEncodings=void 0;var e,t=Ws(),n=(e=t)&&e.__esModule?e:{default:e};function r(e,t){return t.height+(t.displayValue&&e.text.length>0?t.fontSize+t.textMargin:0)+t.marginTop+t.marginBottom}function o(e,t,n){if(n.displayValue&&t<e){if("center"==n.textAlign)return Math.floor((e-t)/2);if("left"==n.textAlign)return 0;if("right"==n.textAlign)return Math.floor(e-t)}return 0}function i(e,t,n){var r;if(n)r=n;else{if("undefined"==typeof document)return 0;r=document.createElement("canvas").getContext("2d")}r.font=t.fontOptions+" "+t.fontSize+"px "+t.font;var o=r.measureText(e);return o?o.width:0}return cl.getMaximumHeightOfEncodings=function(e){for(var t=0,n=0;n<e.length;n++)e[n].height>t&&(t=e[n].height);return t},cl.getEncodingHeight=r,cl.getBarcodePadding=o,cl.calculateEncodingAttributes=function(e,t,a){for(var d=0;d<e.length;d++){var s,l=e[d],c=(0,n.default)(t,l.options);s=c.displayValue?i(l.text,c,a):0;var u=l.data.length*c.width;l.width=Math.ceil(Math.max(s,u)),l.height=r(l,c),l.barcodePadding=o(s,u,c)}},cl.getTotalWidthOfEncodings=function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n].width;return t},cl}function hl(){if(dl)return ll;dl=1,Object.defineProperty(ll,"__esModule",{value:!0});var e,t=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=Ws(),r=(e=n)&&e.__esModule?e:{default:e},o=ul();var i=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.canvas=t,this.encodings=n,this.options=r}return t(e,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var e=0;e<this.encodings.length;e++){var t=(0,r.default)(this.options,this.encodings[e].options);this.drawCanvasBarcode(t,this.encodings[e]),this.drawCanvasText(t,this.encodings[e]),this.moveCanvasDrawing(this.encodings[e])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var e=this.canvas.getContext("2d");e.save(),(0,o.calculateEncodingAttributes)(this.encodings,this.options,e);var t=(0,o.getTotalWidthOfEncodings)(this.encodings),n=(0,o.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=t+this.options.marginLeft+this.options.marginRight,this.canvas.height=n,e.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(e.fillStyle=this.options.background,e.fillRect(0,0,this.canvas.width,this.canvas.height)),e.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(e,t){var n,r=this.canvas.getContext("2d"),o=t.data;n="top"==e.textPosition?e.marginTop+e.fontSize+e.textMargin:e.marginTop,r.fillStyle=e.lineColor;for(var i=0;i<o.length;i++){var a=i*e.width+t.barcodePadding;"1"===o[i]?r.fillRect(a,n,e.width,e.height):o[i]&&r.fillRect(a,n,e.width,e.height*o[i])}}},{key:"drawCanvasText",value:function(e,t){var n,r,o=this.canvas.getContext("2d"),i=e.fontOptions+" "+e.fontSize+"px "+e.font;e.displayValue&&(r="top"==e.textPosition?e.marginTop+e.fontSize-e.textMargin:e.height+e.textMargin+e.marginTop+e.fontSize,o.font=i,"left"==e.textAlign||t.barcodePadding>0?(n=0,o.textAlign="left"):"right"==e.textAlign?(n=t.width-1,o.textAlign="right"):(n=t.width/2,o.textAlign="center"),o.fillText(t.text,n,r))}},{key:"moveCanvasDrawing",value:function(e){this.canvas.getContext("2d").translate(e.width,0)}},{key:"restoreCanvas",value:function(){this.canvas.getContext("2d").restore()}}]),e}();return ll.default=i,ll}var pl,fl={};function ml(){if(pl)return fl;pl=1,Object.defineProperty(fl,"__esModule",{value:!0});var e,t=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=Ws(),r=(e=n)&&e.__esModule?e:{default:e},o=ul();var i="http://www.w3.org/2000/svg",a=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.svg=t,this.encodings=n,this.options=r,this.document=r.xmlDocument||document}return t(e,[{key:"render",value:function(){var e=this.options.marginLeft;this.prepareSVG();for(var t=0;t<this.encodings.length;t++){var n=this.encodings[t],o=(0,r.default)(this.options,n.options),i=this.createGroup(e,o.marginTop,this.svg);this.setGroupOptions(i,o),this.drawSvgBarcode(i,o,n),this.drawSVGText(i,o,n),e+=n.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,o.calculateEncodingAttributes)(this.encodings,this.options);var e=(0,o.getTotalWidthOfEncodings)(this.encodings),t=(0,o.getMaximumHeightOfEncodings)(this.encodings),n=e+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(n,t),this.options.background&&this.drawRect(0,0,n,t,this.svg).setAttribute("fill",this.options.background)}},{key:"drawSvgBarcode",value:function(e,t,n){var r,o=n.data;r="top"==t.textPosition?t.fontSize+t.textMargin:0;for(var i=0,a=0,d=0;d<o.length;d++)a=d*t.width+n.barcodePadding,"1"===o[d]?i++:i>0&&(this.drawRect(a-t.width*i,r,t.width*i,t.height,e),i=0);i>0&&this.drawRect(a-t.width*(i-1),r,t.width*i,t.height,e)}},{key:"drawSVGText",value:function(e,t,n){var r,o,a=this.document.createElementNS(i,"text");t.displayValue&&(a.setAttribute("font-family",t.font),a.setAttribute("font-size",t.fontSize),t.fontOptions.includes("bold")&&a.setAttribute("font-weight","bold"),t.fontOptions.includes("italic")&&a.setAttribute("font-style","italic"),o="top"==t.textPosition?t.fontSize-t.textMargin:t.height+t.textMargin+t.fontSize,"left"==t.textAlign||n.barcodePadding>0?(r=0,a.setAttribute("text-anchor","start")):"right"==t.textAlign?(r=n.width-1,a.setAttribute("text-anchor","end")):(r=n.width/2,a.setAttribute("text-anchor","middle")),a.setAttribute("x",r),a.setAttribute("y",o),a.appendChild(this.document.createTextNode(n.text)),e.appendChild(a))}},{key:"setSvgAttributes",value:function(e,t){var n=this.svg;n.setAttribute("width",e+"px"),n.setAttribute("height",t+"px"),n.setAttribute("x","0px"),n.setAttribute("y","0px"),n.setAttribute("viewBox","0 0 "+e+" "+t),n.setAttribute("xmlns",i),n.setAttribute("version","1.1")}},{key:"createGroup",value:function(e,t,n){var r=this.document.createElementNS(i,"g");return r.setAttribute("transform","translate("+e+", "+t+")"),n.appendChild(r),r}},{key:"setGroupOptions",value:function(e,t){e.setAttribute("fill",t.lineColor)}},{key:"drawRect",value:function(e,t,n,r,o){var a=this.document.createElementNS(i,"rect");return a.setAttribute("x",e),a.setAttribute("y",t),a.setAttribute("width",n),a.setAttribute("height",r),o.appendChild(a),a}}]),e}();return fl.default=a,fl}var _l,yl,bl={};function gl(){if(_l)return bl;_l=1,Object.defineProperty(bl,"__esModule",{value:!0});var e=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var t=function(){function t(e,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.object=e,this.encodings=n,this.options=r}return e(t,[{key:"render",value:function(){this.object.encodings=this.encodings}}]),t}();return bl.default=t,bl}var vl,$l,xl={};function wl(){if(vl)return xl;function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function n(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}vl=1,Object.defineProperty(xl,"__esModule",{value:!0});var r=function(){function r(n,o){e(this,r);var i=t(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return i.name="InvalidInputException",i.symbology=n,i.input=o,i.message='"'+i.input+'" is not a valid input for '+i.symbology,i}return n(r,Error),r}(),o=function(){function r(){e(this,r);var n=t(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return n.name="InvalidElementException",n.message="Not supported type to render on",n}return n(r,Error),r}(),i=function(){function r(){e(this,r);var n=t(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return n.name="NoElementException",n.message="No element to render on.",n}return n(r,Error),r}();return xl.InvalidInputException=r,xl.InvalidElementException=o,xl.NoElementException=i,xl}function El(){if($l)return Zs;$l=1,Object.defineProperty(Zs,"__esModule",{value:!0});var e="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},t=function(){if(rl)return Js;rl=1,Object.defineProperty(Js,"__esModule",{value:!0});var e=n(tl()),t=n(il());function n(e){return e&&e.__esModule?e:{default:e}}return Js.default=function(n){var r={};for(var o in t.default)t.default.hasOwnProperty(o)&&(n.hasAttribute("jsbarcode-"+o.toLowerCase())&&(r[o]=n.getAttribute("jsbarcode-"+o.toLowerCase())),n.hasAttribute("data-"+o.toLowerCase())&&(r[o]=n.getAttribute("data-"+o.toLowerCase())));return r.value=n.getAttribute("jsbarcode-value")||n.getAttribute("data-value"),(0,e.default)(r)},Js}(),n=a(t),r=function(){if(yl)return sl;yl=1,Object.defineProperty(sl,"__esModule",{value:!0});var e=r(hl()),t=r(ml()),n=r(gl());function r(e){return e&&e.__esModule?e:{default:e}}return sl.default={CanvasRenderer:e.default,SVGRenderer:t.default,ObjectRenderer:n.default},sl}(),o=a(r),i=wl();function a(e){return e&&e.__esModule?e:{default:e}}function d(t){if("string"==typeof t)return function(e){var t=document.querySelectorAll(e);if(0===t.length)return;for(var n=[],r=0;r<t.length;r++)n.push(d(t[r]));return n}(t);if(Array.isArray(t)){for(var r=[],a=0;a<t.length;a++)r.push(d(t[a]));return r}if("undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLImageElement)return function(e){var t=document.createElement("canvas");return{element:t,options:(0,n.default)(e),renderer:o.default.CanvasRenderer,afterRender:function(){e.setAttribute("src",t.toDataURL())}}}(t);if(t&&t.nodeName&&"svg"===t.nodeName.toLowerCase()||"undefined"!=typeof SVGElement&&t instanceof SVGElement)return{element:t,options:(0,n.default)(t),renderer:o.default.SVGRenderer};if("undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)return{element:t,options:(0,n.default)(t),renderer:o.default.CanvasRenderer};if(t&&t.getContext)return{element:t,renderer:o.default.CanvasRenderer};if(t&&"object"===(void 0===t?"undefined":e(t))&&!t.nodeName)return{element:t,renderer:o.default.ObjectRenderer};throw new i.InvalidElementException}return Zs.default=d,Zs}var Cl,kl,Pl,Al={};function Sl(){if(Cl)return Al;Cl=1,Object.defineProperty(Al,"__esModule",{value:!0});var e=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var t=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.api=e}return e(t,[{key:"handleCatch",value:function(e){if("InvalidInputException"!==e.name)throw e;if(this.api._options.valid===this.api._defaults.valid)throw e.message;this.api._options.valid(!1),this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(e){try{var t=e.apply(void 0,arguments);return this.api._options.valid(!0),t}catch(e){return this.handleCatch(e),this.api}}}]),t}();return Al.default=t,Al}var Ol=function(){if(Pl)return kl;Pl=1;var e=c(Gs()),t=c(Ws()),n=(Ks||(Ks=1,Object.defineProperty(Xs,"__esModule",{value:!0}),Xs.default=function(e){var t=[];return function e(n){if(Array.isArray(n))for(var r=0;r<n.length;r++)e(n[r]);else n.text=n.text||"",n.data=n.data||"",t.push(n)}(e),t}),Xs),r=c(n),o=c((zs||(zs=1,Object.defineProperty(Ys,"__esModule",{value:!0}),Ys.default=function(e){return e.marginTop=e.marginTop||e.margin,e.marginBottom=e.marginBottom||e.margin,e.marginRight=e.marginRight||e.margin,e.marginLeft=e.marginLeft||e.margin,e}),Ys)),i=c(El()),a=c(tl()),d=c(Sl()),s=wl(),l=c(il());function c(e){return e&&e.__esModule?e:{default:e}}var u=function(){},h=function(e,t,n){var r=new u;if(void 0===e)throw Error("No element to render on was provided.");return r._renderProperties=(0,i.default)(e),r._encodings=[],r._options=l.default,r._errorHandler=new d.default(r),void 0!==t&&((n=n||{}).format||(n.format=_()),r.options(n)[n.format](t,n).render()),r};for(var p in h.getModule=function(t){return e.default[t]},e.default)e.default.hasOwnProperty(p)&&f(e.default,p);function f(e,n){u.prototype[n]=u.prototype[n.toUpperCase()]=u.prototype[n.toLowerCase()]=function(r,o){var i=this;return i._errorHandler.wrapBarcodeCall(function(){o.text=void 0===o.text?void 0:""+o.text;var d=(0,t.default)(i._options,o);d=(0,a.default)(d);var s=e[n],l=m(r,s,d);return i._encodings.push(l),i})}}function m(e,n,o){var i=new n(e=""+e,o);if(!i.valid())throw new s.InvalidInputException(i.constructor.name,e);var a=i.encode();a=(0,r.default)(a);for(var d=0;d<a.length;d++)a[d].options=(0,t.default)(o,a[d].options);return a}function _(){return e.default.CODE128?"CODE128":Object.keys(e.default)[0]}function y(e,n,i){n=(0,r.default)(n);for(var a=0;a<n.length;a++)n[a].options=(0,t.default)(i,n[a].options),(0,o.default)(n[a].options);(0,o.default)(i),new(0,e.renderer)(e.element,n,i).render(),e.afterRender&&e.afterRender()}return u.prototype.options=function(e){return this._options=(0,t.default)(this._options,e),this},u.prototype.blank=function(e){var t=new Array(e+1).join("0");return this._encodings.push({data:t}),this},u.prototype.init=function(){var n;if(this._renderProperties)for(var r in Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]),this._renderProperties){n=this._renderProperties[r];var o=(0,t.default)(this._options,n.options);"auto"==o.format&&(o.format=_()),this._errorHandler.wrapBarcodeCall(function(){var t=m(o.value,e.default[o.format.toUpperCase()],o);y(n,t,o)})}},u.prototype.render=function(){if(!this._renderProperties)throw new s.NoElementException;if(Array.isArray(this._renderProperties))for(var e=0;e<this._renderProperties.length;e++)y(this._renderProperties[e],this._encodings,this._options);else y(this._renderProperties,this._encodings,this._options);return this},u.prototype._defaults=l.default,"undefined"!=typeof window&&(window.JsBarcode=h),"undefined"!=typeof jQuery&&(jQuery.fn.JsBarcode=function(e,t){var n=[];return jQuery(this).each(function(){n.push(this)}),h(n,e,t)}),kl=h}(),Tl=Fe(Ol);const Nl={format:"CODE128",renderer:"svg",width:2,height:132,displayValue:!0,fontOptions:"",font:"Roboto",textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:14,background:"#ffffff",lineColor:"#000000",margin:8},Il=({instructions:e})=>{switch(e.length){case 0:return null;case 1:return ue(Rl,{instruction:e[0]});default:return ue(Ml,{instructions:e})}},Rl=e=>ue("div",{children:[ue("p",{className:"xendit-instructions-single-tab-heading",children:e.instruction.title}),ue(Ll,{instruction:e.instruction})]}),Ml=e=>{const[t,n]=Pe(0);return ue("div",{children:[ue("div",{className:"xendit-instructions-tab-list",children:e.instructions.map((e,r)=>ue("button",{className:We("xendit-instructions-tab-button",{"xendit-instructions-active-tab":t===r}),onClick:()=>n(r),children:e.title},r))}),ue(Ll,{instruction:e.instructions[t]})]})},Ll=e=>ue("ol",{className:"xendit-instructions-numbered-list","data-testid":"instructions-steps",children:e.instruction.content.map((e,t)=>ue("li",{className:"xendit-instructions-step-li",children:ue("div",{className:"xendit-instructions-step-box",children:(Array.isArray(e)?e:[e]).map((e,t)=>ue(x,{children:Ul(e)},t))})},t))});function Dl(e){const t=Array.from(e).map((e,t)=>{switch(e.nodeType){case Node.TEXT_NODE:return null===e.textContent?null:e.textContent;case Node.ELEMENT_NODE:return function(e,t){const n=We({"xendit-instructions-bold":"B"===e.nodeName,"xendit-instructions-italics":"I"===e.nodeName});return n?ue("span",{className:n,children:Dl(e.childNodes)},t):Dl(e.childNodes)}(e,t);default:return null}});return t}const ql="undefined"!=typeof DOMParser?new DOMParser:null;function Bl(e){try{if(!ql)return e;return Dl(ql.parseFromString(e,"text/html").body.childNodes)}catch(t){return e}}function Ul(e){if("string"==typeof e)return ue("p",{className:"xendit-instructions-step-item",children:Bl(e)});switch(e.type){case"text":return function(e){return ue("p",{children:Bl(e.text)})}(e);case"image":return function(e){return ue("div",{children:ue("img",{src:e.src,alt:e.alt||"",style:{height:`${e.height??24}px`}})})}(e);case"bullets":return function(e){return ue("ul",{className:"xendit-instructions-bullet-list",children:e.items.map((e,t)=>ue("li",{children:Bl(e)},t))})}(e);case"form":return function(e){return ue("div",{className:"xendit-instructions-form-card",children:[e.heading?ue("h3",{className:"xendit-instructions-form-heading",children:Bl(e.heading)}):null,e.fields.map((e,t)=>ue("div",{className:"xendit-instructions-form-field",children:[ue("div",{className:"xendit-instructions-form-field-label",children:Bl(e.label)}),ue("div",{className:"xendit-instructions-form-field-value",children:Bl(e.value)})]},t))]})}(e);case"table":return function(e){return ue("table",{className:"xendit-instructions-table",children:[ue("thead",{children:ue("tr",{children:e.headers.map((e,t)=>ue("th",{className:"xendit-instructions-table-header",children:Bl(e)},t))})}),ue("tbody",{children:e.rows.map((e,t)=>ue("tr",{children:e.map((e,t)=>ue("td",{className:"xendit-instructions-table-cell",children:Bl(e)},t))},t))})]})}(e)}return null}function jl(e){const{amount:t,channelLogo:n,currency:r,onAffirm:o,barcodeContent:i,merchantName:a,instructions:d,title:s,t:l}=e,[c,u]=Pe(!1),h=Te(()=>{u(!0),o()},[o]),p=[{heading:l("action_barcode.merchant_name"),value:a},{heading:l("action_barcode.barcode_content"),value:i},{heading:l("action_barcode.amount_to_pay"),value:jo(t,r)}],f=Oe(()=>{try{return function(e){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return Tl(t,e,Nl),t}(i)}catch(e){console.log("Error generating barcode SVG:",e);const t=document.createElement("div");return t.innerText=l("action_barcode.unable_to_generate"),t}},[i,l]);return ue("div",{className:"xendit-action-present-to-customer",children:[ue("img",{src:n,alt:"Channel Logo",className:"xendit-action-barcode-channel-logo"}),ue("div",{className:"xendit-action-title",children:s}),ue("div",{"data-testid":"barcode",className:"xendit-action-barcode-barcode-container",role:"button",tabIndex:0,ref:e=>{!e||1===e.childNodes.length&&e.firstChild===f||e?.replaceChildren(f)}}),ue("div",{className:"xendit-action-barcode-content",children:ue("div",{className:"xendit-action-barcode-details",children:p.map((e,t)=>ue("div",{className:"xendit-action-barcode-detail-item",children:ue("div",{className:"xendit-action-barcode-detail-content",children:[ue("div",{className:"xendit-action-barcode-heading xendit-text-12 xendit-text-semibold",children:e.heading}),ue("div",{className:"xendit-action-barcode-value xendit-text-semibold",children:e.value})]})},t))})}),ue("div",{className:"xendit-action-present-to-customer-affirm",children:[ue(Ht,{variant:Gt.WHITE_ROUNDED,disabled:c,onClick:h,className:"xendit-button-block",children:c?ue(Wt,{}):l("action.payment_made")}),ue("div",{className:"xendit-text-12 xendit-text-secondary xendit-text-center",children:l("action.payment_confirmation_instructions")})]}),ue(Il,{instructions:d})]})}class ActionBarcodeBehavior 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)];ht(e?.type,"PRESENT_TO_CUSTOMER"),lt(this.bb.world),lt(this.bb.channel);const t={amount:this.bb.world.session.amount,channelLogo:this.bb.channel.brand_logo_url,currency:this.bb.world.session.currency,onAffirm:this.affirmPayment.bind(this),barcodeContent:e.value,merchantName:this.bb.world.business.name??"",paymentCode:e.value,instructions:e.instructions??[],title:e.action_title,t:this.bb.sdk.t.bind(this.bb.sdk)};this.cleanupFn=this.ensureHasActionContainer(),this.populateActionContainer(()=>v(jl,t))}affirmPayment(){this.bb.sdk.isProdLive()?this.bb.pollImmediatelyRequested=!0:this.bb.simulatePaymentRequested=!0,this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent)}}class ActionPaylinkBehavior{bb;actionIndex;el=null;constructor(e,t){this.bb=e,this.actionIndex=t}enter(){lt(this.bb.world),lt(this.bb.world.paymentEntity);const e=this.bb.world?.paymentEntity?.entity.actions[Number(this.actionIndex)];if(!e)throw new Error("Action not found for paylink behavior");ht(e.type,"REDIRECT_CUSTOMER"),ht(e.descriptor,"WEB_GOOGLE_PAYLINK");const t=document.createElement("link");t.rel="facilitated-payment",t.href=e.value,this.el=t,document.head.appendChild(t)}exit(){this.el?.remove(),this.el=null}}function Fl(e){return e&&e.merchantAccountInformation&&"object"==typeof e.merchantAccountInformation?e.merchantAccountInformation["ID.CO.QRIS.WWW"]?Gl:e.merchantAccountInformation.A0000006150001?Vl:null:null}function Gl(e){const{channelLogo:t,channelName:n,merchantName:r,amountText:o,parsedQr:i,t:a}=e;const d=function(){const e=i?.merchantAccountInformation;if("string"==typeof e)return;const t=e?.["ID.CO.QRIS.WWW"];return"string"!=typeof t&&t?.nmid?`NMID: ${t.nmid}`:void 0}(),s="#DB4849",l="24px";return ue("div",{style:{display:"flex",flexDirection:"column",position:"relative",paddingTop:"24px",paddingLeft:l,paddingRight:l,overflow:"hidden"},children:[ue("img",{src:t,alt:a("image_alt.channel_logo",{channelName:n}),style:{height:"64px",alignSelf:"center"}}),ue("div",{className:"xendit-text-center xendit-text-16",style:{display:"flex",flexDirection:"column",gap:"4px",marginTop:"16px"},children:[ue("div",{className:"xendit-text-semibold",children:r}),d?ue("div",{children:d}):null]}),ue("div",{style:{position:"relative",margin:`-${l}`,marginBottom:"0",padding:l},children:[ue("div",{style:{padding:"20px",backgroundColor:"white",zIndex:1,position:"relative",borderRadius:"4px",display:"flex",flexDirection:"column",gap:"16px"},children:[e.qr,ue("div",{className:"xendit-text-semibold xendit-text-center",style:{fontSize:"24px",lineHeight:l},children:o})]}),ue("svg",{style:{position:"absolute",top:"-9%",left:0,width:"60%",height:"auto",pointerEvents:"none"},viewBox:"0 0 100 100",children:ue("polygon",{fill:s,points:"0,0 50,50 0,100"})}),ue("svg",{style:{position:"absolute",bottom:0,right:0,width:"30%",height:"auto",pointerEvents:"none"},viewBox:"0 0 100 100",children:ue("polygon",{fill:s,points:"0,100 100,100 100,0"})})]})]})}function Vl(e){const{merchantName:t,amountText:n}=e,r="#ED3066";return ue("div",{style:{display:"flex",flexDirection:"column",position:"relative",paddingTop:"40px",overflow:"hidden"},children:[ue("div",{className:"xendit-text-center xendit-text-16",children:"Scan To Pay"}),ue("div",{className:"xendit-text-semibold xendit-text-center",style:{fontSize:"24px",lineHeight:"24px",marginTop:"12px"},children:n}),ue("div",{className:"xendit-text-center xendit-text-16 xendit-text-semibold",style:{marginTop:"8px"},children:t}),ue("svg",{viewBox:"0 0 180 180",style:{aspectRatio:"1",margin:"32px 14% 24px"},children:[ue("rect",{width:"180",height:"180",fill:r,rx:13}),ue("rect",{x:"10",y:"10",width:"160",height:"140",fill:"white",rx:4}),ue("path",{d:"M0 180 L20 180 L0 160 Z",fill:r}),ue("path",{d:"M10 150 L30 150 L10 130 Z",fill:"white"}),ue("foreignObject",{x:"40",y:"30",width:"100",height:"100",children:ue("div",{style:{"--xendit-qr-foreground-color":r},children:e.qr})}),ue("foreignObject",{x:"0",y:"160",height:"10px",width:"180px",style:{overflow:"visible"},children:ue("div",{style:{display:"flex",flexDirection:"column",height:"10px"},children:ue("svg",{xmlns:"http://www.w3.org/2000/svg",width:"209",height:"19",fill:"none",viewBox:"0 0 209 19",style:{width:"auto"},children:[ue("title",{children:"Malaysia National QR"}),ue("path",{fill:"#fff",d:"M1.16 14.58q-.56 0-.86-.32t-.3-.88V1.36Q0 .78.32.48.64.16 1.2.16q.5 0 .78.2.3.18.54.64l4.94 9.14h-.64L11.76 1q.24-.46.52-.64.28-.2.78-.2.56 0 .86.32.3.3.3.88v12.02q0 .56-.3.88-.28.32-.86.32-.56 0-.86-.32t-.3-.88V4.12h.44l-4.2 7.66a1.6 1.6 0 0 1-.42.5q-.22.16-.6.16t-.62-.16a1.6 1.6 0 0 1-.42-.5L1.84 4.1h.48v9.28q0 .56-.3.88-.28.32-.86.32m19.643.04q-1.06 0-1.9-.4a3.44 3.44 0 0 1-1.3-1.12 2.8 2.8 0 0 1-.46-1.58q0-1.08.56-1.7.56-.64 1.82-.92t3.38-.28h1v1.44h-.98q-1.239 0-1.98.12t-1.06.42q-.3.28-.3.8 0 .66.46 1.08t1.28.42q.66 0 1.16-.3.52-.32.82-.86t.3-1.24V8.2q0-1-.44-1.44t-1.48-.44q-.579 0-1.26.14-.66.14-1.4.48-.38.18-.68.1a.77.77 0 0 1-.44-.32 1.05 1.05 0 0 1-.16-.56q0-.3.16-.58.16-.3.54-.44a9 9 0 0 1 1.76-.54 8.6 8.6 0 0 1 1.56-.16q1.44 0 2.36.44a2.9 2.9 0 0 1 1.4 1.34q.46.88.46 2.28v4.8q0 .62-.3.96-.3.32-.86.32t-.88-.32q-.3-.34-.3-.96v-.96h.16q-.14.7-.56 1.22a2.7 2.7 0 0 1-1.02.78q-.62.28-1.42.28m11.558 0q-1.66 0-2.5-.94-.84-.96-.84-2.8V1.42q0-.62.32-.94t.92-.32.92.32q.34.32.34.94v9.34q0 .92.38 1.36.4.44 1.12.44h.3l.28-.04q.28-.04.38.16.1.18.1.76 0 .5-.2.78-.201.28-.66.34l-.42.04q-.22.02-.44.02m6.766 0q-1.06 0-1.9-.4a3.45 3.45 0 0 1-1.3-1.12 2.8 2.8 0 0 1-.46-1.58q0-1.08.56-1.7.56-.64 1.82-.92t3.38-.28h1v1.44h-.98q-1.239 0-1.98.12t-1.06.42q-.3.28-.3.8 0 .66.46 1.08t1.28.42q.66 0 1.16-.3.52-.32.82-.86t.3-1.24V8.2q0-1-.44-1.44t-1.48-.44q-.579 0-1.26.14-.66.14-1.4.48-.38.18-.68.1a.77.77 0 0 1-.44-.32 1.05 1.05 0 0 1-.16-.56q0-.3.16-.58.16-.3.54-.44a9 9 0 0 1 1.76-.54 8.6 8.6 0 0 1 1.56-.16q1.44 0 2.36.44a2.9 2.9 0 0 1 1.4 1.34q.46.88.46 2.28v4.8q0 .62-.3.96-.3.32-.86.32t-.88-.32q-.3-.34-.3-.96v-.96h.16q-.14.7-.56 1.22a2.7 2.7 0 0 1-1.02.78q-.62.28-1.42.28m10.6 3.56q-.44 0-.72-.24a.91.91 0 0 1-.34-.6q-.04-.38.14-.8l1.36-3.02v1.04l-3.64-8.42q-.18-.44-.12-.82a.89.89 0 0 1 .36-.6q.32-.24.86-.24.46 0 .74.22.28.2.5.78l2.7 6.74h-.6l2.76-6.76q.22-.56.52-.76.3-.22.8-.22.44 0 .7.24.26.22.32.6.06.36-.14.8l-4.86 11.1q-.26.56-.56.76t-.78.2m11.932-3.56a10 10 0 0 1-1.82-.18 5.4 5.4 0 0 1-1.72-.62 1.26 1.26 0 0 1-.46-.46 1.14 1.14 0 0 1-.1-.54 1 1 0 0 1 .2-.48.83.83 0 0 1 .44-.26q.28-.06.6.1a7.3 7.3 0 0 0 1.5.54q.7.14 1.38.14.96 0 1.42-.32.48-.34.48-.88 0-.46-.32-.7-.3-.26-.92-.38l-2-.38q-1.24-.24-1.9-.9-.64-.68-.64-1.74 0-.96.52-1.66.54-.7 1.48-1.08t2.16-.38q.88 0 1.64.2.78.18 1.5.58.3.16.4.42.12.26.06.54-.06.26-.24.48a.84.84 0 0 1-.46.26q-.26.04-.6-.12a5.4 5.4 0 0 0-1.2-.46 4.5 4.5 0 0 0-1.08-.14q-.98 0-1.46.34-.46.34-.46.9 0 .42.28.7t.86.38l2 .38q1.3.24 1.96.88.68.64.68 1.72 0 1.46-1.14 2.3-1.14.82-3.04.82m7.926-.06q-.6 0-.92-.36t-.32-1V5.86q0-.66.32-1 .32-.36.92-.36t.92.36q.34.34.34 1v7.34q0 .64-.32 1t-.94.36m0-11.92q-.7 0-1.1-.34-.38-.36-.38-.98 0-.64.38-.98.4-.34 1.1-.34.72 0 1.1.34t.38.98q0 .62-.38.98-.38.34-1.1.34m7.578 11.98q-1.06 0-1.9-.4a3.44 3.44 0 0 1-1.3-1.12 2.8 2.8 0 0 1-.46-1.58q0-1.08.56-1.7.56-.64 1.82-.92t3.38-.28h1v1.44h-.98q-1.24 0-1.98.12t-1.06.42q-.3.28-.3.8 0 .66.46 1.08t1.28.42q.66 0 1.16-.3.52-.32.82-.86t.3-1.24V8.2q0-1-.44-1.44t-1.48-.44q-.58 0-1.26.14-.66.14-1.4.48-.38.18-.68.1a.77.77 0 0 1-.44-.32 1.05 1.05 0 0 1-.16-.56q0-.3.16-.58.159-.3.54-.44a9 9 0 0 1 1.76-.54 8.6 8.6 0 0 1 1.56-.16q1.44 0 2.36.44a2.9 2.9 0 0 1 1.4 1.34q.46.88.46 2.28v4.8q0 .62-.3.96-.3.32-.86.32t-.88-.32q-.3-.34-.3-.96v-.96h.16q-.14.7-.56 1.22a2.7 2.7 0 0 1-1.02.78q-.62.28-1.42.28m15.587-.04q-.58 0-.9-.32-.3-.32-.3-.92V1.44q0-.62.3-.94.32-.34.82-.34.46 0 .68.18.24.16.56.56l7.66 9.94h-.52V1.38q0-.58.3-.9.32-.32.9-.32t.88.32.3.9v12q0 .56-.28.88t-.76.32q-.46 0-.74-.18-.26-.18-.58-.58l-7.64-9.94h.5v9.46q0 .6-.3.92t-.88.32m17.241.04q-1.06 0-1.9-.4a3.44 3.44 0 0 1-1.3-1.12 2.8 2.8 0 0 1-.46-1.58q0-1.08.56-1.7.56-.64 1.82-.92t3.38-.28h1v1.44h-.98q-1.24 0-1.98.12t-1.06.42q-.3.28-.3.8 0 .66.46 1.08t1.28.42q.66 0 1.16-.3.52-.32.82-.86t.3-1.24V8.2q0-1-.44-1.44t-1.48-.44q-.58 0-1.26.14-.66.14-1.4.48-.38.18-.68.1a.76.76 0 0 1-.44-.32 1.05 1.05 0 0 1-.16-.56q0-.3.16-.58.159-.3.54-.44a9 9 0 0 1 1.76-.54 8.6 8.6 0 0 1 1.56-.16q1.44 0 2.36.44.94.44 1.4 1.34.46.88.46 2.28v4.8q0 .62-.3.96-.3.32-.86.32t-.88-.32q-.3-.34-.3-.96v-.96h.16q-.14.7-.56 1.22a2.7 2.7 0 0 1-1.02.78q-.62.28-1.42.28m12.697 0q-1.3 0-2.18-.44-.86-.44-1.28-1.28-.42-.86-.42-2.12V6.52h-1.04q-.48 0-.74-.24-.26-.26-.26-.7 0-.46.26-.7t.74-.24h1.04V2.82q0-.62.32-.94.34-.32.94-.32t.92.32.32.94v1.82h2.12q.48 0 .74.24t.26.7q0 .44-.26.7-.26.24-.74.24h-2.12v4.12q0 .96.42 1.44t1.36.48q.34 0 .6-.06t.46-.08q.24-.02.4.16.16.16.16.68 0 .4-.14.72-.12.3-.46.42-.26.08-.68.14-.42.08-.74.08m5.19-.06q-.6 0-.92-.36t-.32-1V5.86q0-.66.32-1 .32-.36.92-.36t.92.36q.34.34.34 1v7.34q0 .64-.32 1t-.94.36m0-11.92q-.7 0-1.1-.34-.38-.36-.38-.98 0-.64.38-.98.4-.34 1.1-.34.72 0 1.1.34t.38.98q0 .62-.38.98-.38.34-1.1.34m8.818 11.98q-1.521 0-2.64-.62a4.33 4.33 0 0 1-1.74-1.76q-.62-1.16-.62-2.72 0-1.18.34-2.1a4.5 4.5 0 0 1 1.02-1.6q.66-.68 1.58-1.02.92-.36 2.06-.36 1.52 0 2.64.62 1.119.62 1.74 1.76.62 1.14.62 2.7 0 1.18-.36 2.12a4.5 4.5 0 0 1-1 1.62q-.66.66-1.58 1.02-.92.34-2.06.34m0-1.9q.74 0 1.3-.36t.86-1.06q.32-.72.32-1.78 0-1.6-.68-2.38-.681-.8-1.8-.8-.74 0-1.3.36-.56.34-.88 1.06-.3.7-.3 1.76 0 1.58.68 2.4.68.8 1.8.8m8.803 1.86q-.6 0-.92-.32-.32-.34-.32-.96V5.74q0-.62.32-.94t.9-.32.9.32.32.94V7.1l-.22-.5q.44-1.06 1.36-1.6.94-.56 2.12-.56t1.94.44 1.14 1.34q.38.88.38 2.24v4.84q0 .62-.32.96-.32.32-.92.32t-.94-.32q-.32-.34-.32-.96V8.58q0-1.14-.44-1.66-.42-.52-1.32-.52-1.1 0-1.76.7-.64.68-.64 1.82v4.38q0 1.28-1.26 1.28m14.179.04q-1.06 0-1.9-.4a3.45 3.45 0 0 1-1.3-1.12 2.8 2.8 0 0 1-.46-1.58q0-1.08.56-1.7.56-.64 1.82-.92t3.38-.28h1v1.44h-.98q-1.239 0-1.98.12t-1.06.42q-.3.28-.3.8 0 .66.46 1.08t1.28.42q.66 0 1.16-.3.52-.32.82-.86t.3-1.24V8.2q0-1-.44-1.44t-1.48-.44q-.579 0-1.26.14-.66.14-1.4.48-.38.18-.68.1a.77.77 0 0 1-.44-.32 1.06 1.06 0 0 1-.16-.56q0-.3.16-.58.16-.3.54-.44a9 9 0 0 1 1.76-.54 8.6 8.6 0 0 1 1.56-.16q1.44 0 2.36.44.94.44 1.4 1.34.46.88.46 2.28v4.8q0 .62-.3.96-.3.32-.86.32t-.88-.32q-.3-.34-.3-.96v-.96h.16a2.8 2.8 0 0 1-.56 1.22 2.7 2.7 0 0 1-1.02.78q-.62.28-1.42.28m11.558 0q-1.66 0-2.5-.94-.84-.96-.84-2.8V1.42q0-.62.32-.94t.92-.32.92.32q.34.32.34.94v9.34q0 .92.38 1.36.4.44 1.12.44h.3l.28-.04q.28-.04.38.16.1.18.1.76 0 .5-.2.78-.201.28-.66.34l-.42.04a5 5 0 0 1-.44.02m21.436 2.06q.28.44.22.8t-.32.6a1.13 1.13 0 0 1-.64.32 1.25 1.25 0 0 1-.76-.08q-.38-.14-.64-.56l-1.38-2.22a1.84 1.84 0 0 0-.76-.7q-.46-.22-1.14-.22l1.98-.78q.94 0 1.5.34.56.32 1.08 1.14zm-5.4-2.06q-2.04 0-3.58-.9-1.52-.9-2.36-2.52-.84-1.64-.84-3.84 0-1.66.48-2.98.48-1.34 1.36-2.28a5.9 5.9 0 0 1 2.14-1.46q1.26-.52 2.8-.52 2.06 0 3.58.9 1.52.88 2.36 2.5t.84 3.82q0 1.66-.48 3a6.5 6.5 0 0 1-1.38 2.3 5.9 5.9 0 0 1-2.14 1.48q-1.24.5-2.78.5m0-2.2q1.3 0 2.2-.6.92-.6 1.4-1.74.5-1.14.5-2.72 0-2.4-1.08-3.72-1.06-1.32-3.02-1.32-1.28 0-2.2.6-.92.58-1.42 1.72-.48 1.12-.48 2.72 0 2.38 1.08 3.72t3.02 1.34m11.163 2.16q-.62 0-.96-.34-.32-.36-.32-.98V1.62q0-.64.34-.96.34-.34.96-.34h4.82q2.32 0 3.58 1.12 1.26 1.1 1.26 3.1 0 1.3-.58 2.24-.56.94-1.64 1.44t-2.62.5l.18-.3h.66q.82 0 1.42.4.621.4 1.08 1.26l1.5 2.78q.24.42.22.82a.93.93 0 0 1-.3.66q-.28.24-.82.24t-.88-.22q-.339-.24-.6-.72l-2.02-3.72q-.36-.68-.86-.9-.48-.24-1.24-.24h-1.9v4.48q0 .62-.32.98-.32.34-.96.34m1.28-7.7h3.12q1.38 0 2.08-.56.72-.58.72-1.72 0-1.12-.72-1.68-.7-.58-2.08-.58h-3.12z"})]})})})]})]})}var Hl,Wl,Kl={};function Xl(){return Wl?Hl:(Wl=1,Hl=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then})}var zl,Yl={},Ql={};function Zl(){if(zl)return Ql;let e;zl=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 Ql.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},Ql.getSymbolTotalCodewords=function(e){return t[e]},Ql.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},Ql.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');e=t},Ql.isKanjiModeEnabled=function(){return void 0!==e},Ql.toSJIS=function(t){return e(t)},Ql}var Jl,ec,tc,nc,rc,oc={};function ic(){return Jl||(Jl=1,(e=oc).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}}),oc;var e}var ac,dc={};var sc,lc={};var cc,uc={};var hc,pc={};function fc(){if(hc)return pc;hc=1;const e=ic(),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 pc.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}},pc.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}},pc}var mc,_c,yc,bc,gc={},vc={};function $c(){return _c||(_c=1,function(e){const t=function(){if(mc)return vc;mc=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]}(),vc.log=function(e){if(e<1)throw new Error("log("+e+")");return t[e]},vc.exp=function(t){return e[t]},vc.mul=function(n,r){return 0===n||0===r?0:e[t[n]+t[r]]},vc}();e.mul=function(e,n){const r=new Uint8Array(e.length+n.length-1);for(let o=0;o<e.length;o++)for(let i=0;i<n.length;i++)r[o+i]^=t.mul(e[o],n[i]);return r},e.mod=function(e,n){let r=new Uint8Array(e);for(;r.length-n.length>=0;){const e=r[0];for(let o=0;o<n.length;o++)r[o]^=t.mul(n[o],e);let o=0;for(;o<r.length&&0===r[o];)o++;r=r.slice(o)}return r},e.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let o=0;o<n;o++)r=e.mul(r,new Uint8Array([1,t.exp(o)]));return r}}(gc)),gc}var xc,wc={},Ec={},Cc={};function kc(){return xc||(xc=1,Cc.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),Cc}var Pc,Ac,Sc,Oc={};function Tc(){if(Pc)return Oc;Pc=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]))+";Oc.KANJI=new RegExp(t,"g"),Oc.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Oc.BYTE=new RegExp(n,"g"),Oc.NUMERIC=new RegExp(e,"g"),Oc.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const r=new RegExp("^"+t+"$"),o=new RegExp("^"+e+"$"),i=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return Oc.testKanji=function(e){return r.test(e)},Oc.testNumeric=function(e){return o.test(e)},Oc.testAlphanumeric=function(e){return i.test(e)},Oc}function Nc(){return Ac||(Ac=1,function(e){const t=kc(),n=Tc();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}}}(Ec)),Ec}function Ic(){return Sc||(Sc=1,function(e){const t=Zl(),n=fc(),r=ic(),o=Nc(),i=kc(),a=t.getBCHDigit(7973);function d(e,t){return o.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 i.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,r,a){if(!i.isValid(e))throw new Error("Invalid QR Code version");void 0===a&&(a=o.BYTE);const s=8*(t.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,r));if(a===o.MIXED)return s;const l=s-d(a,e);switch(a){case o.NUMERIC:return Math.floor(l/10*3);case o.ALPHANUMERIC:return Math.floor(l/11*2);case o.KANJI:return Math.floor(l/13);case o.BYTE:default:return Math.floor(l/8)}},e.getBestVersionForData=function(t,n){let i;const a=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,o.MIXED))return r}(t,a);if(0===t.length)return 1;i=t[0]}else i=t;return function(t,n,r){for(let o=1;o<=40;o++)if(n<=e.getCapacity(o,r,t))return o}(i.mode,i.getLength(),a)},e.getEncodedBits=function(e){if(!i.isValid(e)||e<7)throw new Error("Invalid QR Code version");let n=e<<12;for(;t.getBCHDigit(n)-a>=0;)n^=7973<<t.getBCHDigit(n)-a;return e<<12|n}}(wc)),wc}var Rc,Mc={};var Lc,Dc,qc,Bc,Uc,jc,Fc,Gc,Vc={};var Hc,Wc,Kc,Xc={exports:{}};function zc(){return Hc||(Hc=1,function(e){var t={single_source_shortest_paths:function(e,n,r){var o={},i={};i[n]=0;var a,d,s,l,c,u,h,p=t.PriorityQueue.make();for(p.push(n,0);!p.empty();)for(s in d=(a=p.pop()).value,l=a.cost,c=e[d]||{})c.hasOwnProperty(s)&&(u=l+c[s],h=i[s],(void 0===i[s]||h>u)&&(i[s]=u,p.push(s,u),o[s]=d));if(void 0!==r&&void 0===i[r]){var f=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(f)}return o},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 o=t.single_source_shortest_paths(e,n,r);return t.extract_shortest_path_from_predecessor_list(o,r)},PriorityQueue:{make:function(e){var n,r=t.PriorityQueue,o={};for(n in e=e||{},r)r.hasOwnProperty(n)&&(o[n]=r[n]);return o.queue=[],o.sorter=e.sorter||r.default_sorter,o},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}(Xc)),Xc.exports}function Yc(){return Wc||(Wc=1,function(e){const t=Nc(),n=function(){if(Dc)return Lc;Dc=1;const e=Nc();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 o=this.data.length-t;o>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,3*o+1))},Lc=t}(),r=function(){if(Bc)return qc;Bc=1;const e=Nc(),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)},qc=n}(),o=function(){if(jc)return Uc;jc=1;const e=Nc();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)},Uc=t}(),i=function(){if(Gc)return Fc;Gc=1;const e=Nc(),t=Zl();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)}},Fc=n}(),a=Tc(),d=Zl(),s=zc();function l(e){return unescape(encodeURIComponent(e)).length}function c(e,t,n){const r=[];let o;for(;null!==(o=e.exec(n));)r.push({data:o[0],index:o.index,mode:t,length:o[0].length});return r}function u(e){const n=c(a.NUMERIC,t.NUMERIC,e),r=c(a.ALPHANUMERIC,t.ALPHANUMERIC,e);let o,i;d.isKanjiModeEnabled()?(o=c(a.BYTE,t.BYTE,e),i=c(a.KANJI,t.KANJI,e)):(o=c(a.BYTE_KANJI,t.BYTE,e),i=[]);return n.concat(r,o,i).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,a){switch(a){case t.NUMERIC:return n.getBitsLength(e);case t.ALPHANUMERIC:return r.getBitsLength(e);case t.KANJI:return i.getBitsLength(e);case t.BYTE:return o.getBitsLength(e)}}function p(e,a){let s;const l=t.getBestModeForData(e);if(s=t.from(a,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 i(e);case t.BYTE:return new o(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 o=function(e){const n=[];for(let r=0;r<e.length;r++){const o=e[r];switch(o.mode){case t.NUMERIC:n.push([o,{data:o.data,mode:t.ALPHANUMERIC,length:o.length},{data:o.data,mode:t.BYTE,length:o.length}]);break;case t.ALPHANUMERIC:n.push([o,{data:o.data,mode:t.BYTE,length:o.length}]);break;case t.KANJI:n.push([o,{data:o.data,mode:t.BYTE,length:l(o.data)}]);break;case t.BYTE:n.push([{data:o.data,mode:t.BYTE,length:l(o.data)}])}}return n}(u(n,d.isKanjiModeEnabled())),i=function(e,n){const r={},o={start:{}};let i=["start"];for(let a=0;a<e.length;a++){const d=e[a],s=[];for(let e=0;e<d.length;e++){const l=d[e],c=""+a+e;s.push(c),r[c]={node:l,lastCount:0},o[c]={};for(let e=0;e<i.length;e++){const a=i[e];r[a]&&r[a].node.mode===l.mode?(o[a][c]=h(r[a].lastCount+l.length,l.mode)-h(r[a].lastCount,l.mode),r[a].lastCount+=l.length):(r[a]&&(r[a].lastCount=l.length),o[a][c]=h(l.length,l.mode)+4+t.getCharCountIndicator(l.mode,n))}}i=s}for(let e=0;e<i.length;e++)o[i[e]].end=0;return{map:o,table:r}}(o,r),a=s.find_path(i.map,"start","end"),c=[];for(let e=1;e<a.length-1;e++)c.push(i.table[a[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()))}}(Vc)),Vc}function Qc(){if(Kc)return Yl;Kc=1;const e=Zl(),t=ic(),n=function(){if(tc)return ec;function e(){this.buffer=[],this.length=0}return tc=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++}},ec=e}(),r=function(){if(rc)return nc;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 rc=1,e.prototype.set=function(e,t,n,r){const o=e*this.size+t;this.data[o]=n,r&&(this.reservedBit[o]=!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]},nc=e}(),o=(ac||(ac=1,function(e){const t=Zl().getSymbolSize;e.getRowColCoords=function(e){if(1===e)return[];const n=Math.floor(e/7)+2,r=t(e),o=145===r?26:2*Math.ceil((r-13)/(2*n-2)),i=[r-7];for(let e=1;e<n-1;e++)i[e]=i[e-1]-o;return i.push(6),i.reverse()},e.getPositions=function(t){const n=[],r=e.getRowColCoords(t),o=r.length;for(let e=0;e<o;e++)for(let t=0;t<o;t++)0===e&&0===t||0===e&&t===o-1||e===o-1&&0===t||n.push([r[e],r[t]]);return n}}(dc)),dc),i=function(){if(sc)return lc;sc=1;const e=Zl().getSymbolSize;return lc.getPositions=function(t){const n=e(t);return[[0,0],[n-7,0],[0,n-7]]},lc}(),a=(cc||(cc=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,o=10;function i(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,o=0,i=0,a=null,d=null;for(let s=0;s<n;s++){o=i=0,a=d=null;for(let l=0;l<n;l++){let n=e.get(s,l);n===a?o++:(o>=5&&(r+=t+(o-5)),a=n,o=1),n=e.get(l,s),n===d?i++:(i>=5&&(r+=t+(i-5)),d=n,i=1)}o>=5&&(r+=t+(o-5)),i>=5&&(r+=t+(i-5))}return r},e.getPenaltyN2=function(e){const t=e.size;let r=0;for(let n=0;n<t-1;n++)for(let o=0;o<t-1;o++){const t=e.get(n,o)+e.get(n,o+1)+e.get(n+1,o)+e.get(n+1,o+1);4!==t&&0!==t||r++}return r*n},e.getPenaltyN3=function(e){const t=e.size;let n=0,o=0,i=0;for(let r=0;r<t;r++){o=i=0;for(let a=0;a<t;a++)o=o<<1&2047|e.get(r,a),a>=10&&(1488===o||93===o)&&n++,i=i<<1&2047|e.get(a,r),a>=10&&(1488===i||93===i)&&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)*o},e.applyMask=function(e,t){const n=t.size;for(let r=0;r<n;r++)for(let o=0;o<n;o++)t.isReserved(o,r)||t.xor(o,r,i(e,o,r))},e.getBestMask=function(t,n){const r=Object.keys(e.Patterns).length;let o=0,i=1/0;for(let a=0;a<r;a++){n(a),e.applyMask(a,t);const r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(a,t),r<i&&(i=r,o=a)}return o}}(uc)),uc),d=fc(),s=function(){if(bc)return yc;bc=1;const e=$c();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),o=this.degree-r.length;if(o>0){const e=new Uint8Array(this.degree);return e.set(r,o),e}return r},yc=t}(),l=Ic(),c=function(){if(Rc)return Mc;Rc=1;const e=Zl(),t=e.getBCHDigit(1335);return Mc.getEncodedBits=function(n,r){const o=n.bit<<3|r;let i=o<<10;for(;e.getBCHDigit(i)-t>=0;)i^=1335<<e.getBCHDigit(i)-t;return 21522^(o<<10|i)},Mc}(),u=Nc(),h=Yc();function p(e,t,n){const r=e.size,o=c.getEncodedBits(t,n);let i,a;for(i=0;i<15;i++)a=1==(o>>i&1),i<6?e.set(i,8,a,!0):i<8?e.set(i+1,8,a,!0):e.set(r-15+i,8,a,!0),i<8?e.set(8,r-i-1,a,!0):i<9?e.set(8,15-i-1+1,a,!0):e.set(8,15-i-1,a,!0);e.set(r-8,8,1,!0)}function f(t,r,o){const i=new n;o.forEach(function(e){i.put(e.mode.bit,4),i.put(e.getLength(),u.getCharCountIndicator(e.mode,t)),e.write(i)});const a=8*(e.getSymbolTotalCodewords(t)-d.getTotalCodewordsCount(t,r));for(i.getLengthInBits()+4<=a&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);const l=(a-i.getLengthInBits())/8;for(let e=0;e<l;e++)i.put(e%2?17:236,8);return function(t,n,r){const o=e.getSymbolTotalCodewords(n),i=d.getTotalCodewordsCount(n,r),a=o-i,l=d.getBlocksCount(n,r),c=o%l,u=l-c,h=Math.floor(o/l),p=Math.floor(a/l),f=p+1,m=h-p,_=new s(m);let y=0;const b=new Array(l),g=new Array(l);let v=0;const $=new Uint8Array(t.buffer);for(let e=0;e<l;e++){const t=e<u?p:f;b[e]=$.slice(y,y+t),g[e]=_.encode(b[e]),y+=t,v=Math.max(v,t)}const x=new Uint8Array(o);let w,E,C=0;for(w=0;w<v;w++)for(E=0;E<l;E++)w<b[E].length&&(x[C++]=b[E][w]);for(w=0;w<m;w++)for(E=0;E<l;E++)x[C++]=g[E][w];return x}(i,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),_=e.getSymbolSize(n),y=new r(_);return function(e,t){const n=e.size,r=i.getPositions(t);for(let t=0;t<r.length;t++){const o=r[t][0],i=r[t][1];for(let t=-1;t<=7;t++)if(!(o+t<=-1||n<=o+t))for(let r=-1;r<=7;r++)i+r<=-1||n<=i+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(o+t,i+r,!0,!0):e.set(o+t,i+r,!1,!0))}}(y,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)}}(y),function(e,t){const n=o.getPositions(t);for(let t=0;t<n.length;t++){const r=n[t][0],o=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,o+n,!0,!0):e.set(r+t,o+n,!1,!0)}}(y,n),p(y,d,0),n>=7&&function(e,t){const n=e.size,r=l.getEncodedBits(t);let o,i,a;for(let t=0;t<18;t++)o=Math.floor(t/3),i=t%3+n-8-3,a=1==(r>>t&1),e.set(o,i,a,!0),e.set(i,o,a,!0)}(y,n),function(e,t){const n=e.size;let r=-1,o=n-1,i=7,a=0;for(let d=n-1;d>0;d-=2)for(6===d&&d--;;){for(let n=0;n<2;n++)if(!e.isReserved(o,d-n)){let r=!1;a<t.length&&(r=1==(t[a]>>>i&1)),e.set(o,d-n,r),i--,-1===i&&(a++,i=7)}if(o+=r,o<0||n<=o){o-=r,r=-r;break}}}(y,m),isNaN(s)&&(s=a.getBestMask(y,p.bind(null,y,d))),a.applyMask(s,y),p(y,d,s),{modules:y,version:n,errorCorrectionLevel:d,maskPattern:s,segments:c}}return Yl.create=function(n,r){if(void 0===n||""===n)throw new Error("No input text");let o,i,d=t.M;return void 0!==r&&(d=t.from(r.errorCorrectionLevel,t.M),o=l.from(r.version),i=a.from(r.maskPattern),r.toSJISFunc&&e.setToSJISFunction(r.toSJISFunc)),m(n,o,d,i)},Yl}var Zc,Jc,eu={},tu={};function nu(){return Zc||(Zc=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,o=e.scale||4;return{width:r,scale:r?4:o,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 o=n.modules.size,i=n.modules.data,a=e.getScale(o,r),d=Math.floor((o+2*r.margin)*a),s=r.margin*a,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[i[Math.floor((e-s)/a)*o+Math.floor((n-s)/a)]?1:0]}t[c++]=u.r,t[c++]=u.g,t[c++]=u.b,t[c]=u.a}}}(tu)),tu}function ru(){return Jc||(Jc=1,function(e){const t=nu();e.render=function(e,n,r){let o=r,i=n;void 0!==o||n&&n.getContext||(o=n,n=void 0),n||(i=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),o=t.getOptions(o);const a=t.getImageWidth(e.modules.size,o),d=i.getContext("2d"),s=d.createImageData(a,a);return t.qrToImageData(s.data,e,o),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,i,a),d.putImageData(s,0,0),i},e.renderToDataURL=function(t,n,r){let o=r;void 0!==o||n&&n.getContext||(o=n,n=void 0),o||(o={});const i=e.render(t,n,o),a=o.type||"image/png",d=o.rendererOpts||{};return i.toDataURL(a,d.quality)}}(eu)),eu}var ou,iu,au={};function du(){if(ou)return au;ou=1;const e=nu();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 au.render=function(r,o,i){const a=e.getOptions(o),d=r.modules.size,s=r.modules.data,l=d+2*a.margin,c=a.color.light.a?"<path "+t(a.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",u="<path "+t(a.color.dark,"stroke")+' d="'+function(e,t,r){let o="",i=0,a=!1,d=0;for(let s=0;s<e.length;s++){const l=Math.floor(s%t),c=Math.floor(s/t);l||a||(a=!0),e[s]?(d++,s>0&&l>0&&e[s-1]||(o+=a?n("M",l+r,.5+c+r):n("m",i,0),i=0,a=!1),l+1<t&&e[s+1]||(o+=n("h",d),d=0)):i++}return o}(s,d,a.margin)+'"/>',h='viewBox="0 0 '+l+" "+l+'"',p='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+h+' shape-rendering="crispEdges">'+c+u+"</svg>\n";return"function"==typeof i&&i(null,p),p},au}var su=function(){if(iu)return Kl;iu=1;const e=Xl(),t=Qc(),n=ru(),r=du();function o(n,r,o,i,a){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?(o=r,r=i=void 0):2!==s||r.getContext||(i=o,o=r,r=void 0),new Promise(function(e,a){try{const a=t.create(o,i);e(n(a,r,i))}catch(e){a(e)}})}if(s<2)throw new Error("Too few arguments provided");2===s?(a=o,o=r,r=i=void 0):3===s&&(r.getContext&&void 0===a?(a=i,i=void 0):(a=i,i=o,o=r,r=void 0));try{const e=t.create(o,i);a(null,n(e,r,i))}catch(e){a(e)}}return Kl.create=t.create,Kl.toCanvas=o.bind(null,n.render),Kl.toDataURL=o.bind(null,n.renderToDataURL),Kl.toString=o.bind(null,function(e,t,n){return r.render(e,n)}),Kl}(),lu=Fe(su),cu=Fe(du());function uu(e,t){const n=lu.create(e),r=cu.render(n,{margin:t.margin}),o=(new DOMParser).parseFromString(r,"image/svg+xml").documentElement;o.style.width="100%",o.style.height="100%",o.setAttribute("width",String(n.modules.size+2*t.margin)),o.setAttribute("height",String(n.modules.size+2*t.margin));const i=o.querySelector("[stroke]");i?.setAttribute("stroke",t.colors[0]);const a=o.querySelector("[fill]");return a?.setAttribute("fill",t.colors[1]),o}function hu(){const e=new Date;return new Intl.DateTimeFormat("en-GB",{hour:"2-digit",minute:"2-digit",day:"2-digit",month:"2-digit",year:"numeric"}).format(e)}function pu(e){return e.split("").map(e=>/[a-zA-Z0-9]/.test(e)?e.toLowerCase():"-").join("").replace(/-+/g,"-")}function fu(e){const{amount:t,businessName:n,channelName:r,channelLogo:o,currency:i,onAffirm:a,qrString:d,parsedQr:s,t:l}=e,[c,u]=Pe(!1),h=Te(()=>{u(!0),a()},[a]),p=Oe(()=>{try{return uu(d,mu)}catch(e){console.log("Error generating QR code SVG:",e);const t=document.createElement("div");return t.innerText=l("action_qr.unable_to_generate"),t}},[d,l]),f=Se(!1),m=Te(e=>{if(e instanceof PointerEvent&&"touch"!==e.pointerType)return;if(f.current)return;e.currentTarget.animate?.([{transform:"scale(1)"},{transform:"scale(0.95)"},{transform:"scale(1)"}],{duration:150,easing:"ease-in-out"});const o=uu(d,_u),a=[pu(n),pu(r),pu(i),pu(String(t)),pu(hu())].join("-");f.current=!0,async function(e,t){if(!window.URL?.createObjectURL)throw new Error("Browser doesn't support URL.createObjectURL");if(!window.Blob)throw new Error("Browser doesn't support Blob");if(!document.createElement)throw new Error("Browser doesn't support createElement");const n=(new XMLSerializer).serializeToString(e),r=new Blob([n],{type:"image/svg+xml;charset=utf-8"}),o=URL.createObjectURL(r),i=new Image;return i.src=o,new Promise((e,n)=>{i.onload=function(){let r=i.naturalWidth,a=i.naturalHeight;if(0!==r)for(;r<256;)r*=2,a*=2;document.body.appendChild(i);const d=document.createElement("canvas");d.width=r,d.height=a;const s=d.getContext("2d");if(!s)return n(new Error("Failed to get canvas context"));s.drawImage(i,0,0,r,a),URL.revokeObjectURL(o);const l=d.toDataURL("image/png"),c=document.createElement("a");c.href=l,c.download=t,document.body.appendChild(c),c.click(),document.body.removeChild(c),i.remove(),e()},i.onerror=function(e){URL.revokeObjectURL(o),n(new Error("Failed to generate image"))}})}(o,`${a}.png`).catch(e=>{console.error("Error downloading QR code:",e)})},[t,n,r,i,d]);if(e.hideUi)return ue("div",{"data-testid":"qr-code",ref:e=>{!e||1===e.childNodes.length&&e.firstChild===p||e?.replaceChildren(p)}});const _=ue("div",{"data-testid":"qr-code",className:"xendit-action-qr-qrcode-container",role:"button",tabIndex:0,onClick:m,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),m(e))},ref:e=>{!e||1===e.childNodes.length&&e.firstChild===p||e?.replaceChildren(p)}}),y=ue("div",{className:"xendit-action-present-to-customer-affirm",children:[ue(Ht,{variant:Gt.WHITE_ROUNDED,disabled:c,onClick:h,className:"xendit-button-block",children:c?ue(Wt,{}):l("action.payment_made")}),ue("div",{className:"xendit-text-12 xendit-text-secondary xendit-text-center",children:l("action.payment_confirmation_instructions")})]}),b=jo(t,i),g=Fl(s);return g?ue(x,{children:[ue(g,{channelLogo:o,channelName:r,merchantName:n,amountText:b,parsedQr:s,qr:_,t:l}),ue("div",{style:{padding:"48px",paddingTop:"8px",paddingBottom:"24px"},children:y})]}):ue("div",{className:"xendit-action-present-to-customer",children:[ue("img",{src:o,alt:l("image_alt.channel_logo",{channelName:r}),className:"xendit-action-qr-channel-logo"}),ue("div",{className:"xendit-action-qr-content",children:[ue("div",{className:"xendit-text-16 xendit-text-center xendit-qr-merchant-info",children:ue("div",{className:"xendit-text-semibold",children:n})}),_,ue("div",{className:"xendit-text-16 xendit-text-semibold xendit-text-center",children:b})]}),y]})}const mu={margin:0,colors:["var(--xendit-qr-foreground-color)","var(--xendit-qr-background-color)"]},_u={margin:2,colors:["#000","#FFF"]},yu={"00":{name:"payloadFormatIndicator",type:"numeric"},"01":{name:"pointOfInitiationMethod",type:"numeric"},52:{name:"merchantCategoryCode",type:"numeric"},53:{name:"transactionCurrency",type:"numeric"},54:{name:"transactionAmount",type:"ans"},55:{name:"tipOrConvenienceIndicator",type:"numeric"},56:{name:"valueOfConvenienceFeeFixed",type:"ans"},57:{name:"valueOfConvenienceFeePercentage",type:"ans"},58:{name:"countryCode",type:"ans"},59:{name:"merchantName",type:"ans"},60:{name:"merchantCity",type:"ans"},61:{name:"postalCode",type:"ans"},62:{name:"additionalData",type:"template",templateClass:{"01":{name:"billNumber",type:"ans"},"02":{name:"mobileNumber",type:"ans"},"03":{name:"storeLabel",type:"ans"},"04":{name:"loyaltyNumber",type:"ans"},"05":{name:"referenceLabel",type:"ans"},"06":{name:"customerLabel",type:"ans"},"07":{name:"terminalLabel",type:"ans"},"08":{name:"purposeOfTransaction",type:"ans"},"09":{name:"additionalConsumerDataRequest",type:"ans"}}},63:{name:"crc",type:"ans"},64:{name:"language",type:"template",templateClass:{"00":{name:"languagePreference",type:"ans"},"01":{name:"merchantNameAlternateLanguage",type:"string"},"02":{name:"merchantCityAlternateLanguage",type:"string"}}}},bu={"ID.CO.QRIS.WWW":{"00":{name:"globallyUniqueIdentifier",type:"string"},"02":{name:"nmid",type:"ans"},"03":{name:"businessType",type:"ans"}},"ID.DANA.WWW":{"00":{name:"globallyUniqueIdentifier",type:"string"},"01":{name:"merchantId",type:"ans"},"02":{name:"storeOrTerminalId",type:"ans"},"03":{name:"additionalIdentifier",type:"ans"}},"SG.SGQR":{"00":{name:"globallyUniqueIdentifier",type:"string"},"01":{name:"sgqrNumber",type:"ans"},"02":{name:"version",type:"ans"},"03":{name:"postalCode",type:"ans"},"04":{name:"level",type:"ans"},"05":{name:"unit",type:"ans"},"06":{name:"misc",type:"ans"},"07":{name:"revisionDate",type:"ans"}},"SG.PAYNOW":{"00":{name:"globallyUniqueIdentifier",type:"string"},"01":{name:"type",type:"numeric"},"02":{name:"identifier",type:"ans"},"03":{name:"editable",type:"numeric"}},"ph.ppmi.p2m":{"00":{name:"globallyUniqueIdentifier",type:"string"},"01":{name:"acquirerId",type:"ans"},"03":{name:"merchantId",type:"ans"},"05":{name:"notifyFlags",type:"numeric"}}};function gu(e){return/^[\uD800-\uDBFF]$/.test(e)}function vu(e){const t=new Set,n=[];for(;e.length;){const r=e.substring(0,2);if(!/^\d{2}$/.test(r))throw new Error("Invalid EMVCo QR string, invalid tag");if(t.has(r))throw new Error(`Duplicate tag ${r} in EMVCo QR string`);t.add(r);const o=e.substring(2,4);if(!/^\d{2}$/.test(o))throw new Error("Invalid EMVCo QR string, invalid length");const i=parseInt(o,10);if(!i)throw new Error(`Invalid EMVCo QR string, expected length but got ${o}`);let a="",d=0,s=0;for(;s<i;){const t=e.substring(4+d,5+d);if(""===t)throw new Error("Invalid EMVCo QR string, unexpected end of string");a+=t,d+=1,gu(t)?s+=.5:s+=1}n.push({key:r,value:a}),e=e.substring(4+d)}return n}function $u(e,t,n,r){e[`field${n}`]=r;const o=t[n];if(!o)return;const i="template"===o.type&&o.templateClass?xu(o.templateClass,r).result:r;e[o.name]=i}function xu(e,t){const n=vu(t),r={};for(const{key:t,value:o}of n)$u(r,e,t,o);return{result:r,raw:n}}function wu(e,t,n){const r=vu(n),o=r.find(({key:e})=>"00"===e)?.value;if(!o)throw new Error(`Missing field 00 in merchant account information template for field ${t}`);const i=bu[o];return i&&(e[o]=xu(i,n).result),e}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)];ht(e?.type,"PRESENT_TO_CUSTOMER"),lt(this.bb.world),lt(this.bb.channel),lt(this.bb.world.paymentEntity);let t=null;try{t=function(e){const{result:t,raw:n}=xu(yu,e);t.merchantAccountInformation={};for(const e of n){const n=Number(e.key);n>=26&&n<=51&&wu(t.merchantAccountInformation,e.key,e.value)}return t}(e.value)}catch{}if(this.bb.mock&&"string"==typeof this.bb.channelProperties?.mock_emvco_qr_field_26_00){const e=this.bb.channelProperties.mock_emvco_qr_field_26_00;t={merchantAccountInformation:{[e]:{globallyUniqueIdentifier:e}}}}const n=function(e){return null!==Fl(e)}(t),r=this.bb.sdk[le].liveComponents.actionContainer,o={amount:this.bb.world.session.amount,businessName:this.bb.world.business.name??"",channelName:this.bb.channel.brand_name,channelLogo:this.bb.channel.brand_logo_url,currency:this.bb.world.session.currency,hideUi:"true"===r?.getAttribute("data-qr-code-only")||!1,onAffirm:this.affirmPayment.bind(this),qrString:e.value,parsedQr:t,title:e.action_subtitle,t:this.bb.sdk.t.bind(this.bb.sdk)},i=n?Ta.QrWithCustomArt:Ta.Generic;this.cleanupFn=this.ensureHasActionContainer(i),this.populateActionContainer(()=>v(fu,o))}affirmPayment(){this.bb.sdk.isProdLive()?this.bb.pollImmediatelyRequested=!0:this.bb.simulatePaymentRequested=!0,this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent)}exit(){super.exit()}}class ActionRedirectBehavior{bb;url;constructor(e,t){this.bb=e,this.url=t}enter(){this.bb.dispatchEvent(new XenditWillRedirectEvent),window.location.href=this.url}}const Eu=H({fire:()=>{},clear:()=>{},text:""}),Cu=({children:e})=>{const[t,n]=Pe(""),r=Te(e=>{n(e);const t=setTimeout(()=>{n("")},2e3);return()=>clearTimeout(t)},[]),o=Te(()=>{n("")},[]);return ue(Eu.Provider,{value:{text:t,fire:r,clear:o},children:ue("div",{style:{position:"relative"},children:e})})},ku=()=>{const{text:e,clear:t}=Ne(Eu);return Ae(()=>{if(e){const e=()=>{t()};return document.body.addEventListener("mousedown",e),()=>{document.body.removeEventListener("mousedown",e)}}},[t,e]),e?ue("div",{className:"xendit-tooltip",children:e}):null};function Pu(e){const{amount:t,channelLogo:n,currency:r,onAffirm:o,vaNumber:i,merchantName:a,instructions:d,title:s,t:l}=e,[c,u]=Pe(!1),h=Te(()=>{u(!0),o()},[o]),p=[{heading:l("action_va.merchant_name"),value:a},{heading:l("action_va.virtual_account_number"),value:i,enableCopy:!0},{heading:l("action_va.amount_to_pay"),value:jo(t,r),enableCopy:!0}];return ue("div",{className:"xendit-action-present-to-customer",children:[ue("img",{src:n,alt:"Channel Logo",className:"xendit-action-qr-channel-logo"}),ue("div",{className:"xendit-action-title",children:s}),ue("div",{className:"xendit-action-va-content",children:ue("div",{className:"xendit-action-va-details",children:p.map((e,t)=>ue("div",{className:"xendit-action-va-detail-item",children:[ue("div",{className:"xendit-action-va-detail-content",children:[ue("div",{className:"xendit-action-va-heading xendit-text-12 xendit-text-semibold",children:e.heading}),ue("div",{className:"xendit-action-va-value xendit-text-semibold",children:e.value})]}),e.enableCopy?ue(Cu,{children:[ue(Au,{value:e.value,t:l}),ue(ku,{})]}):null]},t))})}),ue("div",{className:"xendit-action-present-to-customer-affirm",children:[ue(Ht,{variant:Gt.WHITE_ROUNDED,disabled:c,onClick:h,className:"xendit-button-block",children:c?ue(Wt,{}):l("action.payment_made")}),ue("div",{className:"xendit-text-12 xendit-text-secondary xendit-text-center",children:l("action.payment_confirmation_instructions")})]}),ue(Il,{instructions:d})]})}const Au=({value:e,t:t})=>{const{fire:n}=Ne(Eu);return ue(Ht,{variant:Gt.WHITE_ROUNDED,size:Vt.SM,onClick:()=>{navigator.clipboard.writeText(e),n(t("action_va.copied_to_clipboard"))},children:[t("action_va.copy"),ue(Ue,{name:"copy",size:16})]})};class ActionVaBehavior 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)];ht(e?.type,"PRESENT_TO_CUSTOMER"),lt(this.bb.world),lt(this.bb.channel);const t={amount:this.bb.world.session.amount,channelLogo:this.bb.channel.brand_logo_url,currency:this.bb.world.session.currency,onAffirm:this.affirmPayment.bind(this),vaNumber:e.value,merchantName:this.bb.world.business.name??"",instructions:e.instructions??[],title:e.action_title,t:this.bb.sdk.t.bind(this.bb.sdk)};this.cleanupFn=this.ensureHasActionContainer(),this.populateActionContainer(()=>v(Pu,t))}affirmPayment(){this.bb.sdk.isProdLive()?this.bb.pollImmediatelyRequested=!0:this.bb.simulatePaymentRequested=!0,this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent)}}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=It(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=mt(300,t.signal).then(()=>{if(this.bb.mock){const t=Rt(e).cipherText;try{return JSON.parse(atob(t))}catch{}return{schemes:["VISA"],country_codes:["ID"],require_billing_information:!1}}{const n=Rt(e).withoutValidationError;return pa(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(!ft(e))throw e});this.cardDetailsRequest={cardNumber:e,promise:n,abortController:t}}}class ChannelInvalidBehavior{bb;channelCode;constructor(e,t){this.bb=e,this.channelCode=t}enter(){}}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 PaymentEntityFailedBehavior{bb;constructor(e){this.bb=e}enter(){this.bb.submissionRequested=!1,this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent)}}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 pt(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 pt(st),e=this.sdk.nextMockUpdate,this.sdk.nextMockUpdate=null}else try{e=await ha(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=Ra(e.payment_token):e.payment_request&&(t=Ra(e.payment_request)),this.onPollResult(e,t),await pt(1)}}isPolling(){return this.started&&!this.stopped}stop(){this.started=!1,this.stopped=!0}}class PaymentEntityPendingBehavior{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":case"PENDING":this.bb.dispatchEvent(new InternalScheduleMockUpdateEvent(La(this.bb.world,this.bb.channel,"SUCCESS")));break;case"FAILED":case"CANCELED":case"EXPIRED":this.bb.dispatchEvent(new InternalScheduleMockUpdateEvent(La(this.bb.world,this.bb.channel,"FAILURE")))}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 PaymentEntityRequiresActionBehavior{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 PaymentOptionsBehavior{bb;channelCode;paymentOptionsRequest=null;constructor(e,t){this.bb=e,this.channelCode=t}enter(){this.lookupPaymentOptions()}update(){this.lookupPaymentOptions()}exit(){this.abortLookupPaymentOptions()}abortLookupPaymentOptions(){this.paymentOptionsRequest&&(this.paymentOptionsRequest.abortController.abort(new AbortError),this.paymentOptionsRequest=null)}lookupPaymentOptions(){let e;if(lt(this.bb.world),lt(this.bb.channel),Ft(this.bb.channel.form,"credit_card_number")){if(e=It(this.bb.channelProperties)??void 0,!e)return;if(this.paymentOptionsRequest?.cardNumber===e)return;if(this.bb.channelData?.paymentOptions?.cardNumber??null===e)return;if(e){if(!Rt(e).valid)return}}else if(this.paymentOptionsRequest||this.bb.channelData?.paymentOptions)return;this.paymentOptionsRequest&&this.abortLookupPaymentOptions();const t=new AbortController,n=async function(e,t,n,r,o,i){if(i)return mt(st,o).then(()=>function(e,t){return{channel_code:e,country:t.country,currency:t.currency,amount:t.amount,installment_plans:[{interval:"MONTH",interval_count:1,terms:3,installment_amount:Math.floor(t.amount/3),total_amount:t.amount,description:"Unused",code:"3M",interest_rate:1},{interval:"MONTH",interval_count:1,terms:6,installment_amount:Math.floor(t.amount/6),total_amount:t.amount,description:"Unused",code:"6M",interest_rate:1},{interval:"MONTH",interval_count:1,terms:9,installment_amount:Math.floor(t.amount/9),total_amount:t.amount,description:"Unused",interest_rate:1,code:void 0}]}}(n,t));return fa(e,{channel_code:n,channel_properties:r?{card_number:r}:void 0},e.sessionAuthKey,null,o)}(this.bb.sdkKey,this.bb.world.session,this.bb.channel.channel_code,e,t.signal,this.bb.mock).then(t=>{this.bb.dispatchEvent(new InternalUpdateChannelComponentData(this.channelCode,{paymentOptions:{cardNumber:e??null,options:t}}))}).catch(e=>{if(!ft(e))throw e});this.paymentOptionsRequest={cardNumber:e??void 0,promise:n,abortController:t}}}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 SdkLoadingBehavior{bb;constructor(e){this.bb=e}enter(){}}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(){this.bb.dispatchEvent(new XenditSessionExpiredOrCanceledEvent)}}function Su(e,t){switch(e.type){case Ia.PaymentRequest:t(new XenditPaymentRequestDiscardedEvent(e.id));break;case Ia.PaymentToken:t(new XenditPaymentTokenDiscardedEvent(e.id))}t(new InternalUpdateWorldState({paymentEntity:null,sessionTokenRequestId:null}))}class SessionPendingBehavior{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(){this.pollWorker.start(),this.bb.dispatchEvent(new XenditSessionPendingEvent)}exit(){this.pollWorker.stop(),lt(this.bb.world?.session);const e=this.bb.world.paymentEntity;"COMPLETED"!==this.bb.world.session.status&&e&&Su(e,this.bb.dispatchEvent),this.bb.dispatchEvent(new XenditSessionNotPendingEvent)}onPollResult=(e,t)=>{this.bb.dispatchEvent(new InternalUpdateWorldState({session:e.session,paymentEntity:t??void 0,succeededChannel:e.succeeded_channel??null}))}}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)throw new Error("Invalid state");if(!this.bb.world.paymentEntity)throw new Error("Payment entity is missing");if(this.bb.world.paymentEntity.type!==Ia.PaymentRequest)throw new Error("Payment entity is not a payment request");const e=this.bb.world?.paymentEntity.id,t=new AbortController,n=async function(e,t,n,r,o){return t?(await mt(st,o),Ba(n.channel_code,n._mock_action_type)):await ua(e,{channel_code:n.channel_code},{sessionAuthKey:e.sessionAuthKey,paymentRequestId:r},void 0,o)}(this.bb.sdkKey,this.bb.mock,this.bb.channel,e,t.signal).then(()=>{this.bb.mock&&this.bb.world&&this.bb.dispatchEvent(new InternalScheduleMockUpdateEvent(La(this.bb.world,this.bb.channel,"SUCCESS"))),this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent)}).catch(e=>{ft(e)||this.exited||(this.bb.simulatePaymentRequested=!1,console.error("Simulate Payment failed:",e))});this.simulationRequest={promise:n,abortController:t}}}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;let n,r,o;var i;"COMPLETED"!==this.bb.world.session.status&&"PENDING"!==this.bb.world.session.status&&t&&Su(t,this.bb.dispatchEvent),"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",!("message"in(i=this.submissionError))&&"text"in i&&"code"in i?(r=this.submissionError.text,o={type:"ERROR",code:this.submissionError.code}):(r=function(e){return[e("default_error.title"),e("default_error.message_1"),e("default_error.message_2")]}(e),o={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 o=e(Ma(t,n,"title")),i=r?e(function(e){return`failure_code.${e.toLowerCase()}`}(r),e("failure_code_unknown",{failureCode:r})):e(Ma(t,n,"subtext"));return[o,i]}(e,t.type,t.entity.status,t.entity.failure_code),o={type:"FAILURE",code:t.entity.failure_code??"UNKNOWN"}),this.bb.dispatchEvent(new XenditSubmissionEndEvent(n,r,o)),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)throw new Error("Session object missing");if(!this.bb.channel)throw new Error("Channel missing");if(this.bb.instantSubmissionError)return this.bb.submissionRequested=!1,this.submissionError=this.bb.instantSubmissionError,this.bb.instantSubmissionError=null,void this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent);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,o=this.bb.channelProperties??{},i=new AbortController,a=async function(e,t,n,r,o,i,a,d){let s;if(t)switch(n){case"PAY":await mt(st,a.signal),s=Ba(r,o);break;case"SAVE":case"SUBSCRIPTION":await mt(st,a.signal),s=function(e,t){return"PENDING"===t?{payment_token_id:`pt-${Pt()}`,status:"PENDING",channel_code:e,actions:Ua(t),session_token_request_id:Pt()}:t?{payment_token_id:`pt-${Pt()}`,status:"REQUIRES_ACTION",channel_code:e,actions:Ua(t),session_token_request_id:Pt()}:{payment_token_id:`pt-${Pt()}`,status:"ACTIVE",channel_code:e,actions:[],session_token_request_id:Pt()}}(r,o);break;default:throw new Error(`The session type ${n} is not supported.`)}else switch(n){case"PAY":s=await ca(e,{session_id:e.sessionAuthKey,channel_code:r,channel_properties:i,save_payment_method:d},null,null,a.signal);break;case"SAVE":case"SUBSCRIPTION":s=await la(e,{session_id:e.sessionAuthKey,channel_code:r,channel_properties:i},null,null,a.signal);break;default:throw new Error(`The session type ${n} is not supported.`)}return Ra(s)}(this.bb.sdkKey,this.bb.mock,t,n,r,o,i,e?this.bb.channelData?.savePaymentMethod??!1:void 0).then(e=>{switch(this.submission=null,e.type){case Ia.PaymentRequest:this.bb.dispatchEvent(new XenditPaymentRequestCreatedEvent(e.id));break;case Ia.PaymentToken:this.bb.dispatchEvent(new XenditPaymentTokenCreatedEvent(e.id))}this.bb.dispatchEvent(new InternalUpdateWorldState({paymentEntity:e,sessionTokenRequestId:e.entity.session_token_request_id}))}).catch(e=>{ft(e)||(console.error("Submission failed:",e),this.exited||(this.bb.submissionRequested=!1,this.submissionError=e instanceof NetworkError?{text:[e.errorResponse.error_content?.title,e.errorResponse.error_content?.message_1,e.errorResponse.error_content?.message_2].filter(e=>void 0!==e),code:e.errorResponse.error_code}:e,this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent)))});this.submission={abortController:i,promise:a}}}function Ou(e){switch(e.sdkStatus){case"LOADING":return ma(SdkLoadingBehavior);case"ACTIVE":return ma(SdkActiveBehavior,"active",function(e){switch(lt(e.world?.session),e.world.session.status){case"ACTIVE":return ma(SessionActiveBehavior,"active",e.submissionRequested?function(e){return lt(e.world),ma(SubmissionBehavior,"submission",e.world.paymentEntity&&null!==e.world.sessionTokenRequestId?function(e){function t(){return lt(e.world?.paymentEntity),yt(e.sdk,e.world.paymentEntity.entity.actions)?function(e){lt(e.world?.paymentEntity);const t=yt(e.sdk,e.world.paymentEntity.entity.actions);lt(t);const n=e.world.paymentEntity.entity.actions.indexOf(t);return ma(ActionPaylinkBehavior,String(n))}(e):void 0}if(lt(e.world?.paymentEntity),e.hackyOvoActionLatch&&"PENDING"===e.world.paymentEntity.entity.status)return ma(PaymentEntityRequiresActionBehavior,e.world.paymentEntity.id,[ma(ActionEmptyListPushNotificationBehavior,""),t()]);switch(e.world.paymentEntity.entity.status){case"PENDING":return ma(PaymentEntityPendingBehavior);case"REQUIRES_ACTION":return ma(PaymentEntityRequiresActionBehavior,e.world.paymentEntity.id,[Tu(e),t()]);case"FAILED":case"EXPIRED":case"CANCELED":return ma(PaymentEntityFailedBehavior);case"ACCEPTING_PAYMENTS":throw new Error("Status ACCEPTING_PAYMENTS should not happen");case"AUTHORIZED":case"ACTIVE":case"SUCCEEDED":return ma(PaymentEntityPendingBehavior,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;if(e.channelIsDigitalWallet)return;const t=function(e,t,n,r){n||(n={});for(const o of ji(e,t.form,n,r))if(zo(o,n))return!1;return!0}(e.world.session.session_type,e.channel,e.channelProperties,e.channelData),n=ma(t?ChannelValidBehavior:ChannelInvalidBehavior),r=Ft(e.channel.form,"credit_card_number")?ma(CardInfoBehavior,e.channel.channel_code):void 0,o=Ft(e.channel.form,"installment_plan")?ma(PaymentOptionsBehavior,e.channel.channel_code):void 0;return[n,r,o]}(e));case"COMPLETED":return ma(SessionCompletedBehavior);case"EXPIRED":case"CANCELED":return ma(SessionFailedBehavior,e.world.session.status);case"PENDING":return ma(SessionPendingBehavior,e.world.session.status);default:throw e.world.session.status,new Error(`Unknown session status: ${e.world.session.status}`)}}(e));case"FATAL_ERROR":return ma(SdkFatalErrorBehavior);default:throw e.sdkStatus,new Error(`Unknown SDK status: ${e.sdkStatus}`)}}function Tu(e){if(lt(e.world?.paymentEntity),e.actionCompleted)return ma(ActionCompletedBehavior);const t=_t(e.world.paymentEntity.entity.actions);if(!t)return ma(ActionEmptyListPushNotificationBehavior,"");const n=e.world.paymentEntity.entity.actions.indexOf(t),r=!!yt(e.sdk,e.world.paymentEntity.entity.actions);let o;switch(e.simulatePaymentRequested&&St(t)&&(o=ma(SimulatePaymentBehavior)),t.type){case"REDIRECT_CUSTOMER":switch(t.descriptor){case"WEB_URL":return function(e){return"REDIRECT_CUSTOMER"===e.type&&!1!==e.iframe_capable}(t)?ma(ActionIframeBehavior,t.value):r?ma(ActionDeepLinkBehavior,String(n)):ma(ActionRedirectBehavior,t.value);case"DEEPLINK_URL":return ma(ActionDeepLinkBehavior,String(n));case"WEB_GOOGLE_PAYLINK":throw new Error("Paylink actions should not be the primary action")}break;case"PRESENT_TO_CUSTOMER":switch(t.descriptor){case"QR_STRING":return ma(ActionQrBehavior,String(n),o);case"PAYMENT_CODE":return ma(ActionBarcodeBehavior,String(n),o);case"VIRTUAL_ACCOUNT_NUMBER":return ma(ActionVaBehavior,String(n),o)}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}`)}const Nu=e=>{const{onReady:t,options:n}=e,r=it(),o=r.t,i=nt(),a=(()=>{const e=Ne(ze);if(null===e)throw new Error("useBusiness must be used within a XenditSessionProvider");return e})(),d=ot(),s=d?.google_pay;lt(s);const l=Se(!1),c=Se(null),u=Se(null),h=Oe(()=>s.allowed_payment_methods.map(e=>e.payment_method_specification),[s.allowed_payment_methods]),p=Oe(()=>({apiVersion:2,apiVersionMinor:0,allowedPaymentMethods:h,emailRequired:!0,merchantInfo:{merchantId:s.merchant_id,merchantName:a.name??""},transactionInfo:{transactionId:i.payment_session_id,totalPriceStatus:"FINAL",totalPrice:String(i.amount),currencyCode:i.currency}}),[a.name,s.merchant_id,h,i.amount,i.currency,i.payment_session_id]),f=Oe(()=>({buttonColor:"default",buttonType:"plain",buttonRadius:999,buttonSizeMode:"fill",buttonBorderType:"no_border",...n}),[n]);Ae(()=>{const e=window.google?.payments?.api?.PaymentsClient;e?u.current=new e({environment:r.isMock()?"TEST":"PRODUCTION"}):console.error("XenditComponents: Google Pay button was requested but the Google Pay SDK is not loaded.")},[r]);const m=Te(()=>{lt(u.current),u.current.loadPaymentData(p).then(function(e){const t=function(e){lt(s);const t=r.getActiveChannels();for(const n of s.allowed_payment_methods)if(n.payment_method_specification.type===e.paymentMethodData.type)return Iu(t,n.channel_code);throw new Error(`No matching channel found for selected Google Pay payment method ${e.paymentMethodData.type}`)}(e);lt(t);let n={};"CARDS"===t.channelCode&&(n={google_pay:JSON.stringify(e)}),r.submitDigitalWallet("GOOGLE_PAY",t,n)}).catch(function(e){const t=e.statusCode??"UNKNOWN_ERROR";if("CANCELED"===t)return;function n(e,t){return`google_pay_errors.${e.toLowerCase()}.${t}`}const i={code:`GOOGLE_PAY_${t}`,text:[o(n(t,"title"),o("google_pay_errors.unknown_error.title")),o(n(t,"message"),o("google_pay_errors.unknown_error.message",{statusCode:t}))]},a=s.allowed_payment_methods[0];lt(a);const d=Iu(r.getActiveChannels(),a.channel_code);r.submitDigitalWallet("GOOGLE_PAY",d,{},i)})},[s,p,r,o]);return Ae(()=>{u.current&&(l.current||u.current.isReadyToPay({apiVersion:2,apiVersionMinor:0,allowedPaymentMethods:h}).then(function(e){e.result&&(l.current||(l.current=!0,t()))}).catch(function(e){console.error("XenditComponents: Error when checking if Google Pay is ready",e)}))},[h,t]),Ae(()=>{if(!u.current)return;const e=u.current.createButton({...f,buttonLocale:i.locale,allowedPaymentMethods:h,onClick:m});c.current&&c.current.replaceChildren(e)},[f,h,m,i.locale]),ue("div",{ref:c})};function Iu(e,t){const n=e.find(e=>Array.isArray(e.channelCode)?e.channelCode.includes(t):e.channelCode===t);if(!n)throw new Error(`Channel not found for code: ${t}`);return n}const Ru=e=>{const{scriptTagRegex:t,checkLoaded:n,children:r}=e,[,o]=Pe({}),i=n();return Ae(()=>{if(i)return;const e=Array.from(document.scripts).find(e=>t.test(e.src));if(e){const t=()=>{o({})};return e.addEventListener("load",t),()=>{e.removeEventListener("load",t)}}},[o,i,t]),Ae(()=>{if(!i){const e=setTimeout(()=>{o({})},1e3);return()=>clearTimeout(e)}}),i?r:null},Mu=e=>{const{digitalWalletCode:t,digitalWalletOptions:n}=e,r=Se(null),o=Te(()=>{r.current?.parentElement?.style.setProperty("display","block")},[]);let i=null;if("GOOGLE_PAY"===t)i=ue(Ru,{scriptTagRegex:Lu.GOOGLE_PAY.scriptTagRegex,checkLoaded:Lu.GOOGLE_PAY.checkLoaded,children:ue(Nu,{onReady:o,options:n})});return ue("div",{ref:r,children:i})},Lu={GOOGLE_PAY:{scriptTagRegex:/https:\/\/pay.google.com\/.*\/js\/pay.js/,checkLoaded:()=>"undefined"!=typeof google&&void 0!==google.payments}};class XenditComponents extends EventTarget{t=e=>{throw new Error("Localization used before initialization; this is a bug.")};[le];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]!==bt&&null===vt(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[le]={sdkKey:t,options:e,worldState:null,liveComponents:{channelPicker:null,paymentChannels:new Map,actionContainer:null,digitalWalletContainer:new Map},behaviorTree:new BehaviorTree(Ou,{sdk:this,sdkKey:t,mock:this.isMock(),sdkStatus:"LOADING",sdkFatalErrorMessage:null,channel:null,channelProperties:null,channelData:null,channelIsDigitalWallet:!1,instantSubmissionError:null,dispatchEvent:this.dispatchEvent.bind(this),world:null,submissionRequested:!1,simulatePaymentRequested:!1,actionCompleted:!1,pollImmediatelyRequested:!1}),currentChannelCode:null,currentDigitalWalletSubmission:null,eventListenersPresent:new Map},Ut(this),this.addEventListener("fatal-error",e=>{const t=e;this[le].eventListenersPresent.get("fatal-error")||console.error(`XenditComponents: A "fatal-error" event occurred but no event listener was attached: ${t.message}`)}),this[le].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 sa(this[le].sdkKey,this[le].sdkKey.sessionAuthKey),e.channels=e.channels.filter(e=>jt[e.channel_code])}catch(e){return this[le].behaviorTree.bb.sdkStatus="FATAL_ERROR",this[le].behaviorTree.bb.sdkFatalErrorMessage=Ot(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,digitalWallets:e.digital_wallets??null,paymentEntity:null,sessionTokenRequestId:null,succeededChannel:null}))}assertInitialized(){if(!this[le].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}isProdLive(){return"pl"===this[le].sdkKey.hostId}supportsSimulationScenarios(){return this.isMock()||"pd"===this[le].sdkKey.hostId||"sd"===this[le].sdkKey.hostId}findChannel(e){this.assertInitialized();return this[le].worldState.channels.find(t=>t.channel_code===e)??null}onUpdateWorldState(e){const t=e.data;this[le].worldState=$t(this[le].worldState??{},t);const n=this[le].worldState.session.locale;this.t=function(e){const t=Ho[e];return function(...n){let r,o,i={};switch(n.length){case 1:r=n[0];break;case 2:"string"==typeof n[1]?(r=n[0],o=n[1]):(r=n[0],i=n[1]);break;case 3:r=n[0],o=n[1],i=n[2];break;default:throw new Error("Invalid arguments for t function")}let a=t?.[r];return void 0===a&&void 0!==o&&(a=o),a?a.replace(/\{\{(\w+)\}\}/g,(e,t)=>i[t]?String(i[t]):""):(console.warn(`Missing localization for key: ${r} in locale: ${e}`),r)}}(n),this.behaviorTreeUpdate(),this.rerenderAllComponents()}onUpdateChannelComponentData(e){const t=e.channelCode,n=e.data,r=this[le].liveComponents.paymentChannels.get(t);r&&(r.data=$t(r.data,n),this.behaviorTreeUpdate(),this.rerenderAllComponents())}behaviorTreeUpdate(){const e=this[le].behaviorTree.bb;if("LOADING"===e.sdkStatus&&this[le].worldState&&(e.sdkStatus="ACTIVE"),e.world=this[le].worldState,this[le].currentDigitalWalletSubmission)e.channel=this.findChannel(this[le].currentDigitalWalletSubmission.channelCode),e.channelProperties=this[le].currentDigitalWalletSubmission.channelProperties,e.channelData=null,e.channelIsDigitalWallet=!0,e.instantSubmissionError=this[le].currentDigitalWalletSubmission.instantSubmissionError;else{const t=this[le].currentChannelCode?this[le].liveComponents.paymentChannels.get(this[le].currentChannelCode):null;e.channel=t?qt(t.channel[le],t.data.savePaymentMethod):null,e.channelProperties=t?t.channelProperties:null,e.channelData=t?t.data:null,e.channelIsDigitalWallet=!1}try{this[le].behaviorTree.update()}catch(e){this[le].behaviorTree.bb.sdkStatus="FATAL_ERROR",this[le].behaviorTree.bb.sdkFatalErrorMessage=Ot(e),this[le].behaviorTree.update()}}getSdkStatus(){return this[le].behaviorTree.bb.sdkStatus}rerenderAllComponents(){this.renderChannelPicker();for(const e of this[le].liveComponents.paymentChannels.keys())this.renderPaymentChannel(e);for(const e of this[le].liveComponents.digitalWalletContainer.keys())this.renderDigitalWalletComponent(e)}getSession(){return this.assertInitialized(),Zt(this[le].worldState.session)}getCustomer(){return this.assertInitialized(),this[le].worldState.customer?(ht((e=this[le].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=nn(t),o=on(e,n);return t.filter(e=>o[e.id]?.length).map(e=>Jt(e,o,r,n))}(this[le].worldState.channels,this[le].worldState.channelUiGroups,{options:{filter:e?.filter,filterMinMax:e?.filterMinMax??!0},session:this[le].worldState.session,pairChannels:an(this[le].worldState.channels)})}getActiveChannels(e){return this.assertInitialized(),function(e,t,n){const r=nn(t),o=on(e,n);return e.filter(e=>rn(e,n)).map(e=>tn(e,o,r,n))}(this[le].worldState.channels,this[le].worldState.channelUiGroups,{options:{filter:e?.filter,filterMinMax:e?.filterMinMax??!0},session:this[le].worldState.session,pairChannels:an(this[le].worldState.channels)})}createChannelPickerComponent(){this[le].liveComponents.channelPicker&&this.destroyComponent(this[le].liveComponents.channelPicker);const e=document.createElement("xendit-channel-picker");return e.setAttribute("translate","no"),this[le].liveComponents.channelPicker=e,this[le].worldState&&this.renderChannelPicker(),this.setupUiEventsForChannelPicker(e),e}renderChannelPicker(){this.assertInitialized();const e=this[le].liveComponents.channelPicker;e&&V(v(dt,{data:this[le].worldState,sdk:this,children:v(un,{})}),e)}setupUiEventsForChannelPicker(e){e.addEventListener(XenditClearCurrentChannelEvent.type,e=>{this.assertInitialized();const t=e,n=this[le].currentChannelCode;if(!n)return;const r=this[le].worldState.channels.find(e=>e.channel_code===n);r&&r.ui_group===t.uiGroup&&this.setCurrentChannel(null)})}createChannelComponent(e,t=!0){if(this.assertInitialized(),!Bt(this[le].worldState.session,e[le][0]))throw new Error("Cannot create channel component: `session.amount` is outside of the channel's min/max amount.");const n=e[le][0].channel_code;t&&(this[le].currentChannelCode=n);const r=this[le].liveComponents.paymentChannels.get(n),o={current:null};let i;return r?i=r.element:(i=document.createElement("xendit-payment-channel"),i.setAttribute("data-channel-code",n),i.setAttribute("inert",""),i.setAttribute("translate","no"),i.style.setProperty("--xendit-channel-brand-color",e[le][0].brand_color),this.setupUiEventsForPaymentChannel(i),this[le].liveComponents.paymentChannels.set(n,{element:i,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),i}renderPaymentChannel(e){this.assertInitialized();const t=this[le].liveComponents.paymentChannels.get(e);if(!t)return;const n=t.channel;V(v(dt,{data:this[le].worldState,sdk:this,children:v(ra,{channelOrPair:n[le],channelData:t.data,savePaymentMethod:t.data.savePaymentMethod,formRef:t.channelFormRef})}),t.element)}getActiveDigitalWallets(){return this.assertInitialized(),this[le].worldState.digitalWallets?function(e,t,n,r){const o=[],i=nn(n);if(e.google_pay){const n=e.google_pay.allowed_payment_methods.map(e=>{const n=t.find(t=>t.channel_code===e.channel_code);return lt(n),n}),a=on(n,r);o.push({digitalWalletCode:"GOOGLE_PAY",get channels(){return n.map(e=>tn(e,a,i,r))},[le]:!0})}return o}(this[le].worldState.digitalWallets,this[le].worldState.channels,this[le].worldState.channelUiGroups,{options:{filterMinMax:!1},pairChannels:an(this[le].worldState.channels),session:this[le].worldState.session}):[]}createDigitalWalletComponent(e,t){this.assertInitialized();const n=this[le].liveComponents.digitalWalletContainer.get(e);n&&this.destroyComponent(n.element);const r=document.createElement("xendit-digital-wallet");return r.setAttribute("translate","no"),r.style.setProperty("display","none"),this[le].liveComponents.digitalWalletContainer.set(e,{element:r,options:t}),this.renderDigitalWalletComponent(e),r}renderDigitalWalletComponent(e){this.assertInitialized();const t=this[le].liveComponents.digitalWalletContainer.get(e);t&&V(v(dt,{data:this[le].worldState,sdk:this,children:v(Mu,{digitalWalletCode:e,digitalWalletOptions:t.options})}),t.element)}getCurrentChannel(){const e=this[le].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[le].currentChannelCode,n=e?.[le][0].channel_code??null;if(t!==n){if(this[le].currentChannelCode=n,e&&n){(this[le].liveComponents.paymentChannels.get(n)??null)||this.createChannelComponent(e,!1)}this.behaviorTreeUpdate(),this.syncInertAttribute(),this.renderChannelPicker()}}syncInertAttribute(){const e=this[le].behaviorTree.bb.submissionRequested,t=this[le].liveComponents.paymentChannels;for(const[n,r]of t){(Array.isArray(r.channel.channelCode)?r.channel.channelCode[0]:r.channel.channelCode)!==this[le].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[le].liveComponents.paymentChannels.get(n);r&&(r.channelProperties=t.channelProperties,this.behaviorTreeUpdate())})}showValidationErrors(){if(!this[le].behaviorTree.findBehavior(ChannelInvalidBehavior))return;const e=this[le].currentChannelCode;if(!e)return;const t=this[le].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();const t=e===le,n=t?void 0:e,r=this[le].behaviorTree.findBehavior(PaymentEntityRequiresActionBehavior);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.");this[le].liveComponents.actionContainer&&this.destroyComponent(this[le].liveComponents.actionContainer);const o=document.createElement("xendit-action-container");return o.setAttribute("translate","no"),n?.qrCode&&void 0!==n.qrCode.qrCodeOnly&&o.setAttribute("data-qr-code-only",n.qrCode.qrCodeOnly.toString()),this[le].liveComponents.actionContainer=o,o}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[le].liveComponents.channelPicker===e)return this[le].liveComponents.channelPicker=null,V(null,e),void e.remove();for(const[t,n]of this[le].liveComponents.paymentChannels)if(n.element===e)return this[le].liveComponents.paymentChannels.delete(t),this[le].currentChannelCode===t&&this.setCurrentChannel(null),V(null,e),void e.remove();if(this[le].liveComponents.actionContainer===e)return this[le].liveComponents.actionContainer=null,V(null,e),void e.remove();for(const[t,n]of this[le].liveComponents.digitalWalletContainer)if(n.element===e)return this[le].liveComponents.digitalWalletContainer.delete(t),V(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[le].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[le].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[le].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[le].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[le].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[le].behaviorTree.bb.submissionRequested=!0,this.behaviorTreeUpdate(),this.syncInertAttribute()}submitDigitalWallet(e,t,n,r=null){this.assertInitialized(),this.setCurrentChannel(null),this[le].currentDigitalWalletSubmission={digitalWalletCode:e,channelCode:t[le][0].channel_code,channelProperties:n,instantSubmissionError:r},this.addEventListener(XenditSubmissionEndEvent.type,()=>{this[le].currentDigitalWalletSubmission=null},{once:!0}),this[le].behaviorTree.bb.submissionRequested=!0,this.behaviorTreeUpdate(),this.syncInertAttribute()}abortSubmission(){this.assertInitialized();this[le].behaviorTree.findBehavior(SubmissionBehavior)&&(this[le].behaviorTree.bb.submissionRequested=!1,this.behaviorTreeUpdate())}simulatePayment(){if(this.assertInitialized(),"PAY"!==this[le].worldState.session.session_type)throw new Error('Unable to simulate payment, the session type is not "PAY".');if(!this[le].behaviorTree.findBehavior(PaymentEntityRequiresActionBehavior))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[le].worldState.paymentEntity;if(!e)throw new Error("The PeRequiresActionBehavior is present but there is no payment entity. This is a bug, please contact support.");if(!this.findChannel(e.entity.channel_code))throw new Error("Channel not found; this is a bug, please contact support.");const t=_t(e.entity.actions);if(!t||!St(t))throw new Error("Unable to simulate payment; the action does not support simulation.");this[le].behaviorTree.bb.simulatePaymentRequested=!0,this.behaviorTreeUpdate()}pollImmediately(){if(this.assertInitialized(),"ACTIVE"!==this[le].worldState.session.status)throw new Error("Unable to poll immediately; the session is not longer active.");this[le].behaviorTree.bb.pollImmediatelyRequested=!0,this.behaviorTreeUpdate()}getState(){const e=this[le].currentChannelCode,t=this[le].liveComponents.paymentChannels.get(e??"");return{channelCode:e,channelProperties:t?.channelProperties||null,behaviorTree:this[le].behaviorTree}}addEventListener(e,t,n){return this[le].eventListenersPresent.set(e,!0),super.addEventListener(e,t,n)}removeEventListener(e,t,n){return super.removeEventListener(e,t,n)}static amountFormat(e,t){return jo(e,t)}}class XenditComponentsTest extends XenditComponents{nextMockUpdate=null;constructor(e){super({...e,componentsSdkKey:`session-${kt(32)}-mock-MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEyCADI5pdf6KmN8+Fxl2ES3yolUKXunNeY3gGScGNEvDcrcHAPKxIInAo5DVnDvTtYtqZvx/bu7HLeBJNMXwHhie/uyNEtT8dSaLc9bd0WSlYdxI+iUsTv2Qu0LiiPrZs-NKf7whM9meUs/eRCvG0oc180MDiyeli3kH6EQ3ZahECHsZQi5G2IpH6vk3cYMtf01Y1L4OBn1SZCOv1kwpjIUet4DJeoTwwq2nM5b+K7rD+/WFTi3AEX4NWJNkKi0a91`}),this.addEventListener(InternalScheduleMockUpdateEvent.type,this.setNextMockUpdate.bind(this))}async initializeAsync(){await pt(st);const e=(await Promise.resolve().then(function(){return Du})).makeTestBffData();this.dispatchEvent(new InternalUpdateWorldState({business:e.business,customer:e.customer,session:e.session,channels:e.channels,channelUiGroups:e.channel_ui_groups,digitalWallets:e.digital_wallets??null,paymentEntity:null,sessionTokenRequestId:null,succeededChannel:null}))}isMock(){return!0}setNextMockUpdate(e){const t=e;this.nextMockUpdate=t.mockData}}"undefined"==typeof window||"undefined"==typeof document||(se||(se=!0,n.debounceRendering=e=>queueMicrotask(e)),function(){const e=document.createElement("style");e.textContent="/* variables */\n:root {\n --xendit-font-family: 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-card-shadow: 0px 4px 8px 0px #25252514;\n --xendit-dialog-shadow: 8px 8px 12px 8px #25252529;\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 --xendit-z-index-overlay: 3;\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 /* QR code colors */\n --xendit-qr-foreground-color: #000000;\n --xendit-qr-background-color: #ffffff;\n\n /* icon colors */\n --xendit-color-icon-primary: #7c7c7c;\n --xendit-color-icon-secondary: #f1f1f1;\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);\n color: var(--xendit-color-text);\n touch-action: manipulation;\n}\n\n.xendit-default-action-container {\n font-family: var(--xendit-font-family);\n touch-action: manipulation;\n}\n\nxendit-action-container {\n position: relative;\n flex: 1; /* Action container usually wants to stretch to fit, assuming the parent is a flexbox. */\n touch-action: manipulation;\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-link {\n color: var(--xendit-color-primary);\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.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: 0;\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: var(--xendit-focus-shadow);\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 digital wallet section */\n\n.xendit-channel-picker-digital-wallet-section {\n display: grid;\n grid-auto-flow: column;\n grid-auto-columns: 1fr;\n gap: 8px;\n margin-bottom: 8px;\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: var(--xendit-focus-shadow);\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-container {\n display: flex;\n justify-content: space-between;\n gap: 16px;\n}\n\n.xendit-channel-form-field-group label {\n width: fit-content;\n cursor: pointer;\n}\n\n.xendit-form-field-group.invalid\n .xendit-channel-form-field\n .xendit-form-field-inner {\n border: 1px solid var(--xendit-color-danger);\n}\n\n.xendit-channel-form-field .xendit-form-field-inner {\n border: 1px solid var(--xendit-color-border);\n background: var(--xendit-color-background);\n border-radius: 8px;\n appearance: none;\n}\n\n.xendit-channel-form-field.field-radius-tl-0 .xendit-form-field-inner {\n border-top-left-radius: 0;\n}\n\n.xendit-channel-form-field.field-radius-tr-0 .xendit-form-field-inner {\n border-top-right-radius: 0;\n}\n\n.xendit-channel-form-field.field-radius-bl-0 .xendit-form-field-inner {\n border-bottom-left-radius: 0;\n}\n\n.xendit-channel-form-field.field-radius-br-0 .xendit-form-field-inner {\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 .xendit-form-field-inner {\n margin-top: var(--xendit-border-collapse-offset);\n}\n\n.xendit-channel-form-field.field-collapse-b .xendit-form-field-inner {\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\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 .xendit-form-field-inner:focus,\n.xendit-channel-form-field .xendit-form-field-inner.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 position: relative;\n}\n\n.xendit-channel-form-field button.xendit-dropdown-open {\n z-index: var(--xendit-z-index-focus);\n}\n\n.xendit-channel-form-field input.xendit-form-field-inner {\n padding: 12px;\n}\n\n.xendit-channel-form-field .xendit-iframe-container {\n display: flex;\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.xendit-checkbox input:focus + .xendit-checkbox-graphic {\n border: 1px solid var(--xendit-color-primary);\n box-shadow: var(--xendit-focus-shadow);\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 position: relative;\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 display: flex;\n background: none;\n border: none;\n color: var(--xendit-color-text);\n cursor: pointer;\n padding: 0;\n}\n\n.xendit-dialog-floating-close {\n position: absolute;\n top: 24px;\n right: 24px;\n display: flex;\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: 24px;\n background-color: var(--xendit-color-background);\n border-radius: 8px;\n box-shadow: var(--xendit-dialog-shadow);\n}\n\n.xendit-error-message {\n color: var(--xendit-color-danger);\n}\n\n/* Phone input Dropdown */\n.xendit-input-phone {\n display: flex;\n gap: 8px;\n}\n\n.xendit-phone-number-input {\n width: 100%;\n}\n\n/* Phone input Dropdown ends */\n\n/* Dropdown */\n.xendit-dropdown {\n width: 100%;\n display: grid;\n grid-template-columns: 1fr auto;\n align-items: center;\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 cursor: pointer;\n padding: 0;\n padding-left: 12px;\n outline: none;\n}\n\n.xendit-dropdown: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 position: relative;\n}\n\n.xendit-dropdown.xendit-dropdown-has-asset {\n grid-template-columns: auto 1fr auto;\n}\n\n.xendit-dropdown-channel-logo {\n height: 24px;\n width: 32px;\n object-fit: contain;\n padding: 2px 0px;\n padding-right: 12px;\n border-right: 1px solid var(--xendit-color-border);\n}\n\n.xendit-dropdown-text {\n padding: 12px;\n padding-right: 0;\n}\n\n.xendit-dropdown-chevron {\n height: 38px;\n width: 38px;\n padding: 12px;\n box-sizing: border-box;\n}\n\n.xendit-dropdown:disabled {\n background: var(--xendit-color-disabled);\n cursor: default;\n}\n\n.xendit-dropdown-overlay {\n contain: style;\n position: absolute;\n z-index: var(--xendit-z-index-overlay);\n display: flex;\n flex-direction: column;\n gap: 4px;\n max-height: 320px;\n padding: 4px;\n margin: 4px 0;\n box-sizing: border-box;\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: var(--xendit-card-shadow);\n overflow-y: auto;\n overscroll-behavior: none;\n}\n\n.xendit-dropdown-overlay ul {\n list-style: none;\n padding: 4px;\n margin: 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 padding: 8px;\n border: 1px solid var(--xendit-color-border);\n border-radius: var(--xendit-radius-1);\n box-sizing: border-box;\n outline: none;\n}\n\n.xendit-dropdown-search input:focus {\n border-color: var(--xendit-color-primary);\n box-shadow: var(--xendit-focus-shadow);\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-white-rounded:hover {\n background-color: var(--xendit-color-border);\n}\n.xendit-button-block {\n width: 100%;\n}\n.xendit-button-sm {\n padding: 8px 12px;\n font-size: 12px;\n line-height: 16px;\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.xendit-skeleton-field button {\n height: 42px;\n background-color: var(--xendit-color-disabled);\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--xendit-color-text-secondary);\n}\n\n/* Button ends */\n\n/* Form Simulation Helper */\n.xendit-form-simulation-root {\n position: relative;\n}\n.xendit-form-simulation-trigger {\n background: transparent;\n border: none;\n cursor: pointer;\n padding: 0;\n}\n.xendit-form-simulation-popover {\n position: absolute;\n top: 100%;\n right: 0;\n\n width: 350px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n border-radius: 4px;\n padding: 12px;\n border: 1px solid var(--xendit-color-border);\n background: color-mix(\n in srgb,\n var(--xendit-color-background),\n transparent 40%\n );\n backdrop-filter: blur(6px);\n box-shadow: var(--xendit-card-shadow);\n}\n\n.xendit-form-simulation-popover .xendit-dropdown-overlay {\n width: auto;\n}\n\n.xendit-form-simulation-scenario-icon {\n height: 28px;\n width: 40px;\n border-radius: 4px;\n border: 1px solid var(--xendit-color-border);\n object-fit: contain;\n background-color: white;\n}\n\n/* Form Simulation Helper ends */\n\n.xendit-tooltip {\n position: absolute;\n top: 100%;\n right: 50%;\n transform: translateX(50%);\n background-color: black;\n color: white;\n padding: 8px 12px;\n border-radius: var(--xendit-radius-1);\n white-space: nowrap;\n z-index: 1000;\n font-weight: 600;\n font-size: 14px;\n line-height: 16px;\n animation: xendit-tooltip-fade-in var(--xendit-animation-duration)\n var(--xendit-animation-ease);\n opacity: 1;\n}\n\n@keyframes xendit-tooltip-fade-in {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n/* Instructions */\n\n.xendit-instructions-bold {\n font-weight: 600;\n}\n.xendit-instructions-bullet-list {\n display: flex;\n flex-direction: column;\n gap: 12px;\n margin: 8px 0;\n}\n.xendit-instructions-bullet-list::marker {\n color: var(--xendit-color-text-secondary);\n}\n.xendit-instructions-form-card {\n display: flex;\n flex-direction: column;\n padding: 16px;\n border-radius: 12px;\n border: 1px solid var(--xendit-color-border);\n gap: 4px;\n width: 321px;\n}\n.xendit-instructions-form-field {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 8px 0;\n border-bottom: 1px solid var(--xendit-color-border);\n}\n.xendit-instructions-form-field-label {\n font-size: 12px;\n font-weight: 600;\n line-height: 16px;\n color: var(--xendit-color-text-secondary);\n}\n.xendit-instructions-form-field-value {\n font-size: 14px;\n line-height: 20px;\n color: var(--xendit-color-text);\n}\n.xendit-instructions-form-heading {\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n margin: 4px 0;\n}\n.xendit-instructions-italics {\n font-style: italic;\n}\n.xendit-instructions-numbered-list {\n display: flex;\n flex-direction: column;\n gap: 16px;\n list-style-type: decimal;\n padding-left: 40px;\n}\n.xendit-instructions-single-tab-heading {\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n margin-bottom: 16px;\n}\n.xendit-instructions-step-box {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.xendit-instructions-step-li {\n font-size: 14px;\n line-height: 20px;\n}\n.xendit-instructions-step-li p {\n margin: 0;\n}\n.xendit-instructions-step-li::marker {\n margin-left: 20px;\n}\n.xendit-instructions-tab-button {\n font-family: var(--xendit-font-family);\n font-size: 14px;\n padding: 8px 4px;\n background-color: transparent;\n border: none;\n border-top: 3px solid transparent;\n border-bottom: 3px solid transparent;\n cursor: pointer;\n}\n.xendit-instructions-active-tab {\n border-bottom-color: var(--xendit-color-primary);\n color: var(--xendit-color-primary);\n font-weight: 600;\n}\n.xendit-instructions-tab-list {\n display: flex;\n gap: 16px;\n margin-bottom: 16px;\n border-bottom: 1px solid var(--xendit-color-border);\n}\n.xendit-instructions-table {\n font-size: 14px;\n line-height: 16px;\n width: 100%;\n border-collapse: collapse;\n}\n.xendit-instructions-table-cell {\n padding: 4px;\n border: 1px solid black;\n}\n.xendit-instructions-table-header {\n font-size: 14px;\n font-weight: 600;\n line-height: 16px;\n padding: 4px;\n border: 1px solid black;\n}\n\n/* Instructions ends */\n\n.xendit-default-action-container {\n display: flex;\n flex-direction: column;\n border: none;\n}\n\n.xendit-action-title {\n font-weight: 600;\n font-size: 20px;\n line-height: 28px;\n text-align: center;\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 gap: 16px;\n}\n.xendit-action-present-to-customer-affirm {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n/* qr actions */\n.xendit-action-qr-content {\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 12px;\n max-width: 384px;\n border: 1px solid var(--xendit-color-border);\n border-radius: var(--xendit-radius-1);\n padding: 16px;\n overflow: hidden;\n}\n.xendit-qr-merchant-info {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 4px;\n}\n.xendit-action-qr-channel-logo {\n height: 64px;\n align-self: center;\n object-fit: contain;\n}\n.xendit-action-qr-qrcode-container {\n width: 100%;\n position: relative;\n z-index: var(--xendit-z-index-overlay);\n}\n\n/* barcode actions */\n.xendit-action-barcode-channel-logo {\n height: 64px;\n align-self: center;\n object-fit: contain;\n}\n.xendit-action-barcode-barcode-container {\n width: 100%;\n position: relative;\n z-index: var(--xendit-z-index-overlay);\n display: flex;\n justify-content: center;\n}\n\n/* va actions */\n.xendit-action-va-content,\n.xendit-action-barcode-content {\n display: flex;\n flex-direction: column;\n border: 1px solid var(--xendit-color-border);\n border-radius: var(--xendit-radius-1);\n padding: 16px;\n padding-bottom: 24px;\n}\n.xendit-action-va-details,\n.xendit-action-barcode-details {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n.xendit-action-va-detail-item,\n.xendit-action-barcode-detail-item {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n.xendit-action-va-detail-content,\n.xendit-action-barcode-detail-content {\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.xendit-action-va-heading,\n.xendit-action-barcode-heading {\n color: var(--xendit-color-text-placeholder);\n}\n.xendit-action-va-tag {\n color: var(--xendit-color-text-placeholder);\n background-color: #fafafa;\n padding: 2px 4px;\n border-radius: 4px;\n}\n\n/* redirect, deeplink, and push notification actions */\n.xendit-redirect-instructions {\n display: flex;\n flex-direction: column;\n align-items: center;\n text-align: center;\n gap: 24px;\n}\n\n.xendit-redirect-instructions-logo {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 112px;\n height: 112px;\n border: 2px solid var(--xendit-color-border);\n border-radius: 50%;\n overflow: hidden;\n box-shadow: var(--xendit-card-shadow);\n}\n\n.xendit-redirect-instructions-logo img {\n width: 96px;\n height: 96px;\n object-fit: contain;\n}\n\n.xendit-redirect-instructions-text {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.xendit-redirect-instructions-button {\n display: inline-block;\n border-radius: 99px;\n color: white;\n padding: 12px 16px;\n background-color: var(--xendit-channel-brand-color, #000);\n text-decoration: none;\n white-space: nowrap;\n box-shadow: var(--xendit-card-shadow);\n}\n\n.xendit-redirect-instructions-button:hover,\n.xendit-redirect-instructions-button:active {\n filter: brightness(1.1);\n}\n\n/* googlepay */\n\n.gpay-card-info-container-fill {\n display: flex;\n}\n";const t=document.querySelector("style, link");t?t.insertAdjacentElement("beforebegin",e):document.head.appendChild(e)}());var Du=Object.freeze({__proto__:null,makeTestBffData:function(){const e=(new Date).toISOString(),t=new Date(Date.now()+2592e6).toISOString();return{session:{payment_session_id:`ps-${kt(24)}`,created:e,updated:e,status:"ACTIVE",reference_id:Pt(),description:"Test session",currency:"IDR",amount:1e4,country:"ID",expires_at:t,session_type:"PAY",mode:"COMPONENTS",locale:"en",business_id:kt(24),customer_id:`cust-${Pt()}`,capture_method:"AUTOMATIC",allow_save_payment_method:"OPTIONAL",items:[{reference_id:Pt(),type:"DIGITAL_PRODUCT",name:"Item 1",net_unit_amount:5e4,quantity:1,category:""},{reference_id:Pt(),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-${Pt()}`,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",pm_type:"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},{label:"Installment plan",placeholder:"Select installment plan",type:{name:"installment_plan"},channel_property:["installment_configuration.terms","installment_configuration.interval","installment_configuration.code"],required:!1,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 (Redirect action)",channel_code:"MOCK_EWALLET",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",pm_type:"EWALLET",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 has a redirect action."]},{brand_name:"Mock E-Wallet Channel (Redirect and Paylink actions)",channel_code:"MOCK_EWALLET_PAYLINK",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",pm_type:"EWALLET",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","PAYLINK"],form:[],instructions:["Mock E-Wallet channel","This mock channel has a redirect and a paylink action."]},{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",pm_type:"EWALLET",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 (Deeplink action)",channel_code:"MOCK_EWALLET_DEEP_LINK",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",pm_type:"EWALLET",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,_mock_action_type:"DEEP_LINK",form:[],instructions:["Mock E-Wallet channel","This mock channel has a deeplink action."]},{brand_name:"Mock E-Wallet Channel (Push notification action)",channel_code:"MOCK_EWALLET_PUSH_NOTIFICATION",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",pm_type:"EWALLET",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,_mock_action_type:"PUSH_NOTIFICATION",form:[],instructions:["Mock E-Wallet channel","This mock channel shows a message prompting the user to tap a push notification."]},{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",pm_type:"EWALLET",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",pm_type:"QR_CODE",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."]},{brand_name:"Mock QR Channel (Custom Art)",channel_code:"MOCK_QR_CUSTOM_ART",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",pm_type:"QR_CODE",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:[{label:"QR Style",placeholder:"Select",type:{name:"dropdown",options:[{label:"QRIS",value:"ID.CO.QRIS.WWW"},{label:"SGQR",value:"SG.SGQR"},{label:"Duitnow QR",value:"A0000006150001"}]},channel_property:"mock_emvco_qr_field_26_00",required:!1,span:2}],instructions:["Mock QR channel","This mock channel has a QR action with branded layouts. You can choose what branded layout to use."]},{brand_name:"Mock Direct Debit Channel",channel_code:"MOCK_DIRECT_DEBIT",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",pm_type:"DIRECT_DEBIT",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 FPX Business Channel",channel_code:"MOCK_FPX_BUSINESS",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",pm_type:"ONLINE_BANKING",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,_mock_action_type:"PENDING",form:[],instructions:["Mock FPX channel","This mock channel behaves similarly to production FPX channels. It has a banner and it will enter the pending state after submission."],banner:{image_url:"https://assets.xendit.co/payment-session/banners/fpx-banner.svg",alt_text:"FPX Pay with Online Banking",aspect_ratio:9.7}},{brand_name:"Mock OTC Channel",channel_code:"MOCK_OTC",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",pm_type:"OVER_THE_COUNTER",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:"Mock VA Channel",channel_code:"MOCK_VA",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",pm_type:"VIRTUAL_ACCOUNT",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,_mock_action_type:"VA",form:[],instructions:["Mock VA channel","This mock channel behaves similarly to production VA channels."]},{brand_name:"Mock Installments Channel",channel_code:"MOCK_INSTALLMENTS",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",pm_type:"CARDS_INSTALLMENT",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{label:"Installment plan",placeholder:"Select installment plan",type:{name:"installment_plan"},channel_property:["installment_configuration.terms","installment_configuration.interval","installment_configuration.code"],required:!1,span:2}],instructions:["Mock Installments channel","This mock channel behaves similarly to production installment channels in Thailand."]},{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"},{label:"Option 4",value:"option_4",subtitle:"With subtitle"},{label:"Option 5",value:"option_5",subtitle:"With subtitle"}]},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/512x32.svg?text=Banner",alt_text:"",aspect_ratio:16},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"}],digital_wallets:{google_pay:{merchant_id:"mock-googlepay-merchant-id",allowed_payment_methods:[{channel_code:"CARDS",payment_request_id:`pr-${kt(32)}`,payment_method_specification:{type:"CARD",parameters:{billingAddressRequired:!0,allowedAuthMethods:["PAN_ONLY","CRYPTOGRAM_3DS"],allowedCardNetworks:["AMEX","MASTERCARD","VISA"]},tokenizationSpecification:{type:"PAYMENT_GATEWAY",parameters:{gateway:"xendit",gatewayMerchantId:"exampleGatewayMerchantId"}}}}]}}}}});e.XenditActionBeginEvent=XenditActionBeginEvent,e.XenditActionEndEvent=XenditActionEndEvent,e.XenditComponents=XenditComponents,e.XenditComponentsTest=XenditComponentsTest,e.XenditFatalErrorEvent=XenditFatalErrorEvent,e.XenditInitEvent=XenditInitEvent,e.XenditNotReadyEvent=XenditNotReadyEvent,e.XenditPaymentRequestCreatedEvent=XenditPaymentRequestCreatedEvent,e.XenditPaymentRequestDiscardedEvent=XenditPaymentRequestDiscardedEvent,e.XenditPaymentTokenCreatedEvent=XenditPaymentTokenCreatedEvent,e.XenditPaymentTokenDiscardedEvent=XenditPaymentTokenDiscardedEvent,e.XenditReadyEvent=XenditReadyEvent,e.XenditSessionCompleteEvent=XenditSessionCompleteEvent,e.XenditSessionExpiredOrCanceledEvent=XenditSessionExpiredOrCanceledEvent,e.XenditSessionNotPendingEvent=XenditSessionNotPendingEvent,e.XenditSessionPendingEvent=XenditSessionPendingEvent,e.XenditSubmissionBeginEvent=XenditSubmissionBeginEvent,e.XenditSubmissionEndEvent=XenditSubmissionEndEvent,e.XenditWillRedirectEvent=XenditWillRedirectEvent});
|
|
7
|
+
*/var He=(Ve||(Ve=1,function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=o(e,r(n)))}return e}function r(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var r="";for(var i in e)t.call(e,i)&&e[i]&&(r=o(r,i));return r}function o(e,t){return t?e?e+" "+t:e+t:e}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}(Ke)),Ke.exports),We=Ge(He);const Xe=e=>{const{id:t,title:n,iconName:r,subtitle:o,disabled:i,open:a,onClick:d,children:s}=e,l=a?"up":"down",c=Te(()=>{i||d(t)},[i,d,t]),u=Te(e=>{"Enter"!==e.key&&" "!==e.key||(c(),e.preventDefault())},[c]),h=Te(()=>{c()},[c]);return ue("div",{className:We("xendit-accordion-item",i?"xendit-accordion-item-disabled":"",a?"xendit-accordion-item-open":"xendit-accordion-item-closed"),children:[ue("div",{className:"xendit-accordion-item-header",onClick:h,onKeyDown:u,role:"button",tabIndex:i?-1:0,children:[ue(je,{className:"xendit-accordion-item-header-icon",name:r,size:24}),ue("div",{className:"xendit-accordion-item-header-title xendit-text-16 xendit-text-bold",children:[n,o?ue("div",{className:"xendit-accordion-item-header-subtitle xendit-text-14",children:o}):null]}),ue(je,{className:"xendit-accordion-item-chevron",name:"chevron",size:24,direction:l})]}),ue("div",{className:"xendit-accordion-item-content",inert:!a,children:ue("div",{className:"xendit-accordion-item-padding",children:s})})]})},ze=K(null);ze.displayName="SessionContext";const Ye=K(null);Ye.displayName="BusinessContext";const Qe=K(void 0);Qe.displayName="CustomerContext";const Ze=K(null);Ze.displayName="ChannelsContext";const Je=K(null);Je.displayName="ChannelUiGroupsContext";const et=K(null);et.displayName="DigitalWalletsContext";const tt=K(null);tt.displayName="SdkContext";const nt=K(null);nt.displayName="CurrentChannelContext";const rt=()=>{const e=Ie(ze);if(null===e)throw new Error("useSession must be used within a XenditSessionProvider");return e},ot=()=>{const e=Ie(Ze);if(null===e)throw new Error("useChannels must be used within a XenditSessionProvider");return e},it=()=>Ie(et),at=()=>{const e=Ie(tt);if(null===e)throw new Error("useSdk must be used within a XenditSessionProvider");return e},dt=()=>Ie(nt),st=({children:e,data:t,sdk:n})=>{const{session:r,business:o,customer:i,channels:a,digitalWallets:d,channelUiGroups:s}=t,l=n.getCurrentChannel()?.[le]?.[0]??null;return"ACTIVE"!==n.getSdkStatus()||"ACTIVE"!==r.status?null:ue(tt.Provider,{value:n,children:ue(nt.Provider,{value:l,children:ue(ze.Provider,{value:r,children:ue(Ye.Provider,{value:o,children:ue(Qe.Provider,{value:i,children:ue(Ze.Provider,{value:a,children:ue(et.Provider,{value:d,children:ue(Je.Provider,{value:s,children:e})})})})})})})})},lt=300;function ct(e){if(!e)throw new Error("Assertion failed: argument is null or undefined; this is a bug, please contact support.")}function ut(e){if(!Array.isArray(e))throw new Error("Assertion failed: expected array; this is a bug, please contact support.")}function ht(e){if(Array.isArray(e))throw new Error("Assertion failed: expected array; this is a bug, please contact support.")}function pt(e,t){if(e!==t)throw new Error("Assertion failed; this is a bug, please contact support.")}function ft(e){return new Promise(t=>setTimeout(t,1*e))}class AbortError extends Error{constructor(){super("AbortError"),this.name="AbortError"}}function _t(e){return e instanceof AbortError&&"AbortError"===e.name}function mt(e,t){return new Promise((n,r)=>{function o(){t.removeEventListener("abort",o),clearTimeout(i),r(new AbortError)}const i=setTimeout(()=>{t.removeEventListener("abort",o),n()},1*e);t.aborted?o():t.addEventListener("abort",o)})}function yt(e){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]}function bt(e,t){if(e[le].options.enablePaylinks)return t.find(e=>"REDIRECT_CUSTOMER"===e.type&&"WEB_GOOGLE_PAYLINK"===e.descriptor)}const gt="mock",vt={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 $t(e){return vt[e]??null}function xt(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 wt(e){const t=Ne();return Ae(()=>{t.current=e}),t.current}function Et(e){let t;if("string"==typeof e.channel_property)t=e.channel_property;else{t=Object.values(e.channel_property).join("__")}return t}const Ct=Math.floor(255*Math.random());function kt(e){const t=Et(e).split("").map(e=>(e.charCodeAt(0)%256^Ct).toString(16)).join("");return`xendit-id-${t}`}function Pt(e){ct(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 At(){return[Pt(8),Pt(4),Pt(4),Pt(4),Pt(12)].join("-")}function Nt(){return`xendit-id-${Ne(Pt(12)).current}`}function St(e){return"PRESENT_TO_CUSTOMER"===e.type}function Ot(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 Tt(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 It(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)}}}function Rt(e){const t=It("card_details.card_number",e);return"string"!=typeof t?null:t}function Mt(e){const t={version:0,publicKey:"",iv:"",cipherText:"",valid:!1,validationError:null,withoutValidationError:e};if(!e)return t;const n=e.split("-");if(n.length<6)throw new Error("Invalid encrypted field value format.");if("xendit"!==n[0])throw new Error("Invalid encrypted field value format.");if("encrypted"!==n[1])throw new Error("Invalid encrypted field value format.");const r=parseInt(n[2],10);if(isNaN(r)||r<=0)throw new Error("Invalid encrypted field value format.");if(t.version=r,t.publicKey=n[3],t.iv=n[4],t.cipherText=n[5],n.length>6){if("invalid"!==n[6])throw new Error("Invalid encrypted field value format.");t.validationError=atob(n[7]),t.withoutValidationError=n.slice(0,6).join("-")}else t.valid=!0;return t}const Lt=new WeakMap;let Dt=1;function Bt(e){return Lt.has(e)||Lt.set(e,Dt++),Lt.get(e).toString()}function qt(e,t){return ct(e.length>0),ct(e.length<=2),2===e.length?t?(ct(!0===e[1].allow_save),e[1]):(ct(!1===e[0].allow_save),e[0]):e[0]}function Ut(e,t){if("PAY"!==e.session_type)return!0;const n=e.amount,r=t.min_amount??0,o=t.max_amount??Number.MAX_VALUE;return!(n<r||n>o)}function jt(e){Object.defineProperty(e,le,{enumerable:!1,writable:!1,configurable:!1,value:e[le]})}const Ft={AFFIN_FPX:!0,AFFIN_FPX_BUSINESS:!0,AGRO_FPX:!0,AGRO_FPX_BUSINESS:!0,ALIPAY:!0,ALLIANCE_FPX:!0,ALLIANCE_FPX_BUSINESS:!0,AMBANK_FPX:!0,AMBANK_FPX_BUSINESS:!0,APPOTA:!0,ASTRAPAY:!0,BAY_CARD_INSTALLMENT:!0,BAY_GBW_DIRECT_DEBIT:!0,BAY_GBW_MOBILE_BANKING:!0,BBL_CARD_INSTALLMENT:!0,BBL_DIRECT_DEBIT:!0,BBL_GBW_DIRECT_DEBIT:!0,BBL_GBW_MOBILE_BANKING:!0,BBL_MOBILE_BANKING:!0,BDO_DIRECT_DEBIT:!0,BDO_EPAY:!0,BDO_ONLINE_BANKING:!0,BNP_FPX_BUSINESS:!0,BOC_FPX:!0,BOC_ONLINE_BANKING:!0,BPI_DIRECT_DEBIT:!0,BPI_ONLINE_BANKING:!0,BPI_RECURRING:!0,BRI_DIRECT_DEBIT:!0,BSN_FPX:!0,CARDS:!0,CHINABANK_DIRECT_DEBIT:!0,CHINABANK_ONLINE_BANKING:!0,CIMB_DIRECT_DEBIT:!0,CIMB_FPX:!0,CIMB_FPX_BUSINESS:!0,CITIBANK_FPX_BUSINESS:!0,DANA:!0,DEUTSCHE_FPX_BUSINESS:!0,DUITNOW_PAY:!0,GCASH:!0,GCASH_LINK_AND_PAY:!0,GOPAY:!0,GOPAY_RECURRING:!0,GRABPAY:!0,HLB_FPX:!0,HLB_FPX_BUSINESS:!0,HSBC_FPX:!0,HSBC_FPX_BUSINESS:!0,INSTAPAY_ONLINE_BANKING:!0,ISLAM_FPX:!0,ISLAM_FPX_BUSINESS:!0,JENIUSPAY:!0,KBANK_CARD_INSTALLMENT:!0,KBANK_GBW_MOBILE_BANKING:!0,KBANK_MOBILE_BANKING:!0,KFH_FPX:!0,KFH_FPX_BUSINESS:!0,KRUNGSRI_DIRECT_DEBIT:!0,KRUNGSRI_MOBILE_BANKING:!0,KTB_CARD_INSTALLMENT:!0,KTB_DIRECT_DEBIT:!0,KTB_GBW_DIRECT_DEBIT:!0,KTB_GBW_MOBILE_BANKING:!0,KTB_MOBILE_BANKING:!0,LANDBANK_ONLINE_BANKING:!0,LINEPAY:!0,LINKAJA:!0,MANDIRI_DIRECT_DEBIT:!0,MAYB2E_FPX:!0,MAYB2E_FPX_BUSINESS:!0,MAYB2U_FPX:!0,MAYBANK_ONLINE_BANKING:!0,METROBANK_ONLINE_BANKING:!0,MOMO:!0,MUAMALAT_FPX:!0,MUAMALAT_FPX_BUSINESS:!0,NEXCASH:!0,OCBC_FPX:!0,OCBC_FPX_BUSINESS:!0,OVO:!0,PAYMAYA:!0,PESONET_ONLINE_BANKING:!0,PNB_ONLINE_BANKING:!0,PROMPTPAY:!0,PSBANK_ONLINE_BANKING:!0,PUBLIC_FPX:!0,PUBLIC_FPX_BUSINESS:!0,QR_PH:!0,QRIS:!0,RAKYAT_FPX:!0,RAKYAT_FPX_BUSINESS:!0,RCBC_DIRECT_DEBIT:!0,RCBC_ONLINE_BANKING:!0,RHB_FPX:!0,RHB_FPX_BUSINESS:!0,ROBINSONS_BANK_ONLINE_BANKING:!0,SCB_CARD_INSTALLMENT:!0,SCB_DIRECT_DEBIT:!0,SCB_GBW_DIRECT_DEBIT:!0,SCB_GBW_MOBILE_BANKING:!0,SCB_MOBILE_BANKING:!0,SCH_FPX:!0,SCH_FPX_BUSINESS:!0,SECURITY_BANK_ONLINE_BANKING:!0,SGQR:!0,SHOPEEPAY:!0,TOUCHNGO:!0,TRUEMONEY:!0,TTB_CARD_INSTALLMENT:!0,UBP_DIRECT_DEBIT:!0,UBP_EADA:!0,UNIONBANK_ONLINE_BANKING:!0,UOB_FPX:!0,UOB_FPX_BUSINESS:!0,VIETTELPAY:!0,VNPTWALLET:!0,WECHATPAY:!0,ZALOPAY:!0};function Gt(e,t){for(const n of e)if(n.type.name===t)return!0;return!1}var Vt,Kt;!function(e){e.BARE="bare",e.PRIMARY_ROUNDED="primary-rounded",e.WHITE_ROUNDED="white-rounded"}(Vt||(Vt={})),function(e){e.SM="sm",e.MD="md"}(Kt||(Kt={}));const Ht=e=>{const{children:t,variant:n,size:r,type:o="button",...i}=e,a={[Vt.BARE]:void 0,[Vt.PRIMARY_ROUNDED]:"xendit-button-primary-rounded",[Vt.WHITE_ROUNDED]:"xendit-button-white-rounded"}[n],d={[Kt.SM]:"xendit-button-sm",[Kt.MD]:void 0}[r??Kt.MD];return ue("button",{...i,className:We(e.className,"xendit-button",a,d),type:o,children:t})},Wt=()=>{const e=.4*Math.PI,t=.4;return ue("svg",{className:"xendit-button-loading-spinner",viewBox:"-0.5 -0.5 1 1",children:ue("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"})})},Xt=e=>{const{id:t,options:n,onChange:r,defaultIndex:o=-1,selectedIndex:i,placeholder:a,disabled:d,className:s,fixedOverlayWidth:l,enableSearch:c}=e,u=at().t,h=Nt(),p=t||h,f="number"==typeof i,[_,m]=Pe(o),y=f?i:_,[b,g]=Pe(y>=0?y:0),[v,$]=Pe(!1),x=v&&!d&&n.length>0,[w,E]=Pe(""),[C,k]=Pe(0),P=Ne(null),A=Ne(null),N=Ne(null),S=Ne(null),O=Ne(null),T=Ne(null),I=Oe(()=>{const e=n.map(Zt).filter(({item:e})=>{if(""===w.trim())return!0;const t=w.toLowerCase();return e.title.toLowerCase().includes(t)||e.description?.toLowerCase().includes(t)||e.value.toLowerCase().includes(t)});return e.length>0?e:n.map(Zt)},[w,n]),R=Math.max(0,Math.min(I.length-1,b));Ae(()=>{if(l)return void k(l);const e=P.current;if(!e)return;const t=e.getBoundingClientRect().width;if(k(t),!window.ResizeObserver)return;const n=new ResizeObserver(t=>{for(const n of t)n.target===e&&n.borderBoxSize?.length&&k(n.borderBoxSize[0].inlineSize)});return n.observe(e),()=>n.disconnect()},[l]),Ae(()=>{if(!x)return;const e=T.current;if(!e)return;const t=P.current;if(!t)return;if(!window.ResizeObserver)return;function n(){if(!e)return;if(!t)return;const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();window.innerHeight-n.bottom<r.height?(e.style.position="fixed",e.style.bottom="0"):(e.style.position="",e.style.bottom="")}n();const r=new ResizeObserver(n);return r.observe(e),window.addEventListener("resize",n),window.addEventListener("scroll",n,!0),()=>{r.disconnect(),window.removeEventListener("resize",n),window.removeEventListener("scroll",n,!0)}},[x]),Ae(()=>{if(!x)return;const e=e=>{const t=A.current;t&&(t.contains(e.target)||$(!1))};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[x]),Ae(()=>{if(!x)return;const e=e=>{const t=A.current;t&&e.relatedTarget&&(t.contains(e.relatedTarget)||$(!1))};return document.body.addEventListener("focusout",e),()=>document.body.removeEventListener("focusout",e)},[x]),Ae(()=>{x&&y>=0&&g(y)},[x,y]),Ae(()=>{if(!x)return;if(!S.current)return;if(!N.current)return;const e=N.current.parentElement;e&&(e.scrollTop=S.current.offsetTop-e.clientHeight/2+S.current.clientHeight/2)},[x,b]);const M=Te(()=>{x||($(!0),queueMicrotask(()=>O.current?.focus()))},[x]),L=Te(()=>{x&&($(!1),E(""),P.current?.focus())},[x]),D=Te(()=>{x?L():M()},[L,x,M]),B=Te(e=>{const t=n[e];t&&(t.disabled||(f||m(e),r(t,e),L()))},[L,f,r,n]),q=Te(e=>{const t=e.target===O.current;if("Escape"===e.key)return e.preventDefault(),void L();if("Enter"===e.key||" "===e.key){if(t&&" "===e.key)return;e.preventDefault();const n=I[R];return void(n&&B(n.originalIndex))}return"ArrowDown"===e.key?(e.preventDefault(),void g(e=>Math.min(I.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(I.length-1)):void 0},[R,L,B,I]),U=Te(e=>{if(x)return q(e);"ArrowDown"!==e.key&&"ArrowUp"!==e.key&&" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),M())},[q,x,M]),j=Te(e=>{e.stopPropagation(),e.preventDefault(),B(Number(e.currentTarget.dataset.index))},[B]),F=Te(e=>{E(e.currentTarget.value),g(0)},[]),G=y>=0?n[y]:void 0;return ue("div",{className:"xendit-dropdown-container",ref:A,style:{"--xendit-dropdown-width":C+"px",minWidth:e.noOverflow?void 0:"0"},children:[ue("button",{id:p,ref:P,type:"button",className:`xendit-dropdown ${s} ${x?"xendit-dropdown-open":""} ${Yt(G)?"xendit-dropdown-has-asset":""}`,"aria-expanded":x?"true":"false",onClick:D,onKeyDown:U,disabled:d,children:[G?.leadingAsset??null,ue("span",G?{className:"xendit-dropdown-text xendit-text-14",children:G.shortTitle??G.title}:{className:"xendit-dropdown-text xendit-text-14",children:a}),ue(je,{className:"xendit-dropdown-chevron",name:"chevron",size:16,direction:"down"})]}),x?ue("div",{className:"xendit-dropdown-overlay",style:{width:"var(--xendit-dropdown-width)"},ref:T,children:[c?ue("div",{className:"xendit-dropdown-search",children:ue("input",{ref:O,placeholder:u("combobox.default_search_placeholder"),value:w,onInput:F,onClick:Qt,onKeyDown:q})}):null,ue("ul",{ref:N,role:"listbox",tabIndex:-1,onKeyDown:q,children:I.map(({item:e,originalIndex:t},n)=>{const r=t===y,o=n===R;return ue("li",{role:"option","data-index":t,"aria-disabled":!!e.disabled||void 0,"aria-selected":r,onClick:j,ref:o?S:void 0,children:ue("div",{className:`xendit-dropdown-item xendit-text-14 ${o?"xendit-dropdown-item-active":""} ${e.leadingAsset?"xendit-dropdown-has-asset":""} ${e.disabled?"xendit-dropdown-item-disabled":""}`,children:[e.leadingAssetInOverlay??e.leadingAsset??null,ue("div",{className:"xendit-dropdown-item-text xendit-text-14",children:[ue("span",{className:"xendit-dropdown-item-title",children:e.title}),e.description&&ue("span",{className:"xendit-dropdown-item-description xendit-text-12",children:e.description})]}),r?ue(je,{name:"check",size:16,className:"xendit-dropdown-item-selected"}):null]})},t)})})]}):null]})},zt=e=>ue("div",{className:"xendit-dropdown-container xendit-skeleton-field",children:ue("button",{className:`xendit-dropdown ${e.className}`,inert:!0,id:e.id,disabled:!0,type:"button",children:ue(Wt,{})})});function Yt(e){return!!e&&!(!e.leadingAssetInOverlay&&!e.leadingAsset)}function Qt(e){e.stopPropagation()}function Zt(e,t){return{item:e,originalIndex:t}}function Jt(e){return function(e,t){if(e===t)throw new Error("Assertion failed; this is a bug, please contact support.")}(e.session_type,"AUTHORIZATION"),pt(e.mode,"COMPONENTS"),Tt({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,subscription:e.subscription?{immediatePayment:e.subscription.immediate_payment,schedule:{anchorDate:new Date(e.subscription.schedule.anchor_date),interval:e.subscription.schedule.interval,intervalCount:e.subscription.schedule.interval_count,retryInterval:e.subscription.schedule.retry_interval,retryIntervalCount:e.subscription.schedule.retry_interval_count,totalRecurrence:e.subscription.schedule.total_recurrence,totalRetry:e.subscription.schedule.total_retry}}:void 0,items:e.items?.map(e=>Tt({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 en(e,t,n,r){const o=Tt({groupId:e.id,label:e.label,get channels(){return(t[e.id]||[]).map(e=>nn(e,t,n,r))},[le]:e});return jt(o),o}function tn(e,t){return nn(e,{},{},t)}function nn(e,t,n,r){ct(!r.pairChannels.paired[e.channel_code]);const o=Tt({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 en(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})),[le]:r.pairChannels.pairs[e.channel_code]??[e]});return jt(o),o}function rn(e){const t={};for(const n of e)t[n.id]=n;return t}function on(e,t){if(t.pairChannels.paired[e.channel_code])return!1;if(t.options.filterMinMax&&!Ut(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 an(e,t){const n={};for(const r of e){if(!on(r,t))continue;const e=r.ui_group;n[e]||(n[e]=[]),n[e].push(r)}return n}function dn(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,o]of t)for(const e of o){if(!1===o[0].allow_save){const t=o.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 sn=e=>ue("hr",{className:"xendit-dotted-line"}),ln=e=>{const{group:t,open:n}=e,r=at(),{t:o}=r,i=rt(),a=ot(),d=dt(),s=i.session_type,l=Nt(),[c,u]=Pe(null),h=Ne(null),[p,f]=Pe(!1),_=Ne(null),m=Oe(()=>dn(a),[a]),y=Oe(()=>({pairChannels:m,session:{amount:i.amount,session_type:i.session_type},options:{filterMinMax:!1}}),[m,i.amount,i.session_type]),b=Oe(()=>a.filter(e=>on(e,y)&&e.ui_group===t.id),[a,t.id,y]);Ae(()=>{if(!h.current)return;if(!d)return;if(!n)return;b.find(e=>e.channel_code===d.channel_code)&&(_.current=r.createChannelComponent(tn(d,y)),_.current.parentElement!==h.current&&(f(!0),h.current.replaceChildren(_.current)))},[b,d,y,n,r]);const g=wt(n);Ae(()=>{if(n&&!g&&null===d&&null!==c){const e=b.find(e=>e.channel_code===c);e&&r.setCurrentChannel(tn(e,y))}},[b,d,c,y,n,g,r]);const v=Te(e=>{const t=a.find(t=>t.channel_code===e.value)||null;u(t?.channel_code??null),r.setCurrentChannel(t?tn(t,y):null)},[a,y,r]),$=Oe(()=>b.map(e=>({leadingAsset:ue("img",{className:"xendit-dropdown-channel-logo",src:e.brand_logo_url},e.channel_code),leadingAssetInOverlay:ue("img",{className:"xendit-channel-logo",src:e.brand_logo_url},e.channel_code),title:e.brand_name,value:e.channel_code,disabled:!Ut(i,e),description:cn(o,i,e)||void 0})),[b,i,o]),x=1===b.length&&"CARDS"===b[0].channel_code;return ue("div",{className:"xendit-channel-picker-group",children:[x?null:ue("div",{className:"xendit-channel-form-field-group",children:[ue("label",{htmlFor:l,className:"xendit-text-14",children:"SAVE"===s?o("payment_methods.add_payment_method",{groupName:t.label??"",ns:"session"}):o("payment_methods.pay_with")}),ue(Xt,{id:l,selectedIndex:function(){const e=$.findIndex(e=>e.value===d?.channel_code);if(-1!==e)return e;const t=$.findIndex(e=>e.value===c);return-1!==t?t:1===$.length?0:-1}(),options:$,disabled:$.length<=1,onChange:v,placeholder:o("payment_methods.select_channel_placeholder",{groupName:t.label,ns:"session"})})]}),!x&&p?ue(sn,{}):null,ue("div",{style:{display:p?"":"none"},ref:h})]})};function cn(e,t,n){return Ut(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 un=e=>{const{onReady:t,options:n}=e,r=at(),o=r.t,i=rt(),a=(()=>{const e=Ie(Ye);if(null===e)throw new Error("useBusiness must be used within a XenditSessionProvider");return e})(),d=ot(),s=it(),l=s?.google_pay;ct(l);const c=Ne(!1),u=Ne(null),h=Ne(null),p=Oe(()=>l.allowed_payment_methods.filter(e=>{const t=d.find(t=>t.channel_code===e.channel_code);if(!t)throw new Error("Channel found in Google Pay config not found in channels list");return Ut(i,t)}).map(e=>e.payment_method_specification),[l.allowed_payment_methods]),f=Oe(()=>({apiVersion:2,apiVersionMinor:0,allowedPaymentMethods:p,emailRequired:!0,merchantInfo:{merchantId:l.merchant_id,merchantName:a.name??""},transactionInfo:{transactionId:i.payment_session_id,totalPriceStatus:"FINAL",totalPrice:String(i.amount),currencyCode:i.currency}}),[a.name,l.merchant_id,p,i.amount,i.currency,i.payment_session_id]),_=Oe(()=>({buttonColor:"default",buttonType:"plain",buttonRadius:999,buttonSizeMode:"fill",buttonBorderType:"no_border",...n}),[n]);Ae(()=>{const e=window.google?.payments?.api?.PaymentsClient;if(!e)return void console.error("XenditComponents: Google Pay button was requested but the Google Pay SDK is not loaded.");const t=r.isMock()||r.isDevelopmentEnv();h.current=new e({environment:t?"TEST":"PRODUCTION"})},[r]);const m=Te(()=>{ct(h.current),h.current.loadPaymentData(f).then(function(e){const t=function(e){ct(l);const t=r.getActiveChannels();for(const n of l.allowed_payment_methods)if(n.payment_method_specification.type===e.paymentMethodData.type)return hn(t,n.channel_code);throw new Error(`No matching channel found for selected Google Pay payment method ${e.paymentMethodData.type}`)}(e);ct(t);let n={};"CARDS"===t.channelCode&&(n={google_pay:JSON.stringify(e)}),r.submitDigitalWallet("GOOGLE_PAY",t,n)}).catch(function(e){const t=e.statusCode??"UNKNOWN_ERROR";if("CANCELED"===t)return;function n(e,t){return`google_pay_errors.${e.toLowerCase()}.${t}`}const i={code:`GOOGLE_PAY_${t}`,text:[o(n(t,"title"),o("google_pay_errors.unknown_error.title")),o(n(t,"message"),o("google_pay_errors.unknown_error.message",{statusCode:t}))]},a=l.allowed_payment_methods[0];ct(a);const d=hn(r.getActiveChannels(),a.channel_code);r.submitDigitalWallet("GOOGLE_PAY",d,{},i)})},[l,f,r,o]);return Ae(()=>{h.current&&(c.current||0!==p.length&&h.current.isReadyToPay({apiVersion:2,apiVersionMinor:0,allowedPaymentMethods:p}).then(function(e){e.result&&(c.current||(c.current=!0,t()))}).catch(function(e){console.error("XenditComponents: Error when checking if Google Pay is ready",e)}))},[p,t]),Ae(()=>{if(!h.current)return;if(0===p.length)return;const e=h.current.createButton({..._,buttonLocale:i.locale,allowedPaymentMethods:p,onClick:m});u.current&&u.current.replaceChildren(e)},[_,p,m,i.locale]),ue("div",{ref:u})};function hn(e,t){const n=e.find(e=>Array.isArray(e.channelCode)?e.channelCode.includes(t):e.channelCode===t);if(!n)throw new Error(`Channel not found for code: ${t}`);return n}const pn=e=>{const{scriptTagRegex:t,checkLoaded:n,children:r}=e,[,o]=Pe({}),i=n();return Ae(()=>{if(i)return;const e=Array.from(document.scripts).find(e=>t.test(e.src));if(e){const t=()=>{o({})};return e.addEventListener("load",t),()=>{e.removeEventListener("load",t)}}},[o,i,t]),Ae(()=>{if(!i){const e=setTimeout(()=>{o({})},1e3);return()=>clearTimeout(e)}}),i?r:null},fn=e=>{const{digitalWalletCode:t,digitalWalletOptions:n}=e,r=Ne(null),o=Te(()=>{r.current&&(r.current.parentElement?.style.setProperty("display","block"),r.current.dispatchEvent(new InternalDigitalWalletReady(t)))},[t]);let i=null;if("GOOGLE_PAY"===t)i=ue(pn,{scriptTagRegex:_n.GOOGLE_PAY.scriptTagRegex,checkLoaded:_n.GOOGLE_PAY.checkLoaded,children:ue(un,{onReady:o,options:n})});return ue("div",{ref:r,children:i})},_n={GOOGLE_PAY:{scriptTagRegex:/https:\/\/pay.google.com\/.*\/js\/pay.js/,checkLoaded:()=>"undefined"!=typeof google&&void 0!==google.payments}};class InternalDigitalWalletReady extends Event{digitalWalletCode;static type="xendit-internal-digital-wallet-ready";constructor(e){super(InternalDigitalWalletReady.type,{bubbles:!0}),this.digitalWalletCode=e}}const mn=e=>{const t=at(),n=Ne(null),r=it(),o=r?.google_pay,[i,a]=Pe(!1);return Ae(()=>{if(n.current&&o){const e=t.createDigitalWalletComponent("GOOGLE_PAY");return n.current.appendChild(e),()=>{e.remove()}}},[o,t]),Ae(()=>{n.current&&n.current.addEventListener(InternalDigitalWalletReady.type,e=>{a(!0)})},[]),ue("div",{ref:n,className:i?"xendit-channel-picker-digital-wallet-section":void 0})},yn=e=>{const t=at(),n=rt(),r=(()=>{const e=Ie(Je);if(null===e)throw new Error("useChannelUiGroups must be used within a XenditSessionProvider");return e})(),o=dt(),i=ot(),{t:a}=at(),d=Oe(()=>an(i,{options:{filterMinMax:!1},pairChannels:dn(i),session:n}),[i,n]),s=Ne(null),l=Oe(()=>dn(i),[i]),c=Oe(()=>({pairChannels:l,session:{amount:n.amount,session_type:n.session_type},options:{filterMinMax:!1}}),[l,n.amount,n.session_type]),u=o?.ui_group??null,[h,p]=Pe(null),f=Te(e=>{if(u===e||h===e)u===e&&s.current?.dispatchEvent(new XenditClearCurrentChannelEvent(e)),h===e&&p(null);else{const o=r.find(t=>t.id===e);ct(o);const s=bn(n,o,i,a).enabledChannels;if(0===s)return;if(1===s){const n=d[e][0];t.setCurrentChannel(tn(n,c)),p(null)}else p(e),t.setCurrentChannel(null)}},[r,i,d,c,h,t,u,n,a]);Ae(()=>{null!==o&&null!==h&&p(null)},[o,h]);const _=t[le].options.enableDigitalWallets??!1;return ue("div",{ref:s,children:[_?ue(mn,{}):null,ue(he,{children:r.filter(e=>(d[e.id]||[]).length>0).map(e=>{const t=null!==u?u===e.id:h===e.id,r=bn(n,e,i,a),s=0===r.enabledChannels,l=r.firstDisabledChannelReason;return ue(Xe,{id:e.id,title:e.label,iconName:vn(u===e.id?o:null,d[e.id]),subtitle:l??void 0,open:t,disabled:s,onClick:f,children:ue(ln,{group:e,open:t})},e.id)})})]})};function bn(e,t,n,r){let o=null,i=0;for(const a of n)a.ui_group===t.id&&(Ut(e,a)?i++:null===o&&(o=cn(r,e,a)));return{enabledChannels:i,firstDisabledChannelReason:o}}const gn={CARDS:"card",QR_CODE:"qr",OVER_THE_COUNTER:"otc",EWALLET:"ewallet",BANK_TRANSFER:"bank_transfer",DIRECT_DEBIT:"bank_transfer",VIRTUAL_ACCOUNT:"bank_transfer",ONLINE_BANKING:"online_banking"};function vn(e,t){if(e&&e.pm_type&&gn[e.pm_type])return gn[e.pm_type];for(const e of t)if(e.pm_type&&gn[e.pm_type])return gn[e.pm_type];return"dummy"}class XenditClearCurrentChannelEvent extends Event{static type="xendit-clear-current-channel";uiGroup;constructor(e){super(XenditClearCurrentChannelEvent.type,{bubbles:!0,composed:!0}),this.uiGroup=e}}var $n={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","[024-7]\\d{7}",[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","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["(?:59(?:0(?:2[7-9]|3[3-7]|5[12]|87)|87\\d)|80[6-9]\\d\\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}"],["8[129]\\d{7}"],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","8776\\d{4}|(?:[27]\\d|61)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-8]"]]]],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,0,[["528[89]\\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}"]]],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","(?:694\\d|7093)\\d{5}|(?:59|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]|80[6-9]|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{8}|800\\d{5,6}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2358]"],"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","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|80[6-9]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["(?:59(?:0(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)|87\\d)|80[6-9]\\d\\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}"],["8[129]\\d{7}"],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","8\\d{13}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"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",["20"]],["(\\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]"]],["(\\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",["20"]]],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,"[5-8]"],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","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["(?:59(?:0(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)|87\\d)|80[6-9]\\d\\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}"],["8[129]\\d{7}"],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","7091\\d{5}|(?:[56]9|[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",["30|(?: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","30|(?: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","[78]\\d{8}|[2-9]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[2-9]"],"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","[36-8]\\d{5,8}|4\\d{6,8}|59\\d{6}|9\\d{5,10}|(?:2\\d|5[0-8])\\d{6,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",["3[289]|4[246-8]|61|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,"[3489]",0,"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|[3689]\\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-579]|61)","5(?:[0-579]|61[06])","5(?:[0-579]|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,[["(?:274[27]|(?: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-2478]|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|5[12]"]],["(\\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})|5(?:0\\d{3}|2[0-2]))\\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 xn(e,t){var n=Array.prototype.slice.call(t);return n.push($n),e.apply(this,n)}function wn(e,t){e=e.split("-"),t=t.split("-");for(var n=e[0].split("."),r=t[0].split("."),o=0;o<3;o++){var i=Number(n[o]),a=Number(r[o]);if(i>a)return 1;if(a>i)return-1;if(!isNaN(i)&&isNaN(a))return 1;if(isNaN(i)&&!isNaN(a))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 En={}.constructor;function Cn(e){return null!=e&&e.constructor===En}function kn(e){return kn="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},kn(e)}function Pn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function An(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,Nn(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Nn(e){var t=function(e,t){if("object"!=kn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=kn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==kn(t)?t:t+""}var Sn=" ext. ",On=/^\d+$/,Tn=function(){return An(function e(t){Pn(this,e),Bn(t),this.metadata=t,jn.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&&On.test(e)&&(t=e,e=null),e&&"001"!==e){if(!this.hasCountry(e))throw new Error("Unknown country: ".concat(e));this.numberingPlan=new In(this.getCountryMetadata(e),this)}else if(t){if(!this.hasCallingCode(t))throw new Error("Unknown calling code: ".concat(t));this.numberingPlan=new In(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}}])}(),In=function(){return An(function e(t,n){Pn(this,e),this.globalMetadataObject=n,this.metadata=t,jn.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 Rn(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()&&Dn(this.types(),e))return new Ln(Dn(this.types(),e),this)}},{key:"ext",value:function(){return this.v1||this.v2?Sn:this.metadata[13]||Sn}}])}(),Rn=function(){return An(function e(t,n){Pn(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\)?$/,Ln=function(){return An(function e(t,n){Pn(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 Dn(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(!Cn(e)||!Cn(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(Cn(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+qn(e)+": "+e,"."))}var qn=function(e){return kn(e)};function Un(e,t){if((t=new Tn(t)).hasCountry(e))return t.selectNumberingPlan(e).countryCallingCode();throw new Error("Unknown country: ".concat(e))}function jn(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===wn(t,"1.2.0")?this.v2=!0:-1===wn(t,"1.7.35")?this.v3=!0:this.v4=!0:this.v1=!0}function Fn(e,t,n){return function(e,t,n,r){t&&(r=new Tn(r.metadata)).selectNumberingPlan(t);var o=r.type(n),i=o&&o.possibleLengths()||r.possibleLengths();if(!i)return"IS_POSSIBLE";var a=e.length,d=i[0];if(d===a)return"IS_POSSIBLE";if(d>a)return"TOO_SHORT";if(i[i.length-1]<a)return"TOO_LONG";return i.indexOf(a,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}(e,t,void 0,n)}function Gn(e,t,n){return"IS_POSSIBLE"===Fn(e,t,n)}function Vn(e,t){return e=e||"",new RegExp("^(?:"+t+")$").test(e)}function Kn(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 Hn(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)?Hn(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 Hn(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 Wn=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function Xn(e,t,n){if(t=t||{},e.country||e.countryCallingCode){(n=new Tn(n)).selectNumberingPlan(e.country,e.countryCallingCode);var r=t.v2?e.nationalNumber:e.phone;if(Vn(r,n.nationalNumberPattern())){if(zn(r,"FIXED_LINE",n))return n.type("MOBILE")&&""===n.type("MOBILE").pattern()?"FIXED_LINE_OR_MOBILE":n.type("MOBILE")?zn(r,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE":"FIXED_LINE_OR_MOBILE";for(var o,i=Kn(Wn);!(o=i()).done;){var a=o.value;if(zn(r,a,n))return a}}}}function zn(e,t,n){var r=n.type(t);return!(!r||!r.pattern())&&(!(r.possibleLengths()&&r.possibleLengths().indexOf(e.length)<0)&&Vn(e,r.pattern()))}function Yn(e,t,n){var r=new Tn(n).getCountryCodesForCallingCode(e);return r?r.filter(function(e){return function(e,t,n){var r=new Tn(n);if(r.selectNumberingPlan(t),r.numberingPlan.possibleLengths().indexOf(e.length)>=0)return!0;return!1}(t,e,n)}):[]}var Qn="0-90-9٠-٩۰-۹",Zn="".concat("-‐-―−ー-").concat("//").concat("..").concat(" ").concat("()()[]\\[\\]").concat("~⁓∼~"),Jn=new RegExp("(["+Qn+"])");function er(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 tr(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)?tr(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 tr(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 nr(e,t){var n=t.nationalNumber,r=t.metadata,o=r.getCountryCodesForCallingCode(e);if(o)return 1===o.length?o[0]:function(e,t){var n=t.countries,r=t.metadata;r=new Tn(r);for(var o,i=er(n);!(o=i()).done;){var a=o.value;if(r.selectNumberingPlan(a),r.leadingDigits()){if(e&&0===e.search(r.leadingDigits()))return a}else if(Xn({phone:e,country:a},void 0,r.metadata))return a}}(n,{countries:o,metadata:r.metadata})}function rr(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 o,i,a,d=r.length-1,s=d>0&&r[d];if(t.nationalPrefixTransformRule()&&s)o=e.replace(n,t.nationalPrefixTransformRule()),d>1&&(i=r[1]);else{var l=r[0];o=e.slice(l.length),s&&(i=r[1])}if(s){var c=e.indexOf(r[1]);e.slice(0,c)===t.numberingPlan.nationalPrefix()&&(a=t.numberingPlan.nationalPrefix())}else a=r[0];return{nationalNumber:o,nationalPrefix:a,carrierCode:i}}}return{nationalNumber:e}}(e,n),o=r.carrierCode,i=r.nationalNumber;if(i!==e){if(!function(e,t,n){if(Vn(e,n.nationalNumberPattern())&&!Vn(t,n.nationalNumberPattern()))return!1;return!0}(e,i,n))return{nationalNumber:e};if(n.numberingPlan.possibleLengths()&&(t||(t=nr(n.numberingPlan.callingCode(),{nationalNumber:i,metadata:n})),!function(e,t,n){switch(Fn(e,t,n)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}(i,t,n)))return{nationalNumber:e}}return{nationalNumber:i,carrierCode:o}}function or(e,t,n,r,o){if(!e)return{};var i;if("+"!==e[0]){var a=function(e,t,n,r){if(t){var o=new Tn(r);o.selectNumberingPlan(t,n);var i=new RegExp(o.IDDPrefix());if(0===e.search(i)){var a=(e=e.slice(e.match(i)[0].length)).match(Jn);if(!(a&&null!=a[1]&&a[1].length>0&&"0"===a[1]))return e}}}(e,n,r,o);if(!a||a===e){if(n||r){var d=function(e,t,n,r,o){var i=n?Un(n,o):r;if(0===e.indexOf(i)){(o=new Tn(o)).selectNumberingPlan(n,i);var a=e.slice(i.length),d=rr(a,t,o).nationalNumber,s=rr(e,t,o).nationalNumber;if(!Vn(s,o.nationalNumberPattern())&&Vn(d,o.nationalNumberPattern())||"TOO_LONG"===Fn(s,t,o))return{countryCallingCode:i,number:a}}return{number:e}}(e,t,n,r,o),s=d.countryCallingCode,l=d.number;if(s)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:s,number:l}}return{number:e}}i=!0,e="+"+a}if("0"===e[1])return{};o=new Tn(o);for(var c=2;c-1<=3&&c<=e.length;){var u=e.slice(1,c);if(o.hasCallingCode(u))return o.selectNumberingPlan(u),{countryCallingCodeSource:i?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:u,number:e.slice(c)};c++}return{}}var ir=/(\$\d)/;function ar(e,t,n){var r=n.useInternationalFormat,o=n.withNationalPrefix,i=e.replace(new RegExp(t.pattern()),r?t.internationalFormat():o&&t.nationalPrefixFormattingRule()?t.format().replace(ir,t.nationalPrefixFormattingRule()):t.format());return r?function(e){return e.replace(new RegExp("[".concat(Zn,"]+"),"g")," ").trim()}(i):i}var dr=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;var sr=function(e){return"([".concat(Qn,"]{1,").concat(e,"})")};function lr(e){var t="[ \\t,]*",n="[:\\..]?[ \\t,-]*",r="#?",o="[ \\t]*";return";ext="+sr("20")+"|"+(t+"(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)"+n+sr("20")+r)+"|"+(t+"(?:[xx##~~]|int|int)"+n+sr("9")+r)+"|"+("[- ]+"+sr("6")+"#")+"|"+(o+"(?:,{2}|;)"+n+sr("15")+r)+"|"+(o+"(?:,)+"+n+sr("9")+r)}var cr="["+Qn+"]{2}",ur="[++]{0,1}(?:["+Zn+"]*["+Qn+"]){3,}["+Zn+Qn+"]*",hr=new RegExp("^[++]{0,1}(?:["+Zn+"]*["+Qn+"]){1,2}$","i"),pr=ur+"(?:"+lr()+")?",fr=new RegExp("^"+cr+"$|^"+pr+"$","i");var _r={formatExtension:function(e,t,n){return"".concat(e).concat(n.ext()).concat(t)}};function mr(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 o in n[e])n[0][o]=n[e][o];e++}return n[0]}({},_r,n):_r,r=new Tn(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 o,i=r.countryCallingCode(),a=n.v2?e.nationalNumber:e.phone;switch(t){case"NATIONAL":return a?br(o=yr(a,e.carrierCode,"NATIONAL",r,n),e.ext,r,n.formatExtension):"";case"INTERNATIONAL":return a?(o=yr(a,null,"INTERNATIONAL",r,n),br(o="+".concat(i," ").concat(o),e.ext,r,n.formatExtension)):"+".concat(i);case"E.164":return"+".concat(i).concat(a);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(i).concat(a),ext:e.ext});case"IDD":if(!n.fromCountry)return;var d=function(e,t,n,r,o){var i=Un(r,o.metadata);if(i===n){var a=yr(e,t,"NATIONAL",o);return"1"===n?n+" "+a:a}var d=function(e,t,n){var r=new Tn(n);return r.selectNumberingPlan(e,t),r.defaultIDDPrefix()?r.defaultIDDPrefix():dr.test(r.IDDPrefix())?r.IDDPrefix():void 0}(r,void 0,o.metadata);if(d)return"".concat(d," ").concat(n," ").concat(yr(e,null,"INTERNATIONAL",o))}(a,e.carrierCode,i,n.fromCountry,r);if(!d)return;return br(d,e.ext,r,n.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(t,'"'))}}function yr(e,t,n,r,o){var i,a,d=(i=r.formats(),a=e,function(e,t){for(var n=0;n<e.length;){if(t(e[n]))return e[n];n++}}(i,function(e){if(e.leadingDigitsPatterns().length>0){var t=e.leadingDigitsPatterns()[e.leadingDigitsPatterns().length-1];if(0!==a.search(t))return!1}return Vn(a,e.pattern())}));return d?ar(e,d,{useInternationalFormat:"INTERNATIONAL"===n,withNationalPrefix:!d.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!o||!1!==o.nationalPrefix}):e}function br(e,t,n,r){return t?r(e,t,n):e}function gr(e){return gr="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},gr(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 $r(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){xr(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 xr(e,t,n){return(t=Er(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wr(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,Er(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Er(e){var t=function(e,t){if("object"!=gr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=gr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==gr(t)?t:t+""}var Cr=function(){return wr(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(Cn(n)&&Cn(n.countries)){r=n;var o=t;if(!Pr.test(o))throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');var i=or(o,void 0,void 0,void 0,r);if(t=i.countryCallingCode,!(n=i.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 a=function(e,t){var n,r,o=new Tn(t);kr(e)?(n=e,o.selectNumberingPlan(n),r=o.countryCallingCode()):r=e;return{country:n,countryCallingCode:r}}(t,r),d=a.country,s=a.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]:Yn(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return function(e,t,n){if(void 0===t&&(t={}),n=new Tn(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 Gn(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 Tn(n)).selectNumberingPlan(e.country,e.countryCallingCode),n.hasTypes()?void 0!==Xn(e,t,n.metadata):Vn(t.v2?e.nationalNumber:e.phone,n.nationalNumberPattern())}(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){return new Tn(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(e){return this.number===e.number&&this.ext===e.ext}},{key:"getType",value:function(){return Xn(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(e,t){return mr(this,e,t?$r($r({},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)}}])}(),kr=function(e){return/^[A-Z]{2}$/.test(e)};var Pr=/^\+\d+$/;function Ar(e){return Ar="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},Ar(e)}function Nr(e,t,n){return t=Ir(t),function(e,t){if(t&&("object"==Ar(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,Or()?Reflect.construct(t,n||[],Ir(e).constructor):t.apply(e,n))}function Sr(e){var t="function"==typeof Map?new Map:void 0;return Sr=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(Or())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&Tr(o,n.prototype),o}(e,arguments,Ir(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Tr(n,e)},Sr(e)}function Or(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Or=function(){return!!e})()}function Tr(e,t){return Tr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Tr(e,t)}function Ir(e){return Ir=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ir(e)}var Rr=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=Nr(this,t,[e]),Object.setPrototypeOf(n,t.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&&Tr(e,t)}(t,e),function(e){return Object.defineProperty(e,"prototype",{writable:!1}),e}(t)}(Sr(Error)),Mr=new RegExp("(?:"+lr()+")$","i");var Lr={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 Dr(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 qr(e){for(var t,n="",r=Dr(e.split(""));!(t=r()).done;){n+=Ur(t.value,n)||""}return n}function Ur(e,t,n){if("+"===e){if(t)return;return"+"}return function(e){return Lr[e]}(e)}var jr="(["+Qn+"]|[\\-\\.\\(\\)]?)",Fr=new RegExp("^\\+"+jr+"*["+Qn+"]"+jr+"*$","g"),Gr=new RegExp("^("+("["+Qn+"]+((\\-)*["+Qn+"])*")+"\\.)*"+("[a-zA-Z]+((\\-)*["+Qn+"])*")+"\\.?$","g"),Vr="tel:",Kr=";phone-context=";function Hr(e,t){var n,r=t.extractFormattedPhoneNumber,o=function(e){var t=e.indexOf(Kr);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&&(Fr.test(e)||Gr.test(e))}(o))throw new Rr("NOT_A_NUMBER");if(null===o)n=r(e)||"";else{n="","+"===o.charAt(0)&&(n+=o);var i,a=e.indexOf(Vr);i=a>=0?a+4:0;var d=e.indexOf(Kr);n+=e.substring(i,d)}var s=n.indexOf(";isub=");if(s>0&&(n=n.substring(0,s)),""!==n)return n}var Wr=new RegExp("[++"+Qn+"]"),Xr=new RegExp("[^"+Qn+"#]+$");function zr(e,t,n){if(t=t||{},n=new Tn(n),t.defaultCountry&&!n.hasCountry(t.defaultCountry)){if(t.v2)throw new Rr("INVALID_COUNTRY");throw new Error("Unknown country: ".concat(t.defaultCountry))}var r=function(e,t,n){var r=Hr(e,{extractFormattedPhoneNumber:function(e){return function(e,t,n){if(!e)return;if(e.length>250){if(n)throw new Rr("TOO_LONG");return}if(!1===t)return e;var r=e.search(Wr);if(r<0)return;return e.slice(r).replace(Xr,"")}(e,n,t)}});if(!r)return{};if(!function(e){return e.length>=2&&fr.test(e)}(r))return function(e){return hr.test(e)}(r)?{error:"TOO_SHORT"}:{};var o=function(e){var t=e.search(Mr);if(t<0)return{};for(var n=e.slice(0,t),r=e.match(Mr),o=1;o<r.length;){if(r[o])return{number:n,ext:r[o]};o++}}(r);if(o.ext)return o;return{number:r}}(e,t.v2,t.extract),o=r.number,i=r.ext,a=r.error;if(!o){if(t.v2){if("TOO_SHORT"===a)throw new Rr("TOO_SHORT");throw new Rr("NOT_A_NUMBER")}return{}}var d=function(e,t,n,r){var o,i=or(qr(e),void 0,t,n,r.metadata),a=i.countryCallingCodeSource,d=i.countryCallingCode,s=i.number;if(d)r.selectNumberingPlan(d);else{if(!s||!t&&!n)return{};r.selectNumberingPlan(t,n),t&&(o=t),d=n||Un(t,r.metadata)}if(!s)return{countryCallingCodeSource:a,countryCallingCode:d};var l=rr(qr(s),o,r),c=l.nationalNumber,u=l.carrierCode,h=nr(d,{nationalNumber:c,metadata:r});h&&(o=h,"001"===h||r.selectNumberingPlan(o));return{country:o,countryCallingCode:d,countryCallingCodeSource:a,nationalNumber:c,carrierCode:u}}(o,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 Rr("INVALID_COUNTRY");return{}}if(!l||l.length<2){if(t.v2)throw new Rr("TOO_SHORT");return{}}if(l.length>17){if(t.v2)throw new Rr("TOO_LONG");return{}}if(t.v2){var p=new Cr(c,l,n.metadata);return s&&(p.country=s),h&&(p.carrierCode=h),i&&(p.ext=i),p.__countryCallingCodeSource=u,p}var f=!!(t.extended?n.hasSelectedNumberingPlan():s)&&Vn(l,n.nationalNumberPattern());return t.extended?{country:s,countryCallingCode:c,carrierCode:h,valid:f,possible:!!f||!(!0!==t.extended||!n.possibleLengths()||!Gn(l,s,n)),phone:l,ext:i}:f?function(e,t,n){var r={country:e,phone:t};n&&(r.ext=n);return r}(s,l,i):{}}function Yr(e){return Yr="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},Yr(e)}function Qr(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 Zr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qr(Object(n),!0).forEach(function(t){Jr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Jr(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Yr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Yr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Yr(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eo(e){return eo="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},eo(e)}function to(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 no(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=eo(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=eo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==eo(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ro(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,o,i,a,d=[],s=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t);else for(;!(s=(r=i.call(n)).done)&&(d.push(r.value),d.length!==t);s=!0);}catch(e){l=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return d}}(e,t)||function(e,t){if(e){if("string"==typeof e)return oo(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)?oo(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 oo(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 io(e){var t,n,r,o=ro(Array.prototype.slice.call(e),4),i=o[0],a=o[1],d=o[2],s=o[3];if("string"!=typeof i)throw new TypeError("A text for parsing must be a string.");if(t=i,a&&"string"!=typeof a){if(!Cn(a))throw new Error("Invalid second argument: ".concat(a));d?(n=a,r=d):r=a}else s?(n=d,r=s):(n=void 0,r=d),a&&(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?to(Object(n),!0).forEach(function(t){no(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):to(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({defaultCountry:a},n));return{text:t,options:n,metadata:r}}function ao(e){return ao="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},ao(e)}function so(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 lo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?so(Object(n),!0).forEach(function(t){co(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):so(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function co(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=ao(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=ao(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ao(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uo(e,t,n){t&&t.defaultCountry&&!function(e,t){return t.countries.hasOwnProperty(e)}(t.defaultCountry,n)&&(t=lo(lo({},t),{},{defaultCountry:void 0}));try{return function(e,t,n){return zr(e,Zr(Zr({},t),{},{v2:!0}),n)}(e,t,n)}catch(e){if(!(e instanceof Rr))throw e}}function ho(){var e=io(arguments);return uo(e.text,e.options,e.metadata)}function po(e){return new Tn(e).getCountries()}function fo(e,t,n){if(t[e])return new Cr(e,t[e],n)}function _o(){return xn(ho,arguments)}function mo(){return xn(Un,arguments)}const yo=({countryCode:e,size:t=16})=>ue("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"}}),bo=e=>{const{field:t,onChange:n}=e,r=kt(t),o=Et(t),[i,a]=Pe(t.initial_value),d=go.findIndex(e=>e.value===i),s=Ne(null);vo(e=>{if(s.current){const t=go.find(t=>t.value===e);t&&l(t)}});const l=Te(e=>{a(e.value),s.current&&(s.current.value=e.value),n()},[n]);return Ae(()=>{t.initial_value&&(s.current&&(s.current.value=i||""),n())},[]),ue("div",{children:[ue("input",{type:"hidden",name:o,defaultValue:"",ref:s}),ue(Xt,{id:r,options:go,onChange:l,placeholder:t.placeholder,selectedIndex:d,enableSearch:!0,className:"xendit-form-field-inner"})]})},go=function(){return xn(po,arguments)}().map(e=>({title:new Intl.DisplayNames(["en"],{type:"region"}).of(e),value:e,leadingAsset:ue(yo,{countryCode:e})})).sort((e,t)=>e.title.localeCompare(t.title));function vo(e){const t=ca()?.cardDetails,n=t?.details?.country_codes[0],r=wt(n);Ae(()=>{n&&n!==r&&e(n)})}const $o=e=>{const{field:t,onChange:n}=e,r=kt(t),o=Et(t);if(!function(e){return"dropdown"===e.type.name}(t))throw new Error("DropdownField expects field.type.name to be 'dropdown'");const i=Ne(null),a=Oe(()=>t.type.options.map(e=>({title:e.label,description:e.subtitle,value:e.value,leadingAsset:e.icon_url?ue("img",{style:{height:"16px",width:"16px",objectFit:"contain"},src:e.icon_url}):null})),[t.type.options]),[d,s]=Pe(t.initial_value??""),l=Te(e=>{i.current&&(i.current.value=e.value),s(e.value),n()},[n]),c=a.findIndex(e=>e.value===d);return Ae(()=>{t.initial_value&&l(a[c])},[]),ue(x,{children:[ue(Xt,{id:r,placeholder:t.placeholder,options:a,onChange:l,selectedIndex:c,className:"xendit-form-field-inner"}),ue("input",{type:"hidden",name:o,defaultValue:"",ref:i})]})};const xo="undefined"!=typeof window&&window.HTMLElement?window.HTMLElement:EventTarget;class XenditFormAssociatedFocusTrap extends xo{static tag="xendit-form-associated-focus-trap";static formAssociated=!0;internals;constructor(){super(),this.internals=this.attachInternals()}}var wo;wo=XenditFormAssociatedFocusTrap,"undefined"!=typeof window&&window.customElements&&customElements.define(wo.tag,wo);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}}const Eo=K(null);ct("https://assets.xendit.co/components/secure-iframe-v0.0.23.html");const Co=new URL("https://assets.xendit.co/components/secure-iframe-v0.0.23.html").origin,ko=({children:e})=>{const t=Ne(new Map),n={registerIframe:(e,n)=>{n.current&&t.current.set(e,n.current)},unregisterIframe:e=>t.current.delete(e),postMessageToIframe:(e,n)=>{const r=t.current.get(e);r?.contentWindow&&r.contentWindow.postMessage(n,Co)}};return ue(Eo.Provider,{value:n,children:e})};ct("https://assets.xendit.co/components/secure-iframe-v0.0.23.html");const Po=new URL("https://assets.xendit.co/components/secure-iframe-v0.0.23.html"),Ao=Po.toString(),No=Po.origin,So=e=>{const{field:t,onChange:n}=e,r=at(),o=kt(t),i=Et(t),a=rt(),d=Ne(null),s=Ne(null),[l,c]=Pe(),[u,h]=Pe(!1),{card:p}=sa()??{},f=ca(),_=f?.cardDetails?.details?.schemes,m=_?.find(e=>p?.brands?.some(t=>t.name===e))??null,y=Te(e=>{if(!d.current)return;const r=d.current.contentWindow;if(e.source!==r)return;if(e.origin!==No)return;const o=e.data;switch(o.type){case"xendit-iframe-ready":c(o.ecdhPublicKey);break;case"xendit-iframe-change":{if(!s.current)return;const e=o.encrypted,t=1,r=e.map(e=>{if(o.empty)return"";const n=["xendit-encrypted",t,l,e.iv,e.value];return!o.valid&&o.validationErrorCodes.length&&n.push("invalid",btoa(o.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]),b=Te(()=>{d.current?.contentWindow&&d.current.contentWindow.postMessage({type:"xendit-iframe-focus"},No)},[]);Ae(()=>(window.addEventListener("message",y),()=>{window.removeEventListener("message",y)}),[y]);const g=Ie(Eo);Ae(()=>(g?.registerIframe(i,d),()=>g?.unregisterIframe(i)),[i,g]);const v=new URL(Ao);v.searchParams.set("input_type",t.type.name),v.searchParams.set("embedder",window.location.origin),v.searchParams.set("session_id",a.payment_session_id),v.searchParams.set("pk",r[le].sdkKey.publicKey),v.searchParams.set("sig",r[le].sdkKey.signature),r[le].options.iframeFieldAppearance&&v.searchParams.set("appearance",JSON.stringify(r[le].options.iframeFieldAppearance));return ue("div",{className:`xendit-iframe-container xendit-form-field-inner ${u?"xendit-field-focus":""}`,children:[ue(XenditFormAssociatedFocusTrap.tag,{id:o,onFocus:b,tabIndex:-1}),ue("input",{type:"hidden",name:i,defaultValue:"",ref:s}),ue("iframe",{src:v.toString(),ref:d,sandbox:"allow-scripts allow-same-origin"}),"credit_card_number"===t.type.name&&p&&ue(Oo,{cardsBrandList:p.brands,selectedCardBrand:m})]})},Oo=({cardsBrandList:e,selectedCardBrand:t})=>{if(!e)return null;const n=e.find(e=>e.name===t)?.logo_url;return ue("div",{className:"xendit-card-brands-list",children:t?n&&ue("img",{className:"xendit-card-brand-logo",src:n,alt:t}):e.map(({name:e,logo_url:t})=>ue("img",{className:"xendit-card-brand-logo",src:t,alt:e},e))})};var To={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:"450001234",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 Io=e=>{const{field:t,onChange:n}=e,r=kt(t),o=Et(t),i=rt(),a=Ne(null),d=Oe(()=>function(e,t){const n={country:t,localNumber:""};if(!e)return n;const r=_o(e);if(!r)return n;const o=Ro.find(e=>e.value===r.country);if(!o)return n;if(!Mo(o,r.nationalNumber))return n;const i=r.formatInternational(),a=mo(o.value);return{country:o.value,localNumber:i.replace(`+${a} `,"")}}(t.initial_value,i.country),[t.initial_value,i.country]),[s,l]=Pe(d.country),c=Oe(()=>{const e=Ro.findIndex(e=>e.value===s);return-1===e?0:e},[s]),u=Ro[c],[h,p]=Pe(d.localNumber),f=Ne(null),_=Te((e,t)=>{const n=Mo(e,t);return n?n.number:`+${e.dial}${t}`},[]),m=Te((e,t)=>{a.current&&(a.current.value=_(e,t))},[_]);function y(e){const t=e;l(t.value),m(t,h),n()}return vo(e=>{const t=Ro.find(t=>t.value===e);t&&t.value!==s&&!h&&y(t)}),Ae(()=>{t.initial_value&&(a.current&&(a.current.value=t.initial_value),n())},[]),ue("div",{className:"xendit-input-phone",children:[ue(Xt,{options:Ro,selectedIndex:c,onChange:y,fixedOverlayWidth:300,enableSearch:!0,noOverflow:!0,className:"xendit-form-field-inner"}),ue("input",{id:r,ref:f,type:"tel",inputMode:"tel",placeholder:function(){return xn(fo,arguments)}(u.value,To)?.formatInternational()?.replace(`+${mo(u.value)} `,"")||"",className:"xendit-text-14 xendit-form-field-inner xendit-phone-number-input",onBlur:function(e){!function(e=u,t=h){const n=Mo(e,t);if(n){const t=n.formatInternational();p(t.replace(`+${mo(e.value)} `,""))}}(),e.currentTarget?.value&&a.current?.dispatchEvent(new InternalSetFieldTouchedEvent)},onChange:function(e){const t=e.target.value;p(t),m(u,t),n()},value:h,autoComplete:"tel"}),ue("input",{type:"hidden",name:o,ref:a})]})},Ro=go.map(e=>{const t=mo(e.value);return t?{...e,shortTitle:`+${t}`,title:`${e.title} (+${t})`,dial:t}:null}).filter(e=>Boolean(e)),Mo=(e,t)=>{const n=_o(t,e.value);return n&&n.isPossible()?n:null};function Lo(e){return{title:e.name,value:e.value}}const Do=[{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(Lo),Bo=[{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(Lo),qo=[{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})),Uo=e=>{const{field:t,onChange:n}=e,r=kt(t),o=Et(t),i=rt(),a=sa()?.form,d=Hi(),[s,l]=Pe(t.initial_value),c=Ne(null),u=Te(()=>{l(""),c.current&&(c.current.value=""),n()},[n]),h=Te(e=>{l(e.value),c.current&&(c.current.value=e.value),n(),c.current?.dispatchEvent(new InternalSetFieldTouchedEvent)},[n]),p=Te(e=>{l(e.currentTarget.value),c.current&&(c.current.value=e.target.value),n(),c.current?.dispatchEvent(new InternalSetFieldTouchedEvent)},[n]),f=function(e){switch(e){case"US":return Do;case"CA":return Bo;case"GB":return qo;default:return null}}(function(e,t,n,r){if(t)for(let r=0;r<t.length;r++){const o=t[r];if(r>0&&o===e){const e=t[r-1];if("country"===e.type.name){const t=It(e.channel_property,n);if(t&&"string"==typeof t)return t}}}return r.country}(t,a??[],d??{},i)),_=f?f.findIndex(e=>e.value===s):-1,m=wt(f),y=Ne(!1);return Ae(()=>{if(y.current){if(f!==m){if(-1!==_)return;u()}}else y.current=!0},[u,f,m,_]),Ae(()=>{t.initial_value&&(c.current&&(c.current.value=s),n())},[]),ue(x,{children:[ue("input",{type:"hidden",name:o,defaultValue:"",ref:c}),f?ue(Xt,{id:r,options:f,selectedIndex:_,onChange:h,placeholder:t.placeholder,enableSearch:!0,className:"xendit-form-field-inner"},Bt(f)):ue("input",{type:"text",id:r,value:s,onChange:p,placeholder:t.placeholder,className:"xendit-form-field-inner xendit-text-14"})]})};const jo=e=>{const{field:t,onChange:n}=e,r=kt(t),o=Et(t),i=Ne(null),[a,d]=Pe(t.initial_value??"");return ue("input",{id:r,name:o,ref:i,type:"text",placeholder:t.placeholder,className:"xendit-form-field-inner xendit-text-14",value:a,onBlur:function(e){e.currentTarget?.value&&i.current?.dispatchEvent(new InternalSetFieldTouchedEvent)},onChange:function(e){d(e.currentTarget.value),n()},minLength:Fo(t)?t.type.min_length:void 0,maxLength:Fo(t)?t.type.max_length:void 0,autoComplete:Fo(t)?t.type.autocomplete:void 0})};function Fo(e){return"text"===e.type.name}const Go={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"},Vo={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:"MXN$",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$"},Ko={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$"},Ho={BHD:3,JOD:3,KWD:3,LYD:3,OMR:3,TND:3};function Wo(e,t){let n;const r=e<0,o=Go[t]??"en",i=Ho[t]??2;if(n=new Intl.NumberFormat(o,{style:"decimal",minimumFractionDigits:i,maximumFractionDigits:20}).format(Math.abs(e)),n=n.replace(/(\.|,)000?$/,""),Vo[t]){const e=Vo[t]??t;n=(Ko[t]??"$1").replace("$",e).replace("1",n)}else n=t+" "+n;return r&&(n="-"+n),n}const Xo=e=>{const{field:t,onChange:n}=e,{t:r}=at(),o=rt(),i=kt(t),a=Et(t),d=Ne(null),s=sa();ct(s);const l=Oe(()=>Gt(s.form,"credit_card_number"),[s.form]),c=ca()?.paymentOptions,u=c?.options?.installment_plans,[h,p]=Pe(null),f=Oe(()=>{const e=u?.map(e=>({title:r("installment_plan.pay_in_installments",{installments:e.terms,amount:Wo(e.installment_amount,o.currency)}),subtitle:e.interest_rate,value:zo(e)}))??[];return l&&e.unshift({title:r("installment_plan.pay_in_full",{amount:Wo(o.amount,o.currency)}),value:""}),e},[l,u,o.amount,o.currency,r]);let _=f?.findIndex(e=>e.value===h);-1===_&&(_=0);const m=Te(()=>{p(null),d.current&&(d.current.value="")},[]),y=Te(e=>{if(d.current){const t=u?.find(t=>zo(t)===e.value);t?t.code?d.current.value=JSON.stringify([t.terms,t.interval,t.code]):d.current.value=JSON.stringify([t.terms,t.interval]):d.current.value="",d.current?.dispatchEvent(new InternalSetFieldTouchedEvent)}p(e.value),n()},[u,n]);Ae(()=>{f.length&&y(f[0])},[]);const b=wt(f);return Ae(()=>{f===b||u?.some(e=>zo(e)===h)||(f.length?y(f[0]):m())},[m,f,y,u,b,h]),ue(x,{children:[c?ue(Xt,{id:i,placeholder:t.placeholder,onChange:y,options:f,selectedIndex:_,className:"xendit-form-field-inner"}):ue(zt,{id:i,className:"xendit-form-field-inner"}),ue("input",{type:"hidden",name:a,ref:d})]})};function zo(e){return`${e.terms}_${e.interval}_${e.code??""}`}const Yo=e=>{const{field:t,className:n}=e;return ue("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 ue(So,{...e});case"phone_number":return ue(Io,{...e});case"text":case"email":case"postal_code":return ue(jo,{...e});case"dropdown":return ue($o,{...e});case"installment_plan":return ue(Xo,{...e});case"country":return ue(bo,{...e});case"province":return ue(Uo,{...e})}throw t.type,new Error(`Unsupported field type: ${t.type.name}`)}()})};const Qo={en:{session:{"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","action_barcode.amount_to_pay":"Amount to pay","action_barcode.barcode_content":"Payment Code","action_barcode.merchant_name":"Seller","action_barcode.unable_to_generate":"Unable to generate barcode","action_deeplink.button":"Open App","action_deeplink.instructions":"Please complete your payment on {{channelName}} app.","action_deeplink.title":"Awaiting payment...","action_empty_list_push_notification.subtext":"Check the notification in your {{channelName}} app to complete your payment.","action_empty_list_push_notification.title":"Awaiting payment...","action_qr.unable_to_generate":"Unable to generate QR code","action_va.amount_to_pay":"Amount to Pay","action_va.copied_to_clipboard":"Copied to clipboard","action_va.copy":"Copy","action_va.merchant_name":"Virtual Account Name","action_va.virtual_account_number":"Virtual Account Number","combobox.default_search_placeholder":"Search...","default_error.message_1":"There was a problem with the request.","default_error.message_2":"Please try again later.","default_error.title":"Error","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}}","google_pay_errors.buyer_account_error.message":"Your Google account is unable to make this payment. Use a different Google account or a different payment method.","google_pay_errors.buyer_account_error.title":"Google Pay Error","google_pay_errors.developer_error.message":"Something went wrong with Google Pay. Please try again or use a different payment method.","google_pay_errors.developer_error.title":"Google Pay Error","google_pay_errors.internal_error.message":"Something went wrong with Google Pay. Please try again or use a different payment method.","google_pay_errors.internal_error.title":"Google Pay Error","google_pay_errors.merchant_account_error.message":"Something went wrong with Google Pay. Please try again or use a different payment method.","google_pay_errors.merchant_account_error.title":"Google Pay Error","google_pay_errors.unknown_error.message":"An unknown error occurred with Google Pay. The error code is {{statusCode}}.","google_pay_errors.unknown_error.title":"Google Pay Error","image_alt.channel_logo":"{{channelName}} logo","installment_plan.pay_in_full":"Pay in Full — {{amount}}","installment_plan.pay_in_installments":"{{installments}}x Installments — {{amount}}","payment.save_checkbox_label":"Save this payment method for recurring payments","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}}","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","simulation.see_all_scenarios":"See the full list here.","simulation.select_scenario":"Select a scenario","simulation.simulate_scenario":"Simulate scenario","simulation.simulate_test_scenario":"Simulate a test scenario","simulation.want_to_test_all_scenarios":"Want to test different scenarios?","customer_details.form_name":"Your Name","customer_details.name":"Name","validation.card_brand_not_allowed":"This card brand is not accepted.","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. Please check and try again.","validation.required":"{{field}} is required.","validation.text_too_long":"{{field}} is too long","validation.text_too_short":"{{field}} is too short"}}.session,id:{session:{"action.payment_confirmation_instructions":"Setelah Anda bayar, klik tombol di atas untuk mendapatkan konfirmasi pembayaran Anda.","action.payment_made":"Saya telah melakukan pembayaran ini","action_barcode.amount_to_pay":"Jumlah Pembayaran","action_barcode.barcode_content":"","action_barcode.merchant_name":"","action_barcode.unable_to_generate":"","action_deeplink.button":"Buka Aplikasi","action_deeplink.instructions":"Silakan selesaikan pembayaran Anda di aplikasi {{channelName}}.","action_deeplink.title":"Menunggu pembayaran...","action_empty_list_push_notification.subtext":"Cek notifikasi di aplikasi {{channelName}} Anda untuk menyelesaikan pembayaran.","action_empty_list_push_notification.title":"Menunggu pembayaran...","action_qr.unable_to_generate":"","action_va.amount_to_pay":"Jumlah Pembayaran","action_va.copied_to_clipboard":"","action_va.copy":"","action_va.merchant_name":"","action_va.virtual_account_number":"Nomor Virtual Account","combobox.default_search_placeholder":"Cari...","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}}","google_pay_errors.buyer_account_error.message":"","google_pay_errors.buyer_account_error.title":"","google_pay_errors.developer_error.message":"","google_pay_errors.developer_error.title":"","google_pay_errors.internal_error.message":"","google_pay_errors.internal_error.title":"","google_pay_errors.merchant_account_error.message":"","google_pay_errors.merchant_account_error.title":"","google_pay_errors.unknown_error.message":"","google_pay_errors.unknown_error.title":"","image_alt.channel_logo":"Logo {{channelName}}","installment_plan.pay_in_full":"","installment_plan.pay_in_installments":"","payment.save_checkbox_label":"Simpan metode pembayaran ini untuk pembayaran berulang","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}}","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","customer_details.form_name":"Nama Anda","customer_details.name":"Nama","simulation.see_all_scenarios":"","simulation.select_scenario":"","simulation.simulate_scenario":"","simulation.simulate_test_scenario":"","simulation.want_to_test_all_scenarios":"","validation.card_brand_not_allowed":"Merek kartu ini tidak diterima.","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. Silakan cek dan coba lagi.","validation.required":"{{field}} wajib diisi.","validation.text_too_long":"{{field}} terlalu panjang","validation.text_too_short":"{{field}} terlalu pendek"}}.session,th:{session:{"action.payment_confirmation_instructions":"เมื่อคุณชำระเงินแล้ว คลิกที่ปุ่มด้านบนเพื่อยืนยันการชำระเงิน","action.payment_made":"ฉันได้ชำระเงินแล้ว","action_barcode.amount_to_pay":"จำนวนเงินที่ต้องชำระ","action_barcode.barcode_content":"","action_barcode.merchant_name":"","action_barcode.unable_to_generate":"","action_deeplink.button":"","action_deeplink.instructions":"โปรดชำระเงินให้เสร็จสิ้นบนแอป {{channelName}}","action_deeplink.title":"","action_empty_list_push_notification.subtext":"ตรวจสอบการแจ้งเตือนในแอป {{channelName}} ของคุณเพื่อดำเนินการชำระเงินให้เสร็จสิ้น","action_empty_list_push_notification.title":"กําลังรอการชําระเงิน...","action_qr.unable_to_generate":"","action_va.amount_to_pay":"ยอดชำระ","action_va.copied_to_clipboard":"","action_va.copy":"","action_va.merchant_name":"","action_va.virtual_account_number":"หมายเลข Virtual Account","combobox.default_search_placeholder":"ค้นหา...","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}})","google_pay_errors.buyer_account_error.message":"","google_pay_errors.buyer_account_error.title":"","google_pay_errors.developer_error.message":"","google_pay_errors.developer_error.title":"","google_pay_errors.internal_error.message":"","google_pay_errors.internal_error.title":"","google_pay_errors.merchant_account_error.message":"","google_pay_errors.merchant_account_error.title":"","google_pay_errors.unknown_error.message":"","google_pay_errors.unknown_error.title":"","image_alt.channel_logo":"โลโก้ {{channelName}}","installment_plan.pay_in_full":"","installment_plan.pay_in_installments":"","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}}","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":"ไม่สามารถเพิ่มวิธีการชําระเงินได้","customer_details.form_name":"ชื่อของคุณ","customer_details.name":"ชื่อ","simulation.see_all_scenarios":"","simulation.select_scenario":"","simulation.simulate_scenario":"","simulation.simulate_test_scenario":"","simulation.want_to_test_all_scenarios":"","validation.card_brand_not_allowed":"ไม่รับบัตรเครดิตยี่ห้อนี้","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}} สั้นเกินไป"}}.session,vi:{session:{"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","action_barcode.amount_to_pay":"Số tiền cần thanh toán","action_barcode.barcode_content":"","action_barcode.merchant_name":"","action_barcode.unable_to_generate":"","action_deeplink.button":"Mở ứng dụng","action_deeplink.instructions":"Vui lòng hoàn tất thanh toán trên ứng dụng {{channelName}}.","action_deeplink.title":"Đang chờ thanh toán...","action_empty_list_push_notification.subtext":"Vui lòng kiểm tra thông báo trong ứng dụng {{channelName}} để hoàn tất thanh toán.","action_empty_list_push_notification.title":"Đang chờ thanh toán...","action_qr.unable_to_generate":"","action_va.amount_to_pay":"Số tiền cần thanh toán","action_va.copied_to_clipboard":"","action_va.copy":"","action_va.merchant_name":"","action_va.virtual_account_number":"Số tài khoản định danh (Virtual Account)","combobox.default_search_placeholder":"Tìm kiếm...","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}}","google_pay_errors.buyer_account_error.message":"","google_pay_errors.buyer_account_error.title":"","google_pay_errors.developer_error.message":"","google_pay_errors.developer_error.title":"","google_pay_errors.internal_error.message":"","google_pay_errors.internal_error.title":"","google_pay_errors.merchant_account_error.message":"","google_pay_errors.merchant_account_error.title":"","google_pay_errors.unknown_error.message":"","google_pay_errors.unknown_error.title":"","image_alt.channel_logo":"Logo {{channelName}}","installment_plan.pay_in_full":"","installment_plan.pay_in_installments":"","payment.save_checkbox_label":"Lưu phương thức thanh toán này cho các thanh toán định kỳ","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}}","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","customer_details.form_name":"Tên của bạn","customer_details.name":"Tên","simulation.see_all_scenarios":"","simulation.select_scenario":"","simulation.simulate_scenario":"","simulation.simulate_test_scenario":"","simulation.want_to_test_all_scenarios":"","validation.card_brand_not_allowed":"Thương hiệu thẻ này không được chấp nhận.","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"}}.session,es:{session:{"action.payment_confirmation_instructions":"","action.payment_made":"","action_barcode.amount_to_pay":"","action_barcode.barcode_content":"","action_barcode.merchant_name":"","action_barcode.unable_to_generate":"","action_deeplink.button":"","action_deeplink.instructions":"","action_deeplink.title":"","action_empty_list_push_notification.subtext":"","action_empty_list_push_notification.title":"","action_qr.unable_to_generate":"","action_va.amount_to_pay":"","action_va.copied_to_clipboard":"","action_va.copy":"","action_va.merchant_name":"","action_va.virtual_account_number":"","combobox.default_search_placeholder":"","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":"","failure_code.invalid_merchant_settings":"","failure_code.invalid_otp":"","failure_code.invalid_token":"","failure_code.issuer_unavailable":"","failure_code.otp_attempt_counts_exceeded":"","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:"","google_pay_errors.buyer_account_error.message":"","google_pay_errors.buyer_account_error.title":"","google_pay_errors.developer_error.message":"","google_pay_errors.developer_error.title":"","google_pay_errors.internal_error.message":"","google_pay_errors.internal_error.title":"","google_pay_errors.merchant_account_error.message":"","google_pay_errors.merchant_account_error.title":"","google_pay_errors.unknown_error.message":"","google_pay_errors.unknown_error.title":"","image_alt.channel_logo":"","installment_plan.pay_in_full":"","installment_plan.pay_in_installments":"","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":"","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":"","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":"","payment_token_status.failed.title":"","simulation.see_all_scenarios":"","simulation.select_scenario":"","simulation.simulate_scenario":"","simulation.simulate_test_scenario":"","simulation.want_to_test_all_scenarios":"","validation.card_brand_not_allowed":"","validation.card_cvn_invalid":"","validation.card_expiry_invalid":"","validation.card_number_incomplete":"","validation.card_number_invalid":"","validation.generic_invalid":"","validation.required":"","validation.text_too_long":"","validation.text_too_short":""}}.session};const Zo=(e,t,n)=>t?(e=>"object"==typeof e&&null!==e&&"localeKey"in e)(t)?e(t.localeKey,{field:"string"==typeof n?n:n.label}):t.value:null;function Jo(e){return e.startsWith("/")&&e.endsWith("/")?e.slice(1,-1):e}function ei(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=Mt(e);if(!t.valid){if(t.validationError)return{localeKey:t.validationError};throw new Error("Unexpected value in encrypted field, this is a bug, please contact support.")}}(t);case"phone_number":return(e=>{const t=_o(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(Jo(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 ti(e,t){const n=Array.isArray(e.channel_property)?e.channel_property:[e.channel_property];for(const r of n){let n=ni(t,r);if(void 0===n&&(n=""),"string"!=typeof n)continue;const o=ei(e,n);if(o)return o}}function ni(e,t){const n=t.split("."),r=n[0].endsWith("[]");if(r){if(1!==n.length)throw new Error("Array channel properties cannot have nested keys");n[0]=n[0].slice(0,-2)}const o=e[n[0]];if(void 0!==o){if(r&&Array.isArray(o))return o;if("object"!=typeof o||Array.isArray(o)){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 o}return ni(o,n.slice(1).join("."))}}const ri=K(null),oi=({scenarios:e,onSelect:t,children:n})=>{const[r,o]=Pe(!1),i=Ne(null);return Ae(()=>{if(!r)return;const e=e=>{const t=i.current;t&&(t.contains(e.target)||o(!1))};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[r]),ue("div",{ref:i,children:ue(ri.Provider,{value:{open:r,setOpen:o,scenarios:e,onSelect:t},children:n})})},ii=({children:e})=>ue("div",{className:"xendit-form-simulation-root",children:e}),ai=({children:e})=>{const{open:t,setOpen:n}=Ie(ri)||{};return ue("button",{type:"button",className:"xendit-form-simulation-trigger",onClick:()=>n?.(!t),children:e})},di=()=>{const e=Ie(ri);ct(e);const{open:t,setOpen:n,scenarios:r,onSelect:o}=e,{t:i}=at();return t&&r?ue("div",{className:"xendit-form-simulation-popover",children:[ue("div",{className:"xendit-text-12 xendit-text-semibold",children:i("simulation.simulate_test_scenario")}),ue(Xt,{onChange:e=>{o?.(e.value),n?.(!1)},placeholder:i("simulation.select_scenario"),options:r.scenarios.map(e=>({title:e.description,value:e.name,leadingAsset:ue("img",{src:e.imageUrl,className:"xendit-channel-logo"})}))}),r?.docsLink?ue("div",{className:"xendit-text-14",children:[i("simulation.want_to_test_all_scenarios")," ",ue("a",{href:r.docsLink,target:"_blank",rel:"noopener noreferrer",className:"xendit-text-link",children:i("simulation.see_all_scenarios")})]}):null]}):null},si="field-radius-bl-0",li="field-radius-br-0",ci="field-radius-tl-0",ui="field-radius-tr-0",hi="field-collapse-r",pi="field-collapse-l",fi="field-collapse-t",_i="field-collapse-b",mi=({fieldGroup:e,groupIndex:t,handleFieldChanged:n,channelProperties:r,simulationScenarios:o})=>{const{t:i}=at(),a=ca(),d=sa(),s=Ne(null),[l,c]=Pe({}),u=e.map(e=>e.span),h=Math.ceil(e.reduce((e,t)=>e+t.span,0)/2);Ae(()=>{const e=s.current;if(e)return e.addEventListener(InternalSetFieldTouchedEvent.type,t),()=>{e.removeEventListener(InternalSetFieldTouchedEvent.type,t)};function t(e){const t=e.target.name;c(e=>({...e,[t]:!0}))}},[]);const p=(()=>{for(const t of e){if(!l[Et(t)])continue;const e=ti(t,r??{});if(e)return ue("span",{className:"xendit-error-message xendit-text-12",children:Zo(i,e,t)})}for(const t of e){if("credit_card_number"!==t.type.name)continue;if(!l[Et(t)])continue;const e=d?.card?.brands,n=a?.cardDetails?.details?.schemes;if(e?.length&&n?.length&&!n.some(t=>e.some(e=>e.name===t)))return ue("span",{className:"xendit-error-message xendit-text-12",children:Zo(i,{localeKey:"validation.card_brand_not_allowed"},t)})}return null})();return ue(ko,{children:ue("div",{className:"xendit-channel-form-field-group",children:[ue("div",{className:"xendit-channel-form-field-group-label-container",children:[ue("label",{htmlFor:kt(e[0]),className:"xendit-text-14",children:e[0].group_label??e[0].label??""}),o?ue(yi,{simulationScenarios:o,fieldGroup:e}):null]}),ue("div",{ref:s,className:"xendit-form-field-group "+(p?"invalid":""),children:e.map((e,t)=>{const r=(e=>{const t=u.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===h-1}})(t),o=((e,t,n)=>{const{fieldPositionBySpan:r,fieldRow:o,fieldColumn:i,isLastRow:a}=n;return We({[si]:h>o+1||r%2==1,[li]:!!u[t+1],[ci]:t>0,[ui]:!(0===o&&1===i||0===o&&0===i&&2===e.span),[hi]:1===e.span&&0===i,[pi]:1===e.span&&1===i,[fi]:r>=2,[_i]:!a})})(e,t,r);return ue(Yo,{className:o,field:e,onChange:n},t)})},t),p]})})},yi=({simulationScenarios:e,fieldGroup:t})=>{const n=Ie(Eo),{t:r}=at();return ue(oi,{scenarios:e,onSelect:r=>{const o=e.scenarios.find(e=>e.name===r);if(o?.values)for(const[e,r]of Object.entries(o.values)){const o=t.find(t=>Et(t)===e);o&&("credit_card_number"!==o.type.name&&"credit_card_expiry"!==o.type.name&&"credit_card_cvn"!==o.type.name||n?.postMessageToIframe(e,{type:"xendit-iframe-populate-for-simulation",scenario:r}))}},children:ue(ii,{children:[ue(ai,{children:ue("div",{className:"xendit-text-12 xendit-text-semibold xendit-text-link",children:r("simulation.simulate_scenario")})}),ue(di,{})]})})};function bi(e,t){for(var n in t)e[n]=t[n];return e}function gi(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 vi(e,t){this.props=e,this.context=t}(vi.prototype=new w).isPureReactComponent=!0,vi.prototype.shouldComponentUpdate=function(e,t){return gi(this.props,e)||gi(this.state,t)};var $i=n.__b;n.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),$i&&$i(e)};var xi="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function wi(e){function t(t){var n=bi({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=xi,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Ei=n.__e;n.__e=function(e,t,n,r){if(e.then)for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);Ei(e,t,n,r)};var Ci=n.unmount;function ki(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=bi({},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 ki(e,t,n)})),e}function Pi(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return Pi(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 Ai(){this.__u=0,this.o=null,this.__b=null}function Ni(e){var t=e.__&&e.__.__c;return t&&t.__a&&t.__a(e)}function Si(){this.i=null,this.l=null}n.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Ci&&Ci(e)},(Ai.prototype=new w).__c=function(e,t){var n=t.__c,r=this;null==r.o&&(r.o=[]),r.o.push(n);var o=Ni(r.__v),i=!1,a=function(){i||r.__z||(i=!0,n.__R=null,o?o(s):s())};n.__R=a;var d=n.__P;n.__P=null;var s=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Pi(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.__P=d,t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},Ai.prototype.componentWillUnmount=function(){this.o=[]},Ai.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]=ki(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&v(x,null,e.fallback);return o&&(o.__u&=-33),[v(x,null,t.__a?null:e.children),o]};var Oi=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]}};(Si.prototype=new w).__a=function(e){var t=this,n=Ni(t.__v),r=t.l.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),Oi(t,e,r)):o()};n?n(i):i()}},Si.prototype.render=function(e){this.i=null,this.l=new Map;var t=O(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},Si.prototype.componentDidUpdate=Si.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){Oi(e,n,t)})};var Ti="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Ii=/^(?: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]/,Ri=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Mi=/[A-Z0-9]/g,Li="undefined"!=typeof document,Di=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};w.prototype.isReactComponent=!0,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(w.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Bi=n.event;n.event=function(e){return Bi&&(e=Bi(e)),e.persist=function(){},e.isPropagationStopped=function(){return this.cancelBubble},e.isDefaultPrevented=function(){return this.defaultPrevented},e.nativeEvent=e};var qi={configurable:!0,get:function(){return this.class}},Ui=n.vnode;n.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={},o=-1==n.indexOf("-");for(var i in t){var a=t[i];if(!("value"===i&&"defaultValue"in t&&null==a||Li&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var d=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===a?a="":"translate"===d&&"no"===a?a=!1:"o"===d[0]&&"n"===d[1]?"ondoubleclick"===d?i="ondblclick":"onchange"!==d||"input"!==n&&"textarea"!==n||Di(t.type)?"onfocus"===d?i="onfocusin":"onblur"===d?i="onfocusout":Ri.test(i)&&(i=d):d=i="oninput":o&&Ii.test(i)?i=i.replace(Mi,"-$&").toLowerCase():null===a&&(a=void 0),"oninput"===d&&r[i=d]&&(i="oninputCapture"),r[i]=a}}"select"==n&&(r.multiple&&Array.isArray(r.value)&&(r.value=O(t.children).forEach(function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)})),null!=r.defaultValue&&(r.value=O(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",qi)):t.className&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=Ti,Ui&&Ui(e)};var ji=n.__r;n.__r=function(e){ji&&ji(e),e.__c};var Fi=n.diffed;n.diffed=function(e){Fi&&Fi(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)};const Gi={scenarios:[{imageUrl:"https://assets.xendit.co/payment-session/logos/VISA.svg",description:"3DS Challenge",name:"3_ds_challenge_authentication_is_successful_if_otp_is_correct_visa",values:{"card_details.card_number":"3_ds_challenge_authentication_is_successful_if_otp_is_correct_visa","card_details.expiry_month__card_details.expiry_year":"3_ds_challenge_authentication_is_successful_if_otp_is_correct_visa","card_details.cvn":"3_ds_challenge_authentication_is_successful_if_otp_is_correct_visa"}},{imageUrl:"https://assets.xendit.co/payment-session/logos/VISA.svg",description:"3DS Frictionless, success",name:"3_ds_frictionless_authentication_is_successful_visa",values:{"card_details.card_number":"3_ds_frictionless_authentication_is_successful_visa","card_details.expiry_month__card_details.expiry_year":"3_ds_frictionless_authentication_is_successful_visa","card_details.cvn":"3_ds_frictionless_authentication_is_successful_visa"}},{imageUrl:"https://assets.xendit.co/payment-session/logos/MASTERCARD.svg",description:"3DS Challenge",name:"3_ds_challenge_authentication_is_successful_if_otp_is_correct_mastercard",values:{"card_details.card_number":"3_ds_challenge_authentication_is_successful_if_otp_is_correct_mastercard","card_details.expiry_month__card_details.expiry_year":"3_ds_challenge_authentication_is_successful_if_otp_is_correct_mastercard","card_details.cvn":"3_ds_challenge_authentication_is_successful_if_otp_is_correct_mastercard"}},{imageUrl:"https://assets.xendit.co/payment-session/logos/MASTERCARD.svg",description:"3DS Frictionless, success",name:"3_ds_frictionless_authentication_is_successful_mastercard",values:{"card_details.card_number":"3_ds_frictionless_authentication_is_successful_mastercard","card_details.expiry_month__card_details.expiry_year":"3_ds_frictionless_authentication_is_successful_mastercard","card_details.cvn":"3_ds_frictionless_authentication_is_successful_mastercard"}},{imageUrl:"https://assets.xendit.co/payment-session/logos/VISA.svg",description:"3DS Frictionless, success",name:"3_ds_frictionless_authentication_is_successful_visa2",values:{"card_details.card_number":"3_ds_frictionless_authentication_is_successful_visa2","card_details.expiry_month__card_details.expiry_year":"3_ds_frictionless_authentication_is_successful_visa2","card_details.cvn":"3_ds_frictionless_authentication_is_successful_visa2"}},{imageUrl:"https://assets.xendit.co/payment-session/logos/MASTERCARD.svg",description:"3DS Frictionless, success",name:"3_ds_frictionless_authentication_is_successful_mastercard2",values:{"card_details.card_number":"3_ds_frictionless_authentication_is_successful_mastercard2","card_details.expiry_month__card_details.expiry_year":"3_ds_frictionless_authentication_is_successful_mastercard2","card_details.cvn":"3_ds_frictionless_authentication_is_successful_mastercard2"}},{imageUrl:"https://assets.xendit.co/payment-session/logos/VISA.svg",description:"Failure",name:"failing_transaction_visa",values:{"card_details.card_number":"failing_transaction_visa","card_details.expiry_month__card_details.expiry_year":"failing_transaction_visa","card_details.cvn":"failing_transaction_visa"}},{imageUrl:"https://assets.xendit.co/payment-session/logos/MASTERCARD.svg",description:"Failure",name:"failing_transaction_mastercard",values:{"card_details.card_number":"failing_transaction_mastercard","card_details.expiry_month__card_details.expiry_year":"failing_transaction_mastercard","card_details.cvn":"failing_transaction_mastercard"}},{imageUrl:"https://assets.xendit.co/payment-session/logos/AMEX.svg",description:"3DS Frictionless, success",name:"3_ds_frictionless_authentication_successful_use_a_4_digit_cvn",values:{"card_details.card_number":"3_ds_frictionless_authentication_successful_use_a_4_digit_cvn","card_details.expiry_month__card_details.expiry_year":"3_ds_frictionless_authentication_successful_use_a_4_digit_cvn","card_details.cvn":"3_ds_frictionless_authentication_successful_use_a_4_digit_cvn"}},{imageUrl:"https://assets.xendit.co/payment-session/logos/AMEX.svg",description:"3DS Frictionless, success",name:"3_ds_frictionless_authentication_successful_use_a_4_digit_cvn2",values:{"card_details.card_number":"3_ds_frictionless_authentication_successful_use_a_4_digit_cvn2","card_details.expiry_month__card_details.expiry_year":"3_ds_frictionless_authentication_successful_use_a_4_digit_cvn2","card_details.cvn":"3_ds_frictionless_authentication_successful_use_a_4_digit_cvn2"}},{imageUrl:"https://assets.xendit.co/payment-session/logos/AMEX.svg",description:"3DS Challenge",name:"3_ds_challenge_use_a_4_digit_cvn",values:{"card_details.card_number":"3_ds_challenge_use_a_4_digit_cvn","card_details.expiry_month__card_details.expiry_year":"3_ds_challenge_use_a_4_digit_cvn","card_details.cvn":"3_ds_challenge_use_a_4_digit_cvn"}}],docsLink:"https://docs.xendit.co/docs/cards-simulate-card-scenarios"},Vi=wi(({form:e,onChannelPropertiesChanged:t},n)=>{const r=rt(),o=sa(),i=at(),a=ca(),d=Ne(null),[s,l]=Pe(null);Se(n,()=>({setAllFieldsTouched(){const e=d.current;e&&Array.from(e.elements).filter(e=>e instanceof HTMLInputElement).forEach(e=>{e.name&&e.dispatchEvent(new InternalSetFieldTouchedEvent)})}}));const c=Te(()=>{if(!d.current)return{};return function(e){const t={};for(const[n,r]of e){if(r instanceof Blob)continue;const e=n.split("__"),o=Wi(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 i=o.length?o.shift():"";e[0].endsWith("[]")?r[e[0].slice(0,-2)]=[i]:r[e[0]]=i}}return t}(new FormData(d.current).entries())},[]),u=Te(()=>{if(!d.current)return;const e=c();l(e),t(e)},[c,t]);Ae(()=>{u()},[]);const h=function(e,t,n,r){const o=Oe(()=>Xi(e.session_type,t,n,r),[r,n,t,e.session_type]);return o}(r,e,s||{},a??null),p=wt(h);!function(e,t){var n=ke(pe++,3);!ge.__s&&qe(n.__H,t)&&(n.__=e,n.u=t,fe.__H.__h.push(n))}(()=>{(function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0})(p||[],h)||u()},[h,u,p]);const f=Te(e=>i.supportsSimulationScenarios()&&"CARDS"===o?.channel_code&&e.some(e=>"credit_card_number"===e.type.name)?Gi:null,[o,i]),_=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}(h).filter(e=>e.length);return 0===_.length?null:ue("div",{class:"xendit-channel-form",children:ue("form",{ref:d,children:ue(Ki.Provider,{value:s,children:_.map((e,t)=>ue(mi,{fieldGroup:e,groupIndex:t,handleFieldChanged:u,channelProperties:s,simulationScenarios:f(e)},t))})})})}),Ki=K(null),Hi=()=>Ie(Ki);function Wi(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 Xi(e,t,n,r){const o=Gt(t,"credit_card_number"),i=r?.cardDetails?.details?.require_billing_information,a=!!r?.paymentOptions?.options?.installment_plans?.length;return t.filter(t=>{if(t.flags?.require_billing_information){if("PAY"!==e)return!1;if(!i)return!1}if("installment_plan"===t.type.name&&!a&&o)return!1;for(const e of t.display_if||[]){const[t,r,o]=e,i=ni(n,t);switch(r){case"equals":if(i!==o)return!1;break;case"not_equals":if(i===o)return!1}}return!0})}const zi=e=>{const t=Ne(null),n=Ne(null),r=void 0!==HTMLElement.prototype.animate;return Ae(()=>{r&&(t.current?.animate(Yi,Qi),n.current?.animate(Zi,Ji))},[r]),ue("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[ue("g",{opacity:"0.5",children:[ue("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"}),ue("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"})]}),ue("g",{ref:n,style:{transformOrigin:"20px 20px"},children:[ue("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"}),ue("g",{style:{transformOrigin:"10px 30px"},ref:t,children:[ue("path",{d:"M26.7697 20.5301V12.7301H18.9697",stroke:"#7C7C7C",strokeWidth:"1.872",strokeLinecap:"round",strokeLinejoin:"round"}),ue("path",{d:"M17.4102 22.0901L26.7702 12.7301",stroke:"#7C7C7C",strokeWidth:"1.872",strokeLinecap:"round",strokeLinejoin:"round"})]})]})]})},Yi=[{transform:"scale(0.1)"},{transform:"scale(1)"}],Qi={duration:500,easing:"ease-out"},Zi=[{transform:"rotate(0deg)"},{transform:"rotate(5deg)"},{transform:"rotate(-5deg)"},{transform:"rotate(0deg)"}],Ji={duration:1e3,easing:"ease-out",iterations:1/0,delay:2e3},ea=[{transform:"translateY(0)"},{transform:"translateY(44px)"}],ta={duration:1e3,delay:1e3,easing:"ease-out"},na={duration:1e3,direction:"reverse",delay:500,easing:"ease-in"},ra=[{opacity:1},{opacity:0},{opacity:1}],oa={duration:1e3},ia=e=>{const{id:t,label:n,checked:r,onChange:o,disabled:i}=e,a=Nt(),d=t||a;return ue("div",{className:"xendit-checkbox",children:[ue("div",{className:"xendit-checkbox-box",children:[ue("input",{id:d,type:"checkbox",onChange:e=>{o?.(e)},checked:r,disabled:i}),ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",className:"xendit-checkbox-graphic",children:ue("polyline",{points:"40 144 96 200 224 72",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"16"})})]}),ue("label",{htmlFor:d,className:"xendit-text-14",children:n})]})},aa=wi(({onChange:e,value:t},n)=>{const{t:r}=at(),[o,i]=Pe({});Se(n,()=>({setAllFieldsTouched(){i({given_names:!0})}}));const a=(()=>{if(0===Object.keys(o).length)return null;const e=function(e){if(0===e.given_names.length)return{localeKey:"validation.required"}}(t);return e?ue("span",{className:"xendit-error-message xendit-text-12",children:Zo(r,e,"Name")}):null})();return ue("form",{children:ue("div",{className:"xendit-channel-form-field-group",children:[ue("div",{className:"xendit-channel-form-field-group-label-container",children:ue("label",{htmlFor:"given_names",className:"xendit-text-14",children:r("customer_details.name")})}),ue("div",{className:"xendit-form-field-group "+(a?"invalid":""),children:ue("div",{className:"xendit-channel-form-field xendit-form-field-span-2",children:ue("input",{id:"given_names",name:"given_names",type:"text",placeholder:r("customer_details.form_name"),className:"xendit-form-field-inner xendit-text-14",onBlur:e=>{const t=e.target;i(e=>({...e,[t.name]:!0}))},onChange:t=>{const n=t.target;e({given_names:n.value})},required:!0,autoComplete:"given-name"})})}),a]})})}),da=K(null),sa=()=>{const e=Ie(da);if(void 0===e)throw new Error("useChannel must be used within a ChannelProvider");return e},la=K(null);la.displayName="ChannelComponentDataContext";const ca=()=>Ie(la),ua=e=>{const{channelOrPair:t,channelData:n,savePaymentMethod:r,formRef:o,customerDetailsFormRef:i}=e,a=Ne(null),d=at(),{t:s}=d,l=rt(),c=(()=>{const e=Ie(Qe);if(void 0===e)throw new Error("useCustomer must be used within a XenditSessionProvider");return e})(),u=t[0],h=t.length>1,p=qt(t,r),f=p.requires_customer_details&&!c,_=function(e){if(e&&2===e.length)return[e[0],e[1]];return null}(p.instructions),m="OPTIONAL"===l.allow_save_payment_method&&(p.allow_save||h);return Ae(()=>{_||p.form.length||p.banner||console.error(`Missing display data for ${p.channel_code}, this is a bug, please contact support`)},[_,p.banner,p.channel_code,p.form]),ue(da.Provider,{value:p,children:ue(la.Provider,{value:n,children:ue("div",{className:"xendit-payment-channel",ref:a,children:[ue(Vi,{ref:o,form:p.form,onChannelPropertiesChanged:e=>{let t=e;if("CARDS"===u.channel_code&&e.installment_configuration){const n=Object.fromEntries(Object.entries(e.installment_configuration).filter(([e,t])=>""!==t));t=0===Object.keys(n).length?{...e,installment_configuration:void 0}:{...e,installment_configuration:n}}const n=new XenditChannelPropertiesChangedEvent(u.channel_code,t);a.current?.dispatchEvent(n)}}),f&&ue(aa,{ref:i,onChange:e=>{d?.dispatchEvent(new InternalUpdateChannelComponentData(u.channel_code,{customerDetails:e}))},value:n.customerDetails||{given_names:""}}),p.banner?ue(pa,{banner:p.banner}):null,m&&ue(ia,{label:s("payment.save_checkbox_label"),onChange:e=>{const t=e.target?.checked;d?.dispatchEvent(new InternalUpdateChannelComponentData(u.channel_code,{savePaymentMethod:t}))},checked:r}),_?ue("div",{className:"xendit-payment-channel-instructions",children:[ha[p.pm_type??""]??ue(zi,{}),ue("div",{className:"xendit-payment-channel-instructions-text xendit-text-12",children:_.map((e,t)=>ue("p",{className:0===t?"xendit-text-semibold":void 0,children:e},t))})]}):null]})})})},ha={EWALLET:ue(zi,{}),QR_CODE:ue(e=>{const t=Ne(null),n=Ne(null),r=Nt(),o=void 0!==HTMLElement.prototype.animate;return Ae(()=>{if(o&&t.current){const e=()=>{if(!t.current)return;const r=t.current.animate(ea,ta);setTimeout(()=>{n.current?.animate(ra,oa)},1e3),r.onfinish=()=>{const r=t.current?.animate(ea,na);setTimeout(()=>{n.current?.animate(ra,oa)},500),r&&(r.onfinish=e)}};e()}},[o]),ue("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"var(--xendit-color-icon-primary)",xmlns:"http://www.w3.org/2000/svg",...e,children:[ue("g",{"clip-path":`url(#${r})`,children:[ue("rect",{x:"8",y:"8",width:"24",height:"24",fill:"var(--xendit-color-icon-secondary)",ref:n}),ue("path",{d:"M11.5 13.1528C11.5 12.24 12.24 11.5 13.1528 11.5H17.4028C18.3156 11.5 19.0556 12.24 19.0556 13.1528V17.4028C19.0556 18.3156 18.3156 19.0556 17.4028 19.0556H13.1528C12.24 19.0556 11.5 18.3156 11.5 17.4028V13.1528Z"}),ue("path",{d:"M20.9444 13.1528C20.9444 12.24 21.6844 11.5 22.5972 11.5H26.8472C27.76 11.5 28.5 12.24 28.5 13.1528V17.4028C28.5 18.3156 27.76 19.0556 26.8472 19.0556H22.5972C21.6844 19.0556 20.9444 18.3156 20.9444 17.4028V13.1528Z"}),ue("path",{d:"M11.5 22.5972C11.5 21.6844 12.24 20.9444 13.1528 20.9444H17.4028C18.3156 20.9444 19.0556 21.6844 19.0556 22.5972V26.8472C19.0556 27.76 18.3156 28.5 17.4028 28.5H13.1528C12.24 28.5 11.5 27.76 11.5 26.8472V22.5972Z"}),ue("path",{d:"M20.9444 22.5972C20.9444 21.6844 21.6844 20.9444 22.5972 20.9444H26.8472C27.76 20.9444 28.5 21.6844 28.5 22.5972V26.8472C28.5 27.76 27.76 28.5 26.8472 28.5H22.5972C21.6844 28.5 20.9444 27.76 20.9444 26.8472V22.5972Z"}),ue("path",{d:"M7.875 23C8.35825 23 8.75 23.3918 8.75 23.875V30.2754C8.75021 30.6755 9.07451 30.9998 9.47461 31H15.875C16.3582 31 16.75 31.3918 16.75 31.875C16.75 32.3582 16.3582 32.75 15.875 32.75H9.47461C8.10801 32.7498 7.00021 31.642 7 30.2754V23.875C7 23.3918 7.39175 23 7.875 23Z"}),ue("path",{d:"M31.875 23C32.3582 23 32.75 23.3918 32.75 23.875V30.2754C32.7498 31.642 31.642 32.7498 30.2754 32.75H23.875C23.3918 32.75 23 32.3582 23 31.875C23 31.3918 23.3918 31 23.875 31H30.2754C30.6755 30.9998 30.9998 30.6755 31 30.2754V23.875C31 23.3918 31.3918 23 31.875 23Z"}),ue("path",{d:"M15.875 7C16.3582 7 16.75 7.39175 16.75 7.875C16.75 8.35825 16.3582 8.75 15.875 8.75H9.47461C9.07451 8.75021 8.75021 9.07451 8.75 9.47461V15.875C8.75 16.3582 8.35825 16.75 7.875 16.75C7.39175 16.75 7 16.3582 7 15.875V9.47461C7.00021 8.10801 8.10801 7.00021 9.47461 7H15.875Z"}),ue("path",{d:"M30.2754 7C31.642 7.00021 32.7498 8.10801 32.75 9.47461V15.875C32.75 16.3582 32.3582 16.75 31.875 16.75C31.3918 16.75 31 16.3582 31 15.875V9.47461C30.9998 9.07451 30.6755 8.75021 30.2754 8.75H23.875C23.3918 8.75 23 8.35825 23 7.875C23 7.39175 23.3918 7 23.875 7H30.2754Z"}),ue("rect",{x:"3",y:"-4",width:"34",height:"4",rx:"1.75",ref:t})]}),ue("defs",{children:ue("clipPath",{id:r,children:ue("rect",{width:"40",height:"40",fill:"white"})})})]})},{})},pa=e=>{const t="number"==typeof e.banner.aspect_ratio?String(e.banner.aspect_ratio):void 0;return e.banner?.link_url?ue("a",{href:e.banner.link_url,target:"_blank",rel:"noopener noreferrer",children:ue("img",{src:e.banner.image_url,alt:e.banner.alt_text,className:"xendit-payment-channel-banner",style:{aspectRatio:t}})}):ue("img",{src:e.banner.image_url,alt:e.banner.alt_text,className:"xendit-payment-channel-banner",style:{aspectRatio:t}})};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 fa(e){const t=new URLSearchParams;return t.append("payload",JSON.stringify(e)),t}function _a(e,t,n){return async function(...r){let o,i,a,d,s;switch(e){case"GET":[o,i,a,s]=r;break;case"POST":[o,d,i,a,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.23";ct(l),ct(l.startsWith("v"));const c=o.hostId;if(c===gt)throw new Error("A network request was made in mock mode; this is a bug.");const u=$t(c);if(!u)throw new Error(`Unknown hostId ${c} in sdkKey; this is a bug, please contact support.`);const h=new URL(t(i),u);if(n&&!a)throw new Error("Query string argument is missing; this is a bug, please contact support.");const p=n?.(a)??new URLSearchParams;p.set("components_version",l),h.search=p.toString();const f={method:e,body:d?fa(d):void 0,headers:{"Content-Type":"application/x-www-form-urlencoded"},signal:s},_=await fetch(h,f);if(!_.ok){const e=await _.json();if(!e||!e.error_code)throw new Error("Unexpected error response from server");throw new NetworkError(e)}return _.json()}}const ma=_a("GET",e=>`/api/sessions/${e}`),ya=_a("POST",()=>"/api/sessions/payment_tokens"),ba=_a("POST",()=>"/api/sessions/payment_requests"),ga=_a("POST",e=>`/api/sessions/${e.sessionAuthKey}/payment_requests/${e.paymentRequestId}/simulate`),va=_a("GET",e=>`/api/sessions/${e}/poll`,e=>new URLSearchParams(e?{token_request_id:e}:{})),$a=_a("POST",e=>`/api/sessions/${e}/card_info`),xa=_a("POST",e=>`/api/sessions/${e}/payment_options`);function wa(e,t,n){return{impl:e,key:t??"",child:n,instance:void 0}}class BehaviorTree{fn;bb;root=wa(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,Ea(e);const t=this.root??void 0,n=this.fn(this.bb);this.root=n,Ca(t,n,this.bb,0)}}finally{this.updating=!1}}findBehavior(e){return Aa(this.root,e)}}function Ea(e){if(e>32)throw new Error("Max recursion depth exceeded; this is a bug, please contact support.")}function Ca(e,t,n,r){if(Ea(r),function(e,t){return void 0===e||void 0===t||Array.isArray(e)!==Array.isArray(t)||(!Array.isArray(e)||!Array.isArray(t))&&(ht(e),ht(t),e.impl!==t.impl||e.key!==t.key)}(e,t))e&&Pa(e,r+1),t&&ka(t,n,r+1);else if(Array.isArray(e)||Array.isArray(t)){ut(e),ut(t);const o=Math.max(e.length,t.length);for(let i=0;i<o;i++)Ca(e[i],t[i],n,r+1)}else t&&(t.instance=e?.instance),e&&(e.instance=void 0),Ca(e?.child,t?.child,n,r+1),t?.instance?.update?.()}function ka(e,t,n){if(Ea(n),Array.isArray(e))for(const r of e)r&&ka(r,t,n+1);else e.instance=new e.impl(t,e.key),e.instance.enter?.(),e.child&&ka(e.child,t,n+1)}function Pa(e,t){if(Ea(t),Array.isArray(e))for(const n of e)n&&Pa(n,t+1);else e.child&&Pa(e.child,t+1),e.instance?.exit?.(),e.instance=void 0}function Aa(e,t){if(Array.isArray(e))for(const n of e){if(!n)continue;const e=Aa(n,t);if(e)return e}else{if(e.impl===t)return e.instance??null;if(e.child)return Aa(e.child,t)}return null}class ActionCompletedBehavior{bb;constructor(e){this.bb=e}enter(){}}const Na=e=>ue("div",{className:"xendit-redirect-instructions",children:[ue("div",{className:"xendit-redirect-instructions-logo",children:ue("img",{src:e.logoUrl,alt:e.logoAlt})}),ue("div",{className:"xendit-redirect-instructions-text",children:[ue("div",{className:"xendit-text-16",children:e.title}),e.subtitle?ue("div",{className:"xendit-text-14 xendit-text-secondary",children:e.subtitle}):null]}),e.redirectUrl?ue("a",{href:e.redirectUrl,className:"xendit-redirect-instructions-button xendit-text-14",children:e.redirectButtonLabel??""}):null]}),Sa=e=>{const t=e.t,n=e.channel,r=n.brand_name;return ue(Na,{title:t("action_deeplink.title"),subtitle:t("action_deeplink.instructions",{channelName:r}),logoUrl:n.brand_logo_url,logoAlt:t("image_alt.channel_logo",{channelName:r}),redirectUrl:e.redirectUrl,redirectButtonLabel:t("action_deeplink.button",{channelName:r})})},Oa=e=>{const{title:t,onClose:n,children:r,seamless:o,borderColor:i,noCloseButton:a}=e,d=Ne(!1),s=Ne(!1),l=Ne(null),c=Ne(null),u=void 0!==HTMLElement.prototype.animate,h=Te(()=>{d.current||(d.current=!0,n())},[n]),p=Te(()=>{if(!l.current||!c.current||s.current)return;if(s.current=!0,!u)return void h();c.current.animate?.(Ma,Ia);const e=l.current.animate?.(Da,Ia);e.onfinish=h},[h,u]);Ae(()=>{u&&(c.current?.animate?.(Ra,Ta),l.current?.animate?.(La,Ta))},[u]),Ae(()=>{const e=c.current;if(!e)return;const t=e=>{p()};return e.addEventListener(InternalDialogCloseEvent.eventName,t),()=>{e.removeEventListener(InternalDialogCloseEvent.eventName,t)}},[p]);const f=Te(e=>{e.target?.dispatchEvent(new InternalDialogCloseEvent)},[]);return Ae(()=>{e.close&&p()},[e.close,p]),ue("div",{className:"xendit-dialog-backdrop",ref:c,children:ue("div",{className:"xendit-dialog",ref:l,style:i?{border:`4px solid ${i}`}:void 0,children:[a||o?null:ue("div",{className:"xendit-dialog-header xendit-text-16 xendit-text-semibold",children:[t,ue("button",{"aria-label":"Close",onClick:p,children:ue(je,{name:"x",size:20})})]}),ue("div",{className:"xendit-dialog-body",style:e.noPadding?{padding:"0"}:void 0,children:r}),!a&&o?ue("button",{"aria-label":"Close",onClick:f,className:"xendit-dialog-floating-close",children:ue(je,{name:"x",size:20})}):null]})})};class InternalDialogCloseEvent extends Event{static eventName="xendit-internal-dialog-close";constructor(){super(InternalDialogCloseEvent.eventName,{bubbles:!0})}}const Ta={duration:500,easing:"cubic-bezier(.32,.23,0,.92)",fill:"forwards"},Ia={duration:200,easing:"linear",fill:"forwards"},Ra=[{backgroundColor:"rgba(0, 0, 0, 0)"},{backgroundColor:"rgba(0, 0, 0, 0.2)",offset:.1},{backgroundColor:"rgba(0, 0, 0, 0.6)"}],Ma=Ra.slice().reverse(),La=[{opacity:0,transform:"scale(0.98) translateY(-40px) rotateX(15deg)"},{opacity:0,transform:"scale(0.98) translateY(-40px) rotateX(15deg)"},{opacity:1,transform:""}],Da=[{opacity:1,transform:""},{opacity:0,transform:"scale(0.92) translateY(-10px)"}];function Ba(e){const{sdk:t,title:n,onClose:r,width:o,height:i,borderColor:a}=e,d=Ne(null);Ae(()=>{const e=t.createActionContainerComponent(le);return d.current?.replaceChildren(e),()=>{t.destroyComponent(e)}},[t]);const s=e.defaultActionContainerType===qa.QrWithCustomArt;return ue(Oa,{title:n,onClose:r,close:e.close,borderColor:a,noPadding:s,noCloseButton:s,seamless:!0,children:ue("div",{className:"xendit-default-action-container",ref:d,style:{width:o?`calc(min(100vw - 64px, ${o}px))`:"calc(100vw - 64px)",height:i?`calc(min(100vh - 64px, ${i}px))`:void 0}})})}var qa;!function(e){e.QrWithCustomArt="qr-with-custom-art",e.Generic="generic"}(qa||(qa={}));class ContainerActionBehavior{bb;cleanupFn=null;defaultContainerHeight=0;defaultContainerWidth=400;title="Complete your payment";constructor(e){this.bb=e}ensureHasActionContainer(e=qa.Generic){if(ct(this.bb.channel),this.bb.sdk[le].liveComponents.actionContainer)return()=>{this.emptyActionContainer()};let t=!1,n=!1;const r=document.createElement("div");r.setAttribute("class","xendit-default-action-container");const o={sdk:this.bb.sdk,title:this.title,width:this.defaultContainerWidth,height:this.defaultContainerHeight,borderColor:void 0,defaultActionContainerType:e,onClose:()=>{t=!0,V(null,r),r.remove(),n||this.bb.sdk.abortSubmission()}};return V(v(Ba,o),r),document.body.appendChild(r),e=>{e||(n=!0),t||V(v(Ba,{...o,close:!0}),r)}}cleanupActionContainer(e){this.cleanupFn&&(this.cleanupFn(e),this.cleanupFn=null)}emptyActionContainer(){const e=this.bb.sdk[le].liveComponents.actionContainer;e&&V(null,e)}updateActionContainerBrandColor(){ct(this.bb.channel);const e=this.bb.sdk[le].liveComponents.actionContainer;e&&e.style.setProperty("--xendit-channel-brand-color",this.bb.channel.brand_color)}populateActionContainer(e){const t=this.bb.sdk[le].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.");this.updateActionContainerBrandColor(),V(e(),t)}exit(){this.cleanupActionContainer(!1),this.emptyActionContainer()}}class ActionDeepLinkBehavior extends ContainerActionBehavior{bb;actionIndex;constructor(e,t){super(e),this.bb=e,this.actionIndex=t}enter(){ct(this.bb.world);const e=this.bb.world?.paymentEntity?.entity.actions[Number(this.actionIndex)];if(pt(e?.type,"REDIRECT_CUSTOMER"),"DEEPLINK_URL"!==e.descriptor&&"WEB_URL"!==e.descriptor)throw new Error("Unexpected action type in ActionDeepLinkBehavior");const t=this.bb.sdk.t.bind(this.bb.sdk),n=this.bb.channel;ct(n),this.cleanupFn=this.ensureHasActionContainer(),this.populateActionContainer(()=>v(Sa,{t:t,channel:n,redirectUrl:e.value}))}exit(){super.exit()}}const Ua=e=>{const t=e.t,n=e.channel,r=n.brand_name;return ue(Na,{title:t("action_empty_list_push_notification.title"),subtitle:t("action_empty_list_push_notification.subtext",{channelName:r}),logoUrl:n.brand_logo_url,logoAlt:t("image_alt.channel_logo",{channelName:r}),redirectUrl:null,redirectButtonLabel:null})};var ja;function Fa(e){return"payment_request_id"in e?{id:e.payment_request_id,type:ja.PaymentRequest,entity:e}:{id:e.payment_token_id,type:ja.PaymentToken,entity:e}}function Ga(e,t,n){return`${e===ja.PaymentRequest?"payment_request":"payment_token"}_status.${t.toLowerCase()}.${n}`}!function(e){e.PaymentRequest="REQUEST",e.PaymentToken="TOKEN"}(ja||(ja={}));function Va(e,t,n){const{session:r,paymentEntity:o}=e;switch(ct(r),ct(o),ct(t),n){case"PENDING":return Ka(r);case"PENDING_PAYMENT_ENTITY_ONLY":return function(e,t){const n=t.type===ja.PaymentRequest?t.entity:void 0,r=t.type===ja.PaymentToken?t.entity:void 0;return{session:e,payment_request:Ha(n,"PENDING"),payment_token:Ha(r,"PENDING")}}(r,o);case"SUCCESS":return"PENDING"===t._mock_action_type?Ka(r):function(e,t){const n=t.type===ja.PaymentRequest?t.entity:void 0,r=t.type===ja.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:Ha(n,"SUCCEEDED"),payment_token:Ha(r,"ACTIVE"),succeeded_channel:{channel_code:t.entity.channel_code,logo_url:"https://placehold.co/48"}}}(r,o);case"FAILURE":return function(e,t){const n=t.type===ja.PaymentRequest?t.entity:void 0,r=t.type===ja.PaymentToken?t.entity:void 0;return{session:{...e,status:"ACTIVE"},payment_request:Ha(n,"FAILED"),payment_token:Ha(r,"FAILED")}}(r,o)}}function Ka(e){return{session:{...e,status:"PENDING"}}}function Ha(e,t){return e?{...e,status:t}:e}function Wa(e,t){return"PENDING"===t?{payment_request_id:`pr-${At()}`,status:"PENDING",channel_code:e,actions:[],session_token_request_id:At()}:t?{payment_request_id:`pr-${At()}`,status:"REQUIRES_ACTION",channel_code:e,actions:Xa(t),session_token_request_id:At()}:{payment_request_id:`pr-${At()}`,status:"SUCCEEDED",channel_code:e,actions:[],session_token_request_id:At()}}function Xa(e){if(!e)return[];return(Array.isArray(e)?e:[e]).map(e=>function(e){if("PENDING"===e)throw new Error("PENDING mock action type should not generate an action");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"PAYLINK":return{type:"REDIRECT_CUSTOMER",descriptor:"WEB_GOOGLE_PAYLINK",value:"https://example.com/paylink"};case"DEEP_LINK":return{type:"REDIRECT_CUSTOMER",descriptor:"DEEPLINK_URL",value:"mockapp://mock-deep-link"};case"PUSH_NOTIFICATION":return null;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:[{title:"Mobile Banking",content:[{type:"text",text:"Open Mobile App"},{type:"text",text:"Select <b>Mock VA</b>, then select <b>Transfer</b>"},{type:"text",text:"Enter your Virtual Account Number, for example 3816523906568, then press <b>OK</b>"},{type:"text",text:"Click on <b>Send</b> button at the top right corner to proceed"},{type:"text",text:"Click <b>OK</b> to proceed"},{type:"text",text:"Enter your PIN to authorize the transaction"}]},{title:"Internet Banking",content:[{type:"text",text:"Login to the website"},{type:"text",text:"Select <b>Transfer</b>, then select <b>Transfer to Mock VA Virtual Account</b>"},{type:"text",text:"Enter the Virtual Account Number, for example 3816523906568"},{type:"text",text:"Select <b>Continue</b> to proceed your payment"}]},{title:"ATM",content:[{type:"text",text:"Insert your ATM card and PIN"},{type:"text",text:"Enter your ATM PIN"},{type:"text",text:"Select <b>Transfer</b>"},{type:"text",text:"Select <b>To Mock VA Virtual Account</b>"},{type:"text",text:"Enter Virtual Account Number, for example 3816523906568. Press <b>Correct</b> to proceed"},{type:"text",text:"Verify Virtual Account details and then enter amount to be transferred and select <b>Correct</b> to confirm"},{type:"text",text:"Confirm your transaction details displayed"},{type:"text",text:"Select <b>Yes</b> if the details are correct or <b>No</b> if the details are not correct"}]}]}}throw new Error(`Unknown mock action type: ${e}`)}(e)).filter(e=>null!==e)}class ActionEmptyListPushNotificationBehavior extends ContainerActionBehavior{bb;constructor(e){super(e),this.bb=e}enter(){ct(this.bb.world),this.bb.hackyOvoActionLatch=!0;const e=this.bb.sdk.t.bind(this.bb.sdk),t=this.bb.channel;ct(t),this.cleanupFn=this.ensureHasActionContainer(),this.populateActionContainer(()=>v(Ua,{t:e,channel:t})),this.bb.mock&&this.bb.dispatchEvent(new InternalScheduleMockUpdateEvent(Va(this.bb.world,this.bb.channel,"PENDING_PAYMENT_ENTITY_ONLY")))}exit(){this.bb.hackyOvoActionLatch=void 0,super.exit()}}function za(e){const{url:t,channelCode:n,mock:r,onIframeComplete:o}=e,i=Ne(null),a=Te(e=>{if(!i.current)return;const t=i.current.contentWindow;e.source===t&&"xendit-iframe-action-complete"===e.data?.type&&o(e.data)},[o]);if(Ae(()=>(window.addEventListener("message",a),()=>{window.removeEventListener("message",a)}),[a]),r){const e=Ya("CARDS"===n?"a 3DS authentication page":"an authentication page");return ue("iframe",{ref:i,srcDoc:e,className:"xendit-action-iframe"})}return ue("iframe",{ref:i,src:t,className:"xendit-action-iframe"})}const Ya=e=>`\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 ${e}.</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`;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(()=>(ct(this.bb.channel),v(za,{url:this.url,channelCode:this.bb.channel.channel_code,mock:this.bb.mock,onIframeComplete:e=>{this.cleanupActionContainer(!1);const t="success"===e.mockStatus?"SUCCESS":"FAILURE";this.updateMocksOnIframeCompletion(t),this.bb.actionCompleted=!0,this.bb.pollImmediatelyRequested=!0,this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent)}})))}updateMocksOnIframeCompletion(e){ct(this.bb.world?.paymentEntity),this.bb.mock&&this.bb.dispatchEvent(new InternalScheduleMockUpdateEvent(Va(this.bb.world,this.bb.channel,e)))}exit(){super.exit()}}var Qa,Za,Ja={},ed={},td={};function nd(){if(Qa)return td;Qa=1,Object.defineProperty(td,"__esModule",{value:!0});return td.default=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.data=t,this.text=n.text||t,this.options=n},td}function rd(){if(Za)return ed;Za=1,Object.defineProperty(ed,"__esModule",{value:!0}),ed.CODE39=void 0;var e,t=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=nd();var r=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),e=e.toUpperCase(),t.mod43&&(e+=function(e){return o[e]}(function(e){for(var t=0,n=0;n<e.length;n++)t+=d(e[n]);return t%=43}(e))),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:"encode",value:function(){for(var e=a("*"),t=0;t<this.data.length;t++)e+=a(this.data[t])+"0";return{data:e+=a("*"),text:this.text}}},{key:"valid",value:function(){return-1!==this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)}}]),n}(((e=n)&&e.__esModule?e:{default:e}).default),o=["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","-","."," ","$","/","+","%","*"],i=[20957,29783,23639,30485,20951,29813,23669,20855,29789,23645,29975,23831,30533,22295,30149,24005,21623,29981,23837,22301,30023,23879,30545,22343,30161,24017,21959,30065,23921,22385,29015,18263,29141,17879,29045,18293,17783,29021,18269,17477,17489,17681,20753,35770];function a(e){return function(e){return i[e].toString(2)}(d(e))}function d(e){return o.indexOf(e)}return ed.CODE39=r,ed}var od,id,ad={},dd={},sd={},ld={};function cd(){if(od)return ld;var e;function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}od=1,Object.defineProperty(ld,"__esModule",{value:!0});var n=ld.SET_A=0,r=ld.SET_B=1,o=ld.SET_C=2;ld.SHIFT=98;var i=ld.START_A=103,a=ld.START_B=104,d=ld.START_C=105;return ld.MODULO=103,ld.STOP=106,ld.FNC1=207,ld.SET_BY_CODE=(t(e={},i,n),t(e,a,r),t(e,d,o),e),ld.SWAP={101:n,100:r,99:o},ld.A_START_CHAR=String.fromCharCode(208),ld.B_START_CHAR=String.fromCharCode(209),ld.C_START_CHAR=String.fromCharCode(210),ld.A_CHARS="[\0-_È-Ï]",ld.B_CHARS="[ -È-Ï]",ld.C_CHARS="(Ï*[0-9]{2}Ï*)",ld.BARS=[11011001100,11001101100,11001100110,10010011e3,10010001100,10001001100,10011001e3,10011000100,10001100100,11001001e3,11001000100,11000100100,10110011100,10011011100,10011001110,10111001100,10011101100,10011100110,11001110010,11001011100,11001001110,11011100100,11001110100,11101101110,11101001100,11100101100,11100100110,11101100100,11100110100,11100110010,11011011e3,11011000110,11000110110,10100011e3,10001011e3,10001000110,10110001e3,10001101e3,10001100010,11010001e3,11000101e3,11000100010,10110111e3,10110001110,10001101110,10111011e3,10111000110,10001110110,11101110110,11010001110,11000101110,11011101e3,11011100010,11011101110,11101011e3,11101000110,11100010110,11101101e3,11101100010,11100011010,11101111010,11001000010,11110001010,1010011e4,10100001100,1001011e4,10010000110,10000101100,10000100110,1011001e4,10110000100,1001101e4,10011000010,10000110100,10000110010,11000010010,1100101e4,11110111010,11000010100,10001111010,10100111100,10010111100,10010011110,10111100100,10011110100,10011110010,11110100100,11110010100,11110010010,11011011110,11011110110,11110110110,10101111e3,10100011110,10001011110,10111101e3,10111100010,11110101e3,11110100010,10111011110,10111101110,11101011110,11110101110,11010000100,1101001e4,11010011100,1100011101011],ld}function ud(){if(id)return sd;id=1,Object.defineProperty(sd,"__esModule",{value:!0});var e,t=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=nd(),r=(e=n)&&e.__esModule?e:{default:e},o=cd();var i=function(e){function n(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e.substring(1),t));return r.bytes=e.split("").map(function(e){return e.charCodeAt(0)}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var e=this.bytes,t=e.shift()-105,r=o.SET_BY_CODE[t];if(void 0===r)throw new RangeError("The encoding does not start with a start character.");!0===this.shouldEncodeAsEan128()&&e.unshift(o.FNC1);var i=n.next(e,1,r);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:n.getBar(t)+i.result+n.getBar((i.checksum+t)%o.MODULO)+n.getBar(o.STOP)}}},{key:"shouldEncodeAsEan128",value:function(){var e=this.options.ean128||!1;return"string"==typeof e&&(e="true"===e.toLowerCase()),e}}],[{key:"getBar",value:function(e){return o.BARS[e]?o.BARS[e].toString():""}},{key:"correctIndex",value:function(e,t){if(t===o.SET_A){var n=e.shift();return n<32?n+64:n-32}return t===o.SET_B?e.shift()-32:10*(e.shift()-48)+e.shift()-48}},{key:"next",value:function(e,t,r){if(!e.length)return{result:"",checksum:0};var i=void 0,a=void 0;if(e[0]>=200){a=e.shift()-105;var d=o.SWAP[a];void 0!==d?i=n.next(e,t+1,d):(r!==o.SET_A&&r!==o.SET_B||a!==o.SHIFT||(e[0]=r===o.SET_A?e[0]>95?e[0]-96:e[0]:e[0]<32?e[0]+96:e[0]),i=n.next(e,t+1,r))}else a=n.correctIndex(e,r),i=n.next(e,t+1,r);var s=a*t;return{result:n.getBar(a)+i.result,checksum:s+i.checksum}}}]),n}(r.default);return sd.default=i,sd}var hd,pd,fd={};function _d(){if(pd)return dd;pd=1,Object.defineProperty(dd,"__esModule",{value:!0});var e=n(ud()),t=n(function(){if(hd)return fd;hd=1,Object.defineProperty(fd,"__esModule",{value:!0});var e=cd(),t=function(t){return t.match(new RegExp("^"+e.A_CHARS+"*"))[0].length},n=function(t){return t.match(new RegExp("^"+e.B_CHARS+"*"))[0].length},r=function(t){return t.match(new RegExp("^"+e.C_CHARS+"*"))[0]};function o(t,n){var r=n?e.A_CHARS:e.B_CHARS,a=t.match(new RegExp("^("+r+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(a)return a[1]+String.fromCharCode(204)+i(t.substring(a[1].length));var d=t.match(new RegExp("^"+r+"+"))[0];return d.length===t.length?t:d+String.fromCharCode(n?205:206)+o(t.substring(d.length),!n)}function i(e){var i=r(e),a=i.length;if(a===e.length)return e;e=e.substring(a);var d=t(e)>=n(e);return i+String.fromCharCode(d?206:205)+o(e,d)}return fd.default=function(a){var d=void 0;if(r(a).length>=2)d=e.C_START_CHAR+i(a);else{var s=t(a)>n(a);d=(s?e.A_START_CHAR:e.B_START_CHAR)+o(a,s)}return d.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(e,t){return String.fromCharCode(203)+t})},fd}());function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var o=function(e){function n(e,o){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),/^[\x00-\x7F\xC8-\xD3]+$/.test(e))var i=r(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,(0,t.default)(e),o));else i=r(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,o));return r(i)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),n}(e.default);return dd.default=o,dd}var md,yd={};function bd(){if(md)return yd;md=1,Object.defineProperty(yd,"__esModule",{value:!0});var e,t=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=ud(),r=(e=n)&&e.__esModule?e:{default:e},o=cd();var i=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,o.A_START_CHAR+e,t))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:"valid",value:function(){return new RegExp("^"+o.A_CHARS+"+$").test(this.data)}}]),n}(r.default);return yd.default=i,yd}var gd,vd={};function $d(){if(gd)return vd;gd=1,Object.defineProperty(vd,"__esModule",{value:!0});var e,t=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=ud(),r=(e=n)&&e.__esModule?e:{default:e},o=cd();var i=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,o.B_START_CHAR+e,t))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:"valid",value:function(){return new RegExp("^"+o.B_CHARS+"+$").test(this.data)}}]),n}(r.default);return vd.default=i,vd}var xd,wd,Ed={};function Cd(){if(xd)return Ed;xd=1,Object.defineProperty(Ed,"__esModule",{value:!0});var e,t=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=ud(),r=(e=n)&&e.__esModule?e:{default:e},o=cd();var i=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,o.C_START_CHAR+e,t))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:"valid",value:function(){return new RegExp("^"+o.C_CHARS+"+$").test(this.data)}}]),n}(r.default);return Ed.default=i,Ed}var kd,Pd={},Ad={},Nd={};function Sd(){return kd||(kd=1,Object.defineProperty(Nd,"__esModule",{value:!0}),Nd.SIDE_BIN="101",Nd.MIDDLE_BIN="01010",Nd.BINARIES={L:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],G:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"],R:["1110010","1100110","1101100","1000010","1011100","1001110","1010000","1000100","1001000","1110100"],O:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],E:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"]},Nd.EAN2_STRUCTURE=["LL","LG","GL","GG"],Nd.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],Nd.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"]),Nd}var Od,Td,Id,Rd={},Md={};function Ld(){if(Od)return Md;Od=1,Object.defineProperty(Md,"__esModule",{value:!0});var e=Sd();return Md.default=function(t,n,r){var o=t.split("").map(function(t,r){return e.BINARIES[n[r]]}).map(function(e,n){return e?e[t[n]]:""});if(r){var i=t.length-1;o=o.map(function(e,t){return t<i?e+r:e})}return o.join("")},Md}function Dd(){if(Td)return Rd;Td=1,Object.defineProperty(Rd,"__esModule",{value:!0});var e=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t=Sd(),n=r(Ld());function r(e){return e&&e.__esModule?e:{default:e}}var o=function(r){function o(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,e,t));return n.fontSize=!t.flat&&t.fontSize>10*t.width?10*t.width:t.fontSize,n.guardHeight=t.height+n.fontSize/2+t.textMargin,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,r),e(o,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(e,t){return this.text.substr(e,t)}},{key:"leftEncode",value:function(e,t){return(0,n.default)(e,t)}},{key:"rightText",value:function(e,t){return this.text.substr(e,t)}},{key:"rightEncode",value:function(e,t){return(0,n.default)(e,t)}},{key:"encodeGuarded",value:function(){var e={fontSize:this.fontSize},n={height:this.guardHeight};return[{data:t.SIDE_BIN,options:n},{data:this.leftEncode(),text:this.leftText(),options:e},{data:t.MIDDLE_BIN,options:n},{data:this.rightEncode(),text:this.rightText(),options:e},{data:t.SIDE_BIN,options:n}]}},{key:"encodeFlat",value:function(){return{data:[t.SIDE_BIN,this.leftEncode(),t.MIDDLE_BIN,this.rightEncode(),t.SIDE_BIN].join(""),text:this.text}}}]),o}(r(nd()).default);return Rd.default=o,Rd}function Bd(){if(Id)return Ad;Id=1,Object.defineProperty(Ad,"__esModule",{value:!0});var e,t=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},r=Sd(),o=Dd(),i=(e=o)&&e.__esModule?e:{default:e};var a=function(e){var t=e.substr(0,12).split("").map(function(e){return+e}).reduce(function(e,t,n){return n%2?e+3*t:e+t},0);return(10-t%10)%10},d=function(e){function o(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),-1!==e.search(/^[0-9]{12}$/)&&(e+=a(e));var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,e,t));return n.lastChar=t.lastChar,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,e),t(o,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{13}$/)&&+this.data[12]===a(this.data)}},{key:"leftText",value:function(){return n(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var e=this.data.substr(1,6),t=r.EAN13_STRUCTURE[this.data[0]];return n(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"leftEncode",this).call(this,e,t)}},{key:"rightText",value:function(){return n(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var e=this.data.substr(7,6);return n(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"rightEncode",this).call(this,e,"RRRRRR")}},{key:"encodeGuarded",value:function(){var e=n(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(e.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(e.push({data:"00"}),e.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),e}}]),o}(i.default);return Ad.default=d,Ad}var qd,Ud={};function jd(){if(qd)return Ud;qd=1,Object.defineProperty(Ud,"__esModule",{value:!0});var e,t=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},r=Dd(),o=(e=r)&&e.__esModule?e:{default:e};var i=function(e){var t=e.substr(0,7).split("").map(function(e){return+e}).reduce(function(e,t,n){return n%2?e+t:e+3*t},0);return(10-t%10)%10},a=function(e){function r(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),-1!==e.search(/^[0-9]{7}$/)&&(e+=i(e)),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,e),t(r,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{8}$/)&&+this.data[7]===i(this.data)}},{key:"leftText",value:function(){return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"leftText",this).call(this,0,4)}},{key:"leftEncode",value:function(){var e=this.data.substr(0,4);return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"leftEncode",this).call(this,e,"LLLL")}},{key:"rightText",value:function(){return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"rightText",this).call(this,4,4)}},{key:"rightEncode",value:function(){var e=this.data.substr(4,4);return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"rightEncode",this).call(this,e,"RRRR")}}]),r}(o.default);return Ud.default=a,Ud}var Fd,Gd={};function Vd(){if(Fd)return Gd;Fd=1,Object.defineProperty(Gd,"__esModule",{value:!0});var e=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t=Sd(),n=o(Ld()),r=o(nd());function o(e){return e&&e.__esModule?e:{default:e}}var i=function(r){function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,e,t))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,r),e(o,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{5}$/)}},{key:"encode",value:function(){var e=t.EAN5_STRUCTURE[function(e){var t=e.split("").map(function(e){return+e}).reduce(function(e,t,n){return n%2?e+9*t:e+3*t},0);return t%10}(this.data)];return{data:"1011"+(0,n.default)(this.data,e,"01"),text:this.text}}}]),o}(r.default);return Gd.default=i,Gd}var Kd,Hd={};function Wd(){if(Kd)return Hd;Kd=1,Object.defineProperty(Hd,"__esModule",{value:!0});var e=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t=Sd(),n=r(Ld());function r(e){return e&&e.__esModule?e:{default:e}}var o=function(r){function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,e,t))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,r),e(o,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{2}$/)}},{key:"encode",value:function(){var e=t.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,n.default)(this.data,e,"01"),text:this.text}}}]),o}(r(nd()).default);return Hd.default=o,Hd}var Xd,zd={};function Yd(){if(Xd)return zd;Xd=1,Object.defineProperty(zd,"__esModule",{value:!0});var e=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();zd.checksum=o;var t=n(Ld());function n(e){return e&&e.__esModule?e:{default:e}}var r=function(n){function r(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),-1!==e.search(/^[0-9]{11}$/)&&(e+=o(e));var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t));return n.displayValue=t.displayValue,t.fontSize>10*t.width?n.fontSize=10*t.width:n.fontSize=t.fontSize,n.guardHeight=t.height+n.fontSize/2+t.textMargin,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,n),e(r,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{12}$/)&&this.data[11]==o(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var e="";return e+="101",e+=(0,t.default)(this.data.substr(0,6),"LLLLLL"),e+="01010",e+=(0,t.default)(this.data.substr(6,6),"RRRRRR"),{data:e+="101",text:this.text}}},{key:"guardedEncoding",value:function(){var e=[];return this.displayValue&&e.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),e.push({data:"101"+(0,t.default)(this.data[0],"L"),options:{height:this.guardHeight}}),e.push({data:(0,t.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),e.push({data:"01010",options:{height:this.guardHeight}}),e.push({data:(0,t.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),e.push({data:(0,t.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&e.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),e}}]),r}(n(nd()).default);function o(e){var t,n=0;for(t=1;t<11;t+=2)n+=parseInt(e[t]);for(t=0;t<11;t+=2)n+=3*parseInt(e[t]);return(10-n%10)%10}return zd.default=r,zd}var Qd,Zd,Jd={};function es(){if(Qd)return Jd;Qd=1,Object.defineProperty(Jd,"__esModule",{value:!0});var e=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t=o(Ld()),n=o(nd()),r=Yd();function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var a=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],d=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]],s=function(n){function r(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);var n=i(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t));if(n.isValid=!1,-1!==e.search(/^[0-9]{6}$/))n.middleDigits=e,n.upcA=l(e,"0"),n.text=t.text||""+n.upcA[0]+e+n.upcA[n.upcA.length-1],n.isValid=!0;else{if(-1===e.search(/^[01][0-9]{7}$/))return i(n);if(n.middleDigits=e.substring(1,e.length-1),n.upcA=l(n.middleDigits,e[0]),n.upcA[n.upcA.length-1]!==e[e.length-1])return i(n);n.isValid=!0}return n.displayValue=t.displayValue,t.fontSize>10*t.width?n.fontSize=10*t.width:n.fontSize=t.fontSize,n.guardHeight=t.height+n.fontSize/2+t.textMargin,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,n),e(r,[{key:"valid",value:function(){return this.isValid}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var e="";return e+="101",e+=this.encodeMiddleDigits(),{data:e+="010101",text:this.text}}},{key:"guardedEncoding",value:function(){var e=[];return this.displayValue&&e.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),e.push({data:"101",options:{height:this.guardHeight}}),e.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),e.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&e.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),e}},{key:"encodeMiddleDigits",value:function(){var e=this.upcA[0],n=this.upcA[this.upcA.length-1],r=d[parseInt(n)][parseInt(e)];return(0,t.default)(this.middleDigits,r)}}]),r}(n.default);function l(e,t){for(var n=parseInt(e[e.length-1]),o=a[n],i="",d=0,s=0;s<o.length;s++){var l=o[s];i+="X"===l?e[d++]:l}return""+(i=""+t+i)+(0,r.checksum)(i)}return Jd.default=s,Jd}var ts,ns,rs={},os={},is={};function as(){if(ns)return os;ns=1,Object.defineProperty(os,"__esModule",{value:!0});var e,t=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(ts||(ts=1,Object.defineProperty(is,"__esModule",{value:!0}),is.START_BIN="1010",is.END_BIN="11101",is.BINARIES=["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"]),is),r=nd();var o=function(e){function r(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,e),t(r,[{key:"valid",value:function(){return-1!==this.data.search(/^([0-9]{2})+$/)}},{key:"encode",value:function(){var e=this,t=this.data.match(/.{2}/g).map(function(t){return e.encodePair(t)}).join("");return{data:n.START_BIN+t+n.END_BIN,text:this.text}}},{key:"encodePair",value:function(e){var t=n.BINARIES[e[1]];return n.BINARIES[e[0]].split("").map(function(e,n){return("1"===e?"111":"1")+("1"===t[n]?"000":"0")}).join("")}}]),r}(((e=r)&&e.__esModule?e:{default:e}).default);return os.default=o,os}var ds,ss,ls={};function cs(){if(ds)return ls;ds=1,Object.defineProperty(ls,"__esModule",{value:!0});var e,t=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=as(),r=(e=n)&&e.__esModule?e:{default:e};var o=function(e){var t=e.substr(0,13).split("").map(function(e){return parseInt(e,10)}).reduce(function(e,t,n){return e+t*(3-n%2*2)},0);return 10*Math.ceil(t/10)-t},i=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),-1!==e.search(/^[0-9]{13}$/)&&(e+=o(e)),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{14}$/)&&+this.data[13]===o(this.data)}}]),n}(r.default);return ls.default=i,ls}var us,hs={},ps={};function fs(){if(us)return ps;us=1,Object.defineProperty(ps,"__esModule",{value:!0});var e,t=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=nd();var r=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:"encode",value:function(){for(var e="110",t=0;t<this.data.length;t++){var n=parseInt(this.data[t]).toString(2);n=o(n,4-n.length);for(var r=0;r<n.length;r++)e+="0"==n[r]?"100":"110"}return{data:e+="1001",text:this.text}}},{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]+$/)}}]),n}(((e=n)&&e.__esModule?e:{default:e}).default);function o(e,t){for(var n=0;n<t;n++)e="0"+e;return e}return ps.default=r,ps}var _s,ms,ys={},bs={};function gs(){if(_s)return bs;return _s=1,Object.defineProperty(bs,"__esModule",{value:!0}),bs.mod10=function(e){for(var t=0,n=0;n<e.length;n++){var r=parseInt(e[n]);(n+e.length)%2==0?t+=r:t+=2*r%10+Math.floor(2*r/10)}return(10-t%10)%10},bs.mod11=function(e){for(var t=0,n=[2,3,4,5,6,7],r=0;r<e.length;r++){var o=parseInt(e[e.length-1-r]);t+=n[r%n.length]*o}return(11-t%11)%11},bs}function vs(){if(ms)return ys;ms=1,Object.defineProperty(ys,"__esModule",{value:!0});var e,t=fs(),n=(e=t)&&e.__esModule?e:{default:e},r=gs();var o=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e+(0,r.mod10)(e),n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(n.default);return ys.default=o,ys}var $s,xs={};function ws(){if($s)return xs;$s=1,Object.defineProperty(xs,"__esModule",{value:!0});var e,t=fs(),n=(e=t)&&e.__esModule?e:{default:e},r=gs();var o=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e+(0,r.mod11)(e),n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(n.default);return xs.default=o,xs}var Es,Cs={};function ks(){if(Es)return Cs;Es=1,Object.defineProperty(Cs,"__esModule",{value:!0});var e,t=fs(),n=(e=t)&&e.__esModule?e:{default:e},r=gs();var o=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e+=(0,r.mod10)(e),e+=(0,r.mod10)(e),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(n.default);return Cs.default=o,Cs}var Ps,As,Ns={};function Ss(){if(Ps)return Ns;Ps=1,Object.defineProperty(Ns,"__esModule",{value:!0});var e,t=fs(),n=(e=t)&&e.__esModule?e:{default:e},r=gs();var o=function(e){function t(e,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e+=(0,r.mod11)(e),e+=(0,r.mod10)(e),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(n.default);return Ns.default=o,Ns}var Os,Ts={};function Is(){if(Os)return Ts;Os=1,Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.pharmacode=void 0;var e,t=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=nd();var r=function(e){function n(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t));return r.number=parseInt(e,10),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:"encode",value:function(){for(var e=this.number,t="";!isNaN(e)&&0!=e;)e%2==0?(t="11100"+t,e=(e-2)/2):(t="100"+t,e=(e-1)/2);return{data:t=t.slice(0,-2),text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),n}(((e=n)&&e.__esModule?e:{default:e}).default);return Ts.pharmacode=r,Ts}var Rs,Ms={};function Ls(){if(Rs)return Ms;Rs=1,Object.defineProperty(Ms,"__esModule",{value:!0}),Ms.codabar=void 0;var e,t=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=nd();var r=function(e){function n(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),0===e.search(/^[0-9\-\$\:\.\+\/]+$/)&&(e="A"+e+"A");var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e.toUpperCase(),t));return r.text=r.options.text||r.text.replace(/[A-D]/g,""),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:"valid",value:function(){return-1!==this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)}},{key:"encode",value:function(){for(var e=[],t=this.getEncodings(),n=0;n<this.data.length;n++)e.push(t[this.data.charAt(n)]),n!==this.data.length-1&&e.push("0");return{text:this.text,data:e.join("")}}},{key:"getEncodings",value:function(){return{0:"101010011",1:"101011001",2:"101001011",3:"110010101",4:"101101001",5:"110101001",6:"100101011",7:"100101101",8:"100110101",9:"110100101","-":"101001101",$:"101100101",":":"1101011011","/":"1101101011",".":"1101101101","+":"1011011011",A:"1011001001",B:"1001001011",C:"1010010011",D:"1010011001"}}}]),n}(((e=n)&&e.__esModule?e:{default:e}).default);return Ms.codabar=r,Ms}var Ds,Bs,qs={},Us={},js={};function Fs(){if(Bs)return Us;Bs=1,Object.defineProperty(Us,"__esModule",{value:!0});var e,t=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(Ds||(Ds=1,Object.defineProperty(js,"__esModule",{value:!0}),js.SYMBOLS=["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","-","."," ","$","/","+","%","($)","(%)","(/)","(+)","ÿ"],js.BINARIES=["100010100","101001000","101000100","101000010","100101000","100100100","100100010","101010000","100010010","100001010","110101000","110100100","110100010","110010100","110010010","110001010","101101000","101100100","101100010","100110100","100011010","101011000","101001100","101000110","100101100","100010110","110110100","110110010","110101100","110100110","110010110","110011010","101101100","101100110","100110110","100111010","100101110","111010100","111010010","111001010","101101110","101110110","110101110","100100110","111011010","111010110","100110010","101011110"],js.MULTI_SYMBOLS={"\0":["(%)","U"],"":["($)","A"],"":["($)","B"],"":["($)","C"],"":["($)","D"],"":["($)","E"],"":["($)","F"],"":["($)","G"],"\b":["($)","H"],"\t":["($)","I"],"\n":["($)","J"],"\v":["($)","K"],"\f":["($)","L"],"\r":["($)","M"],"":["($)","N"],"":["($)","O"],"":["($)","P"],"":["($)","Q"],"":["($)","R"],"":["($)","S"],"":["($)","T"],"":["($)","U"],"":["($)","V"],"":["($)","W"],"":["($)","X"],"":["($)","Y"],"":["($)","Z"],"":["(%)","A"],"":["(%)","B"],"":["(%)","C"],"":["(%)","D"],"":["(%)","E"],"!":["(/)","A"],'"':["(/)","B"],"#":["(/)","C"],"&":["(/)","F"],"'":["(/)","G"],"(":["(/)","H"],")":["(/)","I"],"*":["(/)","J"],",":["(/)","L"],":":["(/)","Z"],";":["(%)","F"],"<":["(%)","G"],"=":["(%)","H"],">":["(%)","I"],"?":["(%)","J"],"@":["(%)","V"],"[":["(%)","K"],"\\":["(%)","L"],"]":["(%)","M"],"^":["(%)","N"],_:["(%)","O"],"`":["(%)","W"],a:["(+)","A"],b:["(+)","B"],c:["(+)","C"],d:["(+)","D"],e:["(+)","E"],f:["(+)","F"],g:["(+)","G"],h:["(+)","H"],i:["(+)","I"],j:["(+)","J"],k:["(+)","K"],l:["(+)","L"],m:["(+)","M"],n:["(+)","N"],o:["(+)","O"],p:["(+)","P"],q:["(+)","Q"],r:["(+)","R"],s:["(+)","S"],t:["(+)","T"],u:["(+)","U"],v:["(+)","V"],w:["(+)","W"],x:["(+)","X"],y:["(+)","Y"],z:["(+)","Z"],"{":["(%)","P"],"|":["(%)","Q"],"}":["(%)","R"],"~":["(%)","S"],"":["(%)","T"]}),js),r=nd();var o=function(e){function r(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,e),t(r,[{key:"valid",value:function(){return/^[0-9A-Z\-. $/+%]+$/.test(this.data)}},{key:"encode",value:function(){var e=this.data.split("").flatMap(function(e){return n.MULTI_SYMBOLS[e]||e}),t=e.map(function(e){return r.getEncoding(e)}).join(""),o=r.checksum(e,20),i=r.checksum(e.concat(o),15);return{text:this.text,data:r.getEncoding("ÿ")+t+r.getEncoding(o)+r.getEncoding(i)+r.getEncoding("ÿ")+"1"}}}],[{key:"getEncoding",value:function(e){return n.BINARIES[r.symbolValue(e)]}},{key:"getSymbol",value:function(e){return n.SYMBOLS[e]}},{key:"symbolValue",value:function(e){return n.SYMBOLS.indexOf(e)}},{key:"checksum",value:function(e,t){var n=e.slice().reverse().reduce(function(e,n,o){var i=o%t+1;return e+r.symbolValue(n)*i},0);return r.getSymbol(n%47)}}]),r}(((e=r)&&e.__esModule?e:{default:e}).default);return Us.default=o,Us}var Gs,Vs,Ks={};function Hs(){if(Gs)return Ks;Gs=1,Object.defineProperty(Ks,"__esModule",{value:!0});var e,t=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=Fs();var r=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:"valid",value:function(){return/^[\x00-\x7f]+$/.test(this.data)}}]),n}(((e=n)&&e.__esModule?e:{default:e}).default);return Ks.default=r,Ks}var Ws,Xs,zs={};function Ys(){if(Ws)return zs;Ws=1,Object.defineProperty(zs,"__esModule",{value:!0}),zs.GenericBarcode=void 0;var e,t=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=nd();var r=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),n}(((e=n)&&e.__esModule?e:{default:e}).default);return zs.GenericBarcode=r,zs}function Qs(){if(Xs)return Ja;Xs=1,Object.defineProperty(Ja,"__esModule",{value:!0});var e=rd(),t=function(){if(wd)return ad;wd=1,Object.defineProperty(ad,"__esModule",{value:!0}),ad.CODE128C=ad.CODE128B=ad.CODE128A=ad.CODE128=void 0;var e=o(_d()),t=o(bd()),n=o($d()),r=o(Cd());function o(e){return e&&e.__esModule?e:{default:e}}return ad.CODE128=e.default,ad.CODE128A=t.default,ad.CODE128B=n.default,ad.CODE128C=r.default,ad}(),n=function(){if(Zd)return Pd;Zd=1,Object.defineProperty(Pd,"__esModule",{value:!0}),Pd.UPCE=Pd.UPC=Pd.EAN2=Pd.EAN5=Pd.EAN8=Pd.EAN13=void 0;var e=a(Bd()),t=a(jd()),n=a(Vd()),r=a(Wd()),o=a(Yd()),i=a(es());function a(e){return e&&e.__esModule?e:{default:e}}return Pd.EAN13=e.default,Pd.EAN8=t.default,Pd.EAN5=n.default,Pd.EAN2=r.default,Pd.UPC=o.default,Pd.UPCE=i.default,Pd}(),r=function(){if(ss)return rs;ss=1,Object.defineProperty(rs,"__esModule",{value:!0}),rs.ITF14=rs.ITF=void 0;var e=n(as()),t=n(cs());function n(e){return e&&e.__esModule?e:{default:e}}return rs.ITF=e.default,rs.ITF14=t.default,rs}(),o=function(){if(As)return hs;As=1,Object.defineProperty(hs,"__esModule",{value:!0}),hs.MSI1110=hs.MSI1010=hs.MSI11=hs.MSI10=hs.MSI=void 0;var e=i(fs()),t=i(vs()),n=i(ws()),r=i(ks()),o=i(Ss());function i(e){return e&&e.__esModule?e:{default:e}}return hs.MSI=e.default,hs.MSI10=t.default,hs.MSI11=n.default,hs.MSI1010=r.default,hs.MSI1110=o.default,hs}(),i=Is(),a=Ls(),d=function(){if(Vs)return qs;Vs=1,Object.defineProperty(qs,"__esModule",{value:!0}),qs.CODE93FullASCII=qs.CODE93=void 0;var e=n(Fs()),t=n(Hs());function n(e){return e&&e.__esModule?e:{default:e}}return qs.CODE93=e.default,qs.CODE93FullASCII=t.default,qs}(),s=Ys();return Ja.default={CODE39:e.CODE39,CODE128:t.CODE128,CODE128A:t.CODE128A,CODE128B:t.CODE128B,CODE128C:t.CODE128C,EAN13:n.EAN13,EAN8:n.EAN8,EAN5:n.EAN5,EAN2:n.EAN2,UPC:n.UPC,UPCE:n.UPCE,ITF14:r.ITF14,ITF:r.ITF,MSI:o.MSI,MSI10:o.MSI10,MSI11:o.MSI11,MSI1010:o.MSI1010,MSI1110:o.MSI1110,pharmacode:i.pharmacode,codabar:a.codabar,CODE93:d.CODE93,CODE93FullASCII:d.CODE93FullASCII,GenericBarcode:s.GenericBarcode},Ja}var Zs,Js={};function el(){if(Zs)return Js;Zs=1,Object.defineProperty(Js,"__esModule",{value:!0});var e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};return Js.default=function(t,n){return e({},t,n)},Js}var tl,nl={};var rl,ol={};var il,al={},dl={},sl={};function ll(){if(il)return sl;return il=1,Object.defineProperty(sl,"__esModule",{value:!0}),sl.default=function(e){var t=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var n in t)t.hasOwnProperty(n)&&"string"==typeof e[n=t[n]]&&(e[n]=parseInt(e[n],10));"string"==typeof e.displayValue&&(e.displayValue="false"!=e.displayValue);return e},sl}var cl,ul,hl={};function pl(){if(cl)return hl;cl=1,Object.defineProperty(hl,"__esModule",{value:!0});var e={width:2,height:100,format:"auto",displayValue:!0,fontOptions:"",font:"monospace",text:void 0,textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:20,background:"#ffffff",lineColor:"#000000",margin:10,marginTop:void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,valid:function(){}};return hl.default=e,hl}var fl,_l,ml={},yl={},bl={};function gl(){if(fl)return bl;fl=1,Object.defineProperty(bl,"__esModule",{value:!0}),bl.getTotalWidthOfEncodings=bl.calculateEncodingAttributes=bl.getBarcodePadding=bl.getEncodingHeight=bl.getMaximumHeightOfEncodings=void 0;var e,t=el(),n=(e=t)&&e.__esModule?e:{default:e};function r(e,t){return t.height+(t.displayValue&&e.text.length>0?t.fontSize+t.textMargin:0)+t.marginTop+t.marginBottom}function o(e,t,n){if(n.displayValue&&t<e){if("center"==n.textAlign)return Math.floor((e-t)/2);if("left"==n.textAlign)return 0;if("right"==n.textAlign)return Math.floor(e-t)}return 0}function i(e,t,n){var r;if(n)r=n;else{if("undefined"==typeof document)return 0;r=document.createElement("canvas").getContext("2d")}r.font=t.fontOptions+" "+t.fontSize+"px "+t.font;var o=r.measureText(e);return o?o.width:0}return bl.getMaximumHeightOfEncodings=function(e){for(var t=0,n=0;n<e.length;n++)e[n].height>t&&(t=e[n].height);return t},bl.getEncodingHeight=r,bl.getBarcodePadding=o,bl.calculateEncodingAttributes=function(e,t,a){for(var d=0;d<e.length;d++){var s,l=e[d],c=(0,n.default)(t,l.options);s=c.displayValue?i(l.text,c,a):0;var u=l.data.length*c.width;l.width=Math.ceil(Math.max(s,u)),l.height=r(l,c),l.barcodePadding=o(s,u,c)}},bl.getTotalWidthOfEncodings=function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n].width;return t},bl}function vl(){if(_l)return yl;_l=1,Object.defineProperty(yl,"__esModule",{value:!0});var e,t=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=el(),r=(e=n)&&e.__esModule?e:{default:e},o=gl();var i=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.canvas=t,this.encodings=n,this.options=r}return t(e,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var e=0;e<this.encodings.length;e++){var t=(0,r.default)(this.options,this.encodings[e].options);this.drawCanvasBarcode(t,this.encodings[e]),this.drawCanvasText(t,this.encodings[e]),this.moveCanvasDrawing(this.encodings[e])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var e=this.canvas.getContext("2d");e.save(),(0,o.calculateEncodingAttributes)(this.encodings,this.options,e);var t=(0,o.getTotalWidthOfEncodings)(this.encodings),n=(0,o.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=t+this.options.marginLeft+this.options.marginRight,this.canvas.height=n,e.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(e.fillStyle=this.options.background,e.fillRect(0,0,this.canvas.width,this.canvas.height)),e.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(e,t){var n,r=this.canvas.getContext("2d"),o=t.data;n="top"==e.textPosition?e.marginTop+e.fontSize+e.textMargin:e.marginTop,r.fillStyle=e.lineColor;for(var i=0;i<o.length;i++){var a=i*e.width+t.barcodePadding;"1"===o[i]?r.fillRect(a,n,e.width,e.height):o[i]&&r.fillRect(a,n,e.width,e.height*o[i])}}},{key:"drawCanvasText",value:function(e,t){var n,r,o=this.canvas.getContext("2d"),i=e.fontOptions+" "+e.fontSize+"px "+e.font;e.displayValue&&(r="top"==e.textPosition?e.marginTop+e.fontSize-e.textMargin:e.height+e.textMargin+e.marginTop+e.fontSize,o.font=i,"left"==e.textAlign||t.barcodePadding>0?(n=0,o.textAlign="left"):"right"==e.textAlign?(n=t.width-1,o.textAlign="right"):(n=t.width/2,o.textAlign="center"),o.fillText(t.text,n,r))}},{key:"moveCanvasDrawing",value:function(e){this.canvas.getContext("2d").translate(e.width,0)}},{key:"restoreCanvas",value:function(){this.canvas.getContext("2d").restore()}}]),e}();return yl.default=i,yl}var $l,xl={};function wl(){if($l)return xl;$l=1,Object.defineProperty(xl,"__esModule",{value:!0});var e,t=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=el(),r=(e=n)&&e.__esModule?e:{default:e},o=gl();var i="http://www.w3.org/2000/svg",a=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.svg=t,this.encodings=n,this.options=r,this.document=r.xmlDocument||document}return t(e,[{key:"render",value:function(){var e=this.options.marginLeft;this.prepareSVG();for(var t=0;t<this.encodings.length;t++){var n=this.encodings[t],o=(0,r.default)(this.options,n.options),i=this.createGroup(e,o.marginTop,this.svg);this.setGroupOptions(i,o),this.drawSvgBarcode(i,o,n),this.drawSVGText(i,o,n),e+=n.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,o.calculateEncodingAttributes)(this.encodings,this.options);var e=(0,o.getTotalWidthOfEncodings)(this.encodings),t=(0,o.getMaximumHeightOfEncodings)(this.encodings),n=e+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(n,t),this.options.background&&this.drawRect(0,0,n,t,this.svg).setAttribute("fill",this.options.background)}},{key:"drawSvgBarcode",value:function(e,t,n){var r,o=n.data;r="top"==t.textPosition?t.fontSize+t.textMargin:0;for(var i=0,a=0,d=0;d<o.length;d++)a=d*t.width+n.barcodePadding,"1"===o[d]?i++:i>0&&(this.drawRect(a-t.width*i,r,t.width*i,t.height,e),i=0);i>0&&this.drawRect(a-t.width*(i-1),r,t.width*i,t.height,e)}},{key:"drawSVGText",value:function(e,t,n){var r,o,a=this.document.createElementNS(i,"text");t.displayValue&&(a.setAttribute("font-family",t.font),a.setAttribute("font-size",t.fontSize),t.fontOptions.includes("bold")&&a.setAttribute("font-weight","bold"),t.fontOptions.includes("italic")&&a.setAttribute("font-style","italic"),o="top"==t.textPosition?t.fontSize-t.textMargin:t.height+t.textMargin+t.fontSize,"left"==t.textAlign||n.barcodePadding>0?(r=0,a.setAttribute("text-anchor","start")):"right"==t.textAlign?(r=n.width-1,a.setAttribute("text-anchor","end")):(r=n.width/2,a.setAttribute("text-anchor","middle")),a.setAttribute("x",r),a.setAttribute("y",o),a.appendChild(this.document.createTextNode(n.text)),e.appendChild(a))}},{key:"setSvgAttributes",value:function(e,t){var n=this.svg;n.setAttribute("width",e+"px"),n.setAttribute("height",t+"px"),n.setAttribute("x","0px"),n.setAttribute("y","0px"),n.setAttribute("viewBox","0 0 "+e+" "+t),n.setAttribute("xmlns",i),n.setAttribute("version","1.1")}},{key:"createGroup",value:function(e,t,n){var r=this.document.createElementNS(i,"g");return r.setAttribute("transform","translate("+e+", "+t+")"),n.appendChild(r),r}},{key:"setGroupOptions",value:function(e,t){e.setAttribute("fill",t.lineColor)}},{key:"drawRect",value:function(e,t,n,r,o){var a=this.document.createElementNS(i,"rect");return a.setAttribute("x",e),a.setAttribute("y",t),a.setAttribute("width",n),a.setAttribute("height",r),o.appendChild(a),a}}]),e}();return xl.default=a,xl}var El,Cl,kl={};function Pl(){if(El)return kl;El=1,Object.defineProperty(kl,"__esModule",{value:!0});var e=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var t=function(){function t(e,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.object=e,this.encodings=n,this.options=r}return e(t,[{key:"render",value:function(){this.object.encodings=this.encodings}}]),t}();return kl.default=t,kl}var Al,Nl,Sl={};function Ol(){if(Al)return Sl;function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function n(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Al=1,Object.defineProperty(Sl,"__esModule",{value:!0});var r=function(){function r(n,o){e(this,r);var i=t(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return i.name="InvalidInputException",i.symbology=n,i.input=o,i.message='"'+i.input+'" is not a valid input for '+i.symbology,i}return n(r,Error),r}(),o=function(){function r(){e(this,r);var n=t(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return n.name="InvalidElementException",n.message="Not supported type to render on",n}return n(r,Error),r}(),i=function(){function r(){e(this,r);var n=t(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return n.name="NoElementException",n.message="No element to render on.",n}return n(r,Error),r}();return Sl.InvalidInputException=r,Sl.InvalidElementException=o,Sl.NoElementException=i,Sl}function Tl(){if(Nl)return al;Nl=1,Object.defineProperty(al,"__esModule",{value:!0});var e="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},t=function(){if(ul)return dl;ul=1,Object.defineProperty(dl,"__esModule",{value:!0});var e=n(ll()),t=n(pl());function n(e){return e&&e.__esModule?e:{default:e}}return dl.default=function(n){var r={};for(var o in t.default)t.default.hasOwnProperty(o)&&(n.hasAttribute("jsbarcode-"+o.toLowerCase())&&(r[o]=n.getAttribute("jsbarcode-"+o.toLowerCase())),n.hasAttribute("data-"+o.toLowerCase())&&(r[o]=n.getAttribute("data-"+o.toLowerCase())));return r.value=n.getAttribute("jsbarcode-value")||n.getAttribute("data-value"),(0,e.default)(r)},dl}(),n=a(t),r=function(){if(Cl)return ml;Cl=1,Object.defineProperty(ml,"__esModule",{value:!0});var e=r(vl()),t=r(wl()),n=r(Pl());function r(e){return e&&e.__esModule?e:{default:e}}return ml.default={CanvasRenderer:e.default,SVGRenderer:t.default,ObjectRenderer:n.default},ml}(),o=a(r),i=Ol();function a(e){return e&&e.__esModule?e:{default:e}}function d(t){if("string"==typeof t)return function(e){var t=document.querySelectorAll(e);if(0===t.length)return;for(var n=[],r=0;r<t.length;r++)n.push(d(t[r]));return n}(t);if(Array.isArray(t)){for(var r=[],a=0;a<t.length;a++)r.push(d(t[a]));return r}if("undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLImageElement)return function(e){var t=document.createElement("canvas");return{element:t,options:(0,n.default)(e),renderer:o.default.CanvasRenderer,afterRender:function(){e.setAttribute("src",t.toDataURL())}}}(t);if(t&&t.nodeName&&"svg"===t.nodeName.toLowerCase()||"undefined"!=typeof SVGElement&&t instanceof SVGElement)return{element:t,options:(0,n.default)(t),renderer:o.default.SVGRenderer};if("undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)return{element:t,options:(0,n.default)(t),renderer:o.default.CanvasRenderer};if(t&&t.getContext)return{element:t,renderer:o.default.CanvasRenderer};if(t&&"object"===(void 0===t?"undefined":e(t))&&!t.nodeName)return{element:t,renderer:o.default.ObjectRenderer};throw new i.InvalidElementException}return al.default=d,al}var Il,Rl,Ml,Ll={};function Dl(){if(Il)return Ll;Il=1,Object.defineProperty(Ll,"__esModule",{value:!0});var e=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var t=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.api=e}return e(t,[{key:"handleCatch",value:function(e){if("InvalidInputException"!==e.name)throw e;if(this.api._options.valid===this.api._defaults.valid)throw e.message;this.api._options.valid(!1),this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(e){try{var t=e.apply(void 0,arguments);return this.api._options.valid(!0),t}catch(e){return this.handleCatch(e),this.api}}}]),t}();return Ll.default=t,Ll}var Bl=function(){if(Ml)return Rl;Ml=1;var e=c(Qs()),t=c(el()),n=(tl||(tl=1,Object.defineProperty(nl,"__esModule",{value:!0}),nl.default=function(e){var t=[];return function e(n){if(Array.isArray(n))for(var r=0;r<n.length;r++)e(n[r]);else n.text=n.text||"",n.data=n.data||"",t.push(n)}(e),t}),nl),r=c(n),o=c((rl||(rl=1,Object.defineProperty(ol,"__esModule",{value:!0}),ol.default=function(e){return e.marginTop=e.marginTop||e.margin,e.marginBottom=e.marginBottom||e.margin,e.marginRight=e.marginRight||e.margin,e.marginLeft=e.marginLeft||e.margin,e}),ol)),i=c(Tl()),a=c(ll()),d=c(Dl()),s=Ol(),l=c(pl());function c(e){return e&&e.__esModule?e:{default:e}}var u=function(){},h=function(e,t,n){var r=new u;if(void 0===e)throw Error("No element to render on was provided.");return r._renderProperties=(0,i.default)(e),r._encodings=[],r._options=l.default,r._errorHandler=new d.default(r),void 0!==t&&((n=n||{}).format||(n.format=m()),r.options(n)[n.format](t,n).render()),r};for(var p in h.getModule=function(t){return e.default[t]},e.default)e.default.hasOwnProperty(p)&&f(e.default,p);function f(e,n){u.prototype[n]=u.prototype[n.toUpperCase()]=u.prototype[n.toLowerCase()]=function(r,o){var i=this;return i._errorHandler.wrapBarcodeCall(function(){o.text=void 0===o.text?void 0:""+o.text;var d=(0,t.default)(i._options,o);d=(0,a.default)(d);var s=e[n],l=_(r,s,d);return i._encodings.push(l),i})}}function _(e,n,o){var i=new n(e=""+e,o);if(!i.valid())throw new s.InvalidInputException(i.constructor.name,e);var a=i.encode();a=(0,r.default)(a);for(var d=0;d<a.length;d++)a[d].options=(0,t.default)(o,a[d].options);return a}function m(){return e.default.CODE128?"CODE128":Object.keys(e.default)[0]}function y(e,n,i){n=(0,r.default)(n);for(var a=0;a<n.length;a++)n[a].options=(0,t.default)(i,n[a].options),(0,o.default)(n[a].options);(0,o.default)(i),new(0,e.renderer)(e.element,n,i).render(),e.afterRender&&e.afterRender()}return u.prototype.options=function(e){return this._options=(0,t.default)(this._options,e),this},u.prototype.blank=function(e){var t=new Array(e+1).join("0");return this._encodings.push({data:t}),this},u.prototype.init=function(){var n;if(this._renderProperties)for(var r in Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]),this._renderProperties){n=this._renderProperties[r];var o=(0,t.default)(this._options,n.options);"auto"==o.format&&(o.format=m()),this._errorHandler.wrapBarcodeCall(function(){var t=_(o.value,e.default[o.format.toUpperCase()],o);y(n,t,o)})}},u.prototype.render=function(){if(!this._renderProperties)throw new s.NoElementException;if(Array.isArray(this._renderProperties))for(var e=0;e<this._renderProperties.length;e++)y(this._renderProperties[e],this._encodings,this._options);else y(this._renderProperties,this._encodings,this._options);return this},u.prototype._defaults=l.default,"undefined"!=typeof window&&(window.JsBarcode=h),"undefined"!=typeof jQuery&&(jQuery.fn.JsBarcode=function(e,t){var n=[];return jQuery(this).each(function(){n.push(this)}),h(n,e,t)}),Rl=h}(),ql=Ge(Bl);const Ul={format:"CODE128",renderer:"svg",width:2,height:132,displayValue:!0,fontOptions:"",font:"Roboto",textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:14,background:"#ffffff",lineColor:"#000000",margin:8},jl=({instructions:e})=>{switch(e.length){case 0:return null;case 1:return ue(Fl,{instruction:e[0]});default:return ue(Gl,{instructions:e})}},Fl=e=>ue("div",{children:[ue("p",{className:"xendit-instructions-single-tab-heading",children:e.instruction.title}),ue(Vl,{instruction:e.instruction})]}),Gl=e=>{const[t,n]=Pe(0);return ue("div",{children:[ue("div",{className:"xendit-instructions-tab-list",children:e.instructions.map((e,r)=>ue("button",{className:We("xendit-instructions-tab-button",{"xendit-instructions-active-tab":t===r}),onClick:()=>n(r),children:e.title},r))}),ue(Vl,{instruction:e.instructions[t]})]})},Vl=e=>ue("ol",{className:"xendit-instructions-numbered-list","data-testid":"instructions-steps",children:e.instruction.content.map((e,t)=>ue("li",{className:"xendit-instructions-step-li",children:ue("div",{className:"xendit-instructions-step-box",children:(Array.isArray(e)?e:[e]).map((e,t)=>ue(x,{children:Xl(e)},t))})},t))});function Kl(e){const t=Array.from(e).map((e,t)=>{switch(e.nodeType){case Node.TEXT_NODE:return null===e.textContent?null:e.textContent;case Node.ELEMENT_NODE:return function(e,t){const n=We({"xendit-instructions-bold":"B"===e.nodeName,"xendit-instructions-italics":"I"===e.nodeName});return n?ue("span",{className:n,children:Kl(e.childNodes)},t):Kl(e.childNodes)}(e,t);default:return null}});return t}const Hl="undefined"!=typeof DOMParser?new DOMParser:null;function Wl(e){try{if(!Hl)return e;return Kl(Hl.parseFromString(e,"text/html").body.childNodes)}catch(t){return e}}function Xl(e){if("string"==typeof e)return ue("p",{className:"xendit-instructions-step-item",children:Wl(e)});switch(e.type){case"text":return function(e){return ue("p",{children:Wl(e.text)})}(e);case"image":return function(e){return ue("div",{children:ue("img",{src:e.src,alt:e.alt||"",style:{height:`${e.height??24}px`}})})}(e);case"bullets":return function(e){return ue("ul",{className:"xendit-instructions-bullet-list",children:e.items.map((e,t)=>ue("li",{children:Wl(e)},t))})}(e);case"form":return function(e){return ue("div",{className:"xendit-instructions-form-card",children:[e.heading?ue("h3",{className:"xendit-instructions-form-heading",children:Wl(e.heading)}):null,e.fields.map((e,t)=>ue("div",{className:"xendit-instructions-form-field",children:[ue("div",{className:"xendit-instructions-form-field-label",children:Wl(e.label)}),ue("div",{className:"xendit-instructions-form-field-value",children:Wl(e.value)})]},t))]})}(e);case"table":return function(e){return ue("table",{className:"xendit-instructions-table",children:[ue("thead",{children:ue("tr",{children:e.headers.map((e,t)=>ue("th",{className:"xendit-instructions-table-header",children:Wl(e)},t))})}),ue("tbody",{children:e.rows.map((e,t)=>ue("tr",{children:e.map((e,t)=>ue("td",{className:"xendit-instructions-table-cell",children:Wl(e)},t))},t))})]})}(e)}return null}function zl(e){const{amount:t,channelLogo:n,currency:r,onAffirm:o,barcodeContent:i,merchantName:a,instructions:d,title:s,t:l}=e,[c,u]=Pe(!1),h=Te(()=>{u(!0),o()},[o]),p=[{heading:l("action_barcode.merchant_name"),value:a},{heading:l("action_barcode.barcode_content"),value:i},{heading:l("action_barcode.amount_to_pay"),value:Wo(t,r)}],f=Oe(()=>{try{return function(e){const t=document.createElementNS("http://www.w3.org/2000/svg","svg");return ql(t,e,Ul),t}(i)}catch(e){console.log("Error generating barcode SVG:",e);const t=document.createElement("div");return t.innerText=l("action_barcode.unable_to_generate"),t}},[i,l]);return ue("div",{className:"xendit-action-present-to-customer",children:[ue("img",{src:n,alt:"Channel Logo",className:"xendit-action-barcode-channel-logo"}),ue("div",{className:"xendit-action-title",children:s}),ue("div",{"data-testid":"barcode",className:"xendit-action-barcode-barcode-container",role:"button",tabIndex:0,ref:e=>{!e||1===e.childNodes.length&&e.firstChild===f||e?.replaceChildren(f)}}),ue("div",{className:"xendit-action-barcode-content",children:ue("div",{className:"xendit-action-barcode-details",children:p.map((e,t)=>ue("div",{className:"xendit-action-barcode-detail-item",children:ue("div",{className:"xendit-action-barcode-detail-content",children:[ue("div",{className:"xendit-action-barcode-heading xendit-text-12 xendit-text-semibold",children:e.heading}),ue("div",{className:"xendit-action-barcode-value xendit-text-semibold",children:e.value})]})},t))})}),ue("div",{className:"xendit-action-present-to-customer-affirm",children:[ue(Ht,{variant:Vt.WHITE_ROUNDED,disabled:c,onClick:h,className:"xendit-button-block",children:c?ue(Wt,{}):l("action.payment_made")}),ue("div",{className:"xendit-text-12 xendit-text-secondary xendit-text-center",children:l("action.payment_confirmation_instructions")})]}),ue(jl,{instructions:d})]})}class ActionBarcodeBehavior 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)];pt(e?.type,"PRESENT_TO_CUSTOMER"),ct(this.bb.world),ct(this.bb.channel);const t={amount:this.bb.world.session.amount,channelLogo:this.bb.channel.brand_logo_url,currency:this.bb.world.session.currency,onAffirm:this.affirmPayment.bind(this),barcodeContent:e.value,merchantName:this.bb.world.business.name??"",paymentCode:e.value,instructions:e.instructions??[],title:e.action_title,t:this.bb.sdk.t.bind(this.bb.sdk)};this.cleanupFn=this.ensureHasActionContainer(),this.populateActionContainer(()=>v(zl,t))}affirmPayment(){this.bb.sdk.isProdLive()?this.bb.pollImmediatelyRequested=!0:this.bb.simulatePaymentRequested=!0,this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent)}}class ActionPaylinkBehavior{bb;actionIndex;el=null;constructor(e,t){this.bb=e,this.actionIndex=t}enter(){ct(this.bb.world),ct(this.bb.world.paymentEntity);const e=this.bb.world?.paymentEntity?.entity.actions[Number(this.actionIndex)];if(!e)throw new Error("Action not found for paylink behavior");pt(e.type,"REDIRECT_CUSTOMER"),pt(e.descriptor,"WEB_GOOGLE_PAYLINK");const t=document.createElement("link");t.rel="facilitated-payment",t.href=e.value,this.el=t,document.head.appendChild(t)}exit(){this.el?.remove(),this.el=null}}const Yl={"00":{name:"payloadFormatIndicator",type:"numeric"},"01":{name:"pointOfInitiationMethod",type:"numeric"},52:{name:"merchantCategoryCode",type:"numeric"},53:{name:"transactionCurrency",type:"numeric"},54:{name:"transactionAmount",type:"ans"},55:{name:"tipOrConvenienceIndicator",type:"numeric"},56:{name:"valueOfConvenienceFeeFixed",type:"ans"},57:{name:"valueOfConvenienceFeePercentage",type:"ans"},58:{name:"countryCode",type:"ans"},59:{name:"merchantName",type:"ans"},60:{name:"merchantCity",type:"ans"},61:{name:"postalCode",type:"ans"},62:{name:"additionalData",type:"template",templateClass:{"01":{name:"billNumber",type:"ans"},"02":{name:"mobileNumber",type:"ans"},"03":{name:"storeLabel",type:"ans"},"04":{name:"loyaltyNumber",type:"ans"},"05":{name:"referenceLabel",type:"ans"},"06":{name:"customerLabel",type:"ans"},"07":{name:"terminalLabel",type:"ans"},"08":{name:"purposeOfTransaction",type:"ans"},"09":{name:"additionalConsumerDataRequest",type:"ans"}}},63:{name:"crc",type:"ans"},64:{name:"language",type:"template",templateClass:{"00":{name:"languagePreference",type:"ans"},"01":{name:"merchantNameAlternateLanguage",type:"string"},"02":{name:"merchantCityAlternateLanguage",type:"string"}}}},Ql={"ID.CO.QRIS.WWW":{"00":{name:"globallyUniqueIdentifier",type:"string"},"02":{name:"nmid",type:"ans"},"03":{name:"businessType",type:"ans"}},"ID.DANA.WWW":{"00":{name:"globallyUniqueIdentifier",type:"string"},"01":{name:"merchantId",type:"ans"},"02":{name:"storeOrTerminalId",type:"ans"},"03":{name:"additionalIdentifier",type:"ans"}},"SG.SGQR":{"00":{name:"globallyUniqueIdentifier",type:"string"},"01":{name:"sgqrNumber",type:"ans"},"02":{name:"version",type:"ans"},"03":{name:"postalCode",type:"ans"},"04":{name:"level",type:"ans"},"05":{name:"unit",type:"ans"},"06":{name:"misc",type:"ans"},"07":{name:"revisionDate",type:"ans"}},"SG.PAYNOW":{"00":{name:"globallyUniqueIdentifier",type:"string"},"01":{name:"type",type:"numeric"},"02":{name:"identifier",type:"ans"},"03":{name:"editable",type:"numeric"}},"ph.ppmi.p2m":{"00":{name:"globallyUniqueIdentifier",type:"string"},"01":{name:"acquirerId",type:"ans"},"03":{name:"merchantId",type:"ans"},"05":{name:"notifyFlags",type:"numeric"}}};function Zl(e){return/^[\uD800-\uDBFF]$/.test(e)}function Jl(e){const t=new Set,n=[];for(;e.length;){const r=e.substring(0,2);if(!/^\d{2}$/.test(r))throw new Error("Invalid EMVCo QR string, invalid tag");if(t.has(r))throw new Error(`Duplicate tag ${r} in EMVCo QR string`);t.add(r);const o=e.substring(2,4);if(!/^\d{2}$/.test(o))throw new Error("Invalid EMVCo QR string, invalid length");const i=parseInt(o,10);if(!i)throw new Error(`Invalid EMVCo QR string, expected length but got ${o}`);let a="",d=0,s=0;for(;s<i;){const t=e.substring(4+d,5+d);if(""===t)throw new Error("Invalid EMVCo QR string, unexpected end of string");a+=t,d+=1,Zl(t)?s+=.5:s+=1}n.push({key:r,value:a}),e=e.substring(4+d)}return n}function ec(e,t,n,r){e[`field${n}`]=r;const o=t[n];if(!o)return;const i="template"===o.type&&o.templateClass?tc(o.templateClass,r).result:r;e[o.name]=i}function tc(e,t){const n=Jl(t),r={};for(const{key:t,value:o}of n)ec(r,e,t,o);return{result:r,raw:n}}function nc(e,t,n){const r=Jl(n),o=r.find(({key:e})=>"00"===e)?.value;if(!o)throw new Error(`Missing field 00 in merchant account information template for field ${t}`);const i=Ql[o];return i&&(e[o]=tc(i,n).result),e}function rc(e){return"QRIS"===e?oc:"SGQR"===e?ic:"DUITNOW_QR"===e?ac:"PROMPTPAY"===e?dc:"QRPH"===e?sc:null}function oc(e){const{channelLogo:t,channelName:n,merchantName:r,amountText:o,t:i,nmid:a}=e,d="#DB4849",s="24px";return ue("div",{style:{display:"flex",flexDirection:"column",position:"relative",paddingTop:"24px",paddingLeft:s,paddingRight:s,overflow:"hidden"},children:[cc.closeButton({}),ue("img",{src:t,alt:i("image_alt.channel_logo",{channelName:n}),style:{height:"64px",alignSelf:"center"}}),ue("div",{className:"xendit-text-center xendit-text-16",style:{display:"flex",flexDirection:"column",gap:"4px",marginTop:"16px"},children:[ue("div",{className:"xendit-text-semibold",children:r}),a?ue("div",{className:"xendit-text-14",children:["NMID: ",a]}):null]}),ue("div",{style:{position:"relative",margin:`-${s}`,marginBottom:"0",padding:s},children:[ue("div",{style:{padding:"20px",backgroundColor:"white",zIndex:1,position:"relative",borderRadius:"4px",display:"flex",flexDirection:"column",gap:"16px"},children:[e.qr,ue("div",{className:"xendit-text-semibold xendit-text-center",style:{fontSize:"24px",lineHeight:s},children:o})]}),ue("svg",{style:{position:"absolute",top:"-9%",left:0,width:"60%",height:"auto",pointerEvents:"none"},viewBox:"0 0 100 100",children:ue("polygon",{fill:d,points:"0,0 50,50 0,100"})}),ue("svg",{style:{position:"absolute",bottom:0,right:0,width:"30%",height:"auto",pointerEvents:"none"},viewBox:"0 0 100 100",children:ue("polygon",{fill:d,points:"0,100 100,100 100,0"})})]})]})}function ic(e){const{merchantName:t,amountText:n,channelLogo:r,channelName:o,t:i}=e;return ue("div",{style:{display:"flex",flexDirection:"column",position:"relative",paddingTop:"24px",paddingLeft:"24px",paddingRight:"24px",overflow:"hidden"},children:[ue("img",{src:r,alt:i("image_alt.channel_logo",{channelName:o}),style:{height:"56px",alignSelf:"center",marginBottom:"8px"}}),cc.closeButton({}),ue("div",{style:{padding:"20px",backgroundColor:"white",zIndex:1,position:"relative",borderRadius:"4px",display:"flex",flexDirection:"column",gap:"16px"},children:ue("div",{style:{"--xendit-qr-foreground-color":"#7C2279"},children:e.qr})}),ue("div",{className:"xendit-text-center xendit-text-16",children:"Scan To Pay"}),ue("div",{className:"xendit-text-semibold xendit-text-center",style:{fontSize:"24px",lineHeight:"24px",marginTop:"12px"},children:n}),ue("div",{className:"xendit-text-center xendit-text-16 xendit-text-semibold",style:{marginTop:"8px",marginBottom:"16px"},children:t})]})}function ac(e){const{merchantName:t,amountText:n}=e,r="#ED3066";return ue("div",{style:{display:"flex",flexDirection:"column",position:"relative",paddingTop:"40px",overflow:"hidden"},children:[cc.closeButton({}),ue("div",{className:"xendit-text-center xendit-text-16",children:"Scan To Pay"}),ue("div",{className:"xendit-text-semibold xendit-text-center",style:{fontSize:"24px",lineHeight:"24px",marginTop:"12px"},children:n}),ue("div",{className:"xendit-text-center xendit-text-16 xendit-text-semibold",style:{marginTop:"8px"},children:t}),ue("svg",{viewBox:"0 0 180 180",style:{aspectRatio:"1",margin:"32px 14% 24px"},children:[ue("rect",{width:"180",height:"180",fill:r,rx:13}),ue("rect",{x:"10",y:"10",width:"160",height:"140",fill:"white",rx:4}),ue("path",{d:"M0 180 L20 180 L0 160 Z",fill:r}),ue("path",{d:"M10 150 L30 150 L10 130 Z",fill:"white"}),ue("foreignObject",{x:"40",y:"30",width:"100",height:"100",children:ue("div",{style:{"--xendit-qr-foreground-color":r},children:e.qr})}),ue("foreignObject",{x:"0",y:"160",height:"10px",width:"180px",style:{overflow:"visible"},children:ue("div",{style:{display:"flex",flexDirection:"column",height:"10px"},children:cc.malaysiaNationalQrText({width:"auto"})})})]})]})}function dc(e){const{merchantName:t,amountText:n,channelLogo:r,channelName:o,t:i}=e;return ue("div",{style:{display:"flex",flexDirection:"column",position:"relative",overflow:"hidden"},children:[ue("div",{style:{backgroundColor:"#1C3C63",padding:"8px",height:"64px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",borderTopLeftRadius:"8px",borderTopRightRadius:"8px"},children:[cc.promptpay({height:"48px"}),cc.closeButton({color:"white"})]}),ue("div",{style:{display:"flex",flexDirection:"column",padding:"0 16px"},children:[ue("img",{src:r,alt:i("image_alt.channel_logo",{channelName:o}),style:{height:"56px",alignSelf:"center",marginTop:"16px"}}),ue("div",{style:{padding:"16px 42px"},children:e.qr}),ue("div",{className:"xendit-text-center xendit-text-semibold",style:{fontSize:"20px",lineHeight:"24px",marginBottom:"12px",display:"flex",flexDirection:"column",gap:"8px"},children:[n,ue("div",{className:"xendit-text-16",children:t})]})]})]})}function sc(e){const{merchantName:t,amountText:n,channelLogo:r,channelName:o,t:i}=e;return ue("div",{style:{display:"flex",flexDirection:"column",position:"relative",paddingTop:"24px",paddingLeft:"24px",paddingRight:"24px",paddingBottom:"12px",overflow:"hidden"},children:[ue("img",{src:r,alt:i("image_alt.channel_logo",{channelName:o}),style:{height:"48px",alignSelf:"center",marginBottom:"16px"}}),cc.closeButton({}),ue("div",{style:{backgroundColor:"white",border:"4px solid rgb(0,0,0,0.15)",zIndex:1,position:"relative",borderRadius:"12px",display:"flex",flexDirection:"column",gap:"16px",padding:"24px"},children:[ue("div",{className:"xendit-text-center",style:{display:"flex",flexDirection:"column",gap:"16px"},children:[ue("div",{className:"xendit-text-semibold",style:{fontSize:"20px",lineHeight:"28px"},children:t}),ue("div",{className:"xendit-text-bold",style:{fontSize:"24px",lineHeight:"32px"},children:n})]}),ue("div",{style:{position:"relative"},children:[e.qr,cc.qrph({position:"absolute",top:"50%",left:"50%",width:"12%",height:"12%",aspectRatio:"1",transform:"translate(-50%, -50%)",zIndex:"3",backgroundColor:"white",padding:"8px",borderRadius:"6px"})]})]})]})}function lc(e){e.target?.dispatchEvent(new InternalDialogCloseEvent)}const cc={closeButton:e=>ue("button",{"aria-label":"Close",onClick:lc,className:"xendit-dialog-floating-close",style:e,children:ue(je,{name:"x",size:20})}),sgqr:e=>ue("svg",{xmlns:"http://www.w3.org/2000/svg",width:"83",height:"40",fill:"none",style:e,children:ue("path",{fill:"#FD0031",d:"M18.395 39.983c-1.224-.14-2.626-.38-3.422-.587-3.582-.931-6.767-2.787-9.275-5.403-2.74-2.858-4.46-6.15-5.268-10.084C.174 22.663 0 21.206 0 20.11c0-1.08.183-2.682.33-3.479.426-2.313 1.002-4.05 1.922-5.793 2.09-3.962 5.07-6.896 8.903-8.768C15.535-.069 20.427-.564 25.188.65c.627.16 1.23.33 1.339.378.109.049.466.189.793.311 1.247.468 4.159 2.023 4.066 2.173-.022.036.02.066.093.066.149 0 .554.297 1.143.838.215.197.408.343.428.323.085-.085 1.9 1.72 2.529 2.515.833 1.051 1.838 2.587 2.344 3.583 1.04 2.045 1.845 4.59 1.99 6.29.034.381.078.827.099.99.301 2.344-.09 5.848-.936 8.368-.52 1.549-1.374 3.302-2.212 4.541-3.84 5.68-9.678 8.864-16.436 8.966-.955.014-1.87.011-2.033-.008m-3.521-11.997a4.97 4.97 0 0 0 2.763-2.024c.525-.767.739-1.481.747-2.498.006-.77-.029-.97-.26-1.464-.625-1.341-1.287-1.932-2.865-2.556-.537-.213-1.018-.387-1.068-.387-.193 0-2.957-.924-3.333-1.114-.519-.262-.864-.535-1.013-.8-.285-.508-.048-1.383.475-1.756.386-.274.82-.588 1.777-.588.68 0 1.93.388 3.025.94 1.057.53 1.241.621 1.339.469.023-.036.182-.319.404-.614.59-.783.897-1.342.832-1.512-.085-.22-.783-.692-1.713-1.16-1.789-.901-4.057-1.193-5.523-.71-1.955.642-3.242 1.871-3.68 3.513-.284 1.066-.054 2.359.603 3.384.707 1.104 1.445 1.467 5.606 2.76 1.291.402 1.656.595 2.01 1.066.822 1.092.13 2.172-1.585 2.47-.81.141-1.74.052-2.655-.255-.72-.241-1.972-.906-2.464-1.308-.154-.127-.335-.23-.401-.23-.097 0-1.142 1.204-1.599 1.843-.146.204.02.414.795 1 .693.525 1.724 1.069 2.591 1.368 1.351.467 3.915.547 5.192.163m13.686.177c1.398-.22 3.134-.984 4.219-1.856l.59-.475.082-.739c.09-.818.026-5.764-.078-5.93-.043-.072-1.146-.106-3.381-.106h-3.317l-.01.619c-.006.34-.028.94-.05 1.331-.024.447.002.737.07.779.059.036.928.06 1.931.05l1.824-.016-.019 1.267c-.021 1.454.04 1.345-1.068 1.891-.412.185-1.417.367-2.231.367-1.306 0-1.558-.027-2.061-.223-.742-.288-1.009-.457-1.592-1.008-.946-.893-1.469-2.297-1.468-3.943 0-1.703.476-2.94 1.52-3.95 1.032-.997 1.761-1.267 3.403-1.262 1.36.005 2.474.36 3.674 1.174.203.138.42.25.48.249.176-.003 1.647-1.844 1.647-2.062 0-.57-2.065-1.734-3.818-2.153-.966-.231-1.233-.256-2.33-.213-.924.035-1.405.103-1.885.266-2.384.811-4.35 2.497-5.259 4.51-.562 1.243-.798 3.178-.597 4.897.233 2.004 1.233 3.701 2.976 5.05.813.63 2.018 1.195 2.979 1.397.96.203 2.775.245 3.769.089m26.951-.466c-.28-.26-.638-.613-.794-.787-.304-.338-.413-.34-.89-.01-.82.568-2.916 1.168-4.076 1.168-1.205 0-3.068-.358-4.134-.95-1.996-1.107-3.6-3.424-3.882-5.96-.421-3.777 1.39-6.944 4.74-8.292 1.087-.438 2.055-.643 3.01-.636 2.095.015 4.211.768 5.616 2 .712.624 1.63 2.082 2.015 3.2.249.723.501 2.097.501 2.73 0 1.134-.536 3.078-1.147 4.157-.187.33-.34.64-.34.687s.279.316.62.598c.999.825 1 .828.322 1.665-.513.634-.805.9-.99.9-.033 0-.29-.212-.57-.47m-3.984-2.258c.727-.362.805-.61.32-1.01-.18-.15-.641-.564-1.023-.922-.863-.809-.804-.931-.554-1.218.144-.165.835-.956.941-1.084.242-.29.67-.002 2.108 1.398.607.592.783.546 1.223-.317.327-.643.352-1.452.384-1.827.023-.269-.013-1.368-.085-1.694-.65-2.936-3.836-4.965-6.546-4.167-1.22.359-2.147.982-2.857 1.92-.874 1.156-1.161 2.046-1.155 3.579.006 1.816.463 2.952 1.676 4.167 1.241 1.243 2.006 1.542 3.833 1.496 1.043-.026 1.204-.056 1.735-.321m8.396 2.254-1.017-.028V12.423l1.711-.002c2.44-.002 6.251.191 7.066.358 1.721.352 2.764 1.24 3.381 2.877.264.699.322 1.883.133 2.702-.157.68-.635 1.63-1.05 2.089-.432.478-1.36 1.107-1.985 1.345-.236.09-.43.224-.43.3 0 .074.211.435.469.803.257.367.788 1.135 1.18 1.707.678.99 1.064 1.533 1.808 2.536.182.247.312.468.288.492-.071.071-2.179.136-2.52.077-.278-.048-.507-.332-2.08-2.579-.974-1.388-1.84-2.562-1.928-2.609-.14-.075-1.422-.117-3.092-.1l-.57.005v2.612c0 2.409-.014 2.616-.174 2.649-.095.02-.63.024-1.19.008m7.165-7.829c.69-.327 1.353-.996 1.544-1.558.337-.987-.015-2.293-.78-2.897-.694-.547-1.127-.627-3.838-.716-1.364-.044-2.515-.044-2.56 0-.06.059-.114 3.938-.073 5.28.004.16.194.173 2.559.173h2.553z"})}),promptpay:e=>ue("svg",{xmlns:"http://www.w3.org/2000/svg",width:"158",height:"48",fill:"none",style:e,children:[ue("title",{children:"Thai QR Payment"}),ue("path",{fill:"#fff",d:"M66.998 27.875h5.312s2.406.204 3.508 1.709c.744 1.015.904 3.592 0 4.825-1.315 1.792-3.508 1.91-3.508 1.91h-2.806v5.93h-2.506zm7.016 4.121c.013-2.277-4.51-1.81-4.51-1.81v3.62s4.495.606 4.51-1.81m1.904 10.253 5.713-14.374h1.804l5.712 14.374h-2.806l-1.203-3.317h-5.211l-1.203 3.317zm8.419-5.428-1.804-5.026-1.804 5.026zm8.72-.2-5.313-8.746h3.107l3.458 5.93 3.458-5.93h3.106l-5.311 8.745v5.63h-2.506zm9.721-8.746h3.508l3.758 10.052 3.758-10.052h3.508v14.374h-2.505V31.795l-3.609 9.148h-2.305l-3.608-9.148V42.25h-2.505zm18.14 0h9.521v2.312h-6.815v3.82h6.414v2.11h-6.414v3.82h6.815v2.313h-9.521zm12.728 14.374V27.875h2.506l5.913 9.851v-9.851h2.506v14.374h-2.506l-5.913-9.85v9.85zm17.339-12.062h-4.41v-2.312h11.426v2.312h-4.41v12.062h-2.606zm-12.199-8.746s-1.371 1.096-4.538 1.125c-4.245-.098-6.073-2.265-7.306-5.755-.933-3.267-.053-9.45 5.368-10.801.12-.03 4.794-1.17 7.856 2.077 3.438 3.814 2.405 10.02.687 11.663-.01.038 2.014 2.208 2.014 2.208l-1.65 1.762zm-2.033-2.122-2.073-2.009 1.746-1.777 2.139 2.021s.849-.739.826-3.423c-.017-1.88-.617-3.54-1.654-4.431-1.354-1.163-3.965-1.431-5.62-.578-1.409.725-2.225 2.063-2.493 4.084-.395 2.711.753 5.79 3.552 6.645 1.247.358 2.568.315 3.577-.532m9.02 2.926V6.061h5.012s1.956-.045 3.107.503c2.368 1.127 2.895 2.537 2.906 4.272.003 3.071-2.906 4.071-2.906 4.071l4.109 7.338h-3.213l-4.003-6.835h-1.905v6.835zm7.065-9.55c1.231-.51 1.773-2.837-.186-3.719-.864-.389-3.772-.301-3.772-.301v4.322s3.204.242 3.958-.301m-80.829-4.02h-5.011V6.06h13.03v2.614h-5.012v13.57h-3.007zM82.432 6.06h2.807v6.635h7.216V6.06h2.806v16.184h-2.806v-6.634h-7.216v6.634h-2.807zm21.749 0h2.105l6.514 16.184h-3.207l-1.503-3.418h-5.713l-1.504 3.418h-3.207zm3.107 9.952-2.055-5.529-2.054 5.529zm7.817-9.952h2.907v16.184h-2.907s.025-16.184 0-16.184"}),ue("path",{fill:"#fff",stroke:"#00427a","stroke-width":".879",d:"M12.552 47.472s-5.185-.205-8.519-3.518S.525 35.41.525 35.41V12.59s.221-5.224 3.508-8.544 8.52-3.518 8.52-3.518h22.85s5.209.163 8.519 3.518 3.508 8.545 3.508 8.545v20.708l14.332 14.173z"}),ue("path",{fill:"#00a796",d:"M26.602 42.245v-8.544h2.37c2.781 0 3.153-.15 3.766-.957.603-.792.873-1.295.88-3.645.002-1.204 0-2.435 0-2.435l14.799 15.581z"}),ue("path",{fill:"#00427a",d:"M10.598 41.825c-2.198-.713-3.83-2.34-4.576-4.563-.281-.838-.315-1.102-.268-5.371.02-1.786.042-5.282 0-5.227h8.519v2.379c0 2.564.1 2.887.85 3.698.661.714 1.243.96 3.553.96h2.613v8.544h-5.045c-4.33 0-4.998-.21-5.646-.42M5.754 18.499c0-4.572.018-6.837.247-7.65.614-2.182 2.227-3.908 4.402-4.714.756-.28 1.048-.38 5.774-.38h5.111v8.544h-2.485c-2.594 0-2.899.105-3.676.886-.748.753-.745 1.127-.854 3.745v2.406h-8.52zm27.862 2.837s.006-1.225 0-2.726c-.01-2.47-.478-2.923-.959-3.427-.48-.505-.668-.874-3.35-.884-.943-.003-2.707 0-2.707 0V5.755h4.25c2.453 0 4.771.063 5.313.145 1.34.204 2.72.892 3.682 1.839.921.906 1.816 2.611 2.017 3.846.073.443.274 2.04.273 3.552-.003 2.768 0 6.199 0 6.199z"})]}),malaysiaNationalQrText:e=>ue("svg",{xmlns:"http://www.w3.org/2000/svg",width:"209",height:"19",fill:"none",viewBox:"0 0 209 19",style:e,children:[ue("title",{children:"Malaysia National QR"}),ue("path",{fill:"#fff",d:"M1.16 14.58q-.56 0-.86-.32t-.3-.88V1.36Q0 .78.32.48.64.16 1.2.16q.5 0 .78.2.3.18.54.64l4.94 9.14h-.64L11.76 1q.24-.46.52-.64.28-.2.78-.2.56 0 .86.32.3.3.3.88v12.02q0 .56-.3.88-.28.32-.86.32-.56 0-.86-.32t-.3-.88V4.12h.44l-4.2 7.66a1.6 1.6 0 0 1-.42.5q-.22.16-.6.16t-.62-.16a1.6 1.6 0 0 1-.42-.5L1.84 4.1h.48v9.28q0 .56-.3.88-.28.32-.86.32m19.643.04q-1.06 0-1.9-.4a3.44 3.44 0 0 1-1.3-1.12 2.8 2.8 0 0 1-.46-1.58q0-1.08.56-1.7.56-.64 1.82-.92t3.38-.28h1v1.44h-.98q-1.239 0-1.98.12t-1.06.42q-.3.28-.3.8 0 .66.46 1.08t1.28.42q.66 0 1.16-.3.52-.32.82-.86t.3-1.24V8.2q0-1-.44-1.44t-1.48-.44q-.579 0-1.26.14-.66.14-1.4.48-.38.18-.68.1a.77.77 0 0 1-.44-.32 1.05 1.05 0 0 1-.16-.56q0-.3.16-.58.16-.3.54-.44a9 9 0 0 1 1.76-.54 8.6 8.6 0 0 1 1.56-.16q1.44 0 2.36.44a2.9 2.9 0 0 1 1.4 1.34q.46.88.46 2.28v4.8q0 .62-.3.96-.3.32-.86.32t-.88-.32q-.3-.34-.3-.96v-.96h.16q-.14.7-.56 1.22a2.7 2.7 0 0 1-1.02.78q-.62.28-1.42.28m11.558 0q-1.66 0-2.5-.94-.84-.96-.84-2.8V1.42q0-.62.32-.94t.92-.32.92.32q.34.32.34.94v9.34q0 .92.38 1.36.4.44 1.12.44h.3l.28-.04q.28-.04.38.16.1.18.1.76 0 .5-.2.78-.201.28-.66.34l-.42.04q-.22.02-.44.02m6.766 0q-1.06 0-1.9-.4a3.45 3.45 0 0 1-1.3-1.12 2.8 2.8 0 0 1-.46-1.58q0-1.08.56-1.7.56-.64 1.82-.92t3.38-.28h1v1.44h-.98q-1.239 0-1.98.12t-1.06.42q-.3.28-.3.8 0 .66.46 1.08t1.28.42q.66 0 1.16-.3.52-.32.82-.86t.3-1.24V8.2q0-1-.44-1.44t-1.48-.44q-.579 0-1.26.14-.66.14-1.4.48-.38.18-.68.1a.77.77 0 0 1-.44-.32 1.05 1.05 0 0 1-.16-.56q0-.3.16-.58.16-.3.54-.44a9 9 0 0 1 1.76-.54 8.6 8.6 0 0 1 1.56-.16q1.44 0 2.36.44a2.9 2.9 0 0 1 1.4 1.34q.46.88.46 2.28v4.8q0 .62-.3.96-.3.32-.86.32t-.88-.32q-.3-.34-.3-.96v-.96h.16q-.14.7-.56 1.22a2.7 2.7 0 0 1-1.02.78q-.62.28-1.42.28m10.6 3.56q-.44 0-.72-.24a.91.91 0 0 1-.34-.6q-.04-.38.14-.8l1.36-3.02v1.04l-3.64-8.42q-.18-.44-.12-.82a.89.89 0 0 1 .36-.6q.32-.24.86-.24.46 0 .74.22.28.2.5.78l2.7 6.74h-.6l2.76-6.76q.22-.56.52-.76.3-.22.8-.22.44 0 .7.24.26.22.32.6.06.36-.14.8l-4.86 11.1q-.26.56-.56.76t-.78.2m11.932-3.56a10 10 0 0 1-1.82-.18 5.4 5.4 0 0 1-1.72-.62 1.26 1.26 0 0 1-.46-.46 1.14 1.14 0 0 1-.1-.54 1 1 0 0 1 .2-.48.83.83 0 0 1 .44-.26q.28-.06.6.1a7.3 7.3 0 0 0 1.5.54q.7.14 1.38.14.96 0 1.42-.32.48-.34.48-.88 0-.46-.32-.7-.3-.26-.92-.38l-2-.38q-1.24-.24-1.9-.9-.64-.68-.64-1.74 0-.96.52-1.66.54-.7 1.48-1.08t2.16-.38q.88 0 1.64.2.78.18 1.5.58.3.16.4.42.12.26.06.54-.06.26-.24.48a.84.84 0 0 1-.46.26q-.26.04-.6-.12a5.4 5.4 0 0 0-1.2-.46 4.5 4.5 0 0 0-1.08-.14q-.98 0-1.46.34-.46.34-.46.9 0 .42.28.7t.86.38l2 .38q1.3.24 1.96.88.68.64.68 1.72 0 1.46-1.14 2.3-1.14.82-3.04.82m7.926-.06q-.6 0-.92-.36t-.32-1V5.86q0-.66.32-1 .32-.36.92-.36t.92.36q.34.34.34 1v7.34q0 .64-.32 1t-.94.36m0-11.92q-.7 0-1.1-.34-.38-.36-.38-.98 0-.64.38-.98.4-.34 1.1-.34.72 0 1.1.34t.38.98q0 .62-.38.98-.38.34-1.1.34m7.578 11.98q-1.06 0-1.9-.4a3.44 3.44 0 0 1-1.3-1.12 2.8 2.8 0 0 1-.46-1.58q0-1.08.56-1.7.56-.64 1.82-.92t3.38-.28h1v1.44h-.98q-1.24 0-1.98.12t-1.06.42q-.3.28-.3.8 0 .66.46 1.08t1.28.42q.66 0 1.16-.3.52-.32.82-.86t.3-1.24V8.2q0-1-.44-1.44t-1.48-.44q-.58 0-1.26.14-.66.14-1.4.48-.38.18-.68.1a.77.77 0 0 1-.44-.32 1.05 1.05 0 0 1-.16-.56q0-.3.16-.58.159-.3.54-.44a9 9 0 0 1 1.76-.54 8.6 8.6 0 0 1 1.56-.16q1.44 0 2.36.44a2.9 2.9 0 0 1 1.4 1.34q.46.88.46 2.28v4.8q0 .62-.3.96-.3.32-.86.32t-.88-.32q-.3-.34-.3-.96v-.96h.16q-.14.7-.56 1.22a2.7 2.7 0 0 1-1.02.78q-.62.28-1.42.28m15.587-.04q-.58 0-.9-.32-.3-.32-.3-.92V1.44q0-.62.3-.94.32-.34.82-.34.46 0 .68.18.24.16.56.56l7.66 9.94h-.52V1.38q0-.58.3-.9.32-.32.9-.32t.88.32.3.9v12q0 .56-.28.88t-.76.32q-.46 0-.74-.18-.26-.18-.58-.58l-7.64-9.94h.5v9.46q0 .6-.3.92t-.88.32m17.241.04q-1.06 0-1.9-.4a3.44 3.44 0 0 1-1.3-1.12 2.8 2.8 0 0 1-.46-1.58q0-1.08.56-1.7.56-.64 1.82-.92t3.38-.28h1v1.44h-.98q-1.24 0-1.98.12t-1.06.42q-.3.28-.3.8 0 .66.46 1.08t1.28.42q.66 0 1.16-.3.52-.32.82-.86t.3-1.24V8.2q0-1-.44-1.44t-1.48-.44q-.58 0-1.26.14-.66.14-1.4.48-.38.18-.68.1a.76.76 0 0 1-.44-.32 1.05 1.05 0 0 1-.16-.56q0-.3.16-.58.159-.3.54-.44a9 9 0 0 1 1.76-.54 8.6 8.6 0 0 1 1.56-.16q1.44 0 2.36.44.94.44 1.4 1.34.46.88.46 2.28v4.8q0 .62-.3.96-.3.32-.86.32t-.88-.32q-.3-.34-.3-.96v-.96h.16q-.14.7-.56 1.22a2.7 2.7 0 0 1-1.02.78q-.62.28-1.42.28m12.697 0q-1.3 0-2.18-.44-.86-.44-1.28-1.28-.42-.86-.42-2.12V6.52h-1.04q-.48 0-.74-.24-.26-.26-.26-.7 0-.46.26-.7t.74-.24h1.04V2.82q0-.62.32-.94.34-.32.94-.32t.92.32.32.94v1.82h2.12q.48 0 .74.24t.26.7q0 .44-.26.7-.26.24-.74.24h-2.12v4.12q0 .96.42 1.44t1.36.48q.34 0 .6-.06t.46-.08q.24-.02.4.16.16.16.16.68 0 .4-.14.72-.12.3-.46.42-.26.08-.68.14-.42.08-.74.08m5.19-.06q-.6 0-.92-.36t-.32-1V5.86q0-.66.32-1 .32-.36.92-.36t.92.36q.34.34.34 1v7.34q0 .64-.32 1t-.94.36m0-11.92q-.7 0-1.1-.34-.38-.36-.38-.98 0-.64.38-.98.4-.34 1.1-.34.72 0 1.1.34t.38.98q0 .62-.38.98-.38.34-1.1.34m8.818 11.98q-1.521 0-2.64-.62a4.33 4.33 0 0 1-1.74-1.76q-.62-1.16-.62-2.72 0-1.18.34-2.1a4.5 4.5 0 0 1 1.02-1.6q.66-.68 1.58-1.02.92-.36 2.06-.36 1.52 0 2.64.62 1.119.62 1.74 1.76.62 1.14.62 2.7 0 1.18-.36 2.12a4.5 4.5 0 0 1-1 1.62q-.66.66-1.58 1.02-.92.34-2.06.34m0-1.9q.74 0 1.3-.36t.86-1.06q.32-.72.32-1.78 0-1.6-.68-2.38-.681-.8-1.8-.8-.74 0-1.3.36-.56.34-.88 1.06-.3.7-.3 1.76 0 1.58.68 2.4.68.8 1.8.8m8.803 1.86q-.6 0-.92-.32-.32-.34-.32-.96V5.74q0-.62.32-.94t.9-.32.9.32.32.94V7.1l-.22-.5q.44-1.06 1.36-1.6.94-.56 2.12-.56t1.94.44 1.14 1.34q.38.88.38 2.24v4.84q0 .62-.32.96-.32.32-.92.32t-.94-.32q-.32-.34-.32-.96V8.58q0-1.14-.44-1.66-.42-.52-1.32-.52-1.1 0-1.76.7-.64.68-.64 1.82v4.38q0 1.28-1.26 1.28m14.179.04q-1.06 0-1.9-.4a3.45 3.45 0 0 1-1.3-1.12 2.8 2.8 0 0 1-.46-1.58q0-1.08.56-1.7.56-.64 1.82-.92t3.38-.28h1v1.44h-.98q-1.239 0-1.98.12t-1.06.42q-.3.28-.3.8 0 .66.46 1.08t1.28.42q.66 0 1.16-.3.52-.32.82-.86t.3-1.24V8.2q0-1-.44-1.44t-1.48-.44q-.579 0-1.26.14-.66.14-1.4.48-.38.18-.68.1a.77.77 0 0 1-.44-.32 1.06 1.06 0 0 1-.16-.56q0-.3.16-.58.16-.3.54-.44a9 9 0 0 1 1.76-.54 8.6 8.6 0 0 1 1.56-.16q1.44 0 2.36.44.94.44 1.4 1.34.46.88.46 2.28v4.8q0 .62-.3.96-.3.32-.86.32t-.88-.32q-.3-.34-.3-.96v-.96h.16a2.8 2.8 0 0 1-.56 1.22 2.7 2.7 0 0 1-1.02.78q-.62.28-1.42.28m11.558 0q-1.66 0-2.5-.94-.84-.96-.84-2.8V1.42q0-.62.32-.94t.92-.32.92.32q.34.32.34.94v9.34q0 .92.38 1.36.4.44 1.12.44h.3l.28-.04q.28-.04.38.16.1.18.1.76 0 .5-.2.78-.201.28-.66.34l-.42.04a5 5 0 0 1-.44.02m21.436 2.06q.28.44.22.8t-.32.6a1.13 1.13 0 0 1-.64.32 1.25 1.25 0 0 1-.76-.08q-.38-.14-.64-.56l-1.38-2.22a1.84 1.84 0 0 0-.76-.7q-.46-.22-1.14-.22l1.98-.78q.94 0 1.5.34.56.32 1.08 1.14zm-5.4-2.06q-2.04 0-3.58-.9-1.52-.9-2.36-2.52-.84-1.64-.84-3.84 0-1.66.48-2.98.48-1.34 1.36-2.28a5.9 5.9 0 0 1 2.14-1.46q1.26-.52 2.8-.52 2.06 0 3.58.9 1.52.88 2.36 2.5t.84 3.82q0 1.66-.48 3a6.5 6.5 0 0 1-1.38 2.3 5.9 5.9 0 0 1-2.14 1.48q-1.24.5-2.78.5m0-2.2q1.3 0 2.2-.6.92-.6 1.4-1.74.5-1.14.5-2.72 0-2.4-1.08-3.72-1.06-1.32-3.02-1.32-1.28 0-2.2.6-.92.58-1.42 1.72-.48 1.12-.48 2.72 0 2.38 1.08 3.72t3.02 1.34m11.163 2.16q-.62 0-.96-.34-.32-.36-.32-.98V1.62q0-.64.34-.96.34-.34.96-.34h4.82q2.32 0 3.58 1.12 1.26 1.1 1.26 3.1 0 1.3-.58 2.24-.56.94-1.64 1.44t-2.62.5l.18-.3h.66q.82 0 1.42.4.621.4 1.08 1.26l1.5 2.78q.24.42.22.82a.93.93 0 0 1-.3.66q-.28.24-.82.24t-.88-.22q-.339-.24-.6-.72l-2.02-3.72q-.36-.68-.86-.9-.48-.24-1.24-.24h-1.9v4.48q0 .62-.32.98-.32.34-.96.34m1.28-7.7h3.12q1.38 0 2.08-.56.72-.58.72-1.72 0-1.12-.72-1.68-.7-.58-2.08-.58h-3.12z"})]}),qrph:e=>ue("svg",{xmlns:"http://www.w3.org/2000/svg",width:"44",height:"44",viewBox:"0 0 44 44",fill:"none",style:e,children:[ue("path",{fill:"#f4ea11",d:"M21.394 32.393c5.599 0 10.137-4.553 10.137-10.17 0-5.615-4.538-10.168-10.137-10.168s-10.138 4.553-10.138 10.169 4.539 10.169 10.138 10.169"}),ue("path",{fill:"#1f4485","fill-rule":"evenodd",d:"m23.73.545 5.235 3.8-5.236 3.799C21.811 8.085 12.962 8.12 9.4 8.136a1.545 1.545 0 0 0-1.54 1.501c-.12 3.68-.401 13.243-.284 18.174H0V7.138C0 .88 6.239.545 6.239.545z","clip-rule":"evenodd"}),ue("path",{fill:"#cf2130","fill-rule":"evenodd",d:"M35.649 16.636h7.13V35.41c-.42 4.05-3.48 6.964-7.13 8.046H20.052l-5.347-3.8 5.347-3.352s9.29-.002 13.815-.447q1.177-.51 1.336-1.788a171 171 0 0 0 .446-17.432","clip-rule":"evenodd"})]})};var uc,hc,pc={};function fc(){return hc?uc:(hc=1,uc=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then})}var _c,mc={},yc={};function bc(){if(_c)return yc;let e;_c=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 yc.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},yc.getSymbolTotalCodewords=function(e){return t[e]},yc.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},yc.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');e=t},yc.isKanjiModeEnabled=function(){return void 0!==e},yc.toSJIS=function(t){return e(t)},yc}var gc,vc,$c,xc,wc,Ec={};function Cc(){return gc||(gc=1,(e=Ec).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}}),Ec;var e}var kc,Pc={};var Ac,Nc={};var Sc,Oc={};var Tc,Ic={};function Rc(){if(Tc)return Ic;Tc=1;const e=Cc(),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 Ic.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}},Ic.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}},Ic}var Mc,Lc,Dc,Bc,qc={},Uc={};function jc(){return Lc||(Lc=1,function(e){const t=function(){if(Mc)return Uc;Mc=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]}(),Uc.log=function(e){if(e<1)throw new Error("log("+e+")");return t[e]},Uc.exp=function(t){return e[t]},Uc.mul=function(n,r){return 0===n||0===r?0:e[t[n]+t[r]]},Uc}();e.mul=function(e,n){const r=new Uint8Array(e.length+n.length-1);for(let o=0;o<e.length;o++)for(let i=0;i<n.length;i++)r[o+i]^=t.mul(e[o],n[i]);return r},e.mod=function(e,n){let r=new Uint8Array(e);for(;r.length-n.length>=0;){const e=r[0];for(let o=0;o<n.length;o++)r[o]^=t.mul(n[o],e);let o=0;for(;o<r.length&&0===r[o];)o++;r=r.slice(o)}return r},e.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let o=0;o<n;o++)r=e.mul(r,new Uint8Array([1,t.exp(o)]));return r}}(qc)),qc}var Fc,Gc={},Vc={},Kc={};function Hc(){return Fc||(Fc=1,Kc.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),Kc}var Wc,Xc,zc,Yc={};function Qc(){if(Wc)return Yc;Wc=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]))+";Yc.KANJI=new RegExp(t,"g"),Yc.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Yc.BYTE=new RegExp(n,"g"),Yc.NUMERIC=new RegExp(e,"g"),Yc.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const r=new RegExp("^"+t+"$"),o=new RegExp("^"+e+"$"),i=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return Yc.testKanji=function(e){return r.test(e)},Yc.testNumeric=function(e){return o.test(e)},Yc.testAlphanumeric=function(e){return i.test(e)},Yc}function Zc(){return Xc||(Xc=1,function(e){const t=Hc(),n=Qc();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}}}(Vc)),Vc}function Jc(){return zc||(zc=1,function(e){const t=bc(),n=Rc(),r=Cc(),o=Zc(),i=Hc(),a=t.getBCHDigit(7973);function d(e,t){return o.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 i.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,r,a){if(!i.isValid(e))throw new Error("Invalid QR Code version");void 0===a&&(a=o.BYTE);const s=8*(t.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,r));if(a===o.MIXED)return s;const l=s-d(a,e);switch(a){case o.NUMERIC:return Math.floor(l/10*3);case o.ALPHANUMERIC:return Math.floor(l/11*2);case o.KANJI:return Math.floor(l/13);case o.BYTE:default:return Math.floor(l/8)}},e.getBestVersionForData=function(t,n){let i;const a=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,o.MIXED))return r}(t,a);if(0===t.length)return 1;i=t[0]}else i=t;return function(t,n,r){for(let o=1;o<=40;o++)if(n<=e.getCapacity(o,r,t))return o}(i.mode,i.getLength(),a)},e.getEncodedBits=function(e){if(!i.isValid(e)||e<7)throw new Error("Invalid QR Code version");let n=e<<12;for(;t.getBCHDigit(n)-a>=0;)n^=7973<<t.getBCHDigit(n)-a;return e<<12|n}}(Gc)),Gc}var eu,tu={};var nu,ru,ou,iu,au,du,su,lu,cu={};var uu,hu,pu,fu={exports:{}};function _u(){return uu||(uu=1,function(e){var t={single_source_shortest_paths:function(e,n,r){var o={},i={};i[n]=0;var a,d,s,l,c,u,h,p=t.PriorityQueue.make();for(p.push(n,0);!p.empty();)for(s in d=(a=p.pop()).value,l=a.cost,c=e[d]||{})c.hasOwnProperty(s)&&(u=l+c[s],h=i[s],(void 0===i[s]||h>u)&&(i[s]=u,p.push(s,u),o[s]=d));if(void 0!==r&&void 0===i[r]){var f=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(f)}return o},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 o=t.single_source_shortest_paths(e,n,r);return t.extract_shortest_path_from_predecessor_list(o,r)},PriorityQueue:{make:function(e){var n,r=t.PriorityQueue,o={};for(n in e=e||{},r)r.hasOwnProperty(n)&&(o[n]=r[n]);return o.queue=[],o.sorter=e.sorter||r.default_sorter,o},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}(fu)),fu.exports}function mu(){return hu||(hu=1,function(e){const t=Zc(),n=function(){if(ru)return nu;ru=1;const e=Zc();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 o=this.data.length-t;o>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,3*o+1))},nu=t}(),r=function(){if(iu)return ou;iu=1;const e=Zc(),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)},ou=n}(),o=function(){if(du)return au;du=1;const e=Zc();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)},au=t}(),i=function(){if(lu)return su;lu=1;const e=Zc(),t=bc();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)}},su=n}(),a=Qc(),d=bc(),s=_u();function l(e){return unescape(encodeURIComponent(e)).length}function c(e,t,n){const r=[];let o;for(;null!==(o=e.exec(n));)r.push({data:o[0],index:o.index,mode:t,length:o[0].length});return r}function u(e){const n=c(a.NUMERIC,t.NUMERIC,e),r=c(a.ALPHANUMERIC,t.ALPHANUMERIC,e);let o,i;d.isKanjiModeEnabled()?(o=c(a.BYTE,t.BYTE,e),i=c(a.KANJI,t.KANJI,e)):(o=c(a.BYTE_KANJI,t.BYTE,e),i=[]);return n.concat(r,o,i).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,a){switch(a){case t.NUMERIC:return n.getBitsLength(e);case t.ALPHANUMERIC:return r.getBitsLength(e);case t.KANJI:return i.getBitsLength(e);case t.BYTE:return o.getBitsLength(e)}}function p(e,a){let s;const l=t.getBestModeForData(e);if(s=t.from(a,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 i(e);case t.BYTE:return new o(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 o=function(e){const n=[];for(let r=0;r<e.length;r++){const o=e[r];switch(o.mode){case t.NUMERIC:n.push([o,{data:o.data,mode:t.ALPHANUMERIC,length:o.length},{data:o.data,mode:t.BYTE,length:o.length}]);break;case t.ALPHANUMERIC:n.push([o,{data:o.data,mode:t.BYTE,length:o.length}]);break;case t.KANJI:n.push([o,{data:o.data,mode:t.BYTE,length:l(o.data)}]);break;case t.BYTE:n.push([{data:o.data,mode:t.BYTE,length:l(o.data)}])}}return n}(u(n,d.isKanjiModeEnabled())),i=function(e,n){const r={},o={start:{}};let i=["start"];for(let a=0;a<e.length;a++){const d=e[a],s=[];for(let e=0;e<d.length;e++){const l=d[e],c=""+a+e;s.push(c),r[c]={node:l,lastCount:0},o[c]={};for(let e=0;e<i.length;e++){const a=i[e];r[a]&&r[a].node.mode===l.mode?(o[a][c]=h(r[a].lastCount+l.length,l.mode)-h(r[a].lastCount,l.mode),r[a].lastCount+=l.length):(r[a]&&(r[a].lastCount=l.length),o[a][c]=h(l.length,l.mode)+4+t.getCharCountIndicator(l.mode,n))}}i=s}for(let e=0;e<i.length;e++)o[i[e]].end=0;return{map:o,table:r}}(o,r),a=s.find_path(i.map,"start","end"),c=[];for(let e=1;e<a.length-1;e++)c.push(i.table[a[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()))}}(cu)),cu}function yu(){if(pu)return mc;pu=1;const e=bc(),t=Cc(),n=function(){if($c)return vc;function e(){this.buffer=[],this.length=0}return $c=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++}},vc=e}(),r=function(){if(wc)return xc;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 wc=1,e.prototype.set=function(e,t,n,r){const o=e*this.size+t;this.data[o]=n,r&&(this.reservedBit[o]=!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]},xc=e}(),o=(kc||(kc=1,function(e){const t=bc().getSymbolSize;e.getRowColCoords=function(e){if(1===e)return[];const n=Math.floor(e/7)+2,r=t(e),o=145===r?26:2*Math.ceil((r-13)/(2*n-2)),i=[r-7];for(let e=1;e<n-1;e++)i[e]=i[e-1]-o;return i.push(6),i.reverse()},e.getPositions=function(t){const n=[],r=e.getRowColCoords(t),o=r.length;for(let e=0;e<o;e++)for(let t=0;t<o;t++)0===e&&0===t||0===e&&t===o-1||e===o-1&&0===t||n.push([r[e],r[t]]);return n}}(Pc)),Pc),i=function(){if(Ac)return Nc;Ac=1;const e=bc().getSymbolSize;return Nc.getPositions=function(t){const n=e(t);return[[0,0],[n-7,0],[0,n-7]]},Nc}(),a=(Sc||(Sc=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,o=10;function i(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,o=0,i=0,a=null,d=null;for(let s=0;s<n;s++){o=i=0,a=d=null;for(let l=0;l<n;l++){let n=e.get(s,l);n===a?o++:(o>=5&&(r+=t+(o-5)),a=n,o=1),n=e.get(l,s),n===d?i++:(i>=5&&(r+=t+(i-5)),d=n,i=1)}o>=5&&(r+=t+(o-5)),i>=5&&(r+=t+(i-5))}return r},e.getPenaltyN2=function(e){const t=e.size;let r=0;for(let n=0;n<t-1;n++)for(let o=0;o<t-1;o++){const t=e.get(n,o)+e.get(n,o+1)+e.get(n+1,o)+e.get(n+1,o+1);4!==t&&0!==t||r++}return r*n},e.getPenaltyN3=function(e){const t=e.size;let n=0,o=0,i=0;for(let r=0;r<t;r++){o=i=0;for(let a=0;a<t;a++)o=o<<1&2047|e.get(r,a),a>=10&&(1488===o||93===o)&&n++,i=i<<1&2047|e.get(a,r),a>=10&&(1488===i||93===i)&&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)*o},e.applyMask=function(e,t){const n=t.size;for(let r=0;r<n;r++)for(let o=0;o<n;o++)t.isReserved(o,r)||t.xor(o,r,i(e,o,r))},e.getBestMask=function(t,n){const r=Object.keys(e.Patterns).length;let o=0,i=1/0;for(let a=0;a<r;a++){n(a),e.applyMask(a,t);const r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(a,t),r<i&&(i=r,o=a)}return o}}(Oc)),Oc),d=Rc(),s=function(){if(Bc)return Dc;Bc=1;const e=jc();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),o=this.degree-r.length;if(o>0){const e=new Uint8Array(this.degree);return e.set(r,o),e}return r},Dc=t}(),l=Jc(),c=function(){if(eu)return tu;eu=1;const e=bc(),t=e.getBCHDigit(1335);return tu.getEncodedBits=function(n,r){const o=n.bit<<3|r;let i=o<<10;for(;e.getBCHDigit(i)-t>=0;)i^=1335<<e.getBCHDigit(i)-t;return 21522^(o<<10|i)},tu}(),u=Zc(),h=mu();function p(e,t,n){const r=e.size,o=c.getEncodedBits(t,n);let i,a;for(i=0;i<15;i++)a=1==(o>>i&1),i<6?e.set(i,8,a,!0):i<8?e.set(i+1,8,a,!0):e.set(r-15+i,8,a,!0),i<8?e.set(8,r-i-1,a,!0):i<9?e.set(8,15-i-1+1,a,!0):e.set(8,15-i-1,a,!0);e.set(r-8,8,1,!0)}function f(t,r,o){const i=new n;o.forEach(function(e){i.put(e.mode.bit,4),i.put(e.getLength(),u.getCharCountIndicator(e.mode,t)),e.write(i)});const a=8*(e.getSymbolTotalCodewords(t)-d.getTotalCodewordsCount(t,r));for(i.getLengthInBits()+4<=a&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);const l=(a-i.getLengthInBits())/8;for(let e=0;e<l;e++)i.put(e%2?17:236,8);return function(t,n,r){const o=e.getSymbolTotalCodewords(n),i=d.getTotalCodewordsCount(n,r),a=o-i,l=d.getBlocksCount(n,r),c=o%l,u=l-c,h=Math.floor(o/l),p=Math.floor(a/l),f=p+1,_=h-p,m=new s(_);let y=0;const b=new Array(l),g=new Array(l);let v=0;const $=new Uint8Array(t.buffer);for(let e=0;e<l;e++){const t=e<u?p:f;b[e]=$.slice(y,y+t),g[e]=m.encode(b[e]),y+=t,v=Math.max(v,t)}const x=new Uint8Array(o);let w,E,C=0;for(w=0;w<v;w++)for(E=0;E<l;E++)w<b[E].length&&(x[C++]=b[E][w]);for(w=0;w<_;w++)for(E=0;E<l;E++)x[C++]=g[E][w];return x}(i,t,r)}function _(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 _=f(n,d,c),m=e.getSymbolSize(n),y=new r(m);return function(e,t){const n=e.size,r=i.getPositions(t);for(let t=0;t<r.length;t++){const o=r[t][0],i=r[t][1];for(let t=-1;t<=7;t++)if(!(o+t<=-1||n<=o+t))for(let r=-1;r<=7;r++)i+r<=-1||n<=i+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(o+t,i+r,!0,!0):e.set(o+t,i+r,!1,!0))}}(y,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)}}(y),function(e,t){const n=o.getPositions(t);for(let t=0;t<n.length;t++){const r=n[t][0],o=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,o+n,!0,!0):e.set(r+t,o+n,!1,!0)}}(y,n),p(y,d,0),n>=7&&function(e,t){const n=e.size,r=l.getEncodedBits(t);let o,i,a;for(let t=0;t<18;t++)o=Math.floor(t/3),i=t%3+n-8-3,a=1==(r>>t&1),e.set(o,i,a,!0),e.set(i,o,a,!0)}(y,n),function(e,t){const n=e.size;let r=-1,o=n-1,i=7,a=0;for(let d=n-1;d>0;d-=2)for(6===d&&d--;;){for(let n=0;n<2;n++)if(!e.isReserved(o,d-n)){let r=!1;a<t.length&&(r=1==(t[a]>>>i&1)),e.set(o,d-n,r),i--,-1===i&&(a++,i=7)}if(o+=r,o<0||n<=o){o-=r,r=-r;break}}}(y,_),isNaN(s)&&(s=a.getBestMask(y,p.bind(null,y,d))),a.applyMask(s,y),p(y,d,s),{modules:y,version:n,errorCorrectionLevel:d,maskPattern:s,segments:c}}return mc.create=function(n,r){if(void 0===n||""===n)throw new Error("No input text");let o,i,d=t.M;return void 0!==r&&(d=t.from(r.errorCorrectionLevel,t.M),o=l.from(r.version),i=a.from(r.maskPattern),r.toSJISFunc&&e.setToSJISFunction(r.toSJISFunc)),_(n,o,d,i)},mc}var bu,gu,vu={},$u={};function xu(){return bu||(bu=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,o=e.scale||4;return{width:r,scale:r?4:o,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 o=n.modules.size,i=n.modules.data,a=e.getScale(o,r),d=Math.floor((o+2*r.margin)*a),s=r.margin*a,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[i[Math.floor((e-s)/a)*o+Math.floor((n-s)/a)]?1:0]}t[c++]=u.r,t[c++]=u.g,t[c++]=u.b,t[c]=u.a}}}($u)),$u}function wu(){return gu||(gu=1,function(e){const t=xu();e.render=function(e,n,r){let o=r,i=n;void 0!==o||n&&n.getContext||(o=n,n=void 0),n||(i=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),o=t.getOptions(o);const a=t.getImageWidth(e.modules.size,o),d=i.getContext("2d"),s=d.createImageData(a,a);return t.qrToImageData(s.data,e,o),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,i,a),d.putImageData(s,0,0),i},e.renderToDataURL=function(t,n,r){let o=r;void 0!==o||n&&n.getContext||(o=n,n=void 0),o||(o={});const i=e.render(t,n,o),a=o.type||"image/png",d=o.rendererOpts||{};return i.toDataURL(a,d.quality)}}(vu)),vu}var Eu,Cu,ku={};function Pu(){if(Eu)return ku;Eu=1;const e=xu();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 ku.render=function(r,o,i){const a=e.getOptions(o),d=r.modules.size,s=r.modules.data,l=d+2*a.margin,c=a.color.light.a?"<path "+t(a.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",u="<path "+t(a.color.dark,"stroke")+' d="'+function(e,t,r){let o="",i=0,a=!1,d=0;for(let s=0;s<e.length;s++){const l=Math.floor(s%t),c=Math.floor(s/t);l||a||(a=!0),e[s]?(d++,s>0&&l>0&&e[s-1]||(o+=a?n("M",l+r,.5+c+r):n("m",i,0),i=0,a=!1),l+1<t&&e[s+1]||(o+=n("h",d),d=0)):i++}return o}(s,d,a.margin)+'"/>',h='viewBox="0 0 '+l+" "+l+'"',p='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+h+' shape-rendering="crispEdges">'+c+u+"</svg>\n";return"function"==typeof i&&i(null,p),p},ku}var Au=function(){if(Cu)return pc;Cu=1;const e=fc(),t=yu(),n=wu(),r=Pu();function o(n,r,o,i,a){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?(o=r,r=i=void 0):2!==s||r.getContext||(i=o,o=r,r=void 0),new Promise(function(e,a){try{const a=t.create(o,i);e(n(a,r,i))}catch(e){a(e)}})}if(s<2)throw new Error("Too few arguments provided");2===s?(a=o,o=r,r=i=void 0):3===s&&(r.getContext&&void 0===a?(a=i,i=void 0):(a=i,i=o,o=r,r=void 0));try{const e=t.create(o,i);a(null,n(e,r,i))}catch(e){a(e)}}return pc.create=t.create,pc.toCanvas=o.bind(null,n.render),pc.toDataURL=o.bind(null,n.renderToDataURL),pc.toString=o.bind(null,function(e,t,n){return r.render(e,n)}),pc}(),Nu=Ge(Au),Su=Ge(Pu());function Ou(e,t){const n=Nu.create(e),r=Su.render(n,{margin:t.margin}),o=(new DOMParser).parseFromString(r,"image/svg+xml").documentElement;o.style.width="100%",o.style.height="100%",o.setAttribute("width",String(n.modules.size+2*t.margin)),o.setAttribute("height",String(n.modules.size+2*t.margin));const i=o.querySelector("[stroke]");i?.setAttribute("stroke",t.colors[0]);const a=o.querySelector("[fill]");return a?.setAttribute("fill",t.colors[1]),o}function Tu(){const e=new Date;return new Intl.DateTimeFormat("en-GB",{hour:"2-digit",minute:"2-digit",day:"2-digit",month:"2-digit",year:"numeric"}).format(e)}function Iu(e){return e.split("").map(e=>/[a-zA-Z0-9]/.test(e)?e.toLowerCase():"-").join("").replace(/-+/g,"-")}function Ru(e){const{amount:t,businessName:n,channelCodeForQrArt:r,channelName:o,channelLogo:i,currency:a,onAffirm:d,qrString:s,t:l}=e,[c,u]=Pe(!1),h=Te(()=>{u(!0),d()},[d]),p=Oe(()=>{try{return Ou(s,Mu)}catch(e){console.log("Error generating QR code SVG:",e);const t=document.createElement("div");return t.innerText=l("action_qr.unable_to_generate"),t}},[s,l]),f=Oe(()=>{try{const e=function(e){const{result:t,raw:n}=tc(Yl,e);t.merchantAccountInformation={};for(const e of n){const n=Number(e.key);n>=26&&n<=51&&nc(t.merchantAccountInformation,e.key,e.value)}return t}(s),t=e.merchantAccountInformation;if(!t||"string"==typeof t)return;const n=t["ID.CO.QRIS.WWW"];if(!n||"string"==typeof n)return;const r=n.nmid;return"string"==typeof r?r:void 0}catch{return}},[s]),_=Ne(!1),m=Te(e=>{if(e instanceof PointerEvent&&"touch"!==e.pointerType)return;if(_.current)return;e.currentTarget.animate?.([{transform:"scale(1)"},{transform:"scale(0.95)"},{transform:"scale(1)"}],{duration:150,easing:"ease-in-out"});const r=Ou(s,Lu),i=[Iu(n),Iu(o),Iu(a),Iu(String(t)),Iu(Tu())].join("-");_.current=!0,async function(e,t){if(!window.URL?.createObjectURL)throw new Error("Browser doesn't support URL.createObjectURL");if(!window.Blob)throw new Error("Browser doesn't support Blob");if(!document.createElement)throw new Error("Browser doesn't support createElement");const n=(new XMLSerializer).serializeToString(e),r=new Blob([n],{type:"image/svg+xml;charset=utf-8"}),o=URL.createObjectURL(r),i=new Image;return i.src=o,new Promise((e,n)=>{i.onload=function(){let r=i.naturalWidth,a=i.naturalHeight;if(0!==r)for(;r<256;)r*=2,a*=2;document.body.appendChild(i);const d=document.createElement("canvas");d.width=r,d.height=a;const s=d.getContext("2d");if(!s)return n(new Error("Failed to get canvas context"));s.drawImage(i,0,0,r,a),URL.revokeObjectURL(o);const l=d.toDataURL("image/png"),c=document.createElement("a");c.href=l,c.download=t,document.body.appendChild(c),c.click(),document.body.removeChild(c),i.remove(),e()},i.onerror=function(e){URL.revokeObjectURL(o),n(new Error("Failed to generate image"))}})}(r,`${i}.png`).catch(e=>{console.error("Error downloading QR code:",e)})},[t,n,o,a,s]);if(e.hideUi)return ue("div",{"data-testid":"qr-code",ref:e=>{!e||1===e.childNodes.length&&e.firstChild===p||e?.replaceChildren(p)}});const y=ue("div",{"data-testid":"qr-code",className:"xendit-action-qr-qrcode-container",role:"button",tabIndex:0,onClick:m,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),m(e))},ref:e=>{!e||1===e.childNodes.length&&e.firstChild===p||e?.replaceChildren(p)}}),b=ue("div",{className:"xendit-action-present-to-customer-affirm",children:[ue(Ht,{variant:Vt.WHITE_ROUNDED,disabled:c,onClick:h,className:"xendit-button-block",children:c?ue(Wt,{}):l("action.payment_made")}),ue("div",{className:"xendit-text-12 xendit-text-secondary xendit-text-center",children:l("action.payment_confirmation_instructions")})]}),g=Wo(t,a),v=rc(r);return v?ue(x,{children:[ue(v,{channelLogo:i,channelName:o,merchantName:n,amountText:g,qr:y,t:l,nmid:f}),ue("div",{style:{padding:"48px",paddingTop:"8px",paddingBottom:"24px"},children:b})]}):ue("div",{className:"xendit-action-present-to-customer",children:[ue("img",{src:i,alt:l("image_alt.channel_logo",{channelName:o}),className:"xendit-action-qr-channel-logo"}),ue("div",{className:"xendit-action-qr-content",children:[ue("div",{className:"xendit-text-16 xendit-text-center xendit-qr-merchant-info",children:ue("div",{className:"xendit-text-semibold",children:n})}),y,ue("div",{className:"xendit-text-16 xendit-text-semibold xendit-text-center",children:g})]}),b]})}const Mu={margin:0,colors:["var(--xendit-qr-foreground-color)","var(--xendit-qr-background-color)"]},Lu={margin:2,colors:["#000","#FFF"]};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)];pt(e?.type,"PRESENT_TO_CUSTOMER"),ct(this.bb.world),ct(this.bb.channel),ct(this.bb.world.paymentEntity);let t=this.bb.channel.channel_code;this.bb.mock&&"string"==typeof this.bb.channelProperties?.mock_channel_code_for_qr_art&&(t=this.bb.channelProperties.mock_channel_code_for_qr_art);const n=null!==rc(t);const r=this.bb.sdk[le].liveComponents.actionContainer,o={amount:this.bb.world.session.amount,businessName:this.bb.world.business.name??"",channelCodeForQrArt:t,channelName:this.bb.channel.brand_name,channelLogo:this.bb.channel.brand_logo_url,currency:this.bb.world.session.currency,hideUi:"true"===r?.getAttribute("data-qr-code-only")||!1,onAffirm:this.affirmPayment.bind(this),qrString:e.value,title:e.action_subtitle,t:this.bb.sdk.t.bind(this.bb.sdk)},i=n?qa.QrWithCustomArt:qa.Generic;this.cleanupFn=this.ensureHasActionContainer(i),this.populateActionContainer(()=>v(Ru,o))}affirmPayment(){this.bb.sdk.isProdLive()?this.bb.pollImmediatelyRequested=!0:this.bb.simulatePaymentRequested=!0,this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent)}exit(){super.exit()}}class ActionRedirectBehavior{bb;url;constructor(e,t){this.bb=e,this.url=t}enter(){this.bb.dispatchEvent(new XenditWillRedirectEvent),window.location.href=this.url}}const Du=K({fire:()=>{},clear:()=>{},text:""}),Bu=({children:e})=>{const[t,n]=Pe(""),r=Te(e=>{n(e);const t=setTimeout(()=>{n("")},2e3);return()=>clearTimeout(t)},[]),o=Te(()=>{n("")},[]);return ue(Du.Provider,{value:{text:t,fire:r,clear:o},children:ue("div",{style:{position:"relative"},children:e})})},qu=()=>{const{text:e,clear:t}=Ie(Du);return Ae(()=>{if(e){const e=()=>{t()};return document.body.addEventListener("mousedown",e),()=>{document.body.removeEventListener("mousedown",e)}}},[t,e]),e?ue("div",{className:"xendit-tooltip",children:e}):null};function Uu(e){const{amount:t,channelLogo:n,currency:r,onAffirm:o,vaNumber:i,merchantName:a,instructions:d,title:s,t:l}=e,[c,u]=Pe(!1),h=Te(()=>{u(!0),o()},[o]),p=[{heading:l("action_va.merchant_name"),value:a},{heading:l("action_va.virtual_account_number"),value:i,enableCopy:!0},{heading:l("action_va.amount_to_pay"),value:Wo(t,r),enableCopy:!0}];return ue("div",{className:"xendit-action-present-to-customer",children:[ue("img",{src:n,alt:"Channel Logo",className:"xendit-action-qr-channel-logo"}),ue("div",{className:"xendit-action-title",children:s}),ue("div",{className:"xendit-action-va-content",children:ue("div",{className:"xendit-action-va-details",children:p.map((e,t)=>ue("div",{className:"xendit-action-va-detail-item",children:[ue("div",{className:"xendit-action-va-detail-content",children:[ue("div",{className:"xendit-action-va-heading xendit-text-12 xendit-text-semibold",children:e.heading}),ue("div",{className:"xendit-action-va-value xendit-text-semibold",children:e.value})]}),e.enableCopy?ue(Bu,{children:[ue(ju,{value:e.value,t:l}),ue(qu,{})]}):null]},t))})}),ue("div",{className:"xendit-action-present-to-customer-affirm",children:[ue(Ht,{variant:Vt.WHITE_ROUNDED,disabled:c,onClick:h,className:"xendit-button-block",children:c?ue(Wt,{}):l("action.payment_made")}),ue("div",{className:"xendit-text-12 xendit-text-secondary xendit-text-center",children:l("action.payment_confirmation_instructions")})]}),ue(jl,{instructions:d})]})}const ju=({value:e,t:t})=>{const{fire:n}=Ie(Du);return ue(Ht,{variant:Vt.WHITE_ROUNDED,size:Kt.SM,onClick:()=>{navigator.clipboard.writeText(e),n(t("action_va.copied_to_clipboard"))},children:[t("action_va.copy"),ue(je,{name:"copy",size:16})]})};class ActionVaBehavior 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)];pt(e?.type,"PRESENT_TO_CUSTOMER"),ct(this.bb.world),ct(this.bb.channel);const t={amount:this.bb.world.session.amount,channelLogo:this.bb.channel.brand_logo_url,currency:this.bb.world.session.currency,onAffirm:this.affirmPayment.bind(this),vaNumber:e.value,merchantName:this.bb.world.business.name??"",instructions:e.instructions??[],title:e.action_title,t:this.bb.sdk.t.bind(this.bb.sdk)};this.cleanupFn=this.ensureHasActionContainer(),this.populateActionContainer(()=>v(Uu,t))}affirmPayment(){this.bb.sdk.isProdLive()?this.bb.pollImmediatelyRequested=!0:this.bb.simulatePaymentRequested=!0,this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent)}}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=Rt(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=mt(300,t.signal).then(()=>{if(this.bb.mock){const t=Mt(e).cipherText;try{return JSON.parse(atob(t))}catch{}return{schemes:["VISA"],country_codes:["ID"],require_billing_information:!1}}{const n=Mt(e).withoutValidationError;return $a(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(!_t(e))throw e});this.cardDetailsRequest={cardNumber:e,promise:n,abortController:t}}}class ChannelInvalidBehavior{bb;channelCode;constructor(e,t){this.bb=e,this.channelCode=t}enter(){}}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 PaymentEntityFailedBehavior{bb;constructor(e){this.bb=e}enter(){this.bb.submissionRequested=!1,this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent)}}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 ft(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 ft(lt),e=this.sdk.nextMockUpdate,this.sdk.nextMockUpdate=null}else try{e=await va(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=Fa(e.payment_token):e.payment_request&&(t=Fa(e.payment_request)),this.onPollResult(e,t),await ft(1)}}isPolling(){return this.started&&!this.stopped}stop(){this.started=!1,this.stopped=!0}}class PaymentEntityPendingBehavior{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(ct(this.bb.world?.paymentEntity),this.bb.world?.paymentEntity.entity.status){case"ACTIVE":case"AUTHORIZED":case"SUCCEEDED":case"PENDING":this.bb.dispatchEvent(new InternalScheduleMockUpdateEvent(Va(this.bb.world,this.bb.channel,"SUCCESS")));break;case"FAILED":case"CANCELED":case"EXPIRED":this.bb.dispatchEvent(new InternalScheduleMockUpdateEvent(Va(this.bb.world,this.bb.channel,"FAILURE")))}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 PaymentEntityRequiresActionBehavior{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 PaymentOptionsBehavior{bb;channelCode;paymentOptionsRequest=null;constructor(e,t){this.bb=e,this.channelCode=t}enter(){this.lookupPaymentOptions()}update(){this.lookupPaymentOptions()}exit(){this.abortLookupPaymentOptions()}abortLookupPaymentOptions(){this.paymentOptionsRequest&&(this.paymentOptionsRequest.abortController.abort(new AbortError),this.paymentOptionsRequest=null)}lookupPaymentOptions(){let e;if(ct(this.bb.world),ct(this.bb.channel),Gt(this.bb.channel.form,"credit_card_number")){if(e=Rt(this.bb.channelProperties)??void 0,!e)return;if(this.paymentOptionsRequest?.cardNumber===e)return;if((this.bb.channelData?.paymentOptions?.cardNumber??null)===e)return;if(e){if(!Mt(e).valid)return}}else if(this.paymentOptionsRequest||this.bb.channelData?.paymentOptions)return;this.paymentOptionsRequest&&this.abortLookupPaymentOptions();const t=new AbortController,n=async function(e,t,n,r,o,i){if(i)return mt(lt,o).then(()=>function(e,t){return{channel_code:e,country:t.country,currency:t.currency,amount:t.amount,installment_plans:[{interval:"MONTH",interval_count:1,terms:3,installment_amount:Math.floor(t.amount/3),total_amount:t.amount,description:"Unused",code:"3M",interest_rate:1},{interval:"MONTH",interval_count:1,terms:6,installment_amount:Math.floor(t.amount/6),total_amount:t.amount,description:"Unused",code:"6M",interest_rate:1},{interval:"MONTH",interval_count:1,terms:9,installment_amount:Math.floor(t.amount/9),total_amount:t.amount,description:"Unused",interest_rate:1,code:void 0}]}}(n,t));return xa(e,{channel_code:n,channel_properties:r?{card_number:r}:void 0},e.sessionAuthKey,null,o)}(this.bb.sdkKey,this.bb.world.session,this.bb.channel.channel_code,e,t.signal,this.bb.mock).then(t=>{this.bb.dispatchEvent(new InternalUpdateChannelComponentData(this.channelCode,{paymentOptions:{cardNumber:e??null,options:t}}))}).catch(e=>{if(!_t(e))throw e});this.paymentOptionsRequest={cardNumber:e??void 0,promise:n,abortController:t}}}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 SdkLoadingBehavior{bb;constructor(e){this.bb=e}enter(){}}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(this.bb.world?.succeededChannel?.channel_code||null))}}class SessionFailedBehavior{bb;constructor(e){this.bb=e}enter(){this.bb.dispatchEvent(new XenditSessionExpiredOrCanceledEvent)}}function Fu(e,t){switch(e.type){case ja.PaymentRequest:t(new XenditPaymentRequestDiscardedEvent(e.id));break;case ja.PaymentToken:t(new XenditPaymentTokenDiscardedEvent(e.id))}t(new InternalUpdateWorldState({paymentEntity:null,sessionTokenRequestId:null}))}class SessionPendingBehavior{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(){this.pollWorker.start(),this.bb.dispatchEvent(new XenditSessionPendingEvent)}exit(){this.pollWorker.stop(),ct(this.bb.world?.session);const e=this.bb.world.paymentEntity;"COMPLETED"!==this.bb.world.session.status&&e&&Fu(e,this.bb.dispatchEvent),this.bb.dispatchEvent(new XenditSessionNotPendingEvent)}onPollResult=(e,t)=>{this.bb.dispatchEvent(new InternalUpdateWorldState({session:e.session,paymentEntity:t??void 0,succeededChannel:e.succeeded_channel??null}))}}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)throw new Error("Invalid state");if(!this.bb.world.paymentEntity)throw new Error("Payment entity is missing");if(this.bb.world.paymentEntity.type!==ja.PaymentRequest)throw new Error("Payment entity is not a payment request");const e=this.bb.world?.paymentEntity.id,t=new AbortController,n=async function(e,t,n,r,o){return t?(await mt(lt,o),Wa(n.channel_code,n._mock_action_type)):await ga(e,{channel_code:n.channel_code},{sessionAuthKey:e.sessionAuthKey,paymentRequestId:r},void 0,o)}(this.bb.sdkKey,this.bb.mock,this.bb.channel,e,t.signal).then(()=>{this.bb.mock&&this.bb.world&&this.bb.dispatchEvent(new InternalScheduleMockUpdateEvent(Va(this.bb.world,this.bb.channel,"SUCCESS"))),this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent)}).catch(e=>{_t(e)||this.exited||(this.bb.simulatePaymentRequested=!1,console.error("Simulate Payment failed:",e))});this.simulationRequest={promise:n,abortController:t}}}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,ct(this.bb.world?.session);const e=this.bb.sdk.t,t=this.bb.world.paymentEntity;let n,r,o;var i;"COMPLETED"!==this.bb.world.session.status&&"PENDING"!==this.bb.world.session.status&&t&&Fu(t,this.bb.dispatchEvent),"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",!("message"in(i=this.submissionError))&&"text"in i&&"code"in i?(r=this.submissionError.text,o={type:"ERROR",code:this.submissionError.code}):(r=function(e){return[e("default_error.title"),e("default_error.message_1"),e("default_error.message_2")]}(e),o={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 o=e(Ga(t,n,"title")),i=r?e(function(e){return`failure_code.${e.toLowerCase()}`}(r),e("failure_code_unknown",{failureCode:r})):e(Ga(t,n,"subtext"));return[o,i]}(e,t.type,t.entity.status,t.entity.failure_code),o={type:"FAILURE",code:t.entity.failure_code??"UNKNOWN"}),this.bb.dispatchEvent(new XenditSubmissionEndEvent(n,r,o)),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)throw new Error("Session object missing");if(!this.bb.channel)throw new Error("Channel missing");if(this.bb.instantSubmissionError)return this.bb.submissionRequested=!1,this.submissionError=this.bb.instantSubmissionError,this.bb.instantSubmissionError=null,void this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent);const e="OPTIONAL"===this.bb.world.session.allow_save_payment_method&&this.bb.channel?.allow_save,t=this.bb.channel?.requires_customer_details&&!this.bb.world.customer,n=this.bb.world?.session?.session_type,r=this.bb.channel.channel_code,o=this.bb.channel._mock_action_type,i=this.bb.channelProperties??{},a=new AbortController,d=async function(e,t,n,r,o,i,a,d,s){let l;if(t)switch(n){case"PAY":await mt(lt,a.signal),l=Wa(r,o);break;case"SAVE":case"SUBSCRIPTION":await mt(lt,a.signal),l=function(e,t){return"PENDING"===t?{payment_token_id:`pt-${At()}`,status:"PENDING",channel_code:e,actions:Xa(t),session_token_request_id:At()}:t?{payment_token_id:`pt-${At()}`,status:"REQUIRES_ACTION",channel_code:e,actions:Xa(t),session_token_request_id:At()}:{payment_token_id:`pt-${At()}`,status:"ACTIVE",channel_code:e,actions:[],session_token_request_id:At()}}(r,o);break;default:throw new Error(`The session type ${n} is not supported.`)}else switch(n){case"PAY":l=await ba(e,{session_id:e.sessionAuthKey,channel_code:r,channel_properties:i,save_payment_method:d,customer:s},null,null,a.signal);break;case"SAVE":case"SUBSCRIPTION":l=await ya(e,{session_id:e.sessionAuthKey,channel_code:r,channel_properties:i},null,null,a.signal);break;default:throw new Error(`The session type ${n} is not supported.`)}return Fa(l)}(this.bb.sdkKey,this.bb.mock,n,r,o,i,a,e?this.bb.channelData?.savePaymentMethod??!1:void 0,t?this.bb.channelData?.customerDetails??{given_names:""}:void 0).then(e=>{switch(this.submission=null,e.type){case ja.PaymentRequest:this.bb.dispatchEvent(new XenditPaymentRequestCreatedEvent(e.id));break;case ja.PaymentToken:this.bb.dispatchEvent(new XenditPaymentTokenCreatedEvent(e.id))}this.bb.dispatchEvent(new InternalUpdateWorldState({paymentEntity:e,sessionTokenRequestId:e.entity.session_token_request_id}))}).catch(e=>{_t(e)||(console.error("Submission failed:",e),this.exited||(this.bb.submissionRequested=!1,this.submissionError=e instanceof NetworkError?{text:[e.errorResponse.error_content?.title,e.errorResponse.error_content?.message_1,e.errorResponse.error_content?.message_2].filter(e=>void 0!==e),code:e.errorResponse.error_code}:e,this.bb.dispatchEvent(new InternalBehaviorTreeUpdateEvent)))});this.submission={abortController:a,promise:d}}}function Gu(e){switch(e.sdkStatus){case"LOADING":return wa(SdkLoadingBehavior);case"ACTIVE":return wa(SdkActiveBehavior,"active",function(e){switch(ct(e.world?.session),e.world.session.status){case"ACTIVE":return wa(SessionActiveBehavior,"active",e.submissionRequested?function(e){return ct(e.world),wa(SubmissionBehavior,"submission",e.world.paymentEntity&&null!==e.world.sessionTokenRequestId?function(e){function t(){return ct(e.world?.paymentEntity),bt(e.sdk,e.world.paymentEntity.entity.actions)?function(e){ct(e.world?.paymentEntity);const t=bt(e.sdk,e.world.paymentEntity.entity.actions);ct(t);const n=e.world.paymentEntity.entity.actions.indexOf(t);return wa(ActionPaylinkBehavior,String(n))}(e):void 0}if(ct(e.world?.paymentEntity),e.hackyOvoActionLatch&&"PENDING"===e.world.paymentEntity.entity.status)return wa(PaymentEntityRequiresActionBehavior,e.world.paymentEntity.id,[wa(ActionEmptyListPushNotificationBehavior,""),t()]);switch(e.world.paymentEntity.entity.status){case"PENDING":return wa(PaymentEntityPendingBehavior);case"REQUIRES_ACTION":return wa(PaymentEntityRequiresActionBehavior,e.world.paymentEntity.id,[Vu(e),t()]);case"FAILED":case"EXPIRED":case"CANCELED":return wa(PaymentEntityFailedBehavior);case"ACCEPTING_PAYMENTS":throw new Error("Status ACCEPTING_PAYMENTS should not happen");case"AUTHORIZED":case"ACTIVE":case"SUCCEEDED":return wa(PaymentEntityPendingBehavior,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;if(e.channelIsDigitalWallet)return;const t=function(e,t,n,r){n||(n={});for(const o of Xi(e,t.form,n,r))if(ti(o,n))return!1;const o=t.card?.brands,i=r?.cardDetails?.details?.schemes;if(o?.length&&i?.length){const e=o.map(e=>e.name);if(!i.some(t=>e.includes(t)))return!1}return!0}(e.world.session.session_type,e.channel,e.channelProperties,e.channelData),n=e.channel.requires_customer_details&&!e.world.customer;let r=!0;n&&(r=0!==e.channelData?.customerDetails?.given_names?.trim().length);const o=wa(t&&r?ChannelValidBehavior:ChannelInvalidBehavior),i=Gt(e.channel.form,"credit_card_number")?wa(CardInfoBehavior,e.channel.channel_code):void 0,a=Gt(e.channel.form,"installment_plan")?wa(PaymentOptionsBehavior,e.channel.channel_code):void 0;return[o,i,a]}(e));case"COMPLETED":return wa(SessionCompletedBehavior);case"EXPIRED":case"CANCELED":return wa(SessionFailedBehavior,e.world.session.status);case"PENDING":return wa(SessionPendingBehavior,e.world.session.status);default:throw e.world.session.status,new Error(`Unknown session status: ${e.world.session.status}`)}}(e));case"FATAL_ERROR":return wa(SdkFatalErrorBehavior);default:throw e.sdkStatus,new Error(`Unknown SDK status: ${e.sdkStatus}`)}}function Vu(e){if(ct(e.world?.paymentEntity),e.actionCompleted)return wa(ActionCompletedBehavior);const t=yt(e.world.paymentEntity.entity.actions);if(!t)return wa(ActionEmptyListPushNotificationBehavior,"");const n=e.world.paymentEntity.entity.actions.indexOf(t),r=!!bt(e.sdk,e.world.paymentEntity.entity.actions);let o;switch(e.simulatePaymentRequested&&St(t)&&(o=wa(SimulatePaymentBehavior)),t.type){case"REDIRECT_CUSTOMER":switch(t.descriptor){case"WEB_URL":return function(e){return"REDIRECT_CUSTOMER"===e.type&&!1!==e.iframe_capable}(t)?wa(ActionIframeBehavior,t.value):r?wa(ActionDeepLinkBehavior,String(n)):wa(ActionRedirectBehavior,t.value);case"DEEPLINK_URL":return wa(ActionDeepLinkBehavior,String(n));case"WEB_GOOGLE_PAYLINK":throw new Error("Paylink actions should not be the primary action")}break;case"PRESENT_TO_CUSTOMER":switch(t.descriptor){case"QR_STRING":return wa(ActionQrBehavior,String(n),o);case"PAYMENT_CODE":return wa(ActionBarcodeBehavior,String(n),o);case"VIRTUAL_ACCOUNT_NUMBER":return wa(ActionVaBehavior,String(n),o)}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}`)}class XenditComponents extends EventTarget{t=e=>{throw new Error("Localization used before initialization; this is a bug.")};[le];constructor(e){if(super(),"undefined"==typeof window||"undefined"==typeof document)throw new Error("XenditComponents can only be instantiated in a browser");if("null"===window.location.origin)throw new Error("XenditComponents cannot be used when the page origin is null");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]!==gt&&null===$t(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[le]={sdkKey:t,options:e,worldState:null,liveComponents:{channelPicker:null,paymentChannels:new Map,actionContainer:null,digitalWalletContainer:new Map},behaviorTree:new BehaviorTree(Gu,{sdk:this,sdkKey:t,mock:this.isMock(),sdkStatus:"LOADING",sdkFatalErrorMessage:null,channel:null,channelProperties:null,channelData:null,channelIsDigitalWallet:!1,instantSubmissionError:null,dispatchEvent:this.dispatchEvent.bind(this),world:null,submissionRequested:!1,simulatePaymentRequested:!1,actionCompleted:!1,pollImmediatelyRequested:!1}),currentChannelCode:null,currentDigitalWalletSubmission:null,eventListenersPresent:new Map},jt(this),this.addEventListener("fatal-error",e=>{const t=e;this[le].eventListenersPresent.get("fatal-error")||console.error(`XenditComponents: A "fatal-error" event occurred but no event listener was attached: ${t.message}`)}),this[le].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 ma(this[le].sdkKey,this[le].sdkKey.sessionAuthKey),e.channels=e.channels.filter(e=>Ft[e.channel_code])}catch(e){return this[le].behaviorTree.bb.sdkStatus="FATAL_ERROR",this[le].behaviorTree.bb.sdkFatalErrorMessage=Ot(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,digitalWallets:e.digital_wallets??null,paymentEntity:null,sessionTokenRequestId:null,succeededChannel:e.succeeded_channel??null}))}assertInitialized(){if(!this[le].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}isProdLive(){return"pl"===this[le].sdkKey.hostId}isDevelopmentEnv(){return"pd"===this[le].sdkKey.hostId||"sd"===this[le].sdkKey.hostId}supportsSimulationScenarios(){return this.isMock()||this.isDevelopmentEnv()}findChannel(e){this.assertInitialized();return this[le].worldState.channels.find(t=>t.channel_code===e)??null}onUpdateWorldState(e){const t=e.data;this[le].worldState=xt(this[le].worldState??{},t);const n=this[le].worldState.session.locale;this.t=function(e){const t=Qo[e];return function(...n){let r,o,i={};switch(n.length){case 1:r=n[0];break;case 2:"string"==typeof n[1]?(r=n[0],o=n[1]):(r=n[0],i=n[1]);break;case 3:r=n[0],o=n[1],i=n[2];break;default:throw new Error("Invalid arguments for t function")}let a=t?.[r];return void 0===a&&void 0!==o&&(a=o),a?a.replace(/\{\{(\w+)\}\}/g,(e,t)=>i[t]?String(i[t]):""):(console.warn(`Missing localization for key: ${r} in locale: ${e}`),r)}}(n),this.behaviorTreeUpdate(),this.rerenderAllComponents()}onUpdateChannelComponentData(e){const t=e.channelCode,n=e.data,r=this[le].liveComponents.paymentChannels.get(t);r&&(r.data=xt(r.data,n),this.behaviorTreeUpdate(),this.rerenderAllComponents())}behaviorTreeUpdate(){const e=this[le].behaviorTree.bb;if("LOADING"===e.sdkStatus&&this[le].worldState&&(e.sdkStatus="ACTIVE"),e.world=this[le].worldState,this[le].currentDigitalWalletSubmission)e.channel=this.findChannel(this[le].currentDigitalWalletSubmission.channelCode),e.channelProperties=this[le].currentDigitalWalletSubmission.channelProperties,e.channelData=null,e.channelIsDigitalWallet=!0,e.instantSubmissionError=this[le].currentDigitalWalletSubmission.instantSubmissionError;else{const t=this[le].currentChannelCode?this[le].liveComponents.paymentChannels.get(this[le].currentChannelCode):null;e.channel=t?qt(t.channel[le],t.data.savePaymentMethod):null,e.channelProperties=t?t.channelProperties:null,e.channelData=t?t.data:null,e.channelIsDigitalWallet=!1}try{this[le].behaviorTree.update()}catch(e){this[le].behaviorTree.bb.sdkStatus="FATAL_ERROR",this[le].behaviorTree.bb.sdkFatalErrorMessage=Ot(e),this[le].behaviorTree.update()}}getSdkStatus(){return this[le].behaviorTree.bb.sdkStatus}rerenderAllComponents(){this.renderChannelPicker();for(const e of this[le].liveComponents.paymentChannels.keys())this.renderPaymentChannel(e);for(const e of this[le].liveComponents.digitalWalletContainer.keys())this.renderDigitalWalletComponent(e)}getSession(){return this.assertInitialized(),Jt(this[le].worldState.session)}getCustomer(){return this.assertInitialized(),this[le].worldState.customer?(e=this[le].worldState.customer)?(pt(e.type,"INDIVIDUAL"),ct(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:null;var e}getActiveChannelGroups(e){return this.assertInitialized(),function(e,t,n){const r=rn(t),o=an(e,n);return t.filter(e=>o[e.id]?.length).map(e=>en(e,o,r,n))}(this[le].worldState.channels,this[le].worldState.channelUiGroups,{options:{filter:e?.filter,filterMinMax:e?.filterMinMax??!0},session:this[le].worldState.session,pairChannels:dn(this[le].worldState.channels)})}getActiveChannels(e){return this.assertInitialized(),function(e,t,n){const r=rn(t),o=an(e,n);return e.filter(e=>on(e,n)).map(e=>nn(e,o,r,n))}(this[le].worldState.channels,this[le].worldState.channelUiGroups,{options:{filter:e?.filter,filterMinMax:e?.filterMinMax??!0},session:this[le].worldState.session,pairChannels:dn(this[le].worldState.channels)})}createChannelPickerComponent(){this[le].liveComponents.channelPicker&&this.destroyComponent(this[le].liveComponents.channelPicker);const e=document.createElement("xendit-channel-picker");return e.setAttribute("translate","no"),this[le].liveComponents.channelPicker=e,this[le].worldState&&this.renderChannelPicker(),this.setupUiEventsForChannelPicker(e),e}renderChannelPicker(){this.assertInitialized();const e=this[le].liveComponents.channelPicker;e&&V(v(st,{data:this[le].worldState,sdk:this,children:v(yn,{})}),e)}setupUiEventsForChannelPicker(e){e.addEventListener(XenditClearCurrentChannelEvent.type,e=>{this.assertInitialized();const t=e,n=this[le].currentChannelCode;if(!n)return;const r=this[le].worldState.channels.find(e=>e.channel_code===n);r&&r.ui_group===t.uiGroup&&this.setCurrentChannel(null)})}createChannelComponent(e,t=!0){if(this.assertInitialized(),!Ut(this[le].worldState.session,e[le][0]))throw new Error("Cannot create channel component: `session.amount` is outside of the channel's min/max amount.");const n=e[le][0].channel_code;t&&(this[le].currentChannelCode=n);const r=this[le].liveComponents.paymentChannels.get(n),o={current:null},i={current:null};let a;return r?a=r.element:(a=document.createElement("xendit-payment-channel"),a.setAttribute("data-channel-code",n),a.setAttribute("inert",""),a.setAttribute("translate","no"),a.style.setProperty("--xendit-channel-brand-color",e[le][0].brand_color),this.setupUiEventsForPaymentChannel(a),this[le].liveComponents.paymentChannels.set(n,{element:a,channel:e,channelProperties:null,channelFormRef:o,customerDetailsFormRef:i,data:{savePaymentMethod:!1,cardDetails:null,paymentOptions:null,customerDetails:e[le][0].requires_customer_details?{given_names:""}:null}})),this.renderPaymentChannel(n),t&&(this.behaviorTreeUpdate(),this.syncInertAttribute()),this.dispatchEvent(new InternalNeedsRerenderEvent),a}renderPaymentChannel(e){this.assertInitialized();const t=this[le].liveComponents.paymentChannels.get(e);if(!t)return;const n=t.channel;V(v(st,{data:this[le].worldState,sdk:this,children:v(ua,{channelOrPair:n[le],channelData:t.data,savePaymentMethod:t.data.savePaymentMethod,formRef:t.channelFormRef,customerDetailsFormRef:t.customerDetailsFormRef})}),t.element)}getActiveDigitalWallets(){return this.assertInitialized(),this[le].worldState.digitalWallets?function(e,t,n,r){const o=[],i=rn(n);if(e.google_pay){const n=e.google_pay.allowed_payment_methods.map(e=>{const n=t.find(t=>t.channel_code===e.channel_code);return ct(n),n}),a=an(n,r);o.push({digitalWalletCode:"GOOGLE_PAY",get channels(){return n.map(e=>nn(e,a,i,r))},[le]:!0})}return o}(this[le].worldState.digitalWallets,this[le].worldState.channels,this[le].worldState.channelUiGroups,{options:{filterMinMax:!1},pairChannels:dn(this[le].worldState.channels),session:this[le].worldState.session}):[]}createDigitalWalletComponent(e,t){this.assertInitialized();const n=this[le].liveComponents.digitalWalletContainer.get(e);n&&this.destroyComponent(n.element);const r=document.createElement("xendit-digital-wallet");return r.setAttribute("translate","no"),r.style.setProperty("display","none"),this[le].liveComponents.digitalWalletContainer.set(e,{element:r,options:t}),this.renderDigitalWalletComponent(e),r}renderDigitalWalletComponent(e){this.assertInitialized();const t=this[le].liveComponents.digitalWalletContainer.get(e);t&&V(v(st,{data:this[le].worldState,sdk:this,children:v(fn,{digitalWalletCode:e,digitalWalletOptions:t.options})}),t.element)}getCurrentChannel(){const e=this[le].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){if(this[le].behaviorTree.bb.submissionRequested)throw new Error("Cannot change the payment channel while a submission is in progress.");const t=this[le].currentChannelCode,n=e?.[le][0].channel_code??null;if(t!==n){if(this[le].currentChannelCode=n,e&&n){(this[le].liveComponents.paymentChannels.get(n)??null)||this.createChannelComponent(e,!1)}this.behaviorTreeUpdate(),this.syncInertAttribute(),this.renderChannelPicker()}}syncInertAttribute(){const e=this[le].behaviorTree.bb.submissionRequested,t=this[le].liveComponents.paymentChannels;for(const[n,r]of t){(Array.isArray(r.channel.channelCode)?r.channel.channelCode[0]:r.channel.channelCode)!==this[le].currentChannelCode||e?r.element.setAttribute("inert",""):r.element.hasAttribute("inert")&&r.element.removeAttribute("inert")}const n=this[le].liveComponents.channelPicker;n&&(e?n.setAttribute("inert",""):n.removeAttribute("inert"))}setupUiEventsForPaymentChannel(e){e.addEventListener(XenditChannelPropertiesChangedEvent.type,e=>{const t=e,n=t.channel,r=this[le].liveComponents.paymentChannels.get(n);r&&(r.channelProperties=t.channelProperties,this.behaviorTreeUpdate())})}showValidationErrors(){if(!this[le].behaviorTree.findBehavior(ChannelInvalidBehavior))return;const e=this[le].currentChannelCode;if(!e)return;const t=this[le].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();const r=t.customerDetailsFormRef.current;r?.setAllFieldsTouched()}createActionContainerComponent(e){this.assertInitialized();const t=e===le,n=t?void 0:e,r=this[le].behaviorTree.findBehavior(PaymentEntityRequiresActionBehavior);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.");this[le].liveComponents.actionContainer&&this.destroyComponent(this[le].liveComponents.actionContainer);const o=document.createElement("xendit-action-container");return o.setAttribute("translate","no"),n?.qrCode&&void 0!==n.qrCode.qrCodeOnly&&o.setAttribute("data-qr-code-only",n.qrCode.qrCodeOnly.toString()),this[le].liveComponents.actionContainer=o,o}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[le].liveComponents.channelPicker===e)return this[le].liveComponents.channelPicker=null,V(null,e),void e.remove();for(const[t,n]of this[le].liveComponents.paymentChannels)if(n.element===e)return this[le].liveComponents.paymentChannels.delete(t),this[le].currentChannelCode===t&&this.setCurrentChannel(null),V(null,e),void e.remove();if(this[le].liveComponents.actionContainer===e)return this[le].liveComponents.actionContainer=null,V(null,e),void e.remove();for(const[t,n]of this[le].liveComponents.digitalWalletContainer)if(n.element===e)return this[le].liveComponents.digitalWalletContainer.delete(t),V(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[le].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[le].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[le].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[le].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[le].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[le].behaviorTree.bb.submissionRequested=!0,this.behaviorTreeUpdate(),this.syncInertAttribute()}submitDigitalWallet(e,t,n,r=null){this.assertInitialized(),this.setCurrentChannel(null),this[le].currentDigitalWalletSubmission={digitalWalletCode:e,channelCode:t[le][0].channel_code,channelProperties:n,instantSubmissionError:r},this.addEventListener(XenditSubmissionEndEvent.type,()=>{this[le].currentDigitalWalletSubmission=null},{once:!0}),this[le].behaviorTree.bb.submissionRequested=!0,this.behaviorTreeUpdate(),this.syncInertAttribute()}abortSubmission(){this.assertInitialized();this[le].behaviorTree.findBehavior(SubmissionBehavior)&&(this[le].behaviorTree.bb.submissionRequested=!1,this.behaviorTreeUpdate())}simulatePayment(){if(this.assertInitialized(),"PAY"!==this[le].worldState.session.session_type)throw new Error('Unable to simulate payment, the session type is not "PAY".');if(!this[le].behaviorTree.findBehavior(PaymentEntityRequiresActionBehavior))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[le].worldState.paymentEntity;if(!e)throw new Error("The PeRequiresActionBehavior is present but there is no payment entity. This is a bug, please contact support.");if(!this.findChannel(e.entity.channel_code))throw new Error("Channel not found; this is a bug, please contact support.");const t=yt(e.entity.actions);if(!t||!St(t))throw new Error("Unable to simulate payment; the action does not support simulation.");this[le].behaviorTree.bb.simulatePaymentRequested=!0,this.behaviorTreeUpdate()}pollImmediately(){if(this.assertInitialized(),"ACTIVE"!==this[le].worldState.session.status)throw new Error("Unable to poll immediately; the session is not longer active.");this[le].behaviorTree.bb.pollImmediatelyRequested=!0,this.behaviorTreeUpdate()}getState(){const e=this[le].currentChannelCode,t=this[le].liveComponents.paymentChannels.get(e??"");return{channelCode:e,channelProperties:t?.channelProperties||null,behaviorTree:this[le].behaviorTree}}addEventListener(e,t,n){return this[le].eventListenersPresent.set(e,!0),super.addEventListener(e,t,n)}removeEventListener(e,t,n){return super.removeEventListener(e,t,n)}static amountFormat=Ku}class XenditComponentsTest extends XenditComponents{nextMockUpdate=null;constructor(e){super({...e,componentsSdkKey:`session-${Pt(32)}-mock-MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEyCADI5pdf6KmN8+Fxl2ES3yolUKXunNeY3gGScGNEvDcrcHAPKxIInAo5DVnDvTtYtqZvx/bu7HLeBJNMXwHhie/uyNEtT8dSaLc9bd0WSlYdxI+iUsTv2Qu0LiiPrZs-NKf7whM9meUs/eRCvG0oc180MDiyeli3kH6EQ3ZahECHsZQi5G2IpH6vk3cYMtf01Y1L4OBn1SZCOv1kwpjIUet4DJeoTwwq2nM5b+K7rD+/WFTi3AEX4NWJNkKi0a91`}),this.addEventListener(InternalScheduleMockUpdateEvent.type,this.setNextMockUpdate.bind(this))}async initializeAsync(){await ft(lt);const e=(await Promise.resolve().then(function(){return Hu})).makeTestBffData();this.dispatchEvent(new InternalUpdateWorldState({business:e.business,customer:e.customer,session:e.session,channels:e.channels,channelUiGroups:e.channel_ui_groups,digitalWallets:e.digital_wallets??null,paymentEntity:null,sessionTokenRequestId:null,succeededChannel:null}))}isMock(){return!0}setNextMockUpdate(e){const t=e;this.nextMockUpdate=t.mockData}}function Ku(e,t){return Wo(e,t)}"undefined"==typeof window||"undefined"==typeof document||(se||(se=!0,n.debounceRendering=e=>queueMicrotask(e)),function(){const e=document.createElement("style");e.textContent="/* variables */\n:root {\n --xendit-font-family: 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-card-shadow: 0px 4px 8px 0px #25252514;\n --xendit-dialog-shadow: 8px 8px 12px 8px #25252529;\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 --xendit-z-index-overlay: 3;\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 /* QR code colors */\n --xendit-qr-foreground-color: #000000;\n --xendit-qr-background-color: #ffffff;\n\n /* icon colors */\n --xendit-color-icon-primary: #7c7c7c;\n --xendit-color-icon-secondary: #f1f1f1;\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);\n color: var(--xendit-color-text);\n touch-action: manipulation;\n transition: filter var(--xendit-animation-duration)\n var(--xendit-animation-ease);\n}\n\n.xendit-default-action-container {\n font-family: var(--xendit-font-family);\n touch-action: manipulation;\n}\n\nxendit-action-container {\n position: relative;\n flex: 1; /* Action container usually wants to stretch to fit, assuming the parent is a flexbox. */\n touch-action: manipulation;\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-link {\n color: var(--xendit-color-primary);\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.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: 0;\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: var(--xendit-focus-shadow);\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 digital wallet section */\n\n.xendit-channel-picker-digital-wallet-section {\n display: grid;\n grid-auto-flow: column;\n grid-auto-columns: 1fr;\n gap: 8px;\n margin-bottom: 8px;\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: var(--xendit-focus-shadow);\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],\nxendit-channel-picker[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-container {\n display: flex;\n justify-content: space-between;\n gap: 16px;\n}\n\n.xendit-channel-form-field-group label {\n width: fit-content;\n cursor: pointer;\n}\n\n.xendit-form-field-group.invalid\n .xendit-channel-form-field\n .xendit-form-field-inner {\n border: 1px solid var(--xendit-color-danger);\n}\n\n.xendit-channel-form-field .xendit-form-field-inner {\n border: 1px solid var(--xendit-color-border);\n background: var(--xendit-color-background);\n border-radius: 8px;\n appearance: none;\n}\n\n.xendit-channel-form-field.field-radius-tl-0 .xendit-form-field-inner {\n border-top-left-radius: 0;\n}\n\n.xendit-channel-form-field.field-radius-tr-0 .xendit-form-field-inner {\n border-top-right-radius: 0;\n}\n\n.xendit-channel-form-field.field-radius-bl-0 .xendit-form-field-inner {\n border-bottom-left-radius: 0;\n}\n\n.xendit-channel-form-field.field-radius-br-0 .xendit-form-field-inner {\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 .xendit-form-field-inner {\n margin-top: var(--xendit-border-collapse-offset);\n}\n\n.xendit-channel-form-field.field-collapse-b .xendit-form-field-inner {\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\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 .xendit-form-field-inner:focus,\n.xendit-channel-form-field .xendit-form-field-inner.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 position: relative;\n}\n\n.xendit-channel-form-field button.xendit-dropdown-open {\n z-index: var(--xendit-z-index-focus);\n}\n\n.xendit-channel-form-field input.xendit-form-field-inner {\n padding: 12px;\n}\n\n.xendit-channel-form-field .xendit-iframe-container {\n display: flex;\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.xendit-checkbox input:focus + .xendit-checkbox-graphic {\n border: 1px solid var(--xendit-color-primary);\n box-shadow: var(--xendit-focus-shadow);\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 position: relative;\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 display: flex;\n background: none;\n border: none;\n color: var(--xendit-color-text);\n cursor: pointer;\n padding: 0;\n}\n\n.xendit-dialog-floating-close {\n display: none;\n}\n\n.xendit-dialog .xendit-dialog-floating-close {\n display: flex;\n}\n\n.xendit-dialog-floating-close {\n position: absolute;\n top: 24px;\n right: 24px;\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: 24px;\n background-color: var(--xendit-color-background);\n border-radius: 8px;\n box-shadow: var(--xendit-dialog-shadow);\n}\n\n.xendit-error-message {\n color: var(--xendit-color-danger);\n}\n\n/* Phone input Dropdown */\n.xendit-input-phone {\n display: flex;\n gap: 8px;\n}\n\n.xendit-phone-number-input {\n width: 100%;\n}\n\n/* Phone input Dropdown ends */\n\n/* Dropdown */\n.xendit-dropdown {\n width: 100%;\n display: grid;\n grid-template-columns: 1fr auto;\n align-items: center;\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 cursor: pointer;\n padding: 0;\n outline: none;\n overflow: hidden;\n}\n\n.xendit-dropdown: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 position: relative;\n}\n\n.xendit-dropdown.xendit-dropdown-has-asset {\n grid-template-columns: auto 1fr auto;\n padding-left: 12px;\n}\n\n.xendit-dropdown-channel-logo {\n height: 24px;\n width: 32px;\n object-fit: contain;\n padding: 2px 0px;\n padding-right: 12px;\n border-right: 1px solid var(--xendit-color-border);\n}\n\n.xendit-dropdown-text {\n padding: 12px;\n padding-right: 0;\n white-space: nowrap;\n overflow: clip;\n}\n\n.xendit-dropdown-chevron {\n height: 38px;\n width: 38px;\n padding: 12px;\n box-sizing: border-box;\n}\n\n.xendit-dropdown:disabled {\n background: var(--xendit-color-disabled);\n cursor: default;\n}\n\n.xendit-dropdown-overlay {\n contain: style;\n position: absolute;\n z-index: var(--xendit-z-index-overlay);\n display: flex;\n flex-direction: column;\n gap: 4px;\n max-height: 320px;\n padding: 4px;\n margin: 4px 0;\n box-sizing: border-box;\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: var(--xendit-card-shadow);\n overflow-y: auto;\n overscroll-behavior: none;\n}\n\n.xendit-dropdown-overlay ul {\n list-style: none;\n padding: 4px;\n margin: 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 padding: 8px;\n border: 1px solid var(--xendit-color-border);\n border-radius: var(--xendit-radius-1);\n box-sizing: border-box;\n outline: none;\n}\n\n.xendit-dropdown-search input:focus {\n border-color: var(--xendit-color-primary);\n box-shadow: var(--xendit-focus-shadow);\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-white-rounded:hover {\n background-color: var(--xendit-color-border);\n}\n.xendit-button-block {\n width: 100%;\n}\n.xendit-button-sm {\n padding: 8px 12px;\n font-size: 12px;\n line-height: 16px;\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.xendit-skeleton-field button {\n height: 42px;\n background-color: var(--xendit-color-disabled);\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--xendit-color-text-secondary);\n}\n\n/* Button ends */\n\n/* Form Simulation Helper */\n.xendit-form-simulation-root {\n position: relative;\n}\n.xendit-form-simulation-trigger {\n background: transparent;\n border: none;\n cursor: pointer;\n padding: 0;\n}\n.xendit-form-simulation-popover {\n position: absolute;\n top: 100%;\n right: 0;\n\n width: 350px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n border-radius: 4px;\n padding: 12px;\n border: 1px solid var(--xendit-color-border);\n background: color-mix(\n in srgb,\n var(--xendit-color-background),\n transparent 40%\n );\n backdrop-filter: blur(6px);\n box-shadow: var(--xendit-card-shadow);\n}\n\n.xendit-form-simulation-popover .xendit-dropdown-overlay {\n width: auto;\n}\n\n.xendit-form-simulation-scenario-icon {\n height: 28px;\n width: 40px;\n border-radius: 4px;\n border: 1px solid var(--xendit-color-border);\n object-fit: contain;\n background-color: white;\n}\n\n/* Form Simulation Helper ends */\n\n.xendit-tooltip {\n position: absolute;\n top: 100%;\n right: 50%;\n transform: translateX(50%);\n background-color: black;\n color: white;\n padding: 8px 12px;\n border-radius: var(--xendit-radius-1);\n white-space: nowrap;\n z-index: 1000;\n font-weight: 600;\n font-size: 14px;\n line-height: 16px;\n animation: xendit-tooltip-fade-in var(--xendit-animation-duration)\n var(--xendit-animation-ease);\n opacity: 1;\n}\n\n@keyframes xendit-tooltip-fade-in {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n/* Instructions */\n\n.xendit-instructions-bold {\n font-weight: 600;\n}\n.xendit-instructions-bullet-list {\n display: flex;\n flex-direction: column;\n gap: 12px;\n margin: 8px 0;\n}\n.xendit-instructions-bullet-list::marker {\n color: var(--xendit-color-text-secondary);\n}\n.xendit-instructions-form-card {\n display: flex;\n flex-direction: column;\n padding: 16px;\n border-radius: 12px;\n border: 1px solid var(--xendit-color-border);\n gap: 4px;\n width: 321px;\n}\n.xendit-instructions-form-field {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 8px 0;\n border-bottom: 1px solid var(--xendit-color-border);\n}\n.xendit-instructions-form-field-label {\n font-size: 12px;\n font-weight: 600;\n line-height: 16px;\n color: var(--xendit-color-text-secondary);\n}\n.xendit-instructions-form-field-value {\n font-size: 14px;\n line-height: 20px;\n color: var(--xendit-color-text);\n}\n.xendit-instructions-form-heading {\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n margin: 4px 0;\n}\n.xendit-instructions-italics {\n font-style: italic;\n}\n.xendit-instructions-numbered-list {\n display: flex;\n flex-direction: column;\n gap: 16px;\n list-style-type: decimal;\n padding-left: 40px;\n}\n.xendit-instructions-single-tab-heading {\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n margin-bottom: 16px;\n}\n.xendit-instructions-step-box {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.xendit-instructions-step-li {\n font-size: 14px;\n line-height: 20px;\n}\n.xendit-instructions-step-li p {\n margin: 0;\n}\n.xendit-instructions-step-li::marker {\n margin-left: 20px;\n}\n.xendit-instructions-tab-button {\n font-family: var(--xendit-font-family);\n font-size: 14px;\n padding: 8px 4px;\n background-color: transparent;\n border: none;\n border-top: 3px solid transparent;\n border-bottom: 3px solid transparent;\n cursor: pointer;\n}\n.xendit-instructions-active-tab {\n border-bottom-color: var(--xendit-color-primary);\n color: var(--xendit-color-primary);\n font-weight: 600;\n}\n.xendit-instructions-tab-list {\n display: flex;\n gap: 16px;\n margin-bottom: 16px;\n border-bottom: 1px solid var(--xendit-color-border);\n}\n.xendit-instructions-table {\n font-size: 14px;\n line-height: 16px;\n width: 100%;\n border-collapse: collapse;\n}\n.xendit-instructions-table-cell {\n padding: 4px;\n border: 1px solid black;\n}\n.xendit-instructions-table-header {\n font-size: 14px;\n font-weight: 600;\n line-height: 16px;\n padding: 4px;\n border: 1px solid black;\n}\n\n/* Instructions ends */\n\n.xendit-default-action-container {\n display: flex;\n flex-direction: column;\n border: none;\n}\n\n.xendit-action-title {\n font-weight: 600;\n font-size: 20px;\n line-height: 28px;\n text-align: center;\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 gap: 16px;\n}\n.xendit-action-present-to-customer-affirm {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n/* qr actions */\n.xendit-action-qr-content {\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 12px;\n max-width: 384px;\n border: 1px solid var(--xendit-color-border);\n border-radius: var(--xendit-radius-1);\n padding: 16px;\n overflow: hidden;\n}\n.xendit-qr-merchant-info {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 4px;\n}\n.xendit-action-qr-channel-logo {\n height: 64px;\n align-self: center;\n object-fit: contain;\n}\n.xendit-action-qr-qrcode-container {\n width: 100%;\n position: relative;\n z-index: var(--xendit-z-index-overlay);\n}\n\n/* barcode actions */\n.xendit-action-barcode-channel-logo {\n height: 64px;\n align-self: center;\n object-fit: contain;\n}\n.xendit-action-barcode-barcode-container {\n width: 100%;\n position: relative;\n z-index: var(--xendit-z-index-overlay);\n display: flex;\n justify-content: center;\n}\n\n/* va actions */\n.xendit-action-va-content,\n.xendit-action-barcode-content {\n display: flex;\n flex-direction: column;\n border: 1px solid var(--xendit-color-border);\n border-radius: var(--xendit-radius-1);\n padding: 16px;\n padding-bottom: 24px;\n}\n.xendit-action-va-details,\n.xendit-action-barcode-details {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n.xendit-action-va-detail-item,\n.xendit-action-barcode-detail-item {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n.xendit-action-va-detail-content,\n.xendit-action-barcode-detail-content {\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.xendit-action-va-heading,\n.xendit-action-barcode-heading {\n color: var(--xendit-color-text-placeholder);\n}\n.xendit-action-va-tag {\n color: var(--xendit-color-text-placeholder);\n background-color: #fafafa;\n padding: 2px 4px;\n border-radius: 4px;\n}\n\n/* redirect, deeplink, and push notification actions */\n.xendit-redirect-instructions {\n display: flex;\n flex-direction: column;\n align-items: center;\n text-align: center;\n gap: 24px;\n}\n\n.xendit-redirect-instructions-logo {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 112px;\n height: 112px;\n border: 2px solid var(--xendit-color-border);\n border-radius: 50%;\n overflow: hidden;\n box-shadow: var(--xendit-card-shadow);\n}\n\n.xendit-redirect-instructions-logo img {\n width: 96px;\n height: 96px;\n object-fit: contain;\n}\n\n.xendit-redirect-instructions-text {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.xendit-redirect-instructions-button {\n display: inline-block;\n border-radius: 99px;\n color: white;\n padding: 12px 16px;\n background-color: var(--xendit-channel-brand-color, #000);\n text-decoration: none;\n white-space: nowrap;\n box-shadow: var(--xendit-card-shadow);\n}\n\n.xendit-redirect-instructions-button:hover,\n.xendit-redirect-instructions-button:active {\n filter: brightness(1.1);\n}\n\n/* googlepay */\n\n.gpay-card-info-container-fill {\n display: flex;\n}\n";const t=document.querySelector("style, link");t?t.insertAdjacentElement("beforebegin",e):document.head.appendChild(e)}());var Hu=Object.freeze({__proto__:null,makeTestBffData:function(){const e=(new Date).toISOString(),t=new Date(Date.now()+2592e6).toISOString();return{session:{payment_session_id:`ps-${Pt(24)}`,created:e,updated:e,status:"ACTIVE",reference_id:At(),description:"Test session",currency:"IDR",amount:1e4,country:"ID",expires_at:t,session_type:"PAY",mode:"COMPONENTS",locale:"en",business_id:Pt(24),customer_id:`cust-${At()}`,capture_method:"AUTOMATIC",allow_save_payment_method:"OPTIONAL",items:[{reference_id:At(),type:"DIGITAL_PRODUCT",name:"Item 1",net_unit_amount:5e4,quantity:1,category:""},{reference_id:At(),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-${At()}`,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",pm_type:"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},{label:"Installment plan",placeholder:"Select installment plan",type:{name:"installment_plan"},channel_property:["installment_configuration.terms","installment_configuration.interval","installment_configuration.code"],required:!1,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 (Redirect action)",channel_code:"MOCK_EWALLET",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",pm_type:"EWALLET",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 has a redirect action."]},{brand_name:"Mock E-Wallet Channel (Redirect and Paylink actions)",channel_code:"MOCK_EWALLET_PAYLINK",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",pm_type:"EWALLET",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","PAYLINK"],form:[],instructions:["Mock E-Wallet channel","This mock channel has a redirect and a paylink action."]},{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",pm_type:"EWALLET",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 (Deeplink action)",channel_code:"MOCK_EWALLET_DEEP_LINK",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",pm_type:"EWALLET",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,_mock_action_type:"DEEP_LINK",form:[],instructions:["Mock E-Wallet channel","This mock channel has a deeplink action."]},{brand_name:"Mock E-Wallet Channel (Push notification action)",channel_code:"MOCK_EWALLET_PUSH_NOTIFICATION",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",pm_type:"EWALLET",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,_mock_action_type:"PUSH_NOTIFICATION",form:[],instructions:["Mock E-Wallet channel","This mock channel shows a message prompting the user to tap a push notification."]},{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",pm_type:"EWALLET",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",pm_type:"QR_CODE",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."]},{brand_name:"Mock QR Channel (Custom Art)",channel_code:"MOCK_QR_CUSTOM_ART",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",pm_type:"QR_CODE",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:[{label:"QR Style",placeholder:"Select",type:{name:"dropdown",options:[{label:"QRIS",value:"QRIS"},{label:"PayNow",value:"SGQR"},{label:"Duitnow QR",value:"DUITNOW_QR"},{label:"PromptPay",value:"PROMPTPAY"},{label:"QRPH",value:"QRPH"}]},channel_property:"mock_channel_code_for_qr_art",required:!1,span:2}],instructions:["Mock QR channel","This mock channel has a QR action with branded layouts. You can choose what branded layout to use."]},{brand_name:"Mock Direct Debit Channel",channel_code:"MOCK_DIRECT_DEBIT",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",pm_type:"DIRECT_DEBIT",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 FPX Business Channel",channel_code:"MOCK_FPX_BUSINESS",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",pm_type:"ONLINE_BANKING",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,_mock_action_type:"PENDING",form:[],instructions:["Mock FPX channel","This mock channel behaves similarly to production FPX channels. It has a banner and it will enter the pending state after submission."],banner:{image_url:"https://assets.xendit.co/payment-session/banners/fpx-banner.svg",alt_text:"FPX Pay with Online Banking",aspect_ratio:9.7}},{brand_name:"Mock OTC Channel",channel_code:"MOCK_OTC",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",pm_type:"OVER_THE_COUNTER",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:"Mock VA Channel",channel_code:"MOCK_VA",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",pm_type:"VIRTUAL_ACCOUNT",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,_mock_action_type:"VA",form:[],instructions:["Mock VA channel","This mock channel behaves similarly to production VA channels."]},{brand_name:"Mock Installments Channel",channel_code:"MOCK_INSTALLMENTS",brand_logo_url:"https://placehold.co/48x48.png?text=Logo",ui_group:"other",pm_type:"CARDS_INSTALLMENT",allow_pay_without_save:!1,allow_save:!1,brand_color:"#000000",min_amount:1e3,max_amount:1e8,requires_customer_details:!1,form:[{label:"Installment plan",placeholder:"Select installment plan",type:{name:"installment_plan"},channel_property:["installment_configuration.terms","installment_configuration.interval","installment_configuration.code"],required:!1,span:2}],instructions:["Mock Installments channel","This mock channel behaves similarly to production installment channels in Thailand."]},{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"},{label:"Option 4",value:"option_4",subtitle:"With subtitle"},{label:"Option 5",value:"option_5",subtitle:"With subtitle"}]},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:"Initial Value Test",channel_code:"UI_INITIAL_VALUE_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:"Text",placeholder:"Text",type:{name:"text",max_length:50},channel_property:"text_field",required:!1,span:2,initial_value:"Initial value"},{label:"Phone Number",placeholder:"123 123 123",type:{name:"phone_number"},channel_property:"phone_number_field",required:!1,span:2,initial_value:"+6581234567"},{label:"Email",placeholder:"test@example.com",type:{name:"email"},channel_property:"email_field",required:!1,span:2,initial_value:"initial_value@test.com"},{label:"Postal Code",placeholder:"123456",type:{name:"postal_code"},channel_property:"postal_code_field",required:!1,span:2,initial_value:"123456"},{label:"Country",placeholder:"Select",type:{name:"country"},channel_property:"country_field",required:!1,span:2,initial_value:"SG"},{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,initial_value:"option_2"}],instructions:["This test demonstrates initial field values.","All fields here should be populated by default."]},{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,initial_value:"US"},{label:"State / Province",placeholder:"State / Province",type:{name:"province"},channel_property:"province_field",required:!0,span:2,join:!0,initial_value:"CA"},{group_label:"Country + State/Province Fields (Horizontal Grouping)",label:"Country",placeholder:"Country",type:{name:"country"},channel_property:"country_field_2",required:!0,span:1,initial_value:"AU"},{label:"State / Province",placeholder:"State / Province",type:{name:"province"},channel_property:"province_field_2",required:!0,span:1,join:!0,initial_value:"NSW"}],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/512x32.svg?text=Banner",alt_text:"",aspect_ratio:16},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"}],digital_wallets:{google_pay:{merchant_id:"mock-googlepay-merchant-id",allowed_payment_methods:[{channel_code:"CARDS",payment_request_id:`pr-${Pt(32)}`,payment_method_specification:{type:"CARD",parameters:{billingAddressRequired:!0,allowedAuthMethods:["PAN_ONLY","CRYPTOGRAM_3DS"],allowedCardNetworks:["AMEX","MASTERCARD","VISA"]},tokenizationSpecification:{type:"PAYMENT_GATEWAY",parameters:{gateway:"xendit",gatewayMerchantId:"exampleGatewayMerchantId"}}}}]}}}}});e.XenditActionBeginEvent=XenditActionBeginEvent,e.XenditActionEndEvent=XenditActionEndEvent,e.XenditComponents=XenditComponents,e.XenditComponentsTest=XenditComponentsTest,e.XenditFatalErrorEvent=XenditFatalErrorEvent,e.XenditInitEvent=XenditInitEvent,e.XenditNotReadyEvent=XenditNotReadyEvent,e.XenditPaymentRequestCreatedEvent=XenditPaymentRequestCreatedEvent,e.XenditPaymentRequestDiscardedEvent=XenditPaymentRequestDiscardedEvent,e.XenditPaymentTokenCreatedEvent=XenditPaymentTokenCreatedEvent,e.XenditPaymentTokenDiscardedEvent=XenditPaymentTokenDiscardedEvent,e.XenditReadyEvent=XenditReadyEvent,e.XenditSessionCompleteEvent=XenditSessionCompleteEvent,e.XenditSessionExpiredOrCanceledEvent=XenditSessionExpiredOrCanceledEvent,e.XenditSessionNotPendingEvent=XenditSessionNotPendingEvent,e.XenditSessionPendingEvent=XenditSessionPendingEvent,e.XenditSubmissionBeginEvent=XenditSubmissionBeginEvent,e.XenditSubmissionEndEvent=XenditSubmissionEndEvent,e.XenditWillRedirectEvent=XenditWillRedirectEvent,e.amountFormat=Ku});
|
|
8
8
|
//# sourceMappingURL=index.umd.js.map
|