@utogether/udp-core 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (343) hide show
  1. package/build/index.ts +90 -0
  2. package/build/plugins.ts +26 -0
  3. package/dist/403-B1R-4vXw.js +64 -0
  4. package/dist/404-fXPl8csw.js +64 -0
  5. package/dist/500-eI5842YB.js +66 -0
  6. package/dist/AuthorityInfo-CfVH6PaB.js +4 -0
  7. package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-DbK-f8jH.js +102 -0
  8. package/dist/AuthorityPanel-BaLMwMgW.js +4 -0
  9. package/dist/AuthorityPanel.vue_vue_type_style_index_0_lang-C_bkqLD9.js +107 -0
  10. package/dist/Company-CYC9Avfz.js +25 -0
  11. package/dist/CompanyPanel-B4MzoqN_.js +206 -0
  12. package/dist/DataSet-DT-rGICv.js +147 -0
  13. package/dist/Department-B4BNSiYx.js +25 -0
  14. package/dist/DepartmentPanel-zJO89L2O.js +224 -0
  15. package/dist/DesignPanel-S8P0J97f.js +4 -0
  16. package/dist/DesignPanel.vue_vue_type_style_index_0_lang-DW-_Vqrr.js +1015 -0
  17. package/dist/DictView-bIS5-rK-.js +95 -0
  18. package/dist/InvOrganization-MuM2jtsG.js +66 -0
  19. package/dist/Org-kXHSjsgJ.js +35 -0
  20. package/dist/Preview-CRyiwUIR.js +48 -0
  21. package/dist/ReportDefine-WZYIx8Sm.js +10 -0
  22. package/dist/ReportDesign-D-7GKgpb.js +165 -0
  23. package/dist/ReportQuery-BIIJny6w.js +75 -0
  24. package/dist/ReportQueryFrom-OoUl7N2O.js +4 -0
  25. package/dist/ReportQueryFrom.vue_vue_type_style_index_0_lang-B878fgj8.js +177 -0
  26. package/dist/ReportTemplate-Cfeq9US-.js +161 -0
  27. package/dist/Role-BwTV2QMH.js +25 -0
  28. package/dist/RoleAssign-De1JjOun.js +26 -0
  29. package/dist/RolePanel-E3RcdByM.js +4 -0
  30. package/dist/RolePanel-pUBXsqCM.js +4 -0
  31. package/dist/RolePanel.vue_vue_type_script_setup_true_lang-B2pQwHb0.js +148 -0
  32. package/dist/RolePanel.vue_vue_type_script_setup_true_lang-CTIad9_Q.js +126 -0
  33. package/dist/ScrollPanel.vue_vue_type_style_index_0_lang-vMR1fBi0.js +100 -0
  34. package/dist/Staff-Czm7A8vI.js +25 -0
  35. package/dist/StaffInfo-DJzvBuxy.js +4 -0
  36. package/dist/StaffInfo.vue_vue_type_style_index_0_lang-DMTL7KCh.js +108 -0
  37. package/dist/StaffPanel-CHk60LEz.js +4 -0
  38. package/dist/StaffPanel.vue_vue_type_script_setup_true_lang-iPKLb5wG.js +114 -0
  39. package/dist/SysUser-BGwbttRn.js +15 -0
  40. package/dist/SysUserPanel-BCbKoLKt.js +4 -0
  41. package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-0QUjnhjF.js +289 -0
  42. package/dist/SystemMenu-BkqZSDKl.js +151 -0
  43. package/dist/UserInfo-BsyAcT2d.js +4 -0
  44. package/dist/UserInfo.vue_vue_type_style_index_0_lang-D0-KDxAh.js +158 -0
  45. package/dist/await-to-js.es5-BtRbN2QH.js +10 -0
  46. package/dist/childView-CF83nhxb.js +4 -0
  47. package/dist/childView-CyuLTUqC.js +4 -0
  48. package/dist/childView.vue_vue_type_style_index_0_lang-CNSgGda3.js +187 -0
  49. package/dist/childView.vue_vue_type_style_index_0_lang-Cch4lE-i.js +144 -0
  50. package/dist/code-rule-Bz-gnktN.js +147 -0
  51. package/dist/core.es.js +13 -0
  52. package/dist/core.umd.js +173 -0
  53. package/dist/cron-task-CIifSUdW.js +135 -0
  54. package/dist/frameView-_d2mqjjQ.js +43 -0
  55. package/dist/img/l_img.svg +1 -0
  56. package/dist/img/minicolors.png +0 -0
  57. package/dist/img/v_img.svg +1 -0
  58. package/dist/index-BKIw8tSn.js +9195 -0
  59. package/dist/layoutView-DLKVepB8.js +3317 -0
  60. package/dist/log-in-e7D5Ss1P.js +110 -0
  61. package/dist/log-out--RRncZhN.js +120 -0
  62. package/dist/login-LREiDfFU.js +251 -0
  63. package/dist/login-log-CvVnyGi3.js +68 -0
  64. package/dist/lov-view-DDrIVILB.js +97 -0
  65. package/dist/menuInfo-B1FUV-Sk.js +4 -0
  66. package/dist/menuInfo.vue_vue_type_style_index_0_lang-Cnk3vdtD.js +338 -0
  67. package/dist/pda-app-CRhVGijN.js +2209 -0
  68. package/dist/redirect-DiaNDu8F.js +15 -0
  69. package/dist/resource-BCwx9fEv.js +97 -0
  70. package/dist/su-welcome-189A7N4r.js +526 -0
  71. package/dist/sys-config-BZ3sejow.js +277 -0
  72. package/dist/udp-core.css +9 -0
  73. package/dist/utogether-r08LNiIZ.js +182 -0
  74. package/index.ts +36 -0
  75. package/package.json +16 -0
  76. package/public/img/l_img.svg +1 -0
  77. package/public/img/minicolors.png +0 -0
  78. package/public/img/v_img.svg +1 -0
  79. package/src/App.vue +70 -0
  80. package/src/api/http.ts +50 -0
  81. package/src/api/index.ts +31 -0
  82. package/src/api/mock.ts +20 -0
  83. package/src/api/user.ts +43 -0
  84. package/src/assets/images/avatars.jpg +0 -0
  85. package/src/assets/images/empty.png +0 -0
  86. package/src/assets/images/login.png +0 -0
  87. package/src/assets/images/logo.png +0 -0
  88. package/src/assets/images/mask-text.jpg +0 -0
  89. package/src/assets/images/minicolors.png +0 -0
  90. package/src/assets/images/utogether.png +0 -0
  91. package/src/assets/images/welcome.png +0 -0
  92. package/src/assets/status/403.svg +1 -0
  93. package/src/assets/status/404.svg +1 -0
  94. package/src/assets/status/500.svg +1 -0
  95. package/src/assets/svg/back_top.svg +1 -0
  96. package/src/assets/svg/bg.svg +1 -0
  97. package/src/assets/svg/close.svg +1 -0
  98. package/src/assets/svg/close_all.svg +1 -0
  99. package/src/assets/svg/close_left.svg +1 -0
  100. package/src/assets/svg/close_other.svg +1 -0
  101. package/src/assets/svg/close_right.svg +1 -0
  102. package/src/assets/svg/dark.svg +1 -0
  103. package/src/assets/svg/day.svg +1 -0
  104. package/src/assets/svg/enter_outlined.svg +1 -0
  105. package/src/assets/svg/exit_screen.svg +1 -0
  106. package/src/assets/svg/full_screen.svg +1 -0
  107. package/src/assets/svg/globalization.svg +1 -0
  108. package/src/assets/svg/loading.svg +17 -0
  109. package/src/assets/svg/mdi_keyboard_esc.svg +1 -0
  110. package/src/assets/svg/refresh.svg +1 -0
  111. package/src/assets/svg/system.svg +1 -0
  112. package/src/components/ReCountTo/README.md +2 -0
  113. package/src/components/ReCountTo/index.ts +18 -0
  114. package/src/components/ReCountTo/src/normal/index.tsx +165 -0
  115. package/src/components/ReCountTo/src/normal/props.ts +37 -0
  116. package/src/components/ReCountTo/src/rebound/index.tsx +67 -0
  117. package/src/components/ReCountTo/src/rebound/props.ts +14 -0
  118. package/src/components/ReCountTo/src/rebound/rebound.css +77 -0
  119. package/src/components/ReCropper/index.ts +14 -0
  120. package/src/components/ReCropper/src/index.tsx +141 -0
  121. package/src/components/ReFlicker/index.css +39 -0
  122. package/src/components/ReFlicker/index.ts +50 -0
  123. package/src/components/ReFlop/index.ts +14 -0
  124. package/src/components/ReFlop/src/Filpper.tsx +99 -0
  125. package/src/components/ReFlop/src/filpper.css +184 -0
  126. package/src/components/ReFlop/src/index.vue +126 -0
  127. package/src/components/ReFlowChart/index.ts +24 -0
  128. package/src/components/ReFlowChart/src/Control.vue +139 -0
  129. package/src/components/ReFlowChart/src/DataDialog.vue +12 -0
  130. package/src/components/ReFlowChart/src/NodePanel.vue +151 -0
  131. package/src/components/ReFlowChart/src/adpterForTurbo.ts +160 -0
  132. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.css +49 -0
  133. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.eot +0 -0
  134. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.js +61 -0
  135. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.json +58 -0
  136. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.svg +47 -0
  137. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.ttf +0 -0
  138. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.woff +0 -0
  139. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.woff2 +0 -0
  140. package/src/components/ReFlowChart/src/config.ts +62 -0
  141. package/src/components/ReIcon/index.ts +12 -0
  142. package/src/components/ReIcon/src/Icon.vue +81 -0
  143. package/src/components/ReIcon/src/hooks.ts +63 -0
  144. package/src/components/ReIcon/src/iconfont.ts +45 -0
  145. package/src/components/ReIcon/src/iconifyIconOffline.ts +36 -0
  146. package/src/components/ReIcon/src/iconifyIconOnline.ts +28 -0
  147. package/src/components/ReIcon/src/offlineIcon.ts +64 -0
  148. package/src/components/ReIcon/src/types.ts +20 -0
  149. package/src/components/ReSplitPane/index.css +49 -0
  150. package/src/components/ReSplitPane/index.tsx +119 -0
  151. package/src/components/ReSplitPane/resizer.css +45 -0
  152. package/src/components/ReSplitPane/resizer.tsx +30 -0
  153. package/src/components/SuCharts/index.ts +36 -0
  154. package/src/components/SuCharts/src/EchartBar.vue +134 -0
  155. package/src/components/SuCharts/src/UserInfo.vue +78 -0
  156. package/src/components/SuCharts/src/echart-line.vue +85 -0
  157. package/src/components/SuCharts/src/echart-pie.vue +95 -0
  158. package/src/components/SuCommon/card/components/Card.vue +148 -0
  159. package/src/components/SuCommon/card/components/DialogForm.vue +127 -0
  160. package/src/components/SuCommon/card/index.vue +142 -0
  161. package/src/components/SuCommon/icon-select/index.vue +241 -0
  162. package/src/components/SuCommon/table/index.vue +208 -0
  163. package/src/components/SuCommon/utils/index.ts +103 -0
  164. package/src/components/SuCommon/utils/slot.tsx +50 -0
  165. package/src/components/SuFloatButton/index.vue +159 -0
  166. package/src/components/SuQrcode/index.ts +14 -0
  167. package/src/components/SuQrcode/src/index.scss +9 -0
  168. package/src/components/SuQrcode/src/index.tsx +236 -0
  169. package/src/components/SuScrollTree/ScrollPanel.vue +175 -0
  170. package/src/components/SuTable/SuTable.vue +334 -0
  171. package/src/components/SuTypeit/index.ts +51 -0
  172. package/src/config/index.ts +35 -0
  173. package/src/contant/index.ts +20 -0
  174. package/src/directives/elResizeDetector/index.ts +33 -0
  175. package/src/directives/index.ts +11 -0
  176. package/src/directives/permission/index.ts +29 -0
  177. package/src/layout/components/lay-chrome/index.vue +30 -0
  178. package/src/layout/components/lay-content/index.vue +143 -0
  179. package/src/layout/components/lay-navbar/index.vue +237 -0
  180. package/src/layout/components/lay-notice/data.ts +59 -0
  181. package/src/layout/components/lay-notice/index.vue +83 -0
  182. package/src/layout/components/lay-notice/noticeItem.vue +160 -0
  183. package/src/layout/components/lay-notice/noticeList.vue +19 -0
  184. package/src/layout/components/lay-panel/index.vue +150 -0
  185. package/src/layout/components/lay-search/components/SearchFooter.vue +67 -0
  186. package/src/layout/components/lay-search/components/SearchModal.vue +189 -0
  187. package/src/layout/components/lay-search/components/SearchResult.vue +132 -0
  188. package/src/layout/components/lay-search/components/index.ts +10 -0
  189. package/src/layout/components/lay-search/index.vue +25 -0
  190. package/src/layout/components/lay-select-org/index.vue +69 -0
  191. package/src/layout/components/lay-setting/index.vue +510 -0
  192. package/src/layout/components/lay-sidebar/breadCrumb.vue +131 -0
  193. package/src/layout/components/lay-sidebar/extraIcon.vue +25 -0
  194. package/src/layout/components/lay-sidebar/hamBurger.vue +72 -0
  195. package/src/layout/components/lay-sidebar/horizontal.vue +191 -0
  196. package/src/layout/components/lay-sidebar/mixNav.vue +258 -0
  197. package/src/layout/components/lay-sidebar/sidebar-logo.vue +98 -0
  198. package/src/layout/components/lay-sidebar/sidebarItem.vue +205 -0
  199. package/src/layout/components/lay-sidebar/vertical.vue +94 -0
  200. package/src/layout/components/lay-tag/index.scss +375 -0
  201. package/src/layout/components/lay-tag/index.vue +625 -0
  202. package/src/layout/frameView.vue +71 -0
  203. package/src/layout/hooks/useBoolean.ts +33 -0
  204. package/src/layout/hooks/useDataThemeChange.ts +142 -0
  205. package/src/layout/hooks/useLayout.ts +65 -0
  206. package/src/layout/hooks/useNav.ts +173 -0
  207. package/src/layout/hooks/useTag.ts +233 -0
  208. package/src/layout/hooks/useTranslationLang.ts +51 -0
  209. package/src/layout/layoutView.vue +215 -0
  210. package/src/layout/redirect.vue +30 -0
  211. package/src/layout/routerView/parent.vue +23 -0
  212. package/src/layout/types.ts +92 -0
  213. package/src/main.ts +108 -0
  214. package/src/plugins/echarts/index.ts +58 -0
  215. package/src/plugins/echarts/theme.json +394 -0
  216. package/src/plugins/i18n/en.ts +289 -0
  217. package/src/plugins/i18n/index.ts +76 -0
  218. package/src/plugins/i18n/module/u-report.ts +64 -0
  219. package/src/plugins/i18n/module/u-workflow.ts +71 -0
  220. package/src/plugins/i18n/module/umsg.ts +28 -0
  221. package/src/plugins/i18n/zh.ts +337 -0
  222. package/src/plugins/vxe-table/index.ts +46 -0
  223. package/src/plugins/vxe-table/render.tsx +397 -0
  224. package/src/router/createComponent.tsx +25 -0
  225. package/src/router/index.ts +183 -0
  226. package/src/router/modules/error.ts +32 -0
  227. package/src/router/modules/home.ts +32 -0
  228. package/src/router/modules/nested.ts +93 -0
  229. package/src/router/modules/remaining.ts +83 -0
  230. package/src/router/modules/tabs.ts +55 -0
  231. package/src/router/utils.ts +377 -0
  232. package/src/store/index.ts +9 -0
  233. package/src/store/modules/app.ts +69 -0
  234. package/src/store/modules/epTheme.ts +49 -0
  235. package/src/store/modules/multiTags.ts +109 -0
  236. package/src/store/modules/permission.ts +103 -0
  237. package/src/store/modules/settings.ts +40 -0
  238. package/src/store/modules/system.ts +180 -0
  239. package/src/store/modules/types.ts +49 -0
  240. package/src/style/button.scss +78 -0
  241. package/src/style/clear-mixin.scss +28 -0
  242. package/src/style/dark.scss +218 -0
  243. package/src/style/element-plus.scss +206 -0
  244. package/src/style/index.scss +76 -0
  245. package/src/style/login.css +336 -0
  246. package/src/style/login2.css +106 -0
  247. package/src/style/print-lock.css +375 -0
  248. package/src/style/reset.scss +272 -0
  249. package/src/style/sidebar.scss +770 -0
  250. package/src/style/suprint.css +985 -0
  251. package/src/style/tailwind.css +68 -0
  252. package/src/style/theme.scss +143 -0
  253. package/src/style/transition.scss +42 -0
  254. package/src/style/vxetable.scss +256 -0
  255. package/src/utils/authority/index.ts +29 -0
  256. package/src/utils/browers.ts +59 -0
  257. package/src/utils/dataFormat/index.ts +223 -0
  258. package/src/utils/http/index.ts +297 -0
  259. package/src/utils/http/types.d.ts +46 -0
  260. package/src/utils/index.ts +47 -0
  261. package/src/utils/lifecycle.ts +20 -0
  262. package/src/utils/mitt.ts +19 -0
  263. package/src/utils/propTypes.ts +47 -0
  264. package/src/utils/storage/index.ts +51 -0
  265. package/src/views/components/contextmenu/basic.vue +74 -0
  266. package/src/views/components/contextmenu/context-menu.vue +40 -0
  267. package/src/views/components/contextmenu/menuDynamic.vue +99 -0
  268. package/src/views/components/contextmenu/menuGroup.vue +71 -0
  269. package/src/views/components/count-to/index.vue +43 -0
  270. package/src/views/components/cropping/index.vue +59 -0
  271. package/src/views/components/cropping/picture.jpeg +0 -0
  272. package/src/views/components/split-pane/index.vue +82 -0
  273. package/src/views/components/video/index.vue +57 -0
  274. package/src/views/error/403.vue +50 -0
  275. package/src/views/error/404.vue +50 -0
  276. package/src/views/error/500.vue +52 -0
  277. package/src/views/login/login-view.vue +314 -0
  278. package/src/views/login/utils/motion.ts +47 -0
  279. package/src/views/login/utils/rule.ts +70 -0
  280. package/src/views/login/utils/verifyCode.ts +52 -0
  281. package/src/views/organization/company/Company.vue +56 -0
  282. package/src/views/organization/company/CompanyPanel.vue +259 -0
  283. package/src/views/organization/department/Department.vue +58 -0
  284. package/src/views/organization/department/DepartmentPanel.vue +283 -0
  285. package/src/views/organization/inv-org/InvOrganization.vue +53 -0
  286. package/src/views/organization/org/Org.vue +43 -0
  287. package/src/views/organization/staff/Staff.vue +58 -0
  288. package/src/views/organization/staff/StaffInfo.vue +163 -0
  289. package/src/views/organization/staff/StaffPanel.vue +144 -0
  290. package/src/views/system/cron/cron-task.vue +157 -0
  291. package/src/views/system/menu/AuthorityPanel.vue +140 -0
  292. package/src/views/system/menu/SystemMenu.vue +191 -0
  293. package/src/views/system/menu/menuInfo.vue +368 -0
  294. package/src/views/system/role/AuthorityInfo.vue +147 -0
  295. package/src/views/system/role/Role.vue +57 -0
  296. package/src/views/system/role/RolePanel.vue +191 -0
  297. package/src/views/system/role/UserInfo.vue +193 -0
  298. package/src/views/system/role-assign/RoleAssign.vue +57 -0
  299. package/src/views/system/role-assign/RolePanel.vue +136 -0
  300. package/src/views/system/sys/sys-config.vue +291 -0
  301. package/src/views/system/sysUser/SysUser.vue +45 -0
  302. package/src/views/system/sysUser/SysUserPanel.vue +278 -0
  303. package/src/views/uapp/pda/pda-app.vue +176 -0
  304. package/src/views/udev/coderule/code-rule.vue +121 -0
  305. package/src/views/udev/dict/DictView.vue +106 -0
  306. package/src/views/udev/dict/childView.vue +222 -0
  307. package/src/views/udev/lov/childView.vue +180 -0
  308. package/src/views/udev/lov/lov-view.vue +91 -0
  309. package/src/views/ufile/aggregation/File.vue +87 -0
  310. package/src/views/ufile/file/water-mark.vue +103 -0
  311. package/src/views/uhome/components/menu-favorite.vue +331 -0
  312. package/src/views/uhome/su-welcome.vue +339 -0
  313. package/src/views/ulogin/login.vue +316 -0
  314. package/src/views/umsg/monitor/msg-monitor.vue +36 -0
  315. package/src/views/umsg/msg/TemplateContent.vue +103 -0
  316. package/src/views/umsg/msg/msg-template.vue +66 -0
  317. package/src/views/umsg/send/childView.vue +142 -0
  318. package/src/views/umsg/send/msg-send.vue +95 -0
  319. package/src/views/upms/interface/log-in.vue +106 -0
  320. package/src/views/upms/interface/log-out.vue +107 -0
  321. package/src/views/upms/user/login-log.vue +60 -0
  322. package/src/views/urpt/dataSet/DataSet.vue +139 -0
  323. package/src/views/urpt/design/DesignPanel.vue +526 -0
  324. package/src/views/urpt/design/Preview.vue +65 -0
  325. package/src/views/urpt/design/ReportDesign.vue +249 -0
  326. package/src/views/urpt/design/bg.png +0 -0
  327. package/src/views/urpt/design/panel.ts +841 -0
  328. package/src/views/urpt/design/print-data.ts +59 -0
  329. package/src/views/urpt/query/ReportQuery.vue +122 -0
  330. package/src/views/urpt/query/ReportQueryFrom.vue +252 -0
  331. package/src/views/urpt/report-request/ReportDefine.vue +10 -0
  332. package/src/views/urpt/static-resource/resource.vue +116 -0
  333. package/src/views/urpt/template/ReportTemplate.vue +198 -0
  334. package/tsconfig.json +30 -0
  335. package/types/env.d.ts +1 -0
  336. package/types/global-components.d.ts +12 -0
  337. package/types/global.d.ts +236 -0
  338. package/types/image.d.ts +7 -0
  339. package/types/index.d.ts +73 -0
  340. package/types/router.d.ts +107 -0
  341. package/types/shims-tsx.d.ts +22 -0
  342. package/types/shims-vue.d.ts +20 -0
  343. package/vite.config.ts +73 -0
