@ozdao/prometheus-framework 0.2.87 → 0.2.88

Sign up to get free protection for your applications and to get access to all the features.
Files changed (199) hide show
  1. package/dist/auth.server.js +0 -16
  2. package/dist/auth.server.mjs +0 -16
  3. package/dist/community.server.js +0 -24
  4. package/dist/community.server.mjs +0 -24
  5. package/dist/events.server.js +0 -16
  6. package/dist/events.server.mjs +0 -16
  7. package/dist/files.server.js +0 -8
  8. package/dist/files.server.mjs +0 -8
  9. package/dist/gallery.server.js +0 -8
  10. package/dist/gallery.server.mjs +0 -8
  11. package/dist/main-Bw0PvTs-.mjs +13616 -0
  12. package/dist/main-D8gNZLSa.js +92 -0
  13. package/dist/main.css +1 -1
  14. package/dist/node_modules/@adraffy/ens-normalize/dist/index.cjs +1 -1
  15. package/dist/node_modules/@adraffy/ens-normalize/dist/index.js +180 -180
  16. package/dist/node_modules/@googlemaps/js-api-loader/dist/index.cjs +1 -1
  17. package/dist/node_modules/@googlemaps/js-api-loader/dist/index.js +5 -5
  18. package/dist/node_modules/@noble/hashes/esm/_u64.cjs +1 -1
  19. package/dist/node_modules/@noble/hashes/esm/_u64.js +16 -61
  20. package/dist/node_modules/ethereum-cryptography/esm/pbkdf2.cjs +1 -1
  21. package/dist/node_modules/ethereum-cryptography/esm/pbkdf2.js +9 -10
  22. package/dist/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.cjs +1 -1
  23. package/dist/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.js +1 -1
  24. package/dist/node_modules/vue-qrcode-reader/dist/vue-qrcode-reader.cjs +3 -3
  25. package/dist/node_modules/vue-qrcode-reader/dist/vue-qrcode-reader.js +9 -9
  26. package/dist/node_modules/web3-eth/lib/esm/utils/get_transaction_error.cjs +1 -1
  27. package/dist/node_modules/web3-eth/lib/esm/utils/get_transaction_error.js +33 -33
  28. package/dist/node_modules/web3-eth-abi/lib/esm/utils.cjs +1 -1
  29. package/dist/node_modules/web3-eth-abi/lib/esm/utils.js +24 -24
  30. package/dist/node_modules/web3-eth-accounts/lib/esm/common/utils.cjs +1 -1
  31. package/dist/node_modules/web3-eth-accounts/lib/esm/common/utils.js +30 -30
  32. package/dist/node_modules/web3-validator/lib/esm/validation/string.cjs +1 -1
  33. package/dist/node_modules/web3-validator/lib/esm/validation/string.js +9 -9
  34. package/dist/organizations.server.js +0 -32
  35. package/dist/organizations.server.mjs +0 -32
  36. package/dist/products.server.js +0 -20
  37. package/dist/products.server.mjs +0 -20
  38. package/dist/prometheus-framework/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs +1 -1
  39. package/dist/prometheus-framework/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js +3046 -2899
  40. package/dist/prometheus-framework/node_modules/axios/lib/axios.cjs +1 -1
  41. package/dist/prometheus-framework/node_modules/axios/lib/axios.js +1 -2
  42. package/dist/prometheus-framework/node_modules/axios/lib/cancel/CancelToken.cjs +1 -1
  43. package/dist/prometheus-framework/node_modules/axios/lib/cancel/CancelToken.js +1 -2
  44. package/dist/prometheus-framework/node_modules/axios/lib/core/Axios.cjs +1 -1
  45. package/dist/prometheus-framework/node_modules/axios/lib/core/Axios.js +18 -19
  46. package/dist/prometheus-framework/node_modules/axios/lib/core/AxiosHeaders.cjs +2 -2
  47. package/dist/prometheus-framework/node_modules/axios/lib/core/AxiosHeaders.js +66 -67
  48. package/dist/prometheus-framework/node_modules/axios/lib/defaults/index.cjs +1 -1
  49. package/dist/prometheus-framework/node_modules/axios/lib/defaults/index.js +38 -39
  50. package/dist/prometheus-framework/node_modules/axios/lib/helpers/HttpStatusCode.cjs +1 -1
  51. package/dist/prometheus-framework/node_modules/axios/lib/helpers/HttpStatusCode.js +1 -2
  52. package/dist/prometheus-framework/node_modules/date-fns/eachDayOfInterval.cjs +1 -1
  53. package/dist/prometheus-framework/node_modules/date-fns/eachDayOfInterval.js +13 -16
  54. package/dist/prometheus-framework/node_modules/date-fns/eachQuarterOfInterval.cjs +1 -1
  55. package/dist/prometheus-framework/node_modules/date-fns/eachQuarterOfInterval.js +13 -16
  56. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/ParseError.cjs +1 -1
  57. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/ParseError.js +45 -51
  58. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/PhoneNumber.cjs +1 -1
  59. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/PhoneNumber.js +56 -56
  60. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/format.cjs +2 -2
  61. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/format.js +14 -14
  62. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.cjs +1 -1
  63. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js +8 -16
  64. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.cjs +1 -1
  65. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js +4 -6
  66. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.cjs +1 -1
  67. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js +5 -9
  68. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.cjs +2 -2
  69. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js +4 -4
  70. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/getNumberType.cjs +2 -2
  71. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/getNumberType.js +35 -35
  72. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/metadata.cjs +1 -1
  73. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/metadata.js +13 -13
  74. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.cjs +2 -2
  75. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js +9 -16
  76. package/dist/prometheus-framework/node_modules/libphonenumber-js/metadata.min.json.cjs +1 -1
  77. package/dist/prometheus-framework/node_modules/libphonenumber-js/metadata.min.json.js +1 -1
  78. package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
  79. package/dist/prometheus-framework/src/components/Block/Block.vue.js +1 -1
  80. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  81. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +1 -73
  82. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  83. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +73 -1
  84. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  85. package/dist/prometheus-framework/src/components/Select/Select.vue.js +1 -103
  86. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  87. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +103 -1
  88. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
  89. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +45 -1
  90. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -1
  91. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +1 -45
  92. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  93. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +29 -29
  94. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  95. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +31 -31
  96. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  97. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +2 -2
  98. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
  99. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +15 -14
  100. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  101. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
  102. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  103. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  104. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  105. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
  106. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -5
  107. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +0 -66
  108. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +5 -1
  109. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +66 -0
  110. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  111. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  112. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  113. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  114. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
  115. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
  116. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  117. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +10 -10
  118. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  119. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +15 -15
  120. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +2 -2
  121. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +6 -5
  122. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  123. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +3 -3
  124. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  125. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  126. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  127. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
  128. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  129. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
  130. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  131. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
  132. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  133. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +1 -13
  134. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  135. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +13 -1
  136. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  137. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +20 -20
  138. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  139. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +1 -1
  140. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  141. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +19 -19
  142. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  143. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  144. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  145. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
  146. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  147. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  148. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  149. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +2 -2
  150. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  151. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
  152. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  153. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +4 -4
  154. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  155. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +11 -11
  156. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  157. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  158. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  159. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  160. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  161. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +20 -20
  162. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  163. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
  164. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  165. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  166. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  167. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  168. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  169. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
  170. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  171. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +3 -3
  172. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
  173. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +1 -1
  174. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  175. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
  176. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
  177. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +1 -1
  178. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  179. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
  180. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  181. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  182. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  183. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +3 -3
  184. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Payments.vue.cjs +1 -1
  185. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Payments.vue.js +1 -1
  186. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  187. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +3 -3
  188. package/dist/prometheus-framework.cjs.js +1 -1
  189. package/dist/prometheus-framework.es.js +1 -1
  190. package/dist/reports.server.js +0 -8
  191. package/dist/reports.server.mjs +0 -8
  192. package/dist/style.css +1 -1
  193. package/dist/users.server.js +0 -8
  194. package/dist/users.server.mjs +0 -8
  195. package/dist/wallet.server.js +0 -4
  196. package/dist/wallet.server.mjs +0 -4
  197. package/dist/web-CciQvENI.js +1 -0
  198. package/dist/web-nVxTNRH4.mjs +54 -0
  199. package/package.json +1 -1
