@gct-paas/excel 0.1.20 → 0.1.22

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 (170) hide show
  1. package/dist/{VueVideoPlayer-DePpm38H.js → VueVideoPlayer-dfgekKID.js} +2 -2
  2. package/dist/{agg-design-hreKYp5a.js → agg-design-yDLZkVkR.js} +1 -1
  3. package/dist/{agg-props-CCDh2o6E.js → agg-props-DrXyaNCT.js} +1 -1
  4. package/dist/{agg-style-Bh8vdJvs.js → agg-style-D_6r9Myg.js} +1 -1
  5. package/dist/{align-editor-DpDuDOMr.js → align-editor-D5Ra4SB6.js} +1 -1
  6. package/dist/{attach-fields-editor-BeGxW6de.js → attach-fields-editor-C4JBi-p_.js} +3 -2
  7. package/dist/{barcode-design-CFVTZNAy.js → barcode-design-D3JH5Afi.js} +2 -2
  8. package/dist/base/index.es.js +350 -172
  9. package/dist/{base-font-editor-laOkjBe1.js → base-font-editor-B6J_Ts2T.js} +3 -2
  10. package/dist/{boolean-design-DIlM9Nrt.js → boolean-design-DQvGDcd9.js} +2 -2
  11. package/dist/{boolean-props-CGuFs72-.js → boolean-props-BPxPHLqI.js} +3 -3
  12. package/dist/{boolean-style-BUz6sBUN.js → boolean-style-BSc1-meP.js} +4 -4
  13. package/dist/{cell-upload-Dw3t7ZKJ.js → cell-upload-CiWekXUb.js} +3 -2
  14. package/dist/{date-range-editor-rXaru-8n.js → date-range-editor-DPt8-LqQ.js} +3 -2
  15. package/dist/{date-time-design-HfjWK3SA.js → date-time-design-Dv4dW-Iy.js} +1 -1
  16. package/dist/{date-time-props-C_cG-6wI.js → date-time-props-Cs4GVKqC.js} +3 -3
  17. package/dist/{date-time-style-BeCDP5TE.js → date-time-style-iSIC_SNA.js} +1 -1
  18. package/dist/{decimal-design-DzLpjX9N.js → decimal-design-C-GvHZPx.js} +1 -1
  19. package/dist/{decimal-display-mode-BhD1cOOe.js → decimal-display-mode-C_ooE9xL.js} +2 -2
  20. package/dist/{decimal-props-C6f22071.js → decimal-props-Vv8GsEHC.js} +4 -4
  21. package/dist/{decimal-style-XN3rLM2j.js → decimal-style-CY-zOSpD.js} +1 -1
  22. package/dist/{default-value-editor.vue_vue_type_script_setup_true_name_default-value-editor_lang-CJC4kBNh.js → default-value-editor.vue_vue_type_script_setup_true_name_default-value-editor_lang-Bw0TkvW-.js} +3 -2
  23. package/dist/{diagonal-design-Dh0qhgSq.js → diagonal-design-DS1kXGt1.js} +16 -4
  24. package/dist/{double-design-XHHlqmEp.js → double-design-DAz8wmRS.js} +1 -1
  25. package/dist/{double-props-Cvi36aBN.js → double-props-e76nS4qi.js} +4 -4
  26. package/dist/{double-style-Dkoth54S.js → double-style-kWIo_xYy.js} +1 -1
  27. package/dist/{dynamic-table-action-mGrBO_bn.js → dynamic-table-action-CbHoY76E.js} +42 -3
  28. package/dist/{dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-OPdk2I5p.js → dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-BfGYCqH5.js} +205 -266
  29. package/dist/{edit.utils-CXmmCnxE-DeDBtyJd.js → edit.utils-CXmmCnxE-CLCBDG4R.js} +1 -1
  30. package/dist/{enum-design-CAOAFdI6.js → enum-design-DVoXOTIU.js} +2 -2
  31. package/dist/{enum-props-CBN-AvBS.js → enum-props-DgsIc2Fz.js} +4 -4
  32. package/dist/{enum-style-cOiK44Ae.js → enum-style-C4r86NqC.js} +3 -3
  33. package/dist/excel.css +9781 -10010
  34. package/dist/{exceljs.min-pnja99MZ.js → exceljs.min-D-mqoZsC.js} +2 -2
  35. package/dist/{expression-design-CqgcK8eO.js → expression-design-D7PiPYQJ.js} +1 -1
  36. package/dist/{expression-props-wXQOIrMY.js → expression-props-DDcg6alT.js} +1 -1
  37. package/dist/{expression-style-BzavnOux.js → expression-style-C0GgXqbp.js} +1 -1
  38. package/dist/{file-design-BSQknhnY.js → file-design-CeAmaBow.js} +1 -1
  39. package/dist/{file-props-CwiuBVHW.js → file-props-e06WxwTc.js} +2 -2
  40. package/dist/{file-style-CG4a3THb.js → file-style-FigMgXwH.js} +1 -1
  41. package/dist/{font-editor--CgwL-wF.js → font-editor-DYBI1FXx.js} +3 -3
  42. package/dist/{image-design-D1D0SN5W.js → image-design-CcHGCTJH.js} +2 -2
  43. package/dist/{image-design-CwPjfDxf.js → image-design-DxKCuSrx.js} +2 -2
  44. package/dist/{image-props-C4E9gMsG.js → image-props-Co5Kp-ZH.js} +1 -1
  45. package/dist/{image-style-CIb1mi13.js → image-style-D6I5jBAk.js} +1 -1
  46. package/dist/{index-BJYSmTeW.js → index-8-tnvhRC.js} +1 -1
  47. package/dist/{index-0mxMA4vZ.js → index-B2Rk7ex6.js} +1 -1
  48. package/dist/{index-Drf0Arr4.js → index-BC-Zhsm-.js} +1 -1
  49. package/dist/{index-D9tUJAeF.js → index-BZfGHVOt.js} +1 -1
  50. package/dist/{index-B7DDYlzm.js → index-Bsabb65u.js} +1 -1
  51. package/dist/{index-DOj318_B.js → index-C7EF3bU6.js} +2 -2
  52. package/dist/{index-CeMBvNee.js → index-CRcKdyyr.js} +1 -1
  53. package/dist/{index-DLoQlQk6.js → index-CTEoW7C9.js} +2 -2
  54. package/dist/{index-ZrNXSw4w.js → index-CgDvaY3D.js} +1 -1
  55. package/dist/{index-CcmNFTia.js → index-CpsQzaA9.js} +2 -2
  56. package/dist/{index-CIl6oWcB.js → index-CwwHZhmI.js} +1 -1
  57. package/dist/{index-CKqLoN9r.js → index-D3H3AjqQ.js} +1 -1
  58. package/dist/{index-B2ZNkbGm.js → index-D51-PvAq.js} +1 -1
  59. package/dist/{index-BAlLZmfu.js → index-D6YzCpCw.js} +2 -1
  60. package/dist/{index-Dl2FIifp.js → index-D7DRfQTh.js} +1 -1
  61. package/dist/{index-PWmkKVZV.js → index-DFGBKBau.js} +1 -1
  62. package/dist/{index-BG_CEaW0.js → index-DJdI2Xy_.js} +41808 -3703
  63. package/dist/{index-A2MbCZtS.js → index-DSSHWwFD.js} +4 -1
  64. package/dist/{index-D0XkCn_x.js → index-DXtJ-139.js} +1 -1
  65. package/dist/index-Dacbq4L4.js +4420 -0
  66. package/dist/{index-D0n65ya-.js → index-DgBJVPsK.js} +1 -1
  67. package/dist/{index-BKoXo3Ha.js → index-Dku5Txlf.js} +1 -1
  68. package/dist/{index-PMDIMwwL.js → index-DsBusJ7S.js} +1 -1
  69. package/dist/{index-BneV2tbp.js → index-Dx6OiqW2.js} +1 -1
  70. package/dist/{index-Cgka0WmQ.js → index-E-flWZFi.js} +1 -1
  71. package/dist/{index-B2tFXR--.js → index-GGZRPnYe.js} +2 -2
  72. package/dist/{index-Bi4hE4Ye.js → index-H9YwRWK1.js} +2 -2
  73. package/dist/{index-CGSTq7zN.js → index-J1Nf5wgV.js} +1 -1
  74. package/dist/{index-BSHUFede.js → index-OK49_noi.js} +1 -1
  75. package/dist/{index-HHF5iK-6.js → index-UeWlvtDf.js} +1 -1
  76. package/dist/{index-UUDS4nmS.js → index-l3TfFIxY.js} +1 -1
  77. package/dist/{index-ByTKu8n6.js → index-xg8BpbDL.js} +1 -1
  78. package/dist/{index-Hg59RKKE.js → index-yclgXrqJ.js} +1 -1
  79. package/dist/index.es.js +45 -45
  80. package/dist/{integer-design-Cy9c0fzI.js → integer-design-DJ4aKAz0.js} +1 -1
  81. package/dist/{integer-props-DFDOIb2a.js → integer-props-CaSOySHa.js} +5 -4
  82. package/dist/{integer-style-CfIX5ReH.js → integer-style-CCLqQ4ys.js} +1 -1
  83. package/dist/{mb-render-D_uumPQr.js → mb-render-JGHghp5L.js} +1 -30
  84. package/dist/{number-input-ex-CWci0pCj.js → number-input-ex-CtHpEamV.js} +2 -1
  85. package/dist/{org-props-B5dk289u.js → org-props-CRAmwHlJ.js} +2 -2
  86. package/dist/{org-style-BoSDPuw9.js → org-style-BWj_AEnP.js} +1 -1
  87. package/dist/{pagination-design-Ci4wxUIk.js → pagination-design-BGUqZKxh.js} +2 -2
  88. package/dist/paper-widget-design-CgmZ8LSm.js +4 -0
  89. package/dist/{qrcode-design-CJ9R5DIn.js → qrcode-design-CjN0UWN3.js} +1 -1
  90. package/dist/{ref-autofill-editor-B4KDvHhR.js → ref-autofill-editor-BKYPW69A.js} +2 -3
  91. package/dist/{ref-props-CwDGepT3.js → ref-props-M99PRlsI.js} +3 -3
  92. package/dist/{ref-style-B35CsOQO.js → ref-style-BCeprSYg.js} +1 -1
  93. package/dist/{regex-editor-CIVvr_Lx.js → regex-editor-BGaFYbF4.js} +3 -2
  94. package/dist/{revo-grid.entry-DeWzC35s.js → revo-grid.entry-Bokapeoj.js} +1 -1
  95. package/dist/{revogr-attribution_7.entry-BJZ-twfj.js → revogr-attribution_7.entry-D7WJHpFT.js} +3 -3
  96. package/dist/{revogr-clipboard_3.entry-DkgRA8qw.js → revogr-clipboard_3.entry-Bk1SGzbF.js} +2 -2
  97. package/dist/{revogr-data_4.entry-BZLzvcbo.js → revogr-data_4.entry-2v7X9qHp.js} +2 -2
  98. package/dist/{revogr-filter-panel.entry-zGvhshno.js → revogr-filter-panel.entry-DXaW46ts.js} +1 -1
  99. package/dist/{select-render-type-editor.vue_vue_type_script_setup_true_lang-Asn5-ZRz.js → select-render-type-editor.vue_vue_type_script_setup_true_lang-ygXwKc_C.js} +2 -2
  100. package/dist/{serialnumber-design-CYFU5TVt.js → serialnumber-design-Bo13RmJa.js} +1 -1
  101. package/dist/shared/index.es.js +18 -19
  102. package/dist/{signature-design-Cwi0cZOI.js → signature-design-DT5T5nus.js} +1 -1
  103. package/dist/{signature-props-cQRB8U8x.js → signature-props-cW9R4qcY.js} +3 -3
  104. package/dist/{signature-style-C90NsLxg.js → signature-style-XPxgyfzG.js} +1 -1
  105. package/dist/{single-field-drop-BFhQs-3z.js → single-field-drop-CjK8KjfH.js} +3 -2
  106. package/dist/{size-editor-Dx3y_otg.js → size-editor-aLyY3Bsr.js} +1 -1
  107. package/dist/src/nocode-base/src/constant/index.d.ts +16 -1
  108. package/dist/src/nocode-base/src/hooks/annotation/form-annotation-controller.d.ts +14 -148
  109. package/dist/src/nocode-base/src/hooks/annotation/index.d.ts +0 -1
  110. package/dist/src/nocode-base/src/hooks/material-consume/material-consume-table-controller.d.ts +3 -1
  111. package/dist/src/nocode-base/src/hooks/material-consume/mc-render.d.ts +8 -1
  112. package/dist/src/nocode-base/src/hooks/material-consume/types.d.ts +13 -0
  113. package/dist/src/nocode-base/src/types/common/base.d.ts +8 -0
  114. package/dist/src/nocode-base/src/types/fields/i-trace.d.ts +6 -0
  115. package/dist/src/nocode-base/src/types/render/mc-render.d.ts +8 -1
  116. package/dist/src/nocode-base/src/types/render/sub-table-render.d.ts +8 -1
  117. package/dist/src/nocode-base/src/types/widgets/i-diagonal.d.ts +4 -2
  118. package/dist/src/nocode-web-render/src/index.d.ts +0 -1
  119. package/dist/src/nocode-web-render/src/render/sub-table/common/scan-modal.vue.d.ts +12 -1
  120. package/dist/src/nocode-web-render/src/render/sub-table/common/sub-table-render.d.ts +8 -1
  121. package/dist/src/nocode-web-render/src/render/sub-table/material-consume/mc-web-render.d.ts +7 -0
  122. package/dist/src/online-form/src/views/__cell_widgets__/common/assoc-filter-editor/assoc-filter-editor.vue.d.ts +20 -0
  123. package/dist/src/online-form/src/views/__cell_widgets__/common/assoc-filter-editor/assoc-filter.util.d.ts +30 -0
  124. package/dist/src/online-form/src/views/__cell_widgets__/common/assoc-filter-editor/assoc-source-field-select.vue.d.ts +22 -0
  125. package/dist/src/online-form/src/views/__cell_widgets__/common/assoc-filter-editor/index.d.ts +3 -0
  126. package/dist/src/online-form/src/views/designer/hooks/useAllSpreadSheets.d.ts +40 -0
  127. package/dist/src/online-form/src/views/designer/hooks/useSpreadSheet.d.ts +55 -0
  128. package/dist/src/online-form/src/views/designer/modules/panel/panel-data-init-config/common/data-source-title.vue.d.ts +2 -2
  129. package/dist/src/online-form/src/views/render/__components__/_field_/trace/composables/assoc-filter.d.ts +11 -0
  130. package/dist/src/shared/components/Signature/ui/sign-editor.vue.d.ts +2 -2
  131. package/dist/src/shared/components/version-select/version-select.vue.d.ts +2 -2
  132. package/dist/{text-design-TEheiKQx.js → text-design-DIR_98fe.js} +2 -2
  133. package/dist/{text-design-jMPxIgZW.js → text-design-Dz8pIESR.js} +2 -2
  134. package/dist/{text-props-CrkSvg6D.js → text-props-BxirdX2V.js} +5 -5
  135. package/dist/{text-style-DmwTt8KQ.js → text-style-MPmJRVRg.js} +1 -1
  136. package/dist/{throttle-Cpk1LoGk-DTkhEkFR.js → throttle-Cpk1LoGk-C22z7VFi.js} +1 -1
  137. package/dist/{timediff-design-D_if-K1S.js → timediff-design-Pud7SFpe.js} +1 -1
  138. package/dist/{trace-design-oN7pgtab.js → trace-design-DNVZ_y9D.js} +2 -2
  139. package/dist/trace-props-LPvWrrti.js +610 -0
  140. package/dist/{trace-style-TNnFcvfw.js → trace-style-DnaicSRA.js} +1 -1
  141. package/dist/use-namespace-qtLS8nEh.js +88 -0
  142. package/dist/{user-props-Ce-ilCmU.js → user-props-DdTpHX3B.js} +2 -2
  143. package/dist/{user-style-4rp0jKYP.js → user-style-6SWgJi8d.js} +1 -1
  144. package/dist/{value-editor.vue_vue_type_style_index_0_lang-DMuR0u4j.js → value-editor.vue_vue_type_style_index_0_lang-DKeZWlc0.js} +2 -2
  145. package/dist/{version-select-DSFIlYgX.js → version-select-CXWtI4W-.js} +1041 -4
  146. package/dist/web-render/index.es.js +12 -955
  147. package/dist/{widget-barcode-Du7LOaiy.js → widget-barcode-iBjDv4NF.js} +4 -4
  148. package/dist/{widget-diagonal-D-q7WK6T.js → widget-diagonal-4ZMgaI9y.js} +73 -17
  149. package/dist/{widget-image-Da5mvgMm.js → widget-image-B63wZzz4.js} +5 -5
  150. package/dist/{widget-line-oIFH8P04.js → widget-line-CIG-L--W.js} +2 -2
  151. package/dist/{widget-pagination-CSonelt_.js → widget-pagination-CAmhXECi.js} +5 -5
  152. package/dist/{widget-power-CWczWA7K.js → widget-power-CsiguFSe.js} +4 -3
  153. package/dist/{widget-qrcode-MQ-cSphb.js → widget-qrcode-BuEayrLO.js} +3 -3
  154. package/dist/{widget-rangelimit-CFDeRJIf.js → widget-rangelimit-CqaLvV8n.js} +4 -3
  155. package/dist/{widget-serialnumber-DlE2-jvp.js → widget-serialnumber-C_wAw0TS.js} +1 -1
  156. package/dist/{widget-text-B1SnpOGN.js → widget-text-CRApo2EO.js} +5 -5
  157. package/dist/{widget-timediff-DeyJbqRE.js → widget-timediff-D1q5VNhe.js} +2 -2
  158. package/package.json +1 -1
  159. package/dist/AntdIcon-C3RMq2zm.js +0 -1040
  160. package/dist/form-annotation-controller-DDDyHAwe.js +0 -707
  161. package/dist/index-CWpratsK.js +0 -41850
  162. package/dist/paper-widget-design-BilYU9rh.js +0 -4
  163. package/dist/src/nocode-base/src/hooks/annotation/types.d.ts +0 -16
  164. package/dist/src/nocode-web-render/src/annotation/form-abandon-medpro-modal.vue.d.ts +0 -15
  165. package/dist/src/nocode-web-render/src/annotation/form-abandon-modal.vue.d.ts +0 -15
  166. package/dist/src/nocode-web-render/src/annotation/form-abandon-v2-modal.vue.d.ts +0 -11
  167. package/dist/src/nocode-web-render/src/annotation/index.d.ts +0 -2
  168. package/dist/src/nocode-web-render/src/annotation/submit-form-change-modal.vue.d.ts +0 -104
  169. package/dist/src/nocode-web-render/src/annotation/use-annotation.d.ts +0 -37
  170. package/dist/trace-props-BFnUk6kv.js +0 -275