@@ -0,0 +1,2209 @@
1
+ import { defineComponent as vt, ref as ee, computed as Ve, watch as Dt, createVNode as M, Fragment as De, withDirectives as qt, unref as K, resolveDirective as kt, nextTick as Ut, resolveComponent as x, createElementBlock as jt, openBlock as ze, createBlock as Ft, createCommentVNode as Vt, isVNode as zt } from "vue";
2
+ import { useI18n as $t } from "vue-i18n";
3
+ import { t as Ht } from "./await-to-js.es5-BtRbN2QH.js";
4
+ import { A as Kt, I as Jt, B as Yt, w as Qt } from "./index-BKIw8tSn.js";
5
+ import { withInstall as Gt, useRender as Wt } from "@utogether/utils";
6
+ import { clone as Et, isString as $e } from "xe-utils";
7
+ const qe = {
8
+ silent: !1,
9
+ logLevel: "warn"
10
+ };
11
+ function V(e) {
12
+ if (typeof e != "object" || e === null)
13
+ return !1;
14
+ const r = Object.getPrototypeOf(e);
15
+ return (r === null || r === Object.prototype || Object.getPrototypeOf(r) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
16
+ }
17
+ const xt = () => ({
18
+ func: () => {
19
+ },
20
+ bool: !0,
21
+ string: "",
22
+ number: 0,
23
+ array: () => [],
24
+ object: () => ({}),
25
+ integer: 0
26
+ }), Tt = Object.prototype, Bt = Tt.toString, Xt = Tt.hasOwnProperty, At = /^\s*function (\w+)/;
27
+ function He(e) {
28
+ const r = (e == null ? void 0 : e.type) ?? e;
29
+ if (r) {
30
+ const i = r.toString().match(At);
31
+ return i ? i[1] : "";
32
+ }
33
+ return "";
34
+ }
35
+ function Zt(e) {
36
+ if (e == null)
37
+ return "";
38
+ const r = e.constructor.toString().match(At);
39
+ return r ? r[1].replace(/^Async/, "") : "";
40
+ }
41
+ function Ke(e) {
42
+ return "structuredClone" in globalThis ? structuredClone(e) : Array.isArray(e) ? [...e] : V(e) ? Object.assign({}, e) : e;
43
+ }
44
+ function Rt() {
45
+ }
46
+ let _ = Rt;
47
+ process.env.NODE_ENV !== "production" && (_ = typeof console < "u" ? function(i, n = qe.logLevel) {
48
+ qe.silent === !1 && console[n](`[VueTypes warn]: ${i}`);
49
+ } : Rt);
50
+ const te = (e, r) => Xt.call(e, r), en = Number.isInteger || function(r) {
51
+ return typeof r == "number" && isFinite(r) && Math.floor(r) === r;
52
+ }, ne = Array.isArray || function(r) {
53
+ return Bt.call(r) === "[object Array]";
54
+ }, re = (e) => Bt.call(e) === "[object Function]", ke = (e, r) => V(e) && te(e, "_vueTypes_name") && (!r || e._vueTypes_name === r), St = (e) => V(e) && (te(e, "type") || ["_vueTypes_name", "validator", "default", "required"].some(
55
+ (r) => te(e, r)
56
+ ));
57
+ function Pt(e, r) {
58
+ return Object.defineProperty(e.bind(r), "__original", {
59
+ value: e
60
+ });
61
+ }
62
+ function J(e, r, i = !1) {
63
+ let n, t = !0, o = "";
64
+ V(e) ? n = e : n = { type: e };
65
+ const s = ke(n) ? n._vueTypes_name + " - " : "";
66
+ if (St(n) && n.type !== null) {
67
+ if (n.type === void 0 || n.type === !0 || !n.required && r == null)
68
+ return t;
69
+ ne(n.type) ? (t = n.type.some(
70
+ (a) => J(a, r, !0) === !0
71
+ ), o = n.type.map((a) => He(a)).join(" or ")) : (o = He(n), o === "Array" ? t = ne(r) : o === "Object" ? t = V(r) : o === "String" || o === "Number" || o === "Boolean" || o === "Function" ? t = Zt(r) === o : t = r instanceof n.type);
72
+ }
73
+ if (!t) {
74
+ const a = `${s}value "${r}" should be of type "${o}"`;
75
+ return i === !1 ? (_(a), !1) : a;
76
+ }
77
+ if (te(n, "validator") && re(n.validator)) {
78
+ const a = _, u = [];
79
+ if (_ = (c) => {
80
+ u.push(c);
81
+ }, t = n.validator(r), _ = a, !t) {
82
+ const c = (u.length > 1 ? "* " : "") + u.join(`
83
+ * `);
84
+ return u.length = 0, i === !1 ? (_(c), t) : c;
85
+ }
86
+ }
87
+ return t;
88
+ }
89
+ function O(e, r) {
90
+ const i = Object.defineProperties(r, {
91
+ _vueTypes_name: {
92
+ value: e,
93
+ writable: !0
94
+ },
95
+ isRequired: {
96
+ get() {
97
+ return this.required = !0, this;
98
+ }
99
+ },
100
+ def: {
101
+ value(t) {
102
+ if (t === void 0) {
103
+ if (this.type === Boolean || Array.isArray(this.type) && this.type.includes(Boolean)) {
104
+ this.default = void 0;
105
+ return;
106
+ }
107
+ return te(this, "default") && delete this.default, this;
108
+ }
109
+ return !re(t) && J(this, t, !0) !== !0 ? (_(`${this._vueTypes_name} - invalid default value: "${t}"`), this) : (ne(t) ? this.default = () => Ke(t) : V(t) ? this.default = () => Ke(t) : this.default = t, this);
110
+ }
111
+ }
112
+ }), { validator: n } = i;
113
+ return re(n) && (i.validator = Pt(n, i)), i;
114
+ }
115
+ function k(e, r) {
116
+ const i = O(e, r);
117
+ return Object.defineProperty(i, "validate", {
118
+ value(n) {
119
+ return re(this.validator) && _(
120
+ `${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info:
121
+ ${JSON.stringify(
122
+ this
123
+ )}`
124
+ ), this.validator = Pt(n, this), this;
125
+ }
126
+ });
127
+ }
128
+ function ue(e) {
129
+ return e.replace(/^(?!\s*$)/gm, " ");
130
+ }
131
+ const tn = () => k("any", {}), nn = () => k("function", {
132
+ type: Function
133
+ }), Je = () => k("boolean", {
134
+ type: Boolean
135
+ }), rn = () => k("string", {
136
+ type: String
137
+ }), on = () => k("number", {
138
+ type: Number
139
+ }), sn = () => k("array", {
140
+ type: Array
141
+ }), an = () => k("object", {
142
+ type: Object
143
+ }), un = () => O("integer", {
144
+ type: Number,
145
+ validator(e) {
146
+ const r = en(e);
147
+ return r === !1 && _(`integer - "${e}" is not an integer`), r;
148
+ }
149
+ }), ln = () => O("symbol", {
150
+ validator(e) {
151
+ const r = typeof e == "symbol";
152
+ return r === !1 && _(`symbol - invalid value "${e}"`), r;
153
+ }
154
+ }), cn = () => Object.defineProperty(
155
+ {
156
+ type: null,
157
+ validator(e) {
158
+ const r = e === null;
159
+ return r === !1 && _("nullable - value should be null"), r;
160
+ }
161
+ },
162
+ "_vueTypes_name",
163
+ { value: "nullable" }
164
+ );
165
+ function fn(e, r = "custom validation failed") {
166
+ if (typeof e != "function")
167
+ throw new TypeError(
168
+ "[VueTypes error]: You must provide a function as argument"
169
+ );
170
+ return O(e.name || "<<anonymous function>>", {
171
+ type: null,
172
+ validator(i) {
173
+ const n = e(i);
174
+ return n || _(`${this._vueTypes_name} - ${r}`), n;
175
+ }
176
+ });
177
+ }
178
+ function dn(e) {
179
+ if (!ne(e))
180
+ throw new TypeError(
181
+ "[VueTypes error]: You must provide an array as argument."
182
+ );
183
+ const r = `oneOf - value should be one of "${e.map((n) => typeof n == "symbol" ? n.toString() : n).join('", "')}".`, i = {
184
+ validator(n) {
185
+ const t = e.indexOf(n) !== -1;
186
+ return t || _(r), t;
187
+ }
188
+ };
189
+ if (e.indexOf(null) === -1) {
190
+ const n = e.reduce(
191
+ (t, o) => {
192
+ if (o != null) {
193
+ const s = o.constructor;
194
+ t.indexOf(s) === -1 && t.push(s);
195
+ }
196
+ return t;
197
+ },
198
+ []
199
+ );
200
+ n.length > 0 && (i.type = n);
201
+ }
202
+ return O("oneOf", i);
203
+ }
204
+ function gn(e) {
205
+ if (!ne(e))
206
+ throw new TypeError(
207
+ "[VueTypes error]: You must provide an array as argument"
208
+ );
209
+ let r = !1, i = !1, n = [];
210
+ for (let o = 0; o < e.length; o += 1) {
211
+ const s = e[o];
212
+ if (St(s)) {
213
+ if (re(s.validator) && (r = !0), ke(s, "oneOf") && s.type) {
214
+ n = n.concat(s.type);
215
+ continue;
216
+ }
217
+ if (ke(s, "nullable")) {
218
+ i = !0;
219
+ continue;
220
+ }
221
+ if (s.type === !0 || !s.type) {
222
+ _('oneOfType - invalid usage of "true" and "null" as types.');
223
+ continue;
224
+ }
225
+ n = n.concat(s.type);
226
+ } else
227
+ n.push(s);
228
+ }
229
+ n = n.filter((o, s) => n.indexOf(o) === s);
230
+ const t = i === !1 && n.length > 0 ? n : null;
231
+ return r ? O("oneOfType", {
232
+ type: t,
233
+ validator(o) {
234
+ const s = [], a = e.some((u) => {
235
+ const c = J(u, o, !0);
236
+ return typeof c == "string" && s.push(c), c === !0;
237
+ });
238
+ return a || _(
239
+ `oneOfType - provided value does not match any of the ${s.length} passed-in validators:
240
+ ${ue(s.join(`
241
+ `))}`
242
+ ), a;
243
+ }
244
+ }) : O("oneOfType", {
245
+ type: t
246
+ });
247
+ }
248
+ function hn(e) {
249
+ return O("arrayOf", {
250
+ type: Array,
251
+ validator(r) {
252
+ let i = "";
253
+ const n = r.every((t) => (i = J(e, t, !0), i === !0));
254
+ return n || _(`arrayOf - value validation error:
255
+ ${ue(i)}`), n;
256
+ }
257
+ });
258
+ }
259
+ function mn(e) {
260
+ return O("instanceOf", {
261
+ type: e
262
+ });
263
+ }
264
+ function yn(e) {
265
+ return O("objectOf", {
266
+ type: Object,
267
+ validator(r) {
268
+ let i = "";
269
+ if (!V(r))
270
+ return !1;
271
+ const n = Object.keys(r).every((t) => (i = J(e, r[t], !0), i === !0));
272
+ return n || _(`objectOf - value validation error:
273
+ ${ue(i)}`), n;
274
+ }
275
+ });
276
+ }
277
+ function pn(e) {
278
+ const r = Object.keys(e), i = r.filter((t) => {
279
+ var o;
280
+ return !!((o = e[t]) != null && o.required);
281
+ }), n = O("shape", {
282
+ type: Object,
283
+ validator(t) {
284
+ if (!V(t))
285
+ return !1;
286
+ const o = Object.keys(t);
287
+ if (i.length > 0 && i.some((s) => o.indexOf(s) === -1)) {
288
+ const s = i.filter(
289
+ (a) => o.indexOf(a) === -1
290
+ );
291
+ return s.length === 1 ? _(`shape - required property "${s[0]}" is not defined.`) : _(
292
+ `shape - required properties "${s.join(
293
+ '", "'
294
+ )}" are not defined.`
295
+ ), !1;
296
+ }
297
+ return o.every((s) => {
298
+ if (r.indexOf(s) === -1)
299
+ return this._vueTypes_isLoose === !0 ? !0 : (_(
300
+ `shape - shape definition does not include a "${s}" property. Allowed keys: "${r.join(
301
+ '", "'
302
+ )}".`
303
+ ), !1);
304
+ const a = e[s], u = J(a, t[s], !0);
305
+ return typeof u == "string" && _(`shape - "${s}" property validation error:
306
+ ${ue(u)}`), u === !0;
307
+ });
308
+ }
309
+ });
310
+ return Object.defineProperty(n, "_vueTypes_isLoose", {
311
+ writable: !0,
312
+ value: !1
313
+ }), Object.defineProperty(n, "loose", {
314
+ get() {
315
+ return this._vueTypes_isLoose = !0, this;
316
+ }
317
+ }), n;
318
+ }
319
+ var wn = Object.defineProperty, bn = (e, r, i) => r in e ? wn(e, r, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[r] = i, L = (e, r, i) => (bn(e, typeof r != "symbol" ? r + "" : r, i), i);
320
+ const Cn = /* @__PURE__ */ (() => {
321
+ var e;
322
+ return (
323
+ // eslint-disable-next-line @typescript-eslint/no-extraneous-class
324
+ e = class {
325
+ static get any() {
326
+ return tn();
327
+ }
328
+ static get func() {
329
+ return nn().def(this.defaults.func);
330
+ }
331
+ static get bool() {
332
+ return this.defaults.bool === void 0 ? Je() : Je().def(this.defaults.bool);
333
+ }
334
+ static get string() {
335
+ return rn().def(this.defaults.string);
336
+ }
337
+ static get number() {
338
+ return on().def(this.defaults.number);
339
+ }
340
+ static get array() {
341
+ return sn().def(this.defaults.array);
342
+ }
343
+ static get object() {
344
+ return an().def(this.defaults.object);
345
+ }
346
+ static get integer() {
347
+ return un().def(this.defaults.integer);
348
+ }
349
+ static get symbol() {
350
+ return ln();
351
+ }
352
+ static get nullable() {
353
+ return cn();
354
+ }
355
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
356
+ static extend(...r) {
357
+ _(
358
+ "VueTypes.extend has been removed. Use the ES6+ method instead. See https://dwightjack.github.io/vue-types/advanced/extending-vue-types.html#extending-namespaced-validators-in-es6 for details."
359
+ );
360
+ }
361
+ }, L(e, "defaults", {}), L(e, "sensibleDefaults"), L(e, "config", qe), L(e, "custom", fn), L(e, "oneOf", dn), L(e, "instanceOf", mn), L(e, "oneOfType", gn), L(e, "arrayOf", hn), L(e, "objectOf", yn), L(e, "shape", pn), L(e, "utils", {
362
+ validate(r, i) {
363
+ return J(i, r, !0) === !0;
364
+ },
365
+ toType(r, i, n = !1) {
366
+ return n ? k(r, i) : O(r, i);
367
+ }
368
+ }), e
369
+ );
370
+ })();
371
+ function Nt(e = xt()) {
372
+ var r;
373
+ return r = class extends Cn {
374
+ static get sensibleDefaults() {
375
+ return { ...this.defaults };
376
+ }
377
+ static set sensibleDefaults(i) {
378
+ if (i === !1) {
379
+ this.defaults = {};
380
+ return;
381
+ }
382
+ if (i === !0) {
383
+ this.defaults = { ...e };
384
+ return;
385
+ }
386
+ this.defaults = { ...i };
387
+ }
388
+ }, L(r, "defaults", { ...e }), r;
389
+ }
390
+ class nr extends Nt() {
391
+ }
392
+ const vn = Nt({
393
+ func: void 0,
394
+ bool: void 0,
395
+ string: void 0,
396
+ number: void 0,
397
+ object: void 0,
398
+ integer: void 0
399
+ });
400
+ class se extends vn {
401
+ // a native-like validator that supports the `.validable` method
402
+ static get style() {
403
+ return k("style", {
404
+ type: [String, Object]
405
+ });
406
+ }
407
+ static get VNodeChild() {
408
+ return k("VNodeChild", {
409
+ type: void 0
410
+ });
411
+ }
412
+ }
413
+ var X = {}, de, Ye;
414
+ function En() {
415
+ return Ye || (Ye = 1, de = function() {
416
+ return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
417
+ }), de;
418
+ }
419
+ var ge = {}, F = {}, Qe;
420
+ function Y() {
421
+ if (Qe) return F;
422
+ Qe = 1;
423
+ let e;
424
+ const r = [
425
+ 0,
426
+ // Not used
427
+ 26,
428
+ 44,
429
+ 70,
430
+ 100,
431
+ 134,
432
+ 172,
433
+ 196,
434
+ 242,
435
+ 292,
436
+ 346,
437
+ 404,
438
+ 466,
439
+ 532,
440
+ 581,
441
+ 655,
442
+ 733,
443
+ 815,
444
+ 901,
445
+ 991,
446
+ 1085,
447
+ 1156,
448
+ 1258,
449
+ 1364,
450
+ 1474,
451
+ 1588,
452
+ 1706,
453
+ 1828,
454
+ 1921,
455
+ 2051,
456
+ 2185,
457
+ 2323,
458
+ 2465,
459
+ 2611,
460
+ 2761,
461
+ 2876,
462
+ 3034,
463
+ 3196,
464
+ 3362,
465
+ 3532,
466
+ 3706
467
+ ];
468
+ return F.getSymbolSize = function(n) {
469
+ if (!n) throw new Error('"version" cannot be null or undefined');
470
+ if (n < 1 || n > 40) throw new Error('"version" should be in range from 1 to 40');
471
+ return n * 4 + 17;
472
+ }, F.getSymbolTotalCodewords = function(n) {
473
+ return r[n];
474
+ }, F.getBCHDigit = function(i) {
475
+ let n = 0;
476
+ for (; i !== 0; )
477
+ n++, i >>>= 1;
478
+ return n;
479
+ }, F.setToSJISFunction = function(n) {
480
+ if (typeof n != "function")
481
+ throw new Error('"toSJISFunc" is not a valid function.');
482
+ e = n;
483
+ }, F.isKanjiModeEnabled = function() {
484
+ return typeof e < "u";
485
+ }, F.toSJIS = function(n) {
486
+ return e(n);
487
+ }, F;
488
+ }
489
+ var he = {}, Ge;
490
+ function Ue() {
491
+ return Ge || (Ge = 1, function(e) {
492
+ e.L = { bit: 1 }, e.M = { bit: 0 }, e.Q = { bit: 3 }, e.H = { bit: 2 };
493
+ function r(i) {
494
+ if (typeof i != "string")
495
+ throw new Error("Param is not a string");
496
+ switch (i.toLowerCase()) {
497
+ case "l":
498
+ case "low":
499
+ return e.L;
500
+ case "m":
501
+ case "medium":
502
+ return e.M;
503
+ case "q":
504
+ case "quartile":
505
+ return e.Q;
506
+ case "h":
507
+ case "high":
508
+ return e.H;
509
+ default:
510
+ throw new Error("Unknown EC Level: " + i);
511
+ }
512
+ }
513
+ e.isValid = function(n) {
514
+ return n && typeof n.bit < "u" && n.bit >= 0 && n.bit < 4;
515
+ }, e.from = function(n, t) {
516
+ if (e.isValid(n))
517
+ return n;
518
+ try {
519
+ return r(n);
520
+ } catch {
521
+ return t;
522
+ }
523
+ };
524
+ }(he)), he;
525
+ }
526
+ var me, We;
527
+ function Tn() {
528
+ if (We) return me;
529
+ We = 1;
530
+ function e() {
531
+ this.buffer = [], this.length = 0;
532
+ }
533
+ return e.prototype = {
534
+ get: function(r) {
535
+ const i = Math.floor(r / 8);
536
+ return (this.buffer[i] >>> 7 - r % 8 & 1) === 1;
537
+ },
538
+ put: function(r, i) {
539
+ for (let n = 0; n < i; n++)
540
+ this.putBit((r >>> i - n - 1 & 1) === 1);
541
+ },
542
+ getLengthInBits: function() {
543
+ return this.length;
544
+ },
545
+ putBit: function(r) {
546
+ const i = Math.floor(this.length / 8);
547
+ this.buffer.length <= i && this.buffer.push(0), r && (this.buffer[i] |= 128 >>> this.length % 8), this.length++;
548
+ }
549
+ }, me = e, me;
550
+ }
551
+ var ye, xe;
552
+ function Bn() {
553
+ if (xe) return ye;
554
+ xe = 1;
555
+ function e(r) {
556
+ if (!r || r < 1)
557
+ throw new Error("BitMatrix size must be defined and greater than 0");
558
+ this.size = r, this.data = new Uint8Array(r * r), this.reservedBit = new Uint8Array(r * r);
559
+ }
560
+ return e.prototype.set = function(r, i, n, t) {
561
+ const o = r * this.size + i;
562
+ this.data[o] = n, t && (this.reservedBit[o] = !0);
563
+ }, e.prototype.get = function(r, i) {
564
+ return this.data[r * this.size + i];
565
+ }, e.prototype.xor = function(r, i, n) {
566
+ this.data[r * this.size + i] ^= n;
567
+ }, e.prototype.isReserved = function(r, i) {
568
+ return this.reservedBit[r * this.size + i];
569
+ }, ye = e, ye;
570
+ }
571
+ var pe = {}, Xe;
572
+ function An() {
573
+ return Xe || (Xe = 1, function(e) {
574
+ const r = Y().getSymbolSize;
575
+ e.getRowColCoords = function(n) {
576
+ if (n === 1) return [];
577
+ const t = Math.floor(n / 7) + 2, o = r(n), s = o === 145 ? 26 : Math.ceil((o - 13) / (2 * t - 2)) * 2, a = [o - 7];
578
+ for (let u = 1; u < t - 1; u++)
579
+ a[u] = a[u - 1] - s;
580
+ return a.push(6), a.reverse();
581
+ }, e.getPositions = function(n) {
582
+ const t = [], o = e.getRowColCoords(n), s = o.length;
583
+ for (let a = 0; a < s; a++)
584
+ for (let u = 0; u < s; u++)
585
+ a === 0 && u === 0 || // top-left
586
+ a === 0 && u === s - 1 || // bottom-left
587
+ a === s - 1 && u === 0 || t.push([o[a], o[u]]);
588
+ return t;
589
+ };
590
+ }(pe)), pe;
591
+ }
592
+ var we = {}, Ze;
593
+ function Rn() {
594
+ if (Ze) return we;
595
+ Ze = 1;
596
+ const e = Y().getSymbolSize, r = 7;
597
+ return we.getPositions = function(n) {
598
+ const t = e(n);
599
+ return [
600
+ // top-left
601
+ [0, 0],
602
+ // top-right
603
+ [t - r, 0],
604
+ // bottom-left
605
+ [0, t - r]
606
+ ];
607
+ }, we;
608
+ }
609
+ var be = {}, et;
610
+ function Sn() {
611
+ return et || (et = 1, function(e) {
612
+ e.Patterns = {
613
+ PATTERN000: 0,
614
+ PATTERN001: 1,
615
+ PATTERN010: 2,
616
+ PATTERN011: 3,
617
+ PATTERN100: 4,
618
+ PATTERN101: 5,
619
+ PATTERN110: 6,
620
+ PATTERN111: 7
621
+ };
622
+ const r = {
623
+ N1: 3,
624
+ N2: 3,
625
+ N3: 40,
626
+ N4: 10
627
+ };
628
+ e.isValid = function(t) {
629
+ return t != null && t !== "" && !isNaN(t) && t >= 0 && t <= 7;
630
+ }, e.from = function(t) {
631
+ return e.isValid(t) ? parseInt(t, 10) : void 0;
632
+ }, e.getPenaltyN1 = function(t) {
633
+ const o = t.size;
634
+ let s = 0, a = 0, u = 0, c = null, m = null;
635
+ for (let B = 0; B < o; B++) {
636
+ a = u = 0, c = m = null;
637
+ for (let b = 0; b < o; b++) {
638
+ let g = t.get(B, b);
639
+ g === c ? a++ : (a >= 5 && (s += r.N1 + (a - 5)), c = g, a = 1), g = t.get(b, B), g === m ? u++ : (u >= 5 && (s += r.N1 + (u - 5)), m = g, u = 1);
640
+ }
641
+ a >= 5 && (s += r.N1 + (a - 5)), u >= 5 && (s += r.N1 + (u - 5));
642
+ }
643
+ return s;
644
+ }, e.getPenaltyN2 = function(t) {
645
+ const o = t.size;
646
+ let s = 0;
647
+ for (let a = 0; a < o - 1; a++)
648
+ for (let u = 0; u < o - 1; u++) {
649
+ const c = t.get(a, u) + t.get(a, u + 1) + t.get(a + 1, u) + t.get(a + 1, u + 1);
650
+ (c === 4 || c === 0) && s++;
651
+ }
652
+ return s * r.N2;
653
+ }, e.getPenaltyN3 = function(t) {
654
+ const o = t.size;
655
+ let s = 0, a = 0, u = 0;
656
+ for (let c = 0; c < o; c++) {
657
+ a = u = 0;
658
+ for (let m = 0; m < o; m++)
659
+ a = a << 1 & 2047 | t.get(c, m), m >= 10 && (a === 1488 || a === 93) && s++, u = u << 1 & 2047 | t.get(m, c), m >= 10 && (u === 1488 || u === 93) && s++;
660
+ }
661
+ return s * r.N3;
662
+ }, e.getPenaltyN4 = function(t) {
663
+ let o = 0;
664
+ const s = t.data.length;
665
+ for (let u = 0; u < s; u++) o += t.data[u];
666
+ return Math.abs(Math.ceil(o * 100 / s / 5) - 10) * r.N4;
667
+ };
668
+ function i(n, t, o) {
669
+ switch (n) {
670
+ case e.Patterns.PATTERN000:
671
+ return (t + o) % 2 === 0;
672
+ case e.Patterns.PATTERN001:
673
+ return t % 2 === 0;
674
+ case e.Patterns.PATTERN010:
675
+ return o % 3 === 0;
676
+ case e.Patterns.PATTERN011:
677
+ return (t + o) % 3 === 0;
678
+ case e.Patterns.PATTERN100:
679
+ return (Math.floor(t / 2) + Math.floor(o / 3)) % 2 === 0;
680
+ case e.Patterns.PATTERN101:
681
+ return t * o % 2 + t * o % 3 === 0;
682
+ case e.Patterns.PATTERN110:
683
+ return (t * o % 2 + t * o % 3) % 2 === 0;
684
+ case e.Patterns.PATTERN111:
685
+ return (t * o % 3 + (t + o) % 2) % 2 === 0;
686
+ default:
687
+ throw new Error("bad maskPattern:" + n);
688
+ }
689
+ }
690
+ e.applyMask = function(t, o) {
691
+ const s = o.size;
692
+ for (let a = 0; a < s; a++)
693
+ for (let u = 0; u < s; u++)
694
+ o.isReserved(u, a) || o.xor(u, a, i(t, u, a));
695
+ }, e.getBestMask = function(t, o) {
696
+ const s = Object.keys(e.Patterns).length;
697
+ let a = 0, u = 1 / 0;
698
+ for (let c = 0; c < s; c++) {
699
+ o(c), e.applyMask(c, t);
700
+ const m = e.getPenaltyN1(t) + e.getPenaltyN2(t) + e.getPenaltyN3(t) + e.getPenaltyN4(t);
701
+ e.applyMask(c, t), m < u && (u = m, a = c);
702
+ }
703
+ return a;
704
+ };
705
+ }(be)), be;
706
+ }
707
+ var ae = {}, tt;
708
+ function It() {
709
+ if (tt) return ae;
710
+ tt = 1;
711
+ const e = Ue(), r = [
712
+ // L M Q H
713
+ 1,
714
+ 1,
715
+ 1,
716
+ 1,
717
+ 1,
718
+ 1,
719
+ 1,
720
+ 1,
721
+ 1,
722
+ 1,
723
+ 2,
724
+ 2,
725
+ 1,
726
+ 2,
727
+ 2,
728
+ 4,
729
+ 1,
730
+ 2,
731
+ 4,
732
+ 4,
733
+ 2,
734
+ 4,
735
+ 4,
736
+ 4,
737
+ 2,
738
+ 4,
739
+ 6,
740
+ 5,
741
+ 2,
742
+ 4,
743
+ 6,
744
+ 6,
745
+ 2,
746
+ 5,
747
+ 8,
748
+ 8,
749
+ 4,
750
+ 5,
751
+ 8,
752
+ 8,
753
+ 4,
754
+ 5,
755
+ 8,
756
+ 11,
757
+ 4,
758
+ 8,
759
+ 10,
760
+ 11,
761
+ 4,
762
+ 9,
763
+ 12,
764
+ 16,
765
+ 4,
766
+ 9,
767
+ 16,
768
+ 16,
769
+ 6,
770
+ 10,
771
+ 12,
772
+ 18,
773
+ 6,
774
+ 10,
775
+ 17,
776
+ 16,
777
+ 6,
778
+ 11,
779
+ 16,
780
+ 19,
781
+ 6,
782
+ 13,
783
+ 18,
784
+ 21,
785
+ 7,
786
+ 14,
787
+ 21,
788
+ 25,
789
+ 8,
790
+ 16,
791
+ 20,
792
+ 25,
793
+ 8,
794
+ 17,
795
+ 23,
796
+ 25,
797
+ 9,
798
+ 17,
799
+ 23,
800
+ 34,
801
+ 9,
802
+ 18,
803
+ 25,
804
+ 30,
805
+ 10,
806
+ 20,
807
+ 27,
808
+ 32,
809
+ 12,
810
+ 21,
811
+ 29,
812
+ 35,
813
+ 12,
814
+ 23,
815
+ 34,
816
+ 37,
817
+ 12,
818
+ 25,
819
+ 34,
820
+ 40,
821
+ 13,
822
+ 26,
823
+ 35,
824
+ 42,
825
+ 14,
826
+ 28,
827
+ 38,
828
+ 45,
829
+ 15,
830
+ 29,
831
+ 40,
832
+ 48,
833
+ 16,
834
+ 31,
835
+ 43,
836
+ 51,
837
+ 17,
838
+ 33,
839
+ 45,
840
+ 54,
841
+ 18,
842
+ 35,
843
+ 48,
844
+ 57,
845
+ 19,
846
+ 37,
847
+ 51,
848
+ 60,
849
+ 19,
850
+ 38,
851
+ 53,
852
+ 63,
853
+ 20,
854
+ 40,
855
+ 56,
856
+ 66,
857
+ 21,
858
+ 43,
859
+ 59,
860
+ 70,
861
+ 22,
862
+ 45,
863
+ 62,
864
+ 74,
865
+ 24,
866
+ 47,
867
+ 65,
868
+ 77,
869
+ 25,
870
+ 49,
871
+ 68,
872
+ 81
873
+ ], i = [
874
+ // L M Q H
875
+ 7,
876
+ 10,
877
+ 13,
878
+ 17,
879
+ 10,
880
+ 16,
881
+ 22,
882
+ 28,
883
+ 15,
884
+ 26,
885
+ 36,
886
+ 44,
887
+ 20,
888
+ 36,
889
+ 52,
890
+ 64,
891
+ 26,
892
+ 48,
893
+ 72,
894
+ 88,
895
+ 36,
896
+ 64,
897
+ 96,
898
+ 112,
899
+ 40,
900
+ 72,
901
+ 108,
902
+ 130,
903
+ 48,
904
+ 88,
905
+ 132,
906
+ 156,
907
+ 60,
908
+ 110,
909
+ 160,
910
+ 192,
911
+ 72,
912
+ 130,
913
+ 192,
914
+ 224,
915
+ 80,
916
+ 150,
917
+ 224,
918
+ 264,
919
+ 96,
920
+ 176,
921
+ 260,
922
+ 308,
923
+ 104,
924
+ 198,
925
+ 288,
926
+ 352,
927
+ 120,
928
+ 216,
929
+ 320,
930
+ 384,
931
+ 132,
932
+ 240,
933
+ 360,
934
+ 432,
935
+ 144,
936
+ 280,
937
+ 408,
938
+ 480,
939
+ 168,
940
+ 308,
941
+ 448,
942
+ 532,
943
+ 180,
944
+ 338,
945
+ 504,
946
+ 588,
947
+ 196,
948
+ 364,
949
+ 546,
950
+ 650,
951
+ 224,
952
+ 416,
953
+ 600,
954
+ 700,
955
+ 224,
956
+ 442,
957
+ 644,
958
+ 750,
959
+ 252,
960
+ 476,
961
+ 690,
962
+ 816,
963
+ 270,
964
+ 504,
965
+ 750,
966
+ 900,
967
+ 300,
968
+ 560,
969
+ 810,
970
+ 960,
971
+ 312,
972
+ 588,
973
+ 870,
974
+ 1050,
975
+ 336,
976
+ 644,
977
+ 952,
978
+ 1110,
979
+ 360,
980
+ 700,
981
+ 1020,
982
+ 1200,
983
+ 390,
984
+ 728,
985
+ 1050,
986
+ 1260,
987
+ 420,
988
+ 784,
989
+ 1140,
990
+ 1350,
991
+ 450,
992
+ 812,
993
+ 1200,
994
+ 1440,
995
+ 480,
996
+ 868,
997
+ 1290,
998
+ 1530,
999
+ 510,
1000
+ 924,
1001
+ 1350,
1002
+ 1620,
1003
+ 540,
1004
+ 980,
1005
+ 1440,
1006
+ 1710,
1007
+ 570,
1008
+ 1036,
1009
+ 1530,
1010
+ 1800,
1011
+ 570,
1012
+ 1064,
1013
+ 1590,
1014
+ 1890,
1015
+ 600,
1016
+ 1120,
1017
+ 1680,
1018
+ 1980,
1019
+ 630,
1020
+ 1204,
1021
+ 1770,
1022
+ 2100,
1023
+ 660,
1024
+ 1260,
1025
+ 1860,
1026
+ 2220,
1027
+ 720,
1028
+ 1316,
1029
+ 1950,
1030
+ 2310,
1031
+ 750,
1032
+ 1372,
1033
+ 2040,
1034
+ 2430
1035
+ ];
1036
+ return ae.getBlocksCount = function(t, o) {
1037
+ switch (o) {
1038
+ case e.L:
1039
+ return r[(t - 1) * 4 + 0];
1040
+ case e.M:
1041
+ return r[(t - 1) * 4 + 1];
1042
+ case e.Q:
1043
+ return r[(t - 1) * 4 + 2];
1044
+ case e.H:
1045
+ return r[(t - 1) * 4 + 3];
1046
+ default:
1047
+ return;
1048
+ }
1049
+ }, ae.getTotalCodewordsCount = function(t, o) {
1050
+ switch (o) {
1051
+ case e.L:
1052
+ return i[(t - 1) * 4 + 0];
1053
+ case e.M:
1054
+ return i[(t - 1) * 4 + 1];
1055
+ case e.Q:
1056
+ return i[(t - 1) * 4 + 2];
1057
+ case e.H:
1058
+ return i[(t - 1) * 4 + 3];
1059
+ default:
1060
+ return;
1061
+ }
1062
+ }, ae;
1063
+ }
1064
+ var Ce = {}, Z = {}, nt;
1065
+ function Pn() {
1066
+ if (nt) return Z;
1067
+ nt = 1;
1068
+ const e = new Uint8Array(512), r = new Uint8Array(256);
1069
+ return function() {
1070
+ let n = 1;
1071
+ for (let t = 0; t < 255; t++)
1072
+ e[t] = n, r[n] = t, n <<= 1, n & 256 && (n ^= 285);
1073
+ for (let t = 255; t < 512; t++)
1074
+ e[t] = e[t - 255];
1075
+ }(), Z.log = function(n) {
1076
+ if (n < 1) throw new Error("log(" + n + ")");
1077
+ return r[n];
1078
+ }, Z.exp = function(n) {
1079
+ return e[n];
1080
+ }, Z.mul = function(n, t) {
1081
+ return n === 0 || t === 0 ? 0 : e[r[n] + r[t]];
1082
+ }, Z;
1083
+ }
1084
+ var rt;
1085
+ function Nn() {
1086
+ return rt || (rt = 1, function(e) {
1087
+ const r = Pn();
1088
+ e.mul = function(n, t) {
1089
+ const o = new Uint8Array(n.length + t.length - 1);
1090
+ for (let s = 0; s < n.length; s++)
1091
+ for (let a = 0; a < t.length; a++)
1092
+ o[s + a] ^= r.mul(n[s], t[a]);
1093
+ return o;
1094
+ }, e.mod = function(n, t) {
1095
+ let o = new Uint8Array(n);
1096
+ for (; o.length - t.length >= 0; ) {
1097
+ const s = o[0];
1098
+ for (let u = 0; u < t.length; u++)
1099
+ o[u] ^= r.mul(t[u], s);
1100
+ let a = 0;
1101
+ for (; a < o.length && o[a] === 0; ) a++;
1102
+ o = o.slice(a);
1103
+ }
1104
+ return o;
1105
+ }, e.generateECPolynomial = function(n) {
1106
+ let t = new Uint8Array([1]);
1107
+ for (let o = 0; o < n; o++)
1108
+ t = e.mul(t, new Uint8Array([1, r.exp(o)]));
1109
+ return t;
1110
+ };
1111
+ }(Ce)), Ce;
1112
+ }
1113
+ var ve, ot;
1114
+ function In() {
1115
+ if (ot) return ve;
1116
+ ot = 1;
1117
+ const e = Nn();
1118
+ function r(i) {
1119
+ this.genPoly = void 0, this.degree = i, this.degree && this.initialize(this.degree);
1120
+ }
1121
+ return r.prototype.initialize = function(n) {
1122
+ this.degree = n, this.genPoly = e.generateECPolynomial(this.degree);
1123
+ }, r.prototype.encode = function(n) {
1124
+ if (!this.genPoly)
1125
+ throw new Error("Encoder not initialized");
1126
+ const t = new Uint8Array(n.length + this.degree);
1127
+ t.set(n);
1128
+ const o = e.mod(t, this.genPoly), s = this.degree - o.length;
1129
+ if (s > 0) {
1130
+ const a = new Uint8Array(this.degree);
1131
+ return a.set(o, s), a;
1132
+ }
1133
+ return o;
1134
+ }, ve = r, ve;
1135
+ }
1136
+ var Ee = {}, Te = {}, Be = {}, it;
1137
+ function _t() {
1138
+ return it || (it = 1, Be.isValid = function(r) {
1139
+ return !isNaN(r) && r >= 1 && r <= 40;
1140
+ }), Be;
1141
+ }
1142
+ var q = {}, st;
1143
+ function Mt() {
1144
+ if (st) return q;
1145
+ st = 1;
1146
+ const e = "[0-9]+", r = "[A-Z $%*+\\-./:]+";
1147
+ let i = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
1148
+ i = i.replace(/u/g, "\\u");
1149
+ const n = "(?:(?![A-Z0-9 $%*+\\-./:]|" + i + `)(?:.|[\r
1150
+ ]))+`;
1151
+ q.KANJI = new RegExp(i, "g"), q.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g"), q.BYTE = new RegExp(n, "g"), q.NUMERIC = new RegExp(e, "g"), q.ALPHANUMERIC = new RegExp(r, "g");
1152
+ const t = new RegExp("^" + i + "$"), o = new RegExp("^" + e + "$"), s = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
1153
+ return q.testKanji = function(u) {
1154
+ return t.test(u);
1155
+ }, q.testNumeric = function(u) {
1156
+ return o.test(u);
1157
+ }, q.testAlphanumeric = function(u) {
1158
+ return s.test(u);
1159
+ }, q;
1160
+ }
1161
+ var at;
1162
+ function Q() {
1163
+ return at || (at = 1, function(e) {
1164
+ const r = _t(), i = Mt();
1165
+ e.NUMERIC = {
1166
+ id: "Numeric",
1167
+ bit: 1,
1168
+ ccBits: [10, 12, 14]
1169
+ }, e.ALPHANUMERIC = {
1170
+ id: "Alphanumeric",
1171
+ bit: 2,
1172
+ ccBits: [9, 11, 13]
1173
+ }, e.BYTE = {
1174
+ id: "Byte",
1175
+ bit: 4,
1176
+ ccBits: [8, 16, 16]
1177
+ }, e.KANJI = {
1178
+ id: "Kanji",
1179
+ bit: 8,
1180
+ ccBits: [8, 10, 12]
1181
+ }, e.MIXED = {
1182
+ bit: -1
1183
+ }, e.getCharCountIndicator = function(o, s) {
1184
+ if (!o.ccBits) throw new Error("Invalid mode: " + o);
1185
+ if (!r.isValid(s))
1186
+ throw new Error("Invalid version: " + s);
1187
+ return s >= 1 && s < 10 ? o.ccBits[0] : s < 27 ? o.ccBits[1] : o.ccBits[2];
1188
+ }, e.getBestModeForData = function(o) {
1189
+ return i.testNumeric(o) ? e.NUMERIC : i.testAlphanumeric(o) ? e.ALPHANUMERIC : i.testKanji(o) ? e.KANJI : e.BYTE;
1190
+ }, e.toString = function(o) {
1191
+ if (o && o.id) return o.id;
1192
+ throw new Error("Invalid mode");
1193
+ }, e.isValid = function(o) {
1194
+ return o && o.bit && o.ccBits;
1195
+ };
1196
+ function n(t) {
1197
+ if (typeof t != "string")
1198
+ throw new Error("Param is not a string");
1199
+ switch (t.toLowerCase()) {
1200
+ case "numeric":
1201
+ return e.NUMERIC;
1202
+ case "alphanumeric":
1203
+ return e.ALPHANUMERIC;
1204
+ case "kanji":
1205
+ return e.KANJI;
1206
+ case "byte":
1207
+ return e.BYTE;
1208
+ default:
1209
+ throw new Error("Unknown mode: " + t);
1210
+ }
1211
+ }
1212
+ e.from = function(o, s) {
1213
+ if (e.isValid(o))
1214
+ return o;
1215
+ try {
1216
+ return n(o);
1217
+ } catch {
1218
+ return s;
1219
+ }
1220
+ };
1221
+ }(Te)), Te;
1222
+ }
1223
+ var ut;
1224
+ function _n() {
1225
+ return ut || (ut = 1, function(e) {
1226
+ const r = Y(), i = It(), n = Ue(), t = Q(), o = _t(), s = 7973, a = r.getBCHDigit(s);
1227
+ function u(b, g, N) {
1228
+ for (let l = 1; l <= 40; l++)
1229
+ if (g <= e.getCapacity(l, N, b))
1230
+ return l;
1231
+ }
1232
+ function c(b, g) {
1233
+ return t.getCharCountIndicator(b, g) + 4;
1234
+ }
1235
+ function m(b, g) {
1236
+ let N = 0;
1237
+ return b.forEach(function(l) {
1238
+ const A = c(l.mode, g);
1239
+ N += A + l.getBitsLength();
1240
+ }), N;
1241
+ }
1242
+ function B(b, g) {
1243
+ for (let N = 1; N <= 40; N++)
1244
+ if (m(b, N) <= e.getCapacity(N, g, t.MIXED))
1245
+ return N;
1246
+ }
1247
+ e.from = function(g, N) {
1248
+ return o.isValid(g) ? parseInt(g, 10) : N;
1249
+ }, e.getCapacity = function(g, N, l) {
1250
+ if (!o.isValid(g))
1251
+ throw new Error("Invalid QR Code version");
1252
+ typeof l > "u" && (l = t.BYTE);
1253
+ const A = r.getSymbolTotalCodewords(g), f = i.getTotalCodewordsCount(g, N), C = (A - f) * 8;
1254
+ if (l === t.MIXED) return C;
1255
+ const p = C - c(l, g);
1256
+ switch (l) {
1257
+ case t.NUMERIC:
1258
+ return Math.floor(p / 10 * 3);
1259
+ case t.ALPHANUMERIC:
1260
+ return Math.floor(p / 11 * 2);
1261
+ case t.KANJI:
1262
+ return Math.floor(p / 13);
1263
+ case t.BYTE:
1264
+ default:
1265
+ return Math.floor(p / 8);
1266
+ }
1267
+ }, e.getBestVersionForData = function(g, N) {
1268
+ let l;
1269
+ const A = n.from(N, n.M);
1270
+ if (Array.isArray(g)) {
1271
+ if (g.length > 1)
1272
+ return B(g, A);
1273
+ if (g.length === 0)
1274
+ return 1;
1275
+ l = g[0];
1276
+ } else
1277
+ l = g;
1278
+ return u(l.mode, l.getLength(), A);
1279
+ }, e.getEncodedBits = function(g) {
1280
+ if (!o.isValid(g) || g < 7)
1281
+ throw new Error("Invalid QR Code version");
1282
+ let N = g << 12;
1283
+ for (; r.getBCHDigit(N) - a >= 0; )
1284
+ N ^= s << r.getBCHDigit(N) - a;
1285
+ return g << 12 | N;
1286
+ };
1287
+ }(Ee)), Ee;
1288
+ }
1289
+ var Ae = {}, lt;
1290
+ function Mn() {
1291
+ if (lt) return Ae;
1292
+ lt = 1;
1293
+ const e = Y(), r = 1335, i = 21522, n = e.getBCHDigit(r);
1294
+ return Ae.getEncodedBits = function(o, s) {
1295
+ const a = o.bit << 3 | s;
1296
+ let u = a << 10;
1297
+ for (; e.getBCHDigit(u) - n >= 0; )
1298
+ u ^= r << e.getBCHDigit(u) - n;
1299
+ return (a << 10 | u) ^ i;
1300
+ }, Ae;
1301
+ }
1302
+ var Re = {}, Se, ct;
1303
+ function Ln() {
1304
+ if (ct) return Se;
1305
+ ct = 1;
1306
+ const e = Q();
1307
+ function r(i) {
1308
+ this.mode = e.NUMERIC, this.data = i.toString();
1309
+ }
1310
+ return r.getBitsLength = function(n) {
1311
+ return 10 * Math.floor(n / 3) + (n % 3 ? n % 3 * 3 + 1 : 0);
1312
+ }, r.prototype.getLength = function() {
1313
+ return this.data.length;
1314
+ }, r.prototype.getBitsLength = function() {
1315
+ return r.getBitsLength(this.data.length);
1316
+ }, r.prototype.write = function(n) {
1317
+ let t, o, s;
1318
+ for (t = 0; t + 3 <= this.data.length; t += 3)
1319
+ o = this.data.substr(t, 3), s = parseInt(o, 10), n.put(s, 10);
1320
+ const a = this.data.length - t;
1321
+ a > 0 && (o = this.data.substr(t), s = parseInt(o, 10), n.put(s, a * 3 + 1));
1322
+ }, Se = r, Se;
1323
+ }
1324
+ var Pe, ft;
1325
+ function On() {
1326
+ if (ft) return Pe;
1327
+ ft = 1;
1328
+ const e = Q(), r = [
1329
+ "0",
1330
+ "1",
1331
+ "2",
1332
+ "3",
1333
+ "4",
1334
+ "5",
1335
+ "6",
1336
+ "7",
1337
+ "8",
1338
+ "9",
1339
+ "A",
1340
+ "B",
1341
+ "C",
1342
+ "D",
1343
+ "E",
1344
+ "F",
1345
+ "G",
1346
+ "H",
1347
+ "I",
1348
+ "J",
1349
+ "K",
1350
+ "L",
1351
+ "M",
1352
+ "N",
1353
+ "O",
1354
+ "P",
1355
+ "Q",
1356
+ "R",
1357
+ "S",
1358
+ "T",
1359
+ "U",
1360
+ "V",
1361
+ "W",
1362
+ "X",
1363
+ "Y",
1364
+ "Z",
1365
+ " ",
1366
+ "$",
1367
+ "%",
1368
+ "*",
1369
+ "+",
1370
+ "-",
1371
+ ".",
1372
+ "/",
1373
+ ":"
1374
+ ];
1375
+ function i(n) {
1376
+ this.mode = e.ALPHANUMERIC, this.data = n;
1377
+ }
1378
+ return i.getBitsLength = function(t) {
1379
+ return 11 * Math.floor(t / 2) + 6 * (t % 2);
1380
+ }, i.prototype.getLength = function() {
1381
+ return this.data.length;
1382
+ }, i.prototype.getBitsLength = function() {
1383
+ return i.getBitsLength(this.data.length);
1384
+ }, i.prototype.write = function(t) {
1385
+ let o;
1386
+ for (o = 0; o + 2 <= this.data.length; o += 2) {
1387
+ let s = r.indexOf(this.data[o]) * 45;
1388
+ s += r.indexOf(this.data[o + 1]), t.put(s, 11);
1389
+ }
1390
+ this.data.length % 2 && t.put(r.indexOf(this.data[o]), 6);
1391
+ }, Pe = i, Pe;
1392
+ }
1393
+ var Ne, dt;
1394
+ function Dn() {
1395
+ if (dt) return Ne;
1396
+ dt = 1;
1397
+ const e = Q();
1398
+ function r(i) {
1399
+ this.mode = e.BYTE, typeof i == "string" ? this.data = new TextEncoder().encode(i) : this.data = new Uint8Array(i);
1400
+ }
1401
+ return r.getBitsLength = function(n) {
1402
+ return n * 8;
1403
+ }, r.prototype.getLength = function() {
1404
+ return this.data.length;
1405
+ }, r.prototype.getBitsLength = function() {
1406
+ return r.getBitsLength(this.data.length);
1407
+ }, r.prototype.write = function(i) {
1408
+ for (let n = 0, t = this.data.length; n < t; n++)
1409
+ i.put(this.data[n], 8);
1410
+ }, Ne = r, Ne;
1411
+ }
1412
+ var Ie, gt;
1413
+ function qn() {
1414
+ if (gt) return Ie;
1415
+ gt = 1;
1416
+ const e = Q(), r = Y();
1417
+ function i(n) {
1418
+ this.mode = e.KANJI, this.data = n;
1419
+ }
1420
+ return i.getBitsLength = function(t) {
1421
+ return t * 13;
1422
+ }, i.prototype.getLength = function() {
1423
+ return this.data.length;
1424
+ }, i.prototype.getBitsLength = function() {
1425
+ return i.getBitsLength(this.data.length);
1426
+ }, i.prototype.write = function(n) {
1427
+ let t;
1428
+ for (t = 0; t < this.data.length; t++) {
1429
+ let o = r.toSJIS(this.data[t]);
1430
+ if (o >= 33088 && o <= 40956)
1431
+ o -= 33088;
1432
+ else if (o >= 57408 && o <= 60351)
1433
+ o -= 49472;
1434
+ else
1435
+ throw new Error(
1436
+ "Invalid SJIS character: " + this.data[t] + `
1437
+ Make sure your charset is UTF-8`
1438
+ );
1439
+ o = (o >>> 8 & 255) * 192 + (o & 255), n.put(o, 13);
1440
+ }
1441
+ }, Ie = i, Ie;
1442
+ }
1443
+ var _e = { exports: {} }, ht;
1444
+ function kn() {
1445
+ return ht || (ht = 1, function(e) {
1446
+ var r = {
1447
+ single_source_shortest_paths: function(i, n, t) {
1448
+ var o = {}, s = {};
1449
+ s[n] = 0;
1450
+ var a = r.PriorityQueue.make();
1451
+ a.push(n, 0);
1452
+ for (var u, c, m, B, b, g, N, l, A; !a.empty(); ) {
1453
+ u = a.pop(), c = u.value, B = u.cost, b = i[c] || {};
1454
+ for (m in b)
1455
+ b.hasOwnProperty(m) && (g = b[m], N = B + g, l = s[m], A = typeof s[m] > "u", (A || l > N) && (s[m] = N, a.push(m, N), o[m] = c));
1456
+ }
1457
+ if (typeof t < "u" && typeof s[t] > "u") {
1458
+ var f = ["Could not find a path from ", n, " to ", t, "."].join("");
1459
+ throw new Error(f);
1460
+ }
1461
+ return o;
1462
+ },
1463
+ extract_shortest_path_from_predecessor_list: function(i, n) {
1464
+ for (var t = [], o = n; o; )
1465
+ t.push(o), i[o], o = i[o];
1466
+ return t.reverse(), t;
1467
+ },
1468
+ find_path: function(i, n, t) {
1469
+ var o = r.single_source_shortest_paths(i, n, t);
1470
+ return r.extract_shortest_path_from_predecessor_list(
1471
+ o,
1472
+ t
1473
+ );
1474
+ },
1475
+ /**
1476
+ * A very naive priority queue implementation.
1477
+ */
1478
+ PriorityQueue: {
1479
+ make: function(i) {
1480
+ var n = r.PriorityQueue, t = {}, o;
1481
+ i = i || {};
1482
+ for (o in n)
1483
+ n.hasOwnProperty(o) && (t[o] = n[o]);
1484
+ return t.queue = [], t.sorter = i.sorter || n.default_sorter, t;
1485
+ },
1486
+ default_sorter: function(i, n) {
1487
+ return i.cost - n.cost;
1488
+ },
1489
+ /**
1490
+ * Add a new item to the queue and ensure the highest priority element
1491
+ * is at the front of the queue.
1492
+ */
1493
+ push: function(i, n) {
1494
+ var t = { value: i, cost: n };
1495
+ this.queue.push(t), this.queue.sort(this.sorter);
1496
+ },
1497
+ /**
1498
+ * Return the highest priority element in the queue.
1499
+ */
1500
+ pop: function() {
1501
+ return this.queue.shift();
1502
+ },
1503
+ empty: function() {
1504
+ return this.queue.length === 0;
1505
+ }
1506
+ }
1507
+ };
1508
+ e.exports = r;
1509
+ }(_e)), _e.exports;
1510
+ }
1511
+ var mt;
1512
+ function Un() {
1513
+ return mt || (mt = 1, function(e) {
1514
+ const r = Q(), i = Ln(), n = On(), t = Dn(), o = qn(), s = Mt(), a = Y(), u = kn();
1515
+ function c(f) {
1516
+ return unescape(encodeURIComponent(f)).length;
1517
+ }
1518
+ function m(f, C, p) {
1519
+ const w = [];
1520
+ let I;
1521
+ for (; (I = f.exec(p)) !== null; )
1522
+ w.push({
1523
+ data: I[0],
1524
+ index: I.index,
1525
+ mode: C,
1526
+ length: I[0].length
1527
+ });
1528
+ return w;
1529
+ }
1530
+ function B(f) {
1531
+ const C = m(s.NUMERIC, r.NUMERIC, f), p = m(s.ALPHANUMERIC, r.ALPHANUMERIC, f);
1532
+ let w, I;
1533
+ return a.isKanjiModeEnabled() ? (w = m(s.BYTE, r.BYTE, f), I = m(s.KANJI, r.KANJI, f)) : (w = m(s.BYTE_KANJI, r.BYTE, f), I = []), C.concat(p, w, I).sort(function(T, R) {
1534
+ return T.index - R.index;
1535
+ }).map(function(T) {
1536
+ return {
1537
+ data: T.data,
1538
+ mode: T.mode,
1539
+ length: T.length
1540
+ };
1541
+ });
1542
+ }
1543
+ function b(f, C) {
1544
+ switch (C) {
1545
+ case r.NUMERIC:
1546
+ return i.getBitsLength(f);
1547
+ case r.ALPHANUMERIC:
1548
+ return n.getBitsLength(f);
1549
+ case r.KANJI:
1550
+ return o.getBitsLength(f);
1551
+ case r.BYTE:
1552
+ return t.getBitsLength(f);
1553
+ }
1554
+ }
1555
+ function g(f) {
1556
+ return f.reduce(function(C, p) {
1557
+ const w = C.length - 1 >= 0 ? C[C.length - 1] : null;
1558
+ return w && w.mode === p.mode ? (C[C.length - 1].data += p.data, C) : (C.push(p), C);
1559
+ }, []);
1560
+ }
1561
+ function N(f) {
1562
+ const C = [];
1563
+ for (let p = 0; p < f.length; p++) {
1564
+ const w = f[p];
1565
+ switch (w.mode) {
1566
+ case r.NUMERIC:
1567
+ C.push([
1568
+ w,
1569
+ { data: w.data, mode: r.ALPHANUMERIC, length: w.length },
1570
+ { data: w.data, mode: r.BYTE, length: w.length }
1571
+ ]);
1572
+ break;
1573
+ case r.ALPHANUMERIC:
1574
+ C.push([
1575
+ w,
1576
+ { data: w.data, mode: r.BYTE, length: w.length }
1577
+ ]);
1578
+ break;
1579
+ case r.KANJI:
1580
+ C.push([
1581
+ w,
1582
+ { data: w.data, mode: r.BYTE, length: c(w.data) }
1583
+ ]);
1584
+ break;
1585
+ case r.BYTE:
1586
+ C.push([
1587
+ { data: w.data, mode: r.BYTE, length: c(w.data) }
1588
+ ]);
1589
+ }
1590
+ }
1591
+ return C;
1592
+ }
1593
+ function l(f, C) {
1594
+ const p = {}, w = { start: {} };
1595
+ let I = ["start"];
1596
+ for (let y = 0; y < f.length; y++) {
1597
+ const T = f[y], R = [];
1598
+ for (let d = 0; d < T.length; d++) {
1599
+ const v = T[d], E = "" + y + d;
1600
+ R.push(E), p[E] = { node: v, lastCount: 0 }, w[E] = {};
1601
+ for (let S = 0; S < I.length; S++) {
1602
+ const h = I[S];
1603
+ p[h] && p[h].node.mode === v.mode ? (w[h][E] = b(p[h].lastCount + v.length, v.mode) - b(p[h].lastCount, v.mode), p[h].lastCount += v.length) : (p[h] && (p[h].lastCount = v.length), w[h][E] = b(v.length, v.mode) + 4 + r.getCharCountIndicator(v.mode, C));
1604
+ }
1605
+ }
1606
+ I = R;
1607
+ }
1608
+ for (let y = 0; y < I.length; y++)
1609
+ w[I[y]].end = 0;
1610
+ return { map: w, table: p };
1611
+ }
1612
+ function A(f, C) {
1613
+ let p;
1614
+ const w = r.getBestModeForData(f);
1615
+ if (p = r.from(C, w), p !== r.BYTE && p.bit < w.bit)
1616
+ throw new Error('"' + f + '" cannot be encoded with mode ' + r.toString(p) + `.
1617
+ Suggested mode is: ` + r.toString(w));
1618
+ switch (p === r.KANJI && !a.isKanjiModeEnabled() && (p = r.BYTE), p) {
1619
+ case r.NUMERIC:
1620
+ return new i(f);
1621
+ case r.ALPHANUMERIC:
1622
+ return new n(f);
1623
+ case r.KANJI:
1624
+ return new o(f);
1625
+ case r.BYTE:
1626
+ return new t(f);
1627
+ }
1628
+ }
1629
+ e.fromArray = function(C) {
1630
+ return C.reduce(function(p, w) {
1631
+ return typeof w == "string" ? p.push(A(w, null)) : w.data && p.push(A(w.data, w.mode)), p;
1632
+ }, []);
1633
+ }, e.fromString = function(C, p) {
1634
+ const w = B(C, a.isKanjiModeEnabled()), I = N(w), y = l(I, p), T = u.find_path(y.map, "start", "end"), R = [];
1635
+ for (let d = 1; d < T.length - 1; d++)
1636
+ R.push(y.table[T[d]].node);
1637
+ return e.fromArray(g(R));
1638
+ }, e.rawSplit = function(C) {
1639
+ return e.fromArray(
1640
+ B(C, a.isKanjiModeEnabled())
1641
+ );
1642
+ };
1643
+ }(Re)), Re;
1644
+ }
1645
+ var yt;
1646
+ function jn() {
1647
+ if (yt) return ge;
1648
+ yt = 1;
1649
+ const e = Y(), r = Ue(), i = Tn(), n = Bn(), t = An(), o = Rn(), s = Sn(), a = It(), u = In(), c = _n(), m = Mn(), B = Q(), b = Un();
1650
+ function g(y, T) {
1651
+ const R = y.size, d = o.getPositions(T);
1652
+ for (let v = 0; v < d.length; v++) {
1653
+ const E = d[v][0], S = d[v][1];
1654
+ for (let h = -1; h <= 7; h++)
1655
+ if (!(E + h <= -1 || R <= E + h))
1656
+ for (let P = -1; P <= 7; P++)
1657
+ S + P <= -1 || R <= S + P || (h >= 0 && h <= 6 && (P === 0 || P === 6) || P >= 0 && P <= 6 && (h === 0 || h === 6) || h >= 2 && h <= 4 && P >= 2 && P <= 4 ? y.set(E + h, S + P, !0, !0) : y.set(E + h, S + P, !1, !0));
1658
+ }
1659
+ }
1660
+ function N(y) {
1661
+ const T = y.size;
1662
+ for (let R = 8; R < T - 8; R++) {
1663
+ const d = R % 2 === 0;
1664
+ y.set(R, 6, d, !0), y.set(6, R, d, !0);
1665
+ }
1666
+ }
1667
+ function l(y, T) {
1668
+ const R = t.getPositions(T);
1669
+ for (let d = 0; d < R.length; d++) {
1670
+ const v = R[d][0], E = R[d][1];
1671
+ for (let S = -2; S <= 2; S++)
1672
+ for (let h = -2; h <= 2; h++)
1673
+ S === -2 || S === 2 || h === -2 || h === 2 || S === 0 && h === 0 ? y.set(v + S, E + h, !0, !0) : y.set(v + S, E + h, !1, !0);
1674
+ }
1675
+ }
1676
+ function A(y, T) {
1677
+ const R = y.size, d = c.getEncodedBits(T);
1678
+ let v, E, S;
1679
+ for (let h = 0; h < 18; h++)
1680
+ v = Math.floor(h / 3), E = h % 3 + R - 8 - 3, S = (d >> h & 1) === 1, y.set(v, E, S, !0), y.set(E, v, S, !0);
1681
+ }
1682
+ function f(y, T, R) {
1683
+ const d = y.size, v = m.getEncodedBits(T, R);
1684
+ let E, S;
1685
+ for (E = 0; E < 15; E++)
1686
+ S = (v >> E & 1) === 1, E < 6 ? y.set(E, 8, S, !0) : E < 8 ? y.set(E + 1, 8, S, !0) : y.set(d - 15 + E, 8, S, !0), E < 8 ? y.set(8, d - E - 1, S, !0) : E < 9 ? y.set(8, 15 - E - 1 + 1, S, !0) : y.set(8, 15 - E - 1, S, !0);
1687
+ y.set(d - 8, 8, 1, !0);
1688
+ }
1689
+ function C(y, T) {
1690
+ const R = y.size;
1691
+ let d = -1, v = R - 1, E = 7, S = 0;
1692
+ for (let h = R - 1; h > 0; h -= 2)
1693
+ for (h === 6 && h--; ; ) {
1694
+ for (let P = 0; P < 2; P++)
1695
+ if (!y.isReserved(v, h - P)) {
1696
+ let D = !1;
1697
+ S < T.length && (D = (T[S] >>> E & 1) === 1), y.set(v, h - P, D), E--, E === -1 && (S++, E = 7);
1698
+ }
1699
+ if (v += d, v < 0 || R <= v) {
1700
+ v -= d, d = -d;
1701
+ break;
1702
+ }
1703
+ }
1704
+ }
1705
+ function p(y, T, R) {
1706
+ const d = new i();
1707
+ R.forEach(function(P) {
1708
+ d.put(P.mode.bit, 4), d.put(P.getLength(), B.getCharCountIndicator(P.mode, y)), P.write(d);
1709
+ });
1710
+ const v = e.getSymbolTotalCodewords(y), E = a.getTotalCodewordsCount(y, T), S = (v - E) * 8;
1711
+ for (d.getLengthInBits() + 4 <= S && d.put(0, 4); d.getLengthInBits() % 8 !== 0; )
1712
+ d.putBit(0);
1713
+ const h = (S - d.getLengthInBits()) / 8;
1714
+ for (let P = 0; P < h; P++)
1715
+ d.put(P % 2 ? 17 : 236, 8);
1716
+ return w(d, y, T);
1717
+ }
1718
+ function w(y, T, R) {
1719
+ const d = e.getSymbolTotalCodewords(T), v = a.getTotalCodewordsCount(T, R), E = d - v, S = a.getBlocksCount(T, R), h = d % S, P = S - h, D = Math.floor(d / S), z = Math.floor(E / S), $ = z + 1, H = D - z, oe = new u(H);
1720
+ let G = 0;
1721
+ const ie = new Array(S), je = new Array(S);
1722
+ let le = 0;
1723
+ const Ot = new Uint8Array(y.buffer);
1724
+ for (let W = 0; W < S; W++) {
1725
+ const fe = W < P ? z : $;
1726
+ ie[W] = Ot.slice(G, G + fe), je[W] = oe.encode(ie[W]), G += fe, le = Math.max(le, fe);
1727
+ }
1728
+ const ce = new Uint8Array(d);
1729
+ let Fe = 0, U, j;
1730
+ for (U = 0; U < le; U++)
1731
+ for (j = 0; j < S; j++)
1732
+ U < ie[j].length && (ce[Fe++] = ie[j][U]);
1733
+ for (U = 0; U < H; U++)
1734
+ for (j = 0; j < S; j++)
1735
+ ce[Fe++] = je[j][U];
1736
+ return ce;
1737
+ }
1738
+ function I(y, T, R, d) {
1739
+ let v;
1740
+ if (Array.isArray(y))
1741
+ v = b.fromArray(y);
1742
+ else if (typeof y == "string") {
1743
+ let D = T;
1744
+ if (!D) {
1745
+ const z = b.rawSplit(y);
1746
+ D = c.getBestVersionForData(z, R);
1747
+ }
1748
+ v = b.fromString(y, D || 40);
1749
+ } else
1750
+ throw new Error("Invalid data");
1751
+ const E = c.getBestVersionForData(v, R);
1752
+ if (!E)
1753
+ throw new Error("The amount of data is too big to be stored in a QR Code");
1754
+ if (!T)
1755
+ T = E;
1756
+ else if (T < E)
1757
+ throw new Error(
1758
+ `
1759
+ The chosen QR Code version cannot contain this amount of data.
1760
+ Minimum version required to store current data is: ` + E + `.
1761
+ `
1762
+ );
1763
+ const S = p(T, R, v), h = e.getSymbolSize(T), P = new n(h);
1764
+ return g(P, T), N(P), l(P, T), f(P, R, 0), T >= 7 && A(P, T), C(P, S), isNaN(d) && (d = s.getBestMask(
1765
+ P,
1766
+ f.bind(null, P, R)
1767
+ )), s.applyMask(d, P), f(P, R, d), {
1768
+ modules: P,
1769
+ version: T,
1770
+ errorCorrectionLevel: R,
1771
+ maskPattern: d,
1772
+ segments: v
1773
+ };
1774
+ }
1775
+ return ge.create = function(T, R) {
1776
+ if (typeof T > "u" || T === "")
1777
+ throw new Error("No input text");
1778
+ let d = r.M, v, E;
1779
+ return typeof R < "u" && (d = r.from(R.errorCorrectionLevel, r.M), v = c.from(R.version), E = s.from(R.maskPattern), R.toSJISFunc && e.setToSJISFunction(R.toSJISFunc)), I(T, v, d, E);
1780
+ }, ge;
1781
+ }
1782
+ var Me = {}, Le = {}, pt;
1783
+ function Lt() {
1784
+ return pt || (pt = 1, function(e) {
1785
+ function r(i) {
1786
+ if (typeof i == "number" && (i = i.toString()), typeof i != "string")
1787
+ throw new Error("Color should be defined as hex string");
1788
+ let n = i.slice().replace("#", "").split("");
1789
+ if (n.length < 3 || n.length === 5 || n.length > 8)
1790
+ throw new Error("Invalid hex color: " + i);
1791
+ (n.length === 3 || n.length === 4) && (n = Array.prototype.concat.apply([], n.map(function(o) {
1792
+ return [o, o];
1793
+ }))), n.length === 6 && n.push("F", "F");
1794
+ const t = parseInt(n.join(""), 16);
1795
+ return {
1796
+ r: t >> 24 & 255,
1797
+ g: t >> 16 & 255,
1798
+ b: t >> 8 & 255,
1799
+ a: t & 255,
1800
+ hex: "#" + n.slice(0, 6).join("")
1801
+ };
1802
+ }
1803
+ e.getOptions = function(n) {
1804
+ n || (n = {}), n.color || (n.color = {});
1805
+ const t = typeof n.margin > "u" || n.margin === null || n.margin < 0 ? 4 : n.margin, o = n.width && n.width >= 21 ? n.width : void 0, s = n.scale || 4;
1806
+ return {
1807
+ width: o,
1808
+ scale: o ? 4 : s,
1809
+ margin: t,
1810
+ color: {
1811
+ dark: r(n.color.dark || "#000000ff"),
1812
+ light: r(n.color.light || "#ffffffff")
1813
+ },
1814
+ type: n.type,
1815
+ rendererOpts: n.rendererOpts || {}
1816
+ };
1817
+ }, e.getScale = function(n, t) {
1818
+ return t.width && t.width >= n + t.margin * 2 ? t.width / (n + t.margin * 2) : t.scale;
1819
+ }, e.getImageWidth = function(n, t) {
1820
+ const o = e.getScale(n, t);
1821
+ return Math.floor((n + t.margin * 2) * o);
1822
+ }, e.qrToImageData = function(n, t, o) {
1823
+ const s = t.modules.size, a = t.modules.data, u = e.getScale(s, o), c = Math.floor((s + o.margin * 2) * u), m = o.margin * u, B = [o.color.light, o.color.dark];
1824
+ for (let b = 0; b < c; b++)
1825
+ for (let g = 0; g < c; g++) {
1826
+ let N = (b * c + g) * 4, l = o.color.light;
1827
+ if (b >= m && g >= m && b < c - m && g < c - m) {
1828
+ const A = Math.floor((b - m) / u), f = Math.floor((g - m) / u);
1829
+ l = B[a[A * s + f] ? 1 : 0];
1830
+ }
1831
+ n[N++] = l.r, n[N++] = l.g, n[N++] = l.b, n[N] = l.a;
1832
+ }
1833
+ };
1834
+ }(Le)), Le;
1835
+ }
1836
+ var wt;
1837
+ function Fn() {
1838
+ return wt || (wt = 1, function(e) {
1839
+ const r = Lt();
1840
+ function i(t, o, s) {
1841
+ t.clearRect(0, 0, o.width, o.height), o.style || (o.style = {}), o.height = s, o.width = s, o.style.height = s + "px", o.style.width = s + "px";
1842
+ }
1843
+ function n() {
1844
+ try {
1845
+ return document.createElement("canvas");
1846
+ } catch {
1847
+ throw new Error("You need to specify a canvas element");
1848
+ }
1849
+ }
1850
+ e.render = function(o, s, a) {
1851
+ let u = a, c = s;
1852
+ typeof u > "u" && (!s || !s.getContext) && (u = s, s = void 0), s || (c = n()), u = r.getOptions(u);
1853
+ const m = r.getImageWidth(o.modules.size, u), B = c.getContext("2d"), b = B.createImageData(m, m);
1854
+ return r.qrToImageData(b.data, o, u), i(B, c, m), B.putImageData(b, 0, 0), c;
1855
+ }, e.renderToDataURL = function(o, s, a) {
1856
+ let u = a;
1857
+ typeof u > "u" && (!s || !s.getContext) && (u = s, s = void 0), u || (u = {});
1858
+ const c = e.render(o, s, u), m = u.type || "image/png", B = u.rendererOpts || {};
1859
+ return c.toDataURL(m, B.quality);
1860
+ };
1861
+ }(Me)), Me;
1862
+ }
1863
+ var Oe = {}, bt;
1864
+ function Vn() {
1865
+ if (bt) return Oe;
1866
+ bt = 1;
1867
+ const e = Lt();
1868
+ function r(t, o) {
1869
+ const s = t.a / 255, a = o + '="' + t.hex + '"';
1870
+ return s < 1 ? a + " " + o + '-opacity="' + s.toFixed(2).slice(1) + '"' : a;
1871
+ }
1872
+ function i(t, o, s) {
1873
+ let a = t + o;
1874
+ return typeof s < "u" && (a += " " + s), a;
1875
+ }
1876
+ function n(t, o, s) {
1877
+ let a = "", u = 0, c = !1, m = 0;
1878
+ for (let B = 0; B < t.length; B++) {
1879
+ const b = Math.floor(B % o), g = Math.floor(B / o);
1880
+ !b && !c && (c = !0), t[B] ? (m++, B > 0 && b > 0 && t[B - 1] || (a += c ? i("M", b + s, 0.5 + g + s) : i("m", u, 0), u = 0, c = !1), b + 1 < o && t[B + 1] || (a += i("h", m), m = 0)) : u++;
1881
+ }
1882
+ return a;
1883
+ }
1884
+ return Oe.render = function(o, s, a) {
1885
+ const u = e.getOptions(s), c = o.modules.size, m = o.modules.data, B = c + u.margin * 2, b = u.color.light.a ? "<path " + r(u.color.light, "fill") + ' d="M0 0h' + B + "v" + B + 'H0z"/>' : "", g = "<path " + r(u.color.dark, "stroke") + ' d="' + n(m, c, u.margin) + '"/>', N = 'viewBox="0 0 ' + B + " " + B + '"', A = '<svg xmlns="http://www.w3.org/2000/svg" ' + (u.width ? 'width="' + u.width + '" height="' + u.width + '" ' : "") + N + ' shape-rendering="crispEdges">' + b + g + `</svg>
1886
+ `;
1887
+ return typeof a == "function" && a(null, A), A;
1888
+ }, Oe;
1889
+ }
1890
+ var Ct;
1891
+ function zn() {
1892
+ if (Ct) return X;
1893
+ Ct = 1;
1894
+ const e = En(), r = jn(), i = Fn(), n = Vn();
1895
+ function t(o, s, a, u, c) {
1896
+ const m = [].slice.call(arguments, 1), B = m.length, b = typeof m[B - 1] == "function";
1897
+ if (!b && !e())
1898
+ throw new Error("Callback required as last argument");
1899
+ if (b) {
1900
+ if (B < 2)
1901
+ throw new Error("Too few arguments provided");
1902
+ B === 2 ? (c = a, a = s, s = u = void 0) : B === 3 && (s.getContext && typeof c > "u" ? (c = u, u = void 0) : (c = u, u = a, a = s, s = void 0));
1903
+ } else {
1904
+ if (B < 1)
1905
+ throw new Error("Too few arguments provided");
1906
+ return B === 1 ? (a = s, s = u = void 0) : B === 2 && !s.getContext && (u = a, a = s, s = void 0), new Promise(function(g, N) {
1907
+ try {
1908
+ const l = r.create(a, u);
1909
+ g(o(l, s, u));
1910
+ } catch (l) {
1911
+ N(l);
1912
+ }
1913
+ });
1914
+ }
1915
+ try {
1916
+ const g = r.create(a, u);
1917
+ c(null, o(g, s, u));
1918
+ } catch (g) {
1919
+ c(g);
1920
+ }
1921
+ }
1922
+ return X.create = r.create, X.toCanvas = t.bind(null, i.render), X.toDataURL = t.bind(null, i.renderToDataURL), X.toString = t.bind(null, function(o, s, a) {
1923
+ return n.render(o, a);
1924
+ }), X;
1925
+ }
1926
+ var $n = zn();
1927
+ const Hn = /* @__PURE__ */ Kt($n), Kn = {
1928
+ // img 或者 canvas,img不支持logo嵌套
1929
+ tag: se.string.validate((e) => ["canvas", "img"].includes(e)).def("canvas"),
1930
+ // 二维码内容
1931
+ text: {
1932
+ type: [String, Array],
1933
+ default: null
1934
+ },
1935
+ // qrcode.js配置项
1936
+ options: {
1937
+ type: Object,
1938
+ default: () => ({})
1939
+ },
1940
+ // 宽度
1941
+ width: se.number.def(200),
1942
+ // logo
1943
+ logo: {
1944
+ type: [String, Object],
1945
+ default: () => ""
1946
+ },
1947
+ // 是否过期
1948
+ disabled: se.bool.def(!1),
1949
+ // 过期提示内容
1950
+ disabledText: se.string.def("")
1951
+ }, Jn = /* @__PURE__ */ vt({
1952
+ name: "SuQrcode",
1953
+ props: Kn,
1954
+ emits: ["done", "click", "disabled-click"],
1955
+ setup(e, {
1956
+ emit: r
1957
+ }) {
1958
+ const {
1959
+ toCanvas: i,
1960
+ toDataURL: n
1961
+ } = Hn, t = ee(!0), o = ee(null), s = Ve(() => String(e.text)), a = Ve(() => ({
1962
+ width: e.width + "px",
1963
+ height: e.width + "px"
1964
+ })), u = async () => {
1965
+ await Ut();
1966
+ const l = Et(e.options || {}, !0);
1967
+ if (e.tag === "canvas") {
1968
+ l.errorCorrectionLevel = l.errorCorrectionLevel || B(K(s));
1969
+ const A = await m(K(s), l);
1970
+ l.scale = e.width === 0 ? void 0 : e.width / A * 4;
1971
+ const f = await i(K(o), K(s), l);
1972
+ if (e.logo) {
1973
+ const C = await c(f);
1974
+ r("done", C), t.value = !1;
1975
+ } else
1976
+ r("done", f.toDataURL()), t.value = !1;
1977
+ } else {
1978
+ const A = await n(s.value, {
1979
+ errorCorrectionLevel: "H",
1980
+ width: e.width,
1981
+ ...l
1982
+ });
1983
+ K(o).src = A, r("done", A), t.value = !1;
1984
+ }
1985
+ };
1986
+ Dt(() => s.value, (l) => {
1987
+ l && u();
1988
+ }, {
1989
+ deep: !0,
1990
+ immediate: !0
1991
+ });
1992
+ const c = (l) => {
1993
+ const A = l.width, f = Object.assign({
1994
+ logoSize: 0.15,
1995
+ bgColor: "#ffffff",
1996
+ borderSize: 0.05,
1997
+ crossOrigin: "anonymous",
1998
+ borderRadius: 8,
1999
+ logoRadius: 0
2000
+ }, $e(e.logo) ? {} : e.logo), {
2001
+ logoSize: C = 0.15,
2002
+ bgColor: p = "#ffffff",
2003
+ borderSize: w = 0.05,
2004
+ crossOrigin: I = "anonymous",
2005
+ borderRadius: y = 8,
2006
+ logoRadius: T = 0
2007
+ } = f, R = $e(e.logo) ? e.logo : e.logo.src, d = A * C, v = A * (1 - C) / 2, E = A * (C + w), S = A * (1 - C - w) / 2, h = l.getContext("2d");
2008
+ if (!h) return;
2009
+ b(h)(S, S, E, E, y), h.fillStyle = p, h.fill();
2010
+ const P = new Image();
2011
+ (I || T) && P.setAttribute("crossOrigin", I), P.src = R;
2012
+ const D = ($) => {
2013
+ h.drawImage($, v, v, d, d);
2014
+ }, z = ($) => {
2015
+ const H = document.createElement("canvas");
2016
+ H.width = v + d, H.height = v + d;
2017
+ const oe = H.getContext("2d");
2018
+ if (!oe || !h || (oe.drawImage($, v, v, d, d), b(h)(v, v, d, d, T), !h)) return;
2019
+ const G = h.createPattern(H, "no-repeat");
2020
+ G && (h.fillStyle = G, h.fill());
2021
+ };
2022
+ return new Promise(($) => {
2023
+ P.onload = () => {
2024
+ T ? z(P) : D(P), $(l.toDataURL());
2025
+ };
2026
+ });
2027
+ }, m = async (l, A) => {
2028
+ const f = document.createElement("canvas");
2029
+ return await i(f, l, A), f.width;
2030
+ }, B = (l) => l.length > 36 ? "M" : l.length > 16 ? "Q" : "H", b = (l) => (A, f, C, p, w) => {
2031
+ const I = Math.min(C, p);
2032
+ return w > I / 2 && (w = I / 2), l.beginPath(), l.moveTo(A + w, f), l.arcTo(A + C, f, A + C, f + p, w), l.arcTo(A + C, f + p, A, f + p, w), l.arcTo(A, f + p, A, f, w), l.arcTo(A, f, A + C, f, w), l.closePath(), l;
2033
+ }, g = () => {
2034
+ r("click");
2035
+ }, N = () => {
2036
+ r("disabled-click");
2037
+ };
2038
+ return () => M(De, null, [qt(M("div", {
2039
+ class: "qrcode relative inline-block",
2040
+ style: K(a)
2041
+ }, [e.tag === "canvas" ? M("canvas", {
2042
+ ref: o,
2043
+ onClick: g
2044
+ }, null) : M("img", {
2045
+ ref: o,
2046
+ onClick: g
2047
+ }, null), e.disabled && M("div", {
2048
+ class: "qrcode--disabled absolute top-0 left-0 flex w-full h-full items-center justify-center",
2049
+ onClick: N
2050
+ }, [M("div", {
2051
+ class: "absolute top-[50%] left-[50%] font-bold"
2052
+ }, [M(Jt, {
2053
+ class: "cursor-pointer",
2054
+ icon: "refresh-right",
2055
+ width: "30",
2056
+ color: "var(--el-color-primary)"
2057
+ }, null), M("div", null, [e.disabledText])])])]), [[kt("loading"), K(t)]])]);
2058
+ }
2059
+ }), Yn = Gt(Jn);
2060
+ function Qn(e) {
2061
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !zt(e);
2062
+ }
2063
+ const Gn = {
2064
+ name: "PdaApp"
2065
+ }, rr = /* @__PURE__ */ vt({
2066
+ ...Gn,
2067
+ setup(e) {
2068
+ const r = Yt(), i = Wt(), {
2069
+ t: n
2070
+ } = $t(), t = "/upms/v1/app-manage", o = ee(null), s = ee({}), a = [
2071
+ {
2072
+ type: "checkbox",
2073
+ width: 45,
2074
+ align: "center"
2075
+ },
2076
+ // { field: 'trayTypeCode', width: 110, formatter: ['formatDict', 'SU.TRAY.TYPE'] },
2077
+ {
2078
+ field: "appVersion",
2079
+ width: 110
2080
+ },
2081
+ {
2082
+ field: "buildNo",
2083
+ width: 130
2084
+ },
2085
+ {
2086
+ field: "versionInfo",
2087
+ miWidth: 200
2088
+ },
2089
+ {
2090
+ field: "enabled",
2091
+ title: "message.status",
2092
+ width: 90,
2093
+ formatter: ({
2094
+ row: l
2095
+ }) => l.enabled === "1" ? n("message.appupper") : n("message.applower")
2096
+ },
2097
+ {
2098
+ field: "creationDate",
2099
+ width: 140
2100
+ },
2101
+ {
2102
+ field: "operate",
2103
+ width: 260,
2104
+ fixed: "right",
2105
+ slots: {
2106
+ default: ({
2107
+ row: l
2108
+ }) => {
2109
+ const A = l.enabled === "1" ? "applower" : "appupper", f = l.enabled === "1" ? "warning" : "primary", C = l.enabled === "1" ? "ri-inbox-archive-line" : "ri-inbox-unarchive-line";
2110
+ return l.enabled !== "1" ? [M(x("ut-button"), {
2111
+ content: A,
2112
+ icon: C,
2113
+ status: f,
2114
+ onTap: () => u(l)
2115
+ }, null)] : [
2116
+ M(De, null, [M("div", {
2117
+ style: "display: flex; justify-content: space-between;"
2118
+ }, [M(x("ut-button"), {
2119
+ content: A,
2120
+ icon: C,
2121
+ status: f,
2122
+ onTap: () => u(l)
2123
+ }, null), M(x("el-popover"), {
2124
+ placement: "left"
2125
+ }, {
2126
+ default: () => [M(De, null, [M(Yn, {
2127
+ text: r + "/ufil/" + l.downloadUrl
2128
+ }, null)])],
2129
+ reference: () => {
2130
+ let p;
2131
+ return M(x("el-button"), {
2132
+ type: "success"
2133
+ }, Qn(p = n("message.btn.scan")) ? p : {
2134
+ default: () => [p]
2135
+ });
2136
+ }
2137
+ })])])
2138
+ // <el-popover
2139
+ // placement="left"
2140
+ // v-slots={{
2141
+ // reference: () => <el-button type="primary">外网下载</el-button>
2142
+ // }}
2143
+ // >
2144
+ // <>
2145
+ // <SuQrcode text={'http://jemes.uzuo.cn/gateway/ufil/' + row.downloadUrl} />
2146
+ // </>
2147
+ // </el-popover>
2148
+ ];
2149
+ }
2150
+ }
2151
+ }
2152
+ ], u = async (l) => {
2153
+ const A = Et(l, !0);
2154
+ A.enabled = l.enabled === "1" ? "0" : "1", await Ht(Qt().put(t, A)), o.value.refreshData();
2155
+ }, c = (l) => {
2156
+ l === "add" && b(), l === "del" && g();
2157
+ }, m = [{
2158
+ field: "appVersion",
2159
+ required: !0
2160
+ }, {
2161
+ field: "buildNo",
2162
+ required: !0
2163
+ }, {
2164
+ field: "versionInfo",
2165
+ required: !0,
2166
+ itemRender: i.renderTextarea()
2167
+ }, {
2168
+ field: "downloadUrl",
2169
+ required: !1,
2170
+ itemRender: {
2171
+ name: "#upload",
2172
+ props: {
2173
+ baseUrl: r
2174
+ }
2175
+ }
2176
+ }], B = ee(!1), b = () => {
2177
+ s.value = {}, B.value = !0;
2178
+ }, g = () => {
2179
+ o.value.getInstance().commitProxy("delete");
2180
+ }, N = () => {
2181
+ o.value.refreshData();
2182
+ };
2183
+ return (l, A) => {
2184
+ const f = x("ut-grid"), C = x("ut-modal-form");
2185
+ return ze(), jt("div", null, [M(f, {
2186
+ ref_key: "xgrid",
2187
+ ref: o,
2188
+ columns: a,
2189
+ url: t,
2190
+ mode: "form",
2191
+ onButtonClick: c
2192
+ }, null, 512), B.value ? (ze(), Ft(C, {
2193
+ key: 0,
2194
+ record: s.value,
2195
+ items: m,
2196
+ width: 360,
2197
+ height: 340,
2198
+ title: l.$t("message.title.appAdd"),
2199
+ url: t,
2200
+ "data-status": "add",
2201
+ onClose: A[0] || (A[0] = (p) => B.value = !1),
2202
+ onConfirm: N
2203
+ }, null, 8, ["record", "title"])) : Vt("", !0)]);
2204
+ };
2205
+ }
2206
+ });
2207
+ export {
2208
+ rr as default
2209
+ };