@gala-chain/launchpad-sdk 7.0.0-beta.3 → 7.0.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/README.md +2 -0
  2. package/dist/LaunchpadSDK.d.ts +10 -8
  3. package/dist/LaunchpadSDK.d.ts.map +1 -1
  4. package/dist/api/dto/BondingCurveDTOs.d.ts +2 -2
  5. package/dist/api/dto/BondingCurveDTOs.d.ts.map +1 -1
  6. package/dist/api/dto/BurnTokensDto.d.ts +1 -1
  7. package/dist/api/dto/BurnTokensDto.d.ts.map +1 -1
  8. package/dist/api/dto/LockTokenDto.d.ts +1 -1
  9. package/dist/api/dto/LockTokenDto.d.ts.map +1 -1
  10. package/dist/api/dto/TransferTokenDto.d.ts +1 -1
  11. package/dist/api/dto/TransferTokenDto.d.ts.map +1 -1
  12. package/dist/api/dto/UnlockTokenDto.d.ts +1 -1
  13. package/dist/api/dto/UnlockTokenDto.d.ts.map +1 -1
  14. package/dist/bridge/strategies/EthereumBridgeStrategy.d.ts.map +1 -1
  15. package/dist/constants/version.generated.d.ts +1 -1
  16. package/dist/helpers/sdk.d.ts.map +1 -1
  17. package/dist/index.browser.esm.js +1 -1
  18. package/dist/index.cjs +1 -1
  19. package/dist/index.esm.js +1 -1
  20. package/dist/index.js +1 -1
  21. package/dist/launchpad/writes.d.ts.map +1 -1
  22. package/dist/native.cjs +1 -1
  23. package/dist/native.esm.js +1 -1
  24. package/dist/react.cjs +1 -1
  25. package/dist/react.esm.js +1 -1
  26. package/dist/schemas/user.d.ts +6 -6
  27. package/dist/schemas/user.d.ts.map +1 -1
  28. package/dist/schemas/validators.d.ts +1 -1
  29. package/dist/services/ContentReactionService.d.ts.map +1 -1
  30. package/dist/services/LaunchpadService.d.ts +1 -6
  31. package/dist/services/LaunchpadService.d.ts.map +1 -1
  32. package/dist/services/ModeratorService.d.ts.map +1 -1
  33. package/dist/services/NftCollectionService.d.ts.map +1 -1
  34. package/dist/services/UserService.d.ts +3 -10
  35. package/dist/services/UserService.d.ts.map +1 -1
  36. package/dist/signing/signers.d.ts +4 -2
  37. package/dist/signing/signers.d.ts.map +1 -1
  38. package/dist/types/backend-responses.d.ts +1 -1
  39. package/dist/types/backend-responses.d.ts.map +1 -1
  40. package/dist/types/dto.d.ts +2 -2
  41. package/dist/types/dto.d.ts.map +1 -1
  42. package/dist/types/options.dto.d.ts +10 -10
  43. package/dist/types/user.dto.d.ts +13 -5
  44. package/dist/types/user.dto.d.ts.map +1 -1
  45. package/dist/wallet/GalaChainConnectProvider.d.ts.map +1 -1
  46. package/dist/wallet.cjs +1 -1
  47. package/dist/wallet.esm.js +1 -1
  48. package/package.json +32 -27
package/dist/react.esm.js CHANGED
@@ -1 +1 @@
1
- if(void 0===globalThis.process&&(globalThis.process={env:{},versions:{},platform:"browser"}),void 0===globalThis.Buffer){var e=function(e){return"number"==typeof e||ArrayBuffer,new Uint8Array(e)};e.isBuffer=function(){return!1},e.from=function(e,t){if("string"==typeof e){if("hex"===t){var r=(e.match(/.{1,2}/g)||[]).map(function(e){return parseInt(e,16)});return new Uint8Array(r)}return(new TextEncoder).encode(e)}return e instanceof ArrayBuffer?new Uint8Array(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)},e.alloc=function(e){return new Uint8Array(e)},e.concat=function(e){for(var t=0,r=0;r<e.length;r++)t+=e[r].length;for(var n=new Uint8Array(t),i=0,o=0;o<e.length;o++)n.set(e[o],i),i+=e[o].length;return n},e.prototype=Object.create(Uint8Array.prototype),globalThis.Buffer=e}import{jsx as t}from"react/jsx-runtime";import{createContext as r,useState as n,useCallback as i,useEffect as o,useMemo as a,useContext as d}from"react";import*as s from"ethers";import{getAddress as c,Wallet as u}from"ethers";function l(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(r){if("default"!==r&&!(r in e)){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})}})}),Object.freeze(e)}const f={METAMASK:"io.metamask",METAMASK_FLASK:"io.metamask.flask",COINBASE:"com.coinbase.wallet",TRUST_WALLET:"com.trustwallet.app",PHANTOM:"app.phantom",RAINBOW:"me.rainbow",OKX:"com.okex.wallet",RABBY:"io.rabby",BRAVE:"com.brave.wallet",FRAME:"sh.frame",LEDGER:"com.ledger",ZERION:"io.zerion.wallet",GALA:"com.gala.wallet"},p={[f.METAMASK]:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIxLjU0IDQuMjJsLTguMzQgNi4yMSAxLjU0LTMuNjUtLTUuNTMtMi41MXoiIGZpbGw9IiNFMjc2MUIiLz48L3N2Zz4=",[f.GALA]:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAYAAACoYAD2AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAjWSURBVHgBzZkLVI1ZG8f/pZKjq0uK0LglIiMKU5EuBkMxUgmjL6GFSZJ7QpJx+Ujpk1Eat3KJySXjTnIpVJRPhnTSxWVaSveL1Zlnv3WshnM67wlrzX+t3T5nv3vv99d+9/O8z36OAj5DIpGoM1W2VPSp6FJp03ipmkoRlVwq9xUUFDLwGVKCnCKwAVRNqa2rc8vOLeiRkpqpcO/hY7woeI3yikrUva9DG1VV6HXqiJHDv0Uvg66oqa0VqigrX6dxUQScCDmlwLcjwfWjKuhJdq5jVMwpxMRfQP7LN7zGttPWxARbC3i4OsDCzOQuNQUS7GnwlExIgmtH1ea0zCfugdsjFeMvJLI2tFSmA/sieMV82Fqa/UFfvQhWKGuMggzAYfX19dHBYdGGm8MPoKy8El9Knm4OWO83L6+DtmaAkpLSPrQEkgDH5eQVnnTxWqVyN/3/+Brqrq+H+H1bMdCo13pa0QDIA0mAM4R5hbu/d/MW/Pn8Bb6mdHXa42hEMCyGmqwh0EDwgSRAq5wXBZfsXBcqP88tAF+1VlGBj6crvunWGf5bIvCm6C3vsZoaarh6NByDjA0XEWgImoMkwG7FpWXJ5uPddZ/l5IGPVJSV4OJgj83+P0OnvTbXVkp7d2NIFGJPXSTX9IrXPHqdOiDp5J66b7p1sSDQlKbXFD/qG7g1/ABvQAd7K9w6HYXoHQHQUBNg0679WBTwXzKwcmxatQDX4nbT6k4D3VTmXC9fF2G230Zl+niEFksgsRNdmJKS9kik0MVMZrGY5Cm6k5ohEiv8t+MiA3OHD9cFPa1EO6OOiIpLSrnrtH1EP3mvFSnqm8ucOzg0mg1Z15RNoQlkhtXkucZJKelS/1vTAQ0+zsZyKPf9wvVk+ARsR1a2UGJ/Zr0L3Z3gPdsVrVopIutZLhas3oIrSXel3oM99swrMSXamhp96An8xdoUGwFtL95Ilgqor6eDvVtWIyUhGrZWZriZ8gAWjp4YO91bKiBTbv5LLAnciX6jpuJg3Dn07dUdl2LDcO5gCHM7Esewx74r+rgWffxJ3Cbekx6795+QejMbSzOMthzC7a3id6XYfzwBd1IzwVdPaY/P9F6LQXZuSLhyC+aD+2PqBFu0UlSU2P8AzV9ZWe0j/q5Aq6hWU1NbqNnXWr227v0nA9b4eNBq5eL2vQz8/B9nLJ7bYAhXb9/H4rXb8eDRU8irbl100ZE8wQLaCu4+6yX2uUIuadQIU0u6VxL7V4bEJVyWCMjE/F5seBBUVVvDb8NO9Bw+CcfOXIb1cFOknT+IqG3+0OnQDnxl0LUzAhbPRsrZfRg5bLDUfldu3WPVGPaHQdqkZjyRNfcHCxPSPnOetxL2rgvwPDcfs5x/QOr5/dyKqwkawkmHMSNxM34vlnrN+OB+BAJVrg/r6+48QaZbOnnuGqsMxZCmj58KIa8u3biL/tYumLN0I9oS3FrfOXhw6RAST+zBycjN5AmM0Fm3A1RUlOHqaM+tOutTXV0Lv8AQFL76q9n5CxquW4gh2wnz+b0VPlZ48DKU09vFmGBD9saiE72HKV7kjMPQ6kfEJVzlgA+FBaJrZx3s+DUG/aydsS3isMy5S96VoaysQo9sRoNF5uqv3hShJWL79XD4BpwjqMXrdmDPod+51bv/IAthQX5wHDsKAtrL56/dwdKgUGQ8fibX/BVV1VBXbytgK6laVlGFlmj2kiCcuZSEsaNH4PH1o7SKg5jrQPatE5g2aQz+JK8wxXMZ50/lBWSqe88ZszKDrNGiKKQlYlHSxFm+8F3XELj062NAlq4NbS0NRB89A8tJc3CiwQBapDb0FEhVDLLYQF8Xn6N7Dz8Nip8J81FR2bInxMSsX0NdjS1lKYMU9unRDf82ddHtyMLADIKtZZDJvb8wZDFZJjOWz5FJv96s4hw4g7xm/d1QmYO6UpDBR4l30tBjmCPu01lcmvR0OkBdrW2z84y35Vxkihgyy9LMJL9jey2JndneYjofE4oNy7zQjoyiObFVfFdWLvFaa3Lsc6Y74tG1WIIUUOAh+fzE9uOIISwHgSMcJHvmVI54uEyUOCAoZB/3GnxR+BorF85C+oWDcJ5oB3ll0r83kn7/Fbs3rUB9vQgrN4WDDnoS+7LMx0Cj3snEVchBNraHzXT6oUbaI2ABhdFIJ2ym4wGLXmKYA6eYsGd3fciSloY6Qjcswd2z0RhMQfOZi0noNWIyNoX9JjXJ4DXjR1ZtFX/nIFkWgQLS05PpDSFNNTV1WB68C8Y2rkhMTsOYUcOQTJFMgK+n1MP7NMcxeJoUh/mznOj0WAwb5/mY6O6LktIyqfcZYNQTThNs2YaOF7c1PT50p/2Ubmg5RavobQlkaabTODpKLCAjaM/dlK1YSGQsd5wYQFH39oBFGG0xFNU1NVj1y/8QceAkKquqZc57+3QkzL81HksL94e47UNoTI252praa3fSo+Gj/ccSYD5+FrbuPsgBimU9whQ3KBJigJeTUtDXaiq274nhBei/yIMBHm4K+A/IRoW6TLQ7tWTedPARy6ot3RAKE9tpeNj4btZQb8tZ92SPpbBzWcj73M0C4DU+s4X08RNrkpTBYA7xhrf/tj6h+45CHhn27M7lKCsoyGhu332sQcZ9kBgXUazWVmBKq5gDWZCNoAaUTUugk54RiwG/puzo9Bm5zb+MTqRsH96U1Ke5rBrzL/E7I48MXkFWXVVdgy+txXPdsHG5F8sC2xOg1BOdrPwke734ZQvzV09fuAbJaY/wJdRFVwcRvyzHOJvvLtPXaQTYbMqYVzqaYCdQ2UFZ3h6U7QVlfdESMec/d8Yk+M51e01gLCcZzmcc75x5I+wMquanZz4xjz52FiyhzwIJ5uglSYlSKz0IzMJ8ENwoUrccNjhLSVHxAF0KI8BS8JRckE1gzamyp/J94auiITl5BSpvS0rJsqu4Xx8E9OsDi9D19TrVUyovh+KFOOp7nsptgpM7Em4R5EfArdDwOw5L7rAsATvcFVMRskJQsr24DP0NVvGaoREi2pYAAAAASUVORK5CYII="};function h(){return"undefined"!=typeof window&&"function"==typeof window.dispatchEvent}async function y(e=500){const t=[],r=new Map;return h()?new Promise(n=>{const i=new Set,o=e=>{const n=e,{info:o,provider:a}=n.detail;if(i.has(o.uuid))return;i.add(o.uuid);const d={id:o.rdns||o.uuid,name:o.name,rdns:o.rdns||o.uuid,icon:o.icon??p[o.rdns||""]??"",provider:a,isInjected:!1};t.push(d),r.set(d.id,d)};window.addEventListener("eip6963:announceProvider",o),window.dispatchEvent(new Event("eip6963:requestProvider")),setTimeout(()=>{if(window.removeEventListener("eip6963:announceProvider",o),0===t.length){const e=h()?window.ethereum??null:null;if(e){const n=window;let i="Browser Wallet",o="injected";n.ethereum?.isMetaMask?(i="MetaMask",o=f.METAMASK):n.ethereum?.isCoinbaseWallet?(i="Coinbase Wallet",o=f.COINBASE):n.ethereum?.isTrust&&(i="Trust Wallet",o=f.TRUST_WALLET);const a={id:o,name:i,rdns:o,icon:p[o]??"",provider:e,isInjected:!0};t.push(a),r.set(a.id,a)}}const e=window;if(e.gala?.request&&!r.has(f.GALA)){const n={id:f.GALA,name:"Gala Wallet",rdns:f.GALA,icon:p[f.GALA]??"",provider:e.gala,isInjected:!0};t.push(n),r.set(n.id,n)}n({wallets:t,byId:r,hasWallets:t.length>0,...void 0===t[0]?{}:{primary:t[0]}})},e)}):{wallets:t,byId:r,hasWallets:!1}}function m(e,t,r){return{types:{EIP712Domain:g(e),...t},primaryType:Object.keys(t)[0],domain:_(e),message:r}}function g(e){const t=[];return void 0!==e.name&&t.push({name:"name",type:"string"}),void 0!==e.version&&t.push({name:"version",type:"string"}),void 0!==e.chainId&&t.push({name:"chainId",type:"uint256"}),void 0!==e.verifyingContract&&t.push({name:"verifyingContract",type:"address"}),void 0!==e.salt&&t.push({name:"salt",type:"bytes32"}),t}function _(e){const t={};return void 0!==e.name&&(t.name=e.name),void 0!==e.version&&(t.version=e.version),void 0!==e.chainId&&(t.chainId="bigint"==typeof e.chainId||"number"==typeof e.chainId?`0x${e.chainId.toString(16)}`:e.chainId),void 0!==e.verifyingContract&&(t.verifyingContract=e.verifyingContract),void 0!==e.salt&&(t.salt=e.salt),t}function v(e){return`0x${Buffer.from(e,"utf8").toString("hex")}`}async function b(e,t,r){return e.request({method:"personal_sign",params:[v(r),t]})}async function S(e,t,r,n,i){return e.request({method:"eth_signTypedData_v4",params:[t,JSON.stringify(m(r,n,i))]})}class I{constructor(e){this.connectedAddress=null,this.provider=e,this.eventHandlers=function(e,t,r){if(null==e||"function"!=typeof e.on)return{accountsChanged:null,disconnect:null};const n=e=>{const r=e[0];t(void 0===r?null:c(r))},i=()=>r();return e.on("accountsChanged",n),e.on("disconnect",i),{accountsChanged:n,disconnect:i}}(e,e=>{this.connectedAddress=e},()=>{this.connectedAddress=null})}removeEventListeners(){!function(e,t){if("function"!=typeof e.removeListener)return;null!==t.accountsChanged&&e.removeListener("accountsChanged",t.accountsChanged);null!==t.disconnect&&e.removeListener("disconnect",t.disconnect)}(this.provider,this.eventHandlers)}}class N extends Error{constructor(e,t,r){super(e),this.code=t,this.originalError=r,this.name="WalletProviderError"}}var $;async function w(e,t,r){try{return await e()}catch(e){if(e instanceof N)throw e;return t(e,r)}}!function(e){e.USER_REJECTED="USER_REJECTED",e.NOT_CONNECTED="NOT_CONNECTED",e.CONNECTION_FAILED="CONNECTION_FAILED",e.SIGNING_FAILED="SIGNING_FAILED",e.PROVIDER_NOT_AVAILABLE="PROVIDER_NOT_AVAILABLE",e.PRIVATE_KEY_NOT_ACCESSIBLE="PRIVATE_KEY_NOT_ACCESSIBLE",e.INVALID_CONFIG="INVALID_CONFIG",e.CHAIN_MISMATCH="CHAIN_MISMATCH",e.UNKNOWN="UNKNOWN"}($||($={}));const A=4001,O=4100,M=4900,T=4901;class E extends I{constructor(e){if(super(e),this.providerType="external",null==e)throw new N("EIP-1193 provider is required",$.INVALID_CONFIG)}handleProviderError(e,t){const r=e;if(r.code===A)throw new N(`User rejected ${t}`,$.USER_REJECTED,e instanceof Error?e:void 0);if(r.code===O)throw new N("Wallet is not authorized",$.NOT_CONNECTED,e instanceof Error?e:void 0);if(r.code===M||r.code===T)throw this.connectedAddress=null,new N("Wallet disconnected",$.NOT_CONNECTED,e instanceof Error?e:void 0);throw new N(r.message??`${t} failed`,t.includes("sign")?$.SIGNING_FAILED:$.UNKNOWN,e instanceof Error?e:void 0)}ensureConnected(){if(!this.connectedAddress)throw new N("Wallet is not connected. Call connect() first.",$.NOT_CONNECTED)}async connect(){try{const e=await this.provider.request({method:"eth_requestAccounts"});if(null==e||0===e.length)throw new N("No accounts returned from wallet",$.CONNECTION_FAILED);const t=e[0];if(void 0===t)throw new N("No accounts returned from wallet",$.CONNECTION_FAILED);return this.connectedAddress=c(t),this.connectedAddress}catch(e){if(e instanceof N)throw e;return this.handleProviderError(e,"connect")}}async disconnect(){this.connectedAddress=null,this.removeEventListeners();try{await this.provider.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]})}catch{}}isConnected(){return null!==this.connectedAddress}async signMessage(e){return this.ensureConnected(),w(()=>b(this.provider,this.connectedAddress,e),(e,t)=>this.handleProviderError(e,t),"sign message")}async signTypedData(e,t,r){return this.ensureConnected(),w(()=>S(this.provider,this.connectedAddress,e,t,r),(e,t)=>this.handleProviderError(e,t),"sign typed data")}async getAddress(){await Promise.resolve(),this.ensureConnected();const e=this.connectedAddress;if(null==e)throw new N("Wallet is not connected",$.NOT_CONNECTED);return e}async getGalaAddress(){return`eth|${(await this.getAddress()).slice(2)}`}async getPrivateKey(){return Promise.reject(new N("Private key is not accessible with external wallet providers. Use PrivateKeyProvider if you need private key access for @gala-chain operations.",$.PRIVATE_KEY_NOT_ACCESSIBLE))}getProvider(){return this.provider}}class C extends I{constructor(e){if(super(e),this.providerType="external",this.galaRawAddress=null,!e)throw new N("Gala Wallet provider is required",$.PROVIDER_NOT_AVAILABLE)}parseGalaError(e){if(e instanceof Error)try{const t=JSON.parse(e.message);if("object"==typeof t&&null!==t){const r=t,n={message:"string"==typeof r.message?r.message:e.message};return"number"==typeof r.code&&(n.code=r.code),n}return{message:e.message}}catch{return{message:e.message}}return{message:String(e)}}handleProviderError(e,t){const r=this.parseGalaError(e);if(4001===r.code)throw new N(`User rejected ${t}`,$.USER_REJECTED,e instanceof Error?e:void 0);if(4900===r.code)throw this.connectedAddress=null,new N("Wallet disconnected",$.NOT_CONNECTED,e instanceof Error?e:void 0);const n=r.message?r.message:`${t} failed`;throw new N(n,t.includes("sign")?$.SIGNING_FAILED:$.UNKNOWN,e instanceof Error?e:void 0)}ensureConnected(){if(null===this.connectedAddress||void 0===this.connectedAddress)throw new N("Wallet is not connected. Call connect() first.",$.NOT_CONNECTED)}async connect(){try{const e=await this.provider.request({method:"eth_requestAccounts"});if(null==e||0===e.length)throw new N("No accounts returned from Gala Wallet",$.CONNECTION_FAILED);const t=e[0];if(void 0===t)throw new N("No accounts returned from Gala Wallet",$.CONNECTION_FAILED);this.galaRawAddress=t;let r=t;return r.startsWith("eth|")?r=`0x${r.slice(4)}`:r.startsWith("0x")||(r=`0x${r}`),this.connectedAddress=c(r),this.connectedAddress}catch(e){if(e instanceof N)throw e;return this.handleProviderError(e,"connect")}}async disconnect(){this.connectedAddress=null,this.galaRawAddress=null,this.removeEventListeners();try{await this.provider.disconnect()}catch{}}isConnected(){return null!==this.connectedAddress}async signMessage(e){return this.ensureConnected(),w(async()=>(await this.provider.setAddress(this.galaRawAddress??this.connectedAddress),b(this.provider,this.connectedAddress,e)),(e,t)=>this.handleProviderError(e,t),"sign message")}async signTypedData(e,t,r){return this.ensureConnected(),w(async()=>(await this.provider.setAddress(this.galaRawAddress??this.connectedAddress),S(this.provider,this.connectedAddress,e,t,r)),(e,t)=>this.handleProviderError(e,t),"sign typed data")}getAddress(){return this.ensureConnected(),Promise.resolve(this.connectedAddress)}async getGalaAddress(){return`eth|${(await this.getAddress()).slice(2)}`}getPrivateKey(){throw new N("Private key is not accessible with Gala Wallet. Use PrivateKeyProvider if you need private key access for @gala-chain operations.",$.PRIVATE_KEY_NOT_ACCESSIBLE)}getProvider(){return this.provider}}const x={provider:null,address:null,galaAddress:null,isConnected:!1,isConnecting:!1,isDetecting:!1,error:null,detectedWallets:[],connect:async()=>{throw new Error("WalletContext not initialized")},connectDetected:async()=>{throw new Error("WalletContext not initialized")},disconnect:async()=>{throw new Error("WalletContext not initialized")},setProvider:()=>{throw new Error("WalletContext not initialized")},refreshWallets:async()=>{throw new Error("WalletContext not initialized")},clearError:()=>{throw new Error("WalletContext not initialized")}},k=r(x),P="undefined"!=typeof window;function D({children:e,autoDetect:r=P,initialProvider:d,autoConnect:s=!0,onConnect:c,onDisconnect:u,onError:l}){const[p,m]=n(d??null),[g,_]=n(null),[v,b]=n(null),[S,I]=n(!1),[N,$]=n(!1),[w,A]=n(null),[O,M]=n([]),T=null!==p&&null!==g,x=i(()=>{A(null)},[]),D=i(e=>{m(e),e||(_(null),b(null))},[]),R=i(async e=>{I(!0),A(null);try{e.isConnected()||await e.connect();const t=await e.getAddress(),r=await e.getGalaAddress();return m(e),_(t),b(r),c?.(t,e),t}catch(e){const t=e instanceof Error?e:new Error(String(e));throw A(t),l?.(t),t}finally{I(!1)}},[c,l]),F=i(async e=>{if(e.rdns===f.GALA){const t=new C(e.provider);return R(t)}const t=new E(e.provider);return R(t)},[R]),B=i(async()=>{if(p)try{await p.disconnect()}catch{}m(null),_(null),b(null),A(null),u?.()},[p,u]),L=i(async()=>{if(P){$(!0);try{let e=[...(await y()).wallets];const t=window;if(void 0!==t.gala&&!e.some(e=>e.rdns===f.GALA)){e=[{id:f.GALA,name:"Gala Wallet",rdns:f.GALA,icon:"",provider:t.gala,isInjected:!0},...e]}M(e)}catch{M([])}finally{$(!1)}}},[]);o(()=>{if(!r||!P)return;L();const e=function(e){if(!h())return()=>{};let t=!0,r={wallets:[],byId:new Map,hasWallets:!1};const n=n=>{if(!t)return;const i=n,{info:o,provider:a}=i.detail,d=o.rdns||o.uuid;if(r.byId.has(d))return;const s={id:d,name:o.name,rdns:d,icon:o.icon??"",provider:a,isInjected:!1},c=[...r.wallets,s],u=new Map(r.byId);u.set(s.id,s),r={wallets:c,byId:u,hasWallets:!0,...void 0===c[0]?{}:{primary:c[0]}},e(r)};return window.addEventListener("eip6963:announceProvider",n),y().then(n=>{t&&(r=n,e(n))}),()=>{t=!1,window.removeEventListener("eip6963:announceProvider",n)}}(e=>{M(e.wallets)});return()=>{e()}},[r,L]),o(()=>{d&&s&&!T&&!S&&R(d)},[d,s,T,S,R]);const U=a(()=>({provider:p,address:g,galaAddress:v,isConnected:T,isConnecting:S,isDetecting:N,error:w,detectedWallets:O,connect:R,connectDetected:F,disconnect:B,setProvider:D,refreshWallets:L,clearError:x}),[p,g,v,T,S,N,w,O,R,F,B,D,L,x]);return t(k.Provider,{value:U,children:e})}function R(){const e=d(k);if(e===x)throw new Error("useWalletContext must be used within a WalletProvider");return e}function F(){return R()}function B(){const{address:e}=R();return e}function L(){const{galaAddress:e}=R();return e}function U(){const{isConnected:e}=R();return e}function K(){const{provider:e}=R();return e}function j(){const{isConnecting:e,isConnected:t,error:r,connect:n,connectDetected:i,disconnect:o,clearError:d}=R(),s=a(()=>e?"connecting":r?"error":t?"connected":"disconnected",[e,r,t]);return a(()=>({status:s,isConnecting:e,isConnected:t,error:r,connect:n,connectDetected:i,disconnect:o,clearError:d}),[s,e,t,r,n,i,o,d])}function V(){const{detectedWallets:e,isDetecting:t,refreshWallets:r}=R(),n=a(()=>t=>e.some(e=>e.rdns===t),[e]),i=a(()=>t=>e.find(e=>e.rdns===t),[e]),o=a(()=>e.some(e=>e.rdns===f.METAMASK),[e]),d=a(()=>e.some(e=>e.rdns===f.COINBASE),[e]),s=e.length>0;return a(()=>({wallets:e,isDetecting:t,refresh:r,hasWallet:n,getWallet:i,hasMetaMask:o,hasCoinbaseWallet:d,hasAnyWallet:s}),[e,t,r,n,i,o,d,s])}let J=null;async function q(){if(!1===J)return null;try{const e=await Promise.resolve().then(function(){return vw});return J=!0,e}catch{return J=!1,null}}class G{constructor(e){if(this.providerType="external",this.connectedAddress=null,!e)throw new N("@gala-chain/connect client is required",$.INVALID_CONFIG);if("function"!=typeof e.signMessage)throw new N("Invalid @gala-chain/connect client: signMessage method is required",$.INVALID_CONFIG);this.client=e}static async createBrowserClient(e){const t=await q();if(null==t)throw new N("Failed to create BrowserConnectClient: @gala-chain/connect is not installed. Install it with: npm install @gala-chain/connect",$.PROVIDER_NOT_AVAILABLE);const{BrowserConnectClient:r}=t,n=r,i=e?new n(e):new n;return new G(i)}static async createTrustWalletClient(){const e=await q();if(null==e)throw new N("Failed to create TrustWalletConnectClient: @gala-chain/connect is not installed. Install it with: npm install @gala-chain/connect",$.PROVIDER_NOT_AVAILABLE);const{TrustWalletConnectClient:t}=e,r=new t;return new G(r)}static async isAvailable(){return null!==await q()}ensureConnected(){if(null===this.connectedAddress||void 0===this.connectedAddress)throw new N("Wallet is not connected. Call connect() first.",$.NOT_CONNECTED);return this.connectedAddress}async connect(){try{if("function"==typeof this.client.connect){const e=await this.client.connect();if(null!=e&&e.length>0)return this.connectedAddress=c(e),this.connectedAddress}if("function"==typeof this.client.getAccount){const e=await this.client.getAccount();if(null!=e&&e.length>0)return this.connectedAddress=c(e),this.connectedAddress}throw new N("Failed to connect: no account returned",$.CONNECTION_FAILED)}catch(e){if(e instanceof N)throw e;const t=e instanceof Error?e.message:String(e);if(t.length>0&&(t.includes("rejected")||t.includes("denied")))throw new N("User rejected connection",$.USER_REJECTED,e instanceof Error?e:void 0);throw new N("Failed to connect to wallet",$.CONNECTION_FAILED,e instanceof Error?e:void 0)}}async disconnect(){"function"==typeof this.client.disconnect&&await this.client.disconnect(),this.connectedAddress=null}isConnected(){return null!==this.connectedAddress}async signMessage(e){this.ensureConnected();try{return await this.client.signMessage(e)}catch(e){const t=e instanceof Error?e.message:String(e);if(t.includes("rejected")||t.includes("denied"))throw new N("User rejected signing",$.USER_REJECTED,e instanceof Error?e:void 0);throw new N("Failed to sign message",$.SIGNING_FAILED,e instanceof Error?e:void 0)}}signTypedData(e,t,r){return Promise.reject(new N("signTypedData is not supported by GalaChainConnectProvider. Use ExternalWalletProvider with the underlying EIP-1193 provider instead.",$.SIGNING_FAILED))}async getAddress(){return await Promise.resolve(),this.ensureConnected()}async getGalaAddress(){return`eth|${(await this.getAddress()).slice(2)}`}getPrivateKey(){return Promise.reject(new N("Private key is not accessible with @gala-chain/connect. Use PrivateKeyProvider if you need private key access.",$.PRIVATE_KEY_NOT_ACCESSIBLE))}getClient(){return this.client}}class z{constructor(e){this.providerType="privateKey",this.connected=!0;try{this.wallet=new u(e)}catch(e){throw new N("Invalid private key provided",$.INVALID_CONFIG,e instanceof Error?e:void 0)}}static fromWallet(e){return new z(e.privateKey)}async signMessage(e){try{return await this.wallet.signMessage(e)}catch(e){throw new N("Failed to sign message",$.SIGNING_FAILED,e instanceof Error?e:void 0)}}async signTypedData(e,t,r){try{return await this.wallet.signTypedData(e,t,r)}catch(e){throw new N("Failed to sign typed data",$.SIGNING_FAILED,e instanceof Error?e:void 0)}}getAddress(){return Promise.resolve(c(this.wallet.address))}async getGalaAddress(){return`eth|${(await this.getAddress()).slice(2)}`}async connect(){return this.connected=!0,this.getAddress()}disconnect(){return this.connected=!1,Promise.resolve()}isConnected(){return this.connected}getPrivateKey(){return Promise.resolve(this.wallet.privateKey)}getWallet(){return this.wallet}}var H="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Z(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function W(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var r=function e(){var r=!1;try{r=this instanceof e}catch{}return r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}var Y={},X=function(e,t){return X=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},X(e,t)};function Q(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}X(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var ee=function(){return ee=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ee.apply(this,arguments)};function te(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function re(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var d=e.length-1;d>=0;d--)(i=e[d])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function ne(e,t){return function(r,n){t(r,n,e)}}function ie(e,t,r,n,i,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var d,s=n.kind,c="getter"===s?"get":"setter"===s?"set":"value",u=!t&&e?n.static?e:e.prototype:null,l=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f=!1,p=r.length-1;p>=0;p--){var h={};for(var y in n)h[y]="access"===y?{}:n[y];for(var y in n.access)h.access[y]=n.access[y];h.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var m=(0,r[p])("accessor"===s?{get:l.get,set:l.set}:l[c],h);if("accessor"===s){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(d=a(m.get))&&(l.get=d),(d=a(m.set))&&(l.set=d),(d=a(m.init))&&i.unshift(d)}else(d=a(m))&&("field"===s?i.unshift(d):l[c]=d)}u&&Object.defineProperty(u,n.name,l),f=!0}function oe(e,t,r){for(var n=arguments.length>2,i=0;i<t.length;i++)r=n?t[i].call(e,r):t[i].call(e);return n?r:void 0}function ae(e){return"symbol"==typeof e?e:"".concat(e)}function de(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function se(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function ce(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{s(n.next(e))}catch(e){o(e)}}function d(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,d)}s((n=n.apply(e,t||[])).next())})}function ue(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=d(0),a.throw=d(1),a.return=d(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function d(d){return function(s){return function(d){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,d[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&d[0]?n.return:d[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,d[1])).done)return i;switch(n=0,i&&(d=[2&d[0],i.value]),d[0]){case 0:case 1:i=d;break;case 4:return o.label++,{value:d[1],done:!1};case 5:o.label++,n=d[1],d=[0];continue;case 7:d=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==d[0]&&2!==d[0])){o=0;continue}if(3===d[0]&&(!i||d[1]>i[0]&&d[1]<i[3])){o.label=d[1];break}if(6===d[0]&&o.label<i[1]){o.label=i[1],i=d;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(d);break}i[2]&&o.ops.pop(),o.trys.pop();continue}d=t.call(e,o)}catch(e){d=[6,e],n=0}finally{r=i=0}if(5&d[0])throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}([d,s])}}}var le=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function fe(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||le(t,e,r)}function pe(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function he(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function ye(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(he(arguments[t]));return e}function me(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,d=o.length;a<d;a++,i++)n[i]=o[a];return n}function ge(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function _e(e){return this instanceof _e?(this.v=e,this):new _e(e)}function ve(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function(e){return function(t){return Promise.resolve(t).then(e,c)}}),n[Symbol.asyncIterator]=function(){return this},n;function a(e,t){i[e]&&(n[e]=function(t){return new Promise(function(r,n){o.push([e,t,r,n])>1||d(e,t)})},t&&(n[e]=t(n[e])))}function d(e,t){try{(r=i[e](t)).value instanceof _e?Promise.resolve(r.value.v).then(s,c):u(o[0][2],r)}catch(e){u(o[0][3],e)}var r}function s(e){d("next",e)}function c(e){d("throw",e)}function u(e,t){e(t),o.shift(),o.length&&d(o[0][0],o[0][1])}}function be(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:_e(e[n](t)),done:!1}:i?i(t):t}:i}}function Se(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=pe(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,i){(function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)})(n,i,(t=e[r](t)).done,t.value)})}}}function Ie(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var Ne=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},$e=function(e){return $e=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},$e(e)};function we(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=$e(e),n=0;n<r.length;n++)"default"!==r[n]&&le(t,e,r[n]);return Ne(t,e),t}function Ae(e){return e&&e.__esModule?e:{default:e}}function Oe(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function Me(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}function Te(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function Ee(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var n,i;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(i=n)}if("function"!=typeof n)throw new TypeError("Object not disposable.");i&&(n=function(){try{i.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var Ce="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function xe(e){function t(t){e.error=e.hasError?new Ce(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var r,n=0;return function i(){for(;r=e.stack.pop();)try{if(!r.async&&1===n)return n=0,e.stack.push(r),Promise.resolve().then(i);if(r.dispose){var o=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(o).then(i,function(e){return t(e),i()})}else n|=1}catch(e){t(e)}if(1===n)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}function ke(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(e,r,n,i,o){return r?t?".jsx":".js":!n||i&&o?n+i+"."+o.toLowerCase()+"js":e}):e}var Pe,De={__extends:Q,__assign:ee,__rest:te,__decorate:re,__param:ne,__esDecorate:ie,__runInitializers:oe,__propKey:ae,__setFunctionName:de,__metadata:se,__awaiter:ce,__generator:ue,__createBinding:le,__exportStar:fe,__values:pe,__read:he,__spread:ye,__spreadArrays:me,__spreadArray:ge,__await:_e,__asyncGenerator:ve,__asyncDelegator:be,__asyncValues:Se,__makeTemplateObject:Ie,__importStar:we,__importDefault:Ae,__classPrivateFieldGet:Oe,__classPrivateFieldSet:Me,__classPrivateFieldIn:Te,__addDisposableResource:Ee,__disposeResources:xe,__rewriteRelativeImportExtension:ke},Re=W(Object.freeze({__proto__:null,__addDisposableResource:Ee,get __assign(){return ee},__asyncDelegator:be,__asyncGenerator:ve,__asyncValues:Se,__await:_e,__awaiter:ce,__classPrivateFieldGet:Oe,__classPrivateFieldIn:Te,__classPrivateFieldSet:Me,__createBinding:le,__decorate:re,__disposeResources:xe,__esDecorate:ie,__exportStar:fe,__extends:Q,__generator:ue,__importDefault:Ae,__importStar:we,__makeTemplateObject:Ie,__metadata:se,__param:ne,__propKey:ae,__read:he,__rest:te,__rewriteRelativeImportExtension:ke,__runInitializers:oe,__setFunctionName:de,__spread:ye,__spreadArray:ge,__spreadArrays:me,__values:pe,default:De})),Fe={},Be={},Le={},Ue={},Ke={},je={};function Ve(){if(Pe)return je;return Pe=1,Object.defineProperty(je,"__esModule",{value:!0}),je.buildChainUserAPI=void 0,je.buildChainUserAPI=function(e){return()=>e},je}var Je,qe={},Ge={},ze={};function He(){return Je||(Je=1,Object.defineProperty(ze,"__esModule",{value:!0})),ze}var Ze={},We=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,Ye=Math.ceil,Xe=Math.floor,Qe="[BigNumber Error] ",et=Qe+"Number primitive has more than 15 significant digits: ",tt=1e14,rt=14,nt=9007199254740991,it=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],ot=1e7,at=1e9;function dt(e){var t=0|e;return e>0||e===t?t:t-1}function st(e){for(var t,r,n=1,i=e.length,o=e[0]+"";n<i;){for(t=e[n++]+"",r=rt-t.length;r--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function ct(e,t){var r,n,i=e.c,o=t.c,a=e.s,d=t.s,s=e.e,c=t.e;if(!a||!d)return null;if(r=i&&!i[0],n=o&&!o[0],r||n)return r?n?0:-d:a;if(a!=d)return a;if(r=a<0,n=s==c,!i||!o)return n?0:!i^r?1:-1;if(!n)return s>c^r?1:-1;for(d=(s=i.length)<(c=o.length)?s:c,a=0;a<d;a++)if(i[a]!=o[a])return i[a]>o[a]^r?1:-1;return s==c?0:s>c^r?1:-1}function ut(e,t,r,n){if(e<t||e>r||e!==Xe(e))throw Error(Qe+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function lt(e){var t=e.c.length-1;return dt(e.e/rt)==t&&e.c[t]%2!=0}function ft(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function pt(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(++t>(n=e.length)){for(i=r,t-=n;--t;i+=r);e+=i}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}var ht,yt=function e(t){var r,n,i,o,a,d,s,c,u,l,f=A.prototype={constructor:A,toString:null,valueOf:null},p=new A(1),h=20,y=4,m=-7,g=21,_=-1e7,v=1e7,b=!1,S=1,I=0,N={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},$="0123456789abcdefghijklmnopqrstuvwxyz",w=!0;function A(e,t){var r,o,a,d,s,c,u,l,f=this;if(!(f instanceof A))return new A(e,t);if(null==t){if(e&&!0===e._isBigNumber)return f.s=e.s,void(!e.c||e.e>v?f.c=f.e=null:e.e<_?f.c=[f.e=0]:(f.e=e.e,f.c=e.c.slice()));if((c="number"==typeof e)&&0*e==0){if(f.s=1/e<0?(e=-e,-1):1,e===~~e){for(d=0,s=e;s>=10;s/=10,d++);return void(d>v?f.c=f.e=null:(f.e=d,f.c=[e]))}l=String(e)}else{if(!We.test(l=String(e)))return i(f,l,c);f.s=45==l.charCodeAt(0)?(l=l.slice(1),-1):1}(d=l.indexOf("."))>-1&&(l=l.replace(".","")),(s=l.search(/e/i))>0?(d<0&&(d=s),d+=+l.slice(s+1),l=l.substring(0,s)):d<0&&(d=l.length)}else{if(ut(t,2,$.length,"Base"),10==t&&w)return E(f=new A(e),h+f.e+1,y);if(l=String(e),c="number"==typeof e){if(0*e!=0)return i(f,l,c,t);if(f.s=1/e<0?(l=l.slice(1),-1):1,A.DEBUG&&l.replace(/^0\.0*|\./,"").length>15)throw Error(et+e)}else f.s=45===l.charCodeAt(0)?(l=l.slice(1),-1):1;for(r=$.slice(0,t),d=s=0,u=l.length;s<u;s++)if(r.indexOf(o=l.charAt(s))<0){if("."==o){if(s>d){d=u;continue}}else if(!a&&(l==l.toUpperCase()&&(l=l.toLowerCase())||l==l.toLowerCase()&&(l=l.toUpperCase()))){a=!0,s=-1,d=0;continue}return i(f,String(e),c,t)}c=!1,(d=(l=n(l,t,10,f.s)).indexOf("."))>-1?l=l.replace(".",""):d=l.length}for(s=0;48===l.charCodeAt(s);s++);for(u=l.length;48===l.charCodeAt(--u););if(l=l.slice(s,++u)){if(u-=s,c&&A.DEBUG&&u>15&&(e>nt||e!==Xe(e)))throw Error(et+f.s*e);if((d=d-s-1)>v)f.c=f.e=null;else if(d<_)f.c=[f.e=0];else{if(f.e=d,f.c=[],s=(d+1)%rt,d<0&&(s+=rt),s<u){for(s&&f.c.push(+l.slice(0,s)),u-=rt;s<u;)f.c.push(+l.slice(s,s+=rt));s=rt-(l=l.slice(s)).length}else s-=u;for(;s--;l+="0");f.c.push(+l)}}else f.c=[f.e=0]}function O(e,t,r,n){var i,o,a,d,s;if(null==r?r=y:ut(r,0,8),!e.c)return e.toString();if(i=e.c[0],a=e.e,null==t)s=st(e.c),s=1==n||2==n&&(a<=m||a>=g)?ft(s,a):pt(s,a,"0");else if(o=(e=E(new A(e),t,r)).e,d=(s=st(e.c)).length,1==n||2==n&&(t<=o||o<=m)){for(;d<t;s+="0",d++);s=ft(s,o)}else if(t-=a+(2===n&&o>a),s=pt(s,o,"0"),o+1>d){if(--t>0)for(s+=".";t--;s+="0");}else if((t+=o-d)>0)for(o+1==d&&(s+=".");t--;s+="0");return e.s<0&&i?"-"+s:s}function M(e,t){for(var r,n,i=1,o=new A(e[0]);i<e.length;i++)(!(n=new A(e[i])).s||(r=ct(o,n))===t||0===r&&o.s===t)&&(o=n);return o}function T(e,t,r){for(var n=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,n++);return(r=n+r*rt-1)>v?e.c=e.e=null:r<_?e.c=[e.e=0]:(e.e=r,e.c=t),e}function E(e,t,r,n){var i,o,a,d,s,c,u,l=e.c,f=it;if(l){e:{for(i=1,d=l[0];d>=10;d/=10,i++);if((o=t-i)<0)o+=rt,a=t,s=l[c=0],u=Xe(s/f[i-a-1]%10);else if((c=Ye((o+1)/rt))>=l.length){if(!n)break e;for(;l.length<=c;l.push(0));s=u=0,i=1,a=(o%=rt)-rt+1}else{for(s=d=l[c],i=1;d>=10;d/=10,i++);u=(a=(o%=rt)-rt+i)<0?0:Xe(s/f[i-a-1]%10)}if(n=n||t<0||null!=l[c+1]||(a<0?s:s%f[i-a-1]),n=r<4?(u||n)&&(0==r||r==(e.s<0?3:2)):u>5||5==u&&(4==r||n||6==r&&(o>0?a>0?s/f[i-a]:0:l[c-1])%10&1||r==(e.s<0?8:7)),t<1||!l[0])return l.length=0,n?(t-=e.e+1,l[0]=f[(rt-t%rt)%rt],e.e=-t||0):l[0]=e.e=0,e;if(0==o?(l.length=c,d=1,c--):(l.length=c+1,d=f[rt-o],l[c]=a>0?Xe(s/f[i-a]%f[a])*d:0),n)for(;;){if(0==c){for(o=1,a=l[0];a>=10;a/=10,o++);for(a=l[0]+=d,d=1;a>=10;a/=10,d++);o!=d&&(e.e++,l[0]==tt&&(l[0]=1));break}if(l[c]+=d,l[c]!=tt)break;l[c--]=0,d=1}for(o=l.length;0===l[--o];l.pop());}e.e>v?e.c=e.e=null:e.e<_&&(e.c=[e.e=0])}return e}function C(e){var t,r=e.e;return null===r?e.toString():(t=st(e.c),t=r<=m||r>=g?ft(t,r):pt(t,r,"0"),e.s<0?"-"+t:t)}return A.clone=e,A.ROUND_UP=0,A.ROUND_DOWN=1,A.ROUND_CEIL=2,A.ROUND_FLOOR=3,A.ROUND_HALF_UP=4,A.ROUND_HALF_DOWN=5,A.ROUND_HALF_EVEN=6,A.ROUND_HALF_CEIL=7,A.ROUND_HALF_FLOOR=8,A.EUCLID=9,A.config=A.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(Qe+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(ut(r=e[t],0,at,t),h=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(ut(r=e[t],0,8,t),y=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(ut(r[0],-at,0,t),ut(r[1],0,at,t),m=r[0],g=r[1]):(ut(r,-at,at,t),m=-(g=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)ut(r[0],-at,-1,t),ut(r[1],1,at,t),_=r[0],v=r[1];else{if(ut(r,-at,at,t),!r)throw Error(Qe+t+" cannot be zero: "+r);_=-(v=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(Qe+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw b=!r,Error(Qe+"crypto unavailable");b=r}else b=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(ut(r=e[t],0,9,t),S=r),e.hasOwnProperty(t="POW_PRECISION")&&(ut(r=e[t],0,at,t),I=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(Qe+t+" not an object: "+r);N=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(Qe+t+" invalid: "+r);w="0123456789"==r.slice(0,10),$=r}}return{DECIMAL_PLACES:h,ROUNDING_MODE:y,EXPONENTIAL_AT:[m,g],RANGE:[_,v],CRYPTO:b,MODULO_MODE:S,POW_PRECISION:I,FORMAT:N,ALPHABET:$}},A.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!A.DEBUG)return!0;var t,r,n=e.c,i=e.e,o=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===o||-1===o)&&i>=-at&&i<=at&&i===Xe(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break e}if((t=(i+1)%rt)<1&&(t+=rt),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=tt||r!==Xe(r))break e;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(Qe+"Invalid BigNumber: "+e)},A.maximum=A.max=function(){return M(arguments,-1)},A.minimum=A.min=function(){return M(arguments,1)},A.random=(o=9007199254740992,a=Math.random()*o&2097151?function(){return Xe(Math.random()*o)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,i,o,d=0,s=[],c=new A(p);if(null==e?e=h:ut(e,0,at),i=Ye(e/rt),b)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));d<i;)(o=131072*t[d]+(t[d+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[d]=r[0],t[d+1]=r[1]):(s.push(o%1e14),d+=2);d=i/2}else{if(!crypto.randomBytes)throw b=!1,Error(Qe+"crypto unavailable");for(t=crypto.randomBytes(i*=7);d<i;)(o=281474976710656*(31&t[d])+1099511627776*t[d+1]+4294967296*t[d+2]+16777216*t[d+3]+(t[d+4]<<16)+(t[d+5]<<8)+t[d+6])>=9e15?crypto.randomBytes(7).copy(t,d):(s.push(o%1e14),d+=7);d=i/7}if(!b)for(;d<i;)(o=a())<9e15&&(s[d++]=o%1e14);for(i=s[--d],e%=rt,i&&e&&(o=it[rt-e],s[d]=Xe(i/o)*o);0===s[d];s.pop(),d--);if(d<0)s=[n=0];else{for(n=-1;0===s[0];s.splice(0,1),n-=rt);for(d=1,o=s[0];o>=10;o/=10,d++);d<rt&&(n-=rt-d)}return c.e=n,c.c=s,c}),A.sum=function(){for(var e=1,t=arguments,r=new A(t[0]);e<t.length;)r=r.plus(t[e++]);return r},n=function(){var e="0123456789";function t(e,t,r,n){for(var i,o,a=[0],d=0,s=e.length;d<s;){for(o=a.length;o--;a[o]*=t);for(a[0]+=n.indexOf(e.charAt(d++)),i=0;i<a.length;i++)a[i]>r-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/r|0,a[i]%=r)}return a.reverse()}return function(n,i,o,a,d){var s,c,u,l,f,p,m,g,_=n.indexOf("."),v=h,b=y;for(_>=0&&(l=I,I=0,n=n.replace(".",""),p=(g=new A(i)).pow(n.length-_),I=l,g.c=t(pt(st(p.c),p.e,"0"),10,o,e),g.e=g.c.length),u=l=(m=t(n,i,o,d?(s=$,e):(s=e,$))).length;0==m[--l];m.pop());if(!m[0])return s.charAt(0);if(_<0?--u:(p.c=m,p.e=u,p.s=a,m=(p=r(p,g,v,b,o)).c,f=p.r,u=p.e),_=m[c=u+v+1],l=o/2,f=f||c<0||null!=m[c+1],f=b<4?(null!=_||f)&&(0==b||b==(p.s<0?3:2)):_>l||_==l&&(4==b||f||6==b&&1&m[c-1]||b==(p.s<0?8:7)),c<1||!m[0])n=f?pt(s.charAt(1),-v,s.charAt(0)):s.charAt(0);else{if(m.length=c,f)for(--o;++m[--c]>o;)m[c]=0,c||(++u,m=[1].concat(m));for(l=m.length;!m[--l];);for(_=0,n="";_<=l;n+=s.charAt(m[_++]));n=pt(n,u,s.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,i,o,a,d=0,s=e.length,c=t%ot,u=t/ot|0;for(e=e.slice();s--;)d=((i=c*(o=e[s]%ot)+(n=u*o+(a=e[s]/ot|0)*c)%ot*ot+d)/r|0)+(n/ot|0)+u*a,e[s]=i%r;return d&&(e=[d].concat(e)),e}function t(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;i<r;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]<t[r]?1:0,e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,i,o,a,d){var s,c,u,l,f,p,h,y,m,g,_,v,b,S,I,N,$,w=n.s==i.s?1:-1,O=n.c,M=i.c;if(!(O&&O[0]&&M&&M[0]))return new A(n.s&&i.s&&(O?!M||O[0]!=M[0]:M)?O&&0==O[0]||!M?0*w:w/0:NaN);for(m=(y=new A(w)).c=[],w=o+(c=n.e-i.e)+1,d||(d=tt,c=dt(n.e/rt)-dt(i.e/rt),w=w/rt|0),u=0;M[u]==(O[u]||0);u++);if(M[u]>(O[u]||0)&&c--,w<0)m.push(1),l=!0;else{for(S=O.length,N=M.length,u=0,w+=2,(f=Xe(d/(M[0]+1)))>1&&(M=e(M,f,d),O=e(O,f,d),N=M.length,S=O.length),b=N,_=(g=O.slice(0,N)).length;_<N;g[_++]=0);$=M.slice(),$=[0].concat($),I=M[0],M[1]>=d/2&&I++;do{if(f=0,(s=t(M,g,N,_))<0){if(v=g[0],N!=_&&(v=v*d+(g[1]||0)),(f=Xe(v/I))>1)for(f>=d&&(f=d-1),h=(p=e(M,f,d)).length,_=g.length;1==t(p,g,h,_);)f--,r(p,N<h?$:M,h,d),h=p.length,s=1;else 0==f&&(s=f=1),h=(p=M.slice()).length;if(h<_&&(p=[0].concat(p)),r(g,p,_,d),_=g.length,-1==s)for(;t(M,g,N,_)<1;)f++,r(g,N<_?$:M,_,d),_=g.length}else 0===s&&(f++,g=[0]);m[u++]=f,g[0]?g[_++]=O[b]||0:(g=[O[b]],_=1)}while((b++<S||null!=g[0])&&w--);l=null!=g[0],m[0]||m.splice(0,1)}if(d==tt){for(u=1,w=m[0];w>=10;w/=10,u++);E(y,o+(y.e=u+c*rt-1)+1,a,l)}else y.e=c,y.r=+l;return y}}(),d=/^(-?)0([xbo])(?=\w[\w.]*$)/i,s=/^([^.]+)\.$/,c=/^\.([^.]+)$/,u=/^-?(Infinity|NaN)$/,l=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,r,n){var i,o=r?t:t.replace(l,"");if(u.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!r&&(o=o.replace(d,function(e,t,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t}),n&&(i=n,o=o.replace(s,"$1").replace(c,"0.$1")),t!=o))return new A(o,i);if(A.DEBUG)throw Error(Qe+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},f.absoluteValue=f.abs=function(){var e=new A(this);return e.s<0&&(e.s=1),e},f.comparedTo=function(e,t){return ct(this,new A(e,t))},f.decimalPlaces=f.dp=function(e,t){var r,n,i,o=this;if(null!=e)return ut(e,0,at),null==t?t=y:ut(t,0,8),E(new A(o),e+o.e+1,t);if(!(r=o.c))return null;if(n=((i=r.length-1)-dt(this.e/rt))*rt,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},f.dividedBy=f.div=function(e,t){return r(this,new A(e,t),h,y)},f.dividedToIntegerBy=f.idiv=function(e,t){return r(this,new A(e,t),0,1)},f.exponentiatedBy=f.pow=function(e,t){var r,n,i,o,a,d,s,c,u=this;if((e=new A(e)).c&&!e.isInteger())throw Error(Qe+"Exponent not an integer: "+C(e));if(null!=t&&(t=new A(t)),a=e.e>14,!u.c||!u.c[0]||1==u.c[0]&&!u.e&&1==u.c.length||!e.c||!e.c[0])return c=new A(Math.pow(+C(u),a?e.s*(2-lt(e)):+C(e))),t?c.mod(t):c;if(d=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new A(NaN);(n=!d&&u.isInteger()&&t.isInteger())&&(u=u.mod(t))}else{if(e.e>9&&(u.e>0||u.e<-1||(0==u.e?u.c[0]>1||a&&u.c[1]>=24e7:u.c[0]<8e13||a&&u.c[0]<=9999975e7)))return o=u.s<0&&lt(e)?-0:0,u.e>-1&&(o=1/o),new A(d?1/o:o);I&&(o=Ye(I/rt+2))}for(a?(r=new A(.5),d&&(e.s=1),s=lt(e)):s=(i=Math.abs(+C(e)))%2,c=new A(p);;){if(s){if(!(c=c.times(u)).c)break;o?c.c.length>o&&(c.c.length=o):n&&(c=c.mod(t))}if(i){if(0===(i=Xe(i/2)))break;s=i%2}else if(E(e=e.times(r),e.e+1,1),e.e>14)s=lt(e);else{if(0===(i=+C(e)))break;s=i%2}u=u.times(u),o?u.c&&u.c.length>o&&(u.c.length=o):n&&(u=u.mod(t))}return n?c:(d&&(c=p.div(c)),t?c.mod(t):o?E(c,I,y,void 0):c)},f.integerValue=function(e){var t=new A(this);return null==e?e=y:ut(e,0,8),E(t,t.e+1,e)},f.isEqualTo=f.eq=function(e,t){return 0===ct(this,new A(e,t))},f.isFinite=function(){return!!this.c},f.isGreaterThan=f.gt=function(e,t){return ct(this,new A(e,t))>0},f.isGreaterThanOrEqualTo=f.gte=function(e,t){return 1===(t=ct(this,new A(e,t)))||0===t},f.isInteger=function(){return!!this.c&&dt(this.e/rt)>this.c.length-2},f.isLessThan=f.lt=function(e,t){return ct(this,new A(e,t))<0},f.isLessThanOrEqualTo=f.lte=function(e,t){return-1===(t=ct(this,new A(e,t)))||0===t},f.isNaN=function(){return!this.s},f.isNegative=function(){return this.s<0},f.isPositive=function(){return this.s>0},f.isZero=function(){return!!this.c&&0==this.c[0]},f.minus=function(e,t){var r,n,i,o,a=this,d=a.s;if(t=(e=new A(e,t)).s,!d||!t)return new A(NaN);if(d!=t)return e.s=-t,a.plus(e);var s=a.e/rt,c=e.e/rt,u=a.c,l=e.c;if(!s||!c){if(!u||!l)return u?(e.s=-t,e):new A(l?a:NaN);if(!u[0]||!l[0])return l[0]?(e.s=-t,e):new A(u[0]?a:3==y?-0:0)}if(s=dt(s),c=dt(c),u=u.slice(),d=s-c){for((o=d<0)?(d=-d,i=u):(c=s,i=l),i.reverse(),t=d;t--;i.push(0));i.reverse()}else for(n=(o=(d=u.length)<(t=l.length))?d:t,d=t=0;t<n;t++)if(u[t]!=l[t]){o=u[t]<l[t];break}if(o&&(i=u,u=l,l=i,e.s=-e.s),(t=(n=l.length)-(r=u.length))>0)for(;t--;u[r++]=0);for(t=tt-1;n>d;){if(u[--n]<l[n]){for(r=n;r&&!u[--r];u[r]=t);--u[r],u[n]+=tt}u[n]-=l[n]}for(;0==u[0];u.splice(0,1),--c);return u[0]?T(e,u,c):(e.s=3==y?-1:1,e.c=[e.e=0],e)},f.modulo=f.mod=function(e,t){var n,i,o=this;return e=new A(e,t),!o.c||!e.s||e.c&&!e.c[0]?new A(NaN):!e.c||o.c&&!o.c[0]?new A(o):(9==S?(i=e.s,e.s=1,n=r(o,e,0,3),e.s=i,n.s*=i):n=r(o,e,0,S),(e=o.minus(n.times(e))).c[0]||1!=S||(e.s=o.s),e)},f.multipliedBy=f.times=function(e,t){var r,n,i,o,a,d,s,c,u,l,f,p,h,y,m,g=this,_=g.c,v=(e=new A(e,t)).c;if(!(_&&v&&_[0]&&v[0]))return!g.s||!e.s||_&&!_[0]&&!v||v&&!v[0]&&!_?e.c=e.e=e.s=null:(e.s*=g.s,_&&v?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=dt(g.e/rt)+dt(e.e/rt),e.s*=g.s,(s=_.length)<(l=v.length)&&(h=_,_=v,v=h,i=s,s=l,l=i),i=s+l,h=[];i--;h.push(0));for(y=tt,m=ot,i=l;--i>=0;){for(r=0,f=v[i]%m,p=v[i]/m|0,o=i+(a=s);o>i;)r=((c=f*(c=_[--a]%m)+(d=p*c+(u=_[a]/m|0)*f)%m*m+h[o]+r)/y|0)+(d/m|0)+p*u,h[o--]=c%y;h[o]=r}return r?++n:h.splice(0,1),T(e,h,n)},f.negated=function(){var e=new A(this);return e.s=-e.s||null,e},f.plus=function(e,t){var r,n=this,i=n.s;if(t=(e=new A(e,t)).s,!i||!t)return new A(NaN);if(i!=t)return e.s=-t,n.minus(e);var o=n.e/rt,a=e.e/rt,d=n.c,s=e.c;if(!o||!a){if(!d||!s)return new A(i/0);if(!d[0]||!s[0])return s[0]?e:new A(d[0]?n:0*i)}if(o=dt(o),a=dt(a),d=d.slice(),i=o-a){for(i>0?(a=o,r=s):(i=-i,r=d),r.reverse();i--;r.push(0));r.reverse()}for((i=d.length)-(t=s.length)<0&&(r=s,s=d,d=r,t=i),i=0;t;)i=(d[--t]=d[t]+s[t]+i)/tt|0,d[t]=tt===d[t]?0:d[t]%tt;return i&&(d=[i].concat(d),++a),T(e,d,a)},f.precision=f.sd=function(e,t){var r,n,i,o=this;if(null!=e&&e!==!!e)return ut(e,1,at),null==t?t=y:ut(t,0,8),E(new A(o),e,t);if(!(r=o.c))return null;if(n=(i=r.length-1)*rt+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&o.e+1>n&&(n=o.e+1),n},f.shiftedBy=function(e){return ut(e,-9007199254740991,nt),this.times("1e"+e)},f.squareRoot=f.sqrt=function(){var e,t,n,i,o,a=this,d=a.c,s=a.s,c=a.e,u=h+4,l=new A("0.5");if(1!==s||!d||!d[0])return new A(!s||s<0&&(!d||d[0])?NaN:d?a:1/0);if(0==(s=Math.sqrt(+C(a)))||s==1/0?(((t=st(d)).length+c)%2==0&&(t+="0"),s=Math.sqrt(+t),c=dt((c+1)/2)-(c<0||c%2),n=new A(t=s==1/0?"5e"+c:(t=s.toExponential()).slice(0,t.indexOf("e")+1)+c)):n=new A(s+""),n.c[0])for((s=(c=n.e)+u)<3&&(s=0);;)if(o=n,n=l.times(o.plus(r(a,o,u,1))),st(o.c).slice(0,s)===(t=st(n.c)).slice(0,s)){if(n.e<c&&--s,"9999"!=(t=t.slice(s-3,s+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(E(n,n.e+h+2,1),e=!n.times(n).eq(a));break}if(!i&&(E(o,o.e+h+2,0),o.times(o).eq(a))){n=o;break}u+=4,s+=4,i=1}return E(n,n.e+h+1,y,e)},f.toExponential=function(e,t){return null!=e&&(ut(e,0,at),e++),O(this,e,t,1)},f.toFixed=function(e,t){return null!=e&&(ut(e,0,at),e=e+this.e+1),O(this,e,t)},f.toFormat=function(e,t,r){var n,i=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=N;else if("object"!=typeof r)throw Error(Qe+"Argument not an object: "+r);if(n=i.toFixed(e,t),i.c){var o,a=n.split("."),d=+r.groupSize,s=+r.secondaryGroupSize,c=r.groupSeparator||"",u=a[0],l=a[1],f=i.s<0,p=f?u.slice(1):u,h=p.length;if(s&&(o=d,d=s,s=o,h-=o),d>0&&h>0){for(o=h%d||d,u=p.substr(0,o);o<h;o+=d)u+=c+p.substr(o,d);s>0&&(u+=c+p.slice(o)),f&&(u="-"+u)}n=l?u+(r.decimalSeparator||"")+((s=+r.fractionGroupSize)?l.replace(new RegExp("\\d{"+s+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):l):u}return(r.prefix||"")+n+(r.suffix||"")},f.toFraction=function(e){var t,n,i,o,a,d,s,c,u,l,f,h,m=this,g=m.c;if(null!=e&&(!(s=new A(e)).isInteger()&&(s.c||1!==s.s)||s.lt(p)))throw Error(Qe+"Argument "+(s.isInteger()?"out of range: ":"not an integer: ")+C(s));if(!g)return new A(m);for(t=new A(p),u=n=new A(p),i=c=new A(p),h=st(g),a=t.e=h.length-m.e-1,t.c[0]=it[(d=a%rt)<0?rt+d:d],e=!e||s.comparedTo(t)>0?a>0?t:u:s,d=v,v=1/0,s=new A(h),c.c[0]=0;l=r(s,t,0,1),1!=(o=n.plus(l.times(i))).comparedTo(e);)n=i,i=o,u=c.plus(l.times(o=u)),c=o,t=s.minus(l.times(o=t)),s=o;return o=r(e.minus(n),i,0,1),c=c.plus(o.times(u)),n=n.plus(o.times(i)),c.s=u.s=m.s,f=r(u,i,a*=2,y).minus(m).abs().comparedTo(r(c,n,a,y).minus(m).abs())<1?[u,i]:[c,n],v=d,f},f.toNumber=function(){return+C(this)},f.toPrecision=function(e,t){return null!=e&&ut(e,1,at),O(this,e,t,2)},f.toString=function(e){var t,r=this,i=r.s,o=r.e;return null===o?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=o<=m||o>=g?ft(st(r.c),o):pt(st(r.c),o,"0"):10===e&&w?t=pt(st((r=E(new A(r),h+o+1,y)).c),r.e,"0"):(ut(e,2,$.length,"Base"),t=n(pt(st(r.c),o,"0"),10,e,i,!0)),i<0&&r.c[0]&&(t="-"+t)),t},f.valueOf=f.toJSON=function(){return C(this)},f._isBigNumber=!0,f[Symbol.toStringTag]="BigNumber",f[Symbol.for("nodejs.util.inspect.custom")]=f.valueOf,null!=t&&A.set(t),A}(),mt=W(Object.freeze({__proto__:null,BigNumber:yt,default:yt}));!function(e){e[e.PLAIN_TO_CLASS=0]="PLAIN_TO_CLASS",e[e.CLASS_TO_PLAIN=1]="CLASS_TO_PLAIN",e[e.CLASS_TO_CLASS=2]="CLASS_TO_CLASS"}(ht||(ht={}));var gt=function(){function e(){this._typeMetadatas=new Map,this._transformMetadatas=new Map,this._exposeMetadatas=new Map,this._excludeMetadatas=new Map,this._ancestorsMap=new Map}return e.prototype.addTypeMetadata=function(e){this._typeMetadatas.has(e.target)||this._typeMetadatas.set(e.target,new Map),this._typeMetadatas.get(e.target).set(e.propertyName,e)},e.prototype.addTransformMetadata=function(e){this._transformMetadatas.has(e.target)||this._transformMetadatas.set(e.target,new Map),this._transformMetadatas.get(e.target).has(e.propertyName)||this._transformMetadatas.get(e.target).set(e.propertyName,[]),this._transformMetadatas.get(e.target).get(e.propertyName).push(e)},e.prototype.addExposeMetadata=function(e){this._exposeMetadatas.has(e.target)||this._exposeMetadatas.set(e.target,new Map),this._exposeMetadatas.get(e.target).set(e.propertyName,e)},e.prototype.addExcludeMetadata=function(e){this._excludeMetadatas.has(e.target)||this._excludeMetadatas.set(e.target,new Map),this._excludeMetadatas.get(e.target).set(e.propertyName,e)},e.prototype.findTransformMetadatas=function(e,t,r){return this.findMetadatas(this._transformMetadatas,e,t).filter(function(e){return!e.options||(!0===e.options.toClassOnly&&!0===e.options.toPlainOnly||(!0===e.options.toClassOnly?r===ht.CLASS_TO_CLASS||r===ht.PLAIN_TO_CLASS:!0!==e.options.toPlainOnly||r===ht.CLASS_TO_PLAIN))})},e.prototype.findExcludeMetadata=function(e,t){return this.findMetadata(this._excludeMetadatas,e,t)},e.prototype.findExposeMetadata=function(e,t){return this.findMetadata(this._exposeMetadatas,e,t)},e.prototype.findExposeMetadataByCustomName=function(e,t){return this.getExposedMetadatas(e).find(function(e){return e.options&&e.options.name===t})},e.prototype.findTypeMetadata=function(e,t){return this.findMetadata(this._typeMetadatas,e,t)},e.prototype.getStrategy=function(e){var t=this._excludeMetadatas.get(e),r=t&&t.get(void 0),n=this._exposeMetadatas.get(e),i=n&&n.get(void 0);return r&&i||!r&&!i?"none":r?"excludeAll":"exposeAll"},e.prototype.getExposedMetadatas=function(e){return this.getMetadata(this._exposeMetadatas,e)},e.prototype.getExcludedMetadatas=function(e){return this.getMetadata(this._excludeMetadatas,e)},e.prototype.getExposedProperties=function(e,t){return this.getExposedMetadatas(e).filter(function(e){return!e.options||(!0===e.options.toClassOnly&&!0===e.options.toPlainOnly||(!0===e.options.toClassOnly?t===ht.CLASS_TO_CLASS||t===ht.PLAIN_TO_CLASS:!0!==e.options.toPlainOnly||t===ht.CLASS_TO_PLAIN))}).map(function(e){return e.propertyName})},e.prototype.getExcludedProperties=function(e,t){return this.getExcludedMetadatas(e).filter(function(e){return!e.options||(!0===e.options.toClassOnly&&!0===e.options.toPlainOnly||(!0===e.options.toClassOnly?t===ht.CLASS_TO_CLASS||t===ht.PLAIN_TO_CLASS:!0!==e.options.toPlainOnly||t===ht.CLASS_TO_PLAIN))}).map(function(e){return e.propertyName})},e.prototype.clear=function(){this._typeMetadatas.clear(),this._exposeMetadatas.clear(),this._excludeMetadatas.clear(),this._ancestorsMap.clear()},e.prototype.getMetadata=function(e,t){var r,n=e.get(t);n&&(r=Array.from(n.values()).filter(function(e){return void 0!==e.propertyName}));for(var i=[],o=0,a=this.getAncestors(t);o<a.length;o++){var d=a[o],s=e.get(d);if(s){var c=Array.from(s.values()).filter(function(e){return void 0!==e.propertyName});i.push.apply(i,c)}}return i.concat(r||[])},e.prototype.findMetadata=function(e,t,r){var n=e.get(t);if(n){var i=n.get(r);if(i)return i}for(var o=0,a=this.getAncestors(t);o<a.length;o++){var d=a[o],s=e.get(d);if(s){var c=s.get(r);if(c)return c}}},e.prototype.findMetadatas=function(e,t,r){var n,i=e.get(t);i&&(n=i.get(r));for(var o=[],a=0,d=this.getAncestors(t);a<d.length;a++){var s=d[a],c=e.get(s);c&&c.has(r)&&o.push.apply(o,c.get(r))}return o.slice().reverse().concat((n||[]).slice().reverse())},e.prototype.getAncestors=function(e){if(!e)return[];if(!this._ancestorsMap.has(e)){for(var t=[],r=Object.getPrototypeOf(e.prototype.constructor);void 0!==r.prototype;r=Object.getPrototypeOf(r.prototype.constructor))t.push(r);this._ancestorsMap.set(e,t)}return this._ancestorsMap.get(e)},e}(),_t=new gt;var vt=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))};var bt=function(){function e(e,t){this.transformationType=e,this.options=t,this.recursionStack=new Set}return e.prototype.transform=function(e,t,r,n,i,o){var a,d=this;if(void 0===o&&(o=0),Array.isArray(t)||t instanceof Set){var s=n&&this.transformationType===ht.PLAIN_TO_CLASS?function(e){var t=new e;return t instanceof Set||"push"in t?t:[]}(n):[];return t.forEach(function(t,n){var i=e?e[n]:void 0;if(d.options.enableCircularCheck&&d.isCircular(t))d.transformationType===ht.CLASS_TO_CLASS&&(s instanceof Set?s.add(t):s.push(t));else{var a=void 0;if("function"!=typeof r&&r&&r.options&&r.options.discriminator&&r.options.discriminator.property&&r.options.discriminator.subTypes){if(d.transformationType===ht.PLAIN_TO_CLASS){a=r.options.discriminator.subTypes.find(function(e){return e.name===t[r.options.discriminator.property]});var c={newObject:s,object:t,property:void 0},u=r.typeFunction(c);a=void 0===a?u:a.value,r.options.keepDiscriminatorProperty||delete t[r.options.discriminator.property]}d.transformationType===ht.CLASS_TO_CLASS&&(a=t.constructor),d.transformationType===ht.CLASS_TO_PLAIN&&(t[r.options.discriminator.property]=r.options.discriminator.subTypes.find(function(e){return e.value===t.constructor}).name)}else a=r;var l=d.transform(i,t,a,void 0,t instanceof Map,o+1);s instanceof Set?s.add(l):s.push(l)}}),s}if(r!==String||i){if(r!==Number||i){if(r!==Boolean||i){if((r===Date||t instanceof Date)&&!i)return t instanceof Date?new Date(t.valueOf()):null==t?t:new Date(t);if(("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0).Buffer&&(r===Buffer||t instanceof Buffer)&&!i)return null==t?t:Buffer.from(t);if(null===(a=t)||"object"!=typeof a||"function"!=typeof a.then||i){if(i||null===t||"object"!=typeof t||"function"!=typeof t.then){if("object"==typeof t&&null!==t){r||t.constructor===Object||(Array.isArray(t)||t.constructor!==Array)&&(r=t.constructor),!r&&e&&(r=e.constructor),this.options.enableCircularCheck&&this.recursionStack.add(t);var c=this.getKeys(r,t,i),u=e||{};e||this.transformationType!==ht.PLAIN_TO_CLASS&&this.transformationType!==ht.CLASS_TO_CLASS||(u=i?new Map:r?new r:{});for(var l=function(n){if("__proto__"===n||"constructor"===n)return"continue";var a=n,d=n,s=n;if(!f.options.ignoreDecorators&&r)if(f.transformationType===ht.PLAIN_TO_CLASS)(c=_t.findExposeMetadataByCustomName(r,n))&&(s=c.propertyName,d=c.propertyName);else if(f.transformationType===ht.CLASS_TO_PLAIN||f.transformationType===ht.CLASS_TO_CLASS){var c;(c=_t.findExposeMetadata(r,n))&&c.options&&c.options.name&&(d=c.options.name)}var l=void 0;l=f.transformationType===ht.PLAIN_TO_CLASS?t[a]:t instanceof Map?t.get(a):t[a]instanceof Function?t[a]():t[a];var p=void 0,h=l instanceof Map;if(r&&i)p=r;else if(r){var y=_t.findTypeMetadata(r,s);if(y){var m={newObject:u,object:t,property:s},g=y.typeFunction?y.typeFunction(m):y.reflectedType;y.options&&y.options.discriminator&&y.options.discriminator.property&&y.options.discriminator.subTypes?t[a]instanceof Array?p=y:(f.transformationType===ht.PLAIN_TO_CLASS&&(p=void 0===(p=y.options.discriminator.subTypes.find(function(e){if(l&&l instanceof Object&&y.options.discriminator.property in l)return e.name===l[y.options.discriminator.property]}))?g:p.value,y.options.keepDiscriminatorProperty||l&&l instanceof Object&&y.options.discriminator.property in l&&delete l[y.options.discriminator.property]),f.transformationType===ht.CLASS_TO_CLASS&&(p=l.constructor),f.transformationType===ht.CLASS_TO_PLAIN&&l&&(l[y.options.discriminator.property]=y.options.discriminator.subTypes.find(function(e){return e.value===l.constructor}).name)):p=g,h=h||y.reflectedType===Map}else if(f.options.targetMaps)f.options.targetMaps.filter(function(e){return e.target===r&&!!e.properties[s]}).forEach(function(e){return p=e.properties[s]});else if(f.options.enableImplicitConversion&&f.transformationType===ht.PLAIN_TO_CLASS){var _=Reflect.getMetadata("design:type",r.prototype,s);_&&(p=_)}}var v=Array.isArray(t[a])?f.getReflectedType(r,s):void 0,b=e?e[a]:void 0;if(u.constructor.prototype){var S=Object.getOwnPropertyDescriptor(u.constructor.prototype,d);if((f.transformationType===ht.PLAIN_TO_CLASS||f.transformationType===ht.CLASS_TO_CLASS)&&(S&&!S.set||u[d]instanceof Function))return"continue"}if(f.options.enableCircularCheck&&f.isCircular(l)){if(f.transformationType===ht.CLASS_TO_CLASS){N=l;(void 0!==(N=f.applyCustomTransformations(N,r,n,t,f.transformationType))||f.options.exposeUnsetFields)&&(u instanceof Map?u.set(d,N):u[d]=N)}}else{var I=f.transformationType===ht.PLAIN_TO_CLASS?d:n,N=void 0;f.transformationType===ht.CLASS_TO_PLAIN?(N=t[I],N=f.applyCustomTransformations(N,r,I,t,f.transformationType),N=t[I]===N?l:N,N=f.transform(b,N,p,v,h,o+1)):void 0===l&&f.options.exposeDefaultValues?N=u[d]:(N=f.transform(b,l,p,v,h,o+1),N=f.applyCustomTransformations(N,r,I,t,f.transformationType)),(void 0!==N||f.options.exposeUnsetFields)&&(u instanceof Map?u.set(d,N):u[d]=N)}},f=this,p=0,h=c;p<h.length;p++){l(h[p])}return this.options.enableCircularCheck&&this.recursionStack.delete(t),u}return t}return t}return new Promise(function(e,n){t.then(function(t){return e(d.transform(void 0,t,r,void 0,void 0,o+1))},n)})}return null==t?t:Boolean(t)}return null==t?t:Number(t)}return null==t?t:String(t)},e.prototype.applyCustomTransformations=function(e,t,r,n,i){var o=this,a=_t.findTransformMetadatas(t,r,this.transformationType);return void 0!==this.options.version&&(a=a.filter(function(e){return!e.options||o.checkVersion(e.options.since,e.options.until)})),a=this.options.groups&&this.options.groups.length?a.filter(function(e){return!e.options||o.checkGroups(e.options.groups)}):a.filter(function(e){return!e.options||!e.options.groups||!e.options.groups.length}),a.forEach(function(t){e=t.transformFn({value:e,key:r,obj:n,type:i,options:o.options})}),e},e.prototype.isCircular=function(e){return this.recursionStack.has(e)},e.prototype.getReflectedType=function(e,t){if(e){var r=_t.findTypeMetadata(e,t);return r?r.reflectedType:void 0}},e.prototype.getKeys=function(e,t,r){var n=this,i=_t.getStrategy(e);"none"===i&&(i=this.options.strategy||"exposeAll");var o=[];if(("exposeAll"===i||r)&&(o=t instanceof Map?Array.from(t.keys()):Object.keys(t)),r)return o;if(this.options.ignoreDecorators&&this.options.excludeExtraneousValues&&e){var a=_t.getExposedProperties(e,this.transformationType),d=_t.getExcludedProperties(e,this.transformationType);o=vt(vt([],a,!0),d,!0)}if(!this.options.ignoreDecorators&&e){a=_t.getExposedProperties(e,this.transformationType);this.transformationType===ht.PLAIN_TO_CLASS&&(a=a.map(function(t){var r=_t.findExposeMetadata(e,t);return r&&r.options&&r.options.name?r.options.name:t})),o=this.options.excludeExtraneousValues?a:o.concat(a);var s=_t.getExcludedProperties(e,this.transformationType);s.length>0&&(o=o.filter(function(e){return!s.includes(e)})),void 0!==this.options.version&&(o=o.filter(function(t){var r=_t.findExposeMetadata(e,t);return!r||!r.options||n.checkVersion(r.options.since,r.options.until)})),o=this.options.groups&&this.options.groups.length?o.filter(function(t){var r=_t.findExposeMetadata(e,t);return!r||!r.options||n.checkGroups(r.options.groups)}):o.filter(function(t){var r=_t.findExposeMetadata(e,t);return!(r&&r.options&&r.options.groups&&r.options.groups.length)})}return this.options.excludePrefixes&&this.options.excludePrefixes.length&&(o=o.filter(function(e){return n.options.excludePrefixes.every(function(t){return e.substr(0,t.length)!==t})})),o=o.filter(function(e,t,r){return r.indexOf(e)===t}),o},e.prototype.checkVersion=function(e,t){var r=!0;return r&&e&&(r=this.options.version>=e),r&&t&&(r=this.options.version<t),r},e.prototype.checkGroups=function(e){return!e||this.options.groups.some(function(t){return e.includes(t)})},e}(),St={enableCircularCheck:!1,enableImplicitConversion:!1,excludeExtraneousValues:!1,excludePrefixes:void 0,exposeDefaultValues:!1,exposeUnsetFields:!0,groups:void 0,ignoreDecorators:!1,strategy:void 0,targetMaps:void 0,version:void 0},It=this&&this.__assign||function(){return It=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},It.apply(this,arguments)},Nt=function(){function e(){}return e.prototype.instanceToPlain=function(e,t){return new bt(ht.CLASS_TO_PLAIN,It(It({},St),t)).transform(void 0,e,void 0,void 0,void 0,void 0)},e.prototype.classToPlainFromExist=function(e,t,r){return new bt(ht.CLASS_TO_PLAIN,It(It({},St),r)).transform(t,e,void 0,void 0,void 0,void 0)},e.prototype.plainToInstance=function(e,t,r){return new bt(ht.PLAIN_TO_CLASS,It(It({},St),r)).transform(void 0,t,e,void 0,void 0,void 0)},e.prototype.plainToClassFromExist=function(e,t,r){return new bt(ht.PLAIN_TO_CLASS,It(It({},St),r)).transform(e,t,void 0,void 0,void 0,void 0)},e.prototype.instanceToInstance=function(e,t){return new bt(ht.CLASS_TO_CLASS,It(It({},St),t)).transform(void 0,e,void 0,void 0,void 0,void 0)},e.prototype.classToClassFromExist=function(e,t,r){return new bt(ht.CLASS_TO_CLASS,It(It({},St),r)).transform(t,e,void 0,void 0,void 0,void 0)},e.prototype.serialize=function(e,t){return JSON.stringify(this.instanceToPlain(e,t))},e.prototype.deserialize=function(e,t,r){var n=JSON.parse(t);return this.plainToInstance(e,n,r)},e.prototype.deserializeArray=function(e,t,r){var n=JSON.parse(t);return this.plainToInstance(e,n,r)},e}();var $t=new Nt;var wt=Object.freeze({__proto__:null,ClassTransformer:Nt,Exclude:function(e){return void 0===e&&(e={}),function(t,r){_t.addExcludeMetadata({target:t instanceof Function?t:t.constructor,propertyName:r,options:e})}},Expose:function(e){return void 0===e&&(e={}),function(t,r){_t.addExposeMetadata({target:t instanceof Function?t:t.constructor,propertyName:r,options:e})}},Transform:function(e,t){return void 0===t&&(t={}),function(r,n){_t.addTransformMetadata({target:r.constructor,propertyName:n,transformFn:e,options:t})}},TransformInstanceToInstance:function(e){return function(t,r,n){var i=new Nt,o=n.value;n.value=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=o.apply(this,t);return!!n&&("object"==typeof n||"function"==typeof n)&&"function"==typeof n.then?n.then(function(t){return i.instanceToInstance(t,e)}):i.instanceToInstance(n,e)}}},TransformInstanceToPlain:function(e){return function(t,r,n){var i=new Nt,o=n.value;n.value=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=o.apply(this,t);return!!n&&("object"==typeof n||"function"==typeof n)&&"function"==typeof n.then?n.then(function(t){return i.instanceToPlain(t,e)}):i.instanceToPlain(n,e)}}},TransformPlainToInstance:function(e,t){return function(r,n,i){var o=new Nt,a=i.value;i.value=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=a.apply(this,r);return!!i&&("object"==typeof i||"function"==typeof i)&&"function"==typeof i.then?i.then(function(r){return o.plainToInstance(e,r,t)}):o.plainToInstance(e,i,t)}}},get TransformationType(){return ht},Type:function(e,t){return void 0===t&&(t={}),function(r,n){var i=Reflect.getMetadata("design:type",r,n);_t.addTypeMetadata({target:r.constructor,propertyName:n,reflectedType:i,typeFunction:e,options:t})}},classToClassFromExist:function(e,t,r){return $t.classToClassFromExist(e,t,r)},classToPlain:function(e,t){return $t.instanceToPlain(e,t)},classToPlainFromExist:function(e,t,r){return $t.classToPlainFromExist(e,t,r)},deserialize:function(e,t,r){return $t.deserialize(e,t,r)},deserializeArray:function(e,t,r){return $t.deserializeArray(e,t,r)},instanceToInstance:function(e,t){return $t.instanceToInstance(e,t)},instanceToPlain:function(e,t){return $t.instanceToPlain(e,t)},plainToClass:function(e,t,r){return $t.plainToInstance(e,t,r)},plainToClassFromExist:function(e,t,r){return $t.plainToClassFromExist(e,t,r)},plainToInstance:function(e,t,r){return $t.plainToInstance(e,t,r)},serialize:function(e,t){return $t.serialize(e,t)}}),At=W(wt),Ot=function(e){this.groups=[],this.each=!1,this.context=void 0,this.type=e.type,this.name=e.name,this.target=e.target,this.propertyName=e.propertyName,this.constraints=null==e?void 0:e.constraints,this.constraintCls=e.constraintCls,this.validationTypeOptions=e.validationTypeOptions,e.validationOptions&&(this.message=e.validationOptions.message,this.groups=e.validationOptions.groups,this.always=e.validationOptions.always,this.each=e.validationOptions.each,this.context=e.validationOptions.context)},Mt=function(){function e(){}return e.prototype.transform=function(e){var t=[];return Object.keys(e.properties).forEach(function(r){e.properties[r].forEach(function(n){var i={message:n.message,groups:n.groups,always:n.always,each:n.each},o={type:n.type,name:n.name,target:e.name,propertyName:r,constraints:n.constraints,validationTypeOptions:n.options,validationOptions:i};t.push(new Ot(o))})}),t},e}();function Tt(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0}function Et(e){return null!==e&&"object"==typeof e&&"function"==typeof e.then}var Ct=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},xt=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},kt=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))},Pt=function(){function e(){this.validationMetadatas=new Map,this.constraintMetadatas=new Map}return Object.defineProperty(e.prototype,"hasValidationMetaData",{get:function(){return!!this.validationMetadatas.size},enumerable:!1,configurable:!0}),e.prototype.addValidationSchema=function(e){var t=this;(new Mt).transform(e).forEach(function(e){return t.addValidationMetadata(e)})},e.prototype.addValidationMetadata=function(e){var t=this.validationMetadatas.get(e.target);t?t.push(e):this.validationMetadatas.set(e.target,[e])},e.prototype.addConstraintMetadata=function(e){var t=this.constraintMetadatas.get(e.target);t?t.push(e):this.constraintMetadatas.set(e.target,[e])},e.prototype.groupByPropertyName=function(e){var t={};return e.forEach(function(e){t[e.propertyName]||(t[e.propertyName]=[]),t[e.propertyName].push(e)}),t},e.prototype.getTargetValidationMetadatas=function(e,t,r,n,i){var o,a,d=function(e){return void 0!==e.always?e.always:(!e.groups||!e.groups.length)&&r},s=function(e){return!(!n||i&&i.length||!e.groups||!e.groups.length)},c=(this.validationMetadatas.get(e)||[]).filter(function(r){return(r.target===e||r.target===t)&&(!!d(r)||!s(r)&&(!(i&&i.length>0)||r.groups&&!!r.groups.find(function(e){return-1!==i.indexOf(e)})))}),u=[];try{for(var l=Ct(this.validationMetadatas.entries()),f=l.next();!f.done;f=l.next()){var p=xt(f.value,2),h=p[0],y=p[1];e.prototype instanceof h&&u.push.apply(u,kt([],xt(y),!1))}}catch(e){o={error:e}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(o)throw o.error}}var m=u.filter(function(t){return"string"!=typeof t.target&&(t.target!==e&&((!(t.target instanceof Function)||e.prototype instanceof t.target)&&(!!d(t)||!s(t)&&(!(i&&i.length>0)||t.groups&&!!t.groups.find(function(e){return-1!==i.indexOf(e)})))))}),g=m.filter(function(e){return!c.find(function(t){return t.propertyName===e.propertyName&&t.type===e.type})});return c.concat(g)},e.prototype.getTargetValidatorConstraints=function(e){return this.constraintMetadatas.get(e)||[]},e}();function Dt(){var e=Tt();return e.classValidatorMetadataStorage||(e.classValidatorMetadataStorage=new Pt),e.classValidatorMetadataStorage}var Rt=function(){function e(){}return e.prototype.toString=function(e,t,r,n){var i=this;void 0===e&&(e=!1),void 0===t&&(t=!1),void 0===r&&(r=""),void 0===n&&(n=!1);var o=e?"":"",a=e?"":"",d=function(e){return" - property ".concat(o).concat(r).concat(e).concat(a," has failed the following constraints: ").concat(o).concat((n?Object.values:Object.keys)(null!==(t=i.constraints)&&void 0!==t?t:{}).join(", ")).concat(a," \n");var t};if(t){var s=Number.isInteger(+this.property)?"[".concat(this.property,"]"):"".concat(r?".":"").concat(this.property);return this.constraints?d(s):this.children?this.children.map(function(t){return t.toString(e,!0,"".concat(r).concat(s),n)}).join(""):""}return"An instance of ".concat(o).concat(this.target?this.target.constructor.name:"an object").concat(a," has failed the validation:\n")+(this.constraints?d(this.property):"")+(this.children?this.children.map(function(t){return t.toString(e,!0,i.property,n)}).join(""):"")},e}(),Ft=function(){function e(){}return e.isValid=function(e){var t=this;return"isValid"!==e&&"getMessage"!==e&&-1!==Object.keys(this).map(function(e){return t[e]}).indexOf(e)},e.CUSTOM_VALIDATION="customValidation",e.NESTED_VALIDATION="nestedValidation",e.PROMISE_VALIDATION="promiseValidation",e.CONDITIONAL_VALIDATION="conditionalValidation",e.WHITELIST="whitelistValidation",e.IS_DEFINED="isDefined",e}();var Bt,Lt,Ut=function(){function e(){}return e.replaceMessageSpecialTokens=function(e,t){var r;return e instanceof Function?r=e(t):"string"==typeof e&&(r=e),r&&Array.isArray(t.constraints)&&t.constraints.forEach(function(e,t){r=r.replace(new RegExp("\\$constraint".concat(t+1),"g"),function(e){return Array.isArray(e)?e.join(", "):("symbol"==typeof e&&(e=e.description),"".concat(e))}(e))}),r&&void 0!==t.value&&null!==t.value&&["string","boolean","number"].includes(typeof t.value)&&(r=r.replace(/\$value/g,t.value)),r&&(r=r.replace(/\$property/g,t.property)),r&&(r=r.replace(/\$target/g,t.targetName)),r},e}(),Kt=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},jt=function(){function e(e,t){this.validator=e,this.validatorOptions=t,this.awaitingPromises=[],this.ignoreAsyncValidations=!1,this.metadataStorage=Dt()}return e.prototype.execute=function(e,t,r){var n,i,o=this;!this.metadataStorage.hasValidationMetaData&&(null===(n=this.validatorOptions)||void 0===n||n.enableDebugMessages);var a=this.validatorOptions?this.validatorOptions.groups:void 0,d=this.validatorOptions&&this.validatorOptions.strictGroups||!1,s=this.validatorOptions&&this.validatorOptions.always||!1,c=void 0===(null===(i=this.validatorOptions)||void 0===i?void 0:i.forbidUnknownValues)||!1!==this.validatorOptions.forbidUnknownValues,u=this.metadataStorage.getTargetValidationMetadatas(e.constructor,t,s,d,a),l=this.metadataStorage.groupByPropertyName(u);if(c&&!u.length){var f=new Rt;return this.validatorOptions&&this.validatorOptions.validationError&&void 0!==this.validatorOptions.validationError.target&&!0!==this.validatorOptions.validationError.target||(f.target=e),f.value=void 0,f.property=void 0,f.children=[],f.constraints={unknownValue:"an unknown value was passed to the validate function"},void r.push(f)}this.validatorOptions&&this.validatorOptions.whitelist&&this.whitelist(e,l,r),Object.keys(l).forEach(function(t){var n=e[t],i=l[t].filter(function(e){return e.type===Ft.IS_DEFINED}),a=l[t].filter(function(e){return e.type!==Ft.IS_DEFINED&&e.type!==Ft.WHITELIST});n instanceof Promise&&a.find(function(e){return e.type===Ft.PROMISE_VALIDATION})?o.awaitingPromises.push(n.then(function(n){o.performValidations(e,n,t,i,a,r)})):o.performValidations(e,n,t,i,a,r)})},e.prototype.whitelist=function(e,t,r){var n=this,i=[];Object.keys(e).forEach(function(e){t[e]&&0!==t[e].length||i.push(e)}),i.length>0&&(this.validatorOptions&&this.validatorOptions.forbidNonWhitelisted?i.forEach(function(t){var i,o=n.generateValidationError(e,e[t],t);o.constraints=((i={})[Ft.WHITELIST]="property ".concat(t," should not exist"),i),o.children=void 0,r.push(o)}):i.forEach(function(t){return delete e[t]}))},e.prototype.stripEmptyErrors=function(e){var t=this;return e.filter(function(e){if(e.children&&(e.children=t.stripEmptyErrors(e.children)),0===Object.keys(e.constraints).length){if(0===e.children.length)return!1;delete e.constraints}return!0})},e.prototype.performValidations=function(e,t,r,n,i,o){var a=i.filter(function(e){return e.type===Ft.CUSTOM_VALIDATION}),d=i.filter(function(e){return e.type===Ft.NESTED_VALIDATION}),s=i.filter(function(e){return e.type===Ft.CONDITIONAL_VALIDATION}),c=this.generateValidationError(e,t,r);o.push(c),this.conditionalValidations(e,t,s)&&(this.customValidations(e,t,n,c),this.mapContexts(e,t,n,c),void 0===t&&this.validatorOptions&&!0===this.validatorOptions.skipUndefinedProperties||null===t&&this.validatorOptions&&!0===this.validatorOptions.skipNullProperties||null==t&&this.validatorOptions&&!0===this.validatorOptions.skipMissingProperties||(this.customValidations(e,t,a,c),this.nestedValidations(t,d,c),this.mapContexts(e,t,i,c),this.mapContexts(e,t,a,c)))},e.prototype.generateValidationError=function(e,t,r){var n=new Rt;return this.validatorOptions&&this.validatorOptions.validationError&&void 0!==this.validatorOptions.validationError.target&&!0!==this.validatorOptions.validationError.target||(n.target=e),this.validatorOptions&&this.validatorOptions.validationError&&void 0!==this.validatorOptions.validationError.value&&!0!==this.validatorOptions.validationError.value||(n.value=t),n.property=r,n.children=[],n.constraints={},n},e.prototype.conditionalValidations=function(e,t,r){return r.map(function(r){return r.constraints[0](e,t)}).reduce(function(e,t){return e&&t},!0)},e.prototype.customValidations=function(e,t,r,n){var i=this;r.forEach(function(r){i.metadataStorage.getTargetValidatorConstraints(r.constraintCls).forEach(function(o){if(!(o.async&&i.ignoreAsyncValidations||i.validatorOptions&&i.validatorOptions.stopAtFirstError&&Object.keys(n.constraints||{}).length>0)){var a={targetName:e.constructor?e.constructor.name:void 0,property:r.propertyName,object:e,value:t,constraints:r.constraints};if(r.each&&(Array.isArray(t)||t instanceof Set||t instanceof Map)){var d,s=((d=t)instanceof Map?Array.from(d.values()):Array.isArray(d)?d:Array.from(d)).map(function(e){return o.instance.validate(e,a)});if(s.some(function(e){return Et(e)})){var c=s.map(function(e){return Et(e)?e:Promise.resolve(e)}),u=Promise.all(c).then(function(a){if(!a.every(function(e){return e})){var d=Kt(i.createValidationError(e,t,r,o),2),s=d[0],c=d[1];n.constraints[s]=c,r.context&&(n.contexts||(n.contexts={}),n.contexts[s]=Object.assign(n.contexts[s]||{},r.context))}});i.awaitingPromises.push(u)}else{if(!s.every(function(e){return e})){var l=Kt(i.createValidationError(e,t,r,o),2);y=l[0],m=l[1];n.constraints[y]=m}}}else{var f=o.instance.validate(t,a);if(Et(f)){var p=f.then(function(a){if(!a){var d=Kt(i.createValidationError(e,t,r,o),2),s=d[0],c=d[1];n.constraints[s]=c,r.context&&(n.contexts||(n.contexts={}),n.contexts[s]=Object.assign(n.contexts[s]||{},r.context))}});i.awaitingPromises.push(p)}else if(!f){var h=Kt(i.createValidationError(e,t,r,o),2),y=h[0],m=h[1];n.constraints[y]=m}}}})})},e.prototype.nestedValidations=function(e,t,r){var n=this;void 0!==e&&t.forEach(function(i){if((i.type===Ft.NESTED_VALIDATION||i.type===Ft.PROMISE_VALIDATION)&&!(n.validatorOptions&&n.validatorOptions.stopAtFirstError&&Object.keys(r.constraints||{}).length>0))if(Array.isArray(e)||e instanceof Set||e instanceof Map)(e instanceof Set?Array.from(e):e).forEach(function(i,o){n.performValidations(e,i,o.toString(),[],t,r.children)});else if(e instanceof Object){var o="string"==typeof i.target?i.target:i.target.name;n.execute(e,o,r.children)}else{var a=Kt(n.createValidationError(i.target,e,i),2),d=a[0],s=a[1];r.constraints[d]=s}})},e.prototype.mapContexts=function(e,t,r,n){var i=this;return r.forEach(function(e){if(e.context){var t=void 0;if(e.type===Ft.CUSTOM_VALIDATION)t=i.metadataStorage.getTargetValidatorConstraints(e.constraintCls)[0];var r=i.getConstraintType(e,t);n.constraints[r]&&(n.contexts||(n.contexts={}),n.contexts[r]=Object.assign(n.contexts[r]||{},e.context))}})},e.prototype.createValidationError=function(e,t,r,n){var i=e.constructor?e.constructor.name:void 0,o=this.getConstraintType(r,n),a={targetName:i,property:r.propertyName,object:e,value:t,constraints:r.constraints},d=r.message||"";return r.message||this.validatorOptions&&(!this.validatorOptions||this.validatorOptions.dismissDefaultMessages)||n&&n.instance.defaultMessage instanceof Function&&(d=n.instance.defaultMessage(a)),[o,Ut.replaceMessageSpecialTokens(d,a)]},e.prototype.getConstraintType=function(e,t){return t&&t.name?t.name:e.type},e}(),Vt=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{s(n.next(e))}catch(e){o(e)}}function d(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,d)}s((n=n.apply(e,t||[])).next())})},Jt=this&&this.__generator||function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:d(0),throw:d(1),return:d(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function d(d){return function(s){return function(d){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,d[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&d[0]?n.return:d[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,d[1])).done)return i;switch(n=0,i&&(d=[2&d[0],i.value]),d[0]){case 0:case 1:i=d;break;case 4:return a.label++,{value:d[1],done:!1};case 5:a.label++,n=d[1],d=[0];continue;case 7:d=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==d[0]&&2!==d[0])){a=0;continue}if(3===d[0]&&(!i||d[1]>i[0]&&d[1]<i[3])){a.label=d[1];break}if(6===d[0]&&a.label<i[1]){a.label=i[1],i=d;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(d);break}i[2]&&a.ops.pop(),a.trys.pop();continue}d=t.call(e,a)}catch(e){d=[6,e],n=0}finally{r=i=0}if(5&d[0])throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}([d,s])}}},qt=function(){function e(){}return e.prototype.validate=function(e,t,r){return this.coreValidate(e,t,r)},e.prototype.validateOrReject=function(e,t,r){return Vt(this,void 0,void 0,function(){var n;return Jt(this,function(i){switch(i.label){case 0:return[4,this.coreValidate(e,t,r)];case 1:return(n=i.sent()).length?[2,Promise.reject(n)]:[2]}})})},e.prototype.validateSync=function(e,t,r){var n="string"==typeof e?t:e,i="string"==typeof e?e:void 0,o=new jt(this,"string"==typeof e?r:t);o.ignoreAsyncValidations=!0;var a=[];return o.execute(n,i,a),o.stripEmptyErrors(a)},e.prototype.coreValidate=function(e,t,r){var n="string"==typeof e?t:e,i="string"==typeof e?e:void 0,o=new jt(this,"string"==typeof e?r:t),a=[];return o.execute(n,i,a),Promise.all(o.awaitingPromises).then(function(){return o.stripEmptyErrors(a)})},e}(),Gt=new(function(){function e(){this.instances=[]}return e.prototype.get=function(e){var t=this.instances.find(function(t){return t.type===e});return t||(t={type:e,object:new e},this.instances.push(t)),t.object},e}());function zt(e){if(Bt)try{var t=Bt.get(e);if(t)return t;if(!Lt||!Lt.fallback)return t}catch(e){if(!Lt||!Lt.fallbackOnErrors)throw e}return Gt.get(e)}var Ht=function(){function e(e,t,r){void 0===r&&(r=!1),this.target=e,this.name=t,this.async=r}return Object.defineProperty(e.prototype,"instance",{get:function(){return zt(this.target)},enumerable:!1,configurable:!0}),e}();function Zt(e){var t;if(e.validator instanceof Function){if(t=e.validator,zt(Pt).getTargetValidatorConstraints(e.validator).length>1)throw"More than one implementation of ValidatorConstraintInterface found for validator on: ".concat(e.target.name,":").concat(e.propertyName)}else{var r=e.validator;t=function(){function e(){}return e.prototype.validate=function(e,t){return r.validate(e,t)},e.prototype.defaultMessage=function(e){return r.defaultMessage?r.defaultMessage(e):""},e}(),Dt().addConstraintMetadata(new Ht(t,e.name,e.async))}var n={type:e.name&&Ft.isValid(e.name)?e.name:Ft.CUSTOM_VALIDATION,name:e.name,target:e.target,propertyName:e.propertyName,validationOptions:e.options,constraintCls:t,constraints:e.constraints};Dt().addValidationMetadata(new Ot(n))}function Wt(e,t){return function(r){var n=t&&t.each?"each value in ":"";return e(n,r)}}function Yt(e,t){return function(r,n){Zt({name:e.name,target:r.constructor,propertyName:n,options:t,constraints:e.constraints,validator:e.validator})}}var Xt=Ft.IS_DEFINED;function Qt(e){return null!=e}var er="isOptional";var tr=this&&this.__assign||function(){return tr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},tr.apply(this,arguments)};var rr,nr={exports:{}},ir={exports:{}};function or(){return rr||(rr=1,e=ir,t=ir.exports,Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(null==e)throw new TypeError("Expected a string but received a ".concat(e));if("String"!==e.constructor.name)throw new TypeError("Expected a string but received a ".concat(e.constructor.name))},e.exports=t.default,e.exports.default=t.default),ir.exports;var e,t}var ar,dr={exports:{}};function sr(){return ar||(ar=1,e=dr,t=dr.exports,Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;for(var r in t)void 0===e[r]&&(e[r]=t[r]);return e},e.exports=t.default,e.exports.default=t.default),dr.exports;var e,t}var cr,ur,lr={exports:{}};function fr(){return cr||(cr=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e,t){return-1!==e.indexOf(t)},e.exports=t.default,e.exports.default=t.default}(lr,lr.exports)),lr.exports}function pr(){return ur||(ur=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,r.default)(e),t=(0,n.default)(t,u),!(0,i.default)(e,","))return!1;var o=e.split(",");if(o[0].startsWith("(")&&!o[1].endsWith(")")||o[1].endsWith(")")&&!o[0].startsWith("("))return!1;if(t.checkDMS)return s.test(o[0])&&c.test(o[1]);return a.test(o[0])&&d.test(o[1])};var r=o(or()),n=o(sr()),i=o(fr());function o(e){return e&&e.__esModule?e:{default:e}}var a=/^\(?[+-]?(90(\.0+)?|[1-8]?\d(\.\d+)?)$/,d=/^\s?[+-]?(180(\.0+)?|1[0-7]\d(\.\d+)?|\d{1,2}(\.\d+)?)\)?$/,s=/^(([1-8]?\d)\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|90\D+0\D+0)\D+[NSns]?$/i,c=/^\s*([1-7]?\d{1,2}\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|180\D+0\D+0)\D+[EWew]?$/i,u={checkDMS:!1};e.exports=t.default,e.exports.default=t.default}(nr,nr.exports)),nr.exports}var hr=Z(pr()),yr="isLatLong";function mr(e){return"string"==typeof e&&hr(e)}var gr="isLatitude";function _r(e){return("number"==typeof e||"string"==typeof e)&&mr("".concat(e,",0"))}var vr="isLongitude";function br(e){return("number"==typeof e||"string"==typeof e)&&mr("0,".concat(e))}var Sr="equals";function Ir(e,t){return e===t}var Nr="notEquals";function $r(e,t){return e!==t}var wr="isEmpty";function Ar(e){return""===e||null==e}var Or="isNotEmpty";function Mr(e){return""!==e&&null!=e}var Tr="isIn";function Er(e,t){return Array.isArray(t)&&t.some(function(t){return t===e})}var Cr="isNotIn";function xr(e,t){return!Array.isArray(t)||!t.some(function(t){return t===e})}var kr,Pr={exports:{}},Dr={exports:{}},Rr={},Fr={exports:{}};function Br(){return kr||(kr=1,e=Fr,t=Fr.exports,Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return null==e},e.exports=t.default,e.exports.default=t.default),Fr.exports;var e,t}var Lr,Ur,Kr,jr,Vr={};function Jr(){if(Lr)return Vr;Lr=1,Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.farsiLocales=Vr.englishLocales=Vr.dotDecimal=Vr.decimal=Vr.commaDecimal=Vr.bengaliLocales=Vr.arabicLocales=Vr.alphanumeric=Vr.alpha=void 0;for(var e,t=Vr.alpha={"en-US":/^[A-Z]+$/i,"az-AZ":/^[A-VXYZÇƏĞİıÖŞÜ]+$/i,"bg-BG":/^[А-Я]+$/i,"cs-CZ":/^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,"da-DK":/^[A-ZÆØÅ]+$/i,"de-DE":/^[A-ZÄÖÜß]+$/i,"el-GR":/^[Α-ώ]+$/i,"es-ES":/^[A-ZÁÉÍÑÓÚÜ]+$/i,"fa-IR":/^[ابپتثجچحخدذرزژسشصضطظعغفقکگلمنوهی]+$/i,"fi-FI":/^[A-ZÅÄÖ]+$/i,"fr-FR":/^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,"it-IT":/^[A-ZÀÉÈÌÎÓÒÙ]+$/i,"ja-JP":/^[ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,"nb-NO":/^[A-ZÆØÅ]+$/i,"nl-NL":/^[A-ZÁÉËÏÓÖÜÚ]+$/i,"nn-NO":/^[A-ZÆØÅ]+$/i,"hu-HU":/^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i,"pl-PL":/^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i,"pt-PT":/^[A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,"ru-RU":/^[А-ЯЁ]+$/i,"kk-KZ":/^[А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,"sl-SI":/^[A-ZČĆĐŠŽ]+$/i,"sk-SK":/^[A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,"sr-RS@latin":/^[A-ZČĆŽŠĐ]+$/i,"sr-RS":/^[А-ЯЂЈЉЊЋЏ]+$/i,"sv-SE":/^[A-ZÅÄÖ]+$/i,"th-TH":/^[ก-๐\s]+$/i,"tr-TR":/^[A-ZÇĞİıÖŞÜ]+$/i,"uk-UA":/^[А-ЩЬЮЯЄIЇҐі]+$/i,"vi-VN":/^[A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,"ko-KR":/^[ㄱ-ㅎㅏ-ㅣ가-힣]*$/,"ku-IQ":/^[ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,ar:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,he:/^[א-ת]+$/,fa:/^['آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی']+$/i,bn:/^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,eo:/^[ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i,"hi-IN":/^[\u0900-\u0961]+[\u0972-\u097F]*$/i,"si-LK":/^[\u0D80-\u0DFF]+$/,"ta-IN":/^[\u0B80-\u0BFF]+$/i,"te-IN":/^[\u0C00-\u0C7F]+$/i,"kn-IN":/^[\u0C80-\u0CFF]+$/i,"ml-IN":/^[\u0D00-\u0D7F]+$/i,"gu-IN":/^[\u0A80-\u0AFF]+$/i,"pa-IN":/^[\u0A00-\u0A7F]+$/i,"or-IN":/^[\u0B00-\u0B7F]+$/i},r=Vr.alphanumeric={"en-US":/^[0-9A-Z]+$/i,"az-AZ":/^[0-9A-VXYZÇƏĞİıÖŞÜ]+$/i,"bg-BG":/^[0-9А-Я]+$/i,"cs-CZ":/^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,"da-DK":/^[0-9A-ZÆØÅ]+$/i,"de-DE":/^[0-9A-ZÄÖÜß]+$/i,"el-GR":/^[0-9Α-ω]+$/i,"es-ES":/^[0-9A-ZÁÉÍÑÓÚÜ]+$/i,"fi-FI":/^[0-9A-ZÅÄÖ]+$/i,"fr-FR":/^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,"it-IT":/^[0-9A-ZÀÉÈÌÎÓÒÙ]+$/i,"ja-JP":/^[0-90-9ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,"hu-HU":/^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i,"nb-NO":/^[0-9A-ZÆØÅ]+$/i,"nl-NL":/^[0-9A-ZÁÉËÏÓÖÜÚ]+$/i,"nn-NO":/^[0-9A-ZÆØÅ]+$/i,"pl-PL":/^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i,"pt-PT":/^[0-9A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,"ru-RU":/^[0-9А-ЯЁ]+$/i,"kk-KZ":/^[0-9А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,"sl-SI":/^[0-9A-ZČĆĐŠŽ]+$/i,"sk-SK":/^[0-9A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,"sr-RS@latin":/^[0-9A-ZČĆŽŠĐ]+$/i,"sr-RS":/^[0-9А-ЯЂЈЉЊЋЏ]+$/i,"sv-SE":/^[0-9A-ZÅÄÖ]+$/i,"th-TH":/^[ก-๙\s]+$/i,"tr-TR":/^[0-9A-ZÇĞİıÖŞÜ]+$/i,"uk-UA":/^[0-9А-ЩЬЮЯЄIЇҐі]+$/i,"ko-KR":/^[0-9ㄱ-ㅎㅏ-ㅣ가-힣]*$/,"ku-IQ":/^[٠١٢٣٤٥٦٧٨٩0-9ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,"vi-VN":/^[0-9A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,he:/^[0-9א-ת]+$/,fa:/^['0-9آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی۱۲۳۴۵۶۷۸۹۰']+$/i,bn:/^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣ০১২৩৪৫৬৭৮৯ৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,eo:/^[0-9ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i,"hi-IN":/^[\u0900-\u0963]+[\u0966-\u097F]*$/i,"si-LK":/^[0-9\u0D80-\u0DFF]+$/,"ta-IN":/^[0-9\u0B80-\u0BFF.]+$/i,"te-IN":/^[0-9\u0C00-\u0C7F.]+$/i,"kn-IN":/^[0-9\u0C80-\u0CFF.]+$/i,"ml-IN":/^[0-9\u0D00-\u0D7F.]+$/i,"gu-IN":/^[0-9\u0A80-\u0AFF.]+$/i,"pa-IN":/^[0-9\u0A00-\u0A7F.]+$/i,"or-IN":/^[0-9\u0B00-\u0B7F.]+$/i},n=Vr.decimal={"en-US":".",ar:"٫"},i=Vr.englishLocales=["AU","GB","HK","IN","NZ","ZA","ZM"],o=0;o<i.length;o++)t[e="en-".concat(i[o])]=t["en-US"],r[e]=r["en-US"],n[e]=n["en-US"];for(var a,d=Vr.arabicLocales=["AE","BH","DZ","EG","IQ","JO","KW","LB","LY","MA","QM","QA","SA","SD","SY","TN","YE"],s=0;s<d.length;s++)t[a="ar-".concat(d[s])]=t.ar,r[a]=r.ar,n[a]=n.ar;for(var c,u=Vr.farsiLocales=["IR","AF"],l=0;l<u.length;l++)r[c="fa-".concat(u[l])]=r.fa,n[c]=n.ar;for(var f,p=Vr.bengaliLocales=["BD","IN"],h=0;h<p.length;h++)t[f="bn-".concat(p[h])]=t.bn,r[f]=r.bn,n[f]=n["en-US"];for(var y=Vr.dotDecimal=["ar-EG","ar-LB","ar-LY"],m=Vr.commaDecimal=["bg-BG","cs-CZ","da-DK","de-DE","el-GR","en-ZM","eo","es-ES","fr-CA","fr-FR","gu-IN","hi-IN","hu-HU","id-ID","it-IT","kk-KZ","kn-IN","ku-IQ","ml-IN","nb-NO","nl-NL","nn-NO","or-IN","pa-IN","pl-PL","pt-PT","ru-RU","si-LK","sl-SI","sr-RS","sr-RS@latin","sv-SE","ta-IN","te-IN","tr-TR","uk-UA","vi-VN"],g=0;g<y.length;g++)n[y[g]]=n["en-US"];for(var _=0;_<m.length;_++)n[m[_]]=",";return t["fr-CA"]=t["fr-FR"],r["fr-CA"]=r["fr-FR"],t["pt-BR"]=t["pt-PT"],r["pt-BR"]=r["pt-PT"],n["pt-BR"]=n["pt-PT"],t["pl-Pl"]=t["pl-PL"],r["pl-Pl"]=r["pl-PL"],n["pl-Pl"]=n["pl-PL"],t["fa-AF"]=t.fa,Vr}function qr(){if(Ur)return Rr;Ur=1,Object.defineProperty(Rr,"__esModule",{value:!0}),Rr.default=function(n,i){(0,e.default)(n),i=i||{};var o=new RegExp("^(?:[-+])?(?:[0-9]+)?(?:\\".concat(i.locale?r.decimal[i.locale]:".","[0-9]*)?(?:[eE][\\+\\-]?(?:[0-9]+))?$"));if(""===n||"."===n||","===n||"-"===n||"+"===n)return!1;var a=parseFloat(n.replace(",","."));return o.test(n)&&(!i.hasOwnProperty("min")||(0,t.default)(i.min)||a>=i.min)&&(!i.hasOwnProperty("max")||(0,t.default)(i.max)||a<=i.max)&&(!i.hasOwnProperty("lt")||(0,t.default)(i.lt)||a<i.lt)&&(!i.hasOwnProperty("gt")||(0,t.default)(i.gt)||a>i.gt)},Rr.locales=void 0;var e=n(or()),t=n(Br()),r=Jr();function n(e){return e&&e.__esModule?e:{default:e}}return Rr.locales=Object.keys(r.decimal),Rr}function Gr(){return Kr||(Kr=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e)?parseFloat(e):NaN};var r,n=(r=qr())&&r.__esModule?r:{default:r};e.exports=t.default,e.exports.default=t.default}(Dr,Dr.exports)),Dr.exports}function zr(){return jr||(jr=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,r.default)(e),(0,n.default)(e)%parseInt(t,10)===0};var r=i(or()),n=i(Gr());function i(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default,e.exports.default=t.default}(Pr,Pr.exports)),Pr.exports}var Hr=Z(zr()),Zr="isDivisibleBy";function Wr(e,t){return"number"==typeof e&&"number"==typeof t&&Hr(String(e),t)}var Yr="isPositive";function Xr(e){return"number"==typeof e&&e>0}var Qr="isNegative";function en(e){return"number"==typeof e&&e<0}function tn(e,t){return"number"==typeof e&&"number"==typeof t&&e<=t}function rn(e,t){return"number"==typeof e&&"number"==typeof t&&e>=t}var nn="minDate";function on(e,t){return e instanceof Date&&e.getTime()>=(t instanceof Date?t:t()).getTime()}var an="maxDate";function dn(e,t){return e instanceof Date&&e.getTime()<=(t instanceof Date?t:t()).getTime()}var sn,cn,un={exports:{}},ln={exports:{}};function fn(){return sn||(sn=1,function(e,t){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){"object"===r(e)&&null!==e?e="function"==typeof e.toString?e.toString():"[object Object]":(null==e||isNaN(e)&&!e.length)&&(e="");return String(e)},e.exports=t.default,e.exports.default=t.default}(ln,ln.exports)),ln.exports}function pn(){return cn||(cn=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,o){if((0,r.default)(e),o=(0,i.default)(o,a),o.ignoreCase)return e.toLowerCase().split((0,n.default)(t).toLowerCase()).length>o.minOccurrences;return e.split((0,n.default)(t)).length>o.minOccurrences};var r=o(or()),n=o(fn()),i=o(sr());function o(e){return e&&e.__esModule?e:{default:e}}var a={ignoreCase:!1,minOccurrences:1};e.exports=t.default,e.exports.default=t.default}(un,un.exports)),un.exports}var hn=Z(pn()),yn="contains";function mn(e,t){return"string"==typeof e&&hn(e,t)}var gn="notContains";function _n(e,t){return"string"==typeof e&&!hn(e,t)}var vn,bn={};function Sn(){if(vn)return bn;vn=1,Object.defineProperty(bn,"__esModule",{value:!0}),bn.default=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-US",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,t.default)(e);var o=e,a=i.ignore;if(a)if(a instanceof RegExp)o=o.replace(a,"");else{if("string"!=typeof a)throw new Error("ignore should be instance of a String or RegExp");o=o.replace(new RegExp("[".concat(a.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,"\\$&"),"]"),"g"),"")}if(n in r.alpha)return r.alpha[n].test(o);throw new Error("Invalid locale '".concat(n,"'"))},bn.locales=void 0;var e,t=(e=or())&&e.__esModule?e:{default:e},r=Jr();return bn.locales=Object.keys(r.alpha),bn}var In=Z(Sn()),Nn="isAlpha";function $n(e,t){return"string"==typeof e&&In(e,t)}var wn,An={};function On(){if(wn)return An;wn=1,Object.defineProperty(An,"__esModule",{value:!0}),An.default=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-US",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,t.default)(e);var o=e,a=i.ignore;if(a)if(a instanceof RegExp)o=o.replace(a,"");else{if("string"!=typeof a)throw new Error("ignore should be instance of a String or RegExp");o=o.replace(new RegExp("[".concat(a.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,"\\$&"),"]"),"g"),"")}if(n in r.alphanumeric)return r.alphanumeric[n].test(o);throw new Error("Invalid locale '".concat(n,"'"))},An.locales=void 0;var e,t=(e=or())&&e.__esModule?e:{default:e},r=Jr();return An.locales=Object.keys(r.alphanumeric),An}var Mn=Z(On()),Tn="isAlphanumeric";function En(e,t){return"string"==typeof e&&Mn(e,t)}var Cn,xn,kn={exports:{}},Pn={exports:{}};function Dn(){return Cn||(Cn=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e,t){return e.some(function(e){return t===e})},e.exports=t.default,e.exports.default=t.default}(Pn,Pn.exports)),Pn.exports}function Rn(){return xn||(xn=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,n.default)(e),t=(0,r.default)(t,d),t.locale in o.decimal)return!(0,i.default)(s,e.replace(/ /g,""))&&function(e){var t=new RegExp("^[-+]?([0-9]+)?(\\".concat(o.decimal[e.locale],"[0-9]{").concat(e.decimal_digits,"})").concat(e.force_decimal?"":"?","$"));return t}(t).test(e);throw new Error("Invalid locale '".concat(t.locale,"'"))};var r=a(sr()),n=a(or()),i=a(Dn()),o=Jr();function a(e){return e&&e.__esModule?e:{default:e}}var d={force_decimal:!1,decimal_digits:"1,",locale:"en-US"},s=["","-","+"];e.exports=t.default,e.exports.default=t.default}(kn,kn.exports)),kn.exports}var Fn=Z(Rn()),Bn="isDecimal";function Ln(e,t){return"string"==typeof e&&Fn(e,t)}var Un,Kn={exports:{}};function jn(){return Un||(Un=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e),i.test(e)};var r,n=(r=or())&&r.__esModule?r:{default:r};var i=/^[\x00-\x7F]+$/;e.exports=t.default,e.exports.default=t.default}(Kn,Kn.exports)),Kn.exports}var Vn=Z(jn()),Jn="isAscii";function qn(e){return"string"==typeof e&&Vn(e)}var Gn,zn={exports:{}};function Hn(){return Gn||(Gn=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var i,c;if((0,r.default)(e),t=(0,n.default)(t,{urlSafe:!1,padding:!(null!==(i=t)&&void 0!==i&&i.urlSafe)}),""===e)return!0;if(t.padding&&e.length%4!=0)return!1;c=t.urlSafe?t.padding?d:s:t.padding?o:a;return(!t.padding||e.length%4==0)&&c.test(e)};var r=i(or()),n=i(sr());function i(e){return e&&e.__esModule?e:{default:e}}var o=/^[A-Za-z0-9+/]+={0,2}$/,a=/^[A-Za-z0-9+/]+$/,d=/^[A-Za-z0-9_-]+={0,2}$/,s=/^[A-Za-z0-9_-]+$/;e.exports=t.default,e.exports.default=t.default}(zn,zn.exports)),zn.exports}var Zn=Z(Hn()),Wn="isBase64";function Yn(e,t){return"string"==typeof e&&Zn(e,t)}var Xn,Qn={exports:{}};function ei(){return Xn||(Xn=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r,o;(0,n.default)(e),"object"===i(t)?(r=t.min||0,o=t.max):(r=arguments[1],o=arguments[2]);var a=encodeURI(e).split(/%..|./).length-1;return a>=r&&(void 0===o||a<=o)};var r,n=(r=or())&&r.__esModule?r:{default:r};function i(e){return i="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},i(e)}e.exports=t.default,e.exports.default=t.default}(Qn,Qn.exports)),Qn.exports}var ti=Z(ei()),ri="isByteLength";function ni(e,t,r){return"string"==typeof e&&ti(e,{min:t,max:r})}var ii,oi,ai={exports:{}},di={exports:{}};function si(){return ii||(ii=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,n.default)(e);for(var t,r,i,o=e.replace(/[- ]+/g,""),a=0,d=o.length-1;d>=0;d--)t=o.substring(d,d+1),r=parseInt(t,10),a+=i&&(r*=2)>=10?r%10+1:r,i=!i;return!(a%10!=0||!o)};var r,n=(r=or())&&r.__esModule?r:{default:r};e.exports=t.default,e.exports.default=t.default}(di,di.exports)),di.exports}function ci(){return oi||(oi=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,r.default)(e);var i=t.provider,d=e.replace(/[- ]+/g,"");if(i&&i.toLowerCase()in o){if(!o[i.toLowerCase()].test(d))return!1}else{if(i&&!(i.toLowerCase()in o))throw new Error("".concat(i," is not a valid credit card provider."));if(!a.some(function(e){return e.test(d)}))return!1}return(0,n.default)(e)};var r=i(or()),n=i(si());function i(e){return e&&e.__esModule?e:{default:e}}var o={amex:/^3[47][0-9]{13}$/,dinersclub:/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/,discover:/^6(?:011|5[0-9][0-9])[0-9]{12,15}$/,jcb:/^(?:2131|1800|35\d{3})\d{11}$/,mastercard:/^5[1-5][0-9]{2}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}$/,unionpay:/^(6[27][0-9]{14}|^(81[0-9]{14,17}))$/,visa:/^(?:4[0-9]{12})(?:[0-9]{3,6})?$/},a=function(){var e=[];for(var t in o)o.hasOwnProperty(t)&&e.push(o[t]);return e}();e.exports=t.default,e.exports.default=t.default}(ai,ai.exports)),ai.exports}var ui=Z(ci()),li="isCreditCard";function fi(e){return"string"==typeof e&&ui(e)}var pi,hi={exports:{}};function yi(){return pi||(pi=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,n.default)(e),t=(0,r.default)(t,o),function(e){var t="\\d{".concat(e.digits_after_decimal[0],"}");e.digits_after_decimal.forEach(function(e,r){0!==r&&(t="".concat(t,"|\\d{").concat(e,"}"))});var r="(".concat(e.symbol.replace(/\W/,function(e){return"\\".concat(e)}),")").concat(e.require_symbol?"":"?"),n="-?",i="[1-9]\\d{0,2}(\\".concat(e.thousands_separator,"\\d{3})*"),o="(".concat(["0","[1-9]\\d*",i].join("|"),")?"),a="(\\".concat(e.decimal_separator,"(").concat(t,"))").concat(e.require_decimal?"":"?"),d=o+(e.allow_decimal||e.require_decimal?a:"");e.allow_negatives&&!e.parens_for_negatives&&(e.negative_sign_after_digits?d+=n:e.negative_sign_before_digits&&(d=n+d));e.allow_negative_sign_placeholder?d="( (?!\\-))?".concat(d):e.allow_space_after_symbol?d=" ?".concat(d):e.allow_space_after_digits&&(d+="( (?!$))?");e.symbol_after_digits?d+=r:d=r+d;e.allow_negatives&&(e.parens_for_negatives?d="(\\(".concat(d,"\\)|").concat(d,")"):e.negative_sign_before_digits||e.negative_sign_after_digits||(d=n+d));return new RegExp("^(?!-? )(?=.*\\d)".concat(d,"$"))}(t).test(e)};var r=i(sr()),n=i(or());function i(e){return e&&e.__esModule?e:{default:e}}var o={symbol:"$",require_symbol:!1,allow_space_after_symbol:!1,symbol_after_digits:!1,allow_negatives:!0,parens_for_negatives:!1,negative_sign_before_digits:!1,negative_sign_after_digits:!1,allow_negative_sign_placeholder:!1,thousands_separator:",",decimal_separator:".",allow_decimal:!0,require_decimal:!1,digits_after_decimal:[2],allow_space_after_digits:!1};e.exports=t.default,e.exports.default=t.default}(hi,hi.exports)),hi.exports}var mi=Z(yi()),gi="isCurrency";function _i(e,t){return"string"==typeof e&&mi(e,t)}var vi,bi={exports:{}},Si={exports:{}};function Ii(){return vi||(vi=1,function(e,t){function r(e){return"[object RegExp]"===Object.prototype.toString.call(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){for(var n=0;n<t.length;n++){var i=t[n];if(e===i||r(i)&&i.test(e))return!0}return!1},e.exports=t.default,e.exports.default=t.default}(Si,Si.exports)),Si.exports}var Ni,$i={exports:{}};function wi(){return Ni||(Ni=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.default)(e),t=(0,n.default)(t,o),t.allow_trailing_dot&&"."===e[e.length-1]&&(e=e.substring(0,e.length-1));!0===t.allow_wildcard&&0===e.indexOf("*.")&&(e=e.substring(2));var i=e.split("."),a=i[i.length-1];if(t.require_tld){if(i.length<2)return!1;if(!t.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(a))return!1;if(/\s/.test(a))return!1}if(!t.allow_numeric_tld&&/^\d+$/.test(a))return!1;return i.every(function(e){return!(e.length>63&&!t.ignore_max_length)&&(!!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(e)&&(!/[\uff01-\uff5e]/.test(e)&&(!/^-|-$/.test(e)&&!(!t.allow_underscores&&/_/.test(e)))))})};var r=i(or()),n=i(sr());function i(e){return e&&e.__esModule?e:{default:e}}var o={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};e.exports=t.default,e.exports.default=t.default}($i,$i.exports)),$i.exports}var Ai,Oi,Mi={exports:{}};function Ti(){return Ai||(Ai=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,n.default)(t);var o=("object"===i(r)?r.version:arguments[1])||"";if(!o)return e(t,{version:4})||e(t,{version:6});if("4"===o.toString())return d.test(t);if("6"===o.toString())return c.test(t);return!1};var r,n=(r=or())&&r.__esModule?r:{default:r};function i(e){return i="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},i(e)}var o="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",a="(".concat(o,"[.]){3}").concat(o),d=new RegExp("^".concat(a,"$")),s="(?:[0-9a-fA-F]{1,4})",c=new RegExp("^("+"(?:".concat(s,":){7}(?:").concat(s,"|:)|")+"(?:".concat(s,":){6}(?:").concat(a,"|:").concat(s,"|:)|")+"(?:".concat(s,":){5}(?::").concat(a,"|(:").concat(s,"){1,2}|:)|")+"(?:".concat(s,":){4}(?:(:").concat(s,"){0,1}:").concat(a,"|(:").concat(s,"){1,3}|:)|")+"(?:".concat(s,":){3}(?:(:").concat(s,"){0,2}:").concat(a,"|(:").concat(s,"){1,4}|:)|")+"(?:".concat(s,":){2}(?:(:").concat(s,"){0,3}:").concat(a,"|(:").concat(s,"){1,5}|:)|")+"(?:".concat(s,":){1}(?:(:").concat(s,"){0,4}:").concat(a,"|(:").concat(s,"){1,6}|:)|")+"(?::((?::".concat(s,"){0,5}:").concat(a,"|(?::").concat(s,"){1,7}|:))")+")(%[0-9a-zA-Z.]{1,})?$");e.exports=t.default,e.exports.default=t.default}(Mi,Mi.exports)),Mi.exports}function Ei(){return Oi||(Oi=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,r.default)(e),t=(0,d.default)(t,c),t.require_display_name||t.allow_display_name){var s=e.match(u);if(s){var g=s[1];if(e=e.replace(g,"").replace(/(^<|>$)/g,""),g.endsWith(" ")&&(g=g.slice(0,-1)),!function(e){var t=e.replace(/^"(.+)"$/,"$1");if(!t.trim())return!1;if(/[\.";<>]/.test(t)){if(t===e)return!1;if(!(t.split('"').length===t.split('\\"').length))return!1}return!0}(g))return!1}else if(t.require_display_name)return!1}if(!t.ignore_max_length&&e.length>m)return!1;var _=e.split("@"),v=_.pop(),b=v.toLowerCase();if(t.host_blacklist.length>0&&(0,n.default)(b,t.host_blacklist))return!1;if(t.host_whitelist.length>0&&!(0,n.default)(b,t.host_whitelist))return!1;var S=_.join("@");if(t.domain_specific_validation&&("gmail.com"===b||"googlemail.com"===b)){var I=(S=S.toLowerCase()).split("+")[0];if(!(0,i.default)(I.replace(/\./g,""),{min:6,max:30}))return!1;for(var N=I.split("."),$=0;$<N.length;$++)if(!f.test(N[$]))return!1}if(!(!1!==t.ignore_max_length||(0,i.default)(S,{max:64})&&(0,i.default)(v,{max:254})))return!1;if(!(0,o.default)(v,{require_tld:t.require_tld,ignore_max_length:t.ignore_max_length,allow_underscores:t.allow_underscores})){if(!t.allow_ip_domain)return!1;if(!(0,a.default)(v)){if(!v.startsWith("[")||!v.endsWith("]"))return!1;var w=v.slice(1,-1);if(0===w.length||!(0,a.default)(w))return!1}}if(t.blacklisted_chars&&-1!==S.search(new RegExp("[".concat(t.blacklisted_chars,"]+"),"g")))return!1;if('"'===S[0]&&'"'===S[S.length-1])return S=S.slice(1,S.length-1),t.allow_utf8_local_part?y.test(S):p.test(S);for(var A=t.allow_utf8_local_part?h:l,O=S.split("."),M=0;M<O.length;M++)if(!A.test(O[M]))return!1;return!0};var r=s(or()),n=s(Ii()),i=s(ei()),o=s(wi()),a=s(Ti()),d=s(sr());function s(e){return e&&e.__esModule?e:{default:e}}var c={allow_display_name:!1,allow_underscores:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0,blacklisted_chars:"",ignore_max_length:!1,host_blacklist:[],host_whitelist:[]},u=/^([^\x00-\x1F\x7F-\x9F\cX]+)</i,l=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,f=/^[a-z\d]+$/,p=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,h=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,y=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i,m=254;e.exports=t.default,e.exports.default=t.default}(bi,bi.exports)),bi.exports}var Ci=Z(Ei()),xi="isEmail";function ki(e,t){return"string"==typeof e&&Ci(e,t)}var Pi=Z(wi()),Di="isFqdn";function Ri(e,t){return"string"==typeof e&&Pi(e,t)}var Fi,Bi={};function Li(){if(Fi)return Bi;Fi=1,Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.default=function(e){return(0,t.default)(e),r.test(e)},Bi.fullWidth=void 0;var e,t=(e=or())&&e.__esModule?e:{default:e};var r=Bi.fullWidth=/[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/;return Bi}var Ui=Z(Li()),Ki="isFullWidth";function ji(e){return"string"==typeof e&&Ui(e)}var Vi,Ji={};function qi(){if(Vi)return Ji;Vi=1,Object.defineProperty(Ji,"__esModule",{value:!0}),Ji.default=function(e){return(0,t.default)(e),r.test(e)},Ji.halfWidth=void 0;var e,t=(e=or())&&e.__esModule?e:{default:e};var r=Ji.halfWidth=/[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/;return Ji}var Gi=Z(qi()),zi="isHalfWidth";function Hi(e){return"string"==typeof e&&Gi(e)}var Zi,Wi={exports:{}};function Yi(){return Zi||(Zi=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e),i.fullWidth.test(e)&&o.halfWidth.test(e)};var r,n=(r=or())&&r.__esModule?r:{default:r},i=Li(),o=qi();e.exports=t.default,e.exports.default=t.default}(Wi,Wi.exports)),Wi.exports}var Xi=Z(Yi()),Qi="isVariableWidth";function eo(e){return"string"==typeof e&&Xi(e)}var to,ro={exports:{}};function no(){return to||(to=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.default)(e),t=(0,n.default)(t,d);var i=t.require_hashtag?a:o;return i.test(e)};var r=i(or()),n=i(sr());function i(e){return e&&e.__esModule?e:{default:e}}var o=/^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i,a=/^#([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i,d={require_hashtag:!1};e.exports=t.default,e.exports.default=t.default}(ro,ro.exports)),ro.exports}var io=Z(no()),oo="isHexColor";function ao(e){return"string"==typeof e&&io(e)}var so,co={exports:{}};function uo(){return so||(so=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e),i.test(e)};var r,n=(r=or())&&r.__esModule?r:{default:r};var i=/^(0x|0h)?[0-9A-F]+$/i;e.exports=t.default,e.exports.default=t.default}(co,co.exports)),co.exports}var lo=Z(uo()),fo="isHexadecimal";function po(e){return"string"==typeof e&&lo(e)}function ho(e){return!!e&&("each"in e||"message"in e||"groups"in e||"always"in e||"context"in e)}var yo,mo={exports:{}};function go(){return yo||(yo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,r){(0,n.default)(t),null!=r&&r.eui&&(r.eui=String(r.eui));if(null!=r&&r.no_colons||null!=r&&r.no_separators)return"48"===r.eui?o.test(t):"64"===r.eui?s.test(t):o.test(t)||s.test(t);if("48"===(null==r?void 0:r.eui))return i.test(t)||a.test(t);if("64"===(null==r?void 0:r.eui))return d.test(t)||c.test(t);return e(t,{eui:"48"})||e(t,{eui:"64"})};var r,n=(r=or())&&r.__esModule?r:{default:r};var i=/^(?:[0-9a-fA-F]{2}([-:\s]))([0-9a-fA-F]{2}\1){4}([0-9a-fA-F]{2})$/,o=/^([0-9a-fA-F]){12}$/,a=/^([0-9a-fA-F]{4}\.){2}([0-9a-fA-F]{4})$/,d=/^(?:[0-9a-fA-F]{2}([-:\s]))([0-9a-fA-F]{2}\1){6}([0-9a-fA-F]{2})$/,s=/^([0-9a-fA-F]){16}$/,c=/^([0-9a-fA-F]{4}\.){3}([0-9a-fA-F]{4})$/;e.exports=t.default,e.exports.default=t.default}(mo,mo.exports)),mo.exports}var _o=Z(go()),vo="isMacAddress";function bo(e,t){return"string"==typeof e&&_o(e,t)}var So=Z(Ti()),Io="isIp";function No(e,t){var r=t?"".concat(t):void 0;return"string"==typeof e&&So(e,r)}var $o,wo,Ao={exports:{}},Oo={exports:{}};function Mo(){return $o||($o=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.default)(e),t=t||{};var i=!1===t.allow_leading_zeroes?o:a,d=!t.hasOwnProperty("min")||(0,n.default)(t.min)||e>=t.min,s=!t.hasOwnProperty("max")||(0,n.default)(t.max)||e<=t.max,c=!t.hasOwnProperty("lt")||(0,n.default)(t.lt)||e<t.lt,u=!t.hasOwnProperty("gt")||(0,n.default)(t.gt)||e>t.gt;return i.test(e)&&d&&s&&c&&u};var r=i(or()),n=i(Br());function i(e){return e&&e.__esModule?e:{default:e}}var o=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,a=/^[-+]?[0-9]+$/;e.exports=t.default,e.exports.default=t.default}(Oo,Oo.exports)),Oo.exports}function To(){return wo||(wo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e,{allow_leading_zeroes:!1,min:0,max:65535})};var r,n=(r=Mo())&&r.__esModule?r:{default:r};e.exports=t.default,e.exports.default=t.default}(Ao,Ao.exports)),Ao.exports}var Eo=Z(To()),Co="isPort";function xo(e){return"string"==typeof e&&Eo(e)}var ko,Po={exports:{}};function Do(){return ko||(ko=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,r){(0,n.default)(t);var d=String((null==r?void 0:r.version)||r);if(!(null!=r&&r.version||r))return e(t,{version:10})||e(t,{version:13});var s=t.replace(/[\s-]+/g,""),c=0;if("10"===d){if(!i.test(s))return!1;for(var u=0;u<d-1;u++)c+=(u+1)*s.charAt(u);if("X"===s.charAt(9)?c+=100:c+=10*s.charAt(9),c%11==0)return!0}else if("13"===d){if(!o.test(s))return!1;for(var l=0;l<12;l++)c+=a[l%2]*s.charAt(l);if(s.charAt(12)-(10-c%10)%10==0)return!0}return!1};var r,n=(r=or())&&r.__esModule?r:{default:r};var i=/^(?:[0-9]{9}X|[0-9]{10})$/,o=/^(?:[0-9]{13})$/,a=[1,3];e.exports=t.default,e.exports.default=t.default}(Po,Po.exports)),Po.exports}var Ro=Z(Do()),Fo="isIsbn";function Bo(e,t){var r=t?"".concat(t):void 0;return"string"==typeof e&&Ro(e,r)}var Lo,Uo={exports:{}};function Ko(){return Lo||(Lo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,n.default)(e),!i.test(e))return!1;for(var t=!0,r=0,o=e.length-2;o>=0;o--)if(e[o]>="A"&&e[o]<="Z")for(var a=e[o].charCodeAt(0)-55,d=0,s=[a%10,Math.trunc(a/10)];d<s.length;d++){var c=s[d];r+=t?c>=5?1+2*(c-5):2*c:c,t=!t}else{var u=e[o].charCodeAt(0)-"0".charCodeAt(0);r+=t?u>=5?1+2*(u-5):2*u:u,t=!t}var l=10*Math.trunc((r+9)/10)-r;return+e[e.length-1]===l};var r,n=(r=or())&&r.__esModule?r:{default:r};var i=/^[A-Z]{2}[0-9A-Z]{9}[0-9]$/;e.exports=t.default,e.exports.default=t.default}(Uo,Uo.exports)),Uo.exports}var jo=Z(Ko()),Vo="isIsin";function Jo(e){return"string"==typeof e&&jo(e)}var qo,Go={exports:{}};function zo(){return qo||(qo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,n.default)(e);var r=t.strictSeparator?o.test(e):i.test(e);return r&&t.strict?a(e):r};var r,n=(r=or())&&r.__esModule?r:{default:r};var i=/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/,o=/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/,a=function(e){var t=e.match(/^(\d{4})-?(\d{3})([ T]{1}\.*|$)/);if(t){var r=Number(t[1]),n=Number(t[2]);return r%4==0&&r%100!=0||r%400==0?n<=366:n<=365}var i=e.match(/(\d{4})-?(\d{0,2})-?(\d*)/).map(Number),o=i[1],a=i[2],d=i[3],s=a?"0".concat(a).slice(-2):a,c=d?"0".concat(d).slice(-2):d,u=new Date("".concat(o,"-").concat(s||"01","-").concat(c||"01"));return!a||!d||u.getUTCFullYear()===o&&u.getUTCMonth()+1===a&&u.getUTCDate()===d};e.exports=t.default,e.exports.default=t.default}(Go,Go.exports)),Go.exports}var Ho=Z(zo()),Zo="isIso8601";function Wo(e,t){return"string"==typeof e&&Ho(e,t)}var Yo,Xo={exports:{}};function Qo(){return Yo||(Yo=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.default)(e);try{t=(0,i.default)(t,d);var o=[];t.allow_primitives&&(o=[null,!1,!0]);var s=JSON.parse(e);return(0,n.default)(o,s)||!!s&&"object"===a(s)}catch(e){}return!1};var r=o(or()),n=o(Dn()),i=o(sr());function o(e){return e&&e.__esModule?e:{default:e}}function a(e){return a="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},a(e)}var d={allow_primitives:!1};e.exports=t.default,e.exports.default=t.default}(Xo,Xo.exports)),Xo.exports}var ea=Z(Qo()),ta="isJson";function ra(e){return"string"==typeof e&&ea(e)}var na,ia={exports:{}};function oa(){return na||(na=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,r.default)(e);var t=e.split(".");if(3!==t.length)return!1;return t.reduce(function(e,t){return e&&(0,n.default)(t,{urlSafe:!0})},!0)};var r=i(or()),n=i(Hn());function i(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default,e.exports.default=t.default}(ia,ia.exports)),ia.exports}var aa=Z(oa()),da="isJwt";function sa(e){return"string"==typeof e&&aa(e)}var ca,ua={exports:{}};function la(){return ca||(ca=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e),e===e.toLowerCase()};var r,n=(r=or())&&r.__esModule?r:{default:r};e.exports=t.default,e.exports.default=t.default}(ua,ua.exports)),ua.exports}var fa=Z(la()),pa="isLowercase";function ha(e){return"string"==typeof e&&fa(e)}var ya,ma={};function ga(){if(ya)return ma;ya=1,Object.defineProperty(ma,"__esModule",{value:!0}),ma.default=function(e,n,i){if((0,t.default)(e),i&&i.strictMode&&!e.startsWith("+"))return!1;if(Array.isArray(n))return n.some(function(t){if(r.hasOwnProperty(t)&&r[t].test(e))return!0;return!1});if(n in r)return r[n].test(e);if(!n||"any"===n){for(var o in r){if(r.hasOwnProperty(o))if(r[o].test(e))return!0}return!1}throw new Error("Invalid locale '".concat(n,"'"))},ma.locales=void 0;var e,t=(e=or())&&e.__esModule?e:{default:e};var r={"am-AM":/^(\+?374|0)(33|4[134]|55|77|88|9[13-689])\d{6}$/,"ar-AE":/^((\+?971)|0)?5[024568]\d{7}$/,"ar-BH":/^(\+?973)?(3|6)\d{7}$/,"ar-DZ":/^(\+?213|0)(5|6|7)\d{8}$/,"ar-LB":/^(\+?961)?((3|81)\d{6}|7\d{7})$/,"ar-EG":/^((\+?20)|0)?1[0125]\d{8}$/,"ar-IQ":/^(\+?964|0)?7[0-9]\d{8}$/,"ar-JO":/^(\+?962|0)?7[789]\d{7}$/,"ar-KW":/^(\+?965)([569]\d{7}|41\d{6})$/,"ar-LY":/^((\+?218)|0)?(9[1-6]\d{7}|[1-8]\d{7,9})$/,"ar-MA":/^(?:(?:\+|00)212|0)[5-7]\d{8}$/,"ar-OM":/^((\+|00)968)?([79][1-9])\d{6}$/,"ar-PS":/^(\+?970|0)5[6|9](\d{7})$/,"ar-SA":/^(!?(\+?966)|0)?5\d{8}$/,"ar-SD":/^((\+?249)|0)?(9[012369]|1[012])\d{7}$/,"ar-SY":/^(!?(\+?963)|0)?9\d{8}$/,"ar-TN":/^(\+?216)?[2459]\d{7}$/,"az-AZ":/^(\+994|0)(10|5[015]|7[07]|99)\d{7}$/,"ar-QA":/^(\+?974|0)?([3567]\d{7})$/,"bs-BA":/^((((\+|00)3876)|06))((([0-3]|[5-6])\d{6})|(4\d{7}))$/,"be-BY":/^(\+?375)?(24|25|29|33|44)\d{7}$/,"bg-BG":/^(\+?359|0)?8[789]\d{7}$/,"bn-BD":/^(\+?880|0)1[13456789][0-9]{8}$/,"ca-AD":/^(\+376)?[346]\d{5}$/,"cs-CZ":/^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"da-DK":/^(\+?45)?\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2}$/,"de-DE":/^((\+49|0)1)(5[0-25-9]\d|6([23]|0\d?)|7([0-57-9]|6\d))\d{7,9}$/,"de-AT":/^(\+43|0)\d{1,4}\d{3,12}$/,"de-CH":/^(\+41|0)([1-9])\d{1,9}$/,"de-LU":/^(\+352)?((6\d1)\d{6})$/,"dv-MV":/^(\+?960)?(7[2-9]|9[1-9])\d{5}$/,"el-GR":/^(\+?30|0)?6(8[5-9]|9(?![26])[0-9])\d{7}$/,"el-CY":/^(\+?357?)?(9(9|7|6|5|4)\d{6})$/,"en-AI":/^(\+?1|0)264(?:2(35|92)|4(?:6[1-2]|76|97)|5(?:3[6-9]|8[1-4])|7(?:2(4|9)|72))\d{4}$/,"en-AU":/^(\+?61|0)4\d{8}$/,"en-AG":/^(?:\+1|1)268(?:464|7(?:1[3-9]|[28]\d|3[0246]|64|7[0-689]))\d{4}$/,"en-BM":/^(\+?1)?441(((3|7)\d{6}$)|(5[0-3][0-9]\d{4}$)|(59\d{5}$))/,"en-BS":/^(\+?1[-\s]?|0)?\(?242\)?[-\s]?\d{3}[-\s]?\d{4}$/,"en-GB":/^(\+?44|0)7[1-9]\d{8}$/,"en-GG":/^(\+?44|0)1481\d{6}$/,"en-GH":/^(\+233|0)(20|50|24|54|27|57|26|56|23|53|28|55|59)\d{7}$/,"en-GY":/^(\+592|0)6\d{6}$/,"en-HK":/^(\+?852[-\s]?)?[456789]\d{3}[-\s]?\d{4}$/,"en-MO":/^(\+?853[-\s]?)?[6]\d{3}[-\s]?\d{4}$/,"en-IE":/^(\+?353|0)8[356789]\d{7}$/,"en-IN":/^(\+?91|0)?[6789]\d{9}$/,"en-JM":/^(\+?876)?\d{7}$/,"en-KE":/^(\+?254|0)(7|1)\d{8}$/,"fr-CF":/^(\+?236| ?)(70|75|77|72|21|22)\d{6}$/,"en-SS":/^(\+?211|0)(9[1257])\d{7}$/,"en-KI":/^((\+686|686)?)?( )?((6|7)(2|3|8)[0-9]{6})$/,"en-KN":/^(?:\+1|1)869(?:46\d|48[89]|55[6-8]|66\d|76[02-7])\d{4}$/,"en-LS":/^(\+?266)(22|28|57|58|59|27|52)\d{6}$/,"en-MT":/^(\+?356|0)?(99|79|77|21|27|22|25)[0-9]{6}$/,"en-MU":/^(\+?230|0)?\d{8}$/,"en-MW":/^(\+?265|0)(((77|88|31|99|98|21)\d{7})|(((111)|1)\d{6})|(32000\d{4}))$/,"en-NA":/^(\+?264|0)(6|8)\d{7}$/,"en-NG":/^(\+?234|0)?[789]\d{9}$/,"en-NZ":/^(\+?64|0)[28]\d{7,9}$/,"en-PG":/^(\+?675|0)?(7\d|8[18])\d{6}$/,"en-PK":/^((00|\+)?92|0)3[0-6]\d{8}$/,"en-PH":/^(09|\+639)\d{9}$/,"en-RW":/^(\+?250|0)?[7]\d{8}$/,"en-SG":/^(\+65)?[3689]\d{7}$/,"en-SL":/^(\+?232|0)\d{8}$/,"en-TZ":/^(\+?255|0)?[67]\d{8}$/,"en-UG":/^(\+?256|0)?[7]\d{8}$/,"en-US":/^((\+1|1)?( |-)?)?(\([2-9][0-9]{2}\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$/,"en-ZA":/^(\+?27|0)\d{9}$/,"en-ZM":/^(\+?26)?0[79][567]\d{7}$/,"en-ZW":/^(\+263)[0-9]{9}$/,"en-BW":/^(\+?267)?(7[1-8]{1})\d{6}$/,"es-AR":/^\+?549(11|[2368]\d)\d{8}$/,"es-BO":/^(\+?591)?(6|7)\d{7}$/,"es-CO":/^(\+?57)?3(0(0|1|2|4|5)|1\d|2[0-4]|5(0|1))\d{7}$/,"es-CL":/^(\+?56|0)[2-9]\d{1}\d{7}$/,"es-CR":/^(\+506)?[2-8]\d{7}$/,"es-CU":/^(\+53|0053)?5\d{7}$/,"es-DO":/^(\+?1)?8[024]9\d{7}$/,"es-HN":/^(\+?504)?[9|8|3|2]\d{7}$/,"es-EC":/^(\+?593|0)([2-7]|9[2-9])\d{7}$/,"es-ES":/^(\+?34)?[6|7]\d{8}$/,"es-GT":/^(\+?502)?[2|6|7]\d{7}$/,"es-PE":/^(\+?51)?9\d{8}$/,"es-MX":/^(\+?52)?(1|01)?\d{10,11}$/,"es-NI":/^(\+?505)\d{7,8}$/,"es-PA":/^(\+?507)\d{7,8}$/,"es-PY":/^(\+?595|0)9[9876]\d{7}$/,"es-SV":/^(\+?503)?[67]\d{7}$/,"es-UY":/^(\+598|0)9[1-9][\d]{6}$/,"es-VE":/^(\+?58)?(2|4)\d{9}$/,"et-EE":/^(\+?372)?\s?(5|8[1-4])\s?([0-9]\s?){6,7}$/,"fa-IR":/^(\+?98[\-\s]?|0)9[0-39]\d[\-\s]?\d{3}[\-\s]?\d{4}$/,"fi-FI":/^(\+?358|0)\s?(4[0-6]|50)\s?(\d\s?){4,8}$/,"fj-FJ":/^(\+?679)?\s?\d{3}\s?\d{4}$/,"fo-FO":/^(\+?298)?\s?\d{2}\s?\d{2}\s?\d{2}$/,"fr-BF":/^(\+226|0)[67]\d{7}$/,"fr-BJ":/^(\+229)\d{8}$/,"fr-CD":/^(\+?243|0)?(8|9)\d{8}$/,"fr-CM":/^(\+?237)6[0-9]{8}$/,"fr-FR":/^(\+?33|0)[67]\d{8}$/,"fr-GF":/^(\+?594|0|00594)[67]\d{8}$/,"fr-GP":/^(\+?590|0|00590)[67]\d{8}$/,"fr-MQ":/^(\+?596|0|00596)[67]\d{8}$/,"fr-PF":/^(\+?689)?8[789]\d{6}$/,"fr-RE":/^(\+?262|0|00262)[67]\d{8}$/,"fr-WF":/^(\+681)?\d{6}$/,"he-IL":/^(\+972|0)([23489]|5[012345689]|77)[1-9]\d{6}$/,"hu-HU":/^(\+?36|06)(20|30|31|50|70)\d{7}$/,"id-ID":/^(\+?62|0)8(1[123456789]|2[1238]|3[1238]|5[12356789]|7[78]|9[56789]|8[123456789])([\s?|\d]{5,11})$/,"ir-IR":/^(\+98|0)?9\d{9}$/,"it-IT":/^(\+?39)?\s?3\d{2} ?\d{6,7}$/,"it-SM":/^((\+378)|(0549)|(\+390549)|(\+3780549))?6\d{5,9}$/,"ja-JP":/^(\+81[ \-]?(\(0\))?|0)[6789]0[ \-]?\d{4}[ \-]?\d{4}$/,"ka-GE":/^(\+?995)?(79\d{7}|5\d{8})$/,"kk-KZ":/^(\+?7|8)?7\d{9}$/,"kl-GL":/^(\+?299)?\s?\d{2}\s?\d{2}\s?\d{2}$/,"ko-KR":/^((\+?82)[ \-]?)?0?1([0|1|6|7|8|9]{1})[ \-]?\d{3,4}[ \-]?\d{4}$/,"ky-KG":/^(\+996\s?)?(22[0-9]|50[0-9]|55[0-9]|70[0-9]|75[0-9]|77[0-9]|880|990|995|996|997|998)\s?\d{3}\s?\d{3}$/,"lt-LT":/^(\+370|8)\d{8}$/,"lv-LV":/^(\+?371)2\d{7}$/,"mg-MG":/^((\+?261|0)(2|3)\d)?\d{7}$/,"mn-MN":/^(\+|00|011)?976(77|81|88|91|94|95|96|99)\d{6}$/,"my-MM":/^(\+?959|09|9)(2[5-7]|3[1-2]|4[0-5]|6[6-9]|7[5-9]|9[6-9])[0-9]{7}$/,"ms-MY":/^(\+?60|0)1(([0145](-|\s)?\d{7,8})|([236-9](-|\s)?\d{7}))$/,"mz-MZ":/^(\+?258)?8[234567]\d{7}$/,"nb-NO":/^(\+?47)?[49]\d{7}$/,"ne-NP":/^(\+?977)?9[78]\d{8}$/,"nl-BE":/^(\+?32|0)4\d{8}$/,"nl-NL":/^(((\+|00)?31\(0\))|((\+|00)?31)|0)6{1}\d{8}$/,"nl-AW":/^(\+)?297(56|59|64|73|74|99)\d{5}$/,"nn-NO":/^(\+?47)?[49]\d{7}$/,"pl-PL":/^(\+?48)? ?([5-8]\d|45) ?\d{3} ?\d{2} ?\d{2}$/,"pt-BR":/^((\+?55\ ?[1-9]{2}\ ?)|(\+?55\ ?\([1-9]{2}\)\ ?)|(0[1-9]{2}\ ?)|(\([1-9]{2}\)\ ?)|([1-9]{2}\ ?))((\d{4}\-?\d{4})|(9[1-9]{1}\d{3}\-?\d{4}))$/,"pt-PT":/^(\+?351)?9[1236]\d{7}$/,"pt-AO":/^(\+?244)?9\d{8}$/,"ro-MD":/^(\+?373|0)((6(0|1|2|6|7|8|9))|(7(6|7|8|9)))\d{6}$/,"ro-RO":/^(\+?40|0)\s?7\d{2}(\/|\s|\.|-)?\d{3}(\s|\.|-)?\d{3}$/,"ru-RU":/^(\+?7|8)?9\d{9}$/,"si-LK":/^(?:0|94|\+94)?(7(0|1|2|4|5|6|7|8)( |-)?)\d{7}$/,"sl-SI":/^(\+386\s?|0)(\d{1}\s?\d{3}\s?\d{2}\s?\d{2}|\d{2}\s?\d{3}\s?\d{3})$/,"sk-SK":/^(\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"so-SO":/^(\+?252|0)((6[0-9])\d{7}|(7[1-9])\d{7})$/,"sq-AL":/^(\+355|0)6[2-9]\d{7}$/,"sr-RS":/^(\+3816|06)[- \d]{5,9}$/,"sv-SE":/^(\+?46|0)[\s\-]?7[\s\-]?[02369]([\s\-]?\d){7}$/,"tg-TJ":/^(\+?992)?[5][5]\d{7}$/,"th-TH":/^(\+66|66|0)\d{9}$/,"tr-TR":/^(\+?90|0)?5\d{9}$/,"tk-TM":/^(\+993|993|8)\d{8}$/,"uk-UA":/^(\+?38)?0(50|6[36-8]|7[357]|9[1-9])\d{7}$/,"uz-UZ":/^(\+?998)?(6[125-79]|7[1-69]|88|9\d)\d{7}$/,"vi-VN":/^((\+?84)|0)((3([2-9]))|(5([25689]))|(7([0|6-9]))|(8([1-9]))|(9([0-9])))([0-9]{7})$/,"zh-CN":/^((\+|00)86)?(1[3-9]|9[28])\d{9}$/,"zh-TW":/^(\+?886\-?|0)?9\d{8}$/,"dz-BT":/^(\+?975|0)?(17|16|77|02)\d{6}$/,"ar-YE":/^(((\+|00)9677|0?7)[0137]\d{7}|((\+|00)967|0)[1-7]\d{6})$/,"ar-EH":/^(\+?212|0)[\s\-]?(5288|5289)[\s\-]?\d{5}$/,"fa-AF":/^(\+93|0)?(2{1}[0-8]{1}|[3-5]{1}[0-4]{1})(\d{7})$/,"mk-MK":/^(\+?389|0)?((?:2[2-9]\d{6}|(?:3[1-4]|4[2-8])\d{6}|500\d{5}|5[2-9]\d{6}|7[0-9][2-9]\d{5}|8[1-9]\d{6}|800\d{5}|8009\d{4}))$/};return r["en-CA"]=r["en-US"],r["fr-CA"]=r["en-CA"],r["fr-BE"]=r["nl-BE"],r["zh-HK"]=r["en-HK"],r["zh-MO"]=r["en-MO"],r["ga-IE"]=r["en-IE"],r["fr-CH"]=r["de-CH"],r["it-CH"]=r["fr-CH"],ma.locales=Object.keys(r),ma}var _a=Z(ga()),va="isMobilePhone";function ba(e,t,r){return"string"==typeof e&&_a(e,t,r)}var Sa,Ia={};function Na(){if(Sa)return Ia;Sa=1,Object.defineProperty(Ia,"__esModule",{value:!0}),Ia.CountryCodes=void 0,Ia.default=function(e){return(0,t.default)(e),r.has(e.toUpperCase())};var e,t=(e=or())&&e.__esModule?e:{default:e};var r=new Set(["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"]);return Ia.CountryCodes=r,Ia}var $a=Z(Na()),wa="isISO31661Alpha2";function Aa(e){return"string"==typeof e&&$a(e)}var Oa,Ma={exports:{}};function Ta(){return Oa||(Oa=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e),i.has(e.toUpperCase())};var r,n=(r=or())&&r.__esModule?r:{default:r};var i=new Set(["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","VAT","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWZ","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","URY","UZB","VUT","VEN","VNM","VGB","VIR","WLF","ESH","YEM","ZMB","ZWE"]);e.exports=t.default,e.exports.default=t.default}(Ma,Ma.exports)),Ma.exports}var Ea=Z(Ta()),Ca="isISO31661Alpha3";function xa(e){return"string"==typeof e&&Ea(e)}var ka,Pa={exports:{}};function Da(){return ka||(ka=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.default)(e),(0,n.default)(e)&&24===e.length};var r=i(or()),n=i(uo());function i(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default,e.exports.default=t.default}(Pa,Pa.exports)),Pa.exports}var Ra=Z(Da()),Fa="isMongoId";function Ba(e){return"string"==typeof e&&Ra(e)}var La,Ua={exports:{}};function Ka(){return La||(La=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e),i.test(e)};var r,n=(r=or())&&r.__esModule?r:{default:r};var i=/[^\x00-\x7F]/;e.exports=t.default,e.exports.default=t.default}(Ua,Ua.exports)),Ua.exports}var ja=Z(Ka()),Va="isMultibyte";function Ja(e){return"string"==typeof e&&ja(e)}var qa,Ga={exports:{}};function za(){return qa||(qa=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e),i.test(e)};var r,n=(r=or())&&r.__esModule?r:{default:r};var i=/[\uD800-\uDBFF][\uDC00-\uDFFF]/;e.exports=t.default,e.exports.default=t.default}(Ga,Ga.exports)),Ga.exports}var Ha=Z(za()),Za="isSurrogatePair";function Wa(e){return"string"==typeof e&&Ha(e)}var Ya,Xa={exports:{}};function Qa(){return Ya||(Ya=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,r.default)(e),!e||/[\s<>]/.test(e))return!1;if(0===e.indexOf("mailto:"))return!1;if(t=(0,d.default)(t,u),t.validate_length&&e.length>t.max_allowed_length)return!1;if(!t.allow_fragments&&(0,i.default)(e,"#"))return!1;if(!t.allow_query_components&&((0,i.default)(e,"?")||(0,i.default)(e,"&")))return!1;var s,f,p,h,y,m,g,_;g=e.split("#"),e=g.shift(),g=e.split("?");var v=(e=g.shift()).match(/^([a-z][a-z0-9+\-.]*):/i),b=!1,S=function(r){return b=!0,s=r.toLowerCase(),(!t.require_valid_protocol||-1!==t.protocols.indexOf(s))&&e.substring(v[0].length)};if(v){var I=v[1],N=e.substring(v[0].length);if("//"===N.slice(0,2)){if(!1===(e=S(I)))return!1}else{var $=N.indexOf("/"),w=-1===$?N:N.substring(0,$),A=w.indexOf("@");if(-1!==A){var O=w.substring(0,A),M=/^[a-zA-Z0-9\-_.%:]*$/.test(O),T=/%[0-9a-fA-F]{2}/.test(O);if(M&&!T){if(t.require_protocol)return!1}else if(!1===(e=S(I)))return!1}else{if(/^[0-9]/.test(N)){if(t.require_protocol)return!1}else if(!1===(e=S(I)))return!1}}}else if(t.require_protocol)return!1;if("//"===e.slice(0,2)){if(!b&&!t.allow_protocol_relative_urls)return!1;e=e.slice(2)}if(""===e)return!1;if(g=e.split("/"),""===(e=g.shift())&&!t.require_host)return!0;if((g=e.split("@")).length>1){if(t.disallow_auth)return!1;if(""===g[0])return!1;if((f=g.shift()).indexOf(":")>=0&&f.split(":").length>2)return!1;var E=f.split(":"),C=(D=2,function(e){if(Array.isArray(e))return e}(P=E)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,d=[],s=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t);else for(;!(s=(n=o.call(r)).done)&&(d.push(n.value),d.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return d}}(P,D)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(P,D)||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.")}()),x=C[0],k=C[1];if(""===x&&""===k)return!1}var P,D;h=g.join("@"),m=null,_=null;var R=h.match(l);R?(p="",_=R[1],m=R[2]||null):(p=(g=h.split(":")).shift(),g.length&&(m=g.join(":")));if(null!==m&&m.length>0){if(y=parseInt(m,10),!/^[0-9]+$/.test(m)||y<=0||y>65535)return!1}else if(t.require_port)return!1;if(t.host_whitelist)return(0,n.default)(p,t.host_whitelist);if(""===p&&!t.require_host)return!0;if(!((0,a.default)(p)||(0,o.default)(p,t)||_&&(0,a.default)(_,6)))return!1;if(p=p||_,t.host_blacklist&&(0,n.default)(p,t.host_blacklist))return!1;return!0};var r=s(or()),n=s(Ii()),i=s(fr()),o=s(wi()),a=s(Ti()),d=s(sr());function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var u={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0,max_allowed_length:2084},l=/^\[([^\]]+)\](?::([0-9]+))?$/;e.exports=t.default,e.exports.default=t.default}(Xa,Xa.exports)),Xa.exports}var ed=Z(Qa()),td="isUrl";function rd(e,t){return"string"==typeof e&&ed(e,t)}var nd,id={exports:{}};function od(){return nd||(nd=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,n.default)(e),null==t&&(t="all");return t in i&&i[t].test(e)};var r,n=(r=or())&&r.__esModule?r:{default:r};var i={1:/^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,2:/^[0-9A-F]{8}-[0-9A-F]{4}-2[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,6:/^[0-9A-F]{8}-[0-9A-F]{4}-6[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,7:/^[0-9A-F]{8}-[0-9A-F]{4}-7[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,8:/^[0-9A-F]{8}-[0-9A-F]{4}-8[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,nil:/^00000000-0000-0000-0000-000000000000$/i,max:/^ffffffff-ffff-ffff-ffff-ffffffffffff$/i,loose:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i,all:/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i};e.exports=t.default,e.exports.default=t.default}(id,id.exports)),id.exports}var ad=Z(od()),dd="isUuid";function sd(e,t){return"string"==typeof e&&ad(e,t)}var cd="IsFirebasePushId";function ud(e){return"string"==typeof e&&20===e.length&&/^[a-zA-Z0-9_-]*$/.test(e)}var ld,fd={exports:{}};function pd(){return ld||(ld=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e),e===e.toUpperCase()};var r,n=(r=or())&&r.__esModule?r:{default:r};e.exports=t.default,e.exports.default=t.default}(fd,fd.exports)),fd.exports}var hd=Z(pd()),yd="isUppercase";function md(e){return"string"==typeof e&&hd(e)}var gd,_d={exports:{}};function vd(){return gd||(gd=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r,o;(0,n.default)(e),"object"===i(t)?(r=t.min||0,o=t.max):(r=arguments[1]||0,o=arguments[2]);var a=e.match(/[^\uFE0F\uFE0E][\uFE0F\uFE0E]/g)||[],d=e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g)||[],s=e.length-a.length-d.length,c=s>=r&&(void 0===o||s<=o);if(c&&Array.isArray(null==t?void 0:t.discreteLengths))return t.discreteLengths.some(function(e){return e===s});return c};var r,n=(r=or())&&r.__esModule?r:{default:r};function i(e){return i="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},i(e)}e.exports=t.default,e.exports.default=t.default}(_d,_d.exports)),_d.exports}var bd=Z(vd()),Sd="isLength";function Id(e,t,r){return"string"==typeof e&&bd(e,{min:t,max:r})}var Nd="maxLength";function $d(e,t){return"string"==typeof e&&bd(e,{min:0,max:t})}var wd="minLength";function Ad(e,t){return"string"==typeof e&&bd(e,{min:t})}var Od,Md={exports:{}};function Td(){return Od||(Od=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){(0,n.default)(e),"[object RegExp]"!==Object.prototype.toString.call(t)&&(t=new RegExp(t,r));return!!e.match(t)};var r,n=(r=or())&&r.__esModule?r:{default:r};e.exports=t.default,e.exports.default=t.default}(Md,Md.exports)),Md.exports}var Ed=Z(Td()),Cd="matches";function xd(e,t,r){return"string"==typeof e&&Ed(e,t,r)}var kd={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],0,0,0,0,0,0,0,[["6[2-467]\\d{3}",[5]],["4\\d{4}",[5]],0,0,0,0,["(?:0[1-9]|[1589]\\d)\\d{4}",[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"]]],0,0,0,0,0,0,[["[78]\\d{5}",[6]],["690\\d{6}|[356]\\d{5}",[6,9]],["180[02]\\d{4}",[8]],["[19]\\d{5}",[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",0,0,0,0,0,[["[2-4679][2-8]\\d{6}",[8]],["5[02-68]\\d{7}",[9]],["400\\d{6}|800\\d{2,9}"],["900[02]\\d{5}",[9]],0,0,["600[25]\\d{5}",[9]],0,0,["700[05]\\d{5}",[9]]]],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0",0,0,0,0,0,[["(?:[25][0-8]|[34][0-4]|6[0-5])[2-9]\\d{6}"],["7\\d{8}"]]],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268",[["268(?:4(?:6[0-38]|84)|56[0-2])\\d{4}"],["268(?:464|7(?:1[3-9]|[28]\\d|3[0246]|64|7[0-689]))\\d{4}"],["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}"],0,0,["26840[69]\\d{4}"],["26848[01]\\d{4}"]]],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264",[["264(?:292|4(?:6[12]|9[78]))\\d{4}"],["264(?:235|4(?:69|76)|5(?:3[6-9]|8[1-4])|7(?:29|72))\\d{4}"],["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}"],0,0,["264724\\d{4}"]]],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",0,0,0,0,0,[["4505[0-2]\\d{3}|(?:[2358][16-9]\\d[2-9]|4410)\\d{4}|(?:[2358][2-5][2-9]|4(?:[2-57-9][2-9]|6\\d))\\d{5}",[8]],["6(?:[78][2-9]|9\\d)\\d{6}",[9]],["800\\d{4}",[7]],["900[1-9]\\d\\d",[6]],["700[2-9]\\d{4}",[8]],0,0,0,0,["808[1-9]\\d\\d",[6]]]],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",0,0,0,0,0,[["(?:(?:1[0-25]|47)\\d|2(?:2[2-46]|3[1-8]|4[2-69]|5[2-7]|6[1-9]|8[1-7])|3[12]2)\\d{5}"],["(?:33|4[1349]|55|77|88|9[13-9])\\d{6}"],["800\\d{5}"],["90[016]\\d{5}"],0,0,0,0,["60(?:2[78]|3[5-9]|4[02-9]|5[0-46-9]|[6-8]\\d|9[0-2])\\d{4}"],["80[1-4]\\d{5}"]]],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]],0,0,0,0,0,0,[["2\\d(?:[0134][25-9]|[25-9]\\d)\\d{5}"],["9[1-79]\\d{7}"]]],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",0,0,[["3(?:7(?:1[15]|81)|8(?:21|4[16]|69|9[12]))[46]\\d{5}|(?:2(?:2(?:2[59]|44|52)|3(?:26|44)|47[35]|9(?:[07]2|2[26]|34|46))|3327)[45]\\d{5}|(?:2(?:657|9(?:54|66))|3(?:48[27]|7(?:55|77)|8(?:65|78)))[2-8]\\d{5}|(?:2(?:284|3(?:02|23)|477|622|920)|3(?:4(?:46|89|92)|541))[2-7]\\d{5}|(?:(?:11[1-8]|670)\\d|2(?:2(?:0[45]|1[2-6]|3[3-6])|3(?:[06]4|7[45])|494|6(?:04|1[2-8]|[36][45]|4[3-6])|80[45]|9(?:[17][4-6]|[48][45]|9[3-6]))|3(?:364|4(?:1[2-8]|[25][4-6]|3[3-6]|84)|5(?:1[2-9]|[38][4-6])|6(?:2[45]|44)|7[069][45]|8(?:0[45]|1[2-7]|3[4-6]|5[3-6]|7[2-6]|8[3-68])))\\d{6}|(?:2(?:2(?:62|81)|320|9(?:42|83))|3(?:329|4(?:62|7[16])|5(?:43|64)|7(?:18|5[17])))[2-6]\\d{5}|2(?:2(?:21|4[23]|6[145]|7[1-4]|8[356]|9[267])|3(?:16|3[13-8]|43|5[346-8]|9[3-5])|6(?:2[46]|4[78]|5[1568])|9(?:03|2[1457-9]|3[1356]|4[08]|[56][23]|82))4\\d{5}|(?:2(?:257|3(?:24|46|92)|9(?:01|23|64))|3(?:4(?:42|64)|5(?:25|37|4[47]|71)|7(?:35|72)|825))[3-6]\\d{5}|(?:2(?:2(?:02|2[3467]|4[156]|5[45]|6[6-8]|91)|3(?:1[47]|25|[45][25]|96)|47[48]|625|932)|3(?:38[2578]|4(?:0[0-24-9]|3[78]|4[457]|58|6[035-9]|72|83|9[136-8])|5(?:2[124]|[368][23]|4[2689]|7[2-6])|7(?:16|2[15]|3[14]|4[13]|5[468]|7[3-5]|8[26])|8(?:2[67]|3[278]|4[3-5]|5[78]|6[1-378]|[78]7|94)))[4-6]\\d{5}",[10]],["93(?:7(?:1[15]|81)|8(?:21|4[16]|69|9[12]))[46]\\d{5}|9(?:2(?:2(?:2[59]|44|52)|3(?:26|44)|47[35]|9(?:[07]2|2[26]|34|46))|3327)[45]\\d{5}|9(?:2(?:657|9(?:54|66))|3(?:48[27]|7(?:55|77)|8(?:65|78)))[2-8]\\d{5}|9(?:2(?:284|3(?:02|23)|477|622|920)|3(?:4(?:46|89|92)|541))[2-7]\\d{5}|(?:675\\d|9(?:11[1-8]\\d|2(?:2(?:0[45]|1[2-6]|3[3-6])|3(?:[06]4|7[45])|494|6(?:04|1[2-8]|[36][45]|4[3-6])|80[45]|9(?:[17][4-6]|[48][45]|9[3-6]))|3(?:364|4(?:1[2-8]|[25][4-6]|3[3-6]|84)|5(?:1[2-9]|[38][4-6])|6(?:2[45]|44)|7[069][45]|8(?:0[45]|1[2-7]|3[4-6]|5[3-6]|7[2-6]|8[3-68]))))\\d{6}|9(?:2(?:2(?:62|81)|320|9(?:42|83))|3(?:329|4(?:62|7[16])|5(?:43|64)|7(?:18|5[17])))[2-6]\\d{5}|92(?:2(?:21|4[23]|6[145]|7[1-4]|8[356]|9[267])|3(?:16|3[13-8]|43|5[346-8]|9[3-5])|6(?:2[46]|4[78]|5[1568])|9(?:03|2[1457-9]|3[1356]|4[08]|[56][23]|82))4\\d{5}|9(?:2(?:257|3(?:24|46|92)|9(?:01|23|64))|3(?:4(?:42|64)|5(?:25|37|4[47]|71)|7(?:35|72)|825))[3-6]\\d{5}|9(?:2(?:2(?:02|2[3467]|4[156]|5[45]|6[6-8]|91)|3(?:1[47]|25|[45][25]|96)|47[48]|625|932)|3(?:38[2578]|4(?:0[0-24-9]|3[78]|4[457]|58|6[035-9]|72|83|9[136-8])|5(?:2[124]|[368][23]|4[2689]|7[2-6])|7(?:16|2[15]|3[14]|4[13]|5[468]|7[3-5]|8[26])|8(?:2[67]|3[278]|4[3-5]|5[78]|6[1-378]|[78]7|94)))[4-6]\\d{5}"],["800\\d{7,8}"],["60[04579]\\d{7}",[10]],0,0,["810\\d{7}",[10]]]],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684",[["684(?:274|6(?:22|33|44|55|77|88|9[19]))\\d{4}"],["684(?:2(?:48|5[2468]|7[246])|7(?:3[13]|70|82))\\d{4}"],["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}"]]],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",0,0,0,0,0,[["1(?:11\\d|[2-9]\\d{3,11})|(?:316|463)\\d{3,10}|648[34]\\d{3,9}|(?:51|66|73)2\\d{3,10}|(?:2(?:1[467]|2[13-8]|5[2357]|6[1-46-8]|7[1-8]|8[124-7]|9[1458])|3(?:1[1-578]|3[23568]|4[5-7]|5[1378]|6[1-38]|8[3-68])|4(?:2[1-8]|35|7[1368]|8[2457])|5(?:2[1-8]|3[357]|4[147]|5[12578]|6[37])|6(?:13|2[1-47]|4[135-7]|5[468])|7(?:2[1-8]|35|4[13478]|5[68]|6[16-8]|7[1-6]|9[45]))\\d{4,10}"],["6(?:485|(?:5[0-3579]|6[013-9]|[7-9]\\d)\\d)\\d{3,9}",[7,8,9,10,11,12,13]],["800\\d{6,10}",[9,10,11,12,13]],["(?:8[69][2-68]|9(?:0[01]|3[019]))\\d{6,10}",[9,10,11,12,13]],0,0,0,0,["5(?:0[1-9]|17|[79]\\d)\\d{2,10}|7[28]0\\d{6,10}",[5,6,7,8,9,10,11,12,13]],["8(?:10|2[018])\\d{6,10}|828\\d{5}",[8,9,10,11,12,13]]]],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]"]]],0,0,0,0,0,0,[["5(?:2\\d|8[1-9])\\d{4}"],["(?:290|5[69]\\d|6(?:[03]0|22|4[0-2]|[69]\\d)|7(?:[34]\\d|7[07])|9(?:6[45]|9[4-8]))\\d{4}"],["800\\d{4}"],["900\\d{4}"],0,0,0,0,["(?:28\\d|501)\\d{4}"]]],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",[["18[1-8]\\d{3,6}",[6,7,8,9]],["4946\\d{2,6}|(?:4[0-8]|50)\\d{4,8}",[6,7,8,9,10]],["800\\d{4,6}",[7,8,9]],["[67]00\\d{5,6}",[8,9]],0,0,["20\\d{4,8}|60[12]\\d{5,6}|7(?:099\\d{4,5}|5[03-9]\\d{3,7})|20[2-59]\\d\\d|(?:606|7(?:0[78]|1|3\\d))\\d{7}|(?:10|29|3[09]|70[1-5]\\d)\\d{4,8}"]],"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",0,0,0,0,0,[["(?:2[12]428|3655[02])\\d{4}|(?:2(?:22[0-79]|63[0-28])|3654)\\d{5}|(?:(?:1[28]|46)\\d|2(?:[014-6]2|[23]3))\\d{6}"],["36554\\d{4}|(?:[16]0|4[04]|5[015]|7[07]|99)\\d{7}"],["88\\d{7}"],["900200\\d{3}"]]],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",0,0,0,0,0,[["(?:3(?:[05-79][2-9]|1[4579]|[23][24-9]|4[2-4689]|8[2457-9])|49[2-579]|5(?:0[2-49]|[13][2-9]|[268][2-4679]|4[4689]|5[2-79]|7[2-69]|9[2-4689]))\\d{5}",[8]],["6040\\d{5}|6(?:03|[1-356]|44|7\\d)\\d{6}"],["8[08]\\d{6}",[8]],["9[0246]\\d{6}",[8]],0,0,["703[235]0\\d{3}|70(?:2[0-5]|3[0146]|[56]0)\\d{4}",[8]],0,0,["8[12]\\d{6}",[8]]]],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246",[["246521[0369]\\d{3}|246(?:2(?:2[78]|7[0-4])|4(?:1[024-6]|2\\d|3[2-9])|5(?:20|[34]\\d|54|7[1-3])|6(?:2\\d|38)|7[35]7|9(?:1[89]|63))\\d{4}"],["246(?:(?:2(?:[3568]\\d|4[0-57-9])|3(?:5[2-9]|6[0-6])|4(?:46|5\\d)|69[5-7]|8(?:[2-5]\\d|83))\\d|52(?:1[147]|20))\\d{3}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["(?:246976|900[2-9]\\d\\d)\\d{4}"],["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}"],0,["246(?:292|367|4(?:1[7-9]|3[01]|4[47-9]|67)|7(?:1[2-9]|2\\d|3[016]|53))\\d{4}"],0,["24631\\d{5}"]]],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",0,0,0,0,0,[["(?:4(?:31\\d\\d|423)|5222)\\d{3}(?:\\d{2})?|8332[6-9]\\d\\d|(?:3(?:03[56]|224)|4(?:22[25]|653))\\d{3,4}|(?:3(?:42[47]|529|823)|4(?:027|525|65(?:28|8))|562|6257|7(?:1(?:5[3-5]|6[12]|7[156]|89)|22[589]56|32|42675|52(?:[25689](?:56|8)|[347]8)|71(?:6[1267]|75|89)|92374)|82(?:2[59]|32)56|9(?:03[23]56|23(?:256|373)|31|5(?:1|2[4589]56)))\\d{3}|(?:3(?:02[348]|22[35]|324|422)|4(?:22[67]|32[236-9]|6(?:2[46]|5[57])|953)|5526|6(?:024|6655)|81)\\d{4,5}|(?:2(?:7(?:1[0-267]|2[0-289]|3[0-29]|4[01]|5[1-3]|6[013]|7[0178]|91)|8(?:0[125]|1[1-6]|2[0157-9]|3[1-69]|41|6[1-35]|7[1-5]|8[1-8]|9[0-6])|9(?:0[0-2]|1[0-4]|2[568]|3[3-6]|5[5-7]|6[0136-9]|7[0-7]|8[014-9]))|3(?:0(?:2[025-79]|3[2-4])|181|22[12]|32[2356]|824)|4(?:02[09]|22[348]|32[045]|523|6(?:27|54))|666(?:22|53)|7(?:22[57-9]|42[56]|82[35])8|8(?:0[124-9]|2(?:181|2[02-4679]8)|4[12]|[5-7]2)|9(?:[04]2|2(?:2|328)|81))\\d{4}|(?:2(?:[23]\\d|[45])\\d\\d|3(?:1(?:2[5-7]|[5-7])|425|822)|4(?:033|1\\d|[257]1|332|4(?:2[246]|5[25])|6(?:2[35]|56|62)|8(?:23|54)|92[2-5])|5(?:02[03489]|22[457]|32[35-79]|42[46]|6(?:[18]|53)|724|826)|6(?:023|2(?:2[2-5]|5[3-5]|8)|32[3478]|42[34]|52[47]|6(?:[18]|6(?:2[34]|5[24]))|[78]2[2-5]|92[2-6])|7(?:02|21\\d|[3-589]1|6[12]|72[24])|8(?:217|3[12]|[5-7]1)|9[24]1)\\d{5}|(?:(?:3[2-8]|5[2-57-9]|6[03-589])1|4[4689][18])\\d{5}|[59]1\\d{5}"],["(?:1[13-9]\\d|644)\\d{7}|(?:3[78]|44|66)[02-9]\\d{7}",[10]],["80[03]\\d{7}",[10]],0,0,0,0,0,["96(?:0[469]|1[0-47]|3[389]|43|6[69]|7[78])\\d{6}",[10]]]],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",0,0,0,0,0,[["80[2-8]\\d{5}|(?:1[0-69]|[23][2-8]|4[23]|5\\d|6[013-57-9]|71|8[1-79]|9[2-4])\\d{6}",[8]],["4[5-9]\\d{7}",[9]],["800[1-9]\\d{4}",[8]],["(?:70(?:2[0-57]|3[04-7]|44|6[04-69]|7[0579])|90\\d\\d)\\d{4}",[8]],0,0,["78(?:0[578]|1[014-8]|2[25]|3[15-8]|48|5[05]|60|7[06-8]|9\\d)\\d{4}",[8]],0,0,["7879\\d{4}",[8]]]],BF:["226","00","[024-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[024-7]"]]],0,0,0,0,0,0,[["2(?:0(?:49|5[23]|6[5-7]|9[016-9])|4(?:4[569]|5[4-6]|6[5-7]|7[0179])|5(?:[34]\\d|50|6[5-7]))\\d{4}"],["(?:0[1-7]|4[4-6]|5[0-8]|[67]\\d)\\d{6}"]]],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",0,0,0,0,0,[["2\\d{5,7}|(?:43[1-6]|70[1-9])\\d{4,5}|(?:[36]\\d|4[124-7]|[57][1-9]|8[1-6]|9[1-7])\\d{5,6}",[6,7,8]],["(?:43[07-9]|99[69]\\d)\\d{5}|(?:8[7-9]|98)\\d{7}",[8,9]],["(?:00800\\d\\d|800)\\d{5}",[8,12]],["90\\d{6}",[8]],0,0,0,0,0,["700\\d{5}",[8]]]],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]],0,0,0,0,0,0,[["(?:1(?:3[1356]|6[0156]|7\\d)\\d|6(?:1[16]\\d|500|6(?:0\\d|3[12]|44|55|7[7-9]|88)|9[69][69])|7(?:[07]\\d\\d|1(?:11|78)))\\d{4}"],["(?:3(?:[0-79]\\d|8[0-57-9])\\d|6(?:3(?:00|33|6[16])|441|6(?:3[03-9]|[69]\\d|7[0-689])))\\d{4}"],["8[02369]\\d{6}"],["(?:87|9[0-8])\\d{6}"],0,0,0,0,0,["84\\d{6}"]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]],0,0,0,0,0,0,[["(?:22|31)\\d{6}"],["(?:29|6[124-9]|7[125-9])\\d{6}"]]],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"]]],0,0,0,0,0,0,[["012\\d{7}",[10]],["01(?:2[5-9]|[4-69]\\d)\\d{6}",[10]],0,0,0,0,["81\\d{6}",[8]],0,["857[58]\\d{4}",[8]]]],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",[["441(?:[46]\\d\\d|5(?:4\\d|60|89))\\d{4}"],["441(?:[2378]\\d|5[0-39]|9[02])\\d{5}"],["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}"]]],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]],0,0,0,0,0,0,[["22[0-7]\\d{4}|(?:2[013-9]|[34]\\d|5[0-25-9])\\d{5}"],["(?:22[89]|[78]\\d\\d)\\d{4}"],0,0,0,0,0,0,["5[34]\\d{5}"]]],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)?",0,0,0,[["(?:2(?:2\\d\\d|5(?:11|[258]\\d|9[67])|6(?:12|2\\d|9[34])|8(?:2[34]|39|62))|3(?:3\\d\\d|4(?:6\\d|8[24])|8(?:25|42|5[257]|86|9[25])|9(?:[27]\\d|3[2-4]|4[248]|5[24]|6[2-6]))|4(?:4\\d\\d|6(?:11|[24689]\\d|72)))\\d{4}",[8]],["[67]\\d{7}",[8]],["8001[07]\\d{4}",[9]],0,0,0,0,0,["50\\d{6}",[8]]]],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]",[["(?:318[023]|41(?:6[023]|70)|7(?:1[578]|2[05]|50)\\d)\\d{3}"],["(?:31(?:8[14-8]|9[14578])|416[14-9]|7(?:0[01]|7[07]|8\\d|9[056])\\d)\\d{3}"]]],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",0,0,[["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-5]\\d{7}",[10]],["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])(?:7|9\\d)\\d{7}",[10,11]],["800\\d{6,7}",[9,10]],["[59]00\\d{6,7}",[9,10]],0,0,0,0,0,["(?:30[03]\\d{3}|4(?:0(?:0\\d|20)|370|864))\\d{4}|300\\d{5}",[8,10]]]],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242",[["242(?:3(?:02|[236][1-9]|4[0-24-9]|5[0-68]|7[347]|8[0-4]|9[2-467])|461|502|6(?:0[1-5]|12|2[013]|[45]0|7[67]|8[78]|9[89])|7(?:02|88))\\d{4}"],["242(?:3(?:5[79]|7[56]|95)|4(?:[23][1-9]|4[1-35-9]|5[1-8]|6[2-8]|7\\d|81)|5(?:2[45]|3[35]|44|5[1-46-9]|65|77)|6[34]6|7(?:27|38)|8(?:0[1-9]|1[02-9]|2\\d|3[0-4]|[89]9))\\d{4}"],["242300\\d{4}|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}"],0,["242225\\d{4}"]]],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]"]]],0,0,0,0,0,0,[["(?:2[3-6]|[34][5-7]|5[236]|6[2-46]|7[246]|8[2-4])\\d{5}",[7]],["(?:1[67]|[78]7)\\d{6}",[8]]]],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"]]],0,0,0,0,0,0,[["(?:2(?:4[0-48]|6[0-24]|9[0578])|3(?:1[0-35-9]|55|[69]\\d|7[013]|81)|4(?:6[03]|7[1267]|9[0-5])|5(?:3[03489]|4[0489]|7[1-47]|88|9[0-49])|6(?:2[1-35]|5[149]|8[013467]))\\d{4}",[7]],["(?:321|7[1-8]\\d)\\d{5}",[8]],["(?:0800|800\\d)\\d{6}",[10]],["90\\d{5}",[7]],0,0,0,0,["79(?:1(?:[0-2]\\d|3[0-8])|2[0-7]\\d)\\d{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,[["(?:1(?:5(?:1[1-5]|[24]\\d|6[2-4]|9[1-7])|6(?:[235]\\d|4[1-7])|7\\d\\d)|2(?:1(?:[246]\\d|3[0-35-9]|5[1-9])|2(?:[235]\\d|4[0-8])|3(?:[26]\\d|3[02-79]|4[024-7]|5[03-7])))\\d{5}",[9]],["(?:2(?:5[5-79]|9[1-9])|(?:33|44)\\d)\\d{6}",[9]],["800\\d{3,7}|8(?:0[13]|20\\d)\\d{7}"],["(?:810|902)\\d{7}",[10]],0,0,0,0,["249\\d{6}",[9]]],"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"]]],0,0,0,0,0,0,[["(?:2(?:[02]\\d|36|[68]0)|[3-58](?:[02]\\d|[68]0)|7(?:[02]\\d|32|[68]0))\\d{4}",[7]],["6[0-35-7]\\d{5}",[7]],["0800\\d{7}",[11]]]],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",0,0,0,0,0,[["(?:(?:12|573)\\d\\d|276)\\d{5}|[1-6]\\d{6}"],["88\\d{5}|(?:8[0-69]|9[016-9])\\d{7}",[7,9]]]],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]"]]],0,0,0,0,0,0,[["(?:2[12]|61)\\d{6}"],["7[02-7]\\d{6}"],0,["8776\\d{4}"]]],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]"]]],0,0,0,0,0,0,[["222[1-589]\\d{5}"],["026(?:1[0-5]|6[6-9])\\d{4}|0(?:[14-6]\\d\\d|2(?:40|5[5-8]|6[07-9]))\\d{5}"],0,["80[0-2]\\d{6}"]]],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",0,0,0,0,0,[["(?:2[12467]|3[1-4]|4[134]|5[256]|6[12]|[7-9]1)\\d{7}",[9]],["(?:6[89]|7[235-9])\\d{7}",[9]],["800\\d{6}",[9]],["90[016]\\d{6}",[9]],["878\\d{6}",[9]],["860\\d{9}",[12]],["5[18]\\d{7}",[9]],["74[0248]\\d{6}",[9]],0,["84[0248]\\d{6}",[9]]]],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"]]],0,0,0,0,0,0,[["2(?:[15]\\d{3}|7(?:2(?:0[23]|1[2357]|2[245]|3[45]|4[3-5])|3(?:06|1[69]|[2-6]7)))\\d{5}"],["0[157]\\d{8}"]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]],0,0,0,0,0,0,[["(?:2\\d|3[13-7]|4[1-5])\\d{3}"],["[578]\\d{4}"]]],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"]]],0,0,0,0,0,0,[["2(?:1982[0-6]|3314[05-9])\\d{3}|(?:2(?:1(?:160|962)|3(?:(?:2\\d|50)\\d|3(?:[034679]\\d|1[0-35-9]|2[1-9]|5[0-24-9]|8[0-389])|600)|646[59])|(?:600|80[1-9])\\d\\d|9(?:(?:10[0-2]|7[1-9]\\d)\\d|3(?:[0-57-9]\\d\\d|6(?:0[02-9]|[1-9]\\d))|6(?:[0-8]\\d\\d|9(?:[02-79]\\d|1[05-9]))|9(?:[03-9]\\d\\d|1(?:[0235-9]\\d|4[0-24-9])|2(?:[0-79]\\d|8[0-46-9]))))\\d{4}|(?:22|3[2-5]|[47][1-35]|5[1-3578]|6[13-57]|8[1-9]|9[2458])\\d{7}",[9]],["2(?:1982[0-6]|3314[05-9])\\d{3}|(?:2(?:1(?:160|962)|3(?:(?:2\\d|50)\\d|3(?:[034679]\\d|1[0-35-9]|2[1-9]|5[0-24-9]|8[0-389])|600)|646[59])|80[1-8]\\d\\d|9(?:(?:10[0-2]|7[1-9]\\d)\\d|3(?:[0-57-9]\\d\\d|6(?:0[02-9]|[1-9]\\d))|6(?:[0-8]\\d\\d|9(?:[02-79]\\d|1[05-9]))|9(?:[03-9]\\d\\d|1(?:[0235-9]\\d|4[0-24-9])|2(?:[0-79]\\d|8[0-46-9]))))\\d{4}|(?:22|3[2-5]|[47][1-35]|5[1-3578]|6[13-57]|8[1-9]|9[2458])\\d{7}",[9]],["(?:123|8)00\\d{6}",[9,11]],0,0,0,0,0,["44\\d{7}",[9]],["600\\d{7,8}",[10,11]]]],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"]]],0,0,0,0,0,0,[["2(?:22|33)\\d{6}",[9]],["(?:24[23]|6(?:[25-9]\\d|4[01]))\\d{6}",[9]],["88\\d{6,7}"]]],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,[["(?:10(?:[02-79]\\d\\d|[18](?:0[1-9]|[1-9]\\d))|2(?:[02-57-9]\\d{3}|1(?:[18](?:0[1-9]|[1-9]\\d)|[2-79]\\d\\d))|(?:41[03]|8078|9(?:78|94))\\d\\d)\\d{5}|(?:10|2[0-57-9])(?:1(?:00|23)\\d\\d|95\\d{3,4})|(?:41[03]|9(?:78|94))(?:100\\d\\d|95\\d{3,4})|8078123|(?:43[35]|754|851)\\d{7,8}|(?:43[35]|754|851)(?:1(?:00\\d|23)\\d|95\\d{3,4})|(?:3(?:11|7[179])|4(?:[15]1|3[12])|5(?:1\\d|2[37]|3[12]|51|7[13-79]|9[15])|7(?:[39]1|5[57]|6[09])|8(?:71|98))(?:[02-8]\\d{7}|1(?:0(?:0\\d\\d(?:\\d{3})?|[1-9]\\d{5})|[13-9]\\d{6}|2(?:[0-24-9]\\d{5}|3\\d(?:\\d{4})?))|9(?:[0-46-9]\\d{6}|5\\d{3}(?:\\d(?:\\d{2})?)?))|(?:3(?:1[02-9]|35|49|5\\d|7[02-68]|9[1-68])|4(?:1[24-9]|2[179]|3[46-9]|5[2-9]|6[47-9]|7\\d|8[23])|5(?:3[03-9]|4[36]|5[02-9]|6[1-46]|7[028]|80|9[2-46-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[17]\\d|2[248]|3[04-9]|4[3-6]|5[0-3689]|6[2368]|9[02-9])|8(?:1[236-8]|2[5-7]|3\\d|5[2-9]|7[02-9]|8[36-8]|9[1-7])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))(?:[02-8]\\d{6}|1(?:0(?:0\\d\\d(?:\\d{2})?|[1-9]\\d{4})|[13-9]\\d{5}|2(?:[0-24-9]\\d{4}|3\\d(?:\\d{3})?))|9(?:[0-46-9]\\d{5}|5\\d{3,5}))",[7,8,9,10,11]],["1740[0-5]\\d{6}|1(?:[38]\\d|4[57]|[59][0-35-9]|6[25-7]|7[0-35-8])\\d{8}",[11]],["(?:(?:10|21)8|8)00\\d{7}",[10,12]],["16[08]\\d{5}",[8]],0,0,0,0,0,["10(?:10\\d{4}|96\\d{3,4})|400\\d{7}|950\\d{7,8}|(?:2[0-57-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[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))96\\d{3,4}",[7,8,9,10,11]]],"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))?",0,0,0,[["601055(?:[0-4]\\d|50)\\d\\d|6010(?:[0-4]\\d|5[0-4])\\d{4}|(?:46|60(?:[18][1-9]|[24-7][2-9]))\\d{6}",[8,10]],["333301[0-5]\\d{3}|3333(?:00|2[5-9]|[3-9]\\d)\\d{4}|(?:3(?:(?:0[0-5]|1\\d|5[01]|70)\\d|2(?:[0-3]\\d|4[1-9])|3(?:00|3[0-24-9]))|9(?:101|408))\\d{6}",[10]],["1800\\d{7}",[11]],["(?:19(?:0[01]|4[78])|901)\\d{7}",[10,11]]]],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))",0,0,0,[["210[7-9]\\d{4}|2(?:[024-7]\\d|1[1-9])\\d{5}",[8]],["(?:3005\\d|6500[01])\\d{3}|(?:5[07]|6[0-4]|7[0-3]|8[3-9])\\d{6}",[8]],["800\\d{7}",[10]],["90[059]\\d{7}",[10]],0,0,0,0,["(?:210[0-6]|4\\d{3}|5100)\\d{4}",[8]]]],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",0,0,0,0,0,[["(?:3[23]|4[89])\\d{4,6}|(?:31|4[36]|8(?:0[25]|78)\\d)\\d{6}|(?:2[1-4]|4[1257]|7\\d)\\d{5,6}"],["(?:5\\d|6[2-4])\\d{6}",[8]],["800\\d{7}",[10]],0,0,0,0,0,0,["807\\d{7}",[10]]]],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]],0,0,0,0,0,0,[["2(?:2[1-7]|3[0-8]|4[12]|5[1256]|6\\d|7[1-3]|8[1-5])\\d{4}"],["(?:36|5[1-389]|9\\d)\\d{5}"],["800\\d{4}"],0,0,0,0,0,["(?:3[3-5]|4[356])\\d{5}"]]],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]",[["9(?:4(?:3[0-5]|4[14]|6\\d)|50\\d|7(?:2[014]|3[02-9]|4[4-9]|6[357]|77|8[7-9])|8(?:3[39]|[46]\\d|7[01]|8[57-9]))\\d{4}"],["953[01]\\d{4}|9(?:5[12467]|6[5-9])\\d{5}"],0,0,0,0,0,["955\\d{5}",[8]],0,["60[0-2]\\d{4}",[7]]]],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]"]]],0,0,0,0,0,0,[["2[2-6]\\d{6}"],["9(?:10|[4-79]\\d)\\d{5}"],["800\\d{5}"],["90[09]\\d{5}"],["700\\d{5}"],0,["(?:50|77)\\d{6}"],0,0,["80[1-9]\\d{5}"]]],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"]]],0,0,0,0,0,0,[["(?:2\\d|3[1257-9]|4[16-9]|5[13-9])\\d{7}",[9]],["7(?:060\\d|19(?:[0-5]\\d|6[0-6]))\\d{4}|(?:60[1-8]|7(?:0[2-5]|[2379]\\d))\\d{6}",[9]],["800\\d{6}",[9]],["9(?:0[05689]|76)\\d{6}",[9]],["70[01]\\d{6}",[9]],["9(?:3\\d{9}|6\\d{7,10})"],["9(?:5\\d|7[2-4])\\d{6}",[9]],0,["9[17]0\\d{6}",[9]],["8[134]\\d{7}",[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",0,0,0,0,0,[["32\\d{9,11}|49[1-6]\\d{10}|322\\d{6}|49[0-7]\\d{3,9}|(?:[34]0|[68]9)\\d{3,13}|(?:2(?:0[1-689]|[1-3569]\\d|4[0-8]|7[1-7]|8[0-7])|3(?:[3569]\\d|4[0-79]|7[1-7]|8[1-8])|4(?:1[02-9]|[2-48]\\d|5[0-6]|6[0-8]|7[0-79])|5(?:0[2-8]|[124-6]\\d|[38][0-8]|[79][0-7])|6(?:0[02-9]|[1-358]\\d|[47][0-8]|6[1-9])|7(?:0[2-8]|1[1-9]|[27][0-7]|3\\d|[4-6][0-8]|8[0-5]|9[013-7])|8(?:0[2-9]|1[0-79]|2\\d|3[0-46-9]|4[0-6]|5[013-9]|6[1-8]|7[0-8]|8[0-24-6])|9(?:0[6-9]|[1-4]\\d|[589][0-7]|6[0-8]|7[0-467]))\\d{3,12}",[5,6,7,8,9,10,11,12,13,14,15]],["1(?:(?:5(?:[0-25-9]\\d\\d|3(?:10|33))|7[26-9]\\d\\d)\\d{6}|6[023]\\d{7,8})|17\\d{8}",[10,11]],["800\\d{7,12}",[10,11,12,13,14,15]],["(?:137[7-9]|900(?:[135]|9\\d))\\d{6}",[10,11]],["700\\d{8}",[11]],["1(?:6(?:013|255|399)|7(?:(?:[015]1|[69]3)3|[2-4]55|[78]99))\\d{7,8}|15(?:(?:[03-68]00|113)\\d|2\\d55|7\\d99|9\\d33)\\d{7}",[12,13]],["18(?:1\\d{5,11}|[2-9]\\d{8})",[8,9,10,11,12,13,14]],["16(?:4\\d{1,10}|[89]\\d{1,11})",[4,5,6,7,8,9,10,11,12,13,14]],0,["180\\d{5,11}|13(?:7[1-6]\\d\\d|8)\\d{4}",[7,8,9,10,11,12,13,14]]]],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]],0,0,0,0,0,0,[["2(?:1[2-5]|7[45])\\d{5}"],["77\\d{6}"]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]],0,0,0,0,0,0,[["(?:2(?:[0-59][1-9]|[6-8]\\d)|3(?:[0-3][1-9]|4[13]|5[1-58]|6[1347-9]|7\\d|8[1-8]|9[1-79])|4(?:[0-25][1-9]|[34][2-9]|6[13-579]|7[13579]|8[1-47]|9[127])|5(?:[0-36][1-9]|4[146-9]|5[3-57-9]|7[568]|8[1-358]|9[1-69])|6(?:[0135][1-9]|2[1-68]|4[2-8]|6[1689]|[78]\\d|9[15689])|7(?:[0-69][1-9]|7[3-9]|8[147])|8(?:[16-9][1-9]|2[1-58])|9(?:[1-47-9][1-9]|6\\d))\\d{5}"],["(?:2[6-8]|37|6[78]|96)\\d{6}|(?:2[0-59]|3[0-689]|[457]\\d|6[0-69]|8[126-9]|9[1-47-9])[1-9]\\d{5}"],["80\\d{6}"],["90\\d{6}"]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767",[["767(?:2(?:55|66)|4(?:2[01]|4[0-25-9])|50[0-4])\\d{4}"],["767(?:2(?:[2-4689]5|7[5-7])|31[5-7]|61[1-8]|70[1-6])\\d{4}"],["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}"]]],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9",[["8(?:[04]9[2-9]\\d\\d|29(?:2(?:[0-59]\\d|6[04-9]|7[0-27]|8[0237-9])|3(?:[0-35-9]\\d|4[7-9])|[45]\\d\\d|6(?:[0-27-9]\\d|[3-5][1-9]|6[0135-8])|7(?:0[013-9]|[1-37]\\d|4[1-35689]|5[1-4689]|6[1-57-9]|8[1-79]|9[1-8])|8(?:0[146-9]|1[0-48]|[248]\\d|3[1-79]|5[01589]|6[013-68]|7[124-8]|9[0-8])|9(?:[0-24]\\d|3[02-46-9]|5[0-79]|60|7[0169]|8[57-9]|9[02-9])))\\d{4}"],["8[024]9[2-9]\\d{6}"],["800(?:14|[2-9]\\d)\\d{5}|8[024]9[01]\\d{6}|8(?: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}"]]],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",0,0,0,0,0,[["9619\\d{5}|(?:1\\d|2[013-79]|3[0-8]|4[013-689])\\d{6}"],["(?:5(?:4[0-29]|5\\d|6[0-3])|6(?:[569]\\d|7[0-6])|7[7-9]\\d)\\d{6}",[9]],["800\\d{6}",[9]],["80[3-689]1\\d{5}",[9]],0,0,0,0,["98[23]\\d{6}",[9]],["80[12]1\\d{5}",[9]]]],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",0,0,0,0,0,[["[2-7][2-7]\\d{6}",[8]],["964[0-2]\\d{5}|9(?:39|[57][89]|6[0-36-9]|[89]\\d)\\d{6}",[9]],["1800\\d{7}|1[78]00\\d{6}",[10,11]],0,0,0,0,0,["[2-7]890\\d{4}",[8]]]],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"]]],0,0,0,0,0,0,[["(?:3[23589]|4[3-8]|6\\d|7[1-9]|88)\\d{5}",[7]],["(?:5\\d{5}|8(?:1(?:0(?:0(?:00|[178]\\d)|[3-9]\\d\\d)|(?:1(?:0[2-6]|1\\d)|[2-79]\\d\\d)\\d)|2(?:0(?:0(?:00|4\\d)|(?:19|[2-7]\\d)\\d)|(?:(?:[124-69]\\d|3[5-9])\\d|7(?:[0-79]\\d|8[013-9])|8(?:[2-6]\\d|7[01]))\\d)|[349]\\d{4}))\\d\\d|5(?:(?:[02]\\d|5[0-478])\\d|1(?:[0-8]\\d|95)|6(?:4[0-4]|5[1-589]))\\d{3}",[7,8]],["800(?:(?:0\\d\\d|1)\\d|[2-9])\\d{3}"],["(?:40\\d\\d|900)\\d{4}",[7,8]],["70[0-2]\\d{5}",[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",0,0,0,0,0,[["13[23]\\d{6}|(?:15|57)\\d{6,7}|(?:2\\d|3|4[05-8]|5[05]|6[24-689]|8[2468]|9[235-7])\\d{7}",[8,9]],["1[0-25]\\d{8}",[10]],["800\\d{7}",[10]],["900\\d{7}",[10]]]],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",0,0,0,0,0,[["(?:1(?:1[12568]|[24]0|55|6[146])|8\\d\\d)\\d{4}"],["(?:17[1-3]|7\\d\\d)\\d{4}"]]],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]"]]],0,0,0,0,0,0,[["96906(?:0[0-8]|1[1-9]|[2-9]\\d)\\d\\d|9(?:69(?:0[0-57-9]|[1-9]\\d)|73(?:[0-8]\\d|9[1-9]))\\d{4}|(?:8(?:[1356]\\d|[28][0-8]|[47][1-9])|9(?:[135]\\d|[268][0-8]|4[1-9]|7[124-9]))\\d{6}"],["96906(?:09|10)\\d\\d|(?:590(?:10[0-2]|600)|97390\\d)\\d{3}|(?:6\\d|7[1-48])\\d{7}"],["[89]00\\d{6}"],["80[367]\\d{6}"],["70\\d{7}"],0,["51\\d{7}"],0,0,["90[12]\\d{6}"]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0",0,0,0,0,0,[["(?:11(?:[124]\\d\\d|3(?:[0-79]\\d|8[0-7])|5(?:[02-9]\\d|1[0-57-9])|6(?:[02-79]\\d|1[0-57-9]|8[0-8]))|2(?:2(?:11[1-9]|22[0-7]|33\\d|44[1467]|66[1-68])|5(?:11[124-6]|33[2-8]|44[1467]|55[14]|66[1-3679]|77[124-79]|880))|3(?:3(?:11[0-46-8]|(?:22|55)[0-6]|33[0134689]|44[04]|66[01467])|4(?:44[0-8]|55[0-69]|66[0-3]|77[1-5]))|4(?:6(?:119|22[0-24-7]|33[1-5]|44[13-69]|55[14-689]|660|88[1-4])|7(?:(?:11|22)[1-9]|33[13-7]|44[13-6]|55[1-689]))|5(?:7(?:227|55[05]|(?:66|77)[14-8])|8(?:11[149]|22[013-79]|33[0-68]|44[013-8]|550|66[1-5]|77\\d)))\\d{4}"],["700[1-9]\\d{5}|(?:7(?:0[1-9]|1[0-8]|2[1-35-79]|3\\d|77|86|99)|9\\d\\d)\\d{6}"]]],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]",[["1[3-7][1-8]\\d{3,6}|(?:19[1-8]|[23568][1-8]\\d|9(?:00|[1-8]\\d))\\d{2,6}",[5,6,7,8,9]],["4946\\d{2,6}|(?:4[0-8]|50)\\d{4,8}",[6,7,8,9,10]],["800\\d{4,6}",[7,8,9]],["[67]00\\d{5,6}",[8,9]],0,0,["20\\d{4,8}|60[12]\\d{5,6}|7(?:099\\d{4,5}|5[03-9]\\d{3,7})|20[2-59]\\d\\d|(?:606|7(?:0[78]|1|3\\d))\\d{7}|(?:10|29|3[09]|70[1-5]\\d)\\d{4,8}"]],"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,[["603\\d{4}|(?:3[0-5]|6[25-7]|8[58])\\d{5}",[7]],["(?:[279]\\d|45|5[01568]|8[034679])\\d{5}",[7]],["0800\\d{7}",[11]]],"00"],FK:["500","00","[2-7]\\d{4}",[5],0,0,0,0,0,0,0,[["[2-47]\\d{4}"],["[56]\\d{4}"]]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]],0,0,0,0,0,0,[["31(?:00[67]|208|309)\\d\\d|(?:3(?:[2357]0[1-9]|602|804|905)|(?:820|9[2-6]\\d)\\d)\\d{3}"],["31(?:00[67]|208|309)\\d\\d|(?:3(?:[2357]0[1-9]|602|804|905)|(?:820|9[2-7]\\d)\\d)\\d{3}"]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))",0,0,0,[["(?:20|[34]\\d|8[19])\\d{4}"],["(?:[27][1-9]|5\\d|9[16])\\d{4}"],["80[257-9]\\d{3}"],["90(?:[13-5][15-7]|2[125-7]|9\\d)\\d\\d"],0,0,0,0,["(?:6[0-36]|88)\\d{4}"]]],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",0,0,0,0,0,[["(?:26[013-9]|59[1-35-9])\\d{6}|(?:[13]\\d|2[0-57-9]|4[1-9]|5[0-8])\\d{7}"],["(?:6(?:[0-24-8]\\d|3[0-8]|9[589])|7[3-9]\\d)\\d{6}"],["80[0-5]\\d{6}"],["836(?:0[0-36-9]|[1-9]\\d)\\d{4}|8(?:1[2-9]|2[2-47-9]|3[0-57-9]|[569]\\d|8[0-35-9])\\d{6}"],0,0,["80[6-9]\\d{6}"],0,["9\\d{8}"],["8(?:1[01]|2[0156]|4[024]|84)\\d{6}"]]],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",0,0,[["[01]1\\d{6}",[8]],["(?:(?:0[2-7]|7[467])\\d|6(?:0[0-4]|10|[256]\\d))\\d{5}|[2-7]\\d{6}"]]],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",[["473(?:2(?:3[0-2]|69)|3(?:2[89]|86)|4(?:[06]8|3[5-9]|4[0-4]|5[59]|73|90)|63[68]|7(?:58|84)|800|938)\\d{4}"],["473(?:4(?:0[2-79]|1[04-9]|2[0-5]|49|5[6-8])|5(?:2[01]|3[3-8])|901)\\d{4}"],["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}"]]],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",0,0,0,0,0,[["(?:3(?:[256]\\d|4[124-9]|7[0-4])|4(?:1\\d|2[2-7]|3[1-79]|4[2-8]|7[239]|9[1-7]))\\d{6}"],["5(?:(?:(?:0555|1(?:[17]77|555))[5-9]|757(?:7[7-9]|8[01]))\\d|22252[0-4])\\d\\d|5(?:0(?:0(?:1[09]|70)|505)|1(?:0[01]0|1(?:07|33|51))|2(?:0[02]0|2[25]2)|3(?:0[03]0|3[35]3)|(?:40[04]|900)0|5222)[0-4]\\d{3}|(?:5(?:0(?:0(?:0\\d|1[12]|22|3[0-6]|44|5[05]|77|88|9[09])|(?:[14]\\d|77)\\d|22[02])|1(?:1(?:[03][01]|[124]\\d|5[2-6]|7[0-6])|4\\d\\d)|[23]555|4(?:4\\d\\d|555)|5(?:[0157-9]\\d\\d|200|333|444)|6[89]\\d\\d|7(?:(?:[0147-9]\\d|22)\\d|5(?:00|[57]5))|8(?:0(?:[018]\\d|2[0-4])|5(?:55|8[89])|8(?:55|88))|9(?:090|[1-35-9]\\d\\d))|790\\d\\d)\\d{4}"],["800\\d{6}"],0,0,0,0,0,["70[67]\\d{6}"]]],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",0,0,0,0,0,[["(?:59(?:4(?:[02-49]\\d|1[0-5]|5[6-9]|6[0-3]|80)|88\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:694(?:[0-249]\\d|3[0-8])|7093[0-3])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:396|76\\d)\\d|476[0-6])\\d{4}"]]],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",0,0,0,0,0,[["3082[0-5]\\d{4}|3(?:0(?:[237]\\d|8[01])|[167](?:2[0-6]|7\\d|80)|2(?:2[0-5]|7\\d|80)|3(?:2[0-3]|7\\d|80)|4(?:2[013-9]|3[01]|7\\d|80)|5(?:2[0-7]|7\\d|80)|8(?:2[0-2]|7\\d|80)|9(?:[28]0|7\\d))\\d{5}",[9]],["(?:2(?:[0346-9]\\d|5[67])|5(?:[03-7]\\d|9[1-9]))\\d{6}",[9]],["800\\d{5,6}"]]],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]],0,0,0,0,0,0,[["2190[0-2]\\d{3}|2(?:0(?:[02]\\d|3[01])|16[24-9]|2[2-5]\\d)\\d{4}"],["5251[0-4]\\d{3}|(?:5(?:[146-8]\\d\\d|250)|60(?:1[01]|6\\d))\\d{4}"]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]],0,0,0,0,0,0,[["(?:19|3[1-7]|[68][1-9]|70|9\\d)\\d{4}"],["[245]\\d{5}"],["80\\d{4}"],0,0,0,0,0,["3[89]\\d{4}"]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]],0,0,0,0,0,0,[["(?:4(?:[23]\\d\\d|4(?:1[024679]|[6-9]\\d))|5(?:5(?:3\\d|4[0-7])|6[67]\\d|7(?:1[04]|2[035]|3[58]|48))|8[0-589]\\d\\d)\\d{3}"],["556\\d{4}|(?:[23679]\\d|4[015]|5[0-489]|8[67])\\d{5}"]]],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]"]]],0,0,0,0,0,0,[["3(?:0(?:24|3[12]|4[1-35-7]|5[13]|6[189]|[78]1|9[1478])|1\\d\\d)\\d{4}",[8]],["6[0-356]\\d{7}",[9]],0,0,0,0,0,0,["722\\d{6}",[9]]]],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]"]]],0,0,0,0,0,0,[["33[0-24-9]\\d[46]\\d{4}|3(?:33|5\\d)\\d[7-9]\\d{4}"],["(?:222|55\\d)\\d{6}"],["80\\d[1-9]\\d{5}"],["90\\d[1-9]\\d{5}"]]],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"]]],0,0,0,0,0,0,[["2(?:1\\d\\d|2(?:2[1-46-9]|[36][1-8]|4[1-7]|5[1-4]|7[1-5]|[89][1-9])|3(?:1\\d|2[1-57]|[35][1-3]|4[13]|7[1-7]|8[124-6]|9[1-79])|4(?:1\\d|2[1-8]|3[1-4]|4[13-5]|6[1-578]|9[1-5])|5(?:1\\d|[29][1-4]|3[1-5]|4[124]|5[1-6])|6(?:1\\d|[269][1-6]|3[1245]|4[1-7]|5[13-9]|7[14]|8[1-5])|7(?:1\\d|2[1-5]|3[1-6]|4[1-7]|5[1-57]|6[135]|9[125-7])|8(?:1\\d|2[1-5]|[34][1-4]|9[1-57]))\\d{6}",[10]],["68[57-9]\\d{7}|(?:69|94)\\d{8}",[10]],["800\\d{7,9}"],["90[19]\\d{7}",[10]],["70\\d{8}",[10]],0,["5005000\\d{3}",[10]],0,0,["8(?:0[16]|12|[27]5|50)\\d{7}",[10]]]],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"]]],0,0,0,0,0,0,[["[267][2-9]\\d{6}",[8]],["(?:[3-5]\\d\\d|80[0-4])\\d{5}",[8]],["18[01]\\d{8}",[11]],["19\\d{9}",[11]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671",[["671(?:2\\d\\d|3(?:00|3[39]|4[349]|55|6[26])|4(?:00|56|7[1-9]|8[02-9])|5(?:55|6[2-5]|88)|6(?:3[2-578]|4[24-9]|5[34]|78|8[235-9])|7(?:[0479]7|2[0167]|3[45]|8[7-9])|8(?:[2-57-9]8|6[478])|9(?:2[29]|6[79]|7[1279]|8[7-9]|9[16-9]))\\d{4}"],[""],["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}"]]],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]"]]],0,0,0,0,0,0,[["443\\d{6}",[9]],["9(?:5\\d|6[569]|77)\\d{6}",[9]],0,0,0,0,0,0,["40\\d{5}",[7]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]],0,0,0,0,0,0,[["(?:2(?:1[6-9]|2[0-35-9]|3[1-4]|5[3-9]|6\\d|7[0-79])|3(?:2[25-9]|3\\d)|4(?:4[0-24]|5[56])|50[0-6]|77[1-57])\\d{4}"],["(?:51[01]|6\\d\\d|7(?:[0-5]\\d|6[0-79]|70))\\d{4}"],["(?:289|8(?:00|6[28]|88|99))\\d{4}"],["9008\\d{3}"],0,0,0,0,["515\\d{4}"]]],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,[["(?:2(?:[13-9]\\d|2[013-9])\\d|3(?:(?:[1569][0-24-9]|4[0-246-9]|7[0-24-69])\\d|8(?:4[0-8]|[579]\\d|6[0-5]))|58(?:0[1-9]|1[2-9]))\\d{4}",[8]],["(?:4(?:(?:09|24)[3-6]|44[0-35-9]|6(?:4[0-57-9]|6[0-6])|7(?:4[0-48]|6[0-5]))|5(?:25[3-7]|35[4-8]|73[0-6]|95[0-8])|6(?:26[013-8]|(?:66|78)[0-5])|70(?:7[1-8]|8[0-8])|84(?:4[0-2]|8[0-35-9])|9(?:29[013-9]|39[014-9]|59[0-467]|899))\\d{4}|(?:4(?:4[0-35-9]|6[0-357-9]|7[0-35])|5(?:[1-59][0-46-9]|6[0-4689]|7[0-246-9])|6(?:0[1-9]|[13-59]\\d|[268][0-57-9]|7[0-79])|70[1-59]|84[0-39]|9(?:0[1-9]|1[02-9]|[2358][0-8]|[467]\\d))\\d{5}",[8]],["800\\d{6}",[9]],["900(?:[0-24-9]\\d{7}|3\\d{1,4})",[5,6,7,8,11]],["8(?:1[0-4679]\\d|2(?:[0-36]\\d|7[0-4])|3(?:[034]\\d|2[09]|70))\\d{4}",[8]],0,["30(?:0[1-9]|[15-7]\\d|2[047]|89)\\d{4}",[8]],["7(?:1(?:0[0-38]|1[0-3679]|3[013]|69|9[0136])|2(?:[02389]\\d|1[18]|7[27-9])|3(?:[0-38]\\d|7[0-369]|9[2357-9])|47\\d|5(?:[178]\\d|5[0-5])|6(?:0[0-7]|2[236-9]|[35]\\d)|7(?:[27]\\d|8[7-9])|8(?:[23689]\\d|7[1-9])|9(?:[025]\\d|6[0-246-8]|7[0-36-9]|8[238]))\\d{4}",[8]]],"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]],0,0,0,0,0,0,[["2(?:2(?:0[0-59]|1[1-9]|[23]\\d|4[02-7]|5[57]|6[245]|7[0135689]|8[01346-9]|9[0-2])|4(?:0[578]|2[3-59]|3[13-9]|4[0-68]|5[1-3589])|5(?:0[2357-9]|1[1-356]|4[03-5]|5\\d|6[014-69]|7[04]|80)|6(?:[056]\\d|17|2[067]|3[047]|4[0-378]|[78][0-8]|9[01])|7(?:0[5-79]|6[46-9]|7[02-9]|8[034]|91)|8(?:79|8[0-357-9]|9[1-57-9]))\\d{4}",[8]],["[37-9]\\d{7}",[8]],["8002\\d{7}",[11]]]],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",0,0,0,0,0,[["1\\d{7}|(?:2[0-3]|3[1-5]|4[02-47-9]|5[1-3])\\d{6,7}",[8,9]],["9(?:(?:0[1-9]|[12589]\\d)\\d\\d|7(?:[0679]\\d\\d|5(?:[01]\\d|44|55|77|9[5-79])))\\d{4}|98\\d{6}",[8,9]],["80\\d{5,7}"],["6[01459]\\d{6}|6[01]\\d{5}",[7,8]],["7[45]\\d{6}",[8]],0,["62\\d{6,7}|72\\d{6}",[8,9]]]],HT:["509","00","[2-589]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]],0,0,0,0,0,0,[["2(?:2\\d|5[1-5]|81|9[149])\\d{5}"],["(?:[34]\\d|5[568])\\d{6}"],["8\\d{7}"],0,0,0,0,0,["9(?:[67][0-4]|8[0-3589]|9\\d)\\d{5}"]]],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",0,0,0,0,0,[["(?:1\\d|[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6[23689]|8[2-57-9]|9[2-69])\\d{6}",[8]],["(?:[257]0|3[01])\\d{7}",[9]],["(?:[48]0\\d|680[29])\\d{5}"],["9[01]\\d{6}",[8]],0,0,["38\\d{7}",[9]],0,["21\\d{7}",[9]]]],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",0,0,0,0,0,[["2[124]\\d{7,8}|619\\d{8}|2(?:1(?:14|500)|2\\d{3})\\d{3}|61\\d{5,8}|(?:2(?:[35][1-4]|6[0-8]|7[1-6]|8\\d|9[1-8])|3(?:1|[25][1-8]|3[1-68]|4[1-3]|6[1-3568]|7[0-469]|8\\d)|4(?:0[1-589]|1[01347-9]|2[0-36-8]|3[0-24-68]|43|5[1-378]|6[1-5]|7[134]|8[1245])|5(?:1[1-35-9]|2[25-8]|3[124-9]|4[1-3589]|5[1-46]|6[1-8])|6(?:[25]\\d|3[1-69]|4[1-6])|7(?:02|[125][1-9]|[36]\\d|4[1-8]|7[0-36-9])|9(?:0[12]|1[013-8]|2[0-479]|5[125-8]|6[23679]|7[159]|8[01346]))\\d{5,8}",[7,8,9,10,11]],["8[1-35-9]\\d{7,10}",[9,10,11,12]],["00(?:1803\\d{5,11}|7803\\d{7})|(?:177\\d|800)\\d{5,7}",[8,9,10,11,12,13,14,15,16,17]],["809\\d{7}",[10]],0,0,["(?:1500|8071\\d{3})\\d{3}",[7,10]],0,0,["804\\d{7}",[10]]]],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",0,0,0,0,0,[["(?:1\\d|21)\\d{6,7}|(?:2[24-9]|4(?:0[24]|5\\d|7)|5(?:0[45]|1\\d|8)|6(?:1\\d|[237-9])|9(?:1\\d|[35-9]))\\d{5}|(?:23|4(?:[1-469]|8\\d)|5[23679]|6[4-6]|7[14]|9[04])\\d{7}"],["8(?:22|[35-9]\\d)\\d{6}",[9]],["1800\\d{6}",[10]],["15(?:1[2-8]|[2-8]0|9[089])\\d{6}",[10]],["700\\d{6}",[9]],["88210[1-9]\\d{4}|8(?:[35-79]5\\d\\d|8(?:[013-9]\\d\\d|2(?:[01][1-9]|[2-9]\\d)))\\d{5}",[10]],["818\\d{6}",[9]],0,["76\\d{7}",[9]],["18[59]0\\d{6}",[10]]]],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",0,0,0,0,0,[["153\\d{8,9}|29[1-9]\\d{5}|(?:2[0-8]|[3489]\\d)\\d{6}",[8,11,12]],["55(?:4(?:0[0-2]|[16]0)|57[0-289])\\d{4}|5(?:(?:[0-2][02-9]|[36]\\d|[49][2-9]|8[3-7])\\d|5(?:01|2\\d|3[0-3]|4[3-5]|5[0-25689]|6[6-8]|7[0-267]|8[7-9]|9[1-9]))\\d{5}",[9]],["1(?:255|80[019]\\d{3})\\d{3}",[7,10]],["1212\\d{4}|1(?:200|9(?:0[0-2]|19))\\d{6}",[8,10]],0,["151\\d{8,9}",[11,12]],["1599\\d{6}",[10]],0,["7(?:38(?:[05]\\d|8[0138])|8(?:33|55|77|81)\\d)\\d{4}|7(?:18|2[23]|3[237]|47|6[258]|7\\d|82|9[2-9])\\d{6}",[9]],["1700\\d{6}",[10]]]],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",[["1624(?:230|[5-8]\\d\\d)\\d{3}"],["76245[06]\\d{4}|7(?:4576|[59]24\\d|624[0-4689])\\d{5}"],["808162\\d{4}"],["8(?:440[49]06|72299\\d)\\d{3}|(?:8(?:45|70)|90[0167])624\\d{4}"],["70\\d{8}"],0,["3440[49]06\\d{3}|(?:3(?:08162|3\\d{4}|45624|7(?:0624|2299))|55\\d{4})\\d{4}"],0,["56\\d{8}"]]],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",0,0,0,0,0,[["(?:2717(?:[2-7]\\d|95)|6828[235-7]\\d)\\d{4}|(?:170[24]|280[13468]|4(?:20[24]|72[2-8])|552[1-7])\\d{6}|(?:271[0-689]|682[0-79]|782[0-6])[2-7]\\d{5}|(?:2(?:[02][2-79]|90)|3(?:23|80)|683|79[1-7])\\d{7}|(?:11|33|4[04]|80)[2-7]\\d{7}|(?:342|674|788)(?:[0189][2-7]|[2-7]\\d)\\d{5}|(?:1(?:2[0-249]|3[0-25]|4[145]|[59][14]|6[014]|7[1257]|8[01346])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568]|9[14])|3(?:26|4[13]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[014-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|2[14]|3[134]|4[47]|5[15]|[67]1)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91))[2-7]\\d{6}|(?:1(?:2[35-8]|3[346-9]|4[236-9]|[59][0235-9]|6[235-9]|7[34689]|8[257-9])|2(?:1[134689]|3[24-8]|4[2-8]|5[25689]|6[2-4679]|7[3-79]|8[2-479]|9[235-9])|3(?:01|1[79]|2[1245]|4[5-8]|5[125689]|6[235-7]|7[157-9]|8[2-46-8])|4(?:1[14578]|2[5689]|3[2-467]|5[4-7]|6[35]|73|8[2689]|9[2389])|5(?:[16][146-9]|2[14-8]|3[1346]|4[14-69]|5[46]|7[2-4]|8[2-8]|9[246])|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[14-6])|7(?:1[013-9]|2[0235-9]|3[2679]|4[1-35689]|5[2-46-9]|[67][02-9]|8[013-7]|9[089])|8(?:1[1357-9]|2[235-8]|3[03-57-9]|4[0-24-9]|5\\d|6[2457-9]|7[1-6]|8[1256]|9[2-4]))\\d[2-7]\\d{5}",[10]],["(?:6(?:1279|828[01489])|7(?:887[02-9]|9(?:313|79[07-9]))|8(?:079[04-9]|(?:84|91)7[02-8]))\\d{5}|(?:160[01]|6(?:12|[2-47]1|5[17]|6[13]|80)[0189]|7(?:1(?:2[0189]|9[0-5])|2(?:[14][017-9]|8[0-59])|3(?:2[5-8]|[34][017-9]|9[016-9])|4(?:1[015-9]|[29][89]|39|8[389])|5(?:[15][017-9]|2[04-9]|9[7-9])|6(?:0[0-47]|1[0-257-9]|2[0-4]|3[19]|5[4589])|70[0289]|88[089]|97[02-8])|8(?:0(?:6[67]|7[02-8])|70[017-9]|84[01489]|91[0-289]))\\d{6}|(?:7(?:31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[0189]\\d|7[02-8])\\d{5}|(?:6(?:[09]\\d|1[04679]|2[03689]|3[05-9]|4[0489]|50|6[069]|7[07]|8[7-9])|7(?:0\\d|2[0235-79]|3[05-8]|40|5[0346-8]|6[6-9]|7[1-9]|8[0-79]|9[089])|8(?:0[01589]|1[0-57-9]|2[235-9]|3[03-57-9]|[45]\\d|6[02457-9]|7[1-69]|8[0-25-9]|9[02-9])|9\\d\\d)\\d{7}|(?:6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578])\\d|7(?:[235689]\\d|4[0189])|8(?:[14-6]\\d|2[0-79]))|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-5])|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]|881))[0189]\\d{5}",[10]],["000800\\d{7}|180(?:0\\d{4,9}|3\\d{9})"],["186[12]\\d{9}",[13]],0,0,["140\\d{7}",[10]],0,0,["1860\\d{7}",[11]]]],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]],0,0,0,0,0,0,[["37\\d{5}"],["38\\d{5}"]]],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",0,0,0,0,0,[["1\\d{7}|(?:2[13-5]|3[02367]|4[023]|5[03]|6[026])\\d{6,7}",[8,9]],["7[3-9]\\d{8}",[10]]]],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",0,0,0,0,0,[["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])(?:[03-57]\\d{7}|[16]\\d{3}(?:\\d{4})?|[289]\\d{3}(?:\\d(?:\\d{3})?)?)|94(?:000[09]|(?:12\\d|30[0-2])\\d|2(?:[02689]0\\d|121)|4(?:111|40\\d))\\d{4}",[6,7,10]],["9(?:(?:0[0-5]|[13]\\d|2[0-3])\\d\\d|9(?:[0-46]\\d\\d|5(?:10|5\\d)|8(?:[12]\\d|88)|9(?:[01359]\\d|21|69|77|8[7-9])))\\d{5}",[10]],0,0,0,0,["96(?:0[12]|2[16-8]|3(?:08|[14]5|[23]|66)|4(?:0|80)|5[01]|6[89]|86|9[19])",[4,5]]]],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,[["(?:4(?:1[0-24-69]|2[0-7]|[37][0-8]|4[0-24589]|5[0-68]|6\\d|8[0-36-8])|5(?:05|[156]\\d|2[02578]|3[0-579]|4[03-7]|7[0-2578]|8[0-35-9]|9[013-689])|872)\\d{4}",[7]],["(?:38[589]\\d\\d|6(?:1[1-8]|2[0-6]|3[026-9]|4[014679]|5[0159]|6[0-69]|70|8[06-8]|9\\d)|7(?:5[057]|[6-9]\\d)|8(?:2[0-59]|[3-69]\\d|8[238]))\\d{4}"],["80[0-8]\\d{4}",[7]],["90(?:0\\d|1[5-79]|2[015-79]|3[135-79]|4[125-7]|5[25-79]|7[1-37]|8[0-35-7])\\d{3}",[7]],0,["(?:689|8(?:7[18]|80)|95[48])\\d{4}",[7]],["809\\d{4}",[7]],0,["49[0-24-79]\\d{4}",[7]]],"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",[["8766060\\d{3}|(?:658(?:2(?:[5-8]\\d|9[0-46-9])|[3-9]\\d\\d)|876(?:52[35]|6(?:0[1-3579]|1[0235-9]|[23]\\d|40|5[06]|6[2-589]|7[0-25-9]|8[04]|9[4-9])|7(?:0[2-689]|[1-6]\\d|8[056]|9[45])|9(?:0[1-8]|1[02378]|[2-8]\\d|9[2-468])))\\d{4}"],["(?:6582(?:[0-4]\\d|95)|876(?:2(?:0[1-9]|[13-9]\\d|2[013-9])|[348]\\d\\d|5(?:0[1-9]|[1-9]\\d)|6(?:4[89]|6[67])|7(?:0[07]|7\\d|8[1-47-9]|9[0-36-9])|9(?:[01]9|9[0579])))\\d{4}"],["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}"]]],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",0,0,0,0,0,[["87(?:000|90[01])\\d{3}|(?:2(?:6(?:2[0-35-9]|3[0-578]|4[24-7]|5[0-24-8]|[6-8][023]|9[0-3])|7(?:0[1-79]|10|2[014-7]|3[0-689]|4[019]|5[0-3578]))|32(?:0[1-69]|1[1-35-7]|2[024-7]|3\\d|4[0-3]|[5-7][023])|53(?:0[0-3]|[13][023]|2[0-59]|49|5[0-35-9]|6[15]|7[45]|8[1-6]|9[0-36-9])|6(?:2(?:[05]0|22)|3(?:00|33)|4(?:0[0-25]|1[2-7]|2[0569]|[38][07-9]|4[025689]|6[0-589]|7\\d|9[0-2])|5(?:[01][056]|2[034]|3[0-57-9]|4[178]|5[0-69]|6[0-35-9]|7[1-379]|8[0-68]|9[0239]))|87(?:20|7[078]|99))\\d{4}",[8]],["(?:427|7(?:[78][0-25-9]|9\\d))\\d{6}",[9]],["80\\d{6}",[8]],["9\\d{7}",[8]],["70\\d{7}",[9]],0,["8(?:10|8\\d)\\d{5}",[8]],["74(?:66|77)\\d{5}",[9]],0,["85\\d{6}",[8]]]],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",0,0,[["(?:1(?:1[235-8]|2[3-6]|3[3-9]|4[2-6]|[58][2-8]|6[2-7]|7[2-9]|9[1-9])|(?:2[2-9]|[36][1-9])\\d|4(?:[2-578]\\d|6[02-8]|9[2-59])|5(?:[2-589]\\d|6[1-9]|7[2-8])|7(?:[25-9]\\d|3[4-9]|4[02-9])|8(?:[2679]\\d|3[2-9]|4[5-9]|5[1-9]|8[03-9])|9(?:[2-58]\\d|[679][1-9]))\\d{6}",[9]],["(?:601[0-4]0|[7-9]0[1-9]\\d\\d)\\d{5}",[10]],["00777(?:[01]|5\\d)\\d\\d|(?:00(?:7778|882[1245])|(?:120|800\\d)\\d\\d)\\d{4}|00(?:37|66|78)\\d{6,13}"],["990\\d{6}",[9]],["60\\d{7}",[9]],0,["570\\d{6}",[9]],["20\\d{8}",[10]],["50[1-9]\\d{7}",[10]]]],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",0,0,0,0,0,[["(?:4[245]|5[1-79]|6[01457-9])\\d{5,7}|(?:4[136]|5[08]|62)\\d{7}|(?:[24]0|66)\\d{6,7}",[7,8,9]],["(?:1(?:0[0-8]|1\\d|2[014]|30|4[0-3])|7\\d\\d)\\d{6}",[9]],["800[02-8]\\d{5,6}",[9,10]],["900[02-9]\\d{5}",[9]]]],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",0,0,0,0,0,[["312(?:5[0-79]\\d|9(?:[0-689]\\d|7[0-24-9]))\\d{3}|(?:3(?:1(?:2[0-46-8]|3[1-9]|47|[56]\\d)|2(?:22|3[0-479]|6[0-7])|4(?:22|5[6-9]|6\\d)|5(?:22|3[4-7]|59|6\\d)|6(?:22|5[35-7]|6\\d)|7(?:22|3[468]|4[1-9]|59|[67]\\d)|9(?:22|4[1-8]|6\\d))|6(?:09|12|2[2-4])\\d)\\d{5}",[9]],["312(?:58\\d|973)\\d{3}|(?:2(?:0[0-35]|2\\d)|5[0-24-7]\\d|600|7(?:[07]\\d|55)|88[08]|9(?:12|9[05-9]))\\d{6}",[9]],["800\\d{6,7}"]]],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",0,0,0,0,0,[["23(?:4(?:[2-4]|[56]\\d)|[568]\\d\\d)\\d{4}|23[236-9]\\d{5}|(?:2[4-6]|3[2-6]|4[2-4]|[5-7][2-5])(?:(?:[237-9]|4[56]|5\\d)\\d{5}|6\\d{5,6})",[8,9]],["(?:(?:1[28]|3[18]|9[67])\\d|6[016-9]|7(?:[07-9]|[16]\\d)|8(?:[013-79]|8\\d))\\d{6}|(?:1\\d|9[0-57-9])\\d{6}|(?:2[3-6]|3[2-6]|4[2-4]|[5-7][2-5])48\\d{5}",[8,9]],["1800(?:1\\d|2[019])\\d{4}",[10]],["1900(?:1\\d|2[09])\\d{4}",[10]]]],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0",0,0,0,0,0,[["(?:[24]\\d|3[1-9]|50|65(?:02[12]|12[56]|22[89]|[3-5]00)|7(?:27\\d\\d|3100|5(?:02[12]|12[56]|22[89]|[34](?:00|81)|500))|8[0-5])\\d{3}"],["(?:6200[01]|7(?:310[1-9]|5(?:02[03-9]|12[0-47-9]|22[0-7]|[34](?:0[1-9]|8[02-9])|50[1-9])))\\d{3}|(?:63\\d\\d|7(?:(?:[0146-9]\\d|2[0-689])\\d|3(?:[02-9]\\d|1[1-9])|5(?:[0-2][013-9]|[34][1-79]|5[1-9]|[6-9]\\d)))\\d{4}",[8]],0,0,0,0,0,0,["30(?:0[01]\\d\\d|12(?:11|20))\\d\\d",[8]]]],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]],0,0,0,0,0,0,[["7[4-7]\\d{5}"],["[34]\\d{6}"],0,["8\\d{6}"]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869",[["869(?:2(?:29|36)|302|4(?:6[015-9]|70)|56[5-7])\\d{4}"],["869(?:48[89]|55[6-8]|66\\d|76[02-7])\\d{4}"],["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}"]]],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",0,0,0,0,0,[["(?:(?:195|2)\\d|3[19]|4[159]|5[37]|6[17]|7[39]|85)\\d{6}"],["19[1-3]\\d{7}",[10]]]],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))?",0,0,0,[["(?:2|3[1-3]|[46][1-4]|5[1-5])[1-9]\\d{6,7}|(?:3[1-3]|[46][1-4]|5[1-5])1\\d{2,3}",[5,6,8,9,10]],["1(?:05(?:[0-8]\\d|9[0-6])|22[13]\\d)\\d{4,5}|1(?:0[0-46-9]|[16-9]\\d|2[013-9])\\d{6,7}",[9,10]],["00(?:308\\d{6,7}|798\\d{7,9})|(?:00368|[38]0)\\d{7}",[9,11,12,13,14]],["60[2-9]\\d{6}",[9]],["50\\d{8,9}",[10,11]],0,["1(?:5(?:22|33|44|66|77|88|99)|6(?:[07]0|44|6[0168]|88)|8(?:00|33|55|77|99))\\d{4}",[8]],["15\\d{7,8}",[9,10]],["70\\d{8}",[10]]]],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]"]]],0,0,0,0,0,0,[["2(?:[23]\\d\\d|4(?:[1-35-9]\\d|44)|5(?:0[034]|[2-46]\\d|5[1-3]|7[1-7]))\\d{4}",[8]],["(?:41\\d\\d|5(?:(?:[05]\\d|1[0-7]|6[56])\\d|2(?:22|5[25])|7(?:55|77)|88[58])|6(?:(?:0[034679]|5[015-9]|6\\d)\\d|1(?:00|11|6[16])|2[26]2|3[36]3|4[46]4|7(?:0[013-9]|[67]\\d)|8[68]8|9(?:[069]\\d|3[039]))|9(?:(?:[04679]\\d|8[057-9])\\d|1(?:00|1[01]|99)|2(?:00|2\\d)|3(?:00|3[03])|5(?:00|5\\d)))\\d{4}",[8]],["18\\d{5}",[7]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345",[["345(?:2(?:22|3[23]|44|66)|333|444|6(?:23|38|40)|7(?:30|4[35-79]|6[6-9]|77)|8(?:00|1[45]|4[89]|88)|9(?:14|4[035-9]))\\d{4}"],["345(?:32[1-9]|4(?:1[2-6]|2[0-4])|5(?:1[67]|2[5-79]|4[6-9]|50|76)|649|82[56]|9(?:1[679]|2[2-9]|3[06-9]|90))\\d{4}"],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["(?:345976|900[2-9]\\d\\d)\\d{4}"],["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}"]]],KZ:["7","810","8\\d{13}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"7",[["7(?:1(?:0(?:[23]\\d|4[0-3]|59|63)|1(?:[23]\\d|4[0-79]|59)|2(?:[23]\\d|59)|3(?:2\\d|3[0-79]|4[0-35-9]|59)|4(?:[24]\\d|3[013-9]|5[1-9]|97)|5(?:2\\d|3[1-9]|4[0-7]|59)|6(?:[2-4]\\d|5[19]|61)|72\\d|8(?:[27]\\d|3[1-46-9]|4[0-5]|59))|2(?:1(?:[23]\\d|4[46-9]|5[3469])|2(?:2\\d|3[0679]|46|5[12679])|3(?:[2-4]\\d|5[139])|4(?:2\\d|3[1-35-9]|59)|5(?:[23]\\d|4[0-8]|59|61)|6(?:2\\d|3[1-9]|4[0-4]|59)|7(?:[2379]\\d|40|5[279])|8(?:[23]\\d|4[0-3]|59)|9(?:2\\d|3[124578]|59)))\\d{5}",[10]],["7(?:0[0-25-8]|47|6[0-4]|7[15-8]|85)\\d{7}",[10]],["8(?:00|108\\d{3})\\d{7}"],["809\\d{7}",[10]],["808\\d{7}",[10]],0,0,0,["751\\d{7}",[10]]],"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",0,0,0,0,0,[["(?:2[13]|[35-7][14]|41|8[1468])\\d{6}",[8]],["(?:20(?:[23579]\\d|8[78])|30[24]\\d)\\d{6}|30\\d{7}",[9,10]]]],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",0,0,0,0,0,[["7(?:62|8[0-6]|9[04-9])\\d{4}|(?:[14-69]\\d|2(?:[14-69]\\d|[78][1-9])|7[2-57]|8[02-9])\\d{5}"],["(?:(?:3|81)\\d|7(?:[01]\\d|6[013-9]|8[7-9]|9[0-4]))\\d{5}"],0,["9[01]\\d{6}",[8]],0,0,0,0,0,["80\\d{6}",[8]]]],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758",[["758(?:234|4(?:30|5\\d|6[2-9]|8[0-2])|57[0-2]|(?:63|75)8)\\d{4}"],["758(?:28[4-7]|384|4(?:6[01]|8[4-9])|5(?:1[89]|20|84)|7(?:1[2-9]|2\\d|3[0-3])|812)\\d{4}"],["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}"]]],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",0,0,0,[["(?:2(?:01|1[27]|2[024]|3\\d|6[02-578]|96)|3(?:[24]0|33|7[0135-7]|8[048]|9[0269]))\\d{4}",[7]],["(?:6(?:(?:4[5-9]|5\\d)\\d|6(?:[024-68]\\d|1[01]|3[7-9]|70))\\d|7(?:[37-9]\\d|42|56))\\d{4}"],["8002[28]\\d\\d|80(?:05\\d|9)\\d{4}"],["90(?:02[258]|1(?:23|3[14])|66[136])\\d\\d",[7]],0,["697(?:42|56|[78]\\d)\\d{4}",[9]],["870(?:28|87)\\d\\d",[7]]]],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",0,0,0,0,0,[["(?:12[2-9]|602|8[12]\\d|9(?:1\\d|22|9[245]))\\d{6}|(?:11|2[13-7]|3[1-8]|4[157]|5[12457]|6[35-7])[2-57]\\d{6}"],["7(?:[0-25-8]\\d|4[0-4])\\d{6}"],0,0,0,0,["1973\\d{5}"]]],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",0,0,0,0,0,[["2\\d{7}",[8]],["(?:(?:(?:22|33)0|555|7(?:6[01]|7\\d)|88\\d)\\d|4(?:240|[67]))\\d{5}|[56]\\d{6}",[7,9]],0,["332(?:02|[34]\\d)\\d{4}",[9]]]],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]],0,0,0,0,0,0,[["2\\d{7}"],["[56]\\d{7}"],["800[1256]\\d{4}"]]],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]",0,0,0,[["(?:3[1478]|4[124-6]|52)\\d{6}"],["6\\d{7}"],["80[02]\\d{5}"],["9(?:0[0239]|10)\\d{5}"],["70[05]\\d{5}"],0,["70[67]\\d{5}"],0,["[89]01\\d{5}"],["808\\d{5}"]]],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)",0,0,0,[["(?:35[013-9]|80[2-9]|90[89])\\d{1,8}|(?:2[2-9]|3[0-46-9]|[457]\\d|8[13-9]|9[2-579])\\d{2,9}"],["6(?:[26][18]|5[1568]|7[189]|81|9[128])\\d{6}",[9]],["800\\d{5}",[8]],["90[015]\\d{5}",[8]],0,0,0,0,["20(?:1\\d{5}|[2-689]\\d{1,7})",[4,5,6,7,8,9,10]],["801\\d{5}",[8]]]],LV:["371","00","(?:[268]\\d|78|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2679]|8[01]"]]],0,0,0,0,0,0,[["6\\d{7}"],["2333[0-8]\\d{3}|2(?:[0-24-9]\\d\\d|3(?:0[07]|[14-9]\\d|2[02-9]|3[0-24-9]))\\d{4}"],["80\\d{6}"],["90\\d{6}"],0,0,0,0,0,["81\\d{6}"]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0",0,0,0,0,0,[["(?:2(?:0[56]|[1-6]\\d|7[124579]|8[124])|3(?:1\\d|2[2356])|4(?:[17]\\d|2[1-357]|5[2-4]|8[124])|5(?:[1347]\\d|2[1-469]|5[13-5]|8[1-4])|6(?:[1-479]\\d|5[2-57]|8[1-5])|7(?:[13]\\d|2[13-79])|8(?:[124]\\d|5[124]|84))\\d{6}"],["9[1-6]\\d{7}"]]],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]",[["5(?:(?:18|4[0679]|5[03])\\d|2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-9])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9]))\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[016-8]\\d|2[0-8]|5[0-5]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],MC:["377","00","(?:[3489]|[67]\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[67]"],"0$1"]],"0",0,0,0,0,0,[["(?:870|9[2-47-9]\\d)\\d{5}",[8]],["4(?:[469]\\d|5[1-9])\\d{5}|(?:3|[67]\\d)\\d{7}"],["(?:800|90\\d)\\d{5}",[8]]]],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",0,0,0,0,0,[["(?:(?:2[1-9]|3[1-79])\\d|5(?:33|5[257]))\\d{5}"],["562\\d{5}|(?:6\\d|7[16-9])\\d{6}"],["800\\d{5}"],["90[056]\\d{5}"],0,0,["803\\d{5}"],0,["3[08]\\d{6}"],["808\\d{5}"]]],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",0,0,0,0,0,[["(?:20[2-8]|3(?:[0-2][2-7]|3[24-7])|4(?:0[2-467]|1[2467])|5(?:0[2467]|1[24-7]|2[2-467]))\\d{5}",[8]],["6(?:[07-9]\\d|3[024]|6[0-25])\\d{5}",[8]],["80(?:[0-2578]|9\\d)\\d{5}"],["9(?:4[1568]|5[178])\\d{5}",[8]],0,0,["77[1-9]\\d{5}",[8]],0,["78[1-49]\\d{5}",[8]]]],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",0,0,[["2072[29]\\d{4}|20(?:2\\d|4[47]|5[3467]|6[279]|7[356]|8[268]|9[2457])\\d{5}"],["3[2-9]\\d{7}"],0,0,0,0,0,0,["22\\d{7}"]]],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1",0,0,0,0,0,[["(?:247|528|625)\\d{4}"],["(?:(?:23|54)5|329|45[35-8])\\d{4}"],0,0,0,0,0,0,["635\\d{4}"]]],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",0,0,0,0,0,[["(?:(?:2(?:62|77)0|3444)\\d|4[56]440)\\d{3}|(?:34|4[357])700\\d{3}|(?:2(?:[0-3]\\d|5[0-578]|6[01]|82)|3(?:1[3-68]|[23][2-68]|4[23568])|4(?:[23][2-68]|4[3-68]|5[2568]|6[25-8]|7[24-68]|8[4-68]))\\d{5}"],["7(?:3555|(?:474|9[019]7)7)\\d{3}|7(?:[0-25-8]\\d\\d|3(?:[1-478]\\d|6[01])|4(?:2\\d|60|7[01578])|9(?:[2-4]\\d|5[01]|7[015]))\\d{4}"],["800\\d{5}"],["5\\d{7}"],0,0,0,0,0,["8(?:0[1-9]|[1-9]\\d)\\d{5}"]]],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]],0,0,0,0,0,0,[["2(?:07[0-8]|12[67])\\d{4}|(?:2(?:02|1[4-689])|4(?:0[0-4]|4[1-59]))\\d{5}"],["2(?:0(?:01|79)|17\\d)\\d{4}|(?:5[0-3]|[679]\\d|8[2-59])\\d{6}"],["80\\d{6}"]]],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",0,0,0,0,0,[["(?:1(?:(?:12|[28]\\d|3[56]|7[3-6]|9[0-6])\\d|4(?:2[29]|7[0-2]|83)|6)|2(?:2(?:00|8[34])|4(?:0\\d|22|7[0-2]|83)|51\\d\\d)|4(?:2(?:2\\d\\d|48[013])|3(?:20\\d|4(?:70|83)|56)|420\\d|5(?:2\\d|470))|6(?:0(?:[23]|88\\d)|(?:124|[56]2\\d)\\d|2472|3(?:20\\d|470)|4(?:2[04]\\d|472)|7(?:3\\d\\d|4[67]0|8(?:[01459]\\d|8))))\\d{4}|5(?:2(?:2\\d{5,6}|47[02]\\d{4})|(?:3472|4(?:2(?:1|86)|470)|522\\d|6(?:20\\d|483)|7(?:20\\d|48[01])|8(?:20\\d|47[02])|9(?:20\\d|470))\\d{4})|7(?:(?:0470|4(?:25\\d|470)|5(?:202|470|96\\d))\\d{4}|1(?:20\\d{4,5}|4(?:70|83)\\d{4}))|8(?:1(?:2\\d{5,6}|4(?:10|7[01]\\d)\\d{3})|2(?:2\\d{5,6}|(?:320|490\\d)\\d{3})|(?:3(?:2\\d\\d|470)|4[24-7]|5(?:(?:2\\d|51)\\d|4(?:[1-35-9]\\d|4[0-57-9]))|6[23])\\d{4})|(?:1[2-6]\\d|4(?:2[24-8]|3[2-7]|[46][2-6]|5[3-5])|5(?:[27][2-8]|3[2-68]|4[24-8]|5[23]|6[2-4]|8[24-7]|9[2-7])|6(?:[19]20|42[03-6]|(?:52|7[45])\\d)|7(?:[04][24-8]|[15][2-7]|22|3[2-4])|8(?:1[2-689]|2[2-8]|(?:[35]2|64)\\d))\\d{4}|25\\d{5,6}|(?:2[2-9]|6(?:1[2356]|[24][2-6]|3[24-6]|5[2-4]|6[2-8]|7[235-7]|8[245]|9[24])|8(?:3[24]|5[245]))\\d{4}",[6,7,8,9]],["(?:17[01]|9(?:2(?:[0-4]|[56]\\d\\d)|(?:3(?:[0-36]|4\\d)|(?:6\\d|8[89]|9[4-8])\\d|7(?:3|40|[5-9]\\d))\\d|4(?:(?:[0245]\\d|[1379])\\d|88)|5[0-6])\\d)\\d{4}|9[69]1\\d{6}|9(?:[68]\\d|9[089])\\d{5}",[7,8,9,10]],["80080(?:0[1-9]|2\\d)\\d{3}",[10]],0,0,0,0,0,["1333\\d{4}",[8]]]],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",0,0,0,0,0,[["[12]2[1-3]\\d{5,6}|(?:(?:[12](?:1|27)|5[368])\\d\\d|7(?:0(?:[0-5]\\d|7[078]|80)|128))\\d{4}|[12](?:3[2-8]|4[2-68]|5[1-4689])\\d{6,7}"],["92[0139]\\d{5}|(?:5[05]|6[069]|7[28]|8[0135689]|9[013-9])\\d{6}",[8]],0,0,0,0,0,0,["712[0-79]\\d{4}|7(?:1[013-9]|[5-79]\\d)\\d{5}",[8]]]],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]"]]],0,0,0,0,0,0,[["(?:28[2-9]|8(?:11|[2-57-9]\\d))\\d{5}",[8]],["6800[0-79]\\d{3}|6(?:[235]\\d\\d|6(?:0[0-5]|[1-9]\\d)|8(?:0[1-9]|[14-8]\\d|2[5-9]|[39][0-4]))\\d{4}",[8]],["0800\\d{3}",[7]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670",[["670(?:2(?:3[3-7]|56|8[4-8])|32[1-38]|4(?:33|8[348])|5(?:32|55|88)|6(?:64|70|82)|78[3589]|8[3-9]8|989)\\d{4}"],[""],["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}"]]],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",0,0,0,0,0,[["(?:59(?:6(?:[03-7]\\d|1[05]|2[7-9]|8[0-39]|9[04-9])|89\\d)|80[6-9]\\d\\d|9(?:477[6-9]|767[4589]))\\d{4}"],["(?:69[67]\\d\\d|7091[0-3])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:397[0-3]|477[0-5]|76(?:6\\d|7[0-367]))\\d{4}"]]],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]"]]],0,0,0,0,0,0,[["(?:25[08]|35\\d|45[1-7])\\d{5}"],["[2-4][0-46-9]\\d{6}"],["800\\d{5}"]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664",[["6644(?:1[0-3]|91)\\d{4}"],["664(?:3(?:49|9[1-6])|49[2-6])\\d{4}"],["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}"]]],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]],0,0,0,0,0,0,[["20(?:3[1-4]|6[059])\\d{4}|2(?:0[19]|[1-357]\\d|60)\\d{5}"],["(?:7(?:210|[79]\\d\\d)|9(?:[29]\\d\\d|69[67]|8(?:1[1-3]|89|97)))\\d{4}"],["800(?:02|[3467]\\d)\\d{3}"],["5(?:0(?:0(?:37|43)|(?:6\\d|70|9[0168])\\d)|[12]\\d0[1-5])\\d{3}"],0,0,["501\\d{5}"],["7117\\d{4}"],["3550\\d{4}"]]],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,[["(?:2(?:[0346-8]\\d|1[0-8])|4(?:[013568]\\d|2[0-24-8]|71|90)|54(?:[3-5]\\d|71)|6\\d\\d|8(?:14|3[129]))\\d{4}",[7,8]],["5(?:4(?:2[1-389]|7[1-9])|87[15-8])\\d{4}|(?:5(?:2[5-9]|4[3-689]|[57]\\d|8[0-689]|9[0-8])|7(?:0[0-7]|3[013]))\\d{5}",[8]],["802\\d{7}|80[0-2]\\d{4}",[7,10]],["30\\d{5}",[7]],0,0,0,["219\\d{4}",[7]],["3(?:20|9\\d)\\d{4}",[7]]],"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,[["(?:3(?:0[0-4]|3[0-59])|6(?:[58][024689]|6[024-68]|7[02468]))\\d{4}",[7]],["(?:46[46]|[79]\\d\\d)\\d{4}",[7]],["800\\d{7}",[10]],["900\\d{7}",[10]],0,0,["4(?:0[01]|50)\\d{4}",[7]]],"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",0,0,0,0,0,[["(?:1[2-9]|2[12]\\d\\d)\\d{5}"],["111\\d{6}|(?:31|77|[89][89])\\d{7}",[9]]]],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,[["(?:2(?:0[01]|2\\d|3[1-35-8]|4[13-9]|7[1-689]|8[1-578]|9[467])|3(?:1[1-79]|[2458][1-9]|3\\d|7[1-8]|9[1-5])|4(?:1[1-57-9]|[267][1-9]|3[1-8]|[45]\\d|8[1-35-9]|9[2-689])|5(?:[56]\\d|88|9[1-79])|6(?:1[2-68]|[2-4][1-9]|5[1-36-9]|6[0-57-9]|7[1-7]|8[67]|9[4-8])|7(?:[1346][1-9]|[27]\\d|5[13-9]|8[1-69]|9[17])|8(?:1\\d|2[13-689]|3[1-6]|4[124-6]|6[1246-9]|7[0-378]|9[12479])|9(?:1[346-9]|2[1-4]|3[2-46-8]|5[1348]|[69]\\d|7[12]|8[1-8]))\\d{7}"],["(?:2(?:2\\d|3[1-35-8]|4[13-9]|7[1-689]|8[1-578]|9[467])|3(?:1[1-79]|[2458][1-9]|3\\d|7[1-8]|9[1-5])|4(?:1[1-57-9]|[267][1-9]|3[1-8]|[45]\\d|8[1-35-9]|9[2-689])|5(?:[56]\\d|88|9[1-79])|6(?:1[2-68]|[2-4][1-9]|5[1-36-9]|6[0-57-9]|7[1-7]|8[67]|9[4-8])|7(?:[1346][1-9]|[27]\\d|5[13-9]|8[1-69]|9[17])|8(?:1\\d|2[13-689]|3[1-6]|4[124-6]|6[1246-9]|7[0-378]|9[12479])|9(?:1[346-9]|2[1-4]|3[2-46-8]|5[1348]|[69]\\d|7[12]|8[1-8]))\\d{7}"],["8(?:00|88)\\d{7}"],["900\\d{7}"],["500\\d{7}"],0,0,0,0,["300\\d{7}"]],"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",0,0,0,0,0,[["427[01]\\d{4}|(?:3(?:2[0-36-9]|3[0-368]|4[0-278]|5[0-24-8]|6[0-467]|7[1246-9]|8\\d|9[0-57])\\d|4(?:2[0-689]|[3-79]\\d|8[1-35689])|5(?:2[0-589]|[3468]\\d|5[0-489]|7[1-9]|9[23])|6(?:2[2-9]|3[1357-9]|[46]\\d|5[0-6]|7[0-35-9]|85|9[015-8])|7(?:[2579]\\d|3[03-68]|4[0-8]|6[5-9]|8[0-35-9])|8(?:[24][2-8]|3[2-5]|5[2-7]|6[2-589]|7[2-578]|[89][2-9])|9(?:0[57]|13|[25-7]\\d|[3489][0-8]))\\d{5}",[8,9]],["1(?:1888[689]|4400|8(?:47|8[27])[0-4])\\d{4}|1(?:0(?:[23568]\\d|4[0-6]|7[016-9]|9[0-8])|1(?:[1-5]\\d\\d|6(?:0[5-9]|[1-9]\\d)|7(?:[0-4]\\d|5[0-79]|6[02-4]|8[02-5]))|(?:[269]\\d|[37][1-9]|4[235-9])\\d|5(?:31|9\\d\\d)|8(?:1[23]|[236]\\d|4[06]|5(?:46|[7-9])|7[016-9]|8[01]|9[0-8]))\\d{5}",[9,10]],["1[378]00\\d{6}",[10]],["1600\\d{6}",[10]],0,0,0,0,["15(?:4(?:6[0-4]\\d|8(?:0[125]|[17]\\d|21|3[01]|4[01589]|5[014]|6[02]))|6(?:32[0-6]|78\\d))\\d{4}",[10]]]],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"]]],0,0,0,0,0,0,[["2(?:[1346]\\d|5[0-2]|[78][12]|93)\\d{5}",[8]],["8[2-79]\\d{7}",[9]],["800\\d{6}",[9]]]],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",0,0,0,0,0,[["64426\\d{3}|6(?:1(?:2[2-7]|3[01378]|4[0-4])|254|32[0237]|4(?:27|41|5[25])|52[236-8]|626|7(?:2[2-4]|30))\\d{4,5}|6(?:1(?:(?:0\\d|2[0189]|3[24-69]|4[5-9])\\d|17|69|7[014])|2(?:17|5[0-36-8]|69|70)|3(?:17|2[14-689]|34|6[289]|7[01]|81)|4(?:17|2[0-2]|4[06]|5[0137]|69|7[01])|5(?:17|2[0459]|69|7[01])|6(?:17|25|38|42|69|7[01])|7(?:17|2[569]|3[13]|6[89]|7[01]))\\d{4}"],["(?:60|8[1245])\\d{7}",[9]],["80\\d{7}",[9]],["8701\\d{5}",[9]],0,0,0,0,["8(?:3\\d\\d|86)\\d{5}"]]],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]],0,0,0,0,0,0,[["(?:2[03-9]|3[0-5]|4[1-7]|88)\\d{4}"],["(?:[579]\\d|8[0-79])\\d{4}"],["050\\d{3}"],["36\\d{4}"]]],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]"]]],0,0,0,0,0,0,[["2(?:0(?:20|3[1-8]|4[13-5]|5[14]|6[14578]|7[1-578])|1(?:4[145]|5[14]|6[14-68]|7[169]|88))\\d{4}"],["(?:23|7[0467]|[89]\\d)\\d{6}"],["08\\d{6}"],["09\\d{6}"]]],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",0,0,[["(?:1(?:06|17|28|39)|3[0-2]\\d)\\d{3}"],["(?:14|3[58])\\d{4}"]]],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",0,0,0,0,0,[["20(?:[1259]\\d|3[013-9]|4[1-8]|6[024-689]|7[1-79]|8[2-9])\\d{6}",[10]],["(?:702[0-24-9]|819[01])\\d{6}|(?:7(?:0[13-9]|[12]\\d)|8(?:0[1-9]|1[0-8])|9(?:0[1-9]|1[1-6]))\\d{7}",[10]],["800\\d{7,11}"],0,0,0,["700\\d{7,11}"]]],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]],0,0,0,0,0,0,[["2\\d{7}"],["(?:5(?:5[0-7]|[78]\\d)|6(?:20|3[035]|4[045]|5[05]|77|8[1-9]|9[059])|(?:7[5-8]|8\\d)\\d)\\d{5}"],["1800\\d{4}"]]],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",0,0,0,0,0,[["(?:1(?:[035]\\d|1[13-578]|6[124-8]|7[24]|8[0-467])|2(?:[0346]\\d|2[2-46-9]|5[125]|9[479])|3(?:[03568]\\d|1[3-8]|2[01]|4[1-8])|4(?:[0356]\\d|1[1-368]|7[58]|8[15-8]|9[23579])|5(?:[0358]\\d|[19][1-9]|2[1-57-9]|4[13-8]|6[126]|7[0-3578])|7\\d\\d)\\d{6}",[9]],["(?:6[1-58]|970\\d)\\d{7}",[9,11]],["800\\d{4,7}",[7,8,9,10]],["90[069]\\d{4,7}",[7,8,9,10]],0,0,["140(?:1[035]|2[0346]|3[03568]|4[0356]|5[0358]|8[458])|(?:140(?:1[16-8]|2[259]|3[124]|4[17-9]|5[124679]|7)|8[478]\\d{6})\\d",[5,6,9]],["66\\d{7}",[9]],["(?:85|91)\\d{7}",[9]]]],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]",[["(?:2[1-4]|3[1-3578]|5[1-35-7]|6[1-4679]|7[0-8])\\d{6}",[8]],["(?:4[015-8]|9\\d)\\d{6}",[8]],["80[01]\\d{5}",[8]],["82[09]\\d{5}",[8]],["880\\d{5}",[8]],["81[23]\\d{5}",[8]],["(?:0[235-9]|81(?:0(?:0[7-9]|1\\d)|5\\d\\d))\\d{3}"],0,["85[0-5]\\d{5}",[8]],["810(?:0[0-6]|[2-8]\\d)\\d{3}",[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",0,0,0,0,0,[["(?:1[0-6]\\d|99[02-6])\\d{5}|(?:2[13-79]|3[135-8]|4[146-9]|5[135-7]|6[13-9]|7[15-9]|8[1-46-9]|9[1-7])[2-6]\\d{5}",[8]],["9(?:00|6[0-3]|7[0-24-6]|8[0-24-68])\\d{7}",[10]],["1(?:66001|800\\d\\d)\\d{5}",[11]]]],NR:["674","00","(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[24-9]"]]],0,0,0,0,0,0,[["444\\d{4}"],["(?:222|55[3-9]|666|777|8\\d\\d|999)\\d{4}"]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]],0,0,0,0,0,0,[["[47]\\d{3}",[4]],["(?:[56]|888[1-9])\\d{3}"]]],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,[["240\\d{5}|(?:3[2-79]|[49][2-9]|6[235-9]|7[2-57-9])\\d{6}",[8]],["2(?:[0-27-9]\\d|6)\\d{6,7}|2(?:1\\d|75)\\d{5}",[8,9,10]],["508\\d{6,7}|80\\d{6,8}",[8,9,10]],["(?:1[13-57-9]\\d{5}|50(?:0[08]|30|66|77|88))\\d{3}|90\\d{6,8}",[7,8,9,10]],["70\\d{7}",[9]],0,["8(?:1[16-9]|22|3\\d|4[045]|5[459]|6[235-9]|7[0-3579]|90)\\d{2,7}"]],"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]"]]],0,0,0,0,0,0,[["2[1-6]\\d{6}",[8]],["(?:1505|90[1-9]\\d)\\d{4}|(?:7[124-9]|9[1-9])\\d{6}",[8]],["8007\\d{4,5}|(?:500|800[05])\\d{4}"],["900\\d{5}",[8]]]],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"]]],0,0,0,0,0,0,[["(?:1(?:0\\d|1[0479]|2[37]|3[0137]|4[147]|5[05]|6[058]|7[0167]|8[2358]|9[1389])|2(?:[0235-79]\\d|1[0-7]|4[013-9]|8[02-9])|3(?:[0147-9]\\d|[25][0-5]|33|6[068])|4(?:00|3[0-579]|4\\d|7[0-57-9])|5(?:[01]\\d|2[0-7]|[56]0|79)|7(?:0[09]|2[0-26-8]|3[03]|4[04]|5[05-9]|6[0156]|7[0-24-9]|8[4-9]|90)|8(?:09|2[89]|3\\d|4[0-24-689]|5[014]|8[02])|9(?:0[5-9]|1[0135-8]|2[036-9]|3[35-79]|40|5[0457-9]|6[05-9]|7[04-9]|8[35-8]|9\\d))\\d{4}",[7]],["(?:1[16]1|21[89]|6\\d{3}|8(?:1[01]|7[23]))\\d{4}",[7,8]],["800\\d{4,5}|(?:00800|800\\d)\\d{6}"],["(?:8(?:22|55|60|7[78]|86)|9(?:00|81))\\d{4}",[7]]]],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,[["(?:(?:(?:4[34]|5[14])[0-8]|687)\\d|7(?:173|(?:3[0-8]|55)\\d)|8(?:10[05689]|6(?:0[06-9]|1[6-9]|29)|7(?:0[0569]|[56]0)))\\d{4}|(?:1[0-8]|4[12]|5[236]|6[1-7]|7[246]|8[2-4])\\d{6}",[8]],["9\\d{8}",[9]],["800\\d{5}",[8]],["805\\d{5}",[8]],["80[24]\\d{5}",[8]],0,0,0,0,["801\\d{5}",[8]]],"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"]]],0,0,0,0,0,0,[["4(?:0[4-689]|9[4-68])\\d{5}",[8]],["8[7-9]\\d{6}",[8]],["80[0-5]\\d{6}",[9]],0,0,0,["44\\d{4}",[6]],0,["499\\d{5}",[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,[["(?:(?:3[0-2]|4[257]|5[34]|9[78])\\d|64[1-9]|85[02-46-9])\\d{4}",[7]],["(?:7\\d|8[1-48])\\d{6}",[8]],["180\\d{4}",[7]],0,0,0,0,["27[01]\\d{4}",[7]],["2(?:0[0-57]|7[568])\\d{4}",[7]]],"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",0,0,0,0,0,[["(?:(?:2[3-8]|3[2-68]|4[2-9]|5[2-6]|6[2-58]|7[24578])\\d{3}|88(?:22\\d\\d|42))\\d{4}|(?:2|8[2-8]\\d\\d)\\d{5}",[6,8,9,10]],["(?:8(?:1[37]|9[5-8])|9(?:0[5-9]|1[0-24-9]|[235-7]\\d|4[2-9]|8[135-9]|9[1-9]))\\d{7}",[10]],["1800\\d{7,9}",[11,12,13]]]],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",0,0,0,0,0,[["(?:(?:21|42)[2-9]|58[126])\\d{7}|(?:2[25]|4[0146-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]\\d{6,7}|(?: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]))[2-9]\\d{5,6}",[9,10]],["3(?:[0-247]\\d|3[0-79]|55|64)\\d{7}",[10]],["800\\d{5}(?:\\d{3})?",[8,11]],["900\\d{5}",[8]],["122\\d{6}",[9]],0,["(?:2(?:[125]|3[2358]|4[2-4]|9[2-8])|4(?:[0-246-9]|5[3479])|5(?:[1-35-7]|4[2-467])|6(?:0[468]|[1-8])|7(?:[14]|2[236])|8(?:[16]|2[2-689]|3[23578]|4[3478]|5[2356])|9(?:1|22|3[27-9]|4[2-6]|6[3569]|9[2-7]))111\\d{6}",[11,12]]]],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"]]],0,0,0,0,0,0,[["(?:30|47\\d\\d)\\d{5}|(?: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])(?:[02-9]\\d{6}|1(?:[0-8]\\d{5}|9\\d{3}(?:\\d{2})?))",[7,9]],["21(?:1[013-5]|2\\d|3[1-9])\\d{5}|(?:45|5[0137]|6[069]|7[2389]|88)\\d{7}",[9]],["800\\d{6,7}",[9,10]],["70[01346-8]\\d{6}",[9]],0,0,["804\\d{6}",[9]],["64\\d{4,7}",[6,7,8,9]],["39\\d{7}",[9]],["801\\d{6}",[9]]]],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",0,0,0,0,0,[["80[6-9]\\d{6}|(?:[236-9]\\d|4[1-35-9]|5[0-47-9])\\d{4}"],["708(?:4[0-5]|5[0-6])\\d{4}|(?:[236-9]\\d|4[02-489]|5[02-9])\\d{4}"],["80[0-5]\\d{6}",[9]],["8[129]\\d{7}",[9]]]],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939",[["(?:787|939)[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}"]]],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",0,0,0,0,0,[["(?:22[2-47-9]|42[45]|82[014-68]|92[3569])\\d{5}",[8]],["5[69]\\d{7}",[9]],["1800\\d{6}",[10]],0,0,0,0,0,0,["1700\\d{6}",[10]]]],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]"]]],0,0,0,0,0,0,[["2(?:[12]\\d|3[1-689]|4[1-59]|[57][1-9]|6[1-35689]|8[1-69]|9[1256])\\d{6}"],["6(?:[06]92(?:30|9\\d)|[35]92(?:[049]\\d|3[034]))\\d{3}|(?:(?:16|6[0356])93|9(?:[1-36]\\d\\d|480))\\d{5}"],["80[02]\\d{6}"],["(?:6(?:0[178]|4[68])\\d|76(?:0[1-57]|1[2-47]|2[237]))\\d{5}"],["884[0-4689]\\d{5}"],["600\\d{6}|6[06]92(?:0\\d|3[349]|49)\\d{3}"],["70(?:38[01]|596|(?:7\\d|8[17])\\d)\\d{4}"],["6(?:222\\d|89(?:00|88|99))\\d{4}"],["30\\d{7}"],["80(?:8\\d|9[1579])\\d{5}"]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]],0,0,0,0,0,0,[["(?:2(?:55|77)|345|488|5(?:35|44|87)|6(?:22|54|79)|7(?:33|47)|8(?:24|55|76)|900)\\d{4}"],["(?:(?:46|83)[0-5]|(?:6[2-4689]|78)0)\\d{4}|(?:45|77|88)\\d{5}"]]],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",0,0,0,0,0,[["(?:3[289]|4[246-8]|61|7[1-3]|8[1-36])\\d{5,7}|(?:2(?:[14-68]\\d|2[4-68]|7[15]|9[1-5])|3(?:18|3[167]|4[2357]|51|[67]\\d)|4(?:1\\d|3[12]|5[13]|9[1-47])|5(?:[1-4]\\d|5[02-4])|6(?:3[1-3]|44|7[1-8])|7(?:4[0-4]|5\\d|6[1-578]|75|8[0-8])|858)\\d{5,6}",[7,8,9]],["9(?:51|6[129]|7[1-6]|8[1-7]|9[1-5])\\d{6}",[9]],["9800\\d{5,7}",[9,10,11]],0,0,0,["[245]0\\d{6,7}|[36-9]0\\d{4,7}",[6,7,8,9]],0,["8700[0-4]\\d{4}",[9]]]],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]"]]],0,0,0,0,0,0,[["4(?:(?:[014]\\d\\d|999)\\d|2022)\\d{3}",[8]],["[35-7]\\d{7}",[8]],["800\\d{4}|(?:0080[01]|800)\\d{6}",[7,9,11]],0,0,0,0,["2[136]\\d{5}",[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,[["[23][13-6]\\d{7}|(?:2(?:19\\d|[3-6]\\d9)|31\\d\\d)\\d\\d"],["(?:630|702)0\\d{5}|(?:6(?:00|2\\d)|7(?:0[013-9]|1[0-3]|[2-7]\\d|8[03-8]|9[0-39]))\\d{6}",[9]],["800\\d{6}",[9]],["90[0136]\\d{6}",[9]],0,0,["(?:37\\d|80[578])\\d{6}",[9]],0,0,["801\\d{6}",[9]]],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",0,0,0,0,0,[["(?:11[1-9]\\d|(?:2[389]|39)(?:0[2-9]|[2-9]\\d))\\d{3,8}|(?:1[02-9]|2[0-24-7]|3[0-8])[2-9]\\d{4,9}",[7,8,9,10,11,12]],["6(?:[0-689]|7\\d)\\d{6,7}",[8,9,10]],["800\\d{3,9}"],["(?:78\\d|90[0169])\\d{3,7}",[6,7,8,9,10]],0,0,["7[06]\\d{4,10}"]]],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]",[["(?:3(?:0[12]|36|4[1-35-79]|5[1-3]|65|8[1-58]|9[0145])|4(?:01|1[1356]|2[13467]|7[1-5]|8[1-7]|9[1-689])|8(?:1[1-8]|2[01]|3[13-6]|4[0-8]|5[15-7]|6[0-35-79]|7[1-37-9]))\\d{7}",[10]],["9\\d{9}",[10]],["8(?:0[04]|108\\d{3})\\d{7}"],["80[39]\\d{7}",[10]],["808\\d{7}",[10]]],"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0",0,0,0,0,0,[["(?:06|2[23568]\\d)\\d{6}"],["7[237-9]\\d{7}",[9]],["800\\d{6}",[9]],["900\\d{6}",[9]]]],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",0,0,0,0,0,[["1(?:1\\d|2[24-8]|3[35-8]|4[3-68]|6[2-5]|7[235-7])\\d{6}",[9]],["579[0-8]\\d{5}|5(?:[013-689]\\d|7[0-8])\\d{6}",[9]],["800\\d{7}",[10]],["925\\d{6}",[9]],0,0,0,0,0,["920\\d{6}",[9]]]],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])"]]],0,0,0,0,0,0,[["(?:1[4-79]|[23]\\d|4[0-2]|5[03]|6[0-37])\\d{3}",[5]],["48\\d{3}|(?:(?:6[89]|7[1-9]|8[4-9])\\d|9(?:1[2-9]|2[013-9]|3[0-2]|[46]\\d|5[0-46-9]|7[0-689]|8[0-79]|9[0-8]))\\d{4}"],["1[38]\\d{3}",[5]],0,0,0,0,0,["5[12]\\d{3}",[5]]]],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,[["4[2-46]\\d{5}"],["2[125-8]\\d{5}"],["800[08]\\d{3}"],["85\\d{5}"],0,0,0,0,["971\\d{4}|(?:64|95)\\d{5}"]],"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0",0,0,0,0,0,[["1(?:5\\d|8[35-7])\\d{6}"],["(?:1[0-2]|9[0-3569])\\d{7}"]]],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",0,0,0,0,0,[["(?:(?:[12][136]|3[356]|4[0246]|6[03]|8\\d)\\d|90[1-9])\\d{4,6}|(?:1(?:2[0-35]|4[0-4]|5[0-25-9]|7[13-6]|[89]\\d)|2(?:2[0-7]|4[0136-8]|5[0138]|7[018]|8[01]|9[0-57])|3(?:0[0-4]|1\\d|2[0-25]|4[056]|7[0-2]|8[0-3]|9[023])|4(?:1[013-8]|3[0135]|5[14-79]|7[0-246-9]|8[0156]|9[0-689])|5(?:0[0-6]|[15][0-5]|2[0-68]|3[0-4]|4\\d|6[03-5]|7[013]|8[0-79]|9[01])|6(?:1[1-3]|2[0-4]|4[02-57]|5[0-37]|6[0-3]|7[0-2]|8[0247]|9[0-356])|9(?:1[0-68]|2\\d|3[02-5]|4[0-3]|5[0-4]|[68][01]|7[0135-8]))\\d{5,6}",[7,8,9]],["7[02369]\\d{7}",[9]],["20\\d{4,7}",[6,7,8,9]],["649\\d{6}|99[1-59]\\d{4}(?:\\d{3})?|9(?:00|39|44)[1-8]\\d{3,6}",[7,8,9,10]],["75[1-8]\\d{6}",[9]],["(?:25[245]|67[3-68])\\d{9}",[12]],["10[1-8]\\d{6}",[9]],["74[02-9]\\d{6}",[9]],0,["77[0-7]\\d{6}",[9]]]],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"]]],0,0,0,0,0,0,[["662[0-24-9]\\d{4}|6(?:[0-578]\\d|6[013-57-9]|9[0-35-9])\\d{5}",[8]],["89(?:8[02-9]|9[0-6])\\d{4}|(?:8(?:0[1-9]|[1-8]\\d|9[0-7])|9[0-8]\\d)\\d{5}",[8]],["(?:18|8)00\\d{7}",[10,11]],["1900\\d{7}",[11]],0,0,["7000\\d{7}",[11]],0,["(?:3[12]\\d|666)\\d{5}",[8]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]",[["2(?:[0-57-9]\\d|6[4-9])\\d\\d"],["[56]\\d{4}",[5]],0,0,0,0,0,0,["262\\d\\d",[5]]]],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,[["(?:[1-357][2-8]|4[24-8])\\d{6}",[8]],["65(?:[178]\\d|5[56]|6[01])\\d{4}|(?:[37][01]|4[0139]|51|6[489])\\d{6}",[8]],["80\\d{4,6}",[6,7,8]],["89[1-3]\\d{2,5}|90\\d{4,6}"],0,0,0,0,["(?:59\\d\\d|8(?:1(?:[67]\\d|8[0-589])|2(?:0\\d|2[0-37-9]|8[0-2489])|3[389]\\d))\\d{4}",[8]]],"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79",[["79\\d{6}",[8]],["(?:4[015-8]|9\\d)\\d{6}",[8]],["80[01]\\d{5}",[8]],["82[09]\\d{5}",[8]],["880\\d{5}",[8]],["81[23]\\d{5}",[8]],["(?:0[235-9]|81(?:0(?:0[7-9]|1\\d)|5\\d\\d))\\d{3}"],0,["85[0-5]\\d{5}",[8]],["810(?:0[0-6]|[2-8]\\d)\\d{3}",[8]]]],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",0,0,0,0,0,[["(?:2(?:16|[2-9]\\d{3})|(?:(?:[3-5][1-8]\\d|819)\\d|601[1-5])\\d)\\d{4}|(?:2|[3-5][1-8])1[67]\\d{3}|[3-5][1-8]16\\d\\d"],["909[1-9]\\d{5}|9(?:0[1-8]|1[0-24-9]|4[03-57-9]|5\\d)\\d{6}",[9]],["800\\d{6}",[9]],["9(?:00|[78]\\d)\\d{6}",[9]],0,0,["96\\d{7}",[9]],["9090\\d{3}",[7]],["6(?:02|5[0-4]|9[0-6])\\d{6}",[9]],["8[5-9]\\d{7}",[9]]]],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0",0,0,0,0,0,[["22[2-4][2-9]\\d{4}"],["(?:25|3[0-5]|66|7\\d|8[08]|9[09])\\d{6}"]]],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",0,0,[["0549(?:8[0157-9]|9\\d)\\d{4}",[10]],["6[16]\\d{6}",[8]],0,["7[178]\\d{6}",[8]],0,0,0,0,["5[158]\\d{6}",[8]]]],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]"]]],0,0,0,0,0,0,[["3(?:0(?:1[0-2]|80)|282|3(?:8[1-9]|9[3-9])|611)\\d{5}"],["7(?:[015-8]\\d|21|90)\\d{6}"],["800\\d{6}"],["88[4689]\\d{6}"],0,0,0,0,["(?:3(?:392|9[01]\\d)\\d|93(?:3[13]0|929))\\d{4}"],["81[02468]\\d{6}"]]],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",0,0,0,0,0,[["(?:1\\d|2[0-79]|3[0-46-8]|4[0-7]|5[57-9])\\d{5}|(?:[134]\\d|8[125])\\d{4}",[6,7]],["(?:(?:15|(?:3[59]|4[89]|6\\d|7[679]|8[08])\\d|9(?:0\\d|[2-9]))\\d|2(?:4\\d|8))\\d{5}|(?:[67]\\d\\d|904)\\d{5}",[7,8,9]]]],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]"]]],0,0,0,0,0,0,[["(?:2[1-3]|3[0-7]|4\\d|5[2-58])\\d{4}",[6]],["(?:6[08]|7[124-7]|8[1-9])\\d{5}",[7]],["80\\d{5}",[7]],["90\\d{5}",[7]],0,0,0,0,["56\\d{4}",[6]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0",0,0,0,0,0,[["1[89]\\d{7}"],["(?:12|9[1257-9])\\d{7}"]]],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]],0,0,0,0,0,0,[["22\\d{5}"],["900[5-9]\\d{3}|9(?:0[1-9]|[89]\\d)\\d{4}"]]],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]"]]],0,0,0,0,0,0,[["2(?:79(?:0[0347-9]|[1-9]\\d)|89(?:0[024589]|[1-9]\\d))\\d{3}|2(?:[1-69]\\d|[78][0-8])\\d{5}",[8]],["[5-7]\\d{7}",[8]],["800\\d{8}|80[01]\\d{4}",[7,11]],["900\\d{4}(?:\\d{4})?",[7,11]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721",[["7215(?:4[2-8]|8[39]|9[056])\\d{4}"],["7215(?:1[02]|2\\d|5[034679]|8[0-24-8])\\d{4}"],["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}"]]],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",0,0,0,0,0,[["21\\d{6,7}|(?:1(?:[14]\\d|[2356])|2[235]|3(?:[13]\\d|4)|4[134]|5[1-3])\\d{6}"],["(?:50|9[1-9])\\d{7}",[9]]]],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"]]],0,0,0,0,0,0,[["[23][2-5]\\d{6}",[8]],["7[5-9]\\d{6}",[8]],["0800\\d{4}",[8]],["900\\d{6}",[9]],0,0,0,0,["70\\d{6}",[8]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8",[["8\\d{3}"]]],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649",[["649(?:266|712|9(?:4\\d|50))\\d{4}"],["649(?:2(?:3[129]|4[1-79])|3\\d\\d|4[34][1-3])\\d{4}"],["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}"],0,0,0,["649(?:71[01]|966)\\d{4}"]]],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,[["22(?:[37-9]0|5[0-5]|6[89])\\d{4}"],["(?:3[01]|[69]\\d|77|8[5-7])\\d{6}"]],"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]],0,0,0,0,0,0,[["2(?:2[2-7]|3[23]|4[45]|55|6[67]|77)\\d{5}"],["(?:7[0-289]|9[0-36-9])\\d{6}"]]],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",0,0,0,0,0,[["(?:1[0689]|2\\d|3[2-9]|4[2-5]|5[2-6]|7[3-7])\\d{6}",[8]],["67(?:1[0-8]|2[4-7])\\d{5}|(?:14|6[1-6]|[89]\\d)\\d{7}",[9]],["(?:001800\\d|1800)\\d{6}",[10,13]],["1900\\d{6}",[10]],0,0,0,0,["6[08]\\d{7}",[9]]]],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,[["(?:3(?:1[3-5]|2[245]|3[12]|4[24-7]|5[25]|72)|4(?:46|74|87))\\d{6}"],["(?:33[03-9]|4(?:1[18]|4[02-479])|81[1-9])\\d{6}|(?:[09]\\d|1[0-27-9]|2[0-27]|3[08]|40|5[05]|66|7[0157-9]|8[07-9])\\d{7}"]],"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7],0,0,0,0,0,0,0,[["(?:2[2-4]|[34]\\d)\\d{2,5}"],["7[2-4]\\d{2,5}"]]],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"]]],0,0,0,0,0,0,[["(?:2[1-5]|3[1-9]|4[1-4])\\d{5}",[7]],["7[2-8]\\d{6}",[8]],["80\\d{5}",[7]],["90\\d{5}",[7]],["70\\d{5}",[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,[["(?:1(?:2\\d|3[1-9])|2(?:22|4[0-35-8])|3(?:22|4[03-9])|4(?:22|3[128]|4\\d|6[15])|5(?:22|5[7-9]|6[014-689]))\\d{5}"],["(?:6\\d|71)\\d{6}"]],"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]],0,0,0,0,0,0,[["81200\\d{3}|(?:3[0-2]|7\\d)\\d{6}"],["3(?:001|[12]40)\\d{4}|(?:(?:[259]\\d|4[0-8])\\d|3(?:1[1-35]|6[0-4]|91))\\d{5}"],["8010\\d{4}"],["88\\d{6}"],0,0,0,0,0,["8[12]10\\d{4}"]]],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]"]]],0,0,0,0,0,0,[["(?:2\\d|3[0-8]|4[0-4]|50|6[09]|7[0-24-69]|8[05])\\d{3}",[5]],["(?:5(?:4[0-5]|5[4-6])|6(?:[09]\\d|3[02]|8[15-9])|(?:7\\d|8[46-9])\\d|999)\\d{4}",[7]],["0800\\d{3}",[7]],0,0,0,0,0,["55[0-37-9]\\d{4}",[7]]]],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",0,0,0,0,0,[["(?:2(?:[13][26]|[28][2468]|[45][268]|[67][246])|3(?:[13][28]|[24-6][2468]|[78][02468]|92)|4(?:[16][246]|[23578][2468]|4[26]))\\d{7}",[10]],["561(?:011|61\\d)\\d{4}|5(?:0[15-7]|1[06]|[27]4|[34]\\d|5[1-59]|9[46])\\d{7}",[10]],["8(?:00\\d{7}(?:\\d{2,3})?|11\\d{7})",[10,12,13]],["(?:8[89]8|900)\\d{7}",[10]],["592(?:21[12]|461)\\d{4}",[10]],0,["444\\d{4}",[7]],["512\\d{7}",[10]],["850\\d{7}",[10]]]],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868",[["868(?:2(?:01|1[5-9]|[23]\\d|4[0-2])|6(?:0[7-9]|1[02-8]|2[1-9]|[3-69]\\d|7[0-79])|82[124])\\d{4}"],["868(?:(?:2[5-9]|3\\d)\\d|4(?:3[0-6]|[6-9]\\d)|6(?:20|78|8\\d)|7(?:0[1-9]|1[02-9]|[2-9]\\d))\\d{4}"],["868800\\d{4}|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}"],["868619\\d{4}"]]],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"]]],0,0,0,0,0,0,[["2[02-9]\\d{3}",[5]],["(?:7[01]\\d|90)\\d{4}",[6,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,[["(?:2[2-8]\\d|370|55[01]|7[1-9])\\d{6}|4(?:(?:0(?:0[1-9]|[2-48]\\d)|1[023]\\d)\\d{4,5}|(?:[239]\\d\\d|4(?:0[56]|12|49))\\d{5})|6(?:[01]\\d{7}|4(?:0[56]|12|24|4[09])\\d{4,5})|8(?:(?:2(?:3\\d|4[0-269]|[578]0|66)|36[24-9]|90\\d\\d)\\d{4}|4(?:0[56]|12|24|4[09])\\d{4,5})|(?:2(?:2(?:0\\d\\d|4(?:0[68]|[249]0|3[0-467]|5[0-25-9]|6[0235689]))|(?:3(?:[09]\\d|1[0-4])|(?:4\\d|5[0-49]|6[0-29]|7[0-5])\\d)\\d)|(?:(?:3[2-9]|5[2-8]|6[0-35-79]|8[7-9])\\d\\d|4(?:2(?:[089]\\d|7[1-9])|(?:3[0-4]|[78]\\d|9[01])\\d))\\d)\\d{3}",[8,9]],["(?:40001[0-2]|9[0-8]\\d{4})\\d{3}",[9]],["80[0-79]\\d{6}|800\\d{5}",[8,9]],["20(?:[013-9]\\d\\d|2)\\d{4}",[7,9]],["99\\d{7}",[9]],0,["50[0-46-9]\\d{6}",[9]],0,["7010(?:[0-2679]\\d|3[0-7]|8[0-5])\\d{5}|70\\d{8}",[10,11]]],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",0,0,0,0,0,[["2[2-8]\\d{7}"],["(?:6[1-35-9]|7[013-9])\\d{7}"],["80[08]\\d{6}"],["90\\d{7}"],0,0,0,0,["41\\d{7}"],["8(?:40|6[01])\\d{6}"]]],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,[["(?:3[1-8]|4[13-8]|5[1-7]|6[12459])\\d{7}",[9]],["790\\d{6}|(?:39|50|6[36-8]|7[1-357]|9[1-9])\\d{7}",[9]],["800[1-8]\\d{5,6}"],["900[239]\\d{5,6}"],0,0,0,0,["89[1-579]\\d{6}",[9]]],"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",0,0,0,0,0,[["20(?:(?:240|30[67])\\d|6(?:00[0-2]|30[0-4]))\\d{3}|(?:20(?:[017]\\d|2[5-9]|3[1-4]|5[0-4]|6[15-9])|[34]\\d{3})\\d{5}"],["72[48]0\\d{5}|7(?:[014-8]\\d|2[0167]|3[06]|9[0-3589])\\d{6}"],["800[1-3]\\d{5}"],["90[1-3]\\d{6}"]]],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,[["(?:1(?:770|9(?:20|[89]7))|(?:2\\d|4[2-7])\\d\\d)\\d{4}",[8]],["9[1-9]\\d{6}",[8]],["0004\\d{2,9}|(?:405|80[05])\\d{4}",[6,7,8,9,10,11,12,13]],["90[0-8]\\d{4}",[7]],0,0,["21\\d{2,3}",[4,5]]],"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]"]]],0,0,0,0,0,0,[["(?:55\\d\\d|6(?:1(?:22|3[124]|4[1-4]|5[1-3578]|64)|2(?:22|3[0-57-9]|41)|5(?:22|3[3-7]|5[024-8])|[69]\\d\\d|7(?:[23]\\d|7[69]))|7(?:0(?:5[4-9]|6[0146]|7[124-6]|9[135-8])|[168]\\d\\d|2(?:22|3[13-57-9]|4[1-3579]|5[14])|3(?:2\\d|3[1578]|4[1-35-7]|5[1-57]|61)|4(?:2\\d|3[1-579]|7[1-79])|5(?:22|5[1-9]|6[1457])|9(?:22|5[1-9])))\\d{5}"],["(?:(?:[25]0|33|8[078]|9[0-57-9])\\d{3}|6(?:1(?:2(?:2[01]|98)|35[0-4]|50\\d|61[23]|7(?:[01][017]|4\\d|55|9[5-9]))|2(?:(?:11|7\\d)\\d|2(?:[12]1|9[01379])|5(?:[126]\\d|3[0-4]))|5(?:19[01]|2(?:27|9[26])|(?:30|59|7\\d)\\d)|6(?:2(?:1[5-9]|2[0367]|38|41|52|60)|(?:3[79]|9[0-3])\\d|4(?:56|83)|7(?:[07]\\d|1[017]|3[07]|4[047]|5[057]|67|8[0178]|9[79]))|7(?:2(?:24|3[237]|4[5-9]|7[15-8])|5(?:7[12]|8[0589])|7(?:0\\d|[39][07])|9(?:0\\d|7[079])))|7(?:[07]\\d{3}|2(?:2(?:2[79]|95)|3(?:2[5-9]|6[0-6])|57\\d|7(?:0\\d|1[17]|2[27]|3[37]|44|5[057]|66|88))|3(?:2(?:1[0-6]|21|3[469]|7[159])|(?:33|9[4-6])\\d|5(?:0[0-4]|5[579]|9\\d)|7(?:[0-3579]\\d|4[0467]|6[67]|8[078]))|4(?:2(?:29|5[0257]|6[0-7]|7[1-57])|5(?:1[0-4]|8\\d|9[5-9])|7(?:0\\d|1[024589]|2[0-27]|3[0137]|[46][07]|5[01]|7[5-9]|9[079])|9(?:7[015-9]|[89]\\d))|5(?:112|2(?:0\\d|2[29]|[49]4)|3[1568]\\d|52[6-9]|7(?:0[01578]|1[017]|[23]7|4[047]|[5-7]\\d|8[78]|9[079]))|9(?:22[128]|3(?:2[0-4]|7\\d)|57[02569]|7(?:2[05-9]|3[37]|4\\d|60|7[2579]|87|9[07]))))\\d{4}"]]],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",[["06698\\d{1,6}",[6,7,8,9,10,11]],["3[1-9]\\d{8}|3[2-9]\\d{7}",[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]]]],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784",[["784(?:266|3(?:6[6-9]|7\\d|8[0-6])|4(?:38|5[0-36-8]|8[0-8])|5(?:55|7[0-2]|93)|638|784)\\d{4}"],["784(?:4(?:3[0-5]|5[45]|89|9[0-8])|5(?:2[6-9]|3[0-4])|720)\\d{4}"],["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}"],0,0,0,["78451[0-2]\\d{4}"]]],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",0,0,0,0,0,[["(?:2(?:12|3[457-9]|[467]\\d|[58][1-9]|9[1-6])|[4-6]00)\\d{7}"],["4(?:1[24-8]|2[246])\\d{7}"],["800\\d{7}"],["90[01]\\d{7}"],0,0,["501\\d{7}"]]],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284",[["284(?:229|4(?:22|9[45])|774|8(?:52|6[459]))\\d{4}"],["284(?:245|3(?:0[0-3]|4[0-7]|68|9[34])|4(?:4[0-6]|68|9[69])|5(?:4[0-7]|68|9[69]))\\d{4}"],["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}"]]],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340",[["340(?:2(?:0\\d|10|2[06-8]|4[49]|77)|3(?:32|44)|4(?:2[23]|44|7[34]|89)|5(?:1[34]|55)|6(?:2[56]|4[23]|77|9[023])|7(?:1[2-57-9]|2[57]|7\\d)|884|998)\\d{4}"],[""],["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}"]]],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",0,0,0,0,0,[["2(?:0[3-9]|1[0-689]|2[0-25-9]|[38][2-9]|4[2-8]|5[124-9]|6[0-39]|7[0-7]|9[0-4679])\\d{7}",[10]],["(?:5(?:2[238]|59)|89[6-9]|99[013-9])\\d{6}|(?:3\\d|5[1689]|7[06-9]|8[1-8]|9[0-8])\\d{7}",[9]],["1800\\d{4,6}|12(?:0[13]|28)\\d{4}",[8,9,10]],["1900\\d{4,6}",[8,9,10]],0,0,["(?:[17]99|80\\d)\\d{4}|69\\d{5,6}",[7,8]],0,["672\\d{6}",[9]]]],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]],0,0,0,0,0,0,[["(?:38[0-8]|48[4-9])\\d\\d|(?:2[02-9]|3[4-7]|88)\\d{3}",[5]],["(?:[58]\\d|7[0-7])\\d{5}",[7]],["81[18]\\d\\d",[5]],0,0,0,["(?:3[03]|900\\d)\\d{3}"],0,["9(?:0[1-9]|1[01])\\d{4}",[7]]]],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"]]],0,0,0,0,0,0,[["72\\d{4}",[6]],["(?:72|8[23])\\d{4}",[6]],["80[0-5]\\d{6}",[9]],0,0,["[48]0\\d{4}",[6]],0,0,["9[23]\\d{4}",[6]]]],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"]]],0,0,0,0,0,0,[["6[1-9]\\d{3}|(?:[2-5]|60)\\d{4}",[5,6]],["(?:7[1-35-8]|8(?:[3-7]|9\\d{3}))\\d{5}",[7,10]],["800\\d{3}",[6]]]],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",0,0,0,0,0,[["38\\d{6,10}|(?:2[89]|39)(?:0\\d{5,6}|[1-9]\\d{5})"],["4[3-9]\\d{6}",[8]],["800\\d{5}",[8]],["900\\d{5}",[8]]]],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",0,0,0,0,0,[["78[0-7]\\d{4}|17\\d{6}|(?:[12][2-68]|3[2358]|4[2-58]|5[2-6]|6[3-58]|7[24-6])\\d{5}",[7,8]],["7[01378]\\d{7}",[9]]]],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",0,0,0,0,0,[["(?:2(?:0330|4302)|52087)0\\d{3}|(?:1[0-8]|2[1-378]|3[1-69]|4\\d|5[1346-8])\\d{7}",[9]],["(?:1(?:3492[0-25]|4495[0235]|549(?:20|5[01]))|4[34]492[01])\\d{3}|8[1-4]\\d{3,7}|(?:2[27]|47|54)4950\\d{3}|(?:1(?:049[2-4]|9[12]\\d\\d)|(?:50[0-2]|[67]\\d\\d)\\d\\d|8(?:5\\d{3}|7(?:08[67]|158|28[5-9]|310)))\\d{4}|(?:1[6-8]|28|3[2-69]|4[025689]|5[36-8])4920\\d{3}|(?:12|[2-5]1)492\\d{4}",[5,6,7,8,9]],["80\\d{7}",[9]],["(?:86[2-9]|9[0-2]\\d)\\d{6}",[9]],0,0,["861\\d{6,7}",[9,10]],0,["87(?:08[0-589]|15[0-79]|28[0-4]|31[1-9])\\d{4}|87(?:[02][0-79]|1[0-46-9]|3[02-9]|[4-9]\\d)\\d{5}",[9]],["860\\d{6}",[9]]]],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",0,0,0,0,0,[["21[1-8]\\d{6}"],["(?:[59][5-8]|7[5-9])\\d{7}"],["800\\d{6}"],0,0,0,0,0,["63\\d{7}"]]],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",0,0,0,0,0,[["(?:1(?:(?:3\\d|9)\\d|[4-8])|2(?:(?:(?:0(?:2[014]|5)|(?:2[0157]|31|84|9)\\d\\d|[56](?:[14]\\d\\d|20)|7(?:[089]|2[03]|[35]\\d\\d))\\d|4(?:2\\d\\d|8))\\d|1(?:2|[39]\\d{4}))|3(?:(?:123|(?:29\\d|92)\\d)\\d\\d|7(?:[19]|[56]\\d))|5(?:0|1[2-478]|26|[37]2|4(?:2\\d{3}|83)|5(?:25\\d\\d|[78])|[689]\\d)|6(?:(?:[16-8]21|28|52[013])\\d\\d|[39])|8(?:[1349]28|523)\\d\\d)\\d{3}|(?:4\\d\\d|9[2-9])\\d{4,5}|(?:(?:2(?:(?:(?:0|8[146])\\d|7[1-7])\\d|2(?:[278]\\d|92)|58(?:2\\d|3))|3(?:[26]|9\\d{3})|5(?:4\\d|5)\\d\\d)\\d|6(?:(?:(?:[0-246]|[78]\\d)\\d|37)\\d|5[2-8]))\\d\\d|(?:2(?:[569]\\d|8[2-57-9])|3(?:[013-59]\\d|8[37])|6[89]8)\\d{3}"],["7(?:[1278]\\d|3[1-9])\\d{6}",[9]],["80(?:[01]\\d|20|8[0-8])\\d{3}",[7]],0,0,0,0,0,["86(?:1[12]|22|30|44|55|77|8[368])\\d{6}",[10]]]]},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 Pd(e,t){e=e.split("-"),t=t.split("-");for(var r=e[0].split("."),n=t[0].split("."),i=0;i<3;i++){var o=Number(r[i]),a=Number(n[i]);if(o>a)return 1;if(a>o)return-1;if(!isNaN(o)&&isNaN(a))return 1;if(isNaN(o)&&!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 Dd={}.constructor;function Rd(e){return null!=e&&e.constructor===Dd}function Fd(e){return Fd="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},Fd(e)}function Bd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ld(e,t,r){return t&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ud(n.key),n)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ud(e){var t=function(e,t){if("object"!=Fd(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=Fd(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==Fd(t)?t:t+""}var Kd=" ext. ",jd=/^\d+$/,Vd=function(){return Ld(function e(t){Bd(this,e),Zd(t),this.metadata=t,Xd.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&&jd.test(e)&&(t=e,e=null),e&&"001"!==e){if(!this.hasCountry(e))throw new Error("Unknown country: ".concat(e));this.numberingPlan=new Jd(this.getCountryMetadata(e),this)}else if(t){if(!this.hasCallingCode(t))throw new Error("Unknown calling code: ".concat(t));this.numberingPlan=new Jd(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 r=this.nonGeographic()[e];if(r)return r}else{var n=this.countryCallingCodes()[e];if(n&&1===n.length&&"001"===n[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}}])}(),Jd=function(){return Ld(function e(t,r){Bd(this,e),this.globalMetadataObject=r,this.metadata=t,Xd.call(this,r.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 qd(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()&&Hd(this.types(),e))return new zd(Hd(this.types(),e),this)}},{key:"ext",value:function(){return this.v1||this.v2?Kd:this.metadata[13]||Kd}}])}(),qd=function(){return Ld(function e(t,r){Bd(this,e),this._format=t,this.metadata=r},[{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()||Gd.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}])}(),Gd=/^\(?\$1\)?$/,zd=function(){return Ld(function e(t,r){Bd(this,e),this.type=t,this.metadata=r},[{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 Hd(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 Zd(e){if(!e)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!Rd(e)||!Rd(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(Rd(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+Wd(e)+": "+e,"."))}var Wd=function(e){return Fd(e)};function Yd(e,t){if((t=new Vd(t)).hasCountry(e))return t.selectNumberingPlan(e).countryCallingCode();throw new Error("Unknown country: ".concat(e))}function Xd(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===Pd(t,"1.2.0")?this.v2=!0:-1===Pd(t,"1.7.35")?this.v3=!0:this.v4=!0:this.v1=!0}function Qd(e,t,r){return function(e,t,r,n){t&&(n=new Vd(n.metadata)).selectNumberingPlan(t);var i=n.type(r),o=i&&i.possibleLengths()||n.possibleLengths();if(!o)return"IS_POSSIBLE";var a=e.length,d=o[0];if(d===a)return"IS_POSSIBLE";if(d>a)return"TOO_SHORT";if(o[o.length-1]<a)return"TOO_LONG";return o.indexOf(a,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}(e,t,void 0,r)}function es(e,t,r){return"IS_POSSIBLE"===Qd(e,t,r)}function ts(e,t){return e=e||"",new RegExp("^(?:"+t+")$").test(e)}function rs(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return ns(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ns(e,t):void 0}}(e))||t){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}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 ns(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var is=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function os(e,t,r){if(t=t||{},e.country||e.countryCallingCode){(r=new Vd(r)).selectNumberingPlan(e.country,e.countryCallingCode);var n=t.v2?e.nationalNumber:e.phone;if(ts(n,r.nationalNumberPattern())){if(as(n,"FIXED_LINE",r))return r.type("MOBILE")&&""===r.type("MOBILE").pattern()?"FIXED_LINE_OR_MOBILE":r.type("MOBILE")?as(n,"MOBILE",r)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE":"FIXED_LINE_OR_MOBILE";for(var i,o=rs(is);!(i=o()).done;){var a=i.value;if(as(n,a,r))return a}}}}function as(e,t,r){var n=r.type(t);return!(!n||!n.pattern())&&(!(n.possibleLengths()&&n.possibleLengths().indexOf(e.length)<0)&&ts(e,n.pattern()))}function ds(e,t,r){var n=new Vd(r).getCountryCodesForCallingCode(e);return n?n.filter(function(e){return function(e,t,r){var n=new Vd(r);if(n.selectNumberingPlan(t),n.numberingPlan.possibleLengths().indexOf(e.length)>=0)return!0;return!1}(t,e,r)}):[]}var ss="0-90-9٠-٩۰-۹",cs="".concat("-‐-―−ー-").concat("//").concat("..").concat("  ­​⁠ ").concat("()()[]\\[\\]").concat("~⁓∼~"),us=new RegExp("(["+ss+"])");function ls(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return fs(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?fs(e,t):void 0}}(e))||t){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}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 fs(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function ps(e,t){var r=t.nationalNumber,n=t.metadata,i=n.getCountryCodesForCallingCode(e);if(i)return 1===i.length?i[0]:function(e,t){var r=t.countries,n=t.metadata;n=new Vd(n);for(var i,o=ls(r);!(i=o()).done;){var a=i.value;if(n.selectNumberingPlan(a),n.leadingDigits()){if(e&&0===e.search(n.leadingDigits()))return a}else if(os({phone:e,country:a},void 0,n.metadata))return a}}(r,{countries:i,metadata:n.metadata})}function hs(e,t,r){var n=function(e,t){if(e&&t.numberingPlan.nationalPrefixForParsing()){var r=new RegExp("^(?:"+t.numberingPlan.nationalPrefixForParsing()+")"),n=r.exec(e);if(n){var i,o,a,d=n.length-1,s=d>0&&n[d];if(t.nationalPrefixTransformRule()&&s)i=e.replace(r,t.nationalPrefixTransformRule()),d>1&&(o=n[1]);else{var c=n[0];i=e.slice(c.length),s&&(o=n[1])}if(s){var u=e.indexOf(n[1]);e.slice(0,u)===t.numberingPlan.nationalPrefix()&&(a=t.numberingPlan.nationalPrefix())}else a=n[0];return{nationalNumber:i,nationalPrefix:a,carrierCode:o}}}return{nationalNumber:e}}(e,r),i=n.carrierCode,o=n.nationalNumber;if(o!==e){if(!function(e,t,r){if(ts(e,r.nationalNumberPattern())&&!ts(t,r.nationalNumberPattern()))return!1;return!0}(e,o,r))return{nationalNumber:e};if(r.numberingPlan.possibleLengths()&&(t||(t=ps(r.numberingPlan.callingCode(),{nationalNumber:o,metadata:r})),!function(e,t,r){switch(Qd(e,t,r)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}(o,t,r)))return{nationalNumber:e}}return{nationalNumber:o,carrierCode:i}}function ys(e,t,r,n,i){if(!e)return{};var o;if("+"!==e[0]){var a=function(e,t,r,n){if(t){var i=new Vd(n);i.selectNumberingPlan(t,r);var o=new RegExp(i.IDDPrefix());if(0===e.search(o)){var a=(e=e.slice(e.match(o)[0].length)).match(us);if(!(a&&null!=a[1]&&a[1].length>0&&"0"===a[1]))return e}}}(e,r,n,i);if(!a||a===e){if(r||n){var d=function(e,t,r,n,i){var o=r?Yd(r,i):n;if(0===e.indexOf(o)){(i=new Vd(i)).selectNumberingPlan(r,o);var a=e.slice(o.length),d=hs(a,t,i).nationalNumber,s=hs(e,t,i).nationalNumber;if(!ts(s,i.nationalNumberPattern())&&ts(d,i.nationalNumberPattern())||"TOO_LONG"===Qd(s,t,i))return{countryCallingCode:o,number:a}}return{number:e}}(e,t,r,n,i),s=d.countryCallingCode,c=d.number;if(s)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:s,number:c}}return{number:e}}o=!0,e="+"+a}if("0"===e[1])return{};i=new Vd(i);for(var u=2;u-1<=3&&u<=e.length;){var l=e.slice(1,u);if(i.hasCallingCode(l))return i.selectNumberingPlan(l),{countryCallingCodeSource:o?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:l,number:e.slice(u)};u++}return{}}var ms=/(\$\d)/;function gs(e,t,r){var n=r.useInternationalFormat,i=r.withNationalPrefix,o=e.replace(new RegExp(t.pattern()),n?t.internationalFormat():i&&t.nationalPrefixFormattingRule()?t.format().replace(ms,t.nationalPrefixFormattingRule()):t.format());return n?function(e){return e.replace(new RegExp("[".concat(cs,"]+"),"g")," ").trim()}(o):o}var _s=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;var vs=function(e){return"([".concat(ss,"]{1,").concat(e,"})")};function bs(e){var t="[  \\t,]*",r="[:\\..]?[  \\t,-]*",n="#?",i="[  \\t]*";return";ext="+vs("20")+"|"+(t+"(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)"+r+vs("20")+n)+"|"+(t+"(?:[xx##~~]|int|int)"+r+vs("9")+n)+"|"+("[- ]+"+vs("6")+"#")+"|"+(i+"(?:,{2}|;)"+r+vs("15")+n)+"|"+(i+"(?:,)+"+r+vs("9")+n)}var Ss="["+ss+"]{2}",Is="[++]{0,1}(?:["+cs+"]*["+ss+"]){3,}["+cs+ss+"]*",Ns=new RegExp("^[++]{0,1}(?:["+cs+"]*["+ss+"]){1,2}$","i"),$s=Is+"(?:"+bs()+")?",ws=new RegExp("^"+Ss+"$|^"+$s+"$","i");var As={formatExtension:function(e,t,r){return"".concat(e).concat(r.ext()).concat(t)}};function Os(e,t,r,n){if(r=r?function(){for(var e=1,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];for(;e<r.length;){if(r[e])for(var i in r[e])r[0][i]=r[e][i];e++}return r[0]}({},As,r):As,n=new Vd(n),e.country&&"001"!==e.country){if(!n.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));n.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)return e.phone||"";n.selectNumberingPlan(e.countryCallingCode)}var i,o=n.countryCallingCode(),a=r.v2?e.nationalNumber:e.phone;switch(t){case"NATIONAL":return a?Ts(i=Ms(a,e.carrierCode,"NATIONAL",n,r),e.ext,n,r.formatExtension):"";case"INTERNATIONAL":return a?(i=Ms(a,null,"INTERNATIONAL",n,r),Ts(i="+".concat(o," ").concat(i),e.ext,n,r.formatExtension)):"+".concat(o);case"E.164":return"+".concat(o).concat(a);case"RFC3966":return function(e){var t=e.number,r=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(r?";ext="+r:"")}({number:"+".concat(o).concat(a),ext:e.ext});case"IDD":if(!r.fromCountry)return;var d=function(e,t,r,n,i){var o=Yd(n,i.metadata);if(o===r){var a=Ms(e,t,"NATIONAL",i);return"1"===r?r+" "+a:a}var d=function(e,t,r){var n=new Vd(r);return n.selectNumberingPlan(e,t),n.defaultIDDPrefix()?n.defaultIDDPrefix():_s.test(n.IDDPrefix())?n.IDDPrefix():void 0}(n,void 0,i.metadata);if(d)return"".concat(d," ").concat(r," ").concat(Ms(e,null,"INTERNATIONAL",i))}(a,e.carrierCode,o,r.fromCountry,n);if(!d)return;return Ts(d,e.ext,n,r.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(t,'"'))}}function Ms(e,t,r,n,i){var o,a,d=(o=n.formats(),a=e,function(e,t){for(var r=0;r<e.length;){if(t(e[r]))return e[r];r++}}(o,function(e){if(e.leadingDigitsPatterns().length>0){var t=e.leadingDigitsPatterns()[e.leadingDigitsPatterns().length-1];if(0!==a.search(t))return!1}return ts(a,e.pattern())}));return d?gs(e,d,{useInternationalFormat:"INTERNATIONAL"===r,withNationalPrefix:!d.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!i||!1!==i.nationalPrefix}):e}function Ts(e,t,r,n){return t?n(e,t,r):e}function Es(e){return Es="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},Es(e)}function Cs(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function xs(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Cs(Object(r),!0).forEach(function(t){ks(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cs(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ks(e,t,r){return(t=Ds(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ps(e,t,r){return t&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ds(n.key),n)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ds(e){var t=function(e,t){if("object"!=Es(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=Es(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==Es(t)?t:t+""}var Rs=function(){return Ps(function e(t,r,n){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]&&!r)throw new TypeError("`metadata` argument not passed");if(Rd(r)&&Rd(r.countries)){n=r;var i=t;if(!Bs.test(i))throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');var o=ys(i,void 0,void 0,void 0,n);if(t=o.countryCallingCode,!(r=o.number))throw new Error("Invalid `number` argument passed: too short")}if(!r)throw new TypeError("`nationalNumber` argument is required");if("string"!=typeof r)throw new TypeError("`nationalNumber` argument must be a string");Zd(n);var a=function(e,t){var r,n,i=new Vd(t);Fs(e)?(r=e,i.selectNumberingPlan(r),n=i.countryCallingCode()):n=e;return{country:r,countryCallingCode:n}}(t,n),d=a.country,s=a.countryCallingCode;this.country=d,this.countryCallingCode=s,this.nationalNumber=r,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return n}},[{key:"setExt",value:function(e){this.ext=e}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:ds(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return function(e,t,r){if(void 0===t&&(t={}),r=new Vd(r),t.v2){if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");r.selectNumberingPlan(e.countryCallingCode)}else{if(!e.phone)return!1;if(e.country){if(!r.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));r.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");r.selectNumberingPlan(e.countryCallingCode)}}if(r.possibleLengths())return es(e.phone||e.nationalNumber,e.country,r);if(e.countryCallingCode&&r.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,r){return t=t||{},(r=new Vd(r)).selectNumberingPlan(e.country,e.countryCallingCode),r.hasTypes()?void 0!==os(e,t,r.metadata):ts(t.v2?e.nationalNumber:e.phone,r.nationalNumberPattern())}(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){return new Vd(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(e){return this.number===e.number&&this.ext===e.ext}},{key:"getType",value:function(){return os(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(e,t){return Os(this,e,t?xs(xs({},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)}}])}(),Fs=function(e){return/^[A-Z]{2}$/.test(e)};var Bs=/^\+\d+$/;function Ls(e){return Ls="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},Ls(e)}function Us(e,t,r){return t=Js(t),function(e,t){if(t&&("object"==Ls(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,js()?Reflect.construct(t,r||[],Js(e).constructor):t.apply(e,r))}function Ks(e){var t="function"==typeof Map?new Map:void 0;return Ks=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,r)}function r(){return function(e,t,r){if(js())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&Vs(i,r.prototype),i}(e,arguments,Js(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Vs(r,e)},Ks(e)}function js(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(js=function(){return!!e})()}function Vs(e,t){return Vs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Vs(e,t)}function Js(e){return Js=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Js(e)}var qs=function(){function e(t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r=Us(this,e,[t]),Object.setPrototypeOf(r,e.prototype),r.name=r.constructor.name,r}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&&Vs(e,t)}(e,Ks(Error)),t=e,Object.defineProperty(t,"prototype",{writable:!1}),t;var t}(),Gs=new RegExp("(?:"+bs()+")$","i");var zs={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 Hs(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Zs(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Zs(e,t):void 0}}(e))||t){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}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 Zs(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Ws(e){for(var t,r="",n=Hs(e.split(""));!(t=n()).done;){r+=Ys(t.value,r)||""}return r}function Ys(e,t,r){if("+"===e){if(t)return;return"+"}return function(e){return zs[e]}(e)}var Xs="(["+ss+"]|[\\-\\.\\(\\)]?)",Qs=new RegExp("^\\+"+Xs+"*["+ss+"]"+Xs+"*$","g"),ec=new RegExp("^("+("["+ss+"]+((\\-)*["+ss+"])*")+"\\.)*"+("[a-zA-Z]+((\\-)*["+ss+"])*")+"\\.?$","g"),tc="tel:",rc=";phone-context=";function nc(e,t){var r,n=t.extractFormattedPhoneNumber,i=function(e){var t=e.indexOf(rc);if(t<0)return null;var r=t+15;if(r>=e.length)return"";var n=e.indexOf(";",r);return n>=0?e.substring(r,n):e.substring(r)}(e);if(!function(e){return null===e||0!==e.length&&(Qs.test(e)||ec.test(e))}(i))throw new qs("NOT_A_NUMBER");if(null===i)r=n(e)||"";else{r="","+"===i.charAt(0)&&(r+=i);var o,a=e.indexOf(tc);o=a>=0?a+4:0;var d=e.indexOf(rc);r+=e.substring(o,d)}var s=r.indexOf(";isub=");if(s>0&&(r=r.substring(0,s)),""!==r)return r}var ic=new RegExp("[++"+ss+"]"),oc=new RegExp("[^"+ss+"#]+$");function ac(e,t,r){if(t=t||{},r=new Vd(r),t.defaultCountry&&!r.hasCountry(t.defaultCountry)){if(t.v2)throw new qs("INVALID_COUNTRY");throw new Error("Unknown country: ".concat(t.defaultCountry))}var n=function(e,t,r){var n=nc(e,{extractFormattedPhoneNumber:function(e){return function(e,t,r){if(!e)return;if(e.length>250){if(r)throw new qs("TOO_LONG");return}if(!1===t)return e;var n=e.search(ic);if(n<0)return;return e.slice(n).replace(oc,"")}(e,r,t)}});if(!n)return{};if(!function(e){return e.length>=2&&ws.test(e)}(n))return function(e){return Ns.test(e)}(n)?{error:"TOO_SHORT"}:{};var i=function(e){var t=e.search(Gs);if(t<0)return{};for(var r=e.slice(0,t),n=e.match(Gs),i=1;i<n.length;){if(n[i])return{number:r,ext:n[i]};i++}}(n);if(i.ext)return i;return{number:n}}(e,t.v2,t.extract),i=n.number,o=n.ext,a=n.error;if(!i){if(t.v2){if("TOO_SHORT"===a)throw new qs("TOO_SHORT");throw new qs("NOT_A_NUMBER")}return{}}var d=function(e,t,r,n){var i,o=ys(Ws(e),void 0,t,r,n.metadata),a=o.countryCallingCodeSource,d=o.countryCallingCode,s=o.number;if(d)n.selectNumberingPlan(d);else{if(!s||!t&&!r)return{};n.selectNumberingPlan(t,r),t&&(i=t),d=r||Yd(t,n.metadata)}if(!s)return{countryCallingCodeSource:a,countryCallingCode:d};var c=hs(Ws(s),i,n),u=c.nationalNumber,l=c.carrierCode,f=ps(d,{nationalNumber:u,metadata:n});f&&(i=f,"001"===f||n.selectNumberingPlan(i));return{country:i,countryCallingCode:d,countryCallingCodeSource:a,nationalNumber:u,carrierCode:l}}(i,t.defaultCountry,t.defaultCallingCode,r),s=d.country,c=d.nationalNumber,u=d.countryCallingCode,l=d.countryCallingCodeSource,f=d.carrierCode;if(!r.hasSelectedNumberingPlan()){if(t.v2)throw new qs("INVALID_COUNTRY");return{}}if(!c||c.length<2){if(t.v2)throw new qs("TOO_SHORT");return{}}if(c.length>17){if(t.v2)throw new qs("TOO_LONG");return{}}if(t.v2){var p=new Rs(u,c,r.metadata);return s&&(p.country=s),f&&(p.carrierCode=f),o&&(p.ext=o),p.__countryCallingCodeSource=l,p}var h=!!(t.extended?r.hasSelectedNumberingPlan():s)&&ts(c,r.nationalNumberPattern());return t.extended?{country:s,countryCallingCode:u,carrierCode:f,valid:h,possible:!!h||!(!0!==t.extended||!r.possibleLengths()||!es(c,s,r)),phone:c,ext:o}:h?function(e,t,r){var n={country:e,phone:t};r&&(n.ext=r);return n}(s,c,o):{}}function dc(e){return dc="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},dc(e)}function sc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function cc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?sc(Object(r),!0).forEach(function(t){uc(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sc(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function uc(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=dc(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=dc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==dc(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lc(e){return lc="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},lc(e)}function fc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function pc(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=lc(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=lc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==lc(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hc(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,d=[],s=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t);else for(;!(s=(n=o.call(r)).done)&&(d.push(n.value),d.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return d}}(e,t)||function(e,t){if(e){if("string"==typeof e)return yc(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?yc(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 yc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function mc(e){var t,r,n,i=hc(Array.prototype.slice.call(e),4),o=i[0],a=i[1],d=i[2],s=i[3];if("string"!=typeof o)throw new TypeError("A text for parsing must be a string.");if(t=o,a&&"string"!=typeof a){if(!Rd(a))throw new Error("Invalid second argument: ".concat(a));d?(r=a,n=d):n=a}else s?(r=d,n=s):(r=void 0,n=d),a&&(r=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fc(Object(r),!0).forEach(function(t){pc(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fc(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({defaultCountry:a},r));return{text:t,options:r,metadata:n}}function gc(){var e=mc(arguments);return function(e,t,r){return ac(e,cc(cc({},t),{},{v2:!0}),r)}(e.text,e.options,e.metadata)}function _c(){return function(e,t){var r=Array.prototype.slice.call(t);return r.push(kd),e.apply(this,r)}(gc,arguments)}var vc="isPhoneNumber";function bc(e,t){if("string"!=typeof e||e.trim()!==e)return!1;try{var r=_c(e,t);return(!t||r.country===t)&&r.isValid()}catch(e){return!1}}var Sc="isMilitaryTime";function Ic(e){return"string"==typeof e&&Ed(e,/^([01]\d|2[0-3]):?([0-5]\d)$/)}var Nc,$c={exports:{}};function wc(){return Nc||(Nc=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,n.default)(e);var r=new RegExp("^[a-fA-F0-9]{".concat(i[t],"}$"));return r.test(e)};var r,n=(r=or())&&r.__esModule?r:{default:r};var i={md5:32,md4:32,sha1:40,sha256:64,sha384:96,sha512:128,ripemd128:32,ripemd160:40,tiger128:32,tiger160:40,tiger192:48,crc32:8,crc32b:8};e.exports=t.default,e.exports.default=t.default}($c,$c.exports)),$c.exports}var Ac=Z(wc()),Oc="isHash";function Mc(e,t){return"string"==typeof e&&Ac(e,t)}var Tc,Ec={exports:{}};function Cc(){return Tc||(Tc=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,n.default)(e);var r=i;if(r=t.require_hyphen?r.replace("?",""):r,r=t.case_sensitive?new RegExp(r):new RegExp(r,"i"),!r.test(e))return!1;for(var o=e.replace("-","").toUpperCase(),a=0,d=0;d<o.length;d++){var s=o[d];a+=("X"===s?10:+s)*(8-d)}return a%11==0};var r,n=(r=or())&&r.__esModule?r:{default:r};var i="^\\d{4}-?\\d{3}[\\dX]$";e.exports=t.default,e.exports.default=t.default}(Ec,Ec.exports)),Ec.exports}var xc=Z(Cc()),kc="isISSN";function Pc(e,t){return"string"==typeof e&&xc(e,t)}var Dc="isDateString";function Rc(e,t){return Wo(e,t)}var Fc,Bc={exports:{}};function Lc(){return Fc||(Fc=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o;if((0,r.default)(e),t.loose)return(0,n.default)(d,e.toLowerCase());return(0,n.default)(a,e)};var r=i(or()),n=i(Dn());function i(e){return e&&e.__esModule?e:{default:e}}var o={loose:!1},a=["true","false","1","0"],d=[].concat(a,["yes","no"]);e.exports=t.default,e.exports.default=t.default}(Bc,Bc.exports)),Bc.exports}var Uc=Z(Lc()),Kc="isBooleanString";function jc(e){return"string"==typeof e&&Uc(e)}var Vc,Jc={exports:{}};function qc(){return Vc||(Vc=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,n.default)(e),t&&t.no_symbols)return o.test(e);return new RegExp("^[+-]?([0-9]*[".concat((t||{}).locale?i.decimal[t.locale]:".","])?[0-9]+$")).test(e)};var r,n=(r=or())&&r.__esModule?r:{default:r},i=Jr();var o=/^[0-9]+$/;e.exports=t.default,e.exports.default=t.default}(Jc,Jc.exports)),Jc.exports}var Gc=Z(qc()),zc="isNumberString";function Hc(e,t){return"string"==typeof e&&Gc(e,t)}var Zc,Wc={exports:{}};function Yc(){return Zc||(Zc=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,r.default)(e),t=(0,n.default)(t,d),t.crockford)return a.test(e);if(e.length%8==0&&o.test(e))return!0;return!1};var r=i(or()),n=i(sr());function i(e){return e&&e.__esModule?e:{default:e}}var o=/^[A-Z2-7]+=*$/,a=/^[A-HJKMNP-TV-Z0-9]+$/,d={crockford:!1};e.exports=t.default,e.exports.default=t.default}(Wc,Wc.exports)),Wc.exports}var Xc=Z(Yc()),Qc="isBase32";function eu(e){return"string"==typeof e&&Xc(e)}var tu,ru={exports:{}};function nu(){return tu||(tu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,n.default)(e);var t=e.slice(4,6).toUpperCase();if(!i.CountryCodes.has(t)&&"XK"!==t)return!1;return o.test(e)};var r,n=(r=or())&&r.__esModule?r:{default:r},i=Na();var o=/^[A-Za-z]{6}[A-Za-z0-9]{2}([A-Za-z0-9]{3})?$/;e.exports=t.default,e.exports.default=t.default}(ru,ru.exports)),ru.exports}var iu=Z(nu()),ou="isBIC";function au(e){return"string"==typeof e&&iu(e)}var du,su={exports:{}};function cu(){return du||(du=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e),i.test(e)||o.test(e)};var r,n=(r=or())&&r.__esModule?r:{default:r};var i=/^(bc1|tb1|bc1p|tb1p)[ac-hj-np-z02-9]{39,58}$/,o=/^(1|2|3|m)[A-HJ-NP-Za-km-z1-9]{25,39}$/;e.exports=t.default,e.exports.default=t.default}(su,su.exports)),su.exports}var uu=Z(cu()),lu="isBtcAddress";function fu(e){return"string"==typeof e&&uu(e)}var pu,hu={exports:{}};function yu(){return pu||(pu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,n.default)(e);var t=e.split(",");if(t.length<2)return!1;var r=t.shift().trim().split(";"),d=r.shift();if("data:"!==d.slice(0,5))return!1;var s=d.slice(5);if(""!==s&&!i.test(s))return!1;for(var c=0;c<r.length;c++)if((c!==r.length-1||"base64"!==r[c].toLowerCase())&&!o.test(r[c]))return!1;for(var u=0;u<t.length;u++)if(!a.test(t[u]))return!1;return!0};var r,n=(r=or())&&r.__esModule?r:{default:r};var i=/^[a-z]+\/[a-z0-9\-\+\._]+$/i,o=/^[a-z\-]+=[a-z0-9\-]+$/i,a=/^[a-z0-9!\$&'\(\)\*\+,;=\-\._~:@\/\?%\s]*$/i;e.exports=t.default,e.exports.default=t.default}(hu,hu.exports)),hu.exports}var mu=Z(yu()),gu="isDataURI";function _u(e){return"string"==typeof e&&mu(e)}var vu,bu={exports:{}};function Su(){return vu||(vu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,n.default)(e);var t=Number(e.slice(-1));return a.test(e)&&t===(r=e,d=r.slice(0,-1).split("").map(function(e,t){return Number(e)*function(e,t){return e===i||e===o?t%2==0?3:1:t%2==0?1:3}(r.length,t)}).reduce(function(e,t){return e+t},0),s=10-d%10,s<10?s:0);var r,d,s};var r,n=(r=or())&&r.__esModule?r:{default:r};var i=8,o=14,a=/^(\d{8}|\d{13}|\d{14})$/;e.exports=t.default,e.exports.default=t.default}(bu,bu.exports)),bu.exports}var Iu=Z(Su()),Nu="isEAN";function $u(e){return"string"==typeof e&&Iu(e)}var wu,Au={exports:{}};function Ou(){return wu||(wu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e),i.test(e)};var r,n=(r=or())&&r.__esModule?r:{default:r};var i=/^(0x)[0-9a-f]{40}$/i;e.exports=t.default,e.exports.default=t.default}(Au,Au.exports)),Au.exports}var Mu=Z(Ou()),Tu="isEthereumAddress";function Eu(e){return"string"==typeof e&&Mu(e)}var Cu,xu={exports:{}};function ku(){return Cu||(Cu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,n.default)(e);var t=e.replace(/\s+/g," ").replace(/\s?(hsla?\(|\)|,)\s?/gi,"$1");if(-1!==t.indexOf(","))return i.test(t);return o.test(t)};var r,n=(r=or())&&r.__esModule?r:{default:r};var i=/^hsla?\(((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?))(deg|grad|rad|turn)?(,(\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%){2}(,((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%?))?\)$/i,o=/^hsla?\(((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?))(deg|grad|rad|turn)?(\s(\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%){2}\s?(\/\s((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%?)\s?)?\)$/i;e.exports=t.default,e.exports.default=t.default}(xu,xu.exports)),xu.exports}var Pu=Z(ku()),Du="isHSL";function Ru(e){return"string"==typeof e&&Pu(e)}var Fu,Bu={};function Lu(){if(Fu)return Bu;Fu=1,Object.defineProperty(Bu,"__esModule",{value:!0}),Bu.default=function(r){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,e.default)(r),function(e,r){var i=e.replace(/[\s\-]+/gi,"").toUpperCase(),o=i.slice(0,2).toUpperCase(),a=o in n;if(r.whitelist){if(!function(e){if(e.filter(function(e){return!(e in n)}).length>0)return!1;return!0}(r.whitelist))return!1;if(!(0,t.default)(r.whitelist,o))return!1}if(r.blacklist){if((0,t.default)(r.blacklist,o))return!1}return a&&n[o].test(i)}(r,i)&&function(e){var t=e.replace(/[^A-Z0-9]+/gi,"").toUpperCase();return 1===(t.slice(4)+t.slice(0,4)).replace(/[A-Z]/g,function(e){return e.charCodeAt(0)-55}).match(/\d{1,7}/g).reduce(function(e,t){return Number(e+t)%97},"")}(r)},Bu.locales=void 0;var e=r(or()),t=r(Dn());function r(e){return e&&e.__esModule?e:{default:e}}var n={AD:/^(AD[0-9]{2})\d{8}[A-Z0-9]{12}$/,AE:/^(AE[0-9]{2})\d{3}\d{16}$/,AL:/^(AL[0-9]{2})\d{8}[A-Z0-9]{16}$/,AT:/^(AT[0-9]{2})\d{16}$/,AZ:/^(AZ[0-9]{2})[A-Z0-9]{4}\d{20}$/,BA:/^(BA[0-9]{2})\d{16}$/,BE:/^(BE[0-9]{2})\d{12}$/,BG:/^(BG[0-9]{2})[A-Z]{4}\d{6}[A-Z0-9]{8}$/,BH:/^(BH[0-9]{2})[A-Z]{4}[A-Z0-9]{14}$/,BR:/^(BR[0-9]{2})\d{23}[A-Z]{1}[A-Z0-9]{1}$/,BY:/^(BY[0-9]{2})[A-Z0-9]{4}\d{20}$/,CH:/^(CH[0-9]{2})\d{5}[A-Z0-9]{12}$/,CR:/^(CR[0-9]{2})\d{18}$/,CY:/^(CY[0-9]{2})\d{8}[A-Z0-9]{16}$/,CZ:/^(CZ[0-9]{2})\d{20}$/,DE:/^(DE[0-9]{2})\d{18}$/,DK:/^(DK[0-9]{2})\d{14}$/,DO:/^(DO[0-9]{2})[A-Z]{4}\d{20}$/,DZ:/^(DZ\d{24})$/,EE:/^(EE[0-9]{2})\d{16}$/,EG:/^(EG[0-9]{2})\d{25}$/,ES:/^(ES[0-9]{2})\d{20}$/,FI:/^(FI[0-9]{2})\d{14}$/,FO:/^(FO[0-9]{2})\d{14}$/,FR:/^(FR[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/,GB:/^(GB[0-9]{2})[A-Z]{4}\d{14}$/,GE:/^(GE[0-9]{2})[A-Z0-9]{2}\d{16}$/,GI:/^(GI[0-9]{2})[A-Z]{4}[A-Z0-9]{15}$/,GL:/^(GL[0-9]{2})\d{14}$/,GR:/^(GR[0-9]{2})\d{7}[A-Z0-9]{16}$/,GT:/^(GT[0-9]{2})[A-Z0-9]{4}[A-Z0-9]{20}$/,HR:/^(HR[0-9]{2})\d{17}$/,HU:/^(HU[0-9]{2})\d{24}$/,IE:/^(IE[0-9]{2})[A-Z]{4}\d{14}$/,IL:/^(IL[0-9]{2})\d{19}$/,IQ:/^(IQ[0-9]{2})[A-Z]{4}\d{15}$/,IR:/^(IR[0-9]{2})\d{22}$/,IS:/^(IS[0-9]{2})\d{22}$/,IT:/^(IT[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,JO:/^(JO[0-9]{2})[A-Z]{4}\d{22}$/,KW:/^(KW[0-9]{2})[A-Z]{4}[A-Z0-9]{22}$/,KZ:/^(KZ[0-9]{2})\d{3}[A-Z0-9]{13}$/,LB:/^(LB[0-9]{2})\d{4}[A-Z0-9]{20}$/,LC:/^(LC[0-9]{2})[A-Z]{4}[A-Z0-9]{24}$/,LI:/^(LI[0-9]{2})\d{5}[A-Z0-9]{12}$/,LT:/^(LT[0-9]{2})\d{16}$/,LU:/^(LU[0-9]{2})\d{3}[A-Z0-9]{13}$/,LV:/^(LV[0-9]{2})[A-Z]{4}[A-Z0-9]{13}$/,MA:/^(MA[0-9]{26})$/,MC:/^(MC[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/,MD:/^(MD[0-9]{2})[A-Z0-9]{20}$/,ME:/^(ME[0-9]{2})\d{18}$/,MK:/^(MK[0-9]{2})\d{3}[A-Z0-9]{10}\d{2}$/,MR:/^(MR[0-9]{2})\d{23}$/,MT:/^(MT[0-9]{2})[A-Z]{4}\d{5}[A-Z0-9]{18}$/,MU:/^(MU[0-9]{2})[A-Z]{4}\d{19}[A-Z]{3}$/,MZ:/^(MZ[0-9]{2})\d{21}$/,NL:/^(NL[0-9]{2})[A-Z]{4}\d{10}$/,NO:/^(NO[0-9]{2})\d{11}$/,PK:/^(PK[0-9]{2})[A-Z0-9]{4}\d{16}$/,PL:/^(PL[0-9]{2})\d{24}$/,PS:/^(PS[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$/,PT:/^(PT[0-9]{2})\d{21}$/,QA:/^(QA[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$/,RO:/^(RO[0-9]{2})[A-Z]{4}[A-Z0-9]{16}$/,RS:/^(RS[0-9]{2})\d{18}$/,SA:/^(SA[0-9]{2})\d{2}[A-Z0-9]{18}$/,SC:/^(SC[0-9]{2})[A-Z]{4}\d{20}[A-Z]{3}$/,SE:/^(SE[0-9]{2})\d{20}$/,SI:/^(SI[0-9]{2})\d{15}$/,SK:/^(SK[0-9]{2})\d{20}$/,SM:/^(SM[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,SV:/^(SV[0-9]{2})[A-Z0-9]{4}\d{20}$/,TL:/^(TL[0-9]{2})\d{19}$/,TN:/^(TN[0-9]{2})\d{20}$/,TR:/^(TR[0-9]{2})\d{5}[A-Z0-9]{17}$/,UA:/^(UA[0-9]{2})\d{6}[A-Z0-9]{19}$/,VA:/^(VA[0-9]{2})\d{18}$/,VG:/^(VG[0-9]{2})[A-Z]{4}\d{16}$/,XK:/^(XK[0-9]{2})\d{16}$/};return Bu.locales=Object.keys(n),Bu}var Uu=Z(Lu()),Ku="isIBAN";function ju(e){return"string"==typeof e&&Uu(e)}var Vu,Ju={exports:{}};function qu(){return Vu||(Vu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,r.default)(e),t in a)return a[t](e);if("any"===t){for(var n in a){if(a.hasOwnProperty(n))if((0,a[n])(e))return!0}return!1}throw new Error("Invalid locale '".concat(t,"'"))};var r=o(or()),n=o(Dn()),i=o(Mo());function o(e){return e&&e.__esModule?e:{default:e}}var a={PL:function(e){(0,r.default)(e);var t={1:1,2:3,3:7,4:9,5:1,6:3,7:7,8:9,9:1,10:3,11:0};if(null!=e&&11===e.length&&(0,i.default)(e,{allow_leading_zeroes:!0})){var n=e.split("").slice(0,-1).reduce(function(e,r,n){return e+Number(r)*t[n+1]},0),o=n%10,a=Number(e.charAt(e.length-1));if(0===o&&0===a||a===10-o)return!0}return!1},ES:function(e){(0,r.default)(e);var t={X:0,Y:1,Z:2},n=e.trim().toUpperCase();if(!/^[0-9X-Z][0-9]{7}[TRWAGMYFPDXBNJZSQVHLCKE]$/.test(n))return!1;var i=n.slice(0,-1).replace(/[X,Y,Z]/g,function(e){return t[e]});return n.endsWith(["T","R","W","A","G","M","Y","F","P","D","X","B","N","J","Z","S","Q","V","H","L","C","K","E"][i%23])},FI:function(e){if((0,r.default)(e),11!==e.length)return!1;if(!e.match(/^\d{6}[\-A\+]\d{3}[0-9ABCDEFHJKLMNPRSTUVWXY]{1}$/))return!1;return"0123456789ABCDEFHJKLMNPRSTUVWXY"[(1e3*parseInt(e.slice(0,6),10)+parseInt(e.slice(7,10),10))%31]===e.slice(10,11)},IN:function(e){var t=[[0,1,2,3,4,5,6,7,8,9],[1,2,3,4,0,6,7,8,9,5],[2,3,4,0,1,7,8,9,5,6],[3,4,0,1,2,8,9,5,6,7],[4,0,1,2,3,9,5,6,7,8],[5,9,8,7,6,0,4,3,2,1],[6,5,9,8,7,1,0,4,3,2],[7,6,5,9,8,2,1,0,4,3],[8,7,6,5,9,3,2,1,0,4],[9,8,7,6,5,4,3,2,1,0]],r=[[0,1,2,3,4,5,6,7,8,9],[1,5,7,6,2,8,3,0,9,4],[5,8,0,3,7,9,6,1,4,2],[8,9,1,6,0,4,3,5,2,7],[9,4,5,3,1,2,6,8,7,0],[4,2,8,6,5,7,3,9,0,1],[2,7,9,3,8,0,6,4,1,5],[7,0,4,6,9,1,3,2,5,8]],n=e.trim();if(!/^[1-9]\d{3}\s?\d{4}\s?\d{4}$/.test(n))return!1;var i=0;return n.replace(/\s/g,"").split("").map(Number).reverse().forEach(function(e,n){i=t[i][r[n%8][e]]}),0===i},IR:function(e){if(!e.match(/^\d{10}$/))return!1;if(e="0000".concat(e).slice(e.length-6),0===parseInt(e.slice(3,9),10))return!1;for(var t=parseInt(e.slice(9,10),10),r=0,n=0;n<9;n++)r+=parseInt(e.slice(n,n+1),10)*(10-n);return(r%=11)<2&&t===r||r>=2&&t===11-r},IT:function(e){return 9===e.length&&("CA00000AA"!==e&&e.search(/C[A-Z]\d{5}[A-Z]{2}/i)>-1)},NO:function(e){var t=e.trim();if(isNaN(Number(t)))return!1;if(11!==t.length)return!1;if("00000000000"===t)return!1;var r=t.split("").map(Number),n=(11-(3*r[0]+7*r[1]+6*r[2]+1*r[3]+8*r[4]+9*r[5]+4*r[6]+5*r[7]+2*r[8])%11)%11,i=(11-(5*r[0]+4*r[1]+3*r[2]+2*r[3]+7*r[4]+6*r[5]+5*r[6]+4*r[7]+3*r[8]+2*n)%11)%11;return n===r[9]&&i===r[10]},TH:function(e){if(!e.match(/^[1-8]\d{12}$/))return!1;for(var t=0,r=0;r<12;r++)t+=parseInt(e[r],10)*(13-r);return e[12]===((11-t%11)%10).toString()},LK:function(e){return!(10!==e.length||!/^[1-9]\d{8}[vx]$/i.test(e))||!(12!==e.length||!/^[1-9]\d{11}$/i.test(e))},"he-IL":function(e){var t=e.trim();if(!/^\d{9}$/.test(t))return!1;for(var r,n=t,i=0,o=0;o<n.length;o++)i+=(r=Number(n[o])*(o%2+1))>9?r-9:r;return i%10==0},"ar-LY":function(e){var t=e.trim();return!!/^(1|2)\d{11}$/.test(t)},"ar-TN":function(e){var t=e.trim();return!!/^\d{8}$/.test(t)},"zh-CN":function(e){var t,r=["11","12","13","14","15","21","22","23","31","32","33","34","35","36","37","41","42","43","44","45","46","50","51","52","53","54","61","62","63","64","65","71","81","82","91"],i=["7","9","10","5","8","4","2","1","6","3","7","9","10","5","8","4","2"],o=["1","0","X","9","8","7","6","5","4","3","2"],a=function(e){return(0,n.default)(r,e)},d=function(e){var t=parseInt(e.substring(0,4),10),r=parseInt(e.substring(4,6),10),n=parseInt(e.substring(6),10),i=new Date(t,r-1,n);return!(i>new Date)&&(i.getFullYear()===t&&i.getMonth()===r-1&&i.getDate()===n)},s=function(e){return function(e){for(var t=e.substring(0,17),r=0,n=0;n<17;n++)r+=parseInt(t.charAt(n),10)*parseInt(i[n],10);return o[r%11]}(e)===e.charAt(17).toUpperCase()};return!!/^\d{15}|(\d{17}(\d|x|X))$/.test(t=e)&&(15===t.length?function(e){var t=/^[1-9]\d{7}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}$/.test(e);if(!t)return!1;var r=e.substring(0,2);if(!(t=a(r)))return!1;var n="19".concat(e.substring(6,12));return!!(t=d(n))}(t):function(e){var t=/^[1-9]\d{5}[1-9]\d{3}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}(\d|x|X)$/.test(e);if(!t)return!1;var r=e.substring(0,2);if(!(t=a(r)))return!1;var n=e.substring(6,14);return!!(t=d(n))&&s(e)}(t))},"zh-HK":function(e){var t=/^[0-9]$/;if(e=(e=e.trim()).toUpperCase(),!/^[A-Z]{1,2}[0-9]{6}((\([0-9A]\))|(\[[0-9A]\])|([0-9A]))$/.test(e))return!1;8===(e=e.replace(/\[|\]|\(|\)/g,"")).length&&(e="3".concat(e));for(var r=0,n=0;n<=7;n++){r+=(t.test(e[n])?e[n]:(e[n].charCodeAt(0)-55)%11)*(9-n)}return(0===(r%=11)?"0":1===r?"A":String(11-r))===e[e.length-1]},"zh-TW":function(e){var t={A:10,B:11,C:12,D:13,E:14,F:15,G:16,H:17,I:34,J:18,K:19,L:20,M:21,N:22,O:35,P:23,Q:24,R:25,S:26,T:27,U:28,V:29,W:32,X:30,Y:31,Z:33},r=e.trim().toUpperCase();return!!/^[A-Z][0-9]{9}$/.test(r)&&Array.from(r).reduce(function(e,r,n){if(0===n){var i=t[r];return i%10*9+Math.floor(i/10)}return 9===n?(10-e%10-Number(r))%10==0:e+Number(r)*(9-n)},0)},PK:function(e){var t=e.trim();return/^[1-7][0-9]{4}-[0-9]{7}-[1-9]$/.test(t)}};e.exports=t.default,e.exports.default=t.default}(Ju,Ju.exports)),Ju.exports}var Gu=Z(qu()),zu="isIdentityCard";function Hu(e,t){return"string"==typeof e&&Gu(e,t)}var Zu,Wu={exports:{}};function Yu(){return Zu||(Zu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e),i.test(e)};var r,n=(r=or())&&r.__esModule?r:{default:r};var i=/^[A-Z]{2}[0-9A-Z]{3}\d{2}\d{5}$/;e.exports=t.default,e.exports.default=t.default}(Wu,Wu.exports)),Wu.exports}var Xu=Z(Yu()),Qu="isISRC";function el(e){return"string"==typeof e&&Xu(e)}var tl,rl={exports:{}};function nl(){return tl||(tl=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e),u.test(e)};var r,n=(r=or())&&r.__esModule?r:{default:r};var i="(([a-zA-Z]{2,3}(-".concat("([A-Za-z]{3}(-[A-Za-z]{3}){0,2})",")?)|([a-zA-Z]{5,8}))"),o="(".concat("(\\d|[A-W]|[Y-Z]|[a-w]|[y-z])","(-[A-Za-z0-9]{2,8})+)"),a="(x(-[A-Za-z0-9]{1,8})+)",d="(".concat("((en-GB-oed)|(i-ami)|(i-bnn)|(i-default)|(i-enochian)|(i-hak)|(i-klingon)|(i-lux)|(i-mingo)|(i-navajo)|(i-pwn)|(i-tao)|(i-tay)|(i-tsu)|(sgn-BE-FR)|(sgn-BE-NL)|(sgn-CH-DE))","|").concat("((art-lojban)|(cel-gaulish)|(no-bok)|(no-nyn)|(zh-guoyu)|(zh-hakka)|(zh-min)|(zh-min-nan)|(zh-xiang))",")"),s="(-|_)",c="".concat(i,"(").concat(s).concat("([A-Za-z]{4})",")?(").concat(s).concat("([A-Za-z]{2}|\\d{3})",")?(").concat(s).concat("([A-Za-z0-9]{5,8}|(\\d[A-Z-a-z0-9]{3}))",")*(").concat(s).concat(o,")*(").concat(s).concat(a,")?"),u=new RegExp("(^".concat(a,"$)|(^").concat(d,"$)|(^").concat(c,"$)"));e.exports=t.default,e.exports.default=t.default}(rl,rl.exports)),rl.exports}var il=Z(nl()),ol="isLocale";function al(e){return"string"==typeof e&&il(e)}var dl,sl={exports:{}};function cl(){return dl||(dl=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,n.default)(e),0!==e.indexOf("magnet:?"))return!1;return i.test(e)};var r,n=(r=or())&&r.__esModule?r:{default:r};var i=/(?:^magnet:\?|[^?&]&)xt(?:\.1)?=urn:(?:(?:aich|bitprint|btih|ed2k|ed2khash|kzhash|md5|sha1|tree:tiger):[a-z0-9]{32}(?:[a-z0-9]{8})?|btmh:1220[a-z0-9]{64})(?:$|&)/i;e.exports=t.default,e.exports.default=t.default}(sl,sl.exports)),sl.exports}var ul=Z(cl()),ll="isMagnetURI";function fl(e){return"string"==typeof e&&ul(e)}var pl,hl={exports:{}};function yl(){return pl||(pl=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e),i.test(e)||o.test(e)||a.test(e)};var r,n=(r=or())&&r.__esModule?r:{default:r};var i=/^(application|audio|font|image|message|model|multipart|text|video)\/[a-zA-Z0-9\.\-\+_]{1,100}$/i,o=/^text\/[a-zA-Z0-9\.\-\+]{1,100};\s?charset=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?$/i,a=/^multipart\/[a-zA-Z0-9\.\-\+]{1,100}(;\s?(boundary|charset)=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?){0,2}$/i;e.exports=t.default,e.exports.default=t.default}(hl,hl.exports)),hl.exports}var ml=Z(yl()),gl="isMimeType";function _l(e){return"string"==typeof e&&ml(e)}var vl,bl={exports:{}};function Sl(){return vl||(vl=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e),i.test(e)};var r,n=(r=or())&&r.__esModule?r:{default:r};var i=/^(0o)?[0-7]+$/i;e.exports=t.default,e.exports.default=t.default}(bl,bl.exports)),bl.exports}var Il=Z(Sl()),Nl="isOctal";function $l(e){return"string"==typeof e&&Il(e)}var wl,Al={};function Ol(){if(wl)return Al;wl=1,Object.defineProperty(Al,"__esModule",{value:!0}),Al.default=function(e,n){(0,t.default)(e);var i=e.replace(/\s/g,"").toUpperCase();return n.toUpperCase()in r&&r[n].test(i)},Al.locales=void 0;var e,t=(e=or())&&e.__esModule?e:{default:e};var r={AM:/^[A-Z]{2}\d{7}$/,AR:/^[A-Z]{3}\d{6}$/,AT:/^[A-Z]\d{7}$/,AU:/^[A-Z]\d{7}$/,AZ:/^[A-Z]{1}\d{8}$/,BE:/^[A-Z]{2}\d{6}$/,BG:/^\d{9}$/,BR:/^[A-Z]{2}\d{6}$/,BY:/^[A-Z]{2}\d{7}$/,CA:/^[A-Z]{2}\d{6}$|^[A-Z]\d{6}[A-Z]{2}$/,CH:/^[A-Z]\d{7}$/,CN:/^G\d{8}$|^E(?![IO])[A-Z0-9]\d{7}$/,CY:/^[A-Z](\d{6}|\d{8})$/,CZ:/^\d{8}$/,DE:/^[CFGHJKLMNPRTVWXYZ0-9]{9}$/,DK:/^\d{9}$/,DZ:/^\d{9}$/,EE:/^([A-Z]\d{7}|[A-Z]{2}\d{7})$/,ES:/^[A-Z0-9]{2}([A-Z0-9]?)\d{6}$/,FI:/^[A-Z]{2}\d{7}$/,FR:/^\d{2}[A-Z]{2}\d{5}$/,GB:/^\d{9}$/,GR:/^[A-Z]{2}\d{7}$/,HR:/^\d{9}$/,HU:/^[A-Z]{2}(\d{6}|\d{7})$/,IE:/^[A-Z0-9]{2}\d{7}$/,IN:/^[A-Z]{1}-?\d{7}$/,ID:/^[A-C]\d{7}$/,IR:/^[A-Z]\d{8}$/,IS:/^(A)\d{7}$/,IT:/^[A-Z0-9]{2}\d{7}$/,JM:/^[Aa]\d{7}$/,JP:/^[A-Z]{2}\d{7}$/,KR:/^[MS]\d{8}$/,KZ:/^[a-zA-Z]\d{7}$/,LI:/^[a-zA-Z]\d{5}$/,LT:/^[A-Z0-9]{8}$/,LU:/^[A-Z0-9]{8}$/,LV:/^[A-Z0-9]{2}\d{7}$/,LY:/^[A-Z0-9]{8}$/,MT:/^\d{7}$/,MZ:/^([A-Z]{2}\d{7})|(\d{2}[A-Z]{2}\d{5})$/,MY:/^[AHK]\d{8}$/,MX:/^\d{10,11}$/,NL:/^[A-Z]{2}[A-Z0-9]{6}\d$/,NZ:/^([Ll]([Aa]|[Dd]|[Ff]|[Hh])|[Ee]([Aa]|[Pp])|[Nn])\d{6}$/,PH:/^([A-Z](\d{6}|\d{7}[A-Z]))|([A-Z]{2}(\d{6}|\d{7}))$/,PK:/^[A-Z]{2}\d{7}$/,PL:/^[A-Z]{2}\d{7}$/,PT:/^[A-Z]\d{6}$/,RO:/^\d{8,9}$/,RU:/^\d{9}$/,SE:/^\d{8}$/,SL:/^(P)[A-Z]\d{7}$/,SK:/^[0-9A-Z]\d{7}$/,TH:/^[A-Z]{1,2}\d{6,7}$/,TR:/^[A-Z]\d{8}$/,UA:/^[A-Z]{2}\d{6}$/,US:/^\d{9}$|^[A-Z]\d{8}$/,ZA:/^[TAMD]\d{8}$/};return Al.locales=Object.keys(r),Al}var Ml=Z(Ol()),Tl="isPassportNumber";function El(e,t){return"string"==typeof e&&Ml(e,t)}var Cl,xl={};function kl(){if(Cl)return xl;Cl=1,Object.defineProperty(xl,"__esModule",{value:!0}),xl.default=function(e,r){if((0,t.default)(e),r in a)return a[r].test(e);if("any"===r){for(var n in a){if(a.hasOwnProperty(n))if(a[n].test(e))return!0}return!1}throw new Error("Invalid locale '".concat(r,"'"))},xl.locales=void 0;var e,t=(e=or())&&e.__esModule?e:{default:e};var r=/^\d{3}$/,n=/^\d{4}$/,i=/^\d{5}$/,o=/^\d{6}$/,a={AD:/^AD\d{3}$/,AT:n,AU:n,AZ:/^AZ\d{4}$/,BA:/^([7-8]\d{4}$)/,BD:/^([1-8][0-9]{3}|9[0-4][0-9]{2})$/,BE:n,BG:n,BR:/^\d{5}-?\d{3}$/,BY:/^2[1-4]\d{4}$/,CA:/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][\s\-]?\d[ABCEGHJ-NPRSTV-Z]\d$/i,CH:n,CN:/^(0[1-7]|1[012356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[1-5]|8[1345]|9[09])\d{4}$/,CO:/^(05|08|11|13|15|17|18|19|20|23|25|27|41|44|47|50|52|54|63|66|68|70|73|76|81|85|86|88|91|94|95|97|99)(\d{4})$/,CZ:/^\d{3}\s?\d{2}$/,DE:i,DK:n,DO:i,DZ:i,EE:i,ES:/^(5[0-2]{1}|[0-4]{1}\d{1})\d{3}$/,FI:i,FR:/^(?:(?:0[1-9]|[1-8]\d|9[0-5])\d{3}|97[1-46]\d{2})$/,GB:/^(gir\s?0aa|[a-z]{1,2}\d[\da-z]?\s?(\d[a-z]{2})?)$/i,GR:/^\d{3}\s?\d{2}$/,HR:/^([1-5]\d{4}$)/,HT:/^HT\d{4}$/,HU:n,ID:i,IE:/^(?!.*(?:o))[A-Za-z]\d[\dw]\s\w{4}$/i,IL:/^(\d{5}|\d{7})$/,IN:/^((?!10|29|35|54|55|65|66|86|87|88|89)[1-9][0-9]{5})$/,IR:/^(?!(\d)\1{3})[13-9]{4}[1346-9][013-9]{5}$/,IS:r,IT:i,JP:/^\d{3}\-\d{4}$/,KE:i,KR:/^(\d{5}|\d{6})$/,LI:/^(948[5-9]|949[0-7])$/,LT:/^LT\-\d{5}$/,LU:n,LV:/^LV\-\d{4}$/,LK:i,MG:r,MX:i,MT:/^[A-Za-z]{3}\s{0,1}\d{4}$/,MY:i,NL:/^[1-9]\d{3}\s?(?!sa|sd|ss)[a-z]{2}$/i,NO:n,NP:/^(10|21|22|32|33|34|44|45|56|57)\d{3}$|^(977)$/i,NZ:n,PK:i,PL:/^\d{2}\-\d{3}$/,PR:/^00[679]\d{2}([ -]\d{4})?$/,PT:/^\d{4}\-\d{3}?$/,RO:o,RU:o,SA:i,SE:/^[1-9]\d{2}\s?\d{2}$/,SG:o,SI:n,SK:/^\d{3}\s?\d{2}$/,TH:i,TN:n,TW:/^\d{3}(\d{2,3})?$/,UA:i,US:/^\d{5}(-\d{4})?$/,ZA:n,ZM:i};return xl.locales=Object.keys(a),xl}var Pl=Z(kl()),Dl="isPostalCode";function Rl(e,t){return"string"==typeof e&&Pl(e,t)}var Fl,Bl={exports:{}};function Ll(){return Fl||(Fl=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e),l.test(e)};var r,n=(r=or())&&r.__esModule?r:{default:r};var i=/([01][0-9]|2[0-3])/,o=/[0-5][0-9]/,a=new RegExp("[-+]".concat(i.source,":").concat(o.source)),d=new RegExp("([zZ]|".concat(a.source,")")),s=new RegExp("".concat(i.source,":").concat(o.source,":").concat(/([0-5][0-9]|60)/.source).concat(/(\.[0-9]+)?/.source)),c=new RegExp("".concat(/[0-9]{4}/.source,"-").concat(/(0[1-9]|1[0-2])/.source,"-").concat(/([12]\d|0[1-9]|3[01])/.source)),u=new RegExp("".concat(s.source).concat(d.source)),l=new RegExp("^".concat(c.source,"[ tT]").concat(u.source,"$"));e.exports=t.default,e.exports.default=t.default}(Bl,Bl.exports)),Bl.exports}var Ul=Z(Ll()),Kl="isRFC3339";function jl(e){return"string"==typeof e&&Ul(e)}var Vl,Jl={exports:{}};function ql(){return Vl||(Vl=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,n.default)(e);var r=!1,u=!0;"object"!==i(t)?arguments.length>=2&&(u=arguments[1]):(r=void 0!==t.allowSpaces?t.allowSpaces:r,u=void 0!==t.includePercentValues?t.includePercentValues:u);if(r){if(!c.test(e))return!1;e=e.replace(/\s/g,"")}if(!u)return o.test(e)||a.test(e);return o.test(e)||a.test(e)||d.test(e)||s.test(e)};var r,n=(r=or())&&r.__esModule?r:{default:r};function i(e){return i="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},i(e)}var o=/^rgb\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){2}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\)$/,a=/^rgba\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){3}(0?\.\d\d?|1(\.0)?|0(\.0)?)\)$/,d=/^rgb\((([0-9]%|[1-9][0-9]%|100%),){2}([0-9]%|[1-9][0-9]%|100%)\)$/,s=/^rgba\((([0-9]%|[1-9][0-9]%|100%),){3}(0?\.\d\d?|1(\.0)?|0(\.0)?)\)$/,c=/^rgba?/;e.exports=t.default,e.exports.default=t.default}(Jl,Jl.exports)),Jl.exports}var Gl=Z(ql()),zl="isRgbColor";function Hl(e,t){return"string"==typeof e&&Gl(e,t)}var Zl,Wl,Yl={exports:{}},Xl={exports:{}};function Ql(){return Zl||(Zl=1,e=Xl,t=Xl.exports,Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r=e.join("");return new RegExp(r,t)},e.exports=t.default,e.exports.default=t.default),Xl.exports;var e,t}function ef(){return Wl||(Wl=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.default)(e),i.test(e)};var r=n(or());function n(e){return e&&e.__esModule?e:{default:e}}var i=(0,n(Ql()).default)(["^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)","(?:-((?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*))*))","?(?:\\+([0-9a-z-]+(?:\\.[0-9a-z-]+)*))?$"],"i");e.exports=t.default,e.exports.default=t.default}(Yl,Yl.exports)),Yl.exports}var tf=Z(ef()),rf="isSemVer";function nf(e){return"string"==typeof e&&tf(e)}var of,af={exports:{}},df={exports:{}};function sf(){return of||(of=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e),e=Date.parse(e),isNaN(e)?null:new Date(e)};var r,n=(r=or())&&r.__esModule?r:{default:r};e.exports=t.default,e.exports.default=t.default}(df,df.exports)),df.exports}var cf,uf={exports:{}};function lf(){return cf||(cf=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,n.default)(e),parseInt(e,t||10)};var r,n=(r=or())&&r.__esModule?r:{default:r};e.exports=t.default,e.exports.default=t.default}(uf,uf.exports)),uf.exports}var ff,pf={exports:{}};function hf(){return ff||(ff=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,n.default)(e),t)return"1"===e||/^true$/i.test(e);return"0"!==e&&!/^false$/i.test(e)&&""!==e};var r,n=(r=or())&&r.__esModule?r:{default:r};e.exports=t.default,e.exports.default=t.default}(pf,pf.exports)),pf.exports}var yf,mf={exports:{}};function gf(){return yf||(yf=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,n.default)(e),e===t};var r,n=(r=or())&&r.__esModule?r:{default:r};e.exports=t.default,e.exports.default=t.default}(mf,mf.exports)),mf.exports}var _f,vf={exports:{}};function bf(){return _f||(_f=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,r.default)(e);var i=e.split("/");if(2!==i.length)return!1;if(!o.test(i[1]))return!1;if(i[1].length>1&&i[1].startsWith("0"))return!1;var s=(0,n.default)(i[0],t);if(!s)return!1;var c=null;switch(String(t)){case"4":c=a;break;case"6":c=d;break;default:c=(0,n.default)(i[0],"6")?d:a}return i[1]<=c&&i[1]>=0};var r=i(or()),n=i(Ti());function i(e){return e&&e.__esModule?e:{default:e}}var o=/^\d{1,3}$/,a=32,d=128;e.exports=t.default,e.exports.default=t.default}(vf,vf.exports)),vf.exports}var Sf,If={exports:{}};function Nf(){return Sf||(Sf=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){t="string"==typeof t?(0,n.default)({format:t},d):(0,n.default)(t,d);if("string"==typeof e&&(v=t.format,/(^(y{4}|y{2})[.\/-](m{1,2})[.\/-](d{1,2})$)|(^(m{1,2})[.\/-](d{1,2})[.\/-]((y{4}|y{2})$))|(^(d{1,2})[.\/-](m{1,2})[.\/-]((y{4}|y{2})$))/gi.test(v))){if(t.strictMode&&e.length!==t.format.length)return!1;var r,a=t.delimiters.find(function(e){return-1!==t.format.indexOf(e)}),s=t.strictMode?a:t.delimiters.find(function(t){return-1!==e.indexOf(t)}),c=function(e,t){for(var r=[],n=Math.max(e.length,t.length),i=0;i<n;i++)r.push([e[i],t[i]]);return r}(e.split(s),t.format.toLowerCase().split(a)),u={},l=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=o(e))||t){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,d=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return d=e.done,e},e:function(e){s=!0,a=e},f:function(){try{d||null==r.return||r.return()}finally{if(s)throw a}}}}(c);try{for(l.s();!(r=l.n()).done;){var f=i(r.value,2),p=f[0],h=f[1];if(!p||!h||p.length!==h.length)return!1;u[h.charAt(0)]=p}}catch(e){l.e(e)}finally{l.f()}var y=u.y;if(y.startsWith("-"))return!1;if(2===u.y.length){var m=parseInt(u.y,10);if(isNaN(m))return!1;y=m<(new Date).getFullYear()%100?"20".concat(u.y):"19".concat(u.y)}var g=u.m;1===u.m.length&&(g="0".concat(u.m));var _=u.d;return 1===u.d.length&&(_="0".concat(u.d)),new Date("".concat(y,"-").concat(g,"-").concat(_,"T00:00:00.000Z")).getUTCDate()===+u.d}var v;if(!t.strictMode)return"[object Date]"===Object.prototype.toString.call(e)&&isFinite(e);return!1};var r,n=(r=sr())&&r.__esModule?r:{default:r};function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,d=[],s=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t);else for(;!(s=(n=o.call(r)).done)&&(d.push(n.value),d.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return d}}(e,t)||o(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 o(e,t){if(e){if("string"==typeof e)return a(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var d={format:"YYYY/MM/DD",delimiters:["/","-"],strictMode:!1};e.exports=t.default,e.exports.default=t.default}(If,If.exports)),If.exports}var $f,wf={exports:{}};function Af(){return $f||($f=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return t=(0,n.default)(t,i),"string"==typeof e&&o[t.hourFormat][t.mode].test(e)};var r,n=(r=sr())&&r.__esModule?r:{default:r};var i={hourFormat:"hour24",mode:"default"},o={hour24:{default:/^([01]?[0-9]|2[0-3]):([0-5][0-9])$/,withSeconds:/^([01]?[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/,withOptionalSeconds:/^([01]?[0-9]|2[0-3]):([0-5][0-9])(?::([0-5][0-9]))?$/},hour12:{default:/^(0?[1-9]|1[0-2]):([0-5][0-9]) (A|P)M$/,withSeconds:/^(0?[1-9]|1[0-2]):([0-5][0-9]):([0-5][0-9]) (A|P)M$/,withOptionalSeconds:/^(0?[1-9]|1[0-2]):([0-5][0-9])(?::([0-5][0-9]))? (A|P)M$/}};e.exports=t.default,e.exports.default=t.default}(wf,wf.exports)),wf.exports}var Of,Mf={exports:{}};function Tf(){return Of||(Of=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,n.default)(e),!i.test(e))return!1;for(var t=0,r=0;r<e.length;r++)t+=r%3==0?3*e[r]:r%3==1?7*e[r]:1*e[r];return t%10==0};var r,n=(r=or())&&r.__esModule?r:{default:r};var i=/^(?!(1[3-9])|(20)|(3[3-9])|(4[0-9])|(5[0-9])|(60)|(7[3-9])|(8[1-9])|(9[0-2])|(9[3-9]))[0-9]{9}$/;e.exports=t.default,e.exports.default=t.default}(Mf,Mf.exports)),Mf.exports}var Ef,Cf={exports:{}};function xf(){return Ef||(Ef=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,n.default)(e),t=t||{};var r=i;t.allow_hyphens&&(r=o);if(!r.test(e))return!1;e=e.replace(/-/g,"");for(var a=0,d=2,s=0;s<14;s++){var c=e.substring(14-s-1,14-s),u=parseInt(c,10)*d;a+=u>=10?u%10+1:u,1===d?d+=1:d-=1}if((10-a%10)%10!==parseInt(e.substring(14,15),10))return!1;return!0};var r,n=(r=or())&&r.__esModule?r:{default:r};var i=/^[0-9]{15}$/,o=/^\d{2}-\d{6}-\d{6}-\d{1}$/;e.exports=t.default,e.exports.default=t.default}(Cf,Cf.exports)),Cf.exports}var kf,Pf={exports:{}};function Df(){return kf||(kf=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e),i.test(e)};var r,n=(r=or())&&r.__esModule?r:{default:r};var i=/^[a-f0-9]{32}$/;e.exports=t.default,e.exports.default=t.default}(Pf,Pf.exports)),Pf.exports}var Rf,Ff={exports:{}};function Bf(){return Rf||(Rf=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,r.default)(e),t=(0,n.default)(t,o),0===(t.ignore_whitespace?e.trim().length:e.length)};var r=i(or()),n=i(sr());function i(e){return e&&e.__esModule?e:{default:e}}var o={ignore_whitespace:!1};e.exports=t.default,e.exports.default=t.default}(Ff,Ff.exports)),Ff.exports}var Lf,Uf={exports:{}};function Kf(){return Lf||(Lf=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e),/^[0-7][0-9A-HJKMNP-TV-Z]{25}$/i.test(e)};var r,n=(r=or())&&r.__esModule?r:{default:r};e.exports=t.default,e.exports.default=t.default}(Uf,Uf.exports)),Uf.exports}var jf,Vf={exports:{}};function Jf(){return jf||(jf=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r=("object"===i(t)?t.comparisonDate:t)||Date().toString(),o=(0,n.default)(r),a=(0,n.default)(e);return!!(a&&o&&a>o)};var r,n=(r=sf())&&r.__esModule?r:{default:r};function i(e){return i="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},i(e)}e.exports=t.default,e.exports.default=t.default}(Vf,Vf.exports)),Vf.exports}var qf,Gf={exports:{}};function zf(){return qf||(qf=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r=("object"===i(t)?t.comparisonDate:t)||Date().toString(),o=(0,n.default)(r),a=(0,n.default)(e);return!!(a&&o&&a<o)};var r,n=(r=sf())&&r.__esModule?r:{default:r};function i(e){return i="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},i(e)}e.exports=t.default,e.exports.default=t.default}(Gf,Gf.exports)),Gf.exports}var Hf,Zf={exports:{}};function Wf(){return Hf||(Hf=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var i;if((0,r.default)(e),"[object Array]"===Object.prototype.toString.call(t)){var a=[];for(i in t)({}).hasOwnProperty.call(t,i)&&(a[i]=(0,n.default)(t[i]));return a.indexOf(e)>=0}if("object"===o(t))return t.hasOwnProperty(e);if(t&&"function"==typeof t.indexOf)return t.indexOf(e)>=0;return!1};var r=i(or()),n=i(fn());function i(e){return e&&e.__esModule?e:{default:e}}function o(e){return o="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},o(e)}e.exports=t.default,e.exports.default=t.default}(Zf,Zf.exports)),Zf.exports}var Yf,Xf,Qf={exports:{}},ep={};function tp(){if(Yf)return ep;return Yf=1,Object.defineProperty(ep,"__esModule",{value:!0}),ep.iso7064Check=function(e){for(var t=10,r=0;r<e.length-1;r++)t=(parseInt(e[r],10)+t)%10==0?9:(parseInt(e[r],10)+t)%10*2%11;return(t=1===t?0:11-t)===parseInt(e[10],10)},ep.luhnCheck=function(e){for(var t=0,r=!1,n=e.length-1;n>=0;n--){if(r){var i=2*parseInt(e[n],10);t+=i>9?i.toString().split("").map(function(e){return parseInt(e,10)}).reduce(function(e,t){return e+t},0):i}else t+=parseInt(e[n],10);r=!r}return t%10==0},ep.reverseMultiplyAndSum=function(e,t){for(var r=0,n=0;n<e.length;n++)r+=e[n]*(t-n);return r},ep.verhoeffCheck=function(e){for(var t=[[0,1,2,3,4,5,6,7,8,9],[1,2,3,4,0,6,7,8,9,5],[2,3,4,0,1,7,8,9,5,6],[3,4,0,1,2,8,9,5,6,7],[4,0,1,2,3,9,5,6,7,8],[5,9,8,7,6,0,4,3,2,1],[6,5,9,8,7,1,0,4,3,2],[7,6,5,9,8,2,1,0,4,3],[8,7,6,5,9,3,2,1,0,4],[9,8,7,6,5,4,3,2,1,0]],r=[[0,1,2,3,4,5,6,7,8,9],[1,5,7,6,2,8,3,0,9,4],[5,8,0,3,7,9,6,1,4,2],[8,9,1,6,0,4,3,5,2,7],[9,4,5,3,1,2,6,8,7,0],[4,2,8,6,5,7,3,9,0,1],[2,7,9,3,8,0,6,4,1,5],[7,0,4,6,9,1,3,2,5,8]],n=e.split("").reverse().join(""),i=0,o=0;o<n.length;o++)i=t[i][r[o%8][parseInt(n[o],10)]];return 0===i},ep}function rp(){return Xf||(Xf=1,function(e,t){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-US";(0,n.default)(e);var r=e.slice(0);if(t in l)return t in h&&(r=r.replace(h[t],"")),!!l[t].test(r)&&(!(t in f)||f[t](r));throw new Error("Invalid locale '".concat(t,"'"))};var n=a(or()),i=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,i=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,d={__proto__:null,default:e};if(null===e||"object"!=r(e)&&"function"!=typeof e)return d;if(o=t?i:n){if(o.has(e))return o.get(e);o.set(e,d)}for(var s in e)"default"!==s&&{}.hasOwnProperty.call(e,s)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,s))&&(a.get||a.set)?o(d,s,a):d[s]=e[s]);return d}(e,t)}(tp()),o=a(Nf());function a(e){return e&&e.__esModule?e:{default:e}}function d(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var c={andover:["10","12"],atlanta:["60","67"],austin:["50","53"],brookhaven:["01","02","03","04","05","06","11","13","14","16","21","22","23","25","34","51","52","54","55","56","57","58","59","65"],cincinnati:["30","32","35","36","37","38","61"],fresno:["15","24"],internet:["20","26","27","45","46","47"],kansas:["40","44"],memphis:["94","95"],ogden:["80","90"],philadelphia:["33","39","41","42","43","46","48","62","63","64","66","68","71","72","73","74","75","76","77","81","82","83","84","85","86","87","88","91","92","93","98","99"],sba:["31"]};function u(e){for(var t=!1,r=!1,n=0;n<3;n++)if(!t&&/[AEIOU]/.test(e[n]))t=!0;else if(!r&&t&&"X"===e[n])r=!0;else if(n>0){if(t&&!r&&!/[AEIOU]/.test(e[n]))return!1;if(r&&!/X/.test(e[n]))return!1}return!0}var l={"bg-BG":/^\d{10}$/,"cs-CZ":/^\d{6}\/{0,1}\d{3,4}$/,"de-AT":/^\d{9}$/,"de-DE":/^[1-9]\d{10}$/,"dk-DK":/^\d{6}-{0,1}\d{4}$/,"el-CY":/^[09]\d{7}[A-Z]$/,"el-GR":/^([0-4]|[7-9])\d{8}$/,"en-CA":/^\d{9}$/,"en-GB":/^\d{10}$|^(?!GB|NK|TN|ZZ)(?![DFIQUV])[A-Z](?![DFIQUVO])[A-Z]\d{6}[ABCD ]$/i,"en-IE":/^\d{7}[A-W][A-IW]{0,1}$/i,"en-US":/^\d{2}[- ]{0,1}\d{7}$/,"es-AR":/(20|23|24|27|30|33|34)[0-9]{8}[0-9]/,"es-ES":/^(\d{0,8}|[XYZKLM]\d{7})[A-HJ-NP-TV-Z]$/i,"et-EE":/^[1-6]\d{6}(00[1-9]|0[1-9][0-9]|[1-6][0-9]{2}|70[0-9]|710)\d$/,"fi-FI":/^\d{6}[-+A]\d{3}[0-9A-FHJ-NPR-Y]$/i,"fr-BE":/^\d{11}$/,"fr-FR":/^[0-3]\d{12}$|^[0-3]\d\s\d{2}(\s\d{3}){3}$/,"fr-LU":/^\d{13}$/,"hr-HR":/^\d{11}$/,"hu-HU":/^8\d{9}$/,"it-IT":/^[A-Z]{6}[L-NP-V0-9]{2}[A-EHLMPRST][L-NP-V0-9]{2}[A-ILMZ][L-NP-V0-9]{3}[A-Z]$/i,"lv-LV":/^\d{6}-{0,1}\d{5}$/,"mt-MT":/^\d{3,7}[APMGLHBZ]$|^([1-8])\1\d{7}$/i,"nl-NL":/^\d{9}$/,"pl-PL":/^\d{10,11}$/,"pt-BR":/(?:^\d{11}$)|(?:^\d{14}$)/,"pt-PT":/^\d{9}$/,"ro-RO":/^\d{13}$/,"sk-SK":/^\d{6}\/{0,1}\d{3,4}$/,"sl-SI":/^[1-9]\d{7}$/,"sv-SE":/^(\d{6}[-+]{0,1}\d{4}|(18|19|20)\d{6}[-+]{0,1}\d{4})$/,"uk-UA":/^\d{10}$/};l["lb-LU"]=l["fr-LU"],l["lt-LT"]=l["et-EE"],l["nl-BE"]=l["fr-BE"],l["fr-CA"]=l["en-CA"];var f={"bg-BG":function(e){var t=e.slice(0,2),r=parseInt(e.slice(2,4),10);r>40?(r-=40,t="20".concat(t)):r>20?(r-=20,t="18".concat(t)):t="19".concat(t),r<10&&(r="0".concat(r));var n="".concat(t,"/").concat(r,"/").concat(e.slice(4,6));if(!(0,o.default)(n,"YYYY/MM/DD"))return!1;for(var i=e.split("").map(function(e){return parseInt(e,10)}),a=[2,4,8,5,10,9,7,3,6],d=0,s=0;s<a.length;s++)d+=i[s]*a[s];return(d=d%11==10?0:d%11)===i[9]},"cs-CZ":function(e){e=e.replace(/\W/,"");var t=parseInt(e.slice(0,2),10);if(10===e.length)t=t<54?"20".concat(t):"19".concat(t);else{if("000"===e.slice(6))return!1;if(!(t<54))return!1;t="19".concat(t)}3===t.length&&(t=[t.slice(0,2),"0",t.slice(2)].join(""));var r=parseInt(e.slice(2,4),10);if(r>50&&(r-=50),r>20){if(parseInt(t,10)<2004)return!1;r-=20}r<10&&(r="0".concat(r));var n="".concat(t,"/").concat(r,"/").concat(e.slice(4,6));if(!(0,o.default)(n,"YYYY/MM/DD"))return!1;if(10===e.length&&parseInt(e,10)%11!=0){var i=parseInt(e.slice(0,9),10)%11;if(!(parseInt(t,10)<1986&&10===i))return!1;if(0!==parseInt(e.slice(9),10))return!1}return!0},"de-AT":function(e){return i.luhnCheck(e)},"de-DE":function(e){for(var t=e.split("").map(function(e){return parseInt(e,10)}),r=[],n=0;n<t.length-1;n++){r.push("");for(var o=0;o<t.length-1;o++)t[n]===t[o]&&(r[n]+=o)}if(2!==(r=r.filter(function(e){return e.length>1})).length&&3!==r.length)return!1;if(3===r[0].length){for(var a=r[0].split("").map(function(e){return parseInt(e,10)}),d=0,s=0;s<a.length-1;s++)a[s]+1===a[s+1]&&(d+=1);if(2===d)return!1}return i.iso7064Check(e)},"dk-DK":function(e){e=e.replace(/\W/,"");var t=parseInt(e.slice(4,6),10);switch(e.slice(6,7)){case"0":case"1":case"2":case"3":t="19".concat(t);break;case"4":case"9":t=t<37?"20".concat(t):"19".concat(t);break;default:if(t<37)t="20".concat(t);else{if(!(t>58))return!1;t="18".concat(t)}}3===t.length&&(t=[t.slice(0,2),"0",t.slice(2)].join(""));var r="".concat(t,"/").concat(e.slice(2,4),"/").concat(e.slice(0,2));if(!(0,o.default)(r,"YYYY/MM/DD"))return!1;for(var n=e.split("").map(function(e){return parseInt(e,10)}),i=0,a=4,d=0;d<9;d++)i+=n[d]*a,1===(a-=1)&&(a=7);return 1!==(i%=11)&&(0===i?0===n[9]:n[9]===11-i)},"el-CY":function(e){for(var t=e.slice(0,8).split("").map(function(e){return parseInt(e,10)}),r=0,n=1;n<t.length;n+=2)r+=t[n];for(var i=0;i<t.length;i+=2)t[i]<2?r+=1-t[i]:(r+=2*(t[i]-2)+5,t[i]>4&&(r+=2));return String.fromCharCode(r%26+65)===e.charAt(8)},"el-GR":function(e){for(var t=e.split("").map(function(e){return parseInt(e,10)}),r=0,n=0;n<8;n++)r+=t[n]*Math.pow(2,8-n);return r%11%10===t[8]},"en-CA":function(e){var t=e.split(""),r=t.filter(function(e,t){return t%2}).map(function(e){return 2*Number(e)}).join("").split("");return t.filter(function(e,t){return!(t%2)}).concat(r).map(function(e){return Number(e)}).reduce(function(e,t){return e+t})%10==0},"en-IE":function(e){var t=i.reverseMultiplyAndSum(e.split("").slice(0,7).map(function(e){return parseInt(e,10)}),8);return 9===e.length&&"W"!==e[8]&&(t+=9*(e[8].charCodeAt(0)-64)),0===(t%=23)?"W"===e[7].toUpperCase():e[7].toUpperCase()===String.fromCharCode(64+t)},"en-US":function(e){return-1!==function(){var e=[];for(var t in c)c.hasOwnProperty(t)&&e.push.apply(e,d(c[t]));return e}().indexOf(e.slice(0,2))},"es-AR":function(e){for(var t=0,r=e.split(""),n=parseInt(r.pop(),10),i=0;i<r.length;i++)t+=r[9-i]*(2+i%6);var o=11-t%11;return 11===o?o=0:10===o&&(o=9),n===o},"es-ES":function(e){var t=e.toUpperCase().split("");if(isNaN(parseInt(t[0],10))&&t.length>1){var r=0;switch(t[0]){case"Y":r=1;break;case"Z":r=2}t.splice(0,1,r)}else for(;t.length<9;)t.unshift(0);t=t.join("");var n=parseInt(t.slice(0,8),10)%23;return t[8]===["T","R","W","A","G","M","Y","F","P","D","X","B","N","J","Z","S","Q","V","H","L","C","K","E"][n]},"et-EE":function(e){var t=e.slice(1,3);switch(e.slice(0,1)){case"1":case"2":t="18".concat(t);break;case"3":case"4":t="19".concat(t);break;default:t="20".concat(t)}var r="".concat(t,"/").concat(e.slice(3,5),"/").concat(e.slice(5,7));if(!(0,o.default)(r,"YYYY/MM/DD"))return!1;for(var n=e.split("").map(function(e){return parseInt(e,10)}),i=0,a=1,d=0;d<10;d++)i+=n[d]*a,10===(a+=1)&&(a=1);if(i%11==10){i=0,a=3;for(var s=0;s<10;s++)i+=n[s]*a,10===(a+=1)&&(a=1);if(i%11==10)return 0===n[10]}return i%11===n[10]},"fi-FI":function(e){var t=e.slice(4,6);switch(e.slice(6,7)){case"+":t="18".concat(t);break;case"-":t="19".concat(t);break;default:t="20".concat(t)}var r="".concat(t,"/").concat(e.slice(2,4),"/").concat(e.slice(0,2));if(!(0,o.default)(r,"YYYY/MM/DD"))return!1;var n=parseInt(e.slice(0,6)+e.slice(7,10),10)%31;return n<10?n===parseInt(e.slice(10),10):["A","B","C","D","E","F","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y"][n-=10]===e.slice(10)},"fr-BE":function(e){if("00"!==e.slice(2,4)||"00"!==e.slice(4,6)){var t="".concat(e.slice(0,2),"/").concat(e.slice(2,4),"/").concat(e.slice(4,6));if(!(0,o.default)(t,"YY/MM/DD"))return!1}var r=97-parseInt(e.slice(0,9),10)%97,n=parseInt(e.slice(9,11),10);return r===n||(r=97-parseInt("2".concat(e.slice(0,9)),10)%97)===n},"fr-FR":function(e){return e=e.replace(/\s/g,""),parseInt(e.slice(0,10),10)%511===parseInt(e.slice(10,13),10)},"fr-LU":function(e){var t="".concat(e.slice(0,4),"/").concat(e.slice(4,6),"/").concat(e.slice(6,8));return!!(0,o.default)(t,"YYYY/MM/DD")&&(!!i.luhnCheck(e.slice(0,12))&&i.verhoeffCheck("".concat(e.slice(0,11)).concat(e[12])))},"hr-HR":function(e){return i.iso7064Check(e)},"hu-HU":function(e){for(var t=e.split("").map(function(e){return parseInt(e,10)}),r=8,n=1;n<9;n++)r+=t[n]*(n+1);return r%11===t[9]},"it-IT":function(e){var t=e.toUpperCase().split("");if(!u(t.slice(0,3)))return!1;if(!u(t.slice(3,6)))return!1;for(var r={L:"0",M:"1",N:"2",P:"3",Q:"4",R:"5",S:"6",T:"7",U:"8",V:"9"},n=0,i=[6,7,9,10,12,13,14];n<i.length;n++){var a=i[n];t[a]in r&&t.splice(a,1,r[t[a]])}var d={A:"01",B:"02",C:"03",D:"04",E:"05",H:"06",L:"07",M:"08",P:"09",R:"10",S:"11",T:"12"}[t[8]],s=parseInt(t[9]+t[10],10);s>40&&(s-=40),s<10&&(s="0".concat(s));var c="".concat(t[6]).concat(t[7],"/").concat(d,"/").concat(s);if(!(0,o.default)(c,"YY/MM/DD"))return!1;for(var l=0,f=1;f<t.length-1;f+=2){var p=parseInt(t[f],10);isNaN(p)&&(p=t[f].charCodeAt(0)-65),l+=p}for(var h={A:1,B:0,C:5,D:7,E:9,F:13,G:15,H:17,I:19,J:21,K:2,L:4,M:18,N:20,O:11,P:3,Q:6,R:8,S:12,T:14,U:16,V:10,W:22,X:25,Y:24,Z:23,0:1,1:0},y=0;y<t.length-1;y+=2){var m=0;if(t[y]in h)m=h[t[y]];else{var g=parseInt(t[y],10);m=2*g+1,g>4&&(m+=2)}l+=m}return String.fromCharCode(65+l%26)===t[15]},"lv-LV":function(e){var t=(e=e.replace(/\W/,"")).slice(0,2);if("32"!==t){if("00"!==e.slice(2,4)){var r=e.slice(4,6);switch(e[6]){case"0":r="18".concat(r);break;case"1":r="19".concat(r);break;default:r="20".concat(r)}var n="".concat(r,"/").concat(e.slice(2,4),"/").concat(t);if(!(0,o.default)(n,"YYYY/MM/DD"))return!1}for(var i=1101,a=[1,6,3,7,9,10,5,8,4,2],d=0;d<e.length-1;d++)i-=parseInt(e[d],10)*a[d];return parseInt(e[10],10)===i%11}return!0},"mt-MT":function(e){if(9!==e.length){for(var t=e.toUpperCase().split("");t.length<8;)t.unshift(0);switch(e[7]){case"A":case"P":if(0===parseInt(t[6],10))return!1;break;default:var r=parseInt(t.join("").slice(0,5),10);if(r>32e3)return!1;if(r===parseInt(t.join("").slice(5,7),10))return!1}}return!0},"nl-NL":function(e){return i.reverseMultiplyAndSum(e.split("").slice(0,8).map(function(e){return parseInt(e,10)}),9)%11===parseInt(e[8],10)},"pl-PL":function(e){if(10===e.length){for(var t=[6,5,7,2,3,4,5,6,7],r=0,n=0;n<t.length;n++)r+=parseInt(e[n],10)*t[n];return 10!==(r%=11)&&r===parseInt(e[9],10)}var i=e.slice(0,2),a=parseInt(e.slice(2,4),10);a>80?(i="18".concat(i),a-=80):a>60?(i="22".concat(i),a-=60):a>40?(i="21".concat(i),a-=40):a>20?(i="20".concat(i),a-=20):i="19".concat(i),a<10&&(a="0".concat(a));var d="".concat(i,"/").concat(a,"/").concat(e.slice(4,6));if(!(0,o.default)(d,"YYYY/MM/DD"))return!1;for(var s=0,c=1,u=0;u<e.length-1;u++)s+=parseInt(e[u],10)*c%10,(c+=2)>10?c=1:5===c&&(c+=2);return(s=10-s%10)===parseInt(e[10],10)},"pt-BR":function(e){if(11===e.length){var t,r;if(t=0,"11111111111"===e||"22222222222"===e||"33333333333"===e||"44444444444"===e||"55555555555"===e||"66666666666"===e||"77777777777"===e||"88888888888"===e||"99999999999"===e||"00000000000"===e)return!1;for(var n=1;n<=9;n++)t+=parseInt(e.substring(n-1,n),10)*(11-n);if(10===(r=10*t%11)&&(r=0),r!==parseInt(e.substring(9,10),10))return!1;t=0;for(var i=1;i<=10;i++)t+=parseInt(e.substring(i-1,i),10)*(12-i);return 10===(r=10*t%11)&&(r=0),r===parseInt(e.substring(10,11),10)}if("00000000000000"===e||"11111111111111"===e||"22222222222222"===e||"33333333333333"===e||"44444444444444"===e||"55555555555555"===e||"66666666666666"===e||"77777777777777"===e||"88888888888888"===e||"99999999999999"===e)return!1;for(var o=e.length-2,a=e.substring(0,o),d=e.substring(o),s=0,c=o-7,u=o;u>=1;u--)s+=a.charAt(o-u)*c,(c-=1)<2&&(c=9);var l=s%11<2?0:11-s%11;if(l!==parseInt(d.charAt(0),10))return!1;o+=1,a=e.substring(0,o),s=0,c=o-7;for(var f=o;f>=1;f--)s+=a.charAt(o-f)*c,(c-=1)<2&&(c=9);return(l=s%11<2?0:11-s%11)===parseInt(d.charAt(1),10)},"pt-PT":function(e){var t=11-i.reverseMultiplyAndSum(e.split("").slice(0,8).map(function(e){return parseInt(e,10)}),9)%11;return t>9?0===parseInt(e[8],10):t===parseInt(e[8],10)},"ro-RO":function(e){if("9000"!==e.slice(0,4)){var t=e.slice(1,3);switch(e[0]){case"1":case"2":t="19".concat(t);break;case"3":case"4":t="18".concat(t);break;case"5":case"6":t="20".concat(t)}var r="".concat(t,"/").concat(e.slice(3,5),"/").concat(e.slice(5,7));if(8===r.length){if(!(0,o.default)(r,"YY/MM/DD"))return!1}else if(!(0,o.default)(r,"YYYY/MM/DD"))return!1;for(var n=e.split("").map(function(e){return parseInt(e,10)}),i=[2,7,9,1,4,6,3,5,8,2,7,9],a=0,d=0;d<i.length;d++)a+=n[d]*i[d];return a%11==10?1===n[12]:n[12]===a%11}return!0},"sk-SK":function(e){if(9===e.length){if("000"===(e=e.replace(/\W/,"")).slice(6))return!1;var t=parseInt(e.slice(0,2),10);if(t>53)return!1;t=t<10?"190".concat(t):"19".concat(t);var r=parseInt(e.slice(2,4),10);r>50&&(r-=50),r<10&&(r="0".concat(r));var n="".concat(t,"/").concat(r,"/").concat(e.slice(4,6));if(!(0,o.default)(n,"YYYY/MM/DD"))return!1}return!0},"sl-SI":function(e){var t=11-i.reverseMultiplyAndSum(e.split("").slice(0,7).map(function(e){return parseInt(e,10)}),8)%11;return 10===t?0===parseInt(e[7],10):t===parseInt(e[7],10)},"sv-SE":function(e){var t=e.slice(0);e.length>11&&(t=t.slice(2));var r="",n=t.slice(2,4),a=parseInt(t.slice(4,6),10);if(e.length>11)r=e.slice(0,4);else if(r=e.slice(0,2),11===e.length&&a<60){var d=(new Date).getFullYear().toString(),s=parseInt(d.slice(0,2),10);if(d=parseInt(d,10),"-"===e[6])r=parseInt("".concat(s).concat(r),10)>d?"".concat(s-1).concat(r):"".concat(s).concat(r);else if(r="".concat(s-1).concat(r),d-parseInt(r,10)<100)return!1}a>60&&(a-=60),a<10&&(a="0".concat(a));var c="".concat(r,"/").concat(n,"/").concat(a);if(8===c.length){if(!(0,o.default)(c,"YY/MM/DD"))return!1}else if(!(0,o.default)(c,"YYYY/MM/DD"))return!1;return i.luhnCheck(e.replace(/\W/,""))},"uk-UA":function(e){for(var t=e.split("").map(function(e){return parseInt(e,10)}),r=[-1,5,7,9,4,6,10,5,7],n=0,i=0;i<r.length;i++)n+=t[i]*r[i];return n%11==10?0===t[9]:t[9]===n%11}};f["lb-LU"]=f["fr-LU"],f["lt-LT"]=f["et-EE"],f["nl-BE"]=f["fr-BE"],f["fr-CA"]=f["en-CA"];var p=/[-\\\/!@#$%\^&\*\(\)\+\=\[\]]+/g,h={"de-AT":p,"de-DE":/[\/\\]/g,"fr-BE":p};h["nl-BE"]=h["fr-BE"],e.exports=t.default,e.exports.default=t.default}(Qf,Qf.exports)),Qf.exports}var np,ip={};function op(){if(np)return ip;np=1,Object.defineProperty(ip,"__esModule",{value:!0}),ip.isFreightContainerID=void 0,ip.isISO6346=i;var e,t=(e=or())&&e.__esModule?e:{default:e};var r=/^[A-Z]{3}(U[0-9]{7})|([J,Z][0-9]{6,7})$/,n=/^[0-9]$/;function i(e){if((0,t.default)(e),e=e.toUpperCase(),!r.test(e))return!1;if(11===e.length){for(var i=0,o=0;o<e.length-1;o++)if(n.test(e[o]))i+=e[o]*Math.pow(2,o);else{var a=e.charCodeAt(o)-55;i+=(a<11?a:a>=11&&a<=20?12+a%11:a>=21&&a<=30?23+a%21:34+a%31)*Math.pow(2,o)}var d=i%11;return 10===d&&(d=0),Number(e[e.length-1])===d}return!0}return ip.isFreightContainerID=i,ip}var ap,dp={exports:{}};function sp(){return ap||(ap=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e),i.has(e)};var r,n=(r=or())&&r.__esModule?r:{default:r};var i=new Set(["aa","ab","ae","af","ak","am","an","ar","as","av","ay","az","az","ba","be","bg","bh","bi","bm","bn","bo","br","bs","ca","ce","ch","co","cr","cs","cu","cv","cy","da","de","dv","dz","ee","el","en","eo","es","et","eu","fa","ff","fi","fj","fo","fr","fy","ga","gd","gl","gn","gu","gv","ha","he","hi","ho","hr","ht","hu","hy","hz","ia","id","ie","ig","ii","ik","io","is","it","iu","ja","jv","ka","kg","ki","kj","kk","kl","km","kn","ko","kr","ks","ku","kv","kw","ky","la","lb","lg","li","ln","lo","lt","lu","lv","mg","mh","mi","mk","ml","mn","mr","ms","mt","my","na","nb","nd","ne","ng","nl","nn","no","nr","nv","ny","oc","oj","om","or","os","pa","pi","pl","ps","pt","qu","rm","rn","ro","ru","rw","sa","sc","sd","se","sg","si","sk","sl","sm","sn","so","sq","sr","ss","st","su","sv","sw","ta","te","tg","th","ti","tk","tl","tn","to","tr","ts","tt","tw","ty","ug","uk","ur","uz","ve","vi","vo","wa","wo","xh","yi","yo","za","zh","zu"]);e.exports=t.default,e.exports.default=t.default}(dp,dp.exports)),dp.exports}var cp,up={};function lp(){if(cp)return up;cp=1,Object.defineProperty(up,"__esModule",{value:!0}),up.ScriptCodes=void 0,up.default=function(e){return(0,t.default)(e),r.has(e)};var e,t=(e=or())&&e.__esModule?e:{default:e};var r=new Set(["Adlm","Afak","Aghb","Ahom","Arab","Aran","Armi","Armn","Avst","Bali","Bamu","Bass","Batk","Beng","Bhks","Blis","Bopo","Brah","Brai","Bugi","Buhd","Cakm","Cans","Cari","Cham","Cher","Chis","Chrs","Cirt","Copt","Cpmn","Cprt","Cyrl","Cyrs","Deva","Diak","Dogr","Dsrt","Dupl","Egyd","Egyh","Egyp","Elba","Elym","Ethi","Gara","Geok","Geor","Glag","Gong","Gonm","Goth","Gran","Grek","Gujr","Gukh","Guru","Hanb","Hang","Hani","Hano","Hans","Hant","Hatr","Hebr","Hira","Hluw","Hmng","Hmnp","Hrkt","Hung","Inds","Ital","Jamo","Java","Jpan","Jurc","Kali","Kana","Kawi","Khar","Khmr","Khoj","Kitl","Kits","Knda","Kore","Kpel","Krai","Kthi","Lana","Laoo","Latf","Latg","Latn","Leke","Lepc","Limb","Lina","Linb","Lisu","Loma","Lyci","Lydi","Mahj","Maka","Mand","Mani","Marc","Maya","Medf","Mend","Merc","Mero","Mlym","Modi","Mong","Moon","Mroo","Mtei","Mult","Mymr","Nagm","Nand","Narb","Nbat","Newa","Nkdb","Nkgb","Nkoo","Nshu","Ogam","Olck","Onao","Orkh","Orya","Osge","Osma","Ougr","Palm","Pauc","Pcun","Pelm","Perm","Phag","Phli","Phlp","Phlv","Phnx","Plrd","Piqd","Prti","Psin","Qaaa","Qaab","Qaac","Qaad","Qaae","Qaaf","Qaag","Qaah","Qaai","Qaaj","Qaak","Qaal","Qaam","Qaan","Qaao","Qaap","Qaaq","Qaar","Qaas","Qaat","Qaau","Qaav","Qaaw","Qaax","Qaay","Qaaz","Qaba","Qabb","Qabc","Qabd","Qabe","Qabf","Qabg","Qabh","Qabi","Qabj","Qabk","Qabl","Qabm","Qabn","Qabo","Qabp","Qabq","Qabr","Qabs","Qabt","Qabu","Qabv","Qabw","Qabx","Ranj","Rjng","Rohg","Roro","Runr","Samr","Sara","Sarb","Saur","Sgnw","Shaw","Shrd","Shui","Sidd","Sidt","Sind","Sinh","Sogd","Sogo","Sora","Soyo","Sund","Sunu","Sylo","Syrc","Syre","Syrj","Syrn","Tagb","Takr","Tale","Talu","Taml","Tang","Tavt","Tayo","Telu","Teng","Tfng","Tglg","Thaa","Thai","Tibt","Tirh","Tnsa","Todr","Tols","Toto","Tutg","Ugar","Vaii","Visp","Vith","Wara","Wcho","Wole","Xpeo","Xsux","Yezi","Yiii","Zanb","Zinh","Zmth","Zsye","Zsym","Zxxx","Zyyy","Zzzz"]);return up.ScriptCodes=r,up}var fp,pp={exports:{}};function hp(){return fp||(fp=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e),i.has(e)};var r,n=(r=or())&&r.__esModule?r:{default:r};var i=new Set(["004","008","010","012","016","020","024","028","031","032","036","040","044","048","050","051","052","056","060","064","068","070","072","074","076","084","086","090","092","096","100","104","108","112","116","120","124","132","136","140","144","148","152","156","158","162","166","170","174","175","178","180","184","188","191","192","196","203","204","208","212","214","218","222","226","231","232","233","234","238","239","242","246","248","250","254","258","260","262","266","268","270","275","276","288","292","296","300","304","308","312","316","320","324","328","332","334","336","340","344","348","352","356","360","364","368","372","376","380","384","388","392","398","400","404","408","410","414","417","418","422","426","428","430","434","438","440","442","446","450","454","458","462","466","470","474","478","480","484","492","496","498","499","500","504","508","512","516","520","524","528","531","533","534","535","540","548","554","558","562","566","570","574","578","580","581","583","584","585","586","591","598","600","604","608","612","616","620","624","626","630","634","638","642","643","646","652","654","659","660","662","663","666","670","674","678","682","686","688","690","694","702","703","704","705","706","710","716","724","728","729","732","740","744","748","752","756","760","762","764","768","772","776","780","784","788","792","795","796","798","800","804","807","818","826","831","832","833","834","840","850","854","858","860","862","876","882","887","894"]);e.exports=t.default,e.exports.default=t.default}(pp,pp.exports)),pp.exports}var yp,mp={};function gp(){if(yp)return mp;yp=1,Object.defineProperty(mp,"__esModule",{value:!0}),mp.CurrencyCodes=void 0,mp.default=function(e){return(0,t.default)(e),r.has(e.toUpperCase())};var e,t=(e=or())&&e.__esModule?e:{default:e};var r=new Set(["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BOV","BRL","BSD","BTN","BWP","BYN","BZD","CAD","CDF","CHE","CHF","CHW","CLF","CLP","CNY","COP","COU","CRC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRU","MUR","MVR","MWK","MXN","MXV","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLE","SLL","SOS","SRD","SSP","STN","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","USN","UYI","UYU","UYW","UZS","VED","VES","VND","VUV","WST","XAF","XAG","XAU","XBA","XBB","XBC","XBD","XCD","XDR","XOF","XPD","XPF","XPT","XSU","XTS","XUA","XXX","YER","ZAR","ZMW","ZWL"]);return mp.CurrencyCodes=r,mp}var _p,vp={exports:{}};function bp(){return _p||(_p=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,n.default)(e),i.test(e))return!0;return!1};var r,n=(r=or())&&r.__esModule?r:{default:r};var i=/^[A-HJ-NP-Za-km-z1-9]*$/;e.exports=t.default,e.exports.default=t.default}(vp,vp.exports)),vp.exports}var Sp,Ip={exports:{}},Np={exports:{}},$p={exports:{}};function wp(){return Sp||(Sp=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,n.default)(e),t){var r=new RegExp("[".concat(t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"]+$"),"g");return e.replace(r,"")}var i=e.length-1;for(;/\s/.test(e.charAt(i));)i-=1;return e.slice(0,i+1)};var r,n=(r=or())&&r.__esModule?r:{default:r};e.exports=t.default,e.exports.default=t.default}($p,$p.exports)),$p.exports}var Ap,Op,Mp,Tp={exports:{}};function Ep(){return Ap||(Ap=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,n.default)(e);var r=t?new RegExp("^[".concat(t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"]+"),"g"):/^\s+/g;return e.replace(r,"")};var r,n=(r=or())&&r.__esModule?r:{default:r};e.exports=t.default,e.exports.default=t.default}(Tp,Tp.exports)),Tp.exports}function Cp(){return Op||(Op=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,r.default)((0,n.default)(e,t),t)};var r=i(wp()),n=i(Ep());function i(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default,e.exports.default=t.default}(Np,Np.exports)),Np.exports}function xp(){return Mp||(Mp=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,i.default)(e),0!==e.indexOf("mailto:"))return!1;var o=a(e.replace("mailto:","").split("?"),2),s=o[0],c=o[1],u=void 0===c?"":c;if(!s&&!u)return!0;var l=function(e){var t=new Set(["subject","body","cc","bcc"]),r={cc:"",bcc:""},n=!1,i=e.split("&");if(i.length>4)return!1;var o,s=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=d(e))||t){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(i);try{for(s.s();!(o=s.n()).done;){var c=a(o.value.split("="),2),u=c[0],l=c[1];if(u&&!t.has(u)){n=!0;break}!l||"cc"!==u&&"bcc"!==u||(r[u]=l),u&&t.delete(u)}}catch(e){s.e(e)}finally{s.f()}return!n&&r}(u);if(!l)return!1;return"".concat(s,",").concat(l.cc,",").concat(l.bcc).split(",").every(function(e){return!(e=(0,r.default)(e," "))||(0,n.default)(e,t)})};var r=o(Cp()),n=o(Ei()),i=o(or());function o(e){return e&&e.__esModule?e:{default:e}}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,d=[],s=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t);else for(;!(s=(n=o.call(r)).done)&&(d.push(n.value),d.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return d}}(e,t)||d(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 d(e,t){if(e){if("string"==typeof e)return s(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}e.exports=t.default,e.exports.default=t.default}(Ip,Ip.exports)),Ip.exports}var kp,Pp={exports:{}};function Dp(){return kp||(kp=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e),e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\//g,"&#x2F;").replace(/\\/g,"&#x5C;").replace(/`/g,"&#96;")};var r,n=(r=or())&&r.__esModule?r:{default:r};e.exports=t.default,e.exports.default=t.default}(Pp,Pp.exports)),Pp.exports}var Rp,Fp={exports:{}};function Bp(){return Rp||(Rp=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e),e.replace(/&quot;/g,'"').replace(/&#x27;/g,"'").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&#x2F;/g,"/").replace(/&#x5C;/g,"\\").replace(/&#96;/g,"`").replace(/&amp;/g,"&")};var r,n=(r=or())&&r.__esModule?r:{default:r};e.exports=t.default,e.exports.default=t.default}(Fp,Fp.exports)),Fp.exports}var Lp,Up,Kp={exports:{}},jp={exports:{}};function Vp(){return Lp||(Lp=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,n.default)(e),e.replace(new RegExp("[".concat(t,"]+"),"g"),"")};var r,n=(r=or())&&r.__esModule?r:{default:r};e.exports=t.default,e.exports.default=t.default}(jp,jp.exports)),jp.exports}function Jp(){return Up||(Up=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,r.default)(e);var i=t?"\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F":"\\x00-\\x1F\\x7F";return(0,n.default)(e,i)};var r=i(or()),n=i(Vp());function i(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default,e.exports.default=t.default}(Kp,Kp.exports)),Kp.exports}var qp,Gp={exports:{}};function zp(){return qp||(qp=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,n.default)(e),e.replace(new RegExp("[^".concat(t,"]+"),"g"),"")};var r,n=(r=or())&&r.__esModule?r:{default:r};e.exports=t.default,e.exports.default=t.default}(Gp,Gp.exports)),Gp.exports}var Hp,Zp={exports:{}};function Wp(){return Hp||(Hp=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,n.default)(e);for(var r=e.length-1;r>=0;r--)if(-1===t.indexOf(e[r]))return!1;return!0};var r,n=(r=or())&&r.__esModule?r:{default:r};e.exports=t.default,e.exports.default=t.default}(Zp,Zp.exports)),Zp.exports}var Yp,Xp={exports:{}};function Qp(){return Yp||(Yp=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){t=(0,n.default)(t,i);var r=e.split("@"),u=r.pop(),l=[r.join("@"),u];if(l[1]=l[1].toLowerCase(),"gmail.com"===l[1]||"googlemail.com"===l[1]){if(t.gmail_remove_subaddress&&(l[0]=l[0].split("+")[0]),t.gmail_remove_dots&&(l[0]=l[0].replace(/\.+/g,c)),!l[0].length)return!1;(t.all_lowercase||t.gmail_lowercase)&&(l[0]=l[0].toLowerCase()),l[1]=t.gmail_convert_googlemaildotcom?"gmail.com":l[1]}else if(o.indexOf(l[1])>=0){if(t.icloud_remove_subaddress&&(l[0]=l[0].split("+")[0]),!l[0].length)return!1;(t.all_lowercase||t.icloud_lowercase)&&(l[0]=l[0].toLowerCase())}else if(a.indexOf(l[1])>=0){if(t.outlookdotcom_remove_subaddress&&(l[0]=l[0].split("+")[0]),!l[0].length)return!1;(t.all_lowercase||t.outlookdotcom_lowercase)&&(l[0]=l[0].toLowerCase())}else if(d.indexOf(l[1])>=0){if(t.yahoo_remove_subaddress){var f=l[0].split("-");l[0]=f.length>1?f.slice(0,-1).join("-"):f[0]}if(!l[0].length)return!1;(t.all_lowercase||t.yahoo_lowercase)&&(l[0]=l[0].toLowerCase())}else s.indexOf(l[1])>=0?((t.all_lowercase||t.yandex_lowercase)&&(l[0]=l[0].toLowerCase()),l[1]=t.yandex_convert_yandexru?"yandex.ru":l[1]):t.all_lowercase&&(l[0]=l[0].toLowerCase());return l.join("@")};var r,n=(r=sr())&&r.__esModule?r:{default:r};var i={all_lowercase:!0,gmail_lowercase:!0,gmail_remove_dots:!0,gmail_remove_subaddress:!0,gmail_convert_googlemaildotcom:!0,outlookdotcom_lowercase:!0,outlookdotcom_remove_subaddress:!0,yahoo_lowercase:!0,yahoo_remove_subaddress:!0,yandex_lowercase:!0,yandex_convert_yandexru:!0,icloud_lowercase:!0,icloud_remove_subaddress:!0},o=["icloud.com","me.com"],a=["hotmail.at","hotmail.be","hotmail.ca","hotmail.cl","hotmail.co.il","hotmail.co.nz","hotmail.co.th","hotmail.co.uk","hotmail.com","hotmail.com.ar","hotmail.com.au","hotmail.com.br","hotmail.com.gr","hotmail.com.mx","hotmail.com.pe","hotmail.com.tr","hotmail.com.vn","hotmail.cz","hotmail.de","hotmail.dk","hotmail.es","hotmail.fr","hotmail.hu","hotmail.id","hotmail.ie","hotmail.in","hotmail.it","hotmail.jp","hotmail.kr","hotmail.lv","hotmail.my","hotmail.ph","hotmail.pt","hotmail.sa","hotmail.sg","hotmail.sk","live.be","live.co.uk","live.com","live.com.ar","live.com.mx","live.de","live.es","live.eu","live.fr","live.it","live.nl","msn.com","outlook.at","outlook.be","outlook.cl","outlook.co.il","outlook.co.nz","outlook.co.th","outlook.com","outlook.com.ar","outlook.com.au","outlook.com.br","outlook.com.gr","outlook.com.pe","outlook.com.tr","outlook.com.vn","outlook.cz","outlook.de","outlook.dk","outlook.es","outlook.fr","outlook.hu","outlook.id","outlook.ie","outlook.in","outlook.it","outlook.jp","outlook.kr","outlook.lv","outlook.my","outlook.ph","outlook.pt","outlook.sa","outlook.sg","outlook.sk","passport.com"],d=["rocketmail.com","yahoo.ca","yahoo.co.uk","yahoo.com","yahoo.de","yahoo.fr","yahoo.in","yahoo.it","ymail.com"],s=["yandex.ru","yandex.ua","yandex.kz","yandex.com","yandex.by","ya.ru"];function c(e){return e.length>1?e:""}e.exports=t.default,e.exports.default=t.default}(Xp,Xp.exports)),Xp.exports}var eh,th={exports:{}};function rh(){return eh||(eh=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e),i.test(e)};var r,n=(r=or())&&r.__esModule?r:{default:r};var i=/^[^\s-_](?!.*?[-_]{2,})[a-z0-9-\\][^\s]*[^-_\s]$/;e.exports=t.default,e.exports.default=t.default}(th,th.exports)),th.exports}var nh,ih={exports:{}};function oh(){return nh||(nh=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,n.default)(e),t in i)return i[t](e);if("any"===t){for(var r in i){if((0,i[r])(e))return!0}return!1}throw new Error("Invalid locale '".concat(t,"'"))};var r,n=(r=or())&&r.__esModule?r:{default:r};var i={"cs-CZ":function(e){return/^(([ABCDEFHIJKLMNPRSTUVXYZ]|[0-9])-?){5,8}$/.test(e)},"de-DE":function(e){return/^((A|AA|AB|AC|AE|AH|AK|AM|AN|AÖ|AP|AS|AT|AU|AW|AZ|B|BA|BB|BC|BE|BF|BH|BI|BK|BL|BM|BN|BO|BÖ|BS|BT|BZ|C|CA|CB|CE|CO|CR|CW|D|DA|DD|DE|DH|DI|DL|DM|DN|DO|DU|DW|DZ|E|EA|EB|ED|EE|EF|EG|EH|EI|EL|EM|EN|ER|ES|EU|EW|F|FB|FD|FF|FG|FI|FL|FN|FO|FR|FS|FT|FÜ|FW|FZ|G|GA|GC|GD|GE|GF|GG|GI|GK|GL|GM|GN|GÖ|GP|GR|GS|GT|GÜ|GV|GW|GZ|H|HA|HB|HC|HD|HE|HF|HG|HH|HI|HK|HL|HM|HN|HO|HP|HR|HS|HU|HV|HX|HY|HZ|IK|IL|IN|IZ|J|JE|JL|K|KA|KB|KC|KE|KF|KG|KH|KI|KK|KL|KM|KN|KO|KR|KS|KT|KU|KW|KY|L|LA|LB|LC|LD|LF|LG|LH|LI|LL|LM|LN|LÖ|LP|LR|LU|M|MA|MB|MC|MD|ME|MG|MH|MI|MK|ML|MM|MN|MO|MQ|MR|MS|MÜ|MW|MY|MZ|N|NB|ND|NE|NF|NH|NI|NK|NM|NÖ|NP|NR|NT|NU|NW|NY|NZ|OA|OB|OC|OD|OE|OF|OG|OH|OK|OL|OP|OS|OZ|P|PA|PB|PE|PF|PI|PL|PM|PN|PR|PS|PW|PZ|R|RA|RC|RD|RE|RG|RH|RI|RL|RM|RN|RO|RP|RS|RT|RU|RV|RW|RZ|S|SB|SC|SE|SG|SI|SK|SL|SM|SN|SO|SP|SR|ST|SU|SW|SY|SZ|TE|TF|TG|TO|TP|TR|TS|TT|TÜ|ÜB|UE|UH|UL|UM|UN|V|VB|VG|VK|VR|VS|W|WA|WB|WE|WF|WI|WK|WL|WM|WN|WO|WR|WS|WT|WÜ|WW|WZ|Z|ZE|ZI|ZP|ZR|ZW|ZZ)[- ]?[A-Z]{1,2}[- ]?\d{1,4}|(ABG|ABI|AIB|AIC|ALF|ALZ|ANA|ANG|ANK|APD|ARN|ART|ASL|ASZ|AUR|AZE|BAD|BAR|BBG|BCH|BED|BER|BGD|BGL|BID|BIN|BIR|BIT|BIW|BKS|BLB|BLK|BNA|BOG|BOH|BOR|BOT|BRA|BRB|BRG|BRK|BRL|BRV|BSB|BSK|BTF|BÜD|BUL|BÜR|BÜS|BÜZ|CAS|CHA|CLP|CLZ|COC|COE|CUX|DAH|DAN|DAU|DBR|DEG|DEL|DGF|DIL|DIN|DIZ|DKB|DLG|DON|DUD|DÜW|EBE|EBN|EBS|ECK|EIC|EIL|EIN|EIS|EMD|EMS|ERB|ERH|ERK|ERZ|ESB|ESW|FDB|FDS|FEU|FFB|FKB|FLÖ|FOR|FRG|FRI|FRW|FTL|FÜS|GAN|GAP|GDB|GEL|GEO|GER|GHA|GHC|GLA|GMN|GNT|GOA|GOH|GRA|GRH|GRI|GRM|GRZ|GTH|GUB|GUN|GVM|HAB|HAL|HAM|HAS|HBN|HBS|HCH|HDH|HDL|HEB|HEF|HEI|HER|HET|HGN|HGW|HHM|HIG|HIP|HMÜ|HOG|HOH|HOL|HOM|HOR|HÖS|HOT|HRO|HSK|HST|HVL|HWI|IGB|ILL|JÜL|KEH|KEL|KEM|KIB|KLE|KLZ|KÖN|KÖT|KÖZ|KRU|KÜN|KUS|KYF|LAN|LAU|LBS|LBZ|LDK|LDS|LEO|LER|LEV|LIB|LIF|LIP|LÖB|LOS|LRO|LSZ|LÜN|LUP|LWL|MAB|MAI|MAK|MAL|MED|MEG|MEI|MEK|MEL|MER|MET|MGH|MGN|MHL|MIL|MKK|MOD|MOL|MON|MOS|MSE|MSH|MSP|MST|MTK|MTL|MÜB|MÜR|MYK|MZG|NAB|NAI|NAU|NDH|NEA|NEB|NEC|NEN|NES|NEW|NMB|NMS|NOH|NOL|NOM|NOR|NVP|NWM|OAL|OBB|OBG|OCH|OHA|ÖHR|OHV|OHZ|OPR|OSL|OVI|OVL|OVP|PAF|PAN|PAR|PCH|PEG|PIR|PLÖ|PRÜ|QFT|QLB|RDG|REG|REH|REI|RID|RIE|ROD|ROF|ROK|ROL|ROS|ROT|ROW|RSL|RÜD|RÜG|SAB|SAD|SAN|SAW|SBG|SBK|SCZ|SDH|SDL|SDT|SEB|SEE|SEF|SEL|SFB|SFT|SGH|SHA|SHG|SHK|SHL|SIG|SIM|SLE|SLF|SLK|SLN|SLS|SLÜ|SLZ|SMÜ|SOB|SOG|SOK|SÖM|SON|SPB|SPN|SRB|SRO|STA|STB|STD|STE|STL|SUL|SÜW|SWA|SZB|TBB|TDO|TET|TIR|TÖL|TUT|UEM|UER|UFF|USI|VAI|VEC|VER|VIB|VIE|VIT|VOH|WAF|WAK|WAN|WAR|WAT|WBS|WDA|WEL|WEN|WER|WES|WHV|WIL|WIS|WIT|WIZ|WLG|WMS|WND|WOB|WOH|WOL|WOR|WOS|WRN|WSF|WST|WSW|WTL|WTM|WUG|WÜM|WUN|WUR|WZL|ZEL|ZIG)[- ]?(([A-Z][- ]?\d{1,4})|([A-Z]{2}[- ]?\d{1,3})))[- ]?(E|H)?$/.test(e)},"de-LI":function(e){return/^FL[- ]?\d{1,5}[UZ]?$/.test(e)},"en-IN":function(e){return/^[A-Z]{2}[ -]?[0-9]{1,2}(?:[ -]?[A-Z])(?:[ -]?[A-Z]*)?[ -]?[0-9]{4}$/.test(e)},"en-SG":function(e){return/^[A-Z]{3}[ -]?[\d]{4}[ -]?[A-Z]{1}$/.test(e)},"es-AR":function(e){return/^(([A-Z]{2} ?[0-9]{3} ?[A-Z]{2})|([A-Z]{3} ?[0-9]{3}))$/.test(e)},"fi-FI":function(e){return/^(?=.{4,7})(([A-Z]{1,3}|[0-9]{1,3})[\s-]?([A-Z]{1,3}|[0-9]{1,5}))$/.test(e)},"hu-HU":function(e){return/^((((?!AAA)(([A-NPRSTVZWXY]{1})([A-PR-Z]{1})([A-HJ-NPR-Z]))|(A[ABC]I)|A[ABC]O|A[A-W]Q|BPI|BPO|UCO|UDO|XAO)-(?!000)\d{3})|(M\d{6})|((CK|DT|CD|HC|H[ABEFIKLMNPRSTVX]|MA|OT|R[A-Z]) \d{2}-\d{2})|(CD \d{3}-\d{3})|(C-(C|X) \d{4})|(X-(A|B|C) \d{4})|(([EPVZ]-\d{5}))|(S A[A-Z]{2} \d{2})|(SP \d{2}-\d{2}))$/.test(e)},"pt-BR":function(e){return/^[A-Z]{3}[ -]?[0-9][A-Z][0-9]{2}|[A-Z]{3}[ -]?[0-9]{4}$/.test(e)},"pt-PT":function(e){return/^(([A-Z]{2}[ -·]?[0-9]{2}[ -·]?[0-9]{2})|([0-9]{2}[ -·]?[A-Z]{2}[ -·]?[0-9]{2})|([0-9]{2}[ -·]?[0-9]{2}[ -·]?[A-Z]{2})|([A-Z]{2}[ -·]?[0-9]{2}[ -·]?[A-Z]{2}))$/.test(e)},"sq-AL":function(e){return/^[A-Z]{2}[- ]?((\d{3}[- ]?(([A-Z]{2})|T))|(R[- ]?\d{3}))$/.test(e)},"sv-SE":function(e){return/^[A-HJ-PR-UW-Z]{3} ?[\d]{2}[A-HJ-PR-UW-Z1-9]$|(^[A-ZÅÄÖ ]{2,7}$)/.test(e.trim())},"en-PK":function(e){return/(^[A-Z]{2}((\s|-){0,1})[0-9]{3,4}((\s|-)[0-9]{2}){0,1}$)|(^[A-Z]{3}((\s|-){0,1})[0-9]{3,4}((\s|-)[0-9]{2}){0,1}$)|(^[A-Z]{4}((\s|-){0,1})[0-9]{3,4}((\s|-)[0-9]{2}){0,1}$)|(^[A-Z]((\s|-){0,1})[0-9]{4}((\s|-)[0-9]{2}){0,1}$)/.test(e.trim())}};e.exports=t.default,e.exports.default=t.default}(ih,ih.exports)),ih.exports}var ah,dh={exports:{}};function sh(){return ah||(ah=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;(0,n.default)(e);var i=function(e){var t=function(e){var t={};return Array.from(e).forEach(function(e){t[e]?t[e]+=1:t[e]=1}),t}(e),r={length:e.length,uniqueChars:Object.keys(t).length,uppercaseCount:0,lowercaseCount:0,numberCount:0,symbolCount:0};return Object.keys(t).forEach(function(e){o.test(e)?r.uppercaseCount+=t[e]:a.test(e)?r.lowercaseCount+=t[e]:d.test(e)?r.numberCount+=t[e]:s.test(e)&&(r.symbolCount+=t[e])}),r}(e);if(t=(0,r.default)(t||{},c),t.returnScore)return function(e,t){var r=0;r+=e.uniqueChars*t.pointsPerUnique,r+=(e.length-e.uniqueChars)*t.pointsPerRepeat,e.lowercaseCount>0&&(r+=t.pointsForContainingLower);e.uppercaseCount>0&&(r+=t.pointsForContainingUpper);e.numberCount>0&&(r+=t.pointsForContainingNumber);e.symbolCount>0&&(r+=t.pointsForContainingSymbol);return r}(i,t);return i.length>=t.minLength&&i.lowercaseCount>=t.minLowercase&&i.uppercaseCount>=t.minUppercase&&i.numberCount>=t.minNumbers&&i.symbolCount>=t.minSymbols};var r=i(sr()),n=i(or());function i(e){return e&&e.__esModule?e:{default:e}}var o=/^[A-Z]$/,a=/^[a-z]$/,d=/^[0-9]$/,s=/^[-#!$@£%^&*()_+|~=`{}\[\]:";'<>?,.\/\\ ]$/,c={minLength:8,minLowercase:1,minUppercase:1,minNumbers:1,minSymbols:1,returnScore:!1,pointsPerUnique:1,pointsPerRepeat:.5,pointsForContainingLower:10,pointsForContainingUpper:10,pointsForContainingNumber:10,pointsForContainingSymbol:10};e.exports=t.default,e.exports.default=t.default}(dh,dh.exports)),dh.exports}var ch,uh,lh={};function fh(){if(ch)return lh;function e(t){return 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},e(t)}ch=1,Object.defineProperty(lh,"__esModule",{value:!0}),lh.default=function(e,t){if((0,r.default)(e),(0,r.default)(t),t in i)return i[t](e);throw new Error("Invalid country code: '".concat(t,"'"))},lh.vatMatchers=void 0;var t,r=(t=or())&&t.__esModule?t:{default:t},n=function(t,r){if("function"==typeof WeakMap)var n=new WeakMap,i=new WeakMap;return function(t,r){if(!r&&t&&t.__esModule)return t;var o,a,d={__proto__:null,default:t};if(null===t||"object"!=e(t)&&"function"!=typeof t)return d;if(o=r?i:n){if(o.has(t))return o.get(t);o.set(t,d)}for(var s in t)"default"!==s&&{}.hasOwnProperty.call(t,s)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(t,s))&&(a.get||a.set)?o(d,s,a):d[s]=t[s]);return d}(t,r)}(tp());var i=lh.vatMatchers={AT:function(e){return/^(AT)?U\d{8}$/.test(e)},BE:function(e){return/^(BE)?\d{10}$/.test(e)},BG:function(e){return/^(BG)?\d{9,10}$/.test(e)},HR:function(e){return/^(HR)?\d{11}$/.test(e)},CY:function(e){return/^(CY)?\w{9}$/.test(e)},CZ:function(e){return/^(CZ)?\d{8,10}$/.test(e)},DK:function(e){return/^(DK)?\d{8}$/.test(e)},EE:function(e){return/^(EE)?\d{9}$/.test(e)},FI:function(e){return/^(FI)?\d{8}$/.test(e)},FR:function(e){return/^(FR)([A-Z0-9]{2}\d{9})$/.test(e)},DE:function(e){return/^(DE)?\d{9}$/.test(e)},EL:function(e){return/^(EL)?\d{9}$/.test(e)},HU:function(e){return/^(HU)?\d{8}$/.test(e)},IE:function(e){return/^(IE)?\d{7}\w{1}(W)?$/.test(e)},IT:function(e){return/^(IT)?\d{11}$/.test(e)},LV:function(e){return/^(LV)?\d{11}$/.test(e)},LT:function(e){return/^(LT)?\d{9,12}$/.test(e)},LU:function(e){return/^(LU)?\d{8}$/.test(e)},MT:function(e){return/^(MT)?\d{8}$/.test(e)},NL:function(e){return/^(NL)?\d{9}B\d{2}$/.test(e)},PL:function(e){return/^(PL)?(\d{10}|(\d{3}-\d{3}-\d{2}-\d{2})|(\d{3}-\d{2}-\d{2}-\d{3}))$/.test(e)},PT:function(e){var t=e.match(/^(PT)?(\d{9})$/);if(!t)return!1;var r=t[2],i=11-n.reverseMultiplyAndSum(r.split("").slice(0,8).map(function(e){return parseInt(e,10)}),9)%11;return i>9?0===parseInt(r[8],10):i===parseInt(r[8],10)},RO:function(e){return/^(RO)?\d{2,10}$/.test(e)},SK:function(e){return/^(SK)?\d{10}$/.test(e)},SI:function(e){return/^(SI)?\d{8}$/.test(e)},ES:function(e){return/^(ES)?\w\d{7}[A-Z]$/.test(e)},SE:function(e){return/^(SE)?\d{12}$/.test(e)},AL:function(e){return/^(AL)?\w{9}[A-Z]$/.test(e)},MK:function(e){return/^(MK)?\d{13}$/.test(e)},AU:function(e){if(!e.match(/^(AU)?(\d{11})$/))return!1;var t=[10,1,3,5,7,9,11,13,15,17,19];e=e.replace(/^AU/,"");for(var r=(parseInt(e.slice(0,1),10)-1).toString()+e.slice(1),n=0,i=0;i<11;i++)n+=t[i]*r.charAt(i);return 0!==n&&n%89==0},BY:function(e){return/^(УНП )?\d{9}$/.test(e)},CA:function(e){return/^(CA)?\d{9}$/.test(e)},IS:function(e){return/^(IS)?\d{5,6}$/.test(e)},IN:function(e){return/^(IN)?\d{15}$/.test(e)},ID:function(e){return/^(ID)?(\d{15}|(\d{2}.\d{3}.\d{3}.\d{1}-\d{3}.\d{3}))$/.test(e)},IL:function(e){return/^(IL)?\d{9}$/.test(e)},KZ:function(e){return/^(KZ)?\d{12}$/.test(e)},NZ:function(e){return/^(NZ)?\d{9}$/.test(e)},NG:function(e){return/^(NG)?(\d{12}|(\d{8}-\d{4}))$/.test(e)},NO:function(e){return/^(NO)?\d{9}MVA$/.test(e)},PH:function(e){return/^(PH)?(\d{12}|\d{3} \d{3} \d{3} \d{3})$/.test(e)},RU:function(e){return/^(RU)?(\d{10}|\d{12})$/.test(e)},SM:function(e){return/^(SM)?\d{5}$/.test(e)},SA:function(e){return/^(SA)?\d{15}$/.test(e)},RS:function(e){return/^(RS)?\d{9}$/.test(e)},CH:function(e){var t,r,n;return/^(CHE[- ]?)?(\d{9}|(\d{3}\.\d{3}\.\d{3})|(\d{3} \d{3} \d{3})) ?(TVA|MWST|IVA)?$/.test(e)&&(t=e.match(/\d/g).map(function(e){return+e}),r=t.pop(),n=[5,4,3,2,7,6,5,4],r===(11-t.reduce(function(e,t,r){return e+t*n[r]},0)%11)%11)},TR:function(e){return/^(TR)?\d{10}$/.test(e)},UA:function(e){return/^(UA)?\d{12}$/.test(e)},GB:function(e){return/^GB((\d{3} \d{4} ([0-8][0-9]|9[0-6]))|(\d{9} \d{3})|(((GD[0-4])|(HA[5-9]))[0-9]{2}))$/.test(e)},UZ:function(e){return/^(UZ)?\d{9}$/.test(e)},AR:function(e){return/^(AR)?\d{11}$/.test(e)},BO:function(e){return/^(BO)?\d{7}$/.test(e)},BR:function(e){return/^(BR)?((\d{2}.\d{3}.\d{3}\/\d{4}-\d{2})|(\d{3}.\d{3}.\d{3}-\d{2}))$/.test(e)},CL:function(e){return/^(CL)?\d{8}-\d{1}$/.test(e)},CO:function(e){return/^(CO)?\d{10}$/.test(e)},CR:function(e){return/^(CR)?\d{9,12}$/.test(e)},EC:function(e){return/^(EC)?\d{13}$/.test(e)},SV:function(e){return/^(SV)?\d{4}-\d{6}-\d{3}-\d{1}$/.test(e)},GT:function(e){return/^(GT)?\d{7}-\d{1}$/.test(e)},HN:function(e){return/^(HN)?$/.test(e)},MX:function(e){return/^(MX)?\w{3,4}\d{6}\w{3}$/.test(e)},NI:function(e){return/^(NI)?\d{3}-\d{6}-\d{4}\w{1}$/.test(e)},PA:function(e){return/^(PA)?$/.test(e)},PY:function(e){return/^(PY)?\d{6,8}-\d{1}$/.test(e)},PE:function(e){return/^(PE)?\d{11}$/.test(e)},DO:function(e){return/^(DO)?(\d{11}|(\d{3}-\d{7}-\d{1})|[1,4,5]{1}\d{8}|([1,4,5]{1})-\d{2}-\d{5}-\d{1})$/.test(e)},UY:function(e){return/^(UY)?\d{12}$/.test(e)},VE:function(e){return/^(VE)?[J,G,V,E]{1}-(\d{9}|(\d{8}-\d{1}))$/.test(e)}};return lh}function ph(){return uh||(uh=1,function(e,t){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=Xe(sf()),i=Xe(Gr()),o=Xe(lf()),a=Xe(hf()),d=Xe(gf()),s=Xe(pn()),c=Xe(Td()),u=Xe(Ei()),l=Xe(Qa()),f=Xe(go()),p=Xe(Ti()),h=Xe(bf()),y=Xe(wi()),m=Xe(Nf()),g=Xe(Af()),_=Xe(Lc()),v=Xe(nl()),b=Xe(Tf()),S=Ye(Sn()),I=Ye(On()),N=Xe(qc()),$=Ye(Ol()),w=Xe(To()),A=Xe(la()),O=Xe(pd()),M=Xe(xf()),T=Xe(jn()),E=Xe(Li()),C=Xe(qi()),x=Xe(Yi()),k=Xe(Ka()),P=Xe(ef()),D=Xe(za()),R=Xe(Mo()),F=Ye(qr()),B=Xe(Rn()),L=Xe(uo()),U=Xe(Sl()),K=Xe(zr()),j=Xe(no()),V=Xe(ql()),J=Xe(ku()),q=Xe(Yu()),G=Ye(Lu()),z=Xe(nu()),H=Xe(Df()),Z=Xe(wc()),W=Xe(oa()),Y=Xe(Qo()),X=Xe(Bf()),Q=Xe(vd()),ee=Xe(ei()),te=Xe(Kf()),re=Xe(od()),ne=Xe(Da()),ie=Xe(Jf()),oe=Xe(zf()),ae=Xe(Wf()),de=Xe(si()),se=Xe(ci()),ce=Xe(qu()),ue=Xe(Su()),le=Xe(Ko()),fe=Xe(Do()),pe=Xe(Cc()),he=Xe(rp()),ye=Ye(ga()),me=Xe(Ou()),ge=Xe(yi()),_e=Xe(cu()),ve=op(),be=Xe(sp()),Se=Xe(zo()),Ie=Xe(Ll()),Ne=Xe(lp()),$e=Xe(Na()),we=Xe(Ta()),Ae=Xe(hp()),Oe=Xe(gp()),Me=Xe(Yc()),Te=Xe(bp()),Ee=Xe(Hn()),Ce=Xe(yu()),xe=Xe(cl()),ke=Xe(xp()),Pe=Xe(yl()),De=Xe(pr()),Re=Ye(kl()),Fe=Xe(Ep()),Be=Xe(wp()),Le=Xe(Cp()),Ue=Xe(Dp()),Ke=Xe(Bp()),je=Xe(Jp()),Ve=Xe(zp()),Je=Xe(Vp()),qe=Xe(Wp()),Ge=Xe(Qp()),ze=Xe(rh()),He=Xe(oh()),Ze=Xe(sh()),We=Xe(fh());function Ye(e,t){if("function"==typeof WeakMap)var n=new WeakMap,i=new WeakMap;return(Ye=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,d={__proto__:null,default:e};if(null===e||"object"!=r(e)&&"function"!=typeof e)return d;if(o=t?i:n){if(o.has(e))return o.get(e);o.set(e,d)}for(var s in e)"default"!==s&&{}.hasOwnProperty.call(e,s)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,s))&&(a.get||a.set)?o(d,s,a):d[s]=e[s]);return d})(e,t)}function Xe(e){return e&&e.__esModule?e:{default:e}}var Qe={version:"13.15.26",toDate:n.default,toFloat:i.default,toInt:o.default,toBoolean:a.default,equals:d.default,contains:s.default,matches:c.default,isEmail:u.default,isURL:l.default,isMACAddress:f.default,isIP:p.default,isIPRange:h.default,isFQDN:y.default,isBoolean:_.default,isIBAN:G.default,isBIC:z.default,isAbaRouting:b.default,isAlpha:S.default,isAlphaLocales:S.locales,isAlphanumeric:I.default,isAlphanumericLocales:I.locales,isNumeric:N.default,isPassportNumber:$.default,passportNumberLocales:$.locales,isPort:w.default,isLowercase:A.default,isUppercase:O.default,isAscii:T.default,isFullWidth:E.default,isHalfWidth:C.default,isVariableWidth:x.default,isMultibyte:k.default,isSemVer:P.default,isSurrogatePair:D.default,isInt:R.default,isIMEI:M.default,isFloat:F.default,isFloatLocales:F.locales,isDecimal:B.default,isHexadecimal:L.default,isOctal:U.default,isDivisibleBy:K.default,isHexColor:j.default,isRgbColor:V.default,isHSL:J.default,isISRC:q.default,isMD5:H.default,isHash:Z.default,isJWT:W.default,isJSON:Y.default,isEmpty:X.default,isLength:Q.default,isLocale:v.default,isByteLength:ee.default,isULID:te.default,isUUID:re.default,isMongoId:ne.default,isAfter:ie.default,isBefore:oe.default,isIn:ae.default,isLuhnNumber:de.default,isCreditCard:se.default,isIdentityCard:ce.default,isEAN:ue.default,isISIN:le.default,isISBN:fe.default,isISSN:pe.default,isMobilePhone:ye.default,isMobilePhoneLocales:ye.locales,isPostalCode:Re.default,isPostalCodeLocales:Re.locales,isEthereumAddress:me.default,isCurrency:ge.default,isBtcAddress:_e.default,isISO6346:ve.isISO6346,isFreightContainerID:ve.isFreightContainerID,isISO6391:be.default,isISO8601:Se.default,isISO15924:Ne.default,isRFC3339:Ie.default,isISO31661Alpha2:$e.default,isISO31661Alpha3:we.default,isISO31661Numeric:Ae.default,isISO4217:Oe.default,isBase32:Me.default,isBase58:Te.default,isBase64:Ee.default,isDataURI:Ce.default,isMagnetURI:xe.default,isMailtoURI:ke.default,isMimeType:Pe.default,isLatLong:De.default,ltrim:Fe.default,rtrim:Be.default,trim:Le.default,escape:Ue.default,unescape:Ke.default,stripLow:je.default,whitelist:Ve.default,blacklist:Je.default,isWhitelisted:qe.default,normalizeEmail:Ge.default,toString:toString,isSlug:ze.default,isStrongPassword:Ze.default,isTaxID:he.default,isDate:m.default,isTime:g.default,isLicensePlate:He.default,isVAT:We.default,ibanLocales:G.locales};t.default=Qe,e.exports=t.default,e.exports.default=t.default}(af,af.exports)),af.exports}var hh=ph(),yh="isStrongPassword";function mh(e,t){return"string"==typeof e&&hh.isStrongPassword(e,t)}var gh="isTimeZone";function _h(e){try{return"string"==typeof e}catch(e){return!1}}var vh=Z(bp()),bh="isBase58";function Sh(e){return"string"==typeof e&&vh(e)}var Ih=Z(rp()),Nh="isTaxId";function $h(e,t){return"string"==typeof e&&Ih(e,t||"en-US")}var wh=Z(gp()),Ah="isISO4217CurrencyCode";function Oh(e){return"string"==typeof e&&wh(e)}var Mh="isBoolean";function Th(e){return e instanceof Boolean||"boolean"==typeof e}var Eh="isDate";function Ch(e){return e instanceof Date&&!isNaN(e.getTime())}var xh="isNumber";function kh(e,t){if(void 0===t&&(t={}),"number"!=typeof e)return!1;if(e===1/0||e===-1/0)return!!t.allowInfinity;if(Number.isNaN(e))return!!t.allowNaN;if(void 0!==t.maxDecimalPlaces){var r=0;if(e%1!=0&&(r=e.toString().split(".")[1].length),r>t.maxDecimalPlaces)return!1}return Number.isFinite(e)}var Ph=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},Dh="isEnum";function Rh(e,t){return Object.keys(t).map(function(e){return t[e]}).includes(e)}function Fh(e){return Object.entries(e).filter(function(e){var t=Ph(e,2),r=t[0];return t[1],isNaN(parseInt(r))}).map(function(e){var t=Ph(e,2);return t[0],t[1]})}var Bh="isInt";function Lh(e){return"number"==typeof e&&Number.isInteger(e)}var Uh="isString";function Kh(e){return e instanceof String||"string"==typeof e}var jh="isArray";function Vh(e){return Array.isArray(e)}var Jh="isObject";function qh(e){return null!=e&&("object"==typeof e||"function"==typeof e)&&!Array.isArray(e)}var Gh="arrayContains";function zh(e,t){return!!Array.isArray(e)&&t.every(function(t){return-1!==e.indexOf(t)})}var Hh="arrayNotContains";function Zh(e,t){return!!Array.isArray(e)&&t.every(function(t){return-1===e.indexOf(t)})}var Wh="arrayNotEmpty";function Yh(e){return Array.isArray(e)&&e.length>0}var Xh="arrayMinSize";function Qh(e,t){return Array.isArray(e)&&e.length>=t}var ey="arrayMaxSize";function ty(e,t){return Array.isArray(e)&&e.length<=t}var ry="arrayUnique";function ny(e,t){if(!Array.isArray(e))return!1;t&&(e=e.map(function(e){return null!=e?t(e):e}));var r=e.filter(function(e,t,r){return r.indexOf(e)===t});return e.length===r.length}var iy="isNotEmptyObject";function oy(e,t){if(!qh(e))return!1;if(!1===(null==t?void 0:t.nullable))return!Object.values(e).every(function(e){return null==e});for(var r in e)if(e.hasOwnProperty(r))return!0;return!1}var ay="isInstance";function dy(e,t){return t&&"function"==typeof t&&e instanceof t}var sy,cy=Object.freeze({__proto__:null,ARRAY_CONTAINS:Gh,ARRAY_MAX_SIZE:ey,ARRAY_MIN_SIZE:Xh,ARRAY_NOT_CONTAINS:Hh,ARRAY_NOT_EMPTY:Wh,ARRAY_UNIQUE:ry,Allow:function(e){return function(t,r){var n={type:Ft.WHITELIST,target:t.constructor,propertyName:r,validationOptions:e};Dt().addValidationMetadata(new Ot(n))}},ArrayContains:function(e,t){return Yt({name:Gh,constraints:[e],validator:{validate:function(e,t){return zh(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property must contain $constraint1 values"},t)}},t)},ArrayMaxSize:function(e,t){return Yt({name:ey,constraints:[e],validator:{validate:function(e,t){return ty(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property must contain no more than $constraint1 elements"},t)}},t)},ArrayMinSize:function(e,t){return Yt({name:Xh,constraints:[e],validator:{validate:function(e,t){return Qh(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property must contain at least $constraint1 elements"},t)}},t)},ArrayNotContains:function(e,t){return Yt({name:Hh,constraints:[e],validator:{validate:function(e,t){return Zh(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property should not contain $constraint1 values"},t)}},t)},ArrayNotEmpty:function(e){return Yt({name:Wh,validator:{validate:function(e,t){return Yh(e)},defaultMessage:Wt(function(e){return e+"$property should not be empty"},e)}},e)},ArrayUnique:function(e,t){var r="function"==typeof e?e:void 0,n="function"!=typeof e?e:t;return Yt({name:ry,validator:{validate:function(e,t){return ny(e,r)},defaultMessage:Wt(function(e){return e+"All $property's elements must be unique"},n)}},n)},CONTAINS:yn,Contains:function(e,t){return Yt({name:yn,constraints:[e],validator:{validate:function(e,t){return mn(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property must contain a $constraint1 string"},t)}},t)},EQUALS:Sr,Equals:function(e,t){return Yt({name:Sr,constraints:[e],validator:{validate:function(e,t){return Ir(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property must be equal to $constraint1"},t)}},t)},IS_ALPHA:Nn,IS_ALPHANUMERIC:Tn,IS_ARRAY:jh,IS_ASCII:Jn,IS_BASE32:Qc,IS_BASE58:bh,IS_BASE64:Wn,IS_BIC:ou,IS_BOOLEAN:Mh,IS_BOOLEAN_STRING:Kc,IS_BTC_ADDRESS:lu,IS_BYTE_LENGTH:ri,IS_CREDIT_CARD:li,IS_CURRENCY:gi,IS_DATA_URI:gu,IS_DATE:Eh,IS_DATE_STRING:Dc,IS_DECIMAL:Bn,IS_DEFINED:Xt,IS_DIVISIBLE_BY:Zr,IS_EAN:Nu,IS_EMAIL:xi,IS_EMPTY:wr,IS_ENUM:Dh,IS_ETHEREUM_ADDRESS:Tu,IS_FIREBASE_PUSH_ID:cd,IS_FQDN:Di,IS_FULL_WIDTH:Ki,IS_HALF_WIDTH:zi,IS_HASH:Oc,IS_HEXADECIMAL:fo,IS_HEX_COLOR:oo,IS_HSL:Du,IS_IBAN:Ku,IS_IDENTITY_CARD:zu,IS_IN:Tr,IS_INSTANCE:ay,IS_INT:Bh,IS_IP:Io,IS_ISBN:Fo,IS_ISIN:Vo,IS_ISO31661_ALPHA_2:wa,IS_ISO31661_ALPHA_3:Ca,IS_ISO4217_CURRENCY_CODE:Ah,IS_ISO8601:Zo,IS_ISRC:Qu,IS_ISSN:kc,IS_JSON:ta,IS_JWT:da,IS_LATITUDE:gr,IS_LATLONG:yr,IS_LENGTH:Sd,IS_LOCALE:ol,IS_LONGITUDE:vr,IS_LOWERCASE:pa,IS_MAC_ADDRESS:vo,IS_MAGNET_URI:ll,IS_MILITARY_TIME:Sc,IS_MIME_TYPE:gl,IS_MOBILE_PHONE:va,IS_MONGO_ID:Fa,IS_MULTIBYTE:Va,IS_NEGATIVE:Qr,IS_NOT_EMPTY:Or,IS_NOT_EMPTY_OBJECT:iy,IS_NOT_IN:Cr,IS_NUMBER:xh,IS_NUMBER_STRING:zc,IS_OBJECT:Jh,IS_OCTAL:Nl,IS_OPTIONAL:er,IS_PASSPORT_NUMBER:Tl,IS_PHONE_NUMBER:vc,IS_PORT:Co,IS_POSITIVE:Yr,IS_POSTAL_CODE:Dl,IS_RFC_3339:Kl,IS_RGB_COLOR:zl,IS_SEM_VER:rf,IS_STRING:Uh,IS_STRONG_PASSWORD:yh,IS_SURROGATE_PAIR:Za,IS_TAX_ID:Nh,IS_TIMEZONE:gh,IS_UPPERCASE:yd,IS_URL:td,IS_UUID:dd,IS_VARIABLE_WIDTH:Qi,IsAlpha:function(e,t){return Yt({name:Nn,constraints:[e],validator:{validate:function(e,t){return $n(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property must contain only letters (a-zA-Z)"},t)}},t)},IsAlphanumeric:function(e,t){return Yt({name:Tn,constraints:[e],validator:{validate:function(e,t){return En(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property must contain only letters and numbers"},t)}},t)},IsArray:function(e){return Yt({name:jh,validator:{validate:function(e,t){return Vh(e)},defaultMessage:Wt(function(e){return e+"$property must be an array"},e)}},e)},IsAscii:function(e){return Yt({name:Jn,validator:{validate:function(e,t){return qn(e)},defaultMessage:Wt(function(e){return e+"$property must contain only ASCII characters"},e)}},e)},IsBIC:function(e){return Yt({name:ou,validator:{validate:function(e,t){return au(e)},defaultMessage:Wt(function(e){return e+"$property must be a BIC or SWIFT code"},e)}},e)},IsBase32:function(e){return Yt({name:Qc,validator:{validate:function(e,t){return eu(e)},defaultMessage:Wt(function(e){return e+"$property must be base32 encoded"},e)}},e)},IsBase58:function(e){return Yt({name:bh,validator:{validate:function(e,t){return Sh(e)},defaultMessage:Wt(function(e){return e+"$property must be base58 encoded"},e)}},e)},IsBase64:function(e,t){return Yt({name:Wn,constraints:[e],validator:{validate:function(e,t){return Yn(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property must be base64 encoded"},t)}},t)},IsBoolean:function(e){return Yt({name:Mh,validator:{validate:function(e,t){return Th(e)},defaultMessage:Wt(function(e){return e+"$property must be a boolean value"},e)}},e)},IsBooleanString:function(e){return Yt({name:Kc,validator:{validate:function(e,t){return jc(e)},defaultMessage:Wt(function(e){return e+"$property must be a boolean string"},e)}},e)},IsBtcAddress:function(e){return Yt({name:lu,validator:{validate:function(e,t){return fu(e)},defaultMessage:Wt(function(e){return e+"$property must be a BTC address"},e)}},e)},IsByteLength:function(e,t,r){return Yt({name:ri,constraints:[e,t],validator:{validate:function(e,t){return ni(e,null==t?void 0:t.constraints[0],null==t?void 0:t.constraints[1])},defaultMessage:Wt(function(e){return e+"$property's byte length must fall into ($constraint1, $constraint2) range"},r)}},r)},IsCreditCard:function(e){return Yt({name:li,validator:{validate:function(e,t){return fi(e)},defaultMessage:Wt(function(e){return e+"$property must be a credit card"},e)}},e)},IsCurrency:function(e,t){return Yt({name:gi,constraints:[e],validator:{validate:function(e,t){return _i(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property must be a currency"},t)}},t)},IsDataURI:function(e){return Yt({name:gu,validator:{validate:function(e,t){return _u(e)},defaultMessage:Wt(function(e){return e+"$property must be a data uri format"},e)}},e)},IsDate:function(e){return Yt({name:Eh,validator:{validate:function(e,t){return Ch(e)},defaultMessage:Wt(function(e){return e+"$property must be a Date instance"},e)}},e)},IsDateString:function(e,t){return Yt({name:Dc,constraints:[e],validator:{validate:function(t){return Rc(t,e)},defaultMessage:Wt(function(e){return e+"$property must be a valid ISO 8601 date string"},t)}},t)},IsDecimal:function(e,t){return Yt({name:Bn,constraints:[e],validator:{validate:function(e,t){return Ln(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property is not a valid decimal number."},t)}},t)},IsDefined:function(e){return Yt({name:Xt,validator:{validate:function(e){return Qt(e)},defaultMessage:Wt(function(e){return e+"$property should not be null or undefined"},e)}},e)},IsDivisibleBy:function(e,t){return Yt({name:Zr,constraints:[e],validator:{validate:function(e,t){return Wr(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property must be divisible by $constraint1"},t)}},t)},IsEAN:function(e){return Yt({name:Nu,validator:{validate:function(e,t){return $u(e)},defaultMessage:Wt(function(e){return e+"$property must be an EAN (European Article Number)"},e)}},e)},IsEmail:function(e,t){return Yt({name:xi,constraints:[e],validator:{validate:function(e,t){return ki(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property must be an email"},t)}},t)},IsEmpty:function(e){return Yt({name:wr,validator:{validate:function(e,t){return Ar(e)},defaultMessage:Wt(function(e){return e+"$property must be empty"},e)}},e)},IsEnum:function(e,t){return Yt({name:Dh,constraints:[e,Fh(e)],validator:{validate:function(e,t){return Rh(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property must be one of the following values: $constraint2"},t)}},t)},IsEthereumAddress:function(e){return Yt({name:Tu,validator:{validate:function(e,t){return Eu(e)},defaultMessage:Wt(function(e){return e+"$property must be an Ethereum address"},e)}},e)},IsFQDN:function(e,t){return Yt({name:Di,constraints:[e],validator:{validate:function(e,t){return Ri(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property must be a valid domain name"},t)}},t)},IsFirebasePushId:function(e){return Yt({name:cd,validator:{validate:function(e,t){return ud(e)},defaultMessage:Wt(function(e){return e+"$property must be a Firebase Push Id"},e)}},e)},IsFullWidth:function(e){return Yt({name:Ki,validator:{validate:function(e,t){return ji(e)},defaultMessage:Wt(function(e){return e+"$property must contain a full-width characters"},e)}},e)},IsHSL:function(e){return Yt({name:Du,validator:{validate:function(e,t){return Ru(e)},defaultMessage:Wt(function(e){return e+"$property must be a HSL color"},e)}},e)},IsHalfWidth:function(e){return Yt({name:zi,validator:{validate:function(e,t){return Hi(e)},defaultMessage:Wt(function(e){return e+"$property must contain a half-width characters"},e)}},e)},IsHash:function(e,t){return Yt({name:Oc,constraints:[e],validator:{validate:function(e,t){return Mc(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property must be a hash of type $constraint1"},t)}},t)},IsHexColor:function(e){return Yt({name:oo,validator:{validate:function(e,t){return ao(e)},defaultMessage:Wt(function(e){return e+"$property must be a hexadecimal color"},e)}},e)},IsHexadecimal:function(e){return Yt({name:fo,validator:{validate:function(e,t){return po(e)},defaultMessage:Wt(function(e){return e+"$property must be a hexadecimal number"},e)}},e)},IsIBAN:function(e){return Yt({name:Ku,validator:{validate:function(e,t){return ju(e)},defaultMessage:Wt(function(e){return e+"$property must be an IBAN"},e)}},e)},IsIP:function(e,t){return Yt({name:Io,constraints:[e],validator:{validate:function(e,t){return No(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property must be an ip address"},t)}},t)},IsISBN:function(e,t){return Yt({name:Fo,constraints:[e],validator:{validate:function(e,t){return Bo(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property must be an ISBN"},t)}},t)},IsISIN:function(e){return Yt({name:Vo,validator:{validate:function(e,t){return Jo(e)},defaultMessage:Wt(function(e){return e+"$property must be an ISIN (stock/security identifier)"},e)}},e)},IsISO31661Alpha2:function(e){return Yt({name:wa,validator:{validate:function(e,t){return Aa(e)},defaultMessage:Wt(function(e){return e+"$property must be a valid ISO31661 Alpha2 code"},e)}},e)},IsISO31661Alpha3:function(e){return Yt({name:Ca,validator:{validate:function(e,t){return xa(e)},defaultMessage:Wt(function(e){return e+"$property must be a valid ISO31661 Alpha3 code"},e)}},e)},IsISO4217CurrencyCode:function(e){return Yt({name:Ah,validator:{validate:function(e,t){return Oh(e)},defaultMessage:Wt(function(e){return e+"$property must be a valid ISO4217 currency code"},e)}},e)},IsISO8601:function(e,t){return Yt({name:Zo,constraints:[e],validator:{validate:function(e,t){return Wo(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property must be a valid ISO 8601 date string"},t)}},t)},IsISRC:function(e){return Yt({name:Qu,validator:{validate:function(e,t){return el(e)},defaultMessage:Wt(function(e){return e+"$property must be an ISRC"},e)}},e)},IsISSN:function(e,t){return Yt({name:kc,constraints:[e],validator:{validate:function(e,t){return Pc(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property must be a ISSN"},t)}},t)},IsIdentityCard:function(e,t){return Yt({name:zu,constraints:[e],validator:{validate:function(e,t){return Hu(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property must be a identity card number"},t)}},t)},IsIn:function(e,t){return Yt({name:Tr,constraints:[e],validator:{validate:function(e,t){return Er(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property must be one of the following values: $constraint1"},t)}},t)},IsInstance:function(e,t){return Yt({name:ay,constraints:[e],validator:{validate:function(e,t){return dy(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e,t){return(null==t?void 0:t.constraints[0])?e+"$property must be an instance of ".concat(null==t?void 0:t.constraints[0].name):e+"".concat(ay," decorator expects and object as value, but got falsy value.")},t)}},t)},IsInt:function(e){return Yt({name:Bh,validator:{validate:function(e,t){return Lh(e)},defaultMessage:Wt(function(e){return e+"$property must be an integer number"},e)}},e)},IsJSON:function(e){return Yt({name:ta,validator:{validate:function(e,t){return ra(e)},defaultMessage:Wt(function(e){return e+"$property must be a json string"},e)}},e)},IsJWT:function(e){return Yt({name:da,validator:{validate:function(e,t){return sa(e)},defaultMessage:Wt(function(e){return e+"$property must be a jwt string"},e)}},e)},IsLatLong:function(e){return Yt({name:yr,validator:{validate:function(e,t){return mr(e)},defaultMessage:Wt(function(e){return e+"$property must be a latitude,longitude string"},e)}},e)},IsLatitude:function(e){return Yt({name:gr,validator:{validate:function(e,t){return _r(e)},defaultMessage:Wt(function(e){return e+"$property must be a latitude string or number"},e)}},e)},IsLocale:function(e){return Yt({name:ol,validator:{validate:function(e,t){return al(e)},defaultMessage:Wt(function(e){return e+"$property must be locale"},e)}},e)},IsLongitude:function(e){return Yt({name:vr,validator:{validate:function(e,t){return br(e)},defaultMessage:Wt(function(e){return e+"$property must be a longitude string or number"},e)}},e)},IsLowercase:function(e){return Yt({name:pa,validator:{validate:function(e,t){return ha(e)},defaultMessage:Wt(function(e){return e+"$property must be a lowercase string"},e)}},e)},IsMACAddress:function(e,t){var r=ho(e)?void 0:e,n=ho(e)?e:t;return Yt({name:vo,constraints:[r],validator:{validate:function(e,t){return bo(e,r)},defaultMessage:Wt(function(e){return e+"$property must be a MAC Address"},n)}},n)},IsMagnetURI:function(e){return Yt({name:ll,validator:{validate:function(e,t){return fl(e)},defaultMessage:Wt(function(e){return e+"$property must be magnet uri format"},e)}},e)},IsMilitaryTime:function(e){return Yt({name:Sc,validator:{validate:function(e,t){return Ic(e)},defaultMessage:Wt(function(e){return e+"$property must be a valid representation of military time in the format HH:MM"},e)}},e)},IsMimeType:function(e){return Yt({name:gl,validator:{validate:function(e,t){return _l(e)},defaultMessage:Wt(function(e){return e+"$property must be MIME type format"},e)}},e)},IsMobilePhone:function(e,t,r){return Yt({name:va,constraints:[e,t],validator:{validate:function(e,t){return ba(e,null==t?void 0:t.constraints[0],null==t?void 0:t.constraints[1])},defaultMessage:Wt(function(e){return e+"$property must be a phone number"},r)}},r)},IsMongoId:function(e){return Yt({name:Fa,validator:{validate:function(e,t){return Ba(e)},defaultMessage:Wt(function(e){return e+"$property must be a mongodb id"},e)}},e)},IsMultibyte:function(e){return Yt({name:Va,validator:{validate:function(e,t){return Ja(e)},defaultMessage:Wt(function(e){return e+"$property must contain one or more multibyte chars"},e)}},e)},IsNegative:function(e){return Yt({name:Qr,validator:{validate:function(e,t){return en(e)},defaultMessage:Wt(function(e){return e+"$property must be a negative number"},e)}},e)},IsNotEmpty:function(e){return Yt({name:Or,validator:{validate:function(e,t){return Mr(e)},defaultMessage:Wt(function(e){return e+"$property should not be empty"},e)}},e)},IsNotEmptyObject:function(e,t){return Yt({name:iy,constraints:[e],validator:{validate:function(e,t){return oy(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property must be a non-empty object"},t)}},t)},IsNotIn:function(e,t){return Yt({name:Cr,constraints:[e],validator:{validate:function(e,t){return xr(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property should not be one of the following values: $constraint1"},t)}},t)},IsNumber:function(e,t){return void 0===e&&(e={}),Yt({name:xh,constraints:[e],validator:{validate:function(e,t){return kh(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property must be a number conforming to the specified constraints"},t)}},t)},IsNumberString:function(e,t){return Yt({name:zc,constraints:[e],validator:{validate:function(e,t){return Hc(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property must be a number string"},t)}},t)},IsObject:function(e){return Yt({name:Jh,validator:{validate:function(e,t){return qh(e)},defaultMessage:Wt(function(e){return e+"$property must be an object"},e)}},e)},IsOctal:function(e){return Yt({name:Nl,validator:{validate:function(e,t){return $l(e)},defaultMessage:Wt(function(e){return e+"$property must be valid octal number"},e)}},e)},IsOptional:function(e){return function(t,r){var n={type:Ft.CONDITIONAL_VALIDATION,name:er,target:t.constructor,propertyName:r,constraints:[function(e,t){return null!==e[r]&&void 0!==e[r]}],validationOptions:e};Dt().addValidationMetadata(new Ot(n))}},IsPassportNumber:function(e,t){return Yt({name:Tl,constraints:[e],validator:{validate:function(e,t){return El(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property must be valid passport number"},t)}},t)},IsPhoneNumber:function(e,t){return Yt({name:vc,constraints:[e],validator:{validate:function(e,t){return bc(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property must be a valid phone number"},t)}},t)},IsPort:function(e){return Yt({name:Co,validator:{validate:function(e,t){return xo(e)},defaultMessage:Wt(function(e){return e+"$property must be a port"},e)}},e)},IsPositive:function(e){return Yt({name:Yr,validator:{validate:function(e,t){return Xr(e)},defaultMessage:Wt(function(e){return e+"$property must be a positive number"},e)}},e)},IsPostalCode:function(e,t){return Yt({name:Dl,constraints:[e],validator:{validate:function(e,t){return Rl(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property must be a postal code"},t)}},t)},IsRFC3339:function(e){return Yt({name:Kl,validator:{validate:function(e,t){return jl(e)},defaultMessage:Wt(function(e){return e+"$property must be RFC 3339 date"},e)}},e)},IsRgbColor:function(e,t){return Yt({name:zl,constraints:[e],validator:{validate:function(e,t){return Hl(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property must be RGB color"},t)}},t)},IsSemVer:function(e){return Yt({name:rf,validator:{validate:function(e,t){return nf(e)},defaultMessage:Wt(function(e){return e+"$property must be a Semantic Versioning Specification"},e)}},e)},IsString:function(e){return Yt({name:Uh,validator:{validate:function(e,t){return Kh(e)},defaultMessage:Wt(function(e){return e+"$property must be a string"},e)}},e)},IsStrongPassword:function(e,t){return Yt({name:yh,constraints:[e],validator:{validate:function(e,t){return mh(e,t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property is not strong enough"},t)}},t)},IsSurrogatePair:function(e){return Yt({name:Za,validator:{validate:function(e,t){return Wa(e)},defaultMessage:Wt(function(e){return e+"$property must contain any surrogate pairs chars"},e)}},e)},IsTaxId:function(e,t){return Yt({name:Nh,constraints:[e],validator:{validate:function(e,t){return $h(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property must be a Tax Identification Number"},t)}},t)},IsTimeZone:function(e){return Yt({name:gh,validator:{validate:function(e,t){return _h(e)},defaultMessage:Wt(function(e){return e+"$property must be a valid IANA time-zone"},e)}},e)},IsUUID:function(e,t){return Yt({name:dd,constraints:[e],validator:{validate:function(e,t){return sd(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property must be a UUID"},t)}},t)},IsUppercase:function(e){return Yt({name:yd,validator:{validate:function(e,t){return md(e)},defaultMessage:Wt(function(e){return e+"$property must be uppercase"},e)}},e)},IsUrl:function(e,t){return Yt({name:td,constraints:[e],validator:{validate:function(e,t){return rd(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property must be a URL address"},t)}},t)},IsVariableWidth:function(e){return Yt({name:Qi,validator:{validate:function(e,t){return eo(e)},defaultMessage:Wt(function(e){return e+"$property must contain a full-width and half-width characters"},e)}},e)},Length:function(e,t,r){return Yt({name:Sd,constraints:[e,t],validator:{validate:function(e,t){return Id(e,null==t?void 0:t.constraints[0],null==t?void 0:t.constraints[1])},defaultMessage:Wt(function(e,t){var r=null!==(null==t?void 0:t.constraints[0])&&void 0!==(null==t?void 0:t.constraints[0]),n=null!==(null==t?void 0:t.constraints[1])&&void 0!==(null==t?void 0:t.constraints[1]);return r&&(!t.value||t.value.length<(null==t?void 0:t.constraints[0]))?e+"$property must be longer than or equal to $constraint1 characters":n&&t.value.length>(null==t?void 0:t.constraints[1])?e+"$property must be shorter than or equal to $constraint2 characters":e+"$property must be longer than or equal to $constraint1 and shorter than or equal to $constraint2 characters"},r)}},r)},MATCHES:Cd,MAX:"max",MAX_DATE:an,MAX_LENGTH:Nd,MIN:"min",MIN_DATE:nn,MIN_LENGTH:wd,Matches:function(e,t,r){var n;return t&&t instanceof Object&&!r?r=t:n=t,Yt({name:Cd,constraints:[e,n],validator:{validate:function(e,t){return xd(e,null==t?void 0:t.constraints[0],null==t?void 0:t.constraints[1])},defaultMessage:Wt(function(e,t){return e+"$property must match $constraint1 regular expression"},r)}},r)},Max:function(e,t){return Yt({name:"max",constraints:[e],validator:{validate:function(e,t){return tn(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property must not be greater than $constraint1"},t)}},t)},MaxDate:function(e,t){return Yt({name:an,constraints:[e],validator:{validate:function(e,t){return dn(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return"maximal allowed date for "+e+"$property is $constraint1"},t)}},t)},MaxLength:function(e,t){return Yt({name:Nd,constraints:[e],validator:{validate:function(e,t){return $d(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property must be shorter than or equal to $constraint1 characters"},t)}},t)},MetadataStorage:Pt,Min:function(e,t){return Yt({name:"min",constraints:[e],validator:{validate:function(e,t){return rn(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property must not be less than $constraint1"},t)}},t)},MinDate:function(e,t){return Yt({name:nn,constraints:[e],validator:{validate:function(e,t){return on(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return"minimal allowed date for "+e+"$property is $constraint1"},t)}},t)},MinLength:function(e,t){return Yt({name:wd,constraints:[e],validator:{validate:function(e,t){return Ad(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property must be longer than or equal to $constraint1 characters"},t)}},t)},NOT_CONTAINS:gn,NOT_EQUALS:Nr,NotContains:function(e,t){return Yt({name:gn,constraints:[e],validator:{validate:function(e,t){return _n(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property should not contain a $constraint1 string"},t)}},t)},NotEquals:function(e,t){return Yt({name:Nr,constraints:[e],validator:{validate:function(e,t){return $r(e,null==t?void 0:t.constraints[0])},defaultMessage:Wt(function(e){return e+"$property should not be equal to $constraint1"},t)}},t)},Validate:function(e,t,r){return function(n,i){var o={type:Ft.CUSTOM_VALIDATION,target:n.constructor,propertyName:i,constraintCls:e,constraints:Array.isArray(t)?t:void 0,validationOptions:Array.isArray(t)?r:t};Dt().addValidationMetadata(new Ot(o))}},ValidateBy:Yt,ValidateIf:function(e,t){return function(r,n){var i={type:Ft.CONDITIONAL_VALIDATION,target:r.constructor,propertyName:n,constraints:[e],validationOptions:t};Dt().addValidationMetadata(new Ot(i))}},ValidateNested:function(e){var t=tr({},e),r=t.each?"each value in ":"";return t.message=t.message||r+"nested property $property must be either object or array",function(e,r){var n={type:Ft.NESTED_VALIDATION,target:e.constructor,propertyName:r,validationOptions:t};Dt().addValidationMetadata(new Ot(n))}},ValidatePromise:function(e){return function(t,r){var n={type:Ft.PROMISE_VALIDATION,target:t.constructor,propertyName:r,validationOptions:e};Dt().addValidationMetadata(new Ot(n))}},ValidationError:Rt,ValidationTypes:Ft,Validator:qt,ValidatorConstraint:function(e){return function(t){var r=e&&e.async,n=e&&e.name?e.name:"";n||(n=t.name)||(n=n.replace(/\.?([A-Z]+)/g,function(e,t){return"_"+t.toLowerCase()}).replace(/^_/,""));var i=new Ht(t,n,r);Dt().addConstraintMetadata(i)}},arrayContains:zh,arrayMaxSize:ty,arrayMinSize:Qh,arrayNotContains:Zh,arrayNotEmpty:Yh,arrayUnique:ny,buildMessage:Wt,contains:mn,equals:Ir,getFromContainer:zt,getMetadataStorage:Dt,isAlpha:$n,isAlphanumeric:En,isArray:Vh,isAscii:qn,isBIC:au,isBase32:eu,isBase58:Sh,isBase64:Yn,isBoolean:Th,isBooleanString:jc,isBtcAddress:fu,isByteLength:ni,isCreditCard:fi,isCurrency:_i,isDataURI:_u,isDate:Ch,isDateString:Rc,isDecimal:Ln,isDefined:Qt,isDivisibleBy:Wr,isEAN:$u,isEmail:ki,isEmpty:Ar,isEnum:Rh,isEthereumAddress:Eu,isFQDN:Ri,isFirebasePushId:ud,isFullWidth:ji,isHSL:Ru,isHalfWidth:Hi,isHash:Mc,isHexColor:ao,isHexadecimal:po,isIBAN:ju,isIP:No,isISBN:Bo,isISIN:Jo,isISO31661Alpha2:Aa,isISO31661Alpha3:xa,isISO4217CurrencyCode:Oh,isISO8601:Wo,isISRC:el,isISSN:Pc,isIdentityCard:Hu,isIn:Er,isInstance:dy,isInt:Lh,isJSON:ra,isJWT:sa,isLatLong:mr,isLatitude:_r,isLocale:al,isLongitude:br,isLowercase:ha,isMACAddress:bo,isMagnetURI:fl,isMilitaryTime:Ic,isMimeType:_l,isMobilePhone:ba,isMongoId:Ba,isMultibyte:Ja,isNegative:en,isNotEmpty:Mr,isNotEmptyObject:oy,isNotIn:xr,isNumber:kh,isNumberString:Hc,isObject:qh,isOctal:$l,isPassportNumber:El,isPhoneNumber:bc,isPort:xo,isPositive:Xr,isPostalCode:Rl,isRFC3339:jl,isRgbColor:Hl,isSemVer:nf,isString:Kh,isStrongPassword:mh,isSurrogatePair:Wa,isTaxId:$h,isTimeZone:_h,isURL:rd,isUUID:sd,isUppercase:md,isValidationOptions:ho,isVariableWidth:eo,length:Id,matches:xd,max:tn,maxDate:dn,maxLength:$d,min:rn,minDate:on,minLength:Ad,notContains:_n,notEquals:$r,registerDecorator:Zt,registerSchema:function(e){Dt().addValidationSchema(e)},useContainer:function(e,t){Bt=e,Lt=t},validate:function(e,t,r){return"string"==typeof e?zt(qt).validate(e,t,r):zt(qt).validate(e,t)},validateOrReject:function(e,t,r){return"string"==typeof e?zt(qt).validateOrReject(e,t,r):zt(qt).validateOrReject(e,t)},validateSync:function(e,t,r){return"string"==typeof e?zt(qt).validateSync(e,t,r):zt(qt).validateSync(e,t)}}),uy=W(cy),ly={},fy={exports:{}};function py(){return sy||(sy=1,function(e,t){var r="__lodash_hash_undefined__",n=9007199254740991,i="[object Arguments]",o="[object Array]",a="[object Boolean]",d="[object Date]",s="[object Error]",c="[object Function]",u="[object Map]",l="[object Number]",f="[object Object]",p="[object Promise]",h="[object RegExp]",y="[object Set]",m="[object String]",g="[object Symbol]",_="[object WeakMap]",v="[object ArrayBuffer]",b="[object DataView]",S=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,I=/^\w*$/,N=/^\./,$=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,w=/\\(\\)?/g,A=/^\[object .+?Constructor\]$/,O=/^(?:0|[1-9]\d*)$/,M={};M["[object Float32Array]"]=M["[object Float64Array]"]=M["[object Int8Array]"]=M["[object Int16Array]"]=M["[object Int32Array]"]=M["[object Uint8Array]"]=M["[object Uint8ClampedArray]"]=M["[object Uint16Array]"]=M["[object Uint32Array]"]=!0,M[i]=M[o]=M[v]=M[a]=M[b]=M[d]=M[s]=M[c]=M[u]=M[l]=M[f]=M[h]=M[y]=M[m]=M[_]=!1;var T="object"==typeof H&&H&&H.Object===Object&&H,E="object"==typeof self&&self&&self.Object===Object&&self,C=T||E||Function("return this")(),x=t&&!t.nodeType&&t,k=x&&e&&!e.nodeType&&e,P=k&&k.exports===x&&T.process,D=function(){try{return P&&P.binding("util")}catch(e){}}(),R=D&&D.isTypedArray;function F(e,t,r,n){for(var i=-1,o=e?e.length:0;++i<o;){var a=e[i];t(n,a,r(a),e)}return n}function B(e,t){for(var r=-1,n=e?e.length:0;++r<n;)if(t(e[r],r,e))return!0;return!1}function L(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function U(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function K(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var j,V,J,q=Array.prototype,G=Function.prototype,z=Object.prototype,Z=C["__core-js_shared__"],W=(j=/[^.]+$/.exec(Z&&Z.keys&&Z.keys.IE_PROTO||""))?"Symbol(src)_1."+j:"",Y=G.toString,X=z.hasOwnProperty,Q=z.toString,ee=RegExp("^"+Y.call(X).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),te=C.Symbol,re=C.Uint8Array,ne=z.propertyIsEnumerable,ie=q.splice,oe=(V=Object.keys,J=Object,function(e){return V(J(e))}),ae=Ue(C,"DataView"),de=Ue(C,"Map"),se=Ue(C,"Promise"),ce=Ue(C,"Set"),ue=Ue(C,"WeakMap"),le=Ue(Object,"create"),fe=He(ae),pe=He(de),he=He(se),ye=He(ce),me=He(ue),ge=te?te.prototype:void 0,_e=ge?ge.valueOf:void 0,ve=ge?ge.toString:void 0;function be(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Se(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Ie(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Ne(e){var t=-1,r=e?e.length:0;for(this.__data__=new Ie;++t<r;)this.add(e[t])}function $e(e){this.__data__=new Se(e)}function we(e,t){var r=et(e)||Qe(e)?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],n=r.length,i=!!n;for(var o in e)!X.call(e,o)||i&&("length"==o||je(o,n))||r.push(o);return r}function Ae(e,t){for(var r=e.length;r--;)if(Xe(e[r][0],t))return r;return-1}function Oe(e,t,r,n){return Te(e,function(e,i,o){t(n,e,r(e),o)}),n}be.prototype.clear=function(){this.__data__=le?le(null):{}},be.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},be.prototype.get=function(e){var t=this.__data__;if(le){var n=t[e];return n===r?void 0:n}return X.call(t,e)?t[e]:void 0},be.prototype.has=function(e){var t=this.__data__;return le?void 0!==t[e]:X.call(t,e)},be.prototype.set=function(e,t){return this.__data__[e]=le&&void 0===t?r:t,this},Se.prototype.clear=function(){this.__data__=[]},Se.prototype.delete=function(e){var t=this.__data__,r=Ae(t,e);return!(r<0)&&(r==t.length-1?t.pop():ie.call(t,r,1),!0)},Se.prototype.get=function(e){var t=this.__data__,r=Ae(t,e);return r<0?void 0:t[r][1]},Se.prototype.has=function(e){return Ae(this.__data__,e)>-1},Se.prototype.set=function(e,t){var r=this.__data__,n=Ae(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},Ie.prototype.clear=function(){this.__data__={hash:new be,map:new(de||Se),string:new be}},Ie.prototype.delete=function(e){return Le(this,e).delete(e)},Ie.prototype.get=function(e){return Le(this,e).get(e)},Ie.prototype.has=function(e){return Le(this,e).has(e)},Ie.prototype.set=function(e,t){return Le(this,e).set(e,t),this},Ne.prototype.add=Ne.prototype.push=function(e){return this.__data__.set(e,r),this},Ne.prototype.has=function(e){return this.__data__.has(e)},$e.prototype.clear=function(){this.__data__=new Se},$e.prototype.delete=function(e){return this.__data__.delete(e)},$e.prototype.get=function(e){return this.__data__.get(e)},$e.prototype.has=function(e){return this.__data__.has(e)},$e.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Se){var n=r.__data__;if(!de||n.length<199)return n.push([e,t]),this;r=this.__data__=new Ie(n)}return r.set(e,t),this};var Me,Te=(Me=function(e,t){return e&&Ee(e,t,st)},function(e,t){if(null==e)return e;if(!tt(e))return Me(e,t);for(var r=e.length,n=-1,i=Object(e);++n<r&&!1!==t(i[n],n,i););return e}),Ee=function(e,t,r){for(var n=-1,i=Object(e),o=r(e),a=o.length;a--;){var d=o[++n];if(!1===t(i[d],d,i))break}return e};function Ce(e,t){for(var r=0,n=(t=Ve(t,e)?[t]:Fe(t)).length;null!=e&&r<n;)e=e[ze(t[r++])];return r&&r==n?e:void 0}function xe(e,t){return null!=e&&t in Object(e)}function ke(e,t,r,n,c){return e===t||(null==e||null==t||!it(e)&&!ot(t)?e!=e&&t!=t:function(e,t,r,n,c,p){var _=et(e),S=et(t),I=o,N=o;_||(I=(I=Ke(e))==i?f:I);S||(N=(N=Ke(t))==i?f:N);var $=I==f&&!L(e),w=N==f&&!L(t),A=I==N;if(A&&!$)return p||(p=new $e),_||dt(e)?Be(e,t,r,n,c,p):function(e,t,r,n,i,o,c){switch(r){case b:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case v:return!(e.byteLength!=t.byteLength||!n(new re(e),new re(t)));case a:case d:case l:return Xe(+e,+t);case s:return e.name==t.name&&e.message==t.message;case h:case m:return e==t+"";case u:var f=U;case y:var p=2&o;if(f||(f=K),e.size!=t.size&&!p)return!1;var _=c.get(e);if(_)return _==t;o|=1,c.set(e,t);var S=Be(f(e),f(t),n,i,o,c);return c.delete(e),S;case g:if(_e)return _e.call(e)==_e.call(t)}return!1}(e,t,I,r,n,c,p);if(!(2&c)){var O=$&&X.call(e,"__wrapped__"),M=w&&X.call(t,"__wrapped__");if(O||M){var T=O?e.value():e,E=M?t.value():t;return p||(p=new $e),r(T,E,n,c,p)}}if(!A)return!1;return p||(p=new $e),function(e,t,r,n,i,o){var a=2&i,d=st(e),s=d.length,c=st(t),u=c.length;if(s!=u&&!a)return!1;var l=s;for(;l--;){var f=d[l];if(!(a?f in t:X.call(t,f)))return!1}var p=o.get(e);if(p&&o.get(t))return p==t;var h=!0;o.set(e,t),o.set(t,e);var y=a;for(;++l<s;){var m=e[f=d[l]],g=t[f];if(n)var _=a?n(g,m,f,t,e,o):n(m,g,f,e,t,o);if(!(void 0===_?m===g||r(m,g,n,i,o):_)){h=!1;break}y||(y="constructor"==f)}if(h&&!y){var v=e.constructor,b=t.constructor;v==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b||(h=!1)}return o.delete(e),o.delete(t),h}(e,t,r,n,c,p)}(e,t,ke,r,n,c))}function Pe(e){return!(!it(e)||function(e){return!!W&&W in e}(e))&&(rt(e)||L(e)?ee:A).test(He(e))}function De(e){return"function"==typeof e?e:null==e?ct:"object"==typeof e?et(e)?function(e,t){if(Ve(e)&&Je(t))return qe(ze(e),t);return function(r){var n=function(e,t,r){var n=null==e?void 0:Ce(e,t);return void 0===n?r:n}(r,e);return void 0===n&&n===t?function(e,t){return null!=e&&function(e,t,r){t=Ve(t,e)?[t]:Fe(t);var n,i=-1,o=t.length;for(;++i<o;){var a=ze(t[i]);if(!(n=null!=e&&r(e,a)))break;e=e[a]}if(n)return n;o=e?e.length:0;return!!o&&nt(o)&&je(a,o)&&(et(e)||Qe(e))}(e,t,xe)}(r,e):ke(t,n,void 0,3)}}(e[0],e[1]):function(e){var t=function(e){var t=st(e),r=t.length;for(;r--;){var n=t[r],i=e[n];t[r]=[n,i,Je(i)]}return t}(e);if(1==t.length&&t[0][2])return qe(t[0][0],t[0][1]);return function(r){return r===e||function(e,t,r,n){var i=r.length,o=i;if(null==e)return!o;for(e=Object(e);i--;){var a=r[i];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<o;){var d=(a=r[i])[0],s=e[d],c=a[1];if(a[2]){if(void 0===s&&!(d in e))return!1}else if(!ke(c,s,n,3,new $e))return!1}return!0}(r,0,t)}}(e):Ve(t=e)?function(e){return function(t){return null==t?void 0:t[e]}}(ze(t)):function(e){return function(t){return Ce(t,e)}}(t);var t}function Re(e){if(r=(t=e)&&t.constructor,n="function"==typeof r&&r.prototype||z,t!==n)return oe(e);var t,r,n,i=[];for(var o in Object(e))X.call(e,o)&&"constructor"!=o&&i.push(o);return i}function Fe(e){return et(e)?e:Ge(e)}function Be(e,t,r,n,i,o){var a=2&i,d=e.length,s=t.length;if(d!=s&&!(a&&s>d))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var u=-1,l=!0,f=1&i?new Ne:void 0;for(o.set(e,t),o.set(t,e);++u<d;){var p=e[u],h=t[u];if(n)var y=a?n(h,p,u,t,e,o):n(p,h,u,e,t,o);if(void 0!==y){if(y)continue;l=!1;break}if(f){if(!B(t,function(e,t){if(!f.has(t)&&(p===e||r(p,e,n,i,o)))return f.add(t)})){l=!1;break}}else if(p!==h&&!r(p,h,n,i,o)){l=!1;break}}return o.delete(e),o.delete(t),l}function Le(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function Ue(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return Pe(r)?r:void 0}var Ke=function(e){return Q.call(e)};function je(e,t){return!!(t=null==t?n:t)&&("number"==typeof e||O.test(e))&&e>-1&&e%1==0&&e<t}function Ve(e,t){if(et(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!at(e))||(I.test(e)||!S.test(e)||null!=t&&e in Object(t))}function Je(e){return e==e&&!it(e)}function qe(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}(ae&&Ke(new ae(new ArrayBuffer(1)))!=b||de&&Ke(new de)!=u||se&&Ke(se.resolve())!=p||ce&&Ke(new ce)!=y||ue&&Ke(new ue)!=_)&&(Ke=function(e){var t=Q.call(e),r=t==f?e.constructor:void 0,n=r?He(r):void 0;if(n)switch(n){case fe:return b;case pe:return u;case he:return p;case ye:return y;case me:return _}return t});var Ge=Ye(function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(at(e))return ve?ve.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var r=[];return N.test(e)&&r.push(""),e.replace($,function(e,t,n,i){r.push(n?i.replace(w,"$1"):t||e)}),r});function ze(e){if("string"==typeof e||at(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function He(e){if(null!=e){try{return Y.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var Ze,We=(Ze=function(e,t,r){X.call(e,r)?e[r].push(t):e[r]=[t]},function(e,t){return(et(e)?F:Oe)(e,Ze,De(t),{})});function Ye(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a),a};return r.cache=new(Ye.Cache||Ie),r}function Xe(e,t){return e===t||e!=e&&t!=t}function Qe(e){return function(e){return ot(e)&&tt(e)}(e)&&X.call(e,"callee")&&(!ne.call(e,"callee")||Q.call(e)==i)}Ye.Cache=Ie;var et=Array.isArray;function tt(e){return null!=e&&nt(e.length)&&!rt(e)}function rt(e){var t=it(e)?Q.call(e):"";return t==c||"[object GeneratorFunction]"==t}function nt(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}function it(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ot(e){return!!e&&"object"==typeof e}function at(e){return"symbol"==typeof e||ot(e)&&Q.call(e)==g}var dt=R?function(e){return function(t){return e(t)}}(R):function(e){return ot(e)&&nt(e.length)&&!!M[Q.call(e)]};function st(e){return tt(e)?we(e):Re(e)}function ct(e){return e}e.exports=We}(fy,fy.exports)),fy.exports}var hy,yy={exports:{}};function my(){return hy||(hy=1,function(e,t){var r="__lodash_hash_undefined__",n=9007199254740991,i="[object Arguments]",o="[object Function]",a="[object Object]",d=/^\[object .+?Constructor\]$/,s=/^(?:0|[1-9]\d*)$/,c={};c["[object Float32Array]"]=c["[object Float64Array]"]=c["[object Int8Array]"]=c["[object Int16Array]"]=c["[object Int32Array]"]=c["[object Uint8Array]"]=c["[object Uint8ClampedArray]"]=c["[object Uint16Array]"]=c["[object Uint32Array]"]=!0,c[i]=c["[object Array]"]=c["[object ArrayBuffer]"]=c["[object Boolean]"]=c["[object DataView]"]=c["[object Date]"]=c["[object Error]"]=c[o]=c["[object Map]"]=c["[object Number]"]=c[a]=c["[object RegExp]"]=c["[object Set]"]=c["[object String]"]=c["[object WeakMap]"]=!1;var u="object"==typeof H&&H&&H.Object===Object&&H,l="object"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function("return this")(),p=t&&!t.nodeType&&t,h=p&&e&&!e.nodeType&&e,y=h&&h.exports===p,m=y&&u.process,g=function(){try{var e=h&&h.require&&h.require("util").types;return e||m&&m.binding&&m.binding("util")}catch(e){}}(),_=g&&g.isTypedArray;var v,b=Array.prototype,S=Function.prototype,I=Object.prototype,N=f["__core-js_shared__"],$=S.toString,w=I.hasOwnProperty,A=(v=/[^.]+$/.exec(N&&N.keys&&N.keys.IE_PROTO||""))?"Symbol(src)_1."+v:"",O=I.toString,M=$.call(Object),T=RegExp("^"+$.call(w).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),E=y?f.Buffer:void 0,C=f.Symbol,x=f.Uint8Array;E&&E.allocUnsafe;var k,P,D=(k=Object.getPrototypeOf,P=Object,function(e){return k(P(e))}),R=Object.create,F=I.propertyIsEnumerable,B=b.splice,L=C?C.toStringTag:void 0,U=function(){try{var e=fe(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),K=E?E.isBuffer:void 0,j=Math.max,V=Date.now,J=fe(f,"Map"),q=fe(Object,"create"),G=function(){function e(){}return function(t){if(!$e(t))return{};if(R)return R(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function z(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Z(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function W(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Y(e){var t=this.__data__=new Z(e);this.size=t.size}function X(e,t){var r=ve(e),n=!r&&_e(e),i=!r&&!n&&Se(e),o=!r&&!n&&!i&&Ae(e),a=r||n||i||o,d=a?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],s=d.length;for(var c in e)a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||pe(c,s))||d.push(c);return d}function Q(e,t,r){(void 0!==r&&!ge(e[t],r)||void 0===r&&!(t in e))&&re(e,t,r)}function ee(e,t,r){var n=e[t];w.call(e,t)&&ge(n,r)&&(void 0!==r||t in e)||re(e,t,r)}function te(e,t){for(var r=e.length;r--;)if(ge(e[r][0],t))return r;return-1}function re(e,t,r){"__proto__"==t&&U?U(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}z.prototype.clear=function(){this.__data__=q?q(null):{},this.size=0},z.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},z.prototype.get=function(e){var t=this.__data__;if(q){var n=t[e];return n===r?void 0:n}return w.call(t,e)?t[e]:void 0},z.prototype.has=function(e){var t=this.__data__;return q?void 0!==t[e]:w.call(t,e)},z.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=q&&void 0===t?r:t,this},Z.prototype.clear=function(){this.__data__=[],this.size=0},Z.prototype.delete=function(e){var t=this.__data__,r=te(t,e);return!(r<0)&&(r==t.length-1?t.pop():B.call(t,r,1),--this.size,!0)},Z.prototype.get=function(e){var t=this.__data__,r=te(t,e);return r<0?void 0:t[r][1]},Z.prototype.has=function(e){return te(this.__data__,e)>-1},Z.prototype.set=function(e,t){var r=this.__data__,n=te(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},W.prototype.clear=function(){this.size=0,this.__data__={hash:new z,map:new(J||Z),string:new z}},W.prototype.delete=function(e){var t=le(this,e).delete(e);return this.size-=t?1:0,t},W.prototype.get=function(e){return le(this,e).get(e)},W.prototype.has=function(e){return le(this,e).has(e)},W.prototype.set=function(e,t){var r=le(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Y.prototype.clear=function(){this.__data__=new Z,this.size=0},Y.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Y.prototype.get=function(e){return this.__data__.get(e)},Y.prototype.has=function(e){return this.__data__.has(e)},Y.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Z){var n=r.__data__;if(!J||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new W(n)}return r.set(e,t),this.size=r.size,this};var ne=function(e,t,r){for(var n=-1,i=Object(e),o=r(e),a=o.length;a--;){var d=o[++n];if(!1===t(i[d],d,i))break}return e};function ie(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":L&&L in Object(e)?function(e){var t=w.call(e,L),r=e[L];try{e[L]=void 0;var n=!0}catch(e){}var i=O.call(e);n&&(t?e[L]=r:delete e[L]);return i}(e):function(e){return O.call(e)}(e)}function oe(e){return we(e)&&ie(e)==i}function ae(e){return!(!$e(e)||function(e){return!!A&&A in e}(e))&&(Ie(e)?T:d).test(function(e){if(null!=e){try{return $.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function de(e){if(!$e(e))return function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}(e);var t=he(e),r=[];for(var n in e)("constructor"!=n||!t&&w.call(e,n))&&r.push(n);return r}function se(e,t,r,n,i){e!==t&&ne(t,function(o,d){if(i||(i=new Y),$e(o))!function(e,t,r,n,i,o,d){var s=ye(e,r),c=ye(t,r),u=d.get(c);if(u)return void Q(e,r,u);var l=o?o(s,c,r+"",e,t,d):void 0,f=void 0===l;if(f){var p=ve(c),h=!p&&Se(c),y=!p&&!h&&Ae(c);l=c,p||h||y?ve(s)?l=s:we(m=s)&&be(m)?l=function(e,t){var r=-1,n=e.length;t||(t=Array(n));for(;++r<n;)t[r]=e[r];return t}(s):h?(f=!1,l=c.slice()):y?(f=!1,l=function(e){var t=function(e){var t=new e.constructor(e.byteLength);return new x(t).set(new x(e)),t}(e.buffer);return new e.constructor(t,e.byteOffset,e.length)}(c)):l=[]:function(e){if(!we(e)||ie(e)!=a)return!1;var t=D(e);if(null===t)return!0;var r=w.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&$.call(r)==M}(c)||_e(c)?(l=s,_e(s)?l=function(e){return function(e,t,r){var n=!r;r||(r={});var i=-1,o=t.length;for(;++i<o;){var a=t[i],d=void 0;void 0===d&&(d=e[a]),n?re(r,a,d):ee(r,a,d)}return r}(e,Oe(e))}(s):$e(s)&&!Ie(s)||(l=function(e){return"function"!=typeof e.constructor||he(e)?{}:G(D(e))}(c))):f=!1}var m;f&&(d.set(c,l),i(l,c,n,o,d),d.delete(c));Q(e,r,l)}(e,t,d,r,se,n,i);else{var s=n?n(ye(e,d),o,d+"",e,t,i):void 0;void 0===s&&(s=o),Q(e,d,s)}},Oe)}function ce(e,t){return me(function(e,t,r){return t=j(void 0===t?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=j(n.length-t,0),a=Array(o);++i<o;)a[i]=n[t+i];i=-1;for(var d=Array(t+1);++i<t;)d[i]=n[i];return d[t]=r(a),function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}(e,this,d)}}(e,t,Ee),e+"")}var ue=U?function(e,t){return U(e,"toString",{configurable:!0,enumerable:!1,value:(r=t,function(){return r}),writable:!0});var r}:Ee;function le(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function fe(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return ae(r)?r:void 0}function pe(e,t){var r=typeof e;return!!(t=null==t?n:t)&&("number"==r||"symbol"!=r&&s.test(e))&&e>-1&&e%1==0&&e<t}function he(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||I)}function ye(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var me=function(e){var t=0,r=0;return function(){var n=V(),i=16-(n-r);if(r=n,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(ue);function ge(e,t){return e===t||e!=e&&t!=t}var _e=oe(function(){return arguments}())?oe:function(e){return we(e)&&w.call(e,"callee")&&!F.call(e,"callee")},ve=Array.isArray;function be(e){return null!=e&&Ne(e.length)&&!Ie(e)}var Se=K||function(){return!1};function Ie(e){if(!$e(e))return!1;var t=ie(e);return t==o||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ne(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}function $e(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function we(e){return null!=e&&"object"==typeof e}var Ae=_?function(e){return function(t){return e(t)}}(_):function(e){return we(e)&&Ne(e.length)&&!!c[ie(e)]};function Oe(e){return be(e)?X(e):de(e)}var Me,Te=(Me=function(e,t,r){se(e,t,r)},ce(function(e,t){var r=-1,n=t.length,i=n>1?t[n-1]:void 0,o=n>2?t[2]:void 0;for(i=Me.length>3&&"function"==typeof i?(n--,i):void 0,o&&function(e,t,r){if(!$e(r))return!1;var n=typeof t;return!!("number"==n?be(r)&&pe(t,r.length):"string"==n&&t in r)&&ge(r[t],e)}(t[0],t[1],o)&&(i=n<3?void 0:i,n=1),e=Object(e);++r<n;){var a=t[r];a&&Me(e,a,r,i)}return e}));function Ee(e){return e}e.exports=Te}(yy,yy.exports)),yy.exports}var gy,_y,vy={},by={};function Sy(){return gy||(gy=1,function(e){!function(){var t="object"==typeof globalThis?globalThis:"object"==typeof H?H:"object"==typeof self?self:"object"==typeof this?this:function(){try{return Function("return this;")()}catch(e){}}()||function(){try{return(0,eval)("(function() { return this; })()")}catch(e){}}(),r=n(e);function n(e,t){return function(r,n){Object.defineProperty(e,r,{configurable:!0,writable:!0,value:n}),t&&t(r,n)}}void 0!==t.Reflect&&(r=n(t.Reflect,r)),function(e,t){var r=Object.prototype.hasOwnProperty,n="function"==typeof Symbol,i=n&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",o=n&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",a="function"==typeof Object.create,d={__proto__:[]}instanceof Array,s=!a&&!d,c={create:a?function(){return le(Object.create(null))}:d?function(){return le({__proto__:null})}:function(){return le({})},has:s?function(e,t){return r.call(e,t)}:function(e,t){return t in e},get:s?function(e,t){return r.call(e,t)?e[t]:void 0}:function(e,t){return e[t]}},u=Object.getPrototypeOf(Function),l="function"==typeof Map&&"function"==typeof Map.prototype.entries?Map:se(),f="function"==typeof Set&&"function"==typeof Set.prototype.entries?Set:ce(),p="function"==typeof WeakMap?WeakMap:ue(),h=n?Symbol.for("@reflect-metadata:registry"):void 0,y=ie(),m=oe(y);function g(e,t,r,n){if(F(r)){if(!G(e))throw new TypeError;if(!H(t))throw new TypeError;return O(e,t)}if(!G(e))throw new TypeError;if(!U(t))throw new TypeError;if(!U(n)&&!F(n)&&!B(n))throw new TypeError;return B(n)&&(n=void 0),M(e,t,r=q(r),n)}function _(e,t){function r(r,n){if(!U(r))throw new TypeError;if(!F(n)&&!Z(n))throw new TypeError;k(e,t,r,n)}return r}function v(e,t,r,n){if(!U(r))throw new TypeError;return F(n)||(n=q(n)),k(e,t,r,n)}function b(e,t,r){if(!U(t))throw new TypeError;return F(r)||(r=q(r)),T(e,t,r)}function S(e,t,r){if(!U(t))throw new TypeError;return F(r)||(r=q(r)),E(e,t,r)}function I(e,t,r){if(!U(t))throw new TypeError;return F(r)||(r=q(r)),C(e,t,r)}function N(e,t,r){if(!U(t))throw new TypeError;return F(r)||(r=q(r)),x(e,t,r)}function $(e,t){if(!U(e))throw new TypeError;return F(t)||(t=q(t)),P(e,t)}function w(e,t){if(!U(e))throw new TypeError;return F(t)||(t=q(t)),D(e,t)}function A(e,t,r){if(!U(t))throw new TypeError;if(F(r)||(r=q(r)),!U(t))throw new TypeError;F(r)||(r=q(r));var n=de(t,r,!1);return!F(n)&&n.OrdinaryDeleteMetadata(e,t,r)}function O(e,t){for(var r=e.length-1;r>=0;--r){var n=(0,e[r])(t);if(!F(n)&&!B(n)){if(!H(n))throw new TypeError;t=n}}return t}function M(e,t,r,n){for(var i=e.length-1;i>=0;--i){var o=(0,e[i])(t,r,n);if(!F(o)&&!B(o)){if(!U(o))throw new TypeError;n=o}}return n}function T(e,t,r){if(E(e,t,r))return!0;var n=re(t);return!B(n)&&T(e,n,r)}function E(e,t,r){var n=de(t,r,!1);return!F(n)&&V(n.OrdinaryHasOwnMetadata(e,t,r))}function C(e,t,r){if(E(e,t,r))return x(e,t,r);var n=re(t);return B(n)?void 0:C(e,n,r)}function x(e,t,r){var n=de(t,r,!1);if(!F(n))return n.OrdinaryGetOwnMetadata(e,t,r)}function k(e,t,r,n){de(r,n,!0).OrdinaryDefineOwnMetadata(e,t,r,n)}function P(e,t){var r=D(e,t),n=re(e);if(null===n)return r;var i=P(n,t);if(i.length<=0)return r;if(r.length<=0)return i;for(var o=new f,a=[],d=0,s=r;d<s.length;d++){var c=s[d];o.has(c)||(o.add(c),a.push(c))}for(var u=0,l=i;u<l.length;u++){c=l[u];o.has(c)||(o.add(c),a.push(c))}return a}function D(e,t){var r=de(e,t,!1);return r?r.OrdinaryOwnMetadataKeys(e,t):[]}function R(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function F(e){return void 0===e}function B(e){return null===e}function L(e){return"symbol"==typeof e}function U(e){return"object"==typeof e?null!==e:"function"==typeof e}function K(e,t){switch(R(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}var r="string",n=Y(e,i);if(void 0!==n){var o=n.call(e,r);if(U(o))throw new TypeError;return o}return j(e)}function j(e,t){var r,n,i=e.toString;if(z(i)&&!U(n=i.call(e)))return n;if(z(r=e.valueOf)&&!U(n=r.call(e)))return n;throw new TypeError}function V(e){return!!e}function J(e){return""+e}function q(e){var t=K(e);return L(t)?t:J(t)}function G(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function z(e){return"function"==typeof e}function H(e){return"function"==typeof e}function Z(e){switch(R(e)){case 3:case 4:return!0;default:return!1}}function W(e,t){return e===t||e!=e&&t!=t}function Y(e,t){var r=e[t];if(null!=r){if(!z(r))throw new TypeError;return r}}function X(e){var t=Y(e,o);if(!z(t))throw new TypeError;var r=t.call(e);if(!U(r))throw new TypeError;return r}function Q(e){return e.value}function ee(e){var t=e.next();return!t.done&&t}function te(e){var t=e.return;t&&t.call(e)}function re(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===u)return t;if(t!==u)return t;var r=e.prototype,n=r&&Object.getPrototypeOf(r);if(null==n||n===Object.prototype)return t;var i=n.constructor;return"function"!=typeof i||i===e?t:i}function ne(){var e,r,n,i;F(h)||void 0===t.Reflect||h in t.Reflect||"function"!=typeof t.Reflect.defineMetadata||(e=ae(t.Reflect));var o=new p,a={registerProvider:d,getProvider:c,setProvider:y};return a;function d(t){if(!Object.isExtensible(a))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case e===t:break;case F(r):r=t;break;case r===t:break;case F(n):n=t;break;case n===t:break;default:void 0===i&&(i=new f),i.add(t)}}function s(t,o){if(!F(r)){if(r.isProviderFor(t,o))return r;if(!F(n)){if(n.isProviderFor(t,o))return r;if(!F(i))for(var a=X(i);;){var d=ee(a);if(!d)return;var s=Q(d);if(s.isProviderFor(t,o))return te(a),s}}}if(!F(e)&&e.isProviderFor(t,o))return e}function c(e,t){var r,n=o.get(e);return F(n)||(r=n.get(t)),F(r)?(F(r=s(e,t))||(F(n)&&(n=new l,o.set(e,n)),n.set(t,r)),r):r}function u(e){if(F(e))throw new TypeError;return r===e||n===e||!F(i)&&i.has(e)}function y(e,t,r){if(!u(r))throw new Error("Metadata provider not registered.");var n=c(e,t);if(n!==r){if(!F(n))return!1;var i=o.get(e);F(i)&&(i=new l,o.set(e,i)),i.set(t,r)}return!0}}function ie(){var e;return!F(h)&&U(t.Reflect)&&Object.isExtensible(t.Reflect)&&(e=t.Reflect[h]),F(e)&&(e=ne()),!F(h)&&U(t.Reflect)&&Object.isExtensible(t.Reflect)&&Object.defineProperty(t.Reflect,h,{enumerable:!1,configurable:!1,writable:!1,value:e}),e}function oe(e){var t=new p,r={isProviderFor:function(e,r){var n=t.get(e);return!F(n)&&n.has(r)},OrdinaryDefineOwnMetadata:a,OrdinaryHasOwnMetadata:i,OrdinaryGetOwnMetadata:o,OrdinaryOwnMetadataKeys:d,OrdinaryDeleteMetadata:s};return y.registerProvider(r),r;function n(n,i,o){var a=t.get(n),d=!1;if(F(a)){if(!o)return;a=new l,t.set(n,a),d=!0}var s=a.get(i);if(F(s)){if(!o)return;if(s=new l,a.set(i,s),!e.setProvider(n,i,r))throw a.delete(i),d&&t.delete(n),new Error("Wrong provider for target.")}return s}function i(e,t,r){var i=n(t,r,!1);return!F(i)&&V(i.has(e))}function o(e,t,r){var i=n(t,r,!1);if(!F(i))return i.get(e)}function a(e,t,r,i){n(r,i,!0).set(e,t)}function d(e,t){var r=[],i=n(e,t,!1);if(F(i))return r;for(var o=X(i.keys()),a=0;;){var d=ee(o);if(!d)return r.length=a,r;var s=Q(d);try{r[a]=s}catch(e){try{te(o)}finally{throw e}}a++}}function s(e,r,i){var o=n(r,i,!1);if(F(o))return!1;if(!o.delete(e))return!1;if(0===o.size){var a=t.get(r);F(a)||(a.delete(i),0===a.size&&t.delete(a))}return!0}}function ae(e){var t=e.defineMetadata,r=e.hasOwnMetadata,n=e.getOwnMetadata,i=e.getOwnMetadataKeys,o=e.deleteMetadata,a=new p;return{isProviderFor:function(e,t){var r=a.get(e);return!(F(r)||!r.has(t))||!!i(e,t).length&&(F(r)&&(r=new f,a.set(e,r)),r.add(t),!0)},OrdinaryDefineOwnMetadata:t,OrdinaryHasOwnMetadata:r,OrdinaryGetOwnMetadata:n,OrdinaryOwnMetadataKeys:i,OrdinaryDeleteMetadata:o}}function de(e,t,r){var n=y.getProvider(e,t);if(!F(n))return n;if(r){if(y.setProvider(e,t,m))return m;throw new Error("Illegal state.")}}function se(){var e={},t=[],r=function(){function e(e,t,r){this._index=0,this._keys=e,this._values=t,this._selector=r}return e.prototype["@@iterator"]=function(){return this},e.prototype[o]=function(){return this},e.prototype.next=function(){var e=this._index;if(e>=0&&e<this._keys.length){var r=this._selector(this._keys[e],this._values[e]);return e+1>=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:r,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},e}(),n=function(){function t(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.has=function(e){return this._find(e,!1)>=0},t.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},t.prototype.set=function(e,t){var r=this._find(e,!0);return this._values[r]=t,this},t.prototype.delete=function(t){var r=this._find(t,!1);if(r>=0){for(var n=this._keys.length,i=r+1;i<n;i++)this._keys[i-1]=this._keys[i],this._values[i-1]=this._values[i];return this._keys.length--,this._values.length--,W(t,this._cacheKey)&&(this._cacheKey=e,this._cacheIndex=-2),!0}return!1},t.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=e,this._cacheIndex=-2},t.prototype.keys=function(){return new r(this._keys,this._values,i)},t.prototype.values=function(){return new r(this._keys,this._values,a)},t.prototype.entries=function(){return new r(this._keys,this._values,d)},t.prototype["@@iterator"]=function(){return this.entries()},t.prototype[o]=function(){return this.entries()},t.prototype._find=function(e,t){if(!W(this._cacheKey,e)){this._cacheIndex=-1;for(var r=0;r<this._keys.length;r++)if(W(this._keys[r],e)){this._cacheIndex=r;break}}return this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},t}();return n;function i(e,t){return e}function a(e,t){return t}function d(e,t){return[e,t]}}function ce(){return function(){function e(){this._map=new l}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.keys()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[o]=function(){return this.keys()},e}()}function ue(){var e=16,t=c.create(),n=i();return function(){function e(){this._key=i()}return e.prototype.has=function(e){var t=o(e,!1);return void 0!==t&&c.has(t,this._key)},e.prototype.get=function(e){var t=o(e,!1);return void 0!==t?c.get(t,this._key):void 0},e.prototype.set=function(e,t){return o(e,!0)[this._key]=t,this},e.prototype.delete=function(e){var t=o(e,!1);return void 0!==t&&delete t[this._key]},e.prototype.clear=function(){this._key=i()},e}();function i(){var e;do{e="@@WeakMap@@"+s()}while(c.has(t,e));return t[e]=!0,e}function o(e,t){if(!r.call(e,n)){if(!t)return;Object.defineProperty(e,n,{value:c.create()})}return e[n]}function a(e,t){for(var r=0;r<t;++r)e[r]=255*Math.random()|0;return e}function d(e){if("function"==typeof Uint8Array){var t=new Uint8Array(e);return"undefined"!=typeof crypto?crypto.getRandomValues(t):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(t):a(t,e),t}return a(new Array(e),e)}function s(){var t=d(e);t[6]=79&t[6]|64,t[8]=191&t[8]|128;for(var r="",n=0;n<e;++n){var i=t[n];4!==n&&6!==n&&8!==n||(r+="-"),i<16&&(r+="0"),r+=i.toString(16).toLowerCase()}return r}}function le(e){return e.__=void 0,delete e.__,e}e("decorate",g),e("metadata",_),e("defineMetadata",v),e("hasMetadata",b),e("hasOwnMetadata",S),e("getMetadata",I),e("getOwnMetadata",N),e("getMetadataKeys",$),e("getOwnMetadataKeys",w),e("deleteMetadata",A)}(r,t),void 0===t.Reflect&&(t.Reflect=e)}()}(e||(e={}))),by;var e}function Iy(){if(_y)return vy;_y=1,Object.defineProperty(vy,"__esModule",{value:!0}),vy.getMetadataSchema=vy.JSONSchema=void 0,Sy();const e=Symbol("class-validator-jsonschema:JSONSchema");function t(t,r,n){return Reflect.defineMetadata(e,t,r,n)}return vy.JSONSchema=function(e){return(r,n)=>{n?t(e,r.constructor,n):t(e,r,r.name)}},vy.getMetadataSchema=function(t,r){return Reflect.getMetadata(e,t.constructor,r)||{}},vy}var Ny,$y={};function wy(){if(Ny)return $y;Ny=1,Object.defineProperty($y,"__esModule",{value:!0}),$y.defaultConverters=void 0;const e=Re.__importStar(uy);function t(e,t){return Reflect.getMetadata("design:type",e,t)}function r(e){const t=typeof e;if(["string","number","boolean"].includes(t))return{type:t}}function n(e,t){if("function"==typeof e)return e.prototype===String.prototype||e.prototype===Symbol.prototype?{type:"string"}:e.prototype===Number.prototype?{type:"number"}:e.prototype===Boolean.prototype?{type:"boolean"}:{$ref:t.refPointerPrefix+e.name}}return Sy(),$y.defaultConverters={[e.ValidationTypes.CUSTOM_VALIDATION]:(e,r)=>{if("function"==typeof e.target){return n(t(e.target.prototype,e.propertyName),r)}},[e.ValidationTypes.NESTED_VALIDATION]:(e,r)=>{if("function"==typeof e.target){const i=r.classTransformerMetadataStorage?r.classTransformerMetadataStorage.findTypeMetadata(e.target,e.propertyName):null;return n(i?i.typeFunction():t(e.target.prototype,e.propertyName),r)}},[e.ValidationTypes.WHITELIST]:{},[e.ValidationTypes.CONDITIONAL_VALIDATION]:{},[e.ValidationTypes.IS_DEFINED]:{not:{type:"null"}},[e.EQUALS]:e=>{const t=r(e.constraints[0]);if(t)return Object.assign(Object.assign({},t),{enum:[e.constraints[0]]})},[e.NOT_EQUALS]:e=>{const t=r(e.constraints[0]);if(t)return{not:Object.assign(Object.assign({},t),{enum:[e.constraints[0]]})}},[e.IS_EMPTY]:{anyOf:[{type:"string",enum:[""]},{not:{anyOf:[{type:"string"},{type:"number"},{type:"boolean"},{type:"integer"},{type:"array"},{type:"object"}]},nullable:!0}]},[e.IS_NOT_EMPTY]:{minLength:1,type:"string"},[e.IS_IN]:e=>{const[t,...n]=e.constraints[0].map(r);if(t&&n.every(e=>e.type===t.type))return Object.assign(Object.assign({},t),{enum:e.constraints[0]})},[e.IS_NOT_IN]:e=>{const[t,...n]=e.constraints[0].map(r);if(t&&n.every(e=>e.type===t.type))return{not:Object.assign(Object.assign({},t),{enum:e.constraints[0]})}},[e.IS_BOOLEAN]:{type:"boolean"},[e.IS_DATE]:{oneOf:[{format:"date",type:"string"},{format:"date-time",type:"string"}]},[e.IS_NUMBER]:{type:"number"},[e.IS_STRING]:{type:"string"},[e.IS_DATE_STRING]:{pattern:"\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d.\\d+Z?",type:"string"},[e.IS_ARRAY]:{items:{},type:"array"},[e.IS_INT]:{type:"integer"},[e.IS_ENUM]:e=>({enum:Object.values(e.constraints[0]),type:"string"}),[e.IS_DIVISIBLE_BY]:e=>({multipleOf:e.constraints[0],type:"number"}),[e.IS_POSITIVE]:{exclusiveMinimum:0,type:"number"},[e.IS_NEGATIVE]:{exclusiveMaximum:0,type:"number"},[e.MIN]:e=>({minimum:e.constraints[0],type:"number"}),[e.MAX]:e=>({maximum:e.constraints[0],type:"number"}),[e.MIN_DATE]:e=>({description:`After ${e.constraints[0].toJSON()}`,oneOf:[{format:"date",type:"string"},{format:"date-time",type:"string"}]}),[e.MAX_DATE]:e=>({description:`Before ${e.constraints[0].toJSON()}`,oneOf:[{format:"date",type:"string"},{format:"date-time",type:"string"}]}),[e.IS_BOOLEAN_STRING]:{enum:["true","false"],type:"string"},[e.IS_NUMBER_STRING]:{pattern:"^[-+]?[0-9]+$",type:"string"},[e.CONTAINS]:e=>({pattern:e.constraints[0],type:"string"}),[e.NOT_CONTAINS]:e=>({not:{pattern:e.constraints[0]},type:"string"}),[e.IS_ALPHA]:{pattern:"^[a-zA-Z]+$",type:"string"},[e.IS_ALPHANUMERIC]:{pattern:"^[0-9a-zA-Z]+$",type:"string"},[e.IS_ASCII]:{pattern:"^[\\x00-\\x7F]+$",type:"string"},[e.IS_BASE64]:{format:"base64",type:"string"},[e.IS_BYTE_LENGTH]:{type:"string"},[e.IS_CREDIT_CARD]:{format:"credit-card",type:"string"},[e.IS_CURRENCY]:{format:"currency",type:"string"},[e.IS_EMAIL]:{format:"email",type:"string"},[e.IS_FQDN]:{format:"hostname",type:"string"},[e.IS_FULL_WIDTH]:{pattern:"[^\\u0020-\\u007E\\uFF61-\\uFF9F\\uFFA0-\\uFFDC\\uFFE8-\\uFFEE0-9a-zA-Z]",type:"string"},[e.IS_HALF_WIDTH]:{pattern:"[\\u0020-\\u007E\\uFF61-\\uFF9F\\uFFA0-\\uFFDC\\uFFE8-\\uFFEE0-9a-zA-Z]",type:"string"},[e.IS_VARIABLE_WIDTH]:{type:"string"},[e.IS_HEX_COLOR]:{pattern:"^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$",type:"string"},[e.IS_HEXADECIMAL]:{pattern:"^[0-9a-fA-F]+$",type:"string"},[e.IS_IP]:e=>({format:"ipv"+("6"===e.constraints[0]?6:4),type:"string"}),[e.IS_ISBN]:{format:"isbn",type:"string"},[e.IS_ISIN]:{format:"isin",type:"string"},[e.IS_ISO8601]:{oneOf:[{format:"date",type:"string"},{format:"date-time",type:"string"}]},[e.IS_JSON]:{format:"json",type:"string"},[e.IS_LOWERCASE]:{type:"string"},[e.IS_MOBILE_PHONE]:{format:"mobile-phone",type:"string"},[e.IS_MONGO_ID]:{pattern:"^[0-9a-fA-F]{24}$",type:"string"},[e.IS_MULTIBYTE]:{pattern:"[^\\x00-\\x7F]",type:"string"},[e.IS_SURROGATE_PAIR]:{pattern:"[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]",type:"string"},[e.IS_URL]:{format:"url",type:"string"},[e.IS_UUID]:{format:"uuid",type:"string"},[e.IS_LENGTH]:e=>{const[t,r]=e.constraints;return r||0===r?{minLength:t,maxLength:r,type:"string"}:{minLength:t,type:"string"}},[e.IS_UPPERCASE]:{type:"string"},[e.IS_OBJECT]:{type:"object"},[e.IS_NOT_EMPTY_OBJECT]:{type:"object",minProperties:1},[e.MIN_LENGTH]:e=>({minLength:e.constraints[0],type:"string"}),[e.MAX_LENGTH]:e=>({maxLength:e.constraints[0],type:"string"}),[e.MATCHES]:e=>({pattern:e.constraints[0].source,type:"string"}),[e.IS_MILITARY_TIME]:{pattern:"^([01]\\d|2[0-3]):?([0-5]\\d)$",type:"string"},[e.ARRAY_CONTAINS]:e=>{const t=e.constraints[0].map(r);return t.length>0&&t.every(e=>e&&e.type)?{not:{anyOf:t.map((t,r)=>({items:{not:Object.assign(Object.assign({},t),{enum:[e.constraints[0][r]]})}}))},type:"array"}:{items:{},type:"array"}},[e.ARRAY_NOT_CONTAINS]:e=>{const t=e.constraints[0].map(r);return t.length>0&&t.every(e=>e&&e.type)?{items:{not:{anyOf:t.map((t,r)=>Object.assign(Object.assign({},t),{enum:[e.constraints[0][r]]}))}},type:"array"}:{items:{},type:"array"}},[e.ARRAY_NOT_EMPTY]:{items:{},minItems:1,type:"array"},[e.ARRAY_MIN_SIZE]:e=>({items:{},minItems:e.constraints[0],type:"array"}),[e.ARRAY_MAX_SIZE]:e=>({items:{},maxItems:e.constraints[0],type:"array"}),[e.ARRAY_UNIQUE]:{items:{},type:"array",uniqueItems:!0}},$y}var Ay,Oy,My={};function Ty(){if(Ay)return My;Ay=1,Object.defineProperty(My,"__esModule",{value:!0}),My.defaultOptions=void 0;const e=uy;return My.defaultOptions={additionalConverters:{},classValidatorMetadataStorage:(0,e.getMetadataStorage)(),refPointerPrefix:"#/definitions/",schemaNameField:"name"},My}function Ey(){return Oy||(Oy=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.targetConstructorToSchema=e.validationMetadataArrayToSchemas=e.validationMetadatasToSchemas=e.JSONSchema=void 0;const t=Re,r=t.__importStar(uy),n=t.__importDefault(py()),i=t.__importDefault(my()),o=Iy(),a=wy(),d=Ty();var s=Iy();function c(e,t){const o=Object.assign(Object.assign({},d.defaultOptions),t),s={};return Object.entries((0,n.default)(e,({target:e})=>{var t;return null!==(t=e[o.schemaNameField])&&void 0!==t?t:e.name})).forEach(([t,d])=>{const c=d[0].target,u=d.concat(function(e,t){return t.filter(r=>r.target instanceof Function&&e.prototype instanceof r.target&&!t.find(t=>t.propertyName===r.propertyName&&t.target===e&&t.type===r.type))}(c,e)).filter(e=>!(f(e,o)||f(Object.assign(Object.assign({},e),{target:c}),o))),l={};Object.entries((0,n.default)(u,"propertyName")).forEach(([e,t])=>{const n=function(e,t){const n=Object.assign(Object.assign({},a.defaultConverters),t.additionalConverters),o=e=>{var i;const o=null===(i=t.classTransformerMetadataStorage)||void 0===i?void 0:i.findTypeMetadata(e.target,e.propertyName),a=o&&o.reflectedType&&new o.reflectedType instanceof Map,d=n[e.type]||n[r.ValidationTypes.CUSTOM_VALIDATION],s="function"==typeof d?d(e,t):d;return e.each&&a?{additionalProperties:Object.assign({},s),type:"object"}:e.each?{items:s,type:"array"}:s};return(0,i.default)({},...e.map(o))}(t,o);l[e]=p(n,c,o,e)});const h={properties:l,type:"object"},y=function(e,t,i){function o(e){return e&&e.some(({type:e})=>e===r.ValidationTypes.IS_DEFINED)}function a(e){return e&&e.some(({type:e})=>[r.ValidationTypes.CONDITIONAL_VALIDATION,r.IS_EMPTY].includes(e))}return Object.entries((0,n.default)(t,e=>e.propertyName)).filter(([t,r])=>{const n=r.filter(t=>t.target===e),d=r.filter(t=>t.target!==e);return i.skipMissingProperties?o(n)||!a(n)&&o(d):!(a(n)||a(d))}).map(([e])=>e)}(c,u,o);y.length>0&&(h.required=y),s[t]=p(h,c,o,c.name)}),s}function u(e,t){return t.name?e[t.name]?e[t.name]:u(e,Object.getPrototypeOf(t)):{}}function l(e,t){return t.map(t=>{if(t.constraintCls){const r=e.getTargetValidatorConstraints(t.constraintCls);if(r.length>0)return Object.assign(Object.assign({},t),{type:r[0].name})}return Object.assign({},t)})}function f(e,t){var r;return!!(null===(r=t.classTransformerMetadataStorage)||void 0===r?void 0:r.findExcludeMetadata(e.target,e.propertyName))}function p(e,t,r,n){const a=(0,o.getMetadataSchema)(t.prototype,n);return"function"==typeof a?a(e,r):(0,i.default)({},e,a)}Object.defineProperty(e,"JSONSchema",{enumerable:!0,get:function(){return s.JSONSchema}}),e.validationMetadatasToSchemas=function(e){const t=function(e){const t=[];for(const r of e.validationMetadatas)t.push(...l(e,r[1]));return t}(Object.assign(Object.assign({},d.defaultOptions),e).classValidatorMetadataStorage);return c(t,e)},e.validationMetadataArrayToSchemas=c,e.targetConstructorToSchema=function(e,t){const r=Object.assign(Object.assign({},d.defaultOptions),t).classValidatorMetadataStorage;let n=r.getTargetValidationMetadatas(e,"",!0,!1);return n=l(r,n),u(c(n,t),e)}}(ly)),ly}var Cy,xy,ky={},Py={},Dy={};function Ry(){if(Cy)return Dy;var e;Cy=1,Object.defineProperty(Dy,"__esModule",{value:!0}),Dy.NotImplementedError=Dy.RuntimeError=Dy.ExpiredError=Dy.DefaultError=Dy.NoLongerAvailableError=Dy.ConflictError=Dy.NotFoundError=Dy.ForbiddenError=Dy.PaymentRequiredError=Dy.UnauthorizedError=Dy.ValidationFailedError=Dy.ChainError=Dy.ErrorCode=void 0,function(e){e[e.VALIDATION_FAILED=400]="VALIDATION_FAILED",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",e[e.FORBIDDEN=403]="FORBIDDEN",e[e.NOT_FOUND=404]="NOT_FOUND",e[e.CONFLICT=409]="CONFLICT",e[e.NO_LONGER_AVAILABLE=410]="NO_LONGER_AVAILABLE",e[e.EXPIRED=418]="EXPIRED",e[e.DEFAULT_ERROR=500]="DEFAULT_ERROR",e[e.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED"}(e||(Dy.ErrorCode=e={}));class t extends Error{constructor(e,r,n){super(e);const[i,o]="string"==typeof r?[r,n]:[void 0,r];this.key=t.normalizedKey(null!=i?i:this.constructor),this.payload=o}static normalizedKey(e){var t,r;let n;if("string"==typeof e)n=e;else{const i=/[A-Z]{2,}(?=[A-Z]+[a-z]*[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g;n=null!==(r=null===(t=e.name.match(i))||void 0===t?void 0:t.join("_").toUpperCase().replace(/_ERROR$/g,""))&&void 0!==r?r:"UNKNOWN"}return n.toUpperCase().replace(/[^A-Z0-9_]/g,"_")}static withCode(e){return class extends t{constructor(){super(...arguments),this.code=e}}}andExec(e){return e(this),this}logError(e){return e.error(this.message),this}logWarn(e){return e.warn(this.message),this}matches(e){return"function"==typeof e?!!e.name&&this.constructor.name===e.name:e===this.code}map(e,t){return this.matches(e)?"function"==typeof t?t(this):t:this}static isChainError(e){return!!e&&"key"in e&&void 0!==e.key&&"code"in e&&void 0!==e.code}static from(e){var t;return this.isChainError(e)?e:new c(null!==(t=null==e?void 0:e.message)&&void 0!==t?t:"Unknown error occured")}static matches(e,r){return t.isChainError(e)&&e.matches(r)}static map(e,r,n){return t.isChainError(e)?e.map(r,n):t.from(e)}static recover(e,r,n){if(t.isChainError(e)&&e.matches(r))return n;throw e}static ignore(e,r,n){return t.recover(e,r,n)}}Dy.ChainError=t;class r extends(t.withCode(e.VALIDATION_FAILED)){}Dy.ValidationFailedError=r;class n extends(t.withCode(e.UNAUTHORIZED)){}Dy.UnauthorizedError=n;class i extends(t.withCode(e.PAYMENT_REQUIRED)){}Dy.PaymentRequiredError=i;class o extends(t.withCode(e.FORBIDDEN)){}Dy.ForbiddenError=o;class a extends(t.withCode(e.NOT_FOUND)){}Dy.NotFoundError=a;class d extends(t.withCode(e.CONFLICT)){}Dy.ConflictError=d;class s extends(t.withCode(e.NO_LONGER_AVAILABLE)){}Dy.NoLongerAvailableError=s;class c extends(t.withCode(e.DEFAULT_ERROR)){}Dy.DefaultError=c;class u extends(t.withCode(e.EXPIRED)){}Dy.ExpiredError=u;class l extends(t.withCode(e.DEFAULT_ERROR)){}Dy.RuntimeError=l;class f extends(t.withCode(e.NOT_IMPLEMENTED)){}return Dy.NotImplementedError=f,Dy}function Fy(){if(xy)return Py;xy=1,Object.defineProperty(Py,"__esModule",{value:!0}),Py.SerializeIf=Py.BigNumberIsInteger=Py.BigNumberIsNotNegative=Py.BigNumberIsNotInfinity=Py.BigNumberIsPositive=Py.IsBigNumber=Py.ArrayUniqueObjects=Py.ArrayUniqueConcat=Py.IsDifferentValue=Py.IsWholeNumber=void 0;const e=Re.__importDefault(mt),t=At,r=uy,n=Ry();function i(t){return function(n,i){(0,r.registerDecorator)({name:"IsBigNumber",target:n.constructor,propertyName:i,options:t,validator:{validate:t=>e.default.isBigNumber(t),defaultMessage(t){const r="string"==typeof t.value||"number"==typeof t.value?new e.default(t.value):void 0,n=r&&!r.isNaN()?` (valid value: ${null==r?void 0:r.toFixed()})`:"";return`${t.property} should be a stringified number with fixed notation (not an exponential notation) and no trailing zeros in decimal part${n}`}}})}}function o(t,r){return!e.default.isBigNumber(t)||r(t)}return Py.IsWholeNumber=function(e,t){return function(n,i){(0,r.registerDecorator)({name:"isWholeNumber",target:n.constructor,propertyName:i,constraints:[e],options:t,validator:{validate(e,t){const[r]=t.constraints,n=t.object[r],i=Number(n);return i-Math.floor(i)===0}}})}},Py.IsDifferentValue=function(e,t){return function(i,o){(0,r.registerDecorator)({name:"IsDifferentValue",target:i.constructor,propertyName:o,constraints:[e],options:t,validator:{validate(e,t){const[r]=t.constraints,i=t.object[r];if("string"!=typeof e&&void 0!==e||"string"!=typeof i&&void 0!==i)throw new n.NotImplementedError("IsDifferentValue only works with string or undefined");return e!==i}}})}},Py.ArrayUniqueConcat=function(e,t){return function(n,i){(0,r.registerDecorator)({name:"ArrayUniqueConcat",target:n.constructor,propertyName:i,constraints:[e],options:t,validator:{validate(e,t){const[r]=t.constraints,n=t.object[r];return new Set(n.concat(e)).size===n.length+e.length}}})}},Py.ArrayUniqueObjects=function(e,t){return function(n,i){(0,r.registerDecorator)({name:"ArrayUniqueObjects",target:n.constructor,propertyName:i,constraints:[e],options:t,validator:{validate(t){if(Array.isArray(t)){const r=t.map(t=>"object"==typeof t&&t?t[e]:void 0);return new Set(r).size===t.length}return!1},defaultMessage:e=>`${e.property} must not contains duplicate entry for ${e.constraints[0]}`}})}},Py.IsBigNumber=i,Py.BigNumberIsPositive=function(e){return function(t,n){i(e)(t,n),(0,r.registerDecorator)({name:"BigNumberIsPositive",target:t.constructor,propertyName:n,options:e,validator:{validate:e=>o(e,e=>e.isPositive()),defaultMessage(e){var t,r;return`${e.property} must be positive but is ${null!==(r=null===(t=e.value)||void 0===t?void 0:t.toString())&&void 0!==r?r:e.value}`}}})}},Py.BigNumberIsNotInfinity=function(e){return function(t,n){i(e)(t,n),(0,r.registerDecorator)({name:"BigNumberIsNotInfinity",target:t.constructor,propertyName:n,options:e,validator:{validate:e=>o(e,e=>e.isFinite()),defaultMessage(e){var t,r;return`${e.property} must be finite BigNumber but is ${null!==(r=null===(t=e.value)||void 0===t?void 0:t.toString())&&void 0!==r?r:e.value}`}}})}},Py.BigNumberIsNotNegative=function(e){return function(t,n){i(e)(t,n),(0,r.registerDecorator)({name:"BigNumberIsNotNegative",target:t.constructor,propertyName:n,options:e,validator:{validate:e=>o(e,e=>!e.isNegative()),defaultMessage(e){var t,r;return`${e.property} must be non-negative BigNumber but is ${null!==(r=null===(t=e.value)||void 0===t?void 0:t.toString())&&void 0!==r?r:e.value}`}}})}},Py.BigNumberIsInteger=function(e){return function(t,n){i(e)(t,n),(0,r.registerDecorator)({name:"BigNumberIsInteger",target:t.constructor,propertyName:n,options:e,validator:{validate:e=>o(e,e=>e.isInteger()),defaultMessage(e){var t,r;return`${e.property} must be integer BigNumber but is ${null!==(r=null===(t=e.value)||void 0===t?void 0:t.toString())&&void 0!==r?r:e.value}`}}})}},Py.SerializeIf=function(e,r){return(0,t.Transform)(({value:t,obj:r})=>e(r)?t:void 0,r)},Py}var By,Ly={},Uy={},Ky={};function jy(){if(By)return Ky;By=1,Object.defineProperty(Ky,"__esModule",{value:!0});const e=At,t={};return Ky.default=function(r,n){if("string"==typeof n){const i=JSON.parse(n);return Array.isArray(i)?i.map(n=>(0,e.plainToInstance)(r,n,t)):(0,e.plainToInstance)(r,i,t)}return(0,e.plainToInstance)(r,n,t)},Ky}var Vy,Jy,qy,Gy,zy,Hy={},Zy={},Wy={},Yy={},Xy={};function Qy(){return Vy||(Vy=1,e=Xy,Object.defineProperty(e,"__esModule",{value:!0}),e.TransformationType=void 0,function(e){e[e.PLAIN_TO_CLASS=0]="PLAIN_TO_CLASS",e[e.CLASS_TO_PLAIN=1]="CLASS_TO_PLAIN",e[e.CLASS_TO_CLASS=2]="CLASS_TO_CLASS"}(e.TransformationType||(e.TransformationType={}))),Xy;var e}function em(){return Jy||(Jy=1,function(e){var t=Yy&&Yy.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=Yy&&Yy.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(Qy(),e)}(Yy)),Yy}function tm(){if(qy)return Wy;qy=1,Object.defineProperty(Wy,"__esModule",{value:!0}),Wy.MetadataStorage=void 0;const e=em();return Wy.MetadataStorage=class{constructor(){this._typeMetadatas=new Map,this._transformMetadatas=new Map,this._exposeMetadatas=new Map,this._excludeMetadatas=new Map,this._ancestorsMap=new Map}addTypeMetadata(e){this._typeMetadatas.has(e.target)||this._typeMetadatas.set(e.target,new Map),this._typeMetadatas.get(e.target).set(e.propertyName,e)}addTransformMetadata(e){this._transformMetadatas.has(e.target)||this._transformMetadatas.set(e.target,new Map),this._transformMetadatas.get(e.target).has(e.propertyName)||this._transformMetadatas.get(e.target).set(e.propertyName,[]),this._transformMetadatas.get(e.target).get(e.propertyName).push(e)}addExposeMetadata(e){this._exposeMetadatas.has(e.target)||this._exposeMetadatas.set(e.target,new Map),this._exposeMetadatas.get(e.target).set(e.propertyName,e)}addExcludeMetadata(e){this._excludeMetadatas.has(e.target)||this._excludeMetadatas.set(e.target,new Map),this._excludeMetadatas.get(e.target).set(e.propertyName,e)}findTransformMetadatas(t,r,n){return this.findMetadatas(this._transformMetadatas,t,r).filter(t=>!t.options||(!0===t.options.toClassOnly&&!0===t.options.toPlainOnly||(!0===t.options.toClassOnly?n===e.TransformationType.CLASS_TO_CLASS||n===e.TransformationType.PLAIN_TO_CLASS:!0!==t.options.toPlainOnly||n===e.TransformationType.CLASS_TO_PLAIN)))}findExcludeMetadata(e,t){return this.findMetadata(this._excludeMetadatas,e,t)}findExposeMetadata(e,t){return this.findMetadata(this._exposeMetadatas,e,t)}findExposeMetadataByCustomName(e,t){return this.getExposedMetadatas(e).find(e=>e.options&&e.options.name===t)}findTypeMetadata(e,t){return this.findMetadata(this._typeMetadatas,e,t)}getStrategy(e){const t=this._excludeMetadatas.get(e),r=t&&t.get(void 0),n=this._exposeMetadatas.get(e),i=n&&n.get(void 0);return r&&i||!r&&!i?"none":r?"excludeAll":"exposeAll"}getExposedMetadatas(e){return this.getMetadata(this._exposeMetadatas,e)}getExcludedMetadatas(e){return this.getMetadata(this._excludeMetadatas,e)}getExposedProperties(t,r){return this.getExposedMetadatas(t).filter(t=>!t.options||(!0===t.options.toClassOnly&&!0===t.options.toPlainOnly||(!0===t.options.toClassOnly?r===e.TransformationType.CLASS_TO_CLASS||r===e.TransformationType.PLAIN_TO_CLASS:!0!==t.options.toPlainOnly||r===e.TransformationType.CLASS_TO_PLAIN))).map(e=>e.propertyName)}getExcludedProperties(t,r){return this.getExcludedMetadatas(t).filter(t=>!t.options||(!0===t.options.toClassOnly&&!0===t.options.toPlainOnly||(!0===t.options.toClassOnly?r===e.TransformationType.CLASS_TO_CLASS||r===e.TransformationType.PLAIN_TO_CLASS:!0!==t.options.toPlainOnly||r===e.TransformationType.CLASS_TO_PLAIN))).map(e=>e.propertyName)}clear(){this._typeMetadatas.clear(),this._exposeMetadatas.clear(),this._excludeMetadatas.clear(),this._ancestorsMap.clear()}getMetadata(e,t){const r=e.get(t);let n;r&&(n=Array.from(r.values()).filter(e=>void 0!==e.propertyName));const i=[];for(const r of this.getAncestors(t)){const t=e.get(r);if(t){const e=Array.from(t.values()).filter(e=>void 0!==e.propertyName);i.push(...e)}}return i.concat(n||[])}findMetadata(e,t,r){const n=e.get(t);if(n){const e=n.get(r);if(e)return e}for(const n of this.getAncestors(t)){const t=e.get(n);if(t){const e=t.get(r);if(e)return e}}}findMetadatas(e,t,r){const n=e.get(t);let i;n&&(i=n.get(r));const o=[];for(const n of this.getAncestors(t)){const t=e.get(n);t&&t.has(r)&&o.push(...t.get(r))}return o.slice().reverse().concat((i||[]).slice().reverse())}getAncestors(e){if(!e)return[];if(!this._ancestorsMap.has(e)){const t=[];for(let r=Object.getPrototypeOf(e.prototype.constructor);void 0!==r.prototype;r=Object.getPrototypeOf(r.prototype.constructor))t.push(r);this._ancestorsMap.set(e,t)}return this._ancestorsMap.get(e)}},Wy}function rm(){if(Gy)return Zy;Gy=1,Object.defineProperty(Zy,"__esModule",{value:!0}),Zy.defaultMetadataStorage=void 0;const e=tm();return Zy.defaultMetadataStorage=new e.MetadataStorage,Zy}function nm(){if(zy)return Hy;zy=1,Object.defineProperty(Hy,"__esModule",{value:!0}),Hy.generateResponseSchema=Hy.generateSchema=void 0;const e=rm(),t=Ey(),r=Ry();class n extends r.RuntimeError{}function i(r){return(0,t.targetConstructorToSchema)(r,{additionalConverters:{enumProperty:e=>{const[t,,r]=e.constraints;return{...t.every(e=>"number"==typeof e)?{type:"number"}:{},enum:t,description:r}},IsUserAliasConstraint:()=>({type:"string",description:"Allowed value is string following the format of 'client|<user-id>', or 'eth|<checksumed-eth-addr>', or valid system-level username."}),IsUserRefConstraint:()=>({type:"string",description:"Allowed value is a user alias ('client|<user-id>', or 'eth|<checksumed-eth-addr>', or valid system-level username), or valid Ethereum address."}),IsValidChainAddressConstraint:()=>({type:"string",description:"Allowed value is a valid chain address: Ethereum (checksummed with 0x prefix), Solana (base58-encoded 32-byte public key), TON (non-bounceable mainnet format: UQ...), or GalaChain (valid user alias)."})},classTransformerMetadataStorage:e.defaultMetadataStorage})}function o(t,r,a){var d;if("#/definitions/BigNumber"===t.$ref)return delete t.$ref,t.type="string",void(t.description=((null!==(d=t.description)&&void 0!==d?d:"")+" Number provided as a string.").trim());if("array"!==t.type)if(t.$ref&&"string"==typeof t.$ref&&t.$ref.startsWith("#/definitions/"))try{const d=e.defaultMetadataStorage.findTypeMetadata(r,a);if(void 0===d){const e=t.$ref.replace("#/definitions/","");throw new n(`Cannot find type metadata of ${e} for property ${a}`)}if("function"!=typeof d.typeFunction)throw new n(`reflectedType of ${d} is not a function`);const s=d.typeFunction(),c=i(s);o(c,s,void 0),Object.keys(c).map(e=>{var r,n;t[e]="description"===e?`${null!==(r=t[e])&&void 0!==r?r:""} ${null!==(n=c[e])&&void 0!==n?n:""}`.trim():c[e]})}catch(e){}finally{t.type="object",delete t.$ref}else Object.entries(t).forEach(([e,t])=>{"object"==typeof t&&t&&o(t,r,e)});else t.items&&"object"==typeof t.items&&o(t.items,r,a)}function a(e){const t=i(e);return o(t,e,void 0),t}return Hy.generateSchema=a,Hy.generateResponseSchema=function(e,t){const r=function(e){return"number"===e||"string"===e||"boolean"===e||"null"===e||"object"===e}(n=e)||void 0===n?{type:null!=e?e:"null"}:a(e);var n;return{type:"object",properties:{Status:{enum:[0,1],description:"Indicates Error (0) or Success (1)"},Message:{type:"string"},Data:"array"===t?{type:"array",items:r}:r},required:["Status"]}},Hy}var im,om={};function am(){if(im)return om;return im=1,Object.defineProperty(om,"__esModule",{value:!0}),om.getValidationErrorMessages=void 0,om.getValidationErrorMessages=function e(t){return t.map(t=>{var r;const n=null!==(r=t.constraints)&&void 0!==r?r:{},i=Object.keys(n).sort().map(e=>`${e}: ${n[e]}`);if(t.children){const r=e(t.children);i.push(...r)}return i}).flat()},om}var dm,sm,cm,um,lm,fm,pm,hm={};function ym(){return sm?dm:(sm=1,dm={space:"",cycles:!1,replacer:(e,t)=>t,stringify:JSON.stringify})}function mm(){return um?cm:(um=1,cm={isArray:Array.isArray,assign:Object.assign,isObject:e=>"object"==typeof e,isFunction:e=>"function"==typeof e,isBoolean:e=>"boolean"==typeof e,isRegex:e=>e instanceof RegExp,keys:Object.keys})}function gm(){if(fm)return lm;fm=1;const e=ym(),t=mm().isFunction,r=mm().isBoolean,n=mm().isObject,i=mm().isArray,o=mm().isRegex,a=mm().assign,d=mm().keys;return lm=function(s,c){c=c||a({},e),t(c)&&(c={compare:c});const u=c.space||e.space,l=r(c.cycles)?c.cycles:e.cycles,f=c.replacer||e.replacer,p=c.stringify||e.stringify,h=c.compare&&(y=c.compare,function(e){return function(t,r){const n={key:t,value:e[t]},i={key:r,value:e[r]};return y(n,i)}});var y;l||p(s);const m=[];return function e(t,r,a,s){const c=u?"\n"+new Array(s+1).join(u):"",y=u?": ":":";if(a=function(e){return null==e?e:o(e)?e.toString():e.toJSON?e.toJSON():e}(a),void 0!==(a=f.call(t,r,a))){if(!n(a)||null===a)return p(a);if(i(a)){const t=[];for(let r=0;r<a.length;r++){const n=e(a,r,a[r],s+1)||p(null);t.push(c+u+n)}return"["+t.join(",")+c+"]"}{if(l){if(-1!==m.indexOf(a))return p("[Circular]");m.push(a)}const t=d(a).sort(h&&h(a)),r=[];for(let n=0;n<t.length;n++){const i=t[n],o=e(a,i,a[i],s+1);if(!o)continue;const d=p(i)+y+o;r.push(c+u+d)}return m.splice(m.indexOf(a),1),"{"+r.join(",")+c+"}"}}}({"":s},"",s,0)},lm}function _m(){if(pm)return hm;pm=1,Object.defineProperty(hm,"__esModule",{value:!0});const e=At,t=Re.__importDefault(gm());return hm.default=function(r){return(0,t.default)((0,e.instanceToPlain)(r))},hm}var vm,bm={},Sm={},Im={exports:{}},Nm=W(Object.freeze({__proto__:null,default:{}})),$m=Im.exports;function wm(){return vm||(vm=1,function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:Nm.Buffer}catch(e){}function a(e,t){var n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function d(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function s(e,t,n,i){for(var o=0,a=0,d=Math.min(e.length,n),s=t;s<d;s++){var c=e.charCodeAt(s)-48;o*=i,a=c>=49?c-49+10:c>=17?c-17+10:c,r(c>=0&&a<i,"Invalid character"),o+=a}return o}function c(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,n):(this._parseBase(e,t,i),"le"===n&&this._initArray(this.toArray(),t,n)))},i.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},i.prototype._initArray=function(e,t,n){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,d=0;if("be"===n)for(i=e.length-1,o=0;i>=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<<d&67108863,this.words[o+1]=a>>>26-d&67108863,(d+=24)>=26&&(d-=26,o++);else if("le"===n)for(i=0,o=0;i<e.length;i+=3)a=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=a<<d&67108863,this.words[o+1]=a>>>26-d&67108863,(d+=24)>=26&&(d-=26,o++);return this._strip()},i.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,a=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=d(e,t,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)i=d(e,t,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,d=Math.min(o,o-a)+r,c=0,u=r;u<d;u+=n)c=s(e,u,u+n,t),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==a){var l=1;for(c=s(e,u,e.length,t),u=0;u<a;u++)l*=t;this.imuln(l),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}this._strip()},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},i.prototype._move=function(e){c(e,this)},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=u}catch(e){i.prototype.inspect=u}else i.prototype.inspect=u;function u(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,d=67108863&a,s=a/67108864|0;r.words[0]=d;for(var c=1;c<n;c++){for(var u=s>>>26,l=67108863&s,f=Math.min(c,t.length-1),p=Math.max(0,c-e.length+1);p<=f;p++){var h=c-p|0;u+=(a=(i=0|e.words[h])*(o=0|t.words[p])+l)/67108864|0,l=67108863&a}r.words[c]=0|l,s=0|u}return 0!==s?r.words[c]=0|s:r.length--,r._strip()}i.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,o=0,a=0;a<this.length;a++){var d=this.words[a],s=(16777215&(d<<i|o)).toString(16);o=d>>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),n=0!==o||a!==this.length-1?l[6-s.length]+s+n:s+n}for(0!==o&&(n=o.toString(16)+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var c=f[e],u=p[e];n="";var h=this.clone();for(h.negative=0;!h.isZero();){var y=h.modrn(u).toString(e);n=(h=h.idivn(u)).isZero()?y+n:l[c-y.length]+y+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(o,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,n){this._strip();var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},i.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|n;e[r++]=255&a,r<e.length&&(e[r++]=a>>8&255),r<e.length&&(e[r++]=a>>16&255),6===o?(r<e.length&&(e[r++]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r<e.length)for(e[r++]=n;r<e.length;)e[r++]=0},i.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,n=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|n;e[r--]=255&a,r>=0&&(e[r--]=a>>8&255),r>=0&&(e[r--]=a>>16&255),6===o?(r>=0&&(e[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 8191&t||(r+=13,t>>>=13),127&t||(r+=7,t>>>=7),15&t||(r+=4,t>>>=4),3&t||(r+=2,t>>>=2),1&t||r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},i.prototype.ior=function(e){return r(0===(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},i.prototype.iand=function(e){return r(0===(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this._strip()},i.prototype.ixor=function(e){return r(0===(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<i:this.words[n]&~(1<<i),this._strip()},i.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o<n.length;o++)t=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<r.length;o++)t=(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},i.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a<n.length;a++)o=(t=(0|r.words[a])-(0|n.words[a])+o)>>26,this.words[a]=67108863&t;for(;0!==o&&a<r.length;a++)o=(t=(0|r.words[a])+o)>>26,this.words[a]=67108863&t;if(0===o&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this._strip()},i.prototype.sub=function(e){return this.clone().isub(e)};var y=function(e,t,r){var n,i,o,a=e.words,d=t.words,s=r.words,c=0,u=0|a[0],l=8191&u,f=u>>>13,p=0|a[1],h=8191&p,y=p>>>13,m=0|a[2],g=8191&m,_=m>>>13,v=0|a[3],b=8191&v,S=v>>>13,I=0|a[4],N=8191&I,$=I>>>13,w=0|a[5],A=8191&w,O=w>>>13,M=0|a[6],T=8191&M,E=M>>>13,C=0|a[7],x=8191&C,k=C>>>13,P=0|a[8],D=8191&P,R=P>>>13,F=0|a[9],B=8191&F,L=F>>>13,U=0|d[0],K=8191&U,j=U>>>13,V=0|d[1],J=8191&V,q=V>>>13,G=0|d[2],z=8191&G,H=G>>>13,Z=0|d[3],W=8191&Z,Y=Z>>>13,X=0|d[4],Q=8191&X,ee=X>>>13,te=0|d[5],re=8191&te,ne=te>>>13,ie=0|d[6],oe=8191&ie,ae=ie>>>13,de=0|d[7],se=8191&de,ce=de>>>13,ue=0|d[8],le=8191&ue,fe=ue>>>13,pe=0|d[9],he=8191&pe,ye=pe>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(c+(n=Math.imul(l,K))|0)+((8191&(i=(i=Math.imul(l,j))+Math.imul(f,K)|0))<<13)|0;c=((o=Math.imul(f,j))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(h,K),i=(i=Math.imul(h,j))+Math.imul(y,K)|0,o=Math.imul(y,j);var ge=(c+(n=n+Math.imul(l,J)|0)|0)+((8191&(i=(i=i+Math.imul(l,q)|0)+Math.imul(f,J)|0))<<13)|0;c=((o=o+Math.imul(f,q)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,K),i=(i=Math.imul(g,j))+Math.imul(_,K)|0,o=Math.imul(_,j),n=n+Math.imul(h,J)|0,i=(i=i+Math.imul(h,q)|0)+Math.imul(y,J)|0,o=o+Math.imul(y,q)|0;var _e=(c+(n=n+Math.imul(l,z)|0)|0)+((8191&(i=(i=i+Math.imul(l,H)|0)+Math.imul(f,z)|0))<<13)|0;c=((o=o+Math.imul(f,H)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(b,K),i=(i=Math.imul(b,j))+Math.imul(S,K)|0,o=Math.imul(S,j),n=n+Math.imul(g,J)|0,i=(i=i+Math.imul(g,q)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,q)|0,n=n+Math.imul(h,z)|0,i=(i=i+Math.imul(h,H)|0)+Math.imul(y,z)|0,o=o+Math.imul(y,H)|0;var ve=(c+(n=n+Math.imul(l,W)|0)|0)+((8191&(i=(i=i+Math.imul(l,Y)|0)+Math.imul(f,W)|0))<<13)|0;c=((o=o+Math.imul(f,Y)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(N,K),i=(i=Math.imul(N,j))+Math.imul($,K)|0,o=Math.imul($,j),n=n+Math.imul(b,J)|0,i=(i=i+Math.imul(b,q)|0)+Math.imul(S,J)|0,o=o+Math.imul(S,q)|0,n=n+Math.imul(g,z)|0,i=(i=i+Math.imul(g,H)|0)+Math.imul(_,z)|0,o=o+Math.imul(_,H)|0,n=n+Math.imul(h,W)|0,i=(i=i+Math.imul(h,Y)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,Y)|0;var be=(c+(n=n+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,ee)|0)+Math.imul(f,Q)|0))<<13)|0;c=((o=o+Math.imul(f,ee)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(A,K),i=(i=Math.imul(A,j))+Math.imul(O,K)|0,o=Math.imul(O,j),n=n+Math.imul(N,J)|0,i=(i=i+Math.imul(N,q)|0)+Math.imul($,J)|0,o=o+Math.imul($,q)|0,n=n+Math.imul(b,z)|0,i=(i=i+Math.imul(b,H)|0)+Math.imul(S,z)|0,o=o+Math.imul(S,H)|0,n=n+Math.imul(g,W)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(h,Q)|0,i=(i=i+Math.imul(h,ee)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,ee)|0;var Se=(c+(n=n+Math.imul(l,re)|0)|0)+((8191&(i=(i=i+Math.imul(l,ne)|0)+Math.imul(f,re)|0))<<13)|0;c=((o=o+Math.imul(f,ne)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(T,K),i=(i=Math.imul(T,j))+Math.imul(E,K)|0,o=Math.imul(E,j),n=n+Math.imul(A,J)|0,i=(i=i+Math.imul(A,q)|0)+Math.imul(O,J)|0,o=o+Math.imul(O,q)|0,n=n+Math.imul(N,z)|0,i=(i=i+Math.imul(N,H)|0)+Math.imul($,z)|0,o=o+Math.imul($,H)|0,n=n+Math.imul(b,W)|0,i=(i=i+Math.imul(b,Y)|0)+Math.imul(S,W)|0,o=o+Math.imul(S,Y)|0,n=n+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(h,re)|0,i=(i=i+Math.imul(h,ne)|0)+Math.imul(y,re)|0,o=o+Math.imul(y,ne)|0;var Ie=(c+(n=n+Math.imul(l,oe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ae)|0)+Math.imul(f,oe)|0))<<13)|0;c=((o=o+Math.imul(f,ae)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(x,K),i=(i=Math.imul(x,j))+Math.imul(k,K)|0,o=Math.imul(k,j),n=n+Math.imul(T,J)|0,i=(i=i+Math.imul(T,q)|0)+Math.imul(E,J)|0,o=o+Math.imul(E,q)|0,n=n+Math.imul(A,z)|0,i=(i=i+Math.imul(A,H)|0)+Math.imul(O,z)|0,o=o+Math.imul(O,H)|0,n=n+Math.imul(N,W)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul($,W)|0,o=o+Math.imul($,Y)|0,n=n+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(h,oe)|0,i=(i=i+Math.imul(h,ae)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,ae)|0;var Ne=(c+(n=n+Math.imul(l,se)|0)|0)+((8191&(i=(i=i+Math.imul(l,ce)|0)+Math.imul(f,se)|0))<<13)|0;c=((o=o+Math.imul(f,ce)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(D,K),i=(i=Math.imul(D,j))+Math.imul(R,K)|0,o=Math.imul(R,j),n=n+Math.imul(x,J)|0,i=(i=i+Math.imul(x,q)|0)+Math.imul(k,J)|0,o=o+Math.imul(k,q)|0,n=n+Math.imul(T,z)|0,i=(i=i+Math.imul(T,H)|0)+Math.imul(E,z)|0,o=o+Math.imul(E,H)|0,n=n+Math.imul(A,W)|0,i=(i=i+Math.imul(A,Y)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,Y)|0,n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul($,Q)|0,o=o+Math.imul($,ee)|0,n=n+Math.imul(b,re)|0,i=(i=i+Math.imul(b,ne)|0)+Math.imul(S,re)|0,o=o+Math.imul(S,ne)|0,n=n+Math.imul(g,oe)|0,i=(i=i+Math.imul(g,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,n=n+Math.imul(h,se)|0,i=(i=i+Math.imul(h,ce)|0)+Math.imul(y,se)|0,o=o+Math.imul(y,ce)|0;var $e=(c+(n=n+Math.imul(l,le)|0)|0)+((8191&(i=(i=i+Math.imul(l,fe)|0)+Math.imul(f,le)|0))<<13)|0;c=((o=o+Math.imul(f,fe)|0)+(i>>>13)|0)+($e>>>26)|0,$e&=67108863,n=Math.imul(B,K),i=(i=Math.imul(B,j))+Math.imul(L,K)|0,o=Math.imul(L,j),n=n+Math.imul(D,J)|0,i=(i=i+Math.imul(D,q)|0)+Math.imul(R,J)|0,o=o+Math.imul(R,q)|0,n=n+Math.imul(x,z)|0,i=(i=i+Math.imul(x,H)|0)+Math.imul(k,z)|0,o=o+Math.imul(k,H)|0,n=n+Math.imul(T,W)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(E,W)|0,o=o+Math.imul(E,Y)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ne)|0)+Math.imul($,re)|0,o=o+Math.imul($,ne)|0,n=n+Math.imul(b,oe)|0,i=(i=i+Math.imul(b,ae)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,ae)|0,n=n+Math.imul(g,se)|0,i=(i=i+Math.imul(g,ce)|0)+Math.imul(_,se)|0,o=o+Math.imul(_,ce)|0,n=n+Math.imul(h,le)|0,i=(i=i+Math.imul(h,fe)|0)+Math.imul(y,le)|0,o=o+Math.imul(y,fe)|0;var we=(c+(n=n+Math.imul(l,he)|0)|0)+((8191&(i=(i=i+Math.imul(l,ye)|0)+Math.imul(f,he)|0))<<13)|0;c=((o=o+Math.imul(f,ye)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(B,J),i=(i=Math.imul(B,q))+Math.imul(L,J)|0,o=Math.imul(L,q),n=n+Math.imul(D,z)|0,i=(i=i+Math.imul(D,H)|0)+Math.imul(R,z)|0,o=o+Math.imul(R,H)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,Y)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,ee)|0,n=n+Math.imul(A,re)|0,i=(i=i+Math.imul(A,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,ae)|0)+Math.imul($,oe)|0,o=o+Math.imul($,ae)|0,n=n+Math.imul(b,se)|0,i=(i=i+Math.imul(b,ce)|0)+Math.imul(S,se)|0,o=o+Math.imul(S,ce)|0,n=n+Math.imul(g,le)|0,i=(i=i+Math.imul(g,fe)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,fe)|0;var Ae=(c+(n=n+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,ye)|0)+Math.imul(y,he)|0))<<13)|0;c=((o=o+Math.imul(y,ye)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(B,z),i=(i=Math.imul(B,H))+Math.imul(L,z)|0,o=Math.imul(L,H),n=n+Math.imul(D,W)|0,i=(i=i+Math.imul(D,Y)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,Y)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(E,re)|0,o=o+Math.imul(E,ne)|0,n=n+Math.imul(A,oe)|0,i=(i=i+Math.imul(A,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(N,se)|0,i=(i=i+Math.imul(N,ce)|0)+Math.imul($,se)|0,o=o+Math.imul($,ce)|0,n=n+Math.imul(b,le)|0,i=(i=i+Math.imul(b,fe)|0)+Math.imul(S,le)|0,o=o+Math.imul(S,fe)|0;var Oe=(c+(n=n+Math.imul(g,he)|0)|0)+((8191&(i=(i=i+Math.imul(g,ye)|0)+Math.imul(_,he)|0))<<13)|0;c=((o=o+Math.imul(_,ye)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(B,W),i=(i=Math.imul(B,Y))+Math.imul(L,W)|0,o=Math.imul(L,Y),n=n+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(E,oe)|0,o=o+Math.imul(E,ae)|0,n=n+Math.imul(A,se)|0,i=(i=i+Math.imul(A,ce)|0)+Math.imul(O,se)|0,o=o+Math.imul(O,ce)|0,n=n+Math.imul(N,le)|0,i=(i=i+Math.imul(N,fe)|0)+Math.imul($,le)|0,o=o+Math.imul($,fe)|0;var Me=(c+(n=n+Math.imul(b,he)|0)|0)+((8191&(i=(i=i+Math.imul(b,ye)|0)+Math.imul(S,he)|0))<<13)|0;c=((o=o+Math.imul(S,ye)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(B,Q),i=(i=Math.imul(B,ee))+Math.imul(L,Q)|0,o=Math.imul(L,ee),n=n+Math.imul(D,re)|0,i=(i=i+Math.imul(D,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,n=n+Math.imul(T,se)|0,i=(i=i+Math.imul(T,ce)|0)+Math.imul(E,se)|0,o=o+Math.imul(E,ce)|0,n=n+Math.imul(A,le)|0,i=(i=i+Math.imul(A,fe)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,fe)|0;var Te=(c+(n=n+Math.imul(N,he)|0)|0)+((8191&(i=(i=i+Math.imul(N,ye)|0)+Math.imul($,he)|0))<<13)|0;c=((o=o+Math.imul($,ye)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(B,re),i=(i=Math.imul(B,ne))+Math.imul(L,re)|0,o=Math.imul(L,ne),n=n+Math.imul(D,oe)|0,i=(i=i+Math.imul(D,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,n=n+Math.imul(x,se)|0,i=(i=i+Math.imul(x,ce)|0)+Math.imul(k,se)|0,o=o+Math.imul(k,ce)|0,n=n+Math.imul(T,le)|0,i=(i=i+Math.imul(T,fe)|0)+Math.imul(E,le)|0,o=o+Math.imul(E,fe)|0;var Ee=(c+(n=n+Math.imul(A,he)|0)|0)+((8191&(i=(i=i+Math.imul(A,ye)|0)+Math.imul(O,he)|0))<<13)|0;c=((o=o+Math.imul(O,ye)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(B,oe),i=(i=Math.imul(B,ae))+Math.imul(L,oe)|0,o=Math.imul(L,ae),n=n+Math.imul(D,se)|0,i=(i=i+Math.imul(D,ce)|0)+Math.imul(R,se)|0,o=o+Math.imul(R,ce)|0,n=n+Math.imul(x,le)|0,i=(i=i+Math.imul(x,fe)|0)+Math.imul(k,le)|0,o=o+Math.imul(k,fe)|0;var Ce=(c+(n=n+Math.imul(T,he)|0)|0)+((8191&(i=(i=i+Math.imul(T,ye)|0)+Math.imul(E,he)|0))<<13)|0;c=((o=o+Math.imul(E,ye)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(B,se),i=(i=Math.imul(B,ce))+Math.imul(L,se)|0,o=Math.imul(L,ce),n=n+Math.imul(D,le)|0,i=(i=i+Math.imul(D,fe)|0)+Math.imul(R,le)|0,o=o+Math.imul(R,fe)|0;var xe=(c+(n=n+Math.imul(x,he)|0)|0)+((8191&(i=(i=i+Math.imul(x,ye)|0)+Math.imul(k,he)|0))<<13)|0;c=((o=o+Math.imul(k,ye)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(B,le),i=(i=Math.imul(B,fe))+Math.imul(L,le)|0,o=Math.imul(L,fe);var ke=(c+(n=n+Math.imul(D,he)|0)|0)+((8191&(i=(i=i+Math.imul(D,ye)|0)+Math.imul(R,he)|0))<<13)|0;c=((o=o+Math.imul(R,ye)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863;var Pe=(c+(n=Math.imul(B,he))|0)+((8191&(i=(i=Math.imul(B,ye))+Math.imul(L,he)|0))<<13)|0;return c=((o=Math.imul(L,ye))+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,s[0]=me,s[1]=ge,s[2]=_e,s[3]=ve,s[4]=be,s[5]=Se,s[6]=Ie,s[7]=Ne,s[8]=$e,s[9]=we,s[10]=Ae,s[11]=Oe,s[12]=Me,s[13]=Te,s[14]=Ee,s[15]=Ce,s[16]=xe,s[17]=ke,s[18]=Pe,0!==c&&(s[19]=c,r.length++),r};function m(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var a=i;i=0;for(var d=67108863&n,s=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=s;c++){var u=o-c,l=(0|e.words[u])*(0|t.words[c]),f=67108863&l;d=67108863&(f=f+d|0),i+=(a=(a=a+(l/67108864|0)|0)+(f>>>26)|0)>>>26,a&=67108863}r.words[o]=d,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function g(e,t,r){return m(e,t,r)}Math.imul||(y=h),i.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?y(this,e,t):r<63?h(this,e,t):r<1024?m(this,e,t):g(this,e,t)},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),g(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){var t=e<0;t&&(e=-e),r("number"==typeof e),r(e<67108864);for(var n=0,i=0;i<this.length;i++){var o=(0|this.words[i])*e,a=(67108863&o)+(67108863&n);n>>=26,n+=o/67108864|0,n+=a>>>26,this.words[i]=67108863&a}return 0!==n&&(this.words[i]=n,this.length++),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=e.words[n]>>>i&1}return t}(e);if(0===t.length)return new i(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var o=r.sqr();n<t.length;n++,o=o.sqr())0!==t[n]&&(r=r.mul(o));return r},i.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t<this.length;t++){var d=this.words[t]&o,s=(0|this.words[t])-d<<n;this.words[t]=s|a,a=d>>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},i.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,n){var i;r("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),d=67108863^67108863>>>o<<o,s=n;if(i-=a,i=Math.max(0,i),s){for(var c=0;c<a;c++)s.words[c]=this.words[c];s.length=a}if(0===a);else if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var u=0;for(c=this.length-1;c>=0&&(0!==u||c>=i);c--){var l=0|this.words[c];this.words[c]=u<<26-o|l>>>o,u=l&d}return s&&0!==u&&(s.words[s.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<<t;return!(this.length<=n||!(this.words[n]&i))},i.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,n){var i,o,a=e.length+n;this._expand(a);var d=0;for(i=0;i<e.length;i++){o=(0|this.words[i+n])+d;var s=(0|e.words[i])*t;d=((o-=67108863&s)>>26)-(s/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)d=(o=(0|this.words[i+n])+d)>>26,this.words[i+n]=67108863&o;if(0===d)return this._strip();for(r(-1===d),d=0,i=0;i<this.length;i++)d=(o=-(0|this.words[i])+d)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),o=e,a=0|o.words[o.length-1];0!=(r=26-this._countBits(a))&&(o=o.ushln(r),n.iushln(r),a=0|o.words[o.length-1]);var d,s=n.length-o.length;if("mod"!==t){(d=new i(null)).length=s+1,d.words=new Array(d.length);for(var c=0;c<d.length;c++)d.words[c]=0}var u=n.clone()._ishlnsubmul(o,1,s);0===u.negative&&(n=u,d&&(d.words[s]=1));for(var l=s-1;l>=0;l--){var f=67108864*(0|n.words[o.length+l])+(0|n.words[o.length+l-1]);for(f=Math.min(f/a|0,67108863),n._ishlnsubmul(o,f,l);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(o,1,l),n.isZero()||(n.negative^=1);d&&(d.words[l]=f)}return d&&d._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:d||null,mod:n}},i.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(d=this.neg().divmod(e,t),"mod"!==t&&(o=d.div.neg()),"div"!==t&&(a=d.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:o,mod:a}):0===this.negative&&0!==e.negative?(d=this.divmod(e.neg(),t),"mod"!==t&&(o=d.div.neg()),{div:o,mod:d.mod}):0!==(this.negative&e.negative)?(d=this.neg().divmod(e.neg(),t),"div"!==t&&(a=d.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:d.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var o,a,d},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(n*i+(0|this.words[o]))%e;return t?-i:i},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/e|0,n=o%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new i(1),a=new i(0),d=new i(0),s=new i(1),c=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++c;for(var u=n.clone(),l=t.clone();!t.isZero();){for(var f=0,p=1;0===(t.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(o.isOdd()||a.isOdd())&&(o.iadd(u),a.isub(l)),o.iushrn(1),a.iushrn(1);for(var h=0,y=1;0===(n.words[0]&y)&&h<26;++h,y<<=1);if(h>0)for(n.iushrn(h);h-- >0;)(d.isOdd()||s.isOdd())&&(d.iadd(u),s.isub(l)),d.iushrn(1),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(d),a.isub(s)):(n.isub(t),d.isub(o),s.isub(a))}return{a:d,b:s,gcd:n.iushln(c)}},i.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,a=new i(1),d=new i(0),s=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,u=1;0===(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);for(var l=0,f=1;0===(n.words[0]&f)&&l<26;++l,f<<=1);if(l>0)for(n.iushrn(l);l-- >0;)d.isOdd()&&d.iadd(s),d.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(d)):(n.isub(t),d.isub(a))}return(o=0===t.cmpn(1)?a:d).cmpn(0)<0&&o.iadd(e),o},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return!(1&this.words[0])},i.prototype.isOdd=function(){return!(1&~this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,a=n;0!==o&&a<this.length;a++){var d=0|this.words[a];o=(d+=o)>>>26,d&=67108863,this.words[a]=d}return 0!==o&&(this.words[a]=o,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},i.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new $(e)},i.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var _={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function S(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function I(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function N(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function $(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function w(e){$.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},n(b,v),b.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,i=10;i<e.length;i++){var a=0|e.words[i];e.words[i-10]=(a&r)<<4|o>>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},n(S,v),n(I,v),n(N,v),N.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(_[e])return _[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new S;else if("p192"===e)t=new I;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new N}return _[e]=t,t},$.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},$.prototype._verify2=function(e,t){r(0===(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},$.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(c(e,e.umod(this.m)._forceRed(this)),e)},$.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},$.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},$.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},$.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},$.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},$.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},$.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},$.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},$.prototype.isqr=function(e){return this.imul(e,e.clone())},$.prototype.sqr=function(e){return this.mul(e,e)},$.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new i(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),a=0;!o.isZero()&&0===o.andln(1);)a++,o.iushrn(1);r(!o.isZero());var d=new i(1).toRed(this),s=d.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new i(2*u*u).toRed(this);0!==this.pow(u,c).cmp(s);)u.redIAdd(s);for(var l=this.pow(u,o),f=this.pow(e,o.addn(1).iushrn(1)),p=this.pow(e,o),h=a;0!==p.cmp(d);){for(var y=p,m=0;0!==y.cmp(d);m++)y=y.redSqr();r(m<h);var g=this.pow(l,new i(1).iushln(h-m-1));f=f.redMul(g),l=g.redSqr(),p=p.redMul(l),h=m}return f},$.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},$.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new i(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var o=r[0],a=0,d=0,s=t.bitLength()%26;for(0===s&&(s=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],u=s-1;u>=0;u--){var l=c>>u&1;o!==r[0]&&(o=this.sqr(o)),0!==l||0!==a?(a<<=1,a|=l,(4===++d||0===n&&0===u)&&(o=this.mul(o,r[a]),d=0,a=0)):d=0}s=26}return o},$.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},$.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new w(e)},n(w,$),w.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},w.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},w.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},w.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(n).iushrn(this.shift),a=o;return o.cmp(this.m)>=0?a=o.isub(this.m):o.cmpn(0)<0&&(a=o.iadd(this.m)),a._forceRed(this)},w.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(Im,$m)),Im.exports}var Am,Om,Mm,Tm={},Em="6.6.1",Cm={},xm={exports:{}},km=xm.exports;function Pm(){return Am||(Am=1,function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:Nm.Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function d(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function s(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a<o;a++){var d=e.charCodeAt(a)-48;i*=n,i+=d>=49?d-49+10:d>=17?d-17+10:d}return i}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,n):(this._parseBase(e,t,i),"le"===n&&this._initArray(this.toArray(),t,n)))},i.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},i.prototype._initArray=function(e,t,n){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,d=0;if("be"===n)for(i=e.length-1,o=0;i>=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<<d&67108863,this.words[o+1]=a>>>26-d&67108863,(d+=24)>=26&&(d-=26,o++);else if("le"===n)for(i=0,o=0;i<e.length;i+=3)a=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=a<<d&67108863,this.words[o+1]=a>>>26-d&67108863,(d+=24)>=26&&(d-=26,o++);return this.strip()},i.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,a=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=d(e,t,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)i=d(e,t,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,d=Math.min(o,o-a)+r,c=0,u=r;u<d;u+=n)c=s(e,u,u+n,t),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==a){var l=1;for(c=s(e,u,e.length,t),u=0;u<a;u++)l*=t;this.imuln(l),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}this.strip()},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,d=67108863&a,s=a/67108864|0;r.words[0]=d;for(var c=1;c<n;c++){for(var u=s>>>26,l=67108863&s,f=Math.min(c,t.length-1),p=Math.max(0,c-e.length+1);p<=f;p++){var h=c-p|0;u+=(a=(i=0|e.words[h])*(o=0|t.words[p])+l)/67108864|0,l=67108863&a}r.words[c]=0|l,s=0|u}return 0!==s?r.words[c]=0|s:r.length--,r.strip()}i.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,o=0,a=0;a<this.length;a++){var d=this.words[a],s=(16777215&(d<<i|o)).toString(16);o=d>>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),n=0!==o||a!==this.length-1?c[6-s.length]+s+n:s+n}for(0!==o&&(n=o.toString(16)+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var f=u[e],p=l[e];n="";var h=this.clone();for(h.negative=0;!h.isZero();){var y=h.modn(p).toString(e);n=(h=h.idivn(p)).isZero()?y+n:c[f-y.length]+y+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return r(void 0!==o),this.toArrayLike(o,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,d,s="le"===t,c=new e(o),u=this.clone();if(s){for(d=0;!u.isZero();d++)a=u.andln(255),u.iushrn(8),c[d]=a;for(;d<o;d++)c[d]=0}else{for(d=0;d<o-i;d++)c[d]=0;for(d=0;!u.isZero();d++)a=u.andln(255),u.iushrn(8),c[o-d-1]=a}return c},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 8191&t||(r+=13,t>>>=13),127&t||(r+=7,t>>>=7),15&t||(r+=4,t>>>=4),3&t||(r+=2,t>>>=2),1&t||r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},i.prototype.ior=function(e){return r(0===(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},i.prototype.iand=function(e){return r(0===(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},i.prototype.ixor=function(e){return r(0===(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},i.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o<n.length;o++)t=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<r.length;o++)t=(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},i.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a<n.length;a++)o=(t=(0|r.words[a])-(0|n.words[a])+o)>>26,this.words[a]=67108863&t;for(;0!==o&&a<r.length;a++)o=(t=(0|r.words[a])+o)>>26,this.words[a]=67108863&t;if(0===o&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this.strip()},i.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,r){var n,i,o,a=e.words,d=t.words,s=r.words,c=0,u=0|a[0],l=8191&u,f=u>>>13,p=0|a[1],h=8191&p,y=p>>>13,m=0|a[2],g=8191&m,_=m>>>13,v=0|a[3],b=8191&v,S=v>>>13,I=0|a[4],N=8191&I,$=I>>>13,w=0|a[5],A=8191&w,O=w>>>13,M=0|a[6],T=8191&M,E=M>>>13,C=0|a[7],x=8191&C,k=C>>>13,P=0|a[8],D=8191&P,R=P>>>13,F=0|a[9],B=8191&F,L=F>>>13,U=0|d[0],K=8191&U,j=U>>>13,V=0|d[1],J=8191&V,q=V>>>13,G=0|d[2],z=8191&G,H=G>>>13,Z=0|d[3],W=8191&Z,Y=Z>>>13,X=0|d[4],Q=8191&X,ee=X>>>13,te=0|d[5],re=8191&te,ne=te>>>13,ie=0|d[6],oe=8191&ie,ae=ie>>>13,de=0|d[7],se=8191&de,ce=de>>>13,ue=0|d[8],le=8191&ue,fe=ue>>>13,pe=0|d[9],he=8191&pe,ye=pe>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(c+(n=Math.imul(l,K))|0)+((8191&(i=(i=Math.imul(l,j))+Math.imul(f,K)|0))<<13)|0;c=((o=Math.imul(f,j))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(h,K),i=(i=Math.imul(h,j))+Math.imul(y,K)|0,o=Math.imul(y,j);var ge=(c+(n=n+Math.imul(l,J)|0)|0)+((8191&(i=(i=i+Math.imul(l,q)|0)+Math.imul(f,J)|0))<<13)|0;c=((o=o+Math.imul(f,q)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,K),i=(i=Math.imul(g,j))+Math.imul(_,K)|0,o=Math.imul(_,j),n=n+Math.imul(h,J)|0,i=(i=i+Math.imul(h,q)|0)+Math.imul(y,J)|0,o=o+Math.imul(y,q)|0;var _e=(c+(n=n+Math.imul(l,z)|0)|0)+((8191&(i=(i=i+Math.imul(l,H)|0)+Math.imul(f,z)|0))<<13)|0;c=((o=o+Math.imul(f,H)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(b,K),i=(i=Math.imul(b,j))+Math.imul(S,K)|0,o=Math.imul(S,j),n=n+Math.imul(g,J)|0,i=(i=i+Math.imul(g,q)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,q)|0,n=n+Math.imul(h,z)|0,i=(i=i+Math.imul(h,H)|0)+Math.imul(y,z)|0,o=o+Math.imul(y,H)|0;var ve=(c+(n=n+Math.imul(l,W)|0)|0)+((8191&(i=(i=i+Math.imul(l,Y)|0)+Math.imul(f,W)|0))<<13)|0;c=((o=o+Math.imul(f,Y)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(N,K),i=(i=Math.imul(N,j))+Math.imul($,K)|0,o=Math.imul($,j),n=n+Math.imul(b,J)|0,i=(i=i+Math.imul(b,q)|0)+Math.imul(S,J)|0,o=o+Math.imul(S,q)|0,n=n+Math.imul(g,z)|0,i=(i=i+Math.imul(g,H)|0)+Math.imul(_,z)|0,o=o+Math.imul(_,H)|0,n=n+Math.imul(h,W)|0,i=(i=i+Math.imul(h,Y)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,Y)|0;var be=(c+(n=n+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,ee)|0)+Math.imul(f,Q)|0))<<13)|0;c=((o=o+Math.imul(f,ee)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(A,K),i=(i=Math.imul(A,j))+Math.imul(O,K)|0,o=Math.imul(O,j),n=n+Math.imul(N,J)|0,i=(i=i+Math.imul(N,q)|0)+Math.imul($,J)|0,o=o+Math.imul($,q)|0,n=n+Math.imul(b,z)|0,i=(i=i+Math.imul(b,H)|0)+Math.imul(S,z)|0,o=o+Math.imul(S,H)|0,n=n+Math.imul(g,W)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(h,Q)|0,i=(i=i+Math.imul(h,ee)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,ee)|0;var Se=(c+(n=n+Math.imul(l,re)|0)|0)+((8191&(i=(i=i+Math.imul(l,ne)|0)+Math.imul(f,re)|0))<<13)|0;c=((o=o+Math.imul(f,ne)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(T,K),i=(i=Math.imul(T,j))+Math.imul(E,K)|0,o=Math.imul(E,j),n=n+Math.imul(A,J)|0,i=(i=i+Math.imul(A,q)|0)+Math.imul(O,J)|0,o=o+Math.imul(O,q)|0,n=n+Math.imul(N,z)|0,i=(i=i+Math.imul(N,H)|0)+Math.imul($,z)|0,o=o+Math.imul($,H)|0,n=n+Math.imul(b,W)|0,i=(i=i+Math.imul(b,Y)|0)+Math.imul(S,W)|0,o=o+Math.imul(S,Y)|0,n=n+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(h,re)|0,i=(i=i+Math.imul(h,ne)|0)+Math.imul(y,re)|0,o=o+Math.imul(y,ne)|0;var Ie=(c+(n=n+Math.imul(l,oe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ae)|0)+Math.imul(f,oe)|0))<<13)|0;c=((o=o+Math.imul(f,ae)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(x,K),i=(i=Math.imul(x,j))+Math.imul(k,K)|0,o=Math.imul(k,j),n=n+Math.imul(T,J)|0,i=(i=i+Math.imul(T,q)|0)+Math.imul(E,J)|0,o=o+Math.imul(E,q)|0,n=n+Math.imul(A,z)|0,i=(i=i+Math.imul(A,H)|0)+Math.imul(O,z)|0,o=o+Math.imul(O,H)|0,n=n+Math.imul(N,W)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul($,W)|0,o=o+Math.imul($,Y)|0,n=n+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(h,oe)|0,i=(i=i+Math.imul(h,ae)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,ae)|0;var Ne=(c+(n=n+Math.imul(l,se)|0)|0)+((8191&(i=(i=i+Math.imul(l,ce)|0)+Math.imul(f,se)|0))<<13)|0;c=((o=o+Math.imul(f,ce)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(D,K),i=(i=Math.imul(D,j))+Math.imul(R,K)|0,o=Math.imul(R,j),n=n+Math.imul(x,J)|0,i=(i=i+Math.imul(x,q)|0)+Math.imul(k,J)|0,o=o+Math.imul(k,q)|0,n=n+Math.imul(T,z)|0,i=(i=i+Math.imul(T,H)|0)+Math.imul(E,z)|0,o=o+Math.imul(E,H)|0,n=n+Math.imul(A,W)|0,i=(i=i+Math.imul(A,Y)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,Y)|0,n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul($,Q)|0,o=o+Math.imul($,ee)|0,n=n+Math.imul(b,re)|0,i=(i=i+Math.imul(b,ne)|0)+Math.imul(S,re)|0,o=o+Math.imul(S,ne)|0,n=n+Math.imul(g,oe)|0,i=(i=i+Math.imul(g,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,n=n+Math.imul(h,se)|0,i=(i=i+Math.imul(h,ce)|0)+Math.imul(y,se)|0,o=o+Math.imul(y,ce)|0;var $e=(c+(n=n+Math.imul(l,le)|0)|0)+((8191&(i=(i=i+Math.imul(l,fe)|0)+Math.imul(f,le)|0))<<13)|0;c=((o=o+Math.imul(f,fe)|0)+(i>>>13)|0)+($e>>>26)|0,$e&=67108863,n=Math.imul(B,K),i=(i=Math.imul(B,j))+Math.imul(L,K)|0,o=Math.imul(L,j),n=n+Math.imul(D,J)|0,i=(i=i+Math.imul(D,q)|0)+Math.imul(R,J)|0,o=o+Math.imul(R,q)|0,n=n+Math.imul(x,z)|0,i=(i=i+Math.imul(x,H)|0)+Math.imul(k,z)|0,o=o+Math.imul(k,H)|0,n=n+Math.imul(T,W)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(E,W)|0,o=o+Math.imul(E,Y)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ne)|0)+Math.imul($,re)|0,o=o+Math.imul($,ne)|0,n=n+Math.imul(b,oe)|0,i=(i=i+Math.imul(b,ae)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,ae)|0,n=n+Math.imul(g,se)|0,i=(i=i+Math.imul(g,ce)|0)+Math.imul(_,se)|0,o=o+Math.imul(_,ce)|0,n=n+Math.imul(h,le)|0,i=(i=i+Math.imul(h,fe)|0)+Math.imul(y,le)|0,o=o+Math.imul(y,fe)|0;var we=(c+(n=n+Math.imul(l,he)|0)|0)+((8191&(i=(i=i+Math.imul(l,ye)|0)+Math.imul(f,he)|0))<<13)|0;c=((o=o+Math.imul(f,ye)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(B,J),i=(i=Math.imul(B,q))+Math.imul(L,J)|0,o=Math.imul(L,q),n=n+Math.imul(D,z)|0,i=(i=i+Math.imul(D,H)|0)+Math.imul(R,z)|0,o=o+Math.imul(R,H)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,Y)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,ee)|0,n=n+Math.imul(A,re)|0,i=(i=i+Math.imul(A,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,ae)|0)+Math.imul($,oe)|0,o=o+Math.imul($,ae)|0,n=n+Math.imul(b,se)|0,i=(i=i+Math.imul(b,ce)|0)+Math.imul(S,se)|0,o=o+Math.imul(S,ce)|0,n=n+Math.imul(g,le)|0,i=(i=i+Math.imul(g,fe)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,fe)|0;var Ae=(c+(n=n+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,ye)|0)+Math.imul(y,he)|0))<<13)|0;c=((o=o+Math.imul(y,ye)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(B,z),i=(i=Math.imul(B,H))+Math.imul(L,z)|0,o=Math.imul(L,H),n=n+Math.imul(D,W)|0,i=(i=i+Math.imul(D,Y)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,Y)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(E,re)|0,o=o+Math.imul(E,ne)|0,n=n+Math.imul(A,oe)|0,i=(i=i+Math.imul(A,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(N,se)|0,i=(i=i+Math.imul(N,ce)|0)+Math.imul($,se)|0,o=o+Math.imul($,ce)|0,n=n+Math.imul(b,le)|0,i=(i=i+Math.imul(b,fe)|0)+Math.imul(S,le)|0,o=o+Math.imul(S,fe)|0;var Oe=(c+(n=n+Math.imul(g,he)|0)|0)+((8191&(i=(i=i+Math.imul(g,ye)|0)+Math.imul(_,he)|0))<<13)|0;c=((o=o+Math.imul(_,ye)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(B,W),i=(i=Math.imul(B,Y))+Math.imul(L,W)|0,o=Math.imul(L,Y),n=n+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(E,oe)|0,o=o+Math.imul(E,ae)|0,n=n+Math.imul(A,se)|0,i=(i=i+Math.imul(A,ce)|0)+Math.imul(O,se)|0,o=o+Math.imul(O,ce)|0,n=n+Math.imul(N,le)|0,i=(i=i+Math.imul(N,fe)|0)+Math.imul($,le)|0,o=o+Math.imul($,fe)|0;var Me=(c+(n=n+Math.imul(b,he)|0)|0)+((8191&(i=(i=i+Math.imul(b,ye)|0)+Math.imul(S,he)|0))<<13)|0;c=((o=o+Math.imul(S,ye)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(B,Q),i=(i=Math.imul(B,ee))+Math.imul(L,Q)|0,o=Math.imul(L,ee),n=n+Math.imul(D,re)|0,i=(i=i+Math.imul(D,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,n=n+Math.imul(T,se)|0,i=(i=i+Math.imul(T,ce)|0)+Math.imul(E,se)|0,o=o+Math.imul(E,ce)|0,n=n+Math.imul(A,le)|0,i=(i=i+Math.imul(A,fe)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,fe)|0;var Te=(c+(n=n+Math.imul(N,he)|0)|0)+((8191&(i=(i=i+Math.imul(N,ye)|0)+Math.imul($,he)|0))<<13)|0;c=((o=o+Math.imul($,ye)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(B,re),i=(i=Math.imul(B,ne))+Math.imul(L,re)|0,o=Math.imul(L,ne),n=n+Math.imul(D,oe)|0,i=(i=i+Math.imul(D,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,n=n+Math.imul(x,se)|0,i=(i=i+Math.imul(x,ce)|0)+Math.imul(k,se)|0,o=o+Math.imul(k,ce)|0,n=n+Math.imul(T,le)|0,i=(i=i+Math.imul(T,fe)|0)+Math.imul(E,le)|0,o=o+Math.imul(E,fe)|0;var Ee=(c+(n=n+Math.imul(A,he)|0)|0)+((8191&(i=(i=i+Math.imul(A,ye)|0)+Math.imul(O,he)|0))<<13)|0;c=((o=o+Math.imul(O,ye)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(B,oe),i=(i=Math.imul(B,ae))+Math.imul(L,oe)|0,o=Math.imul(L,ae),n=n+Math.imul(D,se)|0,i=(i=i+Math.imul(D,ce)|0)+Math.imul(R,se)|0,o=o+Math.imul(R,ce)|0,n=n+Math.imul(x,le)|0,i=(i=i+Math.imul(x,fe)|0)+Math.imul(k,le)|0,o=o+Math.imul(k,fe)|0;var Ce=(c+(n=n+Math.imul(T,he)|0)|0)+((8191&(i=(i=i+Math.imul(T,ye)|0)+Math.imul(E,he)|0))<<13)|0;c=((o=o+Math.imul(E,ye)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(B,se),i=(i=Math.imul(B,ce))+Math.imul(L,se)|0,o=Math.imul(L,ce),n=n+Math.imul(D,le)|0,i=(i=i+Math.imul(D,fe)|0)+Math.imul(R,le)|0,o=o+Math.imul(R,fe)|0;var xe=(c+(n=n+Math.imul(x,he)|0)|0)+((8191&(i=(i=i+Math.imul(x,ye)|0)+Math.imul(k,he)|0))<<13)|0;c=((o=o+Math.imul(k,ye)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(B,le),i=(i=Math.imul(B,fe))+Math.imul(L,le)|0,o=Math.imul(L,fe);var ke=(c+(n=n+Math.imul(D,he)|0)|0)+((8191&(i=(i=i+Math.imul(D,ye)|0)+Math.imul(R,he)|0))<<13)|0;c=((o=o+Math.imul(R,ye)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863;var Pe=(c+(n=Math.imul(B,he))|0)+((8191&(i=(i=Math.imul(B,ye))+Math.imul(L,he)|0))<<13)|0;return c=((o=Math.imul(L,ye))+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,s[0]=me,s[1]=ge,s[2]=_e,s[3]=ve,s[4]=be,s[5]=Se,s[6]=Ie,s[7]=Ne,s[8]=$e,s[9]=we,s[10]=Ae,s[11]=Oe,s[12]=Me,s[13]=Te,s[14]=Ee,s[15]=Ce,s[16]=xe,s[17]=ke,s[18]=Pe,0!==c&&(s[19]=c,r.length++),r};function h(e,t,r){return(new y).mulp(e,t,r)}function y(e,t){this.x=e,this.y=t}Math.imul||(p=f),i.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?p(this,e,t):n<63?f(this,e,t):n<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var a=i;i=0;for(var d=67108863&n,s=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=s;c++){var u=o-c,l=(0|e.words[u])*(0|t.words[c]),f=67108863&l;d=67108863&(f=f+d|0),i+=(a=(a=a+(l/67108864|0)|0)+(f>>>26)|0)>>>26,a&=67108863}r.words[o]=d,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):h(this,e,t),r},y.prototype.makeRBT=function(e){for(var t=new Array(e),r=i.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},y.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},y.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a<o;a++)n[a]=t[e[a]],i[a]=r[e[a]]},y.prototype.transform=function(e,t,r,n,i,o){this.permute(o,e,t,r,n,i);for(var a=1;a<i;a<<=1)for(var d=a<<1,s=Math.cos(2*Math.PI/d),c=Math.sin(2*Math.PI/d),u=0;u<i;u+=d)for(var l=s,f=c,p=0;p<a;p++){var h=r[u+p],y=n[u+p],m=r[u+p+a],g=n[u+p+a],_=l*m-f*g;g=l*g+f*m,m=_,r[u+p]=h+m,n[u+p]=y+g,r[u+p+a]=h-m,n[u+p+a]=y-g,p!==d&&(_=s*l-c*f,f=s*f+c*l,l=_)}},y.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},y.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},y.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},y.prototype.convert13b=function(e,t,n,i){for(var o=0,a=0;a<t;a++)o+=0|e[a],n[2*a]=8191&o,o>>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*t;a<i;++a)n[a]=0;r(0===o),r(!(-8192&o))},y.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},y.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),o=this.stub(n),a=new Array(n),d=new Array(n),s=new Array(n),c=new Array(n),u=new Array(n),l=new Array(n),f=r.words;f.length=n,this.convert13b(e.words,e.length,a,n),this.convert13b(t.words,t.length,c,n),this.transform(a,o,d,s,n,i),this.transform(c,o,u,l,n,i);for(var p=0;p<n;p++){var h=d[p]*u[p]-s[p]*l[p];s[p]=d[p]*l[p]+s[p]*u[p],d[p]=h}return this.conjugate(d,s,n),this.transform(d,s,f,o,n,i),this.conjugate(f,o,n),this.normalize13b(f,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),h(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){r("number"==typeof e),r(e<67108864);for(var t=0,n=0;n<this.length;n++){var i=(0|this.words[n])*e,o=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=o>>>26,this.words[n]=67108863&o}return 0!==t&&(this.words[n]=t,this.length++),this.length=0===e?1:this.length,this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=(e.words[n]&1<<i)>>>i}return t}(e);if(0===t.length)return new i(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var o=r.sqr();n<t.length;n++,o=o.sqr())0!==t[n]&&(r=r.mul(o));return r},i.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t<this.length;t++){var d=this.words[t]&o,s=(0|this.words[t])-d<<n;this.words[t]=s|a,a=d>>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},i.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,n){var i;r("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),d=67108863^67108863>>>o<<o,s=n;if(i-=a,i=Math.max(0,i),s){for(var c=0;c<a;c++)s.words[c]=this.words[c];s.length=a}if(0===a);else if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var u=0;for(c=this.length-1;c>=0&&(0!==u||c>=i);c--){var l=0|this.words[c];this.words[c]=u<<26-o|l>>>o,u=l&d}return s&&0!==u&&(s.words[s.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<<t;return!(this.length<=n||!(this.words[n]&i))},i.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return 0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,n){var i,o,a=e.length+n;this._expand(a);var d=0;for(i=0;i<e.length;i++){o=(0|this.words[i+n])+d;var s=(0|e.words[i])*t;d=((o-=67108863&s)>>26)-(s/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)d=(o=(0|this.words[i+n])+d)>>26,this.words[i+n]=67108863&o;if(0===d)return this.strip();for(r(-1===d),d=0,i=0;i<this.length;i++)d=(o=-(0|this.words[i])+d)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),o=e,a=0|o.words[o.length-1];0!=(r=26-this._countBits(a))&&(o=o.ushln(r),n.iushln(r),a=0|o.words[o.length-1]);var d,s=n.length-o.length;if("mod"!==t){(d=new i(null)).length=s+1,d.words=new Array(d.length);for(var c=0;c<d.length;c++)d.words[c]=0}var u=n.clone()._ishlnsubmul(o,1,s);0===u.negative&&(n=u,d&&(d.words[s]=1));for(var l=s-1;l>=0;l--){var f=67108864*(0|n.words[o.length+l])+(0|n.words[o.length+l-1]);for(f=Math.min(f/a|0,67108863),n._ishlnsubmul(o,f,l);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(o,1,l),n.isZero()||(n.negative^=1);d&&(d.words[l]=f)}return d&&d.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:d||null,mod:n}},i.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(d=this.neg().divmod(e,t),"mod"!==t&&(o=d.div.neg()),"div"!==t&&(a=d.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:o,mod:a}):0===this.negative&&0!==e.negative?(d=this.divmod(e.neg(),t),"mod"!==t&&(o=d.div.neg()),{div:o,mod:d.mod}):0!==(this.negative&e.negative)?(d=this.neg().divmod(e.neg(),t),"div"!==t&&(a=d.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:d.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,a,d},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(t*n+(0|this.words[i]))%e;return n},i.prototype.idivn=function(e){r(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*t;this.words[n]=i/e|0,t=i%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new i(1),a=new i(0),d=new i(0),s=new i(1),c=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++c;for(var u=n.clone(),l=t.clone();!t.isZero();){for(var f=0,p=1;0===(t.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(o.isOdd()||a.isOdd())&&(o.iadd(u),a.isub(l)),o.iushrn(1),a.iushrn(1);for(var h=0,y=1;0===(n.words[0]&y)&&h<26;++h,y<<=1);if(h>0)for(n.iushrn(h);h-- >0;)(d.isOdd()||s.isOdd())&&(d.iadd(u),s.isub(l)),d.iushrn(1),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(d),a.isub(s)):(n.isub(t),d.isub(o),s.isub(a))}return{a:d,b:s,gcd:n.iushln(c)}},i.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,a=new i(1),d=new i(0),s=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,u=1;0===(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);for(var l=0,f=1;0===(n.words[0]&f)&&l<26;++l,f<<=1);if(l>0)for(n.iushrn(l);l-- >0;)d.isOdd()&&d.iadd(s),d.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(d)):(n.isub(t),d.isub(a))}return(o=0===t.cmpn(1)?a:d).cmpn(0)<0&&o.iadd(e),o},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return!(1&this.words[0])},i.prototype.isOdd=function(){return!(1&~this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,a=n;0!==o&&a<this.length;a++){var d=0|this.words[a];o=(d+=o)>>>26,d&=67108863,this.words[a]=d}return 0!==o&&(this.words[a]=o,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},i.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new I(e)},i.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function g(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function b(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function I(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function N(e){I.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}g.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},g.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},g.prototype.split=function(e,t){e.iushrn(this.n,0,t)},g.prototype.imulK=function(e){return e.imul(this.k)},n(_,g),_.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,i=10;i<e.length;i++){var a=0|e.words[i];e.words[i-10]=(a&r)<<4|o>>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},_.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},n(v,g),n(b,g),n(S,g),S.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new _;else if("p224"===e)t=new v;else if("p192"===e)t=new b;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return m[e]=t,t},I.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},I.prototype._verify2=function(e,t){r(0===(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},I.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},I.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},I.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},I.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},I.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},I.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},I.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},I.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},I.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},I.prototype.isqr=function(e){return this.imul(e,e.clone())},I.prototype.sqr=function(e){return this.mul(e,e)},I.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new i(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),a=0;!o.isZero()&&0===o.andln(1);)a++,o.iushrn(1);r(!o.isZero());var d=new i(1).toRed(this),s=d.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new i(2*u*u).toRed(this);0!==this.pow(u,c).cmp(s);)u.redIAdd(s);for(var l=this.pow(u,o),f=this.pow(e,o.addn(1).iushrn(1)),p=this.pow(e,o),h=a;0!==p.cmp(d);){for(var y=p,m=0;0!==y.cmp(d);m++)y=y.redSqr();r(m<h);var g=this.pow(l,new i(1).iushln(h-m-1));f=f.redMul(g),l=g.redSqr(),p=p.redMul(l),h=m}return f},I.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},I.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new i(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var o=r[0],a=0,d=0,s=t.bitLength()%26;for(0===s&&(s=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],u=s-1;u>=0;u--){var l=c>>u&1;o!==r[0]&&(o=this.sqr(o)),0!==l||0!==a?(a<<=1,a|=l,(4===++d||0===n&&0===u)&&(o=this.mul(o,r[a]),d=0,a=0)):d=0}s=26}return o},I.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},I.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new N(e)},n(N,I),N.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},N.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},N.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},N.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(n).iushrn(this.shift),a=o;return o.cmp(this.m)>=0?a=o.isub(this.m):o.cmpn(0)<0&&(a=o.iadd(this.m)),a._forceRed(this)},N.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(xm,km)),xm.exports}function Dm(){if(Mm)return Om;function e(e,t){if(!e)throw new Error(t||"Assertion failed")}return Mm=1,Om=e,e.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)},Om}var Rm,Fm,Bm={};function Lm(){return Rm||(Rm=1,function(){var e=Bm;function t(e){return 1===e.length?"0"+e:e}function r(e){for(var r="",n=0;n<e.length;n++)r+=t(e[n].toString(16));return r}e.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}else for(n=0;n<e.length;n++){var i=e.charCodeAt(n),o=i>>8,a=255&i;o?r.push(o,a):r.push(a)}return r},e.zero2=t,e.toHex=r,e.encode=function(e,t){return"hex"===t?r(e):e}}()),Bm}function Um(){return Fm||(Fm=1,function(){var e=Cm,t=Pm(),r=Dm(),n=Lm();e.assert=r,e.toArray=n.toArray,e.zero2=n.zero2,e.toHex=n.toHex,e.encode=n.encode,e.getNAF=function(e,t,r){var n,i=new Array(Math.max(e.bitLength(),r)+1);for(n=0;n<i.length;n+=1)i[n]=0;var o=1<<t+1,a=e.clone();for(n=0;n<i.length;n++){var d,s=a.andln(o-1);a.isOdd()?(d=s>(o>>1)-1?(o>>1)-s:s,a.isubn(d)):d=0,i[n]=d,a.iushrn(1)}return i},e.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,d,s=e.andln(3)+i&3,c=t.andln(3)+o&3;3===s&&(s=-1),3===c&&(c=-1),a=1&s?3!==(n=e.andln(7)+i&7)&&5!==n||2!==c?s:-s:0,r[0].push(a),d=1&c?3!==(n=t.andln(7)+o&7)&&5!==n||2!==s?c:-c:0,r[1].push(d),2*i===a+1&&(i=1-i),2*o===d+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},e.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},e.parseBytes=function(t){return"string"==typeof t?e.toArray(t,"hex"):t},e.intFromLE=function(e){return new t(e,"hex","le")}}()),Cm}var Km,jm={exports:{}};function Vm(){if(Km)return jm.exports;var e;function t(e){this.rand=e}if(Km=1,jm.exports=function(r){return e||(e=new t(null)),e.generate(r)},jm.exports.Rand=t,t.prototype.generate=function(e){return this._rand(e)},t.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r<t.length;r++)t[r]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?t.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?t.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(t.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var r=Nm;if("function"!=typeof r.randomBytes)throw new Error("Not supported");t.prototype._rand=function(e){return r.randomBytes(e)}}catch(e){}return jm.exports}var Jm,qm,Gm={};function zm(){if(qm)return Jm;qm=1;var e=Pm(),t=Um(),r=t.getNAF,n=t.getJSF,i=t.assert;function o(t,r){this.type=t,this.p=new e(r.p,16),this.red=r.prime?e.red(r.prime):e.mont(this.p),this.zero=new e(0).toRed(this.red),this.one=new e(1).toRed(this.red),this.two=new e(2).toRed(this.red),this.n=r.n&&new e(r.n,16),this.g=r.g&&this.pointFromJSON(r.g,r.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function a(e,t){this.curve=e,this.type=t,this.precomputed=null}return Jm=o,o.prototype.point=function(){throw new Error("Not implemented")},o.prototype.validate=function(){throw new Error("Not implemented")},o.prototype._fixedNafMul=function(e,t){i(e.precomputed);var n=e._getDoubles(),o=r(t,1,this._bitLength),a=(1<<n.step+1)-(n.step%2==0?2:1);a/=3;var d,s,c=[];for(d=0;d<o.length;d+=n.step){s=0;for(var u=d+n.step-1;u>=d;u--)s=(s<<1)+o[u];c.push(s)}for(var l=this.jpoint(null,null,null),f=this.jpoint(null,null,null),p=a;p>0;p--){for(d=0;d<c.length;d++)(s=c[d])===p?f=f.mixedAdd(n.points[d]):s===-p&&(f=f.mixedAdd(n.points[d].neg()));l=l.add(f)}return l.toP()},o.prototype._wnafMul=function(e,t){var n=4,o=e._getNAFPoints(n);n=o.wnd;for(var a=o.points,d=r(t,n,this._bitLength),s=this.jpoint(null,null,null),c=d.length-1;c>=0;c--){for(var u=0;c>=0&&0===d[c];c--)u++;if(c>=0&&u++,s=s.dblp(u),c<0)break;var l=d[c];i(0!==l),s="affine"===e.type?l>0?s.mixedAdd(a[l-1>>1]):s.mixedAdd(a[-l-1>>1].neg()):l>0?s.add(a[l-1>>1]):s.add(a[-l-1>>1].neg())}return"affine"===e.type?s.toP():s},o.prototype._wnafMulAdd=function(e,t,i,o,a){var d,s,c,u=this._wnafT1,l=this._wnafT2,f=this._wnafT3,p=0;for(d=0;d<o;d++){var h=(c=t[d])._getNAFPoints(e);u[d]=h.wnd,l[d]=h.points}for(d=o-1;d>=1;d-=2){var y=d-1,m=d;if(1===u[y]&&1===u[m]){var g=[t[y],null,null,t[m]];0===t[y].y.cmp(t[m].y)?(g[1]=t[y].add(t[m]),g[2]=t[y].toJ().mixedAdd(t[m].neg())):0===t[y].y.cmp(t[m].y.redNeg())?(g[1]=t[y].toJ().mixedAdd(t[m]),g[2]=t[y].add(t[m].neg())):(g[1]=t[y].toJ().mixedAdd(t[m]),g[2]=t[y].toJ().mixedAdd(t[m].neg()));var _=[-3,-1,-5,-7,0,7,5,1,3],v=n(i[y],i[m]);for(p=Math.max(v[0].length,p),f[y]=new Array(p),f[m]=new Array(p),s=0;s<p;s++){var b=0|v[0][s],S=0|v[1][s];f[y][s]=_[3*(b+1)+(S+1)],f[m][s]=0,l[y]=g}}else f[y]=r(i[y],u[y],this._bitLength),f[m]=r(i[m],u[m],this._bitLength),p=Math.max(f[y].length,p),p=Math.max(f[m].length,p)}var I=this.jpoint(null,null,null),N=this._wnafT4;for(d=p;d>=0;d--){for(var $=0;d>=0;){var w=!0;for(s=0;s<o;s++)N[s]=0|f[s][d],0!==N[s]&&(w=!1);if(!w)break;$++,d--}if(d>=0&&$++,I=I.dblp($),d<0)break;for(s=0;s<o;s++){var A=N[s];0!==A&&(A>0?c=l[s][A-1>>1]:A<0&&(c=l[s][-A-1>>1].neg()),I="affine"===c.type?I.mixedAdd(c):I.add(c))}}for(d=0;d<o;d++)l[d]=null;return a?I:I.toP()},o.BasePoint=a,a.prototype.eq=function(){throw new Error("Not implemented")},a.prototype.validate=function(){return this.curve.validate(this)},o.prototype.decodePoint=function(e,r){e=t.toArray(e,r);var n=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*n)return 6===e[0]?i(e[e.length-1]%2==0):7===e[0]&&i(e[e.length-1]%2==1),this.point(e.slice(1,1+n),e.slice(1+n,1+2*n));if((2===e[0]||3===e[0])&&e.length-1===n)return this.pointFromX(e.slice(1,1+n),3===e[0]);throw new Error("Unknown point format")},a.prototype.encodeCompressed=function(e){return this.encode(e,!0)},a.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},a.prototype.encode=function(e,r){return t.encode(this._encode(r),e)},a.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},a.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},a.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<t;i+=e){for(var o=0;o<e;o++)n=n.dbl();r.push(n)}return{step:e,points:r}},a.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)t[i]=t[i-1].add(n);return{wnd:e,points:t}},a.prototype._getBeta=function(){return null},a.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t},Jm}var Hm,Zm,Wm,Ym,Xm,Qm,eg,tg,rg={exports:{}};function ng(){return Hm||(Hm=1,"function"==typeof Object.create?rg.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:rg.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}),rg.exports}function ig(){if(Wm)return Zm;Wm=1;var e=Um(),t=Pm(),r=ng(),n=zm(),i=e.assert;function o(e){n.call(this,"short",e),this.a=new t(e.a,16).toRed(this.red),this.b=new t(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function a(e,r,i,o){n.BasePoint.call(this,e,"affine"),null===r&&null===i?(this.x=null,this.y=null,this.inf=!0):(this.x=new t(r,16),this.y=new t(i,16),o&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function d(e,r,i,o){n.BasePoint.call(this,e,"jacobian"),null===r&&null===i&&null===o?(this.x=this.curve.one,this.y=this.curve.one,this.z=new t(0)):(this.x=new t(r,16),this.y=new t(i,16),this.z=new t(o,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}return r(o,n),Zm=o,o.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var r,n;if(e.beta)r=new t(e.beta,16).toRed(this.red);else{var o=this._getEndoRoots(this.p);r=(r=o[0].cmp(o[1])<0?o[0]:o[1]).toRed(this.red)}if(e.lambda)n=new t(e.lambda,16);else{var a=this._getEndoRoots(this.n);0===this.g.mul(a[0]).x.cmp(this.g.x.redMul(r))?n=a[0]:(n=a[1],i(0===this.g.mul(n).x.cmp(this.g.x.redMul(r))))}return{beta:r,lambda:n,basis:e.basis?e.basis.map(function(e){return{a:new t(e.a,16),b:new t(e.b,16)}}):this._getEndoBasis(n)}}},o.prototype._getEndoRoots=function(e){var r=e===this.p?this.red:t.mont(e),n=new t(2).toRed(r).redInvm(),i=n.redNeg(),o=new t(3).toRed(r).redNeg().redSqrt().redMul(n);return[i.redAdd(o).fromRed(),i.redSub(o).fromRed()]},o.prototype._getEndoBasis=function(e){for(var r,n,i,o,a,d,s,c,u,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),f=e,p=this.n.clone(),h=new t(1),y=new t(0),m=new t(0),g=new t(1),_=0;0!==f.cmpn(0);){var v=p.div(f);c=p.sub(v.mul(f)),u=m.sub(v.mul(h));var b=g.sub(v.mul(y));if(!i&&c.cmp(l)<0)r=s.neg(),n=h,i=c.neg(),o=u;else if(i&&2===++_)break;s=c,p=f,f=c,m=h,h=u,g=y,y=b}a=c.neg(),d=u;var S=i.sqr().add(o.sqr());return a.sqr().add(d.sqr()).cmp(S)>=0&&(a=r,d=n),i.negative&&(i=i.neg(),o=o.neg()),a.negative&&(a=a.neg(),d=d.neg()),[{a:i,b:o},{a:a,b:d}]},o.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),d=o.mul(n.a),s=i.mul(r.b),c=o.mul(n.b);return{k1:e.sub(a).sub(d),k2:s.add(c).neg()}},o.prototype.pointFromX=function(e,r){(e=new t(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(0!==i.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var o=i.fromRed().isOdd();return(r&&!o||!r&&o)&&(i=i.redNeg()),this.point(e,i)},o.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},o.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<e.length;o++){var a=this._endoSplit(t[o]),d=e[o],s=d._getBeta();a.k1.negative&&(a.k1.ineg(),d=d.neg(!0)),a.k2.negative&&(a.k2.ineg(),s=s.neg(!0)),n[2*o]=d,n[2*o+1]=s,i[2*o]=a.k1,i[2*o+1]=a.k2}for(var c=this._wnafMulAdd(1,n,i,2*o,r),u=0;u<2*o;u++)n[u]=null,i[u]=null;return c},r(a,n.BasePoint),o.prototype.point=function(e,t,r){return new a(this,e,t,r)},o.prototype.pointFromJSON=function(e,t){return a.fromJSON(this,e,t)},a.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},a.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},a.fromJSON=function(e,t,r){"string"==typeof t&&(t=JSON.parse(t));var n=e.point(t[0],t[1],r);if(!t[2])return n;function i(t){return e.point(t[0],t[1],r)}var o=t[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},a.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},a.prototype.isInfinity=function(){return this.inf},a.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},a.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},a.prototype.getX=function(){return this.x.fromRed()},a.prototype.getY=function(){return this.y.fromRed()},a.prototype.mul=function(e){return e=new t(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},a.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},a.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},a.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},a.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},a.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},r(d,n.BasePoint),o.prototype.jpoint=function(e,t,r){return new d(this,e,t,r)},d.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},d.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},d.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),d=n.redSub(i),s=o.redSub(a);if(0===d.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=d.redSqr(),u=c.redMul(d),l=n.redMul(c),f=s.redSqr().redIAdd(u).redISub(l).redISub(l),p=s.redMul(l.redISub(f)).redISub(o.redMul(u)),h=this.z.redMul(e.z).redMul(d);return this.curve.jpoint(f,p,h)},d.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),d=i.redSub(o);if(0===a.cmpn(0))return 0!==d.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var s=a.redSqr(),c=s.redMul(a),u=r.redMul(s),l=d.redSqr().redIAdd(c).redISub(u).redISub(u),f=d.redMul(u.redISub(l)).redISub(i.redMul(c)),p=this.z.redMul(a);return this.curve.jpoint(l,f,p)},d.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t<e;t++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,o=this.x,a=this.y,d=this.z,s=d.redSqr().redSqr(),c=a.redAdd(a);for(t=0;t<e;t++){var u=o.redSqr(),l=c.redSqr(),f=l.redSqr(),p=u.redAdd(u).redIAdd(u).redIAdd(n.redMul(s)),h=o.redMul(l),y=p.redSqr().redISub(h.redAdd(h)),m=h.redISub(y),g=p.redMul(m);g=g.redIAdd(g).redISub(f);var _=c.redMul(d);t+1<e&&(s=s.redMul(f)),o=y,d=_,c=g}return this.curve.jpoint(o,c.redMul(i),d)},d.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},d.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(o);a=a.redIAdd(a);var d=n.redAdd(n).redIAdd(n),s=d.redSqr().redISub(a).redISub(a),c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),e=s,t=d.redMul(a.redISub(s)).redISub(c),r=this.y.redAdd(this.y)}else{var u=this.x.redSqr(),l=this.y.redSqr(),f=l.redSqr(),p=this.x.redAdd(l).redSqr().redISub(u).redISub(f);p=p.redIAdd(p);var h=u.redAdd(u).redIAdd(u),y=h.redSqr(),m=f.redIAdd(f);m=(m=m.redIAdd(m)).redIAdd(m),e=y.redISub(p).redISub(p),t=h.redMul(p.redISub(e)).redISub(m),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},d.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(o);a=a.redIAdd(a);var d=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),s=d.redSqr().redISub(a).redISub(a);e=s;var c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),t=d.redMul(a.redISub(s)).redISub(c),r=this.y.redAdd(this.y)}else{var u=this.z.redSqr(),l=this.y.redSqr(),f=this.x.redMul(l),p=this.x.redSub(u).redMul(this.x.redAdd(u));p=p.redAdd(p).redIAdd(p);var h=f.redIAdd(f),y=(h=h.redIAdd(h)).redAdd(h);e=p.redSqr().redISub(y),r=this.y.redAdd(this.z).redSqr().redISub(l).redISub(u);var m=l.redSqr();m=(m=(m=m.redIAdd(m)).redIAdd(m)).redIAdd(m),t=p.redMul(h.redISub(e)).redISub(m)}return this.curve.jpoint(e,t,r)},d.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=t.redSqr(),a=r.redSqr(),d=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(i)),s=t.redAdd(t),c=(s=s.redIAdd(s)).redMul(a),u=d.redSqr().redISub(c.redAdd(c)),l=c.redISub(u),f=a.redSqr();f=(f=(f=f.redIAdd(f)).redIAdd(f)).redIAdd(f);var p=d.redMul(l).redISub(f),h=r.redAdd(r).redMul(n);return this.curve.jpoint(u,p,h)},d.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),n=t.redSqr(),i=e.redAdd(e).redIAdd(e),o=i.redSqr(),a=this.x.redAdd(t).redSqr().redISub(e).redISub(n),d=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(o)).redSqr(),s=n.redIAdd(n);s=(s=(s=s.redIAdd(s)).redIAdd(s)).redIAdd(s);var c=i.redIAdd(a).redSqr().redISub(o).redISub(d).redISub(s),u=t.redMul(c);u=(u=u.redIAdd(u)).redIAdd(u);var l=this.x.redMul(d).redISub(u);l=(l=l.redIAdd(l)).redIAdd(l);var f=this.y.redMul(c.redMul(s.redISub(c)).redISub(a.redMul(d)));f=(f=(f=f.redIAdd(f)).redIAdd(f)).redIAdd(f);var p=this.z.redAdd(a).redSqr().redISub(r).redISub(d);return this.curve.jpoint(l,f,p)},d.prototype.mul=function(e,r){return e=new t(e,r),this.curve._wnafMul(this,e)},d.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),i=r.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(n)).cmpn(0)},d.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var n=e.clone(),i=this.curve.redN.redMul(t);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},d.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},d.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},Zm}function og(){if(Xm)return Ym;Xm=1;var e=Pm(),t=ng(),r=zm(),n=Um();function i(t){r.call(this,"mont",t),this.a=new e(t.a,16).toRed(this.red),this.b=new e(t.b,16).toRed(this.red),this.i4=new e(4).toRed(this.red).redInvm(),this.two=new e(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function o(t,n,i){r.BasePoint.call(this,t,"projective"),null===n&&null===i?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new e(n,16),this.z=new e(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}return t(i,r),Ym=i,i.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},t(o,r.BasePoint),i.prototype.decodePoint=function(e,t){return this.point(n.toArray(e,t),1)},i.prototype.point=function(e,t){return new o(this,e,t)},i.prototype.pointFromJSON=function(e){return o.fromJSON(this,e)},o.prototype.precompute=function(){},o.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},o.fromJSON=function(e,t){return new o(e,t[0],t[1]||e.one)},o.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},o.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},o.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},o.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},o.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),a=i.redMul(n),d=t.z.redMul(o.redAdd(a).redSqr()),s=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(d,s)},o.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},o.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},o.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},o.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},o.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},o.prototype.getX=function(){return this.normalize(),this.x.fromRed()},Ym}function ag(){if(eg)return Qm;eg=1;var e=Um(),t=Pm(),r=ng(),n=zm(),i=e.assert;function o(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,n.call(this,"edwards",e),this.a=new t(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new t(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new t(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),i(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function a(e,r,i,o,a){n.BasePoint.call(this,e,"projective"),null===r&&null===i&&null===o?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new t(r,16),this.y=new t(i,16),this.z=o?new t(o,16):this.curve.one,this.t=a&&new t(a,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}return r(o,n),Qm=o,o.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},o.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},o.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},o.prototype.pointFromX=function(e,r){(e=new t(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr(),i=this.c2.redSub(this.a.redMul(n)),o=this.one.redSub(this.c2.redMul(this.d).redMul(n)),a=i.redMul(o.redInvm()),d=a.redSqrt();if(0!==d.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var s=d.fromRed().isOdd();return(r&&!s||!r&&s)&&(d=d.redNeg()),this.point(e,d)},o.prototype.pointFromY=function(e,r){(e=new t(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr(),i=n.redSub(this.c2),o=n.redMul(this.d).redMul(this.c2).redSub(this.a),a=i.redMul(o.redInvm());if(0===a.cmp(this.zero)){if(r)throw new Error("invalid point");return this.point(this.zero,e)}var d=a.redSqrt();if(0!==d.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return d.fromRed().isOdd()!==r&&(d=d.redNeg()),this.point(d,e)},o.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},r(a,n.BasePoint),o.prototype.pointFromJSON=function(e){return a.fromJSON(this,e)},o.prototype.point=function(e,t,r,n){return new a(this,e,t,r,n)},a.fromJSON=function(e,t){return new a(e,t[0],t[1],t[2])},a.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},a.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},a.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),a=o.redSub(r),d=n.redSub(t),s=i.redMul(a),c=o.redMul(d),u=i.redMul(d),l=a.redMul(o);return this.curve.point(s,c,l,u)},a.prototype._projDbl=function(){var e,t,r,n,i,o,a=this.x.redAdd(this.y).redSqr(),d=this.x.redSqr(),s=this.y.redSqr();if(this.curve.twisted){var c=(n=this.curve._mulA(d)).redAdd(s);this.zOne?(e=a.redSub(d).redSub(s).redMul(c.redSub(this.curve.two)),t=c.redMul(n.redSub(s)),r=c.redSqr().redSub(c).redSub(c)):(i=this.z.redSqr(),o=c.redSub(i).redISub(i),e=a.redSub(d).redISub(s).redMul(o),t=c.redMul(n.redSub(s)),r=c.redMul(o))}else n=d.redAdd(s),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),e=this.curve._mulC(a.redISub(n)).redMul(o),t=this.curve._mulC(n).redMul(d.redISub(s)),r=n.redMul(o);return this.curve.point(e,t,r)},a.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},a.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),a=i.redSub(n),d=i.redAdd(n),s=r.redAdd(t),c=o.redMul(a),u=d.redMul(s),l=o.redMul(s),f=a.redMul(d);return this.curve.point(c,u,f,l)},a.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),d=this.curve.d.redMul(o).redMul(a),s=i.redSub(d),c=i.redAdd(d),u=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),l=n.redMul(s).redMul(u);return this.curve.twisted?(t=n.redMul(c).redMul(a.redSub(this.curve._mulA(o))),r=s.redMul(c)):(t=n.redMul(c).redMul(a.redSub(o)),r=this.curve._mulC(s).redMul(c)),this.curve.point(l,t,r)},a.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},a.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},a.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},a.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},a.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},a.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},a.prototype.getX=function(){return this.normalize(),this.x.fromRed()},a.prototype.getY=function(){return this.normalize(),this.y.fromRed()},a.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},a.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},a.prototype.toP=a.prototype.normalize,a.prototype.mixedAdd=a.prototype.add,Qm}function dg(){return tg||(tg=1,function(e){var t=e;t.base=zm(),t.short=ig(),t.mont=og(),t.edwards=ag()}(Gm)),Gm}var sg,cg={},ug={},lg={};function fg(){if(sg)return lg;sg=1;var e=Dm(),t=ng();function r(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function n(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function i(e){return 1===e.length?"0"+e:e}function o(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}return lg.inherits=t,lg.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),o=0;o<e.length;o+=2)n.push(parseInt(e[o]+e[o+1],16))}else for(var i=0,o=0;o<e.length;o++){var a=e.charCodeAt(o);a<128?n[i++]=a:a<2048?(n[i++]=a>>6|192,n[i++]=63&a|128):r(e,o)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++o)),n[i++]=a>>18|240,n[i++]=a>>12&63|128,n[i++]=a>>6&63|128,n[i++]=63&a|128):(n[i++]=a>>12|224,n[i++]=a>>6&63|128,n[i++]=63&a|128)}else for(o=0;o<e.length;o++)n[o]=0|e[o];return n},lg.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=i(e[r].toString(16));return t},lg.htonl=n,lg.toHex32=function(e,t){for(var r="",i=0;i<e.length;i++){var a=e[i];"little"===t&&(a=n(a)),r+=o(a.toString(16))}return r},lg.zero2=i,lg.zero8=o,lg.join32=function(t,r,n,i){var o=n-r;e(o%4==0);for(var a=new Array(o/4),d=0,s=r;d<a.length;d++,s+=4){var c;c="big"===i?t[s]<<24|t[s+1]<<16|t[s+2]<<8|t[s+3]:t[s+3]<<24|t[s+2]<<16|t[s+1]<<8|t[s],a[d]=c>>>0}return a},lg.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n<e.length;n++,i+=4){var o=e[n];"big"===t?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},lg.rotr32=function(e,t){return e>>>t|e<<32-t},lg.rotl32=function(e,t){return e<<t|e>>>32-t},lg.sum32=function(e,t){return e+t>>>0},lg.sum32_3=function(e,t,r){return e+t+r>>>0},lg.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},lg.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},lg.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o<n?1:0)+r+i;e[t]=a>>>0,e[t+1]=o},lg.sum64_hi=function(e,t,r,n){return(t+n>>>0<t?1:0)+e+r>>>0},lg.sum64_lo=function(e,t,r,n){return t+n>>>0},lg.sum64_4_hi=function(e,t,r,n,i,o,a,d){var s=0,c=t;return s+=(c=c+n>>>0)<t?1:0,s+=(c=c+o>>>0)<o?1:0,e+r+i+a+(s+=(c=c+d>>>0)<d?1:0)>>>0},lg.sum64_4_lo=function(e,t,r,n,i,o,a,d){return t+n+o+d>>>0},lg.sum64_5_hi=function(e,t,r,n,i,o,a,d,s,c){var u=0,l=t;return u+=(l=l+n>>>0)<t?1:0,u+=(l=l+o>>>0)<o?1:0,u+=(l=l+d>>>0)<d?1:0,e+r+i+a+s+(u+=(l=l+c>>>0)<c?1:0)>>>0},lg.sum64_5_lo=function(e,t,r,n,i,o,a,d,s,c){return t+n+o+d+c>>>0},lg.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},lg.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},lg.shr64_hi=function(e,t,r){return e>>>r},lg.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},lg}var pg,hg={};function yg(){if(pg)return hg;pg=1;var e=fg(),t=Dm();function r(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}return hg.BlockHash=r,r.prototype.update=function(t,r){if(t=e.toArray(t,r),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var n=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-n,t.length),0===this.pending.length&&(this.pending=null),t=e.join32(t,0,t.length-n,this.endian);for(var i=0;i<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},r.prototype.digest=function(e){return this.update(this._pad()),t(null===this.pending),this._digest(e)},r.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=e>>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n},hg}var mg,gg,_g,vg,bg,Sg,Ig,Ng,$g,wg,Ag,Og,Mg={},Tg={};function Eg(){if(mg)return Tg;mg=1;var e=fg().rotr32;function t(e,t,r){return e&t^~e&r}function r(e,t,r){return e&t^e&r^t&r}function n(e,t,r){return e^t^r}return Tg.ft_1=function(e,i,o,a){return 0===e?t(i,o,a):1===e||3===e?n(i,o,a):2===e?r(i,o,a):void 0},Tg.ch32=t,Tg.maj32=r,Tg.p32=n,Tg.s0_256=function(t){return e(t,2)^e(t,13)^e(t,22)},Tg.s1_256=function(t){return e(t,6)^e(t,11)^e(t,25)},Tg.g0_256=function(t){return e(t,7)^e(t,18)^t>>>3},Tg.g1_256=function(t){return e(t,17)^e(t,19)^t>>>10},Tg}function Cg(){if(_g)return gg;_g=1;var e=fg(),t=yg(),r=Eg(),n=e.rotl32,i=e.sum32,o=e.sum32_5,a=r.ft_1,d=t.BlockHash,s=[1518500249,1859775393,2400959708,3395469782];function c(){if(!(this instanceof c))return new c;d.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}return e.inherits(c,d),gg=c,c.blockSize=512,c.outSize=160,c.hmacStrength=80,c.padLength=64,c.prototype._update=function(e,t){for(var r=this.W,d=0;d<16;d++)r[d]=e[t+d];for(;d<r.length;d++)r[d]=n(r[d-3]^r[d-8]^r[d-14]^r[d-16],1);var c=this.h[0],u=this.h[1],l=this.h[2],f=this.h[3],p=this.h[4];for(d=0;d<r.length;d++){var h=~~(d/20),y=o(n(c,5),a(h,u,l,f),p,r[d],s[h]);p=f,f=l,l=n(u,30),u=c,c=y}this.h[0]=i(this.h[0],c),this.h[1]=i(this.h[1],u),this.h[2]=i(this.h[2],l),this.h[3]=i(this.h[3],f),this.h[4]=i(this.h[4],p)},c.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"big"):e.split32(this.h,"big")},gg}function xg(){if(bg)return vg;bg=1;var e=fg(),t=yg(),r=Eg(),n=Dm(),i=e.sum32,o=e.sum32_4,a=e.sum32_5,d=r.ch32,s=r.maj32,c=r.s0_256,u=r.s1_256,l=r.g0_256,f=r.g1_256,p=t.BlockHash,h=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function y(){if(!(this instanceof y))return new y;p.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=h,this.W=new Array(64)}return e.inherits(y,p),vg=y,y.blockSize=512,y.outSize=256,y.hmacStrength=192,y.padLength=64,y.prototype._update=function(e,t){for(var r=this.W,p=0;p<16;p++)r[p]=e[t+p];for(;p<r.length;p++)r[p]=o(f(r[p-2]),r[p-7],l(r[p-15]),r[p-16]);var h=this.h[0],y=this.h[1],m=this.h[2],g=this.h[3],_=this.h[4],v=this.h[5],b=this.h[6],S=this.h[7];for(n(this.k.length===r.length),p=0;p<r.length;p++){var I=a(S,u(_),d(_,v,b),this.k[p],r[p]),N=i(c(h),s(h,y,m));S=b,b=v,v=_,_=i(g,I),g=m,m=y,y=h,h=i(I,N)}this.h[0]=i(this.h[0],h),this.h[1]=i(this.h[1],y),this.h[2]=i(this.h[2],m),this.h[3]=i(this.h[3],g),this.h[4]=i(this.h[4],_),this.h[5]=i(this.h[5],v),this.h[6]=i(this.h[6],b),this.h[7]=i(this.h[7],S)},y.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"big"):e.split32(this.h,"big")},vg}function kg(){if(Ig)return Sg;Ig=1;var e=fg(),t=xg();function r(){if(!(this instanceof r))return new r;t.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}return e.inherits(r,t),Sg=r,r.blockSize=512,r.outSize=224,r.hmacStrength=192,r.padLength=64,r.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h.slice(0,7),"big"):e.split32(this.h.slice(0,7),"big")},Sg}function Pg(){if($g)return Ng;$g=1;var e=fg(),t=yg(),r=Dm(),n=e.rotr64_hi,i=e.rotr64_lo,o=e.shr64_hi,a=e.shr64_lo,d=e.sum64,s=e.sum64_hi,c=e.sum64_lo,u=e.sum64_4_hi,l=e.sum64_4_lo,f=e.sum64_5_hi,p=e.sum64_5_lo,h=t.BlockHash,y=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function m(){if(!(this instanceof m))return new m;h.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=y,this.W=new Array(160)}function g(e,t,r,n,i){var o=e&r^~e&i;return o<0&&(o+=4294967296),o}function _(e,t,r,n,i,o){var a=t&n^~t&o;return a<0&&(a+=4294967296),a}function v(e,t,r,n,i){var o=e&r^e&i^r&i;return o<0&&(o+=4294967296),o}function b(e,t,r,n,i,o){var a=t&n^t&o^n&o;return a<0&&(a+=4294967296),a}function S(e,t){var r=n(e,t,28)^n(t,e,2)^n(t,e,7);return r<0&&(r+=4294967296),r}function I(e,t){var r=i(e,t,28)^i(t,e,2)^i(t,e,7);return r<0&&(r+=4294967296),r}function N(e,t){var r=n(e,t,14)^n(e,t,18)^n(t,e,9);return r<0&&(r+=4294967296),r}function $(e,t){var r=i(e,t,14)^i(e,t,18)^i(t,e,9);return r<0&&(r+=4294967296),r}function w(e,t){var r=n(e,t,1)^n(e,t,8)^o(e,t,7);return r<0&&(r+=4294967296),r}function A(e,t){var r=i(e,t,1)^i(e,t,8)^a(e,t,7);return r<0&&(r+=4294967296),r}function O(e,t){var r=n(e,t,19)^n(t,e,29)^o(e,t,6);return r<0&&(r+=4294967296),r}function M(e,t){var r=i(e,t,19)^i(t,e,29)^a(e,t,6);return r<0&&(r+=4294967296),r}return e.inherits(m,h),Ng=m,m.blockSize=1024,m.outSize=512,m.hmacStrength=192,m.padLength=128,m.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n<r.length;n+=2){var i=O(r[n-4],r[n-3]),o=M(r[n-4],r[n-3]),a=r[n-14],d=r[n-13],s=w(r[n-30],r[n-29]),c=A(r[n-30],r[n-29]),f=r[n-32],p=r[n-31];r[n]=u(i,o,a,d,s,c,f,p),r[n+1]=l(i,o,a,d,s,c,f,p)}},m.prototype._update=function(e,t){this._prepareBlock(e,t);var n=this.W,i=this.h[0],o=this.h[1],a=this.h[2],u=this.h[3],l=this.h[4],h=this.h[5],y=this.h[6],m=this.h[7],w=this.h[8],A=this.h[9],O=this.h[10],M=this.h[11],T=this.h[12],E=this.h[13],C=this.h[14],x=this.h[15];r(this.k.length===n.length);for(var k=0;k<n.length;k+=2){var P=C,D=x,R=N(w,A),F=$(w,A),B=g(w,A,O,M,T),L=_(w,A,O,M,T,E),U=this.k[k],K=this.k[k+1],j=n[k],V=n[k+1],J=f(P,D,R,F,B,L,U,K,j,V),q=p(P,D,R,F,B,L,U,K,j,V);P=S(i,o),D=I(i,o),R=v(i,o,a,u,l),F=b(i,o,a,u,l,h);var G=s(P,D,R,F),z=c(P,D,R,F);C=T,x=E,T=O,E=M,O=w,M=A,w=s(y,m,J,q),A=c(m,m,J,q),y=l,m=h,l=a,h=u,a=i,u=o,i=s(J,q,G,z),o=c(J,q,G,z)}d(this.h,0,i,o),d(this.h,2,a,u),d(this.h,4,l,h),d(this.h,6,y,m),d(this.h,8,w,A),d(this.h,10,O,M),d(this.h,12,T,E),d(this.h,14,C,x)},m.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"big"):e.split32(this.h,"big")},Ng}function Dg(){if(Ag)return wg;Ag=1;var e=fg(),t=Pg();function r(){if(!(this instanceof r))return new r;t.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}return e.inherits(r,t),wg=r,r.blockSize=1024,r.outSize=384,r.hmacStrength=192,r.padLength=128,r.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h.slice(0,12),"big"):e.split32(this.h.slice(0,12),"big")},wg}function Rg(){return Og||(Og=1,Mg.sha1=Cg(),Mg.sha224=kg(),Mg.sha256=xg(),Mg.sha384=Dg(),Mg.sha512=Pg()),Mg}var Fg,Bg,Lg,Ug,Kg,jg,Vg,Jg,qg,Gg,zg,Hg,Zg,Wg,Yg,Xg,Qg,e_,t_,r_,n_,i_,o_={};function a_(){if(Fg)return o_;Fg=1;var e=fg(),t=yg(),r=e.rotl32,n=e.sum32,i=e.sum32_3,o=e.sum32_4,a=t.BlockHash;function d(){if(!(this instanceof d))return new d;a.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function s(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function c(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function u(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}e.inherits(d,a),o_.ripemd160=d,d.blockSize=512,d.outSize=160,d.hmacStrength=192,d.padLength=64,d.prototype._update=function(e,t){for(var a=this.h[0],d=this.h[1],y=this.h[2],m=this.h[3],g=this.h[4],_=a,v=d,b=y,S=m,I=g,N=0;N<80;N++){var $=n(r(o(a,s(N,d,y,m),e[l[N]+t],c(N)),p[N]),g);a=g,g=m,m=r(y,10),y=d,d=$,$=n(r(o(_,s(79-N,v,b,S),e[f[N]+t],u(N)),h[N]),I),_=I,I=S,S=r(b,10),b=v,v=$}$=i(this.h[1],y,S),this.h[1]=i(this.h[2],m,I),this.h[2]=i(this.h[3],g,_),this.h[3]=i(this.h[4],a,v),this.h[4]=i(this.h[0],d,b),this.h[0]=$},d.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"little"):e.split32(this.h,"little")};var l=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],f=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],p=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],h=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];return o_}function d_(){if(Lg)return Bg;Lg=1;var e=fg(),t=Dm();function r(t,n,i){if(!(this instanceof r))return new r(t,n,i);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(e.toArray(n,i))}return Bg=r,r.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),t(e.length<=this.blockSize);for(var r=e.length;r<this.blockSize;r++)e.push(0);for(r=0;r<e.length;r++)e[r]^=54;for(this.inner=(new this.Hash).update(e),r=0;r<e.length;r++)e[r]^=106;this.outer=(new this.Hash).update(e)},r.prototype.update=function(e,t){return this.inner.update(e,t),this},r.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)},Bg}function s_(){return Ug||(Ug=1,function(e){var t=e;t.utils=fg(),t.common=yg(),t.sha=Rg(),t.ripemd=a_(),t.hmac=d_(),t.sha1=t.sha.sha1,t.sha256=t.sha.sha256,t.sha224=t.sha.sha224,t.sha384=t.sha.sha384,t.sha512=t.sha.sha512,t.ripemd160=t.ripemd.ripemd160}(ug)),ug}function c_(){return jg?Kg:(jg=1,Kg={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}})}function u_(){return Vg||(Vg=1,function(e){var t,r=e,n=s_(),i=dg(),o=Um().assert;function a(e){"short"===e.type?this.curve=new i.short(e):"edwards"===e.type?this.curve=new i.edwards(e):this.curve=new i.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function d(e,t){Object.defineProperty(r,e,{configurable:!0,enumerable:!0,get:function(){var n=new a(t);return Object.defineProperty(r,e,{configurable:!0,enumerable:!0,value:n}),n}})}r.PresetCurve=a,d("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:n.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),d("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:n.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),d("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:n.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),d("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:n.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),d("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:n.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),d("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:n.sha256,gRed:!1,g:["9"]}),d("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:n.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{t=c_()}catch(e){t=void 0}d("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:n.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",t]})}(cg)),cg}function l_(){if(qg)return Jg;qg=1;var e=s_(),t=Lm(),r=Dm();function n(e){if(!(this instanceof n))return new n(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var i=t.toArray(e.entropy,e.entropyEnc||"hex"),o=t.toArray(e.nonce,e.nonceEnc||"hex"),a=t.toArray(e.pers,e.persEnc||"hex");r(i.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(i,o,a)}return Jg=n,n.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},n.prototype._hmac=function(){return new e.hmac(this.hash,this.K)},n.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},n.prototype.reseed=function(e,n,i,o){"string"!=typeof n&&(o=i,i=n,n=null),e=t.toArray(e,n),i=t.toArray(i,o),r(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(i||[])),this._reseed=1},n.prototype.generate=function(e,r,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof r&&(i=n,n=r,r=null),n&&(n=t.toArray(n,i||"hex"),this._update(n));for(var o=[];o.length<e;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var a=o.slice(0,e);return this._update(n),this._reseed++,t.encode(a,r)},Jg}function f_(){if(zg)return Gg;zg=1;var e=Pm(),t=Um().assert;function r(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}return Gg=r,r.fromPublic=function(e,t,n){return t instanceof r?t:new r(e,{pub:t,pubEnc:n})},r.fromPrivate=function(e,t,n){return t instanceof r?t:new r(e,{priv:t,privEnc:n})},r.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},r.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},r.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},r.prototype._importPrivate=function(t,r){this.priv=new e(t,r||16),this.priv=this.priv.umod(this.ec.curve.n)},r.prototype._importPublic=function(e,r){if(e.x||e.y)return"mont"===this.ec.curve.type?t(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||t(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,r)},r.prototype.derive=function(e){return e.validate()||t(e.validate(),"public point not validated"),e.mul(this.priv).getX()},r.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},r.prototype.verify=function(e,t,r){return this.ec.verify(e,t,this,void 0,r)},r.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"},Gg}function p_(){if(Zg)return Hg;Zg=1;var e=Pm(),t=Um(),r=t.assert;function n(t,i){if(t instanceof n)return t;this._importDER(t,i)||(r(t.r&&t.s,"Signature without r or s"),this.r=new e(t.r,16),this.s=new e(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function i(){this.place=0}function o(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;if(0===e[t.place])return!1;for(var i=0,o=0,a=t.place;o<n;o++,a++)i<<=8,i|=e[a],i>>>=0;return!(i<=127)&&(t.place=a,i)}function a(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function d(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}return Hg=n,n.prototype._importDER=function(r,n){r=t.toArray(r,n);var a=new i;if(48!==r[a.place++])return!1;var d=o(r,a);if(!1===d)return!1;if(d+a.place!==r.length)return!1;if(2!==r[a.place++])return!1;var s=o(r,a);if(!1===s)return!1;if(128&r[a.place])return!1;var c=r.slice(a.place,s+a.place);if(a.place+=s,2!==r[a.place++])return!1;var u=o(r,a);if(!1===u)return!1;if(r.length!==u+a.place)return!1;if(128&r[a.place])return!1;var l=r.slice(a.place,u+a.place);if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}if(0===l[0]){if(!(128&l[1]))return!1;l=l.slice(1)}return this.r=new e(c),this.s=new e(l),this.recoveryParam=null,!0},n.prototype.toDER=function(e){var r=this.r.toArray(),n=this.s.toArray();for(128&r[0]&&(r=[0].concat(r)),128&n[0]&&(n=[0].concat(n)),r=a(r),n=a(n);!(n[0]||128&n[1]);)n=n.slice(1);var i=[2];d(i,r.length),(i=i.concat(r)).push(2),d(i,n.length);var o=i.concat(n),s=[48];return d(s,o.length),s=s.concat(o),t.encode(s,e)},Hg}function h_(){if(Yg)return Wg;Yg=1;var e=Pm(),t=l_(),r=Um(),n=u_(),i=Vm(),o=r.assert,a=f_(),d=p_();function s(e){if(!(this instanceof s))return new s(e);"string"==typeof e&&(o(Object.prototype.hasOwnProperty.call(n,e),"Unknown curve "+e),e=n[e]),e instanceof n.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}return Wg=s,s.prototype.keyPair=function(e){return new a(this,e)},s.prototype.keyFromPrivate=function(e,t){return a.fromPrivate(this,e,t)},s.prototype.keyFromPublic=function(e,t){return a.fromPublic(this,e,t)},s.prototype.genKeyPair=function(r){r||(r={});for(var n=new t({hash:this.hash,pers:r.pers,persEnc:r.persEnc||"utf8",entropy:r.entropy||i(this.hash.hmacStrength),entropyEnc:r.entropy&&r.entropyEnc||"utf8",nonce:this.n.toArray()}),o=this.n.byteLength(),a=this.n.sub(new e(2));;){var d=new e(n.generate(o));if(!(d.cmp(a)>0))return d.iaddn(1),this.keyFromPrivate(d)}},s.prototype._truncateToN=function(t,r,n){var i;if(e.isBN(t)||"number"==typeof t)i=(t=new e(t,16)).byteLength();else if("object"==typeof t)i=t.length,t=new e(t,16);else{var o=t.toString();i=o.length+1>>>1,t=new e(o,16)}"number"!=typeof n&&(n=8*i);var a=n-this.n.bitLength();return a>0&&(t=t.ushrn(a)),!r&&t.cmp(this.n)>=0?t.sub(this.n):t},s.prototype.sign=function(r,n,i,a){if("object"==typeof i&&(a=i,i=null),a||(a={}),"string"!=typeof r&&"number"!=typeof r&&!e.isBN(r)){o("object"==typeof r&&r&&"number"==typeof r.length,"Expected message to be an array-like, a hex string, or a BN instance"),o(r.length>>>0===r.length);for(var s=0;s<r.length;s++)o((255&r[s])===r[s])}n=this.keyFromPrivate(n,i),r=this._truncateToN(r,!1,a.msgBitLength),o(!r.isNeg(),"Can not sign a negative message");var c=this.n.byteLength(),u=n.getPrivate().toArray("be",c),l=r.toArray("be",c);o(new e(l).eq(r),"Can not sign message");for(var f=new t({hash:this.hash,entropy:u,nonce:l,pers:a.pers,persEnc:a.persEnc||"utf8"}),p=this.n.sub(new e(1)),h=0;;h++){var y=a.k?a.k(h):new e(f.generate(this.n.byteLength()));if(!((y=this._truncateToN(y,!0)).cmpn(1)<=0||y.cmp(p)>=0)){var m=this.g.mul(y);if(!m.isInfinity()){var g=m.getX(),_=g.umod(this.n);if(0!==_.cmpn(0)){var v=y.invm(this.n).mul(_.mul(n.getPrivate()).iadd(r));if(0!==(v=v.umod(this.n)).cmpn(0)){var b=(m.getY().isOdd()?1:0)|(0!==g.cmp(_)?2:0);return a.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),b^=1),new d({r:_,s:v,recoveryParam:b})}}}}}},s.prototype.verify=function(e,t,r,n,i){i||(i={}),e=this._truncateToN(e,!1,i.msgBitLength),r=this.keyFromPublic(r,n);var o=(t=new d(t,"hex")).r,a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,c=a.invm(this.n),u=c.mul(e).umod(this.n),l=c.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(u,r.getPublic(),l)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(u,r.getPublic(),l)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},s.prototype.recoverPubKey=function(t,r,n,i){o((3&n)===n,"The recovery param is more than two bits"),r=new d(r,i);var a=this.n,s=new e(t),c=r.r,u=r.s,l=1&n,f=n>>1;if(c.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw new Error("Unable to find sencond key candinate");c=f?this.curve.pointFromX(c.add(this.curve.n),l):this.curve.pointFromX(c,l);var p=r.r.invm(a),h=a.sub(s).mul(p).umod(a),y=u.mul(p).umod(a);return this.g.mulAdd(h,c,y)},s.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new d(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")},Wg}function y_(){if(Qg)return Xg;Qg=1;var e=Um(),t=e.assert,r=e.parseBytes,n=e.cachedProperty;function i(e,t){this.eddsa=e,this._secret=r(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=r(t.pub)}return i.fromPublic=function(e,t){return t instanceof i?t:new i(e,{pub:t})},i.fromSecret=function(e,t){return t instanceof i?t:new i(e,{secret:t})},i.prototype.secret=function(){return this._secret},n(i,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),n(i,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),n(i,"privBytes",function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n}),n(i,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),n(i,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),n(i,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),i.prototype.sign=function(e){return t(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},i.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},i.prototype.getSecret=function(r){return t(this._secret,"KeyPair is public only"),e.encode(this.secret(),r)},i.prototype.getPublic=function(t){return e.encode(this.pubBytes(),t)},Xg=i}function m_(){if(t_)return e_;t_=1;var e=Pm(),t=Um(),r=t.assert,n=t.cachedProperty,i=t.parseBytes;function o(t,n){this.eddsa=t,"object"!=typeof n&&(n=i(n)),Array.isArray(n)&&(r(n.length===2*t.encodingLength,"Signature has invalid size"),n={R:n.slice(0,t.encodingLength),S:n.slice(t.encodingLength)}),r(n.R&&n.S,"Signature without R or S"),t.isPoint(n.R)&&(this._R=n.R),n.S instanceof e&&(this._S=n.S),this._Rencoded=Array.isArray(n.R)?n.R:n.Rencoded,this._Sencoded=Array.isArray(n.S)?n.S:n.Sencoded}return n(o,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),n(o,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),n(o,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),n(o,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),o.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},o.prototype.toHex=function(){return t.encode(this.toBytes(),"hex").toUpperCase()},e_=o}function g_(){if(n_)return r_;n_=1;var e=s_(),t=u_(),r=Um(),n=r.assert,i=r.parseBytes,o=y_(),a=m_();function d(r){if(n("ed25519"===r,"only tested with ed25519 so far"),!(this instanceof d))return new d(r);r=t[r].curve,this.curve=r,this.g=r.g,this.g.precompute(r.n.bitLength()+1),this.pointClass=r.point().constructor,this.encodingLength=Math.ceil(r.n.bitLength()/8),this.hash=e.sha512}return r_=d,d.prototype.sign=function(e,t){e=i(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),o=this.g.mul(n),a=this.encodePoint(o),d=this.hashInt(a,r.pubBytes(),e).mul(r.priv()),s=n.add(d).umod(this.curve.n);return this.makeSignature({R:o,S:s,Rencoded:a})},d.prototype.verify=function(e,t,r){if(e=i(e),(t=this.makeSignature(t)).S().gte(t.eddsa.curve.n)||t.S().isNeg())return!1;var n=this.keyFromPublic(r),o=this.hashInt(t.Rencoded(),n.pubBytes(),e),a=this.g.mul(t.S());return t.R().add(n.pub().mul(o)).eq(a)},d.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return r.intFromLE(e.digest()).umod(this.curve.n)},d.prototype.keyFromPublic=function(e){return o.fromPublic(this,e)},d.prototype.keyFromSecret=function(e){return o.fromSecret(this,e)},d.prototype.makeSignature=function(e){return e instanceof a?e:new a(this,e)},d.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},d.prototype.decodePoint=function(e){var t=(e=r.parseBytes(e)).length-1,n=e.slice(0,t).concat(-129&e[t]),i=!!(128&e[t]),o=r.intFromLE(n);return this.curve.pointFromY(o,i)},d.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},d.prototype.decodeInt=function(e){return r.intFromLE(e)},d.prototype.isPoint=function(e){return e instanceof this.pointClass},r_}function __(){return i_||(i_=1,function(e){var t=e;t.version=Em,t.utils=Um(),t.rand=Vm(),t.curve=dg(),t.curves=u_(),t.ec=h_(),t.eddsa=g_()}(Tm)),Tm}var v_,b_={exports:{}};function S_(){return v_||(v_=1,e=b_,function(){var t="input is invalid type",r="object"==typeof window,n=r?window:{};n.JS_SHA3_NO_WINDOW&&(r=!1);var i=!r&&"object"==typeof self;!n.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?n=H:i&&(n=self);for(var o=!n.JS_SHA3_NO_COMMON_JS&&e.exports,a=!n.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,d="0123456789abcdef".split(""),s=[4,1024,262144,67108864],c=[0,8,16,24],u=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],l=[224,256,384,512],f=[128,256],p=["hex","buffer","arrayBuffer","array","digest"],h={128:168,256:136},y=n.JS_SHA3_NO_NODE_JS||!Array.isArray?function(e){return"[object Array]"===Object.prototype.toString.call(e)}:Array.isArray,m=!a||!n.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView?ArrayBuffer.isView:function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer},g=function(e){var r=typeof e;if("string"===r)return[e,!0];if("object"!==r||null===e)throw new Error(t);if(a&&e.constructor===ArrayBuffer)return[new Uint8Array(e),!1];if(!y(e)&&!m(e))throw new Error(t);return[e,!1]},_=function(e){return 0===g(e)[0].length},v=function(e){for(var t=[],r=0;r<e.length;++r)t[r]=e[r];return t},b=function(e,t,r){return function(n){return new D(e,t,e).update(n)[r]()}},S=function(e,t,r){return function(n,i){return new D(e,t,i).update(n)[r]()}},I=function(e,t,r){return function(t,n,i,o){return O["cshake"+e].update(t,n,i,o)[r]()}},N=function(e,t,r){return function(t,n,i,o){return O["kmac"+e].update(t,n,i,o)[r]()}},$=function(e,t,r,n){for(var i=0;i<p.length;++i){var o=p[i];e[o]=t(r,n,o)}return e},w=function(e,t){var r=b(e,t,"hex");return r.create=function(){return new D(e,t,e)},r.update=function(e){return r.create().update(e)},$(r,b,e,t)},A=[{name:"keccak",padding:[1,256,65536,16777216],bits:l,createMethod:w},{name:"sha3",padding:[6,1536,393216,100663296],bits:l,createMethod:w},{name:"shake",padding:[31,7936,2031616,520093696],bits:f,createMethod:function(e,t){var r=S(e,t,"hex");return r.create=function(r){return new D(e,t,r)},r.update=function(e,t){return r.create(t).update(e)},$(r,S,e,t)}},{name:"cshake",padding:s,bits:f,createMethod:function(e,t){var r=h[e],n=I(e,0,"hex");return n.create=function(n,i,o){return _(i)&&_(o)?O["shake"+e].create(n):new D(e,t,n).bytepad([i,o],r)},n.update=function(e,t,r,i){return n.create(t,r,i).update(e)},$(n,I,e,t)}},{name:"kmac",padding:s,bits:f,createMethod:function(e,t){var r=h[e],n=N(e,0,"hex");return n.create=function(n,i,o){return new R(e,t,i).bytepad(["KMAC",o],r).bytepad([n],r)},n.update=function(e,t,r,i){return n.create(e,r,i).update(t)},$(n,N,e,t)}}],O={},M=[],T=0;T<A.length;++T)for(var E=A[T],C=E.bits,x=0;x<C.length;++x){var k=E.name+"_"+C[x];if(M.push(k),O[k]=E.createMethod(C[x],E.padding),"sha3"!==E.name){var P=E.name+C[x];M.push(P),O[P]=O[k]}}function D(e,t,r){this.blocks=[],this.s=[],this.padding=t,this.outputBits=r,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function R(e,t,r){D.call(this,e,t,r)}D.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t=g(e);e=t[0];for(var r,n,i=t[1],o=this.blocks,a=this.byteCount,d=e.length,s=this.blockCount,u=0,l=this.s;u<d;){if(this.reset)for(this.reset=!1,o[0]=this.block,r=1;r<s+1;++r)o[r]=0;if(i)for(r=this.start;u<d&&r<a;++u)(n=e.charCodeAt(u))<128?o[r>>2]|=n<<c[3&r++]:n<2048?(o[r>>2]|=(192|n>>6)<<c[3&r++],o[r>>2]|=(128|63&n)<<c[3&r++]):n<55296||n>=57344?(o[r>>2]|=(224|n>>12)<<c[3&r++],o[r>>2]|=(128|n>>6&63)<<c[3&r++],o[r>>2]|=(128|63&n)<<c[3&r++]):(n=65536+((1023&n)<<10|1023&e.charCodeAt(++u)),o[r>>2]|=(240|n>>18)<<c[3&r++],o[r>>2]|=(128|n>>12&63)<<c[3&r++],o[r>>2]|=(128|n>>6&63)<<c[3&r++],o[r>>2]|=(128|63&n)<<c[3&r++]);else for(r=this.start;u<d&&r<a;++u)o[r>>2]|=e[u]<<c[3&r++];if(this.lastByteIndex=r,r>=a){for(this.start=r-a,this.block=o[s],r=0;r<s;++r)l[r]^=o[r];F(l),this.reset=!0}else this.start=r}return this},D.prototype.encode=function(e,t){var r=255&e,n=1,i=[r];for(r=255&(e>>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},D.prototype.encodeString=function(e){var t=g(e);e=t[0];var r=t[1],n=0,i=e.length;if(r)for(var o=0;o<e.length;++o){var a=e.charCodeAt(o);a<128?n+=1:a<2048?n+=2:a<55296||a>=57344?n+=3:(a=65536+((1023&a)<<10|1023&e.charCodeAt(++o)),n+=4)}else n=i;return n+=this.encode(8*n),this.update(e),n},D.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n<e.length;++n)r+=this.encodeString(e[n]);var i=(t-r%t)%t,o=[];return o.length=i,this.update(o),this},D.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex,r=this.blockCount,n=this.s;if(e[t>>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t<r+1;++t)e[t]=0;for(e[r-1]|=2147483648,t=0;t<r;++t)n[t]^=e[t];F(n)}},D.prototype.toString=D.prototype.hex=function(){this.finalize();for(var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s="";a<n;){for(o=0;o<t&&a<n;++o,++a)e=r[o],s+=d[e>>4&15]+d[15&e]+d[e>>12&15]+d[e>>8&15]+d[e>>20&15]+d[e>>16&15]+d[e>>28&15]+d[e>>24&15];a%t===0&&(r=v(r),F(r),o=0)}return i&&(e=r[o],s+=d[e>>4&15]+d[15&e],i>1&&(s+=d[e>>12&15]+d[e>>8&15]),i>2&&(s+=d[e>>20&15]+d[e>>16&15])),s},D.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,d=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(d);for(var s=new Uint32Array(e);a<n;){for(o=0;o<t&&a<n;++o,++a)s[a]=r[o];a%t===0&&(r=v(r),F(r))}return i&&(s[a]=r[o],e=e.slice(0,d)),e},D.prototype.buffer=D.prototype.arrayBuffer,D.prototype.digest=D.prototype.array=function(){this.finalize();for(var e,t,r=this.blockCount,n=this.s,i=this.outputBlocks,o=this.extraBytes,a=0,d=0,s=[];d<i;){for(a=0;a<r&&d<i;++a,++d)e=d<<2,t=n[a],s[e]=255&t,s[e+1]=t>>8&255,s[e+2]=t>>16&255,s[e+3]=t>>24&255;d%r===0&&(n=v(n),F(n))}return o&&(e=d<<2,t=n[a],s[e]=255&t,o>1&&(s[e+1]=t>>8&255),o>2&&(s[e+2]=t>>16&255)),s},R.prototype=new D,R.prototype.finalize=function(){return this.encode(this.outputBits,!0),D.prototype.finalize.call(this)};var F=function(e){var t,r,n,i,o,a,d,s,c,l,f,p,h,y,m,g,_,v,b,S,I,N,$,w,A,O,M,T,E,C,x,k,P,D,R,F,B,L,U,K,j,V,J,q,G,z,H,Z,W,Y,X,Q,ee,te,re,ne,ie,oe,ae,de,se,ce,ue;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],d=e[3]^e[13]^e[23]^e[33]^e[43],s=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],f=e[7]^e[17]^e[27]^e[37]^e[47],t=(p=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|d>>>31),r=(h=e[9]^e[19]^e[29]^e[39]^e[49])^(d<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(s<<1|c>>>31),r=o^(c<<1|s>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(l<<1|f>>>31),r=d^(f<<1|l>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=s^(p<<1|h>>>31),r=c^(h<<1|p>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=l^(i<<1|o>>>31),r=f^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,y=e[0],m=e[1],z=e[11]<<4|e[10]>>>28,H=e[10]<<4|e[11]>>>28,T=e[20]<<3|e[21]>>>29,E=e[21]<<3|e[20]>>>29,de=e[31]<<9|e[30]>>>23,se=e[30]<<9|e[31]>>>23,V=e[40]<<18|e[41]>>>14,J=e[41]<<18|e[40]>>>14,D=e[2]<<1|e[3]>>>31,R=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,_=e[12]<<12|e[13]>>>20,Z=e[22]<<10|e[23]>>>22,W=e[23]<<10|e[22]>>>22,C=e[33]<<13|e[32]>>>19,x=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,ue=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,F=e[14]<<6|e[15]>>>26,B=e[15]<<6|e[14]>>>26,v=e[25]<<11|e[24]>>>21,b=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,X=e[35]<<15|e[34]>>>17,k=e[45]<<29|e[44]>>>3,P=e[44]<<29|e[45]>>>3,w=e[6]<<28|e[7]>>>4,A=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,L=e[26]<<25|e[27]>>>7,U=e[27]<<25|e[26]>>>7,S=e[36]<<21|e[37]>>>11,I=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,q=e[8]<<27|e[9]>>>5,G=e[9]<<27|e[8]>>>5,O=e[18]<<20|e[19]>>>12,M=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,K=e[38]<<8|e[39]>>>24,j=e[39]<<8|e[38]>>>24,N=e[48]<<14|e[49]>>>18,$=e[49]<<14|e[48]>>>18,e[0]=y^~g&v,e[1]=m^~_&b,e[10]=w^~O&T,e[11]=A^~M&E,e[20]=D^~F&L,e[21]=R^~B&U,e[30]=q^~z&Z,e[31]=G^~H&W,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=g^~v&S,e[3]=_^~b&I,e[12]=O^~T&C,e[13]=M^~E&x,e[22]=F^~L&K,e[23]=B^~U&j,e[32]=z^~Z&Y,e[33]=H^~W&X,e[42]=ne^~oe&de,e[43]=ie^~ae&se,e[4]=v^~S&N,e[5]=b^~I&$,e[14]=T^~C&k,e[15]=E^~x&P,e[24]=L^~K&V,e[25]=U^~j&J,e[34]=Z^~Y&Q,e[35]=W^~X&ee,e[44]=oe^~de&ce,e[45]=ae^~se&ue,e[6]=S^~N&y,e[7]=I^~$&m,e[16]=C^~k&w,e[17]=x^~P&A,e[26]=K^~V&D,e[27]=j^~J&R,e[36]=Y^~Q&q,e[37]=X^~ee&G,e[46]=de^~ce&te,e[47]=se^~ue&re,e[8]=N^~y&g,e[9]=$^~m&_,e[18]=k^~w&O,e[19]=P^~A&M,e[28]=V^~D&F,e[29]=J^~R&B,e[38]=Q^~q&z,e[39]=ee^~G&H,e[48]=ce^~te&ne,e[49]=ue^~re&ie,e[0]^=u[n],e[1]^=u[n+1]};if(o)e.exports=O;else for(T=0;T<M.length;++T)n[M[T]]=O[M[T]]}()),b_.exports;var e}var I_,N_,$_={},w_={},A_={},O_={},M_={};function T_(){if(I_)return M_;function e(e,t,r){const n=t.split("|").map(e=>e.trim());for(let r=0;r<n.length;r++)switch(t){case"any":return;case"bigint":case"boolean":case"number":case"string":if(typeof e===t)return}const i=new Error(`invalid value for type ${t}`);throw i.code="INVALID_ARGUMENT",i.argument=`value.${r}`,i.value=e,i}return I_=1,Object.defineProperty(M_,"__esModule",{value:!0}),M_.defineProperties=void 0,M_.defineProperties=function(t,r,n){for(const i in r){const o=r[i],a=n?n[i]:null;a&&e(o,a,i),Object.defineProperty(t,i,{enumerable:!0,value:o,writable:!1})}},M_}function E_(){if(N_)return O_;N_=1,Object.defineProperty(O_,"__esModule",{value:!0}),O_.assertPrivate=O_.assertNormalize=O_.assertArgumentCount=O_.assertArgument=O_.assert=O_.makeError=O_.isError=void 0;const e=T_();function t(e){if(null==e)return"null";if(Array.isArray(e))return"[ "+e.map(t).join(", ")+" ]";if(e instanceof Uint8Array){const t="0123456789abcdef";let r="0x";for(let n=0;n<e.length;n++)r+=t[e[n]>>4],r+=t[15&e[n]];return r}if("object"==typeof e&&"function"==typeof e.toJSON)return t(e.toJSON());switch(typeof e){case"boolean":case"symbol":case"number":return e.toString();case"bigint":return BigInt(e).toString();case"string":return JSON.stringify(e);case"object":{const r=Object.keys(e);return r.sort(),"{ "+r.map(r=>`${t(r)}: ${t(e[r])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function r(r,n,i){const o=r;{const e=[];if(i){if("message"in i||"code"in i||"name"in i)throw new Error(`value will overwrite populated values: ${t(i)}`);for(const r in i){if("shortMessage"===r)continue;const n=i[r];e.push(r+"="+t(n))}}e.push(`code=${n}`),e.length&&(r+=" ("+e.join(", ")+")")}let a;switch(n){case"INVALID_ARGUMENT":a=new TypeError(r);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":a=new RangeError(r);break;default:a=new Error(r)}return(0,e.defineProperties)(a,{code:n}),i&&Object.assign(a,i),null==a.shortMessage&&(0,e.defineProperties)(a,{shortMessage:o}),a}function n(e,t,n,i){if(!e)throw r(t,n,i)}O_.isError=function(e,t){return e&&e.code===t},O_.makeError=r,O_.assert=n,O_.assertArgument=function(e,t,r,i){n(e,t,"INVALID_ARGUMENT",{argument:r,value:i})},O_.assertArgumentCount=function(e,t,r){null==r&&(r=""),r&&(r=": "+r),n(e>=t,"missing arguemnt"+r,"MISSING_ARGUMENT",{count:e,expectedCount:t}),n(e<=t,"too many arguments"+r,"UNEXPECTED_ARGUMENT",{count:e,expectedCount:t})};const i=["NFD","NFC","NFKD","NFKC"].reduce((e,t)=>{try{if("test"!=="test".normalize(t))throw new Error("bad");if("NFD"===t){const e=String.fromCharCode(233).normalize("NFD");if(e!==String.fromCharCode(101,769))throw new Error("broken")}e.push(t)}catch(e){}return e},[]);return O_.assertNormalize=function(e){n(i.indexOf(e)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:e}})},O_.assertPrivate=function(e,t,r){if(null==r&&(r=""),e!==t){let e=r,t="new";r&&(e+=".",t+=" "+r),n(!1,`private constructor; use ${e}from* methods`,"UNSUPPORTED_OPERATION",{operation:t})}},O_}var C_,x_,k_={};function P_(){if(C_)return k_;C_=1,Object.defineProperty(k_,"__esModule",{value:!0}),k_.zeroPadBytes=k_.zeroPadValue=k_.stripZerosLeft=k_.dataSlice=k_.dataLength=k_.concat=k_.hexlify=k_.isBytesLike=k_.isHexString=k_.getBytesCopy=k_.getBytes=void 0;const e=E_();function t(t,r,n){if(t instanceof Uint8Array)return n?new Uint8Array(t):t;if("string"==typeof t&&t.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const e=new Uint8Array((t.length-2)/2);let r=2;for(let n=0;n<e.length;n++)e[n]=parseInt(t.substring(r,r+2),16),r+=2;return e}(0,e.assertArgument)(!1,"invalid BytesLike value",r||"value",t)}function r(e,r){return t(e,r,!1)}function n(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(("number"!=typeof t||e.length===2+2*t)&&(!0!==t||e.length%2==0))}k_.getBytes=r,k_.getBytesCopy=function(e,r){return t(e,r,!0)},k_.isHexString=n,k_.isBytesLike=function(e){return n(e,!0)||e instanceof Uint8Array};const i="0123456789abcdef";function o(e){const t=r(e);let n="0x";for(let e=0;e<t.length;e++){const r=t[e];n+=i[(240&r)>>4]+i[15&r]}return n}function a(t,n,i){const a=r(t);(0,e.assert)(n>=a.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(a),length:n,offset:n+1});const d=new Uint8Array(n);return d.fill(0),i?d.set(a,n-a.length):d.set(a,0),o(d)}return k_.hexlify=o,k_.concat=function(e){return"0x"+e.map(e=>o(e).substring(2)).join("")},k_.dataLength=function(e){return n(e,!0)?(e.length-2)/2:r(e).length},k_.dataSlice=function(t,n,i){const a=r(t);return null!=i&&i>a.length&&(0,e.assert)(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:a,length:a.length,offset:i}),o(a.slice(null==n?0:n,null==i?a.length:i))},k_.stripZerosLeft=function(e){let t=o(e).substring(2);for(;t.startsWith("00");)t=t.substring(2);return"0x"+t},k_.zeroPadValue=function(e,t){return a(e,t,!0)},k_.zeroPadBytes=function(e,t){return a(e,t,!1)},k_}function D_(){if(x_)return A_;x_=1,Object.defineProperty(A_,"__esModule",{value:!0}),A_.getIcapAddress=A_.getAddress=void 0;const e=S_(),t=E_(),r=P_(),n=BigInt(0),i=BigInt(36);function o(t){const n=(t=t.toLowerCase()).substring(2).split(""),i=new Uint8Array(40);for(let e=0;e<40;e++)i[e]=n[e].charCodeAt(0);const o=(0,r.getBytes)((0,e.keccak256)(i));for(let e=0;e<40;e+=2)o[e>>1]>>4>=8&&(n[e]=n[e].toUpperCase()),(15&o[e>>1])>=8&&(n[e+1]=n[e+1].toUpperCase());return"0x"+n.join("")}const a={};for(let e=0;e<10;e++)a[String(e)]=String(e);for(let e=0;e<26;e++)a[String.fromCharCode(65+e)]=String(10+e);function d(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map(e=>a[e]).join("");for(;t.length>=15;){const e=t.substring(0,15);t=parseInt(e,10)%97+t.substring(e.length)}let r=String(98-parseInt(t,10)%97);for(;r.length<2;)r="0"+r;return r}const s=function(){const e={};for(let t=0;t<36;t++){e["0123456789abcdefghijklmnopqrstuvwxyz"[t]]=BigInt(t)}return e}();function c(e){if((0,t.assertArgument)("string"==typeof e,"invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/)){e.startsWith("0x")||(e="0x"+e);const r=o(e);return(0,t.assertArgument)(!e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||r===e,"bad address checksum","address",e),r}if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){(0,t.assertArgument)(e.substring(2,4)===d(e),"bad icap checksum","address",e);let r=function(e){e=e.toLowerCase();let t=n;for(let r=0;r<e.length;r++)t=t*i+s[e[r]];return t}(e.substring(4)).toString(16);for(;r.length<40;)r="0"+r;return o("0x"+r)}(0,t.assertArgument)(!1,"invalid address","address",e)}return A_.getAddress=c,A_.getIcapAddress=function(e){let t=BigInt(c(e)).toString(36).toUpperCase();for(;t.length<30;)t="0"+t;return"XE"+d("XE00"+t)+t},A_}var R_,F_={};function B_(){if(R_)return F_;R_=1,Object.defineProperty(F_,"__esModule",{value:!0}),F_.keccak256=void 0;const e=S_(),t=P_();let r=!1;const n=function(t){return new Uint8Array(e.keccak256.arrayBuffer(t))};let i=n;function o(e){const r=(0,t.getBytes)(e,"data");return(0,t.hexlify)(i(r))}return F_.keccak256=o,o._=n,o.lock=function(){r=!0},o.register=function(e){if(r)throw new TypeError("keccak256 is locked");i=e},Object.freeze(o),F_}var L_,U_={},K_={},j_={},V_={};function J_(){return L_||(L_=1,Object.defineProperty(V_,"__esModule",{value:!0}),V_.ZeroHash=void 0,V_.ZeroHash="0x0000000000000000000000000000000000000000000000000000000000000000"),V_}var q_,G_,z_,H_,Z_={};function W_(){if(q_)return Z_;q_=1,Object.defineProperty(Z_,"__esModule",{value:!0}),Z_.toQuantity=Z_.toBeArray=Z_.toBeHex=Z_.toNumber=Z_.getNumber=Z_.toBigInt=Z_.getUint=Z_.getBigInt=Z_.mask=Z_.toTwos=Z_.fromTwos=void 0;const e=E_(),t=P_(),r=BigInt(0),n=BigInt(1),i=9007199254740991;function o(t,r){switch(typeof t){case"bigint":return t;case"number":return(0,e.assertArgument)(Number.isInteger(t),"underflow",r||"value",t),(0,e.assertArgument)(t>=-i&&t<=i,"overflow",r||"value",t),BigInt(t);case"string":try{if(""===t)throw new Error("empty string");return"-"===t[0]&&"-"!==t[1]?-BigInt(t.substring(1)):BigInt(t)}catch(n){(0,e.assertArgument)(!1,`invalid BigNumberish string: ${n.message}`,r||"value",t)}}(0,e.assertArgument)(!1,"invalid BigNumberish value",r||"value",t)}function a(t,n){const i=o(t,n);return(0,e.assert)(i>=r,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:t}),i}Z_.fromTwos=function(t,i){const o=a(t,"value"),d=BigInt(c(i,"width"));if((0,e.assert)(o>>d===r,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:t}),o>>d-n){return-((~o&(n<<d)-n)+n)}return o},Z_.toTwos=function(t,i){let a=o(t,"value");const d=BigInt(c(i,"width")),s=n<<d-n;if(a<r){a=-a,(0,e.assert)(a<=s,"too low","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:t});return(~a&(n<<d)-n)+n}return(0,e.assert)(a<s,"too high","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:t}),a},Z_.mask=function(e,t){const r=a(e,"value"),i=BigInt(c(t,"bits"));return r&(n<<i)-n},Z_.getBigInt=o,Z_.getUint=a;const d="0123456789abcdef";function s(e){if(e instanceof Uint8Array){let t="0x0";for(const r of e)t+=d[r>>4],t+=d[15&r];return BigInt(t)}return o(e)}function c(t,r){switch(typeof t){case"bigint":return(0,e.assertArgument)(t>=-i&&t<=i,"overflow",r||"value",t),Number(t);case"number":return(0,e.assertArgument)(Number.isInteger(t),"underflow",r||"value",t),(0,e.assertArgument)(t>=-i&&t<=i,"overflow",r||"value",t),t;case"string":try{if(""===t)throw new Error("empty string");return c(BigInt(t),r)}catch(n){(0,e.assertArgument)(!1,`invalid numeric string: ${n.message}`,r||"value",t)}}(0,e.assertArgument)(!1,"invalid numeric value",r||"value",t)}function u(e){const t=a(e,"value");if(t===r)return new Uint8Array([]);let n=t.toString(16);n.length%2&&(n="0"+n);const i=new Uint8Array(n.length/2);for(let e=0;e<i.length;e++){const t=2*e;i[e]=parseInt(n.substring(t,t+2),16)}return i}return Z_.toBigInt=s,Z_.getNumber=c,Z_.toNumber=function(e){return c(s(e))},Z_.toBeHex=function(t,r){let n=a(t,"value").toString(16);if(null==r)n.length%2&&(n="0"+n);else{const i=c(r,"width");for((0,e.assert)(2*i>=n.length,`value exceeds width (${i} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:t});n.length<2*i;)n="0"+n}return"0x"+n},Z_.toBeArray=u,Z_.toQuantity=function(e){let r=(0,t.hexlify)((0,t.isBytesLike)(e)?e:u(e)).substring(2);for(;r.startsWith("0");)r=r.substring(1);return""===r&&(r="0"),"0x"+r},Z_}function Y_(){if(G_)return j_;var e,t,r,n;G_=1,Object.defineProperty(j_,"__esModule",{value:!0}),j_.Signature=void 0;const i=Re,o=J_(),a=E_(),d=P_(),s=W_(),c=BigInt(0),u=BigInt(1),l=BigInt(2),f=BigInt(27),p=BigInt(28),h=BigInt(35),y={};function m(e){return(0,d.zeroPadValue)((0,s.toBeArray)(e),32)}class g{get r(){return i.__classPrivateFieldGet(this,e,"f")}set r(t){(0,a.assertArgument)(32===(0,d.dataLength)(t),"invalid r","value",t),i.__classPrivateFieldSet(this,e,(0,d.hexlify)(t),"f")}get s(){return i.__classPrivateFieldGet(this,t,"f")}set s(e){(0,a.assertArgument)(32===(0,d.dataLength)(e),"invalid s","value",e);const r=(0,d.hexlify)(e);(0,a.assertArgument)(parseInt(r.substring(0,3))<8,"non-canonical s","value",r),i.__classPrivateFieldSet(this,t,r,"f")}get v(){return i.__classPrivateFieldGet(this,r,"f")}set v(e){const t=(0,s.getNumber)(e,"value");(0,a.assertArgument)(27===t||28===t,"invalid v","v",e),i.__classPrivateFieldSet(this,r,t,"f")}get networkV(){return i.__classPrivateFieldGet(this,n,"f")}get legacyChainId(){const e=this.networkV;return null==e?null:g.getChainId(e)}get yParity(){return 27===this.v?0:1}get yParityAndS(){const e=(0,d.getBytes)(this.s);return this.yParity&&(e[0]|=128),(0,d.hexlify)(e)}get compactSerialized(){return(0,d.concat)([this.r,this.yParityAndS])}get serialized(){return(0,d.concat)([this.r,this.s,this.yParity?"0x1c":"0x1b"])}constructor(o,d,s,c){e.set(this,void 0),t.set(this,void 0),r.set(this,void 0),n.set(this,void 0),(0,a.assertPrivate)(o,y,"Signature"),i.__classPrivateFieldSet(this,e,d,"f"),i.__classPrivateFieldSet(this,t,s,"f"),i.__classPrivateFieldSet(this,r,c,"f"),i.__classPrivateFieldSet(this,n,null,"f")}[(e=new WeakMap,t=new WeakMap,r=new WeakMap,n=new WeakMap,Symbol.for("nodejs.util.inspect.custom"))](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const e=new g(y,this.r,this.s,this.v);return this.networkV&&i.__classPrivateFieldSet(e,n,this.networkV,"f"),e}toJSON(){const e=this.networkV;return{_type:"signature",networkV:null!=e?e.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(e){const t=(0,s.getBigInt)(e,"v");return t==f||t==p?c:((0,a.assertArgument)(t>=h,"invalid EIP-155 v","v",e),(t-h)/l)}static getChainIdV(e,t){return(0,s.getBigInt)(e)*l+BigInt(35+t-27)}static getNormalizedV(e){const t=(0,s.getBigInt)(e);return t===c||t===f?27:t===u||t===p?28:((0,a.assertArgument)(t>=h,"invalid v","v",e),t&u?27:28)}static from(e){function t(t,r){(0,a.assertArgument)(t,r,"signature",e)}if(null==e)return new g(y,o.ZeroHash,o.ZeroHash,27);if("string"==typeof e){const r=(0,d.getBytes)(e,"signature");if(64===r.length){const e=(0,d.hexlify)(r.slice(0,32)),t=r.slice(32,64),n=128&t[0]?28:27;return t[0]&=127,new g(y,e,(0,d.hexlify)(t),n)}if(65===r.length){const e=(0,d.hexlify)(r.slice(0,32)),n=r.slice(32,64);t(!(128&n[0]),"non-canonical s");const i=g.getNormalizedV(r[64]);return new g(y,e,(0,d.hexlify)(n),i)}t(!1,"invalid raw signature length")}if(e instanceof g)return e.clone();const r=e.r;t(null!=r,"missing r");const c=m(r),u=function(e,r){if(null!=e)return m(e);if(null!=r){t((0,d.isHexString)(r,32),"invalid yParityAndS");const e=(0,d.getBytes)(r);return e[0]&=127,(0,d.hexlify)(e)}t(!1,"missing s")}(e.s,e.yParityAndS);t(!(128&(0,d.getBytes)(u)[0]),"non-canonical s");const{networkV:l,v:f}=function(e,r,n){if(null!=e){const t=(0,s.getBigInt)(e);return{networkV:t>=h?t:void 0,v:g.getNormalizedV(t)}}if(null!=r)return t((0,d.isHexString)(r,32),"invalid yParityAndS"),{v:128&(0,d.getBytes)(r)[0]?28:27};if(null!=n){switch((0,s.getNumber)(n,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}t(!1,"invalid yParity")}t(!1,"missing v")}(e.v,e.yParityAndS,e.yParity),p=new g(y,c,u,f);return l&&i.__classPrivateFieldSet(p,n,l,"f"),t(null==e.yParity||(0,s.getNumber)(e.yParity,"sig.yParity")===p.yParity,"yParity mismatch"),t(null==e.yParityAndS||e.yParityAndS===p.yParityAndS,"yParityAndS mismatch"),p}}return j_.Signature=g,j_}function X_(){if(z_)return K_;var e;z_=1,Object.defineProperty(K_,"__esModule",{value:!0}),K_.SigningKey=void 0;const t=Re,r=__(),n=E_(),i=Y_(),o=P_(),a=W_();class d{constructor(i){e.set(this,void 0),(0,n.assertArgument)(32===(0,o.dataLength)(i),"invalid private key","privateKey","[REDACTED]"),t.__classPrivateFieldSet(this,e,(0,o.hexlify)(i),"f"),this.ecSecp256k1=new r.ec("secp256k1")}get privateKey(){return t.__classPrivateFieldGet(this,e,"f")}get publicKey(){return d.computePublicKey(t.__classPrivateFieldGet(this,e,"f"))}get compressedPublicKey(){return d.computePublicKey(t.__classPrivateFieldGet(this,e,"f"),!0)}sign(r){(0,n.assertArgument)(32===(0,o.dataLength)(r),"invalid digest length","digest",r);const d=this.ecSecp256k1.keyFromPrivate(t.__classPrivateFieldGet(this,e,"f").substring(2)).sign((0,o.getBytesCopy)(r),{canonical:!0});return i.Signature.from({r:(0,a.toBeHex)(d.r,32),s:(0,a.toBeHex)(d.s,32),v:d.recoveryParam?28:27})}computeSharedSecret(r){const n=d.computePublicKey(r),i=this.ecSecp256k1.keyFromPrivate(t.__classPrivateFieldGet(this,e,"f").substring(2)).derive(this.ecSecp256k1.keyFromPublic((0,o.getBytes)(n).slice(1)).getPublic()).toArray("be",32);return(0,o.hexlify)(new Uint8Array(i))}static computePublicKey(e,t=!1){let n=(0,o.getBytes)(e,"key");if(32===n.length){return"0x"+new r.ec("secp256k1").keyFromPrivate(n).getPublic(t,"hex")}if(64===n.length){const e=new Uint8Array(65);e[0]=4,e.set(n,1),n=e}return"0x"+new r.ec("secp256k1").keyFromPublic(n).getPublic().encode("hex",t)}static recoverPublicKey(e,t){(0,n.assertArgument)(32===(0,o.dataLength)(e),"invalid digest length","digest",e);const a=i.Signature.from(t),d=1===a.yParity?1:0;return"0x"+new r.ec("secp256k1").recoverPubKey((0,o.getBytesCopy)(e),{r:a.r.substring(2),s:a.s.substring(2),recoveryParam:a.yParity},d).encode("hex",!1)}static addPoints(e,t,n=!1){const i=new r.ec("secp256k1"),o=i.keyFromPublic(d.computePublicKey(e).substring(2),"hex").getPublic(),a=i.keyFromPublic(d.computePublicKey(t).substring(2),"hex").getPublic();return"0x"+o.add(a).encode("hex",n)}}return K_.SigningKey=d,e=new WeakMap,K_}function Q_(){if(H_)return U_;H_=1,Object.defineProperty(U_,"__esModule",{value:!0}),U_.recoverAddress=U_.computeAddress=void 0;const e=S_(),t=D_(),r=X_();function n(n){let i;return i="string"==typeof n?r.SigningKey.computePublicKey(n,!1):n.publicKey,(0,t.getAddress)((0,e.keccak256)("0x"+i.substring(4)).substring(26))}return U_.computeAddress=n,U_.recoverAddress=function(e,t){return n(r.SigningKey.recoverPublicKey(e,t))},U_}var ev,tv,rv,nv,iv,ov,av={},dv={};function sv(){return ev||(ev=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toUtf8CodePoints=e.toUtf8String=e.toUtf8Bytes=e.Utf8ErrorFuncs=void 0;const t=Re.__importDefault(mt),r=E_(),n=P_();function i(e,t,r,n,i){if("BAD_PREFIX"===e||"UNEXPECTED_CONTINUE"===e){let e=0;for(let n=t+1;n<r.length&&r[n]>>6==2;n++)e++;return e}return"OVERRUN"===e?r.length-t-1:0}function o(t,r){null==r&&(r=e.Utf8ErrorFuncs.error);const i=(0,n.getBytes)(t,"bytes"),o=[];let a=0;for(;a<i.length;){const e=i[a++];if(!(e>>7)){o.push(e);continue}let t=null,n=null;if(192==(224&e))t=1,n=127;else if(224==(240&e))t=2,n=2047;else{if(240!=(248&e)){a+=r(128==(192&e)?"UNEXPECTED_CONTINUE":"BAD_PREFIX",a-1,i,o);continue}t=3,n=65535}if(a-1+t>=i.length){a+=r("OVERRUN",a-1,i,o);continue}let d=e&(1<<8-t-1)-1;for(let e=0;e<t;e++){const e=i[a];if(128!=(192&e)){a+=r("MISSING_CONTINUE",a,i,o),d=null;break}d=d<<6|63&e,a++}null!==d&&(d>1114111?a+=r("OUT_OF_RANGE",a-1-t,i,o,d):d>=55296&&d<=57343?a+=r("UTF16_SURROGATE",a-1-t,i,o,d):d<=n?a+=r("OVERLONG",a-1-t,i,o,d):o.push(d))}return o}function a(e,n){(0,r.assertArgument)("string"==typeof e||t.default.isBigNumber(e),"invalid string or bignumber value","str or BN",e),t.default.isBigNumber(e)&&(e=e.toFixed()),null!=n&&((0,r.assertNormalize)(n),e=e.normalize(n));const i=[];for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<128)i.push(n);else if(n<2048)i.push(n>>6|192),i.push(63&n|128);else if(55296==(64512&n)){t++;const o=e.charCodeAt(t);(0,r.assertArgument)(t<e.length&&56320==(64512&o),"invalid surrogate pair","str",e);const a=65536+((1023&n)<<10)+(1023&o);i.push(a>>18|240),i.push(a>>12&63|128),i.push(a>>6&63|128),i.push(63&a|128)}else i.push(n>>12|224),i.push(n>>6&63|128),i.push(63&n|128)}return new Uint8Array(i)}e.Utf8ErrorFuncs=Object.freeze({error:function(e,t,n,i,o){(0,r.assertArgument)(!1,`invalid codepoint at offset ${t}; ${e}`,"bytes",n)},ignore:i,replace:function(e,t,n,o,a){return"OVERLONG"===e?((0,r.assertArgument)("number"==typeof a,"invalid bad code point for replacement","badCodepoint",a),o.push(a),0):(o.push(65533),i(e,t,n))}}),e.toUtf8Bytes=a,e.toUtf8String=function(e,t){return o(e,t).map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e)))).join("")},e.toUtf8CodePoints=function(e,t){return o(a(e,t))}}(dv)),dv}function cv(){if(tv)return av;tv=1,Object.defineProperty(av,"__esModule",{value:!0}),av.id=void 0;const e=B_(),t=sv();return av.id=function(r){return(0,e.keccak256)((0,t.toUtf8Bytes)(r))},av}function uv(){if(rv)return w_;var e,t,r,n,i;rv=1,Object.defineProperty(w_,"__esModule",{value:!0}),w_.verifyTypedData=w_.TypedDataEncoder=void 0;const o=Re,a=D_(),d=B_(),s=E_(),c=T_(),u=Q_(),l=P_(),f=W_(),p=cv(),h=new Uint8Array(32);h.fill(0);const y=BigInt(-1),m=BigInt(0),g=BigInt(1),_=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const v=(0,f.toBeHex)(g,32),b=(0,f.toBeHex)(m,32),S={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},I=["name","version","chainId","verifyingContract","salt"];function N(e){return function(t){return(0,s.assertArgument)("string"==typeof t,`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}const $={name:N("name"),version:N("version"),chainId:function(e){const t=(0,f.getBigInt)(e,"domain.chainId");return(0,s.assertArgument)(t>=0,"invalid chain ID","domain.chainId",e),Number.isSafeInteger(t)?Number(t):(0,f.toQuantity)(t)},verifyingContract:function(e){try{return(0,a.getAddress)(e).toLowerCase()}catch(e){}(0,s.assertArgument)(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){const t=(0,l.getBytes)(e,"domain.salt");return(0,s.assertArgument)(32===t.length,'invalid domain value "salt"',"domain.salt",e),(0,l.hexlify)(t)}};function w(e){{const t=e.match(/^(u?)int(\d+)$/);if(t){const r=""===t[1],n=parseInt(t[2]);(0,s.assertArgument)(n%8==0&&0!==n&&n<=256&&t[2]===String(n),"invalid numeric width","type",e);const i=(0,f.mask)(_,r?n-1:n),o=r?(i+g)*y:m;return function(t){const n=(0,f.getBigInt)(t,"value");return(0,s.assertArgument)(n>=o&&n<=i,`value out-of-bounds for ${e}`,"value",n),(0,f.toBeHex)(r?(0,f.toTwos)(n,256):n,32)}}}{const t=e.match(/^bytes(\d+)$/);if(t){const r=parseInt(t[1]);return(0,s.assertArgument)(0!==r&&r<=32&&t[1]===String(r),"invalid bytes width","type",e),function(t){const n=(0,l.getBytes)(t);return(0,s.assertArgument)(n.length===r,`invalid length for ${e}`,"value",t),function(e){const t=(0,l.getBytes)(e),r=t.length%32;return r?(0,l.concat)([t,h.slice(r)]):(0,l.hexlify)(t)}(t)}}}switch(e){case"address":return function(e){return(0,l.zeroPadValue)((0,a.getAddress)(e),32)};case"bool":return function(e){return e?v:b};case"bytes":return function(e){return(0,d.keccak256)(e)};case"string":return function(e){return(0,p.id)(e)}}return null}function A(e,t){return`${e}(${t.map(({name:e,type:t})=>t+" "+e).join(",")})`}function O(e){const t=e.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return t?{base:t[1],index:t[2]+t[4],array:{base:t[1],prefix:t[1]+t[2],count:t[5]?parseInt(t[5]):-1}}:{base:e}}class M{get types(){return JSON.parse(o.__classPrivateFieldGet(this,t,"f"))}constructor(i){e.add(this),t.set(this,void 0),r.set(this,void 0),n.set(this,void 0),o.__classPrivateFieldSet(this,r,new Map,"f"),o.__classPrivateFieldSet(this,n,new Map,"f");const a=new Map,d=new Map,u=new Map,l={};Object.keys(i).forEach(e=>{l[e]=i[e].map(({name:e,type:t})=>{let{base:r,index:n}=O(t);return"int"!==r||i.int||(r="int256"),"uint"!==r||i.uint||(r="uint256"),{name:e,type:r+(n||"")}}),a.set(e,new Set),d.set(e,[]),u.set(e,new Set)}),o.__classPrivateFieldSet(this,t,JSON.stringify(l),"f");for(const e in l){const t=new Set;for(const r of l[e]){(0,s.assertArgument)(!t.has(r.name),`duplicate variable name ${JSON.stringify(r.name)} in ${JSON.stringify(e)}`,"types",i),t.add(r.name);const n=O(r.type).base;(0,s.assertArgument)(n!==e,`circular type reference to ${JSON.stringify(n)}`,"types",i);w(n)||((0,s.assertArgument)(d.has(n),`unknown type ${JSON.stringify(n)}`,"types",i),d.get(n).push(e),a.get(e).add(n))}}const f=Array.from(d.keys()).filter(e=>0===d.get(e).length);(0,s.assertArgument)(0!==f.length,"missing primary type","types",i),(0,s.assertArgument)(1===f.length,`ambiguous primary types or unused types: ${f.map(e=>JSON.stringify(e)).join(", ")}`,"types",i),(0,c.defineProperties)(this,{primaryType:f[0]}),function e(t,r){(0,s.assertArgument)(!r.has(t),`circular type reference to ${JSON.stringify(t)}`,"types",i),r.add(t);for(const n of a.get(t))if(d.has(n)){e(n,r);for(const e of r)u.get(e).add(n)}r.delete(t)}(this.primaryType,new Set);for(const[e,t]of u){const n=Array.from(t);n.sort(),o.__classPrivateFieldGet(this,r,"f").set(e,A(e,l[e])+n.map(e=>A(e,l[e])).join(""))}}getEncoder(t){let r=o.__classPrivateFieldGet(this,n,"f").get(t);return r||(r=o.__classPrivateFieldGet(this,e,"m",i).call(this,t),o.__classPrivateFieldGet(this,n,"f").set(t,r)),r}encodeType(e){const t=o.__classPrivateFieldGet(this,r,"f").get(e);return(0,s.assertArgument)(t,`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return(0,d.keccak256)(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,r){if(w(e))return r(e,t);const n=O(e).array;if(n)return(0,s.assertArgument)(-1===n.count||n.count===t.length,`array length mismatch; expected length ${n.count}`,"value",t),t.map(e=>this._visit(n.prefix,e,r));const i=this.types[e];if(i)return i.reduce((e,{name:n,type:i})=>(e[n]=this._visit(i,t[n],r),e),{});(0,s.assertArgument)(!1,`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new M(e)}static getPrimaryType(e){return M.from(e).primaryType}static hashStruct(e,t,r){return M.from(t).hashStruct(e,r)}static hashDomain(e){const t=[];for(const r in e){if(null==e[r])continue;const n=S[r];(0,s.assertArgument)(n,`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),t.push({name:r,type:n})}return t.sort((e,t)=>I.indexOf(e.name)-I.indexOf(t.name)),M.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,r){return(0,l.concat)(["0x1901",M.hashDomain(e),M.from(t).hash(r)])}static hash(e,t,r){return(0,d.keccak256)(M.encode(e,t,r))}static async resolveNames(e,t,r,n){e=Object.assign({},e);for(const t in e)null==e[t]&&delete e[t];const i={};e.verifyingContract&&!(0,l.isHexString)(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");const o=M.from(t);o.visit(r,(e,t)=>("address"!==e||(0,l.isHexString)(t,20)||(i[t]="0x"),t));for(const e in i)i[e]=await n(e);return e.verifyingContract&&i[e.verifyingContract]&&(e.verifyingContract=i[e.verifyingContract]),{domain:e,value:r=o.visit(r,(e,t)=>"address"===e&&i[t]?i[t]:t)}}static getPayload(e,t,r){M.hashDomain(e);const n={},i=[];I.forEach(t=>{const r=e[t];null!=r&&(n[t]=$[t](r),i.push({name:t,type:S[t]}))});const o=M.from(t);t=o.types;const a=Object.assign({},t);return(0,s.assertArgument)(null==a.EIP712Domain,"types must not contain EIP712Domain type","types.EIP712Domain",t),a.EIP712Domain=i,o.encode(r),{types:a,domain:n,primaryType:o.primaryType,message:o.visit(r,(e,t)=>{if(e.match(/^bytes(\d*)/))return(0,l.hexlify)((0,l.getBytes)(t));if(e.match(/^u?int/))return(0,f.getBigInt)(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return(0,s.assertArgument)("string"==typeof t,"invalid string","value",t),t}(0,s.assertArgument)(!1,"unsupported type","type",e)})}}}return w_.TypedDataEncoder=M,t=new WeakMap,r=new WeakMap,n=new WeakMap,e=new WeakSet,i=function(e){{const t=w(e);if(t)return t}const t=O(e).array;if(t){const e=t.prefix,n=this.getEncoder(e);return i=>{(0,s.assertArgument)(-1===t.count||t.count===i.length,`array length mismatch; expected length ${t.count}`,"value",i);let a=i.map(n);return o.__classPrivateFieldGet(this,r,"f").has(e)&&(a=a.map(d.keccak256)),(0,d.keccak256)((0,l.concat)(a))}}const n=this.types[e];if(n){const t=(0,p.id)(o.__classPrivateFieldGet(this,r,"f").get(e));return e=>{const i=n.map(({name:t,type:n})=>{const i=this.getEncoder(n)(e[t]);return o.__classPrivateFieldGet(this,r,"f").has(n)?(0,d.keccak256)(i):i});return i.unshift(t),(0,l.concat)(i)}}(0,s.assertArgument)(!1,`unknown type: ${e}`,"type",e)},w_.verifyTypedData=function(e,t,r,n){return(0,u.recoverAddress)(M.hash(e,t,r),n)},w_}function lv(){if(nv)return $_;nv=1,Object.defineProperty($_,"__esModule",{value:!0}),$_.getPayloadToSign=void 0;const e=Re,t=At,r=uv(),n=e.__importDefault(_m());return $_.getPayloadToSign=function(e){if(function(e){return e&&"object"==typeof e&&"domain"in e&&"types"in e}(e))return function(e){return r.TypedDataEncoder.encode(e.domain,e.types,e)}(e);const{signature:i,multisig:o,trace:a,prefix:d,...s}=(0,t.instanceToPlain)(e);return`${null!=d?d:""}${(0,n.default)(s)}`},$_}function fv(){if(iv)return Sm;iv=1,Object.defineProperty(Sm,"__esModule",{value:!0}),Sm.flipSignatureParity=Sm.normalizeSecp256k1Signature=Sm.InvalidSignatureFormatError=void 0;const e=Re,t=e.__importDefault(wm()),r=__(),n=e.__importDefault(p_()),i=S_(),o=Ry(),a=lv();class d extends o.ValidationFailedError{}class s extends o.ValidationFailedError{}Sm.InvalidSignatureFormatError=s;class c extends o.ValidationFailedError{}const u={secpBase64:44,secpHex1:62,secpHex2:64,secpHex3:66,isHex:e=>e>=u.secpHex1-1&&e<=u.secpHex3,isBase64:e=>e===u.secpBase64,isMissingTrailing0:e=>e===u.secpHex1-1||e===u.secpHex2-1||e===u.secpHex3-1};const l={secpBase64Compressed:44,secpBase64:88,secpHexCompressed:66,secpHex:130,isHex:e=>e===l.secpHex||e===l.secpHexCompressed,isBase64:e=>e===l.secpBase64||e===l.secpBase64Compressed};function f(e){const t=e.startsWith("0x"),r=t?e.length-2:e.length,n=l.isHex(r)?"hex":l.isBase64(r)?"base64":void 0;if(void 0!==n){const r=t?e.slice(2):e;if(w(r)||A(r)){const e=S(Buffer.from(r,n));return Buffer.from(e.getPublic().encode("array",!0))}throw new d(`Invalid public key: ${e}`)}{const e=t?" (excluding trailing '0x')":"",n=`Cannot normalize secp256k1 public key. Got string of length ${r}, but expected ${l.secpBase64Compressed} or ${l.secpBase64} for base64, or ${l.secpHexCompressed} or ${l.secpHex} for hex encoding${e}.`;throw new d(n)}}const p=new r.ec("secp256k1");function h(e){const t=e.split(""),r=new Uint8Array(40);for(let e=0;e<40;e++)r[e]=t[e].charCodeAt(0);const n=i.keccak256.digest(r);for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&n[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return t.join("")}function y(e){const r=e.toLowerCase(),n=r.slice(0,64),i=r.slice(64,128),o=r.slice(128,130);let a=null;if("1c"===o)a=1;else{if("1b"!==o)throw new s(`Invalid recovery param: ${o}. Expected 1c or 1b.`);a=0}return{r:new t.default(n,"hex"),s:new t.default(i,"hex"),recoveryParam:a}}function m(e){const t=e.toLowerCase(),r=new n.default(t,"hex");return{r:r.r,s:r.s,recoveryParam:void 0}}function g(e){const t=_(e);if(t&&t.s.cmp(p.curve.n.shrn(1))>0)throw new s("S value is too high",{signature:e});return t}function _(e){if(130===e.length)return y(e);if(132===e.length&&e.startsWith("0x"))return y(e.slice(2));if(88===e.length){const t=Buffer.from(e,"base64").toString("hex");if(130===t.length)return y(t)}if(e.startsWith("0x")&&e.length<=146)return m(e.slice(2));if(136===e.length||138===e.length||140===e.length||142===e.length||144===e.length)return m(e);if(96===e.length||92===e.length){return m(Buffer.from(e,"base64").toString("hex"))}const t=`Unknown signature format. Expected 88, 92, 96, 130, 132, 136, 138, 140, 142, or 144 characters, but got ${e.length}`;throw new s(t,{signature:e})}function v(e){const r=p.curve.n,n=new t.default(r).sub(e.s),i=null!=e.recoveryParam?1-e.recoveryParam:null;return e.s=n,e.recoveryParam=i,e}function b(e,r,n){if(32!==e.length){const t=`secp256k1 can sign only 32-bytes long data keccak hash (got ${e.length})`;throw new c(t)}let i=p.sign(e,r);if(i.s.cmp(p.curve.n.shrn(1))>0&&(i=v(i)),n){return Buffer.from(i.toDER()).toString("hex")}return i.r.toString("hex",32)+i.s.toString("hex",32)+new t.default(1===i.recoveryParam?28:27).toString("hex",1)}function S(e){var t;try{return p.keyFromPublic(e)}catch(e){throw new d(`Public key seems to be invalid. Error: ${null!==(t=null==e?void 0:e.message)&&void 0!==t?t:e}`)}}function I(e,t,r){if(32!==t.length){const e=`secp256k1 can sign only 32-bytes long data keccak hash (got ${t.length})`;throw new c(e)}return S(r).verify(t,e)}function N(e){return Buffer.from(i.keccak256.digest(e))}function $(e,t,r){const n=g(e),o=n.recoveryParam;if(void 0===o){throw new s("Signature must contain recovery part (typically 1b or 1c as the last two characters)",{signature:e})}const d=(0,a.getPayloadToSign)(t),c=d.startsWith("0x")?Buffer.from(d.slice(2),"hex"):Buffer.from((null!=r?r:"")+d),u=Buffer.from(i.keccak256.hex(c),"hex");return p.recoverPubKey(u,n,o).encode("hex",!1)}function w(e){return/^[0-9a-fA-F]*$/.test(e)}function A(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}return Sm.normalizeSecp256k1Signature=_,Sm.flipSignatureParity=v,Sm.default={calculateKeccak256:N,enforceValidPublicKey:function(e,t,r){if(void 0===e)throw new s(`Signature is ${e}`,{signature:e});const n=g(e);if(void 0===r){if(void 0===n.recoveryParam){const t="Public key is required when the signature recovery parameter is missing";throw new o.ValidationFailedError(t,{signature:e})}return $(e,t)}const i=f(r);if(I(n,N(Buffer.from((0,a.getPayloadToSign)(t))),i))return i.toString("hex");throw new o.ValidationFailedError("Secp256k1 signature is invalid",{signature:e,publicKey:r,payload:t})},genKeyPair:function(){const e=p.genKeyPair();return{privateKey:e.getPrivate().toString("hex"),publicKey:Buffer.from(e.getPublic().encode("array",!1)).toString("hex")}},flipSignatureParity:v,getCompactBase64PublicKey:function(e){return f(e).toString("base64")},getNonCompactHexPublicKey:function(e){return S(f(e)).getPublic().encode("hex",!1)},getEthAddress:function(e){if(130!==e.length){const t=`Invalid secp256k1 public key length: ${e.length}. Expected 130 characters (hex-encoded non-compact key).`;throw new d(t,{publicKey:e})}const t=Buffer.from(e,"hex"),r=i.keccak256.digest(t.slice(1));return h(Buffer.from(r.slice(-20)).toString("hex"))},getPublicKey:function(e){return new r.ec("secp256k1").keyFromPrivate(e.replace(/^0x/,""),"hex").getPublic().encode("hex",!1).toString()},getSignature:function(e,t){return b(N(Buffer.from((0,a.getPayloadToSign)(e))),t)},getDERSignature:function(e,t){return b(N(Buffer.from((0,a.getPayloadToSign)(e))),t,"DER")},isChecksumedEthAddress:function(e){if(!/^(0x)?[0-9a-fA-F]{40}$/.test(e))return!1;const t=e.slice(-40);return h(t.toLowerCase())===t},isLowercasedEthAddress:function(e){return/^(0x)?[0-9a-f]{40}$/.test(e)},isValid:function(e,t,r){const n=Buffer.from("string"==typeof t?t:(0,a.getPayloadToSign)(t)),o=f(r);return I(g(e),Buffer.from(i.keccak256.hex(n),"hex"),o)},isValidBase64:A,isValidHex:w,isValidSecp256k1Signature:I,normalizeEthAddress:function(e){const t=e.startsWith("0x")?e.slice(2):e;if(40!==t.length)throw new o.ValidationFailedError(`Invalid length of eth address: ${e}`);const r=t.toLowerCase();if(!/^[0-9a-f]*$/.test(r))throw new o.ValidationFailedError(`Eth address contains invalid characters: ${e}`);const n=h(r);if(r===t||n===t)return n;throw new o.ValidationFailedError(`Invalid checksum for eth address provided: ${e}`)},normalizePrivateKey:function(e){const t=e.startsWith("0x"),r=t?e.slice(2):e,n=r.length,i=u.isHex(n)?"hex":u.isBase64(n)?"base64":void 0;if(void 0!==i){const t=u.isMissingTrailing0(n)?"0":"";if(w(r)||A(r))return Buffer.from(t+r,i);throw new d(`Invalid private key: ${e}`)}{const e=t?" (excluding trailing '0x')":"",r=`Cannot normalize secp256k1 private key. Got string of length ${n}, but expected ${u.secpBase64} for base46 encoding, or ${u.secpHex1}, ${u.secpHex2} or ${u.secpHex3} for hex encoding${e}.`;throw new d(r)}},normalizePublicKey:f,normalizeSecp256k1Signature:_,parseSecp256k1Signature:g,recoverPublicKey:$,validatePublicKey:function(e){S(e)},validateSecp256k1PublicKey:S},Sm}function pv(){if(ov)return bm;ov=1,Object.defineProperty(bm,"__esModule",{value:!0});const e=Re.__importDefault(fv()),t=lv();return bm.default={...e.default,getPayloadToSign:t.getPayloadToSign,isValidSignature:function(t,r,n){return e.default.isValid(t,r,n)},getSignature:function(t,r){const n="string"==typeof r?e.default.normalizePrivateKey(r):r;return e.default.getSignature(t,n)}},bm}var hv,yv,mv={},gv={};function _v(){return hv||(hv=1,function(e){!function(){var t="object"==typeof H?H:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),r=n(e);function n(e,t){return function(r,n){"function"!=typeof e[r]&&Object.defineProperty(e,r,{configurable:!0,writable:!0,value:n}),t&&t(r,n)}}void 0===t.Reflect?t.Reflect=e:r=n(t.Reflect,r),function(e){var t=Object.prototype.hasOwnProperty,r="function"==typeof Symbol,n=r&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",i=r&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",o="function"==typeof Object.create,a={__proto__:[]}instanceof Array,d=!o&&!a,s={create:o?function(){return ne(Object.create(null))}:a?function(){return ne({__proto__:null})}:function(){return ne({})},has:d?function(e,r){return t.call(e,r)}:function(e,t){return t in e},get:d?function(e,r){return t.call(e,r)?e[r]:void 0}:function(e,t){return e[t]}},c=Object.getPrototypeOf(Function),u="object"==typeof process&&process.env&&"true"===process.env.REFLECT_METADATA_USE_MAP_POLYFILL,l=u||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?ee():Map,f=u||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?te():Set,p=new(u||"function"!=typeof WeakMap?re():WeakMap);function h(e,t,r,n){if(D(r)){if(!J(e))throw new TypeError;if(!G(t))throw new TypeError;return $(e,t)}if(!J(e))throw new TypeError;if(!B(t))throw new TypeError;if(!B(n)&&!D(n)&&!R(n))throw new TypeError;return R(n)&&(n=void 0),w(e,t,r=V(r),n)}function y(e,t){function r(r,n){if(!B(r))throw new TypeError;if(!D(n)&&!z(n))throw new TypeError;C(e,t,r,n)}return r}function m(e,t,r,n){if(!B(r))throw new TypeError;return D(n)||(n=V(n)),C(e,t,r,n)}function g(e,t,r){if(!B(t))throw new TypeError;return D(r)||(r=V(r)),O(e,t,r)}function _(e,t,r){if(!B(t))throw new TypeError;return D(r)||(r=V(r)),M(e,t,r)}function v(e,t,r){if(!B(t))throw new TypeError;return D(r)||(r=V(r)),T(e,t,r)}function b(e,t,r){if(!B(t))throw new TypeError;return D(r)||(r=V(r)),E(e,t,r)}function S(e,t){if(!B(e))throw new TypeError;return D(t)||(t=V(t)),x(e,t)}function I(e,t){if(!B(e))throw new TypeError;return D(t)||(t=V(t)),k(e,t)}function N(e,t,r){if(!B(t))throw new TypeError;D(r)||(r=V(r));var n=A(t,r,!1);if(D(n))return!1;if(!n.delete(e))return!1;if(n.size>0)return!0;var i=p.get(t);return i.delete(r),i.size>0||p.delete(t),!0}function $(e,t){for(var r=e.length-1;r>=0;--r){var n=(0,e[r])(t);if(!D(n)&&!R(n)){if(!G(n))throw new TypeError;t=n}}return t}function w(e,t,r,n){for(var i=e.length-1;i>=0;--i){var o=(0,e[i])(t,r,n);if(!D(o)&&!R(o)){if(!B(o))throw new TypeError;n=o}}return n}function A(e,t,r){var n=p.get(e);if(D(n)){if(!r)return;n=new l,p.set(e,n)}var i=n.get(t);if(D(i)){if(!r)return;i=new l,n.set(t,i)}return i}function O(e,t,r){if(M(e,t,r))return!0;var n=Q(t);return!R(n)&&O(e,n,r)}function M(e,t,r){var n=A(t,r,!1);return!D(n)&&K(n.has(e))}function T(e,t,r){if(M(e,t,r))return E(e,t,r);var n=Q(t);return R(n)?void 0:T(e,n,r)}function E(e,t,r){var n=A(t,r,!1);if(!D(n))return n.get(e)}function C(e,t,r,n){A(r,n,!0).set(e,t)}function x(e,t){var r=k(e,t),n=Q(e);if(null===n)return r;var i=x(n,t);if(i.length<=0)return r;if(r.length<=0)return i;for(var o=new f,a=[],d=0,s=r;d<s.length;d++){var c=s[d];o.has(c)||(o.add(c),a.push(c))}for(var u=0,l=i;u<l.length;u++){c=l[u];o.has(c)||(o.add(c),a.push(c))}return a}function k(e,t){var r=[],n=A(e,t,!1);if(D(n))return r;for(var i=Z(n.keys()),o=0;;){var a=Y(i);if(!a)return r.length=o,r;var d=W(a);try{r[o]=d}catch(e){try{X(i)}finally{throw e}}o++}}function P(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function D(e){return void 0===e}function R(e){return null===e}function F(e){return"symbol"==typeof e}function B(e){return"object"==typeof e?null!==e:"function"==typeof e}function L(e,t){switch(P(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}var r="string",i=H(e,n);if(void 0!==i){var o=i.call(e,r);if(B(o))throw new TypeError;return o}return U(e)}function U(e,t){var r,n,i=e.toString;if(q(i)&&!B(n=i.call(e)))return n;if(q(r=e.valueOf)&&!B(n=r.call(e)))return n;throw new TypeError}function K(e){return!!e}function j(e){return""+e}function V(e){var t=L(e);return F(t)?t:j(t)}function J(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function q(e){return"function"==typeof e}function G(e){return"function"==typeof e}function z(e){switch(P(e)){case 3:case 4:return!0;default:return!1}}function H(e,t){var r=e[t];if(null!=r){if(!q(r))throw new TypeError;return r}}function Z(e){var t=H(e,i);if(!q(t))throw new TypeError;var r=t.call(e);if(!B(r))throw new TypeError;return r}function W(e){return e.value}function Y(e){var t=e.next();return!t.done&&t}function X(e){var t=e.return;t&&t.call(e)}function Q(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===c)return t;if(t!==c)return t;var r=e.prototype,n=r&&Object.getPrototypeOf(r);if(null==n||n===Object.prototype)return t;var i=n.constructor;return"function"!=typeof i||i===e?t:i}function ee(){var e={},t=[],r=function(){function e(e,t,r){this._index=0,this._keys=e,this._values=t,this._selector=r}return e.prototype["@@iterator"]=function(){return this},e.prototype[i]=function(){return this},e.prototype.next=function(){var e=this._index;if(e>=0&&e<this._keys.length){var r=this._selector(this._keys[e],this._values[e]);return e+1>=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:r,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},e}();return function(){function t(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.has=function(e){return this._find(e,!1)>=0},t.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},t.prototype.set=function(e,t){var r=this._find(e,!0);return this._values[r]=t,this},t.prototype.delete=function(t){var r=this._find(t,!1);if(r>=0){for(var n=this._keys.length,i=r+1;i<n;i++)this._keys[i-1]=this._keys[i],this._values[i-1]=this._values[i];return this._keys.length--,this._values.length--,t===this._cacheKey&&(this._cacheKey=e,this._cacheIndex=-2),!0}return!1},t.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=e,this._cacheIndex=-2},t.prototype.keys=function(){return new r(this._keys,this._values,n)},t.prototype.values=function(){return new r(this._keys,this._values,o)},t.prototype.entries=function(){return new r(this._keys,this._values,a)},t.prototype["@@iterator"]=function(){return this.entries()},t.prototype[i]=function(){return this.entries()},t.prototype._find=function(e,t){return this._cacheKey!==e&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=e)),this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},t}();function n(e,t){return e}function o(e,t){return t}function a(e,t){return[e,t]}}function te(){return function(){function e(){this._map=new l}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.values()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[i]=function(){return this.keys()},e}()}function re(){var e=16,r=s.create(),n=i();return function(){function e(){this._key=i()}return e.prototype.has=function(e){var t=o(e,!1);return void 0!==t&&s.has(t,this._key)},e.prototype.get=function(e){var t=o(e,!1);return void 0!==t?s.get(t,this._key):void 0},e.prototype.set=function(e,t){return o(e,!0)[this._key]=t,this},e.prototype.delete=function(e){var t=o(e,!1);return void 0!==t&&delete t[this._key]},e.prototype.clear=function(){this._key=i()},e}();function i(){var e;do{e="@@WeakMap@@"+c()}while(s.has(r,e));return r[e]=!0,e}function o(e,r){if(!t.call(e,n)){if(!r)return;Object.defineProperty(e,n,{value:s.create()})}return e[n]}function a(e,t){for(var r=0;r<t;++r)e[r]=255*Math.random()|0;return e}function d(e){return"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(e)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(e)):a(new Uint8Array(e),e):a(new Array(e),e)}function c(){var t=d(e);t[6]=79&t[6]|64,t[8]=191&t[8]|128;for(var r="",n=0;n<e;++n){var i=t[n];4!==n&&6!==n&&8!==n||(r+="-"),i<16&&(r+="0"),r+=i.toString(16).toLowerCase()}return r}}function ne(e){return e.__=void 0,delete e.__,e}e("decorate",h),e("metadata",y),e("defineMetadata",m),e("hasMetadata",g),e("hasOwnMetadata",_),e("getMetadata",v),e("getOwnMetadata",b),e("getMetadataKeys",S),e("getOwnMetadataKeys",I),e("deleteMetadata",N)}(r)}()}(e||(e={}))),gv;var e}function vv(){if(yv)return mv;return yv=1,Object.defineProperty(mv,"__esModule",{value:!0}),mv.ChainKey=void 0,_v(),mv.ChainKey=function(e){return(t,r)=>{const n=Reflect.getOwnMetadata("galachain:chainkey",t)||[];void 0===n.find(t=>t.position===e.position)&&(n.push({key:r,...e}),Reflect.defineMetadata("galachain:chainkey",n,t))}},mv}var bv,Sv={};function Iv(){return bv||(bv=1,Object.defineProperty(Sv,"__esModule",{value:!0})),Sv}var Nv,$v,wv,Av={};function Ov(){if(Nv)return Av;Nv=1;var e=Av&&Av.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),t=Av&&Av.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=Av&&Av.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var i in r)"default"!==i&&Object.prototype.hasOwnProperty.call(r,i)&&e(n,r,i);return t(n,r),n};let n;return Object.defineProperty(Av,"__esModule",{value:!0}),Av.randomUniqueKey=void 0,Promise.resolve().then(async()=>{try{n=(await Promise.resolve().then(()=>r(require("node:crypto")))).default}catch(e){}}),Av.randomUniqueKey=function(){if(n)return n.randomBytes(32).toString("base64");if("undefined"!=typeof globalThis&&globalThis.crypto)return globalThis.crypto.randomUUID();throw new Error("No cryptographically secure random number generator available")},Av}function Mv(){return $v||($v=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.signatures=e.getValidationErrorMessages=e.generateResponseSchema=e.generateSchema=e.serialize=e.deserialize=void 0;const t=Re,r=t.__importDefault(jy());e.deserialize=r.default;const n=nm();Object.defineProperty(e,"generateResponseSchema",{enumerable:!0,get:function(){return n.generateResponseSchema}}),Object.defineProperty(e,"generateSchema",{enumerable:!0,get:function(){return n.generateSchema}});const i=am();Object.defineProperty(e,"getValidationErrorMessages",{enumerable:!0,get:function(){return i.getValidationErrorMessages}});const o=t.__importDefault(_m());e.serialize=o.default;const a=t.__importDefault(pv());e.signatures=a.default,t.__exportStar(vv(),e),t.__exportStar(Ry(),e),t.__exportStar(Iv(),e),t.__exportStar(Ov(),e)}(Uy)),Uy}function Tv(){if(wv)return Ly;wv=1,Object.defineProperty(Ly,"__esModule",{value:!0}),Ly.IsUserAlias=Ly.isValidUserAlias=Ly.validateUserAlias=Ly.isValidSystemUser=Ly.meansValidUserAlias=Ly.UserAliasValidationResult=void 0;const e=Re,t=uy,r=Mv();var n;function i(e){return e===n.VALID_USER_ALIAS||e===n.VALID_SYSTEM_USER}function o(e){return"EthereumBridge"===e||"TonBridge"===e||"SolanaBridge"===e||/^GalaChainBridge-\d+$/.test(e)}function a(e){if("string"!=typeof e||0===e.length)return n.INVALID_FORMAT;const t=e.split("|");if(1===t.length)return o(t[0])?n.VALID_SYSTEM_USER:n.INVALID_FORMAT;if(2===t.length){if(("client"===t[0]||"service"===t[0])&&t[1].length>0)return n.VALID_USER_ALIAS;if("eth"===t[0])return r.signatures.isChecksumedEthAddress(t[1])&&!t[1].startsWith("0x")?n.VALID_USER_ALIAS:n.INVALID_ETH_USER_ALIAS}return n.INVALID_FORMAT}!function(e){e[e.VALID_USER_ALIAS=0]="VALID_USER_ALIAS",e[e.VALID_SYSTEM_USER=1]="VALID_SYSTEM_USER",e[e.INVALID_ETH_USER_ALIAS=2]="INVALID_ETH_USER_ALIAS",e[e.INVALID_FORMAT=3]="INVALID_FORMAT"}(n||(Ly.UserAliasValidationResult=n={})),Ly.meansValidUserAlias=i,Ly.isValidSystemUser=o,Ly.validateUserAlias=a,Ly.isValidUserAlias=function(e){return i(a(e))};const d={[n.INVALID_ETH_USER_ALIAS]:"User alias starting with 'eth|' must end with valid checksumed eth address without 0x prefix."},s="Expected string following the format of 'client|<user-id>', or 'eth|<checksumed-eth-addr>', or valid system-level username.";let c=class{validate(e,t){if(Array.isArray(e))return e.every(e=>this.validate(e,t));return i(a(e))}defaultMessage(e){var t;const r=e.value;if(Array.isArray(r)){const t=r.filter(e=>!i(a(e)));return`${e.property} property with values ${t} are not valid GalaChain user aliases. ${s}`}const n=a(e.value),o=null!==(t=d[n])&&void 0!==t?t:s;return`${e.property} property with value ${e.value} is not a valid GalaChain user alias. ${o}`}};return c=e.__decorate([(0,t.ValidatorConstraint)({async:!1})],c),Ly.IsUserAlias=function(e){return function(r,n){(0,t.registerDecorator)({name:"isUserAlias",target:r.constructor,propertyName:n,options:e,constraints:[],validator:c})}},Ly}var Ev,Cv={};function xv(){if(Ev)return Cv;Ev=1,Object.defineProperty(Cv,"__esModule",{value:!0}),Cv.IsUserRef=Cv.validateUserRef=Cv.meansValidUserRef=Cv.UserRefValidationResult=void 0;const e=Re,t=uy,r=Mv(),n=Tv();var i;function o(e){return e===i.VALID_USER_ALIAS||e===i.VALID_SYSTEM_USER||e===i.VALID_ETH_ADDRESS}!function(e){e[e.VALID_USER_ALIAS=0]="VALID_USER_ALIAS",e[e.VALID_SYSTEM_USER=1]="VALID_SYSTEM_USER",e[e.VALID_ETH_ADDRESS=2]="VALID_ETH_ADDRESS",e[e.INVALID_ETH_USER_ALIAS=3]="INVALID_ETH_USER_ALIAS",e[e.INVALID_FORMAT=4]="INVALID_FORMAT"}(i||(Cv.UserRefValidationResult=i={})),Cv.meansValidUserRef=o;const a={[n.UserAliasValidationResult.VALID_USER_ALIAS]:i.VALID_USER_ALIAS,[n.UserAliasValidationResult.VALID_SYSTEM_USER]:i.VALID_SYSTEM_USER,[n.UserAliasValidationResult.INVALID_ETH_USER_ALIAS]:i.INVALID_ETH_USER_ALIAS};function d(e){if("string"!=typeof e||0===e.length)return i.INVALID_FORMAT;const t=a[(0,n.validateUserAlias)(e)];return void 0!==t?t:r.signatures.isChecksumedEthAddress(e)||r.signatures.isLowercasedEthAddress(e)?i.VALID_ETH_ADDRESS:i.INVALID_FORMAT}Cv.validateUserRef=d;const s={[i.INVALID_ETH_USER_ALIAS]:"User ref starting with 'eth|' must end with valid checksumed eth address without 0x prefix."},c="Expected a valid user alias ('client|<user-id>', or 'eth|<checksumed-eth-addr>', or valid system-level username), or valid Ethereum address.";let u=class{validate(e,t){if(Array.isArray(e))return e.every(e=>this.validate(e,t));return o(d(e))}defaultMessage(e){var t;const r=e.value;if(Array.isArray(r)){const t=r.filter(e=>!o(d(e)));return`${e.property} property with values ${t} are not valid GalaChain user ref. ${c}`}const n=d(e.value),i=null!==(t=s[n])&&void 0!==t?t:c;return`${e.property} property with value ${e.value} is not a valid GalaChain user ref. ${i}`}};return u=e.__decorate([(0,t.ValidatorConstraint)({async:!1})],u),Cv.IsUserRef=function(e){return function(r,n){(0,t.registerDecorator)({name:"isUserRef",target:r.constructor,propertyName:n,options:e,constraints:[],validator:u})}},Cv}var kv,Pv={};function Dv(){if(kv)return Pv;kv=1,Object.defineProperty(Pv,"__esModule",{value:!0}),Pv.IsValidChainAddress=Pv.isValidChainAddress=Pv.validateChainAddress=Pv.meansValidChainAddress=Pv.ChainAddressValidationResult=void 0;const e=Re,t=uy,r=Mv(),n=Tv();var i;function o(e){return e===i.VALID_ETHEREUM||e===i.VALID_SOLANA||e===i.VALID_TON||e===i.VALID_GALACHAIN}!function(e){e[e.VALID_ETHEREUM=0]="VALID_ETHEREUM",e[e.VALID_SOLANA=1]="VALID_SOLANA",e[e.VALID_TON=2]="VALID_TON",e[e.VALID_GALACHAIN=3]="VALID_GALACHAIN",e[e.INVALID_ETHEREUM=4]="INVALID_ETHEREUM",e[e.INVALID_SOLANA=5]="INVALID_SOLANA",e[e.INVALID_TON=6]="INVALID_TON",e[e.INVALID_GALACHAIN=7]="INVALID_GALACHAIN",e[e.INVALID_FORMAT=8]="INVALID_FORMAT"}(i||(Pv.ChainAddressValidationResult=i={})),Pv.meansValidChainAddress=o;const a="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";function d(e){if(!e||e.length<32||e.length>44)return!1;const t=function(e){if(!e||0===e.length)return null;for(const t of e)if(!a.includes(t))return null;try{const t=BigInt(58);let r=BigInt(0),n=0;for(let t=0;t<e.length&&"1"===e[t];t++)n++;const i=e.slice(n);if(0===i.length)return new Uint8Array(n);for(const e of i){const n=a.indexOf(e);if(-1===n)return null;r=r*t+BigInt(n)}const o=[];if(r===BigInt(0))return new Uint8Array(n);for(;r>BigInt(0);)o.push(Number(r%BigInt(256))),r/=BigInt(256);const d=new Uint8Array(o.reverse()),s=new Uint8Array(n+d.length);return s.set(d,n),s}catch{return null}}(e);return!!t&&32===t.length}function s(e){if("string"!=typeof e||0===e.length)return i.INVALID_FORMAT;if(e.startsWith("0x"))return function(e){return!!e.startsWith("0x")&&r.signatures.isChecksumedEthAddress(e)}(e)?i.VALID_ETHEREUM:i.INVALID_ETHEREUM;if(e.startsWith("UQ")||e.startsWith("EQ")||e.startsWith("0:"))return function(e){if(!/^UQ[a-zA-Z0-9_-]{46}$/.test(e))return!1;try{if(!/^[A-Za-z0-9_-]+$/.test(e))return!1;const t=e.replace(/-/g,"+").replace(/_/g,"/"),r=t.length%4,n=t+"=".repeat(0===r?0:4-r),i=Buffer.from(n,"base64");if(36!==i.length)return!1;const o=i[0];return!(!(64&o)||128&o)}catch{return!1}}(e)?i.VALID_TON:i.INVALID_TON;if(d(e))return i.VALID_SOLANA;if((0,n.isValidUserAlias)(e))return i.VALID_GALACHAIN;if(e.length>=32&&e.length<=44){let t=!0;for(const r of e)if(!a.includes(r)){t=!1;break}if(t)return i.INVALID_SOLANA}return e.startsWith("UQ")||e.startsWith("EQ")||e.startsWith("0:")?i.INVALID_TON:/^0x[0-9a-fA-F]{40}$/.test(e)?i.INVALID_ETHEREUM:i.INVALID_FORMAT}Pv.validateChainAddress=s,Pv.isValidChainAddress=function(e){return o(s(e))};const c={[i.INVALID_ETHEREUM]:"Ethereum address must be checksummed and start with '0x' prefix.",[i.INVALID_SOLANA]:"Solana address must be a valid base58-encoded 32-byte public key.",[i.INVALID_TON]:"TON address must be non-bounceable and not test-only (UQ... format).",[i.INVALID_GALACHAIN]:"GalaChain address must be a valid user alias."},u="Expected a valid chain address: Ethereum (checksummed with 0x prefix), Solana (base58-encoded 32-byte public key), TON (non-bounceable mainnet format: UQ...), or GalaChain (valid user alias).";let l=class{validate(e,t){if(Array.isArray(e))return e.every(e=>this.validate(e,t));return o(s(e))}defaultMessage(e){var t;const r=e.value;if(Array.isArray(r)){const t=r.filter(e=>!o(s(e)));return`${e.property} property with values ${t} are not valid chain addresses. ${u}`}const n=s(e.value),i=null!==(t=c[n])&&void 0!==t?t:u;return`${e.property} property with value ${e.value} is not a valid chain address. ${i}`}};return l=e.__decorate([(0,t.ValidatorConstraint)({async:!1})],l),Pv.IsValidChainAddress=function(e){return function(r,n){(0,t.registerDecorator)({name:"isValidChainAddress",target:r.constructor,propertyName:n,options:e,constraints:[],validator:l})}},Pv}var Rv,Fv,Bv={};function Lv(){if(Rv)return Bv;Rv=1,Object.defineProperty(Bv,"__esModule",{value:!0}),Bv.StringEnumProperty=Bv.EnumProperty=Bv.BigNumberArrayProperty=Bv.BigNumberProperty=Bv.ApplyConstructor=void 0;const e=Re.__importDefault(mt),t=At,r=uy;_v();const n=Fy();function i(e,r,n){return function(){const i=(0,t.Type)(()=>e),o=(0,t.Transform)(({value:e})=>r(e),{toClassOnly:!0}),a=(0,t.Transform)(({value:e})=>n(e),{toPlainOnly:!0});return function(e,t){i(e,t),o(e,t),a(e,t)}}}Bv.ApplyConstructor=i;const o=t=>{if("string"==typeof t){const r=new e.default(t);return r.toFixed()===t?r:t}return t};return Bv.BigNumberProperty=r=>{const i=(0,t.Type)(()=>e.default),a=(0,t.Transform)(({value:e})=>o(e),{toClassOnly:!0}),d=(0,t.Transform)(({value:e})=>e.toFixed(),{toPlainOnly:!0});return function(e,t){i(e,t),a(e,t),d(e,t),(0,n.IsBigNumber)()(e,t),(null==r?void 0:r.allowInfinity)||(0,n.BigNumberIsNotInfinity)()(e,t)}},Bv.BigNumberArrayProperty=i(e.default,e=>e.map(e=>o(e)),e=>e.map(e=>e.toFixed())),Bv.EnumProperty=function(e,t){const n=Object.values(e).filter(e=>"number"==typeof e).sort(),i=n.map(t=>`${t} - ${e[t]}`).join(", ");return(0,r.ValidateBy)({name:"enumProperty",constraints:[n,e,i],validator:{validate:(e,t)=>{const r=null==t?void 0:t.constraints[0];return!Array.isArray(r)||r.some(t=>t===e)},defaultMessage:(0,r.buildMessage)(e=>`${e}$property must be one of the following values: $constraint1, where $constraint3`,t)}},t)},Bv.StringEnumProperty=function(e,t){const n=Object.values(e).sort();return(0,r.IsIn)(n,t)},Bv}function Uv(){return Fv||(Fv=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Re;t.__exportStar(Fy(),e),t.__exportStar(Tv(),e),t.__exportStar(xv(),e),t.__exportStar(Dv(),e),t.__exportStar(Lv(),e)}(ky)),ky}var Kv,jv={};function Vv(){return Kv||(Kv=1,Object.defineProperty(jv,"__esModule",{value:!0}),jv.ChainsWithBridgeFeeSupport=jv.ChainId=void 0,function(e){e[e.Ethereum=2]="Ethereum",e[e.TON=1001]="TON",e[e.Solana=1002]="Solana"}(e||(jv.ChainId=e={})),jv.ChainsWithBridgeFeeSupport=[e.Ethereum,e.TON,e.Solana]),jv;var e}var Jv={},qv={};var Gv,zv=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");const t=new Uint8Array(256);for(let e=0;e<t.length;e++)t[e]=255;for(let r=0;r<e.length;r++){const n=e.charAt(r),i=n.charCodeAt(0);if(255!==t[i])throw new TypeError(n+" is ambiguous");t[i]=r}const r=e.length,n=e.charAt(0),i=Math.log(r)/Math.log(256),o=Math.log(256)/Math.log(r);function a(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;let o=0,a=0,d=0;for(;e[o]===n;)a++,o++;const s=(e.length-o)*i+1>>>0,c=new Uint8Array(s);for(;o<e.length;){const n=e.charCodeAt(o);if(n>255)return;let i=t[n];if(255===i)return;let a=0;for(let e=s-1;(0!==i||a<d)&&-1!==e;e--,a++)i+=r*c[e]>>>0,c[e]=i%256>>>0,i=i/256>>>0;if(0!==i)throw new Error("Non-zero carry");d=a,o++}let u=s-d;for(;u!==s&&0===c[u];)u++;const l=new Uint8Array(a+(s-u));let f=a;for(;u!==s;)l[f++]=c[u++];return l}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";let i=0,a=0,d=0;const s=t.length;for(;d!==s&&0===t[d];)d++,i++;const c=(s-d)*o+1>>>0,u=new Uint8Array(c);for(;d!==s;){let e=t[d],n=0;for(let t=c-1;(0!==e||n<a)&&-1!==t;t--,n++)e+=256*u[t]>>>0,u[t]=e%r>>>0,e=e/r>>>0;if(0!==e)throw new Error("Non-zero carry");a=n,d++}let l=c-a;for(;l!==c&&0===u[l];)l++;let f=n.repeat(i);for(;l<c;++l)f+=e.charAt(u[l]);return f},decodeUnsafe:a,decode:function(e){const t=a(e);if(t)return t;throw new Error("Non-base"+r+" character")}}}("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),Hv=W(Object.freeze({__proto__:null,default:zv}));function Zv(){if(Gv)return qv;Gv=1,Object.defineProperty(qv,"__esModule",{value:!0}),qv.ChainObject=qv.InvalidCompositeKeyError=qv.ObjectValidationFailedError=void 0;const e=Re.__importDefault(Hv),t=At,r=uy;_v();const n=Mv();class i extends n.ValidationFailedError{constructor(e){const t=(0,n.getValidationErrorMessages)(e);super(`Object validation failed: ${t.map((e,t)=>`(${t+1}) ${e}`).join(", ")}`,t)}}qv.ObjectValidationFailedError=i;class o extends n.ValidationFailedError{constructor(e){super(e)}}qv.InvalidCompositeKeyError=o;let a=class a{serialize(){return(0,n.serialize)(this)}validate(){return(0,r.validate)(this)}async validateOrReject(){const e=await this.validate();if(e.length)throw new i(e)}toPlainObject(){return(0,t.instanceToPlain)(this)}copy(){return a.deserialize(this.constructor,this.toPlainObject())}static deserialize(e,t){return(0,n.deserialize)(e,t)}getCompositeKey(){const e=this.__proto__.constructor.INDEX_KEY;if(void 0===e)throw new o(`getCompositeKey failed because of no INDEX_KEY on ${(0,n.serialize)(this)}`);const r=Object.getPrototypeOf(this),i=Reflect.getOwnMetadata("galachain:chainkey",r)||[],d=(0,t.instanceToPlain)(this),s=i.sort((e,t)=>e.position-t.position).map(e=>{var t,r;const n=e.key.toString();return"function"==typeof(null===(t=this[n])||void 0===t?void 0:t.toStringKey)?null===(r=this[n])||void 0===r?void 0:r.toStringKey():d[n]});return a.getCompositeKeyFromParts(e,s)}static getCompositeKeyFromParts(e,t){let r=a.COMPOSITEKEY_NS+e+a.MIN_UNICODE_RUNE_VALUE;for(const e of t){if(null==e||"object"==typeof e||"function"!=typeof e.toString)throw new o(`Invalid part ${e} passed to getCompositeKeyFromParts: ${t.join(", ")}`);r=r+e+a.MIN_UNICODE_RUNE_VALUE}return r}static getStringKeyFromParts(e){return`${e.join(a.ID_SPLIT_CHAR)}`}static getEncodableStringKeyFromParts(e){return e.forEach((e,t)=>{if(e.includes(a.MIN_UNICODE_RUNE_VALUE)){throw new o(`Invalid part with UTF-0 at index ${t} passed to getEncodableStringKeyFromParts}`)}}),e.join(a.MIN_UNICODE_RUNE_VALUE)}static getPartsFromEncodableStringKey(e,t){const r=e.split(a.MIN_UNICODE_RUNE_VALUE);if(r.length!==t){const e=`Expected ${t} parts, got ${r.length} parts in getPartsFromEncodableStringKey`;throw new o(e)}return r}static encodeToBase58(t){const r=Buffer.from(t);return e.default.encode(r)}static decodeFromBase58(t){const r=e.default.decode(t);return Buffer.from(r).toString("utf8")}};return qv.ChainObject=a,a.MIN_UNICODE_RUNE_VALUE="\0",a.COMPOSITEKEY_NS="\0",a.ID_SPLIT_CHAR="$",a.ID_SUB_SPLIT_CHAR="|",qv}var Wv,Yv={},Xv={};function Qv(){if(Wv)return Xv;Wv=1,Object.defineProperty(Xv,"__esModule",{value:!0}),Xv.GalaChainSuccessResponse=Xv.GalaChainErrorResponse=Xv.GalaChainResponse=Xv.GalaChainResponseType=Xv.GC_NETWORK_ID=void 0;const e=Mv();var t;Xv.GC_NETWORK_ID="GC",function(e){e[e.Error=0]="Error",e[e.Success=1]="Success"}(t||(Xv.GalaChainResponseType=t={}));class r{static Success(e){return new i(e)}static Error(e,t,r,i){return"string"==typeof e?new n(e,t,r,i):new n(e)}static Wrap(e){return e.then(e=>r.Success(e)).catch(e=>r.Error(e))}static isSuccess(e){return e.Status===t.Success}static isError(e){return e.Status===t.Error}static deserialize(r,o){var a;const d="string"==typeof o?JSON.parse(o):o;if(d.Status===t.Error)return(0,e.deserialize)(n,d);if(void 0===r)return(0,e.deserialize)(i,d);{const t="object"==typeof d.Data?(0,e.deserialize)(r,null!==(a=d.Data)&&void 0!==a?a:{}):d.Data;return new i(t)}}}Xv.GalaChainResponse=r;class n extends r{constructor(r,n,i,o){if(super(),"string"==typeof r)this.Status=t.Error,this.Message=r,this.ErrorCode=null!=n?n:e.ErrorCode.DEFAULT_ERROR,this.ErrorKey=null!=i?i:"UNKNOWN",this.ErrorPayload=o;else{const n=e.ChainError.from(r);this.Status=t.Error,this.Message=n.message,this.ErrorCode=n.code,this.ErrorKey=n.key,this.ErrorPayload=n.payload}}}Xv.GalaChainErrorResponse=n;class i extends r{constructor(e){super(),this.Status=t.Success,this.Data=e}}return Xv.GalaChainSuccessResponse=i,Xv}var eb,tb,rb,nb={};function ib(){return eb||(eb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GetMyProfileDto=e.GetPublicKeyDto=e.UpdateUserRolesDto=e.UpdateQuorumDto=e.UpdateSignersDto=e.RemoveSignerDto=e.AddSignerDto=e.UpdatePublicKeyDto=e.RegisterEthUserDto=e.RegisterUserDto=e.DryRunResultDto=e.DryRunDto=e.GetObjectHistoryDto=e.GetObjectDto=e.BatchDto=e.BatchOperationDto=e.SubmitCallDTO=e.ChainCallDTO=e.createValidSubmitDTO=e.createValidDTO=e.parseValidDTO=e.validateDTO=void 0;const t=Re,r=At,n=uy,i=Ey(),o=Mv(),a=Uv();class d extends o.ValidationFailedError{constructor(e){const t=(0,o.getValidationErrorMessages)(e);super(`DTO validation failed: ${t.map((e,t)=>`(${t+1}) ${e}`).join(", ")}`,t)}}e.validateDTO=async e=>{const t=await e.validate();if(t.length)throw new d(t);return e};function s(e){return e.signed=t=>s(e.then(e=>e.signed(t))),e}function c(t,n){const i=(0,r.plainToInstance)(t,n);return s((0,e.validateDTO)(i))}e.parseValidDTO=async(t,r)=>{const n=u.deserialize(t,r);return await(0,e.validateDTO)(n),n},e.createValidDTO=c,e.createValidSubmitDTO=function(e,t){var r;return c(e,{...t,uniqueKey:null!==(r=null==t?void 0:t.uniqueKey)&&void 0!==r?r:(0,o.randomUniqueKey)()})};class u{validate(){return(0,n.validate)(this)}async validateOrReject(){const e=await this.validate();if(e.length)throw new d(e)}serialize(){return(0,o.serialize)(this)}static deserialize(e,t){return(0,o.deserialize)(e,t)}getAllSignatures(){var e;return null!==(e=this.multisig)&&void 0!==e?e:this.signature?[this.signature]:[]}sign(e,t=!1){const r=this.getAllSignatures(),n=r.length>0;if(n&&!this.signerAddress)throw new o.ValidationFailedError("signerAddress is required for multisignature DTOs");if(n&&!this.dtoOperation)throw new o.ValidationFailedError("dtoOperation is required for multisignature DTOs");if(n&&!this.dtoExpiresAt)throw new o.ValidationFailedError("dtoExpiresAt is required for multisignature DTOs");if(n&&this.signerPublicKey)throw new o.ValidationFailedError("signerPublicKey is not allowed for multisignature DTOs");if(t){if(n)throw new o.ValidationFailedError("DER signatures are not allowed for multisignature DTOs");void 0===this.signerPublicKey&&void 0===this.signerAddress&&(this.signerPublicKey=o.signatures.getPublicKey(e));const t=o.signatures.normalizePrivateKey(e);return void(this.signature=o.signatures.getDERSignature(this,t))}const i=o.signatures.normalizePrivateKey(e),a=o.signatures.getSignature(this,i);n?(delete this.signature,this.multisig=[...r,a]):this.signature=a}signed(e,t=!1){const n=(0,r.instanceToInstance)(this);return n.sign(e,t),n}expiresInMs(e){const t=(0,r.instanceToInstance)(this);return t.dtoExpiresAt=Date.now()+e,t}withOperation(e){const t=(0,r.instanceToInstance)(this);return t.dtoOperation=e,t}withSigner(e){const t=(0,r.instanceToInstance)(this);return t.signerAddress=e,t}isSignatureValid(e){if(this.multisig||!this.signature)throw new o.NotImplementedError("isSignatureValid is not supported for multisig DTOs");return o.signatures.isValid(this.signature,this,e)}}e.ChainCallDTO=u,t.__decorate([(0,i.JSONSchema)({description:"Unique key of the DTO. It is used to prevent double execution of the same transaction on chain. The key is saved on chain and checked before execution. If a DTO with already saved key is used in transaction, the transaction will fail with UniqueTransactionConflict error, which is mapped to HTTP 409 Conflict error. In case of the error, no changes are saved to chain state.\nThe key is generated by the caller and should be unique for each DTO. You can use `nanoid` library, UUID scheme, or any tool to generate unique string keys."}),(0,n.IsNotEmpty)(),(0,n.IsOptional)(),t.__metadata("design:type",String)],u.prototype,"uniqueKey",void 0),t.__decorate([(0,i.JSONSchema)({description:"Prefix for Metamask transaction signatures. Necessary to format payloads correctly to recover publicKey from web3 signatures."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),t.__metadata("design:type",String)],u.prototype,"prefix",void 0),t.__decorate([(0,i.JSONSchema)({description:"Address of the user who signed the DTO. Typically Ethereum address, or user alias."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),t.__metadata("design:type",String)],u.prototype,"signerAddress",void 0),t.__decorate([(0,i.JSONSchema)({description:"Public key of the user who signed the DTO."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),t.__metadata("design:type",String)],u.prototype,"signerPublicKey",void 0),t.__decorate([(0,i.JSONSchema)({description:"Signature of the DTO signed with caller's private key to be verified with user's public key saved on chain. The 'signature' field is optional for DTO, but is required for a transaction to be executed on chain. \nPlease consult [GalaChain SDK documentation](https://github.com/GalaChain/sdk/blob/main/docs/authorization.md#signature-based-authorization) on how to create signatures."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),t.__metadata("design:type",String)],u.prototype,"signature",void 0),t.__decorate([(0,i.JSONSchema)({description:"List of signatures for this DTO if there are multiple signers. If there are multiple signatures, 'signerAddress' is required, and it is not allowed to provide 'signature' or 'signerPublicKey' fields, and the signing scheme must be ETH."}),(0,n.IsOptional)(),(0,a.SerializeIf)(e=>!e.signature),(0,n.ArrayMinSize)(2),(0,r.Type)(()=>String),t.__metadata("design:type",Array)],u.prototype,"multisig",void 0),t.__decorate([(0,i.JSONSchema)({description:"Full operation identifier that is called on chain with this DTO. The format is `channelId_chaincodeId_methodName`. It is required for multisig DTOs, and optional for single signed DTOs. "}),(0,n.IsOptional)(),(0,n.IsString)(),(0,n.IsNotEmpty)(),t.__metadata("design:type",String)],u.prototype,"dtoOperation",void 0),t.__decorate([(0,i.JSONSchema)({description:"Unit timestamp when the DTO expires. If the timestamp is in the past, the DTO is not valid."}),(0,n.IsOptional)(),(0,n.IsNumber)(),t.__metadata("design:type",Number)],u.prototype,"dtoExpiresAt",void 0);class l extends u{}e.SubmitCallDTO=l,t.__decorate([(0,n.IsNotEmpty)(),t.__metadata("design:type",String)],l.prototype,"uniqueKey",void 0);class f extends u{}e.BatchOperationDto=f,t.__decorate([(0,n.IsNotEmpty)(),t.__metadata("design:type",String)],f.prototype,"method",void 0),t.__decorate([(0,n.IsNotEmpty)(),(0,n.ValidateNested)(),(0,r.Type)(()=>u),t.__metadata("design:type",u)],f.prototype,"dto",void 0);class p extends u{}e.BatchDto=p,p.BATCH_SIZE_LIMIT=1e3,p.WRITES_DEFAULT_LIMIT=1e4,p.WRITES_HARD_LIMIT=1e5,t.__decorate([(0,i.JSONSchema)({description:`Soft limit of keys written to chain in a batch, excluding deletes. If the limit is exceeded, all subsequent operations in batch fail. Typically it is safe to repeat failed operations in the next batch. Default: ${p.WRITES_DEFAULT_LIMIT}. Max: ${p.WRITES_HARD_LIMIT}.`}),(0,n.IsOptional)(),(0,n.IsNumber)(),(0,n.Min)(1),(0,n.Max)(p.WRITES_HARD_LIMIT),(0,n.IsOptional)(),t.__metadata("design:type",Number)],p.prototype,"writesLimit",void 0),t.__decorate([(0,i.JSONSchema)({description:"If true, the batch will fail if any of the operations fail. If false, the batch will continue even if some of the operations fail. Default: false."}),(0,n.IsOptional)(),t.__metadata("design:type",Boolean)],p.prototype,"noPartialSuccess",void 0),t.__decorate([(0,r.Type)(()=>f),(0,n.ValidateNested)({each:!0}),(0,n.ArrayMinSize)(1),(0,n.ArrayMaxSize)(p.BATCH_SIZE_LIMIT),t.__metadata("design:type",Array)],p.prototype,"operations",void 0);class h extends u{}e.GetObjectDto=h,t.__decorate([(0,n.IsNotEmpty)(),t.__metadata("design:type",String)],h.prototype,"objectId",void 0);class y extends u{}e.GetObjectHistoryDto=y,t.__decorate([(0,n.IsNotEmpty)(),t.__metadata("design:type",String)],y.prototype,"objectId",void 0);class m extends u{}e.DryRunDto=m,t.__decorate([(0,n.IsNotEmpty)(),t.__metadata("design:type",String)],m.prototype,"method",void 0),t.__decorate([(0,n.IsOptional)(),(0,n.IsNotEmpty)(),t.__metadata("design:type",String)],m.prototype,"callerPublicKey",void 0),t.__decorate([(0,n.IsNotEmpty)(),(0,n.IsOptional)(),(0,r.Type)(()=>u),t.__metadata("design:type",u)],m.prototype,"dto",void 0);e.DryRunResultDto=class extends u{};let g=class extends l{};e.RegisterUserDto=g,t.__decorate([(0,i.JSONSchema)({description:"Id of user to save public key for."}),(0,a.IsUserAlias)(),t.__metadata("design:type",String)],g.prototype,"user",void 0),t.__decorate([(0,i.JSONSchema)({description:"Public secp256k1 key (compact or non-compact, hex or base64)."}),(0,n.ValidateIf)(e=>!e.signers),(0,n.IsString)(),(0,n.IsNotEmpty)(),t.__metadata("design:type",String)],g.prototype,"publicKey",void 0),t.__decorate([(0,i.JSONSchema)({description:"Signer user refs."}),(0,n.ValidateIf)(e=>!e.publicKey),(0,a.SerializeIf)(e=>!e.publicKey),(0,a.IsUserRef)({each:!0}),(0,n.IsNotEmpty)({each:!0}),(0,n.ArrayMinSize)(1),t.__metadata("design:type",Array)],g.prototype,"signers",void 0),t.__decorate([(0,i.JSONSchema)({description:"Minimum number of signatures required for authorization. Defaults to number of public keys."}),(0,n.IsOptional)(),(0,n.IsInt)(),(0,n.Min)(1),t.__metadata("design:type",Number)],g.prototype,"signatureQuorum",void 0),e.RegisterUserDto=g=t.__decorate([(0,i.JSONSchema)({description:"Dto for secure method to save public keys for legacy users. Method is called and signed by Curators"})],g);let _=class extends l{};e.RegisterEthUserDto=_,t.__decorate([(0,i.JSONSchema)({description:"Public secp256k1 key (compact or non-compact, hex or base64)."}),(0,n.IsNotEmpty)(),t.__metadata("design:type",String)],_.prototype,"publicKey",void 0),e.RegisterEthUserDto=_=t.__decorate([(0,i.JSONSchema)({description:"Dto for secure method to save public keys for Eth users. Method is called and signed by Curators"})],_);class v extends l{withPublicKeySignedBy(e){const t=(0,r.instanceToInstance)(this);return delete t.publicKeySignature,t.publicKeySignature=o.signatures.getSignature(t,e),t}}e.UpdatePublicKeyDto=v,t.__decorate([(0,i.JSONSchema)({description:"New public key for the user. For users with ETH signing scheme it is public secp256k1 key (compact or non-compact, hex or base64). For users with TON signing scheme it is public Ed25519 key (base64)."}),(0,n.IsNotEmpty)(),t.__metadata("design:type",String)],v.prototype,"publicKey",void 0),t.__decorate([(0,i.JSONSchema)({description:"Signature from the new public key. The signature should be created over the same data as the main signature of this DTO, but the `signature` and `multisig` fields should be empty. This is to prove that the caller has access to the private key of the new public key."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),t.__metadata("design:type",String)],v.prototype,"publicKeySignature",void 0);class b extends l{}e.AddSignerDto=b,t.__decorate([(0,i.JSONSchema)({description:"User ref of the signer to add (typically Ethereum address, or user alias)."}),(0,n.IsNotEmpty)(),t.__metadata("design:type",String)],b.prototype,"signer",void 0);class S extends l{}e.RemoveSignerDto=S,t.__decorate([(0,i.JSONSchema)({description:"User ref of the signer to remove (typically Ethereum address, or user alias)."}),(0,n.IsNotEmpty)(),t.__metadata("design:type",String)],S.prototype,"signer",void 0);class I extends l{}e.UpdateSignersDto=I,t.__decorate([(0,i.JSONSchema)({description:"Array of user refs of signers to add (typically Ethereum addresses, or user aliases)."}),(0,n.IsOptional)(),(0,a.IsUserRef)({each:!0}),(0,n.IsNotEmpty)({each:!0}),t.__metadata("design:type",Array)],I.prototype,"toAdd",void 0),t.__decorate([(0,i.JSONSchema)({description:"Array of user refs of signers to remove (typically Ethereum addresses, or user aliases)."}),(0,n.IsOptional)(),(0,a.IsUserRef)({each:!0}),(0,n.IsNotEmpty)({each:!0}),t.__metadata("design:type",Array)],I.prototype,"toRemove",void 0);class N extends l{}e.UpdateQuorumDto=N,t.__decorate([(0,i.JSONSchema)({description:"New quorum for the user."}),(0,n.IsInt)(),(0,n.Min)(1),t.__metadata("design:type",Number)],N.prototype,"quorum",void 0);class $ extends l{}e.UpdateUserRolesDto=$,t.__decorate([(0,a.IsUserRef)(),t.__metadata("design:type",String)],$.prototype,"user",void 0),t.__decorate([(0,i.JSONSchema)({description:"New set of roles for the user that will replace the old ones."}),(0,n.IsNotEmpty)(),t.__metadata("design:type",Array)],$.prototype,"roles",void 0);class w extends u{}e.GetPublicKeyDto=w,t.__decorate([(0,i.JSONSchema)({description:"Id of a public key holder. Optional field, by default caller's public key is returned."}),(0,n.IsOptional)(),(0,a.IsUserRef)(),t.__metadata("design:type",String)],w.prototype,"user",void 0);class A extends u{}e.GetMyProfileDto=A,t.__decorate([(0,n.IsNotEmpty)(),t.__metadata("design:type",String)],A.prototype,"signature",void 0)}(nb)),nb}function ob(){if(tb)return Yv;var e;tb=1,Object.defineProperty(Yv,"__esModule",{value:!0}),Yv.TokenClass=Yv.TokenClassKey=void 0;const t=Re,r=mt,n=At,i=uy,o=Ey(),a=Mv(),d=Uv(),s=Zv(),c=Qv(),u=ib();let l=e=class extends u.ChainCallDTO{toString(){return this.toStringKey()}toStringKey(){const e=f.buildClassKeyList(this);return s.ChainObject.getStringKeyFromParts(e)}static toStringKey(e){const t=f.buildClassKeyList(e);return s.ChainObject.getStringKeyFromParts(t)}allKeysPresent(){if(4!==Object.entries(this).length)return!1;const e="string"==typeof this.additionalKey;return!!(this.collection&&this.category&&this.type&&e)}toB58EncodedString(){const e=f.buildClassKeyList(this),t=s.ChainObject.getEncodableStringKeyFromParts(e);return s.ChainObject.encodeToBase58(t)}static fromB58EncodedString(t){const r=s.ChainObject.decodeFromBase58(t),n=s.ChainObject.getPartsFromEncodableStringKey(r,4),i=new e;return i.collection=n[0],i.category=n[1],i.type=n[2],i.additionalKey=n[3],i}};Yv.TokenClassKey=l,t.__decorate([(0,i.IsNotEmpty)(),t.__metadata("design:type",String)],l.prototype,"collection",void 0),t.__decorate([(0,i.IsNotEmpty)(),t.__metadata("design:type",String)],l.prototype,"category",void 0),t.__decorate([(0,i.IsNotEmpty)(),t.__metadata("design:type",String)],l.prototype,"type",void 0),t.__decorate([(0,i.IsDefined)(),t.__metadata("design:type",String)],l.prototype,"additionalKey",void 0),Yv.TokenClassKey=l=e=t.__decorate([(0,o.JSONSchema)({description:"Object representing the chain identifier of token class."})],l);let f=class e extends s.ChainObject{getKey(){return e.buildClassKeyObject(this)}static buildClassKeyList(e){const{collection:t,category:r,type:n,additionalKey:i}=e;return[t,r,n,i]}static buildTokenClassCompositeKey(t){const r=new e;return r.collection=t.collection,r.category=t.category,r.type=t.type,r.additionalKey=t.additionalKey,r.getCompositeKey()}static async buildClassKeyObject(e){var t,r,n,i;const o=new l;o.collection=null!==(t=null==e?void 0:e.collection)&&void 0!==t?t:null,o.category=null!==(r=null==e?void 0:e.category)&&void 0!==r?r:null,o.type=null!==(n=null==e?void 0:e.type)&&void 0!==n?n:null,o.additionalKey=null!==(i=null==e?void 0:e.additionalKey)&&void 0!==i?i:null;const a=await o.validate();if(0!==a.length)throw new Error(a.join(". "));return o}updatedWith(e){return function(e,t){var r,i,o,a,d,s,c;const u=(0,n.instanceToInstance)(e);u.name=null!==(r=t.name)&&void 0!==r?r:e.name,u.symbol=null!==(i=t.symbol)&&void 0!==i?i:e.symbol,u.description=null!==(o=t.description)&&void 0!==o?o:e.description,u.contractAddress=null!==(a=t.contractAddress)&&void 0!==a?a:e.contractAddress,u.metadataAddress=null!==(d=t.metadataAddress)&&void 0!==d?d:e.metadataAddress,u.rarity=null!==(s=t.rarity)&&void 0!==s?s:e.rarity,u.image=null!==(c=t.image)&&void 0!==c?c:e.image,Array.isArray(t.authorities)&&t.authorities.length>0&&(u.authorities=t.overwriteAuthorities?t.authorities:Array.from(new Set(u.authorities.concat(t.authorities))).sort());return u}(this,e)}};return Yv.TokenClass=f,f.INDEX_KEY="GCTI",t.__decorate([(0,a.ChainKey)({position:0}),(0,i.IsNotEmpty)(),t.__metadata("design:type",String)],f.prototype,"collection",void 0),t.__decorate([(0,a.ChainKey)({position:1}),(0,i.IsNotEmpty)(),t.__metadata("design:type",String)],f.prototype,"category",void 0),t.__decorate([(0,a.ChainKey)({position:2}),(0,i.IsNotEmpty)(),t.__metadata("design:type",String)],f.prototype,"type",void 0),t.__decorate([(0,a.ChainKey)({position:3}),(0,i.IsDefined)(),t.__metadata("design:type",String)],f.prototype,"additionalKey",void 0),t.__decorate([(0,i.IsNotEmpty)(),(0,i.Equals)(c.GC_NETWORK_ID),t.__metadata("design:type",String)],f.prototype,"network",void 0),t.__decorate([(0,i.Min)(0),(0,i.Max)(32),t.__metadata("design:type",Number)],f.prototype,"decimals",void 0),t.__decorate([(0,i.IsNotEmpty)(),(0,d.BigNumberIsPositive)(),(0,d.BigNumberProperty)(),t.__metadata("design:type",r.BigNumber)],f.prototype,"maxSupply",void 0),t.__decorate([(0,i.IsBoolean)(),t.__metadata("design:type",Boolean)],f.prototype,"isNonFungible",void 0),t.__decorate([(0,i.IsNotEmpty)(),(0,d.BigNumberIsPositive)(),(0,d.BigNumberProperty)({allowInfinity:!0}),t.__metadata("design:type",r.BigNumber)],f.prototype,"maxCapacity",void 0),t.__decorate([(0,d.IsUserAlias)({each:!0}),t.__metadata("design:type",Array)],f.prototype,"authorities",void 0),t.__decorate([(0,i.IsNotEmpty)(),t.__metadata("design:type",String)],f.prototype,"name",void 0),t.__decorate([(0,i.IsNotEmpty)(),(0,i.IsAlpha)(),t.__metadata("design:type",String)],f.prototype,"symbol",void 0),t.__decorate([(0,i.IsNotEmpty)(),(0,i.MaxLength)(1e3),t.__metadata("design:type",String)],f.prototype,"description",void 0),t.__decorate([(0,i.IsOptional)(),(0,i.MaxLength)(500),t.__metadata("design:type",String)],f.prototype,"contractAddress",void 0),t.__decorate([(0,i.IsOptional)(),(0,i.MaxLength)(500),t.__metadata("design:type",String)],f.prototype,"metadataAddress",void 0),t.__decorate([(0,i.IsNotEmpty)(),(0,i.MaxLength)(500),t.__metadata("design:type",String)],f.prototype,"image",void 0),t.__decorate([(0,i.IsOptional)(),(0,i.IsAlpha)(),t.__metadata("design:type",String)],f.prototype,"rarity",void 0),t.__decorate([(0,d.BigNumberIsPositive)(),(0,d.BigNumberProperty)(),t.__metadata("design:type",r.BigNumber)],f.prototype,"totalBurned",void 0),t.__decorate([(0,d.BigNumberProperty)(),t.__metadata("design:type",r.BigNumber)],f.prototype,"totalMintAllowance",void 0),t.__decorate([(0,i.IsOptional)(),(0,d.BigNumberProperty)(),t.__metadata("design:type",r.BigNumber)],f.prototype,"knownMintAllowanceSupply",void 0),t.__decorate([(0,d.BigNumberProperty)(),t.__metadata("design:type",r.BigNumber)],f.prototype,"totalSupply",void 0),t.__decorate([(0,i.IsOptional)(),(0,d.BigNumberProperty)(),t.__metadata("design:type",r.BigNumber)],f.prototype,"knownMintSupply",void 0),t.__decorate([(0,n.Exclude)(),t.__metadata("design:type",Function),t.__metadata("design:paramtypes",[]),t.__metadata("design:returntype",Promise)],f.prototype,"getKey",null),t.__decorate([(0,n.Exclude)(),t.__metadata("design:type",Function),t.__metadata("design:paramtypes",[Object]),t.__metadata("design:returntype",String)],f,"buildTokenClassCompositeKey",null),t.__decorate([(0,n.Exclude)(),t.__metadata("design:type",Function),t.__metadata("design:paramtypes",[Object]),t.__metadata("design:returntype",Promise)],f,"buildClassKeyObject",null),Yv}function ab(){if(rb)return Jv;var e;rb=1,Object.defineProperty(Jv,"__esModule",{value:!0}),Jv.TokenInstance=Jv.TokenInstanceQueryKey=Jv.TokenInstanceQuantity=Jv.TokenInstanceKey=void 0;const t=Re,r=mt,n=At,i=uy,o=Ey(),a=Mv(),d=Uv(),s=Zv(),c=ob(),u=ib();let l=e=class extends u.ChainCallDTO{static nftKey(t,n){const i=new e;return i.collection=t.collection,i.category=t.category,i.type=t.type,i.additionalKey=t.additionalKey,i.instance=new r.BigNumber(n),i}static fungibleKey(t){return e.nftKey(t,h.FUNGIBLE_TOKEN_INSTANCE)}getTokenClassKey(){const e=new c.TokenClassKey;return e.category=this.category,e.collection=this.collection,e.type=this.type,e.additionalKey=this.additionalKey,e}toQueryKey(){const e=new p;return e.collection=this.collection,e.category=this.category,e.type=this.type,e.additionalKey=this.additionalKey,e.instance=this.instance,e}toString(){return this.toStringKey()}toStringKey(){const e=h.buildInstanceKeyList(this);return s.ChainObject.getStringKeyFromParts(e)}isFungible(){return h.isFungible(this.instance)}toB58EncodedString(){const e=h.buildInstanceKeyList(this),t=s.ChainObject.getEncodableStringKeyFromParts(e);return s.ChainObject.encodeToBase58(t)}static fromB58EncodedString(t){const n=s.ChainObject.decodeFromBase58(t),i=s.ChainObject.getPartsFromEncodableStringKey(n,5),o=new e;return o.collection=i[0],o.category=i[1],o.type=i[2],o.additionalKey=i[3],o.instance=new r.BigNumber(i[4]),o}};Jv.TokenInstanceKey=l,t.__decorate([(0,i.IsNotEmpty)(),t.__metadata("design:type",String)],l.prototype,"collection",void 0),t.__decorate([(0,i.IsNotEmpty)(),t.__metadata("design:type",String)],l.prototype,"category",void 0),t.__decorate([(0,i.IsNotEmpty)(),t.__metadata("design:type",String)],l.prototype,"type",void 0),t.__decorate([(0,i.IsDefined)(),t.__metadata("design:type",String)],l.prototype,"additionalKey",void 0),t.__decorate([(0,i.IsNotEmpty)(),(0,d.BigNumberIsInteger)(),(0,d.BigNumberIsNotNegative)(),(0,d.BigNumberProperty)(),t.__metadata("design:type",r.BigNumber)],l.prototype,"instance",void 0),Jv.TokenInstanceKey=l=e=t.__decorate([(0,o.JSONSchema)({description:"Object representing the chain identifier of token instance."})],l);class f extends u.ChainCallDTO{getTokenClassKey(){return this.tokenInstance.getTokenClassKey()}toString(){return this.tokenInstance.toStringKey()}toStringKey(){return this.tokenInstance.toStringKey()}}Jv.TokenInstanceQuantity=f,t.__decorate([(0,i.ValidateNested)(),(0,n.Type)(()=>l),(0,i.IsNotEmpty)(),t.__metadata("design:type",l)],f.prototype,"tokenInstance",void 0),t.__decorate([(0,i.IsNotEmpty)(),(0,d.BigNumberIsNotNegative)(),(0,d.BigNumberProperty)(),t.__metadata("design:type",r.BigNumber)],f.prototype,"quantity",void 0),t.__decorate([(0,i.IsOptional)(),(0,o.JSONSchema)({description:"The TokenClass metadata corresponding to the TokenBalance on this DTO."}),(0,n.Type)(()=>c.TokenClass),(0,i.IsObject)(),t.__metadata("design:type",c.TokenClass)],f.prototype,"tokenMetadata",void 0);let p=class extends u.ChainCallDTO{isCompleteKey(){return!!(this.collection&&this.category&&this.type&&"string"==typeof this.additionalKey&&r.BigNumber.isBigNumber(this.instance))}toCompleteKey(){if(!(this.collection&&this.category&&this.type&&"string"==typeof this.additionalKey&&r.BigNumber.isBigNumber(this.instance)))throw new Error(`Attempted to convert partial key to complete instance key with missing properties: ${this.toQueryParams().join(", ")}`);const e=new l;return e.collection=this.collection,e.category=this.category,e.type=this.type,e.additionalKey=this.additionalKey,e.instance=this.instance,e}publicKeyProperties(){return["collection","category","type","additionalKey"]}toQueryParams(){const e=[],t=this.publicKeyProperties();for(const r of t){if("string"!=typeof this[r])break;e.push(this[r])}return e}};Jv.TokenInstanceQueryKey=p,t.__decorate([(0,i.IsNotEmpty)(),t.__metadata("design:type",String)],p.prototype,"collection",void 0),t.__decorate([(0,i.IsOptional)(),t.__metadata("design:type",String)],p.prototype,"category",void 0),t.__decorate([(0,i.IsOptional)(),t.__metadata("design:type",String)],p.prototype,"type",void 0),t.__decorate([(0,i.IsOptional)(),t.__metadata("design:type",String)],p.prototype,"additionalKey",void 0),t.__decorate([(0,i.IsOptional)(),(0,d.BigNumberIsInteger)(),(0,d.BigNumberIsNotNegative)(),(0,d.BigNumberProperty)(),t.__metadata("design:type",r.BigNumber)],p.prototype,"instance",void 0),Jv.TokenInstanceQueryKey=p=t.__decorate([(0,o.JSONSchema)({description:"A full or partial key of a TokenInstance, for querying or actioning one or more instances of a token."})],p);let h=class e extends s.ChainObject{GetCompositeKeyString(){return e.CreateCompositeKey(this)}instanceKeyObj(){const e=new l;return e.collection=this.collection,e.category=this.category,e.type=this.type,e.additionalKey=this.additionalKey,e.instance=this.instance,e}static GetFungibleInstanceFromClass(e){const{MIN_UNICODE_RUNE_VALUE:t}=s.ChainObject,{collection:r,category:n,type:i,additionalKey:o}=e;return[r,n,i,o,this.FUNGIBLE_TOKEN_INSTANCE].join(t)}static CreateCompositeKey(e){const{MIN_UNICODE_RUNE_VALUE:t}=s.ChainObject,{collection:r,category:i,type:o,additionalKey:a,instance:d}=(0,n.classToPlain)(e);return[r,i,o,a,d].join(t)}static GetCompositeKeyFromString(t){const r=t.split(s.ChainObject.ID_SPLIT_CHAR);if(2!==r.length||Number.isNaN(Number.parseInt(r[1])))throw new Error(`Invalid string passed to TokenInstance.GetCompositeKeyFromString : ${t}`);return s.ChainObject.getCompositeKeyFromParts(e.INDEX_KEY,r)}static buildInstanceKeyList(e){const{collection:t,category:r,type:n,additionalKey:i,instance:o}=e;return[t,r,n,i,o.toString()]}static async buildInstanceKeyObject(e){var t,r,n,i,o;const a=new l;a.collection=null!==(t=null==e?void 0:e.collection)&&void 0!==t?t:null,a.category=null!==(r=null==e?void 0:e.category)&&void 0!==r?r:null,a.type=null!==(n=null==e?void 0:e.type)&&void 0!==n?n:null,a.additionalKey=null!==(i=null==e?void 0:e.additionalKey)&&void 0!==i?i:null,a.instance=null!==(o=null==e?void 0:e.instance)&&void 0!==o?o:null;const d=await a.validate();if(0!==d.length)throw new Error(d.join(". "));return a}static isFungible(t){return e.FUNGIBLE_TOKEN_INSTANCE.isEqualTo(t)}static isNFT(t){return!e.isFungible(t)}};return Jv.TokenInstance=h,h.INDEX_KEY="GCTI2",h.FUNGIBLE_TOKEN_INSTANCE=new r.BigNumber(0),t.__decorate([(0,a.ChainKey)({position:0}),(0,i.IsNotEmpty)(),t.__metadata("design:type",String)],h.prototype,"collection",void 0),t.__decorate([(0,a.ChainKey)({position:1}),(0,i.IsNotEmpty)(),t.__metadata("design:type",String)],h.prototype,"category",void 0),t.__decorate([(0,a.ChainKey)({position:2}),(0,i.IsNotEmpty)(),t.__metadata("design:type",String)],h.prototype,"type",void 0),t.__decorate([(0,a.ChainKey)({position:3}),(0,i.IsDefined)(),t.__metadata("design:type",String)],h.prototype,"additionalKey",void 0),t.__decorate([(0,a.ChainKey)({position:4}),(0,i.IsNotEmpty)(),(0,d.BigNumberIsInteger)(),(0,d.BigNumberIsNotNegative)(),(0,d.BigNumberProperty)(),t.__metadata("design:type",r.BigNumber)],h.prototype,"instance",void 0),t.__decorate([(0,i.IsBoolean)(),t.__metadata("design:type",Boolean)],h.prototype,"isNonFungible",void 0),t.__decorate([(0,i.ValidateIf)(e=>!0===e.isNonFungible),(0,d.IsUserAlias)(),t.__metadata("design:type",String)],h.prototype,"owner",void 0),Jv}var db,sb={},cb={};function ub(){if(db)return cb;db=1,Object.defineProperty(cb,"__esModule",{value:!0}),cb.OracleDefinition=void 0;const e=Re,t=uy,r=Mv(),n=Zv();let i=class extends n.ChainObject{};return cb.OracleDefinition=i,i.INDEX_KEY="GCOE",e.__decorate([(0,r.ChainKey)({position:0}),(0,t.IsString)(),(0,t.IsNotEmpty)(),e.__metadata("design:type",String)],i.prototype,"name",void 0),e.__decorate([(0,t.ArrayNotEmpty)(),e.__metadata("design:type",Array)],i.prototype,"authorities",void 0),cb}var lb,fb={};function pb(){if(lb)return fb;lb=1,Object.defineProperty(fb,"__esModule",{value:!0}),fb.OraclePriceAssertion=fb.ExternalToken=void 0;const e=Re,t=e.__importDefault(mt),r=At,n=uy,i=Ey(),o=Mv(),a=Uv(),d=Zv(),s=ab();let c=class extends d.ChainObject{};fb.ExternalToken=c,e.__decorate([(0,i.JSONSchema)({description:'Name of the external currency, e.g. "Ethereum"'}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],c.prototype,"name",void 0),e.__decorate([(0,i.JSONSchema)({description:'Symbol of the external currency, e.g. "ETH"'}),e.__metadata("design:type",String)],c.prototype,"symbol",void 0),fb.ExternalToken=c=e.__decorate([(0,i.JSONSchema)({description:"External token/currency definition. Use to specify an external currency that does not have a TokenClass defined on GalaChain."})],c);let u=class extends d.ChainObject{};return fb.OraclePriceAssertion=u,u.INDEX_KEY="GCOAP",e.__decorate([(0,i.JSONSchema)({description:"Name of the signing authoritative oracle defined on chain."}),(0,o.ChainKey)({position:0}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],u.prototype,"oracle",void 0),e.__decorate([(0,i.JSONSchema)({description:"Signing identity making the assertion contained within the DTO."}),(0,o.ChainKey)({position:1}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],u.prototype,"identity",void 0),e.__decorate([(0,o.ChainKey)({position:2}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],u.prototype,"txid",void 0),e.__decorate([(0,i.JSONSchema)({description:"First currency in the described currency pair. Unit of exchange."}),(0,n.ValidateIf)(e=>!!e.externalBaseToken),(0,n.ValidateNested)(),(0,r.Type)(()=>s.TokenInstanceKey),e.__metadata("design:type",s.TokenInstanceKey)],u.prototype,"baseToken",void 0),e.__decorate([(0,i.JSONSchema)({description:"External token representing the first currency in the described currency pair. Unit of exchange. Optional, but required if baseToken is not provided."}),(0,n.ValidateIf)(e=>!!e.baseToken),(0,n.ValidateNested)(),(0,r.Type)(()=>c),e.__metadata("design:type",c)],u.prototype,"externalBaseToken",void 0),e.__decorate([(0,i.JSONSchema)({description:"Second token/currency in the pair. Token/Currency in which the baseToken is quoted. Optional, but required if externalQuoteToken is not provided."}),(0,n.ValidateIf)(e=>!e.externalQuoteToken),(0,n.ValidateNested)(),(0,r.Type)(()=>s.TokenInstanceKey),e.__metadata("design:type",s.TokenInstanceKey)],u.prototype,"quoteToken",void 0),e.__decorate([(0,i.JSONSchema)({description:"Second token/currency in the pair. Token/Currency in which the baseToken is quoted. Optional, but required if quoteToken is not provided."}),(0,n.ValidateIf)(e=>!e.quoteToken),(0,n.ValidateNested)(),(0,r.Type)(()=>c),e.__metadata("design:type",c)],u.prototype,"externalQuoteToken",void 0),e.__decorate([(0,i.JSONSchema)({description:"How much of the quoteToken is needed to purchase one unit of the baseToken."}),(0,a.BigNumberProperty)(),e.__metadata("design:type",t.default)],u.prototype,"exchangeRate",void 0),e.__decorate([(0,i.JSONSchema)({description:"(Optional). Base Token quantity from conversion to/from quote token quantity."}),(0,n.IsOptional)(),(0,a.BigNumberProperty)(),e.__metadata("design:type",t.default)],u.prototype,"baseTokenQuantity",void 0),e.__decorate([(0,i.JSONSchema)({description:"(Optional). Quote token quantity from conversion to/from base token quantity."}),(0,n.IsOptional)(),(0,a.BigNumberProperty)(),e.__metadata("design:type",t.default)],u.prototype,"quoteTokenQuantity",void 0),e.__decorate([(0,i.JSONSchema)({description:"(Optional) Source of price data. Name of Third Party data source."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],u.prototype,"source",void 0),e.__decorate([(0,i.JSONSchema)({description:"(Optional) URL referencing source data."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],u.prototype,"sourceUrl",void 0),e.__decorate([(0,i.JSONSchema)({description:"Unix timestamp representing the date/time at which this price / exchange rate was calculated or estimated."}),(0,n.IsNumber)(),e.__metadata("design:type",Number)],u.prototype,"timestamp",void 0),fb}var hb,yb,mb,gb={};function _b(){if(hb)return gb;hb=1,Object.defineProperty(gb,"__esModule",{value:!0}),gb.OraclePriceCrossRateAssertion=void 0;const e=Re,t=At,r=uy,n=Ey(),i=Mv(),o=Zv(),a=pb();let d=class extends o.ChainObject{};return gb.OraclePriceCrossRateAssertion=d,d.INDEX_KEY="GCOC",e.__decorate([(0,n.JSONSchema)({description:"Name of the signing authoritative oracle defined on chain."}),(0,i.ChainKey)({position:0}),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],d.prototype,"oracle",void 0),e.__decorate([(0,n.JSONSchema)({description:"Signing identity making the assertion within the DTO."}),(0,i.ChainKey)({position:1}),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],d.prototype,"identity",void 0),e.__decorate([(0,i.ChainKey)({position:2}),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],d.prototype,"txid",void 0),e.__decorate([(0,n.JSONSchema)({description:"Chain key referencing the saved baseToken price assertion"}),(0,r.ValidateNested)(),(0,t.Type)(()=>a.OraclePriceAssertion),e.__metadata("design:type",a.OraclePriceAssertion)],d.prototype,"baseTokenCrossRate",void 0),e.__decorate([(0,n.JSONSchema)({description:"Chain key referencing the saved quote token price assertion"}),(0,r.ValidateNested)(),(0,t.Type)(()=>a.OraclePriceAssertion),e.__metadata("design:type",a.OraclePriceAssertion)],d.prototype,"quoteTokenCrossRate",void 0),gb}function vb(){if(yb)return sb;yb=1,Object.defineProperty(sb,"__esModule",{value:!0}),sb.OracleBridgeFeeAssertionDto=sb.DeleteOracleDefinitionDto=sb.DeleteOracleAssertionsDto=sb.FetchOraclePriceCrossRateAssertionsResponse=sb.OraclePriceCrossRateAssertionDto=sb.FetchOraclePriceAssertionsResponse=sb.OraclePriceAssertionDto=sb.FetchOracleDefinitionsResponse=sb.FetchOracleAssertionsDto=sb.FetchOracleDefinitionsDto=sb.OracleDefinitionDto=void 0;const e=Re,t=e.__importDefault(mt),r=At,n=uy,i=Ey(),o=Mv(),a=Uv(),d=ub(),s=pb(),c=_b(),u=ob(),l=ab(),f=ib();let p=class extends f.SubmitCallDTO{};sb.OracleDefinitionDto=p,e.__decorate([(0,i.JSONSchema)({description:"Name of the oracle. Unique chain key."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],p.prototype,"name",void 0),e.__decorate([(0,i.JSONSchema)({description:"Oracle Authorities. On-Chain identities that speak for this Oracle."}),(0,n.ArrayUnique)(),e.__metadata("design:type",Array)],p.prototype,"authorities",void 0),sb.OracleDefinitionDto=p=e.__decorate([(0,i.JSONSchema)({description:"Save an Oracle definition on chain"})],p);let h=class extends f.ChainCallDTO{};sb.FetchOracleDefinitionsDto=h,e.__decorate([(0,i.JSONSchema)({description:"(optional). Provide a name key to fetch a specific oracle definition"}),e.__metadata("design:type",Object)],h.prototype,"name",void 0),e.__decorate([(0,i.JSONSchema)({description:"(optional). Bookmark for paginated results"}),e.__metadata("design:type",Object)],h.prototype,"bookmark",void 0),e.__decorate([(0,i.JSONSchema)({description:"(optional). Limit results set."}),e.__metadata("design:type",Object)],h.prototype,"limit",void 0),sb.FetchOracleDefinitionsDto=h=e.__decorate([(0,i.JSONSchema)({description:"Fetch Oracle definitions"})],h);let y=class extends f.ChainCallDTO{};sb.FetchOracleAssertionsDto=y,e.__decorate([(0,i.JSONSchema)({description:"(optional). Provide a oracle name key to fetch a specific oracle definition"}),e.__metadata("design:type",Object)],y.prototype,"oracle",void 0),e.__decorate([(0,i.JSONSchema)({description:"(optional). Filter by identity"}),e.__metadata("design:type",Object)],y.prototype,"identity",void 0),e.__decorate([(0,i.JSONSchema)({description:"(optional). Filter by a specific txid"}),e.__metadata("design:type",Object)],y.prototype,"txid",void 0),e.__decorate([(0,i.JSONSchema)({description:"(optional). Bookmark for paginated results"}),e.__metadata("design:type",Object)],y.prototype,"bookmark",void 0),e.__decorate([(0,i.JSONSchema)({description:"(optional). Limit results set."}),e.__metadata("design:type",Object)],y.prototype,"limit",void 0),sb.FetchOracleAssertionsDto=y=e.__decorate([(0,i.JSONSchema)({description:"Fetch Oracle Assertions with pagination"})],y);let m=class extends f.ChainCallDTO{};sb.FetchOracleDefinitionsResponse=m,m.DEFAULT_LIMIT=1e3,e.__decorate([(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>d.OracleDefinition),e.__metadata("design:type",Array)],m.prototype,"results",void 0),e.__decorate([(0,n.IsOptional)(),(0,n.IsString)(),e.__metadata("design:type",Object)],m.prototype,"bookmark",void 0),sb.FetchOracleDefinitionsResponse=m=e.__decorate([(0,i.JSONSchema)({description:"Paginated response DTO for Oracle definition chain objects."})],m);let g=class extends f.SubmitCallDTO{};sb.OraclePriceAssertionDto=g,e.__decorate([(0,i.JSONSchema)({description:"Name of the oracle defined on chain."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],g.prototype,"oracle",void 0),e.__decorate([(0,i.JSONSchema)({description:"Signing identity making the assertion contained within the DTO."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],g.prototype,"identity",void 0),e.__decorate([(0,i.JSONSchema)({description:"First currency in the described currency pair. Unit of exchange. Optional, but required if externalBaseToken is not provided."}),(0,n.ValidateIf)(e=>!!e.externalBaseToken),(0,n.ValidateNested)(),(0,r.Type)(()=>l.TokenInstanceKey),e.__metadata("design:type",l.TokenInstanceKey)],g.prototype,"baseToken",void 0),e.__decorate([(0,i.JSONSchema)({description:"External token representing the first currency in the described currency pair. Unit of exchange. Optional, but required if baseToken is not provided."}),(0,n.ValidateIf)(e=>!!e.baseToken),(0,n.ValidateNested)(),(0,r.Type)(()=>s.ExternalToken),e.__metadata("design:type",s.ExternalToken)],g.prototype,"externalBaseToken",void 0),e.__decorate([(0,i.JSONSchema)({description:"Second token/currency in the pair. Token/Currency in which the baseToken is quoted. Optional, but required if externalQuoteToken is not provided."}),(0,n.ValidateIf)(e=>!!e.externalQuoteToken),(0,n.ValidateNested)(),(0,r.Type)(()=>l.TokenInstanceKey),e.__metadata("design:type",l.TokenInstanceKey)],g.prototype,"quoteToken",void 0),e.__decorate([(0,i.JSONSchema)({description:"Second token/currency in the pair. Token/Currency in which the baseToken is quoted. Optional, but required if quoteToken is not provided."}),(0,n.ValidateIf)(e=>!!e.quoteToken),(0,n.ValidateNested)(),(0,r.Type)(()=>s.ExternalToken),e.__metadata("design:type",s.ExternalToken)],g.prototype,"externalQuoteToken",void 0),e.__decorate([(0,i.JSONSchema)({description:"How much of the quoteToken is needed to purchase one unit of the baseToken."}),(0,a.BigNumberProperty)(),e.__metadata("design:type",t.default)],g.prototype,"exchangeRate",void 0),e.__decorate([(0,i.JSONSchema)({description:"(Optional) Source of price data. Name of Third Party data source."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],g.prototype,"source",void 0),e.__decorate([(0,i.JSONSchema)({description:"(Optional) URL referencing source data."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],g.prototype,"sourceUrl",void 0),e.__decorate([(0,i.JSONSchema)({description:"Unix timestamp representing the date/time at which this price / exchange rate was calculated or estimated."}),(0,n.IsNumber)(),e.__metadata("design:type",Number)],g.prototype,"timestamp",void 0),sb.OraclePriceAssertionDto=g=e.__decorate([(0,i.JSONSchema)({description:"Price data for exchanging two tokens/currenices signed by an Authoritative Oracle"})],g);let _=class extends f.ChainCallDTO{};sb.FetchOraclePriceAssertionsResponse=_,_.DEFAULT_LIMIT=1e3,e.__decorate([(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>s.OraclePriceAssertion),e.__metadata("design:type",Array)],_.prototype,"results",void 0),e.__decorate([(0,n.IsOptional)(),(0,n.IsString)(),e.__metadata("design:type",Object)],_.prototype,"bookmark",void 0),sb.FetchOraclePriceAssertionsResponse=_=e.__decorate([(0,i.JSONSchema)({description:"Paginated response DTO for OraclePriceAssertions"})],_);let v=class extends f.SubmitCallDTO{validateCrossRateTokenKeys(){const e=this.crossRateToken,t=this.baseTokenCrossRate.quoteToken,r=this.quoteTokenCrossRate.quoteToken,n=this.externalCrossRateToken,i=this.baseTokenCrossRate.externalQuoteToken,a=this.quoteTokenCrossRate.externalQuoteToken;if(void 0===e&&void 0===n)throw new o.ValidationFailedError("Neither crossRateToken nor externalCrossRateToken defined on OraclePriceCrossRateAssertionDto, both undefined");if(void 0!==e&&(void 0===t||void 0===r||e.toStringKey()!==(null==t?void 0:t.toStringKey())||e.toStringKey()!==(null==r?void 0:r.toStringKey())))throw new o.ValidationFailedError(`Cross rate validation failed: baseToken cross-quoted in ${null==t?void 0:t.toStringKey()} but quoteToken cross-quoted in ${null==r?void 0:r.toStringKey()}`);if(void 0!==n&&(void 0===i||void 0===a||n.symbol!==i.symbol||n.symbol!==a.symbol))throw new o.ValidationFailedError(`Cross rate validation failed: baseToken cross-quoted in ${null==i?void 0:i.symbol} but quoteToken cross-quoted in ${null==a?void 0:a.symbol}`)}calculateCrossRate(){this.validateCrossRateTokenKeys();const e=this.quoteTokenCrossRate.exchangeRate,r=new t.default("1").dividedBy(e);return this.baseTokenCrossRate.exchangeRate.times(r)}validateCrossRate(){const e=this.calculateCrossRate();if(!this.crossRate.isEqualTo(e))throw new o.ValidationFailedError(`Asserted cross rate (${this.crossRate.toNumber()} is not equal to the calculated cross rate: ${e.toNumber()})`)}};sb.OraclePriceCrossRateAssertionDto=v,e.__decorate([(0,i.JSONSchema)({description:"Name of the oracle defined on chain."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],v.prototype,"oracle",void 0),e.__decorate([(0,i.JSONSchema)({description:"Signing identity making the assertion contained within the DTO."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],v.prototype,"identity",void 0),e.__decorate([(0,i.JSONSchema)({description:"Cross rate for First currency in the described currency pair. Unit of exchange."}),(0,n.ValidateNested)(),(0,r.Type)(()=>g),e.__metadata("design:type",g)],v.prototype,"baseTokenCrossRate",void 0),e.__decorate([(0,i.JSONSchema)({description:"Cross rate for Second token/currency in the pair. Token/Currency in which the baseToken is quoted."}),(0,n.ValidateNested)(),(0,r.Type)(()=>g),e.__metadata("design:type",g)],v.prototype,"quoteTokenCrossRate",void 0),e.__decorate([(0,i.JSONSchema)({description:"Comparative token used to price both the base and quote tokens in order to calculate an exchange cross-rate. Optional, but required if externalCrossRateToken is not provided."}),(0,n.ValidateIf)(e=>!!e.externalCrossRateToken),(0,n.ValidateNested)(),(0,r.Type)(()=>l.TokenInstanceKey),e.__metadata("design:type",l.TokenInstanceKey)],v.prototype,"crossRateToken",void 0),e.__decorate([(0,i.JSONSchema)({description:"Comparative token used to price both the base and quote tokens in order to calculate an exchange cross-rate. Optional, but required if crossRateToken is not provided."}),(0,n.ValidateIf)(e=>!!e.crossRateToken),(0,n.ValidateNested)(),(0,r.Type)(()=>s.ExternalToken),e.__metadata("design:type",s.ExternalToken)],v.prototype,"externalCrossRateToken",void 0),e.__decorate([(0,i.JSONSchema)({description:"Cross rate for baseToken and quoteToken, calculated from the crossRateToken exchange rates."}),(0,a.BigNumberProperty)(),e.__metadata("design:type",t.default)],v.prototype,"crossRate",void 0),e.__decorate([(0,r.Exclude)(),e.__metadata("design:type",Function),e.__metadata("design:paramtypes",[]),e.__metadata("design:returntype",void 0)],v.prototype,"validateCrossRateTokenKeys",null),e.__decorate([(0,r.Exclude)(),e.__metadata("design:type",Function),e.__metadata("design:paramtypes",[]),e.__metadata("design:returntype",void 0)],v.prototype,"calculateCrossRate",null),e.__decorate([(0,r.Exclude)(),e.__metadata("design:type",Function),e.__metadata("design:paramtypes",[]),e.__metadata("design:returntype",void 0)],v.prototype,"validateCrossRate",null),sb.OraclePriceCrossRateAssertionDto=v=e.__decorate([(0,i.JSONSchema)({description:"Cross Rate Exchange price assertion. E.g. compare $GALA to $ETH via price in $USD for each."})],v);class b extends f.ChainCallDTO{}sb.FetchOraclePriceCrossRateAssertionsResponse=b,b.DEFAULT_LIMIT=1e3,e.__decorate([(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>c.OraclePriceCrossRateAssertion),e.__metadata("design:type",Array)],b.prototype,"results",void 0),e.__decorate([(0,n.IsOptional)(),(0,n.IsString)(),e.__metadata("design:type",String)],b.prototype,"bookmark",void 0);class S extends f.SubmitCallDTO{}sb.DeleteOracleAssertionsDto=S,S.MAX_LIMIT=1e3,e.__decorate([(0,n.ArrayNotEmpty)(),e.__metadata("design:type",Array)],S.prototype,"chainKeys",void 0);class I extends f.SubmitCallDTO{}sb.DeleteOracleDefinitionDto=I,e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],I.prototype,"name",void 0);let N=class extends f.SubmitCallDTO{};return sb.OracleBridgeFeeAssertionDto=N,e.__decorate([(0,i.JSONSchema)({description:"Exchange Rate Price Assertion used to calculate Gas Fee"}),(0,n.IsOptional)(),(0,n.ValidateIf)(e=>!!e.galaExchangeCrossRate),(0,n.ValidateNested)(),(0,r.Type)(()=>g),e.__metadata("design:type",g)],N.prototype,"galaExchangeRate",void 0),e.__decorate([(0,i.JSONSchema)({description:"Cross-Rate Exchange Rate used to calculate Gas Fee"}),(0,n.IsOptional)(),(0,n.ValidateIf)(e=>!!e.galaExchangeRate),(0,n.ValidateNested)(),(0,r.Type)(()=>v),e.__metadata("design:type",v)],N.prototype,"galaExchangeCrossRate",void 0),e.__decorate([(0,i.JSONSchema)({description:"Rounding decimals used for estimatedTotalTxFeeInGala. Expected to match $GALA TokenClass.decimals."}),(0,n.Min)(0),(0,n.Max)(32),e.__metadata("design:type",Number)],N.prototype,"galaDecimals",void 0),e.__decorate([(0,i.JSONSchema)({description:"The token requested to bridge. Token Class used to query the estimated transaction fee units."}),(0,n.ValidateNested)(),(0,r.Type)(()=>u.TokenClassKey),e.__metadata("design:type",u.TokenClassKey)],N.prototype,"bridgeToken",void 0),e.__decorate([(0,i.JSONSchema)({description:"Set to true if the query to the bridge validator for the bridge-request token included ?nft=true. Otherwise false."}),(0,n.IsBoolean)(),e.__metadata("design:type",Boolean)],N.prototype,"bridgeTokenIsNonFungible",void 0),e.__decorate([(0,i.JSONSchema)({description:"Estimated number of gas units required for the transaction."}),(0,a.BigNumberProperty)(),e.__metadata("design:type",t.default)],N.prototype,"estimatedTxFeeUnitsTotal",void 0),e.__decorate([(0,i.JSONSchema)({description:"Estimated price per unit of gas, as retrieved approximately at the time of assertion."}),(0,a.BigNumberProperty)(),e.__metadata("design:type",t.default)],N.prototype,"estimatedPricePerTxFeeUnit",void 0),e.__decorate([(0,i.JSONSchema)({description:"The sum total of the estimated transaction fee denominated in the destinaton chain's native currency, token, or unit. The denomination used is identified in the `externalToken` property. The unit, currency, and/or token used to denominate the `estimatedTotalTxFeeInExternalToken` property is specified in the galaExchangeRate.externalQuoteToken property. This total is calculated by multiplying the `estimatedTxFeeUnitsTotal` times the `estimatedPricePerTxFeeUnit`, and then, if necessary, converting the result to the `galaExchangeRate.externalQuoteToken unit denomination.`"}),(0,a.BigNumberProperty)(),e.__metadata("design:type",t.default)],N.prototype,"estimatedTotalTxFeeInExternalToken",void 0),e.__decorate([(0,i.JSONSchema)({description:"Conversion of the estimated transaction fee calculated for the destination chain, converted to $GALA, for payment on GalaChain"}),(0,a.BigNumberProperty)(),e.__metadata("design:type",t.default)],N.prototype,"estimatedTotalTxFeeInGala",void 0),e.__decorate([(0,i.JSONSchema)({description:"Unix timestamp representing the date/time at which this assertion was calculated and/or estimated."}),(0,n.IsNumber)(),e.__metadata("design:type",Number)],N.prototype,"timestamp",void 0),e.__decorate([(0,i.JSONSchema)({description:"Oracle identity / alias. Used with signature and GalaChain SDK authorize() function for verification/validation."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],N.prototype,"signingIdentity",void 0),sb.OracleBridgeFeeAssertionDto=N=e.__decorate([(0,i.JSONSchema)({description:"Response with signed bridging fee data."})],N),sb}function bb(){if(mb)return Ze;mb=1,Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.RequestTokenBridgeOutDto=void 0;const e=Re,t=e.__importDefault(mt),r=At,n=uy,i=Ey(),o=Uv(),a=Vv(),d=ab(),s=ib(),c=vb();let u=class extends s.SubmitCallDTO{};return Ze.RequestTokenBridgeOutDto=u,e.__decorate([(0,i.JSONSchema)({description:"The type of the bridge."}),(0,o.EnumProperty)(a.ChainId),(0,n.IsNotEmpty)(),e.__metadata("design:type",Number)],u.prototype,"destinationChainId",void 0),e.__decorate([(0,i.JSONSchema)({description:`Token instance of token to be bridged out. In case of fungible tokens, tokenInstance.instance field should be set to ${d.TokenInstance.FUNGIBLE_TOKEN_INSTANCE}.`}),(0,n.ValidateNested)(),(0,r.Type)(()=>d.TokenInstanceKey),(0,n.IsNotEmpty)(),e.__metadata("design:type",d.TokenInstanceKey)],u.prototype,"tokenInstance",void 0),e.__decorate([(0,i.JSONSchema)({description:"The quantity of token units to be bridged out."}),(0,n.IsNotEmpty)(),(0,o.BigNumberIsPositive)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],u.prototype,"quantity",void 0),e.__decorate([(0,i.JSONSchema)({description:"Recipient address for destination chain"}),(0,o.IsValidChainAddress)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],u.prototype,"recipient",void 0),e.__decorate([(0,i.JSONSchema)({description:"(Experimetnal) Serialzed OracleBridgeFeeAssertionDto signed by a valid Oracle Authority. To cover the gas fee on the other side"}),(0,n.IsOptional)(),(0,n.ValidateNested)(),(0,r.Type)(()=>c.OracleBridgeFeeAssertionDto),e.__metadata("design:type",c.OracleBridgeFeeAssertionDto)],u.prototype,"destinationChainTxFee",void 0),Ze.RequestTokenBridgeOutDto=u=e.__decorate([(0,i.JSONSchema)({description:"Contains properties of bridge request, i.e. a request to bridge token out from GalaChain."})],u),Ze}var Sb,Ib={};function Nb(){return Sb||(Sb=1,Object.defineProperty(Ib,"__esModule",{value:!0})),Ib}var $b,wb={};function Ab(){if($b)return wb;$b=1,Object.defineProperty(wb,"__esModule",{value:!0}),wb.RangedChainObject=wb.InvalidRangedKeyError=void 0;const e=At,t=uy;_v();const r=Mv(),n=Zv();class i extends r.ValidationFailedError{constructor(e){super(e)}}wb.InvalidRangedKeyError=i;return wb.RangedChainObject=class o{serialize(){return(0,r.serialize)(this)}validate(){return(0,t.validate)(this)}async validateOrReject(){const e=await this.validate();if(e.length)throw new n.ObjectValidationFailedError(e)}toPlainObject(){return(0,e.instanceToPlain)(this)}static deserialize(e,t){return(0,r.deserialize)(e,t)}getRangedKey(){const t=this.__proto__.constructor.INDEX_KEY;if(void 0===t)throw new i(`getCompositeKey failed because of no INDEX_KEY on ${(0,r.serialize)(this)}`);const n=Object.getPrototypeOf(this),a=Reflect.getOwnMetadata("galachain:chainkey",n)||[],d=(0,e.instanceToPlain)(this),s=a.sort((e,t)=>e.position-t.position).map(e=>{var t,r;const n=e.key.toString();return"function"==typeof(null===(t=this[n])||void 0===t?void 0:t.toStringKey)?null===(r=this[n])||void 0===r?void 0:r.toStringKey():d[n]});return o.getRangedKeyFromParts(t,s)}static getRangedKeyFromParts(e,t){for(const e of t)if(null==e||"object"==typeof e||"function"!=typeof e.toString)throw new i(`Invalid part ${e} passed to getRangedKeyFromParts: ${t.join(", ")}`);return e+n.ChainObject.MIN_UNICODE_RUNE_VALUE+t.join(n.ChainObject.MIN_UNICODE_RUNE_VALUE)}static getStringKeyFromParts(e){return`${e.join(n.ChainObject.ID_SPLIT_CHAR)}`}},wb}var Ob,Mb={};function Tb(){if(Ob)return Mb;return Ob=1,Object.defineProperty(Mb,"__esModule",{value:!0}),Mb.createValidRangedChainObject=Mb.createValidChainObject=void 0,Mb.createValidChainObject=async function(e,t){const r=new e;return Object.entries(t).forEach(([e,t])=>{r[e]=t}),await r.validateOrReject(),r},Mb.createValidRangedChainObject=async function(e,t){const r=new e;return Object.entries(t).forEach(([e,t])=>{r[e]=t}),await r.validateOrReject(),r},Mb}var Eb,Cb={},xb={};function kb(){if(Eb)return xb;Eb=1,Object.defineProperty(xb,"__esModule",{value:!0}),xb.FeeAuthorization=void 0;const e=Re,t=mt,r=uy,n=Mv(),i=Uv(),o=Zv();let a=class extends o.ChainObject{};return xb.FeeAuthorization=a,a.INDEX_KEY="GCFA",e.__decorate([(0,n.ChainKey)({position:0}),(0,i.IsUserAlias)(),e.__metadata("design:type",String)],a.prototype,"authority",void 0),e.__decorate([(0,n.ChainKey)({position:1}),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],a.prototype,"year",void 0),e.__decorate([(0,n.ChainKey)({position:2}),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],a.prototype,"month",void 0),e.__decorate([(0,n.ChainKey)({position:3}),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],a.prototype,"day",void 0),e.__decorate([(0,n.ChainKey)({position:4}),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],a.prototype,"txId",void 0),e.__decorate([(0,r.IsNotEmpty)(),(0,i.BigNumberIsNotNegative)(),(0,i.BigNumberProperty)(),e.__metadata("design:type",t.BigNumber)],a.prototype,"quantity",void 0),xb}var Pb,Db,Rb={},Fb={};function Bb(){return Pb||(Pb=1,Object.defineProperty(Fb,"__esModule",{value:!0}),Fb.FeeReceiptStatus=void 0,function(e){e[e.Unknown=0]="Unknown",e[e.Open=1]="Open",e[e.Settled=2]="Settled"}(e||(Fb.FeeReceiptStatus=e={}))),Fb;var e}function Lb(){if(Db)return Rb;Db=1,Object.defineProperty(Rb,"__esModule",{value:!0}),Rb.FeeBalanceCreditReceipt=void 0;const e=Re,t=mt,r=uy,n=Mv(),i=Uv(),o=Zv(),a=Bb();let d=class extends o.ChainObject{};return Rb.FeeBalanceCreditReceipt=d,d.INDEX_KEY="GCCR",e.__decorate([(0,n.ChainKey)({position:0}),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],d.prototype,"year",void 0),e.__decorate([(0,n.ChainKey)({position:1}),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],d.prototype,"month",void 0),e.__decorate([(0,n.ChainKey)({position:2}),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],d.prototype,"day",void 0),e.__decorate([(0,n.ChainKey)({position:3}),(0,r.IsString)(),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],d.prototype,"hours",void 0),e.__decorate([(0,n.ChainKey)({position:4}),(0,r.IsString)(),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],d.prototype,"minutes",void 0),e.__decorate([(0,n.ChainKey)({position:5}),(0,r.IsString)(),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],d.prototype,"seconds",void 0),e.__decorate([(0,n.ChainKey)({position:6}),(0,i.IsUserAlias)(),e.__metadata("design:type",String)],d.prototype,"creditToUser",void 0),e.__decorate([(0,n.ChainKey)({position:7}),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],d.prototype,"txId",void 0),e.__decorate([(0,r.IsNotEmpty)(),(0,i.BigNumberIsNotNegative)(),(0,i.BigNumberProperty)(),e.__metadata("design:type",t.BigNumber)],d.prototype,"quantity",void 0),e.__decorate([(0,i.EnumProperty)(a.FeeReceiptStatus),e.__metadata("design:type",Number)],d.prototype,"status",void 0),Rb}var Ub,Kb={};function jb(){if(Ub)return Kb;Ub=1,Object.defineProperty(Kb,"__esModule",{value:!0}),Kb.FeeChannelPaymentReceipt=void 0;const e=Re,t=mt,r=uy,n=Mv(),i=Uv(),o=Zv(),a=Bb();let d=class extends o.ChainObject{};return Kb.FeeChannelPaymentReceipt=d,d.INDEX_KEY="GCFR",e.__decorate([(0,n.ChainKey)({position:0}),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],d.prototype,"year",void 0),e.__decorate([(0,n.ChainKey)({position:1}),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],d.prototype,"month",void 0),e.__decorate([(0,n.ChainKey)({position:2}),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],d.prototype,"day",void 0),e.__decorate([(0,n.ChainKey)({position:3}),(0,r.IsString)(),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],d.prototype,"feeCode",void 0),e.__decorate([(0,n.ChainKey)({position:4}),(0,i.IsUserAlias)(),e.__metadata("design:type",String)],d.prototype,"paidByUser",void 0),e.__decorate([(0,n.ChainKey)({position:5}),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],d.prototype,"txId",void 0),e.__decorate([(0,r.IsNotEmpty)(),(0,i.BigNumberIsNotNegative)(),(0,i.BigNumberProperty)(),e.__metadata("design:type",t.BigNumber)],d.prototype,"quantity",void 0),e.__decorate([(0,i.EnumProperty)(a.FeeReceiptStatus),e.__metadata("design:type",Number)],d.prototype,"status",void 0),Kb}var Vb,Jb={};function qb(){if(Vb)return Jb;Vb=1,Object.defineProperty(Jb,"__esModule",{value:!0}),Jb.FeeCodeDefinition=Jb.FeeAccelerationRateType=void 0;const e=Re,t=mt,r=uy,n=Mv(),i=Uv(),o=Zv();var a;!function(e){e[e.CuratorDefined=0]="CuratorDefined",e[e.Additive=1]="Additive",e[e.Multiplicative=2]="Multiplicative",e[e.Exponential=3]="Exponential",e[e.Logarithmic=4]="Logarithmic",e[e.Custom=5]="Custom"}(a||(Jb.FeeAccelerationRateType=a={}));let d=class extends o.ChainObject{};return Jb.FeeCodeDefinition=d,d.INDEX_KEY="GCFD",d.DECIMAL_PRECISION=8,e.__decorate([(0,n.ChainKey)({position:0}),(0,r.IsString)(),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],d.prototype,"feeCode",void 0),e.__decorate([(0,n.ChainKey)({position:1}),(0,i.BigNumberIsNotNegative)(),(0,i.BigNumberIsInteger)(),(0,i.BigNumberProperty)(),e.__metadata("design:type",t.BigNumber)],d.prototype,"feeThresholdUses",void 0),e.__decorate([(0,r.IsNumber)(),e.__metadata("design:type",Number)],d.prototype,"feeThresholdTimePeriod",void 0),e.__decorate([(0,i.BigNumberIsNotNegative)(),(0,i.BigNumberProperty)(),e.__metadata("design:type",t.BigNumber)],d.prototype,"baseQuantity",void 0),e.__decorate([(0,i.BigNumberIsNotNegative)(),(0,i.BigNumberProperty)(),e.__metadata("design:type",t.BigNumber)],d.prototype,"maxQuantity",void 0),e.__decorate([(0,r.IsOptional)(),(0,i.BigNumberIsNotNegative)(),(0,i.BigNumberProperty)(),e.__metadata("design:type",t.BigNumber)],d.prototype,"maxUses",void 0),e.__decorate([(0,i.EnumProperty)(a),e.__metadata("design:type",Number)],d.prototype,"feeAccelerationRateType",void 0),e.__decorate([(0,i.BigNumberProperty)(),e.__metadata("design:type",t.BigNumber)],d.prototype,"feeAccelerationRate",void 0),e.__decorate([(0,r.IsOptional)(),(0,r.IsBoolean)(),e.__metadata("design:type",Boolean)],d.prototype,"isCrossChannel",void 0),Jb}var Gb,zb={};function Hb(){if(Gb)return zb;Gb=1,Object.defineProperty(zb,"__esModule",{value:!0}),zb.FeeCodeSplitFormula=zb.FeeCodeTransferQuantity=zb.FeeCodeTransferPercentage=void 0;const e=Re,t=mt,r=At,n=uy,i=Ey(),o=Mv(),a=Mv(),d=Uv(),s=Zv();let c=class extends s.ChainObject{};zb.FeeCodeTransferPercentage=c,e.__decorate([(0,i.JSONSchema)({description:"User identity / GalaChain address representing the address to which this portion of the fee should be transferred."}),(0,d.IsUserAlias)(),e.__metadata("design:type",String)],c.prototype,"transferToUser",void 0),e.__decorate([(0,i.JSONSchema)({description:"A number between 0 and 1 that represents the percentage / proportion of the total fee which should be transferred to the accompany user identity / address. e.g 0.1 for '10%'. "}),(0,n.IsNumber)(),(0,n.Min)(0),(0,n.Max)(1),e.__metadata("design:type",Number)],c.prototype,"transferPercentage",void 0),zb.FeeCodeTransferPercentage=c=e.__decorate([(0,i.JSONSchema)({description:"Define an address/identity to which a percentage of Fees should be transferred."})],c);class u extends s.ChainObject{}zb.FeeCodeTransferQuantity=u,e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],u.prototype,"transferToUser",void 0),e.__decorate([(0,n.IsNumber)(),(0,n.Min)(0),(0,n.Max)(1),e.__metadata("design:type",Number)],u.prototype,"transferPercentage",void 0),e.__decorate([(0,d.IsBigNumber)(),(0,d.BigNumberIsPositive)(),e.__metadata("design:type",t.BigNumber)],u.prototype,"transferQuantity",void 0);let l=class extends s.ChainObject{calculateAmounts(e,t){const n=this.burnPercentage,i=this.transferPercentages,o=[];let a=e.decimalPlaces(t);for(let d=0;d<i.length;d++){let s;0===n&&d+1===i.length?s=a.decimalPlaces(t):(s=e.times(i[d].transferPercentage).decimalPlaces(t),a=a.minus(s));const c=(0,r.plainToInstance)(u,{transferToUser:i[d].transferToUser,transferPercentage:i[d].transferPercentage,transferQuantity:s});o.push(c)}return[a,o]}async validatePercentages(){let e=this.burnPercentage;const t=[];for(const r of this.transferPercentages)e+=r.transferPercentage,t.push(r.transferPercentage);if(1!==e)throw new a.ValidationFailedError(`FeeCodeSplitFormula's burnPercentage and transferPercentages must add up to exactly 1.0. Calculated ${e} from burnPercentage ${this.burnPercentage} and transferPercentages ${t.join(",")}`);return this}};return zb.FeeCodeSplitFormula=l,l.INDEX_KEY="GCFS",e.__decorate([(0,o.ChainKey)({position:0}),(0,n.IsString)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],l.prototype,"feeCode",void 0),e.__decorate([(0,n.IsNumber)(),(0,n.Min)(0),(0,n.Max)(1),e.__metadata("design:type",Number)],l.prototype,"burnPercentage",void 0),e.__decorate([(0,n.ArrayMinSize)(0),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>c),e.__metadata("design:type",Array)],l.prototype,"transferPercentages",void 0),e.__decorate([(0,r.Exclude)(),e.__metadata("design:type",Function),e.__metadata("design:paramtypes",[t.BigNumber,Number]),e.__metadata("design:returntype",Array)],l.prototype,"calculateAmounts",null),e.__decorate([(0,r.Exclude)(),e.__metadata("design:type",Function),e.__metadata("design:paramtypes",[]),e.__metadata("design:returntype",Promise)],l.prototype,"validatePercentages",null),zb}var Zb,Wb={};function Yb(){if(Zb)return Wb;Zb=1,Object.defineProperty(Wb,"__esModule",{value:!0}),Wb.FeePendingBalance=void 0;const e=Re,t=mt,r=uy,n=Mv(),i=Uv(),o=Zv();let a=class extends o.ChainObject{};return Wb.FeePendingBalance=a,a.INDEX_KEY="GCFB",e.__decorate([(0,n.ChainKey)({position:0}),(0,i.IsUserAlias)(),e.__metadata("design:type",String)],a.prototype,"owner",void 0),e.__decorate([(0,r.IsNotEmpty)(),(0,i.BigNumberIsNotNegative)(),(0,i.BigNumberProperty)(),e.__metadata("design:type",t.BigNumber)],a.prototype,"quantity",void 0),Wb}var Xb,Qb,eS={};function tS(){if(Xb)return eS;Xb=1,Object.defineProperty(eS,"__esModule",{value:!0}),eS.FeeThresholdUses=void 0;const e=Re,t=mt,r=uy,n=Mv(),i=Uv(),o=Zv();let a=class extends o.ChainObject{};return eS.FeeThresholdUses=a,a.INDEX_KEY="GCFTU",e.__decorate([(0,n.ChainKey)({position:0}),(0,r.IsString)(),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],a.prototype,"feeCode",void 0),e.__decorate([(0,n.ChainKey)({position:1}),(0,i.IsUserAlias)(),e.__metadata("design:type",String)],a.prototype,"user",void 0),e.__decorate([(0,i.BigNumberIsNotNegative)(),(0,i.BigNumberIsInteger)(),(0,i.BigNumberProperty)(),e.__metadata("design:type",t.BigNumber)],a.prototype,"cumulativeUses",void 0),e.__decorate([(0,i.BigNumberIsNotNegative)(),(0,i.BigNumberProperty)(),e.__metadata("design:type",t.BigNumber)],a.prototype,"cumulativeFeeQuantity",void 0),eS}function rS(){if(Qb)return Cb;Qb=1,Object.defineProperty(Cb,"__esModule",{value:!0}),Cb.FeeExemptionDto=Cb.SettleFeePaymentReceiptsResponse=Cb.SettleFeeCreditReceiptsResponse=Cb.SettleFeeBalancesResponse=Cb.FeeBalanceSettlement=Cb.FetchChainKeyValueObjectsWithPaginationResponse=Cb.ChainKeyValueResult=Cb.ChainKeysDto=Cb.FetchFeeThresholdUsesWithPaginationResponse=Cb.FeeThresholdUsesKeyValueResult=Cb.FetchFeeThresholdUsesWithPaginationDto=Cb.FetchFeeThresholdUsesResDto=Cb.FetchFeeThresholdUsesDto=Cb.FeeVerificationDto=Cb.FeeCodeSplitFormulaDto=Cb.FeeCodeDefinitionDto=Cb.FeeBalanceSettlementDto=Cb.FetchFeePendingBalancesResDto=Cb.FeePendingBalanceKeyValueResult=Cb.FetchFeePendingBalancesDto=Cb.FetchFeeScheduleResDto=Cb.FetchFeeScheduleDto=Cb.FetchFeeCreditReceiptsResponse=Cb.FeeCreditReceiptKeyValueResult=Cb.FetchFeeCreditReceiptsDto=Cb.FetchFeeChannelPaymentsResDto=Cb.FeeChannelPaymentKeyValueResult=Cb.FetchFeeChannelPaymentsDto=Cb.FetchFeeAuthorizationsResDto=Cb.FetchFeeAuthorizationsDto=Cb.FeeAuthorizationResDto=Cb.FeeAuthorizationDto=Cb.FetchFeePropertiesDto=Cb.FeePropertiesDto=void 0;const e=Re,t=e.__importDefault(mt),r=At,n=uy,i=Ey(),o=Uv(),a=Zv(),d=kb(),s=Lb(),c=jb(),u=qb(),l=Hb(),f=Yb(),p=tS(),h=ib();let y=class extends h.ChainCallDTO{};Cb.FeePropertiesDto=y,e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],y.prototype,"collection",void 0),e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],y.prototype,"category",void 0),e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],y.prototype,"type",void 0),e.__decorate([(0,n.IsDefined)(),e.__metadata("design:type",String)],y.prototype,"additionalKey",void 0),e.__decorate([(0,n.IsNotEmpty)(),(0,o.BigNumberIsInteger)(),(0,o.BigNumberIsNotNegative)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],y.prototype,"instance",void 0),e.__decorate([(0,i.JSONSchema)({description:"Unique key of the DTO. It is used to prevent double execution of the same transaction on chain. The key is saved on chain and checked before execution. If a DTO with already saved key is used in transaction, the transaction will fail with UniqueTransactionConflict error, which is mapped to HTTP 409 Conflict error. In case of the error, no changes are saved to chain state.\nThe key is generated by the caller and should be unique for each DTO. You can use `nanoid` library, UUID scheme, or any tool to generate unique string keys."}),(0,n.IsNotEmpty)(),(0,n.IsOptional)(),e.__metadata("design:type",String)],y.prototype,"uniqueKey",void 0),Cb.FeePropertiesDto=y=e.__decorate([(0,i.JSONSchema)({description:"Configure GALA token properties on chain for use with supporting chaincalls."})],y);let m=class extends h.ChainCallDTO{};Cb.FetchFeePropertiesDto=m,Cb.FetchFeePropertiesDto=m=e.__decorate([(0,i.JSONSchema)({description:"Empty DTO object for Read-only chaincode execution."})],m);let g=class extends h.SubmitCallDTO{};Cb.FeeAuthorizationDto=g,e.__decorate([(0,i.JSONSchema)({description:"A user authorizing a GalaChainFee payment."}),(0,o.IsUserRef)(),e.__metadata("design:type",String)],g.prototype,"authority",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token Quantity authorized with this fee."}),(0,n.IsNotEmpty)(),(0,o.BigNumberIsNotNegative)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],g.prototype,"quantity",void 0),Cb.FeeAuthorizationDto=g=e.__decorate([(0,i.JSONSchema)({description:"Fee Authorization DTO. End users can authorize a Burn of $GALA to credit their fee balance on another channel."})],g);let _=class extends h.ChainCallDTO{};Cb.FeeAuthorizationResDto=_,e.__decorate([(0,i.JSONSchema)({description:"A serialized FeeAuthorizationDto signed by the authorizing / spending user."}),e.__metadata("design:type",String)],_.prototype,"authorization",void 0),e.__decorate([(0,i.JSONSchema)({description:"The user that authorized the GalaChainFee payment."}),(0,o.IsUserAlias)(),e.__metadata("design:type",String)],_.prototype,"authority",void 0),e.__decorate([(0,i.JSONSchema)({description:"Unix Timestamp of fee authorization chain object creation."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",Number)],_.prototype,"created",void 0),e.__decorate([(0,i.JSONSchema)({description:"Transaction ID where authorization was granted for fee spend."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],_.prototype,"txId",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token Quantity authorized with this fee."}),(0,n.IsNotEmpty)(),(0,o.BigNumberIsNotNegative)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],_.prototype,"quantity",void 0),e.__decorate([(0,i.JSONSchema)({description:"Chain Key of the Fee Authorization Chain Object newly saved in World State."}),(0,n.IsString)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],_.prototype,"feeAuthorizationKey",void 0),Cb.FeeAuthorizationResDto=_=e.__decorate([(0,i.JSONSchema)({description:"Fee Authorization Response DTO. Data transfer object representing a successful transaction response to a FeeAuthorization."})],_);let v=class extends h.ChainCallDTO{};Cb.FetchFeeAuthorizationsDto=v,e.__decorate([(0,i.JSONSchema)({description:"Owner of the token burned to authorize a fee balance credit on another channel."}),(0,n.IsOptional)(),(0,o.IsUserRef)(),e.__metadata("design:type",String)],v.prototype,"authority",void 0),e.__decorate([(0,i.JSONSchema)({description:"Year from timestamp of authorizaiton. Chain Key used for partial querying. String in YYYY format."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],v.prototype,"year",void 0),e.__decorate([(0,i.JSONSchema)({description:"Month from timestamp of authorizaiton. Chain Key used for partial querying. String in MM format."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],v.prototype,"month",void 0),e.__decorate([(0,i.JSONSchema)({description:"Day from timestamp of authorizaiton. Chain Key used for partial querying. String in DD format."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],v.prototype,"day",void 0),e.__decorate([(0,i.JSONSchema)({description:"Hour from timestamp of authorizaiton. Chain Key used for partial querying. String in HH format."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],v.prototype,"hours",void 0),e.__decorate([(0,i.JSONSchema)({description:"Minutes from timestamp of authorizaiton. Chain Key used for partial querying. String in mm format."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],v.prototype,"minutes",void 0),e.__decorate([(0,i.JSONSchema)({description:"feeCode identifier for which this fee was authorized. Chain key used for specific querying."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],v.prototype,"feeCode",void 0),e.__decorate([(0,i.JSONSchema)({description:"Transaction ID where authorization was written. Chain key used for specific querying."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],v.prototype,"txId",void 0),e.__decorate([(0,i.JSONSchema)({description:"Bookmark for pagination queries of large result sets. Used to mark place for subsequent pages of results."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],v.prototype,"bookmark",void 0),e.__decorate([(0,i.JSONSchema)({description:"Limit number of results. Useful for pagination queries."}),(0,n.IsOptional)(),(0,n.IsNumber)(),e.__metadata("design:type",Number)],v.prototype,"limit",void 0),Cb.FetchFeeAuthorizationsDto=v=e.__decorate([(0,i.JSONSchema)({description:"Fetch Fee Authorizations previously written to chain. Optional properties can be added to narrow the search result set."})],v);let b=class extends h.ChainCallDTO{};Cb.FetchFeeAuthorizationsResDto=b,e.__decorate([(0,i.JSONSchema)({description:"List of fee authorizations."}),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>d.FeeAuthorization),e.__metadata("design:type",Array)],b.prototype,"results",void 0),e.__decorate([(0,i.JSONSchema)({description:"Next page bookmark for large result sets."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],b.prototype,"nextPageBookmark",void 0),Cb.FetchFeeAuthorizationsResDto=b=e.__decorate([(0,i.JSONSchema)({description:"Response DTO from a successful FetchFeeAuthorizations query."})],b);let S=class extends h.ChainCallDTO{};Cb.FetchFeeChannelPaymentsDto=S,e.__decorate([(0,i.JSONSchema)({description:"Year from timestamp of authorizaiton. Chain Key used for partial querying. String in YYYY format."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],S.prototype,"year",void 0),e.__decorate([(0,i.JSONSchema)({description:"Month from timestamp of authorizaiton. Chain Key used for partial querying. String in MM format."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],S.prototype,"month",void 0),e.__decorate([(0,i.JSONSchema)({description:"Day from timestamp of authorizaiton. Chain Key used for partial querying. String in DD format."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],S.prototype,"day",void 0),e.__decorate([(0,i.JSONSchema)({description:"Hour from timestamp of authorizaiton. Chain Key used for partial querying. String in HH format."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],S.prototype,"hours",void 0),e.__decorate([(0,i.JSONSchema)({description:"Minutes from timestamp of authorizaiton. Chain Key used for partial querying. String in mm format."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],S.prototype,"minutes",void 0),e.__decorate([(0,i.JSONSchema)({description:"feeCode identifier for which this fee was paid. Chain key used for specific querying."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],S.prototype,"feeCode",void 0),e.__decorate([(0,i.JSONSchema)({description:"Owner of the token burned to authorize a fee balance credit on another channel."}),(0,n.IsOptional)(),(0,o.IsUserRef)(),e.__metadata("design:type",String)],S.prototype,"paidByUser",void 0),e.__decorate([(0,i.JSONSchema)({description:"Transaction ID where authorization was written. Chain key used for specific querying."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],S.prototype,"txId",void 0),e.__decorate([(0,i.JSONSchema)({description:"Bookmark for pagination queries of large result sets. Used to mark place for subsequent pages of results."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],S.prototype,"bookmark",void 0),e.__decorate([(0,i.JSONSchema)({description:"Limit number of results. Useful for pagination queries."}),(0,n.IsOptional)(),(0,n.IsNumber)(),e.__metadata("design:type",Number)],S.prototype,"limit",void 0),Cb.FetchFeeChannelPaymentsDto=S=e.__decorate([(0,i.JSONSchema)({description:"Fetch fee receipts."})],S);let I=class extends h.ChainCallDTO{};Cb.FeeChannelPaymentKeyValueResult=I,e.__decorate([(0,i.JSONSchema)({description:"Chain key identifying object on chain."}),e.__metadata("design:type",String)],I.prototype,"key",void 0),e.__decorate([(0,i.JSONSchema)({description:"Chain key identifying object on chain."}),(0,n.ValidateNested)(),(0,r.Type)(()=>c.FeeChannelPaymentReceipt),e.__metadata("design:type",c.FeeChannelPaymentReceipt)],I.prototype,"value",void 0),Cb.FeeChannelPaymentKeyValueResult=I=e.__decorate([(0,i.JSONSchema)({description:"FeeChannelPayment Object Value with Chain Key."})],I);let N=class extends h.ChainCallDTO{};Cb.FetchFeeChannelPaymentsResDto=N,e.__decorate([(0,i.JSONSchema)({description:"List of fee payment receipts."}),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>I),e.__metadata("design:type",Array)],N.prototype,"results",void 0),e.__decorate([(0,i.JSONSchema)({description:"Next page bookmark."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],N.prototype,"nextPageBookmark",void 0),Cb.FetchFeeChannelPaymentsResDto=N=e.__decorate([(0,i.JSONSchema)({description:"Response DTO from a successful FetchFeeChannelPayments request."})],N);let $=class extends h.ChainCallDTO{};Cb.FetchFeeCreditReceiptsDto=$,e.__decorate([(0,i.JSONSchema)({description:"Year from timestamp of authorizaiton. Chain Key used for partial querying. String in YYYY format."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],$.prototype,"year",void 0),e.__decorate([(0,i.JSONSchema)({description:"Month from timestamp of authorizaiton. Chain Key used for partial querying. String in MM format."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],$.prototype,"month",void 0),e.__decorate([(0,i.JSONSchema)({description:"Day from timestamp of authorizaiton. Chain Key used for partial querying. String in DD format."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],$.prototype,"day",void 0),e.__decorate([(0,i.JSONSchema)({description:"Hour from timestamp of authorizaiton. Chain Key used for partial querying. String in HH format."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],$.prototype,"hours",void 0),e.__decorate([(0,i.JSONSchema)({description:"Minutes from timestamp of receipt creation. Chain Key used for partial querying. String in mm format."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],$.prototype,"minutes",void 0),e.__decorate([(0,i.JSONSchema)({description:"feeCode identifier for which this receipt. Chain key used for specific querying."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],$.prototype,"feeCode",void 0),e.__decorate([(0,i.JSONSchema)({description:"Receipt issued to user."}),(0,n.IsOptional)(),(0,o.IsUserRef)(),e.__metadata("design:type",String)],$.prototype,"creditToUser",void 0),e.__decorate([(0,i.JSONSchema)({description:"Transaction ID where receipt was written. Chain key used for specific querying."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],$.prototype,"txId",void 0),e.__decorate([(0,i.JSONSchema)({description:"Bookmark for pagination queries of large result sets. Used to mark place for subsequent pages of results."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],$.prototype,"bookmark",void 0),e.__decorate([(0,i.JSONSchema)({description:"Limit number of results. Useful for pagination queries."}),(0,n.IsOptional)(),(0,n.IsNumber)(),e.__metadata("design:type",Number)],$.prototype,"limit",void 0),Cb.FetchFeeCreditReceiptsDto=$=e.__decorate([(0,i.JSONSchema)({description:"Fetch fee receipts."})],$);let w=class extends h.ChainCallDTO{};Cb.FeeCreditReceiptKeyValueResult=w,e.__decorate([(0,i.JSONSchema)({description:"Chain key identifying object on chain."}),e.__metadata("design:type",String)],w.prototype,"key",void 0),e.__decorate([(0,i.JSONSchema)({description:"Chain key identifying object on chain."}),(0,n.ValidateNested)(),(0,r.Type)(()=>c.FeeChannelPaymentReceipt),e.__metadata("design:type",s.FeeBalanceCreditReceipt)],w.prototype,"value",void 0),Cb.FeeCreditReceiptKeyValueResult=w=e.__decorate([(0,i.JSONSchema)({description:"FeeBalanceCreditReceipt Object Value with Chain Key."})],w);let A=class extends h.ChainCallDTO{};Cb.FetchFeeCreditReceiptsResponse=A,e.__decorate([(0,i.JSONSchema)({description:"List of fee payment receipts."}),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>w),e.__metadata("design:type",Array)],A.prototype,"results",void 0),e.__decorate([(0,i.JSONSchema)({description:"Next page bookmark."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],A.prototype,"nextPageBookmark",void 0),Cb.FetchFeeCreditReceiptsResponse=A=e.__decorate([(0,i.JSONSchema)({description:"Response DTO from a successful FetchFeeCreditReceipts request."})],A);let O=class extends h.ChainCallDTO{};Cb.FetchFeeScheduleDto=O,e.__decorate([(0,i.JSONSchema)({description:"Limit query to a specific fee code."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],O.prototype,"feeCode",void 0),Cb.FetchFeeScheduleDto=O=e.__decorate([(0,i.JSONSchema)({description:"Query channel for Transaction FeeSchedule, comprised of currently-defined FeeCodes."})],O);let M=class extends h.ChainCallDTO{};Cb.FetchFeeScheduleResDto=M,e.__decorate([(0,i.JSONSchema)({description:"List of fee code definitions."}),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>u.FeeCodeDefinition),e.__metadata("design:type",Array)],M.prototype,"results",void 0),e.__decorate([(0,i.JSONSchema)({description:"Next page bookmark"}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],M.prototype,"nextPageBookmark",void 0),Cb.FetchFeeScheduleResDto=M=e.__decorate([(0,i.JSONSchema)({description:"Response DTO from a successful FetchFeeSchedule request."})],M);let T=class extends h.ChainCallDTO{};Cb.FetchFeePendingBalancesDto=T,e.__decorate([(0,i.JSONSchema)({description:"(optional) Limit results to a single owner."}),(0,n.IsOptional)(),(0,o.IsUserRef)(),e.__metadata("design:type",String)],T.prototype,"owner",void 0),e.__decorate([(0,i.JSONSchema)({description:"Bookmark for pagination queries of large result sets. Used to mark place for subsequent pages of results."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],T.prototype,"bookmark",void 0),e.__decorate([(0,i.JSONSchema)({description:"Limit number of results. Useful for pagination queries."}),(0,n.IsOptional)(),(0,n.IsNumber)(),e.__metadata("design:type",Number)],T.prototype,"limit",void 0),Cb.FetchFeePendingBalancesDto=T=e.__decorate([(0,i.JSONSchema)({description:"Fetch Pending Fee Balances. Optionally limit query to a single user. "})],T);let E=class extends h.ChainCallDTO{};Cb.FeePendingBalanceKeyValueResult=E,e.__decorate([(0,i.JSONSchema)({description:"Chain key identifying object on chain."}),e.__metadata("design:type",String)],E.prototype,"key",void 0),e.__decorate([(0,i.JSONSchema)({description:"Chain key identifying object on chain."}),(0,n.ValidateNested)(),(0,r.Type)(()=>f.FeePendingBalance),e.__metadata("design:type",f.FeePendingBalance)],E.prototype,"value",void 0),Cb.FeePendingBalanceKeyValueResult=E=e.__decorate([(0,i.JSONSchema)({description:"FeeChannelPayment Object Value with Chain Key."})],E);let C=class extends h.ChainCallDTO{};Cb.FetchFeePendingBalancesResDto=C,e.__decorate([(0,i.JSONSchema)({description:"List of fee pending balances."}),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>E),e.__metadata("design:type",Array)],C.prototype,"results",void 0),e.__decorate([(0,i.JSONSchema)({description:"Next page bookmark."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],C.prototype,"nextPageBookmark",void 0),Cb.FetchFeePendingBalancesResDto=C=e.__decorate([(0,i.JSONSchema)({description:"Response DTO from a successful FetchFeePendingBalances request."})],C);let x=class extends h.ChainCallDTO{};Cb.FeeBalanceSettlementDto=x,e.__decorate([(0,i.JSONSchema)({description:"Limit query/action time range. Start date as a unix timestamp. (optional)"}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",Number)],x.prototype,"startDate",void 0),e.__decorate([(0,i.JSONSchema)({description:"Limit query/action time range. End date as a unix timestamp. (optional)"}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",Number)],x.prototype,"endDate",void 0),e.__decorate([(0,i.JSONSchema)({description:"Limit query/action to a single user. (optional)"}),(0,n.IsOptional)(),(0,o.IsUserRef)(),e.__metadata("design:type",String)],x.prototype,"owner",void 0),Cb.FeeBalanceSettlementDto=x=e.__decorate([(0,i.JSONSchema)({description:"Settle pending fee balances. Zero out balances and convert any pending amount to a claim/credit for $GALA."})],x);let k=class extends h.SubmitCallDTO{};Cb.FeeCodeDefinitionDto=k,e.__decorate([(0,n.IsString)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],k.prototype,"feeCode",void 0),e.__decorate([(0,n.IsNotEmpty)(),(0,o.BigNumberIsNotNegative)(),(0,o.BigNumberIsInteger)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],k.prototype,"feeThresholdUses",void 0),e.__decorate([(0,n.IsNumber)(),e.__metadata("design:type",Number)],k.prototype,"feeThresholdTimePeriod",void 0),e.__decorate([(0,n.IsNotEmpty)(),(0,o.BigNumberIsNotNegative)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],k.prototype,"baseQuantity",void 0),e.__decorate([(0,n.IsNotEmpty)(),(0,o.BigNumberIsNotNegative)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],k.prototype,"maxQuantity",void 0),e.__decorate([(0,i.JSONSchema)({description:"Type of FeeAccelerationRate."}),(0,o.EnumProperty)(u.FeeAccelerationRateType),e.__metadata("design:type",Number)],k.prototype,"feeAccelerationRateType",void 0),e.__decorate([(0,n.IsNotEmpty)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],k.prototype,"feeAccelerationRate",void 0),e.__decorate([(0,i.JSONSchema)({description:"(Optional) Set to 'true' to debit fees from cross-channel pending balances. Set 'true' if $GALA is not defined on this channel. Set to 'false' or leave undefined for fees assessed on the assets channel where users maintain their $GALA balances."}),(0,n.IsOptional)(),(0,n.IsBoolean)(),e.__metadata("design:type",Boolean)],k.prototype,"isCrossChannel",void 0),Cb.FeeCodeDefinitionDto=k=e.__decorate([(0,i.JSONSchema)({description:"Define a Fee Rate Schedule for a Fee Code."})],k);let P=class extends h.SubmitCallDTO{};Cb.FeeCodeSplitFormulaDto=P,e.__decorate([(0,i.JSONSchema)({description:"feeCode which this split formula should apply to. If the FeeCodeDefinition object does not exist on chain yet, the chaincode will throw an error. Be sure to define a FeeCodeDefinition before attempting to define a split formula."}),(0,n.IsString)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],P.prototype,"feeCode",void 0),e.__decorate([(0,i.JSONSchema)({description:"A number between 0 and 1 that represents the percentage / proportion of the total fee which should be burned. e.g 0.9 for '90%'. "}),(0,n.IsNumber)(),(0,n.Min)(0),(0,n.Max)(1),e.__metadata("design:type",Number)],P.prototype,"burnPercentage",void 0),e.__decorate([(0,i.JSONSchema)({description:"FeeCodeTransferPercentage objects represent the identity or identities to which a percentage (or percentages) of the paid fee should be transferred to instead of being burned."}),(0,n.ArrayMinSize)(0),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>l.FeeCodeTransferPercentage),e.__metadata("design:type",Array)],P.prototype,"transferPercentages",void 0),Cb.FeeCodeSplitFormulaDto=P=e.__decorate([(0,i.JSONSchema)({description:"Define a Formula for a Fee Code that splits the Fee between a burn percentage and one or more transfer addresses/identities, e.g. locked pools used for rewards or redemption"})],P);let D=class extends h.SubmitCallDTO{};Cb.FeeVerificationDto=D,e.__decorate([(0,i.JSONSchema)({description:"A serialized FeeAuthorizationDto signed by the authorizing / spending user."}),e.__metadata("design:type",String)],D.prototype,"authorization",void 0),e.__decorate([(0,i.JSONSchema)({description:"The user authorizing a GalaChainFee payment. Expected to be the same user which signed the DTO provided in the `authorization` property."}),(0,o.IsUserRef)(),e.__metadata("design:type",String)],D.prototype,"authority",void 0),e.__decorate([(0,i.JSONSchema)({description:"Unix Timestamp of fee authorization chain object creation."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",Number)],D.prototype,"created",void 0),e.__decorate([(0,i.JSONSchema)({description:"Transaction ID where authorization was granted for fee spend."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],D.prototype,"txId",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token Quantity authorized with this fee."}),(0,n.IsNotEmpty)(),(0,o.BigNumberIsNotNegative)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],D.prototype,"quantity",void 0),e.__decorate([(0,i.JSONSchema)({description:"Chain Key referencing Fee Authorization Chain Object saved in World State."}),(0,n.IsString)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],D.prototype,"feeAuthorizationKey",void 0),Cb.FeeVerificationDto=D=e.__decorate([(0,i.JSONSchema)({description:"Fee Verification DTO. With a valid signature from an Authoritative User, used to verify that a Fee was paid across channels. Typically, this will be a type of multi-signature DTO or a double signed DTO. That is, the `authorization` property contains the original authorization DTO signed by the End User. And the overall FeeVerificationDto will be signed by an Authoritative/Administrative user (i.e. a CuratorUser). The Chaincode can then verify definitively that both a) the end user did authorize a spend, and b) the Authoritative/Administrative user confirms that this authorization was successfully approved/written/burned on the assets channel."})],D);let R=class extends h.ChainCallDTO{};Cb.FetchFeeThresholdUsesDto=R,e.__decorate([(0,i.JSONSchema)({description:"feeCode identifier for which this fee was paid."}),(0,n.IsString)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],R.prototype,"feeCode",void 0),e.__decorate([(0,i.JSONSchema)({description:"user who paid this fee."}),(0,n.IsString)(),(0,o.IsUserRef)(),e.__metadata("design:type",String)],R.prototype,"user",void 0),Cb.FetchFeeThresholdUsesDto=R=e.__decorate([(0,i.JSONSchema)({description:"Fetch Fee Threshold Uses for a Fee Code and User."})],R);let F=class extends h.ChainCallDTO{};Cb.FetchFeeThresholdUsesResDto=F,e.__decorate([(0,i.JSONSchema)({description:"feeCode identifier for which this fee was paid."}),(0,n.IsString)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],F.prototype,"feeCode",void 0),e.__decorate([(0,i.JSONSchema)({description:"user who paid this fee."}),(0,n.IsString)(),(0,o.IsUserRef)(),e.__metadata("design:type",String)],F.prototype,"user",void 0),e.__decorate([(0,i.JSONSchema)({description:"total cumulative uses of this fee."}),(0,n.IsNotEmpty)(),(0,o.BigNumberIsNotNegative)(),(0,o.BigNumberIsInteger)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],F.prototype,"cumulativeUses",void 0),e.__decorate([(0,i.JSONSchema)({description:"total cumulative quantity of this fee."}),(0,n.IsNotEmpty)(),(0,o.BigNumberIsNotNegative)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],F.prototype,"cumulativeFeeQuantity",void 0),Cb.FetchFeeThresholdUsesResDto=F=e.__decorate([(0,i.JSONSchema)({description:"Response DTO from a successful FetchFeeThresholdUses request."})],F);let B=class extends h.ChainCallDTO{};Cb.FetchFeeThresholdUsesWithPaginationDto=B,e.__decorate([(0,i.JSONSchema)({description:"feeCode identifier to limit search results."}),(0,n.IsOptional)(),(0,n.IsString)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],B.prototype,"feeCode",void 0),e.__decorate([(0,i.JSONSchema)({description:"Next page bookmark."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],B.prototype,"bookmark",void 0),e.__decorate([(0,i.JSONSchema)({description:"Limit number of results. Useful for pagination queries."}),(0,n.IsOptional)(),(0,n.IsNumber)(),e.__metadata("design:type",Number)],B.prototype,"limit",void 0),Cb.FetchFeeThresholdUsesWithPaginationDto=B=e.__decorate([(0,i.JSONSchema)({description:"Fetch Fee Threshold Uses with pagination. Optionally limit by feeCode."})],B);let L=class extends h.ChainCallDTO{};Cb.FeeThresholdUsesKeyValueResult=L,e.__decorate([(0,i.JSONSchema)({description:"Chain key identifying object on chain."}),e.__metadata("design:type",String)],L.prototype,"key",void 0),e.__decorate([(0,i.JSONSchema)({description:"Chain key identifying object on chain."}),(0,n.ValidateNested)(),(0,r.Type)(()=>a.ChainObject),e.__metadata("design:type",p.FeeThresholdUses)],L.prototype,"value",void 0),Cb.FeeThresholdUsesKeyValueResult=L=e.__decorate([(0,i.JSONSchema)({description:"Chain Object Value with Chain Key."})],L);let U=class extends h.ChainCallDTO{};Cb.FetchFeeThresholdUsesWithPaginationResponse=U,e.__decorate([(0,i.JSONSchema)({description:"List of FeeThresholdUses."}),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>L),e.__metadata("design:type",Array)],U.prototype,"results",void 0),e.__decorate([(0,i.JSONSchema)({description:"Next page bookmark."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],U.prototype,"nextPageBookmark",void 0),Cb.FetchFeeThresholdUsesWithPaginationResponse=U=e.__decorate([(0,i.JSONSchema)({description:"Response DTO from a Fetch Fee Threshold Uses with pagination request."})],U);let K=class extends h.SubmitCallDTO{};Cb.ChainKeysDto=K,e.__decorate([(0,i.JSONSchema)({description:"A list of composite keys to pass to getObjectsByKeys method."}),(0,n.ArrayNotEmpty)(),(0,n.ArrayMaxSize)(1e5),(0,n.ArrayUnique)(),e.__metadata("design:type",Array)],K.prototype,"chainKeys",void 0),Cb.ChainKeysDto=K=e.__decorate([(0,i.JSONSchema)({description:"Take an action on a set of provided chain keys, acquired from a fetch response. E.g. ResetFeeThresholds, SettleFeePaymentReceipts, etc."})],K);let j=class extends h.ChainCallDTO{};Cb.ChainKeyValueResult=j,e.__decorate([(0,i.JSONSchema)({description:"Chain key identifying object on chain."}),e.__metadata("design:type",String)],j.prototype,"key",void 0),e.__decorate([(0,i.JSONSchema)({description:"Chain key identifying object on chain."}),(0,n.ValidateNested)(),(0,r.Type)(()=>a.ChainObject),e.__metadata("design:type",a.ChainObject)],j.prototype,"value",void 0),Cb.ChainKeyValueResult=j=e.__decorate([(0,i.JSONSchema)({description:"Chain Object Value with Chain Key."})],j);let V=class extends h.ChainCallDTO{};Cb.FetchChainKeyValueObjectsWithPaginationResponse=V,e.__decorate([(0,i.JSONSchema)({description:"List of FeeThresholdUses."}),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>j),e.__metadata("design:type",Array)],V.prototype,"results",void 0),e.__decorate([(0,i.JSONSchema)({description:"Next page bookmark."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],V.prototype,"nextPageBookmark",void 0),Cb.FetchChainKeyValueObjectsWithPaginationResponse=V=e.__decorate([(0,i.JSONSchema)({description:"Response DTO from a Fetch Fee* Pagination request."})],V);let J=class extends h.ChainCallDTO{};Cb.FeeBalanceSettlement=J,e.__decorate([(0,i.JSONSchema)({description:"The FeePendingBalance which was settled."}),(0,n.ValidateNested)(),(0,r.Type)(()=>f.FeePendingBalance),e.__metadata("design:type",f.FeePendingBalance)],J.prototype,"balance",void 0),e.__decorate([(0,i.JSONSchema)({description:"If the value was greater than 0, the credit receipt issued."}),(0,n.IsOptional)(),(0,n.ValidateNested)(),(0,r.Type)(()=>s.FeeBalanceCreditReceipt),e.__metadata("design:type",Object)],J.prototype,"receipt",void 0),Cb.FeeBalanceSettlement=J=e.__decorate([(0,i.JSONSchema)({description:"FeeBalanceSettlement"})],J);let q=class extends h.ChainCallDTO{};Cb.SettleFeeBalancesResponse=q,e.__decorate([(0,i.JSONSchema)({description:"Results set"}),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>J),e.__metadata("design:type",Array)],q.prototype,"results",void 0),Cb.SettleFeeBalancesResponse=q=e.__decorate([(0,i.JSONSchema)({description:"Response DTO from a SettleFeeBalances request."})],q);let G=class extends h.ChainCallDTO{};Cb.SettleFeeCreditReceiptsResponse=G,e.__decorate([(0,i.JSONSchema)({description:"Results set"}),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>s.FeeBalanceCreditReceipt),e.__metadata("design:type",Array)],G.prototype,"results",void 0),Cb.SettleFeeCreditReceiptsResponse=G=e.__decorate([(0,i.JSONSchema)({description:"Response DTO from a SettleFeeCreditReceipts request."})],G);let z=class extends h.ChainCallDTO{};Cb.SettleFeePaymentReceiptsResponse=z,e.__decorate([(0,i.JSONSchema)({description:"Results set"}),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>c.FeeChannelPaymentReceipt),e.__metadata("design:type",Array)],z.prototype,"results",void 0),Cb.SettleFeePaymentReceiptsResponse=z=e.__decorate([(0,i.JSONSchema)({description:"Response DTO from a SettleFeePaymentReceipts request."})],z);let H=class extends h.SubmitCallDTO{};return Cb.FeeExemptionDto=H,e.__decorate([(0,i.JSONSchema)({description:"The user / identity that should be exempt from fees."}),(0,n.IsString)(),(0,o.IsUserRef)(),e.__metadata("design:type",String)],H.prototype,"user",void 0),e.__decorate([(0,i.JSONSchema)({description:"(Optional). If provided, the user's exemption will be limited to the provided fee codes."}),(0,n.IsOptional)(),(0,n.ArrayUnique)(),e.__metadata("design:type",Array)],H.prototype,"limitTo",void 0),Cb.FeeExemptionDto=H=e.__decorate([(0,i.JSONSchema)({description:"Define a FeeExemption for a specific user."})],H),Cb}var nS,iS={};function oS(){if(nS)return iS;nS=1,Object.defineProperty(iS,"__esModule",{value:!0}),iS.FeeExemption=void 0;const e=Re,t=uy,r=Mv(),n=Uv(),i=Zv();let o=class extends i.ChainObject{};return iS.FeeExemption=o,o.INDEX_KEY="GCFE",e.__decorate([(0,r.ChainKey)({position:0}),(0,n.IsUserAlias)(),e.__metadata("design:type",String)],o.prototype,"user",void 0),e.__decorate([(0,t.IsOptional)(),(0,t.ArrayUnique)(),e.__metadata("design:type",Array)],o.prototype,"limitedTo",void 0),iS}var aS,dS={};function sS(){return aS||(aS=1,Object.defineProperty(dS,"__esModule",{value:!0}),dS.FeeGateCodes=void 0,function(e){e.None="",e.BridgeTokenOut="BridgeTokenOut",e.TransferToken="TransferToken",e.SwapTokenRequest="SwapTokenRequest",e.SwapTokenFill="SwapTokenFill",e.BatchBridgeTokenIn="BatchBridgeTokenIn",e.BatchFillTokenSwap="BatchFillTokenSwap",e.BatchMintToken="BatchMintToken",e.BurnTokens="BurnTokens",e.HighThroughputMintRequest="HighThroughputMintRequest",e.HighThroughputMintFulfill="HighThroughputMintFulfill",e.HighThroughputMintAllowanceRequest="HighThroughputMintAllowanceRequest",e.HighThroughputMintAllowanceFulfill="HighThroughputMintAllowanceFulfill",e.MintToken="MintToken",e.MintTokenWithAllowance="MintTokenWithAllowance",e.RequestTokenBridgeOut="RequestTokenBridgeOut",e.TerminateTokenSwap="TerminateTokenSwap",e.SimpleFee="SimpleFee",e.NftCollectionAuthorization="NftCollectionAuthorization",e.CreateNftCollection="CreateNftCollection"}(e||(dS.FeeGateCodes=e={}))),dS;var e}var cS,uS={};function lS(){if(cS)return uS;cS=1,Object.defineProperty(uS,"__esModule",{value:!0}),uS.FeeProperties=void 0;const e=Re,t=e.__importDefault(mt),r=uy,n=Mv(),i=Uv(),o=Zv();let a=class extends o.ChainObject{};return uS.FeeProperties=a,a.INDEX_KEY="GCFP",e.__decorate([(0,n.ChainKey)({position:0}),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],a.prototype,"id",void 0),e.__decorate([(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],a.prototype,"collection",void 0),e.__decorate([(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],a.prototype,"category",void 0),e.__decorate([(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],a.prototype,"type",void 0),e.__decorate([(0,r.IsDefined)(),e.__metadata("design:type",String)],a.prototype,"additionalKey",void 0),e.__decorate([(0,r.IsNotEmpty)(),(0,i.BigNumberIsInteger)(),(0,i.BigNumberIsNotNegative)(),(0,i.BigNumberProperty)(),e.__metadata("design:type",t.default)],a.prototype,"instance",void 0),uS}var fS,pS={};function hS(){if(fS)return pS;fS=1,Object.defineProperty(pS,"__esModule",{value:!0}),pS.FeeUserPaymentReceipt=void 0;const e=Re,t=mt,r=uy,n=Mv(),i=Uv(),o=Zv(),a=Bb();let d=class extends o.ChainObject{};return pS.FeeUserPaymentReceipt=d,d.INDEX_KEY="GCUR",e.__decorate([(0,n.ChainKey)({position:0}),(0,i.IsUserAlias)(),e.__metadata("design:type",String)],d.prototype,"paidByUser",void 0),e.__decorate([(0,n.ChainKey)({position:1}),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],d.prototype,"year",void 0),e.__decorate([(0,n.ChainKey)({position:2}),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],d.prototype,"month",void 0),e.__decorate([(0,n.ChainKey)({position:3}),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],d.prototype,"day",void 0),e.__decorate([(0,n.ChainKey)({position:4}),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],d.prototype,"txId",void 0),e.__decorate([(0,r.IsNotEmpty)(),(0,i.BigNumberIsNotNegative)(),(0,i.BigNumberProperty)(),e.__metadata("design:type",t.BigNumber)],d.prototype,"quantity",void 0),e.__decorate([(0,i.EnumProperty)(a.FeeReceiptStatus),e.__metadata("design:type",Number)],d.prototype,"status",void 0),pS}var yS,mS,gS={},_S={};function vS(){if(yS)return _S;yS=1,Object.defineProperty(_S,"__esModule",{value:!0}),_S.Loan=_S.LoanAgreement=_S.Lender=_S.LoanOffer=_S.LoanClosedBy=_S.LoanStatus=void 0;const e=Re,t=e.__importDefault(mt),r=At,n=uy,i=Ey(),o=Mv(),a=Uv(),d=Zv(),s=ab();var c,u;!function(e){e[e.Any=0]="Any",e[e.Open=1]="Open",e[e.Contracted=2]="Contracted",e[e.Fulfilled=3]="Fulfilled",e[e.Cancelled=4]="Cancelled"}(c||(_S.LoanStatus=c={})),function(e){e[e.Unspecified=0]="Unspecified",e[e.Owner=1]="Owner",e[e.Registrar=2]="Registrar"}(u||(_S.LoanClosedBy=u={}));class l extends d.ChainObject{tokenKey(){return`${this.collection}|${this.category}|${this.type}|${this.additionalKey}|${this.instance.toFixed()}`}verifyTokenKey(e){return this.collection===e.collection&&this.category===e.category&&this.type===e.type&&this.additionalKey===e.additionalKey&&this.instance.isEqualTo(e.instance)}Lender(){const e=new f;return e.id=this.owner,e.status=c.Open,e.offer=this.getCompositeKey(),e.collection=this.collection,e.category=this.category,e.type=this.type,e.additionalKey=this.additionalKey,e.instance=this.instance,e}}_S.LoanOffer=l,l.INDEX_KEY="GCTLOR",e.__decorate([(0,i.JSONSchema)({description:"TokenInstance collection. ChainKey property."}),(0,o.ChainKey)({position:0}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],l.prototype,"collection",void 0),e.__decorate([(0,i.JSONSchema)({description:"TokenInstance category. ChainKey property."}),(0,o.ChainKey)({position:1}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],l.prototype,"category",void 0),e.__decorate([(0,i.JSONSchema)({description:"TokenInstance type. ChainKey property."}),(0,o.ChainKey)({position:2}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],l.prototype,"type",void 0),e.__decorate([(0,i.JSONSchema)({description:"TokenInstance additionalKey. ChainKey property."}),(0,o.ChainKey)({position:3}),(0,n.IsDefined)(),e.__metadata("design:type",String)],l.prototype,"additionalKey",void 0),e.__decorate([(0,i.JSONSchema)({description:"TokenInstance instance. ChainKey property."}),(0,o.ChainKey)({position:4}),(0,n.IsNotEmpty)(),(0,a.BigNumberIsInteger)(),(0,a.BigNumberIsNotNegative)(),(0,a.BigNumberProperty)(),e.__metadata("design:type",t.default)],l.prototype,"instance",void 0),e.__decorate([(0,i.JSONSchema)({description:"Chain identity of the NFT owner that offered the loan. ChainKey property."}),(0,o.ChainKey)({position:5}),(0,a.IsUserAlias)(),e.__metadata("design:type",String)],l.prototype,"owner",void 0),e.__decorate([(0,i.JSONSchema)({description:"Timestamp tracking when the offer was made. ChainKey property."}),(0,o.ChainKey)({position:6}),(0,n.IsNotEmpty)(),e.__metadata("design:type",Number)],l.prototype,"created",void 0),e.__decorate([(0,i.JSONSchema)({description:"ChainKey property. Numeric id to differentiate multiple LoanOffers written to chain, at the same time, for the same NFT, such as p2p loans offered to a small group of known users."}),(0,o.ChainKey)({position:7}),e.__metadata("design:type",Number)],l.prototype,"id",void 0),e.__decorate([(0,i.JSONSchema)({description:"Registrar chain identity. For p2p loans, equal to the Loan.NULL_REGISTRAR_KEY."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],l.prototype,"registrar",void 0),e.__decorate([(0,i.JSONSchema)({description:"Optional borrower identity, for loans offered to a specific group of users."}),(0,n.IsOptional)(),(0,a.IsUserAlias)(),e.__metadata("design:type",String)],l.prototype,"borrower",void 0),e.__decorate([(0,i.JSONSchema)({description:"LoanStatus, e.g. Open, Contracted, Fulfilled, Cancelled."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",Number)],l.prototype,"status",void 0),e.__decorate([(0,i.JSONSchema)({description:"Optional reward property, available for use by consumer implementations."}),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>s.TokenInstanceQuantity),(0,n.IsOptional)(),(0,n.ArrayNotEmpty)(),e.__metadata("design:type",Array)],l.prototype,"reward",void 0),e.__decorate([(0,i.JSONSchema)({description:"Number of times this offered can be accepted and fulfilled (non-concurrently)"}),(0,a.BigNumberIsPositive)(),(0,a.BigNumberIsInteger)(),(0,a.BigNumberProperty)(),e.__metadata("design:type",t.default)],l.prototype,"uses",void 0),e.__decorate([(0,i.JSONSchema)({description:"Number of uses spent."}),(0,a.BigNumberIsPositive)(),(0,a.BigNumberIsInteger)(),(0,a.BigNumberProperty)(),e.__metadata("design:type",t.default)],l.prototype,"usesSpent",void 0),e.__decorate([(0,n.Min)(0),(0,n.IsInt)(),e.__metadata("design:type",Number)],l.prototype,"expires",void 0),e.__decorate([(0,r.Exclude)(),e.__metadata("design:type",Function),e.__metadata("design:paramtypes",[]),e.__metadata("design:returntype",void 0)],l.prototype,"tokenKey",null),e.__decorate([(0,r.Exclude)(),e.__metadata("design:type",Function),e.__metadata("design:paramtypes",[s.TokenInstanceKey]),e.__metadata("design:returntype",Boolean)],l.prototype,"verifyTokenKey",null),e.__decorate([(0,r.Exclude)(),e.__metadata("design:type",Function),e.__metadata("design:paramtypes",[]),e.__metadata("design:returntype",void 0)],l.prototype,"Lender",null),e.__decorate([(0,r.Exclude)(),e.__metadata("design:type",Object)],l,"INDEX_KEY",void 0);let f=class extends d.ChainObject{matchesQuery(e){const t=e.publicKeyProperties(),r=e.toQueryParams();for(let e=0;e<r.length;e++)if(this[t[e]]!==r[e])return!1;return!0}};_S.Lender=f,f.INDEX_KEY="GCTLLR",e.__decorate([(0,i.JSONSchema)({description:"Client identity id for Lender that made the referenced LoanOffer."}),(0,o.ChainKey)({position:0}),(0,a.IsUserAlias)(),e.__metadata("design:type",String)],f.prototype,"id",void 0),e.__decorate([(0,i.JSONSchema)({description:"LoanStatus. ChainKey Property."}),(0,o.ChainKey)({position:1}),(0,n.IsNotEmpty)(),e.__metadata("design:type",Number)],f.prototype,"status",void 0),e.__decorate([(0,i.JSONSchema)({description:"LoanOffer chain key."}),(0,o.ChainKey)({position:2}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],f.prototype,"offer",void 0),e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],f.prototype,"collection",void 0),e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],f.prototype,"category",void 0),e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],f.prototype,"type",void 0),e.__decorate([(0,n.IsDefined)(),e.__metadata("design:type",String)],f.prototype,"additionalKey",void 0),e.__decorate([(0,n.IsNotEmpty)(),(0,a.BigNumberIsInteger)(),(0,a.BigNumberIsNotNegative)(),(0,a.BigNumberProperty)(),e.__metadata("design:type",t.default)],f.prototype,"instance",void 0),e.__decorate([(0,r.Exclude)(),e.__metadata("design:type",Function),e.__metadata("design:paramtypes",[s.TokenInstanceQueryKey]),e.__metadata("design:returntype",void 0)],f.prototype,"matchesQuery",null),e.__decorate([(0,r.Exclude)(),e.__metadata("design:type",Object)],f,"INDEX_KEY",void 0),_S.Lender=f=e.__decorate([(0,i.JSONSchema)({description:"Lender data written to chain. Lender.offer property can retrieve a specific LoanOffer. Useful within chaicnode for queries via full or partial key. For example, query by Lender's client identity to retrieve all offer IDs made by that Lender."})],f);class p extends d.ChainObject{}_S.LoanAgreement=p,p.INDEX_KEY="GCTLLA",p.OBJECT_TYPE="LoanAgreement",e.__decorate([(0,o.ChainKey)({position:0}),(0,a.IsUserAlias)(),e.__metadata("design:type",String)],p.prototype,"owner",void 0),e.__decorate([(0,o.ChainKey)({position:1}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],p.prototype,"offer",void 0),e.__decorate([(0,o.ChainKey)({position:2}),e.__metadata("design:type",String)],p.prototype,"loan",void 0),e.__decorate([(0,o.ChainKey)({position:3}),(0,a.IsUserAlias)(),e.__metadata("design:type",String)],p.prototype,"borrower",void 0),e.__decorate([(0,o.ChainKey)({position:4}),(0,n.IsNotEmpty)(),e.__metadata("design:type",Number)],p.prototype,"created",void 0),e.__decorate([(0,r.Exclude)(),e.__metadata("design:type",Object)],p,"INDEX_KEY",void 0),e.__decorate([(0,r.Exclude)(),e.__metadata("design:type",Object)],p,"OBJECT_TYPE",void 0);let h=class extends d.ChainObject{};return _S.Loan=h,h.INDEX_KEY="GCTLLN",h.NULL_REGISTRAR_KEY="p2p",e.__decorate([(0,o.ChainKey)({position:0}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],h.prototype,"registrar",void 0),e.__decorate([(0,o.ChainKey)({position:1}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],h.prototype,"collection",void 0),e.__decorate([(0,o.ChainKey)({position:2}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],h.prototype,"category",void 0),e.__decorate([(0,o.ChainKey)({position:3}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],h.prototype,"type",void 0),e.__decorate([(0,o.ChainKey)({position:4}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],h.prototype,"additionalKey",void 0),e.__decorate([(0,o.ChainKey)({position:5}),(0,n.IsNotEmpty)(),(0,a.BigNumberIsInteger)(),(0,a.BigNumberIsNotNegative)(),(0,a.BigNumberProperty)(),e.__metadata("design:type",t.default)],h.prototype,"instance",void 0),e.__decorate([(0,o.ChainKey)({position:6}),(0,n.IsNotEmpty)(),e.__metadata("design:type",Number)],h.prototype,"start",void 0),e.__decorate([(0,a.IsUserAlias)(),e.__metadata("design:type",String)],h.prototype,"owner",void 0),e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],h.prototype,"borrower",void 0),e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",Number)],h.prototype,"status",void 0),e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",Number)],h.prototype,"closedBy",void 0),e.__decorate([(0,r.Exclude)(),e.__metadata("design:type",Object)],h,"INDEX_KEY",void 0),e.__decorate([(0,r.Exclude)(),e.__metadata("design:type",Object)],h,"NULL_REGISTRAR_KEY",void 0),_S}function bS(){if(mS)return gS;mS=1,Object.defineProperty(gS,"__esModule",{value:!0}),gS.CloseLoanDto=gS.FetchLoansDto=gS.FetchLoanOffersDto=gS.AcceptLoanOfferDto=gS.LoanOfferResDto=gS.OfferLoanDto=void 0;const e=Re,t=e.__importDefault(mt),r=At,n=uy,i=Ey(),o=Uv(),a=vS(),d=ab(),s=ib();let c=class extends s.SubmitCallDTO{};gS.OfferLoanDto=c,c.DEFAULT_EXPIRES=0,e.__decorate([(0,i.JSONSchema)({description:"Owner of the NFT offered up for loan. Optional field, by default set to chaincode calling user."}),(0,n.IsOptional)(),(0,o.IsUserRef)(),e.__metadata("design:type",String)],c.prototype,"owner",void 0),e.__decorate([(0,i.JSONSchema)({description:"Third party intermediary granted the authority to coordinate agreements between owners and borrowers. If a registrar is not provided, then a borrower must be defined."}),(0,o.IsDifferentValue)("owner",{message:"registrar should be different than owner."}),(0,n.IsOptional)(),(0,o.IsUserRef)(),e.__metadata("design:type",String)],c.prototype,"registrar",void 0),e.__decorate([(0,i.JSONSchema)({description:"Borrower(s) that will be borrowing, using, or operating the loaned token. A loan can be offered directly to specific borrowers to facilitate p2p loans."}),(0,n.IsOptional)(),(0,n.ArrayUnique)(),(0,o.IsUserRef)({each:!0}),(0,n.ArrayMaxSize)(12,{message:"p2p loan offers are currently limited to 12 per request."}),e.__metadata("design:type",Array)],c.prototype,"borrowers",void 0),e.__decorate([(0,i.JSONSchema)({description:"The token instance(s) offered up for loan. Partial key queries are supported and will grant separate loan offers for each NFT owned by the issuer of the loan offer."}),(0,n.ValidateNested)(),(0,r.Type)(()=>d.TokenInstanceQueryKey),(0,n.IsNotEmpty)(),e.__metadata("design:type",d.TokenInstanceQueryKey)],c.prototype,"tokens",void 0),e.__decorate([(0,i.JSONSchema)({description:"A reward expected by the owner upon completion of the loan term. Optional. Some uses cases may dicate more specific terms or rewards, and may instead define terms in another context/channel."}),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>d.TokenInstanceQuantity),(0,n.IsOptional)(),(0,n.ArrayUnique)(),e.__metadata("design:type",Array)],c.prototype,"rewards",void 0),e.__decorate([(0,i.JSONSchema)({description:"How many times the loan can filled."}),(0,o.BigNumberIsPositive)(),(0,o.BigNumberIsInteger)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],c.prototype,"uses",void 0),e.__decorate([(0,i.JSONSchema)({description:"Unix timestamp of the date when the offer should expire. 0 means that it won't expire. By default set to 0}."}),(0,n.IsOptional)(),(0,n.Min)(0),(0,n.IsInt)(),e.__metadata("design:type",Number)],c.prototype,"expires",void 0),gS.OfferLoanDto=c=e.__decorate([(0,i.JSONSchema)({description:"Defines a loan offer. An owner of an NFT can loan their instance(s) either directly to another user or via an intermediary (registrar). Unlike TokenSwaps, a token Loan involves granting others the authority to Lock and Use an NFT, but never transferToken ownership."})],c);let u=class extends s.SubmitCallDTO{};gS.LoanOfferResDto=u,e.__decorate([(0,i.JSONSchema)({description:"A LoanOffer written to chain."}),(0,n.ValidateNested)(),(0,r.Type)(()=>a.LoanOffer),e.__metadata("design:type",a.LoanOffer)],u.prototype,"offer",void 0),e.__decorate([(0,i.JSONSchema)({description:"The Lender data written to chain, corresponding to the created LoanOffer."}),(0,n.ValidateNested)(),(0,r.Type)(()=>a.Lender),e.__metadata("design:type",a.Lender)],u.prototype,"lender",void 0),gS.LoanOfferResDto=u=e.__decorate([(0,i.JSONSchema)({description:"Response DTO for a successful loan offer (or multiple offers). This object encapsulates a LoanOffer object written to chain and its corresponding Lender object written to chain. Registrar-mediated loans offered openly will generally have a single offerlender pair. p2p loans offered to 1 or more specific users will have multiple results. Similarly, a LoanOffer submitted with a partial TokenQueryKey can create multiple offers for all of the end user's NFT's that match the query. The Lender.offer property contains the chain key for the LoanOffer, which can be used to construct an AcceptLoanOfferDto at a later time."})],u);class l extends s.SubmitCallDTO{}gS.AcceptLoanOfferDto=l,e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],l.prototype,"offer",void 0),e.__decorate([(0,o.IsUserRef)(),e.__metadata("design:type",String)],l.prototype,"borrower",void 0),e.__decorate([(0,n.ValidateNested)(),(0,r.Type)(()=>d.TokenInstanceKey),e.__metadata("design:type",d.TokenInstanceKey)],l.prototype,"token",void 0);class f extends s.ChainCallDTO{}gS.FetchLoanOffersDto=f,e.__decorate([(0,i.JSONSchema)({description:"Partial or complete token instance query key to return offers for one or more NFTs."}),(0,n.ValidateNested)(),(0,r.Type)(()=>d.TokenInstanceQueryKey),(0,n.IsOptional)(),e.__metadata("design:type",d.TokenInstanceQueryKey)],f.prototype,"tokenQuery",void 0),e.__decorate([(0,n.IsOptional)(),(0,o.IsUserRef)(),e.__metadata("design:type",String)],f.prototype,"owner",void 0),e.__decorate([(0,n.IsOptional)(),(0,n.IsNotEmpty)(),(0,o.EnumProperty)(a.LoanStatus),e.__metadata("design:type",Number)],f.prototype,"status",void 0);let p=class extends s.ChainCallDTO{};gS.FetchLoansDto=p,e.__decorate([(0,n.IsOptional)(),(0,o.IsUserRef)(),e.__metadata("design:type",String)],p.prototype,"registrar",void 0),e.__decorate([(0,n.IsOptional)(),(0,o.IsUserRef)(),e.__metadata("design:type",String)],p.prototype,"owner",void 0),e.__decorate([(0,n.IsOptional)(),(0,o.EnumProperty)(a.LoanStatus),e.__metadata("design:type",Number)],p.prototype,"status",void 0),gS.FetchLoansDto=p=e.__decorate([(0,i.JSONSchema)({description:"Fetch Loans off chain, either by providing an owner key and/or a registrary identity key. Optionally, filter by status. If neither owner nor registrary are provided, results set will be empty."})],p);class h extends s.SubmitCallDTO{}return gS.CloseLoanDto=h,e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],h.prototype,"loan",void 0),e.__decorate([(0,n.IsNotEmpty)(),(0,o.EnumProperty)(a.LoanStatus),e.__metadata("design:type",Number)],h.prototype,"status",void 0),gS}var SS,IS={};function NS(){if(SS)return IS;SS=1,Object.defineProperty(IS,"__esModule",{value:!0}),IS.ExpiredOfferError=IS.OfferUnavailableError=IS.UserMustBeRegistrarError=IS.ExclusiveRegistrarBorrowersError=IS.MissingInstanceBalanceError=IS.MultipleTokenBalancesError=IS.OfferBorrowerMismatchError=IS.InvalidTokenKeyError=IS.OfferLoanFungibleTokenNotImplementedError=IS.OfferLoanOwnerCallerMismatchError=IS.MissingLoanError=IS.LoanCloseForbiddenUserError=IS.LoanAlreadyClosedError=IS.InvalidClosingStatusError=void 0;const e=Mv();class t extends e.ForbiddenError{constructor(e){super(`CloseLoan() requires a valid closing status: Fulfilled or Cancelled. Received: ${e}`,{closingStatus:e})}}IS.InvalidClosingStatusError=t;class r extends e.ConflictError{constructor(e,t){super(`loan with id ${e} has been ${t} and its status can no longer be changed.`,{loanKey:e,status:t})}}IS.LoanAlreadyClosedError=r;class n extends e.ForbiddenError{constructor(e,t,r,n){super(`User ${e} attempted to close Loan ${t}, but does not match the loan owner (${r}) nor the loan registrar (${n}).`,{callingUser:e,loanKey:t,owner:r,registrar:n})}}IS.LoanCloseForbiddenUserError=n;class i extends e.NotFoundError{constructor(e,t){super(`Error finding loan (${t}) on chain for user ${e}`,{user:e,loanKey:t})}}IS.MissingLoanError=i;class o extends e.ForbiddenError{constructor(e,t){super(`OfferLoan: Calling user (${e}) does not match owner id provided in dto (${t})`,{callingUser:e,owner:t})}}IS.OfferLoanOwnerCallerMismatchError=o;class a extends e.NotImplementedError{constructor(e){super(`OfferLoan currently supports Non-Fungible tokens only. Received fungible token instance: ${e}`,{tokenQueryKey:e})}}IS.OfferLoanFungibleTokenNotImplementedError=a;class d extends e.ValidationFailedError{constructor(e,t){super(`AcceptLoanOffer: failed to verify tokenKey for LoanOffer: ${e}, borrower: ${t}`,{tokenKey:e,borrower:t})}}IS.InvalidTokenKeyError=d;class s extends e.ValidationFailedError{constructor(e,t,r){super(`AcceptLoanOffer: requested borrower (${e}) does not match offer borrower (${t})`,{borrower:e,offerBorrower:t,tokenKey:r})}}IS.OfferBorrowerMismatchError=s;class c extends e.ForbiddenError{constructor(e,t){super(`OfferLoan error: Complete query key for single instance provided, but multiple token balances received. owner: ${e}, key: ${t}`,{owner:e,completeKey:t})}}IS.MultipleTokenBalancesError=c;class u extends e.NotFoundError{constructor(e,t){super(`OfferLoan error: Query key for single instace provided, but instance is not present in owner's balance. owner: ${e}, key: ${t}`,{owner:e,completeKey:t})}}IS.MissingInstanceBalanceError=u;class l extends e.ConflictError{constructor(e,t){super(`OfferLoan called with both registrar ${e} and borrowers array defined. Only one may be defined. Borrowers: ${t.join(", ")}`,{registrar:e,borrowers:t})}}IS.ExclusiveRegistrarBorrowersError=l;class f extends e.ForbiddenError{constructor(e,t,r,n){super(`AcceptLoanOffer: Offer mediated by a registrar, callingUser not authorized. LoanOffer.registrar: ${e}, caller: ${t}, LoanOffer: ${r}, borrower: ${n}`,{registrar:e,callingUser:t,tokenKey:r,borrower:n})}}IS.UserMustBeRegistrarError=f;class p extends e.ForbiddenError{constructor(e,t,r){super(`AcceptLoanOffer: Offer is no longer available. LoanOffer.status: ${e}, LoanOffer: ${t}, borrower: ${r}`,{status:e,tokenKey:t,borrower:r})}}IS.OfferUnavailableError=p;class h extends e.ForbiddenError{constructor(e,t,r,n){super(`AcceptLoanOffer: This offer has expired. LoanOffer.expires: ${e}, TxUnixTime: ${t}, LoanOffer: ${r}, borrower: ${n}`,{expires:e,acceptanceTime:t,tokenKey:r,borrower:n})}}return IS.ExpiredOfferError=h,IS}var $S,wS={};function AS(){return $S||($S=1,Object.defineProperty(wS,"__esModule",{value:!0})),wS}var OS,MS={};function TS(){if(OS)return MS;OS=1,Object.defineProperty(MS,"__esModule",{value:!0}),MS.normalizePublicKey=MS.PK_INDEX_KEY=MS.PublicKey=void 0;const e=Re,t=uy,r=Mv(),n=Zv();let i=class extends n.ChainObject{};return MS.PublicKey=i,e.__decorate([(0,t.IsString)(),(0,t.IsNotEmpty)(),e.__metadata("design:type",String)],i.prototype,"publicKey",void 0),MS.PK_INDEX_KEY="GCPK",MS.normalizePublicKey=function(e){return r.signatures.normalizePublicKey(e).toString("base64")},MS}var ES,CS={};function xS(){if(ES)return CS;ES=1,Object.defineProperty(CS,"__esModule",{value:!0}),CS.UP_INDEX_KEY=CS.UserProfile=CS.UserRole=void 0;const e=Re,t=uy,r=Ey(),n=Uv(),i=Zv();var o;!function(e){e.CURATOR="CURATOR",e.REGISTRAR="REGISTRAR",e.SUBMIT="SUBMIT",e.EVALUATE="EVALUATE"}(o||(CS.UserRole=o={}));let a=class extends i.ChainObject{};return CS.UserProfile=a,a.ADMIN_ROLES=[o.CURATOR,o.REGISTRAR],a.DEFAULT_ROLES=[o.EVALUATE,o.SUBMIT],e.__decorate([(0,r.JSONSchema)({description:"A unique identifier of the user. It may have the following format: client|<id> or eth|<checksumed-eth-addr>."}),(0,n.IsUserAlias)(),e.__metadata("design:type",String)],a.prototype,"alias",void 0),e.__decorate([(0,r.JSONSchema)({description:"Eth address of the user."}),(0,t.IsNotEmpty)(),e.__metadata("design:type",String)],a.prototype,"ethAddress",void 0),e.__decorate([(0,r.JSONSchema)({description:"Signers of the virtual multisig profile."}),(0,t.IsOptional)(),(0,n.IsUserAlias)({each:!0}),e.__metadata("design:type",Array)],a.prototype,"signers",void 0),e.__decorate([(0,r.JSONSchema)({description:`Roles assigned to the user. Predefined roles are: ${Object.values(o).sort().join(", ")}, but you can use arbitrary strings to define your own roles.`}),(0,t.IsOptional)(),(0,t.IsString)({each:!0}),e.__metadata("design:type",Array)],a.prototype,"roles",void 0),e.__decorate([(0,r.JSONSchema)({description:"Minimum number of signatures required for authorization."}),(0,t.IsOptional)(),(0,t.IsInt)(),(0,t.Min)(1),e.__metadata("design:type",Number)],a.prototype,"signatureQuorum",void 0),CS.UP_INDEX_KEY="GCUP",CS}var kS,PS,DS={},RS={};function FS(){if(kS)return RS;kS=1,Object.defineProperty(RS,"__esModule",{value:!0}),RS.TokenHold=RS.TokenBalance=RS.TokenNotInUseError=RS.TokenInUseError=RS.TokenQuantityNotUnlockedError=RS.TokenNotLockedError=RS.TokenLockedError=RS.TokenNotInBalanceError=void 0;const e=Re,t=mt,r=At,n=uy,i=Ey(),o=Mv(),a=Uv(),d=Zv(),s=ob(),c=ab();class u extends o.ValidationFailedError{constructor(e,t,r){const n=c.TokenInstanceKey.nftKey(t,r).toStringKey();super(`Token instance ${n} not found in balance of ${e}`,{owner:e,tokenInstanceKey:n})}}RS.TokenNotInBalanceError=u;class l extends o.ValidationFailedError{constructor(e,t,r,n){const i=c.TokenInstanceKey.nftKey(t,r).toStringKey();super(`Token instance ${i} is locked${void 0===n?"":`, lock name: ${n}`}.`,{owner:e,tokenInstanceKey:i,name:n})}}RS.TokenLockedError=l;class f extends o.ValidationFailedError{constructor(e,t,r){const n=c.TokenInstanceKey.nftKey(t,r).toStringKey();super(`Token instance ${n} is not locked`,{owner:e,tokenInstanceKey:n})}}RS.TokenNotLockedError=f;class p extends o.ValidationFailedError{constructor(e,t,r,n){const i=s.TokenClassKey.toStringKey(t);super(`Failed to unlock quantity ${r} of Fungible token ${i} for TokenHold.name = ${n}.`,{owner:e,tokenClassKey:i})}}RS.TokenQuantityNotUnlockedError=p;class h extends o.ValidationFailedError{constructor(e,t,r){const n=c.TokenInstanceKey.nftKey(t,r).toStringKey();super(`Token instance ${n} is in use`,{owner:e,tokenInstanceKey:n})}}RS.TokenInUseError=h;class y extends o.ValidationFailedError{constructor(e,t,r){const n=c.TokenInstanceKey.nftKey(t,r).toStringKey();super(`Token instance ${n} is not in use`,{owner:e,tokenInstanceKey:n})}}RS.TokenNotInUseError=y;let m=class extends d.ChainObject{constructor(e){super(),e&&(this.owner=e.owner,this.collection=e.collection,this.category=e.category,this.type=e.type,this.additionalKey=e.additionalKey,this.quantity=new t.BigNumber(0),this.instanceIds=[],this.lockedHolds=[],this.inUseHolds=[])}getNftInstanceCount(){return this.getNftInstanceIds().length}getUnexpiredLockedHolds(e){var t;return(null!==(t=this.lockedHolds)&&void 0!==t?t:[]).filter(t=>!t.isExpired(e))}getUnexpiredLockedHoldsSortedByAscendingExpiration(e){return this.getUnexpiredLockedHolds(e).sort(g.sortByAscendingExpiration)}getUnexpiredInUseHolds(e){var t;return(null!==(t=this.inUseHolds)&&void 0!==t?t:[]).filter(t=>!t.isExpired(e))}addInstance(e){if(this.ensureInstanceIsNft(e),this.containsInstance(e))throw new o.ValidationFailedError(`Token instance ${e} already exists in balance`,{balanceKey:s.TokenClassKey.toStringKey(this),instanceId:e.toString()});void 0===this.instanceIds&&(this.instanceIds=[]),this.instanceIds.push(e),this.instanceIds.sort(e=>e.comparedTo(e)),this.quantity=new t.BigNumber(this.instanceIds.length)}removeInstance(e,r){var n;this.ensureInstanceIsNft(e),this.ensureInstanceIsInBalance(e),this.ensureInstanceIsNotLocked(e,r),this.ensureInstanceIsNotUsed(e,r),this.instanceIds=(null!==(n=this.instanceIds)&&void 0!==n?n:[]).filter(t=>!t.eq(e)),this.quantity=new t.BigNumber(this.instanceIds.length)}lockInstance(e,t){this.ensureInstanceIsNft(e.instanceId),this.ensureInstanceIsInBalance(e.instanceId),this.ensureInstanceIsNotLockedWithTheSameName(e.instanceId,e.name,t),this.ensureInstanceIsNotUsed(e.instanceId,t),this.lockedHolds=[...this.getUnexpiredLockedHolds(t),e]}unlockInstance(e,t,r){const n=this.getUnexpiredLockedHolds(r),i=n.filter(r=>!r.matches(e,t));if(n.length===i.length)throw new f(this.owner,this,e);this.lockedHolds=i}useInstance(e,t){this.ensureInstanceIsNft(e.instanceId),this.ensureInstanceIsInBalance(e.instanceId),this.ensureInstanceIsNotLocked(e.instanceId,t),this.ensureInstanceIsNotUsed(e.instanceId,t),this.inUseHolds=[...this.getUnexpiredInUseHolds(t),e]}releaseInstance(e,t,r){const n=this.getUnexpiredInUseHolds(r),i=n.filter(r=>!r.matches(e,t));if(n.length===i.length)throw new y(this.owner,this,e);this.inUseHolds=i}clearHolds(e,t){this.ensureInstanceIsNft(e),this.lockedHolds=this.getUnexpiredLockedHolds(t).filter(t=>!t.instanceId.isEqualTo(e)),this.inUseHolds=this.getUnexpiredInUseHolds(t).filter(t=>!t.instanceId.isEqualTo(e))}findLockedHold(e,t,r){return this.ensureInstanceIsNft(e),this.getUnexpiredLockedHolds(r).find(r=>r.matches(e,t))}findInUseHold(e,t){return this.ensureInstanceIsNft(e),this.getUnexpiredInUseHolds(t).find(t=>t.matches(e,void 0))}containsAnyNftInstanceId(){return this.getNftInstanceIds().length>0}isInstanceSpendable(e,t){return this.containsInstance(e)&&!this.isInstanceLocked(e,t)&&!this.isInstanceInUse(e,t)}getNftInstanceIds(){var e,t;return null!==(t=null===(e=this.instanceIds)||void 0===e?void 0:e.filter(e=>!c.TokenInstance.isFungible(e)))&&void 0!==t?t:[]}cleanupExpiredHolds(e){return this.lockedHolds=this.getUnexpiredLockedHolds(e),this.inUseHolds=this.getUnexpiredInUseHolds(e),this}containsInstance(e){var t,r;return null!==(r=null===(t=this.instanceIds)||void 0===t?void 0:t.some(t=>t.isEqualTo(e)))&&void 0!==r&&r}isInstanceLocked(e,t){return this.getUnexpiredLockedHolds(t).some(t=>t.instanceId.isEqualTo(e))}isInstanceInUse(e,t){return this.getUnexpiredInUseHolds(t).some(t=>t.instanceId.isEqualTo(e))}ensureInstanceIsNft(e){if(e.isNegative()||e.isZero()||!e.isInteger()){const t=`Instance ID must be positive integer, but got ${e.toFixed()}`;throw new o.ValidationFailedError(t,{instanceId:e.toFixed()})}}ensureInstanceIsInBalance(e){if(!this.containsInstance(e))throw new u(this.owner,this,e)}ensureInstanceIsNotLockedWithTheSameName(e,t,r){if(void 0!==this.findLockedHold(e,t,r))throw new l(this.owner,this,e,t)}ensureInstanceIsNotLocked(e,t){const r=this.getUnexpiredLockedHolds(t).find(t=>t.instanceId.isEqualTo(e));if(void 0!==r)throw new l(this.owner,this,e,null==r?void 0:r.name)}ensureInstanceIsNotUsed(e,t){if(this.isInstanceInUse(e,t))throw new h(this.owner,this,e)}getQuantityTotal(){return this.ensureContainsNoNftInstances(),this.quantity}getSpendableQuantityTotal(e){this.ensureContainsNoNftInstances();const t=this.getCurrentLockedQuantity(e);return this.quantity.minus(t)}getLockedQuantityTotal(e){this.ensureContainsNoNftInstances();return this.getCurrentLockedQuantity(e)}addQuantity(e){this.ensureContainsNoNftInstances(),this.ensureIsValidQuantityForFungible(e),this.quantity=this.quantity.plus(e)}subtractQuantity(e,t){this.ensureContainsNoNftInstances(),this.ensureIsValidQuantityForFungible(e),this.ensureQuantityIsSpendable(e,t),this.quantity=this.quantity.minus(e)}ensureQuantityIsSpendable(e,t){const r=this.getCurrentLockedQuantity(t);if(this.quantity.minus(r).isLessThan(e))throw new o.ValidationFailedError("Insufficient balance",{balanceKey:this.getCompositeKey(),total:this.quantity.toFixed(),lockedQuantity:r.toFixed()})}ensureTokenQuantityHoldIsFungible(e){if(!e.instanceId.isEqualTo(c.TokenInstance.FUNGIBLE_TOKEN_INSTANCE)){const t="Attempted to perform FT-specific operation on balance containing NFT instances";throw new o.ValidationFailedError(t,{balanceKey:this.getCompositeKey(),tokenHold:e})}}lockQuantity(e){this.ensureTokenQuantityHoldIsFungible(e),this.ensureQuantityIsSpendable(e.quantity,e.created),this.lockedHolds=[...this.getUnexpiredLockedHolds(e.created),e]}isCallingUserAuthorized(e,t,r,n){return e.name===t&&(n||r===e.lockAuthority||void 0===e.lockAuthority&&r===this.owner||void 0===e.lockAuthority&&r===e.createdBy)}unlockQuantity(e,r,n,i,o){const a=this.getUnexpiredLockedHoldsSortedByAscendingExpiration(r),d=[];let s=e;for(const e of a)if(e.isVestingHold())d.push(e);else if(this.isCallingUserAuthorized(e,n,i,o))if(e.quantity.isLessThanOrEqualTo(s))s=s.minus(e.quantity);else{const r=e.quantity.minus(s);s=new t.BigNumber(0);const n=new g({createdBy:e.createdBy,created:e.created,instanceId:e.instanceId,expires:e.expires,name:e.name,lockAuthority:e.lockAuthority,quantity:r});d.push(n)}else d.push(e);if(s.isGreaterThan("0"))throw new p(this.owner,this,e,n);this.lockedHolds=d}getCurrentLockedQuantity(e){return this.getUnexpiredLockedHolds(e).reduce((t,r)=>{const n=r.isVestingHold()?r.getLockedVestingQuantity(e):r.quantity;return t.plus(n)},new t.BigNumber(0))}ensureContainsNoNftInstances(){if(this.containsAnyNftInstanceId()){const e="Attempted to perform FT-specific operation on balance containing NFT instances";throw new o.ValidationFailedError(e,{currentInstanceIds:this.instanceIds,tokenClassKey:s.TokenClassKey.toStringKey(this)})}}ensureIsValidQuantityForFungible(e){if(e.isNegative())throw new o.ValidationFailedError("FT quantity must be positive",{balanceKey:this.getCompositeKey(),quantity:e.toString()})}};RS.TokenBalance=m,m.INDEX_KEY="GCTB",e.__decorate([(0,o.ChainKey)({position:0}),(0,a.IsUserAlias)(),e.__metadata("design:type",String)],m.prototype,"owner",void 0),e.__decorate([(0,o.ChainKey)({position:1}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],m.prototype,"collection",void 0),e.__decorate([(0,o.ChainKey)({position:2}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],m.prototype,"category",void 0),e.__decorate([(0,o.ChainKey)({position:3}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],m.prototype,"type",void 0),e.__decorate([(0,o.ChainKey)({position:4}),(0,n.IsDefined)(),e.__metadata("design:type",String)],m.prototype,"additionalKey",void 0),e.__decorate([(0,n.IsOptional)(),(0,a.BigNumberArrayProperty)(),e.__metadata("design:type",Array)],m.prototype,"instanceIds",void 0),e.__decorate([(0,n.IsOptional)(),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>g),e.__metadata("design:type",Array)],m.prototype,"lockedHolds",void 0),e.__decorate([(0,n.IsOptional)(),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>g),e.__metadata("design:type",Array)],m.prototype,"inUseHolds",void 0),e.__decorate([(0,a.BigNumberIsNotNegative)(),(0,a.BigNumberProperty)(),e.__metadata("design:type",t.BigNumber)],m.prototype,"quantity",void 0),e.__decorate([(0,i.JSONSchema)({description:"vestingPeriodStart timestamp. For Vesting Locks, this specifies the beginning of the vesting period."}),(0,n.Min)(0),(0,n.IsInt)(),(0,n.IsOptional)(),e.__metadata("design:type",Object)],m.prototype,"vestingPeriodStart",void 0),e.__decorate([(0,r.Exclude)(),e.__metadata("design:type",Object)],m,"INDEX_KEY",void 0);class g{constructor(e){var t;e&&(this.createdBy=e.createdBy,this.instanceId=e.instanceId,this.quantity=e.quantity,this.created=e.created,this.expires=null!==(t=e.expires)&&void 0!==t?t:g.DEFAULT_EXPIRES,e.name&&(this.name=e.name),e.lockAuthority&&(this.lockAuthority=e.lockAuthority),e.vestingPeriodStart&&(this.vestingPeriodStart=e.vestingPeriodStart))}static async createValid(e){const t=new g({...e}),r=await(0,n.validate)(t);if(r.length>0)throw new d.ObjectValidationFailedError(r);return t}matches(e,t){return this.instanceId.isEqualTo(e)&&this.name===t}isExpired(e){return 0!==this.expires&&e>this.expires}isVestingHold(){return void 0!==this.vestingPeriodStart}isVestingStarted(e){return this.isVestingHold()&&e>=this.vestingPeriodStart}timeSinceStart(e){return this.isVestingHold()?e-this.vestingPeriodStart:0}totalTimeOfVestingPeriod(){return this.isVestingHold()?this.expires-this.vestingPeriodStart:0}getLockedVestingQuantity(e){if(!this.isVestingHold())return new t.BigNumber(0);const r=this.timeSinceStart(e);if(r<0)return this.quantity;if(e>this.expires)return new t.BigNumber(0);const n=this.quantity.times(r).div(this.totalTimeOfVestingPeriod());return this.quantity.minus(n)}static sortByAscendingExpiration(e,t){return 0===t.expires&&0===e.expires?0:0===t.expires?-1:0===e.expires||e.expires>t.expires?1:-1}}return RS.TokenHold=g,g.DEFAULT_EXPIRES=0,e.__decorate([(0,a.IsUserAlias)(),e.__metadata("design:type",String)],g.prototype,"createdBy",void 0),e.__decorate([(0,n.IsNotEmpty)(),(0,a.BigNumberIsPositive)(),(0,a.BigNumberProperty)(),e.__metadata("design:type",t.BigNumber)],g.prototype,"instanceId",void 0),e.__decorate([(0,a.BigNumberIsNotNegative)(),(0,a.BigNumberProperty)(),e.__metadata("design:type",t.BigNumber)],g.prototype,"quantity",void 0),e.__decorate([(0,n.IsPositive)(),(0,n.IsInt)(),e.__metadata("design:type",Number)],g.prototype,"created",void 0),e.__decorate([(0,n.Min)(0),(0,n.IsInt)(),e.__metadata("design:type",Number)],g.prototype,"expires",void 0),e.__decorate([(0,n.IsString)(),(0,n.IsOptional)(),e.__metadata("design:type",String)],g.prototype,"name",void 0),e.__decorate([(0,i.JSONSchema)({description:"User who will be able to unlock token. If the value is missing, then token owner and lock creator can unlock in all cases token authority can unlock token."}),(0,n.IsOptional)(),(0,a.IsUserAlias)(),e.__metadata("design:type",String)],g.prototype,"lockAuthority",void 0),e.__decorate([(0,n.Min)(0),(0,n.IsInt)(),(0,n.IsOptional)(),e.__metadata("design:type",Object)],g.prototype,"vestingPeriodStart",void 0),RS}function BS(){if(PS)return DS;PS=1,Object.defineProperty(DS,"__esModule",{value:!0}),DS.TransferTokenDto=DS.FetchBalancesWithTokenMetadataResponse=DS.FetchBalancesWithPaginationResponse=DS.TokenBalanceWithMetadata=DS.FetchBalancesWithPaginationDto=DS.FetchBalancesDto=DS.UpdateTokenClassDto=DS.CreateTokenClassDto=DS.FetchTokenInstancesDto=DS.FetchTokenClassesResponse=DS.FetchTokenClassesWithPaginationDto=DS.FetchTokenClassesDto=void 0;const e=Re,t=e.__importDefault(mt),r=At,n=uy,i=Ey(),o=Uv(),a=FS(),d=ob(),s=ab(),c=ib();let u=class extends c.ChainCallDTO{};DS.FetchTokenClassesDto=u,e.__decorate([(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>d.TokenClassKey),(0,n.ArrayNotEmpty)(),e.__metadata("design:type",Array)],u.prototype,"tokenClasses",void 0),DS.FetchTokenClassesDto=u=e.__decorate([(0,i.JSONSchema)({description:"Contains list of objects representing token classes to fetch."})],u);let l=class extends c.ChainCallDTO{};DS.FetchTokenClassesWithPaginationDto=l,l.MAX_LIMIT=1e4,l.DEFAULT_LIMIT=1e3,e.__decorate([(0,i.JSONSchema)({description:"Token collection. Optional, but required if category is provided."}),(0,n.ValidateIf)(e=>!!e.category),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],l.prototype,"collection",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token category. Optional, but required if type is provided."}),(0,n.ValidateIf)(e=>!!e.type),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],l.prototype,"category",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token type. Optional, but required if additionalKey is provided."}),(0,n.ValidateIf)(e=>!!e.additionalKey),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],l.prototype,"type",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token additionalKey. Optional, but required if instance is provided."}),(0,n.ValidateIf)(e=>!!e.instance),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],l.prototype,"additionalKey",void 0),e.__decorate([(0,i.JSONSchema)({description:"Page bookmark. If it is undefined, then the first page is returned."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],l.prototype,"bookmark",void 0),e.__decorate([(0,i.JSONSchema)({description:`Page size limit. Defaults to ${l.DEFAULT_LIMIT}, max possible value ${l.MAX_LIMIT}. Note you will likely get less results than the limit, because the limit is applied before additional filtering.`}),(0,n.IsOptional)(),(0,n.Max)(l.MAX_LIMIT),(0,n.Min)(1),(0,n.IsInt)(),e.__metadata("design:type",Number)],l.prototype,"limit",void 0),DS.FetchTokenClassesWithPaginationDto=l=e.__decorate([(0,i.JSONSchema)({description:"Fetch token classes currently available in world state. Supports filtering, pagination, and optionality of TokenClassKey properties."})],l);class f extends c.ChainCallDTO{}DS.FetchTokenClassesResponse=f,e.__decorate([(0,i.JSONSchema)({description:"List of Token Classes."}),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>d.TokenClass),e.__metadata("design:type",Array)],f.prototype,"results",void 0),e.__decorate([(0,i.JSONSchema)({description:"Next page bookmark."}),(0,n.IsOptional)(),(0,n.IsString)(),e.__metadata("design:type",String)],f.prototype,"nextPageBookmark",void 0);let p=class extends c.ChainCallDTO{};DS.FetchTokenInstancesDto=p,e.__decorate([(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>s.TokenInstanceKey),(0,n.ArrayNotEmpty)(),e.__metadata("design:type",Array)],p.prototype,"tokenInstances",void 0),DS.FetchTokenInstancesDto=p=e.__decorate([(0,i.JSONSchema)({description:"Contains list of objects representing token instances to fetch."})],p);let h=class extends c.SubmitCallDTO{};DS.CreateTokenClassDto=h,h.DEFAULT_NETWORK="GC",h.DEFAULT_DECIMALS=0,h.DEFAULT_MAX_CAPACITY=new t.default("Infinity"),h.DEFAULT_MAX_SUPPLY=new t.default("Infinity"),h.INITIAL_MINT_ALLOWANCE=new t.default("0"),h.INITIAL_TOTAL_SUPPLY=new t.default("0"),h.INITIAL_TOTAL_BURNED=new t.default("0"),e.__decorate([(0,i.JSONSchema)({description:`A network of the token. An optional field, by default set to ${h.DEFAULT_NETWORK}. Custom value is required when we want to use different network than ${h.DEFAULT_NETWORK} to store tokens (but this is not supported yet).`}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],h.prototype,"network",void 0),e.__decorate([(0,i.JSONSchema)({description:`If missing, and for NFTs, it is set to ${h.DEFAULT_DECIMALS}.`}),(0,n.Min)(0),(0,n.Max)(32),(0,n.IsOptional)(),e.__metadata("design:type",Number)],h.prototype,"decimals",void 0),e.__decorate([(0,i.JSONSchema)({description:`If missing, set to ${h.DEFAULT_MAX_CAPACITY}.`}),(0,n.IsOptional)(),(0,o.BigNumberIsPositive)(),(0,o.BigNumberProperty)({allowInfinity:!0}),e.__metadata("design:type",t.default)],h.prototype,"maxCapacity",void 0),e.__decorate([(0,i.JSONSchema)({description:`If missing, set to infinity ${h.DEFAULT_MAX_SUPPLY}.`}),(0,n.IsOptional)(),(0,o.BigNumberIsPositive)(),(0,o.BigNumberProperty)({allowInfinity:!0}),e.__metadata("design:type",t.default)],h.prototype,"maxSupply",void 0),e.__decorate([(0,i.JSONSchema)({description:"A unique identifier of this token."}),(0,n.ValidateNested)(),(0,r.Type)(()=>d.TokenClassKey),(0,n.IsNotEmpty)(),e.__metadata("design:type",d.TokenClassKey)],h.prototype,"tokenClass",void 0),e.__decorate([(0,n.MaxLength)(200),e.__metadata("design:type",String)],h.prototype,"name",void 0),e.__decorate([(0,n.MaxLength)(20),(0,n.IsAlpha)(),e.__metadata("design:type",String)],h.prototype,"symbol",void 0),e.__decorate([(0,n.IsNotEmpty)(),(0,n.MaxLength)(1e3),e.__metadata("design:type",String)],h.prototype,"description",void 0),e.__decorate([(0,i.JSONSchema)({description:`How much units or how many NFTs were allowed to be minted in the past. By default set to ${h.INITIAL_MINT_ALLOWANCE}.`}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),(0,o.BigNumberIsNotNegative)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],h.prototype,"totalMintAllowance",void 0),e.__decorate([(0,i.JSONSchema)({description:`How much units or how many NFTs are already on the market. By default set to ${h.INITIAL_TOTAL_SUPPLY}.`}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),(0,o.BigNumberIsNotNegative)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],h.prototype,"totalSupply",void 0),e.__decorate([(0,i.JSONSchema)({description:`How much units or how many NFTs ware already burned. By default set to ${h.INITIAL_TOTAL_BURNED}.`}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),(0,o.BigNumberIsNotNegative)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],h.prototype,"totalBurned",void 0),e.__decorate([(0,n.IsOptional)(),(0,n.MaxLength)(500),e.__metadata("design:type",String)],h.prototype,"contractAddress",void 0),e.__decorate([(0,n.IsOptional)(),(0,n.MaxLength)(500),e.__metadata("design:type",String)],h.prototype,"metadataAddress",void 0),e.__decorate([(0,i.JSONSchema)({description:"How rare is the NFT"}),(0,n.IsOptional)(),(0,n.IsAlpha)(),e.__metadata("design:type",String)],h.prototype,"rarity",void 0),e.__decorate([(0,n.IsUrl)(),e.__metadata("design:type",String)],h.prototype,"image",void 0),e.__decorate([(0,i.JSONSchema)({description:"Determines if the token is an NFT. Set to false if missing."}),(0,n.IsOptional)(),(0,n.IsBoolean)(),e.__metadata("design:type",Boolean)],h.prototype,"isNonFungible",void 0),e.__decorate([(0,i.JSONSchema)({description:"List of chain user identifiers who should become token authorities. Only token authorities can give mint allowances. By default the calling user becomes a single token authority. "}),(0,n.IsString)({each:!0}),(0,n.IsOptional)(),(0,n.ArrayNotEmpty)(),e.__metadata("design:type",Array)],h.prototype,"authorities",void 0),DS.CreateTokenClassDto=h=e.__decorate([(0,i.JSONSchema)({description:"Contains properties of token class to be created. Actual token units and NFT instances are created on mint."})],h);class y extends c.SubmitCallDTO{}DS.UpdateTokenClassDto=y,e.__decorate([(0,i.JSONSchema)({description:"The unique identifier of the existing token which will be updated."}),(0,n.ValidateNested)(),(0,r.Type)(()=>d.TokenClassKey),(0,n.IsNotEmpty)(),e.__metadata("design:type",d.TokenClassKey)],y.prototype,"tokenClass",void 0),e.__decorate([(0,n.IsOptional)(),(0,n.MaxLength)(200),e.__metadata("design:type",String)],y.prototype,"name",void 0),e.__decorate([(0,n.IsOptional)(),(0,n.MaxLength)(20),(0,n.IsAlpha)(),e.__metadata("design:type",String)],y.prototype,"symbol",void 0),e.__decorate([(0,n.IsOptional)(),(0,n.IsNotEmpty)(),(0,n.MaxLength)(1e3),e.__metadata("design:type",String)],y.prototype,"description",void 0),e.__decorate([(0,n.IsOptional)(),(0,n.MaxLength)(500),e.__metadata("design:type",String)],y.prototype,"contractAddress",void 0),e.__decorate([(0,n.IsOptional)(),(0,n.MaxLength)(500),e.__metadata("design:type",String)],y.prototype,"metadataAddress",void 0),e.__decorate([(0,i.JSONSchema)({description:"How rare is the NFT"}),(0,n.IsOptional)(),(0,n.IsAlpha)(),e.__metadata("design:type",String)],y.prototype,"rarity",void 0),e.__decorate([(0,n.IsOptional)(),(0,n.IsUrl)(),e.__metadata("design:type",String)],y.prototype,"image",void 0),e.__decorate([(0,i.JSONSchema)({description:"List of chain user identifiers who should become token authorities. Only token authorities can give mint allowances. By default the calling user becomes a single token authority. "}),(0,o.IsUserRef)({each:!0}),(0,n.IsOptional)(),(0,n.ArrayNotEmpty)(),e.__metadata("design:type",Array)],y.prototype,"authorities",void 0),e.__decorate([(0,i.JSONSchema)({description:"Overwrite existing authorities completely with new values. Default: false. The default behavior will augment the existing authorities with new values. Set this to true and provide a full list to remove one or more existing authorities."}),(0,n.IsOptional)(),e.__metadata("design:type",Boolean)],y.prototype,"overwriteAuthorities",void 0);let m=class extends c.ChainCallDTO{};DS.FetchBalancesDto=m,e.__decorate([(0,i.JSONSchema)({description:"Person who owns the balance. If the value is missing, chaincode caller is used."}),(0,n.IsOptional)(),(0,o.IsUserRef)(),e.__metadata("design:type",String)],m.prototype,"owner",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token collection. Optional, but required if category is provided."}),(0,n.ValidateIf)(e=>!!e.category),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],m.prototype,"collection",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token category. Optional, but required if type is provided."}),(0,n.ValidateIf)(e=>!!e.type),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],m.prototype,"category",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token type. Optional, but required if additionalKey is provided."}),(0,n.ValidateIf)(e=>!!e.additionalKey),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],m.prototype,"type",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token additionalKey."}),(0,n.IsOptional)(),e.__metadata("design:type",String)],m.prototype,"additionalKey",void 0),DS.FetchBalancesDto=m=e.__decorate([(0,i.JSONSchema)({description:"Contains parameters for fetching balances. Each parameter is optional."})],m);let g=class extends c.ChainCallDTO{};DS.FetchBalancesWithPaginationDto=g,g.MAX_LIMIT=1e4,g.DEFAULT_LIMIT=1e3,e.__decorate([(0,i.JSONSchema)({description:"Person who owns the balance. If the value is missing, chaincode caller is used."}),(0,n.IsOptional)(),(0,o.IsUserRef)(),e.__metadata("design:type",String)],g.prototype,"owner",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token collection. Optional, but required if category is provided."}),(0,n.ValidateIf)(e=>!!e.category),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],g.prototype,"collection",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token category. Optional, but required if type is provided."}),(0,n.ValidateIf)(e=>!!e.type),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],g.prototype,"category",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token type. Optional, but required if additionalKey is provided."}),(0,n.ValidateIf)(e=>!!e.additionalKey),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],g.prototype,"type",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token additionalKey."}),(0,n.IsOptional)(),e.__metadata("design:type",String)],g.prototype,"additionalKey",void 0),e.__decorate([(0,i.JSONSchema)({description:"Page bookmark. If it is undefined, then the first page is returned."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],g.prototype,"bookmark",void 0),e.__decorate([(0,i.JSONSchema)({description:`Page size limit. Defaults to ${g.DEFAULT_LIMIT}, max possible value ${g.MAX_LIMIT}. Note you will likely get less results than the limit, because the limit is applied before additional filtering.`}),(0,n.IsOptional)(),(0,n.Max)(g.MAX_LIMIT),(0,n.Min)(1),(0,n.IsInt)(),e.__metadata("design:type",Number)],g.prototype,"limit",void 0),DS.FetchBalancesWithPaginationDto=g=e.__decorate([(0,i.JSONSchema)({description:"Contains parameters for fetching balances. Each parameter is optional."})],g);let _=class extends c.ChainCallDTO{};DS.TokenBalanceWithMetadata=_,e.__decorate([(0,i.JSONSchema)({description:"A TokenBalance read of chain."}),(0,n.ValidateNested)(),(0,r.Type)(()=>a.TokenBalance),(0,n.IsObject)(),e.__metadata("design:type",a.TokenBalance)],_.prototype,"balance",void 0),e.__decorate([(0,i.JSONSchema)({description:"The TokenClass metadata corresponding to the TokenBalance on this DTO."}),(0,r.Type)(()=>d.TokenClass),(0,n.IsObject)(),e.__metadata("design:type",d.TokenClass)],_.prototype,"token",void 0),DS.TokenBalanceWithMetadata=_=e.__decorate([(0,i.JSONSchema)({description:"Response DTO containing a TokenBalance and the balance's corresponding TokenClass."})],_);class v extends c.ChainCallDTO{}DS.FetchBalancesWithPaginationResponse=v,e.__decorate([(0,i.JSONSchema)({description:"List of balances with token metadata."}),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>a.TokenBalance),e.__metadata("design:type",Array)],v.prototype,"results",void 0),e.__decorate([(0,i.JSONSchema)({description:"Next page bookmark."}),(0,n.IsOptional)(),(0,n.IsString)(),e.__metadata("design:type",String)],v.prototype,"nextPageBookmark",void 0);class b extends c.ChainCallDTO{}DS.FetchBalancesWithTokenMetadataResponse=b,e.__decorate([(0,i.JSONSchema)({description:"List of balances with token metadata."}),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>_),e.__metadata("design:type",Array)],b.prototype,"results",void 0),e.__decorate([(0,i.JSONSchema)({description:"Next page bookmark."}),(0,n.IsOptional)(),(0,n.IsString)(),e.__metadata("design:type",String)],b.prototype,"nextPageBookmark",void 0);let S=class extends c.SubmitCallDTO{};return DS.TransferTokenDto=S,e.__decorate([(0,i.JSONSchema)({description:"The current owner of tokens. If the value is missing, chaincode caller is used."}),(0,n.IsOptional)(),(0,o.IsUserRef)(),e.__metadata("design:type",String)],S.prototype,"from",void 0),e.__decorate([(0,o.IsUserRef)(),e.__metadata("design:type",String)],S.prototype,"to",void 0),e.__decorate([(0,i.JSONSchema)({description:`Token instance of token to be transferred. In case of fungible tokens, tokenInstance.instance field should be set to ${s.TokenInstance.FUNGIBLE_TOKEN_INSTANCE}.`}),(0,n.ValidateNested)(),(0,r.Type)(()=>s.TokenInstanceKey),(0,n.IsNotEmpty)(),e.__metadata("design:type",s.TokenInstanceKey)],S.prototype,"tokenInstance",void 0),e.__decorate([(0,i.JSONSchema)({description:"The quantity of token units to be transferred."}),(0,n.IsNotEmpty)(),(0,o.BigNumberIsNotNegative)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],S.prototype,"quantity",void 0),e.__decorate([(0,i.JSONSchema)({description:"Allowance ids to be used on transferToken (optional)."}),(0,n.IsString)({each:!0}),(0,n.IsOptional)(),(0,n.ArrayNotEmpty)(),(0,n.ArrayUnique)(),e.__metadata("design:type",Array)],S.prototype,"useAllowances",void 0),DS.TransferTokenDto=S=e.__decorate([(0,i.JSONSchema)({description:"Experimental: After submitting request to RequestMintAllowance, follow up with FulfillMintAllowance."})],S),DS}var LS,US={};function KS(){if(LS)return US;LS=1,Object.defineProperty(US,"__esModule",{value:!0}),US.MintRequestDto=US.TokenMintStatus=US.AllowanceKey=US.AllowanceType=void 0;const e=Re,t=e.__importDefault(mt),r=At,n=uy,i=Ey(),o=Uv(),a=ib();var d;!function(e){e[e.Use=0]="Use",e[e.Lock=1]="Lock",e[e.Spend=2]="Spend",e[e.Transfer=3]="Transfer",e[e.Mint=4]="Mint",e[e.Swap=5]="Swap",e[e.Burn=6]="Burn"}(d||(US.AllowanceType=d={}));let s=class extends a.ChainCallDTO{};var c;US.AllowanceKey=s,e.__decorate([(0,o.IsUserAlias)(),e.__metadata("design:type",String)],s.prototype,"grantedTo",void 0),e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],s.prototype,"collection",void 0),e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],s.prototype,"category",void 0),e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],s.prototype,"type",void 0),e.__decorate([(0,n.IsDefined)(),e.__metadata("design:type",String)],s.prototype,"additionalKey",void 0),e.__decorate([(0,n.IsNotEmpty)(),(0,o.BigNumberIsInteger)(),(0,o.BigNumberIsNotNegative)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],s.prototype,"instance",void 0),e.__decorate([(0,o.EnumProperty)(d),e.__metadata("design:type",Number)],s.prototype,"allowanceType",void 0),e.__decorate([(0,o.IsUserAlias)(),e.__metadata("design:type",String)],s.prototype,"grantedBy",void 0),e.__decorate([(0,n.IsPositive)(),(0,n.IsInt)(),e.__metadata("design:type",Number)],s.prototype,"created",void 0),US.AllowanceKey=s=e.__decorate([(0,i.JSONSchema)({description:"Key fields that identity an existing TokenAllowance."})],s),function(e){e[e.Unknown=0]="Unknown",e[e.Minted=1]="Minted",e[e.PartiallyMinted=2]="PartiallyMinted",e[e.AllowanceTotalExceeded=3]="AllowanceTotalExceeded",e[e.SupplyTotalExceeded=4]="SupplyTotalExceeded",e[e.NullAdministrativePatchEntry=5]="NullAdministrativePatchEntry"}(c||(US.TokenMintStatus=c={}));let u=class{isTimeKeyValid(){try{return new t.default(this.timeKey),!0}catch(e){return!1}}};return US.MintRequestDto=u,e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],u.prototype,"collection",void 0),e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],u.prototype,"category",void 0),e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],u.prototype,"type",void 0),e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],u.prototype,"additionalKey",void 0),e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],u.prototype,"timeKey",void 0),e.__decorate([(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],u.prototype,"totalKnownMintsCount",void 0),e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],u.prototype,"id",void 0),e.__decorate([(0,i.JSONSchema)({description:"The owner of minted tokens. If the value is missing, chaincode caller is used."}),(0,n.IsOptional)(),(0,o.IsUserAlias)(),e.__metadata("design:type",String)],u.prototype,"owner",void 0),e.__decorate([(0,i.JSONSchema)({description:"(Optional). Specify the TokenAllowance on chain to use for this mint."}),(0,n.IsOptional)(),(0,r.Type)(()=>s),(0,n.IsNotEmpty)(),e.__metadata("design:type",s)],u.prototype,"allowanceKey",void 0),US.MintRequestDto=u=e.__decorate([(0,i.JSONSchema)({description:"Minimal property set representing a mint request."})],u),US}var jS,VS={};function JS(){return jS||(jS=1,Object.defineProperty(VS,"__esModule",{value:!0})),VS}var qS,GS={};function zS(){if(qS)return GS;qS=1,Object.defineProperty(GS,"__esModule",{value:!0}),GS.TokenAllowance=void 0;const e=Re,t=mt,r=At,n=uy,i=Mv(),o=Uv(),a=Zv(),d=KS();let s=class extends a.ChainObject{};return GS.TokenAllowance=s,s.INDEX_KEY="GCTA",e.__decorate([(0,i.ChainKey)({position:0}),(0,o.IsUserAlias)(),e.__metadata("design:type",String)],s.prototype,"grantedTo",void 0),e.__decorate([(0,i.ChainKey)({position:1}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],s.prototype,"collection",void 0),e.__decorate([(0,i.ChainKey)({position:2}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],s.prototype,"category",void 0),e.__decorate([(0,i.ChainKey)({position:3}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],s.prototype,"type",void 0),e.__decorate([(0,i.ChainKey)({position:4}),(0,n.IsDefined)(),e.__metadata("design:type",String)],s.prototype,"additionalKey",void 0),e.__decorate([(0,i.ChainKey)({position:5}),(0,n.IsNotEmpty)(),(0,o.BigNumberIsInteger)(),(0,o.BigNumberIsNotNegative)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.BigNumber)],s.prototype,"instance",void 0),e.__decorate([(0,i.ChainKey)({position:6}),(0,o.EnumProperty)(d.AllowanceType),e.__metadata("design:type",Number)],s.prototype,"allowanceType",void 0),e.__decorate([(0,i.ChainKey)({position:7}),(0,o.IsUserAlias)(),e.__metadata("design:type",String)],s.prototype,"grantedBy",void 0),e.__decorate([(0,i.ChainKey)({position:8}),(0,n.IsPositive)(),(0,n.IsInt)(),e.__metadata("design:type",Number)],s.prototype,"created",void 0),e.__decorate([(0,n.IsNotEmpty)(),(0,o.BigNumberIsPositive)(),(0,o.BigNumberProperty)({allowInfinity:!0}),e.__metadata("design:type",t.BigNumber)],s.prototype,"uses",void 0),e.__decorate([(0,o.BigNumberIsNotNegative)(),(0,o.BigNumberIsInteger)(),(0,o.BigNumberProperty)(),(0,n.IsOptional)(),e.__metadata("design:type",t.BigNumber)],s.prototype,"usesSpent",void 0),e.__decorate([(0,n.Min)(0),(0,n.IsInt)(),e.__metadata("design:type",Number)],s.prototype,"expires",void 0),e.__decorate([(0,n.IsNotEmpty)(),(0,o.BigNumberIsNotNegative)(),(0,o.BigNumberProperty)({allowInfinity:!0}),e.__metadata("design:type",t.BigNumber)],s.prototype,"quantity",void 0),e.__decorate([(0,o.BigNumberIsNotNegative)(),(0,o.BigNumberProperty)(),(0,n.IsOptional)(),e.__metadata("design:type",t.BigNumber)],s.prototype,"quantitySpent",void 0),e.__decorate([(0,r.Exclude)(),e.__metadata("design:type",Object)],s,"INDEX_KEY",void 0),GS}var HS,ZS,WS={},YS={};function XS(){if(HS)return YS;HS=1,Object.defineProperty(YS,"__esModule",{value:!0}),YS.GrantAllowanceQuantity=void 0;const e=Re,t=e.__importDefault(mt),r=uy,n=Uv();class i{}return YS.GrantAllowanceQuantity=i,e.__decorate([(0,r.IsNotEmpty)(),(0,n.IsUserAlias)(),e.__metadata("design:type",String)],i.prototype,"user",void 0),e.__decorate([(0,n.BigNumberProperty)({allowInfinity:!0}),(0,n.BigNumberIsNotNegative)(),e.__metadata("design:type",t.default)],i.prototype,"quantity",void 0),YS}function QS(){if(ZS)return WS;ZS=1,Object.defineProperty(WS,"__esModule",{value:!0}),WS.RefreshAllowancesDto=WS.RefreshAllowanceDto=WS.FullAllowanceCheckResDto=WS.FullAllowanceCheckDto=WS.FulfillMintAllowanceDto=WS.HighThroughputGrantAllowanceDto=WS.GrantAllowanceDto=WS.DeleteAllowancesDto=WS.FetchAllowancesResponse=WS.FetchAllowancesLegacyDto=WS.FetchAllowancesDto=void 0;const e=Re,t=e.__importDefault(mt),r=At,n=uy,i=Ey(),o=Uv(),a=XS(),d=zS(),s=ab(),c=KS(),u=ib();let l=class extends u.ChainCallDTO{};WS.FetchAllowancesDto=l,l.MAX_LIMIT=1e4,l.DEFAULT_LIMIT=1e3,e.__decorate([(0,i.JSONSchema)({description:"A user who can use an allowance."}),(0,o.IsUserRef)(),e.__metadata("design:type",String)],l.prototype,"grantedTo",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token collection. Optional, but required if category is provided."}),(0,n.ValidateIf)(e=>!!e.category),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],l.prototype,"collection",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token category. Optional, but required if type is provided."}),(0,n.ValidateIf)(e=>!!e.type),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],l.prototype,"category",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token type. Optional, but required if additionalKey is provided."}),(0,n.ValidateIf)(e=>!!e.additionalKey),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],l.prototype,"type",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token additionalKey. Optional, but required if instance is provided."}),(0,n.ValidateIf)(e=>!!e.instance),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],l.prototype,"additionalKey",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token instance. Optional, but required if allowanceType is provided"}),(0,n.ValidateIf)(e=>void 0!==e.allowanceType),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],l.prototype,"instance",void 0),e.__decorate([(0,n.IsOptional)(),(0,o.EnumProperty)(c.AllowanceType),e.__metadata("design:type",Number)],l.prototype,"allowanceType",void 0),e.__decorate([(0,i.JSONSchema)({description:"User who granted allowances."}),(0,n.IsOptional)(),(0,o.IsUserRef)(),e.__metadata("design:type",String)],l.prototype,"grantedBy",void 0),e.__decorate([(0,i.JSONSchema)({description:"Page bookmark. If it is undefined, then the first page is returned."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],l.prototype,"bookmark",void 0),e.__decorate([(0,i.JSONSchema)({description:`Page size limit. Defaults to ${l.DEFAULT_LIMIT}, max possible value ${l.MAX_LIMIT}. Note you will likely get less results than the limit, because the limit is applied before additional filtering.`}),(0,n.IsOptional)(),(0,n.Max)(l.MAX_LIMIT),(0,n.Min)(1),(0,n.IsInt)(),e.__metadata("design:type",Number)],l.prototype,"limit",void 0),WS.FetchAllowancesDto=l=e.__decorate([(0,i.JSONSchema)({description:"Contains parameters for fetching allowances with pagination."})],l);let f=class extends u.ChainCallDTO{};WS.FetchAllowancesLegacyDto=f,e.__decorate([(0,i.JSONSchema)({description:"A user who can use an allowance."}),(0,o.IsUserRef)(),e.__metadata("design:type",String)],f.prototype,"grantedTo",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token collection. Optional, but required if category is provided."}),(0,n.ValidateIf)(e=>!!e.category),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],f.prototype,"collection",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token category. Optional, but required if type is provided."}),(0,n.ValidateIf)(e=>!!e.type),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],f.prototype,"category",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token type. Optional, but required if additionalKey is provided."}),(0,n.ValidateIf)(e=>!!e.additionalKey),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],f.prototype,"type",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token additionalKey. Optional, but required if instance is provided."}),(0,n.ValidateIf)(e=>!!e.instance),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],f.prototype,"additionalKey",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token instance. Optional, but required if allowanceType is provided"}),(0,n.ValidateIf)(e=>void 0!==e.allowanceType),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],f.prototype,"instance",void 0),e.__decorate([(0,n.IsOptional)(),(0,o.EnumProperty)(c.AllowanceType),e.__metadata("design:type",Number)],f.prototype,"allowanceType",void 0),e.__decorate([(0,i.JSONSchema)({description:"User who granted allowances."}),(0,n.IsOptional)(),(0,o.IsUserRef)(),e.__metadata("design:type",String)],f.prototype,"grantedBy",void 0),e.__decorate([(0,i.JSONSchema)({description:"Page bookmark. If it is undefined, then the first page is returned."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],f.prototype,"bookmark",void 0),WS.FetchAllowancesLegacyDto=f=e.__decorate([(0,i.JSONSchema)({description:"Contains parameters for fetching allowances. Deprecated since 2023-05-29. Please use version with pagination."})],f);class p extends u.ChainCallDTO{}WS.FetchAllowancesResponse=p,e.__decorate([(0,i.JSONSchema)({description:"List of allowances."}),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>d.TokenAllowance),e.__metadata("design:type",Array)],p.prototype,"results",void 0),e.__decorate([(0,i.JSONSchema)({description:"Next page bookmark."}),(0,n.IsOptional)(),(0,n.IsString)(),e.__metadata("design:type",String)],p.prototype,"nextPageBookmark",void 0);let h=class extends u.SubmitCallDTO{};WS.DeleteAllowancesDto=h,e.__decorate([(0,i.JSONSchema)({description:"A user who can use an allowance."}),(0,o.IsUserRef)(),e.__metadata("design:type",String)],h.prototype,"grantedTo",void 0),e.__decorate([(0,i.JSONSchema)({description:"User who granted allowances."}),(0,n.IsOptional)(),(0,o.IsUserRef)(),e.__metadata("design:type",String)],h.prototype,"grantedBy",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token collection. Optional, but required if category is provided."}),(0,n.ValidateIf)(e=>!!e.category),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],h.prototype,"collection",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token category. Optional, but required if type is provided."}),(0,n.ValidateIf)(e=>!!e.type),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],h.prototype,"category",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token type. Optional, but required if additionalKey is provided."}),(0,n.ValidateIf)(e=>!!e.additionalKey),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],h.prototype,"type",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token additionalKey. Optional, but required if instance is provided."}),(0,n.ValidateIf)(e=>!!e.instance),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],h.prototype,"additionalKey",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token instance. Optional, but required if allowanceType is provided"}),(0,n.ValidateIf)(e=>void 0!==e.allowanceType),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],h.prototype,"instance",void 0),e.__decorate([(0,n.IsOptional)(),(0,o.EnumProperty)(c.AllowanceType),e.__metadata("design:type",Number)],h.prototype,"allowanceType",void 0),e.__decorate([(0,i.JSONSchema)({description:"Created time. Optional."}),(0,n.IsPositive)(),(0,n.IsInt)(),(0,n.IsOptional)(),e.__metadata("design:type",Number)],h.prototype,"created",void 0),WS.DeleteAllowancesDto=h=e.__decorate([(0,i.JSONSchema)({description:"Contains parameters for deleting allowances for a calling user."})],h);let y=class extends u.SubmitCallDTO{};WS.GrantAllowanceDto=y,y.DEFAULT_EXPIRES=0,e.__decorate([(0,i.JSONSchema)({description:`Token instance of token which the allowance concerns. In case of fungible tokens, tokenInstance.instance field should be set to ${s.TokenInstance.FUNGIBLE_TOKEN_INSTANCE}.`}),(0,n.ValidateNested)(),(0,r.Type)(()=>s.TokenInstanceQueryKey),(0,n.IsNotEmpty)(),e.__metadata("design:type",s.TokenInstanceQueryKey)],y.prototype,"tokenInstance",void 0),e.__decorate([(0,i.JSONSchema)({description:"List of objects with user and token quantities. The user fields must be unique"}),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>a.GrantAllowanceQuantity),(0,n.ArrayNotEmpty)(),(0,o.ArrayUniqueObjects)("user"),e.__metadata("design:type",Array)],y.prototype,"quantities",void 0),e.__decorate([(0,n.IsNotEmpty)(),(0,o.EnumProperty)(c.AllowanceType),e.__metadata("design:type",Number)],y.prototype,"allowanceType",void 0),e.__decorate([(0,i.JSONSchema)({description:"How many times each allowance can be used."}),(0,o.BigNumberIsPositive)(),(0,o.BigNumberProperty)({allowInfinity:!0}),e.__metadata("design:type",t.default)],y.prototype,"uses",void 0),e.__decorate([(0,i.JSONSchema)({description:`Unix timestamp of the date when the allowances should expire. 0 means that it won' expire. By default set to ${y.DEFAULT_EXPIRES}.`}),(0,n.IsOptional)(),e.__metadata("design:type",Number)],y.prototype,"expires",void 0),WS.GrantAllowanceDto=y=e.__decorate([(0,i.JSONSchema)({description:"Defines allowances to be created."})],y);let m=class extends u.SubmitCallDTO{};WS.HighThroughputGrantAllowanceDto=m,m.DEFAULT_EXPIRES=0,e.__decorate([(0,i.JSONSchema)({description:`Token instance of token which the allowance concerns. In case of fungible tokens, tokenInstance.instance field should be set to ${s.TokenInstance.FUNGIBLE_TOKEN_INSTANCE}.`}),(0,n.ValidateNested)(),(0,r.Type)(()=>s.TokenInstanceQueryKey),(0,n.IsNotEmpty)(),e.__metadata("design:type",s.TokenInstanceQueryKey)],m.prototype,"tokenInstance",void 0),e.__decorate([(0,i.JSONSchema)({description:"List of objects with user and token quantities. The user fields must be unique"}),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>a.GrantAllowanceQuantity),(0,n.ArrayNotEmpty)(),(0,o.ArrayUniqueObjects)("user"),e.__metadata("design:type",Array)],m.prototype,"quantities",void 0),e.__decorate([(0,n.IsNotEmpty)(),(0,o.EnumProperty)(c.AllowanceType),e.__metadata("design:type",Number)],m.prototype,"allowanceType",void 0),e.__decorate([(0,i.JSONSchema)({description:"How many times each allowance can be used."}),(0,o.BigNumberIsPositive)(),(0,o.BigNumberIsInteger)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],m.prototype,"uses",void 0),e.__decorate([(0,i.JSONSchema)({description:`Unix timestamp of the date when the allowances should expire. 0 means that it won' expire. By default set to ${y.DEFAULT_EXPIRES}.`}),(0,n.IsOptional)(),e.__metadata("design:type",Number)],m.prototype,"expires",void 0),WS.HighThroughputGrantAllowanceDto=m=e.__decorate([(0,i.JSONSchema)({description:"Experimental: Defines allowances to be created. High-throughput implementation. DTO properties backwards-compatible with prior GrantAllowanceDto, with the exception that this implementation only supports AllowanceType.Mint."})],m);let g=class extends u.SubmitCallDTO{};WS.FulfillMintAllowanceDto=g,g.MAX_ARR_SIZE=1e3,e.__decorate([(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>c.MintRequestDto),(0,n.ArrayNotEmpty)(),(0,n.ArrayMaxSize)(g.MAX_ARR_SIZE),(0,o.ArrayUniqueObjects)("id"),e.__metadata("design:type",Array)],g.prototype,"requests",void 0),WS.FulfillMintAllowanceDto=g=e.__decorate([(0,i.JSONSchema)({description:"Experimental: After submitting request to RequestMintAllowance, follow up with FulfillMintAllowance."})],g);let _=class extends u.ChainCallDTO{};WS.FullAllowanceCheckDto=_,e.__decorate([(0,i.JSONSchema)({description:"Person who owns the balance(s). If the value is missing, chaincode caller is used."}),(0,n.IsOptional)(),(0,o.IsUserRef)(),e.__metadata("design:type",String)],_.prototype,"owner",void 0),e.__decorate([(0,i.JSONSchema)({description:"Person/UserId to whom allowance(s) were granted. If the value is missing, chaincode caller is used."}),(0,n.IsOptional)(),(0,o.IsUserRef)(),e.__metadata("design:type",String)],_.prototype,"grantedTo",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token collection. Optional."}),(0,n.ValidateIf)(e=>!!e.category),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],_.prototype,"collection",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token category. Optional, and ignored if collection is not provided."}),(0,n.ValidateIf)(e=>!!e.type),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],_.prototype,"category",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token type. Optional, and ignored if category is not provded."}),(0,n.ValidateIf)(e=>!!e.additionalKey),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],_.prototype,"type",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token additionalKey. Optional, and ignored if type is not provided."}),(0,n.IsOptional)(),e.__metadata("design:type",String)],_.prototype,"additionalKey",void 0),e.__decorate([(0,i.JSONSchema)({description:"AllowanceType to check. Default: Use (0)"}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",Number)],_.prototype,"allowanceType",void 0),WS.FullAllowanceCheckDto=_=e.__decorate([(0,i.JSONSchema)({description:"Fetch one or more balances, verify all owned TokenInstances have at least one available allowance of the specified type. Any token instance key(s) with no available allowances will be returned in the response."})],_);let v=class extends u.ChainCallDTO{};WS.FullAllowanceCheckResDto=v,e.__decorate([(0,i.JSONSchema)({description:"True if all resulting token(s) have active/un-expired allowances available."}),(0,n.IsBoolean)(),e.__metadata("design:type",Boolean)],v.prototype,"all",void 0),e.__decorate([(0,i.JSONSchema)({description:"TokenInstanceKey(s) of any tokens missing the requested AllowanceType."}),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>s.TokenInstanceKey),(0,n.ArrayNotEmpty)(),e.__metadata("design:type",Array)],v.prototype,"missing",void 0),WS.FullAllowanceCheckResDto=v=e.__decorate([(0,i.JSONSchema)({description:"Response Data Transfer Object for FullLockAllowance request."})],v);let b=class extends u.ChainCallDTO{};WS.RefreshAllowanceDto=b,e.__decorate([(0,r.Type)(()=>c.AllowanceKey),(0,n.IsNotEmpty)(),e.__metadata("design:type",c.AllowanceKey)],b.prototype,"allowanceKey",void 0),e.__decorate([(0,o.BigNumberIsPositive)(),(0,o.BigNumberIsInteger)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],b.prototype,"uses",void 0),e.__decorate([(0,n.Min)(0),(0,n.IsInt)(),e.__metadata("design:type",Number)],b.prototype,"expires",void 0),WS.RefreshAllowanceDto=b=e.__decorate([(0,i.JSONSchema)({description:"Refresh the uses or expiration date of an existing allowance. If quantity needs updating, grant a new allowance instead."})],b);let S=class extends u.SubmitCallDTO{};return WS.RefreshAllowancesDto=S,e.__decorate([(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>b),(0,n.ArrayNotEmpty)(),e.__metadata("design:type",Array)],S.prototype,"allowances",void 0),WS.RefreshAllowancesDto=S=e.__decorate([(0,i.JSONSchema)({description:"Refresh the uses or expiration date of an existing allowance. If quantity needs updating, grant a new allowance instead."})],S),WS}var eI,tI={};function rI(){if(eI)return tI;eI=1,Object.defineProperty(tI,"__esModule",{value:!0}),tI.TokenClaim=void 0;const e=Re,t=mt,r=At,n=uy,i=Mv(),o=Uv(),a=Zv(),d=KS();let s=class extends a.ChainObject{};return tI.TokenClaim=s,s.INDEX_KEY="GCTC",e.__decorate([(0,i.ChainKey)({position:0}),(0,o.IsUserAlias)(),e.__metadata("design:type",String)],s.prototype,"ownerKey",void 0),e.__decorate([(0,i.ChainKey)({position:1}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],s.prototype,"collection",void 0),e.__decorate([(0,i.ChainKey)({position:2}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],s.prototype,"category",void 0),e.__decorate([(0,i.ChainKey)({position:3}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],s.prototype,"type",void 0),e.__decorate([(0,i.ChainKey)({position:4}),(0,n.IsDefined)(),e.__metadata("design:type",String)],s.prototype,"additionalKey",void 0),e.__decorate([(0,i.ChainKey)({position:5}),(0,n.IsNotEmpty)(),(0,o.BigNumberIsInteger)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.BigNumber)],s.prototype,"instance",void 0),e.__decorate([(0,i.ChainKey)({position:6}),(0,o.EnumProperty)(d.AllowanceType),e.__metadata("design:type",Number)],s.prototype,"action",void 0),e.__decorate([(0,i.ChainKey)({position:7}),(0,o.IsUserAlias)(),e.__metadata("design:type",String)],s.prototype,"issuerKey",void 0),e.__decorate([(0,i.ChainKey)({position:8}),(0,n.IsPositive)(),(0,n.IsInt)(),e.__metadata("design:type",Number)],s.prototype,"allowanceCreated",void 0),e.__decorate([(0,i.ChainKey)({position:9}),(0,o.BigNumberIsNotNegative)(),(0,o.BigNumberIsInteger)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.BigNumber)],s.prototype,"claimSequence",void 0),e.__decorate([(0,n.IsPositive)(),(0,n.IsInt)(),e.__metadata("design:type",Number)],s.prototype,"created",void 0),e.__decorate([(0,n.IsNotEmpty)(),(0,o.BigNumberIsNotNegative)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.BigNumber)],s.prototype,"quantity",void 0),e.__decorate([(0,r.Exclude)(),e.__metadata("design:type",Object)],s,"INDEX_KEY",void 0),tI}var nI,iI={};function oI(){if(nI)return iI;nI=1,Object.defineProperty(iI,"__esModule",{value:!0}),iI.TokenBurn=void 0;const e=Re,t=mt,r=At,n=uy,i=Mv(),o=Uv(),a=Zv();let d=class extends a.ChainObject{};return iI.TokenBurn=d,d.INDEX_KEY="GCTBR",e.__decorate([(0,i.ChainKey)({position:0}),(0,o.IsUserAlias)(),e.__metadata("design:type",String)],d.prototype,"burnedBy",void 0),e.__decorate([(0,i.ChainKey)({position:1}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],d.prototype,"collection",void 0),e.__decorate([(0,i.ChainKey)({position:2}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],d.prototype,"category",void 0),e.__decorate([(0,i.ChainKey)({position:3}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],d.prototype,"type",void 0),e.__decorate([(0,i.ChainKey)({position:4}),(0,n.IsDefined)(),e.__metadata("design:type",String)],d.prototype,"additionalKey",void 0),e.__decorate([(0,i.ChainKey)({position:5}),(0,n.IsNotEmpty)(),(0,o.BigNumberIsInteger)(),(0,o.BigNumberIsNotNegative)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.BigNumber)],d.prototype,"instance",void 0),e.__decorate([(0,i.ChainKey)({position:6}),(0,n.IsPositive)(),(0,n.IsInt)(),e.__metadata("design:type",Number)],d.prototype,"created",void 0),e.__decorate([(0,n.IsNotEmpty)(),(0,o.BigNumberIsNotNegative)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.BigNumber)],d.prototype,"quantity",void 0),e.__decorate([(0,r.Exclude)(),e.__metadata("design:type",Object)],d,"INDEX_KEY",void 0),iI}var aI,dI={};function sI(){if(aI)return dI;aI=1,Object.defineProperty(dI,"__esModule",{value:!0}),dI.TokenBurnCounter=void 0;const e=Re,t=mt,r=At,n=uy,i=Mv(),o=Uv(),a=Zv(),d=Ab();let s=class extends d.RangedChainObject{referencedBurnId(){const{collection:e,category:t,type:r,additionalKey:n,burnedBy:i,created:o}=this;return a.ChainObject.getStringKeyFromParts([i,e,t,r,n,i,`${o}`])}};return dI.TokenBurnCounter=s,s.INDEX_KEY="GCTBRC",e.__decorate([(0,i.ChainKey)({position:0}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],s.prototype,"collection",void 0),e.__decorate([(0,i.ChainKey)({position:1}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],s.prototype,"category",void 0),e.__decorate([(0,i.ChainKey)({position:2}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],s.prototype,"type",void 0),e.__decorate([(0,i.ChainKey)({position:3}),(0,n.IsDefined)(),e.__metadata("design:type",String)],s.prototype,"additionalKey",void 0),e.__decorate([(0,i.ChainKey)({position:4}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],s.prototype,"timeKey",void 0),e.__decorate([(0,i.ChainKey)({position:5}),(0,o.IsUserAlias)(),e.__metadata("design:type",String)],s.prototype,"burnedBy",void 0),e.__decorate([(0,i.ChainKey)({position:6}),(0,n.IsNotEmpty)(),(0,o.BigNumberIsInteger)(),(0,o.BigNumberIsNotNegative)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.BigNumber)],s.prototype,"instance",void 0),e.__decorate([(0,i.ChainKey)({position:7}),(0,n.IsNotEmpty)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.BigNumber)],s.prototype,"totalKnownBurnsCount",void 0),e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",Number)],s.prototype,"created",void 0),e.__decorate([(0,n.IsNotEmpty)(),(0,o.BigNumberIsNotNegative)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.BigNumber)],s.prototype,"quantity",void 0),e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],s.prototype,"referenceId",void 0),e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],s.prototype,"epoch",void 0),e.__decorate([(0,r.Exclude)(),e.__metadata("design:type",Function),e.__metadata("design:paramtypes",[]),e.__metadata("design:returntype",String)],s.prototype,"referencedBurnId",null),dI}var cI,uI={};function lI(){if(cI)return uI;cI=1,Object.defineProperty(uI,"__esModule",{value:!0}),uI.BurnTokenQuantity=void 0;const e=Re,t=e.__importDefault(mt),r=At,n=uy,i=Uv(),o=ab();let a=class{};return uI.BurnTokenQuantity=a,e.__decorate([(0,n.ValidateNested)(),(0,r.Type)(()=>o.TokenInstanceKey),(0,n.IsNotEmpty)(),e.__metadata("design:type",o.TokenInstanceKey)],a.prototype,"tokenInstanceKey",void 0),e.__decorate([(0,i.BigNumberIsNotNegative)(),(0,i.BigNumberProperty)(),e.__metadata("design:type",t.default)],a.prototype,"quantity",void 0),uI}var fI,pI={};function hI(){if(fI)return pI;fI=1,Object.defineProperty(pI,"__esModule",{value:!0}),pI.LockTokenQuantity=void 0;const e=Re,t=e.__importDefault(mt),r=At,n=uy,i=Ey(),o=Uv(),a=ab();let d=class{};return pI.LockTokenQuantity=d,e.__decorate([(0,n.ValidateNested)(),(0,r.Type)(()=>a.TokenInstanceKey),(0,n.IsNotEmpty)(),e.__metadata("design:type",a.TokenInstanceKey)],d.prototype,"tokenInstanceKey",void 0),e.__decorate([(0,o.BigNumberIsNotNegative)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],d.prototype,"quantity",void 0),e.__decorate([(0,i.JSONSchema)({description:"The current owner of tokens. If the value is missing, chaincode caller is used."}),(0,n.IsOptional)(),(0,o.IsUserRef)(),e.__metadata("design:type",String)],d.prototype,"owner",void 0),pI}var yI,mI={};function gI(){if(yI)return mI;yI=1,Object.defineProperty(mI,"__esModule",{value:!0}),mI.UnlockTokensDto=mI.UnlockTokenDto=mI.LockTokensDto=mI.LockTokenDto=void 0;const e=Re,t=e.__importDefault(mt),r=At,n=uy,i=Ey(),o=Uv(),a=hI(),d=ab(),s=ib();let c=class extends s.SubmitCallDTO{};mI.LockTokenDto=c,e.__decorate([(0,i.JSONSchema)({description:"The current owner of tokens. If the value is missing, chaincode caller is used."}),(0,n.IsOptional)(),(0,o.IsUserRef)(),e.__metadata("design:type",String)],c.prototype,"owner",void 0),e.__decorate([(0,i.JSONSchema)({description:"User who will be able to unlock token. If the value is missing, then token owner and lock creator can unlock in all cases token authority can unlock token."}),(0,n.IsOptional)(),(0,o.IsUserRef)(),e.__metadata("design:type",String)],c.prototype,"lockAuthority",void 0),e.__decorate([(0,i.JSONSchema)({description:`Token instance of token to be locked. In case of fungible tokens, tokenInstance.instance field should be set to ${d.TokenInstance.FUNGIBLE_TOKEN_INSTANCE}.`}),(0,n.ValidateNested)(),(0,r.Type)(()=>d.TokenInstanceKey),(0,n.IsNotEmpty)(),e.__metadata("design:type",d.TokenInstanceKey)],c.prototype,"tokenInstance",void 0),e.__decorate([(0,i.JSONSchema)({description:"The quantity of token units to be locked."}),(0,o.BigNumberIsNotNegative)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],c.prototype,"quantity",void 0),e.__decorate([(0,i.JSONSchema)({description:"Allowance ids to be used on lock (optional)."}),(0,n.IsString)({each:!0}),(0,n.IsOptional)(),(0,n.ArrayNotEmpty)(),(0,n.ArrayUnique)(),e.__metadata("design:type",Array)],c.prototype,"useAllowances",void 0),e.__decorate([(0,i.JSONSchema)({description:"vestingPeriodStart timestamp. For Vesting Locks, this specifies the beginning of the vesting period."}),(0,n.Min)(0),(0,n.IsInt)(),(0,n.IsOptional)(),e.__metadata("design:type",Object)],c.prototype,"vestingPeriodStart",void 0),mI.LockTokenDto=c=e.__decorate([(0,i.JSONSchema)({description:"Describes an action to lock a token."})],c);let u=class extends s.SubmitCallDTO{};mI.LockTokensDto=u,e.__decorate([(0,i.JSONSchema)({description:"User who will be able to unlock token. If the value is missing, then token owner and lock creator can unlock in all cases token authority can unlock token."}),(0,n.IsOptional)(),(0,o.IsUserRef)(),e.__metadata("design:type",String)],u.prototype,"lockAuthority",void 0),e.__decorate([(0,i.JSONSchema)({description:`Array of token instances of token to be locked. In case of fungible tokens, tokenInstance.instance field should be set to ${d.TokenInstance.FUNGIBLE_TOKEN_INSTANCE}.`}),(0,n.ArrayNotEmpty)(),(0,r.Type)(()=>a.LockTokenQuantity),(0,n.ValidateNested)({each:!0}),e.__metadata("design:type",Array)],u.prototype,"tokenInstances",void 0),e.__decorate([(0,i.JSONSchema)({description:"Allowance ids to be used on lock (optional)."}),(0,n.IsString)({each:!0}),(0,n.IsOptional)(),(0,n.ArrayNotEmpty)(),(0,n.ArrayUnique)(),e.__metadata("design:type",Array)],u.prototype,"useAllowances",void 0),e.__decorate([(0,i.JSONSchema)({description:"Name for the token holds (optional). This name will be applied to all token holds created by this Lock."}),(0,n.IsString)(),(0,n.IsOptional)(),e.__metadata("design:type",String)],u.prototype,"name",void 0),e.__decorate([(0,i.JSONSchema)({description:"Expiration timestamp. The TokenHold will expire at this time. This name will be applied to all token holds created by this Lock."}),(0,n.Min)(0),(0,n.IsInt)(),(0,n.IsOptional)(),e.__metadata("design:type",Number)],u.prototype,"expires",void 0),mI.LockTokensDto=u=e.__decorate([(0,i.JSONSchema)({description:"Describes an action to lock multiple tokens."})],u);let l=class extends s.SubmitCallDTO{};mI.UnlockTokenDto=l,e.__decorate([(0,i.JSONSchema)({description:"Token instance of token to be unlocked."}),(0,n.ValidateNested)(),(0,r.Type)(()=>d.TokenInstanceKey),(0,n.IsNotEmpty)(),e.__metadata("design:type",d.TokenInstanceKey)],l.prototype,"tokenInstance",void 0),e.__decorate([(0,i.JSONSchema)({description:"Optional quantity for unlocking fungible tokens. Not for use with NFT token instances."}),(0,n.IsOptional)(),(0,n.ValidateIf)(e=>e.tokenInstance.instance===d.TokenInstance.FUNGIBLE_TOKEN_INSTANCE),(0,o.BigNumberIsPositive)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],l.prototype,"quantity",void 0),e.__decorate([(0,i.JSONSchema)({description:"Optional. Owner of the token. Calling User by default. Usable by Token Authorities only."}),(0,n.IsOptional)(),(0,o.IsUserRef)(),e.__metadata("design:type",String)],l.prototype,"owner",void 0),e.__decorate([(0,i.JSONSchema)({description:"Optional. name property of the lockedHold defined on the balance. undefined by default. Usable by Token Authorities only."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],l.prototype,"lockedHoldName",void 0),mI.UnlockTokenDto=l=e.__decorate([(0,i.JSONSchema)({description:"Describes an action to unlock a token."})],l);let f=class extends s.SubmitCallDTO{};return mI.UnlockTokensDto=f,e.__decorate([(0,i.JSONSchema)({description:`Array of token instances of token to be locked. In case of fungible tokens, tokenInstance.instance field should be set to ${d.TokenInstance.FUNGIBLE_TOKEN_INSTANCE}.`}),(0,n.ArrayNotEmpty)(),(0,r.Type)(()=>a.LockTokenQuantity),(0,n.ValidateNested)({each:!0}),e.__metadata("design:type",Array)],f.prototype,"tokenInstances",void 0),e.__decorate([(0,i.JSONSchema)({description:"Name for the token holds (optional). Only token holds with this name will be Unlocked if provided."}),(0,n.IsString)(),(0,n.IsOptional)(),e.__metadata("design:type",String)],f.prototype,"name",void 0),mI.UnlockTokensDto=f=e.__decorate([(0,i.JSONSchema)({description:"Describes an action to unlock multiple tokens."})],f),mI}var _I,vI={};function bI(){if(_I)return vI;_I=1,Object.defineProperty(vI,"__esModule",{value:!0}),vI.UseTokenDto=vI.ReleaseTokenDto=void 0;const e=Re,t=e.__importDefault(mt),r=At,n=uy,i=Ey(),o=Uv(),a=ab(),d=ib();let s=class extends d.SubmitCallDTO{};vI.ReleaseTokenDto=s,e.__decorate([(0,i.JSONSchema)({description:"Token instance of token to be released."}),(0,n.ValidateNested)(),(0,r.Type)(()=>a.TokenInstanceKey),(0,n.IsNotEmpty)(),e.__metadata("design:type",a.TokenInstanceKey)],s.prototype,"tokenInstance",void 0),vI.ReleaseTokenDto=s=e.__decorate([(0,i.JSONSchema)({description:"Describes an action to release a token that is in use."})],s);let c=class extends d.SubmitCallDTO{};return vI.UseTokenDto=c,e.__decorate([(0,i.JSONSchema)({description:"The current owner of tokens. If the value is missing, chaincode caller is used."}),(0,n.IsOptional)(),(0,o.IsUserRef)(),e.__metadata("design:type",String)],c.prototype,"owner",void 0),e.__decorate([(0,i.JSONSchema)({description:"The user who is going to use token."}),(0,o.IsUserRef)(),e.__metadata("design:type",String)],c.prototype,"inUseBy",void 0),e.__decorate([(0,i.JSONSchema)({description:`Token instance of token to be used. In case of fungible tokens, tokenInstance.instance field should be set to ${a.TokenInstance.FUNGIBLE_TOKEN_INSTANCE}.`}),(0,n.ValidateNested)(),(0,r.Type)(()=>a.TokenInstanceKey),(0,n.IsNotEmpty)(),e.__metadata("design:type",a.TokenInstanceKey)],c.prototype,"tokenInstance",void 0),e.__decorate([(0,i.JSONSchema)({description:"The quantity of token units to be used."}),(0,n.IsNotEmpty)(),(0,o.BigNumberIsNotNegative)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],c.prototype,"quantity",void 0),e.__decorate([(0,i.JSONSchema)({description:"Allowance ids to be used (optional)."}),(0,n.IsString)({each:!0}),(0,n.IsOptional)(),(0,n.ArrayNotEmpty)(),(0,n.ArrayUnique)(),e.__metadata("design:type",Array)],c.prototype,"useAllowances",void 0),vI.UseTokenDto=c=e.__decorate([(0,i.JSONSchema)({description:"Describes an action to use a token."})],c),vI}var SI,II,NI,$I={},wI={},AI={};function OI(){if(SI)return AI;SI=1,Object.defineProperty(AI,"__esModule",{value:!0}),AI.TokenMintConfiguration=AI.MintFeeConfiguration=AI.BurnToMintConfiguration=AI.PostMintLockConfiguration=void 0;const e=Re,t=e.__importDefault(mt),r=At,n=uy,i=Mv(),o=Uv(),a=Zv();class d extends a.ChainObject{}AI.PostMintLockConfiguration=d,e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],d.prototype,"lockName",void 0),e.__decorate([(0,n.IsNotEmpty)(),(0,o.IsUserAlias)(),e.__metadata("design:type",String)],d.prototype,"lockAuthority",void 0),e.__decorate([(0,n.IsNumber)(),(0,n.IsInt)(),e.__metadata("design:type",Number)],d.prototype,"expirationModifier",void 0),e.__decorate([(0,n.IsNumber)(),(0,n.Min)(0),(0,n.Max)(1),e.__metadata("design:type",Number)],d.prototype,"lockPercentage",void 0);class s extends a.ChainObject{}AI.BurnToMintConfiguration=s,e.__decorate([(0,n.IsNumber)(),(0,n.Min)(0),(0,n.Max)(1),e.__metadata("design:type",Number)],s.prototype,"burnPercentage",void 0);class c extends a.ChainObject{}AI.MintFeeConfiguration=c,e.__decorate([(0,n.IsOptional)(),(0,o.BigNumberProperty)(),(0,o.BigNumberIsPositive)(),e.__metadata("design:type",t.default)],c.prototype,"flatFee",void 0);let u=class extends a.ChainObject{validatePostProcessingTotals(){var e,t;const r=null===(e=this.postMintBurn)||void 0===e?void 0:e.burnPercentage,n=null===(t=this.postMintLock)||void 0===t?void 0:t.lockPercentage;if(void 0!==r){if(void 0!==n&&n>1-r)throw new i.ValidationFailedError(`TokenMintConfiguration specified a combined post-processing total greater than 1 (100%): lockPercentage: ${n}, burnPercentage: ${r}`)}}};return AI.TokenMintConfiguration=u,u.INDEX_KEY="GCTMC",e.__decorate([(0,i.ChainKey)({position:0}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],u.prototype,"collection",void 0),e.__decorate([(0,i.ChainKey)({position:1}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],u.prototype,"category",void 0),e.__decorate([(0,i.ChainKey)({position:2}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],u.prototype,"type",void 0),e.__decorate([(0,i.ChainKey)({position:3}),(0,n.IsDefined)(),e.__metadata("design:type",String)],u.prototype,"additionalKey",void 0),e.__decorate([(0,n.IsOptional)(),(0,n.ValidateNested)(),(0,r.Type)(()=>s),e.__metadata("design:type",s)],u.prototype,"preMintBurn",void 0),e.__decorate([(0,n.IsOptional)(),(0,n.ValidateNested)(),(0,r.Type)(()=>s),e.__metadata("design:type",s)],u.prototype,"postMintBurn",void 0),e.__decorate([(0,n.IsOptional)(),(0,n.ValidateNested)(),(0,r.Type)(()=>d),e.__metadata("design:type",d)],u.prototype,"postMintLock",void 0),e.__decorate([(0,n.IsOptional)(),(0,n.ValidateNested)(),(0,r.Type)(()=>c),e.__metadata("design:type",c)],u.prototype,"additionalFee",void 0),e.__decorate([(0,r.Exclude)(),e.__metadata("design:type",Function),e.__metadata("design:paramtypes",[]),e.__metadata("design:returntype",void 0)],u.prototype,"validatePostProcessingTotals",null),AI}function MI(){if(II)return wI;II=1,Object.defineProperty(wI,"__esModule",{value:!0}),wI.DeleteTokenMintConfigurationDto=wI.FetchTokenMintConfigurationsResponse=wI.FetchTokenMintConfigurationsDto=wI.TokenMintConfigurationDto=wI.PatchMintRequestDto=wI.PatchMintAllowanceRequestDto=wI.FetchTokenSupplyResponse=wI.FetchTokenSupplyDto=wI.FetchMintRequestsDto=wI.FulfillMintDto=wI.HighThroughputMintTokenDto=wI.BatchMintTokenDto=wI.MintTokenWithAllowanceDto=wI.MintTokenDto=void 0;const e=Re,t=e.__importDefault(mt),r=At,n=uy,i=Ey(),o=Uv(),a=ob(),d=OI(),s=KS(),c=ib();let u=class extends c.SubmitCallDTO{};wI.MintTokenDto=u,u.MAX_NFT_MINT_SIZE=1e3,e.__decorate([(0,i.JSONSchema)({description:"Token class of token to be minted."}),(0,n.ValidateNested)(),(0,r.Type)(()=>a.TokenClassKey),(0,n.IsNotEmpty)(),e.__metadata("design:type",a.TokenClassKey)],u.prototype,"tokenClass",void 0),e.__decorate([(0,i.JSONSchema)({description:"The owner of minted tokens. If the value is missing, chaincode caller is used."}),(0,n.IsOptional)(),(0,o.IsUserRef)(),e.__metadata("design:type",String)],u.prototype,"owner",void 0),e.__decorate([(0,i.JSONSchema)({description:"How many units of Fungible/NonFungible Token will be minted."}),(0,n.IsNotEmpty)(),(0,o.BigNumberIsNotNegative)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],u.prototype,"quantity",void 0),e.__decorate([(0,n.IsOptional)(),(0,r.Type)(()=>s.AllowanceKey),(0,n.IsNotEmpty)(),e.__metadata("design:type",s.AllowanceKey)],u.prototype,"allowanceKey",void 0),wI.MintTokenDto=u=e.__decorate([(0,i.JSONSchema)({description:`Describes an action to mint a token. For NFTs you can mint up to ${u.MAX_NFT_MINT_SIZE} tokens.`})],u);let l=class extends c.SubmitCallDTO{};wI.MintTokenWithAllowanceDto=l,e.__decorate([(0,i.JSONSchema)({description:"Token class of token to be minted."}),(0,n.ValidateNested)(),(0,r.Type)(()=>a.TokenClassKey),(0,n.IsNotEmpty)(),e.__metadata("design:type",a.TokenClassKey)],l.prototype,"tokenClass",void 0),e.__decorate([(0,i.JSONSchema)({description:"The owner of minted tokens. If the value is missing, chaincode caller is used."}),(0,n.IsOptional)(),(0,o.IsUserRef)(),e.__metadata("design:type",String)],l.prototype,"owner",void 0),e.__decorate([(0,i.JSONSchema)({description:"Instance of token to be minted"}),(0,n.IsNotEmpty)(),(0,o.BigNumberIsNotNegative)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],l.prototype,"tokenInstance",void 0),e.__decorate([(0,i.JSONSchema)({description:"How many units of Fungible/NonFungible Token will be minted."}),(0,n.IsNotEmpty)(),(0,o.BigNumberIsNotNegative)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],l.prototype,"quantity",void 0),wI.MintTokenWithAllowanceDto=l=e.__decorate([(0,i.JSONSchema)({description:"Describes an action to grant allowance to self and mint token to owner in single transaction. This action will fail is the calling user lacks the authority to grant MINT allowances."})],l);let f=class extends c.SubmitCallDTO{};wI.BatchMintTokenDto=f,f.MAX_ARR_SIZE=1e3,e.__decorate([(0,i.JSONSchema)({description:"DTOs of tokens to mint."}),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>u),(0,n.ArrayNotEmpty)(),(0,n.ArrayMaxSize)(f.MAX_ARR_SIZE),e.__metadata("design:type",Array)],f.prototype,"mintDtos",void 0),wI.BatchMintTokenDto=f=e.__decorate([(0,i.JSONSchema)({description:`Describes an action to transferToken a token. For NFTs you can mint up to ${u.MAX_NFT_MINT_SIZE} tokens.`})],f);let p=class extends c.SubmitCallDTO{};wI.HighThroughputMintTokenDto=p,p.MAX_NFT_MINT_SIZE=1e3,e.__decorate([(0,i.JSONSchema)({description:"Token class of token to be minted."}),(0,n.ValidateNested)(),(0,r.Type)(()=>a.TokenClassKey),(0,n.IsNotEmpty)(),e.__metadata("design:type",a.TokenClassKey)],p.prototype,"tokenClass",void 0),e.__decorate([(0,i.JSONSchema)({description:"The owner of minted tokens. If the value is missing, chaincode caller is used."}),(0,n.IsOptional)(),(0,o.IsUserRef)(),e.__metadata("design:type",String)],p.prototype,"owner",void 0),e.__decorate([(0,i.JSONSchema)({description:"How many units of fungible token of how many NFTs are going to be minted."}),(0,n.IsNotEmpty)(),(0,o.BigNumberIsNotNegative)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],p.prototype,"quantity",void 0),e.__decorate([(0,n.IsOptional)(),(0,r.Type)(()=>s.AllowanceKey),(0,n.IsNotEmpty)(),e.__metadata("design:type",s.AllowanceKey)],p.prototype,"allowanceKey",void 0),wI.HighThroughputMintTokenDto=p=e.__decorate([(0,i.JSONSchema)({description:"Experimental: Describes an action to mint a token. High-throughput implementation. DTO properties backwards-compatible with prior MintTokenDto,"})],p);let h=class extends c.SubmitCallDTO{};wI.FulfillMintDto=h,h.MAX_ARR_SIZE=1e3,e.__decorate([(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>s.MintRequestDto),(0,n.ArrayNotEmpty)(),(0,n.ArrayMaxSize)(h.MAX_ARR_SIZE),(0,o.ArrayUniqueObjects)("id"),e.__metadata("design:type",Array)],h.prototype,"requests",void 0),wI.FulfillMintDto=h=e.__decorate([(0,i.JSONSchema)({description:"Experimental: After submitting request to RequestMintAllowance, follow up with FulfillMintAllowance."})],h);let y=class extends c.ChainCallDTO{};wI.FetchMintRequestsDto=y,e.__decorate([(0,i.JSONSchema)({description:"Token collection."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],y.prototype,"collection",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token category."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],y.prototype,"category",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token type."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],y.prototype,"type",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token additionalKey."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],y.prototype,"additionalKey",void 0),e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",Number)],y.prototype,"startTimestamp",void 0),e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",Number)],y.prototype,"endTimestamp",void 0),wI.FetchMintRequestsDto=y=e.__decorate([(0,i.JSONSchema)({description:"Fetch MintRequest or MintAllowanceRequest objects off chain."})],y);let m=class extends c.ChainCallDTO{};wI.FetchTokenSupplyDto=m,e.__decorate([(0,i.JSONSchema)({description:"Token collection."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],m.prototype,"collection",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token category."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],m.prototype,"category",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token type."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],m.prototype,"type",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token additionalKey."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],m.prototype,"additionalKey",void 0),wI.FetchTokenSupplyDto=m=e.__decorate([(0,i.JSONSchema)({description:"Fetch Mint, Burn or Mint Allowance supply totals off chain."})],m);let g=class extends c.ChainCallDTO{};wI.FetchTokenSupplyResponse=g,e.__decorate([(0,i.JSONSchema)({description:"Total known supply at time of chaincode execution."}),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],g.prototype,"supply",void 0),wI.FetchTokenSupplyResponse=g=e.__decorate([(0,i.JSONSchema)({description:"Fetch MintRequest or MintAllowanceRequest objects off chain and return the supply."})],g);let _=class extends c.SubmitCallDTO{};wI.PatchMintAllowanceRequestDto=_,e.__decorate([(0,i.JSONSchema)({description:"Token collection."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],_.prototype,"collection",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token category."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],_.prototype,"category",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token type."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],_.prototype,"type",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token additionalKey."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],_.prototype,"additionalKey",void 0),e.__decorate([(0,i.JSONSchema)({description:"The total known mint allowances count."}),(0,n.IsNotEmpty)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],_.prototype,"totalKnownMintAllowancesCount",void 0),wI.PatchMintAllowanceRequestDto=_=e.__decorate([(0,i.JSONSchema)({description:"Write a MintAllowanceRequest object to chain. Designed to patch, update, or correct the known total supply. An administrative / token authority can patch in the chain objects needed with an off-chain, correctly-calculated total supply such that ongoing high throughput mints/mint allowances are migrated to a correct running total."})],_);let v=class extends c.SubmitCallDTO{};wI.PatchMintRequestDto=v,e.__decorate([(0,i.JSONSchema)({description:"Token collection."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],v.prototype,"collection",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token category."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],v.prototype,"category",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token type."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],v.prototype,"type",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token additionalKey."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],v.prototype,"additionalKey",void 0),e.__decorate([(0,i.JSONSchema)({description:"The total known mint allowances count."}),(0,n.IsNotEmpty)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],v.prototype,"totalKnownMintsCount",void 0),wI.PatchMintRequestDto=v=e.__decorate([(0,i.JSONSchema)({description:"Write MintRequest objects to chain. Designed to patch, update, or correct the known total supply. An administrative / token authority can patch in the chain objects needed with an off-chain, correctly-calculated total supply such that ongoing high throughput mints/mint allowances are migrated to a correct running total."})],v);let b=class extends c.SubmitCallDTO{};wI.TokenMintConfigurationDto=b,e.__decorate([(0,i.JSONSchema)({description:"Token collection."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],b.prototype,"collection",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token category."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],b.prototype,"category",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token type."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],b.prototype,"type",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token additionalKey."}),(0,n.IsDefined)(),e.__metadata("design:type",String)],b.prototype,"additionalKey",void 0),e.__decorate([(0,i.JSONSchema)({description:"(optional) Specify a `BurnToMintConfiguration` to require a burn equal to a percentage of the quantity to-be-minted prior to executing the mint action."}),(0,n.IsOptional)(),(0,n.ValidateNested)(),(0,r.Type)(()=>d.BurnToMintConfiguration),e.__metadata("design:type",d.BurnToMintConfiguration)],b.prototype,"preMintBurn",void 0),e.__decorate([(0,i.JSONSchema)({description:"(optional) Specify a `BurnToMintConfiguration` to enable burning a percentage of each quantity minted"}),(0,n.IsOptional)(),(0,n.ValidateNested)(),(0,r.Type)(()=>d.BurnToMintConfiguration),e.__metadata("design:type",d.BurnToMintConfiguration)],b.prototype,"postMintBurn",void 0),e.__decorate([(0,i.JSONSchema)({description:"(optional) Specify a `PostMintLockConfiguration` to enable locking a percentage of each quantity minted"}),(0,n.IsOptional)(),(0,n.ValidateNested)(),(0,r.Type)(()=>d.PostMintLockConfiguration),e.__metadata("design:type",d.PostMintLockConfiguration)],b.prototype,"postMintLock",void 0),e.__decorate([(0,i.JSONSchema)({description:"(optional) Specify a `MintFeeConfiguration` to define additional properties that affect $GALA `MintToken` fees"}),(0,n.IsOptional)(),(0,n.ValidateNested)(),(0,r.Type)(()=>d.MintFeeConfiguration),e.__metadata("design:type",d.MintFeeConfiguration)],b.prototype,"additionalFee",void 0),wI.TokenMintConfigurationDto=b=e.__decorate([(0,i.JSONSchema)({description:"DTO that describes a TokenMintConfiguration chain object."})],b);let S=class extends c.ChainCallDTO{};wI.FetchTokenMintConfigurationsDto=S,S.DEFAULT_LIMIT=100,S.MAX_LIMIT=1e4,e.__decorate([(0,i.JSONSchema)({description:"Token Class collection."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],S.prototype,"collection",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token Class category. Optional, but required if collection is provided."}),(0,n.ValidateIf)(e=>!!e.collection),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],S.prototype,"category",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token Class type. Optional, but required if category is provided."}),(0,n.ValidateIf)(e=>!!e.category),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],S.prototype,"type",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token Class additionalKey. Optional, but required if type is provided. "}),(0,n.ValidateIf)(e=>!!e.type),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],S.prototype,"additionalKey",void 0),e.__decorate([(0,i.JSONSchema)({description:"Bookmark for paginated queries. Provide the empty string for the first page of results."}),(0,n.IsString)(),e.__metadata("design:type",String)],S.prototype,"bookmark",void 0),e.__decorate([(0,i.JSONSchema)({description:"Page size used to limit the results returned. Default: 100. Max: 10000."}),(0,n.IsOptional)(),(0,n.IsNumber)(),e.__metadata("design:type",Number)],S.prototype,"limit",void 0),wI.FetchTokenMintConfigurationsDto=S=e.__decorate([(0,i.JSONSchema)({description:"Query parameters for fetching a paginated results set of TokenMintConfiguration entries"})],S);let I=class extends c.ChainCallDTO{};wI.FetchTokenMintConfigurationsResponse=I,e.__decorate([(0,i.JSONSchema)({description:"Results set of TokenMintConfiguration entries."}),e.__metadata("design:type",Array)],I.prototype,"results",void 0),e.__decorate([(0,n.IsString)(),e.__metadata("design:type",String)],I.prototype,"bookmark",void 0),wI.FetchTokenMintConfigurationsResponse=I=e.__decorate([(0,i.JSONSchema)({description:"DTO that includes a paginated results set of TokenMintConfiguration objects"})],I);class N extends c.SubmitCallDTO{}return wI.DeleteTokenMintConfigurationDto=N,e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],N.prototype,"collection",void 0),e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],N.prototype,"category",void 0),e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],N.prototype,"type",void 0),e.__decorate([(0,n.IsDefined)(),e.__metadata("design:type",String)],N.prototype,"additionalKey",void 0),wI}function TI(){if(NI)return $I;NI=1,Object.defineProperty($I,"__esModule",{value:!0}),$I.TokenBurnCounterCompositeKeyDto=$I.FetchBurnCountersResponse=$I.FetchBurnCountersWithPaginationDto=$I.BurnAndMintDto=$I.BurnTokensDto=$I.FetchBurnsDto=void 0;const e=Re,t=e.__importDefault(mt),r=At,n=uy,i=Ey(),o=Uv(),a=lI(),d=sI(),s=ab(),c=ib(),u=MI();let l=class extends c.ChainCallDTO{};$I.FetchBurnsDto=l,e.__decorate([(0,i.JSONSchema)({description:"The user who burned the token."}),(0,o.IsUserRef)(),e.__metadata("design:type",String)],l.prototype,"burnedBy",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token collection. Optional, but required if category is provided."}),(0,n.ValidateIf)(e=>!!e.category),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],l.prototype,"collection",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token category. Optional, but required if type is provided."}),(0,n.ValidateIf)(e=>!!e.type),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],l.prototype,"category",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token type. Optional, but required if additionalKey is provided."}),(0,n.ValidateIf)(e=>!!e.additionalKey),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],l.prototype,"type",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token additionalKey. Optional, but required if instance is provided."}),(0,n.ValidateIf)(e=>!!e.instance),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],l.prototype,"additionalKey",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token instance. Optional, but required if allowanceType is provided."}),(0,n.ValidateIf)(e=>void 0!==e.allowanceType),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],l.prototype,"instance",void 0),e.__decorate([(0,i.JSONSchema)({description:"Created time. Optional."}),(0,n.IsPositive)(),(0,n.IsInt)(),(0,n.IsOptional)(),e.__metadata("design:type",Number)],l.prototype,"created",void 0),$I.FetchBurnsDto=l=e.__decorate([(0,i.JSONSchema)({description:"Contains parameters for fetching burns."})],l);let f=class extends c.SubmitCallDTO{};$I.BurnTokensDto=f,e.__decorate([(0,i.JSONSchema)({description:`Array of token instances of token to be burned. In case of fungible tokens, tokenInstance.instance field should be set to ${s.TokenInstance.FUNGIBLE_TOKEN_INSTANCE} and quantity set to 1.`}),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>a.BurnTokenQuantity),(0,n.ArrayNotEmpty)(),e.__metadata("design:type",Array)],f.prototype,"tokenInstances",void 0),e.__decorate([(0,i.JSONSchema)({description:"Owner of the tokens to be burned. If not provided, the calling user is assumed to be the owner."}),(0,n.IsOptional)(),(0,o.IsUserRef)(),e.__metadata("design:type",String)],f.prototype,"owner",void 0),$I.BurnTokensDto=f=e.__decorate([(0,i.JSONSchema)({description:"Defines burns to be created."})],f);let p=class extends c.SubmitCallDTO{};$I.BurnAndMintDto=p,p.MAX_ARR_SIZE=1e3,e.__decorate([(0,i.JSONSchema)({description:"A valid BurnTokensDto, properly signed by the owner of the tokens to be burned."}),(0,n.ValidateNested)(),(0,r.Type)(()=>f),(0,n.IsNotEmpty)(),e.__metadata("design:type",f)],p.prototype,"burnDto",void 0),e.__decorate([(0,i.JSONSchema)({description:"User ID of the identity that owns the tokens to be burned. The burnDto signature will be validated against this user's public key on chain."}),(0,o.IsUserRef)(),e.__metadata("design:type",String)],p.prototype,"burnOwner",void 0),e.__decorate([(0,i.JSONSchema)({description:"DTOs of tokens to mint."}),(0,n.ValidateNested)(),(0,r.Type)(()=>u.BatchMintTokenDto),(0,n.IsNotEmpty)(),e.__metadata("design:type",u.BatchMintTokenDto)],p.prototype,"mintDto",void 0),$I.BurnAndMintDto=p=e.__decorate([(0,i.JSONSchema)({description:"Permits an atomic burn-to-mint transaction. Supply the token(s) to be burned, and the token(s) to be minted. The `burnDto` and `mintDto` properties should be signed by their respective approving parties: As an example for NFTs, the `burnDto` might be signed by the end user that owns the tokens, while the mintDto is signed by an NFT token authority with the ability to mint NFTs. If the burn is successful, mint the requested token(s).Mints are executed under the identity of the calling user of this function. All operations occur in the same transaction, meaning either all succeed or none are written to chain."})],p);let h=class extends c.ChainCallDTO{};$I.FetchBurnCountersWithPaginationDto=h,h.MAX_LIMIT=1e4,h.DEFAULT_LIMIT=1e3,e.__decorate([(0,i.JSONSchema)({description:"Token collection. Optional, but required if category is provided."}),(0,n.ValidateIf)(e=>!!e.category),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],h.prototype,"collection",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token category. Optional, but required if type is provided."}),(0,n.ValidateIf)(e=>!!e.type),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],h.prototype,"category",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token type. Optional, but required if additionalKey is provided."}),(0,n.ValidateIf)(e=>!!e.additionalKey),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],h.prototype,"type",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token additionalKey. Optional, but required if instance is provided."}),(0,n.ValidateIf)(e=>!!e.instance),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],h.prototype,"additionalKey",void 0),e.__decorate([(0,i.JSONSchema)({description:"Page bookmark. If it is undefined, then the first page is returned."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],h.prototype,"bookmark",void 0),e.__decorate([(0,i.JSONSchema)({description:`Page size limit. Defaults to ${h.DEFAULT_LIMIT}, max possible value ${h.MAX_LIMIT}. Note you will likely get less results than the limit, because the limit is applied before additional filtering.`}),(0,n.IsOptional)(),(0,n.Max)(h.MAX_LIMIT),(0,n.Min)(1),(0,n.IsInt)(),e.__metadata("design:type",Number)],h.prototype,"limit",void 0),$I.FetchBurnCountersWithPaginationDto=h=e.__decorate([(0,i.JSONSchema)({description:"Contains parameters for fetching TokenBurnCounters with pagination."})],h);class y extends c.ChainCallDTO{}$I.FetchBurnCountersResponse=y,e.__decorate([(0,i.JSONSchema)({description:"List of token burn counters."}),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>d.TokenBurnCounter),e.__metadata("design:type",Array)],y.prototype,"results",void 0),e.__decorate([(0,i.JSONSchema)({description:"Next page bookmark."}),(0,n.IsOptional)(),(0,n.IsString)(),e.__metadata("design:type",String)],y.prototype,"nextPageBookmark",void 0);let m=class extends c.ChainCallDTO{};return $I.TokenBurnCounterCompositeKeyDto=m,e.__decorate([(0,i.JSONSchema)({description:"Token collection."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],m.prototype,"collection",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token category."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],m.prototype,"category",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token type."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],m.prototype,"type",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token additionalKey."}),(0,n.IsDefined)(),e.__metadata("design:type",String)],m.prototype,"additionalKey",void 0),e.__decorate([(0,i.JSONSchema)({description:"timeKey of TokenBurnCounter for range reads"}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],m.prototype,"timeKey",void 0),e.__decorate([(0,i.JSONSchema)({description:"burnedBy user."}),(0,o.IsUserRef)(),e.__metadata("design:type",String)],m.prototype,"burnedBy",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token instance."}),(0,n.IsNotEmpty)(),(0,o.BigNumberIsInteger)(),(0,o.BigNumberIsNotNegative)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],m.prototype,"instance",void 0),e.__decorate([(0,i.JSONSchema)({description:"Known burn counts at time of write, discounting concurrent writes that occurred in the same block.."}),(0,n.IsNotEmpty)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],m.prototype,"totalKnownBurnsCount",void 0),$I.TokenBurnCounterCompositeKeyDto=m=e.__decorate([(0,i.JSONSchema)({description:"Key properties representing a TokenBurnCounter."})],m),$I}var EI,CI={};function xI(){if(EI)return CI;EI=1,Object.defineProperty(CI,"__esModule",{value:!0}),CI.CreateNftCollectionDto=CI.FetchNftCollectionAuthorizationsResponse=CI.FetchNftCollectionAuthorizationsWithPaginationDto=CI.FetchNftCollectionAuthorizationDto=CI.RevokeNftCollectionAuthorizationDto=CI.GrantNftCollectionAuthorizationDto=void 0;const e=Re,t=e.__importDefault(mt),r=At,n=uy,i=Ey(),o=Uv(),a=ib();let d=class extends a.SubmitCallDTO{};CI.GrantNftCollectionAuthorizationDto=d,e.__decorate([(0,i.JSONSchema)({description:"The collection name for which authorization is being granted."}),(0,n.IsString)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],d.prototype,"collection",void 0),e.__decorate([(0,i.JSONSchema)({description:"User alias or secp256k1 public key of the user to authorize for creating NFT collections."}),(0,n.IsString)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],d.prototype,"authorizedUser",void 0),CI.GrantNftCollectionAuthorizationDto=d=e.__decorate([(0,i.JSONSchema)({description:"DTO for granting authorization to a user to create NFT collections for a specific collection name."})],d);let s=class extends a.SubmitCallDTO{};CI.RevokeNftCollectionAuthorizationDto=s,e.__decorate([(0,i.JSONSchema)({description:"The collection name for which authorization is being revoked."}),(0,n.IsString)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],s.prototype,"collection",void 0),e.__decorate([(0,i.JSONSchema)({description:"User alias or secp256k1 public key of the user to revoke authorization from."}),(0,n.IsString)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],s.prototype,"authorizedUser",void 0),CI.RevokeNftCollectionAuthorizationDto=s=e.__decorate([(0,i.JSONSchema)({description:"DTO for revoking authorization from a user to create NFT collections for a specific collection name."})],s);let c=class extends a.ChainCallDTO{};CI.FetchNftCollectionAuthorizationDto=c,e.__decorate([(0,i.JSONSchema)({description:"The collection name to fetch authorization for."}),(0,n.IsString)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],c.prototype,"collection",void 0),CI.FetchNftCollectionAuthorizationDto=c=e.__decorate([(0,i.JSONSchema)({description:"DTO for fetching authorization information for a specific collection name."})],c);let u=class extends a.ChainCallDTO{};CI.FetchNftCollectionAuthorizationsWithPaginationDto=u,u.DEFAULT_LIMIT=100,e.__decorate([(0,i.JSONSchema)({description:"Optional bookmark for pagination. Use the bookmark from the previous response to fetch the next page."}),(0,n.IsString)(),(0,n.IsOptional)(),e.__metadata("design:type",String)],u.prototype,"bookmark",void 0),e.__decorate([(0,i.JSONSchema)({description:"Optional limit for the number of results to return per page."}),(0,n.IsNumber)(),(0,n.IsOptional)(),e.__metadata("design:type",Number)],u.prototype,"limit",void 0),CI.FetchNftCollectionAuthorizationsWithPaginationDto=u=e.__decorate([(0,i.JSONSchema)({description:"DTO for fetching all NFT collection authorizations with pagination support."})],u);let l=class extends a.ChainCallDTO{};CI.FetchNftCollectionAuthorizationsResponse=l,e.__decorate([(0,i.JSONSchema)({description:"Array of NFT collection authorization objects."}),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>Object),e.__metadata("design:type",Array)],l.prototype,"results",void 0),e.__decorate([(0,i.JSONSchema)({description:"Bookmark for the next page of results. Present if there are more results available."}),(0,n.IsString)(),(0,n.IsOptional)(),e.__metadata("design:type",String)],l.prototype,"nextPageBookmark",void 0),CI.FetchNftCollectionAuthorizationsResponse=l=e.__decorate([(0,i.JSONSchema)({description:"Response containing paginated NFT collection authorizations."})],l);let f=class extends a.SubmitCallDTO{};return CI.CreateNftCollectionDto=f,e.__decorate([(0,i.JSONSchema)({description:"The collection name. Must match an authorization the calling user has been granted."}),(0,n.IsString)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],f.prototype,"collection",void 0),e.__decorate([(0,i.JSONSchema)({description:"The category of the NFT collection."}),(0,n.IsString)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],f.prototype,"category",void 0),e.__decorate([(0,i.JSONSchema)({description:"The type of the NFT collection."}),(0,n.IsString)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],f.prototype,"type",void 0),e.__decorate([(0,i.JSONSchema)({description:"Additional key for the NFT collection."}),(0,n.IsString)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],f.prototype,"additionalKey",void 0),e.__decorate([(0,i.JSONSchema)({description:"The name of the NFT collection."}),(0,n.IsString)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],f.prototype,"name",void 0),e.__decorate([(0,i.JSONSchema)({description:"The symbol of the NFT collection."}),(0,n.IsString)(),e.__metadata("design:type",String)],f.prototype,"symbol",void 0),e.__decorate([(0,i.JSONSchema)({description:"Description of the NFT collection."}),(0,n.IsString)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],f.prototype,"description",void 0),e.__decorate([(0,i.JSONSchema)({description:"Image URL for the NFT collection."}),(0,n.IsString)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],f.prototype,"image",void 0),e.__decorate([(0,i.JSONSchema)({description:"Optional metadata address for the NFT collection."}),(0,n.IsString)(),(0,n.IsOptional)(),e.__metadata("design:type",String)],f.prototype,"metadataAddress",void 0),e.__decorate([(0,i.JSONSchema)({description:"Optional contract address for the NFT collection."}),(0,n.IsString)(),(0,n.IsOptional)(),e.__metadata("design:type",String)],f.prototype,"contractAddress",void 0),e.__decorate([(0,i.JSONSchema)({description:"Optional rarity information for the NFT collection."}),(0,n.IsString)(),(0,n.IsOptional)(),e.__metadata("design:type",String)],f.prototype,"rarity",void 0),e.__decorate([(0,i.JSONSchema)({description:"Maximum supply for the NFT collection."}),(0,o.BigNumberIsPositive)(),(0,o.BigNumberProperty)(),(0,n.IsOptional)(),e.__metadata("design:type",t.default)],f.prototype,"maxSupply",void 0),e.__decorate([(0,i.JSONSchema)({description:"Maximum capacity for the NFT collection."}),(0,o.BigNumberIsPositive)(),(0,o.BigNumberProperty)(),(0,n.IsOptional)(),e.__metadata("design:type",t.default)],f.prototype,"maxCapacity",void 0),e.__decorate([(0,i.JSONSchema)({description:"List of user aliases who should become token authorities. Defaults to the calling user."}),(0,o.IsUserRef)({each:!0}),(0,n.IsOptional)(),e.__metadata("design:type",Array)],f.prototype,"authorities",void 0),CI.CreateNftCollectionDto=f=e.__decorate([(0,i.JSONSchema)({description:"DTO for creating an NFT collection. Requires prior authorization for the collection name."})],f),CI}var kI,PI={};function DI(){if(kI)return PI;kI=1,Object.defineProperty(PI,"__esModule",{value:!0}),PI.NftCollectionAuthorization=void 0;const e=Re,t=uy,r=Mv(),n=Uv(),i=Zv();let o=class extends i.ChainObject{};return PI.NftCollectionAuthorization=o,o.INDEX_KEY="GCNFTC",e.__decorate([(0,r.ChainKey)({position:0}),(0,t.IsString)(),(0,t.IsNotEmpty)(),e.__metadata("design:type",String)],o.prototype,"collection",void 0),e.__decorate([(0,n.IsUserAlias)({each:!0}),(0,t.IsArray)(),(0,t.ArrayMinSize)(0),e.__metadata("design:type",Array)],o.prototype,"authorizedUsers",void 0),PI}var RI,FI={};function BI(){if(RI)return FI;RI=1,Object.defineProperty(FI,"__esModule",{value:!0}),FI.OracleBridgeFeeAssertion=void 0;const e=Re,t=e.__importDefault(mt),r=At,n=uy,i=Ey(),o=Mv(),a=Uv(),d=Zv(),s=pb(),c=_b(),u=ob();let l=class extends d.ChainObject{};return FI.OracleBridgeFeeAssertion=l,l.INDEX_KEY="GCOAB",e.__decorate([(0,i.JSONSchema)({description:"Name of the signing authoritative oracle defined on chain."}),(0,o.ChainKey)({position:0}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],l.prototype,"oracle",void 0),e.__decorate([(0,i.JSONSchema)({description:"Signing identity making the assertion contained within the DTO."}),(0,o.ChainKey)({position:1}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],l.prototype,"signingIdentity",void 0),e.__decorate([(0,o.ChainKey)({position:2}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],l.prototype,"txid",void 0),e.__decorate([(0,i.JSONSchema)({description:"Exchange Rate Price Assertion used to calculate Gas Fee"}),(0,n.ValidateIf)(e=>!!e.galaExchangeCrossRate),(0,n.ValidateNested)(),(0,r.Type)(()=>s.OraclePriceAssertion),e.__metadata("design:type",s.OraclePriceAssertion)],l.prototype,"galaExchangeRate",void 0),e.__decorate([(0,i.JSONSchema)({description:"Cross-Rate Exchange Rate used to calculate Gas Fee"}),(0,n.ValidateIf)(e=>!!e.galaExchangeRate),(0,n.ValidateNested)(),(0,r.Type)(()=>c.OraclePriceCrossRateAssertion),e.__metadata("design:type",c.OraclePriceCrossRateAssertion)],l.prototype,"galaExchangeCrossRate",void 0),e.__decorate([(0,i.JSONSchema)({description:"Rounding decimals used for estimatedTotalTxFeeInGala. Expected to match $GALA TokenClass.decimals."}),(0,n.Min)(0),(0,n.Max)(32),e.__metadata("design:type",Number)],l.prototype,"galaDecimals",void 0),e.__decorate([(0,i.JSONSchema)({description:"The token requested to bridge. Token Class used to query the estimated transaction fee units."}),(0,n.ValidateNested)(),(0,r.Type)(()=>u.TokenClassKey),e.__metadata("design:type",u.TokenClassKey)],l.prototype,"bridgeToken",void 0),e.__decorate([(0,i.JSONSchema)({description:"Set to true if the query to the bridge validator for the bridge-request token included ?nft=true. Otherwise false."}),(0,n.IsBoolean)(),e.__metadata("design:type",Boolean)],l.prototype,"bridgeTokenIsNonFungible",void 0),e.__decorate([(0,i.JSONSchema)({description:"Estimated number of gas units required for the transaction."}),(0,a.BigNumberProperty)(),e.__metadata("design:type",t.default)],l.prototype,"estimatedTxFeeUnitsTotal",void 0),e.__decorate([(0,i.JSONSchema)({description:"Estimated price per unit of gas, as retrieved approximately at the time of assertion."}),(0,a.BigNumberProperty)(),e.__metadata("design:type",t.default)],l.prototype,"estimatedPricePerTxFeeUnit",void 0),e.__decorate([(0,i.JSONSchema)({description:"The sum total of the estimated transaction fee denominated in the destinaton chain's native currency, token, or unit. The denomination used is identified in the `externalToken` property. The unit, currency, and/or token used to denominate the `estimatedTotalTxFeeInExternalToken` property is specified in the galaExchangeRate.externalQuoteToken property. This total is calculated by multiplying the `estimatedTxFeeUnitsTotal` times the `estimatedPricePerTxFeeUnit`, and then, if necessary, converting the result to the `galaExchangeRate.externalQuoteToken unit denomination.`"}),(0,a.BigNumberProperty)(),e.__metadata("design:type",t.default)],l.prototype,"estimatedTotalTxFeeInExternalToken",void 0),e.__decorate([(0,i.JSONSchema)({description:"Conversion of the estimated transaction fee calculated for the destination chain, converted to $GALA, for payment on GalaChain"}),(0,a.BigNumberProperty)(),e.__metadata("design:type",t.default)],l.prototype,"estimatedTotalTxFeeInGala",void 0),e.__decorate([(0,i.JSONSchema)({description:"Unix timestamp representing the date/time at which this assertion was calculated and/or estimated."}),(0,n.IsNumber)(),e.__metadata("design:type",Number)],l.prototype,"timestamp",void 0),FI.OracleBridgeFeeAssertion=l=e.__decorate([(0,i.JSONSchema)({description:"Response with signed bridging fee data."})],l),FI}var LI,UI={};function KI(){if(LI)return UI;LI=1,Object.defineProperty(UI,"__esModule",{value:!0}),UI.TokenSaleFailedError=UI.TokenSaleDtoValidationError=UI.EnsureTokenSaleIndexingResponse=UI.EnsureTokenSaleIndexingDto=UI.FetchTokenSaleByIdDto=UI.FetchTokenSalesWithPaginationResponse=UI.FetchTokenSalesWithPaginationDto=UI.RemoveTokenSaleDto=UI.FulfillTokenSaleDto=UI.ExpectedTokenSale=UI.CreateTokenSaleDto=UI.TokenSaleFulfillment=UI.TokenSaleMintAllowance=UI.TokenSaleOwner=UI.TokenSaleTokenCost=UI.TokenSaleTokenSold=UI.TokenSale=UI.TokenSaleQuantity=void 0;const e=Re,t=e.__importDefault(mt),r=At,n=uy,i=Ey(),o=Mv(),a=Uv(),d=Zv(),s=ob(),c=ib();let u=class{};UI.TokenSaleQuantity=u,e.__decorate([(0,i.JSONSchema)({description:"Token class key of the token to be sold."}),(0,n.ValidateNested)(),(0,r.Type)(()=>s.TokenClassKey),(0,n.IsNotEmpty)(),e.__metadata("design:type",s.TokenClassKey)],u.prototype,"tokenClassKey",void 0),e.__decorate([(0,i.JSONSchema)({description:"Quantity of tokens to be received."}),(0,n.IsNotEmpty)(),(0,a.BigNumberIsPositive)(),(0,a.BigNumberIsInteger)(),(0,a.BigNumberProperty)(),e.__metadata("design:type",t.default)],u.prototype,"quantity",void 0),UI.TokenSaleQuantity=u=e.__decorate([(0,i.JSONSchema)({description:"Defines a sale token with quantity of tokens to be received"})],u);let l=class extends d.ChainObject{};UI.TokenSale=l,l.INDEX_KEY="GCTTS",e.__decorate([(0,i.JSONSchema)({description:"Timestamp of when the sale was created"}),(0,o.ChainKey)({position:0}),(0,n.IsNumber)(),e.__metadata("design:type",Number)],l.prototype,"created",void 0),e.__decorate([(0,i.JSONSchema)({description:"Transaction ID"}),(0,o.ChainKey)({position:1}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],l.prototype,"txid",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token sale ID"}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],l.prototype,"tokenSaleId",void 0),e.__decorate([(0,i.JSONSchema)({description:"Tokens and quantities to be sold"}),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>u),(0,n.ArrayNotEmpty)(),e.__metadata("design:type",Array)],l.prototype,"selling",void 0),e.__decorate([(0,i.JSONSchema)({description:"Tokens and quantities to be received"}),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>u),(0,n.ArrayNotEmpty)(),e.__metadata("design:type",Array)],l.prototype,"cost",void 0),e.__decorate([(0,i.JSONSchema)({description:"User who created the sale"}),(0,a.IsUserAlias)(),e.__metadata("design:type",String)],l.prototype,"owner",void 0),e.__decorate([(0,i.JSONSchema)({description:"Ids of each sale fullfillment"}),(0,n.IsNotEmpty)(),e.__metadata("design:type",Array)],l.prototype,"fulfillmentIds",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token quantity of items being sold"}),(0,a.BigNumberIsPositive)(),(0,a.BigNumberIsInteger)(),(0,a.BigNumberProperty)(),e.__metadata("design:type",t.default)],l.prototype,"quantity",void 0),e.__decorate([(0,i.JSONSchema)({description:"Quantity of items sold"}),(0,a.BigNumberIsPositive)(),(0,a.BigNumberIsInteger)(),(0,a.BigNumberProperty)(),e.__metadata("design:type",t.default)],l.prototype,"quantityFulfilled",void 0),e.__decorate([(0,i.JSONSchema)({description:"Timestamp when sale ends"}),(0,n.Min)(0),(0,n.IsInt)(),e.__metadata("design:type",Number)],l.prototype,"end",void 0),e.__decorate([(0,i.JSONSchema)({description:"Timestamp when sale starts"}),(0,n.Min)(0),(0,n.IsInt)(),e.__metadata("design:type",Number)],l.prototype,"start",void 0),e.__decorate([(0,r.Exclude)(),e.__metadata("design:type",Object)],l,"INDEX_KEY",void 0),UI.TokenSale=l=e.__decorate([(0,i.JSONSchema)({description:"Defines a token sale. A sale is a collection of tokens to be sold, and the quantity of each token to be received."})],l);class f extends d.ChainObject{}UI.TokenSaleTokenSold=f,f.INDEX_KEY=`${l.INDEX_KEY}TS`,e.__decorate([(0,o.ChainKey)({position:0}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],f.prototype,"collection",void 0),e.__decorate([(0,o.ChainKey)({position:1}),e.__metadata("design:type",String)],f.prototype,"category",void 0),e.__decorate([(0,o.ChainKey)({position:2}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],f.prototype,"type",void 0),e.__decorate([(0,o.ChainKey)({position:3}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],f.prototype,"additionalKey",void 0),e.__decorate([(0,o.ChainKey)({position:4}),(0,a.BigNumberIsPositive)(),(0,a.BigNumberIsInteger)(),(0,a.BigNumberProperty)(),e.__metadata("design:type",String)],f.prototype,"quantity",void 0),e.__decorate([(0,o.ChainKey)({position:5}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],f.prototype,"tokenSaleId",void 0);class p extends d.ChainObject{}UI.TokenSaleTokenCost=p,p.INDEX_KEY=`${l.INDEX_KEY}TC`,e.__decorate([(0,o.ChainKey)({position:0}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],p.prototype,"collection",void 0),e.__decorate([(0,o.ChainKey)({position:1}),e.__metadata("design:type",String)],p.prototype,"category",void 0),e.__decorate([(0,o.ChainKey)({position:2}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],p.prototype,"type",void 0),e.__decorate([(0,o.ChainKey)({position:3}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],p.prototype,"additionalKey",void 0),e.__decorate([(0,o.ChainKey)({position:4}),(0,a.BigNumberIsPositive)(),(0,a.BigNumberIsInteger)(),(0,a.BigNumberProperty)(),e.__metadata("design:type",String)],p.prototype,"quantity",void 0),e.__decorate([(0,o.ChainKey)({position:5}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],p.prototype,"tokenSaleId",void 0);class h extends d.ChainObject{}UI.TokenSaleOwner=h,h.INDEX_KEY=`${l.INDEX_KEY}O`,e.__decorate([(0,o.ChainKey)({position:0}),(0,a.IsUserAlias)(),e.__metadata("design:type",String)],h.prototype,"owner",void 0),e.__decorate([(0,o.ChainKey)({position:1}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],h.prototype,"tokenSaleId",void 0);class y extends d.ChainObject{}UI.TokenSaleMintAllowance=y,y.INDEX_KEY=`${l.INDEX_KEY}MA`,e.__decorate([(0,o.ChainKey)({position:0}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],y.prototype,"tokenSaleId",void 0),e.__decorate([(0,o.ChainKey)({position:1}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],y.prototype,"collection",void 0),e.__decorate([(0,o.ChainKey)({position:2}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],y.prototype,"category",void 0),e.__decorate([(0,o.ChainKey)({position:3}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],y.prototype,"type",void 0),e.__decorate([(0,o.ChainKey)({position:4}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],y.prototype,"additionalKey",void 0),e.__decorate([(0,o.ChainKey)({position:5}),(0,a.BigNumberIsPositive)(),(0,a.BigNumberProperty)(),e.__metadata("design:type",t.default)],y.prototype,"quantity",void 0),e.__decorate([(0,o.ChainKey)({position:6}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],y.prototype,"allowanceObjectKey",void 0);class m extends d.ChainObject{}UI.TokenSaleFulfillment=m,m.INDEX_KEY="GCTSF",e.__decorate([(0,o.ChainKey)({position:0}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],m.prototype,"tokenSaleId",void 0),e.__decorate([(0,o.ChainKey)({position:1}),(0,a.IsUserAlias)(),e.__metadata("design:type",String)],m.prototype,"fulfilledBy",void 0),e.__decorate([(0,o.ChainKey)({position:2}),(0,n.IsPositive)(),e.__metadata("design:type",Number)],m.prototype,"created",void 0),e.__decorate([(0,a.BigNumberIsPositive)(),(0,a.BigNumberProperty)(),e.__metadata("design:type",t.default)],m.prototype,"quantity",void 0);let g=class extends c.SubmitCallDTO{};UI.CreateTokenSaleDto=g,g.DEFAULT_END=0,g.DEFAULT_START=0,e.__decorate([(0,i.JSONSchema)({description:"User who creates the token sale, typically an authority of the token. Optional field, by default set to chaincode calling user."}),(0,n.IsOptional)(),(0,a.IsUserRef)(),e.__metadata("design:type",String)],g.prototype,"owner",void 0),e.__decorate([(0,i.JSONSchema)({description:"A list of offered tokens to be sold."}),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>u),(0,n.ArrayMinSize)(1),(0,n.ArrayUnique)(),e.__metadata("design:type",Array)],g.prototype,"selling",void 0),e.__decorate([(0,i.JSONSchema)({description:"A list of tokens to be paid to the seller."}),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>u),(0,n.ArrayMinSize)(1),(0,n.ArrayUnique)(),e.__metadata("design:type",Array)],g.prototype,"cost",void 0),e.__decorate([(0,i.JSONSchema)({description:"How many sale items can be purchased."}),(0,a.BigNumberIsPositive)(),(0,a.BigNumberIsInteger)(),(0,a.BigNumberProperty)(),e.__metadata("design:type",t.default)],g.prototype,"quantity",void 0),e.__decorate([(0,i.JSONSchema)({description:`Unix timestamp of the date when the sale should end. 0 means that it won't end. By default set to ${g.DEFAULT_END}.`}),(0,n.IsOptional)(),(0,n.Min)(0),(0,n.IsInt)(),e.__metadata("design:type",Number)],g.prototype,"end",void 0),e.__decorate([(0,i.JSONSchema)({description:`Unix timestamp of the date when the sale should start. 0 means that it starts immediately. By default set to ${g.DEFAULT_START}.`}),e.__metadata("design:type",Number)],g.prototype,"start",void 0),UI.CreateTokenSaleDto=g=e.__decorate([(0,i.JSONSchema)({description:"Defines a swap request to be created, i.e. a request when a requester offers some tokens to another user in exchange of another tokens."})],g);let _=class{};UI.ExpectedTokenSale=_,e.__decorate([(0,i.JSONSchema)({description:"A list of purchasable token classes and quantities. The order of this array must match the order of the TokenSale stored on chain."}),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>u),(0,n.ArrayMinSize)(1),(0,n.ArrayUnique)(),e.__metadata("design:type",Array)],_.prototype,"selling",void 0),e.__decorate([(0,i.JSONSchema)({description:"A list of cost token classes and quantites. The order of this array must match the order of the TokenSale stored on chain."}),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>u),(0,n.ArrayMinSize)(1),(0,n.ArrayUnique)(),e.__metadata("design:type",Array)],_.prototype,"cost",void 0),UI.ExpectedTokenSale=_=e.__decorate([(0,i.JSONSchema)({description:"Defines an expected token swap trade, i.e. offered and wanted tokens."})],_);let v=class extends c.SubmitCallDTO{};UI.FulfillTokenSaleDto=v,e.__decorate([(0,i.JSONSchema)({description:"Token sale ID to be filled"}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],v.prototype,"tokenSaleId",void 0),e.__decorate([(0,i.JSONSchema)({description:"Expected token sale to be validated before filling the swap."}),(0,n.IsOptional)(),(0,n.ValidateNested)(),(0,r.Type)(()=>_),e.__metadata("design:type",_)],v.prototype,"expectedTokenSale",void 0),e.__decorate([(0,i.JSONSchema)({description:"User who fulfills the sale, an owner of tokens wanted in swap. Optional field, by default set to chaincode calling user."}),(0,n.IsOptional)(),(0,a.IsUserAlias)(),e.__metadata("design:type",String)],v.prototype,"fulfilledBy",void 0),e.__decorate([(0,i.JSONSchema)({description:"The quantity of items to be purchased "}),(0,a.BigNumberIsPositive)(),(0,a.BigNumberIsInteger)(),(0,a.BigNumberProperty)(),e.__metadata("design:type",t.default)],v.prototype,"quantity",void 0),UI.FulfillTokenSaleDto=v=e.__decorate([(0,i.JSONSchema)({description:"Defines a swap fill object, i.e. a response of another user for a swap request."})],v);class b extends c.SubmitCallDTO{}UI.RemoveTokenSaleDto=b,e.__decorate([(0,i.JSONSchema)({description:"Token sale ID to be removed."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],b.prototype,"tokenSaleId",void 0);let S=class extends c.ChainCallDTO{};UI.FetchTokenSalesWithPaginationDto=S,S.MAX_LIMIT=1e4,S.DEFAULT_LIMIT=1e3,e.__decorate([(0,i.JSONSchema)({description:"(optional). User alias of the creating user."}),(0,n.IsOptional)(),(0,a.IsUserRef)(),e.__metadata("design:type",String)],S.prototype,"owner",void 0),e.__decorate([(0,i.JSONSchema)({description:"Page bookmark. If it is undefined, then the first page is returned."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],S.prototype,"bookmark",void 0),e.__decorate([(0,i.JSONSchema)({description:`Page size limit. Defaults to ${S.DEFAULT_LIMIT}, max possible value ${S.MAX_LIMIT}. Note you will likely get less results than the limit, because the limit is applied before additional filtering.`}),(0,n.IsOptional)(),(0,n.Max)(S.MAX_LIMIT),(0,n.Min)(1),(0,n.IsInt)(),e.__metadata("design:type",Number)],S.prototype,"limit",void 0),UI.FetchTokenSalesWithPaginationDto=S=e.__decorate([(0,i.JSONSchema)({description:"Legacy FetchTokenSwapsDto. Provided created timestamp to limit result, or leave empty to query all swaps."})],S);let I=class extends c.ChainCallDTO{};UI.FetchTokenSalesWithPaginationResponse=I,e.__decorate([(0,n.IsOptional)(),e.__metadata("design:type",Object)],I.prototype,"nextPageBookmark",void 0),e.__decorate([(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>l),e.__metadata("design:type",Array)],I.prototype,"results",void 0),UI.FetchTokenSalesWithPaginationResponse=I=e.__decorate([(0,i.JSONSchema)({description:"Response DTO for FetchTokenSwaps{ByInstanceOffered|ByInstanceWanted|OfferedBy|OfferedTo} methods. Supports pagination."})],I);class N extends c.ChainCallDTO{}UI.FetchTokenSaleByIdDto=N,e.__decorate([(0,i.JSONSchema)({description:"Token sale ID."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],N.prototype,"tokenSaleId",void 0);let $=class extends c.ChainCallDTO{};UI.EnsureTokenSaleIndexingDto=$,e.__decorate([(0,n.ArrayNotEmpty)(),e.__metadata("design:type",Array)],$.prototype,"tokenSaleIds",void 0),UI.EnsureTokenSaleIndexingDto=$=e.__decorate([(0,i.JSONSchema)({description:"Ensure that provided tokenSaleId chain objects have proper supporting index Chain Objects. This method permits migration / upgrade of TokenSales written prior to the advent of new index objects which were added to support fine-grained querying of TokenSale by client applications. The provided tokenSaleIds will be looked up on chain, then their corresponding index Chain objects will be queried and written if necessary."})],$);let w=class extends c.ChainCallDTO{};UI.EnsureTokenSaleIndexingResponse=w,e.__decorate([(0,n.IsBoolean)(),e.__metadata("design:type",Boolean)],w.prototype,"noOp",void 0),e.__decorate([(0,n.ArrayMinSize)(0),e.__metadata("design:type",Array)],w.prototype,"writes",void 0),UI.EnsureTokenSaleIndexingResponse=w=e.__decorate([(0,i.JSONSchema)({description:"Response DTO for a EnsureTokenSaleIndexing request. If any writes were made, they will be provided in the writes array and noOp will be true."})],w);class A extends o.ValidationFailedError{constructor(e,t){super(`${e} validation failed: ${t.join(". ")}`,{dtoName:e,errors:t})}}UI.TokenSaleDtoValidationError=A;class O extends o.ValidationFailedError{constructor(e,t){super(`SwapToken failed: ${e}$`,t)}}return UI.TokenSaleFailedError=O,UI}var jI,VI,JI={},qI={};function GI(){if(jI)return qI;jI=1,Object.defineProperty(qI,"__esModule",{value:!0}),qI.TokenSwapRequest=void 0;const e=Re,t=e.__importDefault(mt),r=At,n=uy,i=Mv(),o=Uv(),a=Zv(),d=ab();let s=class extends a.ChainObject{};return qI.TokenSwapRequest=s,s.INDEX_KEY="GCTSR",e.__decorate([(0,i.ChainKey)({position:0}),(0,n.IsNumber)(),e.__metadata("design:type",Number)],s.prototype,"created",void 0),e.__decorate([(0,i.ChainKey)({position:1}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],s.prototype,"txid",void 0),e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],s.prototype,"swapRequestId",void 0),e.__decorate([(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>d.TokenInstanceQuantity),(0,n.ArrayNotEmpty)(),e.__metadata("design:type",Array)],s.prototype,"offered",void 0),e.__decorate([(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>d.TokenInstanceQuantity),(0,n.ArrayNotEmpty)(),e.__metadata("design:type",Array)],s.prototype,"wanted",void 0),e.__decorate([(0,n.IsOptional)(),(0,o.IsUserAlias)(),e.__metadata("design:type",String)],s.prototype,"offeredTo",void 0),e.__decorate([(0,o.IsUserAlias)(),e.__metadata("design:type",String)],s.prototype,"offeredBy",void 0),e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",Array)],s.prototype,"fillIds",void 0),e.__decorate([(0,o.BigNumberIsPositive)(),(0,o.BigNumberIsInteger)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],s.prototype,"uses",void 0),e.__decorate([(0,o.BigNumberIsPositive)(),(0,o.BigNumberIsInteger)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],s.prototype,"usesSpent",void 0),e.__decorate([(0,n.Min)(0),(0,n.IsInt)(),e.__metadata("design:type",Number)],s.prototype,"expires",void 0),e.__decorate([(0,r.Exclude)(),e.__metadata("design:type",Object)],s,"INDEX_KEY",void 0),qI}function zI(){if(VI)return JI;VI=1,Object.defineProperty(JI,"__esModule",{value:!0}),JI.CleanTokenSwapsResponse=JI.CleanTokenSwapsDto=JI.EnsureTokenSwapIndexingResponse=JI.EnsureTokenSwapIndexingDto=JI.FetchTokenSwapsWithPaginationResponse=JI.FetchTokenSwapsByUserDto=JI.FetchTokenSwapsByInstanceDto=JI.FetchTokenSwapByRequestIdDto=JI.FetchTokenSwapsDto=JI.TerminateTokenSwapDto=JI.BatchFillTokenSwapDto=JI.FillTokenSwapDto=JI.ExpectedTokenSwap=JI.RequestTokenSwapDto=void 0;const e=Re,t=e.__importDefault(mt),r=At,n=uy,i=Ey(),o=Uv(),a=ab(),d=GI(),s=ib();let c=class extends s.SubmitCallDTO{};JI.RequestTokenSwapDto=c,c.DEFAULT_EXPIRES=0,e.__decorate([(0,i.JSONSchema)({description:"User who requests the swap, typically an owner of tokens. Optional field, by default set to chaincode calling user."}),(0,n.IsOptional)(),(0,o.IsUserRef)(),e.__metadata("design:type",String)],c.prototype,"offeredBy",void 0),e.__decorate([(0,i.JSONSchema)({description:"User who probably has tokens the requester wants."}),(0,o.IsDifferentValue)("offeredBy",{message:"offeredBy should be different than offeredTo. offeredTo can be optional - e.g. a user is offering a swap to any other user willing to fill it and their client id is not known at the time the swap is offered."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),(0,o.IsUserRef)(),e.__metadata("design:type",String)],c.prototype,"offeredTo",void 0),e.__decorate([(0,i.JSONSchema)({description:"A list of offered token instances."}),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>a.TokenInstanceQuantity),(0,n.ArrayMinSize)(1),(0,n.ArrayUnique)(),e.__metadata("design:type",Array)],c.prototype,"offered",void 0),e.__decorate([(0,i.JSONSchema)({description:"A list of wanted token instances."}),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>a.TokenInstanceQuantity),(0,n.ArrayMinSize)(1),(0,n.ArrayUnique)(),e.__metadata("design:type",Array)],c.prototype,"wanted",void 0),e.__decorate([(0,i.JSONSchema)({description:"How many times swap can filled."}),(0,o.BigNumberIsPositive)(),(0,o.BigNumberIsInteger)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],c.prototype,"uses",void 0),e.__decorate([(0,i.JSONSchema)({description:`Unix timestamp of the date when the swap request should expire. 0 means that it won' expire. By default set to ${c.DEFAULT_EXPIRES}.`}),(0,n.IsOptional)(),(0,n.Min)(0),(0,n.IsInt)(),e.__metadata("design:type",Number)],c.prototype,"expires",void 0),JI.RequestTokenSwapDto=c=e.__decorate([(0,i.JSONSchema)({description:"Defines a swap request to be created, i.e. a request when a requester offers some tokens to another user in exchange of another tokens."})],c);let u=class extends s.ChainCallDTO{};JI.ExpectedTokenSwap=u,e.__decorate([(0,i.JSONSchema)({description:"A list of offered token instances. The order of this array must match the order of the TokenSwapRequest stored on chain."}),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>a.TokenInstanceQuantity),(0,n.ArrayMinSize)(1),(0,n.ArrayUnique)(),e.__metadata("design:type",Array)],u.prototype,"offered",void 0),e.__decorate([(0,i.JSONSchema)({description:"A list of wanted token instances. The order of this array must match the order of the TokenSwapRequest stored on chain."}),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>a.TokenInstanceQuantity),(0,n.ArrayMinSize)(1),(0,n.ArrayUnique)(),e.__metadata("design:type",Array)],u.prototype,"wanted",void 0),JI.ExpectedTokenSwap=u=e.__decorate([(0,i.JSONSchema)({description:"Defines an expected token swap trade, i.e. offered and wanted tokens."})],u);let l=class extends s.SubmitCallDTO{};JI.FillTokenSwapDto=l,l.DEFAULT_USES=new t.default(1),e.__decorate([(0,i.JSONSchema)({description:"Swap request ID to be filled"}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],l.prototype,"swapRequestId",void 0),e.__decorate([(0,i.JSONSchema)({description:"Expected token swap trade to be validated before filling the swap."}),(0,n.IsOptional)(),(0,n.ValidateNested)(),(0,r.Type)(()=>u),e.__metadata("design:type",u)],l.prototype,"expectedTokenSwap",void 0),e.__decorate([(0,i.JSONSchema)({description:"User who fills the swap, an owner of tokens wanted in swap. Optional field, by default set to chaincode calling user."}),(0,n.IsOptional)(),(0,o.IsUserRef)(),e.__metadata("design:type",String)],l.prototype,"filledBy",void 0),e.__decorate([(0,i.JSONSchema)({description:`How many uses are filled with this swap fill. In most cases it will be ${l.DEFAULT_USES}, and this is the default value for it.`}),(0,n.IsOptional)(),(0,o.BigNumberIsPositive)(),(0,o.BigNumberIsInteger)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],l.prototype,"uses",void 0),JI.FillTokenSwapDto=l=e.__decorate([(0,i.JSONSchema)({description:"Defines a swap fill object, i.e. a response of another user for a swap request."})],l);let f=class extends s.SubmitCallDTO{};JI.BatchFillTokenSwapDto=f,f.MAX_ARR_SIZE=1e3,e.__decorate([(0,i.JSONSchema)({description:"Array of FillTokenSwapDto objects each representing a swap to fulfill"}),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>l),(0,n.ArrayNotEmpty)(),(0,n.ArrayMaxSize)(f.MAX_ARR_SIZE),e.__metadata("design:type",Array)],f.prototype,"swapDtos",void 0),JI.BatchFillTokenSwapDto=f=e.__decorate([(0,i.JSONSchema)({description:"Fill multiple swaps in a single transaction, potentially swaps offered by many different users."})],f);class p extends s.SubmitCallDTO{}JI.TerminateTokenSwapDto=p,e.__decorate([(0,i.JSONSchema)({description:"Swap request ID to be terminated."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],p.prototype,"swapRequestId",void 0);let h=class extends s.ChainCallDTO{};JI.FetchTokenSwapsDto=h,e.__decorate([(0,i.JSONSchema)({description:"(optional). ChainKey 0 - Created timestamp of swap."}),(0,n.IsOptional)(),(0,n.IsNumber)(),e.__metadata("design:type",Number)],h.prototype,"created",void 0),JI.FetchTokenSwapsDto=h=e.__decorate([(0,i.JSONSchema)({description:"Legacy FetchTokenSwapsDto. Provided created timestamp to limit result, or leave empty to query all swaps."})],h);class y extends s.ChainCallDTO{}JI.FetchTokenSwapByRequestIdDto=y,e.__decorate([(0,i.JSONSchema)({description:"Token swap request ID."}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],y.prototype,"swapRequestId",void 0);let m=class extends s.ChainCallDTO{};JI.FetchTokenSwapsByInstanceDto=m,m.MAX_LIMIT=1e4,m.DEFAULT_LIMIT=1e3,e.__decorate([(0,i.JSONSchema)({description:"Token collection. Optional, but required if category is provided."}),(0,n.ValidateIf)(e=>!!e.category),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],m.prototype,"collection",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token category. Optional, but required if type is provided."}),(0,n.ValidateIf)(e=>!!e.type),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],m.prototype,"category",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token type. Optional, but required if additionalKey is provided."}),(0,n.ValidateIf)(e=>!!e.additionalKey),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],m.prototype,"type",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token additionalKey. Optional, but required if instance is provided."}),(0,n.ValidateIf)(e=>!!e.instance),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],m.prototype,"additionalKey",void 0),e.__decorate([(0,i.JSONSchema)({description:"Token instance. Optional, but required if allowanceType is provided"}),(0,n.ValidateIf)(e=>void 0!==e.allowanceType),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],m.prototype,"instance",void 0),e.__decorate([(0,i.JSONSchema)({description:"Page bookmark. If it is undefined, then the first page is returned."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],m.prototype,"bookmark",void 0),e.__decorate([(0,i.JSONSchema)({description:`Page size limit. Defaults to ${m.DEFAULT_LIMIT}, max possible value ${m.MAX_LIMIT}. Note you will likely get less results than the limit, because the limit is applied before additional filtering.`}),(0,n.IsOptional)(),(0,n.Max)(m.MAX_LIMIT),(0,n.Min)(1),(0,n.IsInt)(),e.__metadata("design:type",Number)],m.prototype,"limit",void 0),JI.FetchTokenSwapsByInstanceDto=m=e.__decorate([(0,i.JSONSchema)({description:"Query for TokenSwapRequests by Token Instance properties. Supports pagination."})],m);let g=class extends s.ChainCallDTO{};JI.FetchTokenSwapsByUserDto=g,g.MAX_LIMIT=1e4,g.DEFAULT_LIMIT=1e3,e.__decorate([(0,n.IsOptional)(),(0,o.IsUserRef)(),e.__metadata("design:type",String)],g.prototype,"user",void 0),e.__decorate([(0,i.JSONSchema)({description:"Page bookmark. If it is undefined, then the first page is returned."}),(0,n.IsOptional)(),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],g.prototype,"bookmark",void 0),e.__decorate([(0,i.JSONSchema)({description:`Page size limit. Defaults to ${g.DEFAULT_LIMIT}, max possible value ${g.MAX_LIMIT}. Note you will likely get less results than the limit, because the limit is applied before additional filtering.`}),(0,n.IsOptional)(),(0,n.Max)(g.MAX_LIMIT),(0,n.Min)(1),(0,n.IsInt)(),e.__metadata("design:type",Number)],g.prototype,"limit",void 0),JI.FetchTokenSwapsByUserDto=g=e.__decorate([(0,i.JSONSchema)({description:"Query for TokenSwapRequests by User properties (offeredBy/offeredTo). Supports pagination."})],g);let _=class extends s.ChainCallDTO{};JI.FetchTokenSwapsWithPaginationResponse=_,e.__decorate([(0,n.IsOptional)(),e.__metadata("design:type",Object)],_.prototype,"nextPageBookmark",void 0),e.__decorate([(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>d.TokenSwapRequest),e.__metadata("design:type",Array)],_.prototype,"results",void 0),JI.FetchTokenSwapsWithPaginationResponse=_=e.__decorate([(0,i.JSONSchema)({description:"Response DTO for FetchTokenSwaps{ByInstanceOffered|ByInstanceWanted|OfferedBy|OfferedTo} methods. Supports pagination."})],_);let v=class extends s.SubmitCallDTO{};JI.EnsureTokenSwapIndexingDto=v,e.__decorate([(0,n.ArrayNotEmpty)(),e.__metadata("design:type",Array)],v.prototype,"swapRequestIds",void 0),JI.EnsureTokenSwapIndexingDto=v=e.__decorate([(0,i.JSONSchema)({description:"Ensure that provided swapRequestId chain objects have proper supporting index Chain Objects. This method permits migration / upgrade of TokenSwapRequests written prior to the advent of new index objects which were added to support fine-grained querying of TokenSwapRequests by client applications. The provided swapRequestIds will be looked up on chain, then their corresponding index Chain objects will be queried and written if necessary."})],v);let b=class extends s.SubmitCallDTO{};JI.EnsureTokenSwapIndexingResponse=b,e.__decorate([(0,n.IsBoolean)(),e.__metadata("design:type",Boolean)],b.prototype,"noOp",void 0),e.__decorate([(0,n.ArrayMinSize)(0),e.__metadata("design:type",Array)],b.prototype,"writes",void 0),JI.EnsureTokenSwapIndexingResponse=b=e.__decorate([(0,i.JSONSchema)({description:"Response DTO for a EnsureTokenSwapIndexing request. If any writes were made, they will be provided in the writes array and noOp will be true."})],b);let S=class extends s.SubmitCallDTO{};JI.CleanTokenSwapsDto=S,e.__decorate([(0,n.IsOptional)(),(0,n.ArrayNotEmpty)(),e.__metadata("design:type",Array)],S.prototype,"swapRequestIds",void 0),JI.CleanTokenSwapsDto=S=e.__decorate([(0,i.JSONSchema)({description:"Request DTO for CleanTokenSwaps. Optionally, provide a list of ChainKeys to specifically clean/delete from world state. "})],S);let I=class extends s.SubmitCallDTO{};return JI.CleanTokenSwapsResponse=I,e.__decorate([(0,n.ArrayMinSize)(0),e.__metadata("design:type",Array)],I.prototype,"deletes",void 0),JI.CleanTokenSwapsResponse=I=e.__decorate([(0,i.JSONSchema)({description:"Response DTO for a CleanTokenSwaps request. If any deletes occurred, they will be provided in the deletes array."})],I),JI}var HI,ZI={};function WI(){if(HI)return ZI;HI=1,Object.defineProperty(ZI,"__esModule",{value:!0}),ZI.TokenMintAllowance=void 0;const e=Re,t=e.__importDefault(mt),r=uy,n=Mv(),i=Uv(),o=Zv();let a=class extends o.ChainObject{};return ZI.TokenMintAllowance=a,a.INDEX_KEY="GCTMA",e.__decorate([(0,n.ChainKey)({position:0}),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],a.prototype,"collection",void 0),e.__decorate([(0,n.ChainKey)({position:1}),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],a.prototype,"category",void 0),e.__decorate([(0,n.ChainKey)({position:2}),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],a.prototype,"type",void 0),e.__decorate([(0,n.ChainKey)({position:3}),(0,r.IsDefined)(),e.__metadata("design:type",String)],a.prototype,"additionalKey",void 0),e.__decorate([(0,n.ChainKey)({position:4}),(0,i.BigNumberProperty)(),e.__metadata("design:type",t.default)],a.prototype,"totalKnownMintAllowancesAtRequest",void 0),e.__decorate([(0,n.ChainKey)({position:5}),(0,i.IsUserAlias)(),e.__metadata("design:type",String)],a.prototype,"grantedBy",void 0),e.__decorate([(0,n.ChainKey)({position:6}),(0,i.IsUserAlias)(),e.__metadata("design:type",String)],a.prototype,"grantedTo",void 0),e.__decorate([(0,n.ChainKey)({position:7}),(0,r.IsNotEmpty)(),e.__metadata("design:type",Number)],a.prototype,"created",void 0),e.__decorate([(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],a.prototype,"reqId",void 0),e.__decorate([(0,i.BigNumberProperty)(),e.__metadata("design:type",t.default)],a.prototype,"quantity",void 0),ZI}var YI,XI={};function QI(){if(YI)return XI;YI=1,Object.defineProperty(XI,"__esModule",{value:!0}),XI.TokenMintAllowanceRequest=void 0;const e=Re,t=mt,r=uy,n=Mv(),i=Uv(),o=Zv(),a=Ab(),d=zS(),s=WI(),c=KS();let u=class extends a.RangedChainObject{requestId(){const{collection:e,category:t,type:r,additionalKey:n,totalKnownMintAllowancesCount:i,created:a,grantedBy:d,grantedTo:s}=this;return o.ChainObject.getStringKeyFromParts([e,t,r,n,i.toString(),`${a}`,d,s])}fulfillmentKey(){const{collection:e,category:t,type:r,additionalKey:n,totalKnownMintAllowancesCount:i,created:a,grantedBy:d,grantedTo:c}=this;return o.ChainObject.getCompositeKeyFromParts(s.TokenMintAllowance.INDEX_KEY,[e,t,r,n,i.toString(),`${a}`,d,c])}fulfill(e){const{collection:r,category:n,type:i,additionalKey:o,totalKnownMintAllowancesCount:a,created:u,grantedBy:l,grantedTo:f,quantity:p,id:h,uses:y,expires:m}=this,g=new s.TokenMintAllowance;g.collection=r,g.category=n,g.type=i,g.additionalKey=o,g.totalKnownMintAllowancesAtRequest=a,g.grantedBy=l,g.grantedTo=f,g.created=u,g.reqId=h,g.quantity=p;const _=new d.TokenAllowance;return _.grantedTo=f,_.collection=r,_.category=n,_.type=i,_.additionalKey=o,_.instance=e,_.allowanceType=c.AllowanceType.Mint,_.grantedBy=l,_.created=u,_.uses=y,_.usesSpent=new t.BigNumber("0"),_.expires=null!=m?m:0,_.quantity=p,_.quantitySpent=new t.BigNumber("0"),[g,_]}};return XI.TokenMintAllowanceRequest=u,u.INDEX_KEY="GCTMAR",e.__decorate([(0,n.ChainKey)({position:0}),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],u.prototype,"collection",void 0),e.__decorate([(0,n.ChainKey)({position:1}),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],u.prototype,"category",void 0),e.__decorate([(0,n.ChainKey)({position:2}),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],u.prototype,"type",void 0),e.__decorate([(0,n.ChainKey)({position:3}),(0,r.IsDefined)(),e.__metadata("design:type",String)],u.prototype,"additionalKey",void 0),e.__decorate([(0,n.ChainKey)({position:4}),(0,r.IsDefined)(),e.__metadata("design:type",String)],u.prototype,"timeKey",void 0),e.__decorate([(0,n.ChainKey)({position:5}),(0,i.IsUserAlias)(),e.__metadata("design:type",String)],u.prototype,"grantedTo",void 0),e.__decorate([(0,r.IsNotEmpty)(),(0,i.BigNumberProperty)(),e.__metadata("design:type",t.BigNumber)],u.prototype,"totalKnownMintAllowancesCount",void 0),e.__decorate([(0,r.IsNotEmpty)(),e.__metadata("design:type",Number)],u.prototype,"created",void 0),e.__decorate([(0,i.IsUserAlias)(),e.__metadata("design:type",String)],u.prototype,"grantedBy",void 0),e.__decorate([(0,r.IsNotEmpty)(),(0,i.BigNumberIsNotNegative)(),(0,i.BigNumberProperty)(),e.__metadata("design:type",t.BigNumber)],u.prototype,"quantity",void 0),e.__decorate([(0,r.IsNotEmpty)(),e.__metadata("design:type",Number)],u.prototype,"state",void 0),e.__decorate([(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],u.prototype,"id",void 0),e.__decorate([(0,r.IsNotEmpty)(),(0,i.BigNumberProperty)(),e.__metadata("design:type",t.BigNumber)],u.prototype,"uses",void 0),e.__decorate([(0,r.IsOptional)(),e.__metadata("design:type",Number)],u.prototype,"expires",void 0),e.__decorate([(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],u.prototype,"epoch",void 0),XI}var eN,tN={};function rN(){if(eN)return tN;eN=1,Object.defineProperty(tN,"__esModule",{value:!0}),tN.TokenMintFulfillment=void 0;const e=Re,t=e.__importDefault(mt),r=uy,n=Mv(),i=Uv(),o=Zv();let a=class extends o.ChainObject{};return tN.TokenMintFulfillment=a,a.INDEX_KEY="GCTMF",e.__decorate([(0,n.ChainKey)({position:0}),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],a.prototype,"collection",void 0),e.__decorate([(0,n.ChainKey)({position:1}),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],a.prototype,"category",void 0),e.__decorate([(0,n.ChainKey)({position:2}),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],a.prototype,"type",void 0),e.__decorate([(0,n.ChainKey)({position:3}),(0,r.IsDefined)(),e.__metadata("design:type",String)],a.prototype,"additionalKey",void 0),e.__decorate([(0,n.ChainKey)({position:4}),(0,i.IsUserAlias)(),e.__metadata("design:type",String)],a.prototype,"requestor",void 0),e.__decorate([(0,n.ChainKey)({position:5}),(0,r.IsNotEmpty)(),e.__metadata("design:type",Number)],a.prototype,"requestCreated",void 0),e.__decorate([(0,i.IsUserAlias)(),e.__metadata("design:type",String)],a.prototype,"owner",void 0),e.__decorate([(0,r.IsNotEmpty)(),(0,i.BigNumberIsNotNegative)(),(0,i.BigNumberProperty)(),e.__metadata("design:type",t.default)],a.prototype,"quantity",void 0),e.__decorate([(0,r.IsNotEmpty)(),e.__metadata("design:type",Number)],a.prototype,"state",void 0),e.__decorate([(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],a.prototype,"id",void 0),e.__decorate([(0,r.IsNotEmpty)(),e.__metadata("design:type",Number)],a.prototype,"created",void 0),tN}var nN,iN={};function oN(){if(nN)return iN;nN=1,Object.defineProperty(iN,"__esModule",{value:!0}),iN.TokenMintRequest=void 0;const e=Re,t=e.__importDefault(mt),r=At,n=uy,i=Mv(),o=Uv(),a=Zv(),d=Ab(),s=rN(),c=KS();let u=class extends d.RangedChainObject{isTimeKeyValid(){try{return new t.default(this.timeKey),!0}catch(e){return!1}}requestId(){const{collection:e,category:t,type:r,additionalKey:n,totalKnownMintsCount:i,requestor:o,owner:d,created:s}=this;return a.ChainObject.getStringKeyFromParts([e,t,r,n,i.toString(),o,d,`${s}`])}fulfillmentKey(){const{collection:e,category:t,type:r,additionalKey:n,totalKnownMintsCount:i,requestor:o,owner:d,created:c}=this;return a.ChainObject.getCompositeKeyFromParts(s.TokenMintFulfillment.INDEX_KEY,[e,t,r,n,i.toString(),o,d,`${c}`])}fulfill(e){const{collection:t,category:r,type:n,additionalKey:i,requestor:o,created:a,owner:d}=this,u=new s.TokenMintFulfillment;return u.collection=t,u.category=r,u.type=n,u.additionalKey=i,u.requestor=o,u.requestCreated=a,u.owner=d,u.created=a,u.quantity=e,e.isLessThan(this.quantity)?u.state=c.TokenMintStatus.PartiallyMinted:u.state=c.TokenMintStatus.Minted,u.id=this.requestId(),u}};return iN.TokenMintRequest=u,u.INDEX_KEY="GCTMR",u.OBJECT_TYPE="TokenMintRequest",e.__decorate([(0,i.ChainKey)({position:0}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],u.prototype,"collection",void 0),e.__decorate([(0,i.ChainKey)({position:1}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],u.prototype,"category",void 0),e.__decorate([(0,i.ChainKey)({position:2}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],u.prototype,"type",void 0),e.__decorate([(0,i.ChainKey)({position:3}),(0,n.IsDefined)(),e.__metadata("design:type",String)],u.prototype,"additionalKey",void 0),e.__decorate([(0,i.ChainKey)({position:4}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],u.prototype,"timeKey",void 0),e.__decorate([(0,i.ChainKey)({position:5}),(0,o.IsUserAlias)(),e.__metadata("design:type",String)],u.prototype,"owner",void 0),e.__decorate([(0,n.IsNotEmpty)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],u.prototype,"totalKnownMintsCount",void 0),e.__decorate([(0,o.IsUserAlias)(),e.__metadata("design:type",String)],u.prototype,"requestor",void 0),e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",Number)],u.prototype,"created",void 0),e.__decorate([(0,n.IsNotEmpty)(),(0,o.BigNumberIsNotNegative)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],u.prototype,"quantity",void 0),e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",Number)],u.prototype,"state",void 0),e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],u.prototype,"id",void 0),e.__decorate([(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],u.prototype,"epoch",void 0),e.__decorate([(0,n.IsOptional)(),(0,r.Type)(()=>c.AllowanceKey),(0,n.IsNotEmpty)(),e.__metadata("design:type",c.AllowanceKey)],u.prototype,"allowanceKey",void 0),iN}var aN,dN={};function sN(){if(aN)return dN;aN=1,Object.defineProperty(dN,"__esModule",{value:!0}),dN.TokenSwapFill=void 0;const e=Re,t=e.__importDefault(mt),r=At,n=uy,i=Mv(),o=Uv(),a=Zv();let d=class extends a.ChainObject{};return dN.TokenSwapFill=d,d.INDEX_KEY="GCTSF",e.__decorate([(0,i.ChainKey)({position:0}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],d.prototype,"swapRequestId",void 0),e.__decorate([(0,i.ChainKey)({position:1}),(0,o.IsUserAlias)(),e.__metadata("design:type",String)],d.prototype,"filledBy",void 0),e.__decorate([(0,i.ChainKey)({position:2}),(0,n.IsPositive)(),e.__metadata("design:type",Number)],d.prototype,"created",void 0),e.__decorate([(0,o.BigNumberIsPositive)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],d.prototype,"uses",void 0),e.__decorate([(0,r.Exclude)(),e.__metadata("design:type",Object)],d,"INDEX_KEY",void 0),dN}var cN,uN={};function lN(){if(cN)return uN;cN=1,Object.defineProperty(uN,"__esModule",{value:!0}),uN.TokenSwapRequestInstanceOffered=void 0;const e=Re,t=e.__importDefault(mt),r=At,n=uy,i=Mv(),o=Uv(),a=Zv();let d=class extends a.ChainObject{};return uN.TokenSwapRequestInstanceOffered=d,d.INDEX_KEY="GCTSRIO",e.__decorate([(0,i.ChainKey)({position:0}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],d.prototype,"collection",void 0),e.__decorate([(0,i.ChainKey)({position:1}),e.__metadata("design:type",String)],d.prototype,"category",void 0),e.__decorate([(0,i.ChainKey)({position:2}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],d.prototype,"type",void 0),e.__decorate([(0,i.ChainKey)({position:3}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],d.prototype,"additionalKey",void 0),e.__decorate([(0,i.ChainKey)({position:4}),(0,n.IsNotEmpty)(),(0,o.BigNumberIsInteger)(),(0,o.BigNumberIsNotNegative)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],d.prototype,"instance",void 0),e.__decorate([(0,i.ChainKey)({position:5}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],d.prototype,"swapRequestId",void 0),e.__decorate([(0,r.Exclude)(),e.__metadata("design:type",Object)],d,"INDEX_KEY",void 0),uN}var fN,pN={};function hN(){if(fN)return pN;fN=1,Object.defineProperty(pN,"__esModule",{value:!0}),pN.TokenSwapRequestInstanceWanted=void 0;const e=Re,t=e.__importDefault(mt),r=At,n=uy,i=Mv(),o=Uv(),a=Zv();let d=class extends a.ChainObject{};return pN.TokenSwapRequestInstanceWanted=d,d.INDEX_KEY="GCTSRIW",e.__decorate([(0,i.ChainKey)({position:0}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],d.prototype,"collection",void 0),e.__decorate([(0,i.ChainKey)({position:1}),e.__metadata("design:type",String)],d.prototype,"category",void 0),e.__decorate([(0,i.ChainKey)({position:2}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],d.prototype,"type",void 0),e.__decorate([(0,i.ChainKey)({position:3}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],d.prototype,"additionalKey",void 0),e.__decorate([(0,i.ChainKey)({position:4}),(0,n.IsNotEmpty)(),(0,o.BigNumberIsInteger)(),(0,o.BigNumberIsNotNegative)(),(0,o.BigNumberProperty)(),e.__metadata("design:type",t.default)],d.prototype,"instance",void 0),e.__decorate([(0,i.ChainKey)({position:5}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],d.prototype,"swapRequestId",void 0),e.__decorate([(0,r.Exclude)(),e.__metadata("design:type",Object)],d,"INDEX_KEY",void 0),pN}var yN,mN={};function gN(){if(yN)return mN;yN=1,Object.defineProperty(mN,"__esModule",{value:!0}),mN.TokenSwapRequestOfferedBy=void 0;const e=Re,t=At,r=uy,n=Mv(),i=Uv(),o=Zv();let a=class extends o.ChainObject{};return mN.TokenSwapRequestOfferedBy=a,a.INDEX_KEY="GCTSROB",e.__decorate([(0,n.ChainKey)({position:0}),(0,i.IsUserAlias)(),e.__metadata("design:type",String)],a.prototype,"offeredBy",void 0),e.__decorate([(0,n.ChainKey)({position:1}),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],a.prototype,"swapRequestId",void 0),e.__decorate([(0,t.Exclude)(),e.__metadata("design:type",Object)],a,"INDEX_KEY",void 0),mN}var _N,vN={};function bN(){if(_N)return vN;_N=1,Object.defineProperty(vN,"__esModule",{value:!0}),vN.TokenSwapRequestOfferedTo=void 0;const e=Re,t=At,r=uy,n=Mv(),i=Zv();let o=class extends i.ChainObject{};return vN.TokenSwapRequestOfferedTo=o,o.INDEX_KEY="GCTSROT",e.__decorate([(0,n.ChainKey)({position:0}),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],o.prototype,"offeredTo",void 0),e.__decorate([(0,n.ChainKey)({position:1}),(0,r.IsNotEmpty)(),e.__metadata("design:type",String)],o.prototype,"swapRequestId",void 0),e.__decorate([(0,t.Exclude)(),e.__metadata("design:type",Object)],o,"INDEX_KEY",void 0),vN}var SN,IN={};function NN(){if(SN)return IN;SN=1,Object.defineProperty(IN,"__esModule",{value:!0}),IN.asValidUserAlias=void 0;const e=Mv(),t=Uv();return IN.asValidUserAlias=function(r){const n=(0,t.validateUserAlias)(r);if(!(0,t.meansValidUserAlias)(n)){const i=t.UserAliasValidationResult[n];throw new e.ValidationFailedError(`Invalid user alias (${i}): ${r}`)}return r},IN}var $N,wN={};function AN(){if($N)return wN;$N=1,Object.defineProperty(wN,"__esModule",{value:!0}),wN.asValidUserRef=void 0;const e=Mv(),t=Uv();return wN.asValidUserRef=function(r){const n=(0,t.validateUserRef)(r);if(!(0,t.meansValidUserRef)(n)){const i=t.UserRefValidationResult[n];throw new e.ValidationFailedError(`Invalid user reference (${i}): ${r}`)}return r},wN}var ON,MN,TN,EN={};function CN(){if(ON)return EN;ON=1,Object.defineProperty(EN,"__esModule",{value:!0}),EN.CreateVestingTokenDto=EN.FetchVestingTokenDto=EN.VestingTokenInfo=EN.VestingToken=EN.Allocation=void 0;const e=Re,t=e.__importDefault(mt),r=At,n=uy,i=Ey(),o=Mv(),a=Uv(),d=Zv(),s=FS(),c=ob(),u=ib(),l=BS();class f{}EN.Allocation=f,e.__decorate([(0,n.IsString)(),e.__metadata("design:type",String)],f.prototype,"name",void 0),e.__decorate([(0,a.IsUserAlias)(),e.__metadata("design:type",String)],f.prototype,"owner",void 0),e.__decorate([(0,a.BigNumberIsNotNegative)(),(0,a.BigNumberProperty)(),e.__metadata("design:type",t.default)],f.prototype,"quantity",void 0),e.__decorate([(0,n.Min)(0),(0,n.IsInt)(),e.__metadata("design:type",Number)],f.prototype,"cliff",void 0),e.__decorate([(0,n.Min)(0),(0,n.IsInt)(),e.__metadata("design:type",Number)],f.prototype,"vestingDays",void 0);let p=class extends d.ChainObject{};EN.VestingToken=p,p.INDEX_KEY="GCVT",e.__decorate([(0,o.ChainKey)({position:0}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],p.prototype,"collection",void 0),e.__decorate([(0,o.ChainKey)({position:1}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],p.prototype,"category",void 0),e.__decorate([(0,o.ChainKey)({position:2}),(0,n.IsNotEmpty)(),e.__metadata("design:type",String)],p.prototype,"type",void 0),e.__decorate([(0,o.ChainKey)({position:3}),(0,n.IsDefined)(),e.__metadata("design:type",String)],p.prototype,"additionalKey",void 0),e.__decorate([(0,n.IsString)(),e.__metadata("design:type",String)],p.prototype,"vestingName",void 0),e.__decorate([(0,n.Min)(0),(0,n.IsInt)(),e.__metadata("design:type",Number)],p.prototype,"startDate",void 0),e.__decorate([(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>f),(0,n.ArrayMinSize)(1),(0,n.ArrayUnique)(),e.__metadata("design:type",Array)],p.prototype,"allocations",void 0),e.__decorate([(0,r.Exclude)(),e.__metadata("design:type",Object)],p,"INDEX_KEY",void 0);class h{}EN.VestingTokenInfo=h,e.__decorate([(0,n.ValidateNested)(),(0,r.Type)(()=>p),(0,n.IsNotEmpty)(),e.__metadata("design:type",p)],h.prototype,"vestingToken",void 0),e.__decorate([(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>s.TokenBalance),(0,n.ArrayNotEmpty)(),e.__metadata("design:type",Array)],h.prototype,"allocationBalances",void 0);let y=class extends u.ChainCallDTO{};EN.FetchVestingTokenDto=y,e.__decorate([(0,i.JSONSchema)({description:"The Vested Token Class to be Fetched."}),(0,n.ValidateNested)(),(0,r.Type)(()=>c.TokenClassKey),e.__metadata("design:type",c.TokenClassKey)],y.prototype,"tokenClasses",void 0),EN.FetchVestingTokenDto=y=e.__decorate([(0,i.JSONSchema)({description:"Fetch vesting info including balances of allocations"})],y);let m=class extends u.SubmitCallDTO{};return EN.CreateVestingTokenDto=m,e.__decorate([(0,i.JSONSchema)({description:"The Token Class to be created with Vesting."}),(0,n.ValidateNested)(),(0,r.Type)(()=>l.CreateTokenClassDto),(0,n.IsNotEmpty)(),e.__metadata("design:type",l.CreateTokenClassDto)],m.prototype,"tokenClass",void 0),e.__decorate([(0,i.JSONSchema)({description:"Name for the token holds. This name will be applied to all token holds created."}),(0,n.IsString)(),e.__metadata("design:type",String)],m.prototype,"vestingName",void 0),e.__decorate([(0,i.JSONSchema)({description:"Start date timestamp. Cliff and vesting calculations will use this as the starting point."}),(0,n.Min)(0),(0,n.IsInt)(),e.__metadata("design:type",Number)],m.prototype,"startDate",void 0),e.__decorate([(0,i.JSONSchema)({description:"Allocations."}),(0,n.ValidateNested)({each:!0}),(0,r.Type)(()=>f),(0,n.ArrayMinSize)(1),(0,n.ArrayUnique)(),e.__metadata("design:type",Array)],m.prototype,"allocations",void 0),EN.CreateVestingTokenDto=m=e.__decorate([(0,i.JSONSchema)({description:"Contains properties of vesting token to be created."})],m),EN}function xN(){return MN||(MN=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Re;t.__exportStar(He(),e),t.__exportStar(bb(),e),t.__exportStar(Nb(),e),t.__exportStar(Vv(),e),t.__exportStar(Zv(),e),t.__exportStar(Ab(),e),t.__exportStar(Tb(),e),t.__exportStar(Qv(),e),t.__exportStar(Tb(),e),t.__exportStar(ib(),e),t.__exportStar(rS(),e),t.__exportStar(kb(),e),t.__exportStar(Lb(),e),t.__exportStar(jb(),e),t.__exportStar(qb(),e),t.__exportStar(Hb(),e),t.__exportStar(oS(),e),t.__exportStar(sS(),e),t.__exportStar(Yb(),e),t.__exportStar(lS(),e),t.__exportStar(Bb(),e),t.__exportStar(tS(),e),t.__exportStar(hS(),e),t.__exportStar(bS(),e),t.__exportStar(vS(),e),t.__exportStar(NS(),e),t.__exportStar(AS(),e),t.__exportStar(TS(),e),t.__exportStar(xS(),e),t.__exportStar(ab(),e),t.__exportStar(ob(),e),t.__exportStar(BS(),e),t.__exportStar(KS(),e),t.__exportStar(JS(),e),t.__exportStar(zS(),e),t.__exportStar(QS(),e),t.__exportStar(XS(),e),t.__exportStar(FS(),e),t.__exportStar(rI(),e),t.__exportStar(oI(),e),t.__exportStar(sI(),e),t.__exportStar(lI(),e),t.__exportStar(hI(),e),t.__exportStar(gI(),e),t.__exportStar(bI(),e),t.__exportStar(TI(),e),t.__exportStar(MI(),e),t.__exportStar(xI(),e),t.__exportStar(DI(),e),t.__exportStar(vb(),e),t.__exportStar(BI(),e),t.__exportStar(ub(),e),t.__exportStar(pb(),e),t.__exportStar(_b(),e),t.__exportStar(KI(),e),t.__exportStar(zI(),e),t.__exportStar(WI(),e),t.__exportStar(QI(),e),t.__exportStar(OI(),e),t.__exportStar(rN(),e),t.__exportStar(oN(),e),t.__exportStar(sI(),e),t.__exportStar(sN(),e),t.__exportStar(GI(),e),t.__exportStar(lN(),e),t.__exportStar(hN(),e),t.__exportStar(gN(),e),t.__exportStar(bN(),e),t.__exportStar(NN(),e),t.__exportStar(AN(),e),t.__exportStar(CN(),e)}(Ge)),Ge}function kN(){if(TN)return qe;TN=1,Object.defineProperty(qe,"__esModule",{value:!0}),qe.commonContractAPI=void 0;const e=xN();return qe.commonContractAPI=t=>({GetContractVersion:async()=>await t.evaluateTransaction("GetContractVersion"),GetContractAPI:async()=>await t.evaluateTransaction("GetContractAPI"),async GetObjectByKey(r){const n=await(0,e.createValidDTO)(e.GetObjectDto,{objectId:r});return await t.evaluateTransaction("GetObjectByKey",n)},async GetObjectHistory(r){const n=await(0,e.createValidDTO)(e.GetObjectHistoryDto,{objectId:r});return await t.evaluateTransaction("GetObjectHistory",n)},async DryRun(r,n,i){const o=await(0,e.createValidDTO)(e.DryRunDto,{method:r,callerPublicKey:n,dto:i});return await t.evaluateTransaction("DryRun",o)},BatchSubmit:async e=>await t.submitTransaction("BatchSubmit",e),BatchEvaluate:async e=>await t.evaluateTransaction("BatchEvaluate",e)}),qe}var PN,DN,RN={};function FN(){if(PN)return RN;PN=1,Object.defineProperty(RN,"__esModule",{value:!0}),RN.publicKeyContractAPI=void 0;const e=xN(),t=kN();return RN.publicKeyContractAPI=r=>({...(0,t.commonContractAPI)(r),GetPublicKey(t){if("string"==typeof t){const n=new e.GetPublicKeyDto;return n.user=(0,e.asValidUserRef)(t),r.evaluateTransaction("GetPublicKey",n,e.PublicKey)}return r.evaluateTransaction("GetPublicKey",null!=t?t:new e.GetPublicKeyDto,e.PublicKey)},RegisterUser:e=>r.submitTransaction("RegisterUser",e),RegisterEthUser:e=>r.submitTransaction("RegisterEthUser",e),UpdatePublicKey:e=>r.submitTransaction("UpdatePublicKey",e),GetMyProfile:t=>r.evaluateTransaction("GetMyProfile",t,e.UserProfile)}),RN}function BN(){return DN||(DN=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Re;t.__exportStar(Ve(),e),t.__exportStar(kN(),e),t.__exportStar(FN(),e)}(Ke)),Ke}var LN,UN={},KN={};function jN(){if(LN)return KN;LN=1,Object.defineProperty(KN,"__esModule",{value:!0}),KN.ChainClient=KN.isClassType=void 0;KN.isClassType=e=>"function"==typeof e;return KN.ChainClient=class{constructor(e,t,r,n){this.builder=e,this.userId=t,this.contractConfig=r,this.orgMsp=n}extendAPI(e){const t=e(this);return new Proxy(this,{get:(e,r)=>r in t?t[r]:e[r]})}},KN}var VN,JN={};function qN(){if(VN)return JN;VN=1,Object.defineProperty(JN,"__esModule",{value:!0}),JN.ChainClientBuilder=void 0;return JN.ChainClientBuilder=class{},JN}var GN,zN,HN,ZN,WN={};function YN(){if(GN)return WN;GN=1,Object.defineProperty(WN,"__esModule",{value:!0}),WN.ChainUser=void 0;const e=Mv();return WN.ChainUser=class t{constructor(t){this.privateKey=t.privateKey,this.publicKey=e.signatures.getPublicKey(t.privateKey),this.ethAddress=e.signatures.getEthAddress(this.publicKey),void 0===t.name?(this.prefix="eth",this.name=this.ethAddress):(this.prefix="client",this.name=t.name.replace("client|","")),this.identityKey=`${this.prefix}|${this.name}`}static withRandomKeys(r){return new t({...e.signatures.genKeyPair(),name:r})}},WN}function XN(){return zN||(zN=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ChainUser=e.ChainClientBuilder=e.isClassType=e.ChainClient=void 0;var t=jN();Object.defineProperty(e,"ChainClient",{enumerable:!0,get:function(){return t.ChainClient}}),Object.defineProperty(e,"isClassType",{enumerable:!0,get:function(){return t.isClassType}});var r=qN();Object.defineProperty(e,"ChainClientBuilder",{enumerable:!0,get:function(){return r.ChainClientBuilder}});var n=YN();Object.defineProperty(e,"ChainUser",{enumerable:!0,get:function(){return n.ChainUser}})}(UN)),UN}function QN(){return HN||(HN=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Re;t.__exportStar(BN(),e),t.__exportStar(XN(),e)}(Ue)),Ue}function e$(){return ZN||(ZN=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Re;t.__exportStar(QN(),e),t.__exportStar(xN(),e),t.__exportStar(Mv(),e),t.__exportStar(Uv(),e)}(Le)),Le}var t$,r$=W(s),n$={},i$={};function o$(){if(t$)return i$;t$=1,Object.defineProperty(i$,"__esModule",{value:!0}),i$.EventEmitter=i$.calculatePersonalSignPrefix=void 0;const e=e$();i$.calculatePersonalSignPrefix=function(t){let r=e.signatures.getPayloadToSign(t).length,n="Ethereum Signed Message:\n"+r,i=-1;for(;r!==i;){i=r,n="Ethereum Signed Message:\n"+r;const o={...t,prefix:n};r=e.signatures.getPayloadToSign(o).length}return n};return i$.EventEmitter=class{constructor(){this.listeners={}}on(e,t){var r;return this.listeners[e]||(this.listeners[e]=[]),null===(r=this.listeners[e])||void 0===r||r.push(t),this}off(e,t){var r;return this.listeners[e]?(this.listeners[e]=null===(r=this.listeners[e])||void 0===r?void 0:r.filter(e=>e!==t),this):this}emit(e,t){var r;return!!this.listeners[e]&&(null===(r=this.listeners[e])||void 0===r||r.forEach(e=>e(t)),!0)}},i$}var a$,d$={},s$={};function c$(){return a$||(a$=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ChainCallDTO=e.DryRunResult=void 0;const t=e$();Object.defineProperty(e,"ChainCallDTO",{enumerable:!0,get:function(){return t.ChainCallDTO}}),Object.defineProperty(e,"DryRunResult",{enumerable:!0,get:function(){return t.DryRunResultDto}})}(s$)),s$}var u$,l$={};function f$(){if(u$)return l$;u$=1,Object.defineProperty(l$,"__esModule",{value:!0}),l$.GalaChainResponseError=l$.GalaChainResponseSuccess=void 0;l$.GalaChainResponseSuccess=class{constructor(e,t){this.Hash=t,this.Status=e.Status,this.Data=e.Data}};return l$.GalaChainResponseError=class{constructor(e){var t;"string"!=typeof e.error&&e.error?(this.Error=e.error.ErrorKey,this.Message=e.message,this.ErrorCode=e.error.ErrorCode):(this.Error=e.error,this.Message=e.message,this.ErrorCode=null!==(t=e.statusCode)&&void 0!==t?t:500)}},l$}var p$,h$={};function y$(){return p$||(p$=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FetchFeeAuthorizationsResponse=e.FeeProperties=void 0;const t=e$();Object.defineProperty(e,"FeeProperties",{enumerable:!0,get:function(){return t.FeeProperties}}),Object.defineProperty(e,"FetchFeeAuthorizationsResponse",{enumerable:!0,get:function(){return t.FeeAuthorizationResDto}})}(h$)),h$}var m$,g$,_$={},v$={exports:{}},b$=v$.exports;function S$(){return m$||(m$=1,e=v$,function(t){var r,n=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,i=Math.ceil,o=Math.floor,a="[BigNumber Error] ",d=a+"Number primitive has more than 15 significant digits: ",s=1e14,c=14,u=9007199254740991,l=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],f=1e7,p=1e9;function h(e){var t=0|e;return e>0||e===t?t:t-1}function y(e){for(var t,r,n=1,i=e.length,o=e[0]+"";n<i;){for(t=e[n++]+"",r=c-t.length;r--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function m(e,t){var r,n,i=e.c,o=t.c,a=e.s,d=t.s,s=e.e,c=t.e;if(!a||!d)return null;if(r=i&&!i[0],n=o&&!o[0],r||n)return r?n?0:-d:a;if(a!=d)return a;if(r=a<0,n=s==c,!i||!o)return n?0:!i^r?1:-1;if(!n)return s>c^r?1:-1;for(d=(s=i.length)<(c=o.length)?s:c,a=0;a<d;a++)if(i[a]!=o[a])return i[a]>o[a]^r?1:-1;return s==c?0:s>c^r?1:-1}function g(e,t,r,n){if(e<t||e>r||e!==o(e))throw Error(a+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function _(e){var t=e.c.length-1;return h(e.e/c)==t&&e.c[t]%2!=0}function v(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function b(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(++t>(n=e.length)){for(i=r,t-=n;--t;i+=r);e+=i}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}r=function e(t){var r,S,I,N,$,w,A,O,M,T,E=J.prototype={constructor:J,toString:null,valueOf:null},C=new J(1),x=20,k=4,P=-7,D=21,R=-1e7,F=1e7,B=!1,L=1,U=0,K={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},j="0123456789abcdefghijklmnopqrstuvwxyz",V=!0;function J(e,t){var r,i,a,s,l,f,p,h,y=this;if(!(y instanceof J))return new J(e,t);if(null==t){if(e&&!0===e._isBigNumber)return y.s=e.s,void(!e.c||e.e>F?y.c=y.e=null:e.e<R?y.c=[y.e=0]:(y.e=e.e,y.c=e.c.slice()));if((f="number"==typeof e)&&0*e==0){if(y.s=1/e<0?(e=-e,-1):1,e===~~e){for(s=0,l=e;l>=10;l/=10,s++);return void(s>F?y.c=y.e=null:(y.e=s,y.c=[e]))}h=String(e)}else{if(!n.test(h=String(e)))return I(y,h,f);y.s=45==h.charCodeAt(0)?(h=h.slice(1),-1):1}(s=h.indexOf("."))>-1&&(h=h.replace(".","")),(l=h.search(/e/i))>0?(s<0&&(s=l),s+=+h.slice(l+1),h=h.substring(0,l)):s<0&&(s=h.length)}else{if(g(t,2,j.length,"Base"),10==t&&V)return H(y=new J(e),x+y.e+1,k);if(h=String(e),f="number"==typeof e){if(0*e!=0)return I(y,h,f,t);if(y.s=1/e<0?(h=h.slice(1),-1):1,J.DEBUG&&h.replace(/^0\.0*|\./,"").length>15)throw Error(d+e)}else y.s=45===h.charCodeAt(0)?(h=h.slice(1),-1):1;for(r=j.slice(0,t),s=l=0,p=h.length;l<p;l++)if(r.indexOf(i=h.charAt(l))<0){if("."==i){if(l>s){s=p;continue}}else if(!a&&(h==h.toUpperCase()&&(h=h.toLowerCase())||h==h.toLowerCase()&&(h=h.toUpperCase()))){a=!0,l=-1,s=0;continue}return I(y,String(e),f,t)}f=!1,(s=(h=S(h,t,10,y.s)).indexOf("."))>-1?h=h.replace(".",""):s=h.length}for(l=0;48===h.charCodeAt(l);l++);for(p=h.length;48===h.charCodeAt(--p););if(h=h.slice(l,++p)){if(p-=l,f&&J.DEBUG&&p>15&&(e>u||e!==o(e)))throw Error(d+y.s*e);if((s=s-l-1)>F)y.c=y.e=null;else if(s<R)y.c=[y.e=0];else{if(y.e=s,y.c=[],l=(s+1)%c,s<0&&(l+=c),l<p){for(l&&y.c.push(+h.slice(0,l)),p-=c;l<p;)y.c.push(+h.slice(l,l+=c));l=c-(h=h.slice(l)).length}else l-=p;for(;l--;h+="0");y.c.push(+h)}}else y.c=[y.e=0]}function q(e,t,r,n){var i,o,a,d,s;if(null==r?r=k:g(r,0,8),!e.c)return e.toString();if(i=e.c[0],a=e.e,null==t)s=y(e.c),s=1==n||2==n&&(a<=P||a>=D)?v(s,a):b(s,a,"0");else if(o=(e=H(new J(e),t,r)).e,d=(s=y(e.c)).length,1==n||2==n&&(t<=o||o<=P)){for(;d<t;s+="0",d++);s=v(s,o)}else if(t-=a,s=b(s,o,"0"),o+1>d){if(--t>0)for(s+=".";t--;s+="0");}else if((t+=o-d)>0)for(o+1==d&&(s+=".");t--;s+="0");return e.s<0&&i?"-"+s:s}function G(e,t){for(var r,n,i=1,o=new J(e[0]);i<e.length;i++)(!(n=new J(e[i])).s||(r=m(o,n))===t||0===r&&o.s===t)&&(o=n);return o}function z(e,t,r){for(var n=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,n++);return(r=n+r*c-1)>F?e.c=e.e=null:r<R?e.c=[e.e=0]:(e.e=r,e.c=t),e}function H(e,t,r,n){var a,d,u,f,p,h,y,m=e.c,g=l;if(m){e:{for(a=1,f=m[0];f>=10;f/=10,a++);if((d=t-a)<0)d+=c,u=t,p=m[h=0],y=o(p/g[a-u-1]%10);else if((h=i((d+1)/c))>=m.length){if(!n)break e;for(;m.length<=h;m.push(0));p=y=0,a=1,u=(d%=c)-c+1}else{for(p=f=m[h],a=1;f>=10;f/=10,a++);y=(u=(d%=c)-c+a)<0?0:o(p/g[a-u-1]%10)}if(n=n||t<0||null!=m[h+1]||(u<0?p:p%g[a-u-1]),n=r<4?(y||n)&&(0==r||r==(e.s<0?3:2)):y>5||5==y&&(4==r||n||6==r&&(d>0?u>0?p/g[a-u]:0:m[h-1])%10&1||r==(e.s<0?8:7)),t<1||!m[0])return m.length=0,n?(t-=e.e+1,m[0]=g[(c-t%c)%c],e.e=-t||0):m[0]=e.e=0,e;if(0==d?(m.length=h,f=1,h--):(m.length=h+1,f=g[c-d],m[h]=u>0?o(p/g[a-u]%g[u])*f:0),n)for(;;){if(0==h){for(d=1,u=m[0];u>=10;u/=10,d++);for(u=m[0]+=f,f=1;u>=10;u/=10,f++);d!=f&&(e.e++,m[0]==s&&(m[0]=1));break}if(m[h]+=f,m[h]!=s)break;m[h--]=0,f=1}for(d=m.length;0===m[--d];m.pop());}e.e>F?e.c=e.e=null:e.e<R&&(e.c=[e.e=0])}return e}function Z(e){var t,r=e.e;return null===r?e.toString():(t=y(e.c),t=r<=P||r>=D?v(t,r):b(t,r,"0"),e.s<0?"-"+t:t)}return J.clone=e,J.ROUND_UP=0,J.ROUND_DOWN=1,J.ROUND_CEIL=2,J.ROUND_FLOOR=3,J.ROUND_HALF_UP=4,J.ROUND_HALF_DOWN=5,J.ROUND_HALF_EVEN=6,J.ROUND_HALF_CEIL=7,J.ROUND_HALF_FLOOR=8,J.EUCLID=9,J.config=J.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(a+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(g(r=e[t],0,p,t),x=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(g(r=e[t],0,8,t),k=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(g(r[0],-p,0,t),g(r[1],0,p,t),P=r[0],D=r[1]):(g(r,-p,p,t),P=-(D=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)g(r[0],-p,-1,t),g(r[1],1,p,t),R=r[0],F=r[1];else{if(g(r,-p,p,t),!r)throw Error(a+t+" cannot be zero: "+r);R=-(F=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(a+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw B=!r,Error(a+"crypto unavailable");B=r}else B=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(g(r=e[t],0,9,t),L=r),e.hasOwnProperty(t="POW_PRECISION")&&(g(r=e[t],0,p,t),U=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(a+t+" not an object: "+r);K=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(a+t+" invalid: "+r);V="0123456789"==r.slice(0,10),j=r}}return{DECIMAL_PLACES:x,ROUNDING_MODE:k,EXPONENTIAL_AT:[P,D],RANGE:[R,F],CRYPTO:B,MODULO_MODE:L,POW_PRECISION:U,FORMAT:K,ALPHABET:j}},J.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!J.DEBUG)return!0;var t,r,n=e.c,i=e.e,d=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===d||-1===d)&&i>=-p&&i<=p&&i===o(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break e}if((t=(i+1)%c)<1&&(t+=c),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=s||r!==o(r))break e;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===d||1===d||-1===d))return!0;throw Error(a+"Invalid BigNumber: "+e)},J.maximum=J.max=function(){return G(arguments,-1)},J.minimum=J.min=function(){return G(arguments,1)},J.random=(N=9007199254740992,$=Math.random()*N&2097151?function(){return o(Math.random()*N)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,d,s,u=0,f=[],h=new J(C);if(null==e?e=x:g(e,0,p),d=i(e/c),B)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(d*=2));u<d;)(s=131072*t[u]+(t[u+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[u]=r[0],t[u+1]=r[1]):(f.push(s%1e14),u+=2);u=d/2}else{if(!crypto.randomBytes)throw B=!1,Error(a+"crypto unavailable");for(t=crypto.randomBytes(d*=7);u<d;)(s=281474976710656*(31&t[u])+1099511627776*t[u+1]+4294967296*t[u+2]+16777216*t[u+3]+(t[u+4]<<16)+(t[u+5]<<8)+t[u+6])>=9e15?crypto.randomBytes(7).copy(t,u):(f.push(s%1e14),u+=7);u=d/7}if(!B)for(;u<d;)(s=$())<9e15&&(f[u++]=s%1e14);for(d=f[--u],e%=c,d&&e&&(s=l[c-e],f[u]=o(d/s)*s);0===f[u];f.pop(),u--);if(u<0)f=[n=0];else{for(n=-1;0===f[0];f.splice(0,1),n-=c);for(u=1,s=f[0];s>=10;s/=10,u++);u<c&&(n-=c-u)}return h.e=n,h.c=f,h}),J.sum=function(){for(var e=1,t=arguments,r=new J(t[0]);e<t.length;)r=r.plus(t[e++]);return r},S=function(){var e="0123456789";function t(e,t,r,n){for(var i,o,a=[0],d=0,s=e.length;d<s;){for(o=a.length;o--;a[o]*=t);for(a[0]+=n.indexOf(e.charAt(d++)),i=0;i<a.length;i++)a[i]>r-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/r|0,a[i]%=r)}return a.reverse()}return function(n,i,o,a,d){var s,c,u,l,f,p,h,m,g=n.indexOf("."),_=x,v=k;for(g>=0&&(l=U,U=0,n=n.replace(".",""),p=(m=new J(i)).pow(n.length-g),U=l,m.c=t(b(y(p.c),p.e,"0"),10,o,e),m.e=m.c.length),u=l=(h=t(n,i,o,d?(s=j,e):(s=e,j))).length;0==h[--l];h.pop());if(!h[0])return s.charAt(0);if(g<0?--u:(p.c=h,p.e=u,p.s=a,h=(p=r(p,m,_,v,o)).c,f=p.r,u=p.e),g=h[c=u+_+1],l=o/2,f=f||c<0||null!=h[c+1],f=v<4?(null!=g||f)&&(0==v||v==(p.s<0?3:2)):g>l||g==l&&(4==v||f||6==v&&1&h[c-1]||v==(p.s<0?8:7)),c<1||!h[0])n=f?b(s.charAt(1),-_,s.charAt(0)):s.charAt(0);else{if(h.length=c,f)for(--o;++h[--c]>o;)h[c]=0,c||(++u,h=[1].concat(h));for(l=h.length;!h[--l];);for(g=0,n="";g<=l;n+=s.charAt(h[g++]));n=b(n,u,s.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,i,o,a,d=0,s=e.length,c=t%f,u=t/f|0;for(e=e.slice();s--;)d=((i=c*(o=e[s]%f)+(n=u*o+(a=e[s]/f|0)*c)%f*f+d)/r|0)+(n/f|0)+u*a,e[s]=i%r;return d&&(e=[d].concat(e)),e}function t(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;i<r;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]<t[r]?1:0,e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,i,a,d,u){var l,f,p,y,m,g,_,v,b,S,I,N,$,w,A,O,M,T=n.s==i.s?1:-1,E=n.c,C=i.c;if(!(E&&E[0]&&C&&C[0]))return new J(n.s&&i.s&&(E?!C||E[0]!=C[0]:C)?E&&0==E[0]||!C?0*T:T/0:NaN);for(b=(v=new J(T)).c=[],T=a+(f=n.e-i.e)+1,u||(u=s,f=h(n.e/c)-h(i.e/c),T=T/c|0),p=0;C[p]==(E[p]||0);p++);if(C[p]>(E[p]||0)&&f--,T<0)b.push(1),y=!0;else{for(w=E.length,O=C.length,p=0,T+=2,(m=o(u/(C[0]+1)))>1&&(C=e(C,m,u),E=e(E,m,u),O=C.length,w=E.length),$=O,I=(S=E.slice(0,O)).length;I<O;S[I++]=0);M=C.slice(),M=[0].concat(M),A=C[0],C[1]>=u/2&&A++;do{if(m=0,(l=t(C,S,O,I))<0){if(N=S[0],O!=I&&(N=N*u+(S[1]||0)),(m=o(N/A))>1)for(m>=u&&(m=u-1),_=(g=e(C,m,u)).length,I=S.length;1==t(g,S,_,I);)m--,r(g,O<_?M:C,_,u),_=g.length,l=1;else 0==m&&(l=m=1),_=(g=C.slice()).length;if(_<I&&(g=[0].concat(g)),r(S,g,I,u),I=S.length,-1==l)for(;t(C,S,O,I)<1;)m++,r(S,O<I?M:C,I,u),I=S.length}else 0===l&&(m++,S=[0]);b[p++]=m,S[0]?S[I++]=E[$]||0:(S=[E[$]],I=1)}while(($++<w||null!=S[0])&&T--);y=null!=S[0],b[0]||b.splice(0,1)}if(u==s){for(p=1,T=b[0];T>=10;T/=10,p++);H(v,a+(v.e=p+f*c-1)+1,d,y)}else v.e=f,v.r=+y;return v}}(),w=/^(-?)0([xbo])(?=\w[\w.]*$)/i,A=/^([^.]+)\.$/,O=/^\.([^.]+)$/,M=/^-?(Infinity|NaN)$/,T=/^\s*\+(?=[\w.])|^\s+|\s+$/g,I=function(e,t,r,n){var i,o=r?t:t.replace(T,"");if(M.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!r&&(o=o.replace(w,function(e,t,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t}),n&&(i=n,o=o.replace(A,"$1").replace(O,"0.$1")),t!=o))return new J(o,i);if(J.DEBUG)throw Error(a+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},E.absoluteValue=E.abs=function(){var e=new J(this);return e.s<0&&(e.s=1),e},E.comparedTo=function(e,t){return m(this,new J(e,t))},E.decimalPlaces=E.dp=function(e,t){var r,n,i,o=this;if(null!=e)return g(e,0,p),null==t?t=k:g(t,0,8),H(new J(o),e+o.e+1,t);if(!(r=o.c))return null;if(n=((i=r.length-1)-h(this.e/c))*c,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},E.dividedBy=E.div=function(e,t){return r(this,new J(e,t),x,k)},E.dividedToIntegerBy=E.idiv=function(e,t){return r(this,new J(e,t),0,1)},E.exponentiatedBy=E.pow=function(e,t){var r,n,d,s,u,l,f,p,h=this;if((e=new J(e)).c&&!e.isInteger())throw Error(a+"Exponent not an integer: "+Z(e));if(null!=t&&(t=new J(t)),u=e.e>14,!h.c||!h.c[0]||1==h.c[0]&&!h.e&&1==h.c.length||!e.c||!e.c[0])return p=new J(Math.pow(+Z(h),u?e.s*(2-_(e)):+Z(e))),t?p.mod(t):p;if(l=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new J(NaN);(n=!l&&h.isInteger()&&t.isInteger())&&(h=h.mod(t))}else{if(e.e>9&&(h.e>0||h.e<-1||(0==h.e?h.c[0]>1||u&&h.c[1]>=24e7:h.c[0]<8e13||u&&h.c[0]<=9999975e7)))return s=h.s<0&&_(e)?-0:0,h.e>-1&&(s=1/s),new J(l?1/s:s);U&&(s=i(U/c+2))}for(u?(r=new J(.5),l&&(e.s=1),f=_(e)):f=(d=Math.abs(+Z(e)))%2,p=new J(C);;){if(f){if(!(p=p.times(h)).c)break;s?p.c.length>s&&(p.c.length=s):n&&(p=p.mod(t))}if(d){if(0===(d=o(d/2)))break;f=d%2}else if(H(e=e.times(r),e.e+1,1),e.e>14)f=_(e);else{if(0===(d=+Z(e)))break;f=d%2}h=h.times(h),s?h.c&&h.c.length>s&&(h.c.length=s):n&&(h=h.mod(t))}return n?p:(l&&(p=C.div(p)),t?p.mod(t):s?H(p,U,k,void 0):p)},E.integerValue=function(e){var t=new J(this);return null==e?e=k:g(e,0,8),H(t,t.e+1,e)},E.isEqualTo=E.eq=function(e,t){return 0===m(this,new J(e,t))},E.isFinite=function(){return!!this.c},E.isGreaterThan=E.gt=function(e,t){return m(this,new J(e,t))>0},E.isGreaterThanOrEqualTo=E.gte=function(e,t){return 1===(t=m(this,new J(e,t)))||0===t},E.isInteger=function(){return!!this.c&&h(this.e/c)>this.c.length-2},E.isLessThan=E.lt=function(e,t){return m(this,new J(e,t))<0},E.isLessThanOrEqualTo=E.lte=function(e,t){return-1===(t=m(this,new J(e,t)))||0===t},E.isNaN=function(){return!this.s},E.isNegative=function(){return this.s<0},E.isPositive=function(){return this.s>0},E.isZero=function(){return!!this.c&&0==this.c[0]},E.minus=function(e,t){var r,n,i,o,a=this,d=a.s;if(t=(e=new J(e,t)).s,!d||!t)return new J(NaN);if(d!=t)return e.s=-t,a.plus(e);var u=a.e/c,l=e.e/c,f=a.c,p=e.c;if(!u||!l){if(!f||!p)return f?(e.s=-t,e):new J(p?a:NaN);if(!f[0]||!p[0])return p[0]?(e.s=-t,e):new J(f[0]?a:3==k?-0:0)}if(u=h(u),l=h(l),f=f.slice(),d=u-l){for((o=d<0)?(d=-d,i=f):(l=u,i=p),i.reverse(),t=d;t--;i.push(0));i.reverse()}else for(n=(o=(d=f.length)<(t=p.length))?d:t,d=t=0;t<n;t++)if(f[t]!=p[t]){o=f[t]<p[t];break}if(o&&(i=f,f=p,p=i,e.s=-e.s),(t=(n=p.length)-(r=f.length))>0)for(;t--;f[r++]=0);for(t=s-1;n>d;){if(f[--n]<p[n]){for(r=n;r&&!f[--r];f[r]=t);--f[r],f[n]+=s}f[n]-=p[n]}for(;0==f[0];f.splice(0,1),--l);return f[0]?z(e,f,l):(e.s=3==k?-1:1,e.c=[e.e=0],e)},E.modulo=E.mod=function(e,t){var n,i,o=this;return e=new J(e,t),!o.c||!e.s||e.c&&!e.c[0]?new J(NaN):!e.c||o.c&&!o.c[0]?new J(o):(9==L?(i=e.s,e.s=1,n=r(o,e,0,3),e.s=i,n.s*=i):n=r(o,e,0,L),(e=o.minus(n.times(e))).c[0]||1!=L||(e.s=o.s),e)},E.multipliedBy=E.times=function(e,t){var r,n,i,o,a,d,u,l,p,y,m,g,_,v,b,S=this,I=S.c,N=(e=new J(e,t)).c;if(!(I&&N&&I[0]&&N[0]))return!S.s||!e.s||I&&!I[0]&&!N||N&&!N[0]&&!I?e.c=e.e=e.s=null:(e.s*=S.s,I&&N?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=h(S.e/c)+h(e.e/c),e.s*=S.s,(u=I.length)<(y=N.length)&&(_=I,I=N,N=_,i=u,u=y,y=i),i=u+y,_=[];i--;_.push(0));for(v=s,b=f,i=y;--i>=0;){for(r=0,m=N[i]%b,g=N[i]/b|0,o=i+(a=u);o>i;)r=((l=m*(l=I[--a]%b)+(d=g*l+(p=I[a]/b|0)*m)%b*b+_[o]+r)/v|0)+(d/b|0)+g*p,_[o--]=l%v;_[o]=r}return r?++n:_.splice(0,1),z(e,_,n)},E.negated=function(){var e=new J(this);return e.s=-e.s||null,e},E.plus=function(e,t){var r,n=this,i=n.s;if(t=(e=new J(e,t)).s,!i||!t)return new J(NaN);if(i!=t)return e.s=-t,n.minus(e);var o=n.e/c,a=e.e/c,d=n.c,u=e.c;if(!o||!a){if(!d||!u)return new J(i/0);if(!d[0]||!u[0])return u[0]?e:new J(d[0]?n:0*i)}if(o=h(o),a=h(a),d=d.slice(),i=o-a){for(i>0?(a=o,r=u):(i=-i,r=d),r.reverse();i--;r.push(0));r.reverse()}for((i=d.length)-(t=u.length)<0&&(r=u,u=d,d=r,t=i),i=0;t;)i=(d[--t]=d[t]+u[t]+i)/s|0,d[t]=s===d[t]?0:d[t]%s;return i&&(d=[i].concat(d),++a),z(e,d,a)},E.precision=E.sd=function(e,t){var r,n,i,o=this;if(null!=e&&e!==!!e)return g(e,1,p),null==t?t=k:g(t,0,8),H(new J(o),e,t);if(!(r=o.c))return null;if(n=(i=r.length-1)*c+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&o.e+1>n&&(n=o.e+1),n},E.shiftedBy=function(e){return g(e,-9007199254740991,u),this.times("1e"+e)},E.squareRoot=E.sqrt=function(){var e,t,n,i,o,a=this,d=a.c,s=a.s,c=a.e,u=x+4,l=new J("0.5");if(1!==s||!d||!d[0])return new J(!s||s<0&&(!d||d[0])?NaN:d?a:1/0);if(0==(s=Math.sqrt(+Z(a)))||s==1/0?(((t=y(d)).length+c)%2==0&&(t+="0"),s=Math.sqrt(+t),c=h((c+1)/2)-(c<0||c%2),n=new J(t=s==1/0?"5e"+c:(t=s.toExponential()).slice(0,t.indexOf("e")+1)+c)):n=new J(s+""),n.c[0])for((s=(c=n.e)+u)<3&&(s=0);;)if(o=n,n=l.times(o.plus(r(a,o,u,1))),y(o.c).slice(0,s)===(t=y(n.c)).slice(0,s)){if(n.e<c&&--s,"9999"!=(t=t.slice(s-3,s+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(H(n,n.e+x+2,1),e=!n.times(n).eq(a));break}if(!i&&(H(o,o.e+x+2,0),o.times(o).eq(a))){n=o;break}u+=4,s+=4,i=1}return H(n,n.e+x+1,k,e)},E.toExponential=function(e,t){return null!=e&&(g(e,0,p),e++),q(this,e,t,1)},E.toFixed=function(e,t){return null!=e&&(g(e,0,p),e=e+this.e+1),q(this,e,t)},E.toFormat=function(e,t,r){var n,i=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=K;else if("object"!=typeof r)throw Error(a+"Argument not an object: "+r);if(n=i.toFixed(e,t),i.c){var o,d=n.split("."),s=+r.groupSize,c=+r.secondaryGroupSize,u=r.groupSeparator||"",l=d[0],f=d[1],p=i.s<0,h=p?l.slice(1):l,y=h.length;if(c&&(o=s,s=c,c=o,y-=o),s>0&&y>0){for(o=y%s||s,l=h.substr(0,o);o<y;o+=s)l+=u+h.substr(o,s);c>0&&(l+=u+h.slice(o)),p&&(l="-"+l)}n=f?l+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?f.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):f):l}return(r.prefix||"")+n+(r.suffix||"")},E.toFraction=function(e){var t,n,i,o,d,s,u,f,p,h,m,g,_=this,v=_.c;if(null!=e&&(!(u=new J(e)).isInteger()&&(u.c||1!==u.s)||u.lt(C)))throw Error(a+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+Z(u));if(!v)return new J(_);for(t=new J(C),p=n=new J(C),i=f=new J(C),g=y(v),d=t.e=g.length-_.e-1,t.c[0]=l[(s=d%c)<0?c+s:s],e=!e||u.comparedTo(t)>0?d>0?t:p:u,s=F,F=1/0,u=new J(g),f.c[0]=0;h=r(u,t,0,1),1!=(o=n.plus(h.times(i))).comparedTo(e);)n=i,i=o,p=f.plus(h.times(o=p)),f=o,t=u.minus(h.times(o=t)),u=o;return o=r(e.minus(n),i,0,1),f=f.plus(o.times(p)),n=n.plus(o.times(i)),f.s=p.s=_.s,m=r(p,i,d*=2,k).minus(_).abs().comparedTo(r(f,n,d,k).minus(_).abs())<1?[p,i]:[f,n],F=s,m},E.toNumber=function(){return+Z(this)},E.toPrecision=function(e,t){return null!=e&&g(e,1,p),q(this,e,t,2)},E.toString=function(e){var t,r=this,n=r.s,i=r.e;return null===i?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(null==e?t=i<=P||i>=D?v(y(r.c),i):b(y(r.c),i,"0"):10===e&&V?t=b(y((r=H(new J(r),x+i+1,k)).c),r.e,"0"):(g(e,2,j.length,"Base"),t=S(b(y(r.c),i,"0"),10,e,n,!0)),n<0&&r.c[0]&&(t="-"+t)),t},E.valueOf=E.toJSON=function(){return Z(this)},E._isBigNumber=!0,null!=t&&J.set(t),J}(),r.default=r.BigNumber=r,e.exports?e.exports=r:(t||(t="undefined"!=typeof self&&self?self:window),t.BigNumber=r)}(b$)),v$.exports;var e}function I$(){return g$||(g$=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TokenInstanceKey=e.TokenHold=e.TokenClassKey=e.TokenClass=e.TokenBurn=e.TokenBalanceWithMetadata=e.TokenBalance=e.TokenAllowance=e.HighThroughputMintTokenResponse=e.FullAllowanceCheckResponse=e.FetchTokenClassesResponse=e.FetchBalancesWithTokenMetadataResponse=e.FetchAllowancesResponse=void 0;const t=Re,r=e$();Object.defineProperty(e,"FetchAllowancesResponse",{enumerable:!0,get:function(){return r.FetchAllowancesResponse}}),Object.defineProperty(e,"FetchBalancesWithTokenMetadataResponse",{enumerable:!0,get:function(){return r.FetchBalancesWithTokenMetadataResponse}}),Object.defineProperty(e,"FetchTokenClassesResponse",{enumerable:!0,get:function(){return r.FetchTokenClassesResponse}}),Object.defineProperty(e,"FullAllowanceCheckResponse",{enumerable:!0,get:function(){return r.FullAllowanceCheckResDto}}),Object.defineProperty(e,"HighThroughputMintTokenResponse",{enumerable:!0,get:function(){return r.FulfillMintDto}}),Object.defineProperty(e,"TokenAllowance",{enumerable:!0,get:function(){return r.TokenAllowance}}),Object.defineProperty(e,"TokenBalanceWithMetadata",{enumerable:!0,get:function(){return r.TokenBalanceWithMetadata}}),Object.defineProperty(e,"TokenBurn",{enumerable:!0,get:function(){return r.TokenBurn}}),Object.defineProperty(e,"TokenClass",{enumerable:!0,get:function(){return r.TokenClass}}),Object.defineProperty(e,"TokenClassKey",{enumerable:!0,get:function(){return r.TokenClassKey}}),Object.defineProperty(e,"TokenHold",{enumerable:!0,get:function(){return r.TokenHold}}),Object.defineProperty(e,"TokenInstanceKey",{enumerable:!0,get:function(){return r.TokenInstanceKey}});const n=t.__importDefault(S$()),i=At,o=uy;class a{}e.TokenBalance=a,t.__decorate([(0,r.IsUserAlias)(),t.__metadata("design:type",String)],a.prototype,"owner",void 0),t.__decorate([(0,o.IsNotEmpty)(),t.__metadata("design:type",String)],a.prototype,"collection",void 0),t.__decorate([(0,o.IsNotEmpty)(),t.__metadata("design:type",String)],a.prototype,"category",void 0),t.__decorate([(0,o.IsNotEmpty)(),t.__metadata("design:type",String)],a.prototype,"type",void 0),t.__decorate([(0,o.IsDefined)(),t.__metadata("design:type",String)],a.prototype,"additionalKey",void 0),t.__decorate([(0,o.IsOptional)(),(0,r.BigNumberArrayProperty)(),t.__metadata("design:type",Array)],a.prototype,"instanceIds",void 0),t.__decorate([(0,o.IsOptional)(),(0,o.ValidateNested)({each:!0}),(0,i.Type)(()=>r.TokenHold),t.__metadata("design:type",Array)],a.prototype,"lockedHolds",void 0),t.__decorate([(0,o.IsOptional)(),(0,o.ValidateNested)({each:!0}),(0,i.Type)(()=>r.TokenHold),t.__metadata("design:type",Array)],a.prototype,"inUseHolds",void 0),t.__decorate([(0,r.BigNumberIsNotNegative)(),(0,r.BigNumberProperty)(),t.__metadata("design:type",n.default)],a.prototype,"quantity",void 0)}(_$)),_$}var N$,$$={};function w$(){return N$||(N$=1,Object.defineProperty($$,"__esModule",{value:!0})),$$}var A$,O$,M$={};function T$(){return A$||(A$=1,Object.defineProperty(M$,"__esModule",{value:!0}),M$.SigningType=void 0,function(e){e.PERSONAL_SIGN="personalSign",e.SIGN_TYPED_DATA="signTypedData"}(e||(M$.SigningType=e={}))),M$;var e}function E$(){return O$||(O$=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Re;t.__exportStar(c$(),e),t.__exportStar(f$(),e),t.__exportStar(y$(),e),t.__exportStar(I$(),e),t.__exportStar(w$(),e),t.__exportStar(T$(),e)}(d$)),d$}var C$,x$,k$,P$,D$,R$={},F$={},B$={};function L$(){if(C$)return B$;C$=1,Object.defineProperty(B$,"__esModule",{value:!0}),B$.ethereumToGalaChainAddress=B$.galaChainToEthereumAddress=B$.generateEIP712Value=B$.capitalizeFirstLetter=B$.generateEIP712Types=void 0;const e=r$;function t(e){return e.charAt(0).toUpperCase()+e.slice(1)}return B$.generateEIP712Types=function(e,t){const r={};function n(e,t,i,o=!1){if(Array.isArray(t)){const a=n(e,t[0],i,!0);o||r[i].push({name:e,type:(null!=a?a:e)+"[]"})}else if("object"==typeof t&&null!==t){if(r[e])throw new Error("Name collisions not yet supported");r[e]=[],Object.entries(t).forEach(([t,r])=>{n(t,r,e)}),o||r[i].push({name:e,type:e})}else{let n;switch(typeof t){case"string":n="string";break;case"number":n="uint256";break;case"boolean":n="bool";break;default:throw new Error(`Unsupported type, ${typeof t}, value: ${t}`)}if(o)return n;r[i].push({name:e,type:n})}}return r[e]=[],Object.entries(t).forEach(([t,r])=>{n(t,r,e)}),r},B$.capitalizeFirstLetter=t,B$.generateEIP712Value=function(e){const r={};function n(e,i){Array.isArray(i)||"object"==typeof i&&null!==i?Object.entries(i).forEach(([r,i])=>{n(`${e}${t(r)}`,i)}):r[e]=i}return Object.entries(e).forEach(([e,t])=>{n(e,t)}),r},B$.galaChainToEthereumAddress=function(t){return t?(0,e.getAddress)(`0x${t.replace(/0x|eth\|/,"")}`):""},B$.ethereumToGalaChainAddress=function(e){var t;return null!==(t=null==e?void 0:e.replace("0x","eth|"))&&void 0!==t?t:""},B$}function U$(){if(x$)return F$;x$=1,Object.defineProperty(F$,"__esModule",{value:!0}),F$.WalletUtils=void 0;const e=r$,t=L$();return F$.WalletUtils=class r{static createRandom(){const r=e.ethers.Wallet.createRandom();return{galachainAddress:(0,t.ethereumToGalaChainAddress)(r.address),privateKey:r.privateKey,publicKey:r.publicKey,ethAddress:r.address,mnemonic:r.mnemonic}}static async registerWallet(e,t){try{const r=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({publicKey:t})});if(201===r.status)return"Wallet registered successfully";throw new Error(`Unexpected response status: ${r.status}`)}catch(e){return`Error registering wallet: ${e.message}`}}static async createAndRegisterRandomWallet(e){const t=r.createRandom();return await r.registerWallet(e,t.publicKey),t}},F$}function K$(){return k$||(k$=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Re;t.__exportStar(U$(),e),t.__exportStar(L$(),e)}(R$)),R$}function j$(){if(P$)return n$;P$=1,Object.defineProperty(n$,"__esModule",{value:!0}),n$.WebSigner=n$.CustomClient=n$.GalaChainProvider=void 0;const e=e$(),t=At,r=r$,n=o$(),i=E$(),o=K$();class a{constructor(e){this.options=e,(null==e?void 0:e.legacyCredentials)&&(this.legacyCredentials={"X-Identity-Lookup-Key":e.legacyCredentials.identityLookupKey,"X-User-Encryption-Key":e.legacyCredentials.userEncryptionKey})}async submit(r){var n,o,a,{url:d,method:s,payload:c,sign:u,headers:l={},requestConstructor:f,responseConstructor:p,signingType:h=(null!==(o=null===(n=this.options)||void 0===n?void 0:n.signingType)&&void 0!==o?o:i.SigningType.SIGN_TYPED_DATA)}=r;f&&await(0,e.createValidDTO)(f,c);let y=(0,t.instanceToPlain)(c);if(!0===u&&("object"!=typeof c||null===c||!("signature"in c)||null===c.signature))try{y=await this.sign(s,y,h)}catch(e){throw new Error(e.message)}const m=`${d}/${s}`,g=await fetch(m,{method:"POST",body:(0,e.serialize)(y),headers:{"Content-Type":"application/json",...this.legacyCredentials,...l}}),_=null!==(a=g.headers.get("x-transaction-id"))&&void 0!==a?a:void 0;if("0"!==g.headers.get("content-length")){let e;try{e=await g.json()}catch(e){throw new Error("Invalid JSON response")}if(!g.ok||e.error)throw new i.GalaChainResponseError(e);{const r=p?(0,t.plainToInstance)(p,e.Data):e.Data;return new i.GalaChainResponseSuccess({...e,Data:r},_)}}throw new Error(`Unable to get data. Received response: ${JSON.stringify(g)}`)}}n$.GalaChainProvider=a;class d extends a{constructor(e){super(e)}calculatePersonalSignPrefix(t){const r=e.signatures.getPayloadToSign(t).length,n="Ethereum Signed Message:\n"+r,i={...t,prefix:n};return r===e.signatures.getPayloadToSign(i).length?n:this.calculatePersonalSignPrefix(i)}}n$.CustomClient=d;return n$.WebSigner=class extends d{constructor(e){super(e),this.eventEmitter=new n.EventEmitter}set ethereumAddress(e){this.address=(0,o.galaChainToEthereumAddress)(e)}get ethereumAddress(){return this.address}get galaChainAddress(){return(0,o.ethereumToGalaChainAddress)(this.address)}on(e,t){return this.eventEmitter.on(e,t),this}off(e,t){return this.eventEmitter.off(e,t),this}emit(e,t){return this.eventEmitter.emit(e,t)}async getPublicKey(){const e="Sign this to retrieve your public key",t=await this.signMessage(e),n=(0,r.hashMessage)(e),i=r.SigningKey.recoverPublicKey((0,r.getBytes)(n),t);return{publicKey:i,recoveredAddress:(0,r.computeAddress)(i)}}async signMessage(e){if(!this.provider)throw new Error("Ethereum provider not found");if(!this.address)throw new Error("No account connected");try{const t=await this.provider.getSigner();return await t.signMessage(e)}catch(e){throw new Error(e.message)}}},n$}function V$(){if(D$)return Be;D$=1,Object.defineProperty(Be,"__esModule",{value:!0}),Be.BrowserConnectClient=void 0;const e=e$(),t=r$,r=j$(),n=E$(),i=K$();let o=class extends r.WebSigner{constructor(e,r){if(super(r),this.isInitialized=!1,this.address="",this.onAccountsChanged=this.onAccountsChanged.bind(this),e)this.provider=new t.BrowserProvider(e);else{if(!window.ethereum)throw new Error("Ethereum provider not found");this.provider=new t.BrowserProvider(window.ethereum)}}initializeListeners(){window.ethereum&&(this.isInitialized||(window.ethereum.on("accountsChanged",this.onAccountsChanged),this.isInitialized=!0))}onAccountsChanged(e){e.length>0?(this.ethereumAddress=(0,t.getAddress)(e[0]),this.emit("accountChanged",this.galaChainAddress),this.emit("accountsChanged",e)):(this.ethereumAddress="",this.emit("accountChanged",null),this.emit("accountsChanged",null))}async connect(){if(!this.provider)throw new Error("Ethereum provider not found");this.initializeListeners();try{const e=await this.provider.send("eth_requestAccounts",[]);return this.ethereumAddress=(0,t.getAddress)(e[0]),this.galaChainAddress}catch(e){throw new Error(e.message)}}disconnect(){this.isInitialized&&window.ethereum&&(window.ethereum.removeListener("accountsChanged",this.onAccountsChanged),this.isInitialized=!1),this.ethereumAddress=""}async sign(t,r,o=n.SigningType.SIGN_TYPED_DATA){if(!this.provider)throw new Error("Ethereum provider not found");if(!this.address)throw new Error("No account connected");try{const a={name:"GalaChain"},d=(0,i.generateEIP712Types)(t,r),s=this.calculatePersonalSignPrefix(r),c={...r,prefix:s},u=await this.provider.getSigner();if(o===n.SigningType.SIGN_TYPED_DATA){const e=await u.signTypedData(a,d,c);return{...c,signature:e,types:d,domain:a}}if(o===n.SigningType.PERSONAL_SIGN){const t=await u.signMessage((0,e.serialize)(c));return{...c,signature:t}}throw new Error("Unsupported signing type")}catch(e){throw new Error(e.message)}}};return Be.BrowserConnectClient=o,Be}var J$,q$={};function G$(){if(J$)return q$;J$=1,Object.defineProperty(q$,"__esModule",{value:!0}),q$.TrustWalletConnectClient=q$.getTrustWalletInjectedProvider=void 0;const e=r$,t=V$();async function r({timeout:t}={timeout:3e3}){const r=new e.BrowserProvider(n());return r||async function({timeout:e}={timeout:3e3}){return new Promise(t=>{const r=()=>{t(n())};window.addEventListener("trustwallet#initialized",r,{once:!0}),setTimeout(()=>{window.removeEventListener("trustwallet#initialized",r,!1),t(void 0)},e)})}({timeout:t})}function n(){var e,t,r;const n=e=>!!(null==e?void 0:e.isTrust);return"undefined"!=typeof window&&void 0!==window.ethereum?n(window.ethereum)?window.ethereum:(null===(e=window.ethereum)||void 0===e?void 0:e.providers)?null!==(t=window.ethereum.providers.find(n))&&void 0!==t?t:null:null!==(r=window.trustwallet)&&void 0!==r?r:null:null}q$.getTrustWalletInjectedProvider=r;let i=class extends t.BrowserConnectClient{constructor(){super(),this.address=""}async connect(){return this.provider=await r(),super.connect()}};return q$.TrustWalletConnectClient=i,q$}var z$,H$={};function Z$(){if(z$)return H$;z$=1,Object.defineProperty(H$,"__esModule",{value:!0}),H$.SigningClient=void 0;const e=e$(),t=r$,r=j$(),n=o$(),i=E$(),o=K$();let a=class extends r.CustomClient{get ethereumAddress(){return this.wallet.address}get galaChainAddress(){return(0,o.ethereumToGalaChainAddress)(this.wallet.address)}async getPublicKey(){const e="I <3 GalaChain",r=await this.wallet.signMessage(e),n=t.SigningKey.recoverPublicKey((0,t.hashMessage)(e),r);return{publicKey:n,recoveredAddress:(0,t.computeAddress)(n)}}constructor(e,r){super(r),this.wallet=new t.ethers.Wallet(e)}async sign(t,r,a){var d,s;void 0===a&&(a=null!==(s=null===(d=this.options)||void 0===d?void 0:d.signingType)&&void 0!==s?s:i.SigningType.SIGN_TYPED_DATA);try{const d=(0,n.calculatePersonalSignPrefix)(r),s={...r,prefix:d};if(a===i.SigningType.SIGN_TYPED_DATA){const e={name:"GalaChain"},n=(0,o.generateEIP712Types)(t,r),i=await this.wallet.signTypedData(e,n,s);return{...s,signature:i,types:n,domain:e}}if(a===i.SigningType.PERSONAL_SIGN){const t=await this.wallet.signMessage((0,e.serialize)(s));return{...s,signature:t}}throw new Error("Unsupported signing type")}catch(e){throw new Error(e.message)}}};return H$.SigningClient=a,H$}var W$,Y$,X$={};function Q$(){if(W$)return X$;W$=1,Object.defineProperty(X$,"__esModule",{value:!0}),X$.PresignedClient=void 0;const e=j$();let t=class extends e.GalaChainProvider{constructor(e){super(e)}async sign(e,t){return t}};return X$.PresignedClient=t,X$}function ew(){return Y$||(Y$=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Re;t.__exportStar(V$(),e),t.__exportStar(G$(),e),t.__exportStar(Z$(),e),t.__exportStar(Q$(),e)}(Fe)),Fe}var tw,rw,nw={},iw={},ow={};function aw(){if(tw)return ow;tw=1,Object.defineProperty(ow,"__esModule",{value:!0}),ow.GalaChainBaseApi=void 0;const e=e$(),t=E$();return ow.GalaChainBaseApi=class{constructor(e,t){this.chainCodeUrl=e,this.connection=t}async DryRun(r){await(0,e.createValidDTO)(e.DryRunDto,r);const n={...r,dto:JSON.stringify(r.dto)};return this.connection.submit({method:"DryRun",payload:n,sign:!1,url:this.chainCodeUrl,responseConstructor:t.DryRunResult})}GetObjectByKey(t){return this.connection.submit({method:"GetObjectByKey",payload:t,sign:!1,url:this.chainCodeUrl,requestConstructor:e.GetObjectDto})}GetObjectHistory(t){return this.connection.submit({method:"GetObjectHistory",payload:t,sign:!1,url:this.chainCodeUrl,requestConstructor:e.GetObjectHistoryDto})}},ow}function dw(){if(rw)return iw;rw=1,Object.defineProperty(iw,"__esModule",{value:!0}),iw.FeeApi=void 0;const e=e$(),t=E$(),r=aw();let n=class extends r.GalaChainBaseApi{constructor(e,t){super(e,t)}AuthorizeFee(r){return this.connection.submit({method:"AuthorizeFee",payload:r,sign:!0,url:this.chainCodeUrl,requestConstructor:e.FeeAuthorizationDto,responseConstructor:t.FetchFeeAuthorizationsResponse})}FetchFeeAutorizations(r){return this.connection.submit({method:"FetchFeeAutorizations",payload:r,sign:!1,url:this.chainCodeUrl,requestConstructor:e.FetchFeeAuthorizationsDto,responseConstructor:t.FetchFeeAuthorizationsResponse})}FetchFeeProperties(r){return this.connection.submit({method:"FetchFeeProperties",payload:r,sign:!0,url:this.chainCodeUrl,requestConstructor:e.FetchFeePropertiesDto,responseConstructor:t.FeeProperties})}SetFeeProperties(r){return this.connection.submit({method:"SetFeeProperties",payload:r,sign:!0,url:this.chainCodeUrl,requestConstructor:e.FeePropertiesDto,responseConstructor:t.FeeProperties})}};return iw.FeeApi=n,iw}var sw,cw={};function uw(){if(sw)return cw;sw=1,Object.defineProperty(cw,"__esModule",{value:!0}),cw.PublicKeyApi=void 0;const e=e$(),t=At,r=aw();let n=class extends r.GalaChainBaseApi{constructor(e,t){super(e,t)}GetMyProfile(r,n){return this.connection.submit({method:"GetMyProfile",payload:(0,t.plainToInstance)(e.GetMyProfileDto,{...r?{message:r}:{},...n?{signature:n}:{}}),sign:!0,url:this.chainCodeUrl})}RegisterUser(t){return this.connection.submit({method:"RegisterUser",payload:t,sign:!0,url:this.chainCodeUrl,requestConstructor:e.RegisterUserDto})}RegisterEthUser(t){return this.connection.submit({method:"RegisterEthUser",payload:t,sign:!0,url:this.chainCodeUrl,requestConstructor:e.RegisterEthUserDto})}UpdatePublicKey(t){return this.connection.submit({method:"UpdatePublicKey",payload:t,sign:!0,url:this.chainCodeUrl,requestConstructor:e.UpdatePublicKeyDto})}};return cw.PublicKeyApi=n,cw}var lw,fw,pw,hw={};function yw(){if(lw)return hw;lw=1,Object.defineProperty(hw,"__esModule",{value:!0}),hw.TokenApi=void 0;const e=e$(),t=E$(),r=aw();let n=class extends r.GalaChainBaseApi{constructor(e,t){super(e,t)}CreateTokenClass(r){return this.connection.submit({method:"CreateTokenClass",payload:r,sign:!0,url:this.chainCodeUrl,requestConstructor:e.CreateTokenClassDto,responseConstructor:t.TokenClass})}UpdateTokenClass(r){return this.connection.submit({method:"UpdateTokenClass",payload:r,sign:!0,url:this.chainCodeUrl,requestConstructor:e.UpdateTokenClassDto,responseConstructor:t.TokenClassKey})}FetchTokenClasses(r){return this.connection.submit({method:"FetchTokenClasses",payload:r,url:this.chainCodeUrl,requestConstructor:e.FetchTokenClassesDto,responseConstructor:t.TokenClass})}FetchTokenClassesWithSupply(r){return this.connection.submit({method:"FetchTokenClassesWithSupply",payload:r,sign:!0,url:this.chainCodeUrl,requestConstructor:e.FetchTokenClassesDto,responseConstructor:t.TokenClass})}FetchTokenClassesWithPagination(r){return this.connection.submit({method:"FetchTokenClassesWithPagination",payload:r,sign:!0,url:this.chainCodeUrl,requestConstructor:e.FetchTokenClassesWithPaginationDto,responseConstructor:t.FetchTokenClassesResponse})}GrantAllowance(r){return this.connection.submit({method:"GrantAllowance",payload:r,sign:!0,url:this.chainCodeUrl,requestConstructor:e.GrantAllowanceDto,responseConstructor:t.TokenAllowance})}RefreshAllowances(r){return this.connection.submit({method:"RefreshAllowances",payload:r,sign:!0,url:this.chainCodeUrl,requestConstructor:e.RefreshAllowanceDto,responseConstructor:t.TokenAllowance})}FullAllowanceCheck(r){return this.connection.submit({method:"FullAllowanceCheck",payload:r,sign:!0,url:this.chainCodeUrl,requestConstructor:e.FullAllowanceCheckDto,responseConstructor:t.FullAllowanceCheckResponse})}FetchAllowances(r){return this.connection.submit({method:"FetchAllowances",payload:r,sign:!0,url:this.chainCodeUrl,requestConstructor:e.FetchAllowancesDto,responseConstructor:t.FetchAllowancesResponse})}DeleteAllowances(t){return this.connection.submit({method:"DeleteAllowances",payload:t,sign:!0,url:this.chainCodeUrl,requestConstructor:e.DeleteAllowancesDto})}FetchBalances(r){return this.connection.submit({method:"FetchBalances",payload:r,url:this.chainCodeUrl,requestConstructor:e.FetchBalancesDto,responseConstructor:t.TokenBalance})}FetchBalancesWithTokenMetadata(r){return this.connection.submit({method:"FetchBalancesWithTokenMetadata",payload:r,url:this.chainCodeUrl,requestConstructor:e.FetchBalancesWithPaginationDto,responseConstructor:t.FetchBalancesWithTokenMetadataResponse})}RequestMint(r){return this.connection.submit({method:"RequestMint",payload:r,sign:!0,url:this.chainCodeUrl,requestConstructor:e.HighThroughputMintTokenDto,responseConstructor:t.HighThroughputMintTokenResponse})}FulfillMint(r){return this.connection.submit({method:"FulfillMint",payload:r,sign:!0,url:this.chainCodeUrl,requestConstructor:e.FulfillMintDto,responseConstructor:t.TokenInstanceKey})}FetchMintRequests(t){return this.connection.submit({method:"FetchMintRequests",payload:t,url:this.chainCodeUrl,requestConstructor:e.FetchMintRequestsDto,responseConstructor:e.MintRequestDto})}MintToken(r){return this.connection.submit({method:"MintToken",payload:r,sign:!0,url:this.chainCodeUrl,requestConstructor:e.MintTokenDto,responseConstructor:t.TokenInstanceKey})}MintTokenWithAllowance(r){return this.connection.submit({method:"MintTokenWithAllowance",payload:r,sign:!0,url:this.chainCodeUrl,requestConstructor:e.MintTokenWithAllowanceDto,responseConstructor:t.TokenInstanceKey})}BatchMintToken(r){return this.connection.submit({method:"BatchMintToken",payload:r,sign:!0,url:this.chainCodeUrl,requestConstructor:e.BatchMintTokenDto,responseConstructor:t.TokenInstanceKey})}UseToken(r){return this.connection.submit({method:"UseToken",payload:r,sign:!0,url:this.chainCodeUrl,requestConstructor:e.UseTokenDto,responseConstructor:t.TokenBalance})}ReleaseToken(r){return this.connection.submit({method:"ReleaseToken",payload:r,sign:!0,url:this.chainCodeUrl,requestConstructor:e.ReleaseTokenDto,responseConstructor:t.TokenBalance})}LockToken(r){return this.connection.submit({method:"LockToken",payload:r,sign:!0,url:this.chainCodeUrl,requestConstructor:e.LockTokenDto,responseConstructor:t.TokenBalance})}LockTokens(r){return this.connection.submit({method:"LockTokens",payload:r,sign:!0,url:this.chainCodeUrl,requestConstructor:e.LockTokensDto,responseConstructor:t.TokenBalance})}UnlockToken(r){return this.connection.submit({method:"UnlockToken",payload:r,sign:!0,url:this.chainCodeUrl,requestConstructor:e.UnlockTokenDto,responseConstructor:t.TokenBalance})}UnlockTokens(r){return this.connection.submit({method:"UnlockTokens",payload:r,sign:!0,url:this.chainCodeUrl,requestConstructor:e.UnlockTokensDto,responseConstructor:t.TokenBalance})}TransferToken(r){return this.connection.submit({method:"TransferToken",payload:r,sign:!0,url:this.chainCodeUrl,requestConstructor:e.TransferTokenDto,responseConstructor:t.TokenBalance})}BurnTokens(r){return this.connection.submit({method:"BurnTokens",payload:r,sign:!0,url:this.chainCodeUrl,requestConstructor:e.BurnTokensDto,responseConstructor:t.TokenBurn})}FetchBurns(r){return this.connection.submit({method:"FetchBurns",payload:r,url:this.chainCodeUrl,requestConstructor:e.FetchBurnsDto,responseConstructor:t.TokenBurn})}};return hw.TokenApi=n,hw}function mw(){return fw||(fw=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Re;t.__exportStar(dw(),e),t.__exportStar(aw(),e),t.__exportStar(uw(),e),t.__exportStar(yw(),e)}(nw)),nw}function gw(){return pw||(pw=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Re;t.__exportStar(ew(),e),t.__exportStar(j$(),e),t.__exportStar(U$(),e),t.__exportStar(mw(),e),t.__exportStar(o$(),e),t.__exportStar(E$(),e)}(Y)),Y}var _w=gw(),vw=l({__proto__:null,default:Z(_w)},[_w]);export{E as ExternalWalletProvider,G as GalaChainConnectProvider,f as KNOWN_WALLET_RDNS,z as PrivateKeyProvider,k as WalletContext,D as WalletProvider,y as detectWallets,L as useGalaAddress,U as useIsWalletConnected,F as useWallet,B as useWalletAddress,j as useWalletConnection,R as useWalletContext,V as useWalletDetection,K as useWalletProvider};
1
+ if(void 0===globalThis.process&&(globalThis.process={env:{},versions:{},platform:"browser"}),void 0===globalThis.Buffer){var e=function(e){return"number"==typeof e||ArrayBuffer,new Uint8Array(e)};e.isBuffer=function(){return!1},e.from=function(e,n){if("string"==typeof e){if("hex"===n){var t=(e.match(/.{1,2}/g)||[]).map(function(e){return parseInt(e,16)});return new Uint8Array(t)}return(new TextEncoder).encode(e)}return e instanceof ArrayBuffer?new Uint8Array(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)},e.alloc=function(e){return new Uint8Array(e)},e.concat=function(e){for(var n=0,t=0;t<e.length;t++)n+=e[t].length;for(var r=new Uint8Array(n),s=0,i=0;i<e.length;i++)r.set(e[i],s),s+=e[i].length;return r},e.prototype=Object.create(Uint8Array.prototype),globalThis.Buffer=e}import{jsx as n}from"react/jsx-runtime";import{createContext as t,useState as r,useCallback as s,useEffect as i,useMemo as o,useContext as a}from"react";import{getAddress as c,Wallet as d}from"ethers";const l={METAMASK:"io.metamask",METAMASK_FLASK:"io.metamask.flask",COINBASE:"com.coinbase.wallet",TRUST_WALLET:"com.trustwallet.app",PHANTOM:"app.phantom",RAINBOW:"me.rainbow",OKX:"com.okex.wallet",RABBY:"io.rabby",BRAVE:"com.brave.wallet",FRAME:"sh.frame",LEDGER:"com.ledger",ZERION:"io.zerion.wallet",GALA:"com.gala.wallet"},u={[l.METAMASK]:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIxLjU0IDQuMjJsLTguMzQgNi4yMSAxLjU0LTMuNjUtLTUuNTMtMi41MXoiIGZpbGw9IiNFMjc2MUIiLz48L3N2Zz4=",[l.GALA]:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAYAAACoYAD2AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAjWSURBVHgBzZkLVI1ZG8f/pZKjq0uK0LglIiMKU5EuBkMxUgmjL6GFSZJ7QpJx+Ujpk1Eat3KJySXjTnIpVJRPhnTSxWVaSveL1Zlnv3WshnM67wlrzX+t3T5nv3vv99d+9/O8z36OAj5DIpGoM1W2VPSp6FJp03ipmkoRlVwq9xUUFDLwGVKCnCKwAVRNqa2rc8vOLeiRkpqpcO/hY7woeI3yikrUva9DG1VV6HXqiJHDv0Uvg66oqa0VqigrX6dxUQScCDmlwLcjwfWjKuhJdq5jVMwpxMRfQP7LN7zGttPWxARbC3i4OsDCzOQuNQUS7GnwlExIgmtH1ea0zCfugdsjFeMvJLI2tFSmA/sieMV82Fqa/UFfvQhWKGuMggzAYfX19dHBYdGGm8MPoKy8El9Knm4OWO83L6+DtmaAkpLSPrQEkgDH5eQVnnTxWqVyN/3/+Brqrq+H+H1bMdCo13pa0QDIA0mAM4R5hbu/d/MW/Pn8Bb6mdHXa42hEMCyGmqwh0EDwgSRAq5wXBZfsXBcqP88tAF+1VlGBj6crvunWGf5bIvCm6C3vsZoaarh6NByDjA0XEWgImoMkwG7FpWXJ5uPddZ/l5IGPVJSV4OJgj83+P0OnvTbXVkp7d2NIFGJPXSTX9IrXPHqdOiDp5J66b7p1sSDQlKbXFD/qG7g1/ABvQAd7K9w6HYXoHQHQUBNg0679WBTwXzKwcmxatQDX4nbT6k4D3VTmXC9fF2G230Zl+niEFksgsRNdmJKS9kik0MVMZrGY5Cm6k5ohEiv8t+MiA3OHD9cFPa1EO6OOiIpLSrnrtH1EP3mvFSnqm8ucOzg0mg1Z15RNoQlkhtXkucZJKelS/1vTAQ0+zsZyKPf9wvVk+ARsR1a2UGJ/Zr0L3Z3gPdsVrVopIutZLhas3oIrSXel3oM99swrMSXamhp96An8xdoUGwFtL95Ilgqor6eDvVtWIyUhGrZWZriZ8gAWjp4YO91bKiBTbv5LLAnciX6jpuJg3Dn07dUdl2LDcO5gCHM7Esewx74r+rgWffxJ3Cbekx6795+QejMbSzOMthzC7a3id6XYfzwBd1IzwVdPaY/P9F6LQXZuSLhyC+aD+2PqBFu0UlSU2P8AzV9ZWe0j/q5Aq6hWU1NbqNnXWr227v0nA9b4eNBq5eL2vQz8/B9nLJ7bYAhXb9/H4rXb8eDRU8irbl100ZE8wQLaCu4+6yX2uUIuadQIU0u6VxL7V4bEJVyWCMjE/F5seBBUVVvDb8NO9Bw+CcfOXIb1cFOknT+IqG3+0OnQDnxl0LUzAhbPRsrZfRg5bLDUfldu3WPVGPaHQdqkZjyRNfcHCxPSPnOetxL2rgvwPDcfs5x/QOr5/dyKqwkawkmHMSNxM34vlnrN+OB+BAJVrg/r6+48QaZbOnnuGqsMxZCmj58KIa8u3biL/tYumLN0I9oS3FrfOXhw6RAST+zBycjN5AmM0Fm3A1RUlOHqaM+tOutTXV0Lv8AQFL76q9n5CxquW4gh2wnz+b0VPlZ48DKU09vFmGBD9saiE72HKV7kjMPQ6kfEJVzlgA+FBaJrZx3s+DUG/aydsS3isMy5S96VoaysQo9sRoNF5uqv3hShJWL79XD4BpwjqMXrdmDPod+51bv/IAthQX5wHDsKAtrL56/dwdKgUGQ8fibX/BVV1VBXbytgK6laVlGFlmj2kiCcuZSEsaNH4PH1o7SKg5jrQPatE5g2aQz+JK8wxXMZ50/lBWSqe88ZszKDrNGiKKQlYlHSxFm+8F3XELj062NAlq4NbS0NRB89A8tJc3CiwQBapDb0FEhVDLLYQF8Xn6N7Dz8Nip8J81FR2bInxMSsX0NdjS1lKYMU9unRDf82ddHtyMLADIKtZZDJvb8wZDFZJjOWz5FJv96s4hw4g7xm/d1QmYO6UpDBR4l30tBjmCPu01lcmvR0OkBdrW2z84y35Vxkihgyy9LMJL9jey2JndneYjofE4oNy7zQjoyiObFVfFdWLvFaa3Lsc6Y74tG1WIIUUOAh+fzE9uOIISwHgSMcJHvmVI54uEyUOCAoZB/3GnxR+BorF85C+oWDcJ5oB3ll0r83kn7/Fbs3rUB9vQgrN4WDDnoS+7LMx0Cj3snEVchBNraHzXT6oUbaI2ABhdFIJ2ym4wGLXmKYA6eYsGd3fciSloY6Qjcswd2z0RhMQfOZi0noNWIyNoX9JjXJ4DXjR1ZtFX/nIFkWgQLS05PpDSFNNTV1WB68C8Y2rkhMTsOYUcOQTJFMgK+n1MP7NMcxeJoUh/mznOj0WAwb5/mY6O6LktIyqfcZYNQTThNs2YaOF7c1PT50p/2Ubmg5RavobQlkaabTODpKLCAjaM/dlK1YSGQsd5wYQFH39oBFGG0xFNU1NVj1y/8QceAkKquqZc57+3QkzL81HksL94e47UNoTI252praa3fSo+Gj/ccSYD5+FrbuPsgBimU9whQ3KBJigJeTUtDXaiq274nhBei/yIMBHm4K+A/IRoW6TLQ7tWTedPARy6ot3RAKE9tpeNj4btZQb8tZ92SPpbBzWcj73M0C4DU+s4X08RNrkpTBYA7xhrf/tj6h+45CHhn27M7lKCsoyGhu332sQcZ9kBgXUazWVmBKq5gDWZCNoAaUTUugk54RiwG/puzo9Bm5zb+MTqRsH96U1Ke5rBrzL/E7I48MXkFWXVVdgy+txXPdsHG5F8sC2xOg1BOdrPwke734ZQvzV09fuAbJaY/wJdRFVwcRvyzHOJvvLtPXaQTYbMqYVzqaYCdQ2UFZ3h6U7QVlfdESMec/d8Yk+M51e01gLCcZzmcc75x5I+wMquanZz4xjz52FiyhzwIJ5uglSYlSKz0IzMJ8ENwoUrccNjhLSVHxAF0KI8BS8JRckE1gzamyp/J94auiITl5BSpvS0rJsqu4Xx8E9OsDi9D19TrVUyovh+KFOOp7nsptgpM7Em4R5EfArdDwOw5L7rAsATvcFVMRskJQsr24DP0NVvGaoREi2pYAAAAASUVORK5CYII="};function h(){return"undefined"!=typeof window&&"function"==typeof window.dispatchEvent}async function A(e=500){const n=[],t=new Map;return h()?new Promise(r=>{const s=new Set,i=e=>{const r=e,{info:i,provider:o}=r.detail;if(s.has(i.uuid))return;s.add(i.uuid);const a={id:i.rdns||i.uuid,name:i.name,rdns:i.rdns||i.uuid,icon:i.icon??u[i.rdns||""]??"",provider:o,isInjected:!1};n.push(a),t.set(a.id,a)};window.addEventListener("eip6963:announceProvider",i),window.dispatchEvent(new Event("eip6963:requestProvider")),setTimeout(()=>{if(window.removeEventListener("eip6963:announceProvider",i),0===n.length){const e=h()?window.ethereum??null:null;if(e){const r=window;let s="Browser Wallet",i="injected";r.ethereum?.isMetaMask?(s="MetaMask",i=l.METAMASK):r.ethereum?.isCoinbaseWallet?(s="Coinbase Wallet",i=l.COINBASE):r.ethereum?.isTrust&&(s="Trust Wallet",i=l.TRUST_WALLET);const o={id:i,name:s,rdns:i,icon:u[i]??"",provider:e,isInjected:!0};n.push(o),t.set(o.id,o)}}const e=window;if(e.gala?.request&&!t.has(l.GALA)){const r={id:l.GALA,name:"Gala Wallet",rdns:l.GALA,icon:u[l.GALA]??"",provider:e.gala,isInjected:!0};n.push(r),t.set(r.id,r)}r({wallets:n,byId:t,hasWallets:n.length>0,...void 0===n[0]?{}:{primary:n[0]}})},e)}):{wallets:n,byId:t,hasWallets:!1}}function w(e,n,t){return{types:{EIP712Domain:f(e),...n},primaryType:Object.keys(n)[0],domain:g(e),message:t}}function f(e){const n=[];return void 0!==e.name&&n.push({name:"name",type:"string"}),void 0!==e.version&&n.push({name:"version",type:"string"}),void 0!==e.chainId&&n.push({name:"chainId",type:"uint256"}),void 0!==e.verifyingContract&&n.push({name:"verifyingContract",type:"address"}),void 0!==e.salt&&n.push({name:"salt",type:"bytes32"}),n}function g(e){const n={};return void 0!==e.name&&(n.name=e.name),void 0!==e.version&&(n.version=e.version),void 0!==e.chainId&&(n.chainId="bigint"==typeof e.chainId||"number"==typeof e.chainId?`0x${e.chainId.toString(16)}`:e.chainId),void 0!==e.verifyingContract&&(n.verifyingContract=e.verifyingContract),void 0!==e.salt&&(n.salt=e.salt),n}function v(e){return`0x${Buffer.from(e,"utf8").toString("hex")}`}async function E(e,n,t){return e.request({method:"personal_sign",params:[v(t),n]})}async function y(e,n,t,r,s){return e.request({method:"eth_signTypedData_v4",params:[n,JSON.stringify(w(t,r,s))]})}class p{constructor(e){this.connectedAddress=null,this.provider=e,this.eventHandlers=function(e,n,t){if(null==e||"function"!=typeof e.on)return{accountsChanged:null,disconnect:null};const r=e=>{const t=e[0];n(void 0===t?null:c(t))},s=()=>t();return e.on("accountsChanged",r),e.on("disconnect",s),{accountsChanged:r,disconnect:s}}(e,e=>{this.connectedAddress=e},()=>{this.connectedAddress=null})}removeEventListeners(){!function(e,n){if("function"!=typeof e.removeListener)return;null!==n.accountsChanged&&e.removeListener("accountsChanged",n.accountsChanged);null!==n.disconnect&&e.removeListener("disconnect",n.disconnect)}(this.provider,this.eventHandlers)}}class I extends Error{constructor(e,n,t){super(e),this.code=n,this.originalError=t,this.name="WalletProviderError"}}var C;async function N(e,n,t){try{return await e()}catch(e){if(e instanceof I)throw e;return n(e,t)}}!function(e){e.USER_REJECTED="USER_REJECTED",e.NOT_CONNECTED="NOT_CONNECTED",e.CONNECTION_FAILED="CONNECTION_FAILED",e.SIGNING_FAILED="SIGNING_FAILED",e.PROVIDER_NOT_AVAILABLE="PROVIDER_NOT_AVAILABLE",e.PRIVATE_KEY_NOT_ACCESSIBLE="PRIVATE_KEY_NOT_ACCESSIBLE",e.INVALID_CONFIG="INVALID_CONFIG",e.CHAIN_MISMATCH="CHAIN_MISMATCH",e.UNKNOWN="UNKNOWN"}(C||(C={}));const m=4001,L=4100,O=4900,T=4901;class D extends p{constructor(e){if(super(e),this.providerType="external",null==e)throw new I("EIP-1193 provider is required",C.INVALID_CONFIG)}handleProviderError(e,n){const t=e;if(t.code===m)throw new I(`User rejected ${n}`,C.USER_REJECTED,e instanceof Error?e:void 0);if(t.code===L)throw new I("Wallet is not authorized",C.NOT_CONNECTED,e instanceof Error?e:void 0);if(t.code===O||t.code===T)throw this.connectedAddress=null,new I("Wallet disconnected",C.NOT_CONNECTED,e instanceof Error?e:void 0);throw new I(t.message??`${n} failed`,n.includes("sign")?C.SIGNING_FAILED:C.UNKNOWN,e instanceof Error?e:void 0)}ensureConnected(){if(!this.connectedAddress)throw new I("Wallet is not connected. Call connect() first.",C.NOT_CONNECTED)}async connect(){try{const e=await this.provider.request({method:"eth_requestAccounts"});if(null==e||0===e.length)throw new I("No accounts returned from wallet",C.CONNECTION_FAILED);const n=e[0];if(void 0===n)throw new I("No accounts returned from wallet",C.CONNECTION_FAILED);return this.connectedAddress=c(n),this.connectedAddress}catch(e){if(e instanceof I)throw e;return this.handleProviderError(e,"connect")}}async disconnect(){this.connectedAddress=null,this.removeEventListeners();try{await this.provider.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]})}catch{}}isConnected(){return null!==this.connectedAddress}async signMessage(e){return this.ensureConnected(),N(()=>E(this.provider,this.connectedAddress,e),(e,n)=>this.handleProviderError(e,n),"sign message")}async signTypedData(e,n,t){return this.ensureConnected(),N(()=>y(this.provider,this.connectedAddress,e,n,t),(e,n)=>this.handleProviderError(e,n),"sign typed data")}async getAddress(){await Promise.resolve(),this.ensureConnected();const e=this.connectedAddress;if(null==e)throw new I("Wallet is not connected",C.NOT_CONNECTED);return e}async getGalaAddress(){return`eth|${(await this.getAddress()).slice(2)}`}async getPrivateKey(){return Promise.reject(new I("Private key is not accessible with external wallet providers. Use PrivateKeyProvider if you need private key access for @gala-chain operations.",C.PRIVATE_KEY_NOT_ACCESSIBLE))}getProvider(){return this.provider}}class P extends p{constructor(e){if(super(e),this.providerType="external",this.galaRawAddress=null,!e)throw new I("Gala Wallet provider is required",C.PROVIDER_NOT_AVAILABLE)}parseGalaError(e){if(e instanceof Error)try{const n=JSON.parse(e.message);if("object"==typeof n&&null!==n){const t=n,r={message:"string"==typeof t.message?t.message:e.message};return"number"==typeof t.code&&(r.code=t.code),r}return{message:e.message}}catch{return{message:e.message}}return{message:String(e)}}handleProviderError(e,n){const t=this.parseGalaError(e);if(4001===t.code)throw new I(`User rejected ${n}`,C.USER_REJECTED,e instanceof Error?e:void 0);if(4900===t.code)throw this.connectedAddress=null,new I("Wallet disconnected",C.NOT_CONNECTED,e instanceof Error?e:void 0);const r=t.message?t.message:`${n} failed`;throw new I(r,n.includes("sign")?C.SIGNING_FAILED:C.UNKNOWN,e instanceof Error?e:void 0)}ensureConnected(){if(null===this.connectedAddress||void 0===this.connectedAddress)throw new I("Wallet is not connected. Call connect() first.",C.NOT_CONNECTED)}async connect(){try{const e=await this.provider.request({method:"eth_requestAccounts"});if(null==e||0===e.length)throw new I("No accounts returned from Gala Wallet",C.CONNECTION_FAILED);const n=e[0];if(void 0===n)throw new I("No accounts returned from Gala Wallet",C.CONNECTION_FAILED);this.galaRawAddress=n;let t=n;return t.startsWith("eth|")?t=`0x${t.slice(4)}`:t.startsWith("0x")||(t=`0x${t}`),this.connectedAddress=c(t),this.connectedAddress}catch(e){if(e instanceof I)throw e;return this.handleProviderError(e,"connect")}}async disconnect(){this.connectedAddress=null,this.galaRawAddress=null,this.removeEventListeners();try{await this.provider.disconnect()}catch{}}isConnected(){return null!==this.connectedAddress}async signMessage(e){return this.ensureConnected(),N(async()=>(await this.provider.setAddress(this.galaRawAddress??this.connectedAddress),E(this.provider,this.connectedAddress,e)),(e,n)=>this.handleProviderError(e,n),"sign message")}async signTypedData(e,n,t){return this.ensureConnected(),N(async()=>(await this.provider.setAddress(this.galaRawAddress??this.connectedAddress),y(this.provider,this.connectedAddress,e,n,t)),(e,n)=>this.handleProviderError(e,n),"sign typed data")}getAddress(){return this.ensureConnected(),Promise.resolve(this.connectedAddress)}async getGalaAddress(){return`eth|${(await this.getAddress()).slice(2)}`}getPrivateKey(){throw new I("Private key is not accessible with Gala Wallet. Use PrivateKeyProvider if you need private key access for @gala-chain operations.",C.PRIVATE_KEY_NOT_ACCESSIBLE)}getProvider(){return this.provider}}const S={provider:null,address:null,galaAddress:null,isConnected:!1,isConnecting:!1,isDetecting:!1,error:null,detectedWallets:[],connect:async()=>{throw new Error("WalletContext not initialized")},connectDetected:async()=>{throw new Error("WalletContext not initialized")},disconnect:async()=>{throw new Error("WalletContext not initialized")},setProvider:()=>{throw new Error("WalletContext not initialized")},refreshWallets:async()=>{throw new Error("WalletContext not initialized")},clearError:()=>{throw new Error("WalletContext not initialized")}},M=t(S),W="undefined"!=typeof window;function G({children:e,autoDetect:t=W,initialProvider:a,autoConnect:c=!0,onConnect:d,onDisconnect:u,onError:w}){const[f,g]=r(a??null),[v,E]=r(null),[y,p]=r(null),[I,C]=r(!1),[N,m]=r(!1),[L,O]=r(null),[T,S]=r([]),G=null!==f&&null!==v,U=s(()=>{O(null)},[]),B=s(e=>{g(e),e||(E(null),p(null))},[]),F=s(async e=>{C(!0),O(null);try{e.isConnected()||await e.connect();const n=await e.getAddress(),t=await e.getGalaAddress();return g(e),E(n),p(t),d?.(n,e),n}catch(e){const n=e instanceof Error?e:new Error(String(e));throw O(n),w?.(n),n}finally{C(!1)}},[d,w]),b=s(async e=>{if(e.rdns===l.GALA){const n=new P(e.provider);return F(n)}const n=new D(e.provider);return F(n)},[F]),R=s(async()=>{if(f)try{await f.disconnect()}catch{}g(null),E(null),p(null),O(null),u?.()},[f,u]),V=s(async()=>{if(W){m(!0);try{let e=[...(await A()).wallets];const n=window;if(void 0!==n.gala&&!e.some(e=>e.rdns===l.GALA)){e=[{id:l.GALA,name:"Gala Wallet",rdns:l.GALA,icon:"",provider:n.gala,isInjected:!0},...e]}S(e)}catch{S([])}finally{m(!1)}}},[]);i(()=>{if(!t||!W)return;V();const e=function(e){if(!h())return()=>{};let n=!0,t={wallets:[],byId:new Map,hasWallets:!1};const r=r=>{if(!n)return;const s=r,{info:i,provider:o}=s.detail,a=i.rdns||i.uuid;if(t.byId.has(a))return;const c={id:a,name:i.name,rdns:a,icon:i.icon??"",provider:o,isInjected:!1},d=[...t.wallets,c],l=new Map(t.byId);l.set(c.id,c),t={wallets:d,byId:l,hasWallets:!0,...void 0===d[0]?{}:{primary:d[0]}},e(t)};return window.addEventListener("eip6963:announceProvider",r),A().then(r=>{n&&(t=r,e(r))}),()=>{n=!1,window.removeEventListener("eip6963:announceProvider",r)}}(e=>{S(e.wallets)});return()=>{e()}},[t,V]),i(()=>{a&&c&&!G&&!I&&F(a)},[a,c,G,I,F]);const _=o(()=>({provider:f,address:v,galaAddress:y,isConnected:G,isConnecting:I,isDetecting:N,error:L,detectedWallets:T,connect:F,connectDetected:b,disconnect:R,setProvider:B,refreshWallets:V,clearError:U}),[f,v,y,G,I,N,L,T,F,b,R,B,V,U]);return n(M.Provider,{value:_,children:e})}function U(){const e=a(M);if(e===S)throw new Error("useWalletContext must be used within a WalletProvider");return e}function B(){return U()}function F(){const{address:e}=U();return e}function b(){const{galaAddress:e}=U();return e}function R(){const{isConnected:e}=U();return e}function V(){const{provider:e}=U();return e}function _(){const{isConnecting:e,isConnected:n,error:t,connect:r,connectDetected:s,disconnect:i,clearError:a}=U(),c=o(()=>e?"connecting":t?"error":n?"connected":"disconnected",[e,t,n]);return o(()=>({status:c,isConnecting:e,isConnected:n,error:t,connect:r,connectDetected:s,disconnect:i,clearError:a}),[c,e,n,t,r,s,i,a])}function j(){const{detectedWallets:e,isDetecting:n,refreshWallets:t}=U(),r=o(()=>n=>e.some(e=>e.rdns===n),[e]),s=o(()=>n=>e.find(e=>e.rdns===n),[e]),i=o(()=>e.some(e=>e.rdns===l.METAMASK),[e]),a=o(()=>e.some(e=>e.rdns===l.COINBASE),[e]),c=e.length>0;return o(()=>({wallets:e,isDetecting:n,refresh:t,hasWallet:r,getWallet:s,hasMetaMask:i,hasCoinbaseWallet:a,hasAnyWallet:c}),[e,n,t,r,s,i,a,c])}let K=null;async function x(){if(!1===K)return null;try{const e=["@gala-chain","connect"].join("/"),n=await import(e);return K=!0,n}catch{return K=!1,null}}class Q{constructor(e){if(this.providerType="external",this.connectedAddress=null,!e)throw new I("@gala-chain/connect client is required",C.INVALID_CONFIG);if("function"!=typeof e.signMessage)throw new I("Invalid @gala-chain/connect client: signMessage method is required",C.INVALID_CONFIG);this.client=e}static async createBrowserClient(e){const n=await x();if(null==n)throw new I("Failed to create BrowserConnectClient: @gala-chain/connect is not installed. Install it with: npm install @gala-chain/connect",C.PROVIDER_NOT_AVAILABLE);const{BrowserConnectClient:t}=n,r=t,s=e?new r(e):new r;return new Q(s)}static async createTrustWalletClient(){const e=await x();if(null==e)throw new I("Failed to create TrustWalletConnectClient: @gala-chain/connect is not installed. Install it with: npm install @gala-chain/connect",C.PROVIDER_NOT_AVAILABLE);const{TrustWalletConnectClient:n}=e,t=new n;return new Q(t)}static async isAvailable(){return null!==await x()}ensureConnected(){if(null===this.connectedAddress||void 0===this.connectedAddress)throw new I("Wallet is not connected. Call connect() first.",C.NOT_CONNECTED);return this.connectedAddress}async connect(){try{if("function"==typeof this.client.connect){const e=await this.client.connect();if(null!=e&&e.length>0)return this.connectedAddress=c(e),this.connectedAddress}if("function"==typeof this.client.getAccount){const e=await this.client.getAccount();if(null!=e&&e.length>0)return this.connectedAddress=c(e),this.connectedAddress}throw new I("Failed to connect: no account returned",C.CONNECTION_FAILED)}catch(e){if(e instanceof I)throw e;const n=e instanceof Error?e.message:String(e);if(n.length>0&&(n.includes("rejected")||n.includes("denied")))throw new I("User rejected connection",C.USER_REJECTED,e instanceof Error?e:void 0);throw new I("Failed to connect to wallet",C.CONNECTION_FAILED,e instanceof Error?e:void 0)}}async disconnect(){"function"==typeof this.client.disconnect&&await this.client.disconnect(),this.connectedAddress=null}isConnected(){return null!==this.connectedAddress}async signMessage(e){this.ensureConnected();try{return await this.client.signMessage(e)}catch(e){const n=e instanceof Error?e.message:String(e);if(n.includes("rejected")||n.includes("denied"))throw new I("User rejected signing",C.USER_REJECTED,e instanceof Error?e:void 0);throw new I("Failed to sign message",C.SIGNING_FAILED,e instanceof Error?e:void 0)}}signTypedData(e,n,t){return Promise.reject(new I("signTypedData is not supported by GalaChainConnectProvider. Use ExternalWalletProvider with the underlying EIP-1193 provider instead.",C.SIGNING_FAILED))}async getAddress(){return await Promise.resolve(),this.ensureConnected()}async getGalaAddress(){return`eth|${(await this.getAddress()).slice(2)}`}getPrivateKey(){return Promise.reject(new I("Private key is not accessible with @gala-chain/connect. Use PrivateKeyProvider if you need private key access.",C.PRIVATE_KEY_NOT_ACCESSIBLE))}getClient(){return this.client}}class k{constructor(e){this.providerType="privateKey",this.connected=!0;try{this.wallet=new d(e)}catch(e){throw new I("Invalid private key provided",C.INVALID_CONFIG,e instanceof Error?e:void 0)}}static fromWallet(e){return new k(e.privateKey)}async signMessage(e){try{return await this.wallet.signMessage(e)}catch(e){throw new I("Failed to sign message",C.SIGNING_FAILED,e instanceof Error?e:void 0)}}async signTypedData(e,n,t){try{return await this.wallet.signTypedData(e,n,t)}catch(e){throw new I("Failed to sign typed data",C.SIGNING_FAILED,e instanceof Error?e:void 0)}}getAddress(){return Promise.resolve(c(this.wallet.address))}async getGalaAddress(){return`eth|${(await this.getAddress()).slice(2)}`}async connect(){return this.connected=!0,this.getAddress()}disconnect(){return this.connected=!1,Promise.resolve()}isConnected(){return this.connected}getPrivateKey(){return Promise.resolve(this.wallet.privateKey)}getWallet(){return this.wallet}}export{D as ExternalWalletProvider,Q as GalaChainConnectProvider,l as KNOWN_WALLET_RDNS,k as PrivateKeyProvider,M as WalletContext,G as WalletProvider,A as detectWallets,b as useGalaAddress,R as useIsWalletConnected,B as useWallet,F as useWalletAddress,_ as useWalletConnection,U as useWalletContext,j as useWalletDetection,V as useWalletProvider};