@@ -1,3 +1,3 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("vue");var br=(r,i,a)=>{if(!i.has(r))throw TypeError("Cannot "+a)},dr=(r,i,a)=>(br(r,i,"read from private field"),a?a.call(r):i.get(r)),ao=(r,i,a)=>{if(i.has(r))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(r):i.set(r,a)},oo=(r,i,a,c)=>(br(r,i,"write to private field"),c?c.call(r,a):i.set(r,a),a);const Cr=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["data_matrix","DataMatrix"],["dx_film_edge","DXFilmEdge"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["maxi_code","MaxiCode"],["micro_qr_code","MicroQRCode"],["pdf417","PDF417"],["qr_code","QRCode"],["rm_qr_code","rMQRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"],["linear_codes","Linear-Codes"],["matrix_codes","Matrix-Codes"]],io=[...Cr,["unknown"]].map(r=>r[0]),nt=new Map(Cr);function so(r){for(const[i,a]of nt)if(r===a)return i;return"unknown"}function co(r){if(Tr(r))return{width:r.naturalWidth,height:r.naturalHeight};if($r(r))return{width:r.width.baseVal.value,height:r.height.baseVal.value};if(Sr(r))return{width:r.videoWidth,height:r.videoHeight};if(_r(r))return{width:r.width,height:r.height};if(Or(r))return{width:r.displayWidth,height:r.displayHeight};if(Pr(r))return{width:r.width,height:r.height};if(Er(r))return{width:r.width,height:r.height};throw new TypeError("The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.")}function Tr(r){try{return r instanceof HTMLImageElement}catch{return!1}}function $r(r){try{return r instanceof SVGImageElement}catch{return!1}}function Sr(r){try{return r instanceof HTMLVideoElement}catch{return!1}}function Pr(r){try{return r instanceof HTMLCanvasElement}catch{return!1}}function _r(r){try{return r instanceof ImageBitmap}catch{return!1}}function Er(r){try{return r instanceof OffscreenCanvas}catch{return!1}}function Or(r){try{return r instanceof VideoFrame}catch{return!1}}function Mr(r){try{return r instanceof Blob}catch{return!1}}function uo(r){try{return r instanceof ImageData}catch{return!1}}function lo(r,i){try{const a=new OffscreenCanvas(r,i);if(a.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return a;throw void 0}catch{const c=document.createElement("canvas");return c.width=r,c.height=i,c}}async function Ar(r){if(Tr(r)&&!await vo(r))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if($r(r)&&!await mo(r))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(Or(r)&&yo(r))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(Sr(r)&&(r.readyState===0||r.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(_r(r)&&wo(r))throw new DOMException("The image source is detached.","InvalidStateError");const{width:i,height:a}=co(r);if(i===0||a===0)return null;const c=lo(i,a).getContext("2d");c.drawImage(r,0,0);try{return c.getImageData(0,0,i,a)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function fo(r){let i;try{if(globalThis.createImageBitmap)i=await createImageBitmap(r);else if(globalThis.Image){i=new Image;let a="";try{a=URL.createObjectURL(r),i.src=a,await i.decode()}finally{URL.revokeObjectURL(a)}}else return r}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await Ar(i)}function ho(r){const{width:i,height:a}=r;if(i===0||a===0)return null;const c=r.getContext("2d");try{return c.getImageData(0,0,i,a)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function po(r){if(Mr(r))return await fo(r);if(uo(r)){if(go(r))throw new DOMException("The image data has been detached.","InvalidStateError");return r}return Pr(r)||Er(r)?ho(r):await Ar(r)}async function vo(r){try{return await r.decode(),!0}catch{return!1}}async function mo(r){var i;try{return await((i=r.decode)==null?void 0:i.call(r)),!0}catch{return!1}}function yo(r){return r.format===null}function go(r){return r.data.buffer.byteLength===0}function wo(r){return r.width===0&&r.height===0}function fr(r,i){return r instanceof DOMException?new DOMException(`${i}: ${r.message}`,r.name):r instanceof Error?new r.constructor(`${i}: ${r.message}`):new Error(`${i}: ${r}`)}const hr=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","DXFilmEdge","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","rMQRCode","UPC-A","UPC-E"];function bo(r){return r.join("|")}function Co(r){const i=pr(r);let a=0,c=hr.length-1;for(;a<=c;){const f=Math.floor((a+c)/2),v=hr[f],y=pr(v);if(y===i)return v;y<i?a=f+1:c=f-1}return"None"}function pr(r){return r.toLowerCase().replace(/_-\[\]/g,"")}function To(r,i){return r.Binarizer[i]}function $o(r,i){return r.CharacterSet[i]}const So=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function Po(r){return So[r.value]}function _o(r,i){return r.EanAddOnSymbol[i]}function Eo(r,i){return r.TextMode[i]}const Ee={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!1,validateCode39CheckSum:!1,validateITFCheckSum:!1,returnCodabarStartEnd:!1,returnErrors:!1,eanAddOnSymbol:"Read",textMode:"Plain",characterSet:"Unknown"};function xr(r,i){return{...i,formats:bo(i.formats),binarizer:To(r,i.binarizer),eanAddOnSymbol:_o(r,i.eanAddOnSymbol),textMode:Eo(r,i.textMode),characterSet:$o(r,i.characterSet)}}function jr(r){return{...r,format:Co(r.format),eccLevel:r.eccLevel,contentType:Po(r.contentType)}}const Oo={locateFile:(r,i)=>{const a=r.match(/_(.+?)\.wasm$/);return a?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.1.3/dist/${a[1]}/${r}`:i+r}};let vr=new WeakMap;function Dt(r,i){var a;const c=vr.get(r);if(c!=null&&c.modulePromise&&(i===void 0||Object.is(i,c.moduleOverrides)))return c.modulePromise;const f=(a=i??(c==null?void 0:c.moduleOverrides))!=null?a:Oo,v=r({...f});return vr.set(r,{moduleOverrides:f,modulePromise:v}),v}async function Mo(r,i,a=Ee){const c={...Ee,...a},f=await Dt(r),{size:v}=i,y=new Uint8Array(await i.arrayBuffer()),S=f._malloc(v);f.HEAPU8.set(y,S);const h=f.readBarcodesFromImage(S,v,xr(f,c));f._free(S);const w=[];for(let T=0;T<h.size();++T)w.push(jr(h.get(T)));return w}async function Ao(r,i,a=Ee){const c={...Ee,...a},f=await Dt(r),{data:v,width:y,height:S,data:{byteLength:h}}=i,w=f._malloc(h);f.HEAPU8.set(v,w);const T=f.readBarcodesFromPixmap(w,y,S,xr(f,c));f._free(w);const b=[];for(let j=0;j<T.size();++j)b.push(jr(T.get(j)));return b}({...Ee,formats:[...Ee.formats]});var Rt=(()=>{var r=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(i={}){var a=i,c,f;a.ready=new Promise((e,t)=>{c=e,f=t});var v=Object.assign({},a),y="./this.program",S=typeof window=="object",h=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var w="";function T(e){return a.locateFile?a.locateFile(e,w):w+e}var b;(S||h)&&(h?w=self.location.href:typeof document<"u"&&document.currentScript&&(w=document.currentScript.src),r&&(w=r),w.indexOf("blob:")!==0?w=w.substr(0,w.replace(/[?#].*/,"").lastIndexOf("/")+1):w="",h&&(b=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)})),a.print||console.log.bind(console);var j=a.printErr||console.error.bind(console);Object.assign(a,v),v=null,a.arguments&&a.arguments,a.thisProgram&&(y=a.thisProgram),a.quit&&a.quit;var D;a.wasmBinary&&(D=a.wasmBinary),typeof WebAssembly!="object"&&K("no native wasm support detected");var x,I=!1,W,G,le,k,O,M,de,oe;function be(){var e=x.buffer;a.HEAP8=W=new Int8Array(e),a.HEAP16=le=new Int16Array(e),a.HEAPU8=G=new Uint8Array(e),a.HEAPU16=k=new Uint16Array(e),a.HEAP32=O=new Int32Array(e),a.HEAPU32=M=new Uint32Array(e),a.HEAPF32=de=new Float32Array(e),a.HEAPF64=oe=new Float64Array(e)}var Ce=[],Oe=[],Me=[];function Ue(){if(a.preRun)for(typeof a.preRun=="function"&&(a.preRun=[a.preRun]);a.preRun.length;)ct(a.preRun.shift());ht(Ce)}function it(){ht(Oe)}function st(){if(a.postRun)for(typeof a.postRun=="function"&&(a.postRun=[a.postRun]);a.postRun.length;)Ae(a.postRun.shift());ht(Me)}function ct(e){Ce.unshift(e)}function ut(e){Oe.unshift(e)}function Ae(e){Me.unshift(e)}var te=0,ye=null;function lt(e){var t;te++,(t=a.monitorRunDependencies)===null||t===void 0||t.call(a,te)}function fe(e){var t;if(te--,(t=a.monitorRunDependencies)===null||t===void 0||t.call(a,te),te==0&&ye){var n=ye;ye=null,n()}}function K(e){var t;(t=a.onAbort)===null||t===void 0||t.call(a,e),e="Aborted("+e+")",j(e),I=!0,e+=". Build with -sASSERTIONS for more info.";var n=new WebAssembly.RuntimeError(e);throw f(n),n}var dt="data:application/octet-stream;base64,",Le=e=>e.startsWith(dt),he;he="zxing_reader.wasm",Le(he)||(he=T(he));function He(e){if(e==he&&D)return new Uint8Array(D);if(b)return b(e);throw"both async and sync fetching of the wasm failed"}function ft(e){return!D&&(S||h)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()}).catch(()=>He(e)):Promise.resolve().then(()=>He(e))}function Ne(e,t,n){return ft(e).then(o=>WebAssembly.instantiate(o,t)).then(o=>o).then(n,o=>{j(`failed to asynchronously prepare wasm: ${o}`),K(o)})}function Jr(e,t,n,o){return!e&&typeof WebAssembly.instantiateStreaming=="function"&&!Le(t)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(s=>{var u=WebAssembly.instantiateStreaming(s,n);return u.then(o,function(l){return j(`wasm streaming compile failed: ${l}`),j("falling back to ArrayBuffer instantiation"),Ne(t,n,o)})}):Ne(t,n,o)}function Yr(){var e={a:Fa};function t(o,s){return J=o.exports,x=J.ia,be(),Bt=J.ma,ut(J.ja),fe(),J}lt();function n(o){t(o.instance)}if(a.instantiateWasm)try{return a.instantiateWasm(e,t)}catch(o){j(`Module.instantiateWasm callback failed with error: ${o}`),f(o)}return Jr(D,he,e,n).catch(f),{}}var ht=e=>{for(;e.length>0;)e.shift()(a)};a.noExitRuntime;var Ve=[],Be=0,qr=e=>{var t=new pt(e);return t.get_caught()||(t.set_caught(!0),Be--),t.set_rethrown(!1),Ve.push(t),ar(t.excPtr),t.get_exception_ptr()},ie=0,Qr=()=>{U(0,0);var e=Ve.pop();nr(e.excPtr),ie=0};function pt(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(t){M[this.ptr+4>>2]=t},this.get_type=function(){return M[this.ptr+4>>2]},this.set_destructor=function(t){M[this.ptr+8>>2]=t},this.get_destructor=function(){return M[this.ptr+8>>2]},this.set_caught=function(t){t=t?1:0,W[this.ptr+12>>0]=t},this.get_caught=function(){return W[this.ptr+12>>0]!=0},this.set_rethrown=function(t){t=t?1:0,W[this.ptr+13>>0]=t},this.get_rethrown=function(){return W[this.ptr+13>>0]!=0},this.init=function(t,n){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(n)},this.set_adjusted_ptr=function(t){M[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return M[this.ptr+16>>2]},this.get_exception_ptr=function(){var t=ir(this.get_type());if(t)return M[this.excPtr>>2];var n=this.get_adjusted_ptr();return n!==0?n:this.excPtr}}var Xr=e=>{throw ie||(ie=e),ie},vt=e=>{var t=ie;if(!t)return Ie(0),0;var n=new pt(t);n.set_adjusted_ptr(t);var o=n.get_type();if(!o)return Ie(0),t;for(var s in e){var u=e[s];if(u===0||u===o)break;var l=n.ptr+16;if(or(u,o,l))return Ie(u),t}return Ie(o),t},Kr=()=>vt([]),Zr=e=>vt([e]),en=(e,t)=>vt([e,t]),tn=()=>{var e=Ve.pop();e||K("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(Ve.push(e),e.set_rethrown(!0),e.set_caught(!1),Be++),ie=t,ie},rn=(e,t,n)=>{var o=new pt(e);throw o.init(t,n),ie=e,Be++,ie},nn=()=>Be,ze={},mt=e=>{for(;e.length;){var t=e.pop(),n=e.pop();n(t)}};function yt(e){return this.fromWireType(O[e>>2])}var Te={},ge={},Ge={},kt,Je=e=>{throw new kt(e)},we=(e,t,n)=>{e.forEach(function(d){Ge[d]=t});function o(d){var p=n(d);p.length!==e.length&&Je("Mismatched type converter count");for(var g=0;g<e.length;++g)re(e[g],p[g])}var s=new Array(t.length),u=[],l=0;t.forEach((d,p)=>{ge.hasOwnProperty(d)?s[p]=ge[d]:(u.push(d),Te.hasOwnProperty(d)||(Te[d]=[]),Te[d].push(()=>{s[p]=ge[d],++l,l===u.length&&o(s)}))}),u.length===0&&o(s)},an=e=>{var t=ze[e];delete ze[e];var n=t.rawConstructor,o=t.rawDestructor,s=t.fields,u=s.map(l=>l.getterReturnType).concat(s.map(l=>l.setterArgumentType));we([e],u,l=>{var d={};return s.forEach((p,g)=>{var C=p.fieldName,P=l[g],_=p.getter,E=p.getterContext,L=l[g+s.length],B=p.setter,F=p.setterContext;d[C]={read:Q=>P.fromWireType(_(E,Q)),write:(Q,m)=>{var $=[];B(F,Q,L.toWireType($,m)),mt($)}}}),[{name:t.name,fromWireType:p=>{var g={};for(var C in d)g[C]=d[C].read(p);return o(p),g},toWireType:(p,g)=>{for(var C in d)if(!(C in g))throw new TypeError(`Missing field: "${C}"`);var P=n();for(C in d)d[C].write(P,g[C]);return p!==null&&p.push(o,P),P},argPackAdvance:ne,readValueFromPointer:yt,destructorFunction:o}]})},on=(e,t,n,o,s)=>{},sn=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Ft=e},Ft,q=e=>{for(var t="",n=e;G[n];)t+=Ft[G[n++]];return t},$e,A=e=>{throw new $e(e)};function cn(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var o=t.name;if(e||A(`type "${o}" must have a positive integer typeid pointer`),ge.hasOwnProperty(e)){if(n.ignoreDuplicateRegistrations)return;A(`Cannot register type '${o}' twice`)}if(ge[e]=t,delete Ge[e],Te.hasOwnProperty(e)){var s=Te[e];delete Te[e],s.forEach(u=>u())}}function re(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return cn(e,t,n)}var ne=8,un=(e,t,n,o)=>{t=q(t),re(e,{name:t,fromWireType:function(s){return!!s},toWireType:function(s,u){return u?n:o},argPackAdvance:ne,readValueFromPointer:function(s){return this.fromWireType(G[s])},destructorFunction:null})},ln=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),gt=e=>{function t(n){return n.$$.ptrType.registeredClass.name}A(t(e)+" instance already deleted")},wt=!1,It=e=>{},dn=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},Wt=e=>{e.count.value-=1;var t=e.count.value===0;t&&dn(e)},Ut=(e,t,n)=>{if(t===n)return e;if(n.baseClass===void 0)return null;var o=Ut(e,t,n.baseClass);return o===null?null:n.downcast(o)},Lt={},fn=()=>Object.keys(De).length,hn=()=>{var e=[];for(var t in De)De.hasOwnProperty(t)&&e.push(De[t]);return e},xe=[],bt=()=>{for(;xe.length;){var e=xe.pop();e.$$.deleteScheduled=!1,e.delete()}},je,pn=e=>{je=e,xe.length&&je&&je(bt)},vn=()=>{a.getInheritedInstanceCount=fn,a.getLiveInheritedInstances=hn,a.flushPendingDeletes=bt,a.setDelayFunction=pn},De={},mn=(e,t)=>{for(t===void 0&&A("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},yn=(e,t)=>(t=mn(e,t),De[t]),Ye=(e,t)=>{(!t.ptrType||!t.ptr)&&Je("makeClassHandle requires ptr and ptrType");var n=!!t.smartPtrType,o=!!t.smartPtr;return n!==o&&Je("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Re(Object.create(e,{$$:{value:t,writable:!0}}))};function gn(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var n=yn(this.registeredClass,t);if(n!==void 0){if(n.$$.count.value===0)return n.$$.ptr=t,n.$$.smartPtr=e,n.clone();var o=n.clone();return this.destructor(e),o}function s(){return this.isSmartPointer?Ye(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):Ye(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var u=this.registeredClass.getActualType(t),l=Lt[u];if(!l)return s.call(this);var d;this.isConst?d=l.constPointerType:d=l.pointerType;var p=Ut(t,this.registeredClass,d.registeredClass);return p===null?s.call(this):this.isSmartPointer?Ye(d.registeredClass.instancePrototype,{ptrType:d,ptr:p,smartPtrType:this,smartPtr:e}):Ye(d.registeredClass.instancePrototype,{ptrType:d,ptr:p})}var Re=e=>typeof FinalizationRegistry>"u"?(Re=t=>t,e):(wt=new FinalizationRegistry(t=>{Wt(t.$$)}),Re=t=>{var n=t.$$,o=!!n.smartPtr;if(o){var s={$$:n};wt.register(t,s,t)}return t},It=t=>wt.unregister(t),Re(e)),wn=()=>{Object.assign(qe.prototype,{isAliasOf(e){if(!(this instanceof qe)||!(e instanceof qe))return!1;var t=this.$$.ptrType.registeredClass,n=this.$$.ptr;e.$$=e.$$;for(var o=e.$$.ptrType.registeredClass,s=e.$$.ptr;t.baseClass;)n=t.upcast(n),t=t.baseClass;for(;o.baseClass;)s=o.upcast(s),o=o.baseClass;return t===o&&n===s},clone(){if(this.$$.ptr||gt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=Re(Object.create(Object.getPrototypeOf(this),{$$:{value:ln(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||gt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&A("Object already scheduled for deletion"),It(this),Wt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||gt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&A("Object already scheduled for deletion"),xe.push(this),xe.length===1&&je&&je(bt),this.$$.deleteScheduled=!0,this}})};function qe(){}var ke=(e,t)=>Object.defineProperty(t,"name",{value:e}),Ht=(e,t,n)=>{if(e[t].overloadTable===void 0){var o=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||A(`Function '${n}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[o.argCount]=o}},Ct=(e,t,n)=>{a.hasOwnProperty(e)?((n===void 0||a[e].overloadTable!==void 0&&a[e].overloadTable[n]!==void 0)&&A(`Cannot register public name '${e}' twice`),Ht(a,e,e),a.hasOwnProperty(n)&&A(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`),a[e].overloadTable[n]=t):(a[e]=t,n!==void 0&&(a[e].numArguments=n))},bn=48,Cn=57,Tn=e=>{if(e===void 0)return"_unknown";e=e.replace(/[^a-zA-Z0-9_]/g,"$");var t=e.charCodeAt(0);return t>=bn&&t<=Cn?`_${e}`:e};function $n(e,t,n,o,s,u,l,d){this.name=e,this.constructor=t,this.instancePrototype=n,this.rawDestructor=o,this.baseClass=s,this.getActualType=u,this.upcast=l,this.downcast=d,this.pureVirtualFunctions=[]}var Tt=(e,t,n)=>{for(;t!==n;)t.upcast||A(`Expected null or instance of ${n.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function Sn(e,t){if(t===null)return this.isReference&&A(`null is not a valid ${this.name}`),0;t.$$||A(`Cannot pass "${Et(t)}" as a ${this.name}`),t.$$.ptr||A(`Cannot pass deleted object as a pointer of type ${this.name}`);var n=t.$$.ptrType.registeredClass,o=Tt(t.$$.ptr,n,this.registeredClass);return o}function Pn(e,t){var n;if(t===null)return this.isReference&&A(`null is not a valid ${this.name}`),this.isSmartPointer?(n=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,n),n):0;(!t||!t.$$)&&A(`Cannot pass "${Et(t)}" as a ${this.name}`),t.$$.ptr||A(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&A(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var o=t.$$.ptrType.registeredClass;if(n=Tt(t.$$.ptr,o,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&A("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?n=t.$$.smartPtr:A(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:n=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)n=t.$$.smartPtr;else{var s=t.clone();n=this.rawShare(n,se.toHandle(()=>s.delete())),e!==null&&e.push(this.rawDestructor,n)}break;default:A("Unsupporting sharing policy")}return n}function _n(e,t){if(t===null)return this.isReference&&A(`null is not a valid ${this.name}`),0;t.$$||A(`Cannot pass "${Et(t)}" as a ${this.name}`),t.$$.ptr||A(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&A(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass,o=Tt(t.$$.ptr,n,this.registeredClass);return o}function Nt(e){return this.fromWireType(M[e>>2])}var En=()=>{Object.assign(Qe.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){var t;(t=this.rawDestructor)===null||t===void 0||t.call(this,e)},argPackAdvance:ne,readValueFromPointer:Nt,deleteObject(e){e!==null&&e.delete()},fromWireType:gn})};function Qe(e,t,n,o,s,u,l,d,p,g,C){this.name=e,this.registeredClass=t,this.isReference=n,this.isConst=o,this.isSmartPointer=s,this.pointeeType=u,this.sharingPolicy=l,this.rawGetPointee=d,this.rawConstructor=p,this.rawShare=g,this.rawDestructor=C,!s&&t.baseClass===void 0?o?(this.toWireType=Sn,this.destructorFunction=null):(this.toWireType=_n,this.destructorFunction=null):this.toWireType=Pn}var Vt=(e,t,n)=>{a.hasOwnProperty(e)||Je("Replacing nonexistant public symbol"),a[e].overloadTable!==void 0&&n!==void 0?a[e].overloadTable[n]=t:(a[e]=t,a[e].argCount=n)},On=(e,t,n)=>{var o=a["dynCall_"+e];return n&&n.length?o.apply(null,[t].concat(n)):o.call(null,t)},Xe=[],Bt,H=e=>{var t=Xe[e];return t||(e>=Xe.length&&(Xe.length=e+1),Xe[e]=t=Bt.get(e)),t},Mn=(e,t,n)=>{if(e.includes("j"))return On(e,t,n);var o=H(t).apply(null,n);return o},An=(e,t)=>{var n=[];return function(){return n.length=0,Object.assign(n,arguments),Mn(e,t,n)}},ee=(e,t)=>{e=q(e);function n(){return e.includes("j")?An(e,t):H(t)}var o=n();return typeof o!="function"&&A(`unknown function pointer with signature ${e}: ${t}`),o},xn=(e,t)=>{var n=ke(t,function(o){this.name=t,this.message=o;var s=new Error(o).stack;s!==void 0&&(this.stack=this.toString()+`
2
- `+s.replace(/^Error(:[^\n]*)?\n/,""))});return n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},n},zt,Gt=e=>{var t=rr(e),n=q(t);return ce(t),n},Ke=(e,t)=>{var n=[],o={};function s(u){if(!o[u]&&!ge[u]){if(Ge[u]){Ge[u].forEach(s);return}n.push(u),o[u]=!0}}throw t.forEach(s),new zt(`${e}: `+n.map(Gt).join([", "]))},jn=(e,t,n,o,s,u,l,d,p,g,C,P,_)=>{C=q(C),u=ee(s,u),d&&(d=ee(l,d)),g&&(g=ee(p,g)),_=ee(P,_);var E=Tn(C);Ct(E,function(){Ke(`Cannot construct ${C} due to unbound types`,[o])}),we([e,t,n],o?[o]:[],function(L){L=L[0];var B,F;o?(B=L.registeredClass,F=B.instancePrototype):F=qe.prototype;var Q=ke(C,function(){if(Object.getPrototypeOf(this)!==m)throw new $e("Use 'new' to construct "+C);if($.constructor_body===void 0)throw new $e(C+" has no accessible constructor");var lr=$.constructor_body[arguments.length];if(lr===void 0)throw new $e(`Tried to invoke ctor of ${C} with invalid number of parameters (${arguments.length}) - expected (${Object.keys($.constructor_body).toString()}) parameters instead!`);return lr.apply(this,arguments)}),m=Object.create(F,{constructor:{value:Q}});Q.prototype=m;var $=new $n(C,Q,m,_,B,u,d,g);if($.baseClass){var z,Y;(Y=(z=$.baseClass).__derivedClasses)!==null&&Y!==void 0||(z.__derivedClasses=[]),$.baseClass.__derivedClasses.push($)}var Se=new Qe(C,$,!0,!1,!1),tt=new Qe(C+"*",$,!1,!1,!1),ur=new Qe(C+" const*",$,!1,!0,!1);return Lt[e]={pointerType:tt,constPointerType:ur},Vt(E,Q),[Se,tt,ur]})},$t=(e,t)=>{for(var n=[],o=0;o<e;o++)n.push(M[t+o*4>>2]);return n};function Dn(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].destructorFunction===void 0)return!0;return!1}function St(e,t,n,o,s,u){var l=t.length;l<2&&A("argTypes array size mismatch! Must at least get return value and 'this' types!");var d=t[1]!==null&&n!==null,p=Dn(t),g=t[0].name!=="void",C=l-2,P=new Array(C),_=[],E=[],L=function(){arguments.length!==C&&A(`function ${e} called with ${arguments.length} arguments, expected ${C}`),E.length=0;var B;_.length=d?2:1,_[0]=s,d&&(B=t[1].toWireType(E,this),_[1]=B);for(var F=0;F<C;++F)P[F]=t[F+2].toWireType(E,arguments[F]),_.push(P[F]);var Q=o.apply(null,_);function m($){if(p)mt(E);else for(var z=d?1:2;z<t.length;z++){var Y=z===1?B:P[z-2];t[z].destructorFunction!==null&&t[z].destructorFunction(Y)}if(g)return t[0].fromWireType($)}return m(Q)};return ke(e,L)}var Rn=(e,t,n,o,s,u)=>{var l=$t(t,n);s=ee(o,s),we([],[e],function(d){d=d[0];var p=`constructor ${d.name}`;if(d.registeredClass.constructor_body===void 0&&(d.registeredClass.constructor_body=[]),d.registeredClass.constructor_body[t-1]!==void 0)throw new $e(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${d.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return d.registeredClass.constructor_body[t-1]=()=>{Ke(`Cannot construct ${d.name} due to unbound types`,l)},we([],l,g=>(g.splice(1,0,null),d.registeredClass.constructor_body[t-1]=St(p,g,null,s,u),[])),[]})},Jt=e=>{e=e.trim();const t=e.indexOf("(");return t!==-1?e.substr(0,t):e},kn=(e,t,n,o,s,u,l,d,p)=>{var g=$t(n,o);t=q(t),t=Jt(t),u=ee(s,u),we([],[e],function(C){C=C[0];var P=`${C.name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),d&&C.registeredClass.pureVirtualFunctions.push(t);function _(){Ke(`Cannot call ${P} due to unbound types`,g)}var E=C.registeredClass.instancePrototype,L=E[t];return L===void 0||L.overloadTable===void 0&&L.className!==C.name&&L.argCount===n-2?(_.argCount=n-2,_.className=C.name,E[t]=_):(Ht(E,t,P),E[t].overloadTable[n-2]=_),we([],g,function(B){var F=St(P,B,C,u,l);return E[t].overloadTable===void 0?(F.argCount=n-2,E[t]=F):E[t].overloadTable[n-2]=F,[]}),[]})};function Fn(){Object.assign(Yt.prototype,{get(e){return this.allocated[e]},has(e){return this.allocated[e]!==void 0},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function Yt(){this.allocated=[void 0],this.freelist=[]}var Z=new Yt,Pt=e=>{e>=Z.reserved&&--Z.get(e).refcount===0&&Z.free(e)},In=()=>{for(var e=0,t=Z.reserved;t<Z.allocated.length;++t)Z.allocated[t]!==void 0&&++e;return e},Wn=()=>{Z.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),Z.reserved=Z.allocated.length,a.count_emval_handles=In},se={toValue:e=>(e||A("Cannot use deleted val. handle = "+e),Z.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Z.allocate({refcount:1,value:e})}}},Un=(e,t)=>{t=q(t),re(e,{name:t,fromWireType:n=>{var o=se.toValue(n);return Pt(n),o},toWireType:(n,o)=>se.toHandle(o),argPackAdvance:ne,readValueFromPointer:yt,destructorFunction:null})},Ln=(e,t,n)=>{switch(t){case 1:return n?function(o){return this.fromWireType(W[o>>0])}:function(o){return this.fromWireType(G[o>>0])};case 2:return n?function(o){return this.fromWireType(le[o>>1])}:function(o){return this.fromWireType(k[o>>1])};case 4:return n?function(o){return this.fromWireType(O[o>>2])}:function(o){return this.fromWireType(M[o>>2])};default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},Hn=(e,t,n,o)=>{t=q(t);function s(){}s.values={},re(e,{name:t,constructor:s,fromWireType:function(u){return this.constructor.values[u]},toWireType:(u,l)=>l.value,argPackAdvance:ne,readValueFromPointer:Ln(t,n,o),destructorFunction:null}),Ct(t,s)},_t=(e,t)=>{var n=ge[e];return n===void 0&&A(t+" has unknown type "+Gt(e)),n},Nn=(e,t,n)=>{var o=_t(e,"enum");t=q(t);var s=o.constructor,u=Object.create(o.constructor.prototype,{value:{value:n},constructor:{value:ke(`${o.name}_${t}`,function(){})}});s.values[n]=u,s[t]=u},Et=e=>{if(e===null)return"null";var t=typeof e;return t==="object"||t==="array"||t==="function"?e.toString():""+e},Vn=(e,t)=>{switch(t){case 4:return function(n){return this.fromWireType(de[n>>2])};case 8:return function(n){return this.fromWireType(oe[n>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},Bn=(e,t,n)=>{t=q(t),re(e,{name:t,fromWireType:o=>o,toWireType:(o,s)=>s,argPackAdvance:ne,readValueFromPointer:Vn(t,n),destructorFunction:null})},zn=(e,t,n,o,s,u,l)=>{var d=$t(t,n);e=q(e),e=Jt(e),s=ee(o,s),Ct(e,function(){Ke(`Cannot call ${e} due to unbound types`,d)},t-1),we([],d,function(p){var g=[p[0],null].concat(p.slice(1));return Vt(e,St(e,g,null,s,u),t-1),[]})},Gn=(e,t,n)=>{switch(t){case 1:return n?o=>W[o>>0]:o=>G[o>>0];case 2:return n?o=>le[o>>1]:o=>k[o>>1];case 4:return n?o=>O[o>>2]:o=>M[o>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},Jn=(e,t,n,o,s)=>{t=q(t);var u=C=>C;if(o===0){var l=32-8*n;u=C=>C<<l>>>l}var d=t.includes("unsigned"),p=(C,P)=>{},g;d?g=function(C,P){return p(P,this.name),P>>>0}:g=function(C,P){return p(P,this.name),P},re(e,{name:t,fromWireType:u,toWireType:g,argPackAdvance:ne,readValueFromPointer:Gn(t,n,o!==0),destructorFunction:null})},Yn=(e,t,n)=>{var o=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],s=o[t];function u(l){var d=M[l>>2],p=M[l+4>>2];return new s(W.buffer,p,d)}n=q(n),re(e,{name:n,fromWireType:u,argPackAdvance:ne,readValueFromPointer:u},{ignoreDuplicateRegistrations:!0})},qt=(e,t,n,o)=>{if(!(o>0))return 0;for(var s=n,u=n+o-1,l=0;l<e.length;++l){var d=e.charCodeAt(l);if(d>=55296&&d<=57343){var p=e.charCodeAt(++l);d=65536+((d&1023)<<10)|p&1023}if(d<=127){if(n>=u)break;t[n++]=d}else if(d<=2047){if(n+1>=u)break;t[n++]=192|d>>6,t[n++]=128|d&63}else if(d<=65535){if(n+2>=u)break;t[n++]=224|d>>12,t[n++]=128|d>>6&63,t[n++]=128|d&63}else{if(n+3>=u)break;t[n++]=240|d>>18,t[n++]=128|d>>12&63,t[n++]=128|d>>6&63,t[n++]=128|d&63}}return t[n]=0,n-s},qn=(e,t,n)=>qt(e,G,t,n),Qt=e=>{for(var t=0,n=0;n<e.length;++n){var o=e.charCodeAt(n);o<=127?t++:o<=2047?t+=2:o>=55296&&o<=57343?(t+=4,++n):t+=3}return t},Xt=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Qn=(e,t,n)=>{for(var o=t+n,s=t;e[s]&&!(s>=o);)++s;if(s-t>16&&e.buffer&&Xt)return Xt.decode(e.subarray(t,s));for(var u="";t<s;){var l=e[t++];if(!(l&128)){u+=String.fromCharCode(l);continue}var d=e[t++]&63;if((l&224)==192){u+=String.fromCharCode((l&31)<<6|d);continue}var p=e[t++]&63;if((l&240)==224?l=(l&15)<<12|d<<6|p:l=(l&7)<<18|d<<12|p<<6|e[t++]&63,l<65536)u+=String.fromCharCode(l);else{var g=l-65536;u+=String.fromCharCode(55296|g>>10,56320|g&1023)}}return u},Ot=(e,t)=>e?Qn(G,e,t):"",Xn=(e,t)=>{t=q(t);var n=t==="std::string";re(e,{name:t,fromWireType(o){var s=M[o>>2],u=o+4,l;if(n)for(var d=u,p=0;p<=s;++p){var g=u+p;if(p==s||G[g]==0){var C=g-d,P=Ot(d,C);l===void 0?l=P:(l+="\0",l+=P),d=g+1}}else{for(var _=new Array(s),p=0;p<s;++p)_[p]=String.fromCharCode(G[u+p]);l=_.join("")}return ce(o),l},toWireType(o,s){s instanceof ArrayBuffer&&(s=new Uint8Array(s));var u,l=typeof s=="string";l||s instanceof Uint8Array||s instanceof Uint8ClampedArray||s instanceof Int8Array||A("Cannot pass non-string to std::string"),n&&l?u=Qt(s):u=s.length;var d=xt(4+u+1),p=d+4;if(M[d>>2]=u,n&&l)qn(s,p,u+1);else if(l)for(var g=0;g<u;++g){var C=s.charCodeAt(g);C>255&&(ce(p),A("String has UTF-16 code units that do not fit in 8 bits")),G[p+g]=C}else for(var g=0;g<u;++g)G[p+g]=s[g];return o!==null&&o.push(ce,d),d},argPackAdvance:ne,readValueFromPointer:Nt,destructorFunction(o){ce(o)}})},Kt=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Kn=(e,t)=>{for(var n=e,o=n>>1,s=o+t/2;!(o>=s)&&k[o];)++o;if(n=o<<1,n-e>32&&Kt)return Kt.decode(G.subarray(e,n));for(var u="",l=0;!(l>=t/2);++l){var d=le[e+l*2>>1];if(d==0)break;u+=String.fromCharCode(d)}return u},Zn=(e,t,n)=>{var o;if((o=n)!==null&&o!==void 0||(n=2147483647),n<2)return 0;n-=2;for(var s=t,u=n<e.length*2?n/2:e.length,l=0;l<u;++l){var d=e.charCodeAt(l);le[t>>1]=d,t+=2}return le[t>>1]=0,t-s},ea=e=>e.length*2,ta=(e,t)=>{for(var n=0,o="";!(n>=t/4);){var s=O[e+n*4>>2];if(s==0)break;if(++n,s>=65536){var u=s-65536;o+=String.fromCharCode(55296|u>>10,56320|u&1023)}else o+=String.fromCharCode(s)}return o},ra=(e,t,n)=>{var o;if((o=n)!==null&&o!==void 0||(n=2147483647),n<4)return 0;for(var s=t,u=s+n-4,l=0;l<e.length;++l){var d=e.charCodeAt(l);if(d>=55296&&d<=57343){var p=e.charCodeAt(++l);d=65536+((d&1023)<<10)|p&1023}if(O[t>>2]=d,t+=4,t+4>u)break}return O[t>>2]=0,t-s},na=e=>{for(var t=0,n=0;n<e.length;++n){var o=e.charCodeAt(n);o>=55296&&o<=57343&&++n,t+=4}return t},aa=(e,t,n)=>{n=q(n);var o,s,u,l,d;t===2?(o=Kn,s=Zn,l=ea,u=()=>k,d=1):t===4&&(o=ta,s=ra,l=na,u=()=>M,d=2),re(e,{name:n,fromWireType:p=>{for(var g=M[p>>2],C=u(),P,_=p+4,E=0;E<=g;++E){var L=p+4+E*t;if(E==g||C[L>>d]==0){var B=L-_,F=o(_,B);P===void 0?P=F:(P+="\0",P+=F),_=L+t}}return ce(p),P},toWireType:(p,g)=>{typeof g!="string"&&A(`Cannot pass non-string to C++ string type ${n}`);var C=l(g),P=xt(4+C+t);return M[P>>2]=C>>d,s(g,P+4,C+t),p!==null&&p.push(ce,P),P},argPackAdvance:ne,readValueFromPointer:yt,destructorFunction(p){ce(p)}})},oa=(e,t,n,o,s,u)=>{ze[e]={name:q(t),rawConstructor:ee(n,o),rawDestructor:ee(s,u),fields:[]}},ia=(e,t,n,o,s,u,l,d,p,g)=>{ze[e].fields.push({fieldName:q(t),getterReturnType:n,getter:ee(o,s),getterContext:u,setterArgumentType:l,setter:ee(d,p),setterContext:g})},sa=(e,t)=>{t=q(t),re(e,{isVoid:!0,name:t,argPackAdvance:0,fromWireType:()=>{},toWireType:(n,o)=>{}})},Mt=[],ca=(e,t,n,o)=>(e=Mt[e],t=se.toValue(t),e(null,t,n,o)),ua={},la=e=>{var t=ua[e];return t===void 0?q(e):t},Zt=()=>{if(typeof globalThis=="object")return globalThis;function e(t){t.$$$embind_global$$$=t;var n=typeof $$$embind_global$$$=="object"&&t.$$$embind_global$$$==t;return n||delete t.$$$embind_global$$$,n}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&e(global)?$$$embind_global$$$=global:typeof self=="object"&&e(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},da=e=>e===0?se.toHandle(Zt()):(e=la(e),se.toHandle(Zt()[e])),fa=e=>{var t=Mt.length;return Mt.push(e),t},ha=(e,t)=>{for(var n=new Array(e),o=0;o<e;++o)n[o]=_t(M[t+o*4>>2],"parameter "+o);return n},pa=Reflect.construct,va=(e,t,n)=>{var o=[],s=e.toWireType(o,n);return o.length&&(M[t>>2]=se.toHandle(o)),s},ma=(e,t,n)=>{var o=ha(e,t),s=o.shift();e--;var u=new Array(e),l=(p,g,C,P)=>{for(var _=0,E=0;E<e;++E)u[E]=o[E].readValueFromPointer(P+_),_+=o[E].argPackAdvance;for(var L=n===1?pa(g,u):g.apply(p,u),E=0;E<e;++E){var B,F;(B=(F=o[E]).deleteObject)===null||B===void 0||B.call(F,u[E])}return va(s,C,L)},d=`methodCaller<(${o.map(p=>p.name).join(", ")}) => ${s.name}>`;return fa(ke(d,l))},ya=e=>{e>4&&(Z.get(e).refcount+=1)},ga=e=>{var t=se.toValue(e);mt(t),Pt(e)},wa=(e,t)=>{e=_t(e,"_emval_take_value");var n=e.readValueFromPointer(t);return se.toHandle(n)},ba=()=>{K("")},Ca=(e,t,n)=>G.copyWithin(e,t,t+n),Ta=()=>2147483648,$a=e=>{var t=x.buffer,n=(e-t.byteLength+65535)/65536;try{return x.grow(n),be(),1}catch{}},Sa=e=>{var t=G.length;e>>>=0;var n=Ta();if(e>n)return!1;for(var o=(p,g)=>p+(g-p%g)%g,s=1;s<=4;s*=2){var u=t*(1+.2/s);u=Math.min(u,e+100663296);var l=Math.min(n,o(Math.max(e,u),65536)),d=$a(l);if(d)return!0}return!1},At={},Pa=()=>y||"./this.program",Fe=()=>{if(!Fe.strings){var e=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:e,_:Pa()};for(var n in At)At[n]===void 0?delete t[n]:t[n]=At[n];var o=[];for(var n in t)o.push(`${n}=${t[n]}`);Fe.strings=o}return Fe.strings},_a=(e,t)=>{for(var n=0;n<e.length;++n)W[t++>>0]=e.charCodeAt(n);W[t>>0]=0},Ea=(e,t)=>{var n=0;return Fe().forEach((o,s)=>{var u=t+n;M[e+s*4>>2]=u,_a(o,u),n+=o.length+1}),0},Oa=(e,t)=>{var n=Fe();M[e>>2]=n.length;var o=0;return n.forEach(s=>o+=s.length+1),M[t>>2]=o,0},Ma=e=>e,Ze=e=>e%4===0&&(e%100!==0||e%400===0),Aa=(e,t)=>{for(var n=0,o=0;o<=t;n+=e[o++]);return n},er=[31,29,31,30,31,30,31,31,30,31,30,31],tr=[31,28,31,30,31,30,31,31,30,31,30,31],xa=(e,t)=>{for(var n=new Date(e.getTime());t>0;){var o=Ze(n.getFullYear()),s=n.getMonth(),u=(o?er:tr)[s];if(t>u-n.getDate())t-=u-n.getDate()+1,n.setDate(1),s<11?n.setMonth(s+1):(n.setMonth(0),n.setFullYear(n.getFullYear()+1));else return n.setDate(n.getDate()+t),n}return n};function ja(e,t,n){var o=n>0?n:Qt(e)+1,s=new Array(o),u=qt(e,s,0,s.length);return t&&(s.length=u),s}var Da=(e,t)=>{W.set(e,t)},Ra=(e,t,n,o)=>{var s=M[o+40>>2],u={tm_sec:O[o>>2],tm_min:O[o+4>>2],tm_hour:O[o+8>>2],tm_mday:O[o+12>>2],tm_mon:O[o+16>>2],tm_year:O[o+20>>2],tm_wday:O[o+24>>2],tm_yday:O[o+28>>2],tm_isdst:O[o+32>>2],tm_gmtoff:O[o+36>>2],tm_zone:s?Ot(s):""},l=Ot(n),d={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var p in d)l=l.replace(new RegExp(p,"g"),d[p]);var g=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],C=["January","February","March","April","May","June","July","August","September","October","November","December"];function P(m,$,z){for(var Y=typeof m=="number"?m.toString():m||"";Y.length<$;)Y=z[0]+Y;return Y}function _(m,$){return P(m,$,"0")}function E(m,$){function z(Se){return Se<0?-1:Se>0?1:0}var Y;return(Y=z(m.getFullYear()-$.getFullYear()))===0&&(Y=z(m.getMonth()-$.getMonth()))===0&&(Y=z(m.getDate()-$.getDate())),Y}function L(m){switch(m.getDay()){case 0:return new Date(m.getFullYear()-1,11,29);case 1:return m;case 2:return new Date(m.getFullYear(),0,3);case 3:return new Date(m.getFullYear(),0,2);case 4:return new Date(m.getFullYear(),0,1);case 5:return new Date(m.getFullYear()-1,11,31);case 6:return new Date(m.getFullYear()-1,11,30)}}function B(m){var $=xa(new Date(m.tm_year+1900,0,1),m.tm_yday),z=new Date($.getFullYear(),0,4),Y=new Date($.getFullYear()+1,0,4),Se=L(z),tt=L(Y);return E(Se,$)<=0?E(tt,$)<=0?$.getFullYear()+1:$.getFullYear():$.getFullYear()-1}var F={"%a":m=>g[m.tm_wday].substring(0,3),"%A":m=>g[m.tm_wday],"%b":m=>C[m.tm_mon].substring(0,3),"%B":m=>C[m.tm_mon],"%C":m=>{var $=m.tm_year+1900;return _($/100|0,2)},"%d":m=>_(m.tm_mday,2),"%e":m=>P(m.tm_mday,2," "),"%g":m=>B(m).toString().substring(2),"%G":m=>B(m),"%H":m=>_(m.tm_hour,2),"%I":m=>{var $=m.tm_hour;return $==0?$=12:$>12&&($-=12),_($,2)},"%j":m=>_(m.tm_mday+Aa(Ze(m.tm_year+1900)?er:tr,m.tm_mon-1),3),"%m":m=>_(m.tm_mon+1,2),"%M":m=>_(m.tm_min,2),"%n":()=>`
3
- `,"%p":m=>m.tm_hour>=0&&m.tm_hour<12?"AM":"PM","%S":m=>_(m.tm_sec,2),"%t":()=>" ","%u":m=>m.tm_wday||7,"%U":m=>{var $=m.tm_yday+7-m.tm_wday;return _(Math.floor($/7),2)},"%V":m=>{var $=Math.floor((m.tm_yday+7-(m.tm_wday+6)%7)/7);if((m.tm_wday+371-m.tm_yday-2)%7<=2&&$++,$){if($==53){var z=(m.tm_wday+371-m.tm_yday)%7;z!=4&&(z!=3||!Ze(m.tm_year))&&($=1)}}else{$=52;var Y=(m.tm_wday+7-m.tm_yday-1)%7;(Y==4||Y==5&&Ze(m.tm_year%400-1))&&$++}return _($,2)},"%w":m=>m.tm_wday,"%W":m=>{var $=m.tm_yday+7-(m.tm_wday+6)%7;return _(Math.floor($/7),2)},"%y":m=>(m.tm_year+1900).toString().substring(2),"%Y":m=>m.tm_year+1900,"%z":m=>{var $=m.tm_gmtoff,z=$>=0;return $=Math.abs($)/60,$=$/60*100+$%60,(z?"+":"-")+("0000"+$).slice(-4)},"%Z":m=>m.tm_zone,"%%":()=>"%"};l=l.replace(/%%/g,"\0\0");for(var p in F)l.includes(p)&&(l=l.replace(new RegExp(p,"g"),F[p](u)));l=l.replace(/\0\0/g,"%");var Q=ja(l,!1);return Q.length>t?0:(Da(Q,e),Q.length-1)},ka=(e,t,n,o,s)=>Ra(e,t,n,o);kt=a.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},sn(),$e=a.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},wn(),vn(),En(),zt=a.UnboundTypeError=xn(Error,"UnboundTypeError"),Fn(),Wn();var Fa={s:qr,u:Qr,b:Kr,g:Zr,q:en,J:tn,f:rn,V:nn,d:Xr,da:an,Q:on,_:un,ca:jn,ba:Rn,w:kn,Y:Un,x:Hn,h:Nn,L:Bn,M:zn,t:Jn,o:Yn,K:Xn,C:aa,A:oa,ea:ia,$:sa,R:ca,ha:Pt,fa:da,Z:ma,N:ya,O:ga,aa:wa,B:ba,X:Ca,W:Sa,T:Ea,U:Oa,E:Ka,D:Ha,F:Xa,n:Za,a:Ia,e:Va,m:La,k:za,H:qa,v:Ja,G:Qa,z:to,P:no,l:Ba,j:Na,c:Ua,p:Wa,I:Ya,r:eo,i:Ga,y:ro,ga:Ma,S:ka},J=Yr(),ce=a._free=e=>(ce=a._free=J.ka)(e),xt=a._malloc=e=>(xt=a._malloc=J.la)(e),rr=e=>(rr=J.na)(e),U=(e,t)=>(U=J.oa)(e,t),Ie=e=>(Ie=J.pa)(e),N=()=>(N=J.qa)(),V=e=>(V=J.ra)(e),nr=e=>(nr=J.sa)(e),ar=e=>(ar=J.ta)(e),or=(e,t,n)=>(or=J.ua)(e,t,n),ir=e=>(ir=J.va)(e);a.dynCall_viijii=(e,t,n,o,s,u,l)=>(a.dynCall_viijii=J.wa)(e,t,n,o,s,u,l);var sr=a.dynCall_jiiii=(e,t,n,o,s)=>(sr=a.dynCall_jiiii=J.xa)(e,t,n,o,s);a.dynCall_iiiiij=(e,t,n,o,s,u,l)=>(a.dynCall_iiiiij=J.ya)(e,t,n,o,s,u,l),a.dynCall_iiiiijj=(e,t,n,o,s,u,l,d,p)=>(a.dynCall_iiiiijj=J.za)(e,t,n,o,s,u,l,d,p),a.dynCall_iiiiiijj=(e,t,n,o,s,u,l,d,p,g)=>(a.dynCall_iiiiiijj=J.Aa)(e,t,n,o,s,u,l,d,p,g);function Ia(e,t){var n=N();try{return H(e)(t)}catch(o){if(V(n),o!==o+0)throw o;U(1,0)}}function Wa(e,t,n,o){var s=N();try{H(e)(t,n,o)}catch(u){if(V(s),u!==u+0)throw u;U(1,0)}}function Ua(e,t,n){var o=N();try{H(e)(t,n)}catch(s){if(V(o),s!==s+0)throw s;U(1,0)}}function La(e,t,n,o){var s=N();try{return H(e)(t,n,o)}catch(u){if(V(s),u!==u+0)throw u;U(1,0)}}function Ha(e,t,n,o,s){var u=N();try{return H(e)(t,n,o,s)}catch(l){if(V(u),l!==l+0)throw l;U(1,0)}}function Na(e,t){var n=N();try{H(e)(t)}catch(o){if(V(n),o!==o+0)throw o;U(1,0)}}function Va(e,t,n){var o=N();try{return H(e)(t,n)}catch(s){if(V(o),s!==s+0)throw s;U(1,0)}}function Ba(e){var t=N();try{H(e)()}catch(n){if(V(t),n!==n+0)throw n;U(1,0)}}function za(e,t,n,o,s){var u=N();try{return H(e)(t,n,o,s)}catch(l){if(V(u),l!==l+0)throw l;U(1,0)}}function Ga(e,t,n,o,s,u,l,d,p,g,C){var P=N();try{H(e)(t,n,o,s,u,l,d,p,g,C)}catch(_){if(V(P),_!==_+0)throw _;U(1,0)}}function Ja(e,t,n,o,s,u,l){var d=N();try{return H(e)(t,n,o,s,u,l)}catch(p){if(V(d),p!==p+0)throw p;U(1,0)}}function Ya(e,t,n,o,s){var u=N();try{H(e)(t,n,o,s)}catch(l){if(V(u),l!==l+0)throw l;U(1,0)}}function qa(e,t,n,o,s,u){var l=N();try{return H(e)(t,n,o,s,u)}catch(d){if(V(l),d!==d+0)throw d;U(1,0)}}function Qa(e,t,n,o,s,u,l,d){var p=N();try{return H(e)(t,n,o,s,u,l,d)}catch(g){if(V(p),g!==g+0)throw g;U(1,0)}}function Xa(e,t,n,o){var s=N();try{return H(e)(t,n,o)}catch(u){if(V(s),u!==u+0)throw u;U(1,0)}}function Ka(e,t,n,o){var s=N();try{return H(e)(t,n,o)}catch(u){if(V(s),u!==u+0)throw u;U(1,0)}}function Za(e){var t=N();try{return H(e)()}catch(n){if(V(t),n!==n+0)throw n;U(1,0)}}function eo(e,t,n,o,s,u,l,d){var p=N();try{H(e)(t,n,o,s,u,l,d)}catch(g){if(V(p),g!==g+0)throw g;U(1,0)}}function to(e,t,n,o,s,u,l,d,p,g,C,P){var _=N();try{return H(e)(t,n,o,s,u,l,d,p,g,C,P)}catch(E){if(V(_),E!==E+0)throw E;U(1,0)}}function ro(e,t,n,o,s,u,l,d,p,g,C,P,_,E,L,B){var F=N();try{H(e)(t,n,o,s,u,l,d,p,g,C,P,_,E,L,B)}catch(Q){if(V(F),Q!==Q+0)throw Q;U(1,0)}}function no(e,t,n,o,s){var u=N();try{return sr(e,t,n,o,s)}catch(l){if(V(u),l!==l+0)throw l;U(1,0)}}var et;ye=function e(){et||cr(),et||(ye=e)};function cr(){if(te>0||(Ue(),te>0))return;function e(){et||(et=!0,a.calledRun=!0,!I&&(it(),c(a),a.onRuntimeInitialized&&a.onRuntimeInitialized(),st()))}a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1),e()},1)):e()}if(a.preInit)for(typeof a.preInit=="function"&&(a.preInit=[a.preInit]);a.preInit.length>0;)a.preInit.pop()();return cr(),i.ready}})();function xo(r){return Dt(Rt,r)}async function jo(r,i){return Mo(Rt,r,i)}async function Do(r,i){return Ao(Rt,r,i)}var We;class Dr extends EventTarget{constructor(i={}){var a;super(),ao(this,We,void 0);try{const c=(a=i==null?void 0:i.formats)==null?void 0:a.filter(f=>f!=="unknown");if((c==null?void 0:c.length)===0)throw new TypeError("Hint option provided, but is empty.");c==null||c.forEach(f=>{if(!nt.has(f))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${f}' is not a valid enum value of type BarcodeFormat.`)}),oo(this,We,c??[]),xo().then(f=>{this.dispatchEvent(new CustomEvent("load",{detail:f}))}).catch(f=>{this.dispatchEvent(new CustomEvent("error",{detail:f}))})}catch(c){throw fr(c,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return io.filter(i=>i!=="unknown")}async detect(i){try{const a=await po(i);if(a===null)return[];let c;try{Mr(a)?c=await jo(a,{tryHarder:!0,formats:dr(this,We).map(f=>nt.get(f))}):c=await Do(a,{tryHarder:!0,formats:dr(this,We).map(f=>nt.get(f))})}catch(f){throw console.error(f),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return c.map(f=>{const{topLeft:{x:v,y},topRight:{x:S,y:h},bottomLeft:{x:w,y:T},bottomRight:{x:b,y:j}}=f.position,D=Math.min(v,S,w,b),x=Math.min(y,h,T,j),I=Math.max(v,S,w,b),W=Math.max(y,h,T,j);return{boundingBox:new DOMRectReadOnly(D,x,I-D,W-x),rawValue:f.text,format:so(f.format),cornerPoints:[{x:v,y},{x:S,y:h},{x:b,y:j},{x:w,y:T}]}})}catch(a){throw fr(a,"Failed to execute 'detect' on 'BarcodeDetector'")}}}We=new WeakMap;const Rr=(r,i,a="error")=>{let c,f;const v=new Promise((y,S)=>{c=y,f=S,r.addEventListener(i,c),r.addEventListener(a,f)});return v.finally(()=>{r.removeEventListener(i,c),r.removeEventListener(a,f)}),v},mr=r=>new Promise(i=>setTimeout(i,r));class kr extends Error{constructor(){super("this browser has no Stream API support"),this.name="StreamApiNotSupportedError"}}class Ro extends Error{constructor(){super("camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP."),this.name="InsecureContextError"}}class ko extends Error{constructor(){super("Loading camera stream timed out after 3 seconds. If you are on iOS in PWA mode, this is a known issue (see https://github.com/gruhn/vue-qrcode-reader/issues/298)"),this.name="StreamLoadTimeoutError"}}let jt;const Fo=r=>{jt=new Dr({formats:r})},Io=async(r,{detectHandler:i,locateHandler:a,minDelay:c,formats:f})=>{jt=new Dr({formats:f});const v=y=>async S=>{if(r.readyState>1){const{lastScanned:h,contentBefore:w,lastScanHadContent:T}=y;if(S-h<c)window.requestAnimationFrame(v(y));else{const b=await jt.detect(r),j=b.some(I=>!w.includes(I.rawValue));j&&i(b);const D=b.length>0;D&&a(b),!D&&T&&a(b);const x={lastScanned:S,lastScanHadContent:D,contentBefore:j?b.map(I=>I.rawValue):w};window.requestAnimationFrame(v(x))}}};v({lastScanned:performance.now(),contentBefore:[],lastScanHadContent:!1})(performance.now())};var Fr={},X={};Object.defineProperty(X,"__esModule",{value:!0});X.compactObject=Ur;X.deprecated=Go;var Wo=X.detectBrowser=Jo;X.disableLog=Vo;X.disableWarnings=Bo;X.extractVersion=at;X.filterStats=Yo;X.log=zo;X.walkStats=ot;X.wrapPeerConnectionEvent=No;function Uo(r,i,a){return i=Lo(i),i in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a,r}function Lo(r){var i=Ho(r,"string");return ve(i)==="symbol"?i:String(i)}function Ho(r,i){if(ve(r)!=="object"||r===null)return r;var a=r[Symbol.toPrimitive];if(a!==void 0){var c=a.call(r,i||"default");if(ve(c)!=="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(r)}function ve(r){"@babel/helpers - typeof";return ve=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},ve(r)}var Ir=!0,Wr=!0;function at(r,i,a){var c=r.match(i);return c&&c.length>=a&&parseInt(c[a],10)}function No(r,i,a){if(r.RTCPeerConnection){var c=r.RTCPeerConnection.prototype,f=c.addEventListener;c.addEventListener=function(y,S){if(y!==i)return f.apply(this,arguments);var h=function(w){var T=a(w);T&&(S.handleEvent?S.handleEvent(T):S(T))};return this._eventMap=this._eventMap||{},this._eventMap[i]||(this._eventMap[i]=new Map),this._eventMap[i].set(S,h),f.apply(this,[y,h])};var v=c.removeEventListener;c.removeEventListener=function(y,S){if(y!==i||!this._eventMap||!this._eventMap[i])return v.apply(this,arguments);if(!this._eventMap[i].has(S))return v.apply(this,arguments);var h=this._eventMap[i].get(S);return this._eventMap[i].delete(S),this._eventMap[i].size===0&&delete this._eventMap[i],Object.keys(this._eventMap).length===0&&delete this._eventMap,v.apply(this,[y,h])},Object.defineProperty(c,"on"+i,{get:function(){return this["_on"+i]},set:function(y){this["_on"+i]&&(this.removeEventListener(i,this["_on"+i]),delete this["_on"+i]),y&&this.addEventListener(i,this["_on"+i]=y)},enumerable:!0,configurable:!0})}}function Vo(r){return typeof r!="boolean"?new Error("Argument type: "+ve(r)+". Please use a boolean."):(Ir=r,r?"adapter.js logging disabled":"adapter.js logging enabled")}function Bo(r){return typeof r!="boolean"?new Error("Argument type: "+ve(r)+". Please use a boolean."):(Wr=!r,"adapter.js deprecation warnings "+(r?"disabled":"enabled"))}function zo(){if((typeof window>"u"?"undefined":ve(window))==="object"){if(Ir)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function Go(r,i){Wr&&console.warn(r+" is deprecated, please use "+i+" instead.")}function Jo(r){var i={browser:null,version:null};if(typeof r>"u"||!r.navigator||!r.navigator.userAgent)return i.browser="Not a browser.",i;var a=r.navigator;if(a.mozGetUserMedia)i.browser="firefox",i.version=at(a.userAgent,/Firefox\/(\d+)\./,1);else if(a.webkitGetUserMedia||r.isSecureContext===!1&&r.webkitRTCPeerConnection)i.browser="chrome",i.version=at(a.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(r.RTCPeerConnection&&a.userAgent.match(/AppleWebKit\/(\d+)\./))i.browser="safari",i.version=at(a.userAgent,/AppleWebKit\/(\d+)\./,1),i.supportsUnifiedPlan=r.RTCRtpTransceiver&&"currentDirection"in r.RTCRtpTransceiver.prototype;else return i.browser="Not a supported browser.",i;return i}function yr(r){return Object.prototype.toString.call(r)==="[object Object]"}function Ur(r){return yr(r)?Object.keys(r).reduce(function(i,a){var c=yr(r[a]),f=c?Ur(r[a]):r[a],v=c&&!Object.keys(f).length;return f===void 0||v?i:Object.assign(i,Uo({},a,f))},{}):r}function ot(r,i,a){!i||a.has(i.id)||(a.set(i.id,i),Object.keys(i).forEach(function(c){c.endsWith("Id")?ot(r,r.get(i[c]),a):c.endsWith("Ids")&&i[c].forEach(function(f){ot(r,r.get(f),a)})}))}function Yo(r,i,a){var c=a?"outbound-rtp":"inbound-rtp",f=new Map;if(i===null)return f;var v=[];return r.forEach(function(y){y.type==="track"&&y.trackIdentifier===i.id&&v.push(y)}),v.forEach(function(y){r.forEach(function(S){S.type===c&&S.trackId===y.id&&ot(r,S,f)})}),f}Object.defineProperty(Fr,"__esModule",{value:!0});var qo=Fr.shimGetUserMedia=Ko,Qo=Xo(X);function Lr(r){if(typeof WeakMap!="function")return null;var i=new WeakMap,a=new WeakMap;return(Lr=function(c){return c?a:i})(r)}function Xo(r,i){if(!i&&r&&r.__esModule)return r;if(r===null||pe(r)!=="object"&&typeof r!="function")return{default:r};var a=Lr(i);if(a&&a.has(r))return a.get(r);var c={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var v in r)if(v!=="default"&&Object.prototype.hasOwnProperty.call(r,v)){var y=f?Object.getOwnPropertyDescriptor(r,v):null;y&&(y.get||y.set)?Object.defineProperty(c,v,y):c[v]=r[v]}return c.default=r,a&&a.set(r,c),c}function pe(r){"@babel/helpers - typeof";return pe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},pe(r)}var gr=Qo.log;function Ko(r,i){var a=r&&r.navigator;if(a.mediaDevices){var c=function(h){if(pe(h)!=="object"||h.mandatory||h.optional)return h;var w={};return Object.keys(h).forEach(function(T){if(!(T==="require"||T==="advanced"||T==="mediaSource")){var b=pe(h[T])==="object"?h[T]:{ideal:h[T]};b.exact!==void 0&&typeof b.exact=="number"&&(b.min=b.max=b.exact);var j=function(x,I){return x?x+I.charAt(0).toUpperCase()+I.slice(1):I==="deviceId"?"sourceId":I};if(b.ideal!==void 0){w.optional=w.optional||[];var D={};typeof b.ideal=="number"?(D[j("min",T)]=b.ideal,w.optional.push(D),D={},D[j("max",T)]=b.ideal,w.optional.push(D)):(D[j("",T)]=b.ideal,w.optional.push(D))}b.exact!==void 0&&typeof b.exact!="number"?(w.mandatory=w.mandatory||{},w.mandatory[j("",T)]=b.exact):["min","max"].forEach(function(x){b[x]!==void 0&&(w.mandatory=w.mandatory||{},w.mandatory[j(x,T)]=b[x])})}}),h.advanced&&(w.optional=(w.optional||[]).concat(h.advanced)),w},f=function(h,w){if(i.version>=61)return w(h);if(h=JSON.parse(JSON.stringify(h)),h&&pe(h.audio)==="object"){var T=function(x,I,W){I in x&&!(W in x)&&(x[W]=x[I],delete x[I])};h=JSON.parse(JSON.stringify(h)),T(h.audio,"autoGainControl","googAutoGainControl"),T(h.audio,"noiseSuppression","googNoiseSuppression"),h.audio=c(h.audio)}if(h&&pe(h.video)==="object"){var b=h.video.facingMode;b=b&&(pe(b)==="object"?b:{ideal:b});var j=i.version<66;if(b&&(b.exact==="user"||b.exact==="environment"||b.ideal==="user"||b.ideal==="environment")&&!(a.mediaDevices.getSupportedConstraints&&a.mediaDevices.getSupportedConstraints().facingMode&&!j)){delete h.video.facingMode;var D;if(b.exact==="environment"||b.ideal==="environment"?D=["back","rear"]:(b.exact==="user"||b.ideal==="user")&&(D=["front"]),D)return a.mediaDevices.enumerateDevices().then(function(x){x=x.filter(function(W){return W.kind==="videoinput"});var I=x.find(function(W){return D.some(function(G){return W.label.toLowerCase().includes(G)})});return!I&&x.length&&D.includes("back")&&(I=x[x.length-1]),I&&(h.video.deviceId=b.exact?{exact:I.deviceId}:{ideal:I.deviceId}),h.video=c(h.video),gr("chrome: "+JSON.stringify(h)),w(h)})}h.video=c(h.video)}return gr("chrome: "+JSON.stringify(h)),w(h)},v=function(h){return i.version>=64?h:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[h.name]||h.name,message:h.message,constraint:h.constraint||h.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}},y=function(h,w,T){f(h,function(b){a.webkitGetUserMedia(b,w,function(j){T&&T(v(j))})})};if(a.getUserMedia=y.bind(a),a.mediaDevices.getUserMedia){var S=a.mediaDevices.getUserMedia.bind(a.mediaDevices);a.mediaDevices.getUserMedia=function(h){return f(h,function(w){return S(w).then(function(T){if(w.audio&&!T.getAudioTracks().length||w.video&&!T.getVideoTracks().length)throw T.getTracks().forEach(function(b){b.stop()}),new DOMException("","NotFoundError");return T},function(T){return Promise.reject(v(T))})})}}}}var Hr={};Object.defineProperty(Hr,"__esModule",{value:!0});var Zo=Hr.shimGetUserMedia=ri,ei=ti(X);function Nr(r){if(typeof WeakMap!="function")return null;var i=new WeakMap,a=new WeakMap;return(Nr=function(c){return c?a:i})(r)}function ti(r,i){if(!i&&r&&r.__esModule)return r;if(r===null||Pe(r)!=="object"&&typeof r!="function")return{default:r};var a=Nr(i);if(a&&a.has(r))return a.get(r);var c={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var v in r)if(v!=="default"&&Object.prototype.hasOwnProperty.call(r,v)){var y=f?Object.getOwnPropertyDescriptor(r,v):null;y&&(y.get||y.set)?Object.defineProperty(c,v,y):c[v]=r[v]}return c.default=r,a&&a.set(r,c),c}function Pe(r){"@babel/helpers - typeof";return Pe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Pe(r)}function ri(r,i){var a=r&&r.navigator,c=r&&r.MediaStreamTrack;if(a.getUserMedia=function(h,w,T){ei.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),a.mediaDevices.getUserMedia(h).then(w,T)},!(i.version>55&&"autoGainControl"in a.mediaDevices.getSupportedConstraints())){var f=function(h,w,T){w in h&&!(T in h)&&(h[T]=h[w],delete h[w])},v=a.mediaDevices.getUserMedia.bind(a.mediaDevices);if(a.mediaDevices.getUserMedia=function(h){return Pe(h)==="object"&&Pe(h.audio)==="object"&&(h=JSON.parse(JSON.stringify(h)),f(h.audio,"autoGainControl","mozAutoGainControl"),f(h.audio,"noiseSuppression","mozNoiseSuppression")),v(h)},c&&c.prototype.getSettings){var y=c.prototype.getSettings;c.prototype.getSettings=function(){var h=y.apply(this,arguments);return f(h,"mozAutoGainControl","autoGainControl"),f(h,"mozNoiseSuppression","noiseSuppression"),h}}if(c&&c.prototype.applyConstraints){var S=c.prototype.applyConstraints;c.prototype.applyConstraints=function(h){return this.kind==="audio"&&Pe(h)==="object"&&(h=JSON.parse(JSON.stringify(h)),f(h,"autoGainControl","mozAutoGainControl"),f(h,"noiseSuppression","mozNoiseSuppression")),S.apply(this,[h])}}}}var ae={};Object.defineProperty(ae,"__esModule",{value:!0});ae.shimAudioContext=fi;ae.shimCallbacksAPI=si;ae.shimConstraints=zr;ae.shimCreateOfferLegacy=di;var ni=ae.shimGetUserMedia=ci;ae.shimLocalStreamsAPI=oi;ae.shimRTCIceServerUrls=ui;ae.shimRemoteStreamsAPI=ii;ae.shimTrackEventTransceiver=li;var Vr=ai(X);function Br(r){if(typeof WeakMap!="function")return null;var i=new WeakMap,a=new WeakMap;return(Br=function(c){return c?a:i})(r)}function ai(r,i){if(!i&&r&&r.__esModule)return r;if(r===null||me(r)!=="object"&&typeof r!="function")return{default:r};var a=Br(i);if(a&&a.has(r))return a.get(r);var c={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var v in r)if(v!=="default"&&Object.prototype.hasOwnProperty.call(r,v)){var y=f?Object.getOwnPropertyDescriptor(r,v):null;y&&(y.get||y.set)?Object.defineProperty(c,v,y):c[v]=r[v]}return c.default=r,a&&a.set(r,c),c}function me(r){"@babel/helpers - typeof";return me=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},me(r)}function oi(r){if(!(me(r)!=="object"||!r.RTCPeerConnection)){if("getLocalStreams"in r.RTCPeerConnection.prototype||(r.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in r.RTCPeerConnection.prototype)){var i=r.RTCPeerConnection.prototype.addTrack;r.RTCPeerConnection.prototype.addStream=function(a){var c=this;this._localStreams||(this._localStreams=[]),this._localStreams.includes(a)||this._localStreams.push(a),a.getAudioTracks().forEach(function(f){return i.call(c,f,a)}),a.getVideoTracks().forEach(function(f){return i.call(c,f,a)})},r.RTCPeerConnection.prototype.addTrack=function(a){for(var c=this,f=arguments.length,v=new Array(f>1?f-1:0),y=1;y<f;y++)v[y-1]=arguments[y];return v&&v.forEach(function(S){c._localStreams?c._localStreams.includes(S)||c._localStreams.push(S):c._localStreams=[S]}),i.apply(this,arguments)}}"removeStream"in r.RTCPeerConnection.prototype||(r.RTCPeerConnection.prototype.removeStream=function(a){var c=this;this._localStreams||(this._localStreams=[]);var f=this._localStreams.indexOf(a);if(f!==-1){this._localStreams.splice(f,1);var v=a.getTracks();this.getSenders().forEach(function(y){v.includes(y.track)&&c.removeTrack(y)})}})}}function ii(r){if(!(me(r)!=="object"||!r.RTCPeerConnection)&&("getRemoteStreams"in r.RTCPeerConnection.prototype||(r.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in r.RTCPeerConnection.prototype))){Object.defineProperty(r.RTCPeerConnection.prototype,"onaddstream",{get:function(){return this._onaddstream},set:function(a){var c=this;this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=a),this.addEventListener("track",this._onaddstreampoly=function(f){f.streams.forEach(function(v){if(c._remoteStreams||(c._remoteStreams=[]),!c._remoteStreams.includes(v)){c._remoteStreams.push(v);var y=new Event("addstream");y.stream=v,c.dispatchEvent(y)}})})}});var i=r.RTCPeerConnection.prototype.setRemoteDescription;r.RTCPeerConnection.prototype.setRemoteDescription=function(){var a=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(c){c.streams.forEach(function(f){if(a._remoteStreams||(a._remoteStreams=[]),!(a._remoteStreams.indexOf(f)>=0)){a._remoteStreams.push(f);var v=new Event("addstream");v.stream=f,a.dispatchEvent(v)}})}),i.apply(a,arguments)}}}function si(r){if(!(me(r)!=="object"||!r.RTCPeerConnection)){var i=r.RTCPeerConnection.prototype,a=i.createOffer,c=i.createAnswer,f=i.setLocalDescription,v=i.setRemoteDescription,y=i.addIceCandidate;i.createOffer=function(h,w){var T=arguments.length>=2?arguments[2]:arguments[0],b=a.apply(this,[T]);return w?(b.then(h,w),Promise.resolve()):b},i.createAnswer=function(h,w){var T=arguments.length>=2?arguments[2]:arguments[0],b=c.apply(this,[T]);return w?(b.then(h,w),Promise.resolve()):b};var S=function(h,w,T){var b=f.apply(this,[h]);return T?(b.then(w,T),Promise.resolve()):b};i.setLocalDescription=S,S=function(h,w,T){var b=v.apply(this,[h]);return T?(b.then(w,T),Promise.resolve()):b},i.setRemoteDescription=S,S=function(h,w,T){var b=y.apply(this,[h]);return T?(b.then(w,T),Promise.resolve()):b},i.addIceCandidate=S}}function ci(r){var i=r&&r.navigator;if(i.mediaDevices&&i.mediaDevices.getUserMedia){var a=i.mediaDevices,c=a.getUserMedia.bind(a);i.mediaDevices.getUserMedia=function(f){return c(zr(f))}}!i.getUserMedia&&i.mediaDevices&&i.mediaDevices.getUserMedia&&(i.getUserMedia=(function(f,v,y){i.mediaDevices.getUserMedia(f).then(v,y)}).bind(i))}function zr(r){return r&&r.video!==void 0?Object.assign({},r,{video:Vr.compactObject(r.video)}):r}function ui(r){if(r.RTCPeerConnection){var i=r.RTCPeerConnection;r.RTCPeerConnection=function(a,c){if(a&&a.iceServers){for(var f=[],v=0;v<a.iceServers.length;v++){var y=a.iceServers[v];y.urls===void 0&&y.url?(Vr.deprecated("RTCIceServer.url","RTCIceServer.urls"),y=JSON.parse(JSON.stringify(y)),y.urls=y.url,delete y.url,f.push(y)):f.push(a.iceServers[v])}a.iceServers=f}return new i(a,c)},r.RTCPeerConnection.prototype=i.prototype,"generateCertificate"in i&&Object.defineProperty(r.RTCPeerConnection,"generateCertificate",{get:function(){return i.generateCertificate}})}}function li(r){me(r)==="object"&&r.RTCTrackEvent&&"receiver"in r.RTCTrackEvent.prototype&&!("transceiver"in r.RTCTrackEvent.prototype)&&Object.defineProperty(r.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})}function di(r){var i=r.RTCPeerConnection.prototype.createOffer;r.RTCPeerConnection.prototype.createOffer=function(a){if(a){typeof a.offerToReceiveAudio<"u"&&(a.offerToReceiveAudio=!!a.offerToReceiveAudio);var c=this.getTransceivers().find(function(v){return v.receiver.track.kind==="audio"});a.offerToReceiveAudio===!1&&c?c.direction==="sendrecv"?c.setDirection?c.setDirection("sendonly"):c.direction="sendonly":c.direction==="recvonly"&&(c.setDirection?c.setDirection("inactive"):c.direction="inactive"):a.offerToReceiveAudio===!0&&!c&&this.addTransceiver("audio",{direction:"recvonly"}),typeof a.offerToReceiveVideo<"u"&&(a.offerToReceiveVideo=!!a.offerToReceiveVideo);var f=this.getTransceivers().find(function(v){return v.receiver.track.kind==="video"});a.offerToReceiveVideo===!1&&f?f.direction==="sendrecv"?f.setDirection?f.setDirection("sendonly"):f.direction="sendonly":f.direction==="recvonly"&&(f.setDirection?f.setDirection("inactive"):f.direction="inactive"):a.offerToReceiveVideo===!0&&!f&&this.addTransceiver("video",{direction:"recvonly"})}return i.apply(this,arguments)}}function fi(r){me(r)!=="object"||r.AudioContext||(r.AudioContext=r.webkitAudioContext)}const hi=r=>{let i=!1,a;return(...c)=>(i||(a=r(c),i=!0),a)};function ue(r,i){if(r===!1)throw new Error(i??"assertion failure")}const pi=hi(()=>{const r=Wo(window);switch(r.browser){case"chrome":qo(window,r);break;case"firefox":Zo(window,r);break;case"safari":ni(window,r);break;default:throw new kr}});let _e=Promise.resolve({type:"stop",data:{}});async function wr(r,i,a){var c,f,v;if(window.isSecureContext!==!0)throw new Ro;if(((c=navigator==null?void 0:navigator.mediaDevices)==null?void 0:c.getUserMedia)===void 0)throw new kr;pi();const y=await navigator.mediaDevices.getUserMedia({audio:!1,video:i});r.srcObject!==void 0?r.srcObject=y:r.mozSrcObject!==void 0?r.mozSrcObject=y:window.URL.createObjectURL?r.src=window.URL.createObjectURL(y):window.webkitURL?r.src=window.webkitURL.createObjectURL(y):r.src=y.id,r.play(),await Promise.race([Rr(r,"loadeddata"),mr(3e3).then(()=>{throw new ko})]),await mr(500);const[S]=y.getVideoTracks(),h=(v=(f=S==null?void 0:S.getCapabilities)==null?void 0:f.call(S))!=null?v:{};let w=!1;return a&&h.torch&&(await S.applyConstraints({advanced:[{torch:!0}]}),w=!0),{type:"start",data:{videoEl:r,stream:y,capabilities:h,constraints:i,isTorchOn:w}}}async function vi(r,{constraints:i,torch:a,restart:c=!1}){_e=_e.then(v=>{if(v.type==="start"){const{data:{videoEl:y,stream:S,constraints:h,isTorchOn:w}}=v;return!c&&r===y&&i===h&&a===w?v:Gr(y,S,w).then(()=>wr(r,i,a))}return wr(r,i,a)});const f=await _e;if(f.type==="stop")throw new Error("Something went wrong with the camera task queue (start task).");return f.data.capabilities}async function Gr(r,i,a){r.src="",r.srcObject=null,r.load(),await Rr(r,"error");for(const c of i.getTracks())a!=null||await c.applyConstraints({advanced:[{torch:!1}]}),i.removeTrack(c),c.stop();return{type:"stop",data:{}}}async function rt(){if(_e=_e.then(r=>{if(r.type==="stop")return r;const{data:{videoEl:i,stream:a,isTorchOn:c}}=r;return Gr(i,a,c)}),(await _e).type==="start")throw new Error("Something went wrong with the camera task queue (stop task).")}const mi=R.defineComponent({__name:"QrcodeStream",props:{constraints:{type:Object,default(){return{facingMode:"environment"}}},formats:{type:Array,default:()=>["qr_code"]},paused:{type:Boolean,default:!1},torch:{type:Boolean,default:!1},track:{type:Function}},emits:["detect","camera-on","camera-off","error"],setup(r,{emit:i}){const a=r,c=i,f=R.ref(a.constraints),v=R.ref(a.formats);R.watch(()=>a.constraints,(k,O)=>{JSON.stringify(k)!==JSON.stringify(O)&&(f.value=k)},{deep:!0}),R.watch(()=>a.formats,(k,O)=>{JSON.stringify(k)!==JSON.stringify(O)&&(v.value=k)},{deep:!0});const y=R.ref(),S=R.ref(),h=R.ref(),w=R.ref(!1),T=R.ref(!1);R.onMounted(()=>{T.value=!0}),R.onUnmounted(()=>{rt()});const b=R.computed(()=>({torch:a.torch,constraints:f.value,shouldStream:T.value&&!a.paused}));R.watch(b,async k=>{const O=h.value;ue(O!==void 0,"cameraSettings watcher should never be triggered when component is not mounted. Thus video element should always be defined.");const M=y.value;ue(M!==void 0,"cameraSettings watcher should never be triggered when component is not mounted. Thus canvas should always be defined.");const de=M.getContext("2d");if(ue(de!==null,"if cavnas is defined, canvas 2d context should also be non-null"),k.shouldStream){rt(),w.value=!1;try{const oe=await vi(O,k);T.value?(w.value=!0,c("camera-on",oe)):await rt()}catch(oe){c("error",oe)}}else M.width=O.videoWidth,M.height=O.videoHeight,de.drawImage(O,0,0,O.videoWidth,O.videoHeight),rt(),w.value=!1,c("camera-off")},{deep:!0}),R.watch(v,k=>{T.value&&Fo(k)});const j=R.computed(()=>b.value.shouldStream&&w.value);R.watch(j,k=>{if(k){ue(y.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus pause frame canvas is defined"),D(y.value),ue(S.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus tracking canvas is defined"),D(S.value);const O=()=>a.track===void 0?500:40;ue(h.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus video element is defined"),Io(h.value,{detectHandler:M=>c("detect",M),formats:v.value,locateHandler:x,minDelay:O()})}});const D=k=>{const O=k.getContext("2d");ue(O!==null,"canvas 2d context should always be non-null"),O.clearRect(0,0,k.width,k.height)},x=k=>{const O=S.value;ue(O!==void 0,"onLocate handler should only be called when component is mounted. Thus tracking canvas is always defined.");const M=h.value;if(ue(M!==void 0,"onLocate handler should only be called when component is mounted. Thus video element is always defined."),k.length===0||a.track===void 0)D(O);else{const de=M.offsetWidth,oe=M.offsetHeight,be=M.videoWidth,Ce=M.videoHeight,Oe=Math.max(de/be,oe/Ce),Me=be*Oe,Ue=Ce*Oe,it=Me/be,st=Ue/Ce,ct=(de-Me)/2,ut=(oe-Ue)/2,Ae=({x:fe,y:K})=>({x:Math.floor(fe*it),y:Math.floor(K*st)}),te=({x:fe,y:K})=>({x:Math.floor(fe+ct),y:Math.floor(K+ut)}),ye=k.map(fe=>{const{boundingBox:K,cornerPoints:dt}=fe,{x:Le,y:he}=te(Ae({x:K.x,y:K.y})),{x:He,y:ft}=Ae({x:K.width,y:K.height});return{...fe,cornerPoints:dt.map(Ne=>te(Ae(Ne))),boundingBox:DOMRectReadOnly.fromRect({x:Le,y:he,width:He,height:ft})}});O.width=M.offsetWidth,O.height=M.offsetHeight;const lt=O.getContext("2d");a.track(ye,lt)}},I={width:"100%",height:"100%",position:"relative","z-index":"0"},W={width:"100%",height:"100%",position:"absolute",top:"0",left:"0"},G={width:"100%",height:"100%","object-fit":"cover"},le=R.computed(()=>j.value?G:{...G,visibility:"hidden",position:"absolute"});return(k,O)=>(R.openBlock(),R.createElementBlock("div",{style:I},[R.createElementVNode("video",{ref_key:"videoRef",ref:h,style:R.normalizeStyle(le.value),autoplay:"",muted:"",playsinline:""},null,4),R.withDirectives(R.createElementVNode("canvas",{id:"qrcode-stream-pause-frame",ref_key:"pauseFrameRef",ref:y,style:G},null,512),[[R.vShow,!j.value]]),R.createElementVNode("canvas",{id:"qrcode-stream-tracking-layer",ref_key:"trackingLayerRef",ref:S,style:W},null,512),R.createElementVNode("div",{style:W},[R.renderSlot(k.$slots,"default")])]))}});exports.QrcodeStream=mi;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("vue");var br=(r,i,a)=>{if(!i.has(r))throw TypeError("Cannot "+a)},dr=(r,i,a)=>(br(r,i,"read from private field"),a?a.call(r):i.get(r)),ao=(r,i,a)=>{if(i.has(r))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(r):i.set(r,a)},oo=(r,i,a,c)=>(br(r,i,"write to private field"),i.set(r,a),a);const Cr=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["data_matrix","DataMatrix"],["dx_film_edge","DXFilmEdge"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["maxi_code","MaxiCode"],["micro_qr_code","MicroQRCode"],["pdf417","PDF417"],["qr_code","QRCode"],["rm_qr_code","rMQRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"],["linear_codes","Linear-Codes"],["matrix_codes","Matrix-Codes"]],io=[...Cr,["unknown"]].map(r=>r[0]),nt=new Map(Cr);function so(r){for(const[i,a]of nt)if(r===a)return i;return"unknown"}function co(r){if(Tr(r))return{width:r.naturalWidth,height:r.naturalHeight};if($r(r))return{width:r.width.baseVal.value,height:r.height.baseVal.value};if(Sr(r))return{width:r.videoWidth,height:r.videoHeight};if(_r(r))return{width:r.width,height:r.height};if(Or(r))return{width:r.displayWidth,height:r.displayHeight};if(Pr(r))return{width:r.width,height:r.height};if(Er(r))return{width:r.width,height:r.height};throw new TypeError("The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.")}function Tr(r){try{return r instanceof HTMLImageElement}catch{return!1}}function $r(r){try{return r instanceof SVGImageElement}catch{return!1}}function Sr(r){try{return r instanceof HTMLVideoElement}catch{return!1}}function Pr(r){try{return r instanceof HTMLCanvasElement}catch{return!1}}function _r(r){try{return r instanceof ImageBitmap}catch{return!1}}function Er(r){try{return r instanceof OffscreenCanvas}catch{return!1}}function Or(r){try{return r instanceof VideoFrame}catch{return!1}}function Mr(r){try{return r instanceof Blob}catch{return!1}}function uo(r){try{return r instanceof ImageData}catch{return!1}}function lo(r,i){try{const a=new OffscreenCanvas(r,i);if(a.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return a;throw void 0}catch{const c=document.createElement("canvas");return c.width=r,c.height=i,c}}async function Ar(r){if(Tr(r)&&!await vo(r))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if($r(r)&&!await mo(r))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(Or(r)&&yo(r))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(Sr(r)&&(r.readyState===0||r.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(_r(r)&&wo(r))throw new DOMException("The image source is detached.","InvalidStateError");const{width:i,height:a}=co(r);if(i===0||a===0)return null;const c=lo(i,a).getContext("2d");c.drawImage(r,0,0);try{return c.getImageData(0,0,i,a)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function fo(r){let i;try{if(globalThis.createImageBitmap)i=await createImageBitmap(r);else if(globalThis.Image){i=new Image;let a="";try{a=URL.createObjectURL(r),i.src=a,await i.decode()}finally{URL.revokeObjectURL(a)}}else return r}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await Ar(i)}function ho(r){const{width:i,height:a}=r;if(i===0||a===0)return null;const c=r.getContext("2d");try{return c.getImageData(0,0,i,a)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function po(r){if(Mr(r))return await fo(r);if(uo(r)){if(go(r))throw new DOMException("The image data has been detached.","InvalidStateError");return r}return Pr(r)||Er(r)?ho(r):await Ar(r)}async function vo(r){try{return await r.decode(),!0}catch{return!1}}async function mo(r){var i;try{return await((i=r.decode)==null?void 0:i.call(r)),!0}catch{return!1}}function yo(r){return r.format===null}function go(r){return r.data.buffer.byteLength===0}function wo(r){return r.width===0&&r.height===0}function fr(r,i){return r instanceof DOMException?new DOMException(`${i}: ${r.message}`,r.name):r instanceof Error?new r.constructor(`${i}: ${r.message}`):new Error(`${i}: ${r}`)}const hr=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","DXFilmEdge","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","rMQRCode","UPC-A","UPC-E"];function bo(r){return r.join("|")}function Co(r){const i=pr(r);let a=0,c=hr.length-1;for(;a<=c;){const f=Math.floor((a+c)/2),v=hr[f],y=pr(v);if(y===i)return v;y<i?a=f+1:c=f-1}return"None"}function pr(r){return r.toLowerCase().replace(/_-\[\]/g,"")}function To(r,i){return r.Binarizer[i]}function $o(r,i){return r.CharacterSet[i]}const So=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function Po(r){return So[r.value]}function _o(r,i){return r.EanAddOnSymbol[i]}function Eo(r,i){return r.TextMode[i]}const Ee={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!1,validateCode39CheckSum:!1,validateITFCheckSum:!1,returnCodabarStartEnd:!1,returnErrors:!1,eanAddOnSymbol:"Read",textMode:"Plain",characterSet:"Unknown"};function xr(r,i){return{...i,formats:bo(i.formats),binarizer:To(r,i.binarizer),eanAddOnSymbol:_o(r,i.eanAddOnSymbol),textMode:Eo(r,i.textMode),characterSet:$o(r,i.characterSet)}}function jr(r){return{...r,format:Co(r.format),eccLevel:r.eccLevel,contentType:Po(r.contentType)}}const Oo={locateFile:(r,i)=>{const a=r.match(/_(.+?)\.wasm$/);return a?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.1.3/dist/${a[1]}/${r}`:i+r}};let vr=new WeakMap;function Dt(r,i){var a;const c=vr.get(r);if(c!=null&&c.modulePromise&&i===void 0)return c.modulePromise;const f=(a=c==null?void 0:c.moduleOverrides)!=null?a:Oo,v=r({...f});return vr.set(r,{moduleOverrides:f,modulePromise:v}),v}async function Mo(r,i,a=Ee){const c={...Ee,...a},f=await Dt(r),{size:v}=i,y=new Uint8Array(await i.arrayBuffer()),S=f._malloc(v);f.HEAPU8.set(y,S);const h=f.readBarcodesFromImage(S,v,xr(f,c));f._free(S);const w=[];for(let T=0;T<h.size();++T)w.push(jr(h.get(T)));return w}async function Ao(r,i,a=Ee){const c={...Ee,...a},f=await Dt(r),{data:v,width:y,height:S,data:{byteLength:h}}=i,w=f._malloc(h);f.HEAPU8.set(v,w);const T=f.readBarcodesFromPixmap(w,y,S,xr(f,c));f._free(w);const b=[];for(let j=0;j<T.size();++j)b.push(jr(T.get(j)));return b}({...Ee,formats:[...Ee.formats]});var Rt=(()=>{var r=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(i={}){var a=i,c,f;a.ready=new Promise((e,t)=>{c=e,f=t});var v=Object.assign({},a),y="./this.program",S=typeof window=="object",h=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var w="";function T(e){return a.locateFile?a.locateFile(e,w):w+e}var b;(S||h)&&(h?w=self.location.href:typeof document<"u"&&document.currentScript&&(w=document.currentScript.src),r&&(w=r),w.indexOf("blob:")!==0?w=w.substr(0,w.replace(/[?#].*/,"").lastIndexOf("/")+1):w="",h&&(b=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)})),a.print||console.log.bind(console);var j=a.printErr||console.error.bind(console);Object.assign(a,v),v=null,a.arguments&&a.arguments,a.thisProgram&&(y=a.thisProgram),a.quit&&a.quit;var D;a.wasmBinary&&(D=a.wasmBinary),typeof WebAssembly!="object"&&K("no native wasm support detected");var x,I=!1,W,G,le,k,O,M,de,oe;function be(){var e=x.buffer;a.HEAP8=W=new Int8Array(e),a.HEAP16=le=new Int16Array(e),a.HEAPU8=G=new Uint8Array(e),a.HEAPU16=k=new Uint16Array(e),a.HEAP32=O=new Int32Array(e),a.HEAPU32=M=new Uint32Array(e),a.HEAPF32=de=new Float32Array(e),a.HEAPF64=oe=new Float64Array(e)}var Ce=[],Oe=[],Me=[];function Ue(){if(a.preRun)for(typeof a.preRun=="function"&&(a.preRun=[a.preRun]);a.preRun.length;)ct(a.preRun.shift());ht(Ce)}function it(){ht(Oe)}function st(){if(a.postRun)for(typeof a.postRun=="function"&&(a.postRun=[a.postRun]);a.postRun.length;)Ae(a.postRun.shift());ht(Me)}function ct(e){Ce.unshift(e)}function ut(e){Oe.unshift(e)}function Ae(e){Me.unshift(e)}var te=0,ye=null;function lt(e){var t;te++,(t=a.monitorRunDependencies)===null||t===void 0||t.call(a,te)}function fe(e){var t;if(te--,(t=a.monitorRunDependencies)===null||t===void 0||t.call(a,te),te==0&&ye){var n=ye;ye=null,n()}}function K(e){var t;(t=a.onAbort)===null||t===void 0||t.call(a,e),e="Aborted("+e+")",j(e),I=!0,e+=". Build with -sASSERTIONS for more info.";var n=new WebAssembly.RuntimeError(e);throw f(n),n}var dt="data:application/octet-stream;base64,",Le=e=>e.startsWith(dt),he;he="zxing_reader.wasm",Le(he)||(he=T(he));function He(e){if(e==he&&D)return new Uint8Array(D);if(b)return b(e);throw"both async and sync fetching of the wasm failed"}function ft(e){return!D&&(S||h)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()}).catch(()=>He(e)):Promise.resolve().then(()=>He(e))}function Ne(e,t,n){return ft(e).then(o=>WebAssembly.instantiate(o,t)).then(o=>o).then(n,o=>{j(`failed to asynchronously prepare wasm: ${o}`),K(o)})}function Jr(e,t,n,o){return!e&&typeof WebAssembly.instantiateStreaming=="function"&&!Le(t)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(s=>{var u=WebAssembly.instantiateStreaming(s,n);return u.then(o,function(l){return j(`wasm streaming compile failed: ${l}`),j("falling back to ArrayBuffer instantiation"),Ne(t,n,o)})}):Ne(t,n,o)}function Yr(){var e={a:Fa};function t(o,s){return J=o.exports,x=J.ia,be(),Bt=J.ma,ut(J.ja),fe(),J}lt();function n(o){t(o.instance)}if(a.instantiateWasm)try{return a.instantiateWasm(e,t)}catch(o){j(`Module.instantiateWasm callback failed with error: ${o}`),f(o)}return Jr(D,he,e,n).catch(f),{}}var ht=e=>{for(;e.length>0;)e.shift()(a)};a.noExitRuntime;var Ve=[],Be=0,qr=e=>{var t=new pt(e);return t.get_caught()||(t.set_caught(!0),Be--),t.set_rethrown(!1),Ve.push(t),ar(t.excPtr),t.get_exception_ptr()},ie=0,Qr=()=>{U(0,0);var e=Ve.pop();nr(e.excPtr),ie=0};function pt(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(t){M[this.ptr+4>>2]=t},this.get_type=function(){return M[this.ptr+4>>2]},this.set_destructor=function(t){M[this.ptr+8>>2]=t},this.get_destructor=function(){return M[this.ptr+8>>2]},this.set_caught=function(t){t=t?1:0,W[this.ptr+12>>0]=t},this.get_caught=function(){return W[this.ptr+12>>0]!=0},this.set_rethrown=function(t){t=t?1:0,W[this.ptr+13>>0]=t},this.get_rethrown=function(){return W[this.ptr+13>>0]!=0},this.init=function(t,n){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(n)},this.set_adjusted_ptr=function(t){M[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return M[this.ptr+16>>2]},this.get_exception_ptr=function(){var t=ir(this.get_type());if(t)return M[this.excPtr>>2];var n=this.get_adjusted_ptr();return n!==0?n:this.excPtr}}var Xr=e=>{throw ie||(ie=e),ie},vt=e=>{var t=ie;if(!t)return Ie(0),0;var n=new pt(t);n.set_adjusted_ptr(t);var o=n.get_type();if(!o)return Ie(0),t;for(var s in e){var u=e[s];if(u===0||u===o)break;var l=n.ptr+16;if(or(u,o,l))return Ie(u),t}return Ie(o),t},Kr=()=>vt([]),Zr=e=>vt([e]),en=(e,t)=>vt([e,t]),tn=()=>{var e=Ve.pop();e||K("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(Ve.push(e),e.set_rethrown(!0),e.set_caught(!1),Be++),ie=t,ie},rn=(e,t,n)=>{var o=new pt(e);throw o.init(t,n),ie=e,Be++,ie},nn=()=>Be,ze={},mt=e=>{for(;e.length;){var t=e.pop(),n=e.pop();n(t)}};function yt(e){return this.fromWireType(O[e>>2])}var Te={},ge={},Ge={},kt,Je=e=>{throw new kt(e)},we=(e,t,n)=>{e.forEach(function(d){Ge[d]=t});function o(d){var p=n(d);p.length!==e.length&&Je("Mismatched type converter count");for(var g=0;g<e.length;++g)re(e[g],p[g])}var s=new Array(t.length),u=[],l=0;t.forEach((d,p)=>{ge.hasOwnProperty(d)?s[p]=ge[d]:(u.push(d),Te.hasOwnProperty(d)||(Te[d]=[]),Te[d].push(()=>{s[p]=ge[d],++l,l===u.length&&o(s)}))}),u.length===0&&o(s)},an=e=>{var t=ze[e];delete ze[e];var n=t.rawConstructor,o=t.rawDestructor,s=t.fields,u=s.map(l=>l.getterReturnType).concat(s.map(l=>l.setterArgumentType));we([e],u,l=>{var d={};return s.forEach((p,g)=>{var C=p.fieldName,P=l[g],_=p.getter,E=p.getterContext,L=l[g+s.length],B=p.setter,F=p.setterContext;d[C]={read:Q=>P.fromWireType(_(E,Q)),write:(Q,m)=>{var $=[];B(F,Q,L.toWireType($,m)),mt($)}}}),[{name:t.name,fromWireType:p=>{var g={};for(var C in d)g[C]=d[C].read(p);return o(p),g},toWireType:(p,g)=>{for(var C in d)if(!(C in g))throw new TypeError(`Missing field: "${C}"`);var P=n();for(C in d)d[C].write(P,g[C]);return p!==null&&p.push(o,P),P},argPackAdvance:ne,readValueFromPointer:yt,destructorFunction:o}]})},on=(e,t,n,o,s)=>{},sn=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Ft=e},Ft,q=e=>{for(var t="",n=e;G[n];)t+=Ft[G[n++]];return t},$e,A=e=>{throw new $e(e)};function cn(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var o=t.name;if(e||A(`type "${o}" must have a positive integer typeid pointer`),ge.hasOwnProperty(e)){if(n.ignoreDuplicateRegistrations)return;A(`Cannot register type '${o}' twice`)}if(ge[e]=t,delete Ge[e],Te.hasOwnProperty(e)){var s=Te[e];delete Te[e],s.forEach(u=>u())}}function re(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return cn(e,t,n)}var ne=8,un=(e,t,n,o)=>{t=q(t),re(e,{name:t,fromWireType:function(s){return!!s},toWireType:function(s,u){return u?n:o},argPackAdvance:ne,readValueFromPointer:function(s){return this.fromWireType(G[s])},destructorFunction:null})},ln=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),gt=e=>{function t(n){return n.$$.ptrType.registeredClass.name}A(t(e)+" instance already deleted")},wt=!1,It=e=>{},dn=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},Wt=e=>{e.count.value-=1;var t=e.count.value===0;t&&dn(e)},Ut=(e,t,n)=>{if(t===n)return e;if(n.baseClass===void 0)return null;var o=Ut(e,t,n.baseClass);return o===null?null:n.downcast(o)},Lt={},fn=()=>Object.keys(De).length,hn=()=>{var e=[];for(var t in De)De.hasOwnProperty(t)&&e.push(De[t]);return e},xe=[],bt=()=>{for(;xe.length;){var e=xe.pop();e.$$.deleteScheduled=!1,e.delete()}},je,pn=e=>{je=e,xe.length&&je&&je(bt)},vn=()=>{a.getInheritedInstanceCount=fn,a.getLiveInheritedInstances=hn,a.flushPendingDeletes=bt,a.setDelayFunction=pn},De={},mn=(e,t)=>{for(t===void 0&&A("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},yn=(e,t)=>(t=mn(e,t),De[t]),Ye=(e,t)=>{(!t.ptrType||!t.ptr)&&Je("makeClassHandle requires ptr and ptrType");var n=!!t.smartPtrType,o=!!t.smartPtr;return n!==o&&Je("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Re(Object.create(e,{$$:{value:t,writable:!0}}))};function gn(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var n=yn(this.registeredClass,t);if(n!==void 0){if(n.$$.count.value===0)return n.$$.ptr=t,n.$$.smartPtr=e,n.clone();var o=n.clone();return this.destructor(e),o}function s(){return this.isSmartPointer?Ye(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):Ye(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var u=this.registeredClass.getActualType(t),l=Lt[u];if(!l)return s.call(this);var d;this.isConst?d=l.constPointerType:d=l.pointerType;var p=Ut(t,this.registeredClass,d.registeredClass);return p===null?s.call(this):this.isSmartPointer?Ye(d.registeredClass.instancePrototype,{ptrType:d,ptr:p,smartPtrType:this,smartPtr:e}):Ye(d.registeredClass.instancePrototype,{ptrType:d,ptr:p})}var Re=e=>typeof FinalizationRegistry>"u"?(Re=t=>t,e):(wt=new FinalizationRegistry(t=>{Wt(t.$$)}),Re=t=>{var n=t.$$,o=!!n.smartPtr;if(o){var s={$$:n};wt.register(t,s,t)}return t},It=t=>wt.unregister(t),Re(e)),wn=()=>{Object.assign(qe.prototype,{isAliasOf(e){if(!(this instanceof qe)||!(e instanceof qe))return!1;var t=this.$$.ptrType.registeredClass,n=this.$$.ptr;e.$$=e.$$;for(var o=e.$$.ptrType.registeredClass,s=e.$$.ptr;t.baseClass;)n=t.upcast(n),t=t.baseClass;for(;o.baseClass;)s=o.upcast(s),o=o.baseClass;return t===o&&n===s},clone(){if(this.$$.ptr||gt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=Re(Object.create(Object.getPrototypeOf(this),{$$:{value:ln(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||gt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&A("Object already scheduled for deletion"),It(this),Wt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||gt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&A("Object already scheduled for deletion"),xe.push(this),xe.length===1&&je&&je(bt),this.$$.deleteScheduled=!0,this}})};function qe(){}var ke=(e,t)=>Object.defineProperty(t,"name",{value:e}),Ht=(e,t,n)=>{if(e[t].overloadTable===void 0){var o=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||A(`Function '${n}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[o.argCount]=o}},Ct=(e,t,n)=>{a.hasOwnProperty(e)?((n===void 0||a[e].overloadTable!==void 0&&a[e].overloadTable[n]!==void 0)&&A(`Cannot register public name '${e}' twice`),Ht(a,e,e),a.hasOwnProperty(n)&&A(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`),a[e].overloadTable[n]=t):(a[e]=t,n!==void 0&&(a[e].numArguments=n))},bn=48,Cn=57,Tn=e=>{if(e===void 0)return"_unknown";e=e.replace(/[^a-zA-Z0-9_]/g,"$");var t=e.charCodeAt(0);return t>=bn&&t<=Cn?`_${e}`:e};function $n(e,t,n,o,s,u,l,d){this.name=e,this.constructor=t,this.instancePrototype=n,this.rawDestructor=o,this.baseClass=s,this.getActualType=u,this.upcast=l,this.downcast=d,this.pureVirtualFunctions=[]}var Tt=(e,t,n)=>{for(;t!==n;)t.upcast||A(`Expected null or instance of ${n.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function Sn(e,t){if(t===null)return this.isReference&&A(`null is not a valid ${this.name}`),0;t.$$||A(`Cannot pass "${Et(t)}" as a ${this.name}`),t.$$.ptr||A(`Cannot pass deleted object as a pointer of type ${this.name}`);var n=t.$$.ptrType.registeredClass,o=Tt(t.$$.ptr,n,this.registeredClass);return o}function Pn(e,t){var n;if(t===null)return this.isReference&&A(`null is not a valid ${this.name}`),this.isSmartPointer?(n=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,n),n):0;(!t||!t.$$)&&A(`Cannot pass "${Et(t)}" as a ${this.name}`),t.$$.ptr||A(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&A(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var o=t.$$.ptrType.registeredClass;if(n=Tt(t.$$.ptr,o,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&A("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?n=t.$$.smartPtr:A(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:n=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)n=t.$$.smartPtr;else{var s=t.clone();n=this.rawShare(n,se.toHandle(()=>s.delete())),e!==null&&e.push(this.rawDestructor,n)}break;default:A("Unsupporting sharing policy")}return n}function _n(e,t){if(t===null)return this.isReference&&A(`null is not a valid ${this.name}`),0;t.$$||A(`Cannot pass "${Et(t)}" as a ${this.name}`),t.$$.ptr||A(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&A(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass,o=Tt(t.$$.ptr,n,this.registeredClass);return o}function Nt(e){return this.fromWireType(M[e>>2])}var En=()=>{Object.assign(Qe.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){var t;(t=this.rawDestructor)===null||t===void 0||t.call(this,e)},argPackAdvance:ne,readValueFromPointer:Nt,deleteObject(e){e!==null&&e.delete()},fromWireType:gn})};function Qe(e,t,n,o,s,u,l,d,p,g,C){this.name=e,this.registeredClass=t,this.isReference=n,this.isConst=o,this.isSmartPointer=s,this.pointeeType=u,this.sharingPolicy=l,this.rawGetPointee=d,this.rawConstructor=p,this.rawShare=g,this.rawDestructor=C,!s&&t.baseClass===void 0?o?(this.toWireType=Sn,this.destructorFunction=null):(this.toWireType=_n,this.destructorFunction=null):this.toWireType=Pn}var Vt=(e,t,n)=>{a.hasOwnProperty(e)||Je("Replacing nonexistant public symbol"),a[e].overloadTable!==void 0&&n!==void 0?a[e].overloadTable[n]=t:(a[e]=t,a[e].argCount=n)},On=(e,t,n)=>{var o=a["dynCall_"+e];return n&&n.length?o.apply(null,[t].concat(n)):o.call(null,t)},Xe=[],Bt,H=e=>{var t=Xe[e];return t||(e>=Xe.length&&(Xe.length=e+1),Xe[e]=t=Bt.get(e)),t},Mn=(e,t,n)=>{if(e.includes("j"))return On(e,t,n);var o=H(t).apply(null,n);return o},An=(e,t)=>{var n=[];return function(){return n.length=0,Object.assign(n,arguments),Mn(e,t,n)}},ee=(e,t)=>{e=q(e);function n(){return e.includes("j")?An(e,t):H(t)}var o=n();return typeof o!="function"&&A(`unknown function pointer with signature ${e}: ${t}`),o},xn=(e,t)=>{var n=ke(t,function(o){this.name=t,this.message=o;var s=new Error(o).stack;s!==void 0&&(this.stack=this.toString()+`
2
+ `+s.replace(/^Error(:[^\n]*)?\n/,""))});return n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},n},zt,Gt=e=>{var t=rr(e),n=q(t);return ce(t),n},Ke=(e,t)=>{var n=[],o={};function s(u){if(!o[u]&&!ge[u]){if(Ge[u]){Ge[u].forEach(s);return}n.push(u),o[u]=!0}}throw t.forEach(s),new zt(`${e}: `+n.map(Gt).join([", "]))},jn=(e,t,n,o,s,u,l,d,p,g,C,P,_)=>{C=q(C),u=ee(s,u),d&&(d=ee(l,d)),g&&(g=ee(p,g)),_=ee(P,_);var E=Tn(C);Ct(E,function(){Ke(`Cannot construct ${C} due to unbound types`,[o])}),we([e,t,n],o?[o]:[],function(L){L=L[0];var B,F;o?(B=L.registeredClass,F=B.instancePrototype):F=qe.prototype;var Q=ke(C,function(){if(Object.getPrototypeOf(this)!==m)throw new $e("Use 'new' to construct "+C);if($.constructor_body===void 0)throw new $e(C+" has no accessible constructor");var lr=$.constructor_body[arguments.length];if(lr===void 0)throw new $e(`Tried to invoke ctor of ${C} with invalid number of parameters (${arguments.length}) - expected (${Object.keys($.constructor_body).toString()}) parameters instead!`);return lr.apply(this,arguments)}),m=Object.create(F,{constructor:{value:Q}});Q.prototype=m;var $=new $n(C,Q,m,_,B,u,d,g);if($.baseClass){var z,Y;(Y=(z=$.baseClass).__derivedClasses)!==null&&Y!==void 0||(z.__derivedClasses=[]),$.baseClass.__derivedClasses.push($)}var Se=new Qe(C,$,!0,!1,!1),tt=new Qe(C+"*",$,!1,!1,!1),ur=new Qe(C+" const*",$,!1,!0,!1);return Lt[e]={pointerType:tt,constPointerType:ur},Vt(E,Q),[Se,tt,ur]})},$t=(e,t)=>{for(var n=[],o=0;o<e;o++)n.push(M[t+o*4>>2]);return n};function Dn(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].destructorFunction===void 0)return!0;return!1}function St(e,t,n,o,s,u){var l=t.length;l<2&&A("argTypes array size mismatch! Must at least get return value and 'this' types!");var d=t[1]!==null&&n!==null,p=Dn(t),g=t[0].name!=="void",C=l-2,P=new Array(C),_=[],E=[],L=function(){arguments.length!==C&&A(`function ${e} called with ${arguments.length} arguments, expected ${C}`),E.length=0;var B;_.length=d?2:1,_[0]=s,d&&(B=t[1].toWireType(E,this),_[1]=B);for(var F=0;F<C;++F)P[F]=t[F+2].toWireType(E,arguments[F]),_.push(P[F]);var Q=o.apply(null,_);function m($){if(p)mt(E);else for(var z=d?1:2;z<t.length;z++){var Y=z===1?B:P[z-2];t[z].destructorFunction!==null&&t[z].destructorFunction(Y)}if(g)return t[0].fromWireType($)}return m(Q)};return ke(e,L)}var Rn=(e,t,n,o,s,u)=>{var l=$t(t,n);s=ee(o,s),we([],[e],function(d){d=d[0];var p=`constructor ${d.name}`;if(d.registeredClass.constructor_body===void 0&&(d.registeredClass.constructor_body=[]),d.registeredClass.constructor_body[t-1]!==void 0)throw new $e(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${d.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return d.registeredClass.constructor_body[t-1]=()=>{Ke(`Cannot construct ${d.name} due to unbound types`,l)},we([],l,g=>(g.splice(1,0,null),d.registeredClass.constructor_body[t-1]=St(p,g,null,s,u),[])),[]})},Jt=e=>{e=e.trim();const t=e.indexOf("(");return t!==-1?e.substr(0,t):e},kn=(e,t,n,o,s,u,l,d,p)=>{var g=$t(n,o);t=q(t),t=Jt(t),u=ee(s,u),we([],[e],function(C){C=C[0];var P=`${C.name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),d&&C.registeredClass.pureVirtualFunctions.push(t);function _(){Ke(`Cannot call ${P} due to unbound types`,g)}var E=C.registeredClass.instancePrototype,L=E[t];return L===void 0||L.overloadTable===void 0&&L.className!==C.name&&L.argCount===n-2?(_.argCount=n-2,_.className=C.name,E[t]=_):(Ht(E,t,P),E[t].overloadTable[n-2]=_),we([],g,function(B){var F=St(P,B,C,u,l);return E[t].overloadTable===void 0?(F.argCount=n-2,E[t]=F):E[t].overloadTable[n-2]=F,[]}),[]})};function Fn(){Object.assign(Yt.prototype,{get(e){return this.allocated[e]},has(e){return this.allocated[e]!==void 0},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function Yt(){this.allocated=[void 0],this.freelist=[]}var Z=new Yt,Pt=e=>{e>=Z.reserved&&--Z.get(e).refcount===0&&Z.free(e)},In=()=>{for(var e=0,t=Z.reserved;t<Z.allocated.length;++t)Z.allocated[t]!==void 0&&++e;return e},Wn=()=>{Z.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),Z.reserved=Z.allocated.length,a.count_emval_handles=In},se={toValue:e=>(e||A("Cannot use deleted val. handle = "+e),Z.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Z.allocate({refcount:1,value:e})}}},Un=(e,t)=>{t=q(t),re(e,{name:t,fromWireType:n=>{var o=se.toValue(n);return Pt(n),o},toWireType:(n,o)=>se.toHandle(o),argPackAdvance:ne,readValueFromPointer:yt,destructorFunction:null})},Ln=(e,t,n)=>{switch(t){case 1:return n?function(o){return this.fromWireType(W[o>>0])}:function(o){return this.fromWireType(G[o>>0])};case 2:return n?function(o){return this.fromWireType(le[o>>1])}:function(o){return this.fromWireType(k[o>>1])};case 4:return n?function(o){return this.fromWireType(O[o>>2])}:function(o){return this.fromWireType(M[o>>2])};default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},Hn=(e,t,n,o)=>{t=q(t);function s(){}s.values={},re(e,{name:t,constructor:s,fromWireType:function(u){return this.constructor.values[u]},toWireType:(u,l)=>l.value,argPackAdvance:ne,readValueFromPointer:Ln(t,n,o),destructorFunction:null}),Ct(t,s)},_t=(e,t)=>{var n=ge[e];return n===void 0&&A(t+" has unknown type "+Gt(e)),n},Nn=(e,t,n)=>{var o=_t(e,"enum");t=q(t);var s=o.constructor,u=Object.create(o.constructor.prototype,{value:{value:n},constructor:{value:ke(`${o.name}_${t}`,function(){})}});s.values[n]=u,s[t]=u},Et=e=>{if(e===null)return"null";var t=typeof e;return t==="object"||t==="array"||t==="function"?e.toString():""+e},Vn=(e,t)=>{switch(t){case 4:return function(n){return this.fromWireType(de[n>>2])};case 8:return function(n){return this.fromWireType(oe[n>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},Bn=(e,t,n)=>{t=q(t),re(e,{name:t,fromWireType:o=>o,toWireType:(o,s)=>s,argPackAdvance:ne,readValueFromPointer:Vn(t,n),destructorFunction:null})},zn=(e,t,n,o,s,u,l)=>{var d=$t(t,n);e=q(e),e=Jt(e),s=ee(o,s),Ct(e,function(){Ke(`Cannot call ${e} due to unbound types`,d)},t-1),we([],d,function(p){var g=[p[0],null].concat(p.slice(1));return Vt(e,St(e,g,null,s,u),t-1),[]})},Gn=(e,t,n)=>{switch(t){case 1:return n?o=>W[o>>0]:o=>G[o>>0];case 2:return n?o=>le[o>>1]:o=>k[o>>1];case 4:return n?o=>O[o>>2]:o=>M[o>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},Jn=(e,t,n,o,s)=>{t=q(t);var u=C=>C;if(o===0){var l=32-8*n;u=C=>C<<l>>>l}var d=t.includes("unsigned"),p=(C,P)=>{},g;d?g=function(C,P){return p(P,this.name),P>>>0}:g=function(C,P){return p(P,this.name),P},re(e,{name:t,fromWireType:u,toWireType:g,argPackAdvance:ne,readValueFromPointer:Gn(t,n,o!==0),destructorFunction:null})},Yn=(e,t,n)=>{var o=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],s=o[t];function u(l){var d=M[l>>2],p=M[l+4>>2];return new s(W.buffer,p,d)}n=q(n),re(e,{name:n,fromWireType:u,argPackAdvance:ne,readValueFromPointer:u},{ignoreDuplicateRegistrations:!0})},qt=(e,t,n,o)=>{if(!(o>0))return 0;for(var s=n,u=n+o-1,l=0;l<e.length;++l){var d=e.charCodeAt(l);if(d>=55296&&d<=57343){var p=e.charCodeAt(++l);d=65536+((d&1023)<<10)|p&1023}if(d<=127){if(n>=u)break;t[n++]=d}else if(d<=2047){if(n+1>=u)break;t[n++]=192|d>>6,t[n++]=128|d&63}else if(d<=65535){if(n+2>=u)break;t[n++]=224|d>>12,t[n++]=128|d>>6&63,t[n++]=128|d&63}else{if(n+3>=u)break;t[n++]=240|d>>18,t[n++]=128|d>>12&63,t[n++]=128|d>>6&63,t[n++]=128|d&63}}return t[n]=0,n-s},qn=(e,t,n)=>qt(e,G,t,n),Qt=e=>{for(var t=0,n=0;n<e.length;++n){var o=e.charCodeAt(n);o<=127?t++:o<=2047?t+=2:o>=55296&&o<=57343?(t+=4,++n):t+=3}return t},Xt=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Qn=(e,t,n)=>{for(var o=t+n,s=t;e[s]&&!(s>=o);)++s;if(s-t>16&&e.buffer&&Xt)return Xt.decode(e.subarray(t,s));for(var u="";t<s;){var l=e[t++];if(!(l&128)){u+=String.fromCharCode(l);continue}var d=e[t++]&63;if((l&224)==192){u+=String.fromCharCode((l&31)<<6|d);continue}var p=e[t++]&63;if((l&240)==224?l=(l&15)<<12|d<<6|p:l=(l&7)<<18|d<<12|p<<6|e[t++]&63,l<65536)u+=String.fromCharCode(l);else{var g=l-65536;u+=String.fromCharCode(55296|g>>10,56320|g&1023)}}return u},Ot=(e,t)=>e?Qn(G,e,t):"",Xn=(e,t)=>{t=q(t);var n=t==="std::string";re(e,{name:t,fromWireType(o){var s=M[o>>2],u=o+4,l;if(n)for(var d=u,p=0;p<=s;++p){var g=u+p;if(p==s||G[g]==0){var C=g-d,P=Ot(d,C);l===void 0?l=P:(l+="\0",l+=P),d=g+1}}else{for(var _=new Array(s),p=0;p<s;++p)_[p]=String.fromCharCode(G[u+p]);l=_.join("")}return ce(o),l},toWireType(o,s){s instanceof ArrayBuffer&&(s=new Uint8Array(s));var u,l=typeof s=="string";l||s instanceof Uint8Array||s instanceof Uint8ClampedArray||s instanceof Int8Array||A("Cannot pass non-string to std::string"),n&&l?u=Qt(s):u=s.length;var d=xt(4+u+1),p=d+4;if(M[d>>2]=u,n&&l)qn(s,p,u+1);else if(l)for(var g=0;g<u;++g){var C=s.charCodeAt(g);C>255&&(ce(p),A("String has UTF-16 code units that do not fit in 8 bits")),G[p+g]=C}else for(var g=0;g<u;++g)G[p+g]=s[g];return o!==null&&o.push(ce,d),d},argPackAdvance:ne,readValueFromPointer:Nt,destructorFunction(o){ce(o)}})},Kt=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Kn=(e,t)=>{for(var n=e,o=n>>1,s=o+t/2;!(o>=s)&&k[o];)++o;if(n=o<<1,n-e>32&&Kt)return Kt.decode(G.subarray(e,n));for(var u="",l=0;!(l>=t/2);++l){var d=le[e+l*2>>1];if(d==0)break;u+=String.fromCharCode(d)}return u},Zn=(e,t,n)=>{var o;if((o=n)!==null&&o!==void 0||(n=2147483647),n<2)return 0;n-=2;for(var s=t,u=n<e.length*2?n/2:e.length,l=0;l<u;++l){var d=e.charCodeAt(l);le[t>>1]=d,t+=2}return le[t>>1]=0,t-s},ea=e=>e.length*2,ta=(e,t)=>{for(var n=0,o="";!(n>=t/4);){var s=O[e+n*4>>2];if(s==0)break;if(++n,s>=65536){var u=s-65536;o+=String.fromCharCode(55296|u>>10,56320|u&1023)}else o+=String.fromCharCode(s)}return o},ra=(e,t,n)=>{var o;if((o=n)!==null&&o!==void 0||(n=2147483647),n<4)return 0;for(var s=t,u=s+n-4,l=0;l<e.length;++l){var d=e.charCodeAt(l);if(d>=55296&&d<=57343){var p=e.charCodeAt(++l);d=65536+((d&1023)<<10)|p&1023}if(O[t>>2]=d,t+=4,t+4>u)break}return O[t>>2]=0,t-s},na=e=>{for(var t=0,n=0;n<e.length;++n){var o=e.charCodeAt(n);o>=55296&&o<=57343&&++n,t+=4}return t},aa=(e,t,n)=>{n=q(n);var o,s,u,l,d;t===2?(o=Kn,s=Zn,l=ea,u=()=>k,d=1):t===4&&(o=ta,s=ra,l=na,u=()=>M,d=2),re(e,{name:n,fromWireType:p=>{for(var g=M[p>>2],C=u(),P,_=p+4,E=0;E<=g;++E){var L=p+4+E*t;if(E==g||C[L>>d]==0){var B=L-_,F=o(_,B);P===void 0?P=F:(P+="\0",P+=F),_=L+t}}return ce(p),P},toWireType:(p,g)=>{typeof g!="string"&&A(`Cannot pass non-string to C++ string type ${n}`);var C=l(g),P=xt(4+C+t);return M[P>>2]=C>>d,s(g,P+4,C+t),p!==null&&p.push(ce,P),P},argPackAdvance:ne,readValueFromPointer:yt,destructorFunction(p){ce(p)}})},oa=(e,t,n,o,s,u)=>{ze[e]={name:q(t),rawConstructor:ee(n,o),rawDestructor:ee(s,u),fields:[]}},ia=(e,t,n,o,s,u,l,d,p,g)=>{ze[e].fields.push({fieldName:q(t),getterReturnType:n,getter:ee(o,s),getterContext:u,setterArgumentType:l,setter:ee(d,p),setterContext:g})},sa=(e,t)=>{t=q(t),re(e,{isVoid:!0,name:t,argPackAdvance:0,fromWireType:()=>{},toWireType:(n,o)=>{}})},Mt=[],ca=(e,t,n,o)=>(e=Mt[e],t=se.toValue(t),e(null,t,n,o)),ua={},la=e=>{var t=ua[e];return t===void 0?q(e):t},Zt=()=>{if(typeof globalThis=="object")return globalThis;function e(t){t.$$$embind_global$$$=t;var n=typeof $$$embind_global$$$=="object"&&t.$$$embind_global$$$==t;return n||delete t.$$$embind_global$$$,n}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&e(global)?$$$embind_global$$$=global:typeof self=="object"&&e(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},da=e=>e===0?se.toHandle(Zt()):(e=la(e),se.toHandle(Zt()[e])),fa=e=>{var t=Mt.length;return Mt.push(e),t},ha=(e,t)=>{for(var n=new Array(e),o=0;o<e;++o)n[o]=_t(M[t+o*4>>2],"parameter "+o);return n},pa=Reflect.construct,va=(e,t,n)=>{var o=[],s=e.toWireType(o,n);return o.length&&(M[t>>2]=se.toHandle(o)),s},ma=(e,t,n)=>{var o=ha(e,t),s=o.shift();e--;var u=new Array(e),l=(p,g,C,P)=>{for(var _=0,E=0;E<e;++E)u[E]=o[E].readValueFromPointer(P+_),_+=o[E].argPackAdvance;for(var L=n===1?pa(g,u):g.apply(p,u),E=0;E<e;++E){var B,F;(B=(F=o[E]).deleteObject)===null||B===void 0||B.call(F,u[E])}return va(s,C,L)},d=`methodCaller<(${o.map(p=>p.name).join(", ")}) => ${s.name}>`;return fa(ke(d,l))},ya=e=>{e>4&&(Z.get(e).refcount+=1)},ga=e=>{var t=se.toValue(e);mt(t),Pt(e)},wa=(e,t)=>{e=_t(e,"_emval_take_value");var n=e.readValueFromPointer(t);return se.toHandle(n)},ba=()=>{K("")},Ca=(e,t,n)=>G.copyWithin(e,t,t+n),Ta=()=>2147483648,$a=e=>{var t=x.buffer,n=(e-t.byteLength+65535)/65536;try{return x.grow(n),be(),1}catch{}},Sa=e=>{var t=G.length;e>>>=0;var n=Ta();if(e>n)return!1;for(var o=(p,g)=>p+(g-p%g)%g,s=1;s<=4;s*=2){var u=t*(1+.2/s);u=Math.min(u,e+100663296);var l=Math.min(n,o(Math.max(e,u),65536)),d=$a(l);if(d)return!0}return!1},At={},Pa=()=>y||"./this.program",Fe=()=>{if(!Fe.strings){var e=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:e,_:Pa()};for(var n in At)At[n]===void 0?delete t[n]:t[n]=At[n];var o=[];for(var n in t)o.push(`${n}=${t[n]}`);Fe.strings=o}return Fe.strings},_a=(e,t)=>{for(var n=0;n<e.length;++n)W[t++>>0]=e.charCodeAt(n);W[t>>0]=0},Ea=(e,t)=>{var n=0;return Fe().forEach((o,s)=>{var u=t+n;M[e+s*4>>2]=u,_a(o,u),n+=o.length+1}),0},Oa=(e,t)=>{var n=Fe();M[e>>2]=n.length;var o=0;return n.forEach(s=>o+=s.length+1),M[t>>2]=o,0},Ma=e=>e,Ze=e=>e%4===0&&(e%100!==0||e%400===0),Aa=(e,t)=>{for(var n=0,o=0;o<=t;n+=e[o++]);return n},er=[31,29,31,30,31,30,31,31,30,31,30,31],tr=[31,28,31,30,31,30,31,31,30,31,30,31],xa=(e,t)=>{for(var n=new Date(e.getTime());t>0;){var o=Ze(n.getFullYear()),s=n.getMonth(),u=(o?er:tr)[s];if(t>u-n.getDate())t-=u-n.getDate()+1,n.setDate(1),s<11?n.setMonth(s+1):(n.setMonth(0),n.setFullYear(n.getFullYear()+1));else return n.setDate(n.getDate()+t),n}return n};function ja(e,t,n){var o=Qt(e)+1,s=new Array(o);return qt(e,s,0,s.length),s}var Da=(e,t)=>{W.set(e,t)},Ra=(e,t,n,o)=>{var s=M[o+40>>2],u={tm_sec:O[o>>2],tm_min:O[o+4>>2],tm_hour:O[o+8>>2],tm_mday:O[o+12>>2],tm_mon:O[o+16>>2],tm_year:O[o+20>>2],tm_wday:O[o+24>>2],tm_yday:O[o+28>>2],tm_isdst:O[o+32>>2],tm_gmtoff:O[o+36>>2],tm_zone:s?Ot(s):""},l=Ot(n),d={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var p in d)l=l.replace(new RegExp(p,"g"),d[p]);var g=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],C=["January","February","March","April","May","June","July","August","September","October","November","December"];function P(m,$,z){for(var Y=typeof m=="number"?m.toString():m||"";Y.length<$;)Y=z[0]+Y;return Y}function _(m,$){return P(m,$,"0")}function E(m,$){function z(Se){return Se<0?-1:Se>0?1:0}var Y;return(Y=z(m.getFullYear()-$.getFullYear()))===0&&(Y=z(m.getMonth()-$.getMonth()))===0&&(Y=z(m.getDate()-$.getDate())),Y}function L(m){switch(m.getDay()){case 0:return new Date(m.getFullYear()-1,11,29);case 1:return m;case 2:return new Date(m.getFullYear(),0,3);case 3:return new Date(m.getFullYear(),0,2);case 4:return new Date(m.getFullYear(),0,1);case 5:return new Date(m.getFullYear()-1,11,31);case 6:return new Date(m.getFullYear()-1,11,30)}}function B(m){var $=xa(new Date(m.tm_year+1900,0,1),m.tm_yday),z=new Date($.getFullYear(),0,4),Y=new Date($.getFullYear()+1,0,4),Se=L(z),tt=L(Y);return E(Se,$)<=0?E(tt,$)<=0?$.getFullYear()+1:$.getFullYear():$.getFullYear()-1}var F={"%a":m=>g[m.tm_wday].substring(0,3),"%A":m=>g[m.tm_wday],"%b":m=>C[m.tm_mon].substring(0,3),"%B":m=>C[m.tm_mon],"%C":m=>{var $=m.tm_year+1900;return _($/100|0,2)},"%d":m=>_(m.tm_mday,2),"%e":m=>P(m.tm_mday,2," "),"%g":m=>B(m).toString().substring(2),"%G":m=>B(m),"%H":m=>_(m.tm_hour,2),"%I":m=>{var $=m.tm_hour;return $==0?$=12:$>12&&($-=12),_($,2)},"%j":m=>_(m.tm_mday+Aa(Ze(m.tm_year+1900)?er:tr,m.tm_mon-1),3),"%m":m=>_(m.tm_mon+1,2),"%M":m=>_(m.tm_min,2),"%n":()=>`
3
+ `,"%p":m=>m.tm_hour>=0&&m.tm_hour<12?"AM":"PM","%S":m=>_(m.tm_sec,2),"%t":()=>" ","%u":m=>m.tm_wday||7,"%U":m=>{var $=m.tm_yday+7-m.tm_wday;return _(Math.floor($/7),2)},"%V":m=>{var $=Math.floor((m.tm_yday+7-(m.tm_wday+6)%7)/7);if((m.tm_wday+371-m.tm_yday-2)%7<=2&&$++,$){if($==53){var z=(m.tm_wday+371-m.tm_yday)%7;z!=4&&(z!=3||!Ze(m.tm_year))&&($=1)}}else{$=52;var Y=(m.tm_wday+7-m.tm_yday-1)%7;(Y==4||Y==5&&Ze(m.tm_year%400-1))&&$++}return _($,2)},"%w":m=>m.tm_wday,"%W":m=>{var $=m.tm_yday+7-(m.tm_wday+6)%7;return _(Math.floor($/7),2)},"%y":m=>(m.tm_year+1900).toString().substring(2),"%Y":m=>m.tm_year+1900,"%z":m=>{var $=m.tm_gmtoff,z=$>=0;return $=Math.abs($)/60,$=$/60*100+$%60,(z?"+":"-")+("0000"+$).slice(-4)},"%Z":m=>m.tm_zone,"%%":()=>"%"};l=l.replace(/%%/g,"\0\0");for(var p in F)l.includes(p)&&(l=l.replace(new RegExp(p,"g"),F[p](u)));l=l.replace(/\0\0/g,"%");var Q=ja(l);return Q.length>t?0:(Da(Q,e),Q.length-1)},ka=(e,t,n,o,s)=>Ra(e,t,n,o);kt=a.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},sn(),$e=a.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},wn(),vn(),En(),zt=a.UnboundTypeError=xn(Error,"UnboundTypeError"),Fn(),Wn();var Fa={s:qr,u:Qr,b:Kr,g:Zr,q:en,J:tn,f:rn,V:nn,d:Xr,da:an,Q:on,_:un,ca:jn,ba:Rn,w:kn,Y:Un,x:Hn,h:Nn,L:Bn,M:zn,t:Jn,o:Yn,K:Xn,C:aa,A:oa,ea:ia,$:sa,R:ca,ha:Pt,fa:da,Z:ma,N:ya,O:ga,aa:wa,B:ba,X:Ca,W:Sa,T:Ea,U:Oa,E:Ka,D:Ha,F:Xa,n:Za,a:Ia,e:Va,m:La,k:za,H:qa,v:Ja,G:Qa,z:to,P:no,l:Ba,j:Na,c:Ua,p:Wa,I:Ya,r:eo,i:Ga,y:ro,ga:Ma,S:ka},J=Yr(),ce=a._free=e=>(ce=a._free=J.ka)(e),xt=a._malloc=e=>(xt=a._malloc=J.la)(e),rr=e=>(rr=J.na)(e),U=(e,t)=>(U=J.oa)(e,t),Ie=e=>(Ie=J.pa)(e),N=()=>(N=J.qa)(),V=e=>(V=J.ra)(e),nr=e=>(nr=J.sa)(e),ar=e=>(ar=J.ta)(e),or=(e,t,n)=>(or=J.ua)(e,t,n),ir=e=>(ir=J.va)(e);a.dynCall_viijii=(e,t,n,o,s,u,l)=>(a.dynCall_viijii=J.wa)(e,t,n,o,s,u,l);var sr=a.dynCall_jiiii=(e,t,n,o,s)=>(sr=a.dynCall_jiiii=J.xa)(e,t,n,o,s);a.dynCall_iiiiij=(e,t,n,o,s,u,l)=>(a.dynCall_iiiiij=J.ya)(e,t,n,o,s,u,l),a.dynCall_iiiiijj=(e,t,n,o,s,u,l,d,p)=>(a.dynCall_iiiiijj=J.za)(e,t,n,o,s,u,l,d,p),a.dynCall_iiiiiijj=(e,t,n,o,s,u,l,d,p,g)=>(a.dynCall_iiiiiijj=J.Aa)(e,t,n,o,s,u,l,d,p,g);function Ia(e,t){var n=N();try{return H(e)(t)}catch(o){if(V(n),o!==o+0)throw o;U(1,0)}}function Wa(e,t,n,o){var s=N();try{H(e)(t,n,o)}catch(u){if(V(s),u!==u+0)throw u;U(1,0)}}function Ua(e,t,n){var o=N();try{H(e)(t,n)}catch(s){if(V(o),s!==s+0)throw s;U(1,0)}}function La(e,t,n,o){var s=N();try{return H(e)(t,n,o)}catch(u){if(V(s),u!==u+0)throw u;U(1,0)}}function Ha(e,t,n,o,s){var u=N();try{return H(e)(t,n,o,s)}catch(l){if(V(u),l!==l+0)throw l;U(1,0)}}function Na(e,t){var n=N();try{H(e)(t)}catch(o){if(V(n),o!==o+0)throw o;U(1,0)}}function Va(e,t,n){var o=N();try{return H(e)(t,n)}catch(s){if(V(o),s!==s+0)throw s;U(1,0)}}function Ba(e){var t=N();try{H(e)()}catch(n){if(V(t),n!==n+0)throw n;U(1,0)}}function za(e,t,n,o,s){var u=N();try{return H(e)(t,n,o,s)}catch(l){if(V(u),l!==l+0)throw l;U(1,0)}}function Ga(e,t,n,o,s,u,l,d,p,g,C){var P=N();try{H(e)(t,n,o,s,u,l,d,p,g,C)}catch(_){if(V(P),_!==_+0)throw _;U(1,0)}}function Ja(e,t,n,o,s,u,l){var d=N();try{return H(e)(t,n,o,s,u,l)}catch(p){if(V(d),p!==p+0)throw p;U(1,0)}}function Ya(e,t,n,o,s){var u=N();try{H(e)(t,n,o,s)}catch(l){if(V(u),l!==l+0)throw l;U(1,0)}}function qa(e,t,n,o,s,u){var l=N();try{return H(e)(t,n,o,s,u)}catch(d){if(V(l),d!==d+0)throw d;U(1,0)}}function Qa(e,t,n,o,s,u,l,d){var p=N();try{return H(e)(t,n,o,s,u,l,d)}catch(g){if(V(p),g!==g+0)throw g;U(1,0)}}function Xa(e,t,n,o){var s=N();try{return H(e)(t,n,o)}catch(u){if(V(s),u!==u+0)throw u;U(1,0)}}function Ka(e,t,n,o){var s=N();try{return H(e)(t,n,o)}catch(u){if(V(s),u!==u+0)throw u;U(1,0)}}function Za(e){var t=N();try{return H(e)()}catch(n){if(V(t),n!==n+0)throw n;U(1,0)}}function eo(e,t,n,o,s,u,l,d){var p=N();try{H(e)(t,n,o,s,u,l,d)}catch(g){if(V(p),g!==g+0)throw g;U(1,0)}}function to(e,t,n,o,s,u,l,d,p,g,C,P){var _=N();try{return H(e)(t,n,o,s,u,l,d,p,g,C,P)}catch(E){if(V(_),E!==E+0)throw E;U(1,0)}}function ro(e,t,n,o,s,u,l,d,p,g,C,P,_,E,L,B){var F=N();try{H(e)(t,n,o,s,u,l,d,p,g,C,P,_,E,L,B)}catch(Q){if(V(F),Q!==Q+0)throw Q;U(1,0)}}function no(e,t,n,o,s){var u=N();try{return sr(e,t,n,o,s)}catch(l){if(V(u),l!==l+0)throw l;U(1,0)}}var et;ye=function e(){et||cr(),et||(ye=e)};function cr(){if(te>0||(Ue(),te>0))return;function e(){et||(et=!0,a.calledRun=!0,!I&&(it(),c(a),a.onRuntimeInitialized&&a.onRuntimeInitialized(),st()))}a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1),e()},1)):e()}if(a.preInit)for(typeof a.preInit=="function"&&(a.preInit=[a.preInit]);a.preInit.length>0;)a.preInit.pop()();return cr(),i.ready}})();function xo(r){return Dt(Rt,r)}async function jo(r,i){return Mo(Rt,r,i)}async function Do(r,i){return Ao(Rt,r,i)}var We;class Dr extends EventTarget{constructor(i={}){var a;super(),ao(this,We,void 0);try{const c=(a=i==null?void 0:i.formats)==null?void 0:a.filter(f=>f!=="unknown");if((c==null?void 0:c.length)===0)throw new TypeError("Hint option provided, but is empty.");c==null||c.forEach(f=>{if(!nt.has(f))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${f}' is not a valid enum value of type BarcodeFormat.`)}),oo(this,We,c??[]),xo().then(f=>{this.dispatchEvent(new CustomEvent("load",{detail:f}))}).catch(f=>{this.dispatchEvent(new CustomEvent("error",{detail:f}))})}catch(c){throw fr(c,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return io.filter(i=>i!=="unknown")}async detect(i){try{const a=await po(i);if(a===null)return[];let c;try{Mr(a)?c=await jo(a,{tryHarder:!0,formats:dr(this,We).map(f=>nt.get(f))}):c=await Do(a,{tryHarder:!0,formats:dr(this,We).map(f=>nt.get(f))})}catch(f){throw console.error(f),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return c.map(f=>{const{topLeft:{x:v,y},topRight:{x:S,y:h},bottomLeft:{x:w,y:T},bottomRight:{x:b,y:j}}=f.position,D=Math.min(v,S,w,b),x=Math.min(y,h,T,j),I=Math.max(v,S,w,b),W=Math.max(y,h,T,j);return{boundingBox:new DOMRectReadOnly(D,x,I-D,W-x),rawValue:f.text,format:so(f.format),cornerPoints:[{x:v,y},{x:S,y:h},{x:b,y:j},{x:w,y:T}]}})}catch(a){throw fr(a,"Failed to execute 'detect' on 'BarcodeDetector'")}}}We=new WeakMap;const Rr=(r,i,a="error")=>{let c,f;const v=new Promise((y,S)=>{c=y,f=S,r.addEventListener(i,c),r.addEventListener(a,f)});return v.finally(()=>{r.removeEventListener(i,c),r.removeEventListener(a,f)}),v},mr=r=>new Promise(i=>setTimeout(i,r));class kr extends Error{constructor(){super("this browser has no Stream API support"),this.name="StreamApiNotSupportedError"}}class Ro extends Error{constructor(){super("camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP."),this.name="InsecureContextError"}}class ko extends Error{constructor(){super("Loading camera stream timed out after 3 seconds. If you are on iOS in PWA mode, this is a known issue (see https://github.com/gruhn/vue-qrcode-reader/issues/298)"),this.name="StreamLoadTimeoutError"}}let jt;const Fo=r=>{jt=new Dr({formats:r})},Io=async(r,{detectHandler:i,locateHandler:a,minDelay:c,formats:f})=>{jt=new Dr({formats:f});const v=y=>async S=>{if(r.readyState>1){const{lastScanned:h,contentBefore:w,lastScanHadContent:T}=y;if(S-h<c)window.requestAnimationFrame(v(y));else{const b=await jt.detect(r),j=b.some(I=>!w.includes(I.rawValue));j&&i(b);const D=b.length>0;D&&a(b),!D&&T&&a(b);const x={lastScanned:S,lastScanHadContent:D,contentBefore:j?b.map(I=>I.rawValue):w};window.requestAnimationFrame(v(x))}}};v({lastScanned:performance.now(),contentBefore:[],lastScanHadContent:!1})(performance.now())};var Fr={},X={};Object.defineProperty(X,"__esModule",{value:!0});X.compactObject=Ur;X.deprecated=Go;var Wo=X.detectBrowser=Jo;X.disableLog=Vo;X.disableWarnings=Bo;X.extractVersion=at;X.filterStats=Yo;X.log=zo;X.walkStats=ot;X.wrapPeerConnectionEvent=No;function Uo(r,i,a){return i=Lo(i),i in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a,r}function Lo(r){var i=Ho(r,"string");return ve(i)==="symbol"?i:String(i)}function Ho(r,i){if(ve(r)!=="object"||r===null)return r;var a=r[Symbol.toPrimitive];if(a!==void 0){var c=a.call(r,i||"default");if(ve(c)!=="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(r)}function ve(r){"@babel/helpers - typeof";return ve=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},ve(r)}var Ir=!0,Wr=!0;function at(r,i,a){var c=r.match(i);return c&&c.length>=a&&parseInt(c[a],10)}function No(r,i,a){if(r.RTCPeerConnection){var c=r.RTCPeerConnection.prototype,f=c.addEventListener;c.addEventListener=function(y,S){if(y!==i)return f.apply(this,arguments);var h=function(w){var T=a(w);T&&(S.handleEvent?S.handleEvent(T):S(T))};return this._eventMap=this._eventMap||{},this._eventMap[i]||(this._eventMap[i]=new Map),this._eventMap[i].set(S,h),f.apply(this,[y,h])};var v=c.removeEventListener;c.removeEventListener=function(y,S){if(y!==i||!this._eventMap||!this._eventMap[i])return v.apply(this,arguments);if(!this._eventMap[i].has(S))return v.apply(this,arguments);var h=this._eventMap[i].get(S);return this._eventMap[i].delete(S),this._eventMap[i].size===0&&delete this._eventMap[i],Object.keys(this._eventMap).length===0&&delete this._eventMap,v.apply(this,[y,h])},Object.defineProperty(c,"on"+i,{get:function(){return this["_on"+i]},set:function(y){this["_on"+i]&&(this.removeEventListener(i,this["_on"+i]),delete this["_on"+i]),y&&this.addEventListener(i,this["_on"+i]=y)},enumerable:!0,configurable:!0})}}function Vo(r){return typeof r!="boolean"?new Error("Argument type: "+ve(r)+". Please use a boolean."):(Ir=r,r?"adapter.js logging disabled":"adapter.js logging enabled")}function Bo(r){return typeof r!="boolean"?new Error("Argument type: "+ve(r)+". Please use a boolean."):(Wr=!r,"adapter.js deprecation warnings "+(r?"disabled":"enabled"))}function zo(){if((typeof window>"u"?"undefined":ve(window))==="object"){if(Ir)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function Go(r,i){Wr&&console.warn(r+" is deprecated, please use "+i+" instead.")}function Jo(r){var i={browser:null,version:null};if(typeof r>"u"||!r.navigator||!r.navigator.userAgent)return i.browser="Not a browser.",i;var a=r.navigator;if(a.mozGetUserMedia)i.browser="firefox",i.version=at(a.userAgent,/Firefox\/(\d+)\./,1);else if(a.webkitGetUserMedia||r.isSecureContext===!1&&r.webkitRTCPeerConnection)i.browser="chrome",i.version=at(a.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(r.RTCPeerConnection&&a.userAgent.match(/AppleWebKit\/(\d+)\./))i.browser="safari",i.version=at(a.userAgent,/AppleWebKit\/(\d+)\./,1),i.supportsUnifiedPlan=r.RTCRtpTransceiver&&"currentDirection"in r.RTCRtpTransceiver.prototype;else return i.browser="Not a supported browser.",i;return i}function yr(r){return Object.prototype.toString.call(r)==="[object Object]"}function Ur(r){return yr(r)?Object.keys(r).reduce(function(i,a){var c=yr(r[a]),f=c?Ur(r[a]):r[a],v=c&&!Object.keys(f).length;return f===void 0||v?i:Object.assign(i,Uo({},a,f))},{}):r}function ot(r,i,a){!i||a.has(i.id)||(a.set(i.id,i),Object.keys(i).forEach(function(c){c.endsWith("Id")?ot(r,r.get(i[c]),a):c.endsWith("Ids")&&i[c].forEach(function(f){ot(r,r.get(f),a)})}))}function Yo(r,i,a){var c=a?"outbound-rtp":"inbound-rtp",f=new Map;if(i===null)return f;var v=[];return r.forEach(function(y){y.type==="track"&&y.trackIdentifier===i.id&&v.push(y)}),v.forEach(function(y){r.forEach(function(S){S.type===c&&S.trackId===y.id&&ot(r,S,f)})}),f}Object.defineProperty(Fr,"__esModule",{value:!0});var qo=Fr.shimGetUserMedia=Ko,Qo=Xo(X);function Lr(r){if(typeof WeakMap!="function")return null;var i=new WeakMap,a=new WeakMap;return(Lr=function(c){return c?a:i})(r)}function Xo(r,i){if(r&&r.__esModule)return r;if(r===null||pe(r)!=="object"&&typeof r!="function")return{default:r};var a=Lr(i);if(a&&a.has(r))return a.get(r);var c={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var v in r)if(v!=="default"&&Object.prototype.hasOwnProperty.call(r,v)){var y=f?Object.getOwnPropertyDescriptor(r,v):null;y&&(y.get||y.set)?Object.defineProperty(c,v,y):c[v]=r[v]}return c.default=r,a&&a.set(r,c),c}function pe(r){"@babel/helpers - typeof";return pe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},pe(r)}var gr=Qo.log;function Ko(r,i){var a=r&&r.navigator;if(a.mediaDevices){var c=function(h){if(pe(h)!=="object"||h.mandatory||h.optional)return h;var w={};return Object.keys(h).forEach(function(T){if(!(T==="require"||T==="advanced"||T==="mediaSource")){var b=pe(h[T])==="object"?h[T]:{ideal:h[T]};b.exact!==void 0&&typeof b.exact=="number"&&(b.min=b.max=b.exact);var j=function(x,I){return x?x+I.charAt(0).toUpperCase()+I.slice(1):I==="deviceId"?"sourceId":I};if(b.ideal!==void 0){w.optional=w.optional||[];var D={};typeof b.ideal=="number"?(D[j("min",T)]=b.ideal,w.optional.push(D),D={},D[j("max",T)]=b.ideal,w.optional.push(D)):(D[j("",T)]=b.ideal,w.optional.push(D))}b.exact!==void 0&&typeof b.exact!="number"?(w.mandatory=w.mandatory||{},w.mandatory[j("",T)]=b.exact):["min","max"].forEach(function(x){b[x]!==void 0&&(w.mandatory=w.mandatory||{},w.mandatory[j(x,T)]=b[x])})}}),h.advanced&&(w.optional=(w.optional||[]).concat(h.advanced)),w},f=function(h,w){if(i.version>=61)return w(h);if(h=JSON.parse(JSON.stringify(h)),h&&pe(h.audio)==="object"){var T=function(x,I,W){I in x&&!(W in x)&&(x[W]=x[I],delete x[I])};h=JSON.parse(JSON.stringify(h)),T(h.audio,"autoGainControl","googAutoGainControl"),T(h.audio,"noiseSuppression","googNoiseSuppression"),h.audio=c(h.audio)}if(h&&pe(h.video)==="object"){var b=h.video.facingMode;b=b&&(pe(b)==="object"?b:{ideal:b});var j=i.version<66;if(b&&(b.exact==="user"||b.exact==="environment"||b.ideal==="user"||b.ideal==="environment")&&!(a.mediaDevices.getSupportedConstraints&&a.mediaDevices.getSupportedConstraints().facingMode&&!j)){delete h.video.facingMode;var D;if(b.exact==="environment"||b.ideal==="environment"?D=["back","rear"]:(b.exact==="user"||b.ideal==="user")&&(D=["front"]),D)return a.mediaDevices.enumerateDevices().then(function(x){x=x.filter(function(W){return W.kind==="videoinput"});var I=x.find(function(W){return D.some(function(G){return W.label.toLowerCase().includes(G)})});return!I&&x.length&&D.includes("back")&&(I=x[x.length-1]),I&&(h.video.deviceId=b.exact?{exact:I.deviceId}:{ideal:I.deviceId}),h.video=c(h.video),gr("chrome: "+JSON.stringify(h)),w(h)})}h.video=c(h.video)}return gr("chrome: "+JSON.stringify(h)),w(h)},v=function(h){return i.version>=64?h:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[h.name]||h.name,message:h.message,constraint:h.constraint||h.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}},y=function(h,w,T){f(h,function(b){a.webkitGetUserMedia(b,w,function(j){T&&T(v(j))})})};if(a.getUserMedia=y.bind(a),a.mediaDevices.getUserMedia){var S=a.mediaDevices.getUserMedia.bind(a.mediaDevices);a.mediaDevices.getUserMedia=function(h){return f(h,function(w){return S(w).then(function(T){if(w.audio&&!T.getAudioTracks().length||w.video&&!T.getVideoTracks().length)throw T.getTracks().forEach(function(b){b.stop()}),new DOMException("","NotFoundError");return T},function(T){return Promise.reject(v(T))})})}}}}var Hr={};Object.defineProperty(Hr,"__esModule",{value:!0});var Zo=Hr.shimGetUserMedia=ri,ei=ti(X);function Nr(r){if(typeof WeakMap!="function")return null;var i=new WeakMap,a=new WeakMap;return(Nr=function(c){return c?a:i})(r)}function ti(r,i){if(r&&r.__esModule)return r;if(r===null||Pe(r)!=="object"&&typeof r!="function")return{default:r};var a=Nr(i);if(a&&a.has(r))return a.get(r);var c={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var v in r)if(v!=="default"&&Object.prototype.hasOwnProperty.call(r,v)){var y=f?Object.getOwnPropertyDescriptor(r,v):null;y&&(y.get||y.set)?Object.defineProperty(c,v,y):c[v]=r[v]}return c.default=r,a&&a.set(r,c),c}function Pe(r){"@babel/helpers - typeof";return Pe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Pe(r)}function ri(r,i){var a=r&&r.navigator,c=r&&r.MediaStreamTrack;if(a.getUserMedia=function(h,w,T){ei.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),a.mediaDevices.getUserMedia(h).then(w,T)},!(i.version>55&&"autoGainControl"in a.mediaDevices.getSupportedConstraints())){var f=function(h,w,T){w in h&&!(T in h)&&(h[T]=h[w],delete h[w])},v=a.mediaDevices.getUserMedia.bind(a.mediaDevices);if(a.mediaDevices.getUserMedia=function(h){return Pe(h)==="object"&&Pe(h.audio)==="object"&&(h=JSON.parse(JSON.stringify(h)),f(h.audio,"autoGainControl","mozAutoGainControl"),f(h.audio,"noiseSuppression","mozNoiseSuppression")),v(h)},c&&c.prototype.getSettings){var y=c.prototype.getSettings;c.prototype.getSettings=function(){var h=y.apply(this,arguments);return f(h,"mozAutoGainControl","autoGainControl"),f(h,"mozNoiseSuppression","noiseSuppression"),h}}if(c&&c.prototype.applyConstraints){var S=c.prototype.applyConstraints;c.prototype.applyConstraints=function(h){return this.kind==="audio"&&Pe(h)==="object"&&(h=JSON.parse(JSON.stringify(h)),f(h,"autoGainControl","mozAutoGainControl"),f(h,"noiseSuppression","mozNoiseSuppression")),S.apply(this,[h])}}}}var ae={};Object.defineProperty(ae,"__esModule",{value:!0});ae.shimAudioContext=fi;ae.shimCallbacksAPI=si;ae.shimConstraints=zr;ae.shimCreateOfferLegacy=di;var ni=ae.shimGetUserMedia=ci;ae.shimLocalStreamsAPI=oi;ae.shimRTCIceServerUrls=ui;ae.shimRemoteStreamsAPI=ii;ae.shimTrackEventTransceiver=li;var Vr=ai(X);function Br(r){if(typeof WeakMap!="function")return null;var i=new WeakMap,a=new WeakMap;return(Br=function(c){return c?a:i})(r)}function ai(r,i){if(r&&r.__esModule)return r;if(r===null||me(r)!=="object"&&typeof r!="function")return{default:r};var a=Br(i);if(a&&a.has(r))return a.get(r);var c={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var v in r)if(v!=="default"&&Object.prototype.hasOwnProperty.call(r,v)){var y=f?Object.getOwnPropertyDescriptor(r,v):null;y&&(y.get||y.set)?Object.defineProperty(c,v,y):c[v]=r[v]}return c.default=r,a&&a.set(r,c),c}function me(r){"@babel/helpers - typeof";return me=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},me(r)}function oi(r){if(!(me(r)!=="object"||!r.RTCPeerConnection)){if("getLocalStreams"in r.RTCPeerConnection.prototype||(r.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in r.RTCPeerConnection.prototype)){var i=r.RTCPeerConnection.prototype.addTrack;r.RTCPeerConnection.prototype.addStream=function(a){var c=this;this._localStreams||(this._localStreams=[]),this._localStreams.includes(a)||this._localStreams.push(a),a.getAudioTracks().forEach(function(f){return i.call(c,f,a)}),a.getVideoTracks().forEach(function(f){return i.call(c,f,a)})},r.RTCPeerConnection.prototype.addTrack=function(a){for(var c=this,f=arguments.length,v=new Array(f>1?f-1:0),y=1;y<f;y++)v[y-1]=arguments[y];return v&&v.forEach(function(S){c._localStreams?c._localStreams.includes(S)||c._localStreams.push(S):c._localStreams=[S]}),i.apply(this,arguments)}}"removeStream"in r.RTCPeerConnection.prototype||(r.RTCPeerConnection.prototype.removeStream=function(a){var c=this;this._localStreams||(this._localStreams=[]);var f=this._localStreams.indexOf(a);if(f!==-1){this._localStreams.splice(f,1);var v=a.getTracks();this.getSenders().forEach(function(y){v.includes(y.track)&&c.removeTrack(y)})}})}}function ii(r){if(!(me(r)!=="object"||!r.RTCPeerConnection)&&("getRemoteStreams"in r.RTCPeerConnection.prototype||(r.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in r.RTCPeerConnection.prototype))){Object.defineProperty(r.RTCPeerConnection.prototype,"onaddstream",{get:function(){return this._onaddstream},set:function(a){var c=this;this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=a),this.addEventListener("track",this._onaddstreampoly=function(f){f.streams.forEach(function(v){if(c._remoteStreams||(c._remoteStreams=[]),!c._remoteStreams.includes(v)){c._remoteStreams.push(v);var y=new Event("addstream");y.stream=v,c.dispatchEvent(y)}})})}});var i=r.RTCPeerConnection.prototype.setRemoteDescription;r.RTCPeerConnection.prototype.setRemoteDescription=function(){var a=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(c){c.streams.forEach(function(f){if(a._remoteStreams||(a._remoteStreams=[]),!(a._remoteStreams.indexOf(f)>=0)){a._remoteStreams.push(f);var v=new Event("addstream");v.stream=f,a.dispatchEvent(v)}})}),i.apply(a,arguments)}}}function si(r){if(!(me(r)!=="object"||!r.RTCPeerConnection)){var i=r.RTCPeerConnection.prototype,a=i.createOffer,c=i.createAnswer,f=i.setLocalDescription,v=i.setRemoteDescription,y=i.addIceCandidate;i.createOffer=function(h,w){var T=arguments.length>=2?arguments[2]:arguments[0],b=a.apply(this,[T]);return w?(b.then(h,w),Promise.resolve()):b},i.createAnswer=function(h,w){var T=arguments.length>=2?arguments[2]:arguments[0],b=c.apply(this,[T]);return w?(b.then(h,w),Promise.resolve()):b};var S=function(h,w,T){var b=f.apply(this,[h]);return T?(b.then(w,T),Promise.resolve()):b};i.setLocalDescription=S,S=function(h,w,T){var b=v.apply(this,[h]);return T?(b.then(w,T),Promise.resolve()):b},i.setRemoteDescription=S,S=function(h,w,T){var b=y.apply(this,[h]);return T?(b.then(w,T),Promise.resolve()):b},i.addIceCandidate=S}}function ci(r){var i=r&&r.navigator;if(i.mediaDevices&&i.mediaDevices.getUserMedia){var a=i.mediaDevices,c=a.getUserMedia.bind(a);i.mediaDevices.getUserMedia=function(f){return c(zr(f))}}!i.getUserMedia&&i.mediaDevices&&i.mediaDevices.getUserMedia&&(i.getUserMedia=(function(f,v,y){i.mediaDevices.getUserMedia(f).then(v,y)}).bind(i))}function zr(r){return r&&r.video!==void 0?Object.assign({},r,{video:Vr.compactObject(r.video)}):r}function ui(r){if(r.RTCPeerConnection){var i=r.RTCPeerConnection;r.RTCPeerConnection=function(a,c){if(a&&a.iceServers){for(var f=[],v=0;v<a.iceServers.length;v++){var y=a.iceServers[v];y.urls===void 0&&y.url?(Vr.deprecated("RTCIceServer.url","RTCIceServer.urls"),y=JSON.parse(JSON.stringify(y)),y.urls=y.url,delete y.url,f.push(y)):f.push(a.iceServers[v])}a.iceServers=f}return new i(a,c)},r.RTCPeerConnection.prototype=i.prototype,"generateCertificate"in i&&Object.defineProperty(r.RTCPeerConnection,"generateCertificate",{get:function(){return i.generateCertificate}})}}function li(r){me(r)==="object"&&r.RTCTrackEvent&&"receiver"in r.RTCTrackEvent.prototype&&!("transceiver"in r.RTCTrackEvent.prototype)&&Object.defineProperty(r.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})}function di(r){var i=r.RTCPeerConnection.prototype.createOffer;r.RTCPeerConnection.prototype.createOffer=function(a){if(a){typeof a.offerToReceiveAudio<"u"&&(a.offerToReceiveAudio=!!a.offerToReceiveAudio);var c=this.getTransceivers().find(function(v){return v.receiver.track.kind==="audio"});a.offerToReceiveAudio===!1&&c?c.direction==="sendrecv"?c.setDirection?c.setDirection("sendonly"):c.direction="sendonly":c.direction==="recvonly"&&(c.setDirection?c.setDirection("inactive"):c.direction="inactive"):a.offerToReceiveAudio===!0&&!c&&this.addTransceiver("audio",{direction:"recvonly"}),typeof a.offerToReceiveVideo<"u"&&(a.offerToReceiveVideo=!!a.offerToReceiveVideo);var f=this.getTransceivers().find(function(v){return v.receiver.track.kind==="video"});a.offerToReceiveVideo===!1&&f?f.direction==="sendrecv"?f.setDirection?f.setDirection("sendonly"):f.direction="sendonly":f.direction==="recvonly"&&(f.setDirection?f.setDirection("inactive"):f.direction="inactive"):a.offerToReceiveVideo===!0&&!f&&this.addTransceiver("video",{direction:"recvonly"})}return i.apply(this,arguments)}}function fi(r){me(r)!=="object"||r.AudioContext||(r.AudioContext=r.webkitAudioContext)}const hi=r=>{let i=!1,a;return(...c)=>(i||(a=r(c),i=!0),a)};function ue(r,i){if(r===!1)throw new Error(i??"assertion failure")}const pi=hi(()=>{const r=Wo(window);switch(r.browser){case"chrome":qo(window,r);break;case"firefox":Zo(window,r);break;case"safari":ni(window,r);break;default:throw new kr}});let _e=Promise.resolve({type:"stop",data:{}});async function wr(r,i,a){var c,f,v;if(window.isSecureContext!==!0)throw new Ro;if(((c=navigator==null?void 0:navigator.mediaDevices)==null?void 0:c.getUserMedia)===void 0)throw new kr;pi();const y=await navigator.mediaDevices.getUserMedia({audio:!1,video:i});r.srcObject!==void 0?r.srcObject=y:r.mozSrcObject!==void 0?r.mozSrcObject=y:window.URL.createObjectURL?r.src=window.URL.createObjectURL(y):window.webkitURL?r.src=window.webkitURL.createObjectURL(y):r.src=y.id,r.play(),await Promise.race([Rr(r,"loadeddata"),mr(3e3).then(()=>{throw new ko})]),await mr(500);const[S]=y.getVideoTracks(),h=(v=(f=S==null?void 0:S.getCapabilities)==null?void 0:f.call(S))!=null?v:{};let w=!1;return a&&h.torch&&(await S.applyConstraints({advanced:[{torch:!0}]}),w=!0),{type:"start",data:{videoEl:r,stream:y,capabilities:h,constraints:i,isTorchOn:w}}}async function vi(r,{constraints:i,torch:a,restart:c=!1}){_e=_e.then(v=>{if(v.type==="start"){const{data:{videoEl:y,stream:S,constraints:h,isTorchOn:w}}=v;return!c&&r===y&&i===h&&a===w?v:Gr(y,S,w).then(()=>wr(r,i,a))}return wr(r,i,a)});const f=await _e;if(f.type==="stop")throw new Error("Something went wrong with the camera task queue (start task).");return f.data.capabilities}async function Gr(r,i,a){r.src="",r.srcObject=null,r.load(),await Rr(r,"error");for(const c of i.getTracks())a!=null||await c.applyConstraints({advanced:[{torch:!1}]}),i.removeTrack(c),c.stop();return{type:"stop",data:{}}}async function rt(){if(_e=_e.then(r=>{if(r.type==="stop")return r;const{data:{videoEl:i,stream:a,isTorchOn:c}}=r;return Gr(i,a,c)}),(await _e).type==="start")throw new Error("Something went wrong with the camera task queue (stop task).")}const mi=R.defineComponent({__name:"QrcodeStream",props:{constraints:{type:Object,default(){return{facingMode:"environment"}}},formats:{type:Array,default:()=>["qr_code"]},paused:{type:Boolean,default:!1},torch:{type:Boolean,default:!1},track:{type:Function}},emits:["detect","camera-on","camera-off","error"],setup(r,{emit:i}){const a=r,c=i,f=R.ref(a.constraints),v=R.ref(a.formats);R.watch(()=>a.constraints,(k,O)=>{JSON.stringify(k)!==JSON.stringify(O)&&(f.value=k)},{deep:!0}),R.watch(()=>a.formats,(k,O)=>{JSON.stringify(k)!==JSON.stringify(O)&&(v.value=k)},{deep:!0});const y=R.ref(),S=R.ref(),h=R.ref(),w=R.ref(!1),T=R.ref(!1);R.onMounted(()=>{T.value=!0}),R.onUnmounted(()=>{rt()});const b=R.computed(()=>({torch:a.torch,constraints:f.value,shouldStream:T.value&&!a.paused}));R.watch(b,async k=>{const O=h.value;ue(O!==void 0,"cameraSettings watcher should never be triggered when component is not mounted. Thus video element should always be defined.");const M=y.value;ue(M!==void 0,"cameraSettings watcher should never be triggered when component is not mounted. Thus canvas should always be defined.");const de=M.getContext("2d");if(ue(de!==null,"if cavnas is defined, canvas 2d context should also be non-null"),k.shouldStream){rt(),w.value=!1;try{const oe=await vi(O,k);T.value?(w.value=!0,c("camera-on",oe)):await rt()}catch(oe){c("error",oe)}}else M.width=O.videoWidth,M.height=O.videoHeight,de.drawImage(O,0,0,O.videoWidth,O.videoHeight),rt(),w.value=!1,c("camera-off")},{deep:!0}),R.watch(v,k=>{T.value&&Fo(k)});const j=R.computed(()=>b.value.shouldStream&&w.value);R.watch(j,k=>{if(k){ue(y.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus pause frame canvas is defined"),D(y.value),ue(S.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus tracking canvas is defined"),D(S.value);const O=()=>a.track===void 0?500:40;ue(h.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus video element is defined"),Io(h.value,{detectHandler:M=>c("detect",M),formats:v.value,locateHandler:x,minDelay:O()})}});const D=k=>{const O=k.getContext("2d");ue(O!==null,"canvas 2d context should always be non-null"),O.clearRect(0,0,k.width,k.height)},x=k=>{const O=S.value;ue(O!==void 0,"onLocate handler should only be called when component is mounted. Thus tracking canvas is always defined.");const M=h.value;if(ue(M!==void 0,"onLocate handler should only be called when component is mounted. Thus video element is always defined."),k.length===0||a.track===void 0)D(O);else{const de=M.offsetWidth,oe=M.offsetHeight,be=M.videoWidth,Ce=M.videoHeight,Oe=Math.max(de/be,oe/Ce),Me=be*Oe,Ue=Ce*Oe,it=Me/be,st=Ue/Ce,ct=(de-Me)/2,ut=(oe-Ue)/2,Ae=({x:fe,y:K})=>({x:Math.floor(fe*it),y:Math.floor(K*st)}),te=({x:fe,y:K})=>({x:Math.floor(fe+ct),y:Math.floor(K+ut)}),ye=k.map(fe=>{const{boundingBox:K,cornerPoints:dt}=fe,{x:Le,y:he}=te(Ae({x:K.x,y:K.y})),{x:He,y:ft}=Ae({x:K.width,y:K.height});return{...fe,cornerPoints:dt.map(Ne=>te(Ae(Ne))),boundingBox:DOMRectReadOnly.fromRect({x:Le,y:he,width:He,height:ft})}});O.width=M.offsetWidth,O.height=M.offsetHeight;const lt=O.getContext("2d");a.track(ye,lt)}},I={width:"100%",height:"100%",position:"relative","z-index":"0"},W={width:"100%",height:"100%",position:"absolute",top:"0",left:"0"},G={width:"100%",height:"100%","object-fit":"cover"},le=R.computed(()=>j.value?G:{...G,visibility:"hidden",position:"absolute"});return(k,O)=>(R.openBlock(),R.createElementBlock("div",{style:I},[R.createElementVNode("video",{ref_key:"videoRef",ref:h,style:R.normalizeStyle(le.value),autoplay:"",muted:"",playsinline:""},null,4),R.withDirectives(R.createElementVNode("canvas",{id:"qrcode-stream-pause-frame",ref_key:"pauseFrameRef",ref:y,style:G},null,512),[[R.vShow,!j.value]]),R.createElementVNode("canvas",{id:"qrcode-stream-tracking-layer",ref_key:"trackingLayerRef",ref:S,style:W},null,512),R.createElementVNode("div",{style:W},[R.renderSlot(k.$slots,"default")])]))}});exports.QrcodeStream=mi;
@@ -6,7 +6,7 @@ var $r = (r, i, a) => {
6
6
  if (i.has(r))
7
7
  throw TypeError("Cannot add the same private member more than once");
8
8
  i instanceof WeakSet ? i.add(r) : i.set(r, a);
9
- }, go = (r, i, a, c) => ($r(r, i, "write to private field"), c ? c.call(r, a) : i.set(r, a), a);
9
+ }, go = (r, i, a, c) => ($r(r, i, "write to private field"), i.set(r, a), a);
10
10
  const Sr = [
11
11
  ["aztec", "Aztec"],
12
12
  ["code_128", "Code128"],
@@ -376,9 +376,9 @@ let gr = /* @__PURE__ */ new WeakMap();
376
376
  function Ft(r, i) {
377
377
  var a;
378
378
  const c = gr.get(r);
379
- if (c != null && c.modulePromise && (i === void 0 || Object.is(i, c.moduleOverrides)))
379
+ if (c != null && c.modulePromise && i === void 0)
380
380
  return c.modulePromise;
381
- const f = (a = i ?? (c == null ? void 0 : c.moduleOverrides)) != null ? a : Lo, v = r({
381
+ const f = (a = c == null ? void 0 : c.moduleOverrides) != null ? a : Lo, v = r({
382
382
  ...f
383
383
  });
384
384
  return gr.set(r, {
@@ -1652,8 +1652,8 @@ var It = (() => {
1652
1652
  return n;
1653
1653
  };
1654
1654
  function ka(e, t, n) {
1655
- var o = n > 0 ? n : Zt(e) + 1, s = new Array(o), u = Kt(e, s, 0, s.length);
1656
- return t && (s.length = u), s;
1655
+ var o = Zt(e) + 1, s = new Array(o);
1656
+ return Kt(e, s, 0, s.length), s;
1657
1657
  }
1658
1658
  var Fa = (e, t) => {
1659
1659
  I.set(e, t);
@@ -1803,7 +1803,7 @@ var It = (() => {
1803
1803
  for (var p in k)
1804
1804
  l.includes(p) && (l = l.replace(new RegExp(p, "g"), k[p](u)));
1805
1805
  l = l.replace(/\0\0/g, "%");
1806
- var q = ka(l, !1);
1806
+ var q = ka(l);
1807
1807
  return q.length > t ? 0 : (Fa(q, e), q.length - 1);
1808
1808
  }, Wa = (e, t, n, o, s) => Ia(e, t, n, o);
1809
1809
  Wt = a.InternalError = class extends Error {
@@ -2458,7 +2458,7 @@ function Vr(r) {
2458
2458
  })(r);
2459
2459
  }
2460
2460
  function ui(r, i) {
2461
- if (!i && r && r.__esModule)
2461
+ if (r && r.__esModule)
2462
2462
  return r;
2463
2463
  if (r === null || he(r) !== "object" && typeof r != "function")
2464
2464
  return { default: r };
@@ -2606,7 +2606,7 @@ function zr(r) {
2606
2606
  })(r);
2607
2607
  }
2608
2608
  function hi(r, i) {
2609
- if (!i && r && r.__esModule)
2609
+ if (r && r.__esModule)
2610
2610
  return r;
2611
2611
  if (r === null || Pe(r) !== "object" && typeof r != "function")
2612
2612
  return { default: r };
@@ -2677,7 +2677,7 @@ function Jr(r) {
2677
2677
  })(r);
2678
2678
  }
2679
2679
  function mi(r, i) {
2680
- if (!i && r && r.__esModule)
2680
+ if (r && r.__esModule)
2681
2681
  return r;
2682
2682
  if (r === null || ve(r) !== "object" && typeof r != "function")
2683
2683
  return { default: r };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../../../../web3-errors/lib/esm/errors/transaction_errors.cjs");require("../../../../web3-errors/lib/esm/errors/rpc_errors.cjs");const E=require("./get_revert_reason.cjs");var g=function(s,a,r,t){function f(o){return o instanceof r?o:new r(function(e){e(o)})}return new(r||(r=Promise))(function(o,e){function i(u){try{c(t.next(u))}catch(l){e(l)}}function n(u){try{c(t.throw(u))}catch(l){e(l)}}function c(u){u.done?o(u.value):f(u.value).then(i,n)}c((t=t.apply(s,a||[])).next())})};function m(s,a,r,t,f,o){return g(this,void 0,void 0,function*(){let e=o;e===void 0&&(t!==void 0?e=E.parseTransactionError(t):s.handleRevert&&a!==void 0&&(e=yield E.getRevertReason(s,a,f)));let i;if(e===void 0)i=new d.TransactionRevertedWithoutReasonError(r);else if(typeof e=="string")i=new d.TransactionRevertInstructionError(e,void 0,r);else if(e.customErrorName!==void 0&&e.customErrorDecodedSignature!==void 0&&e.customErrorArguments!==void 0){const n=e;i=new d.TransactionRevertWithCustomError(n.reason,n.customErrorName,n.customErrorDecodedSignature,n.customErrorArguments,n.signature,r,n.data)}else i=new d.TransactionRevertInstructionError(e.reason,e.signature,r,e.data);return i})}exports.getTransactionError=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../../../../web3-errors/lib/esm/errors/transaction_errors.cjs");require("../../../../web3-errors/lib/esm/errors/rpc_errors.cjs");const l=require("./get_revert_reason.cjs");var v=function(s,d,r,u){function a(t){return t instanceof r?t:new r(function(e){e(t)})}return new(r||(r=Promise))(function(t,e){function o(i){try{f(u.next(i))}catch(E){e(E)}}function n(i){try{f(u.throw(i))}catch(E){e(E)}}function f(i){i.done?t(i.value):a(i.value).then(o,n)}f((u=u.apply(s,d||[])).next())})};function g(s,d,r,u,a,t){return v(this,void 0,void 0,function*(){let e=t;e===void 0&&s.handleRevert&&d!==void 0&&(e=yield l.getRevertReason(s,d,a));let o;if(e===void 0)o=new c.TransactionRevertedWithoutReasonError(r);else if(typeof e=="string")o=new c.TransactionRevertInstructionError(e,void 0,r);else if(e.customErrorName!==void 0&&e.customErrorDecodedSignature!==void 0&&e.customErrorArguments!==void 0){const n=e;o=new c.TransactionRevertWithCustomError(n.reason,n.customErrorName,n.customErrorDecodedSignature,n.customErrorArguments,n.signature,r,n.data)}else o=new c.TransactionRevertInstructionError(e.reason,e.signature,r,e.data);return o})}exports.getTransactionError=g;
@@ -1,50 +1,50 @@
1
- import { TransactionRevertedWithoutReasonError as E, TransactionRevertInstructionError as m, TransactionRevertWithCustomError as l } from "../../../../web3-errors/lib/esm/errors/transaction_errors.js";
1
+ import { TransactionRevertedWithoutReasonError as E, TransactionRevertInstructionError as m, TransactionRevertWithCustomError as h } from "../../../../web3-errors/lib/esm/errors/transaction_errors.js";
2
2
  import "../../../../web3-errors/lib/esm/errors/rpc_errors.js";
3
- import { parseTransactionError as h, getRevertReason as w } from "./get_revert_reason.js";
4
- var p = function(f, d, e, o) {
5
- function s(t) {
6
- return t instanceof e ? t : new e(function(n) {
7
- n(t);
3
+ import { getRevertReason as l } from "./get_revert_reason.js";
4
+ var v = function(d, f, r, u) {
5
+ function s(o) {
6
+ return o instanceof r ? o : new r(function(e) {
7
+ e(o);
8
8
  });
9
9
  }
10
- return new (e || (e = Promise))(function(t, n) {
11
- function i(u) {
10
+ return new (r || (r = Promise))(function(o, e) {
11
+ function t(i) {
12
12
  try {
13
- a(o.next(u));
14
- } catch (c) {
15
- n(c);
13
+ c(u.next(i));
14
+ } catch (a) {
15
+ e(a);
16
16
  }
17
17
  }
18
- function r(u) {
18
+ function n(i) {
19
19
  try {
20
- a(o.throw(u));
21
- } catch (c) {
22
- n(c);
20
+ c(u.throw(i));
21
+ } catch (a) {
22
+ e(a);
23
23
  }
24
24
  }
25
- function a(u) {
26
- u.done ? t(u.value) : s(u.value).then(i, r);
25
+ function c(i) {
26
+ i.done ? o(i.value) : s(i.value).then(t, n);
27
27
  }
28
- a((o = o.apply(f, d || [])).next());
28
+ c((u = u.apply(d, f || [])).next());
29
29
  });
30
30
  };
31
- function T(f, d, e, o, s, t) {
32
- return p(this, void 0, void 0, function* () {
33
- let n = t;
34
- n === void 0 && (o !== void 0 ? n = h(o) : f.handleRevert && d !== void 0 && (n = yield w(f, d, s)));
35
- let i;
36
- if (n === void 0)
37
- i = new E(e);
38
- else if (typeof n == "string")
39
- i = new m(n, void 0, e);
40
- else if (n.customErrorName !== void 0 && n.customErrorDecodedSignature !== void 0 && n.customErrorArguments !== void 0) {
41
- const r = n;
42
- i = new l(r.reason, r.customErrorName, r.customErrorDecodedSignature, r.customErrorArguments, r.signature, e, r.data);
31
+ function y(d, f, r, u, s, o) {
32
+ return v(this, void 0, void 0, function* () {
33
+ let e = o;
34
+ e === void 0 && d.handleRevert && f !== void 0 && (e = yield l(d, f, s));
35
+ let t;
36
+ if (e === void 0)
37
+ t = new E(r);
38
+ else if (typeof e == "string")
39
+ t = new m(e, void 0, r);
40
+ else if (e.customErrorName !== void 0 && e.customErrorDecodedSignature !== void 0 && e.customErrorArguments !== void 0) {
41
+ const n = e;
42
+ t = new h(n.reason, n.customErrorName, n.customErrorDecodedSignature, n.customErrorArguments, n.signature, r, n.data);
43
43
  } else
44
- i = new m(n.reason, n.signature, e, n.data);
45
- return i;
44
+ t = new m(e.reason, e.signature, r, e.data);
45
+ return t;
46
46
  });
47
47
  }
48
48
  export {
49
- T as getTransactionError
49
+ y as getTransactionError
50
50
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../../../web3-errors/lib/esm/errors/generic_errors.cjs");require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");const s=require("../../../web3-utils/lib/esm/validation.cjs"),p=t=>!s.isNullish(t)&&typeof t=="object"&&!s.isNullish(t.type)&&t.type==="error",l=t=>!s.isNullish(t)&&typeof t=="object"&&!s.isNullish(t.type)&&t.type==="event",y=t=>!s.isNullish(t)&&typeof t=="object"&&!s.isNullish(t.type)&&t.type==="function",d=t=>!s.isNullish(t)&&typeof t=="object"&&!s.isNullish(t.type)&&t.type==="constructor",h=t=>typeof t=="object"&&typeof t.components>"u"&&typeof t.name>"u",f=t=>t.includes("[]")?{type:"tuple[]",name:t.slice(0,-2)}:{type:"tuple",name:t},a=t=>{const o=[];for(const e of Object.keys(t)){const n=t[e];typeof n=="object"?o.push(Object.assign(Object.assign({},f(e)),{components:a(n)})):o.push({name:e,type:t[e]})}return o},c=(t,o)=>{const e=[];return o.forEach(n=>{if(typeof n.components=="object"){if(!n.type.startsWith("tuple"))throw new b.AbiError(`Invalid value given "${n.type}". Error: components found but type is not tuple.`);const i=n.type.indexOf("["),u=i>=0?n.type.substring(i):"",r=c(t,n.components);Array.isArray(r)&&t?e.push(`tuple(${r.join(",")})${u}`):t?e.push(`(${r.join()})`):e.push(`(${r.join(",")})${u}`)}else e.push(n.type)}),e},g=t=>{var o,e,n,i;return p(t)||l(t)||y(t)?!((o=t.name)===null||o===void 0)&&o.includes("(")?t.name:`${(e=t.name)!==null&&e!==void 0?e:""}(${c(!1,(n=t.inputs)!==null&&n!==void 0?n:[]).join(",")})`:`(${c(!1,(i=t.inputs)!==null&&i!==void 0?i:[]).join(",")})`};exports.flattenTypes=c;exports.isAbiConstructorFragment=d;exports.isAbiErrorFragment=p;exports.isAbiEventFragment=l;exports.isAbiFunctionFragment=y;exports.isSimplifiedStructFormat=h;exports.jsonInterfaceMethodToString=g;exports.mapStructNameAndType=f;exports.mapStructToCoderFormat=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../../../web3-errors/lib/esm/errors/generic_errors.cjs");require("../../../web3-errors/lib/esm/errors/rpc_errors.cjs");const s=require("../../../web3-utils/lib/esm/validation.cjs"),p=t=>!s.isNullish(t)&&typeof t=="object"&&!s.isNullish(t.type)&&t.type==="error",l=t=>!s.isNullish(t)&&typeof t=="object"&&!s.isNullish(t.type)&&t.type==="event",y=t=>!s.isNullish(t)&&typeof t=="object"&&!s.isNullish(t.type)&&t.type==="function",b=t=>!s.isNullish(t)&&typeof t=="object"&&!s.isNullish(t.type)&&t.type==="constructor",h=t=>typeof t=="object"&&typeof t.components>"u"&&typeof t.name>"u",a=t=>t.includes("[]")?{type:"tuple[]",name:t.slice(0,-2)}:{type:"tuple",name:t},f=t=>{const o=[];for(const n of Object.keys(t)){const e=t[n];typeof e=="object"?o.push(Object.assign(Object.assign({},a(n)),{components:f(e)})):o.push({name:n,type:t[n]})}return o},r=(t,o)=>{const n=[];return o.forEach(e=>{if(typeof e.components=="object"){if(!e.type.startsWith("tuple"))throw new d.AbiError(`Invalid value given "${e.type}". Error: components found but type is not tuple.`);const i=e.type.indexOf("["),u=i>=0?e.type.substring(i):"",c=r(t,e.components);Array.isArray(c)&&t?n.push(`tuple(${c.join(",")})${u}`):n.push(`(${c.join(",")})${u}`)}else n.push(e.type)}),n},g=t=>{var o,n,e,i;return p(t)||l(t)||y(t)?!((o=t.name)===null||o===void 0)&&o.includes("(")?t.name:`${(n=t.name)!==null&&n!==void 0?n:""}(${r(!1,(e=t.inputs)!==null&&e!==void 0?e:[]).join(",")})`:`(${r(!1,(i=t.inputs)!==null&&i!==void 0?i:[]).join(",")})`};exports.flattenTypes=r;exports.isAbiConstructorFragment=b;exports.isAbiErrorFragment=p;exports.isAbiEventFragment=l;exports.isAbiFunctionFragment=y;exports.isSimplifiedStructFormat=h;exports.jsonInterfaceMethodToString=g;exports.mapStructNameAndType=a;exports.mapStructToCoderFormat=f;