@@ -0,0 +1,4420 @@
1
+ import { i as api, _ as _export_sfc, bO as getAugmentedNamespace, k as commonjsGlobal, l as getDefaultExportFromCjs, bh as getParseRuleConfig, an as getParseRuleValue, ax as calcFillData, aM as uuid2 } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-BfGYCqH5.js";
2
+ import { message, Modal, Form } from "ant-design-vue";
3
+ import { watch, ref as ref$1, defineComponent, inject, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, createBlock, withCtx, createTextVNode, toDisplayString, createCommentVNode, onUnmounted, createVNode, h, onMounted, mergeProps, unref, reactive, Fragment, renderList, toRaw, withKeys, withDirectives, vShow, toRef, watchEffect } from "vue";
4
+ import { debounce, cloneDeep } from "lodash-es";
5
+ import "dayjs";
6
+ import { n as noop, t as tryOnScopeDispose, c as isClient, d as tryOnMounted, r as resolveUnref, i as isIOS, e as isString, f as identity, w as watchDebounced, u as useFormModel, M as MBRender, b as MCRender } from "./mb-render-JGHghp5L.js";
7
+ function unrefElement(elRef) {
8
+ var _a;
9
+ const plain = resolveUnref(elRef);
10
+ return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;
11
+ }
12
+ const defaultWindow = isClient ? window : void 0;
13
+ function useEventListener(...args) {
14
+ let target;
15
+ let events;
16
+ let listeners;
17
+ let options;
18
+ if (isString(args[0]) || Array.isArray(args[0])) {
19
+ [events, listeners, options] = args;
20
+ target = defaultWindow;
21
+ } else {
22
+ [target, events, listeners, options] = args;
23
+ }
24
+ if (!target)
25
+ return noop;
26
+ if (!Array.isArray(events))
27
+ events = [events];
28
+ if (!Array.isArray(listeners))
29
+ listeners = [listeners];
30
+ const cleanups = [];
31
+ const cleanup = () => {
32
+ cleanups.forEach((fn) => fn());
33
+ cleanups.length = 0;
34
+ };
35
+ const register = (el, event, listener, options2) => {
36
+ el.addEventListener(event, listener, options2);
37
+ return () => el.removeEventListener(event, listener, options2);
38
+ };
39
+ const stopWatch = watch(() => [unrefElement(target), resolveUnref(options)], ([el, options2]) => {
40
+ cleanup();
41
+ if (!el)
42
+ return;
43
+ cleanups.push(...events.flatMap((event) => {
44
+ return listeners.map((listener) => register(el, event, listener, options2));
45
+ }));
46
+ }, { immediate: true, flush: "post" });
47
+ const stop = () => {
48
+ stopWatch();
49
+ cleanup();
50
+ };
51
+ tryOnScopeDispose(stop);
52
+ return stop;
53
+ }
54
+ let _iOSWorkaround = false;
55
+ function onClickOutside(target, handler, options = {}) {
56
+ const { window: window2 = defaultWindow, ignore = [], capture = true, detectIframe = false } = options;
57
+ if (!window2)
58
+ return;
59
+ if (isIOS && !_iOSWorkaround) {
60
+ _iOSWorkaround = true;
61
+ Array.from(window2.document.body.children).forEach((el) => el.addEventListener("click", noop));
62
+ }
63
+ let shouldListen = true;
64
+ const shouldIgnore = (event) => {
65
+ return ignore.some((target2) => {
66
+ if (typeof target2 === "string") {
67
+ return Array.from(window2.document.querySelectorAll(target2)).some((el) => el === event.target || event.composedPath().includes(el));
68
+ } else {
69
+ const el = unrefElement(target2);
70
+ return el && (event.target === el || event.composedPath().includes(el));
71
+ }
72
+ });
73
+ };
74
+ const listener = (event) => {
75
+ const el = unrefElement(target);
76
+ if (!el || el === event.target || event.composedPath().includes(el))
77
+ return;
78
+ if (event.detail === 0)
79
+ shouldListen = !shouldIgnore(event);
80
+ if (!shouldListen) {
81
+ shouldListen = true;
82
+ return;
83
+ }
84
+ handler(event);
85
+ };
86
+ const cleanup = [
87
+ useEventListener(window2, "click", listener, { passive: true, capture }),
88
+ useEventListener(window2, "pointerdown", (e) => {
89
+ const el = unrefElement(target);
90
+ if (el)
91
+ shouldListen = !e.composedPath().includes(el) && !shouldIgnore(e);
92
+ }, { passive: true }),
93
+ detectIframe && useEventListener(window2, "blur", (event) => {
94
+ var _a;
95
+ const el = unrefElement(target);
96
+ if (((_a = window2.document.activeElement) == null ? void 0 : _a.tagName) === "IFRAME" && !(el == null ? void 0 : el.contains(window2.document.activeElement)))
97
+ handler(event);
98
+ })
99
+ ].filter(Boolean);
100
+ const stop = () => cleanup.forEach((fn) => fn());
101
+ return stop;
102
+ }
103
+ function useSupported(callback, sync = false) {
104
+ const isSupported = ref$1();
105
+ const update = () => isSupported.value = Boolean(callback());
106
+ update();
107
+ tryOnMounted(update, sync);
108
+ return isSupported;
109
+ }
110
+ const _global = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
111
+ const globalKey = "__vueuse_ssr_handlers__";
112
+ _global[globalKey] = _global[globalKey] || {};
113
+ function useIntersectionObserver(target, callback, options = {}) {
114
+ const {
115
+ root,
116
+ rootMargin = "0px",
117
+ threshold = 0.1,
118
+ window: window2 = defaultWindow
119
+ } = options;
120
+ const isSupported = useSupported(() => window2 && "IntersectionObserver" in window2);
121
+ let cleanup = noop;
122
+ const stopWatch = isSupported.value ? watch(() => ({
123
+ el: unrefElement(target),
124
+ root: unrefElement(root)
125
+ }), ({ el, root: root2 }) => {
126
+ cleanup();
127
+ if (!el)
128
+ return;
129
+ const observer = new IntersectionObserver(callback, {
130
+ root: root2,
131
+ rootMargin,
132
+ threshold
133
+ });
134
+ observer.observe(el);
135
+ cleanup = () => {
136
+ observer.disconnect();
137
+ cleanup = noop;
138
+ };
139
+ }, { immediate: true, flush: "post" }) : noop;
140
+ const stop = () => {
141
+ cleanup();
142
+ stopWatch();
143
+ };
144
+ tryOnScopeDispose(stop);
145
+ return {
146
+ isSupported,
147
+ stop
148
+ };
149
+ }
150
+ var SwipeDirection;
151
+ (function(SwipeDirection2) {
152
+ SwipeDirection2["UP"] = "UP";
153
+ SwipeDirection2["RIGHT"] = "RIGHT";
154
+ SwipeDirection2["DOWN"] = "DOWN";
155
+ SwipeDirection2["LEFT"] = "LEFT";
156
+ SwipeDirection2["NONE"] = "NONE";
157
+ })(SwipeDirection || (SwipeDirection = {}));
158
+ var __defProp = Object.defineProperty;
159
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
160
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
161
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
162
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
163
+ var __spreadValues = (a, b) => {
164
+ for (var prop in b || (b = {}))
165
+ if (__hasOwnProp.call(b, prop))
166
+ __defNormalProp(a, prop, b[prop]);
167
+ if (__getOwnPropSymbols)
168
+ for (var prop of __getOwnPropSymbols(b)) {
169
+ if (__propIsEnum.call(b, prop))
170
+ __defNormalProp(a, prop, b[prop]);
171
+ }
172
+ return a;
173
+ };
174
+ const _TransitionPresets = {
175
+ easeInSine: [0.12, 0, 0.39, 0],
176
+ easeOutSine: [0.61, 1, 0.88, 1],
177
+ easeInOutSine: [0.37, 0, 0.63, 1],
178
+ easeInQuad: [0.11, 0, 0.5, 0],
179
+ easeOutQuad: [0.5, 1, 0.89, 1],
180
+ easeInOutQuad: [0.45, 0, 0.55, 1],
181
+ easeInCubic: [0.32, 0, 0.67, 0],
182
+ easeOutCubic: [0.33, 1, 0.68, 1],
183
+ easeInOutCubic: [0.65, 0, 0.35, 1],
184
+ easeInQuart: [0.5, 0, 0.75, 0],
185
+ easeOutQuart: [0.25, 1, 0.5, 1],
186
+ easeInOutQuart: [0.76, 0, 0.24, 1],
187
+ easeInQuint: [0.64, 0, 0.78, 0],
188
+ easeOutQuint: [0.22, 1, 0.36, 1],
189
+ easeInOutQuint: [0.83, 0, 0.17, 1],
190
+ easeInExpo: [0.7, 0, 0.84, 0],
191
+ easeOutExpo: [0.16, 1, 0.3, 1],
192
+ easeInOutExpo: [0.87, 0, 0.13, 1],
193
+ easeInCirc: [0.55, 0, 1, 0.45],
194
+ easeOutCirc: [0, 0.55, 0.45, 1],
195
+ easeInOutCirc: [0.85, 0, 0.15, 1],
196
+ easeInBack: [0.36, 0, 0.66, -0.56],
197
+ easeOutBack: [0.34, 1.56, 0.64, 1],
198
+ easeInOutBack: [0.68, -0.6, 0.32, 1.6]
199
+ };
200
+ __spreadValues({
201
+ linear: identity
202
+ }, _TransitionPresets);
203
+ function useWindowSize(options = {}) {
204
+ const {
205
+ window: window2 = defaultWindow,
206
+ initialWidth = Infinity,
207
+ initialHeight = Infinity,
208
+ listenOrientation = true,
209
+ includeScrollbar = true
210
+ } = options;
211
+ const width = ref$1(initialWidth);
212
+ const height = ref$1(initialHeight);
213
+ const update = () => {
214
+ if (window2) {
215
+ if (includeScrollbar) {
216
+ width.value = window2.innerWidth;
217
+ height.value = window2.innerHeight;
218
+ } else {
219
+ width.value = window2.document.documentElement.clientWidth;
220
+ height.value = window2.document.documentElement.clientHeight;
221
+ }
222
+ }
223
+ };
224
+ update();
225
+ tryOnMounted(update);
226
+ useEventListener("resize", update, { passive: true });
227
+ if (listenOrientation)
228
+ useEventListener("orientationchange", update, { passive: true });
229
+ return { width, height };
230
+ }
231
+ const uploadApis = {
232
+ upload: null,
233
+ transfer: (filename) => filename
234
+ };
235
+ function useWebUpload() {
236
+ async function upload(file, opts) {
237
+ if (!uploadApis.upload) return;
238
+ const path = await uploadApis.upload(file, opts);
239
+ return path;
240
+ }
241
+ function transfer(filename) {
242
+ if (!uploadApis.transfer) return "";
243
+ return uploadApis.transfer(filename);
244
+ }
245
+ async function setUploadApis(opts) {
246
+ Object.assign(uploadApis, opts);
247
+ }
248
+ return {
249
+ upload,
250
+ transfer,
251
+ setUploadApis
252
+ };
253
+ }
254
+ class Uploader {
255
+ static getFiles({
256
+ multiple,
257
+ acceptList
258
+ }) {
259
+ const input = document.createElement("input");
260
+ input.type = "file";
261
+ input.multiple = !!multiple;
262
+ input.accept = acceptList || "*";
263
+ input.click();
264
+ return new Promise((resolve, reject) => {
265
+ input.onchange = async () => {
266
+ const filelist = input.files || [];
267
+ resolve(Object.values(filelist));
268
+ };
269
+ input.onerror = async () => {
270
+ reject();
271
+ };
272
+ });
273
+ }
274
+ static async beforeUploadFun(file, {
275
+ maxSize = 5,
276
+ acceptList = [],
277
+ beforeUpload
278
+ }) {
279
+ if (file.name.indexOf(",") > -1) {
280
+ return Promise.reject(`文件名不能有逗号`);
281
+ }
282
+ beforeUpload && await beforeUpload(file);
283
+ const fileSize = file.size / 1024 / 1024;
284
+ if (fileSize > maxSize) {
285
+ return Promise.reject(`【${file.name}】文件大小不能超过 ${maxSize}MB`);
286
+ }
287
+ if (acceptList.length) {
288
+ const filename = file.name.replaceAll(" ", "").match(/\.([A-Za-z0-9]+)$/).at(-1);
289
+ if (!acceptList.includes(`.${filename.toLocaleLowerCase()}`)) {
290
+ return Promise.reject(`【${file.name}】支持的扩展名为${acceptList.join(" ")}`);
291
+ }
292
+ }
293
+ }
294
+ static async uploadByFile(file, isApp = false, modelKey) {
295
+ const fileData = {
296
+ filename: file.name,
297
+ name: "file",
298
+ file,
299
+ size: file.size
300
+ };
301
+ const http = isApp ? appUploadapis : passUploadapis;
302
+ const { data } = await http(fileData, modelKey);
303
+ return "/" + data;
304
+ }
305
+ static toBase64(file) {
306
+ return new Promise((resolve, reject) => {
307
+ const reader = new FileReader();
308
+ reader.onloadend = function() {
309
+ resolve(reader.result);
310
+ };
311
+ reader.onerror = () => reject("转换失败");
312
+ if (file) {
313
+ reader.readAsDataURL(file);
314
+ }
315
+ });
316
+ }
317
+ /**
318
+ * 图片压缩转Base64
319
+ */
320
+ static compressToBase64(file, { quality = 0.8, scale = 0.8 } = {}) {
321
+ return new Promise((resolve, reject) => {
322
+ if (!file.type.startsWith("image/")) {
323
+ reject("请选择图片文件");
324
+ return;
325
+ }
326
+ if (typeof scale !== "number" || scale <= 0 || scale > 1) {
327
+ reject("缩放比例必须在0-1之间");
328
+ return;
329
+ }
330
+ const reader = new FileReader();
331
+ reader.onload = (e) => {
332
+ const img = new Image();
333
+ img.onload = () => {
334
+ const width = Math.floor(img.width * scale);
335
+ const height = Math.floor(img.height * scale);
336
+ const canvas = document.createElement("canvas");
337
+ canvas.width = width;
338
+ canvas.height = height;
339
+ const ctx = canvas.getContext("2d");
340
+ ctx.imageSmoothingEnabled = true;
341
+ ctx.imageSmoothingQuality = "high";
342
+ ctx.drawImage(img, 0, 0, width, height);
343
+ resolve(canvas.toDataURL(file.type, quality));
344
+ };
345
+ img.onerror = () => reject("图片加载失败");
346
+ img.src = e.target.result;
347
+ };
348
+ reader.onerror = () => reject("文件读取失败");
349
+ reader.readAsDataURL(file);
350
+ });
351
+ }
352
+ }
353
+ async function appUploadapis(formData, modelKey) {
354
+ return api.apaas.fileResource.postUpload({ ...modelKey ? { modelKey } : {} }, formData, {
355
+ transferToConfig: { headers: { "Content-Type": "multipart/form-data;charset=UTF-8" } }
356
+ });
357
+ }
358
+ async function passUploadapis(formData) {
359
+ return api.platform.file.postUploadImage({ bucket: "IMAGE" }, formData, {
360
+ transferToConfig: { headers: { "Content-Type": "multipart/form-data;charset=UTF-8" } }
361
+ });
362
+ }
363
+ const initWebPaasUploadApis = () => {
364
+ const { setUploadApis } = useWebUpload();
365
+ setUploadApis({
366
+ upload: async (file, opts) => {
367
+ return await Uploader.uploadByFile(file, true, opts?.modelKey);
368
+ },
369
+ transfer: (filename) => {
370
+ if (!filename) return "";
371
+ return `${window.NocodeAdapter.minioPath}${!filename.startsWith("/") ? `/${filename}` : filename}`;
372
+ }
373
+ });
374
+ };
375
+ class OpenUtilWeb {
376
+ message = (args) => {
377
+ message.open(args);
378
+ };
379
+ confirmModal = (options) => {
380
+ return new Promise((resolve) => {
381
+ Modal.confirm({
382
+ ...options,
383
+ onOk: () => {
384
+ resolve(true);
385
+ },
386
+ onCancel: () => {
387
+ resolve(false);
388
+ }
389
+ });
390
+ });
391
+ };
392
+ }
393
+ class ModalManager {
394
+ /**
395
+ * 所有打开的modal集合
396
+ */
397
+ modals = [];
398
+ /**
399
+ * 打开模态
400
+ * @template T
401
+ * @param component
402
+ * @param [props]
403
+ * @param [opts]
404
+ * @return {*}
405
+ */
406
+ async openModal(component, props, opts) {
407
+ const modal = window.NocodeAdapter.utils.overlay.createModal(component, props, opts);
408
+ this.modals.push(modal);
409
+ await modal.present();
410
+ const result = await modal.onWillDismiss();
411
+ this.modals = this.modals.filter((item) => item !== modal);
412
+ return result;
413
+ }
414
+ /**
415
+ * 销毁所有未关闭的modal
416
+ */
417
+ destroyAllModals() {
418
+ for (const modal of this.modals) {
419
+ modal.dismiss();
420
+ }
421
+ this.modals = [];
422
+ }
423
+ }
424
+ const _hoisted_1$6 = { class: "modal-wrapper__content" };
425
+ const _hoisted_2$3 = {
426
+ key: 0,
427
+ class: "modal-wrapper__footer"
428
+ };
429
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
430
+ __name: "modal-wrapper",
431
+ props: {
432
+ opts: { default: () => ({}) },
433
+ disabledOk: { type: Boolean },
434
+ doCancel: {},
435
+ doOk: {}
436
+ },
437
+ setup(__props) {
438
+ const modal = inject("modal");
439
+ if (!modal) {
440
+ console.error("modal不存在");
441
+ }
442
+ const props = __props;
443
+ const showFooter = computed(() => {
444
+ return props.opts.showFooter !== false;
445
+ });
446
+ const _options = computed(() => {
447
+ return {
448
+ okText: $t("sys.okText"),
449
+ cancelText: $t("sys.cancelText"),
450
+ showOkBtn: true,
451
+ showCancelBtn: true,
452
+ ...props.opts,
453
+ showFooter: false
454
+ };
455
+ });
456
+ watch(
457
+ () => _options.value,
458
+ (val) => {
459
+ if (val) {
460
+ modal.setOptions(val);
461
+ }
462
+ },
463
+ { immediate: true, deep: true }
464
+ );
465
+ const onCancel = async () => {
466
+ if (props.doCancel) {
467
+ const allowClose = await props.doCancel();
468
+ if (!allowClose) {
469
+ return;
470
+ }
471
+ }
472
+ modal.dismiss();
473
+ };
474
+ const onOk = async () => {
475
+ if (props.doOk) {
476
+ const data = await props.doOk();
477
+ if (!data) {
478
+ return;
479
+ }
480
+ modal.dismiss(data);
481
+ }
482
+ };
483
+ return (_ctx, _cache) => {
484
+ const _component_a_button = resolveComponent("a-button");
485
+ return openBlock(), createElementBlock("div", {
486
+ class: normalizeClass(["modal-wrapper", _options.value.height && "modal-wrapper--has-height"])
487
+ }, [
488
+ createElementVNode("div", _hoisted_1$6, [
489
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
490
+ ]),
491
+ showFooter.value ? (openBlock(), createElementBlock("div", _hoisted_2$3, [
492
+ _options.value.showCancelBtn ? (openBlock(), createBlock(_component_a_button, {
493
+ key: 0,
494
+ onClick: onCancel
495
+ }, {
496
+ default: withCtx(() => [
497
+ createTextVNode(toDisplayString(_options.value.cancelText), 1)
498
+ ]),
499
+ _: 1
500
+ })) : createCommentVNode("", true),
501
+ _options.value.showOkBtn ? (openBlock(), createBlock(_component_a_button, {
502
+ key: 1,
503
+ disabled: __props.disabledOk,
504
+ type: "primary",
505
+ onClick: onOk
506
+ }, {
507
+ default: withCtx(() => [
508
+ createTextVNode(toDisplayString(_options.value.okText), 1)
509
+ ]),
510
+ _: 1
511
+ }, 8, ["disabled"])) : createCommentVNode("", true)
512
+ ])) : createCommentVNode("", true)
513
+ ], 2);
514
+ };
515
+ }
516
+ });
517
+ const ModalWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-f2d43ec5"]]);
518
+ var type;
519
+ var hasRequiredType;
520
+ function requireType() {
521
+ if (hasRequiredType) return type;
522
+ hasRequiredType = 1;
523
+ type = TypeError;
524
+ return type;
525
+ }
526
+ const __viteBrowserExternal = {};
527
+ const __viteBrowserExternal$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
528
+ __proto__: null,
529
+ default: __viteBrowserExternal
530
+ }, Symbol.toStringTag, { value: "Module" }));
531
+ const require$$0 = /* @__PURE__ */ getAugmentedNamespace(__viteBrowserExternal$1);
532
+ var objectInspect;
533
+ var hasRequiredObjectInspect;
534
+ function requireObjectInspect() {
535
+ if (hasRequiredObjectInspect) return objectInspect;
536
+ hasRequiredObjectInspect = 1;
537
+ var hasMap = typeof Map === "function" && Map.prototype;
538
+ var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null;
539
+ var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === "function" ? mapSizeDescriptor.get : null;
540
+ var mapForEach = hasMap && Map.prototype.forEach;
541
+ var hasSet = typeof Set === "function" && Set.prototype;
542
+ var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null;
543
+ var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === "function" ? setSizeDescriptor.get : null;
544
+ var setForEach = hasSet && Set.prototype.forEach;
545
+ var hasWeakMap = typeof WeakMap === "function" && WeakMap.prototype;
546
+ var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
547
+ var hasWeakSet = typeof WeakSet === "function" && WeakSet.prototype;
548
+ var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
549
+ var hasWeakRef = typeof WeakRef === "function" && WeakRef.prototype;
550
+ var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
551
+ var booleanValueOf = Boolean.prototype.valueOf;
552
+ var objectToString = Object.prototype.toString;
553
+ var functionToString = Function.prototype.toString;
554
+ var $match = String.prototype.match;
555
+ var $slice = String.prototype.slice;
556
+ var $replace = String.prototype.replace;
557
+ var $toUpperCase = String.prototype.toUpperCase;
558
+ var $toLowerCase = String.prototype.toLowerCase;
559
+ var $test = RegExp.prototype.test;
560
+ var $concat = Array.prototype.concat;
561
+ var $join = Array.prototype.join;
562
+ var $arrSlice = Array.prototype.slice;
563
+ var $floor = Math.floor;
564
+ var bigIntValueOf = typeof BigInt === "function" ? BigInt.prototype.valueOf : null;
565
+ var gOPS = Object.getOwnPropertySymbols;
566
+ var symToString = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? Symbol.prototype.toString : null;
567
+ var hasShammedSymbols = typeof Symbol === "function" && typeof Symbol.iterator === "object";
568
+ var toStringTag = typeof Symbol === "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? "object" : "symbol") ? Symbol.toStringTag : null;
569
+ var isEnumerable = Object.prototype.propertyIsEnumerable;
570
+ var gPO = (typeof Reflect === "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(O) {
571
+ return O.__proto__;
572
+ } : null);
573
+ function addNumericSeparator(num, str) {
574
+ if (num === Infinity || num === -Infinity || num !== num || num && num > -1e3 && num < 1e3 || $test.call(/e/, str)) {
575
+ return str;
576
+ }
577
+ var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
578
+ if (typeof num === "number") {
579
+ var int = num < 0 ? -$floor(-num) : $floor(num);
580
+ if (int !== num) {
581
+ var intStr = String(int);
582
+ var dec = $slice.call(str, intStr.length + 1);
583
+ return $replace.call(intStr, sepRegex, "$&_") + "." + $replace.call($replace.call(dec, /([0-9]{3})/g, "$&_"), /_$/, "");
584
+ }
585
+ }
586
+ return $replace.call(str, sepRegex, "$&_");
587
+ }
588
+ var utilInspect = require$$0;
589
+ var inspectCustom = utilInspect.custom;
590
+ var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
591
+ var quotes = {
592
+ __proto__: null,
593
+ "double": '"',
594
+ single: "'"
595
+ };
596
+ var quoteREs = {
597
+ __proto__: null,
598
+ "double": /(["\\])/g,
599
+ single: /(['\\])/g
600
+ };
601
+ objectInspect = function inspect_(obj, options, depth, seen) {
602
+ var opts = options || {};
603
+ if (has(opts, "quoteStyle") && !has(quotes, opts.quoteStyle)) {
604
+ throw new TypeError('option "quoteStyle" must be "single" or "double"');
605
+ }
606
+ if (has(opts, "maxStringLength") && (typeof opts.maxStringLength === "number" ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) {
607
+ throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
608
+ }
609
+ var customInspect = has(opts, "customInspect") ? opts.customInspect : true;
610
+ if (typeof customInspect !== "boolean" && customInspect !== "symbol") {
611
+ throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
612
+ }
613
+ if (has(opts, "indent") && opts.indent !== null && opts.indent !== " " && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) {
614
+ throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
615
+ }
616
+ if (has(opts, "numericSeparator") && typeof opts.numericSeparator !== "boolean") {
617
+ throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
618
+ }
619
+ var numericSeparator = opts.numericSeparator;
620
+ if (typeof obj === "undefined") {
621
+ return "undefined";
622
+ }
623
+ if (obj === null) {
624
+ return "null";
625
+ }
626
+ if (typeof obj === "boolean") {
627
+ return obj ? "true" : "false";
628
+ }
629
+ if (typeof obj === "string") {
630
+ return inspectString(obj, opts);
631
+ }
632
+ if (typeof obj === "number") {
633
+ if (obj === 0) {
634
+ return Infinity / obj > 0 ? "0" : "-0";
635
+ }
636
+ var str = String(obj);
637
+ return numericSeparator ? addNumericSeparator(obj, str) : str;
638
+ }
639
+ if (typeof obj === "bigint") {
640
+ var bigIntStr = String(obj) + "n";
641
+ return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
642
+ }
643
+ var maxDepth = typeof opts.depth === "undefined" ? 5 : opts.depth;
644
+ if (typeof depth === "undefined") {
645
+ depth = 0;
646
+ }
647
+ if (depth >= maxDepth && maxDepth > 0 && typeof obj === "object") {
648
+ return isArray(obj) ? "[Array]" : "[Object]";
649
+ }
650
+ var indent = getIndent(opts, depth);
651
+ if (typeof seen === "undefined") {
652
+ seen = [];
653
+ } else if (indexOf(seen, obj) >= 0) {
654
+ return "[Circular]";
655
+ }
656
+ function inspect(value, from, noIndent) {
657
+ if (from) {
658
+ seen = $arrSlice.call(seen);
659
+ seen.push(from);
660
+ }
661
+ if (noIndent) {
662
+ var newOpts = {
663
+ depth: opts.depth
664
+ };
665
+ if (has(opts, "quoteStyle")) {
666
+ newOpts.quoteStyle = opts.quoteStyle;
667
+ }
668
+ return inspect_(value, newOpts, depth + 1, seen);
669
+ }
670
+ return inspect_(value, opts, depth + 1, seen);
671
+ }
672
+ if (typeof obj === "function" && !isRegExp(obj)) {
673
+ var name = nameOf(obj);
674
+ var keys = arrObjKeys(obj, inspect);
675
+ return "[Function" + (name ? ": " + name : " (anonymous)") + "]" + (keys.length > 0 ? " { " + $join.call(keys, ", ") + " }" : "");
676
+ }
677
+ if (isSymbol(obj)) {
678
+ var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, "$1") : symToString.call(obj);
679
+ return typeof obj === "object" && !hasShammedSymbols ? markBoxed(symString) : symString;
680
+ }
681
+ if (isElement(obj)) {
682
+ var s = "<" + $toLowerCase.call(String(obj.nodeName));
683
+ var attrs = obj.attributes || [];
684
+ for (var i = 0; i < attrs.length; i++) {
685
+ s += " " + attrs[i].name + "=" + wrapQuotes(quote(attrs[i].value), "double", opts);
686
+ }
687
+ s += ">";
688
+ if (obj.childNodes && obj.childNodes.length) {
689
+ s += "...";
690
+ }
691
+ s += "</" + $toLowerCase.call(String(obj.nodeName)) + ">";
692
+ return s;
693
+ }
694
+ if (isArray(obj)) {
695
+ if (obj.length === 0) {
696
+ return "[]";
697
+ }
698
+ var xs = arrObjKeys(obj, inspect);
699
+ if (indent && !singleLineValues(xs)) {
700
+ return "[" + indentedJoin(xs, indent) + "]";
701
+ }
702
+ return "[ " + $join.call(xs, ", ") + " ]";
703
+ }
704
+ if (isError(obj)) {
705
+ var parts = arrObjKeys(obj, inspect);
706
+ if (!("cause" in Error.prototype) && "cause" in obj && !isEnumerable.call(obj, "cause")) {
707
+ return "{ [" + String(obj) + "] " + $join.call($concat.call("[cause]: " + inspect(obj.cause), parts), ", ") + " }";
708
+ }
709
+ if (parts.length === 0) {
710
+ return "[" + String(obj) + "]";
711
+ }
712
+ return "{ [" + String(obj) + "] " + $join.call(parts, ", ") + " }";
713
+ }
714
+ if (typeof obj === "object" && customInspect) {
715
+ if (inspectSymbol && typeof obj[inspectSymbol] === "function" && utilInspect) {
716
+ return utilInspect(obj, { depth: maxDepth - depth });
717
+ } else if (customInspect !== "symbol" && typeof obj.inspect === "function") {
718
+ return obj.inspect();
719
+ }
720
+ }
721
+ if (isMap(obj)) {
722
+ var mapParts = [];
723
+ if (mapForEach) {
724
+ mapForEach.call(obj, function(value, key) {
725
+ mapParts.push(inspect(key, obj, true) + " => " + inspect(value, obj));
726
+ });
727
+ }
728
+ return collectionOf("Map", mapSize.call(obj), mapParts, indent);
729
+ }
730
+ if (isSet(obj)) {
731
+ var setParts = [];
732
+ if (setForEach) {
733
+ setForEach.call(obj, function(value) {
734
+ setParts.push(inspect(value, obj));
735
+ });
736
+ }
737
+ return collectionOf("Set", setSize.call(obj), setParts, indent);
738
+ }
739
+ if (isWeakMap(obj)) {
740
+ return weakCollectionOf("WeakMap");
741
+ }
742
+ if (isWeakSet(obj)) {
743
+ return weakCollectionOf("WeakSet");
744
+ }
745
+ if (isWeakRef(obj)) {
746
+ return weakCollectionOf("WeakRef");
747
+ }
748
+ if (isNumber(obj)) {
749
+ return markBoxed(inspect(Number(obj)));
750
+ }
751
+ if (isBigInt(obj)) {
752
+ return markBoxed(inspect(bigIntValueOf.call(obj)));
753
+ }
754
+ if (isBoolean(obj)) {
755
+ return markBoxed(booleanValueOf.call(obj));
756
+ }
757
+ if (isString2(obj)) {
758
+ return markBoxed(inspect(String(obj)));
759
+ }
760
+ if (typeof window !== "undefined" && obj === window) {
761
+ return "{ [object Window] }";
762
+ }
763
+ if (typeof globalThis !== "undefined" && obj === globalThis || typeof commonjsGlobal !== "undefined" && obj === commonjsGlobal) {
764
+ return "{ [object globalThis] }";
765
+ }
766
+ if (!isDate(obj) && !isRegExp(obj)) {
767
+ var ys = arrObjKeys(obj, inspect);
768
+ var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
769
+ var protoTag = obj instanceof Object ? "" : "null prototype";
770
+ var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
771
+ var constructorTag = isPlainObject || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
772
+ var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat.call([], stringTag || [], protoTag || []), ": ") + "] " : "");
773
+ if (ys.length === 0) {
774
+ return tag + "{}";
775
+ }
776
+ if (indent) {
777
+ return tag + "{" + indentedJoin(ys, indent) + "}";
778
+ }
779
+ return tag + "{ " + $join.call(ys, ", ") + " }";
780
+ }
781
+ return String(obj);
782
+ };
783
+ function wrapQuotes(s, defaultStyle, opts) {
784
+ var style = opts.quoteStyle || defaultStyle;
785
+ var quoteChar = quotes[style];
786
+ return quoteChar + s + quoteChar;
787
+ }
788
+ function quote(s) {
789
+ return $replace.call(String(s), /"/g, "&quot;");
790
+ }
791
+ function canTrustToString(obj) {
792
+ return !toStringTag || !(typeof obj === "object" && (toStringTag in obj || typeof obj[toStringTag] !== "undefined"));
793
+ }
794
+ function isArray(obj) {
795
+ return toStr(obj) === "[object Array]" && canTrustToString(obj);
796
+ }
797
+ function isDate(obj) {
798
+ return toStr(obj) === "[object Date]" && canTrustToString(obj);
799
+ }
800
+ function isRegExp(obj) {
801
+ return toStr(obj) === "[object RegExp]" && canTrustToString(obj);
802
+ }
803
+ function isError(obj) {
804
+ return toStr(obj) === "[object Error]" && canTrustToString(obj);
805
+ }
806
+ function isString2(obj) {
807
+ return toStr(obj) === "[object String]" && canTrustToString(obj);
808
+ }
809
+ function isNumber(obj) {
810
+ return toStr(obj) === "[object Number]" && canTrustToString(obj);
811
+ }
812
+ function isBoolean(obj) {
813
+ return toStr(obj) === "[object Boolean]" && canTrustToString(obj);
814
+ }
815
+ function isSymbol(obj) {
816
+ if (hasShammedSymbols) {
817
+ return obj && typeof obj === "object" && obj instanceof Symbol;
818
+ }
819
+ if (typeof obj === "symbol") {
820
+ return true;
821
+ }
822
+ if (!obj || typeof obj !== "object" || !symToString) {
823
+ return false;
824
+ }
825
+ try {
826
+ symToString.call(obj);
827
+ return true;
828
+ } catch (e) {
829
+ }
830
+ return false;
831
+ }
832
+ function isBigInt(obj) {
833
+ if (!obj || typeof obj !== "object" || !bigIntValueOf) {
834
+ return false;
835
+ }
836
+ try {
837
+ bigIntValueOf.call(obj);
838
+ return true;
839
+ } catch (e) {
840
+ }
841
+ return false;
842
+ }
843
+ var hasOwn = Object.prototype.hasOwnProperty || function(key) {
844
+ return key in this;
845
+ };
846
+ function has(obj, key) {
847
+ return hasOwn.call(obj, key);
848
+ }
849
+ function toStr(obj) {
850
+ return objectToString.call(obj);
851
+ }
852
+ function nameOf(f) {
853
+ if (f.name) {
854
+ return f.name;
855
+ }
856
+ var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
857
+ if (m) {
858
+ return m[1];
859
+ }
860
+ return null;
861
+ }
862
+ function indexOf(xs, x) {
863
+ if (xs.indexOf) {
864
+ return xs.indexOf(x);
865
+ }
866
+ for (var i = 0, l = xs.length; i < l; i++) {
867
+ if (xs[i] === x) {
868
+ return i;
869
+ }
870
+ }
871
+ return -1;
872
+ }
873
+ function isMap(x) {
874
+ if (!mapSize || !x || typeof x !== "object") {
875
+ return false;
876
+ }
877
+ try {
878
+ mapSize.call(x);
879
+ try {
880
+ setSize.call(x);
881
+ } catch (s) {
882
+ return true;
883
+ }
884
+ return x instanceof Map;
885
+ } catch (e) {
886
+ }
887
+ return false;
888
+ }
889
+ function isWeakMap(x) {
890
+ if (!weakMapHas || !x || typeof x !== "object") {
891
+ return false;
892
+ }
893
+ try {
894
+ weakMapHas.call(x, weakMapHas);
895
+ try {
896
+ weakSetHas.call(x, weakSetHas);
897
+ } catch (s) {
898
+ return true;
899
+ }
900
+ return x instanceof WeakMap;
901
+ } catch (e) {
902
+ }
903
+ return false;
904
+ }
905
+ function isWeakRef(x) {
906
+ if (!weakRefDeref || !x || typeof x !== "object") {
907
+ return false;
908
+ }
909
+ try {
910
+ weakRefDeref.call(x);
911
+ return true;
912
+ } catch (e) {
913
+ }
914
+ return false;
915
+ }
916
+ function isSet(x) {
917
+ if (!setSize || !x || typeof x !== "object") {
918
+ return false;
919
+ }
920
+ try {
921
+ setSize.call(x);
922
+ try {
923
+ mapSize.call(x);
924
+ } catch (m) {
925
+ return true;
926
+ }
927
+ return x instanceof Set;
928
+ } catch (e) {
929
+ }
930
+ return false;
931
+ }
932
+ function isWeakSet(x) {
933
+ if (!weakSetHas || !x || typeof x !== "object") {
934
+ return false;
935
+ }
936
+ try {
937
+ weakSetHas.call(x, weakSetHas);
938
+ try {
939
+ weakMapHas.call(x, weakMapHas);
940
+ } catch (s) {
941
+ return true;
942
+ }
943
+ return x instanceof WeakSet;
944
+ } catch (e) {
945
+ }
946
+ return false;
947
+ }
948
+ function isElement(x) {
949
+ if (!x || typeof x !== "object") {
950
+ return false;
951
+ }
952
+ if (typeof HTMLElement !== "undefined" && x instanceof HTMLElement) {
953
+ return true;
954
+ }
955
+ return typeof x.nodeName === "string" && typeof x.getAttribute === "function";
956
+ }
957
+ function inspectString(str, opts) {
958
+ if (str.length > opts.maxStringLength) {
959
+ var remaining = str.length - opts.maxStringLength;
960
+ var trailer = "... " + remaining + " more character" + (remaining > 1 ? "s" : "");
961
+ return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
962
+ }
963
+ var quoteRE = quoteREs[opts.quoteStyle || "single"];
964
+ quoteRE.lastIndex = 0;
965
+ var s = $replace.call($replace.call(str, quoteRE, "\\$1"), /[\x00-\x1f]/g, lowbyte);
966
+ return wrapQuotes(s, "single", opts);
967
+ }
968
+ function lowbyte(c) {
969
+ var n = c.charCodeAt(0);
970
+ var x = {
971
+ 8: "b",
972
+ 9: "t",
973
+ 10: "n",
974
+ 12: "f",
975
+ 13: "r"
976
+ }[n];
977
+ if (x) {
978
+ return "\\" + x;
979
+ }
980
+ return "\\x" + (n < 16 ? "0" : "") + $toUpperCase.call(n.toString(16));
981
+ }
982
+ function markBoxed(str) {
983
+ return "Object(" + str + ")";
984
+ }
985
+ function weakCollectionOf(type2) {
986
+ return type2 + " { ? }";
987
+ }
988
+ function collectionOf(type2, size, entries, indent) {
989
+ var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ", ");
990
+ return type2 + " (" + size + ") {" + joinedEntries + "}";
991
+ }
992
+ function singleLineValues(xs) {
993
+ for (var i = 0; i < xs.length; i++) {
994
+ if (indexOf(xs[i], "\n") >= 0) {
995
+ return false;
996
+ }
997
+ }
998
+ return true;
999
+ }
1000
+ function getIndent(opts, depth) {
1001
+ var baseIndent;
1002
+ if (opts.indent === " ") {
1003
+ baseIndent = " ";
1004
+ } else if (typeof opts.indent === "number" && opts.indent > 0) {
1005
+ baseIndent = $join.call(Array(opts.indent + 1), " ");
1006
+ } else {
1007
+ return null;
1008
+ }
1009
+ return {
1010
+ base: baseIndent,
1011
+ prev: $join.call(Array(depth + 1), baseIndent)
1012
+ };
1013
+ }
1014
+ function indentedJoin(xs, indent) {
1015
+ if (xs.length === 0) {
1016
+ return "";
1017
+ }
1018
+ var lineJoiner = "\n" + indent.prev + indent.base;
1019
+ return lineJoiner + $join.call(xs, "," + lineJoiner) + "\n" + indent.prev;
1020
+ }
1021
+ function arrObjKeys(obj, inspect) {
1022
+ var isArr = isArray(obj);
1023
+ var xs = [];
1024
+ if (isArr) {
1025
+ xs.length = obj.length;
1026
+ for (var i = 0; i < obj.length; i++) {
1027
+ xs[i] = has(obj, i) ? inspect(obj[i], obj) : "";
1028
+ }
1029
+ }
1030
+ var syms = typeof gOPS === "function" ? gOPS(obj) : [];
1031
+ var symMap;
1032
+ if (hasShammedSymbols) {
1033
+ symMap = {};
1034
+ for (var k = 0; k < syms.length; k++) {
1035
+ symMap["$" + syms[k]] = syms[k];
1036
+ }
1037
+ }
1038
+ for (var key in obj) {
1039
+ if (!has(obj, key)) {
1040
+ continue;
1041
+ }
1042
+ if (isArr && String(Number(key)) === key && key < obj.length) {
1043
+ continue;
1044
+ }
1045
+ if (hasShammedSymbols && symMap["$" + key] instanceof Symbol) {
1046
+ continue;
1047
+ } else if ($test.call(/[^\w$]/, key)) {
1048
+ xs.push(inspect(key, obj) + ": " + inspect(obj[key], obj));
1049
+ } else {
1050
+ xs.push(key + ": " + inspect(obj[key], obj));
1051
+ }
1052
+ }
1053
+ if (typeof gOPS === "function") {
1054
+ for (var j = 0; j < syms.length; j++) {
1055
+ if (isEnumerable.call(obj, syms[j])) {
1056
+ xs.push("[" + inspect(syms[j]) + "]: " + inspect(obj[syms[j]], obj));
1057
+ }
1058
+ }
1059
+ }
1060
+ return xs;
1061
+ }
1062
+ return objectInspect;
1063
+ }
1064
+ var sideChannelList;
1065
+ var hasRequiredSideChannelList;
1066
+ function requireSideChannelList() {
1067
+ if (hasRequiredSideChannelList) return sideChannelList;
1068
+ hasRequiredSideChannelList = 1;
1069
+ var inspect = /* @__PURE__ */ requireObjectInspect();
1070
+ var $TypeError = /* @__PURE__ */ requireType();
1071
+ var listGetNode = function(list, key, isDelete) {
1072
+ var prev = list;
1073
+ var curr;
1074
+ for (; (curr = prev.next) != null; prev = curr) {
1075
+ if (curr.key === key) {
1076
+ prev.next = curr.next;
1077
+ if (!isDelete) {
1078
+ curr.next = /** @type {NonNullable<typeof list.next>} */
1079
+ list.next;
1080
+ list.next = curr;
1081
+ }
1082
+ return curr;
1083
+ }
1084
+ }
1085
+ };
1086
+ var listGet = function(objects, key) {
1087
+ if (!objects) {
1088
+ return void 0;
1089
+ }
1090
+ var node = listGetNode(objects, key);
1091
+ return node && node.value;
1092
+ };
1093
+ var listSet = function(objects, key, value) {
1094
+ var node = listGetNode(objects, key);
1095
+ if (node) {
1096
+ node.value = value;
1097
+ } else {
1098
+ objects.next = /** @type {import('./list.d.ts').ListNode<typeof value, typeof key>} */
1099
+ {
1100
+ // eslint-disable-line no-param-reassign, no-extra-parens
1101
+ key,
1102
+ next: objects.next,
1103
+ value
1104
+ };
1105
+ }
1106
+ };
1107
+ var listHas = function(objects, key) {
1108
+ if (!objects) {
1109
+ return false;
1110
+ }
1111
+ return !!listGetNode(objects, key);
1112
+ };
1113
+ var listDelete = function(objects, key) {
1114
+ if (objects) {
1115
+ return listGetNode(objects, key, true);
1116
+ }
1117
+ };
1118
+ sideChannelList = function getSideChannelList() {
1119
+ var $o;
1120
+ var channel = {
1121
+ assert: function(key) {
1122
+ if (!channel.has(key)) {
1123
+ throw new $TypeError("Side channel does not contain " + inspect(key));
1124
+ }
1125
+ },
1126
+ "delete": function(key) {
1127
+ var deletedNode = listDelete($o, key);
1128
+ if (deletedNode && $o && !$o.next) {
1129
+ $o = void 0;
1130
+ }
1131
+ return !!deletedNode;
1132
+ },
1133
+ get: function(key) {
1134
+ return listGet($o, key);
1135
+ },
1136
+ has: function(key) {
1137
+ return listHas($o, key);
1138
+ },
1139
+ set: function(key, value) {
1140
+ if (!$o) {
1141
+ $o = {
1142
+ next: void 0
1143
+ };
1144
+ }
1145
+ listSet(
1146
+ /** @type {NonNullable<typeof $o>} */
1147
+ $o,
1148
+ key,
1149
+ value
1150
+ );
1151
+ }
1152
+ };
1153
+ return channel;
1154
+ };
1155
+ return sideChannelList;
1156
+ }
1157
+ var esObjectAtoms;
1158
+ var hasRequiredEsObjectAtoms;
1159
+ function requireEsObjectAtoms() {
1160
+ if (hasRequiredEsObjectAtoms) return esObjectAtoms;
1161
+ hasRequiredEsObjectAtoms = 1;
1162
+ esObjectAtoms = Object;
1163
+ return esObjectAtoms;
1164
+ }
1165
+ var esErrors;
1166
+ var hasRequiredEsErrors;
1167
+ function requireEsErrors() {
1168
+ if (hasRequiredEsErrors) return esErrors;
1169
+ hasRequiredEsErrors = 1;
1170
+ esErrors = Error;
1171
+ return esErrors;
1172
+ }
1173
+ var _eval;
1174
+ var hasRequired_eval;
1175
+ function require_eval() {
1176
+ if (hasRequired_eval) return _eval;
1177
+ hasRequired_eval = 1;
1178
+ _eval = EvalError;
1179
+ return _eval;
1180
+ }
1181
+ var range;
1182
+ var hasRequiredRange;
1183
+ function requireRange() {
1184
+ if (hasRequiredRange) return range;
1185
+ hasRequiredRange = 1;
1186
+ range = RangeError;
1187
+ return range;
1188
+ }
1189
+ var ref;
1190
+ var hasRequiredRef;
1191
+ function requireRef() {
1192
+ if (hasRequiredRef) return ref;
1193
+ hasRequiredRef = 1;
1194
+ ref = ReferenceError;
1195
+ return ref;
1196
+ }
1197
+ var syntax;
1198
+ var hasRequiredSyntax;
1199
+ function requireSyntax() {
1200
+ if (hasRequiredSyntax) return syntax;
1201
+ hasRequiredSyntax = 1;
1202
+ syntax = SyntaxError;
1203
+ return syntax;
1204
+ }
1205
+ var uri;
1206
+ var hasRequiredUri;
1207
+ function requireUri() {
1208
+ if (hasRequiredUri) return uri;
1209
+ hasRequiredUri = 1;
1210
+ uri = URIError;
1211
+ return uri;
1212
+ }
1213
+ var abs;
1214
+ var hasRequiredAbs;
1215
+ function requireAbs() {
1216
+ if (hasRequiredAbs) return abs;
1217
+ hasRequiredAbs = 1;
1218
+ abs = Math.abs;
1219
+ return abs;
1220
+ }
1221
+ var floor;
1222
+ var hasRequiredFloor;
1223
+ function requireFloor() {
1224
+ if (hasRequiredFloor) return floor;
1225
+ hasRequiredFloor = 1;
1226
+ floor = Math.floor;
1227
+ return floor;
1228
+ }
1229
+ var max;
1230
+ var hasRequiredMax;
1231
+ function requireMax() {
1232
+ if (hasRequiredMax) return max;
1233
+ hasRequiredMax = 1;
1234
+ max = Math.max;
1235
+ return max;
1236
+ }
1237
+ var min;
1238
+ var hasRequiredMin;
1239
+ function requireMin() {
1240
+ if (hasRequiredMin) return min;
1241
+ hasRequiredMin = 1;
1242
+ min = Math.min;
1243
+ return min;
1244
+ }
1245
+ var pow;
1246
+ var hasRequiredPow;
1247
+ function requirePow() {
1248
+ if (hasRequiredPow) return pow;
1249
+ hasRequiredPow = 1;
1250
+ pow = Math.pow;
1251
+ return pow;
1252
+ }
1253
+ var round;
1254
+ var hasRequiredRound;
1255
+ function requireRound() {
1256
+ if (hasRequiredRound) return round;
1257
+ hasRequiredRound = 1;
1258
+ round = Math.round;
1259
+ return round;
1260
+ }
1261
+ var _isNaN;
1262
+ var hasRequired_isNaN;
1263
+ function require_isNaN() {
1264
+ if (hasRequired_isNaN) return _isNaN;
1265
+ hasRequired_isNaN = 1;
1266
+ _isNaN = Number.isNaN || function isNaN2(a) {
1267
+ return a !== a;
1268
+ };
1269
+ return _isNaN;
1270
+ }
1271
+ var sign;
1272
+ var hasRequiredSign;
1273
+ function requireSign() {
1274
+ if (hasRequiredSign) return sign;
1275
+ hasRequiredSign = 1;
1276
+ var $isNaN = /* @__PURE__ */ require_isNaN();
1277
+ sign = function sign2(number) {
1278
+ if ($isNaN(number) || number === 0) {
1279
+ return number;
1280
+ }
1281
+ return number < 0 ? -1 : 1;
1282
+ };
1283
+ return sign;
1284
+ }
1285
+ var gOPD;
1286
+ var hasRequiredGOPD;
1287
+ function requireGOPD() {
1288
+ if (hasRequiredGOPD) return gOPD;
1289
+ hasRequiredGOPD = 1;
1290
+ gOPD = Object.getOwnPropertyDescriptor;
1291
+ return gOPD;
1292
+ }
1293
+ var gopd;
1294
+ var hasRequiredGopd;
1295
+ function requireGopd() {
1296
+ if (hasRequiredGopd) return gopd;
1297
+ hasRequiredGopd = 1;
1298
+ var $gOPD = /* @__PURE__ */ requireGOPD();
1299
+ if ($gOPD) {
1300
+ try {
1301
+ $gOPD([], "length");
1302
+ } catch (e) {
1303
+ $gOPD = null;
1304
+ }
1305
+ }
1306
+ gopd = $gOPD;
1307
+ return gopd;
1308
+ }
1309
+ var esDefineProperty;
1310
+ var hasRequiredEsDefineProperty;
1311
+ function requireEsDefineProperty() {
1312
+ if (hasRequiredEsDefineProperty) return esDefineProperty;
1313
+ hasRequiredEsDefineProperty = 1;
1314
+ var $defineProperty = Object.defineProperty || false;
1315
+ if ($defineProperty) {
1316
+ try {
1317
+ $defineProperty({}, "a", { value: 1 });
1318
+ } catch (e) {
1319
+ $defineProperty = false;
1320
+ }
1321
+ }
1322
+ esDefineProperty = $defineProperty;
1323
+ return esDefineProperty;
1324
+ }
1325
+ var shams;
1326
+ var hasRequiredShams;
1327
+ function requireShams() {
1328
+ if (hasRequiredShams) return shams;
1329
+ hasRequiredShams = 1;
1330
+ shams = function hasSymbols2() {
1331
+ if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
1332
+ return false;
1333
+ }
1334
+ if (typeof Symbol.iterator === "symbol") {
1335
+ return true;
1336
+ }
1337
+ var obj = {};
1338
+ var sym = /* @__PURE__ */ Symbol("test");
1339
+ var symObj = Object(sym);
1340
+ if (typeof sym === "string") {
1341
+ return false;
1342
+ }
1343
+ if (Object.prototype.toString.call(sym) !== "[object Symbol]") {
1344
+ return false;
1345
+ }
1346
+ if (Object.prototype.toString.call(symObj) !== "[object Symbol]") {
1347
+ return false;
1348
+ }
1349
+ var symVal = 42;
1350
+ obj[sym] = symVal;
1351
+ for (var _ in obj) {
1352
+ return false;
1353
+ }
1354
+ if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) {
1355
+ return false;
1356
+ }
1357
+ if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) {
1358
+ return false;
1359
+ }
1360
+ var syms = Object.getOwnPropertySymbols(obj);
1361
+ if (syms.length !== 1 || syms[0] !== sym) {
1362
+ return false;
1363
+ }
1364
+ if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {
1365
+ return false;
1366
+ }
1367
+ if (typeof Object.getOwnPropertyDescriptor === "function") {
1368
+ var descriptor = (
1369
+ /** @type {PropertyDescriptor} */
1370
+ Object.getOwnPropertyDescriptor(obj, sym)
1371
+ );
1372
+ if (descriptor.value !== symVal || descriptor.enumerable !== true) {
1373
+ return false;
1374
+ }
1375
+ }
1376
+ return true;
1377
+ };
1378
+ return shams;
1379
+ }
1380
+ var hasSymbols;
1381
+ var hasRequiredHasSymbols;
1382
+ function requireHasSymbols() {
1383
+ if (hasRequiredHasSymbols) return hasSymbols;
1384
+ hasRequiredHasSymbols = 1;
1385
+ var origSymbol = typeof Symbol !== "undefined" && Symbol;
1386
+ var hasSymbolSham = requireShams();
1387
+ hasSymbols = function hasNativeSymbols() {
1388
+ if (typeof origSymbol !== "function") {
1389
+ return false;
1390
+ }
1391
+ if (typeof Symbol !== "function") {
1392
+ return false;
1393
+ }
1394
+ if (typeof origSymbol("foo") !== "symbol") {
1395
+ return false;
1396
+ }
1397
+ if (typeof /* @__PURE__ */ Symbol("bar") !== "symbol") {
1398
+ return false;
1399
+ }
1400
+ return hasSymbolSham();
1401
+ };
1402
+ return hasSymbols;
1403
+ }
1404
+ var Reflect_getPrototypeOf;
1405
+ var hasRequiredReflect_getPrototypeOf;
1406
+ function requireReflect_getPrototypeOf() {
1407
+ if (hasRequiredReflect_getPrototypeOf) return Reflect_getPrototypeOf;
1408
+ hasRequiredReflect_getPrototypeOf = 1;
1409
+ Reflect_getPrototypeOf = typeof Reflect !== "undefined" && Reflect.getPrototypeOf || null;
1410
+ return Reflect_getPrototypeOf;
1411
+ }
1412
+ var Object_getPrototypeOf;
1413
+ var hasRequiredObject_getPrototypeOf;
1414
+ function requireObject_getPrototypeOf() {
1415
+ if (hasRequiredObject_getPrototypeOf) return Object_getPrototypeOf;
1416
+ hasRequiredObject_getPrototypeOf = 1;
1417
+ var $Object = /* @__PURE__ */ requireEsObjectAtoms();
1418
+ Object_getPrototypeOf = $Object.getPrototypeOf || null;
1419
+ return Object_getPrototypeOf;
1420
+ }
1421
+ var implementation;
1422
+ var hasRequiredImplementation;
1423
+ function requireImplementation() {
1424
+ if (hasRequiredImplementation) return implementation;
1425
+ hasRequiredImplementation = 1;
1426
+ var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
1427
+ var toStr = Object.prototype.toString;
1428
+ var max2 = Math.max;
1429
+ var funcType = "[object Function]";
1430
+ var concatty = function concatty2(a, b) {
1431
+ var arr = [];
1432
+ for (var i = 0; i < a.length; i += 1) {
1433
+ arr[i] = a[i];
1434
+ }
1435
+ for (var j = 0; j < b.length; j += 1) {
1436
+ arr[j + a.length] = b[j];
1437
+ }
1438
+ return arr;
1439
+ };
1440
+ var slicy = function slicy2(arrLike, offset) {
1441
+ var arr = [];
1442
+ for (var i = offset, j = 0; i < arrLike.length; i += 1, j += 1) {
1443
+ arr[j] = arrLike[i];
1444
+ }
1445
+ return arr;
1446
+ };
1447
+ var joiny = function(arr, joiner) {
1448
+ var str = "";
1449
+ for (var i = 0; i < arr.length; i += 1) {
1450
+ str += arr[i];
1451
+ if (i + 1 < arr.length) {
1452
+ str += joiner;
1453
+ }
1454
+ }
1455
+ return str;
1456
+ };
1457
+ implementation = function bind(that) {
1458
+ var target = this;
1459
+ if (typeof target !== "function" || toStr.apply(target) !== funcType) {
1460
+ throw new TypeError(ERROR_MESSAGE + target);
1461
+ }
1462
+ var args = slicy(arguments, 1);
1463
+ var bound;
1464
+ var binder = function() {
1465
+ if (this instanceof bound) {
1466
+ var result = target.apply(
1467
+ this,
1468
+ concatty(args, arguments)
1469
+ );
1470
+ if (Object(result) === result) {
1471
+ return result;
1472
+ }
1473
+ return this;
1474
+ }
1475
+ return target.apply(
1476
+ that,
1477
+ concatty(args, arguments)
1478
+ );
1479
+ };
1480
+ var boundLength = max2(0, target.length - args.length);
1481
+ var boundArgs = [];
1482
+ for (var i = 0; i < boundLength; i++) {
1483
+ boundArgs[i] = "$" + i;
1484
+ }
1485
+ bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
1486
+ if (target.prototype) {
1487
+ var Empty = function Empty2() {
1488
+ };
1489
+ Empty.prototype = target.prototype;
1490
+ bound.prototype = new Empty();
1491
+ Empty.prototype = null;
1492
+ }
1493
+ return bound;
1494
+ };
1495
+ return implementation;
1496
+ }
1497
+ var functionBind;
1498
+ var hasRequiredFunctionBind;
1499
+ function requireFunctionBind() {
1500
+ if (hasRequiredFunctionBind) return functionBind;
1501
+ hasRequiredFunctionBind = 1;
1502
+ var implementation2 = requireImplementation();
1503
+ functionBind = Function.prototype.bind || implementation2;
1504
+ return functionBind;
1505
+ }
1506
+ var functionCall;
1507
+ var hasRequiredFunctionCall;
1508
+ function requireFunctionCall() {
1509
+ if (hasRequiredFunctionCall) return functionCall;
1510
+ hasRequiredFunctionCall = 1;
1511
+ functionCall = Function.prototype.call;
1512
+ return functionCall;
1513
+ }
1514
+ var functionApply;
1515
+ var hasRequiredFunctionApply;
1516
+ function requireFunctionApply() {
1517
+ if (hasRequiredFunctionApply) return functionApply;
1518
+ hasRequiredFunctionApply = 1;
1519
+ functionApply = Function.prototype.apply;
1520
+ return functionApply;
1521
+ }
1522
+ var reflectApply;
1523
+ var hasRequiredReflectApply;
1524
+ function requireReflectApply() {
1525
+ if (hasRequiredReflectApply) return reflectApply;
1526
+ hasRequiredReflectApply = 1;
1527
+ reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
1528
+ return reflectApply;
1529
+ }
1530
+ var actualApply;
1531
+ var hasRequiredActualApply;
1532
+ function requireActualApply() {
1533
+ if (hasRequiredActualApply) return actualApply;
1534
+ hasRequiredActualApply = 1;
1535
+ var bind = requireFunctionBind();
1536
+ var $apply = requireFunctionApply();
1537
+ var $call = requireFunctionCall();
1538
+ var $reflectApply = requireReflectApply();
1539
+ actualApply = $reflectApply || bind.call($call, $apply);
1540
+ return actualApply;
1541
+ }
1542
+ var callBindApplyHelpers;
1543
+ var hasRequiredCallBindApplyHelpers;
1544
+ function requireCallBindApplyHelpers() {
1545
+ if (hasRequiredCallBindApplyHelpers) return callBindApplyHelpers;
1546
+ hasRequiredCallBindApplyHelpers = 1;
1547
+ var bind = requireFunctionBind();
1548
+ var $TypeError = /* @__PURE__ */ requireType();
1549
+ var $call = requireFunctionCall();
1550
+ var $actualApply = requireActualApply();
1551
+ callBindApplyHelpers = function callBindBasic(args) {
1552
+ if (args.length < 1 || typeof args[0] !== "function") {
1553
+ throw new $TypeError("a function is required");
1554
+ }
1555
+ return $actualApply(bind, $call, args);
1556
+ };
1557
+ return callBindApplyHelpers;
1558
+ }
1559
+ var get;
1560
+ var hasRequiredGet;
1561
+ function requireGet() {
1562
+ if (hasRequiredGet) return get;
1563
+ hasRequiredGet = 1;
1564
+ var callBind = requireCallBindApplyHelpers();
1565
+ var gOPD2 = /* @__PURE__ */ requireGopd();
1566
+ var hasProtoAccessor;
1567
+ try {
1568
+ hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */
1569
+ [].__proto__ === Array.prototype;
1570
+ } catch (e) {
1571
+ if (!e || typeof e !== "object" || !("code" in e) || e.code !== "ERR_PROTO_ACCESS") {
1572
+ throw e;
1573
+ }
1574
+ }
1575
+ var desc = !!hasProtoAccessor && gOPD2 && gOPD2(
1576
+ Object.prototype,
1577
+ /** @type {keyof typeof Object.prototype} */
1578
+ "__proto__"
1579
+ );
1580
+ var $Object = Object;
1581
+ var $getPrototypeOf = $Object.getPrototypeOf;
1582
+ get = desc && typeof desc.get === "function" ? callBind([desc.get]) : typeof $getPrototypeOf === "function" ? (
1583
+ /** @type {import('./get')} */
1584
+ function getDunder(value) {
1585
+ return $getPrototypeOf(value == null ? value : $Object(value));
1586
+ }
1587
+ ) : false;
1588
+ return get;
1589
+ }
1590
+ var getProto;
1591
+ var hasRequiredGetProto;
1592
+ function requireGetProto() {
1593
+ if (hasRequiredGetProto) return getProto;
1594
+ hasRequiredGetProto = 1;
1595
+ var reflectGetProto = requireReflect_getPrototypeOf();
1596
+ var originalGetProto = requireObject_getPrototypeOf();
1597
+ var getDunderProto = /* @__PURE__ */ requireGet();
1598
+ getProto = reflectGetProto ? function getProto2(O) {
1599
+ return reflectGetProto(O);
1600
+ } : originalGetProto ? function getProto2(O) {
1601
+ if (!O || typeof O !== "object" && typeof O !== "function") {
1602
+ throw new TypeError("getProto: not an object");
1603
+ }
1604
+ return originalGetProto(O);
1605
+ } : getDunderProto ? function getProto2(O) {
1606
+ return getDunderProto(O);
1607
+ } : null;
1608
+ return getProto;
1609
+ }
1610
+ var hasown;
1611
+ var hasRequiredHasown;
1612
+ function requireHasown() {
1613
+ if (hasRequiredHasown) return hasown;
1614
+ hasRequiredHasown = 1;
1615
+ var call = Function.prototype.call;
1616
+ var $hasOwn = Object.prototype.hasOwnProperty;
1617
+ var bind = requireFunctionBind();
1618
+ hasown = bind.call(call, $hasOwn);
1619
+ return hasown;
1620
+ }
1621
+ var getIntrinsic;
1622
+ var hasRequiredGetIntrinsic;
1623
+ function requireGetIntrinsic() {
1624
+ if (hasRequiredGetIntrinsic) return getIntrinsic;
1625
+ hasRequiredGetIntrinsic = 1;
1626
+ var undefined$1;
1627
+ var $Object = /* @__PURE__ */ requireEsObjectAtoms();
1628
+ var $Error = /* @__PURE__ */ requireEsErrors();
1629
+ var $EvalError = /* @__PURE__ */ require_eval();
1630
+ var $RangeError = /* @__PURE__ */ requireRange();
1631
+ var $ReferenceError = /* @__PURE__ */ requireRef();
1632
+ var $SyntaxError = /* @__PURE__ */ requireSyntax();
1633
+ var $TypeError = /* @__PURE__ */ requireType();
1634
+ var $URIError = /* @__PURE__ */ requireUri();
1635
+ var abs2 = /* @__PURE__ */ requireAbs();
1636
+ var floor2 = /* @__PURE__ */ requireFloor();
1637
+ var max2 = /* @__PURE__ */ requireMax();
1638
+ var min2 = /* @__PURE__ */ requireMin();
1639
+ var pow2 = /* @__PURE__ */ requirePow();
1640
+ var round2 = /* @__PURE__ */ requireRound();
1641
+ var sign2 = /* @__PURE__ */ requireSign();
1642
+ var $Function = Function;
1643
+ var getEvalledConstructor = function(expressionSyntax) {
1644
+ try {
1645
+ return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
1646
+ } catch (e) {
1647
+ }
1648
+ };
1649
+ var $gOPD = /* @__PURE__ */ requireGopd();
1650
+ var $defineProperty = /* @__PURE__ */ requireEsDefineProperty();
1651
+ var throwTypeError = function() {
1652
+ throw new $TypeError();
1653
+ };
1654
+ var ThrowTypeError = $gOPD ? (function() {
1655
+ try {
1656
+ arguments.callee;
1657
+ return throwTypeError;
1658
+ } catch (calleeThrows) {
1659
+ try {
1660
+ return $gOPD(arguments, "callee").get;
1661
+ } catch (gOPDthrows) {
1662
+ return throwTypeError;
1663
+ }
1664
+ }
1665
+ })() : throwTypeError;
1666
+ var hasSymbols2 = requireHasSymbols()();
1667
+ var getProto2 = requireGetProto();
1668
+ var $ObjectGPO = requireObject_getPrototypeOf();
1669
+ var $ReflectGPO = requireReflect_getPrototypeOf();
1670
+ var $apply = requireFunctionApply();
1671
+ var $call = requireFunctionCall();
1672
+ var needsEval = {};
1673
+ var TypedArray = typeof Uint8Array === "undefined" || !getProto2 ? undefined$1 : getProto2(Uint8Array);
1674
+ var INTRINSICS = {
1675
+ __proto__: null,
1676
+ "%AggregateError%": typeof AggregateError === "undefined" ? undefined$1 : AggregateError,
1677
+ "%Array%": Array,
1678
+ "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined$1 : ArrayBuffer,
1679
+ "%ArrayIteratorPrototype%": hasSymbols2 && getProto2 ? getProto2([][Symbol.iterator]()) : undefined$1,
1680
+ "%AsyncFromSyncIteratorPrototype%": undefined$1,
1681
+ "%AsyncFunction%": needsEval,
1682
+ "%AsyncGenerator%": needsEval,
1683
+ "%AsyncGeneratorFunction%": needsEval,
1684
+ "%AsyncIteratorPrototype%": needsEval,
1685
+ "%Atomics%": typeof Atomics === "undefined" ? undefined$1 : Atomics,
1686
+ "%BigInt%": typeof BigInt === "undefined" ? undefined$1 : BigInt,
1687
+ "%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined$1 : BigInt64Array,
1688
+ "%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined$1 : BigUint64Array,
1689
+ "%Boolean%": Boolean,
1690
+ "%DataView%": typeof DataView === "undefined" ? undefined$1 : DataView,
1691
+ "%Date%": Date,
1692
+ "%decodeURI%": decodeURI,
1693
+ "%decodeURIComponent%": decodeURIComponent,
1694
+ "%encodeURI%": encodeURI,
1695
+ "%encodeURIComponent%": encodeURIComponent,
1696
+ "%Error%": $Error,
1697
+ "%eval%": eval,
1698
+ // eslint-disable-line no-eval
1699
+ "%EvalError%": $EvalError,
1700
+ "%Float16Array%": typeof Float16Array === "undefined" ? undefined$1 : Float16Array,
1701
+ "%Float32Array%": typeof Float32Array === "undefined" ? undefined$1 : Float32Array,
1702
+ "%Float64Array%": typeof Float64Array === "undefined" ? undefined$1 : Float64Array,
1703
+ "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined$1 : FinalizationRegistry,
1704
+ "%Function%": $Function,
1705
+ "%GeneratorFunction%": needsEval,
1706
+ "%Int8Array%": typeof Int8Array === "undefined" ? undefined$1 : Int8Array,
1707
+ "%Int16Array%": typeof Int16Array === "undefined" ? undefined$1 : Int16Array,
1708
+ "%Int32Array%": typeof Int32Array === "undefined" ? undefined$1 : Int32Array,
1709
+ "%isFinite%": isFinite,
1710
+ "%isNaN%": isNaN,
1711
+ "%IteratorPrototype%": hasSymbols2 && getProto2 ? getProto2(getProto2([][Symbol.iterator]())) : undefined$1,
1712
+ "%JSON%": typeof JSON === "object" ? JSON : undefined$1,
1713
+ "%Map%": typeof Map === "undefined" ? undefined$1 : Map,
1714
+ "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols2 || !getProto2 ? undefined$1 : getProto2((/* @__PURE__ */ new Map())[Symbol.iterator]()),
1715
+ "%Math%": Math,
1716
+ "%Number%": Number,
1717
+ "%Object%": $Object,
1718
+ "%Object.getOwnPropertyDescriptor%": $gOPD,
1719
+ "%parseFloat%": parseFloat,
1720
+ "%parseInt%": parseInt,
1721
+ "%Promise%": typeof Promise === "undefined" ? undefined$1 : Promise,
1722
+ "%Proxy%": typeof Proxy === "undefined" ? undefined$1 : Proxy,
1723
+ "%RangeError%": $RangeError,
1724
+ "%ReferenceError%": $ReferenceError,
1725
+ "%Reflect%": typeof Reflect === "undefined" ? undefined$1 : Reflect,
1726
+ "%RegExp%": RegExp,
1727
+ "%Set%": typeof Set === "undefined" ? undefined$1 : Set,
1728
+ "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols2 || !getProto2 ? undefined$1 : getProto2((/* @__PURE__ */ new Set())[Symbol.iterator]()),
1729
+ "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined$1 : SharedArrayBuffer,
1730
+ "%String%": String,
1731
+ "%StringIteratorPrototype%": hasSymbols2 && getProto2 ? getProto2(""[Symbol.iterator]()) : undefined$1,
1732
+ "%Symbol%": hasSymbols2 ? Symbol : undefined$1,
1733
+ "%SyntaxError%": $SyntaxError,
1734
+ "%ThrowTypeError%": ThrowTypeError,
1735
+ "%TypedArray%": TypedArray,
1736
+ "%TypeError%": $TypeError,
1737
+ "%Uint8Array%": typeof Uint8Array === "undefined" ? undefined$1 : Uint8Array,
1738
+ "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined$1 : Uint8ClampedArray,
1739
+ "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined$1 : Uint16Array,
1740
+ "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined$1 : Uint32Array,
1741
+ "%URIError%": $URIError,
1742
+ "%WeakMap%": typeof WeakMap === "undefined" ? undefined$1 : WeakMap,
1743
+ "%WeakRef%": typeof WeakRef === "undefined" ? undefined$1 : WeakRef,
1744
+ "%WeakSet%": typeof WeakSet === "undefined" ? undefined$1 : WeakSet,
1745
+ "%Function.prototype.call%": $call,
1746
+ "%Function.prototype.apply%": $apply,
1747
+ "%Object.defineProperty%": $defineProperty,
1748
+ "%Object.getPrototypeOf%": $ObjectGPO,
1749
+ "%Math.abs%": abs2,
1750
+ "%Math.floor%": floor2,
1751
+ "%Math.max%": max2,
1752
+ "%Math.min%": min2,
1753
+ "%Math.pow%": pow2,
1754
+ "%Math.round%": round2,
1755
+ "%Math.sign%": sign2,
1756
+ "%Reflect.getPrototypeOf%": $ReflectGPO
1757
+ };
1758
+ if (getProto2) {
1759
+ try {
1760
+ null.error;
1761
+ } catch (e) {
1762
+ var errorProto = getProto2(getProto2(e));
1763
+ INTRINSICS["%Error.prototype%"] = errorProto;
1764
+ }
1765
+ }
1766
+ var doEval = function doEval2(name) {
1767
+ var value;
1768
+ if (name === "%AsyncFunction%") {
1769
+ value = getEvalledConstructor("async function () {}");
1770
+ } else if (name === "%GeneratorFunction%") {
1771
+ value = getEvalledConstructor("function* () {}");
1772
+ } else if (name === "%AsyncGeneratorFunction%") {
1773
+ value = getEvalledConstructor("async function* () {}");
1774
+ } else if (name === "%AsyncGenerator%") {
1775
+ var fn = doEval2("%AsyncGeneratorFunction%");
1776
+ if (fn) {
1777
+ value = fn.prototype;
1778
+ }
1779
+ } else if (name === "%AsyncIteratorPrototype%") {
1780
+ var gen = doEval2("%AsyncGenerator%");
1781
+ if (gen && getProto2) {
1782
+ value = getProto2(gen.prototype);
1783
+ }
1784
+ }
1785
+ INTRINSICS[name] = value;
1786
+ return value;
1787
+ };
1788
+ var LEGACY_ALIASES = {
1789
+ __proto__: null,
1790
+ "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
1791
+ "%ArrayPrototype%": ["Array", "prototype"],
1792
+ "%ArrayProto_entries%": ["Array", "prototype", "entries"],
1793
+ "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
1794
+ "%ArrayProto_keys%": ["Array", "prototype", "keys"],
1795
+ "%ArrayProto_values%": ["Array", "prototype", "values"],
1796
+ "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
1797
+ "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
1798
+ "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
1799
+ "%BooleanPrototype%": ["Boolean", "prototype"],
1800
+ "%DataViewPrototype%": ["DataView", "prototype"],
1801
+ "%DatePrototype%": ["Date", "prototype"],
1802
+ "%ErrorPrototype%": ["Error", "prototype"],
1803
+ "%EvalErrorPrototype%": ["EvalError", "prototype"],
1804
+ "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
1805
+ "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
1806
+ "%FunctionPrototype%": ["Function", "prototype"],
1807
+ "%Generator%": ["GeneratorFunction", "prototype"],
1808
+ "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
1809
+ "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
1810
+ "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
1811
+ "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
1812
+ "%JSONParse%": ["JSON", "parse"],
1813
+ "%JSONStringify%": ["JSON", "stringify"],
1814
+ "%MapPrototype%": ["Map", "prototype"],
1815
+ "%NumberPrototype%": ["Number", "prototype"],
1816
+ "%ObjectPrototype%": ["Object", "prototype"],
1817
+ "%ObjProto_toString%": ["Object", "prototype", "toString"],
1818
+ "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
1819
+ "%PromisePrototype%": ["Promise", "prototype"],
1820
+ "%PromiseProto_then%": ["Promise", "prototype", "then"],
1821
+ "%Promise_all%": ["Promise", "all"],
1822
+ "%Promise_reject%": ["Promise", "reject"],
1823
+ "%Promise_resolve%": ["Promise", "resolve"],
1824
+ "%RangeErrorPrototype%": ["RangeError", "prototype"],
1825
+ "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
1826
+ "%RegExpPrototype%": ["RegExp", "prototype"],
1827
+ "%SetPrototype%": ["Set", "prototype"],
1828
+ "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
1829
+ "%StringPrototype%": ["String", "prototype"],
1830
+ "%SymbolPrototype%": ["Symbol", "prototype"],
1831
+ "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
1832
+ "%TypedArrayPrototype%": ["TypedArray", "prototype"],
1833
+ "%TypeErrorPrototype%": ["TypeError", "prototype"],
1834
+ "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
1835
+ "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
1836
+ "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
1837
+ "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
1838
+ "%URIErrorPrototype%": ["URIError", "prototype"],
1839
+ "%WeakMapPrototype%": ["WeakMap", "prototype"],
1840
+ "%WeakSetPrototype%": ["WeakSet", "prototype"]
1841
+ };
1842
+ var bind = requireFunctionBind();
1843
+ var hasOwn = /* @__PURE__ */ requireHasown();
1844
+ var $concat = bind.call($call, Array.prototype.concat);
1845
+ var $spliceApply = bind.call($apply, Array.prototype.splice);
1846
+ var $replace = bind.call($call, String.prototype.replace);
1847
+ var $strSlice = bind.call($call, String.prototype.slice);
1848
+ var $exec = bind.call($call, RegExp.prototype.exec);
1849
+ var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
1850
+ var reEscapeChar = /\\(\\)?/g;
1851
+ var stringToPath = function stringToPath2(string) {
1852
+ var first = $strSlice(string, 0, 1);
1853
+ var last = $strSlice(string, -1);
1854
+ if (first === "%" && last !== "%") {
1855
+ throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
1856
+ } else if (last === "%" && first !== "%") {
1857
+ throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
1858
+ }
1859
+ var result = [];
1860
+ $replace(string, rePropName, function(match, number, quote, subString) {
1861
+ result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match;
1862
+ });
1863
+ return result;
1864
+ };
1865
+ var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
1866
+ var intrinsicName = name;
1867
+ var alias;
1868
+ if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
1869
+ alias = LEGACY_ALIASES[intrinsicName];
1870
+ intrinsicName = "%" + alias[0] + "%";
1871
+ }
1872
+ if (hasOwn(INTRINSICS, intrinsicName)) {
1873
+ var value = INTRINSICS[intrinsicName];
1874
+ if (value === needsEval) {
1875
+ value = doEval(intrinsicName);
1876
+ }
1877
+ if (typeof value === "undefined" && !allowMissing) {
1878
+ throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!");
1879
+ }
1880
+ return {
1881
+ alias,
1882
+ name: intrinsicName,
1883
+ value
1884
+ };
1885
+ }
1886
+ throw new $SyntaxError("intrinsic " + name + " does not exist!");
1887
+ };
1888
+ getIntrinsic = function GetIntrinsic(name, allowMissing) {
1889
+ if (typeof name !== "string" || name.length === 0) {
1890
+ throw new $TypeError("intrinsic name must be a non-empty string");
1891
+ }
1892
+ if (arguments.length > 1 && typeof allowMissing !== "boolean") {
1893
+ throw new $TypeError('"allowMissing" argument must be a boolean');
1894
+ }
1895
+ if ($exec(/^%?[^%]*%?$/, name) === null) {
1896
+ throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
1897
+ }
1898
+ var parts = stringToPath(name);
1899
+ var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
1900
+ var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
1901
+ var intrinsicRealName = intrinsic.name;
1902
+ var value = intrinsic.value;
1903
+ var skipFurtherCaching = false;
1904
+ var alias = intrinsic.alias;
1905
+ if (alias) {
1906
+ intrinsicBaseName = alias[0];
1907
+ $spliceApply(parts, $concat([0, 1], alias));
1908
+ }
1909
+ for (var i = 1, isOwn = true; i < parts.length; i += 1) {
1910
+ var part = parts[i];
1911
+ var first = $strSlice(part, 0, 1);
1912
+ var last = $strSlice(part, -1);
1913
+ if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) {
1914
+ throw new $SyntaxError("property names with quotes must have matching quotes");
1915
+ }
1916
+ if (part === "constructor" || !isOwn) {
1917
+ skipFurtherCaching = true;
1918
+ }
1919
+ intrinsicBaseName += "." + part;
1920
+ intrinsicRealName = "%" + intrinsicBaseName + "%";
1921
+ if (hasOwn(INTRINSICS, intrinsicRealName)) {
1922
+ value = INTRINSICS[intrinsicRealName];
1923
+ } else if (value != null) {
1924
+ if (!(part in value)) {
1925
+ if (!allowMissing) {
1926
+ throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available.");
1927
+ }
1928
+ return void undefined$1;
1929
+ }
1930
+ if ($gOPD && i + 1 >= parts.length) {
1931
+ var desc = $gOPD(value, part);
1932
+ isOwn = !!desc;
1933
+ if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
1934
+ value = desc.get;
1935
+ } else {
1936
+ value = value[part];
1937
+ }
1938
+ } else {
1939
+ isOwn = hasOwn(value, part);
1940
+ value = value[part];
1941
+ }
1942
+ if (isOwn && !skipFurtherCaching) {
1943
+ INTRINSICS[intrinsicRealName] = value;
1944
+ }
1945
+ }
1946
+ }
1947
+ return value;
1948
+ };
1949
+ return getIntrinsic;
1950
+ }
1951
+ var callBound;
1952
+ var hasRequiredCallBound;
1953
+ function requireCallBound() {
1954
+ if (hasRequiredCallBound) return callBound;
1955
+ hasRequiredCallBound = 1;
1956
+ var GetIntrinsic = /* @__PURE__ */ requireGetIntrinsic();
1957
+ var callBindBasic = requireCallBindApplyHelpers();
1958
+ var $indexOf = callBindBasic([GetIntrinsic("%String.prototype.indexOf%")]);
1959
+ callBound = function callBoundIntrinsic(name, allowMissing) {
1960
+ var intrinsic = (
1961
+ /** @type {(this: unknown, ...args: unknown[]) => unknown} */
1962
+ GetIntrinsic(name, !!allowMissing)
1963
+ );
1964
+ if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) {
1965
+ return callBindBasic(
1966
+ /** @type {const} */
1967
+ [intrinsic]
1968
+ );
1969
+ }
1970
+ return intrinsic;
1971
+ };
1972
+ return callBound;
1973
+ }
1974
+ var sideChannelMap;
1975
+ var hasRequiredSideChannelMap;
1976
+ function requireSideChannelMap() {
1977
+ if (hasRequiredSideChannelMap) return sideChannelMap;
1978
+ hasRequiredSideChannelMap = 1;
1979
+ var GetIntrinsic = /* @__PURE__ */ requireGetIntrinsic();
1980
+ var callBound2 = /* @__PURE__ */ requireCallBound();
1981
+ var inspect = /* @__PURE__ */ requireObjectInspect();
1982
+ var $TypeError = /* @__PURE__ */ requireType();
1983
+ var $Map = GetIntrinsic("%Map%", true);
1984
+ var $mapGet = callBound2("Map.prototype.get", true);
1985
+ var $mapSet = callBound2("Map.prototype.set", true);
1986
+ var $mapHas = callBound2("Map.prototype.has", true);
1987
+ var $mapDelete = callBound2("Map.prototype.delete", true);
1988
+ var $mapSize = callBound2("Map.prototype.size", true);
1989
+ sideChannelMap = !!$Map && /** @type {Exclude<import('.'), false>} */
1990
+ function getSideChannelMap() {
1991
+ var $m;
1992
+ var channel = {
1993
+ assert: function(key) {
1994
+ if (!channel.has(key)) {
1995
+ throw new $TypeError("Side channel does not contain " + inspect(key));
1996
+ }
1997
+ },
1998
+ "delete": function(key) {
1999
+ if ($m) {
2000
+ var result = $mapDelete($m, key);
2001
+ if ($mapSize($m) === 0) {
2002
+ $m = void 0;
2003
+ }
2004
+ return result;
2005
+ }
2006
+ return false;
2007
+ },
2008
+ get: function(key) {
2009
+ if ($m) {
2010
+ return $mapGet($m, key);
2011
+ }
2012
+ },
2013
+ has: function(key) {
2014
+ if ($m) {
2015
+ return $mapHas($m, key);
2016
+ }
2017
+ return false;
2018
+ },
2019
+ set: function(key, value) {
2020
+ if (!$m) {
2021
+ $m = new $Map();
2022
+ }
2023
+ $mapSet($m, key, value);
2024
+ }
2025
+ };
2026
+ return channel;
2027
+ };
2028
+ return sideChannelMap;
2029
+ }
2030
+ var sideChannelWeakmap;
2031
+ var hasRequiredSideChannelWeakmap;
2032
+ function requireSideChannelWeakmap() {
2033
+ if (hasRequiredSideChannelWeakmap) return sideChannelWeakmap;
2034
+ hasRequiredSideChannelWeakmap = 1;
2035
+ var GetIntrinsic = /* @__PURE__ */ requireGetIntrinsic();
2036
+ var callBound2 = /* @__PURE__ */ requireCallBound();
2037
+ var inspect = /* @__PURE__ */ requireObjectInspect();
2038
+ var getSideChannelMap = requireSideChannelMap();
2039
+ var $TypeError = /* @__PURE__ */ requireType();
2040
+ var $WeakMap = GetIntrinsic("%WeakMap%", true);
2041
+ var $weakMapGet = callBound2("WeakMap.prototype.get", true);
2042
+ var $weakMapSet = callBound2("WeakMap.prototype.set", true);
2043
+ var $weakMapHas = callBound2("WeakMap.prototype.has", true);
2044
+ var $weakMapDelete = callBound2("WeakMap.prototype.delete", true);
2045
+ sideChannelWeakmap = $WeakMap ? (
2046
+ /** @type {Exclude<import('.'), false>} */
2047
+ function getSideChannelWeakMap() {
2048
+ var $wm;
2049
+ var $m;
2050
+ var channel = {
2051
+ assert: function(key) {
2052
+ if (!channel.has(key)) {
2053
+ throw new $TypeError("Side channel does not contain " + inspect(key));
2054
+ }
2055
+ },
2056
+ "delete": function(key) {
2057
+ if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
2058
+ if ($wm) {
2059
+ return $weakMapDelete($wm, key);
2060
+ }
2061
+ } else if (getSideChannelMap) {
2062
+ if ($m) {
2063
+ return $m["delete"](key);
2064
+ }
2065
+ }
2066
+ return false;
2067
+ },
2068
+ get: function(key) {
2069
+ if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
2070
+ if ($wm) {
2071
+ return $weakMapGet($wm, key);
2072
+ }
2073
+ }
2074
+ return $m && $m.get(key);
2075
+ },
2076
+ has: function(key) {
2077
+ if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
2078
+ if ($wm) {
2079
+ return $weakMapHas($wm, key);
2080
+ }
2081
+ }
2082
+ return !!$m && $m.has(key);
2083
+ },
2084
+ set: function(key, value) {
2085
+ if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
2086
+ if (!$wm) {
2087
+ $wm = new $WeakMap();
2088
+ }
2089
+ $weakMapSet($wm, key, value);
2090
+ } else if (getSideChannelMap) {
2091
+ if (!$m) {
2092
+ $m = getSideChannelMap();
2093
+ }
2094
+ $m.set(key, value);
2095
+ }
2096
+ }
2097
+ };
2098
+ return channel;
2099
+ }
2100
+ ) : getSideChannelMap;
2101
+ return sideChannelWeakmap;
2102
+ }
2103
+ var sideChannel;
2104
+ var hasRequiredSideChannel;
2105
+ function requireSideChannel() {
2106
+ if (hasRequiredSideChannel) return sideChannel;
2107
+ hasRequiredSideChannel = 1;
2108
+ var $TypeError = /* @__PURE__ */ requireType();
2109
+ var inspect = /* @__PURE__ */ requireObjectInspect();
2110
+ var getSideChannelList = requireSideChannelList();
2111
+ var getSideChannelMap = requireSideChannelMap();
2112
+ var getSideChannelWeakMap = requireSideChannelWeakmap();
2113
+ var makeChannel = getSideChannelWeakMap || getSideChannelMap || getSideChannelList;
2114
+ sideChannel = function getSideChannel() {
2115
+ var $channelData;
2116
+ var channel = {
2117
+ assert: function(key) {
2118
+ if (!channel.has(key)) {
2119
+ var keyDesc = key && Object(key) === key ? "the given object key" : inspect(key);
2120
+ throw new $TypeError("Side channel does not contain " + keyDesc);
2121
+ }
2122
+ },
2123
+ "delete": function(key) {
2124
+ return !!$channelData && $channelData["delete"](key);
2125
+ },
2126
+ get: function(key) {
2127
+ return $channelData && $channelData.get(key);
2128
+ },
2129
+ has: function(key) {
2130
+ return !!$channelData && $channelData.has(key);
2131
+ },
2132
+ set: function(key, value) {
2133
+ if (!$channelData) {
2134
+ $channelData = makeChannel();
2135
+ }
2136
+ $channelData.set(key, value);
2137
+ }
2138
+ };
2139
+ return channel;
2140
+ };
2141
+ return sideChannel;
2142
+ }
2143
+ var formats;
2144
+ var hasRequiredFormats;
2145
+ function requireFormats() {
2146
+ if (hasRequiredFormats) return formats;
2147
+ hasRequiredFormats = 1;
2148
+ var replace = String.prototype.replace;
2149
+ var percentTwenties = /%20/g;
2150
+ var Format = {
2151
+ RFC1738: "RFC1738",
2152
+ RFC3986: "RFC3986"
2153
+ };
2154
+ formats = {
2155
+ "default": Format.RFC3986,
2156
+ formatters: {
2157
+ RFC1738: function(value) {
2158
+ return replace.call(value, percentTwenties, "+");
2159
+ },
2160
+ RFC3986: function(value) {
2161
+ return String(value);
2162
+ }
2163
+ },
2164
+ RFC1738: Format.RFC1738,
2165
+ RFC3986: Format.RFC3986
2166
+ };
2167
+ return formats;
2168
+ }
2169
+ var utils;
2170
+ var hasRequiredUtils;
2171
+ function requireUtils() {
2172
+ if (hasRequiredUtils) return utils;
2173
+ hasRequiredUtils = 1;
2174
+ var formats2 = /* @__PURE__ */ requireFormats();
2175
+ var getSideChannel = requireSideChannel();
2176
+ var defineProperty = /* @__PURE__ */ requireEsDefineProperty();
2177
+ var has = Object.prototype.hasOwnProperty;
2178
+ var isArray = Array.isArray;
2179
+ var overflowChannel = getSideChannel();
2180
+ var markOverflow = function markOverflow2(obj, maxIndex) {
2181
+ overflowChannel.set(obj, maxIndex);
2182
+ return obj;
2183
+ };
2184
+ var isOverflow = function isOverflow2(obj) {
2185
+ return overflowChannel.has(obj);
2186
+ };
2187
+ var getMaxIndex = function getMaxIndex2(obj) {
2188
+ return overflowChannel.get(obj);
2189
+ };
2190
+ var setMaxIndex = function setMaxIndex2(obj, maxIndex) {
2191
+ overflowChannel.set(obj, maxIndex);
2192
+ };
2193
+ var hexTable = (function() {
2194
+ var array = [];
2195
+ for (var i = 0; i < 256; ++i) {
2196
+ array[array.length] = "%" + ((i < 16 ? "0" : "") + i.toString(16)).toUpperCase();
2197
+ }
2198
+ return array;
2199
+ })();
2200
+ var compactQueue = function compactQueue2(queue) {
2201
+ while (queue.length > 1) {
2202
+ var item = queue.pop();
2203
+ var obj = item.obj[item.prop];
2204
+ if (isArray(obj)) {
2205
+ var compacted = [];
2206
+ for (var j = 0; j < obj.length; ++j) {
2207
+ if (typeof obj[j] !== "undefined") {
2208
+ compacted[compacted.length] = obj[j];
2209
+ }
2210
+ }
2211
+ item.obj[item.prop] = compacted;
2212
+ }
2213
+ }
2214
+ };
2215
+ var arrayToObject = function arrayToObject2(source, options) {
2216
+ var obj = options && options.plainObjects ? { __proto__: null } : {};
2217
+ for (var i = 0; i < source.length; ++i) {
2218
+ if (typeof source[i] !== "undefined") {
2219
+ obj[i] = source[i];
2220
+ }
2221
+ }
2222
+ return obj;
2223
+ };
2224
+ var setProperty = function setProperty2(obj, key, value) {
2225
+ if (key === "__proto__" && defineProperty) {
2226
+ defineProperty(obj, key, {
2227
+ configurable: true,
2228
+ enumerable: true,
2229
+ value,
2230
+ writable: true
2231
+ });
2232
+ } else {
2233
+ obj[key] = value;
2234
+ }
2235
+ };
2236
+ var merge = function merge2(target, source, options) {
2237
+ if (!source) {
2238
+ return target;
2239
+ }
2240
+ if (typeof source !== "object" && typeof source !== "function") {
2241
+ if (isArray(target)) {
2242
+ var nextIndex = target.length;
2243
+ if (options && typeof options.arrayLimit === "number" && nextIndex >= options.arrayLimit) {
2244
+ if (options.throwOnLimitExceeded) {
2245
+ throw new RangeError("Array limit exceeded. Only " + options.arrayLimit + " element" + (options.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
2246
+ }
2247
+ return markOverflow(arrayToObject(target.concat(source), options), nextIndex);
2248
+ }
2249
+ target[nextIndex] = source;
2250
+ } else if (target && typeof target === "object") {
2251
+ if (isOverflow(target)) {
2252
+ var newIndex = getMaxIndex(target) + 1;
2253
+ target[newIndex] = source;
2254
+ setMaxIndex(target, newIndex);
2255
+ } else if (options && options.strictMerge) {
2256
+ return [target, source];
2257
+ } else if (options && (options.plainObjects || options.allowPrototypes) || !has.call(Object.prototype, source)) {
2258
+ target[source] = true;
2259
+ }
2260
+ } else {
2261
+ return [target, source];
2262
+ }
2263
+ return target;
2264
+ }
2265
+ if (!target || typeof target !== "object") {
2266
+ if (isOverflow(source)) {
2267
+ var sourceKeys = Object.keys(source);
2268
+ var result = options && options.plainObjects ? { __proto__: null, 0: target } : { 0: target };
2269
+ for (var m = 0; m < sourceKeys.length; m++) {
2270
+ var oldKey = parseInt(sourceKeys[m], 10);
2271
+ result[oldKey + 1] = source[sourceKeys[m]];
2272
+ }
2273
+ return markOverflow(result, getMaxIndex(source) + 1);
2274
+ }
2275
+ var combined = [target].concat(source);
2276
+ if (options && typeof options.arrayLimit === "number" && combined.length > options.arrayLimit) {
2277
+ if (options.throwOnLimitExceeded) {
2278
+ throw new RangeError("Array limit exceeded. Only " + options.arrayLimit + " element" + (options.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
2279
+ }
2280
+ return markOverflow(arrayToObject(combined, options), combined.length - 1);
2281
+ }
2282
+ return combined;
2283
+ }
2284
+ var mergeTarget = target;
2285
+ if (isArray(target) && !isArray(source)) {
2286
+ mergeTarget = arrayToObject(target, options);
2287
+ }
2288
+ if (isArray(target) && isArray(source)) {
2289
+ source.forEach(function(item, i) {
2290
+ if (has.call(target, i)) {
2291
+ var targetItem = target[i];
2292
+ if (targetItem && typeof targetItem === "object" && item && typeof item === "object") {
2293
+ target[i] = merge2(targetItem, item, options);
2294
+ } else {
2295
+ target[target.length] = item;
2296
+ }
2297
+ } else {
2298
+ target[i] = item;
2299
+ }
2300
+ });
2301
+ if (options && typeof options.arrayLimit === "number" && target.length > options.arrayLimit) {
2302
+ if (options.throwOnLimitExceeded) {
2303
+ throw new RangeError("Array limit exceeded. Only " + options.arrayLimit + " element" + (options.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
2304
+ }
2305
+ return markOverflow(arrayToObject(target, options), target.length - 1);
2306
+ }
2307
+ return target;
2308
+ }
2309
+ return Object.keys(source).reduce(function(acc, key) {
2310
+ var value = source[key];
2311
+ if (has.call(acc, key)) {
2312
+ setProperty(acc, key, merge2(acc[key], value, options));
2313
+ } else {
2314
+ setProperty(acc, key, value);
2315
+ }
2316
+ if (isOverflow(source) && !isOverflow(acc)) {
2317
+ markOverflow(acc, getMaxIndex(source));
2318
+ }
2319
+ if (isOverflow(acc)) {
2320
+ var keyNum = parseInt(key, 10);
2321
+ if (String(keyNum) === key && keyNum >= 0 && keyNum > getMaxIndex(acc)) {
2322
+ setMaxIndex(acc, keyNum);
2323
+ }
2324
+ }
2325
+ return acc;
2326
+ }, mergeTarget);
2327
+ };
2328
+ var assign = function assignSingleSource(target, source) {
2329
+ return Object.keys(source).reduce(function(acc, key) {
2330
+ setProperty(acc, key, source[key]);
2331
+ return acc;
2332
+ }, target);
2333
+ };
2334
+ var decode = function(str, defaultDecoder, charset) {
2335
+ var strWithoutPlus = str.replace(/\+/g, " ");
2336
+ if (charset === "iso-8859-1") {
2337
+ return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
2338
+ }
2339
+ try {
2340
+ return decodeURIComponent(strWithoutPlus);
2341
+ } catch (e) {
2342
+ return strWithoutPlus;
2343
+ }
2344
+ };
2345
+ var limit = 1024;
2346
+ var encode = function encode2(str, defaultEncoder, charset, kind, format) {
2347
+ if (str.length === 0) {
2348
+ return str;
2349
+ }
2350
+ var string = str;
2351
+ if (typeof str === "symbol") {
2352
+ string = Symbol.prototype.toString.call(str);
2353
+ } else if (typeof str !== "string") {
2354
+ string = String(str);
2355
+ }
2356
+ if (charset === "iso-8859-1") {
2357
+ return escape(string).replace(/%u[0-9a-f]{4}/gi, function($0) {
2358
+ return "%26%23" + parseInt($0.slice(2), 16) + "%3B";
2359
+ });
2360
+ }
2361
+ var out = "";
2362
+ for (var j = 0; j < string.length; j += limit) {
2363
+ var segment = string.length >= limit ? string.slice(j, j + limit) : string;
2364
+ if (j + limit < string.length) {
2365
+ var last = segment.charCodeAt(segment.length - 1);
2366
+ if (last >= 55296 && last <= 56319) {
2367
+ segment = segment.slice(0, -1);
2368
+ j -= 1;
2369
+ }
2370
+ }
2371
+ var arr = [];
2372
+ for (var i = 0; i < segment.length; ++i) {
2373
+ var c = segment.charCodeAt(i);
2374
+ if (c === 45 || c === 46 || c === 95 || c === 126 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c >= 97 && c <= 122 || format === formats2.RFC1738 && (c === 40 || c === 41)) {
2375
+ arr[arr.length] = segment.charAt(i);
2376
+ continue;
2377
+ }
2378
+ if (c < 128) {
2379
+ arr[arr.length] = hexTable[c];
2380
+ continue;
2381
+ }
2382
+ if (c < 2048) {
2383
+ arr[arr.length] = hexTable[192 | c >> 6] + hexTable[128 | c & 63];
2384
+ continue;
2385
+ }
2386
+ if (c < 55296 || c >= 57344) {
2387
+ arr[arr.length] = hexTable[224 | c >> 12] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
2388
+ continue;
2389
+ }
2390
+ i += 1;
2391
+ c = 65536 + ((c & 1023) << 10 | segment.charCodeAt(i) & 1023);
2392
+ arr[arr.length] = hexTable[240 | c >> 18] + hexTable[128 | c >> 12 & 63] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
2393
+ }
2394
+ out += arr.join("");
2395
+ }
2396
+ return out;
2397
+ };
2398
+ var compact = function compact2(value) {
2399
+ var queue = [{ obj: { o: value }, prop: "o" }];
2400
+ var refs = getSideChannel();
2401
+ for (var i = 0; i < queue.length; ++i) {
2402
+ var item = queue[i];
2403
+ var obj = item.obj[item.prop];
2404
+ var keys = Object.keys(obj);
2405
+ for (var j = 0; j < keys.length; ++j) {
2406
+ var key = keys[j];
2407
+ var val = obj[key];
2408
+ if (typeof val === "object" && val !== null && !refs.has(val)) {
2409
+ queue[queue.length] = { obj, prop: key };
2410
+ refs.set(val, true);
2411
+ }
2412
+ }
2413
+ }
2414
+ compactQueue(queue);
2415
+ return value;
2416
+ };
2417
+ var isRegExp = function isRegExp2(obj) {
2418
+ return Object.prototype.toString.call(obj) === "[object RegExp]";
2419
+ };
2420
+ var isBuffer = function isBuffer2(obj) {
2421
+ if (!obj || typeof obj !== "object") {
2422
+ return false;
2423
+ }
2424
+ return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
2425
+ };
2426
+ var combine = function combine2(a, b, arrayLimit, plainObjects, throwOnLimitExceeded) {
2427
+ if (isOverflow(a)) {
2428
+ if (throwOnLimitExceeded) {
2429
+ throw new RangeError("Array limit exceeded. Only " + arrayLimit + " element" + (arrayLimit === 1 ? "" : "s") + " allowed in an array.");
2430
+ }
2431
+ var newIndex = getMaxIndex(a) + 1;
2432
+ a[newIndex] = b;
2433
+ setMaxIndex(a, newIndex);
2434
+ return a;
2435
+ }
2436
+ var result = [].concat(a, b);
2437
+ if (result.length > arrayLimit) {
2438
+ if (throwOnLimitExceeded) {
2439
+ throw new RangeError("Array limit exceeded. Only " + arrayLimit + " element" + (arrayLimit === 1 ? "" : "s") + " allowed in an array.");
2440
+ }
2441
+ return markOverflow(arrayToObject(result, { plainObjects }), result.length - 1);
2442
+ }
2443
+ return result;
2444
+ };
2445
+ var maybeMap = function maybeMap2(val, fn) {
2446
+ if (isArray(val)) {
2447
+ var mapped = [];
2448
+ for (var i = 0; i < val.length; i += 1) {
2449
+ mapped[mapped.length] = fn(val[i]);
2450
+ }
2451
+ return mapped;
2452
+ }
2453
+ return fn(val);
2454
+ };
2455
+ utils = {
2456
+ arrayToObject,
2457
+ assign,
2458
+ combine,
2459
+ compact,
2460
+ decode,
2461
+ encode,
2462
+ isBuffer,
2463
+ isOverflow,
2464
+ isRegExp,
2465
+ markOverflow,
2466
+ maybeMap,
2467
+ merge
2468
+ };
2469
+ return utils;
2470
+ }
2471
+ var stringify_1;
2472
+ var hasRequiredStringify;
2473
+ function requireStringify() {
2474
+ if (hasRequiredStringify) return stringify_1;
2475
+ hasRequiredStringify = 1;
2476
+ var getSideChannel = requireSideChannel();
2477
+ var utils2 = /* @__PURE__ */ requireUtils();
2478
+ var formats2 = /* @__PURE__ */ requireFormats();
2479
+ var has = Object.prototype.hasOwnProperty;
2480
+ var arrayPrefixGenerators = {
2481
+ brackets: function brackets(prefix) {
2482
+ return prefix + "[]";
2483
+ },
2484
+ comma: "comma",
2485
+ indices: function indices(prefix, key) {
2486
+ return prefix + "[" + key + "]";
2487
+ },
2488
+ repeat: function repeat(prefix) {
2489
+ return prefix;
2490
+ }
2491
+ };
2492
+ var isArray = Array.isArray;
2493
+ var push = Array.prototype.push;
2494
+ var pushToArray = function(arr, valueOrArray) {
2495
+ push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);
2496
+ };
2497
+ var toISO = Date.prototype.toISOString;
2498
+ var defaultFormat = formats2["default"];
2499
+ var defaults = {
2500
+ addQueryPrefix: false,
2501
+ allowDots: false,
2502
+ allowEmptyArrays: false,
2503
+ arrayFormat: "indices",
2504
+ charset: "utf-8",
2505
+ charsetSentinel: false,
2506
+ commaRoundTrip: false,
2507
+ delimiter: "&",
2508
+ encode: true,
2509
+ encodeDotInKeys: false,
2510
+ encoder: utils2.encode,
2511
+ encodeValuesOnly: false,
2512
+ filter: void 0,
2513
+ format: defaultFormat,
2514
+ formatter: formats2.formatters[defaultFormat],
2515
+ // deprecated
2516
+ indices: false,
2517
+ serializeDate: function serializeDate(date) {
2518
+ return toISO.call(date);
2519
+ },
2520
+ skipNulls: false,
2521
+ strictNullHandling: false
2522
+ };
2523
+ var isNonNullishPrimitive = function isNonNullishPrimitive2(v) {
2524
+ return typeof v === "string" || typeof v === "number" || typeof v === "boolean" || typeof v === "symbol" || typeof v === "bigint";
2525
+ };
2526
+ var sentinel = {};
2527
+ var stringify = function stringify2(object, prefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel2) {
2528
+ var obj = object;
2529
+ var tmpSc = sideChannel2;
2530
+ var step = 0;
2531
+ var findFlag = false;
2532
+ while ((tmpSc = tmpSc.get(sentinel)) !== void 0 && !findFlag) {
2533
+ var pos = tmpSc.get(object);
2534
+ step += 1;
2535
+ if (typeof pos !== "undefined") {
2536
+ if (pos === step) {
2537
+ throw new RangeError("Cyclic object value");
2538
+ } else {
2539
+ findFlag = true;
2540
+ }
2541
+ }
2542
+ if (typeof tmpSc.get(sentinel) === "undefined") {
2543
+ step = 0;
2544
+ }
2545
+ }
2546
+ if (typeof filter === "function") {
2547
+ obj = filter(prefix, obj);
2548
+ } else if (obj instanceof Date) {
2549
+ obj = serializeDate(obj);
2550
+ } else if (generateArrayPrefix === "comma" && isArray(obj)) {
2551
+ obj = utils2.maybeMap(obj, function(value2) {
2552
+ if (value2 instanceof Date) {
2553
+ return serializeDate(value2);
2554
+ }
2555
+ return value2;
2556
+ });
2557
+ }
2558
+ if (obj === null) {
2559
+ if (strictNullHandling) {
2560
+ return formatter(encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, "key", format) : prefix);
2561
+ }
2562
+ obj = "";
2563
+ }
2564
+ if (isNonNullishPrimitive(obj) || utils2.isBuffer(obj)) {
2565
+ if (encoder) {
2566
+ var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, "key", format);
2567
+ return [formatter(keyValue) + "=" + formatter(encoder(obj, defaults.encoder, charset, "value", format))];
2568
+ }
2569
+ return [formatter(prefix) + "=" + formatter(String(obj))];
2570
+ }
2571
+ var values = [];
2572
+ if (typeof obj === "undefined") {
2573
+ return values;
2574
+ }
2575
+ var objKeys;
2576
+ if (generateArrayPrefix === "comma" && isArray(obj)) {
2577
+ if (encodeValuesOnly && encoder) {
2578
+ obj = utils2.maybeMap(obj, function(v) {
2579
+ return v == null ? v : encoder(v);
2580
+ });
2581
+ }
2582
+ objKeys = [{ value: obj.length > 0 ? obj.join(",") || null : void 0 }];
2583
+ } else if (isArray(filter)) {
2584
+ objKeys = filter;
2585
+ } else {
2586
+ var keys = Object.keys(obj);
2587
+ objKeys = sort ? keys.sort(sort) : keys;
2588
+ }
2589
+ var encodedPrefix = encodeDotInKeys ? String(prefix).replace(/\./g, "%2E") : String(prefix);
2590
+ var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? encodedPrefix + "[]" : encodedPrefix;
2591
+ if (allowEmptyArrays && isArray(obj) && obj.length === 0) {
2592
+ return adjustedPrefix + "[]";
2593
+ }
2594
+ for (var j = 0; j < objKeys.length; ++j) {
2595
+ var key = objKeys[j];
2596
+ var value = typeof key === "object" && key && typeof key.value !== "undefined" ? key.value : obj[key];
2597
+ if (skipNulls && value === null) {
2598
+ continue;
2599
+ }
2600
+ var encodedKey = allowDots && encodeDotInKeys ? String(key).replace(/\./g, "%2E") : String(key);
2601
+ var keyPrefix = isArray(obj) ? typeof generateArrayPrefix === "function" ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix : adjustedPrefix + (allowDots ? "." + encodedKey : "[" + encodedKey + "]");
2602
+ sideChannel2.set(object, step);
2603
+ var valueSideChannel = getSideChannel();
2604
+ valueSideChannel.set(sentinel, sideChannel2);
2605
+ pushToArray(values, stringify2(
2606
+ value,
2607
+ keyPrefix,
2608
+ generateArrayPrefix,
2609
+ commaRoundTrip,
2610
+ allowEmptyArrays,
2611
+ strictNullHandling,
2612
+ skipNulls,
2613
+ encodeDotInKeys,
2614
+ generateArrayPrefix === "comma" && encodeValuesOnly && isArray(obj) ? null : encoder,
2615
+ filter,
2616
+ sort,
2617
+ allowDots,
2618
+ serializeDate,
2619
+ format,
2620
+ formatter,
2621
+ encodeValuesOnly,
2622
+ charset,
2623
+ valueSideChannel
2624
+ ));
2625
+ }
2626
+ return values;
2627
+ };
2628
+ var normalizeStringifyOptions = function normalizeStringifyOptions2(opts) {
2629
+ if (!opts) {
2630
+ return defaults;
2631
+ }
2632
+ if (typeof opts.allowEmptyArrays !== "undefined" && typeof opts.allowEmptyArrays !== "boolean") {
2633
+ throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
2634
+ }
2635
+ if (typeof opts.encodeDotInKeys !== "undefined" && typeof opts.encodeDotInKeys !== "boolean") {
2636
+ throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");
2637
+ }
2638
+ if (opts.encoder !== null && typeof opts.encoder !== "undefined" && typeof opts.encoder !== "function") {
2639
+ throw new TypeError("Encoder has to be a function.");
2640
+ }
2641
+ var charset = opts.charset || defaults.charset;
2642
+ if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") {
2643
+ throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
2644
+ }
2645
+ var format = formats2["default"];
2646
+ if (typeof opts.format !== "undefined") {
2647
+ if (!has.call(formats2.formatters, opts.format)) {
2648
+ throw new TypeError("Unknown format option provided.");
2649
+ }
2650
+ format = opts.format;
2651
+ }
2652
+ var formatter = formats2.formatters[format];
2653
+ var filter = defaults.filter;
2654
+ if (typeof opts.filter === "function" || isArray(opts.filter)) {
2655
+ filter = opts.filter;
2656
+ }
2657
+ var arrayFormat;
2658
+ if (opts.arrayFormat in arrayPrefixGenerators) {
2659
+ arrayFormat = opts.arrayFormat;
2660
+ } else if ("indices" in opts) {
2661
+ arrayFormat = opts.indices ? "indices" : "repeat";
2662
+ } else {
2663
+ arrayFormat = defaults.arrayFormat;
2664
+ }
2665
+ if ("commaRoundTrip" in opts && typeof opts.commaRoundTrip !== "boolean") {
2666
+ throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
2667
+ }
2668
+ var allowDots = typeof opts.allowDots === "undefined" ? opts.encodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots;
2669
+ return {
2670
+ addQueryPrefix: typeof opts.addQueryPrefix === "boolean" ? opts.addQueryPrefix : defaults.addQueryPrefix,
2671
+ allowDots,
2672
+ allowEmptyArrays: typeof opts.allowEmptyArrays === "boolean" ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays,
2673
+ arrayFormat,
2674
+ charset,
2675
+ charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults.charsetSentinel,
2676
+ commaRoundTrip: !!opts.commaRoundTrip,
2677
+ delimiter: typeof opts.delimiter === "undefined" ? defaults.delimiter : opts.delimiter,
2678
+ encode: typeof opts.encode === "boolean" ? opts.encode : defaults.encode,
2679
+ encodeDotInKeys: typeof opts.encodeDotInKeys === "boolean" ? opts.encodeDotInKeys : defaults.encodeDotInKeys,
2680
+ encoder: typeof opts.encoder === "function" ? opts.encoder : defaults.encoder,
2681
+ encodeValuesOnly: typeof opts.encodeValuesOnly === "boolean" ? opts.encodeValuesOnly : defaults.encodeValuesOnly,
2682
+ filter,
2683
+ format,
2684
+ formatter,
2685
+ serializeDate: typeof opts.serializeDate === "function" ? opts.serializeDate : defaults.serializeDate,
2686
+ skipNulls: typeof opts.skipNulls === "boolean" ? opts.skipNulls : defaults.skipNulls,
2687
+ sort: typeof opts.sort === "function" ? opts.sort : null,
2688
+ strictNullHandling: typeof opts.strictNullHandling === "boolean" ? opts.strictNullHandling : defaults.strictNullHandling
2689
+ };
2690
+ };
2691
+ stringify_1 = function(object, opts) {
2692
+ var obj = object;
2693
+ var options = normalizeStringifyOptions(opts);
2694
+ var objKeys;
2695
+ var filter;
2696
+ if (typeof options.filter === "function") {
2697
+ filter = options.filter;
2698
+ obj = filter("", obj);
2699
+ } else if (isArray(options.filter)) {
2700
+ filter = options.filter;
2701
+ objKeys = filter;
2702
+ }
2703
+ var keys = [];
2704
+ if (typeof obj !== "object" || obj === null) {
2705
+ return "";
2706
+ }
2707
+ var generateArrayPrefix = arrayPrefixGenerators[options.arrayFormat];
2708
+ var commaRoundTrip = generateArrayPrefix === "comma" && options.commaRoundTrip;
2709
+ if (!objKeys) {
2710
+ objKeys = Object.keys(obj);
2711
+ }
2712
+ if (options.sort) {
2713
+ objKeys.sort(options.sort);
2714
+ }
2715
+ var sideChannel2 = getSideChannel();
2716
+ for (var i = 0; i < objKeys.length; ++i) {
2717
+ var key = objKeys[i];
2718
+ if (typeof key === "undefined" || key === null) {
2719
+ continue;
2720
+ }
2721
+ var value = obj[key];
2722
+ if (options.skipNulls && value === null) {
2723
+ continue;
2724
+ }
2725
+ pushToArray(keys, stringify(
2726
+ value,
2727
+ key,
2728
+ generateArrayPrefix,
2729
+ commaRoundTrip,
2730
+ options.allowEmptyArrays,
2731
+ options.strictNullHandling,
2732
+ options.skipNulls,
2733
+ options.encodeDotInKeys,
2734
+ options.encode ? options.encoder : null,
2735
+ options.filter,
2736
+ options.sort,
2737
+ options.allowDots,
2738
+ options.serializeDate,
2739
+ options.format,
2740
+ options.formatter,
2741
+ options.encodeValuesOnly,
2742
+ options.charset,
2743
+ sideChannel2
2744
+ ));
2745
+ }
2746
+ var joined = keys.join(options.delimiter);
2747
+ var prefix = options.addQueryPrefix === true ? "?" : "";
2748
+ if (options.charsetSentinel) {
2749
+ if (options.charset === "iso-8859-1") {
2750
+ prefix += "utf8=%26%2310003%3B" + options.delimiter;
2751
+ } else {
2752
+ prefix += "utf8=%E2%9C%93" + options.delimiter;
2753
+ }
2754
+ }
2755
+ return joined.length > 0 ? prefix + joined : "";
2756
+ };
2757
+ return stringify_1;
2758
+ }
2759
+ var parse;
2760
+ var hasRequiredParse;
2761
+ function requireParse() {
2762
+ if (hasRequiredParse) return parse;
2763
+ hasRequiredParse = 1;
2764
+ var utils2 = /* @__PURE__ */ requireUtils();
2765
+ var has = Object.prototype.hasOwnProperty;
2766
+ var isArray = Array.isArray;
2767
+ var defaults = {
2768
+ allowDots: false,
2769
+ allowEmptyArrays: false,
2770
+ allowPrototypes: false,
2771
+ allowSparse: false,
2772
+ arrayLimit: 20,
2773
+ charset: "utf-8",
2774
+ charsetSentinel: false,
2775
+ comma: false,
2776
+ decodeDotInKeys: false,
2777
+ decoder: utils2.decode,
2778
+ delimiter: "&",
2779
+ depth: 5,
2780
+ duplicates: "combine",
2781
+ ignoreQueryPrefix: false,
2782
+ interpretNumericEntities: false,
2783
+ parameterLimit: 1e3,
2784
+ parseArrays: true,
2785
+ plainObjects: false,
2786
+ strictDepth: false,
2787
+ strictMerge: true,
2788
+ strictNullHandling: false,
2789
+ throwOnLimitExceeded: false
2790
+ };
2791
+ var interpretNumericEntities = function(str) {
2792
+ return str.replace(/&#(\d+);/g, function($0, numberStr) {
2793
+ return String.fromCharCode(parseInt(numberStr, 10));
2794
+ });
2795
+ };
2796
+ var parseArrayValue = function(val, options, currentArrayLength, isFlatArrayValue) {
2797
+ if (val && typeof val === "string" && options.comma && val.indexOf(",") > -1) {
2798
+ if (isFlatArrayValue && options.throwOnLimitExceeded) {
2799
+ var commaCount = 0;
2800
+ var commaIndex = val.indexOf(",");
2801
+ while (commaIndex > -1) {
2802
+ commaCount += 1;
2803
+ if (commaCount >= options.arrayLimit) {
2804
+ throw new RangeError("Array limit exceeded. Only " + options.arrayLimit + " element" + (options.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
2805
+ }
2806
+ commaIndex = val.indexOf(",", commaIndex + 1);
2807
+ }
2808
+ }
2809
+ return val.split(",");
2810
+ }
2811
+ if (options.throwOnLimitExceeded && currentArrayLength >= options.arrayLimit) {
2812
+ throw new RangeError("Array limit exceeded. Only " + options.arrayLimit + " element" + (options.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
2813
+ }
2814
+ return val;
2815
+ };
2816
+ var isoSentinel = "utf8=%26%2310003%3B";
2817
+ var charsetSentinel = "utf8=%E2%9C%93";
2818
+ var parseValues = function parseQueryStringValues(str, options) {
2819
+ var obj = { __proto__: null };
2820
+ var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, "") : str;
2821
+ cleanStr = cleanStr.replace(/%5B/gi, "[").replace(/%5D/gi, "]");
2822
+ var limit = options.parameterLimit === Infinity ? void 0 : options.parameterLimit;
2823
+ var parts = cleanStr.split(
2824
+ options.delimiter,
2825
+ options.throwOnLimitExceeded && typeof limit !== "undefined" ? limit + 1 : limit
2826
+ );
2827
+ if (options.throwOnLimitExceeded && typeof limit !== "undefined" && parts.length > limit) {
2828
+ throw new RangeError("Parameter limit exceeded. Only " + limit + " parameter" + (limit === 1 ? "" : "s") + " allowed.");
2829
+ }
2830
+ var skipIndex = -1;
2831
+ var i;
2832
+ var charset = options.charset;
2833
+ if (options.charsetSentinel) {
2834
+ for (i = 0; i < parts.length; ++i) {
2835
+ if (parts[i].indexOf("utf8=") === 0) {
2836
+ if (parts[i] === charsetSentinel) {
2837
+ charset = "utf-8";
2838
+ } else if (parts[i] === isoSentinel) {
2839
+ charset = "iso-8859-1";
2840
+ }
2841
+ skipIndex = i;
2842
+ i = parts.length;
2843
+ }
2844
+ }
2845
+ }
2846
+ for (i = 0; i < parts.length; ++i) {
2847
+ if (i === skipIndex) {
2848
+ continue;
2849
+ }
2850
+ var part = parts[i];
2851
+ var bracketEqualsPos = part.indexOf("]=");
2852
+ var pos = bracketEqualsPos === -1 ? part.indexOf("=") : bracketEqualsPos + 1;
2853
+ var key;
2854
+ var val;
2855
+ if (pos === -1) {
2856
+ key = options.decoder(part, defaults.decoder, charset, "key");
2857
+ val = options.strictNullHandling ? null : "";
2858
+ } else {
2859
+ key = options.decoder(part.slice(0, pos), defaults.decoder, charset, "key");
2860
+ if (key !== null) {
2861
+ val = utils2.maybeMap(
2862
+ parseArrayValue(
2863
+ part.slice(pos + 1),
2864
+ options,
2865
+ isArray(obj[key]) ? obj[key].length : 0,
2866
+ part.indexOf("[]=") === -1
2867
+ ),
2868
+ function(encodedVal) {
2869
+ return options.decoder(encodedVal, defaults.decoder, charset, "value");
2870
+ }
2871
+ );
2872
+ }
2873
+ }
2874
+ if (val && options.interpretNumericEntities && charset === "iso-8859-1") {
2875
+ val = interpretNumericEntities(String(val));
2876
+ }
2877
+ if (part.indexOf("[]=") > -1) {
2878
+ val = isArray(val) ? [val] : val;
2879
+ }
2880
+ if (options.comma && isArray(val) && val.length > options.arrayLimit) {
2881
+ val = utils2.combine([], val, options.arrayLimit, options.plainObjects, options.throwOnLimitExceeded);
2882
+ }
2883
+ if (key !== null) {
2884
+ var existing = has.call(obj, key);
2885
+ if (existing && (options.duplicates === "combine" || part.indexOf("[]=") > -1)) {
2886
+ obj[key] = utils2.combine(
2887
+ obj[key],
2888
+ val,
2889
+ options.arrayLimit,
2890
+ options.plainObjects,
2891
+ options.throwOnLimitExceeded
2892
+ );
2893
+ } else if (!existing || options.duplicates === "last") {
2894
+ obj[key] = val;
2895
+ }
2896
+ }
2897
+ }
2898
+ return obj;
2899
+ };
2900
+ var parseObject = function(chain, val, options, valuesParsed) {
2901
+ var currentArrayLength = 0;
2902
+ if (chain.length > 0 && chain[chain.length - 1] === "[]") {
2903
+ var parentKey = chain.slice(0, -1).join("");
2904
+ currentArrayLength = Array.isArray(val) && val[parentKey] ? val[parentKey].length : 0;
2905
+ }
2906
+ var leaf = valuesParsed ? val : parseArrayValue(val, options, currentArrayLength);
2907
+ for (var i = chain.length - 1; i >= 0; --i) {
2908
+ var obj;
2909
+ var root = chain[i];
2910
+ if (root === "[]" && options.parseArrays) {
2911
+ if (utils2.isOverflow(leaf)) {
2912
+ obj = leaf;
2913
+ } else {
2914
+ obj = options.allowEmptyArrays && (leaf === "" || options.strictNullHandling && leaf === null) ? [] : utils2.combine(
2915
+ [],
2916
+ leaf,
2917
+ options.arrayLimit,
2918
+ options.plainObjects,
2919
+ options.throwOnLimitExceeded
2920
+ );
2921
+ }
2922
+ } else {
2923
+ obj = options.plainObjects ? { __proto__: null } : {};
2924
+ var cleanRoot = root.charAt(0) === "[" && root.charAt(root.length - 1) === "]" ? root.slice(1, -1) : root;
2925
+ var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, ".") : cleanRoot;
2926
+ var index = parseInt(decodedRoot, 10);
2927
+ var isValidArrayIndex = !isNaN(index) && root !== decodedRoot && String(index) === decodedRoot && index >= 0 && options.parseArrays;
2928
+ if (!options.parseArrays && decodedRoot === "") {
2929
+ obj = { 0: leaf };
2930
+ } else if (isValidArrayIndex && index < options.arrayLimit) {
2931
+ obj = [];
2932
+ obj[index] = leaf;
2933
+ } else if (isValidArrayIndex && options.throwOnLimitExceeded) {
2934
+ throw new RangeError("Array limit exceeded. Only " + options.arrayLimit + " element" + (options.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
2935
+ } else if (isValidArrayIndex) {
2936
+ obj[index] = leaf;
2937
+ utils2.markOverflow(obj, index);
2938
+ } else if (decodedRoot !== "__proto__") {
2939
+ obj[decodedRoot] = leaf;
2940
+ }
2941
+ }
2942
+ leaf = obj;
2943
+ }
2944
+ return leaf;
2945
+ };
2946
+ var splitKeyIntoSegments = function splitKeyIntoSegments2(originalKey, options) {
2947
+ var key = options.allowDots ? originalKey.replace(/\.([^.[]+)/g, "[$1]") : originalKey;
2948
+ if (options.depth <= 0) {
2949
+ if (!options.plainObjects && has.call(Object.prototype, key)) {
2950
+ if (!options.allowPrototypes) {
2951
+ return;
2952
+ }
2953
+ }
2954
+ return [key];
2955
+ }
2956
+ var segments = [];
2957
+ var first = key.indexOf("[");
2958
+ var parent = first >= 0 ? key.slice(0, first) : key;
2959
+ if (parent) {
2960
+ if (!options.plainObjects && has.call(Object.prototype, parent)) {
2961
+ if (!options.allowPrototypes) {
2962
+ return;
2963
+ }
2964
+ }
2965
+ segments[segments.length] = parent;
2966
+ }
2967
+ var n = key.length;
2968
+ var open = first;
2969
+ var collected = 0;
2970
+ while (open >= 0 && collected < options.depth) {
2971
+ var level = 1;
2972
+ var i = open + 1;
2973
+ var close = -1;
2974
+ while (i < n && close < 0) {
2975
+ var cu = key.charCodeAt(i);
2976
+ if (cu === 91) {
2977
+ level += 1;
2978
+ } else if (cu === 93) {
2979
+ level -= 1;
2980
+ if (level === 0) {
2981
+ close = i;
2982
+ }
2983
+ }
2984
+ i += 1;
2985
+ }
2986
+ if (close < 0) {
2987
+ segments[segments.length] = "[" + key.slice(open) + "]";
2988
+ return segments;
2989
+ }
2990
+ var seg = key.slice(open, close + 1);
2991
+ var content = seg.slice(1, -1);
2992
+ if (!options.plainObjects && has.call(Object.prototype, content) && !options.allowPrototypes) {
2993
+ return;
2994
+ }
2995
+ segments[segments.length] = seg;
2996
+ collected += 1;
2997
+ open = key.indexOf("[", close + 1);
2998
+ }
2999
+ if (open >= 0) {
3000
+ if (options.strictDepth === true) {
3001
+ throw new RangeError("Input depth exceeded depth option of " + options.depth + " and strictDepth is true");
3002
+ }
3003
+ segments[segments.length] = "[" + key.slice(open) + "]";
3004
+ }
3005
+ return segments;
3006
+ };
3007
+ var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
3008
+ if (!givenKey) {
3009
+ return;
3010
+ }
3011
+ var keys = splitKeyIntoSegments(givenKey, options);
3012
+ if (!keys) {
3013
+ return;
3014
+ }
3015
+ return parseObject(keys, val, options, valuesParsed);
3016
+ };
3017
+ var normalizeParseOptions = function normalizeParseOptions2(opts) {
3018
+ if (!opts) {
3019
+ return defaults;
3020
+ }
3021
+ if (typeof opts.allowEmptyArrays !== "undefined" && typeof opts.allowEmptyArrays !== "boolean") {
3022
+ throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
3023
+ }
3024
+ if (typeof opts.decodeDotInKeys !== "undefined" && typeof opts.decodeDotInKeys !== "boolean") {
3025
+ throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");
3026
+ }
3027
+ if (opts.decoder !== null && typeof opts.decoder !== "undefined" && typeof opts.decoder !== "function") {
3028
+ throw new TypeError("Decoder has to be a function.");
3029
+ }
3030
+ if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") {
3031
+ throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
3032
+ }
3033
+ if (typeof opts.throwOnLimitExceeded !== "undefined" && typeof opts.throwOnLimitExceeded !== "boolean") {
3034
+ throw new TypeError("`throwOnLimitExceeded` option must be a boolean");
3035
+ }
3036
+ var charset = typeof opts.charset === "undefined" ? defaults.charset : opts.charset;
3037
+ var duplicates = typeof opts.duplicates === "undefined" ? defaults.duplicates : opts.duplicates;
3038
+ if (duplicates !== "combine" && duplicates !== "first" && duplicates !== "last") {
3039
+ throw new TypeError("The duplicates option must be either combine, first, or last");
3040
+ }
3041
+ var allowDots = typeof opts.allowDots === "undefined" ? opts.decodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots;
3042
+ return {
3043
+ allowDots,
3044
+ allowEmptyArrays: typeof opts.allowEmptyArrays === "boolean" ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays,
3045
+ allowPrototypes: typeof opts.allowPrototypes === "boolean" ? opts.allowPrototypes : defaults.allowPrototypes,
3046
+ allowSparse: typeof opts.allowSparse === "boolean" ? opts.allowSparse : defaults.allowSparse,
3047
+ arrayLimit: typeof opts.arrayLimit === "number" ? opts.arrayLimit : defaults.arrayLimit,
3048
+ charset,
3049
+ charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults.charsetSentinel,
3050
+ comma: typeof opts.comma === "boolean" ? opts.comma : defaults.comma,
3051
+ decodeDotInKeys: typeof opts.decodeDotInKeys === "boolean" ? opts.decodeDotInKeys : defaults.decodeDotInKeys,
3052
+ decoder: typeof opts.decoder === "function" ? opts.decoder : defaults.decoder,
3053
+ delimiter: typeof opts.delimiter === "string" || utils2.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
3054
+ // eslint-disable-next-line no-implicit-coercion, no-extra-parens
3055
+ depth: typeof opts.depth === "number" || opts.depth === false ? +opts.depth : defaults.depth,
3056
+ duplicates,
3057
+ ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
3058
+ interpretNumericEntities: typeof opts.interpretNumericEntities === "boolean" ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
3059
+ parameterLimit: typeof opts.parameterLimit === "number" ? opts.parameterLimit : defaults.parameterLimit,
3060
+ parseArrays: opts.parseArrays !== false,
3061
+ plainObjects: typeof opts.plainObjects === "boolean" ? opts.plainObjects : defaults.plainObjects,
3062
+ strictDepth: typeof opts.strictDepth === "boolean" ? !!opts.strictDepth : defaults.strictDepth,
3063
+ strictMerge: typeof opts.strictMerge === "boolean" ? !!opts.strictMerge : defaults.strictMerge,
3064
+ strictNullHandling: typeof opts.strictNullHandling === "boolean" ? opts.strictNullHandling : defaults.strictNullHandling,
3065
+ throwOnLimitExceeded: typeof opts.throwOnLimitExceeded === "boolean" ? opts.throwOnLimitExceeded : false
3066
+ };
3067
+ };
3068
+ parse = function(str, opts) {
3069
+ var options = normalizeParseOptions(opts);
3070
+ if (str === "" || str === null || typeof str === "undefined") {
3071
+ return options.plainObjects ? { __proto__: null } : {};
3072
+ }
3073
+ var tempObj = typeof str === "string" ? parseValues(str, options) : str;
3074
+ var obj = options.plainObjects ? { __proto__: null } : {};
3075
+ var keys = Object.keys(tempObj);
3076
+ for (var i = 0; i < keys.length; ++i) {
3077
+ var key = keys[i];
3078
+ var newObj = parseKeys(key, tempObj[key], options, typeof str === "string");
3079
+ obj = utils2.merge(obj, newObj, options);
3080
+ }
3081
+ if (options.allowSparse === true) {
3082
+ return obj;
3083
+ }
3084
+ return utils2.compact(obj);
3085
+ };
3086
+ return parse;
3087
+ }
3088
+ var lib;
3089
+ var hasRequiredLib;
3090
+ function requireLib() {
3091
+ if (hasRequiredLib) return lib;
3092
+ hasRequiredLib = 1;
3093
+ var stringify = /* @__PURE__ */ requireStringify();
3094
+ var parse2 = /* @__PURE__ */ requireParse();
3095
+ var formats2 = /* @__PURE__ */ requireFormats();
3096
+ lib = {
3097
+ formats: formats2,
3098
+ parse: parse2,
3099
+ stringify
3100
+ };
3101
+ return lib;
3102
+ }
3103
+ var libExports = /* @__PURE__ */ requireLib();
3104
+ const qs = /* @__PURE__ */ getDefaultExportFromCjs(libExports);
3105
+ function cacheAdapter(args, adapter, noneCache = false) {
3106
+ if (noneCache || args?.customApi?.value) return adapter(args);
3107
+ const maxAge = 5e3;
3108
+ const requestKey = typeof args === "object" ? qs.stringify({ ...args, customApi: null }) : args;
3109
+ let responsePromise = MemoryCache.get(requestKey);
3110
+ if (!responsePromise) {
3111
+ responsePromise = (async () => {
3112
+ try {
3113
+ return await adapter(args);
3114
+ } catch (reason) {
3115
+ MemoryCache.delete(requestKey);
3116
+ throw reason;
3117
+ }
3118
+ })();
3119
+ MemoryCache.set(requestKey, responsePromise, maxAge);
3120
+ return responsePromise;
3121
+ }
3122
+ return responsePromise;
3123
+ }
3124
+ class MemoryCache {
3125
+ static cachedata = {};
3126
+ static set(key, value, maxAge) {
3127
+ this.cachedata[key] = {
3128
+ maxAge: maxAge || 0,
3129
+ value,
3130
+ now: Date.now()
3131
+ };
3132
+ }
3133
+ static get(key) {
3134
+ this.reset();
3135
+ const cachedItem = this.cachedata[key];
3136
+ if (!cachedItem) return null;
3137
+ return cachedItem.value;
3138
+ }
3139
+ static delete(key) {
3140
+ return delete this.cachedata[key];
3141
+ }
3142
+ static clear() {
3143
+ this.cachedata = {};
3144
+ }
3145
+ /**
3146
+ *清空过期的数据
3147
+ */
3148
+ static reset() {
3149
+ for (const key in this.cachedata) {
3150
+ const cachedItem = this.cachedata[key];
3151
+ if (cachedItem) {
3152
+ const isExpired = Date.now() - cachedItem.now > cachedItem.maxAge;
3153
+ isExpired && this.delete(key);
3154
+ }
3155
+ }
3156
+ }
3157
+ }
3158
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
3159
+ __name: "select-more",
3160
+ emits: ["next"],
3161
+ setup(__props, { emit: __emit }) {
3162
+ const target = ref$1(null);
3163
+ const emit = __emit;
3164
+ const targetIsVisible = useIntersectionObserver(
3165
+ target,
3166
+ ([{ isIntersecting }], observerElement) => {
3167
+ if (isIntersecting) {
3168
+ emit("next");
3169
+ }
3170
+ }
3171
+ );
3172
+ onUnmounted(() => {
3173
+ targetIsVisible.stop();
3174
+ });
3175
+ return (_ctx, _cache) => {
3176
+ const _component_a_spin = resolveComponent("a-spin");
3177
+ return openBlock(), createElementBlock("div", {
3178
+ ref_key: "target",
3179
+ ref: target
3180
+ }, [
3181
+ createVNode(_component_a_spin, { size: "small" })
3182
+ ], 512);
3183
+ };
3184
+ }
3185
+ });
3186
+ function useAsyncOptions({ bindModelKey, modelCategory }) {
3187
+ const { businessSetting } = window.NocodeAdapter.hooks?.useBusinessSetting?.();
3188
+ const treeData = ref$1([]);
3189
+ const searchField = (businessSetting.productSearchFields || "name_,code_")?.split(",") || [];
3190
+ const getQueryDateByKeyWord = (keyword) => {
3191
+ return searchField?.reduce((total, filedKey) => {
3192
+ const expkey = filedKey.split(".").length > 1 ? filedKey : filedKey + ".like";
3193
+ total[expkey] = keyword;
3194
+ return total;
3195
+ }, {}) || {};
3196
+ };
3197
+ const getExp = () => {
3198
+ return `OR(${searchField.map((key) => `${key}.like`).join(",")})`;
3199
+ };
3200
+ async function getRdoAsyncOptions(arg = {}) {
3201
+ let complete = true;
3202
+ let optionsData = [];
3203
+ const queryData = arg.keyword ? getQueryDateByKeyWord(arg.keyword) : {};
3204
+ const queryExp = arg.keyword ? getExp() : void 0;
3205
+ const res = await api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey(
3206
+ { bsKey: "rdoListByPage", modelKey: bindModelKey, modelCategory },
3207
+ {},
3208
+ {
3209
+ exp: queryExp,
3210
+ query: queryData,
3211
+ pageSize: 30,
3212
+ pageNo: arg.pageNo
3213
+ }
3214
+ ) || {};
3215
+ complete = res.totalPage ? res.totalPage <= res.pageNo : true;
3216
+ optionsData = (res?.data || []).map((i) => {
3217
+ const rdoLabel = i.__LABEL__ || i.name_;
3218
+ return {
3219
+ value: i.id_,
3220
+ title: rdoLabel,
3221
+ _info: i.__CHILDREN__?.find((k) => k.default_),
3222
+ full_path: () => h("div", [
3223
+ h("span", `${rdoLabel}`),
3224
+ h("span", { class: "gct-custom-tag ml8px" }, $t("sys.default"))
3225
+ ]),
3226
+ children: i.__CHILDREN__?.map((j) => {
3227
+ const versionLabel = j.__LABEL__ || j.version_;
3228
+ return {
3229
+ value: `${i.id_}:${j.id_}`,
3230
+ title: () => h("div", [
3231
+ h("span", { class: "version" }, versionLabel),
3232
+ j.default_ ? h(
3233
+ "span",
3234
+ { class: "version gct-custom-tag ml8px" },
3235
+ $t("sys.component.table.settingDensDefault")
3236
+ ) : null
3237
+ ]),
3238
+ _info: { ...j },
3239
+ full_path: () => h("div", [h("span", `${rdoLabel}:${versionLabel}`)])
3240
+ };
3241
+ })
3242
+ };
3243
+ });
3244
+ return { complete, optionsData };
3245
+ }
3246
+ async function getChildrens({ id_ } = {}) {
3247
+ const [_fId, _cId] = id_?.split(":");
3248
+ const res = await api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey(
3249
+ { bsKey: "rdoListVersionByRefIdsWithParent", modelKey: bindModelKey, modelCategory },
3250
+ {
3251
+ refIds: id_,
3252
+ includeDeleted: 1
3253
+ },
3254
+ { foreignFields: [] }
3255
+ ) || {};
3256
+ const data = res?.data?.[0];
3257
+ const rdoLabel = data.__LABEL__ || data.name_;
3258
+ let children = [];
3259
+ try {
3260
+ const chl = await api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey(
3261
+ { bsKey: "rdoListVersionById", modelKey: bindModelKey, modelCategory },
3262
+ { id: _fId },
3263
+ { foreignFields: [] }
3264
+ ) || {};
3265
+ children = chl.data?.map((i) => {
3266
+ const versionLabel = i.__LABEL__ || i.version_;
3267
+ return {
3268
+ value: `${_fId}:${i.id_}`,
3269
+ title: () => h("div", [
3270
+ h("span", { class: "version" }, versionLabel),
3271
+ i.default_ ? h(
3272
+ "span",
3273
+ { class: "version gct-custom-tag ml8px" },
3274
+ $t("sys.component.table.settingDensDefault")
3275
+ ) : null
3276
+ ]),
3277
+ _info: { ...i },
3278
+ full_path: () => h("div", [h("span", `${rdoLabel}:${versionLabel}`)])
3279
+ };
3280
+ });
3281
+ } catch (error) {
3282
+ }
3283
+ return {
3284
+ value: _fId,
3285
+ title: rdoLabel,
3286
+ full_path: () => h("div", [
3287
+ h("span", `${rdoLabel}`),
3288
+ h("span", { class: "gct-custom-tag ml8px" }, $t("sys.default"))
3289
+ ]),
3290
+ children
3291
+ };
3292
+ }
3293
+ async function getAsyncOptions(arg) {
3294
+ if (!arg.pageNo) {
3295
+ arg.pageNo = 1;
3296
+ }
3297
+ const { optionsData, complete } = await cacheAdapter({ ...arg }, getRdoAsyncOptions);
3298
+ if (treeData.value?.length) {
3299
+ if (arg.pageNo > 1) {
3300
+ treeData.value?.pop();
3301
+ } else {
3302
+ treeData.value = [];
3303
+ }
3304
+ }
3305
+ optionsData.forEach((i) => {
3306
+ treeData.value?.push(i);
3307
+ });
3308
+ if (!complete) {
3309
+ treeData.value?.push({
3310
+ selectable: false,
3311
+ title: () => h(_sfc_main$8, {
3312
+ onNextOnce: () => {
3313
+ arg.pageNo += 1;
3314
+ getAsyncOptions(arg);
3315
+ }
3316
+ })
3317
+ });
3318
+ }
3319
+ }
3320
+ return {
3321
+ getChildrens: async (id_) => {
3322
+ try {
3323
+ if (!id_) return;
3324
+ const [_fId, _cId] = id_?.split(":");
3325
+ const existingData = treeData.value?.find((i) => i.value === _fId);
3326
+ if (existingData) return;
3327
+ const row = await cacheAdapter({ id_ }, getChildrens);
3328
+ const checked = treeData.value?.find((i) => i.value === _fId);
3329
+ if (checked) return;
3330
+ row && treeData.value?.unshift(row);
3331
+ } catch (error) {
3332
+ }
3333
+ },
3334
+ getAsyncOptions,
3335
+ treeData
3336
+ };
3337
+ }
3338
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3339
+ __name: "rdo-tree-select",
3340
+ props: {
3341
+ modelValue: {},
3342
+ modelCategory: { default: "entity" },
3343
+ modelKey: {},
3344
+ placeholder: { default: $t("sys.appDesigner.pleaseSelect") },
3345
+ disabledParent: { type: Boolean },
3346
+ parentToDefault: { type: Boolean, default: true },
3347
+ disabled: { type: Boolean },
3348
+ attr: {}
3349
+ },
3350
+ emits: ["update:modelValue", "update:fullPathValue", "change"],
3351
+ setup(__props, { emit: __emit }) {
3352
+ const props = __props;
3353
+ const emit = __emit;
3354
+ const searchValue = ref$1();
3355
+ const { getChildrens, getAsyncOptions, treeData } = useAsyncOptions({
3356
+ bindModelKey: props.modelKey,
3357
+ modelCategory: props.modelCategory
3358
+ });
3359
+ const actualTreeData = computed(() => {
3360
+ return treeData.value?.map((item) => {
3361
+ return { ...item, selectable: !props.disabledParent };
3362
+ });
3363
+ });
3364
+ const value = computed({
3365
+ get() {
3366
+ return props.modelValue || void 0;
3367
+ },
3368
+ set(v) {
3369
+ emit("update:modelValue", v || null);
3370
+ }
3371
+ });
3372
+ async function getOptionsByQuery(opts = {}) {
3373
+ await getAsyncOptions({
3374
+ modelCategory: props.modelCategory,
3375
+ pageSize: 9999,
3376
+ queryData: { ...opts.queryData },
3377
+ ...opts
3378
+ });
3379
+ }
3380
+ onMounted(getOptionsByQuery);
3381
+ watchDebounced(
3382
+ value,
3383
+ async (v) => {
3384
+ try {
3385
+ await getChildrens(value.value);
3386
+ } catch (error) {
3387
+ console.log(error);
3388
+ }
3389
+ },
3390
+ { debounce: 200, immediate: true }
3391
+ );
3392
+ const search = debounce(async (keyword) => {
3393
+ await getOptionsByQuery({ keyword, pageNo: 1 });
3394
+ if (!keyword) {
3395
+ await getChildrens(value.value);
3396
+ }
3397
+ }, 200);
3398
+ function onChange(value2, _, node) {
3399
+ if (value2) {
3400
+ const [_fId, _cId] = value2?.split(":");
3401
+ if (props.parentToDefault && !_cId) {
3402
+ emit("update:fullPathValue", `${value2}:${node.triggerNode.props._info.id_}`);
3403
+ emit("change", `${value2}:${node.triggerNode.props._info.id_}`, node);
3404
+ } else {
3405
+ emit("update:fullPathValue", value2);
3406
+ emit("change", value2, node);
3407
+ }
3408
+ } else {
3409
+ emit("update:fullPathValue", null);
3410
+ emit("change", null, node);
3411
+ }
3412
+ }
3413
+ return (_ctx, _cache) => {
3414
+ const _component_a_tree_select = resolveComponent("a-tree-select");
3415
+ return openBlock(), createBlock(_component_a_tree_select, mergeProps({
3416
+ value: value.value,
3417
+ "onUpdate:value": _cache[0] || (_cache[0] = ($event) => value.value = $event),
3418
+ searchValue: searchValue.value,
3419
+ "onUpdate:searchValue": _cache[1] || (_cache[1] = ($event) => searchValue.value = $event),
3420
+ style: { "width": "100%" },
3421
+ "tree-data": actualTreeData.value,
3422
+ "show-search": "",
3423
+ placeholder: __props.placeholder,
3424
+ allowClear: true,
3425
+ treeNodeLabelProp: "full_path",
3426
+ virtual: false,
3427
+ onSearch: unref(search),
3428
+ filterTreeNode: () => true,
3429
+ disabled: __props.disabled
3430
+ }, __props.attr || {}, {
3431
+ "dropdown-class-name": "vxe-table--ignore-clear",
3432
+ onChange
3433
+ }), null, 16, ["value", "searchValue", "tree-data", "placeholder", "onSearch", "disabled"]);
3434
+ };
3435
+ }
3436
+ });
3437
+ const _hoisted_1$5 = {
3438
+ key: 0,
3439
+ class: "form-field-select--readonly"
3440
+ };
3441
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3442
+ __name: "form-field-select",
3443
+ props: {
3444
+ modelValue: { default: void 0 },
3445
+ onlySubFields: { type: Boolean, default: false },
3446
+ subModelKey: { default: void 0 },
3447
+ readonly: { type: Boolean, default: false },
3448
+ multiple: { type: Boolean, default: false }
3449
+ },
3450
+ emits: ["update:modelValue"],
3451
+ setup(__props, { emit: __emit }) {
3452
+ const formItemContext = Form.useInjectFormItemContext();
3453
+ const { injectController } = useFormModel();
3454
+ const c = injectController();
3455
+ const props = __props;
3456
+ const emit = __emit;
3457
+ const onChange = (value) => {
3458
+ emit("update:modelValue", value);
3459
+ formItemContext.onFieldChange();
3460
+ };
3461
+ function field2Option(field) {
3462
+ return {
3463
+ label: `${field.name}[${field.key}]`,
3464
+ value: `${field.modelKey}.${field.key}`
3465
+ };
3466
+ }
3467
+ const fieldOptions = computed(() => {
3468
+ let fields = c.masterFields;
3469
+ if (props.subModelKey) {
3470
+ fields = c.getSubModelFields(props.subModelKey);
3471
+ }
3472
+ fields = fields.filter(
3473
+ (field) => props.onlySubFields ? c.isSubField(field) : !c.isSystemField(field) && !c.isSubField(field)
3474
+ );
3475
+ return fields.map(field2Option);
3476
+ });
3477
+ const readonlyText = computed(() => {
3478
+ if (!props.modelValue) {
3479
+ return;
3480
+ }
3481
+ const fieldKeys = props.multiple ? props.modelValue : [props.modelValue];
3482
+ return fieldKeys.map((fieldKey) => {
3483
+ const [model, field] = fieldKey.split(".");
3484
+ return c.findField(model, field)?.name || fieldKey;
3485
+ }).join(", ");
3486
+ });
3487
+ const filterOption = (input, option) => {
3488
+ return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
3489
+ };
3490
+ return (_ctx, _cache) => {
3491
+ const _component_a_select = resolveComponent("a-select");
3492
+ return __props.readonly ? (openBlock(), createElementBlock("span", _hoisted_1$5, toDisplayString(readonlyText.value), 1)) : (openBlock(), createBlock(_component_a_select, mergeProps({
3493
+ key: 1,
3494
+ class: "form-field-select",
3495
+ value: props.modelValue,
3496
+ onChange,
3497
+ options: fieldOptions.value,
3498
+ "filter-option": filterOption,
3499
+ "allow-clear": "",
3500
+ "show-search": "",
3501
+ placeholder: _ctx.$t("sys.chooseText"),
3502
+ mode: props.multiple ? "multiple" : void 0
3503
+ }, _ctx.$attrs), null, 16, ["value", "options", "placeholder", "mode"]));
3504
+ };
3505
+ }
3506
+ });
3507
+ const FormFieldSelect = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-4bfc82a8"]]);
3508
+ const _hoisted_1$4 = {
3509
+ class: /* @__PURE__ */ normalizeClass(["parse-rule-modal__content"])
3510
+ };
3511
+ const _hoisted_2$2 = {
3512
+ key: 0,
3513
+ class: "mb12px"
3514
+ };
3515
+ const _hoisted_3$1 = { class: "parse-rule-modal__subtitle" };
3516
+ const _hoisted_4$1 = { class: "parse-rule-modal__map" };
3517
+ const _hoisted_5$1 = { class: "parse-rule-modal__actions" };
3518
+ const _hoisted_6$1 = ["onClick", "title"];
3519
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3520
+ __name: "parse-rule-modal",
3521
+ props: {
3522
+ modal: {},
3523
+ config: {},
3524
+ subModelKey: {},
3525
+ formModelController: {},
3526
+ ruleTip: {}
3527
+ },
3528
+ setup(__props) {
3529
+ const props = __props;
3530
+ const modalOptions = reactive({
3531
+ title: (props.config ? $t("sys.edit") : $t("sys.add")) + $t("sys.onlineForm.barcodeParsing"),
3532
+ width: 800
3533
+ });
3534
+ useFormModel().provideController(props.formModelController);
3535
+ const formRef = ref$1();
3536
+ const formState = reactive(cloneDeep(props.config) || {});
3537
+ const ruleFieldOptions = ref$1([]);
3538
+ const initRuleFieldOptions = async (id) => {
3539
+ if (!id) {
3540
+ ruleFieldOptions.value = [];
3541
+ return;
3542
+ }
3543
+ const config = await getParseRuleConfig(id);
3544
+ if (!config) {
3545
+ ruleFieldOptions.value = [];
3546
+ return;
3547
+ }
3548
+ ruleFieldOptions.value = config.fieldList.map((field) => {
3549
+ return {
3550
+ label: field.alias ?? $t(`sys.edhr.labelConfigFields.${field.type}`),
3551
+ value: field.key
3552
+ };
3553
+ });
3554
+ };
3555
+ const onRuleChange = (rule) => {
3556
+ if (rule === formState.parsingRuleId) {
3557
+ return;
3558
+ }
3559
+ formState.parsingRuleId = rule;
3560
+ formState.fillMapArr = [];
3561
+ initRuleFieldOptions(rule);
3562
+ };
3563
+ const addFieldMap = () => {
3564
+ if (!formState.fillMapArr) {
3565
+ formState.fillMapArr = [];
3566
+ }
3567
+ formState.fillMapArr.push({});
3568
+ };
3569
+ const removeField = (index) => {
3570
+ formState.fillMapArr?.splice(index, 1);
3571
+ };
3572
+ onMounted(() => {
3573
+ initRuleFieldOptions(formState.parsingRuleId);
3574
+ });
3575
+ function isEmpty() {
3576
+ return !formState.parsingRuleId && formState.fillMapArr?.length === 0;
3577
+ }
3578
+ const doOk = async () => {
3579
+ await formRef.value.validate();
3580
+ console.log($t("sys.appDesigner.ok"));
3581
+ return {
3582
+ ok: true,
3583
+ data: isEmpty() ? void 0 : cloneDeep(toRaw(formState))
3584
+ };
3585
+ };
3586
+ return (_ctx, _cache) => {
3587
+ const _component_a_form_item = resolveComponent("a-form-item");
3588
+ const _component_a_alert = resolveComponent("a-alert");
3589
+ const _component_a_select = resolveComponent("a-select");
3590
+ const _component_a_button = resolveComponent("a-button");
3591
+ const _component_a_form = resolveComponent("a-form");
3592
+ return openBlock(), createBlock(unref(ModalWrapper), {
3593
+ opts: modalOptions,
3594
+ class: normalizeClass(["parse-rule-modal"]),
3595
+ "do-ok": doOk
3596
+ }, {
3597
+ default: withCtx(() => [
3598
+ createElementVNode("div", _hoisted_1$4, [
3599
+ createVNode(_component_a_form_item, {
3600
+ class: "parse-rule-modal__rule w-425px",
3601
+ label: _ctx.$t("sys.edhr.mcTable.parseRule") + ":",
3602
+ name: "parsingRuleId"
3603
+ }, {
3604
+ default: withCtx(() => [
3605
+ createVNode(_sfc_main$7, {
3606
+ "model-value": formState.parsingRuleId,
3607
+ "onUpdate:modelValue": onRuleChange,
3608
+ modelKey: "em_barcode_parsing_rules"
3609
+ }, null, 8, ["model-value"])
3610
+ ]),
3611
+ _: 1
3612
+ }, 8, ["label"]),
3613
+ __props.ruleTip ? (openBlock(), createElementBlock("div", _hoisted_2$2, [
3614
+ createVNode(_component_a_alert, {
3615
+ message: __props.ruleTip,
3616
+ type: "info",
3617
+ "show-icon": ""
3618
+ }, null, 8, ["message"])
3619
+ ])) : createCommentVNode("", true),
3620
+ createElementVNode("div", _hoisted_3$1, toDisplayString(_ctx.$t("sys.onlineForm.fieldMapping")), 1),
3621
+ createElementVNode("div", _hoisted_4$1, [
3622
+ createVNode(_component_a_form, {
3623
+ ref_key: "formRef",
3624
+ ref: formRef,
3625
+ model: formState,
3626
+ layout: "vertical"
3627
+ }, {
3628
+ default: withCtx(() => [
3629
+ (openBlock(true), createElementBlock(Fragment, null, renderList(formState.fillMapArr, (item, i) => {
3630
+ return openBlock(), createElementBlock("div", {
3631
+ class: "parse-rule-modal__row",
3632
+ key: i
3633
+ }, [
3634
+ createVNode(_component_a_form_item, {
3635
+ class: "parse-rule-modal__barcodeField",
3636
+ name: ["fillMapArr", i, "barcodeField"],
3637
+ inline: false,
3638
+ required: "",
3639
+ label: _ctx.$t("sys.onlineForm.barcodeField")
3640
+ }, {
3641
+ default: withCtx(() => [
3642
+ createVNode(_component_a_select, {
3643
+ value: item.barcodeField,
3644
+ "onUpdate:value": ($event) => item.barcodeField = $event,
3645
+ placeholder: _ctx.$t("sys.chooseText"),
3646
+ options: ruleFieldOptions.value
3647
+ }, null, 8, ["value", "onUpdate:value", "placeholder", "options"])
3648
+ ]),
3649
+ _: 2
3650
+ }, 1032, ["name", "label"]),
3651
+ _cache[0] || (_cache[0] = createElementVNode("div", { class: "parse-rule-modal__divider" }, [
3652
+ createElementVNode("i", { class: "gct-iconfont icon-lianjie" })
3653
+ ], -1)),
3654
+ createVNode(_component_a_form_item, {
3655
+ class: "parse-rule-modal__formFields",
3656
+ name: ["fillMapArr", i, "formFields"],
3657
+ inline: false,
3658
+ required: "",
3659
+ label: _ctx.$t("sys.onlineForm.formFields")
3660
+ }, {
3661
+ default: withCtx(() => [
3662
+ createVNode(unref(FormFieldSelect), {
3663
+ subModelKey: __props.subModelKey,
3664
+ multiple: true,
3665
+ modelValue: item.formFields,
3666
+ "onUpdate:modelValue": ($event) => item.formFields = $event
3667
+ }, null, 8, ["subModelKey", "modelValue", "onUpdate:modelValue"])
3668
+ ]),
3669
+ _: 2
3670
+ }, 1032, ["name", "label"]),
3671
+ createElementVNode("div", _hoisted_5$1, [
3672
+ createElementVNode("i", {
3673
+ onClick: ($event) => removeField(i),
3674
+ class: "parse-rule-modal__remove-btn iconfont icon-shanchu1",
3675
+ title: _ctx.$t("sys.delete")
3676
+ }, null, 8, _hoisted_6$1)
3677
+ ])
3678
+ ]);
3679
+ }), 128)),
3680
+ createVNode(_component_a_button, {
3681
+ class: "parse-rule-modal__add-btn",
3682
+ type: "link",
3683
+ onClick: addFieldMap
3684
+ }, {
3685
+ default: withCtx(() => [
3686
+ _cache[1] || (_cache[1] = createElementVNode("i", { class: "iconfont icon-tianjia" }, null, -1)),
3687
+ createTextVNode(" " + toDisplayString(_ctx.$t("sys.onlineForm.addFieldMapping")), 1)
3688
+ ]),
3689
+ _: 1
3690
+ })
3691
+ ]),
3692
+ _: 1
3693
+ }, 8, ["model"])
3694
+ ])
3695
+ ])
3696
+ ]),
3697
+ _: 1
3698
+ }, 8, ["opts"]);
3699
+ };
3700
+ }
3701
+ });
3702
+ const ParseRuleModal = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-0257ff99"]]);
3703
+ const IconScan = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_401_32653)'%3e%3cpath%20d='M8.41026%205.53845H6.03849C5.76236%205.53845%205.5385%205.7623%205.5385%206.03844L5.53847%207.26153V8.41025'%20stroke='%231A1D23'%20stroke-width='1.5'%20stroke-linecap='square'/%3e%3cpath%20d='M8.41026%2018.4615H6.03849C5.76236%2018.4615%205.5385%2018.2377%205.5385%2017.9616L5.53847%2016.7385V15.5898'%20stroke='%231A1D23'%20stroke-width='1.5'%20stroke-linecap='square'/%3e%3cpath%20d='M15.5897%205.53845H17.9615C18.2376%205.53845%2018.4615%205.76231%2018.4615%206.03845L18.4615%208.41025'%20stroke='%231A1D23'%20stroke-width='1.5'%20stroke-linecap='square'/%3e%3cpath%20d='M15.5897%2018.4615H17.9615C18.2376%2018.4615%2018.4615%2018.2377%2018.4615%2017.9616L18.4615%2016.7385V15.5898'%20stroke='%231A1D23'%20stroke-width='1.5'%20stroke-linecap='square'/%3e%3cpath%20d='M23.8461%2012H0.153809'%20stroke='url(%23paint0_linear_401_32653)'%20stroke-width='2'%20stroke-linecap='square'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_401_32653'%20x1='0.153809'%20y1='12.5'%20x2='23.8461'%20y2='12.5'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23026AC8'%20stop-opacity='0'/%3e%3cstop%20offset='0.5'%20stop-color='%23026AC8'/%3e%3cstop%20offset='1'%20stop-color='%23026AC8'%20stop-opacity='0'/%3e%3c/linearGradient%3e%3cclipPath%20id='clip0_401_32653'%3e%3crect%20width='24'%20height='24'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";
3704
+ const _hoisted_1$3 = {
3705
+ class: /* @__PURE__ */ normalizeClass(["scan-modal__content"])
3706
+ };
3707
+ const _hoisted_2$1 = ["src"];
3708
+ const _hoisted_3 = { class: "ks-row items-center gap-24px" };
3709
+ const _hoisted_4 = { class: "ks-col" };
3710
+ const _hoisted_5 = { class: "scan-modal__subtitle" };
3711
+ const _hoisted_6 = {
3712
+ key: 0,
3713
+ class: "mb12px"
3714
+ };
3715
+ const _hoisted_7 = { class: "scan-modal__map" };
3716
+ const _hoisted_8 = {
3717
+ key: 0,
3718
+ class: "scan-modal__row scan-modal__row--header"
3719
+ };
3720
+ const _hoisted_9 = { class: "scan-modal__barcodeField scan-modal__col-label is-required" };
3721
+ const _hoisted_10 = { class: "scan-modal__formFields scan-modal__col-label is-required" };
3722
+ const _hoisted_11 = { class: "scan-modal__row--content" };
3723
+ const _hoisted_12 = { class: "scan-modal__actions" };
3724
+ const _hoisted_13 = ["onClick", "title"];
3725
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3726
+ __name: "scan-modal",
3727
+ props: {
3728
+ modal: {},
3729
+ title: {},
3730
+ subModelKey: {},
3731
+ scanParam: {},
3732
+ scanRules: {},
3733
+ onScan: { type: Function },
3734
+ formModelController: {},
3735
+ ruleTip: {}
3736
+ },
3737
+ setup(__props) {
3738
+ const modalOptions = reactive({
3739
+ width: 460,
3740
+ draggable: true,
3741
+ showFooter: false,
3742
+ canFullscreen: false,
3743
+ wrapClassName: "gct-draggable-modal",
3744
+ mask: false,
3745
+ maskClosable: false
3746
+ });
3747
+ const props = __props;
3748
+ const formState = ref$1({
3749
+ parsingRuleId: props.scanRules?.parsingRuleId,
3750
+ fillMapArr: props.scanRules?.fillMapArr
3751
+ });
3752
+ const controller = useFormModel().provideController(props.formModelController);
3753
+ const modelReady = ref$1(!!controller.masterModel);
3754
+ const scanRuleInfo = ref$1();
3755
+ const configExpanded = ref$1(false);
3756
+ onMounted(async () => {
3757
+ if (!controller.masterModel && props.subModelKey) {
3758
+ await controller.init({ model: props.subModelKey });
3759
+ }
3760
+ modelReady.value = !!controller.masterModel;
3761
+ if (formState.value.parsingRuleId) {
3762
+ initRuleFieldOptions(formState.value.parsingRuleId);
3763
+ scanRuleInfo.value = await getParseRuleConfig(formState.value.parsingRuleId);
3764
+ }
3765
+ });
3766
+ const ruleFieldOptions = ref$1([]);
3767
+ const onEnter = (...args) => {
3768
+ console.log("onEnter", args, formState.value);
3769
+ let parsedValue, transformedData;
3770
+ const fillMaps = formState.value.fillMapArr;
3771
+ if (scanRuleInfo.value) {
3772
+ parsedValue = getParseRuleValue(formState.value.str, JSON.stringify(scanRuleInfo.value));
3773
+ } else if (props.scanParam) {
3774
+ parsedValue = { [props.scanParam]: formState.value.str };
3775
+ }
3776
+ if (fillMaps?.length) transformedData = calcFillData(parsedValue, fillMaps);
3777
+ props.onScan({ str: formState.value.str, parsedValue, transformedData });
3778
+ formState.value.str = "";
3779
+ };
3780
+ const initRuleFieldOptions = async (id) => {
3781
+ if (!id) {
3782
+ ruleFieldOptions.value = [];
3783
+ return;
3784
+ }
3785
+ const config = await getParseRuleConfig(id);
3786
+ if (!config) {
3787
+ ruleFieldOptions.value = [];
3788
+ return;
3789
+ }
3790
+ scanRuleInfo.value = config;
3791
+ ruleFieldOptions.value = config.fieldList.map((field) => {
3792
+ return {
3793
+ label: field.alias ?? $t(`sys.edhr.labelConfigFields.${field.type}`),
3794
+ value: field.key
3795
+ };
3796
+ });
3797
+ };
3798
+ const onRuleChange = (rule) => {
3799
+ if (rule === formState.value.parsingRuleId) {
3800
+ return;
3801
+ }
3802
+ formState.value.parsingRuleId = rule;
3803
+ formState.value.fillMapArr = [];
3804
+ initRuleFieldOptions(rule);
3805
+ };
3806
+ const addFieldMap = () => {
3807
+ if (!formState.value.fillMapArr) {
3808
+ formState.value.fillMapArr = [];
3809
+ }
3810
+ formState.value.fillMapArr.push({});
3811
+ };
3812
+ const removeField = (index) => {
3813
+ formState.value.fillMapArr?.splice(index, 1);
3814
+ };
3815
+ return (_ctx, _cache) => {
3816
+ const _component_a_input = resolveComponent("a-input");
3817
+ const _component_a_form_item = resolveComponent("a-form-item");
3818
+ const _component_a_divider = resolveComponent("a-divider");
3819
+ const _component_a_alert = resolveComponent("a-alert");
3820
+ const _component_a_select = resolveComponent("a-select");
3821
+ const _component_a_button = resolveComponent("a-button");
3822
+ const _component_a_form = resolveComponent("a-form");
3823
+ return openBlock(), createBlock(unref(ModalWrapper), {
3824
+ opts: modalOptions,
3825
+ class: normalizeClass(["scan-modal"])
3826
+ }, {
3827
+ default: withCtx(() => [
3828
+ createElementVNode("div", _hoisted_1$3, [
3829
+ createVNode(_component_a_form_item, {
3830
+ required: "",
3831
+ label: __props.title || _ctx.$t("sys.edhr.materialNo"),
3832
+ class: "scan-form-item"
3833
+ }, {
3834
+ default: withCtx(() => [
3835
+ createVNode(_component_a_input, {
3836
+ value: formState.value.str,
3837
+ "onUpdate:value": _cache[0] || (_cache[0] = ($event) => formState.value.str = $event),
3838
+ size: "large",
3839
+ onKeyup: withKeys(onEnter, ["enter"])
3840
+ }, {
3841
+ prefix: withCtx(() => [
3842
+ createElementVNode("img", {
3843
+ src: unref(IconScan),
3844
+ width: "24",
3845
+ height: "24"
3846
+ }, null, 8, _hoisted_2$1)
3847
+ ]),
3848
+ _: 1
3849
+ }, 8, ["value"])
3850
+ ]),
3851
+ _: 1
3852
+ }, 8, ["label"]),
3853
+ createVNode(_component_a_divider, { style: { "width": "calc(100% + 48px)", "margin": "28px 0 16px -24px" } }),
3854
+ createElementVNode("div", _hoisted_3, [
3855
+ createElementVNode("div", _hoisted_4, [
3856
+ createVNode(_component_a_form_item, {
3857
+ class: "scan-modal__rule",
3858
+ label: _ctx.$t("sys.edhr.mcTable.parseRule") + ":",
3859
+ name: "parsingRuleId"
3860
+ }, {
3861
+ default: withCtx(() => [
3862
+ createVNode(_sfc_main$7, {
3863
+ "model-value": formState.value.parsingRuleId,
3864
+ "onUpdate:modelValue": onRuleChange,
3865
+ modelKey: "em_barcode_parsing_rules"
3866
+ }, null, 8, ["model-value"])
3867
+ ]),
3868
+ _: 1
3869
+ }, 8, ["label"])
3870
+ ]),
3871
+ createElementVNode("div", {
3872
+ class: "primary-gct cursor-pointer whitespace-nowrap",
3873
+ onClick: _cache[1] || (_cache[1] = ($event) => configExpanded.value = !configExpanded.value)
3874
+ }, [
3875
+ createTextVNode(toDisplayString(configExpanded.value ? _ctx.$t("sys.collapseConfig") : _ctx.$t("sys.expandConfig")) + " ", 1),
3876
+ createElementVNode("i", {
3877
+ class: normalizeClass(["iconfont ml4px", configExpanded.value ? "icon-arrow_up_pad" : "icon-arrow_down_pad"])
3878
+ }, null, 2)
3879
+ ])
3880
+ ]),
3881
+ withDirectives(createElementVNode("div", null, [
3882
+ createElementVNode("div", _hoisted_5, toDisplayString(_ctx.$t("sys.onlineForm.fieldMapping")), 1),
3883
+ __props.ruleTip ? (openBlock(), createElementBlock("div", _hoisted_6, [
3884
+ createVNode(_component_a_alert, {
3885
+ message: __props.ruleTip,
3886
+ type: "info",
3887
+ "show-icon": ""
3888
+ }, null, 8, ["message"])
3889
+ ])) : createCommentVNode("", true),
3890
+ createElementVNode("div", _hoisted_7, [
3891
+ createVNode(_component_a_form, {
3892
+ ref: "formRef",
3893
+ model: formState.value,
3894
+ layout: "vertical"
3895
+ }, {
3896
+ default: withCtx(() => [
3897
+ formState.value.fillMapArr?.length ? (openBlock(), createElementBlock("div", _hoisted_8, [
3898
+ createElementVNode("div", _hoisted_9, toDisplayString(_ctx.$t("sys.onlineForm.barcodeField")), 1),
3899
+ createElementVNode("div", _hoisted_10, toDisplayString(_ctx.$t("sys.onlineForm.formFields")), 1)
3900
+ ])) : createCommentVNode("", true),
3901
+ createElementVNode("div", _hoisted_11, [
3902
+ (openBlock(true), createElementBlock(Fragment, null, renderList(formState.value.fillMapArr, (item, i) => {
3903
+ return openBlock(), createElementBlock("div", {
3904
+ class: "scan-modal__row",
3905
+ key: i
3906
+ }, [
3907
+ createVNode(_component_a_form_item, {
3908
+ class: "scan-modal__barcodeField",
3909
+ name: ["fillMapArr", i, "barcodeField"],
3910
+ rules: [{ required: true, message: _ctx.$t("sys.chooseText") }]
3911
+ }, {
3912
+ default: withCtx(() => [
3913
+ createVNode(_component_a_select, {
3914
+ value: item.barcodeField,
3915
+ "onUpdate:value": ($event) => item.barcodeField = $event,
3916
+ placeholder: _ctx.$t("sys.chooseText"),
3917
+ options: ruleFieldOptions.value
3918
+ }, null, 8, ["value", "onUpdate:value", "placeholder", "options"])
3919
+ ]),
3920
+ _: 2
3921
+ }, 1032, ["name", "rules"]),
3922
+ _cache[2] || (_cache[2] = createElementVNode("div", { class: "scan-modal__divider" }, [
3923
+ createElementVNode("i", { class: "gct-iconfont icon-lianjie text-[#8B8B8B] text-12px" })
3924
+ ], -1)),
3925
+ createVNode(_component_a_form_item, {
3926
+ class: "scan-modal__formFields",
3927
+ name: ["fillMapArr", i, "formFields"],
3928
+ rules: [{ required: true, message: _ctx.$t("sys.chooseText") }]
3929
+ }, {
3930
+ default: withCtx(() => [
3931
+ modelReady.value ? (openBlock(), createBlock(unref(FormFieldSelect), {
3932
+ key: 0,
3933
+ subModelKey: __props.subModelKey,
3934
+ multiple: true,
3935
+ modelValue: item.formFields,
3936
+ "onUpdate:modelValue": ($event) => item.formFields = $event
3937
+ }, null, 8, ["subModelKey", "modelValue", "onUpdate:modelValue"])) : createCommentVNode("", true)
3938
+ ]),
3939
+ _: 2
3940
+ }, 1032, ["name", "rules"]),
3941
+ createElementVNode("div", _hoisted_12, [
3942
+ createElementVNode("i", {
3943
+ onClick: ($event) => removeField(i),
3944
+ class: "scan-modal__remove-btn iconfont icon-shanchu1 text-[#8B8B8B]",
3945
+ title: _ctx.$t("sys.delete")
3946
+ }, null, 8, _hoisted_13)
3947
+ ])
3948
+ ]);
3949
+ }), 128))
3950
+ ]),
3951
+ createVNode(_component_a_button, {
3952
+ class: "scan-modal__add-btn",
3953
+ type: "link",
3954
+ onClick: addFieldMap
3955
+ }, {
3956
+ default: withCtx(() => [
3957
+ _cache[3] || (_cache[3] = createElementVNode("i", { class: "iconfont icon-tianjia" }, null, -1)),
3958
+ createTextVNode(" " + toDisplayString(_ctx.$t("sys.onlineForm.addFieldMapping")), 1)
3959
+ ]),
3960
+ _: 1
3961
+ })
3962
+ ]),
3963
+ _: 1
3964
+ }, 8, ["model"])
3965
+ ])
3966
+ ], 512), [
3967
+ [vShow, configExpanded.value]
3968
+ ])
3969
+ ])
3970
+ ]),
3971
+ _: 1
3972
+ }, 8, ["opts"]);
3973
+ };
3974
+ }
3975
+ });
3976
+ const ScanModal$1 = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-c02eb83e"]]);
3977
+ class SubTableRender {
3978
+ modalManager = new ModalManager();
3979
+ openScanModal(opts) {
3980
+ return this.modalManager.openModal(
3981
+ ScanModal$1,
3982
+ {
3983
+ onScan: opts.onScan,
3984
+ subModelKey: opts.subModelKey,
3985
+ formModelController: opts.formModelController,
3986
+ scanRules: opts.scanRules,
3987
+ scanParam: opts.scanParam
3988
+ },
3989
+ { title: opts.title, mask: false, draggable: true }
3990
+ );
3991
+ }
3992
+ openChangeRuleModal = async (params) => {
3993
+ const res = await this.modalManager.openModal(ParseRuleModal, {
3994
+ ...params
3995
+ // ruleTip: $t('sys.edhr.mcTable.scanRuleTip'),
3996
+ });
3997
+ if (res.ok && res.data) {
3998
+ return res.data;
3999
+ }
4000
+ };
4001
+ destroyAllModals() {
4002
+ this.modalManager.destroyAllModals();
4003
+ }
4004
+ }
4005
+ class AllocateWebRender extends SubTableRender {
4006
+ }
4007
+ const _hoisted_1$2 = { class: "p24px" };
4008
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
4009
+ __name: "material-consume-modal",
4010
+ props: {
4011
+ modal: {},
4012
+ data: {}
4013
+ },
4014
+ setup(__props) {
4015
+ const modalOptions = reactive({
4016
+ width: 450,
4017
+ draggable: true,
4018
+ showFooter: false,
4019
+ canFullscreen: false,
4020
+ mask: false,
4021
+ title: $t("sys.edhr.materialConsume"),
4022
+ wrapClassName: "gct-draggable-modal"
4023
+ });
4024
+ const props = __props;
4025
+ const columns = [
4026
+ {
4027
+ title: $t("sys.model.product"),
4028
+ dataIndex: "product_id_label",
4029
+ key: "product_id_label",
4030
+ ellipsis: true
4031
+ },
4032
+ {
4033
+ title: $t("sys.pageDesigner.fieldCmp.qty_consumed"),
4034
+ dataIndex: "consume_qty_",
4035
+ key: "consume_qty_",
4036
+ width: 150,
4037
+ ellipsis: true
4038
+ }
4039
+ ];
4040
+ const tableData = toRef(() => props.data);
4041
+ return (_ctx, _cache) => {
4042
+ const _component_a_table = resolveComponent("a-table");
4043
+ return openBlock(), createBlock(unref(ModalWrapper), {
4044
+ opts: modalOptions,
4045
+ class: normalizeClass(["material-consume-modal"])
4046
+ }, {
4047
+ default: withCtx(() => [
4048
+ createElementVNode("div", _hoisted_1$2, [
4049
+ createVNode(_component_a_table, {
4050
+ columns,
4051
+ "data-source": tableData.value,
4052
+ bordered: "",
4053
+ pagination: false,
4054
+ size: "middle",
4055
+ scroll: {
4056
+ y: "500px"
4057
+ }
4058
+ }, null, 8, ["data-source"])
4059
+ ])
4060
+ ]),
4061
+ _: 1
4062
+ }, 8, ["opts"]);
4063
+ };
4064
+ }
4065
+ });
4066
+ class MbWebRender extends MBRender {
4067
+ /**
4068
+ * 所有打开的modal集合
4069
+ */
4070
+ modalHtml;
4071
+ async openConsumeModal(data) {
4072
+ if (this.modalHtml) {
4073
+ return;
4074
+ }
4075
+ this.modalHtml = window.NocodeAdapter.utils.overlay.createModal(
4076
+ _sfc_main$3,
4077
+ {
4078
+ data
4079
+ },
4080
+ {
4081
+ width: 640,
4082
+ draggable: true,
4083
+ showFooter: false,
4084
+ canFullscreen: false,
4085
+ mask: false,
4086
+ title: $t("sys.edhr.materialConsume"),
4087
+ wrapClassName: "gct-draggable-modal"
4088
+ }
4089
+ );
4090
+ await this.modalHtml.present();
4091
+ await this.modalHtml.onWillDismiss();
4092
+ this.modalHtml = null;
4093
+ }
4094
+ destoryConsumeModal() {
4095
+ if (this.modalHtml) {
4096
+ this.modalHtml.dismiss();
4097
+ this.modalHtml = null;
4098
+ }
4099
+ }
4100
+ }
4101
+ const _hoisted_1$1 = {
4102
+ class: /* @__PURE__ */ normalizeClass(["bom-modal__content"])
4103
+ };
4104
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
4105
+ __name: "bom-modal",
4106
+ props: {
4107
+ modal: {},
4108
+ opts: {}
4109
+ },
4110
+ setup(__props) {
4111
+ const modalOptions = reactive({
4112
+ width: 640,
4113
+ draggable: true,
4114
+ showFooter: false,
4115
+ canFullscreen: false,
4116
+ mask: false,
4117
+ title: $t("sys.edhr.mcTable.bomMessageTable"),
4118
+ wrapClassName: "gct-draggable-modal"
4119
+ });
4120
+ const props = __props;
4121
+ const refreshKey = ref$1(uuid2(32));
4122
+ const tableData = ref$1([]);
4123
+ watchEffect(() => {
4124
+ if (props.opts.bomList) {
4125
+ const calcCode = (code, version) => {
4126
+ return code + ":" + version;
4127
+ };
4128
+ tableData.value = props.opts.bomList.map((i) => {
4129
+ const cloneData = cloneDeep(i);
4130
+ cloneData.versionCode = calcCode(cloneData.product_code_, cloneData.product_version_);
4131
+ if (!cloneData.substitute_material_enabled_) {
4132
+ cloneData.substitute_material_entries_ = [];
4133
+ } else {
4134
+ cloneData.substitute_material_entries_.forEach((i2) => {
4135
+ i2.qty_required_ = cloneData.qty_required_;
4136
+ i2.versionCode = calcCode(i2.product_code_, i2.product_version_);
4137
+ });
4138
+ }
4139
+ return cloneData;
4140
+ });
4141
+ }
4142
+ refreshKey.value = uuid2(32);
4143
+ });
4144
+ const gridOptions = reactive({
4145
+ round: true,
4146
+ maxHeight: 500,
4147
+ rowConfig: {
4148
+ resizable: true
4149
+ },
4150
+ treeConfig: {
4151
+ rowField: "id_",
4152
+ childrenField: "substitute_material_entries_",
4153
+ expandAll: true
4154
+ },
4155
+ columns: [
4156
+ {
4157
+ field: "versionCode",
4158
+ title: $t("sys.model.product") + $t("sys.edhr.field.code"),
4159
+ showOverflow: "tooltip",
4160
+ treeNode: true
4161
+ },
4162
+ {
4163
+ field: "product_name_",
4164
+ title: $t("sys.model.product") + $t("sys.name"),
4165
+ showOverflow: "tooltip"
4166
+ },
4167
+ {
4168
+ field: "product_spec_",
4169
+ title: $t("sys.edhr.spec")
4170
+ },
4171
+ {
4172
+ field: "qty_required_",
4173
+ title: $t("sys.edhr.unitQty"),
4174
+ width: 100
4175
+ }
4176
+ ]
4177
+ });
4178
+ return (_ctx, _cache) => {
4179
+ const _component_vxe_grid = resolveComponent("vxe-grid");
4180
+ return openBlock(), createBlock(unref(ModalWrapper), {
4181
+ opts: modalOptions,
4182
+ class: normalizeClass(["bom-modal"])
4183
+ }, {
4184
+ default: withCtx(() => [
4185
+ createElementVNode("div", _hoisted_1$1, [
4186
+ (openBlock(), createBlock(_component_vxe_grid, mergeProps({
4187
+ key: refreshKey.value,
4188
+ class: "device-table__grid default vxetable",
4189
+ data: tableData.value
4190
+ }, gridOptions), null, 16, ["data"]))
4191
+ ])
4192
+ ]),
4193
+ _: 1
4194
+ }, 8, ["opts"]);
4195
+ };
4196
+ }
4197
+ });
4198
+ const BomModal = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-2a48426e"]]);
4199
+ class McWebRender extends MCRender {
4200
+ /**
4201
+ * 所有打开的modal集合
4202
+ */
4203
+ modals = [];
4204
+ async handleModal(modal) {
4205
+ this.modals.push(modal);
4206
+ await modal.present();
4207
+ await modal.onWillDismiss();
4208
+ this.modals = this.modals.filter((item) => item !== modal);
4209
+ }
4210
+ destroyAllModals() {
4211
+ for (const modal of this.modals) {
4212
+ modal.dismiss();
4213
+ }
4214
+ this.modals = [];
4215
+ }
4216
+ message(opts) {
4217
+ message.open(opts);
4218
+ }
4219
+ async _openBomModal(opts) {
4220
+ const modal = window.NocodeAdapter.utils.overlay.createModal(
4221
+ BomModal,
4222
+ {
4223
+ opts
4224
+ },
4225
+ { mask: false }
4226
+ );
4227
+ await this.handleModal(modal);
4228
+ }
4229
+ async openScanModal(opts) {
4230
+ const modal = window.NocodeAdapter.utils.overlay.createModal(
4231
+ ScanModal$1,
4232
+ {
4233
+ ...opts,
4234
+ ruleTip: $t("sys.scanRuleTip")
4235
+ },
4236
+ { title: opts.title, mask: false }
4237
+ );
4238
+ await this.handleModal(modal);
4239
+ }
4240
+ async openChangeRuleModal(opts) {
4241
+ const res = await window.NocodeAdapter.utils.overlay.modal(ParseRuleModal, {
4242
+ ...opts,
4243
+ ruleTip: $t("sys.edhr.mcTable.scanRuleTip")
4244
+ });
4245
+ if (res.ok && res.data) {
4246
+ return res.data;
4247
+ }
4248
+ }
4249
+ }
4250
+ const _hoisted_1 = { class: "pt20px px16px pb20px" };
4251
+ const _hoisted_2 = { class: "bg-radio" };
4252
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
4253
+ __name: "scan-modal",
4254
+ props: {
4255
+ onScan: { type: Function }
4256
+ },
4257
+ setup(__props) {
4258
+ const props = __props;
4259
+ const barcode = ref$1();
4260
+ const activeType = ref$1("add");
4261
+ function changeCalculation(type2) {
4262
+ activeType.value = type2;
4263
+ }
4264
+ async function handleEnter(e) {
4265
+ console.log("handleEnter", e, barcode.value);
4266
+ if (barcode.value?.trim()) {
4267
+ await props.onScan({ barcode: barcode.value, type: activeType.value });
4268
+ barcode.value = void 0;
4269
+ }
4270
+ }
4271
+ return (_ctx, _cache) => {
4272
+ const _component_a_input = resolveComponent("a-input");
4273
+ const _component_a_form_item = resolveComponent("a-form-item");
4274
+ const _component_a_form = resolveComponent("a-form");
4275
+ return openBlock(), createElementBlock("div", _hoisted_1, [
4276
+ createElementVNode("div", _hoisted_2, [
4277
+ createElementVNode("div", {
4278
+ class: normalizeClass(["bg-radio-item", [activeType.value === "add" && "active"]]),
4279
+ onClick: _cache[0] || (_cache[0] = ($event) => changeCalculation("add"))
4280
+ }, [
4281
+ _cache[3] || (_cache[3] = createElementVNode("i", { class: "iconfont icon-chuangjian" }, null, -1)),
4282
+ createTextVNode(" " + toDisplayString(_ctx.$t("sys.edhr.addStocktakeNum")), 1)
4283
+ ], 2),
4284
+ createElementVNode("div", {
4285
+ class: normalizeClass(["bg-radio-item", [activeType.value === "minus" && "active"]]),
4286
+ onClick: _cache[1] || (_cache[1] = ($event) => changeCalculation("minus"))
4287
+ }, [
4288
+ _cache[4] || (_cache[4] = createElementVNode("i", { class: "iconfont icon-jiantouxia_arrow-down" }, null, -1)),
4289
+ createTextVNode(" " + toDisplayString(_ctx.$t("sys.edhr.plusStocktakeNum")), 1)
4290
+ ], 2)
4291
+ ]),
4292
+ createVNode(_component_a_form, { class: "mt20px" }, {
4293
+ default: withCtx(() => [
4294
+ createVNode(_component_a_form_item, {
4295
+ label: _ctx.$t("sys.edhr.materialNo2"),
4296
+ rules: [{ required: true }]
4297
+ }, {
4298
+ default: withCtx(() => [
4299
+ createVNode(_component_a_input, {
4300
+ value: barcode.value,
4301
+ "onUpdate:value": _cache[2] || (_cache[2] = ($event) => barcode.value = $event),
4302
+ placeholder: _ctx.$t("sys.inputText"),
4303
+ allowClear: "",
4304
+ onPressEnter: handleEnter
4305
+ }, null, 8, ["value", "placeholder"])
4306
+ ]),
4307
+ _: 1
4308
+ }, 8, ["label"])
4309
+ ]),
4310
+ _: 1
4311
+ })
4312
+ ]);
4313
+ };
4314
+ }
4315
+ });
4316
+ const ScanModal = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-954013ba"]]);
4317
+ class StocktakeWebRender extends SubTableRender {
4318
+ openScanModal(opts) {
4319
+ return this.modalManager.openModal(
4320
+ ScanModal,
4321
+ {
4322
+ onScan: opts.onScan
4323
+ },
4324
+ {
4325
+ width: 400,
4326
+ draggable: true,
4327
+ showFooter: false,
4328
+ canFullscreen: false,
4329
+ mask: false,
4330
+ title: opts.title ?? $t("sys.onlineForm.subTableType.STOCKTAKE"),
4331
+ wrapClassName: "gct-draggable-modal"
4332
+ }
4333
+ );
4334
+ }
4335
+ }
4336
+ const _sfc_main = /* @__PURE__ */ defineComponent({
4337
+ __name: "add-rule-btn",
4338
+ props: {
4339
+ subModelKey: {},
4340
+ modelValue: { default: void 0 },
4341
+ ruleTip: { default: void 0 }
4342
+ },
4343
+ emits: ["update:modelValue"],
4344
+ setup(__props, { emit: __emit }) {
4345
+ const formModelController = useFormModel().injectController();
4346
+ const props = __props;
4347
+ const emit = __emit;
4348
+ const handleClick = async () => {
4349
+ const res = await window.NocodeAdapter.utils.overlay.modal(ParseRuleModal, {
4350
+ config: props.modelValue,
4351
+ subModelKey: props.subModelKey,
4352
+ formModelController,
4353
+ ruleTip: props.ruleTip
4354
+ });
4355
+ if (res.ok) {
4356
+ emit("update:modelValue", res.data);
4357
+ }
4358
+ };
4359
+ const btnAttrs = computed(() => {
4360
+ return props.modelValue ? { type: "primary", block: true } : { type: "primary", ghost: true };
4361
+ });
4362
+ onMounted(() => {
4363
+ if (props.modelValue && typeof props.modelValue === "string") {
4364
+ try {
4365
+ emit("update:modelValue", JSON.parse(props.modelValue));
4366
+ } catch (error) {
4367
+ emit("update:modelValue", void 0);
4368
+ }
4369
+ }
4370
+ });
4371
+ return (_ctx, _cache) => {
4372
+ const _component_a_button = resolveComponent("a-button");
4373
+ return openBlock(), createBlock(_component_a_button, mergeProps(btnAttrs.value, {
4374
+ onClick: handleClick,
4375
+ class: ["add-rule-btn", __props.modelValue ? "has-value" : ""]
4376
+ }), {
4377
+ default: withCtx(() => [
4378
+ createTextVNode(toDisplayString(__props.modelValue ? _ctx.$t("sys.pageDesigner.editRule") : _ctx.$t("sys.pageDesigner.addRule")), 1)
4379
+ ]),
4380
+ _: 1
4381
+ }, 16, ["class"]);
4382
+ };
4383
+ }
4384
+ });
4385
+ const AddRuleBtn = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e54d4754"]]);
4386
+ function initRenderToAdapter() {
4387
+ const adapter = window.NocodeAdapter;
4388
+ adapter.openUtil = new OpenUtilWeb();
4389
+ adapter.subTableRender = new SubTableRender();
4390
+ adapter.mcRender = new McWebRender();
4391
+ adapter.mbRender = new MbWebRender();
4392
+ adapter.stocktakeRender = new StocktakeWebRender();
4393
+ adapter.allocateRender = new AllocateWebRender();
4394
+ }
4395
+ function initWebNocodeAdapter() {
4396
+ initRenderToAdapter();
4397
+ }
4398
+ export {
4399
+ AddRuleBtn as A,
4400
+ BomModal as B,
4401
+ FormFieldSelect as F,
4402
+ ModalWrapper as M,
4403
+ ParseRuleModal as P,
4404
+ ScanModal$1 as S,
4405
+ Uploader as U,
4406
+ useEventListener as a,
4407
+ unrefElement as b,
4408
+ useWindowSize as c,
4409
+ defaultWindow as d,
4410
+ initWebNocodeAdapter as e,
4411
+ ScanModal as f,
4412
+ StocktakeWebRender as g,
4413
+ initRenderToAdapter as h,
4414
+ initWebPaasUploadApis as i,
4415
+ useIntersectionObserver as j,
4416
+ cacheAdapter as k,
4417
+ onClickOutside as o,
4418
+ require$$0 as r,
4419
+ useWebUpload as u
4420
+ };