@zjlab-fe/data-hub-ui 0.2.8 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +2 -1
package/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react/jsx-runtime";import*as t from"antd";import*as n from"react";import*as r from"@ant-design/icons";import*as a from"axios";import*as i from"jotai";import*as o from"jotai-scope";import*as l from"@zjlab-fe/util";import*as s from"react-json-view";import*as u from"copy-to-clipboard";import*as d from"classnames";var c={868:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(245),a=n.n(r),i=n(526),o=n.n(i)()(a());o.push([e.id,".zjlab-fe-data-hub-ui-default-drag-area {margin-bottom: 1.25rem;display: flex;flex-direction: column;align-items: center;justify-content: center;gap: 1rem;border-radius: 10px;border-width: 1px;border-style: dashed;border-color: rgb(23 117 254 / 0.4);padding-top: 1rem;padding-bottom: 1rem\n}.zjlab-fe-data-hub-ui-default-drag-area:hover {--tw-border-opacity: 1;border-color: rgb(23 117 254 / var(--tw-border-opacity))\n}",""]);const l=o},884:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(245),a=n.n(r),i=n(526),o=n.n(i)()(a());o.push([e.id,'@layer tailwind-base, antd;.zjlab-fe-data-hub-ui-file-uploader .absolute{\nposition: absolute;}.zjlab-fe-data-hub-ui-file-uploader .relative{\nposition: relative;}.zjlab-fe-data-hub-ui-file-uploader .right-0{\nright: 0px;}.zjlab-fe-data-hub-ui-file-uploader .m-0{\nmargin: 0px;}.zjlab-fe-data-hub-ui-file-uploader .my-2{\nmargin-top: 0.5rem;\nmargin-bottom: 0.5rem;}.zjlab-fe-data-hub-ui-file-uploader .my-2\\.5{\nmargin-top: 0.625rem;\nmargin-bottom: 0.625rem;}.zjlab-fe-data-hub-ui-file-uploader .my-4{\nmargin-top: 1rem;\nmargin-bottom: 1rem;}.zjlab-fe-data-hub-ui-file-uploader .mb-2{\nmargin-bottom: 0.5rem;}.zjlab-fe-data-hub-ui-file-uploader .mb-4{\nmargin-bottom: 1rem;}.zjlab-fe-data-hub-ui-file-uploader .mb-5{\nmargin-bottom: 1.25rem;}.zjlab-fe-data-hub-ui-file-uploader .mr-1{\nmargin-right: 0.25rem;}.zjlab-fe-data-hub-ui-file-uploader .mt-20{\nmargin-top: 5rem;}.zjlab-fe-data-hub-ui-file-uploader .mt-4{\nmargin-top: 1rem;}.zjlab-fe-data-hub-ui-file-uploader .flex{\ndisplay: flex;}.zjlab-fe-data-hub-ui-file-uploader .flow-root{\ndisplay: flow-root;}.zjlab-fe-data-hub-ui-file-uploader .hidden{\ndisplay: none;}.zjlab-fe-data-hub-ui-file-uploader .h-4{\nheight: 1rem;}.zjlab-fe-data-hub-ui-file-uploader .h-5{\nheight: 1.25rem;}.zjlab-fe-data-hub-ui-file-uploader .h-6{\nheight: 1.5rem;}.zjlab-fe-data-hub-ui-file-uploader .h-8{\nheight: 2rem;}.zjlab-fe-data-hub-ui-file-uploader .max-h-72{\nmax-height: 18rem;}.zjlab-fe-data-hub-ui-file-uploader .w-4{\nwidth: 1rem;}.zjlab-fe-data-hub-ui-file-uploader .w-40{\nwidth: 10rem;}.zjlab-fe-data-hub-ui-file-uploader .w-5{\nwidth: 1.25rem;}.zjlab-fe-data-hub-ui-file-uploader .w-6{\nwidth: 1.5rem;}.zjlab-fe-data-hub-ui-file-uploader .cursor-pointer{\ncursor: pointer;}.zjlab-fe-data-hub-ui-file-uploader .items-center{\nalign-items: center;}.zjlab-fe-data-hub-ui-file-uploader .justify-center{\njustify-content: center;}.zjlab-fe-data-hub-ui-file-uploader .justify-between{\njustify-content: space-between;}.zjlab-fe-data-hub-ui-file-uploader .gap-1{\ngap: 0.25rem;}.zjlab-fe-data-hub-ui-file-uploader .gap-4{\ngap: 1rem;}.zjlab-fe-data-hub-ui-file-uploader .overflow-y-auto{\noverflow-y: auto;}.zjlab-fe-data-hub-ui-file-uploader .truncate{\noverflow: hidden;\ntext-overflow: ellipsis;\nwhite-space: nowrap;}.zjlab-fe-data-hub-ui-file-uploader .rounded{\nborder-radius: 0.25rem;}.zjlab-fe-data-hub-ui-file-uploader .border{\nborder-width: 1px;}.zjlab-fe-data-hub-ui-file-uploader .border-solid{\nborder-style: solid;}.zjlab-fe-data-hub-ui-file-uploader .border-dashed{\nborder-style: dashed;}.zjlab-fe-data-hub-ui-file-uploader .border-\\[\\#1775FE\\]{\n--tw-border-opacity: 1;\nborder-color: rgb(23 117 254 / var(--tw-border-opacity));}.zjlab-fe-data-hub-ui-file-uploader .border-gray-3{\n--tw-border-opacity: 1;\nborder-color: rgb(217 224 237 / var(--tw-border-opacity));}.zjlab-fe-data-hub-ui-file-uploader .border-gray-300{\n--tw-border-opacity: 1;\nborder-color: rgb(209 213 219 / var(--tw-border-opacity));}.zjlab-fe-data-hub-ui-file-uploader .border-green-600{\n--tw-border-opacity: 1;\nborder-color: rgb(22 163 74 / var(--tw-border-opacity));}.zjlab-fe-data-hub-ui-file-uploader .bg-\\[\\#F5F7FA\\]{\n--tw-bg-opacity: 1;\nbackground-color: rgb(245 247 250 / var(--tw-bg-opacity));}.zjlab-fe-data-hub-ui-file-uploader .bg-gray-50{\n--tw-bg-opacity: 1;\nbackground-color: rgb(249 250 251 / var(--tw-bg-opacity));}.zjlab-fe-data-hub-ui-file-uploader .p-2{\npadding: 0.5rem;}.zjlab-fe-data-hub-ui-file-uploader .p-4{\npadding: 1rem;}.zjlab-fe-data-hub-ui-file-uploader .px-3{\npadding-left: 0.75rem;\npadding-right: 0.75rem;}.zjlab-fe-data-hub-ui-file-uploader .px-4{\npadding-left: 1rem;\npadding-right: 1rem;}.zjlab-fe-data-hub-ui-file-uploader .text-center{\ntext-align: center;}.zjlab-fe-data-hub-ui-file-uploader .text-2xl{\nfont-size: 1.5rem;\nline-height: 2rem;}.zjlab-fe-data-hub-ui-file-uploader .text-5xl{\nfont-size: 3rem;\nline-height: 1;}.zjlab-fe-data-hub-ui-file-uploader .text-base{\nfont-size: 1rem;\nline-height: 1.5rem;}.zjlab-fe-data-hub-ui-file-uploader .text-sm{\nfont-size: 0.875rem;\nline-height: 1.25rem;}.zjlab-fe-data-hub-ui-file-uploader .text-gray-5{\n--tw-text-opacity: 1;\ncolor: rgb(135 144 158 / var(--tw-text-opacity));}.zjlab-fe-data-hub-ui-file-uploader .text-gray-7{\n--tw-text-opacity: 1;\ncolor: rgb(84 91 100 / var(--tw-text-opacity));}.zjlab-fe-data-hub-ui-file-uploader .text-green-600{\n--tw-text-opacity: 1;\ncolor: rgb(22 163 74 / var(--tw-text-opacity));}.zjlab-fe-data-hub-ui-file-uploader .text-green-green{\n--tw-text-opacity: 1;\ncolor: rgb(83 195 27 / var(--tw-text-opacity));}.zjlab-fe-data-hub-ui-file-uploader .text-red-600{\n--tw-text-opacity: 1;\ncolor: rgb(220 38 38 / var(--tw-text-opacity));}.zjlab-fe-data-hub-ui-file-uploader .text-red-red{\n--tw-text-opacity: 1;\ncolor: rgb(254 77 79 / var(--tw-text-opacity));}.zjlab-fe-data-hub-ui-file-uploader .text-yellow-500{\n--tw-text-opacity: 1;\ncolor: rgb(234 179 8 / var(--tw-text-opacity));}.zjlab-fe-data-hub-ui-file-uploader .opacity-0{\nopacity: 0;}.zjlab-fe-data-hub-ui-file-uploader .filter{\nfilter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);}.zjlab-fe-data-hub-ui-file-uploader .transition-opacity{\ntransition-property: opacity;\ntransition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\ntransition-duration: 150ms;}.zjlab-fe-data-hub-ui-file-uploader .transition-transform{\ntransition-property: transform;\ntransition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\ntransition-duration: 150ms;}@layer tailwind-base{.zjlab-fe-data-hub-ui-file-uploader *, .zjlab-fe-data-hub-ui-file-uploader ::before, .zjlab-fe-data-hub-ui-file-uploader ::after{\n--tw-border-spacing-x: 0;\n--tw-border-spacing-y: 0;\n--tw-translate-x: 0;\n--tw-translate-y: 0;\n--tw-rotate: 0;\n--tw-skew-x: 0;\n--tw-skew-y: 0;\n--tw-scale-x: 1;\n--tw-scale-y: 1;\n--tw-pan-x: ;\n--tw-pan-y: ;\n--tw-pinch-zoom: ;\n--tw-scroll-snap-strictness: proximity;\n--tw-gradient-from-position: ;\n--tw-gradient-via-position: ;\n--tw-gradient-to-position: ;\n--tw-ordinal: ;\n--tw-slashed-zero: ;\n--tw-numeric-figure: ;\n--tw-numeric-spacing: ;\n--tw-numeric-fraction: ;\n--tw-ring-inset: ;\n--tw-ring-offset-width: 0px;\n--tw-ring-offset-color: #fff;\n--tw-ring-color: rgb(59 130 246 / 0.5);\n--tw-ring-offset-shadow: 0 0 #0000;\n--tw-ring-shadow: 0 0 #0000;\n--tw-shadow: 0 0 #0000;\n--tw-shadow-colored: 0 0 #0000;\n--tw-blur: ;\n--tw-brightness: ;\n--tw-contrast: ;\n--tw-grayscale: ;\n--tw-hue-rotate: ;\n--tw-invert: ;\n--tw-saturate: ;\n--tw-sepia: ;\n--tw-drop-shadow: ;\n--tw-backdrop-blur: ;\n--tw-backdrop-brightness: ;\n--tw-backdrop-contrast: ;\n--tw-backdrop-grayscale: ;\n--tw-backdrop-hue-rotate: ;\n--tw-backdrop-invert: ;\n--tw-backdrop-opacity: ;\n--tw-backdrop-saturate: ;\n--tw-backdrop-sepia: ;\n--tw-contain-size: ;\n--tw-contain-layout: ;\n--tw-contain-paint: ;\n--tw-contain-style: ;}.zjlab-fe-data-hub-ui-file-uploader ::backdrop{\n--tw-border-spacing-x: 0;\n--tw-border-spacing-y: 0;\n--tw-translate-x: 0;\n--tw-translate-y: 0;\n--tw-rotate: 0;\n--tw-skew-x: 0;\n--tw-skew-y: 0;\n--tw-scale-x: 1;\n--tw-scale-y: 1;\n--tw-pan-x: ;\n--tw-pan-y: ;\n--tw-pinch-zoom: ;\n--tw-scroll-snap-strictness: proximity;\n--tw-gradient-from-position: ;\n--tw-gradient-via-position: ;\n--tw-gradient-to-position: ;\n--tw-ordinal: ;\n--tw-slashed-zero: ;\n--tw-numeric-figure: ;\n--tw-numeric-spacing: ;\n--tw-numeric-fraction: ;\n--tw-ring-inset: ;\n--tw-ring-offset-width: 0px;\n--tw-ring-offset-color: #fff;\n--tw-ring-color: rgb(59 130 246 / 0.5);\n--tw-ring-offset-shadow: 0 0 #0000;\n--tw-ring-shadow: 0 0 #0000;\n--tw-shadow: 0 0 #0000;\n--tw-shadow-colored: 0 0 #0000;\n--tw-blur: ;\n--tw-brightness: ;\n--tw-contrast: ;\n--tw-grayscale: ;\n--tw-hue-rotate: ;\n--tw-invert: ;\n--tw-saturate: ;\n--tw-sepia: ;\n--tw-drop-shadow: ;\n--tw-backdrop-blur: ;\n--tw-backdrop-brightness: ;\n--tw-backdrop-contrast: ;\n--tw-backdrop-grayscale: ;\n--tw-backdrop-hue-rotate: ;\n--tw-backdrop-invert: ;\n--tw-backdrop-opacity: ;\n--tw-backdrop-saturate: ;\n--tw-backdrop-sepia: ;\n--tw-contain-size: ;\n--tw-contain-layout: ;\n--tw-contain-paint: ;\n--tw-contain-style: ;}/*\n! tailwindcss v3.4.13 | MIT License | https://tailwindcss.com\n*//*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader *,\n.zjlab-fe-data-hub-ui-file-uploader ::before,\n.zjlab-fe-data-hub-ui-file-uploader ::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n.zjlab-fe-data-hub-ui-file-uploader ::before,\n.zjlab-fe-data-hub-ui-file-uploader ::after {\n --tw-content: \'\';\n}\n\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user\'s configured `sans` font-family by default.\n5. Use the user\'s configured `sans` font-feature-settings by default.\n6. Use the user\'s configured `sans` font-variation-settings by default.\n7. Disable tap highlights on iOS\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader html,\n.zjlab-fe-data-hub-ui-file-uploader :host {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n -moz-tab-size: 4; /* 3 */\n -o-tab-size: 4;\n tab-size: 4; /* 3 */\n font-family: AlibabaPuHuiTi-3-55-RegularL3, ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; /* 4 */\n font-feature-settings: normal; /* 5 */\n font-variation-settings: normal; /* 6 */\n -webkit-tap-highlight-color: transparent; /* 7 */\n}\n\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader body {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader hr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/*\nRemove the default font size and weight for headings.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader h1,\n.zjlab-fe-data-hub-ui-file-uploader h2,\n.zjlab-fe-data-hub-ui-file-uploader h3,\n.zjlab-fe-data-hub-ui-file-uploader h4,\n.zjlab-fe-data-hub-ui-file-uploader h5,\n.zjlab-fe-data-hub-ui-file-uploader h6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader a {\n color: inherit;\n text-decoration: inherit;\n}\n\n/*\nAdd the correct font weight in Edge and Safari.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader b,\n.zjlab-fe-data-hub-ui-file-uploader strong {\n font-weight: bolder;\n}\n\n/*\n1. Use the user\'s configured `mono` font-family by default.\n2. Use the user\'s configured `mono` font-feature-settings by default.\n3. Use the user\'s configured `mono` font-variation-settings by default.\n4. Correct the odd `em` font sizing in all browsers.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader code,\n.zjlab-fe-data-hub-ui-file-uploader kbd,\n.zjlab-fe-data-hub-ui-file-uploader samp,\n.zjlab-fe-data-hub-ui-file-uploader pre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */\n font-feature-settings: normal; /* 2 */\n font-variation-settings: normal; /* 3 */\n font-size: 1em; /* 4 */\n}\n\n/*\nAdd the correct font size in all browsers.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader small {\n font-size: 80%;\n}\n\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader sub,\n.zjlab-fe-data-hub-ui-file-uploader sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\n.zjlab-fe-data-hub-ui-file-uploader sub {\n bottom: -0.25em;\n}\n\n.zjlab-fe-data-hub-ui-file-uploader sup {\n top: -0.5em;\n}\n\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader table {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader button,\n.zjlab-fe-data-hub-ui-file-uploader input,\n.zjlab-fe-data-hub-ui-file-uploader optgroup,\n.zjlab-fe-data-hub-ui-file-uploader select,\n.zjlab-fe-data-hub-ui-file-uploader textarea {\n font-family: inherit; /* 1 */\n font-feature-settings: inherit; /* 1 */\n font-variation-settings: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n letter-spacing: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader button,\n.zjlab-fe-data-hub-ui-file-uploader select {\n text-transform: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader button,\n.zjlab-fe-data-hub-ui-file-uploader input:where([type=\'button\']),\n.zjlab-fe-data-hub-ui-file-uploader input:where([type=\'reset\']),\n.zjlab-fe-data-hub-ui-file-uploader input:where([type=\'submit\']) {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader :-moz-focusring {\n outline: auto;\n}\n\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader :-moz-ui-invalid {\n box-shadow: none;\n}\n\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader progress {\n vertical-align: baseline;\n}\n\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader ::-webkit-inner-spin-button,\n.zjlab-fe-data-hub-ui-file-uploader ::-webkit-outer-spin-button {\n height: auto;\n}\n\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader [type=\'search\'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader ::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader ::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader summary {\n display: list-item;\n}\n\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader blockquote,\n.zjlab-fe-data-hub-ui-file-uploader dl,\n.zjlab-fe-data-hub-ui-file-uploader dd,\n.zjlab-fe-data-hub-ui-file-uploader h1,\n.zjlab-fe-data-hub-ui-file-uploader h2,\n.zjlab-fe-data-hub-ui-file-uploader h3,\n.zjlab-fe-data-hub-ui-file-uploader h4,\n.zjlab-fe-data-hub-ui-file-uploader h5,\n.zjlab-fe-data-hub-ui-file-uploader h6,\n.zjlab-fe-data-hub-ui-file-uploader hr,\n.zjlab-fe-data-hub-ui-file-uploader figure,\n.zjlab-fe-data-hub-ui-file-uploader p,\n.zjlab-fe-data-hub-ui-file-uploader pre {\n margin: 0;\n}\n\n.zjlab-fe-data-hub-ui-file-uploader fieldset {\n margin: 0;\n padding: 0;\n}\n\n.zjlab-fe-data-hub-ui-file-uploader legend {\n padding: 0;\n}\n\n.zjlab-fe-data-hub-ui-file-uploader ol,\n.zjlab-fe-data-hub-ui-file-uploader ul,\n.zjlab-fe-data-hub-ui-file-uploader menu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/*\nReset default styling for dialogs.\n*/\n.zjlab-fe-data-hub-ui-file-uploader dialog {\n padding: 0;\n}\n\n/*\nPrevent resizing textareas horizontally by default.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader textarea {\n resize: vertical;\n}\n\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user\'s configured gray 400 color.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader input::-moz-placeholder, .zjlab-fe-data-hub-ui-file-uploader textarea::-moz-placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\n.zjlab-fe-data-hub-ui-file-uploader input::placeholder,\n.zjlab-fe-data-hub-ui-file-uploader textarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\n/*\nSet the default cursor for buttons.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader button,\n.zjlab-fe-data-hub-ui-file-uploader [role="button"] {\n cursor: pointer;\n}\n\n/*\nMake sure disabled buttons don\'t get the pointer cursor.\n*/\n.zjlab-fe-data-hub-ui-file-uploader :disabled {\n cursor: default;\n}\n\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader img,\n.zjlab-fe-data-hub-ui-file-uploader svg,\n.zjlab-fe-data-hub-ui-file-uploader video,\n.zjlab-fe-data-hub-ui-file-uploader canvas,\n.zjlab-fe-data-hub-ui-file-uploader audio,\n.zjlab-fe-data-hub-ui-file-uploader iframe,\n.zjlab-fe-data-hub-ui-file-uploader embed,\n.zjlab-fe-data-hub-ui-file-uploader object {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader img,\n.zjlab-fe-data-hub-ui-file-uploader video {\n max-width: 100%;\n height: auto;\n}\n\n/* Make elements with the HTML hidden attribute stay hidden by default */\n.zjlab-fe-data-hub-ui-file-uploader [hidden] {\n display: none;\n}}@font-face{font-family:"AlibabaPuHuiTi-3-55-RegularL3";src:url("//geocloud.oss-cn-hangzhou-zjy-d01-a.ops.cloud.zhejianglab.com//homepageusers/alibaba_puhuiti_3/AlibabaPuHuiTi-3-55-RegularL3.ttf") format("truetype")}@font-face{font-family:"AlibabaPuHuiTi-3-65-Medium";src:url("//geocloud.oss-cn-hangzhou-zjy-d01-a.ops.cloud.zhejianglab.com//homepageusers/alibaba_puhuiti_3/AlibabaPuHuiTi-3-65-Medium.ttf") format("truetype")}.last\\:mb-0:last-child{\nmargin-bottom: 0px;}.hover\\:border-green-600:hover{\n--tw-border-opacity: 1;\nborder-color: rgb(22 163 74 / var(--tw-border-opacity));}.hover\\:bg-assist-bg-blue:hover{\n--tw-bg-opacity: 1;\nbackground-color: rgb(244 246 250 / var(--tw-bg-opacity));}.group:hover .group-hover\\:-translate-x-10{\n--tw-translate-x: -2.5rem;\ntransform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));}.group:hover .group-hover\\:-translate-x-6{\n--tw-translate-x: -1.5rem;\ntransform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));}.group:hover .group-hover\\:opacity-100{\nopacity: 1;}',""]);const l=o},915:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(245),a=n.n(r),i=n(526),o=n.n(i)()(a());o.push([e.id,".zjlab-fe-data-hub-ui-modal .ant-modal-title,.zjlab-fe-data-hub-ui-modal .ant-modal-confirm-title {\n font-family: AlibabaPuHuiTi-3-65-Medium;\n font-size: 1.125rem;\n font-weight: 400;\n line-height: 1.5rem\n}",""]);const l=o},150:(e,t,n)=>{n.d(t,{Ay:()=>c,Og:()=>u,Rp:()=>d,_b:()=>s,cQ:()=>l});var r=n(245),a=n.n(r),i=n(526),o=n.n(i)()(a());o.push([e.id,".QmFviLMZ5ad2m0mLbKkP{width:349px;height:280px;border-radius:10px 10px 10px 10px}.ZJu8EO9kRspWAqZAD0d_{background:linear-gradient(to top, #ffffff 0%, #f6f9fe 100%);border:1px solid #edf2fc;-o-border-image:linear-gradient(180deg, rgb(237, 242, 252)) 1 1;border-image:linear-gradient(180deg, rgb(237, 242, 252)) 1 1}.ZJu8EO9kRspWAqZAD0d_:hover{background:linear-gradient(to top, #ffffff 0%, #ecf4ff 100%);box-shadow:0px 8px 16px 0px rgba(7,35,76,.1);border:1px solid #afcfff;-o-border-image:linear-gradient(180deg, rgba(23, 117, 254, 0.6)) 1 1;border-image:linear-gradient(180deg, rgba(23, 117, 254, 0.6)) 1 1}.KS7Y4rDVUCfP7qjdPZap{background:linear-gradient(to top, #ffffff 0%, #f7f5ff 100%);border:1px solid #ebe6ff;-o-border-image:linear-gradient(180deg, rgb(236, 231, 255)) 1 1;border-image:linear-gradient(180deg, rgb(236, 231, 255)) 1 1}.KS7Y4rDVUCfP7qjdPZap:hover{background:linear-gradient(to top, #ffffff 0%, #e3dcff 100%);box-shadow:0px 8px 16px 0px rgba(40,23,92,.1);border:1px solid #c5b4ff;-o-border-image:linear-gradient(180deg, rgba(114, 68, 255, 0.6)) 1 1;border-image:linear-gradient(180deg, rgba(114, 68, 255, 0.6)) 1 1}.mZ5nSrfxkgv2ivcg_v21{width:472px;height:148px;border-radius:10px 10px 10px 10px;position:relative}",""]);var l="QmFviLMZ5ad2m0mLbKkP",s="ZJu8EO9kRspWAqZAD0d_",u="KS7Y4rDVUCfP7qjdPZap",d="mZ5nSrfxkgv2ivcg_v21";const c=o},100:(e,t,n)=>{n.d(t,{Ay:()=>u,DE:()=>s,wm:()=>l});var r=n(245),a=n.n(r),i=n(526),o=n.n(i)()(a());o.push([e.id,'@font-face{font-family:"AlibabaPuHuiTi-3-45-Light";src:url("//geocloud.oss-cn-hangzhou-zjy-d01-a.ops.cloud.zhejianglab.com//homepageusers/alibaba_puhuiti_3/AlibabaPuHuiTi-3-45-Light.ttf") format("truetype")}@font-face{font-family:"AlibabaPuHuiTi-3-75-SemiBold";src:url("//geocloud.oss-cn-hangzhou-zjy-d01-a.ops.cloud.zhejianglab.com//homepageusers/alibaba_puhuiti_3/AlibabaPuHuiTi-3-75-SemiBold.ttf") format("truetype")}.EybT8LL35ZAAECD9qKQX .ant-modal-content{padding:0 24px}.EybT8LL35ZAAECD9qKQX .ant-modal-title{padding-top:50px;font-family:"AlibabaPuHuiTi-3-75-SemiBold";font-weight:normal;font-size:16px;color:#222427;line-height:1.5;text-align:center;font-style:normal;text-transform:none}.EybT8LL35ZAAECD9qKQX .ant-modal-body{font-family:"AlibabaPuHuiTi-3-45-Light";font-weight:normal;font-size:12px;color:#545b64;line-height:14px;text-align:center;font-style:normal;text-transform:none}.EybT8LL35ZAAECD9qKQX .ant-modal-footer{text-align:center;padding:16px 0}.F2kZbP7G9NKG9lg8O_b1 .ant-modal-content{padding:0 24px}.F2kZbP7G9NKG9lg8O_b1 .ant-modal-body{text-align:center}.F2kZbP7G9NKG9lg8O_b1 .ant-modal-confirm-title{padding-top:50px;font-family:"AlibabaPuHuiTi-3-75-SemiBold";font-weight:normal;font-size:16px;color:#222427;line-height:1.5;text-align:center;font-style:normal;text-transform:none}.F2kZbP7G9NKG9lg8O_b1 .ant-modal-confirm-content{font-family:"AlibabaPuHuiTi-3-45-Light";font-weight:normal;font-size:12px;color:#545b64;line-height:14px;text-align:center;font-style:normal;text-transform:none}.F2kZbP7G9NKG9lg8O_b1 .ant-modal-confirm-btns{text-align:center;padding:16px 0}',""]);var l="EybT8LL35ZAAECD9qKQX",s="F2kZbP7G9NKG9lg8O_b1";const u=o},860:(e,t,n)=>{n.d(t,{A:()=>s,K:()=>l});var r=n(245),a=n.n(r),i=n(526),o=n.n(i)()(a());o.push([e.id,'.aTTl5tM6IlquA6EPUX_w{font-family:"hub-iconfont";color:#545b64;font-size:12px;cursor:pointer}.aTTl5tM6IlquA6EPUX_w:hover{color:#1775fe}',""]);var l="aTTl5tM6IlquA6EPUX_w";const s=o},685:(e,t,n)=>{n.d(t,{A:()=>s,L:()=>l});var r=n(245),a=n.n(r),i=n(526),o=n.n(i)()(a());o.push([e.id,".cJmcPSn5LN2GH9HqTvEQ{height:100%;overflow-x:hidden;overflow-y:auto}",""]);var l="cJmcPSn5LN2GH9HqTvEQ";const s=o},913:(e,t,n)=>{n.d(t,{Ay:()=>u,LV:()=>l,_8:()=>s});var r=n(245),a=n.n(r),i=n(526),o=n.n(i)()(a());o.push([e.id,".zuabV0gpCkaY8pSYtOSL{display:flex;align-items:center;justify-content:center;height:100%}.i2GFC308F3s1lGENOI5l{max-width:100%;max-height:100%}",""]);var l="zuabV0gpCkaY8pSYtOSL",s="i2GFC308F3s1lGENOI5l";const u=o},690:(e,t,n)=>{n.d(t,{Ay:()=>d,D5:()=>s,LV:()=>l,qf:()=>u});var r=n(245),a=n.n(r),i=n(526),o=n.n(i)()(a());o.push([e.id,".EVmfUlSj2zzl7igeqp6N{display:flex;align-items:center;justify-content:center;height:100%;overflow:auto;padding-top:16px;padding-bottom:16px}.Z65yBBsFLSWF70wfWwgA{display:flex;align-items:center;justify-content:center;padding-top:16px;padding-bottom:16px}.QSsGpXvLzOYpHSNncjpj .ant-modal-body{height:calc(100vh - 200px);overflow-y:auto}.QSsGpXvLzOYpHSNncjpj .ant-modal-content{padding-top:44px}",""]);var l="EVmfUlSj2zzl7igeqp6N",s="Z65yBBsFLSWF70wfWwgA",u="QSsGpXvLzOYpHSNncjpj";const d=o},482:(e,t,n)=>{n.d(t,{A:()=>s,L:()=>l});var r=n(245),a=n.n(r),i=n(526),o=n.n(i)()(a());o.push([e.id,".GmPZonLTI3KWU6TQWQSo{display:flex;flex-direction:column;align-items:center;height:100%;overflow:auto}.GmPZonLTI3KWU6TQWQSo canvas{max-width:100%}",""]);var l="GmPZonLTI3KWU6TQWQSo";const s=o},989:(e,t,n)=>{n.d(t,{Ay:()=>d,Kk:()=>s,LV:()=>l,NI:()=>u});var r=n(245),a=n.n(r),i=n(526),o=n.n(i)()(a());o.push([e.id,".s1DE3bXbSR3WMxOHGhL4{width:244px;min-height:89px;background:#fff;box-shadow:0px 12px 30px 0px rgba(32,60,48,.2);border-radius:10px 10px 10px 10px;border:1px solid #d9e0ed;z-index:100;position:fixed;bottom:180px;left:calc(50% - 122px)}.ickkjG9C47RxHTbOAWXw{width:16px;height:16px;z-index:101;display:inline-block;border-radius:50%;position:absolute;top:17px;right:17px;cursor:pointer}.dWjTN1AD2WJesHevGU09{padding:17px 10px}",""]);var l="s1DE3bXbSR3WMxOHGhL4",s="ickkjG9C47RxHTbOAWXw",u="dWjTN1AD2WJesHevGU09";const d=o},280:(e,t,n)=>{n.d(t,{Ay:()=>u,LV:()=>l,wm:()=>s});var r=n(245),a=n.n(r),i=n(526),o=n.n(i)()(a());o.push([e.id,".wkk6Lnco5rQ5DK_Bojaj{display:flex;justify-content:space-between;align-items:center;padding:0 16px;background-color:#000}.wkk6Lnco5rQ5DK_Bojaj .H3Num6yF3Ox32Pb6Occg{width:200px}",""]);var l="wkk6Lnco5rQ5DK_Bojaj",s="H3Num6yF3Ox32Pb6Occg";const u=o},588:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(245),a=n.n(r),i=n(526),o=n.n(i)()(a());o.push([e.id,".mylib-upload-drawer *, .mylib-upload-drawer ::before, .mylib-upload-drawer ::after{\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}.mylib-upload-drawer ::backdrop{\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}/*\n! tailwindcss v3.4.13 | MIT License | https://tailwindcss.com\n*//*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/.mylib-upload-drawer *,\n.mylib-upload-drawer ::before,\n.mylib-upload-drawer ::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}.mylib-upload-drawer ::before,\n.mylib-upload-drawer ::after {\n --tw-content: '';\n}/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user's configured `sans` font-family by default.\n5. Use the user's configured `sans` font-feature-settings by default.\n6. Use the user's configured `sans` font-variation-settings by default.\n7. Disable tap highlights on iOS\n*/.mylib-upload-drawer html,\n.mylib-upload-drawer :host {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n -moz-tab-size: 4; /* 3 */\n -o-tab-size: 4;\n tab-size: 4; /* 3 */\n font-family: AlibabaPuHuiTi-3-55-RegularL3, ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\"; /* 4 */\n font-feature-settings: normal; /* 5 */\n font-variation-settings: normal; /* 6 */\n -webkit-tap-highlight-color: transparent; /* 7 */\n}/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/.mylib-upload-drawer body {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/.mylib-upload-drawer hr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/.mylib-upload-drawer abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}/*\nRemove the default font size and weight for headings.\n*/.mylib-upload-drawer h1,\n.mylib-upload-drawer h2,\n.mylib-upload-drawer h3,\n.mylib-upload-drawer h4,\n.mylib-upload-drawer h5,\n.mylib-upload-drawer h6 {\n font-size: inherit;\n font-weight: inherit;\n}/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/.mylib-upload-drawer a {\n color: inherit;\n text-decoration: inherit;\n}/*\nAdd the correct font weight in Edge and Safari.\n*/.mylib-upload-drawer b,\n.mylib-upload-drawer strong {\n font-weight: bolder;\n}/*\n1. Use the user's configured `mono` font-family by default.\n2. Use the user's configured `mono` font-feature-settings by default.\n3. Use the user's configured `mono` font-variation-settings by default.\n4. Correct the odd `em` font sizing in all browsers.\n*/.mylib-upload-drawer code,\n.mylib-upload-drawer kbd,\n.mylib-upload-drawer samp,\n.mylib-upload-drawer pre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; /* 1 */\n font-feature-settings: normal; /* 2 */\n font-variation-settings: normal; /* 3 */\n font-size: 1em; /* 4 */\n}/*\nAdd the correct font size in all browsers.\n*/.mylib-upload-drawer small {\n font-size: 80%;\n}/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/.mylib-upload-drawer sub,\n.mylib-upload-drawer sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}.mylib-upload-drawer sub {\n bottom: -0.25em;\n}.mylib-upload-drawer sup {\n top: -0.5em;\n}/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/.mylib-upload-drawer table {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/.mylib-upload-drawer button,\n.mylib-upload-drawer input,\n.mylib-upload-drawer optgroup,\n.mylib-upload-drawer select,\n.mylib-upload-drawer textarea {\n font-family: inherit; /* 1 */\n font-feature-settings: inherit; /* 1 */\n font-variation-settings: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n letter-spacing: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/.mylib-upload-drawer button,\n.mylib-upload-drawer select {\n text-transform: none;\n}/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/.mylib-upload-drawer button,\n.mylib-upload-drawer input:where([type='button']),\n.mylib-upload-drawer input:where([type='reset']),\n.mylib-upload-drawer input:where([type='submit']) {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}/*\nUse the modern Firefox focus style for all focusable elements.\n*/.mylib-upload-drawer :-moz-focusring {\n outline: auto;\n}/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/.mylib-upload-drawer :-moz-ui-invalid {\n box-shadow: none;\n}/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/.mylib-upload-drawer progress {\n vertical-align: baseline;\n}/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/.mylib-upload-drawer ::-webkit-inner-spin-button,\n.mylib-upload-drawer ::-webkit-outer-spin-button {\n height: auto;\n}/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/.mylib-upload-drawer [type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/.mylib-upload-drawer ::-webkit-search-decoration {\n -webkit-appearance: none;\n}/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/.mylib-upload-drawer ::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}/*\nAdd the correct display in Chrome and Safari.\n*/.mylib-upload-drawer summary {\n display: list-item;\n}/*\nRemoves the default spacing and border for appropriate elements.\n*/.mylib-upload-drawer blockquote,\n.mylib-upload-drawer dl,\n.mylib-upload-drawer dd,\n.mylib-upload-drawer h1,\n.mylib-upload-drawer h2,\n.mylib-upload-drawer h3,\n.mylib-upload-drawer h4,\n.mylib-upload-drawer h5,\n.mylib-upload-drawer h6,\n.mylib-upload-drawer hr,\n.mylib-upload-drawer figure,\n.mylib-upload-drawer p,\n.mylib-upload-drawer pre {\n margin: 0;\n}.mylib-upload-drawer fieldset {\n margin: 0;\n padding: 0;\n}.mylib-upload-drawer legend {\n padding: 0;\n}.mylib-upload-drawer ol,\n.mylib-upload-drawer ul,\n.mylib-upload-drawer menu {\n list-style: none;\n margin: 0;\n padding: 0;\n}/*\nReset default styling for dialogs.\n*/.mylib-upload-drawer dialog {\n padding: 0;\n}/*\nPrevent resizing textareas horizontally by default.\n*/.mylib-upload-drawer textarea {\n resize: vertical;\n}/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user's configured gray 400 color.\n*/.mylib-upload-drawer input::-moz-placeholder, .mylib-upload-drawer textarea::-moz-placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}.mylib-upload-drawer input::placeholder,\n.mylib-upload-drawer textarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}/*\nSet the default cursor for buttons.\n*/.mylib-upload-drawer button,\n.mylib-upload-drawer [role=\"button\"] {\n cursor: pointer;\n}/*\nMake sure disabled buttons don't get the pointer cursor.\n*/.mylib-upload-drawer :disabled {\n cursor: default;\n}/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/.mylib-upload-drawer img,\n.mylib-upload-drawer svg,\n.mylib-upload-drawer video,\n.mylib-upload-drawer canvas,\n.mylib-upload-drawer audio,\n.mylib-upload-drawer iframe,\n.mylib-upload-drawer embed,\n.mylib-upload-drawer object {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/.mylib-upload-drawer img,\n.mylib-upload-drawer video {\n max-width: 100%;\n height: auto;\n}/* Make elements with the HTML hidden attribute stay hidden by default */.mylib-upload-drawer [hidden] {\n display: none;\n}.mylib-upload-drawer .absolute{\n position: absolute;\n}.mylib-upload-drawer .relative{\n position: relative;\n}.mylib-upload-drawer .right-0{\n right: 0px;\n}.mylib-upload-drawer .m-0{\n margin: 0px;\n}.mylib-upload-drawer .my-2{\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n}.mylib-upload-drawer .my-2\\.5{\n margin-top: 0.625rem;\n margin-bottom: 0.625rem;\n}.mylib-upload-drawer .my-4{\n margin-top: 1rem;\n margin-bottom: 1rem;\n}.mylib-upload-drawer .mb-2{\n margin-bottom: 0.5rem;\n}.mylib-upload-drawer .mb-4{\n margin-bottom: 1rem;\n}.mylib-upload-drawer .mb-5{\n margin-bottom: 1.25rem;\n}.mylib-upload-drawer .mr-1{\n margin-right: 0.25rem;\n}.mylib-upload-drawer .mt-20{\n margin-top: 5rem;\n}.mylib-upload-drawer .mt-4{\n margin-top: 1rem;\n}.mylib-upload-drawer .flex{\n display: flex;\n}.mylib-upload-drawer .flow-root{\n display: flow-root;\n}.mylib-upload-drawer .hidden{\n display: none;\n}.mylib-upload-drawer .h-4{\n height: 1rem;\n}.mylib-upload-drawer .h-5{\n height: 1.25rem;\n}.mylib-upload-drawer .h-6{\n height: 1.5rem;\n}.mylib-upload-drawer .h-8{\n height: 2rem;\n}.mylib-upload-drawer .max-h-72{\n max-height: 18rem;\n}.mylib-upload-drawer .w-4{\n width: 1rem;\n}.mylib-upload-drawer .w-40{\n width: 10rem;\n}.mylib-upload-drawer .w-5{\n width: 1.25rem;\n}.mylib-upload-drawer .w-6{\n width: 1.5rem;\n}.mylib-upload-drawer .cursor-pointer{\n cursor: pointer;\n}.mylib-upload-drawer .items-center{\n align-items: center;\n}.mylib-upload-drawer .justify-center{\n justify-content: center;\n}.mylib-upload-drawer .justify-between{\n justify-content: space-between;\n}.mylib-upload-drawer .gap-1{\n gap: 0.25rem;\n}.mylib-upload-drawer .gap-4{\n gap: 1rem;\n}.mylib-upload-drawer .overflow-y-auto{\n overflow-y: auto;\n}.mylib-upload-drawer .truncate{\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}.mylib-upload-drawer .rounded{\n border-radius: 0.25rem;\n}.mylib-upload-drawer .border{\n border-width: 1px;\n}.mylib-upload-drawer .border-solid{\n border-style: solid;\n}.mylib-upload-drawer .border-dashed{\n border-style: dashed;\n}.mylib-upload-drawer .border-\\[\\#1775FE\\]{\n --tw-border-opacity: 1;\n border-color: rgb(23 117 254 / var(--tw-border-opacity));\n}.mylib-upload-drawer .border-gray-3{\n --tw-border-opacity: 1;\n border-color: rgb(217 224 237 / var(--tw-border-opacity));\n}.mylib-upload-drawer .border-gray-300{\n --tw-border-opacity: 1;\n border-color: rgb(209 213 219 / var(--tw-border-opacity));\n}.mylib-upload-drawer .border-green-600{\n --tw-border-opacity: 1;\n border-color: rgb(22 163 74 / var(--tw-border-opacity));\n}.mylib-upload-drawer .bg-\\[\\#F5F7FA\\]{\n --tw-bg-opacity: 1;\n background-color: rgb(245 247 250 / var(--tw-bg-opacity));\n}.mylib-upload-drawer .bg-gray-50{\n --tw-bg-opacity: 1;\n background-color: rgb(249 250 251 / var(--tw-bg-opacity));\n}.mylib-upload-drawer .p-2{\n padding: 0.5rem;\n}.mylib-upload-drawer .p-4{\n padding: 1rem;\n}.mylib-upload-drawer .px-3{\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}.mylib-upload-drawer .px-4{\n padding-left: 1rem;\n padding-right: 1rem;\n}.mylib-upload-drawer .text-center{\n text-align: center;\n}.mylib-upload-drawer .text-2xl{\n font-size: 1.5rem;\n line-height: 2rem;\n}.mylib-upload-drawer .text-5xl{\n font-size: 3rem;\n line-height: 1;\n}.mylib-upload-drawer .text-base{\n font-size: 1rem;\n line-height: 1.5rem;\n}.mylib-upload-drawer .text-sm{\n font-size: 0.875rem;\n line-height: 1.25rem;\n}.mylib-upload-drawer .text-gray-5{\n --tw-text-opacity: 1;\n color: rgb(135 144 158 / var(--tw-text-opacity));\n}.mylib-upload-drawer .text-gray-7{\n --tw-text-opacity: 1;\n color: rgb(84 91 100 / var(--tw-text-opacity));\n}.mylib-upload-drawer .text-green-600{\n --tw-text-opacity: 1;\n color: rgb(22 163 74 / var(--tw-text-opacity));\n}.mylib-upload-drawer .text-green-green{\n --tw-text-opacity: 1;\n color: rgb(83 195 27 / var(--tw-text-opacity));\n}.mylib-upload-drawer .text-red-600{\n --tw-text-opacity: 1;\n color: rgb(220 38 38 / var(--tw-text-opacity));\n}.mylib-upload-drawer .text-red-red{\n --tw-text-opacity: 1;\n color: rgb(254 77 79 / var(--tw-text-opacity));\n}.mylib-upload-drawer .text-yellow-500{\n --tw-text-opacity: 1;\n color: rgb(234 179 8 / var(--tw-text-opacity));\n}.mylib-upload-drawer .opacity-0{\n opacity: 0;\n}.mylib-upload-drawer .filter{\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}.mylib-upload-drawer .transition-opacity{\n transition-property: opacity;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}.mylib-upload-drawer .transition-transform{\n transition-property: transform;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}.last\\:mb-0:last-child{\n margin-bottom: 0px;\n}.hover\\:border-green-600:hover{\n --tw-border-opacity: 1;\n border-color: rgb(22 163 74 / var(--tw-border-opacity));\n}.hover\\:bg-assist-bg-blue:hover{\n --tw-bg-opacity: 1;\n background-color: rgb(244 246 250 / var(--tw-bg-opacity));\n}.group:hover .group-hover\\:-translate-x-10{\n --tw-translate-x: -2.5rem;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}.group:hover .group-hover\\:-translate-x-6{\n --tw-translate-x: -1.5rem;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}.group:hover .group-hover\\:opacity-100{\n opacity: 1;\n}",""]);const l=o},526:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,a,i){"string"==typeof e&&(e=[[null,e,void 0]]);var o={};if(r)for(var l=0;l<this.length;l++){var s=this[l][0];null!=s&&(o[s]=!0)}for(var u=0;u<e.length;u++){var d=[].concat(e[u]);r&&o[d[0]]||(void 0!==i&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=i),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),a&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=a):d[4]="".concat(a)),t.push(d))}},t}},245:e=>{e.exports=function(e){return e[1]}},438:e=>{var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var i={},o=[],l=0;l<e.length;l++){var s=e[l],u=r.base?s[0]+r.base:s[0],d=i[u]||0,c="".concat(u," ").concat(d);i[u]=d+1;var f=n(c),p={css:s[1],media:s[2],sourceMap:s[3],supports:s[4],layer:s[5]};if(-1!==f)t[f].references++,t[f].updater(p);else{var b=a(p,r);r.byIndex=l,t.splice(l,0,{identifier:c,updater:b,references:1})}o.push(c)}return o}function a(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,a){var i=r(e=e||[],a=a||{});return function(e){e=e||[];for(var o=0;o<i.length;o++){var l=n(i[o]);t[l].references--}for(var s=r(e,a),u=0;u<i.length;u++){var d=n(i[u]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}i=s}}},413:e=>{var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},50:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},598:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},119:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var a=void 0!==n.layer;a&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,a&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},615:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},f={};function p(e){var t=f[e];if(void 0!==t)return t.exports;var n=f[e]={id:e,exports:{}};return c[e](n,n.exports,p),n.exports}p.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return p.d(t,{a:t}),t},p.d=(e,t)=>{for(var n in t)p.o(t,n)&&!p.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},p.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),p.nc=void 0;var b={};p.d(b,{NF:()=>yr,LZ:()=>dr,QR:()=>or,dA:()=>er,Lq:()=>Be,Bx:()=>kn,l0:()=>Pn,Ow:()=>br,Y9:()=>D,ly:()=>I,_2:()=>se,WI:()=>St,C:()=>lr});const h=(m={Fragment:()=>e.Fragment,jsx:()=>e.jsx,jsxs:()=>e.jsxs},g={},p.d(g,m),g);var m,g;const w=(e=>{var t={};return p.d(t,e),t})({Alert:()=>t.Alert,App:()=>t.App,Button:()=>t.Button,Drawer:()=>t.Drawer,Empty:()=>t.Empty,Flex:()=>t.Flex,Input:()=>t.Input,Modal:()=>t.Modal,Progress:()=>t.Progress,Spin:()=>t.Spin,Tag:()=>t.Tag,message:()=>t.message});var y=p(438),v=p.n(y),x=p(119),j=p.n(x),S=p(413),C=p.n(S),A=p(598),z=p.n(A),N=p(50),O=p.n(N),E=p(615),k=p.n(E),P=p(280),F={};function D(e){const{showLogin:t}=e;return(0,h.jsxs)("div",{className:P.LV,children:[(0,h.jsx)("img",{src:"https://www.unpkg.com/@zjlab-fe/fe-assets/logo-white.png",className:P.wm}),t&&(0,h.jsx)(w.Button,{ghost:!0,children:"登录"})]})}F.styleTagTransform=k(),F.setAttributes=z(),F.insert=C().bind(null,"head"),F.domAPI=j(),F.insertStyleElement=O(),v()(P.Ay,F),P.Ay&&P.Ay.locals&&P.Ay.locals;const L=(e=>{var t={};return p.d(t,e),t})({createContext:()=>n.createContext,memo:()=>n.memo,useCallback:()=>n.useCallback,useContext:()=>n.useContext,useEffect:()=>n.useEffect,useMemo:()=>n.useMemo,useReducer:()=>n.useReducer,useRef:()=>n.useRef,useState:()=>n.useState});function I(e){const{value:t,onChange:n,placeholder:r="请输入关键字",valueType:a,deduplicated:i=!0,size:o,maxLength:l,disabled:s}=e,[u,d]=(0,L.useState)([]),[c,f]=(0,L.useState)(1),p=(0,L.useRef)(null);(0,L.useEffect)((()=>{Array.isArray(t)?d(t):"string"==typeof t&&d(t.split(";"))}),[t]),(0,L.useEffect)((()=>{1!==c&&(null==p?void 0:p.current)&&p.current.focus()}),[c]);const b=e=>{if(i&&(e=Array.from(new Set(e))),d(e),"array"===a)null==n||n(e.length>0?e:void 0);else{const t=e.join(";");null==n||n(t||void 0)}};let m;return(null==u?void 0:u.length)>0&&(m=u.map(((e,t)=>(0,h.jsx)(w.Tag,{closeIcon:!s,onClose:()=>(e=>{const t=u.filter(((t,n)=>n!==e));b(t),f(c+1)})(t),children:e},t)))),(0,h.jsx)(w.Input,{disabled:s,size:o,ref:p,placeholder:r,prefix:m,onPressEnter:e=>{const t=e.target.value.trim(),n=[...u,t];b(n),f(c+1)},maxLength:l},c)}const U=1024,T=1048576,R=1073741824;var _,H;(H=_||(_={}))[H.INIT=1]="INIT",H[H.UPLOADING=2]="UPLOADING",H[H.FINISHED=3]="FINISHED",H[H.FAILED=4]="FAILED",H[H.PAUSED=5]="PAUSED",H[H.CANCELED=6]="CANCELED";const M=1,G=2;var B=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function q(e,t,n){return B(this,void 0,void 0,(function*(){const{name:r,size:a}=e,i=t?`${t}${r}`:r,o=Object.assign(Object.assign({},{fileStatus:_.INIT,percentage:0,uploadId:"",expiryTime:"",uploadUrls:[],completeSeq:[],failSeq:[],cancelControllers:{},uploadStatus:[],chunkSize:0,displaySize:"",fileName:"",partCount:0,raw:void 0}),{fileName:i,raw:new File([e],i,{type:e.type}),partCount:$(a),chunkSize:V(a),displaySize:ee(a)}),l=yield n(i,o.partCount);return l.status?Object.assign(Object.assign({},o),l.uploadInfo):Object.assign(Object.assign({},o),{fileStatus:_.FAILED})}))}function V(e){return e<10*T?10*T:Math.ceil(e/10)}function $(e){const t=V(e);return Math.floor(e/t)+1}function Z(e,t,n,r){Y(e);try{e.createObjectStore(t,{}),e.onversionchange=t=>{null===t.newVersion&&e.close()},n([])}catch(e){r(Error(`升级数据库异常: ${e.message}`))}}function K(e,t,n){const r=J.version+1;J.close();const a=window.indexedDB.open(W,r);a.onupgradeneeded=()=>Z(a.result,e,t,n)}function X(e,t,n){(function(e){return new Promise((function(t,n){let r;try{r=J.transaction(e,"readonly");try{const n=r.objectStore(e),a=[],i=n.openCursor();i.onsuccess=()=>{const e=i.result;e?(a.push(e.value),e.continue()):t(a)},i.onerror=()=>{console.warn(`在handleFileRetrieve()中游标操作失败 - 错误代码: ${i.error}`,i.error)}}catch(e){n(Error(`在handleFileRetrieve()中执行事务或打开游标时发生异常 - ${e.message}`))}}catch(e){n(Error(`在handleFileRetrieve()中创建数据库事务时发生异常 - ${e.message}`))}}))})(e).then(t).catch(n)}var Q=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};const W="uploadStore";let J;function Y(e){J=e}function ee(e){const t=[{value:R,label:"GB"},{value:T,label:"MB"},{value:U,label:"KB"},{value:1,label:"B"}];for(const{value:n,label:r}of t)if(e>=n||1===n)return(e/n).toFixed(1)+r;return e+"B"}var te=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function ne(e,t,n){return te(this,arguments,void 0,(function*(e,t,n,r=""){return e.isDirectory?t?function(e,t){return te(this,void 0,void 0,(function*(){const n=yield function(e){return new Promise(((t,n)=>{e.createReader().readEntries(t,n)}))}(e),r=n.map((e=>ne(e,!0,t,e.fullPath)));return(yield Promise.allSettled(r)).filter((e=>"fulfilled"===e.status)).flatMap((e=>e.value))}))}(e,n):[]:e.isFile?e.name.includes(".DS_Store")?[]:function(e,t,n){return te(this,void 0,void 0,(function*(){const r=yield function(e){return new Promise(((t,n)=>{e.file(t,n)}))}(e);return function(e,t){if(0===t.size)return!0;const n=e.name.split(".").pop()||"";return t.has(`.${n}`)}(r,t)?[re(r,n)]:[]}))}(e,n,r):[]}))}function re(e,t){const n=e.slice(0,e.size,e.type);return new File([n],t.slice(1)||e.name,{type:e.type})}function ae(e){return e.map((({completeSeq:e,uploadId:t,uploadStatus:n,uploadUrls:r,percentage:a,fileName:i,failSeq:o})=>({fileName:i,uploadId:t,completeSeq:e,uploadStatus:n,percentage:a,uploadUrls:[...r,...o]})))}const ie={},oe=(0,L.createContext)(ie),le=(0,L.createContext)((()=>null));function se({children:e}){const[t,n]=(0,L.useReducer)(ue,{});return function(e){(0,L.useEffect)((()=>{return window.addEventListener("beforeunload",t),()=>{window.removeEventListener("beforeunload",t)};function t(){const t=[];for(const[n,r]of Object.entries(e)){const e=r.filter((e=>e.fileStatus!==_.FINISHED));e.length?localStorage.setItem(n,JSON.stringify(ae(e))):t.push(n)}t.length&&function(e){Q(this,void 0,void 0,(function*(){const t=J.version+1;return J.close(),new Promise(((n,r)=>{const a=window.indexedDB.open(W,t);a.onupgradeneeded=()=>{const t=a.result;e.forEach((e=>{t.objectStoreNames.contains(e)&&t.deleteObjectStore(e)}))},a.onsuccess=()=>{a.result.close(),n()},a.onerror=()=>r(a.error)}))}))}(t)}}),[e])}(t),(0,h.jsx)(oe.Provider,{value:t,children:(0,h.jsx)(le.Provider,{value:n,children:e})})}function ue(e,t){switch(t.type){case"add":return Object.assign(Object.assign({},e),{[t.identifier]:[]});case"remove_file":{const n=e[t.identifier],r=n.findIndex((e=>e.fileName===t.file.fileName));return Object.assign(Object.assign({},e),{[t.identifier]:[...n.slice(0,r),...n.slice(r+1)]})}case"edit_file":{const n=e[t.identifier],r=n.findIndex((e=>e.fileName===t.file.fileName));return Object.assign(Object.assign({},e),{[t.identifier]:[...n.slice(0,r),t.file,...n.slice(r+1)]})}case"add_file":{const n=e[t.identifier],r=n.findIndex((e=>e.fileName===t.file.fileName));return-1===r?Object.assign(Object.assign({},e),{[t.identifier]:[...n,t.file]}):Object.assign(Object.assign({},e),{[t.identifier]:[...n.slice(0,r),t.file,...n.slice(r+1)]})}case"add_files":{const n=e[t.identifier];return Object.assign(Object.assign({},e),{[t.identifier]:[...n,...t.files]})}case"clear_finished":{const n=e[t.identifier];return Object.assign(Object.assign({},e),{[t.identifier]:n.filter((e=>e.fileStatus!==_.FINISHED))})}default:throw Error("Unknown action")}}const de=(e=>{var t={};return p.d(t,e),t})({CheckOutlined:()=>r.CheckOutlined,CloseOutlined:()=>r.CloseOutlined,DeleteOutlined:()=>r.DeleteOutlined,FileTextOutlined:()=>r.FileTextOutlined,InboxOutlined:()=>r.InboxOutlined,LoadingOutlined:()=>r.LoadingOutlined,PauseOutlined:()=>r.PauseOutlined,PlayCircleFilled:()=>r.PlayCircleFilled});var ce=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};const fe="border-dashed rounded border bg-gray-50 p-4 hover:border-green-600 border-gray-300";function pe({accept:e="",directory:t=!0,dragAreaDescription:n,onFileReceived:r}){const a=(0,L.useMemo)((()=>new Set(e?e.split(","):[])),[e]),i=(0,L.useRef)(null),[o,l]=(0,L.useState)(!1),s={onDragLeave:()=>l(!1),onDragEnter:e=>e.preventDefault(),onDragOver:e=>{e.preventDefault(),l(!0)},onDrop:function(e){return ce(this,void 0,void 0,(function*(){e.preventDefault(),l(!1);const n=Array.from(e.dataTransfer.items).map((e=>e.webkitGetAsEntry())).filter(Boolean).map((e=>ne(e,t,a))),i=(yield Promise.allSettled(n)).filter((e=>"fulfilled"===e.status)).flatMap((e=>e.value));i.length&&r(i)}))}};return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(w.Flex,Object.assign({vertical:!0,gap:"1rem",align:"center",className:`${o?"border-green-600":""} ${fe}`},s,{onClick:()=>{var e;return null===(e=i.current)||void 0===e?void 0:e.click()},children:[(0,h.jsx)("p",{className:"text-5xl text-green-600 m-0",children:(0,h.jsx)(de.InboxOutlined,{})}),(0,h.jsx)("div",{className:"text-base text-center",children:n?Array.isArray(n)?n.map(((e,t)=>(0,h.jsx)("p",{className:"text-base m-0",children:e},t))):(0,h.jsx)("p",{className:"text-base m-0",children:n}):(0,h.jsx)("p",{className:"text-base m-0",children:"点击或拖拽上传文件"})})]})),(0,h.jsx)("input",{ref:i,type:"file",accept:e,hidden:!0,multiple:!0,onChange:function(){var e;const t=null===(e=i.current)||void 0===e?void 0:e.files;(null==t?void 0:t.length)&&r(Array.from(t))},onClick:()=>{i.current&&(i.current.value="")}})]})}const be={size:32,strokeWidth:12,type:"circle",strokeLinecap:"butt"};function he({percent:e,status:t,onClick:n}){const{progressButtonRef:r,buttonInHover:a}=function(){const e=(0,L.useRef)(null),[t,n]=(0,L.useState)(!1);return(0,L.useEffect)((()=>{const t=e.current;if(!t)return;const r=()=>n(!0),a=()=>n(!1);return t.addEventListener("mouseenter",r),t.addEventListener("mouseleave",a),()=>{t.removeEventListener("mouseenter",r),t.removeEventListener("mouseleave",a)}}),[]),{progressButtonRef:e,buttonInHover:t}}(),[i,o]=(0,L.useState)(!1);return t===_.FINISHED?(0,h.jsx)(de.CheckOutlined,{className:"text-green-600 text-2xl h-8"}):t===_.FAILED?(0,h.jsx)(h.Fragment,{children:i?(0,h.jsx)(de.LoadingOutlined,{className:"text-red-600 text-2xl h-8"}):(0,h.jsx)(de.CloseOutlined,{className:"text-red-600 text-2xl h-8",onClick:()=>{n(),o(!0)}})}):(0,h.jsx)(w.Button,{type:"text",shape:"circle",disabled:i,ref:r,title:t===_.PAUSED?"继续下载":"取消下载",onClick:()=>{n(),t===_.UPLOADING&&o(!0)},children:(0,h.jsx)(w.Progress,Object.assign({percent:e},be,{strokeColor:i?"#f0a020":"#19a1fe",format:function(){return t===_.PAUSED?(0,h.jsx)(de.PauseOutlined,{}):i?(0,h.jsx)(de.LoadingOutlined,{className:"text-yellow-500"}):a?(0,h.jsx)(de.CloseOutlined,{}):void 0}}))})}var me=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function ge(){const{identifier:e,root:t,getUploadUrls:n}=(0,L.useContext)(Ge),r=(0,L.useContext)(le);return(0,L.useCallback)((a=>me(this,void 0,void 0,(function*(){const i=function(e){if(!e.expiryTime)return M;const t=new Date;return new Date(e.expiryTime)<t?M:G}(a)===M;if(i){const i=yield q(a.raw,t,n);r({type:"edit_file",identifier:e,file:i})}else{const t=Object.assign(Object.assign({},a),{fileStatus:_.INIT,uploadUrls:[...a.failSeq,...a.uploadUrls],failSeq:[],cancelControllers:{}});r({type:"edit_file",identifier:e,file:t})}}))),[e,t,n,r])}var we=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function ye(){const{message:e}=w.App.useApp(),{identifier:t,onCancelUpload:n}=(0,L.useContext)(Ge),r=(0,L.useContext)(le);return function(t){return we(this,void 0,void 0,(function*(){const{fileName:r,uploadId:i}=t;if(!i)return void a(t);const o=yield n(r,i);o.status?a(t):e.error(o.reason||"取消失败")}))};function a(e){e.fileStatus=_.CANCELED,function(e,t){let n;try{n=J.transaction(e,"readwrite")}catch(e){return void console.warn("db.transaction() exception in deleteFileInStore() - "+e.message)}try{const r=n.objectStore(e).delete(t);r.onsuccess=()=>!0,r.onerror=e=>{console.warn("deleteReq.onerror fired in deleteFileInStore() - error code: "+r.error)}}catch(e){return void console.warn("Transaction and/or put() exception in deleteFileInStore() - "+e.message)}}(String(t),e.fileName),Object.values(e.cancelControllers).forEach((e=>e.abort())),r({type:"remove_file",identifier:t,file:e})}}var ve=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function xe({identifier:e,showFinished:t}){const n=(0,L.useContext)(oe),r=ye(),a=ge(),[i,o]=(0,L.useState)([]);return(0,L.useEffect)((()=>{const r=n[e].filter((e=>e.fileStatus!==_.CANCELED&&(!1!==t||e.fileStatus!==_.FINISHED)));o(r)}),[e,t,n]),(0,h.jsx)("div",{className:"my-4",children:i.map((n=>(0,h.jsx)(je,{identifier:e,file:n,showFinished:t,onButtonClick:l},n.fileName)))});function l(e){e.fileStatus===_.PAUSED?a(e):r(e)}}function je({identifier:e,file:t,showFinished:n,onButtonClick:r}){const a=(0,L.useContext)(le),i="object"==typeof n&&n.withDelete;return(0,h.jsx)("div",{className:"mb-2 last:mb-0",children:(0,h.jsxs)("div",{className:"px-4 my-2 relative flex justify-between items-center",children:[(0,h.jsxs)(w.Flex,{align:"center",gap:".5rem",title:t.fileName,children:[(0,h.jsx)(de.FileTextOutlined,{}),(0,h.jsx)("span",{className:"truncate w-40",children:t.fileName})]}),(0,h.jsxs)(w.Flex,{align:"center",gap:".5rem",children:[(0,h.jsx)(he,{status:t.fileStatus,percent:Number(t.percentage.toFixed(0)),onClick:()=>r(t)}),t.fileStatus===_.FINISHED&&i&&(0,h.jsx)(w.Button,{type:"text",size:"large",className:"px-3",disabled:i.disabled,title:i.disabled?"删除-已禁用":"删除",onClick:()=>function(t,n){return ve(this,void 0,void 0,(function*(){(yield n(t.fileName))&&a({type:"remove_file",identifier:e,file:t})}))}(t,i.onDelete),children:(0,h.jsx)(de.DeleteOutlined,{})})]})]})})}var Se=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function Ce(e,t,n){const r=new Set(t.map((e=>e.fileName)));return e.filter((e=>{const t=n?`${n}${e.name}`:e.name;return r.has(t)})).map((e=>e.name))}function Ae(e,t){return e.filter((e=>{var n;const r=e.name.includes("/"),a=e.name.split("/")[0];return r===(null===(n=t.find((e=>e.fileName===a)))||void 0===n?void 0:n.isFolder)})).map((e=>e.name))}var ze=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function Ne(){const{message:e}=w.App.useApp(),{identifier:t,root:n,getUploadUrls:r}=(0,L.useContext)(Ge),a=(0,L.useContext)(le),i=function(){const{message:e,modal:t}=w.App.useApp(),n=(0,L.useContext)(oe),{identifier:r,maxSizePerFile:a=10*R,uploadHistory:i=[],root:o}=(0,L.useContext)(Ge);return function(l){return Se(this,void 0,void 0,(function*(){const s=function(t){const n=t.filter((e=>e.size>a)).map((e=>e.name));if(n.length){const t=ee(a);e.warning(`以下文件大小超过${t}:${n.join(", ")}`)}return n}(l),[u,d]=yield function(e){return Se(this,void 0,void 0,(function*(){const a=[...Ce(e,n[r],o),...Ae(e,i)];return a.length?[yield t.confirm({title:"发现同名文件,是否覆盖?",okText:"覆盖",cancelText:"取消"}),a]:[!0,[]]}))}(l);return u?[new Set(s),new Set(d)]:[new Set([...s,...d]),new Set]}))}}(),o=function(){const e=(0,L.useContext)(oe),{identifier:t}=(0,L.useContext)(Ge),n=ye();return function(r){const a=e[t];for(const e of r){const t=a.find((t=>t.fileName===e));t&&n(t)}}}();return function(l){return ze(this,void 0,void 0,(function*(){const s=yield function(e){return ze(this,void 0,void 0,(function*(){const t=new Map(e.map((e=>[e.name,e]))),[n,r]=yield i(e);return n.forEach((e=>t.delete(e))),o(r),Array.from(t.values())}))}(l),u=yield function(e){return ze(this,void 0,void 0,(function*(){const t=e.map((e=>q(e,n,r)));return(yield Promise.allSettled(t)).filter((e=>"fulfilled"===e.status)).map((e=>e.value))}))}(s);u.forEach((e=>{a({type:"add_file",identifier:t,file:e})})),function(e,t){try{const n=function(e){const t=J.transaction(e,"readwrite");return t.onerror=()=>console.warn(`添加文件事务错误: ${t.error}`),t.onabort=()=>console.warn("添加文件事务已中止"),t.oncomplete=()=>console.warn("添加文件事务已完成"),t}(e);!function(e,t){t.map((t=>function(e,t){try{e.put(t,t.fileName),console.warn(`文件 "${t.fileName}" 添加成功`)}catch(e){console.warn(`添加文件 "${t.fileName}" 时出错: ${e.message}`)}}(e,t)))}(n.objectStore(e),t)}catch(e){console.warn(`批量添加文件时出错: ${e.message}`)}}(t,u),u.length<s.length&&e.info("部分文件获取上传地址失败")}))}}const Oe=(e=>{var t={};return p.d(t,e),t})({default:()=>a.default});var Ee=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function ke(e,t=1e3){let n=null;return function(r){n||(n=setTimeout((()=>{e(r),n=null}),t))}}function Pe(e,t,n){const r=e.uploadUrls.findIndex((e=>e===t));e.uploadUrls.splice(r,1),e["complete"===n?"completeSeq":"failSeq"].push(t)}var Fe=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))},De=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function Le(){const e=function(){const{identifier:e,onOnePartDone:t}=(0,L.useContext)(Ge),n=(0,L.useContext)(le),r=(0,L.useCallback)(((t,r,a)=>{r.fileStatus===_.UPLOADING&&(r.uploadStatus[a]=Number(t.progress),r.percentage=r.uploadStatus.reduce(((e,t)=>e+t))*(100/r.partCount),n({type:"edit_file",identifier:e,file:r}))}),[e,n]),a=(0,L.useCallback)(((e,t,n)=>Ee(this,void 0,void 0,(function*(){const a=Oe.default.create({});yield a.put(e.uploadUrl,t,{signal:n.cancelControllers[e.partNum].signal,withCredentials:!1,timeout:18e5,headers:{"Content-Type":"application/octet-stream"},onUploadProgress:ke((t=>r(t,n,e.partNum)))})}))),[r]),i=(0,L.useCallback)(((e,n)=>Ee(this,void 0,void 0,(function*(){const{fileName:r,uploadId:a}=e,i=yield t(r,a,n.partNum);if(!i.status)throw new Error(i.reason);Pe(e,n,"complete")}))),[t]),o=(0,L.useCallback)(((e,t,n)=>Ee(this,void 0,void 0,(function*(){try{return yield a(e,t,n),yield i(n,e),n.fileStatus}catch(t){return Pe(n,e,"fail"),n.fileStatus}}))),[a,i]);return(0,L.useCallback)((t=>Ee(this,void 0,void 0,(function*(){t.fileStatus=_.UPLOADING,n({type:"edit_file",identifier:e,file:t});const r=function(e){const{uploadUrls:t,chunkSize:n,raw:r}=e,a=r.size;return t.map((({partNum:e,uploadUrl:t})=>{const i=e*n,o=Math.min((e+1)*n,a);return{url:{partNum:e,uploadUrl:t},chunk:r.slice(i,o)}}))}(t);for(const{url:a,chunk:i}of r){if(t.cancelControllers[a.partNum]=new AbortController,(yield o(a,i,t))===_.CANCELED)return!1;n({type:"edit_file",identifier:e,file:t})}}))),[e,n,o])}(),t=function(){const{identifier:e,onAllPartDone:t}=(0,L.useContext)(Ge),n=(0,L.useContext)(le);return(0,L.useCallback)((r=>Fe(this,void 0,void 0,(function*(){try{const{fileName:e,uploadId:n}=r;if(0!==r.failSeq.length)throw new Error("partial failed");{const a=yield t(e,n);if(!a.status)throw new Error(a.reason);r.fileStatus=_.FINISHED}}catch(e){r.fileStatus=_.FAILED}finally{n({type:"edit_file",identifier:e,file:r})}}))),[e,t,n])}();return(0,L.useCallback)(((n,r)=>De(this,void 0,void 0,(function*(){yield e(n),n.fileStatus!==_.CANCELED&&(yield t(n),n.fileStatus===_.FINISHED&&r&&r(n))}))),[e,t])}var Ie=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function Ue(e){const{message:t,modal:n}=w.App.useApp(),r=(0,L.useContext)(le),a=ge();return(0,L.useCallback)((()=>Ie(this,void 0,void 0,(function*(){const i=yield function(e){return Ie(this,void 0,void 0,(function*(){const t=yield(r=e,new Promise(((e,t)=>{J?function(e,t,n){J.objectStoreNames.contains(e)?X(e,t,n):K(e,t,n)}(r,e,t):function(e,t,n){try{const r=window.indexedDB.open(W);r.onupgradeneeded=()=>Z(r.result,e,t,n),r.onsuccess=()=>function(e,t,n,r){Y(e),e.objectStoreNames.contains(t)?X(t,n,r):K(t,n,r)}(r.result,e,t,n),r.onerror=()=>n(Error(`打开数据库失败: ${r.error}`)),r.onblocked=()=>n(Error(`数据库被阻塞: ${r.error}`))}catch(e){console.warn(`打开数据库时发生异常: ${e.message}`,e),n(e)}}(r,e,t)}))),n=JSON.parse(localStorage.getItem(e)||"[]").map((e=>{const n=t.find((t=>t.fileName===e.fileName));return Object.assign(Object.assign(Object.assign({},n),e),{fileStatus:_.PAUSED})}));var r;return localStorage.removeItem(e),n}))}(e);r({type:"add_files",identifier:e,files:i}),i.length&&n.confirm({title:"提示",content:"检测到未完成上传任务,是否继续上传?",onOk(){i.forEach(a)},onCancel(){t.info("点击上传按钮手动继续")}})}))),[e,r,a,n,t])}var Te=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function Re({open:e,identifier:t,accept:n,dragAreaDescription:r,footer:a,title:i="数据上传",showFinished:o=!1,directory:l=!1,onClose:s}){var u,d;const c=(0,L.useContext)(oe),f=(0,L.useContext)(le),{onSuccess:p}=(0,L.useContext)(Ge),b=Ne(),m=Le(),g=Ue(t),[y,v]=(0,L.useState)([]),x=(0,L.useRef)("");return(0,L.useEffect)((()=>{x.current!==t&&(c&&f?(x.current=t,c[t]||f({type:"add",identifier:t}),g()):console.warn("FileUploadDrawer 必须在 UploadStoreProvider 内使用"))}),[t,g,c,f]),(0,L.useEffect)((()=>{const e=c[t];if(!e)return;const n=!e.some((e=>e.fileStatus===_.UPLOADING)),r=e.find((e=>e.fileStatus===_.INIT));n&&r&&m(r,p)}),[t,p,m,c]),(0,h.jsxs)(w.Drawer,{className:"mylib-upload-drawer",open:e,title:i,width:480,onClose:s,footer:a,children:[(0,h.jsx)(pe,{directory:l,accept:n,dragAreaDescription:r,onFileReceived:function(e){return Te(this,void 0,void 0,(function*(){v((t=>[...t,...e])),yield b(e),v((t=>{const n=new Set(t);for(const t of e)n.delete(t);return[...n]}))}))}}),0===y.length&&0===(null===(u=c[t])||void 0===u?void 0:u.length)&&(0,h.jsx)(w.Empty,{className:"mt-20",description:"暂无上传内容"}),y.length>0&&(0,h.jsxs)("div",{className:"flex justify-center gap-4 mt-4",children:[(0,h.jsx)(de.LoadingOutlined,{}),"预检上传文件中(",y.length,")"]}),(null===(d=c[t])||void 0===d?void 0:d.length)>0&&(0,h.jsx)(xe,{showFinished:o,identifier:t})]})}var _e=p(588),He={};He.styleTagTransform=k(),He.setAttributes=z(),He.insert=C().bind(null,"head"),He.domAPI=j(),He.insertStyleElement=O(),v()(_e.A,He),_e.A&&_e.A.locals&&_e.A.locals;var Me=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};const Ge=(0,L.createContext)({identifier:"",getUploadUrls:()=>Me(void 0,void 0,void 0,(function*(){return{status:!1}})),onCancelUpload:()=>Me(void 0,void 0,void 0,(function*(){return{status:!1}})),onOnePartDone:()=>Me(void 0,void 0,void 0,(function*(){return{status:!1}})),onAllPartDone:()=>Me(void 0,void 0,void 0,(function*(){return{status:!1}}))});function Be(e){if((0,L.useContext)(oe)===ie)return(0,h.jsx)(w.Drawer,{open:e.open,onClose:e.onClose,title:"数据上传",children:(0,h.jsx)(w.Alert,{message:"FileUploadDrawer 必须在 UploadStoreProvider 内使用",type:"warning"})});const{identifier:t,maxSizePerFile:n=10*R,directory:r=!1,root:a="",uploadHistory:i=[],onSuccess:o,getUploadUrls:l,onCancelUpload:s,onOnePartDone:u,onAllPartDone:d,onClose:c,dragAreaDescription:f,accept:p,open:b,footer:m,title:g,showFinished:y}=e,v={identifier:t,maxSizePerFile:n,directory:r,root:a,uploadHistory:i,onSuccess:o,getUploadUrls:l,onCancelUpload:s,onOnePartDone:u,onAllPartDone:d};return(0,h.jsx)(Ge.Provider,{value:v,children:(0,h.jsx)(Re,{open:b,accept:p,footer:m,title:g,showFinished:y,directory:r,identifier:t,dragAreaDescription:f,onClose:c})})}var qe,Ve=p(884),$e={};$e.styleTagTransform=k(),$e.setAttributes=z(),$e.insert=C().bind(null,"head"),$e.domAPI=j(),$e.insertStyleElement=O(),v()(Ve.A,$e),Ve.A&&Ve.A.locals&&Ve.A.locals,function(e){e[e.SHOULD_CREATE_NEW_FILE=0]="SHOULD_CREATE_NEW_FILE",e[e.SHOULD_USE_OLD_INFO=1]="SHOULD_USE_OLD_INFO"}(qe||(qe={}));const Ze=1024,Ke=1048576,Xe=1073741824;var Qe;!function(e){e[e.INIT=1]="INIT",e[e.UPLOADING=2]="UPLOADING",e[e.ALL_UPLOADED=3]="ALL_UPLOADED",e[e.MERGING=4]="MERGING",e[e.FINISHED=5]="FINISHED",e[e.FAILED=6]="FAILED",e[e.PAUSED=7]="PAUSED",e[e.CANCELED=8]="CANCELED"}(Qe||(Qe={}));var We=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function Je(e,t,n){return We(this,void 0,void 0,(function*(){const{name:r,size:a}=e,i=t?`${t}${r}`:r,o=function(e,t,n){return{fileName:e,uploadId:"",percentage:0,expiryTime:"",failSeq:[],uploadUrls:[],completeSeq:[],uploadStatus:[],cancelControllers:[],fileStatus:Qe.INIT,partCount:et(t),chunkSize:Ye(t),raw:new File([n],e,{type:n.type})}}(i,a,e),l=yield n(i,o.partCount);return l.status?Object.assign(Object.assign({},o),l.uploadInfo):Object.assign(Object.assign({},o),{fileStatus:Qe.FAILED})}))}function Ye(e){return e<10*Ke?10*Ke:Math.ceil(e/10)}function et(e){const t=Ye(e);return Math.floor(e/t)+1}function tt(e,t){try{const n=at.transaction(e,"readwrite").objectStore(e).delete(t);n.onsuccess=()=>console.info("在 deleteFileInStore 中 deleteReq.onsuccess 触发"),n.onerror=()=>console.warn("在 deleteFileInStore 中 deleteReq.onerror 触发 - 错误代码: "+n.error)}catch(e){return void console.warn("在 deleteFileInStore 中, db.transaction/transaction.objectStore/objectStore.delete 异常 - "+e.message)}}var nt=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};const rt="uploadStore";let at;function it(e){at=e}var ot=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function lt(e,t,n){return ot(this,arguments,void 0,(function*(e,t,n,r=""){return e.isDirectory?t?function(e,t){return ot(this,void 0,void 0,(function*(){const n=yield function(e){return new Promise(((t,n)=>{e.createReader().readEntries(t,n)}))}(e),r=n.map((e=>lt(e,!0,t,e.fullPath)));return(yield Promise.allSettled(r)).filter((e=>"fulfilled"===e.status)).flatMap((e=>e.value))}))}(e,n):[]:e.isFile?e.name.includes(".DS_Store")?[]:function(e,t,n){return ot(this,void 0,void 0,(function*(){const r=yield function(e){return new Promise(((t,n)=>{e.file(t,n)}))}(e);return function(e,t){if(0===t.size)return!0;const n=e.name.split(".").pop()||"";return t.has(`.${n}`)}(r,t)?[st(r,n)]:[]}))}(e,n,r):[]}))}function st(e,t){const n=e.slice(0,e.size,e.type);return new File([n],t.slice(1)||e.name,{type:e.type})}var ut=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};function dt(e){const t=e.map((e=>{var{raw:t}=e,n=ut(e,["raw"]);const{uploadUrls:r,failSeq:a}=n;return Object.assign(Object.assign({},n),{failSeq:[],cancelControllers:{},uploadUrls:[...r,...a]})}));return JSON.stringify(t)}const ct={"FileUploader 必须在 UploadStoreProvider 内使用":"FileUploader must be used within UploadStoreProvider","FileUploadModal 必须在 UploadStoreProvider 内使用":"FileUploadModal must be used within UploadStoreProvider",文件上传:"File Upload",确定:"Confirm",等待上传:"Waiting for upload",已取消:"Cancelled",上传中:"Uploading",上传失败:"Upload failed",已上传:"Uploaded",分块合并中:"Merging parts",以下文件大小超过:"The following files exceed the size",已删除:"Deleted",点击或拖拽上传文件:"Click or drag to upload files","发现同名文件,是否覆盖?":"Duplicate file found, overwrite?",覆盖:"Overwrite",取消:"Cancel",正在上传:"Uploading",取消失败:"Cancel failed",当前上传:"Current Upload",已暂停:"Paused",上传成功:"Upload successful"},ft={"FileUploader 必须在 UploadStoreProvider 内使用":"FileUploader 必须在 UploadStoreProvider 内使用","FileUploadModal 必须在 UploadStoreProvider 内使用":"FileUploadModal 必须在 UploadStoreProvider 内使用",文件上传:"文件上传",确定:"确定",等待上传:"等待上传",已取消:"已取消",上传中:"上传中",上传失败:"上传失败",已上传:"已上传",分块合并中:"分块合并中",以下文件大小超过:"以下文件大小超过",已删除:"已删除",点击或拖拽上传文件:"点击或拖拽上传文件","发现同名文件,是否覆盖?":"发现同名文件,是否覆盖?",覆盖:"覆盖",取消:"取消",正在上传:"正在上传",取消失败:"取消失败",当前上传:"当前上传",已暂停:"已暂停",上传成功:"上传成功"};var pt=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function bt(e,t){switch(t.type){case"add":return Object.assign(Object.assign({},e),{[t.identifier]:[]});case"remove_file":{const n=e[t.identifier],r=n.findIndex((e=>e.fileName===t.fileName));return Object.assign(Object.assign({},e),{[t.identifier]:[...n.slice(0,r),...n.slice(r+1)]})}case"edit_file":{const n=e[t.identifier],r=n.findIndex((e=>e.fileName===t.file.fileName));return Object.assign(Object.assign({},e),{[t.identifier]:[...n.slice(0,r),t.file,...n.slice(r+1)]})}case"add_file":{const n=e[t.identifier],r=n.findIndex((e=>e.fileName===t.file.fileName));return-1===r?Object.assign(Object.assign({},e),{[t.identifier]:[...n,t.file]}):Object.assign(Object.assign({},e),{[t.identifier]:[...n.slice(0,r),t.file,...n.slice(r+1)]})}case"add_files":{const n=e[t.identifier];return Object.assign(Object.assign({},e),{[t.identifier]:[...n,...t.files]})}case"clear_finished":{const n=e[t.identifier];return Object.assign(Object.assign({},e),{[t.identifier]:n.filter((e=>e.fileStatus!==Qe.FINISHED))})}case"edit_files":return Object.entries(t.files).reduce(((t,[n,r])=>{const a=e[n];return r.forEach((e=>{const t=a.findIndex((t=>t.fileName===e.fileName));-1!==t?a[t]=e:a.push(e)})),t}),Object.assign({},e));default:throw Error("Unknown action")}}const ht=(0,L.createContext)(ft),mt=(0,L.createContext)({}),gt=(0,L.createContext)((()=>null)),wt=(0,L.createContext)({}),yt=(0,L.createContext)((()=>null)),vt={},xt=(0,L.createContext)(vt),jt=(0,L.createContext)((()=>null));function St({locale:e="zh",children:t}){const n="zh"===e?ft:ct,[r,a]=(0,L.useReducer)(bt,{}),[i,o]=(0,L.useState)({}),[l,s]=(0,L.useState)({});return function(e){(0,L.useEffect)((()=>{return window.addEventListener("beforeunload",t),()=>{window.removeEventListener("beforeunload",t)};function t(){Object.entries(e).forEach((([e,t])=>{const n=t.filter((e=>e.fileStatus!==Qe.FINISHED));n.length?localStorage.setItem(e,dt(n)):function(e){nt(this,void 0,void 0,(function*(){const t=at.version+1;return at.close(),new Promise(((n,r)=>{const a=window.indexedDB.open(rt,t);a.onupgradeneeded=()=>{const t=a.result;t.objectStoreNames.contains(e)&&t.deleteObjectStore(e)},a.onsuccess=()=>{a.result.close(),n()},a.onerror=()=>r(a.error)}))}))}(e)}))}}),[e])}(r),function(e,t){(0,L.useEffect)((()=>{const n=Object.keys(e).reduce(((t,n)=>{const r=e[n],a=r.filter((e=>e.fileStatus===Qe.ALL_UPLOADED)),i=a.filter((e=>0===e.failSeq.length)),o=a.filter((e=>e.failSeq.length>0)),l=r.find((e=>e.fileStatus===Qe.UPLOADING)),s=r.find((e=>e.fileStatus===Qe.INIT)),u=l?void 0:s,d=[...o.map((e=>Object.assign(Object.assign({},e),{fileStatus:Qe.FAILED}))),...i.map((e=>Object.assign(Object.assign({},e),{fileStatus:Qe.MERGING}))),u?Object.assign(Object.assign({},u),{fileStatus:Qe.UPLOADING}):void 0].filter((e=>!!e));return d.length?Object.assign(Object.assign({},t),{[n]:d}):t}),{});Object.keys(n).length&&t({type:"edit_files",files:n})}),[t,e])}(r,a),function(e,t,n,r){const a=(0,L.useRef)({}),i=(0,L.useCallback)((function(e,i){return pt(this,void 0,void 0,(function*(){const{onAllPartDone:o}=t[e],l=n[e],s=yield Promise.all(i.map((t=>pt(this,void 0,void 0,(function*(){return(yield o(t.fileName,t.uploadId)).status?(null==l||l(t),a.current[e].delete(t.uploadId),Object.assign(Object.assign({},t),{percentage:100,fileStatus:Qe.FINISHED})):Object.assign(Object.assign({},t),{fileStatus:Qe.FAILED})})))));r({type:"edit_files",files:{[e]:s}})}))}),[t,n,r]);(0,L.useEffect)((()=>{Object.keys(e).forEach((t=>{const n=e[t].filter((e=>e.fileStatus===Qe.MERGING));if(n.length>0){const e=a.current[t]||new Set,r=n.filter((t=>!e.has(t.uploadId)));r.forEach((t=>e.add(t.uploadId))),a.current[t]=e,i(t,r)}}))}),[e,i])}(r,i,l,a),(0,h.jsx)(ht.Provider,{value:n,children:(0,h.jsx)(mt.Provider,{value:i,children:(0,h.jsx)(gt.Provider,{value:o,children:(0,h.jsx)(wt.Provider,{value:l,children:(0,h.jsx)(yt.Provider,{value:s,children:(0,h.jsx)(xt.Provider,{value:r,children:(0,h.jsx)(jt.Provider,{value:a,children:t})})})})})})})}var Ct=p(868),At={};function zt(){const e=(0,L.useContext)(ht);return(0,L.useCallback)((t=>e[t]||(console.warn(`Translation key not found: ${t}`),t)),[e])}function Nt(e){return(0,h.jsx)("svg",Object.assign({width:"34",height:"31",viewBox:"0 0 34 31",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e,{children:(0,h.jsxs)("g",{id:"ä¸ä¼ æå¾",children:[(0,h.jsx)("path",{id:"Vector",d:"M26 8.66665V29.7043C26.0013 29.867 25.9705 30.0284 25.9094 30.1792C25.8483 30.33 25.7581 30.4672 25.6439 30.5831C25.5297 30.699 25.3938 30.7913 25.244 30.8547C25.0941 30.918 24.9332 30.9512 24.7705 30.9523H1.22943C0.903577 30.9523 0.591055 30.823 0.360528 30.5927C0.130002 30.3624 0.000328142 30.05 0 29.7241V1.22819C0 0.563332 0.553428 0 1.23562 0H17.3333V7.42856C17.3333 7.75692 17.4638 8.07184 17.6959 8.30402C17.9281 8.53621 18.243 8.66665 18.5714 8.66665H26ZM26 6.19047H19.8095V0.00371423L26 6.19047Z",fill:"#B9D6FF"}),(0,h.jsxs)("g",{id:"Group 1000006993",children:[(0,h.jsx)("circle",{id:"Ellipse 87",cx:"26",cy:"23",r:"8",fill:"#1775FE"}),(0,h.jsx)("path",{id:"Vector_2",d:"M26.4545 24.315V27.5714H25.5455V24.315L24.3034 25.2023L23.775 24.4625L26 22.8732L28.225 24.4625L27.6966 25.2023L26.4545 24.315ZM31 24.4545C31 25.7098 29.9825 26.7273 28.7273 26.7273H27.3636V25.8182H28.7273C29.0749 25.8184 29.4094 25.6858 29.6625 25.4476C29.9156 25.2094 30.0682 24.8835 30.0891 24.5365C30.11 24.1896 29.9976 23.8477 29.7749 23.5808C29.5522 23.314 29.236 23.1422 28.8909 23.1007L28.4568 23.0489L28.4918 22.6127C28.4973 22.5455 28.5 22.4775 28.5 22.4091C28.5 21.0284 27.3807 19.9091 26 19.9091C25.4245 19.9091 24.8666 20.1077 24.4205 20.4712C23.9744 20.8347 23.6672 21.3409 23.5509 21.9045L23.4955 22.175L23.2295 22.2507C22.8492 22.3591 22.5146 22.5885 22.2763 22.9042C22.038 23.2198 21.9091 23.6045 21.9091 24C21.9091 24.4822 22.1006 24.9447 22.4416 25.2856C22.7826 25.6266 23.2451 25.8182 23.7273 25.8182H24.6364V26.7273H23.7273C22.2211 26.7273 21 25.5061 21 24C21 22.8655 21.6989 21.8682 22.7239 21.4632C22.9292 20.753 23.3598 20.1288 23.9506 19.6846C24.5415 19.2403 25.2607 19.0001 26 19C27.8414 19 29.3416 20.4598 29.4068 22.2852C29.8687 22.4302 30.2723 22.7187 30.5588 23.1089C30.8453 23.499 30.9999 23.9705 31 24.4545Z",fill:"white"})]})]})}))}function Ot({description:e}){const t=zt();return(0,h.jsx)("div",{className:"text-gray-5 text-center",children:e?Array.isArray(e)?e.map(((e,t)=>(0,h.jsx)("p",{className:"m-0",children:e},t))):(0,h.jsx)("div",{className:"m-0",children:e}):(0,h.jsx)("p",{className:"m-0",children:t("点击或拖拽上传文件")})})}function Et({className:e,description:t,onClick:n,handleDrop:r}){const[a,i]=(0,L.useState)(!1),o={onDrop:e=>{e.preventDefault(),i(!1),r(e)},onDragLeave:()=>i(!1),onDragEnter:e=>e.preventDefault(),onDragOver:e=>{e.preventDefault(),i(!0)}};return(0,h.jsxs)("div",Object.assign({},o,{className:`zjlab-fe-data-hub-ui-default-drag-area ${a?"border-[#1775FE]":""} ${e}`,onClick:n,children:[(0,h.jsx)(Nt,{}),(0,h.jsx)(Ot,{description:t})]}))}At.styleTagTransform=k(),At.setAttributes=z(),At.insert=C().bind(null,"head"),At.domAPI=j(),At.insertStyleElement=O(),v()(Ct.A,At),Ct.A&&Ct.A.locals&&Ct.A.locals;var kt=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function Pt({accept:e="",className:t="",directory:n=!0,dragAreaDescription:r,maxSizePerFile:a=10*Xe,onFileReceived:i}){const o=zt(),{message:l}=w.App.useApp(),s=(0,L.useRef)(null),u=(0,L.useMemo)((()=>new Set(e?e.split(","):[])),[e]);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Et,{className:t,description:r,handleDrop:function(e){return kt(this,void 0,void 0,(function*(){const t=Array.from(e.dataTransfer.items).map((e=>e.webkitGetAsEntry())).filter(Boolean).map((e=>lt(e,n,u)));d((yield Promise.allSettled(t)).filter((e=>"fulfilled"===e.status)).flatMap((e=>e.value)))}))},onClick:()=>{var e;return null===(e=s.current)||void 0===e?void 0:e.click()}}),(0,h.jsx)("input",{hidden:!0,multiple:!0,type:"file",accept:e,ref:s,onChange:function(){var e;const t=null===(e=s.current)||void 0===e?void 0:e.files;d(Array.from(null!=t?t:[]))},onClick:()=>{s.current&&(s.current.value="")}})]});function d(e){const t=e.filter((e=>e.size<=a));if(t.length<e.length){const e=function(e){const t=[{value:Xe,label:"GB"},{value:Ke,label:"MB"},{value:Ze,label:"KB"},{value:1,label:"B"}];for(const{value:n,label:r}of t)if(e>=n||1===n)return(e/n).toFixed(1)+r;return e+"B"}(a);l.warning(o("以下文件大小超过")+e+","+o("已删除"))}t.length&&i(t)}}function Ft(e){return(0,h.jsx)("svg",Object.assign({width:"16",height:"17",viewBox:"0 0 16 17",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e,{children:(0,h.jsx)("g",{id:"icon/å
³éæé®",children:(0,h.jsx)("path",{id:"Subtract",fillRule:"evenodd",clipRule:"evenodd",d:"M14.6668 8.49967C14.6668 12.1816 11.6821 15.1663 8.00016 15.1663C4.31826 15.1663 1.3335 12.1816 1.3335 8.49967C1.3335 4.81777 4.31826 1.83301 8.00016 1.83301C11.6821 1.83301 14.6668 4.81777 14.6668 8.49967ZM10.239 6.26052C10.4343 6.45578 10.4343 6.77237 10.239 6.96763L8.70698 8.49969L10.239 10.0318C10.4343 10.227 10.4343 10.5436 10.239 10.7389C10.0438 10.9341 9.7272 10.9341 9.53194 10.7389L7.99987 9.2068L6.46781 10.7389C6.27255 10.9341 5.95597 10.9341 5.7607 10.7389C5.56544 10.5436 5.56544 10.227 5.7607 10.0318L7.29277 8.49969L5.7607 6.96763C5.56544 6.77237 5.56544 6.45578 5.7607 6.26052C5.95597 6.06526 6.27255 6.06526 6.46781 6.26052L7.99987 7.79258L9.53194 6.26052C9.7272 6.06526 10.0438 6.06526 10.239 6.26052Z",fill:"currentColor"})})}))}const Dt=(e=>{var t={};return p.d(t,e),t})({atom:()=>i.atom,useAtom:()=>i.useAtom,useAtomValue:()=>i.useAtomValue,useSetAtom:()=>i.useSetAtom});var Lt=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};const It=Oe.default.create();function Ut(e,t=500){let n=null;return function(r){n||(n=setTimeout((()=>{e(r),n=null}),t))}}var Tt=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))},Rt=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};const _t=(0,Dt.atom)(null),Ht=(0,Dt.atom)((e=>{var t;return null===(t=e(_t))||void 0===t?void 0:t.fileName})),Mt=((0,Dt.atom)((e=>{var t;return null===(t=e(_t))||void 0===t?void 0:t.expiryTime})),(0,Dt.atom)((e=>{var t;return null===(t=e(_t))||void 0===t?void 0:t.uploadId}))),Gt=((0,Dt.atom)((e=>{var t;return null===(t=e(_t))||void 0===t?void 0:t.raw})),(0,Dt.atom)((e=>{var t;return null===(t=e(_t))||void 0===t?void 0:t.percentage}))),Bt=(0,Dt.atom)((e=>{var t;return null===(t=e(_t))||void 0===t?void 0:t.cancelControllers}));function qt(){const e=(0,L.useRef)(!1),t=(0,L.useRef)([]),n=(0,L.useContext)(Zt),[r,a]=(0,Dt.useAtom)(_t),i=(0,L.useContext)(jt);!function(){const e=(0,L.useContext)(Zt),t=(0,L.useContext)(xt),n=(0,Dt.useAtomValue)(_t),r=(0,Dt.useSetAtom)(_t);(0,L.useEffect)((()=>{const n=t[e];if(!n||0===n.length)return;const a=n.find((e=>e.fileStatus===Qe.UPLOADING));a&&r(Object.assign(Object.assign({},a),{fileStatus:Qe.INIT}))}),[e,r,t]),(0,L.useEffect)((()=>{return window.addEventListener("beforeunload",t),()=>{window.removeEventListener("beforeunload",t)};function t(){n&&n.fileStatus===Qe.UPLOADING&&localStorage.setItem(e+"_uploading",dt([n]))}}),[n,e])}();const o=function(){const e=(0,L.useContext)(Zt),t=(0,Dt.useSetAtom)(_t),n=(0,L.useContext)(jt),r=function(){const e=(0,L.useContext)(Qt),t=(0,Dt.useAtomValue)(Bt),n=(0,Dt.useSetAtom)(_t),r=(0,L.useCallback)(((e,t)=>{n((n=>{if(!n||n.fileStatus!==Qe.UPLOADING)return n;const r=1!==n.uploadStatus[t]?n.uploadStatus.toSpliced(t,1,Number(e.progress)):n.uploadStatus,a=n.uploadStatus.reduce(((e,t)=>e+(t||0)),0)*(100/n.partCount);return Object.assign(Object.assign({},n),{percentage:a,uploadStatus:r})}))}),[n]);return(0,L.useCallback)(((n,a)=>Lt(this,void 0,void 0,(function*(){t&&(yield It.put(n.uploadUrl,a,Object.assign(Object.assign({},e),{withCredentials:(null==e?void 0:e.withCredentials)||!1,timeout:(null==e?void 0:e.timeout)||18e5,headers:Object.assign({"Content-Type":"application/octet-stream"},null==e?void 0:e.headers),signal:t[n.partNum].signal,onUploadProgress:Ut((e=>r(e,n.partNum)))})))}))),[t,e,r])}(),a=function(e){const t=(0,Dt.useAtomValue)(Ht),n=(0,Dt.useAtomValue)(Mt),r=(0,L.useContext)(mt),a=(0,Dt.useSetAtom)(_t),i=r[e],{onOnePartDone:o}=i;return(0,L.useCallback)((e=>Tt(this,void 0,void 0,(function*(){if(!t||!n)return;const r=yield o(t,n,e.partNum);if(!r.status)throw new Error(r.reason);a((t=>{if(!t)return t;const n=[...t.uploadStatus];return n[e.partNum]=1,Object.assign(Object.assign({},t),{uploadStatus:n,uploadUrls:t.uploadUrls.filter((t=>t.partNum!==e.partNum)),completeSeq:[...t.completeSeq,e]})}))}))),[t,n,o,a])}(e),i=(0,L.useCallback)(((e,n)=>Rt(this,void 0,void 0,(function*(){try{yield r(e,n),yield a(e)}catch(n){if(n instanceof Error&&"canceled"===n.message)return;t((t=>t?Object.assign(Object.assign({},t),{failSeq:[...t.failSeq,e],uploadUrls:t.uploadUrls.filter((t=>t!==e))}):t))}}))),[r,a,t]);return(0,L.useCallback)((function(r){return Rt(this,void 0,void 0,(function*(){for(const{url:e,chunk:t}of r)yield i(e,t);t((t=>t?(n({type:"edit_file",identifier:e,file:Object.assign(Object.assign({},t),{fileStatus:Qe.ALL_UPLOADED})}),null):t))}))}),[e,i,t,n])}();(0,L.useEffect)((()=>{r?(r.fileStatus===Qe.INIT&&(t.current=function(e){const{uploadUrls:t,chunkSize:n,raw:r}=e,a=r.size;return t.map((({partNum:e,uploadUrl:t})=>{const i=e*n,o=Math.min((e+1)*n,a);return{url:{partNum:e,uploadUrl:t},chunk:r.slice(i,o)}}))}(r),a((e=>e?Object.assign(Object.assign({},e),{fileStatus:Qe.UPLOADING,cancelControllers:new Array(t.current.length).fill(new AbortController)}):e))),r.fileStatus!==Qe.UPLOADING||e.current||(e.current=!0,o(t.current)),r.fileStatus===Qe.CANCELED&&(Object.values(r.cancelControllers).forEach((e=>e.abort())),i({type:"remove_file",identifier:n,fileName:r.fileName}),a(null)),r.fileStatus===Qe.FAILED&&(i({type:"edit_file",identifier:n,file:r}),a(null))):e.current=!1}),[r,n,o,a,i])}const Vt=(e=>{var t={};return p.d(t,e),t})({ScopeProvider:()=>o.ScopeProvider}),$t=(0,L.createContext)(void 0),Zt=(0,L.createContext)(""),Kt=(0,L.createContext)(void 0),Xt=(0,L.createContext)(void 0),Qt=(0,L.createContext)(void 0);function Wt({children:e,root:t,identifier:n,showFinished:r,uploadRequestConfig:a,externalUploadContext:i,onUploadSuccess:o,getUploadUrls:l,onCancelUpload:s,onOnePartDone:u,onAllPartDone:d,onDeleteFile:c}){const f=(0,L.useContext)(mt),p=(0,L.useContext)(gt),b=(0,L.useContext)(yt);return(0,L.useEffect)((()=>{p((e=>Object.assign(Object.assign({},e),{[n]:{getUploadUrls:l,onCancelUpload:s,onOnePartDone:u,onAllPartDone:d,onDeleteFile:c}})))}),[l,s,u,d,c,p,n]),(0,L.useEffect)((()=>{b((e=>Object.assign(Object.assign({},e),{[n]:o})))}),[n,o,b]),f[n]?(0,h.jsx)(Vt.ScopeProvider,{atoms:[_t],children:(0,h.jsx)($t.Provider,{value:t,children:(0,h.jsx)(Zt.Provider,{value:n,children:(0,h.jsx)(Kt.Provider,{value:r,children:(0,h.jsx)(Xt.Provider,{value:i,children:(0,h.jsx)(Qt.Provider,{value:a,children:e})})})})})}):(0,h.jsx)(h.Fragment,{})}var Jt=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function Yt(){const e=zt(),{message:t}=w.App.useApp(),n=(0,L.useContext)(Zt),r=(0,L.useContext)(mt),a=(0,L.useContext)(jt);return function(a){return Jt(this,void 0,void 0,(function*(){const{onCancelUpload:o}=r[n];if(!a.uploadId)return void i(a.fileName);const l=yield o(a.fileName,a.uploadId);l.status?i(a.fileName):t.error(l.reason||e("取消失败"))}))};function i(e){tt(String(n),e),a({type:"remove_file",identifier:n,fileName:e})}}function en(e){return(0,h.jsx)("svg",Object.assign({width:"18",height:"16",viewBox:"0 0 18 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e,{children:(0,h.jsxs)("g",{id:"Component 56",children:[(0,h.jsx)("path",{id:"Subtract",d:"M10.1988 5.9923V1.50071L5.00029 1.5C4.44796 1.49992 4.00016 1.94765 4.00015 2.49999L4 13.4998C3.99999 14.0521 4.44771 14.4999 5 14.4999H13.5068C14.0591 14.4999 14.5068 14.0522 14.5068 13.4999L14.507 5.9923H10.1988Z",fill:"currentColor"}),(0,h.jsx)("path",{id:"Subtract_2",d:"M14.507 4.82148H11.3911V1.5L14.507 4.82148Z",fill:"currentColor",fillOpacity:"0.4"})]})}))}const tn={size:12,type:"circle",strokeWidth:16,showInfo:!1,strokeLinecap:"butt"},nn={[Qe.INIT]:"等待上传",[Qe.MERGING]:"合并中",[Qe.CANCELED]:"已取消",[Qe.ALL_UPLOADED]:"校验中",[Qe.PAUSED]:"已暂停",[Qe.FAILED]:"上传失败",[Qe.UPLOADING]:"上传中",[Qe.FINISHED]:"上传成功"},rn=(0,L.memo)((function({file:e}){const t=zt(),n=Yt();return(0,h.jsx)("div",{className:"my-2.5",children:(0,h.jsxs)(an,{children:[(0,h.jsx)(on,{fileName:e.fileName}),(0,h.jsxs)(w.Flex,{align:"center",gap:".25rem",className:"relative",children:[(0,h.jsx)(ln,{fileStatus:t(nn[e.fileStatus]),percentage:Number(e.percentage.toFixed(0)),className:"group-hover:-translate-x-6 transition-transform"}),(0,h.jsx)(sn,{onDelete:()=>n(e),className:"absolute right-0 opacity-0 group-hover:opacity-100 transition-opacity"})]})]})})}));function an({children:e,className:t}){return(0,h.jsx)("div",{className:`p-2 relative flex justify-between items-center rounded group ${t}`,children:e})}function on({fileName:e,className:t}){return(0,h.jsxs)(w.Flex,{align:"center",gap:".25rem",children:[(0,h.jsx)("div",{className:"flex items-center justify-center h-6 w-6 rounded bg-[#F5F7FA]",children:(0,h.jsx)(en,{className:`text-gray-5 h-5 w-5 ${t}`})}),(0,h.jsx)("span",{className:`truncate w-40 text-gray-5 ${t}`,children:e})]})}function ln({className:e="",fileStatus:t,percentage:n,strokeColor:r="#1775FE"}){return(0,h.jsxs)("div",{className:`flex items-center gap-1 h-6 text-sm mr-1 text-gray-5 ${e}`,children:[t,(0,h.jsx)(w.Progress,Object.assign({percent:n},tn,{strokeColor:r}))]})}function sn({onDelete:e,extraActions:t,className:n=""}){return(0,h.jsxs)("div",{className:`flex items-center justify-center h-6 gap-1 text-gray-5 ${n}`,children:[t,(0,h.jsx)(Ft,{onClick:e,className:"h-4 w-4 cursor-pointer"})]})}const un=(0,L.memo)((function(){const e=zt(),t=(0,L.useContext)(Zt),n=(0,Dt.useAtomValue)(Ht),r=(0,Dt.useAtomValue)(Gt),a=(0,Dt.useAtomValue)(Mt),i=(0,L.useContext)(mt),{onCancelUpload:o}=i[t],l=(0,Dt.useSetAtom)(_t);return(0,h.jsx)("div",{className:"my-2.5",children:(0,h.jsxs)(an,{className:"border-gray-3 border border-solid hover:bg-assist-bg-blue",children:[(0,h.jsx)(on,{fileName:n}),(0,h.jsxs)(w.Flex,{align:"center",gap:".25rem",className:"relative",children:[(0,h.jsx)(ln,{fileStatus:e("正在上传"),percentage:Number(r.toFixed(0)),className:"group-hover:-translate-x-6 transition-transform"}),(0,h.jsx)(sn,{onDelete:function(){return r=this,i=void 0,u=function*(){const r=yield o(n,a);r.status?(tt(String(t),n),l((e=>e?Object.assign(Object.assign({},e),{fileStatus:Qe.CANCELED}):e))):w.message.error(r.reason||e("取消失败"))},new((s=void 0)||(s=Promise))((function(e,t){function n(e){try{o(u.next(e))}catch(e){t(e)}}function a(e){try{o(u.throw(e))}catch(e){t(e)}}function o(t){var r;t.done?e(t.value):(r=t.value,r instanceof s?r:new s((function(e){e(r)}))).then(n,a)}o((u=u.apply(r,i||[])).next())}));var r,i,s,u},className:"absolute right-0 opacity-0 group-hover:opacity-100 transition-opacity"})]})]})})}));const dn=(0,L.memo)((function({file:e}){const t=zt(),n=(0,L.useContext)(jt),r=(0,L.useContext)(Zt),a=(0,L.useContext)(mt),{onDeleteFile:i}=a[r],o=Yt();return(0,h.jsx)("div",{className:"my-2.5",children:(0,h.jsxs)(an,{className:"border-gray-3 border border-solid hover:bg-assist-bg-blue",children:[(0,h.jsx)(on,{fileName:e.fileName,className:"text-green-green"}),(0,h.jsxs)(w.Flex,{align:"center",gap:".25rem",className:"relative",children:[(0,h.jsx)(ln,{percentage:100,fileStatus:t("上传成功"),strokeColor:"#53C31B",className:"text-green-green group-hover:-translate-x-6 transition-transform"}),(0,h.jsx)(sn,{onDelete:()=>function(e){return t=this,a=void 0,s=function*(){if(!i)return o(e);(yield i(e.fileName))&&n({type:"remove_file",identifier:r,fileName:e.fileName})},new((l=void 0)||(l=Promise))((function(e,n){function r(e){try{o(s.next(e))}catch(e){n(e)}}function i(e){try{o(s.throw(e))}catch(e){n(e)}}function o(t){var n;t.done?e(t.value):(n=t.value,n instanceof l?n:new l((function(e){e(n)}))).then(r,i)}o((s=s.apply(t,a||[])).next())}));var t,a,l,s}(e),className:"absolute right-0 opacity-0 group-hover:opacity-100 transition-opacity"})]})]})})})),cn=(0,L.memo)((function({file:e}){const t=Yt();return(0,h.jsx)("div",{className:"my-2.5",children:(0,h.jsxs)(an,{className:"bg-red/10",children:[(0,h.jsx)((function(){return(0,h.jsxs)(w.Flex,{align:"center",gap:".25rem",children:[(0,h.jsx)("div",{className:"flex items-center justify-center h-6 w-6 rounded bg-red/10",children:(0,h.jsx)(en,{className:"text-red-red h-5 w-5"})}),(0,h.jsx)("span",{className:"truncate w-40 text-red-red",children:e.fileName})]})}),{}),(0,h.jsxs)(w.Flex,{align:"center",gap:".25rem",className:"relative",children:[(0,h.jsx)((function({className:e=""}){const t=zt();return(0,h.jsx)("div",{className:`flex items-center gap-1 h-6 text-sm mr-1 text-red-red ${e}`,children:t("上传失败")})}),{className:"group-hover:-translate-x-6 transition-transform"}),(0,h.jsx)(sn,{onDelete:()=>t(e),className:"text-red-red absolute right-0 opacity-0 group-hover:opacity-100 transition-opacity"})]})]})})}));var fn=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function pn(){const e=(0,L.useContext)(Zt),t=(0,L.useContext)(mt),n=(0,L.useContext)(jt);return(0,L.useCallback)((r=>fn(this,void 0,void 0,(function*(){const a=t[e];if(function(e){if(!e)return qe.SHOULD_CREATE_NEW_FILE;const t=new Date;return new Date(e)<t?qe.SHOULD_CREATE_NEW_FILE:qe.SHOULD_USE_OLD_INFO}(r.expiryTime)===qe.SHOULD_CREATE_NEW_FILE){const t=yield Je(r.raw,void 0,a.getUploadUrls);n({type:"edit_file",identifier:e,file:t})}else{const t=[...r.failSeq,...r.uploadUrls];n({type:"edit_file",identifier:e,file:Object.assign(Object.assign({},r),{uploadUrls:t,failSeq:[],cancelControllers:[],fileStatus:Qe.INIT})})}}))),[e,t,n])}const bn=(0,L.memo)((function({file:e}){const t=zt(),n=Yt();return(0,h.jsx)("div",{className:"my-2.5",children:(0,h.jsxs)(an,{className:"border-gray-3 border border-solid hover:bg-assist-bg-blue",children:[(0,h.jsx)(on,{fileName:e.fileName}),(0,h.jsxs)(w.Flex,{align:"center",gap:".25rem",className:"relative",children:[(0,h.jsx)(ln,{fileStatus:t("已暂停"),percentage:Number(e.percentage.toFixed(0)),className:"group-hover:-translate-x-10 transition-transform"}),(0,h.jsx)(sn,{extraActions:(0,h.jsx)((function(){const t=pn();return(0,h.jsx)(de.PlayCircleFilled,{className:"text-gray-5 h-4 w-4 cursor-pointer",onClick:()=>t(e)})}),{}),onDelete:()=>n(e),className:"absolute right-0 opacity-0 group-hover:opacity-100 transition-opacity"})]})]})})}));function hn(){const e=zt(),t=(0,L.useContext)(Zt),n=(0,L.useContext)(xt),r=(0,L.useContext)(Kt),a=(0,Dt.useAtomValue)(Ht),i=(0,L.useMemo)((()=>{var e;return null===(e=n[t])||void 0===e?void 0:e.filter((e=>!(!r&&e.fileStatus===Qe.FINISHED)))}),[t,r,n]);return qt(),i&&0!==i.length?(0,h.jsxs)("div",{className:"mb-5",children:[(0,h.jsx)("div",{className:"text-sm text-gray-7",children:e("当前上传")}),(0,h.jsx)("div",{className:"max-h-72 overflow-y-auto",children:i.map((e=>{if(e.fileName===a)return(0,h.jsx)(un,{},e.fileName);switch(e.fileStatus){case Qe.FINISHED:return(0,h.jsx)(dn,{file:e},e.fileName);case Qe.FAILED:return(0,h.jsx)(cn,{file:e},e.fileName);case Qe.PAUSED:return(0,h.jsx)(bn,{file:e},e.fileName);default:return(0,h.jsx)(rn,{file:e},e.fileName)}}))})]}):(0,h.jsx)(h.Fragment,{})}const mn={icon:null,centered:!0,closable:!0,styles:{mask:{backgroundColor:"rgba(0, 0, 0, 0.6)"},body:{marginTop:"24px",textAlign:"center"},content:{padding:"20px 20px 16px 20px",borderRadius:"10px"}},footer:e=>(0,h.jsx)(w.Flex,{justify:"center",align:"center",children:e}),className:"zjlab-fe-data-hub-ui-modal"},gn={width:600,centered:!0,closable:!0,styles:{body:{display:"flow-root"},footer:{textAlign:"center"},header:{marginBlockEnd:"16px"},mask:{backgroundColor:"rgba(0, 0, 0, 0.6)"},content:{padding:"20px 20px 16px 20px",borderRadius:"10px"}},className:"zjlab-fe-data-hub-ui-file-uploader zjlab-fe-data-hub-ui-modal"};var wn=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function yn(e,t,n){const r=new Set(t.map((e=>e.fileName)));return e.filter((e=>{const t=n?`${n}${e.name}`:e.name;return r.has(t)})).map((e=>e.name))}function vn(e,t){return e.filter((e=>{var n;const r=e.name.includes("/"),a=e.name.split("/")[0];return r===(null===(n=t.find((e=>e.fileName===a)))||void 0===n?void 0:n.isFolder)})).map((e=>e.name))}var xn=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};var jn=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function Sn(e){const{message:t,modal:n}=w.App.useApp(),r=(0,L.useContext)(jt),a=pn();return(0,L.useCallback)((()=>jn(this,void 0,void 0,(function*(){const i=yield function(e){return jn(this,void 0,void 0,(function*(){const t=yield(o=e,new Promise(((e,t)=>{function n(n){at.objectStoreNames.contains(n)?function(e){return new Promise((function(t,n){try{const n=at.transaction(e,"readonly").objectStore(e),r=[],a=n.openCursor();a.onsuccess=()=>{const e=a.result;e?(r.push(e.value),e.continue()):t(r)},a.onerror=()=>console.warn(`retrieveExistingData 中游标操作失败 - 错误代码: ${a.error}`)}catch(e){n(Error(`retrieveExistingData 中执行事务或打开游标时发生异常 - ${e.message}`))}}))}(n).then(e).catch(t):function(n){const r=at.version+1;at.close();const a=window.indexedDB.open(rt,r);a.onerror=()=>t(Error(`打开数据库失败: ${a.error}`)),a.onblocked=()=>t(Error(`数据库被阻塞: ${a.error}`)),a.onsuccess=()=>console.info("openRequest.onsuccess 在 triggerDatabaseUpgrade 中被触发"),a.onupgradeneeded=()=>{it(a.result);try{a.result.createObjectStore(n,{}),a.result.onversionchange=e=>{null===e.newVersion&&a.result.close()},e([])}catch(e){t(Error(`升级数据库异常: ${e.message}`))}}}(n)}at?n(o):function(e){try{const r=window.indexedDB.open(rt);r.onsuccess=()=>{it(r.result),n(e)},r.onerror=()=>t(Error(`打开数据库失败: ${r.error}`)),r.onblocked=()=>t(Error(`数据库被阻塞: ${r.error}`)),r.onupgradeneeded=()=>console.info("openRequest.onupgradeneeded(SHOULD NOT BE CALLED)")}catch(e){console.warn(`打开数据库时发生异常: ${e.message}`,e),t(e)}}(o)}))),n=JSON.parse(localStorage.getItem(e)||"[]"),r=JSON.parse(localStorage.getItem(e+"_uploading")||"[]"),a=function(){if(r.length){const e=n.findIndex((e=>e.fileName===r[0].fileName));-1!==e&&n.splice(e,1,r[0])}return n}(),i=t.map((e=>{const t=a.find((t=>t.fileName===e.name));return t?Object.assign(Object.assign({},t),{raw:e,fileStatus:Qe.PAUSED}):null})).filter((e=>null!==e));var o;return localStorage.removeItem(e),localStorage.removeItem(e+"_uploading"),i}))}(e);r({type:"add_files",identifier:e,files:i}),i.length&&n.confirm(Object.assign(Object.assign({},mn),{title:"提示",content:"检测到未完成上传任务,是否继续上传?",onOk(){i.forEach((e=>a(e)))},onCancel(){t.info("点击上传按钮手动继续")}}))}))),[e,r,a,n,t])}var Cn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};function An(e){var{extra:t,dragAreaConfig:n}=e,r=Cn(e,["extra","dragAreaConfig"]);return(0,h.jsx)(Wt,Object.assign({},r,{children:(0,h.jsx)(zn,{extra:t,dragAreaConfig:n})}))}function zn({extra:e,dragAreaConfig:t}){!function(){const e=(0,L.useContext)(Zt),t=(0,L.useContext)(xt),n=(0,L.useContext)(jt),r=(0,L.useRef)(""),a=Sn(e);(0,L.useEffect)((()=>{r.current!==e&&(r.current=e,t[e]||n({type:"add",identifier:e}),a())}),[e,a,t,n])}();const{isFormatingFiles:n,formatFiles:r}=function(){const e=zt(),{message:t}=w.App.useApp(),n=(0,L.useContext)($t),r=(0,L.useContext)(Zt),a=(0,L.useContext)(mt),i=(0,L.useContext)(jt),{getUploadUrls:o}=a[r],[l,s]=(0,L.useState)(!1),u=function(){const{modal:e}=w.App.useApp(),t=zt(),n=(0,L.useContext)($t),r=(0,L.useContext)(Zt),a=(0,L.useContext)(xt),i=(0,L.useContext)(Xt);return function(o){return wn(this,void 0,void 0,(function*(){const l=[...yn(o,a[r],n),...vn(o,null!=i?i:[])];return l.length?[yield e.confirm(Object.assign(Object.assign({},mn),{okText:t("覆盖"),cancelText:t("取消"),title:t("发现同名文件,是否覆盖?")})),new Set(l)]:[!0,new Set]}))}}(),d=function(){const e=(0,L.useContext)(Zt),t=(0,L.useContext)(xt),n=Yt();return function(r){const a=t[e];for(const e of r){const t=a.find((t=>t.fileName===e));t&&n(t)}}}();return{isFormatingFiles:l,formatFiles:function(a){return xn(this,void 0,void 0,(function*(){s(!0);const l=yield function(e){return xn(this,void 0,void 0,(function*(){const[t,n]=yield u(e);return t?(d(n),e):e.filter((e=>!n.has(e.name)))}))}(a),c=yield function(r){return xn(this,void 0,void 0,(function*(){const a=r.map((e=>Je(e,n,o))),i=(yield Promise.allSettled(a)).filter((e=>"fulfilled"===e.status)).map((e=>e.value));return(i.some((e=>e.fileStatus===Qe.FAILED))||i.length<r.length)&&t.info(e("部分文件获取上传地址失败")),i}))}(l);i({type:"add_files",identifier:r,files:c}),function(e,t){try{const n=at.transaction(e,"readwrite").objectStore(e);t.forEach((e=>n.put(e,e.name)))}catch(e){console.warn(`在 addFilesToIndexdb 中, db.transaction/transaction.objectStore/objectStore.put 异常 - ${e.message}`)}}(r,c.map((e=>e.raw))),s(!1)}))}}}();return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(w.Spin,{spinning:n,children:(0,h.jsx)(Pt,Object.assign({},t,{onFileReceived:r}))}),e&&(0,h.jsx)("div",{className:"mb-4",children:e}),(0,h.jsx)(hn,{})]})}var Nn=p(915),On={};On.styleTagTransform=k(),On.setAttributes=z(),On.insert=C().bind(null,"head"),On.domAPI=j(),On.insertStyleElement=O(),v()(Nn.A,On),Nn.A&&Nn.A.locals&&Nn.A.locals;var En=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};function kn(e){var{config:{modal:t,dragArea:n,uploadRequest:r}}=e,a=En(e,["config"]);const i=zt();return(0,L.useContext)(xt)===vt?(0,h.jsx)(w.Modal,Object.assign({},gn,{title:i("文件上传")},t,{children:(0,h.jsx)(w.Alert,{message:i("FileUploadModal 必须在 UploadStoreProvider 内使用"),type:"warning"})})):(0,h.jsx)(w.Modal,Object.assign({},gn,{forceRender:!0,title:i("文件上传"),footer:(0,h.jsx)(w.Button,{type:"primary",onClick:t.onCancel,children:i("确定")})},t,{children:(0,h.jsx)(An,Object.assign({},a,{dragAreaConfig:n,uploadRequestConfig:r}))}))}const Pn=function(e){const t=zt();return(0,L.useContext)(xt)===vt?(0,h.jsx)(w.Alert,{message:t("FileUploader 必须在 UploadStoreProvider 内使用"),type:"warning"}):(0,h.jsx)("div",{className:"zjlab-fe-data-hub-ui-file-uploader",children:(0,h.jsx)(An,Object.assign({},e))})},Fn=(e=>{var t={};return p.d(t,e),t})({getFileExt:()=>l.getFileExt});function Dn(e){return new Promise((t=>{if(e&&e.length>0){const n=[...e];function r(){n.length>0?setTimeout(a):setTimeout((()=>{t(null)}))}function a(){const e=n.shift(),t=(0,Fn.getFileExt)(e);if("js"===t||"mjs"===t){if(!document.querySelector(`script[src="${e}"]`)){const n=document.createElement("script");return n.src=e,"mjs"===t&&(n.type="module"),document.head.appendChild(n),n.onload=r,void(n.onerror=r)}}else if("css"===t&&!document.querySelector(`link[href="${e}"]`)){const t=document.createElement("link");return t.rel="stylesheet",t.href=e,document.head.appendChild(t),t.onload=r,void(t.onerror=r)}r()}a()}else t(null)}))}var Ln=p(482),In={};function Un(e){const{filePath:t}=e,n=(0,L.useRef)(null),r=(0,L.useRef)(0),a=(0,L.useRef)(null),i=(0,L.useRef)(0),o=(0,L.useRef)(0),l=(0,L.useRef)(0),s=(0,L.useRef)(!1),u=()=>{if(s.current)return Promise.resolve();s.current=!0;const e=l.current+3>i.current?i.current:l.current+3;return new Promise((t=>{if(a.current){const r=n.current;let s=e-l.current;for(let d=l.current+1;d<=e;d++)a.current.getPage(d).then((e=>{const t=e.getViewport({scale:window.devicePixelRatio||1}),n=document.createElement("canvas");n.setAttribute("id","the-canvas"+d),n.height=t.height,n.width=t.width;const a={canvasContext:n.getContext("2d"),viewport:t};return r.appendChild(n),e.render(a).promise.then((()=>new Promise((e=>{setTimeout((()=>{o.current=o.current+n.clientHeight,e(1)}))}))))})).catch((e=>{})).finally((()=>{s--,0===s&&(o.current<n.current.clientHeight&&e<i.current&&setTimeout(u),t(1))}))}else t(0)})).then((()=>{s.current=!1,l.current=e}))};return(0,L.useEffect)((()=>{Dn(["https://fastly.jsdelivr.net/npm/pdfjs-dist@4.7.76/build/pdf.min.mjs","https://fastly.jsdelivr.net/npm/pdfjs-dist@4.7.76/build/pdf.worker.min.mjs"]).then((()=>{window.pdfjsLib.getDocument(t).promise.then((t=>{var n;a.current=t,i.current=t.numPages,u(),null===(n=null==e?void 0:e.onSuccess)||void 0===n||n.call(e)})).catch((t=>{var n;null===(n=null==e?void 0:e.onError)||void 0===n||n.call(e,t)}))}))}),[t]),(0,h.jsx)("div",{ref:n,className:Ln.L,onScroll:e=>{const t=e.target.scrollTop;t>r.current&&l.current<i.current&&t>o.current-200-n.current.clientHeight&&u(),r.current=t}})}In.styleTagTransform=k(),In.setAttributes=z(),In.insert=C().bind(null,"head"),In.domAPI=j(),In.insertStyleElement=O(),v()(Ln.A,In),Ln.A&&Ln.A.locals&&Ln.A.locals;var Tn=p(685),Rn={};Rn.styleTagTransform=k(),Rn.setAttributes=z(),Rn.insert=C().bind(null,"head"),Rn.domAPI=j(),Rn.insertStyleElement=O(),v()(Tn.A,Rn),Tn.A&&Tn.A.locals&&Tn.A.locals;var _n=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function Hn(e){const t=(0,L.useRef)(null);return(0,L.useEffect)((()=>{Dn(["https://fastly.jsdelivr.net/npm/x-data-spreadsheet@1.1.9/dist/xspreadsheet.js","https://fastly.jsdelivr.net/npm/x-data-spreadsheet@1.1.9/dist/xspreadsheet.css","https://fastly.jsdelivr.net/npm/xlsx@0.18.5/dist/xlsx.full.min.js"]).then((()=>_n(this,void 0,void 0,(function*(){fetch(e.filePath).then((n=>{n.arrayBuffer().then((function(n){var r;const a=window.XLSX.read(n);window.x_spreadsheet(t.current,{mode:"read",showToolbar:!1,showContextmenu:!1,view:{height:()=>t.current.clientHeight,width:()=>t.current.clientWidth}}).loadData(function(e){const t=[];return e.SheetNames.forEach((function(n){const r={name:n,rows:{}},a=e.Sheets[n];if(!a||!a["!ref"])return;const i=XLSX.utils.decode_range(a["!ref"]);i.s={r:0,c:0};const o=XLSX.utils.sheet_to_json(a,{raw:!1,header:1,range:i});o.forEach((function(e,t){const n={};e.forEach((function(e,r){n[r]={text:e||String(e)};const i=XLSX.utils.encode_cell({r:t,c:r});null!=a[i]&&null!=a[i].f&&(n[r].text="="+a[i].f)})),r.rows[t]={cells:n}})),r.rows.len=o.length,r.merges=[],(a["!merges"]||[]).forEach((function(e,t){null==r.rows[e.s.r]&&(r.rows[e.s.r]={cells:{}}),null==r.rows[e.s.r].cells[e.s.c]&&(r.rows[e.s.r].cells[e.s.c]={}),r.rows[e.s.r].cells[e.s.c].merge=[e.e.r-e.s.r,e.e.c-e.s.c],r.merges[t]=XLSX.utils.encode_range(e)})),t.push(r)})),t}(a)),null===(r=null==e?void 0:e.onSuccess)||void 0===r||r.call(e)})).catch((e=>{throw e}))})).catch((t=>{var n;console.log(t),null===(n=null==e?void 0:e.onError)||void 0===n||n.call(e,t)}))}))))}),[]),(0,h.jsx)("div",{ref:t,className:Tn.L})}var Mn=p(913),Gn={};function Bn(e){return(0,h.jsx)("div",{className:Mn.LV,children:(0,h.jsx)("img",{src:e.filePath,onError:t=>{var n;console.log("+++ img error"),null===(n=null==e?void 0:e.onError)||void 0===n||n.call(e,t)},onLoad:()=>{var t;null===(t=null==e?void 0:e.onSuccess)||void 0===t||t.call(e)},className:Mn._8})})}Gn.styleTagTransform=k(),Gn.setAttributes=z(),Gn.insert=C().bind(null,"head"),Gn.domAPI=j(),Gn.insertStyleElement=O(),v()(Mn.Ay,Gn),Mn.Ay&&Mn.Ay.locals&&Mn.Ay.locals;var qn=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function Vn(e){const t=(0,L.useRef)(null);return(0,L.useEffect)((()=>{(()=>{qn(this,void 0,void 0,(function*(){var n,r;yield Dn(["https://fastly.jsdelivr.net/npm/vditor@3.10.6/dist/index.css","https://fastly.jsdelivr.net/npm/vditor@3.10.6/dist/method.min.js"]);try{const r=yield fetch(e.filePath).then((e=>e.text()));window.Vditor.preview(t.current,r,{}),null===(n=null==e?void 0:e.onSuccess)||void 0===n||n.call(e)}catch(t){null===(r=null==e?void 0:e.onError)||void 0===r||r.call(e,t)}}))})()}),[]),(0,h.jsx)("div",{ref:t,style:{height:"100%",overflow:"auto"}})}var $n=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function Zn(e){const[t,n]=(0,L.useState)("");return(0,L.useEffect)((()=>{(()=>{$n(this,void 0,void 0,(function*(){var t,r;try{const r=yield fetch(e.filePath).then((e=>e.text()));n(r),null===(t=null==e?void 0:e.onSuccess)||void 0===t||t.call(e)}catch(t){null===(r=null==e?void 0:e.onError)||void 0===r||r.call(e,t)}}))})()}),[]),(0,h.jsx)("div",{children:t})}const Kn=(e=>{var t={};return p.d(t,e),t})({default:()=>s.default});var Xn=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function Qn(e){const[t,n]=(0,L.useState)(),[r,a]=(0,L.useState)(!1),[i,o]=(0,L.useState)(),[l,s]=(0,L.useState)(1);if((0,L.useEffect)((()=>{(()=>{Xn(this,void 0,void 0,(function*(){var t,r;try{yield fetch(e.filePath).then((e=>e.text().then((e=>{try{const t=JSON.parse(e);n(t)}catch(t){const n=e.split("\n");a(!0),o(n)}})))),null===(t=null==e?void 0:e.onSuccess)||void 0===t||t.call(e)}catch(t){null===(r=null==e?void 0:e.onError)||void 0===r||r.call(e,t)}}))})()}),[]),t)return(0,h.jsx)("div",{style:{height:"100%",overflow:"auto",wordBreak:"break-all"},children:(0,h.jsx)(Kn.default,{name:!1,src:t,displayObjectSize:!1,displayDataTypes:!1,enableClipboard:!1})});if(i){const e=i.slice(0,10*l),t=[];return e.forEach(((e,n)=>{try{const r=JSON.parse(e);t.push((0,h.jsx)(Kn.default,{name:!1,src:r,displayObjectSize:!1,displayDataTypes:!1,enableClipboard:!1},n))}catch(r){t.push((0,h.jsx)("div",{children:e},n))}})),(0,h.jsxs)("div",{style:{height:"100%",overflow:"auto",wordBreak:"break-all"},children:[t,10*l<i.length?(0,h.jsx)("div",{children:(0,h.jsx)(w.Button,{type:"link",onClick:()=>{s((e=>e+1))},children:"show more"})}):null]})}return null}var Wn=p(690),Jn={};function Yn(e){var t,n,r;const{filePath:a}=e,[i,o]=(0,L.useState)(!1),[l,s]=(0,L.useState)(!0),u=t=>{var n;s(!1),o(!0),null===(n=null==e?void 0:e.onError)||void 0===n||n.call(e,t)},d=()=>{var t;s(!1),null===(t=null==e?void 0:e.onSuccess)||void 0===t||t.call(e)};let c=null;if(i)c=(0,h.jsx)("div",{className:Wn.LV,children:"获取文件失败"});else if(a){const t=(0,Fn.getFileExt)(a),n=(0,h.jsx)("div",{className:Wn.D5,children:(0,h.jsx)(w.Spin,{})});let r=null,i=!0;switch(t){case"pdf":r=(0,h.jsx)(Un,Object.assign({},e,{onError:u,onSuccess:d}));break;case"xlsx":case"csv":r=(0,h.jsx)(Hn,Object.assign({},e,{onError:u,onSuccess:d}));break;case"png":case"jpg":case"jpeg":r=(0,h.jsx)(Bn,Object.assign({},e,{onError:u,onSuccess:d}));break;case"md":r=(0,h.jsx)(Vn,Object.assign({},e,{onError:u,onSuccess:d}));break;case"txt":r=(0,h.jsx)(Zn,Object.assign({},e,{onError:u,onSuccess:d}));break;case"jsonl":case"json":r=(0,h.jsx)(Qn,Object.assign({},e,{onError:u,onSuccess:d}));break;default:i=!1}c=i?(0,h.jsxs)(h.Fragment,{children:[l&&n,r]}):(0,h.jsxs)("div",{className:Wn.LV,children:["暂不支持",t,"文件预览"]})}return e.openInModal?(null===(t=null==e?void 0:e.modalProps)||void 0===t?void 0:t.show)?(0,h.jsx)(w.Modal,{open:!0,title:null===(n=null==e?void 0:e.modalProps)||void 0===n?void 0:n.title,className:Wn.qf,centered:!0,width:"100%",onCancel:null===(r=null==e?void 0:e.modalProps)||void 0===r?void 0:r.onCancel,footer:null,children:c}):null:c}function er(e){const[t,n]=(0,L.useState)(0),[r,a]=(0,L.useState)(e.filePath);return(0,L.useEffect)((()=>{r!==e.filePath&&(a(e.filePath),n(t+1))}),[e.filePath]),r!==e.filePath?null:(0,h.jsx)(Yn,Object.assign({},e),t)}Jn.styleTagTransform=k(),Jn.setAttributes=z(),Jn.insert=C().bind(null,"head"),Jn.domAPI=j(),Jn.insertStyleElement=O(),v()(Wn.Ay,Jn),Wn.Ay&&Wn.Ay.locals&&Wn.Ay.locals;const tr=(e=>{var t={};return p.d(t,e),t})({default:()=>u.default});var nr=p(860),rr={};rr.styleTagTransform=k(),rr.setAttributes=z(),rr.insert=C().bind(null,"head"),rr.domAPI=j(),rr.insertStyleElement=O(),v()(nr.A,rr),nr.A&&nr.A.locals&&nr.A.locals;const ar=(e=>{var t={};return p.d(t,e),t})({default:()=>d.default}),ir={zh:"已复制",en:"Copied"};function or(e){const{showFeedback:t=!0,text:n,locale:r="zh"}=e;return(0,h.jsx)("span",{className:(0,ar.default)(nr.K,"data-hub-ui-copy-icon"),onClick:()=>{n&&((0,tr.default)(n),t&&w.message.success(ir[r])),(null==e?void 0:e.onClick)&&e.onClick()},children:""})}function lr(e,t={showFeedback:!0,locale:"zh"}){const{showFeedback:n="true",locale:r="zh"}=t;e&&((0,tr.default)(e),n&&w.message.success(ir[r]))}var sr=p(100),ur={};function dr(e){return(0,h.jsx)(w.Modal,Object.assign({},e,{wrapClassName:sr.wm,width:400}))}ur.styleTagTransform=k(),ur.setAttributes=z(),ur.insert=C().bind(null,"head"),ur.domAPI=j(),ur.insertStyleElement=O(),v()(sr.Ay,ur),sr.Ay&&sr.Ay.locals&&sr.Ay.locals,dr.confirm=e=>{w.Modal.confirm(Object.assign({},e)).update({icon:null,closable:!0,width:400,wrapClassName:`${sr.DE}`})};var cr=p(989),fr={};fr.styleTagTransform=k(),fr.setAttributes=z(),fr.insert=C().bind(null,"head"),fr.domAPI=j(),fr.insertStyleElement=O(),v()(cr.Ay,fr),cr.Ay&&cr.Ay.locals&&cr.Ay.locals;const pr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAARCAYAAADUryzEAAAAAXNSR0IArs4c6QAAAf1JREFUOE+lkz9oE3EUx7/vd0nbOPing5RSKJ0q+GdVUCkOLh2qQ4lLtfVsESlpTEsql2bIUNI2htSLONleKjqUc1BxE3QQCuJSKAg6aKfqIqiQao7mfq/cNXckscGAv+l+777v897v/b4/wn8uapQfyedbj1Kos2xL+3jnka1wOGzvp/0LMJtd6hYBoRFwFcCBStJvBh4TI6PF1C/VoBpAWi/0E/MzAC0NOttmlkOJ2Ohz778PSOceniehvG1mJEIop+9MDL93tC7ANE3l89fiBwC9zQBA+Gj96DmZSl0ou4D0ojFIhKd+MvMaE70mIFmJ3QVwFsA5T2NLOZCcHH3pAuYXjQUmTFdV/yVh9wpWVEBCEhsCyicAh3wNQdei6m0XMHfPWAVwpW66P1uZepyYRbzJwOGa4zFeaDH18h5AN1bAGK4REObaJGWcWEnwNBhaHeCRFlNHKh0sTwGU9QTMMEOgmyXiDSfWxnSqBF4B4ZKvIZpKRK/nXEDmQaHD3uFvVRUc45QIaK9c1XfeM5VnLNjS6kpO3tryfTCvF/LMHGnmGpn4fiJ6Y8L3gfORy5khSxTfADjzD8g7K/jnYmp8vFgDcDap/JODLbwzS406YeiBcmAmHr+27RXZ9zWms4VjCHAfQZwgyKAE1oOK/SoeGdus767hc25mFo5mF83NrRLVZKusAAAAAElFTkSuQmCC";function br({visiable:e,children:t,onClose:n}){const[r,a]=(0,L.useState)(!1);return(0,L.useEffect)((()=>{a(e)}),[e]),r?(0,h.jsxs)("div",{className:cr.LV,children:[(0,h.jsx)("div",{style:{backgroundImage:"url("+pr+")"},className:cr.Kk,onClick:()=>n()}),(0,h.jsx)("div",{className:cr.NI,children:t})]}):null}var hr=p(150),mr={};function gr(e){return(0,h.jsx)("div",{className:`${hr.cQ} ${"workflow"===e.type?hr._b:hr.Og}`,children:e.children})}function wr(e){return(0,h.jsx)("div",{className:`${hr.Rp} ${"workflow"===e.type?hr._b:hr.Og}`,children:e.children})}function yr(e){return(0,h.jsxs)("div",{children:["small"===(null==e?void 0:e.size)&&(0,h.jsx)(wr,Object.assign({},e)),(!(null==e?void 0:e.size)||"middle"===(null==e?void 0:e.size))&&(0,h.jsx)(gr,Object.assign({},e))]})}mr.styleTagTransform=k(),mr.setAttributes=z(),mr.insert=C().bind(null,"head"),mr.domAPI=j(),mr.insertStyleElement=O(),v()(hr.Ay,mr),hr.Ay&&hr.Ay.locals&&hr.Ay.locals;var vr=b.NF,xr=b.LZ,jr=b.QR,Sr=b.dA,Cr=b.Lq,Ar=b.Bx,zr=b.l0,Nr=b.Ow,Or=b.Y9,Er=b.ly,kr=b._2,Pr=b.WI,Fr=b.C;export{vr as BenchCard,xr as ConfirmAgain,jr as Copy,Sr as FilePreview,Cr as FileUploadDrawer,Ar as FileUploadModal,zr as FileUploader,Nr as FloatingLayer,Or as Header,Er as InputTag,kr as UploadDrawerUploadStoreProvider,Pr as UploadStoreProvider,Fr as copy};
|
|
1
|
+
import*as e from"react/jsx-runtime";import*as t from"antd";import*as n from"react";import*as r from"@ant-design/icons";import*as a from"axios";import*as i from"jotai";import*as o from"jotai-scope";import*as l from"@zjlab-fe/util";import*as s from"react-json-view";import*as u from"react-error-boundary";import*as d from"copy-to-clipboard";import*as c from"classnames";var f={868:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(245),a=n.n(r),i=n(526),o=n.n(i)()(a());o.push([e.id,".zjlab-fe-data-hub-ui-default-drag-area {margin-bottom: 1.25rem;display: flex;flex-direction: column;align-items: center;justify-content: center;gap: 1rem;border-radius: 10px;border-width: 1px;border-style: dashed;border-color: rgb(23 117 254 / 0.4);padding-top: 1rem;padding-bottom: 1rem\n}.zjlab-fe-data-hub-ui-default-drag-area:hover {--tw-border-opacity: 1;border-color: rgb(23 117 254 / var(--tw-border-opacity))\n}",""]);const l=o},884:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(245),a=n.n(r),i=n(526),o=n.n(i)()(a());o.push([e.id,'@layer tailwind-base, antd;.zjlab-fe-data-hub-ui-file-uploader .absolute{\nposition: absolute;}.zjlab-fe-data-hub-ui-file-uploader .relative{\nposition: relative;}.zjlab-fe-data-hub-ui-file-uploader .right-0{\nright: 0px;}.zjlab-fe-data-hub-ui-file-uploader .m-0{\nmargin: 0px;}.zjlab-fe-data-hub-ui-file-uploader .my-2{\nmargin-top: 0.5rem;\nmargin-bottom: 0.5rem;}.zjlab-fe-data-hub-ui-file-uploader .my-2\\.5{\nmargin-top: 0.625rem;\nmargin-bottom: 0.625rem;}.zjlab-fe-data-hub-ui-file-uploader .my-4{\nmargin-top: 1rem;\nmargin-bottom: 1rem;}.zjlab-fe-data-hub-ui-file-uploader .mb-2{\nmargin-bottom: 0.5rem;}.zjlab-fe-data-hub-ui-file-uploader .mb-4{\nmargin-bottom: 1rem;}.zjlab-fe-data-hub-ui-file-uploader .mb-5{\nmargin-bottom: 1.25rem;}.zjlab-fe-data-hub-ui-file-uploader .mr-1{\nmargin-right: 0.25rem;}.zjlab-fe-data-hub-ui-file-uploader .mt-20{\nmargin-top: 5rem;}.zjlab-fe-data-hub-ui-file-uploader .mt-4{\nmargin-top: 1rem;}.zjlab-fe-data-hub-ui-file-uploader .flex{\ndisplay: flex;}.zjlab-fe-data-hub-ui-file-uploader .flow-root{\ndisplay: flow-root;}.zjlab-fe-data-hub-ui-file-uploader .hidden{\ndisplay: none;}.zjlab-fe-data-hub-ui-file-uploader .h-4{\nheight: 1rem;}.zjlab-fe-data-hub-ui-file-uploader .h-5{\nheight: 1.25rem;}.zjlab-fe-data-hub-ui-file-uploader .h-6{\nheight: 1.5rem;}.zjlab-fe-data-hub-ui-file-uploader .h-8{\nheight: 2rem;}.zjlab-fe-data-hub-ui-file-uploader .max-h-72{\nmax-height: 18rem;}.zjlab-fe-data-hub-ui-file-uploader .w-4{\nwidth: 1rem;}.zjlab-fe-data-hub-ui-file-uploader .w-40{\nwidth: 10rem;}.zjlab-fe-data-hub-ui-file-uploader .w-5{\nwidth: 1.25rem;}.zjlab-fe-data-hub-ui-file-uploader .w-6{\nwidth: 1.5rem;}.zjlab-fe-data-hub-ui-file-uploader .cursor-pointer{\ncursor: pointer;}.zjlab-fe-data-hub-ui-file-uploader .items-center{\nalign-items: center;}.zjlab-fe-data-hub-ui-file-uploader .justify-center{\njustify-content: center;}.zjlab-fe-data-hub-ui-file-uploader .justify-between{\njustify-content: space-between;}.zjlab-fe-data-hub-ui-file-uploader .gap-1{\ngap: 0.25rem;}.zjlab-fe-data-hub-ui-file-uploader .gap-4{\ngap: 1rem;}.zjlab-fe-data-hub-ui-file-uploader .overflow-y-auto{\noverflow-y: auto;}.zjlab-fe-data-hub-ui-file-uploader .truncate{\noverflow: hidden;\ntext-overflow: ellipsis;\nwhite-space: nowrap;}.zjlab-fe-data-hub-ui-file-uploader .rounded{\nborder-radius: 0.25rem;}.zjlab-fe-data-hub-ui-file-uploader .border{\nborder-width: 1px;}.zjlab-fe-data-hub-ui-file-uploader .border-solid{\nborder-style: solid;}.zjlab-fe-data-hub-ui-file-uploader .border-dashed{\nborder-style: dashed;}.zjlab-fe-data-hub-ui-file-uploader .border-\\[\\#1775FE\\]{\n--tw-border-opacity: 1;\nborder-color: rgb(23 117 254 / var(--tw-border-opacity));}.zjlab-fe-data-hub-ui-file-uploader .border-gray-3{\n--tw-border-opacity: 1;\nborder-color: rgb(217 224 237 / var(--tw-border-opacity));}.zjlab-fe-data-hub-ui-file-uploader .border-gray-300{\n--tw-border-opacity: 1;\nborder-color: rgb(209 213 219 / var(--tw-border-opacity));}.zjlab-fe-data-hub-ui-file-uploader .border-green-600{\n--tw-border-opacity: 1;\nborder-color: rgb(22 163 74 / var(--tw-border-opacity));}.zjlab-fe-data-hub-ui-file-uploader .bg-\\[\\#F5F7FA\\]{\n--tw-bg-opacity: 1;\nbackground-color: rgb(245 247 250 / var(--tw-bg-opacity));}.zjlab-fe-data-hub-ui-file-uploader .bg-gray-50{\n--tw-bg-opacity: 1;\nbackground-color: rgb(249 250 251 / var(--tw-bg-opacity));}.zjlab-fe-data-hub-ui-file-uploader .p-2{\npadding: 0.5rem;}.zjlab-fe-data-hub-ui-file-uploader .p-4{\npadding: 1rem;}.zjlab-fe-data-hub-ui-file-uploader .px-3{\npadding-left: 0.75rem;\npadding-right: 0.75rem;}.zjlab-fe-data-hub-ui-file-uploader .px-4{\npadding-left: 1rem;\npadding-right: 1rem;}.zjlab-fe-data-hub-ui-file-uploader .text-center{\ntext-align: center;}.zjlab-fe-data-hub-ui-file-uploader .text-2xl{\nfont-size: 1.5rem;\nline-height: 2rem;}.zjlab-fe-data-hub-ui-file-uploader .text-5xl{\nfont-size: 3rem;\nline-height: 1;}.zjlab-fe-data-hub-ui-file-uploader .text-base{\nfont-size: 1rem;\nline-height: 1.5rem;}.zjlab-fe-data-hub-ui-file-uploader .text-sm{\nfont-size: 0.875rem;\nline-height: 1.25rem;}.zjlab-fe-data-hub-ui-file-uploader .text-gray-5{\n--tw-text-opacity: 1;\ncolor: rgb(135 144 158 / var(--tw-text-opacity));}.zjlab-fe-data-hub-ui-file-uploader .text-gray-7{\n--tw-text-opacity: 1;\ncolor: rgb(84 91 100 / var(--tw-text-opacity));}.zjlab-fe-data-hub-ui-file-uploader .text-green-600{\n--tw-text-opacity: 1;\ncolor: rgb(22 163 74 / var(--tw-text-opacity));}.zjlab-fe-data-hub-ui-file-uploader .text-green-green{\n--tw-text-opacity: 1;\ncolor: rgb(83 195 27 / var(--tw-text-opacity));}.zjlab-fe-data-hub-ui-file-uploader .text-red-600{\n--tw-text-opacity: 1;\ncolor: rgb(220 38 38 / var(--tw-text-opacity));}.zjlab-fe-data-hub-ui-file-uploader .text-red-red{\n--tw-text-opacity: 1;\ncolor: rgb(254 77 79 / var(--tw-text-opacity));}.zjlab-fe-data-hub-ui-file-uploader .text-yellow-500{\n--tw-text-opacity: 1;\ncolor: rgb(234 179 8 / var(--tw-text-opacity));}.zjlab-fe-data-hub-ui-file-uploader .opacity-0{\nopacity: 0;}.zjlab-fe-data-hub-ui-file-uploader .filter{\nfilter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);}.zjlab-fe-data-hub-ui-file-uploader .transition-opacity{\ntransition-property: opacity;\ntransition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\ntransition-duration: 150ms;}.zjlab-fe-data-hub-ui-file-uploader .transition-transform{\ntransition-property: transform;\ntransition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\ntransition-duration: 150ms;}@layer tailwind-base{.zjlab-fe-data-hub-ui-file-uploader *, .zjlab-fe-data-hub-ui-file-uploader ::before, .zjlab-fe-data-hub-ui-file-uploader ::after{\n--tw-border-spacing-x: 0;\n--tw-border-spacing-y: 0;\n--tw-translate-x: 0;\n--tw-translate-y: 0;\n--tw-rotate: 0;\n--tw-skew-x: 0;\n--tw-skew-y: 0;\n--tw-scale-x: 1;\n--tw-scale-y: 1;\n--tw-pan-x: ;\n--tw-pan-y: ;\n--tw-pinch-zoom: ;\n--tw-scroll-snap-strictness: proximity;\n--tw-gradient-from-position: ;\n--tw-gradient-via-position: ;\n--tw-gradient-to-position: ;\n--tw-ordinal: ;\n--tw-slashed-zero: ;\n--tw-numeric-figure: ;\n--tw-numeric-spacing: ;\n--tw-numeric-fraction: ;\n--tw-ring-inset: ;\n--tw-ring-offset-width: 0px;\n--tw-ring-offset-color: #fff;\n--tw-ring-color: rgb(59 130 246 / 0.5);\n--tw-ring-offset-shadow: 0 0 #0000;\n--tw-ring-shadow: 0 0 #0000;\n--tw-shadow: 0 0 #0000;\n--tw-shadow-colored: 0 0 #0000;\n--tw-blur: ;\n--tw-brightness: ;\n--tw-contrast: ;\n--tw-grayscale: ;\n--tw-hue-rotate: ;\n--tw-invert: ;\n--tw-saturate: ;\n--tw-sepia: ;\n--tw-drop-shadow: ;\n--tw-backdrop-blur: ;\n--tw-backdrop-brightness: ;\n--tw-backdrop-contrast: ;\n--tw-backdrop-grayscale: ;\n--tw-backdrop-hue-rotate: ;\n--tw-backdrop-invert: ;\n--tw-backdrop-opacity: ;\n--tw-backdrop-saturate: ;\n--tw-backdrop-sepia: ;\n--tw-contain-size: ;\n--tw-contain-layout: ;\n--tw-contain-paint: ;\n--tw-contain-style: ;}.zjlab-fe-data-hub-ui-file-uploader ::backdrop{\n--tw-border-spacing-x: 0;\n--tw-border-spacing-y: 0;\n--tw-translate-x: 0;\n--tw-translate-y: 0;\n--tw-rotate: 0;\n--tw-skew-x: 0;\n--tw-skew-y: 0;\n--tw-scale-x: 1;\n--tw-scale-y: 1;\n--tw-pan-x: ;\n--tw-pan-y: ;\n--tw-pinch-zoom: ;\n--tw-scroll-snap-strictness: proximity;\n--tw-gradient-from-position: ;\n--tw-gradient-via-position: ;\n--tw-gradient-to-position: ;\n--tw-ordinal: ;\n--tw-slashed-zero: ;\n--tw-numeric-figure: ;\n--tw-numeric-spacing: ;\n--tw-numeric-fraction: ;\n--tw-ring-inset: ;\n--tw-ring-offset-width: 0px;\n--tw-ring-offset-color: #fff;\n--tw-ring-color: rgb(59 130 246 / 0.5);\n--tw-ring-offset-shadow: 0 0 #0000;\n--tw-ring-shadow: 0 0 #0000;\n--tw-shadow: 0 0 #0000;\n--tw-shadow-colored: 0 0 #0000;\n--tw-blur: ;\n--tw-brightness: ;\n--tw-contrast: ;\n--tw-grayscale: ;\n--tw-hue-rotate: ;\n--tw-invert: ;\n--tw-saturate: ;\n--tw-sepia: ;\n--tw-drop-shadow: ;\n--tw-backdrop-blur: ;\n--tw-backdrop-brightness: ;\n--tw-backdrop-contrast: ;\n--tw-backdrop-grayscale: ;\n--tw-backdrop-hue-rotate: ;\n--tw-backdrop-invert: ;\n--tw-backdrop-opacity: ;\n--tw-backdrop-saturate: ;\n--tw-backdrop-sepia: ;\n--tw-contain-size: ;\n--tw-contain-layout: ;\n--tw-contain-paint: ;\n--tw-contain-style: ;}/*\n! tailwindcss v3.4.13 | MIT License | https://tailwindcss.com\n*//*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader *,\n.zjlab-fe-data-hub-ui-file-uploader ::before,\n.zjlab-fe-data-hub-ui-file-uploader ::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n.zjlab-fe-data-hub-ui-file-uploader ::before,\n.zjlab-fe-data-hub-ui-file-uploader ::after {\n --tw-content: \'\';\n}\n\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user\'s configured `sans` font-family by default.\n5. Use the user\'s configured `sans` font-feature-settings by default.\n6. Use the user\'s configured `sans` font-variation-settings by default.\n7. Disable tap highlights on iOS\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader html,\n.zjlab-fe-data-hub-ui-file-uploader :host {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n -moz-tab-size: 4; /* 3 */\n -o-tab-size: 4;\n tab-size: 4; /* 3 */\n font-family: AlibabaPuHuiTi-3-55-RegularL3, ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; /* 4 */\n font-feature-settings: normal; /* 5 */\n font-variation-settings: normal; /* 6 */\n -webkit-tap-highlight-color: transparent; /* 7 */\n}\n\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader body {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader hr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/*\nRemove the default font size and weight for headings.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader h1,\n.zjlab-fe-data-hub-ui-file-uploader h2,\n.zjlab-fe-data-hub-ui-file-uploader h3,\n.zjlab-fe-data-hub-ui-file-uploader h4,\n.zjlab-fe-data-hub-ui-file-uploader h5,\n.zjlab-fe-data-hub-ui-file-uploader h6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader a {\n color: inherit;\n text-decoration: inherit;\n}\n\n/*\nAdd the correct font weight in Edge and Safari.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader b,\n.zjlab-fe-data-hub-ui-file-uploader strong {\n font-weight: bolder;\n}\n\n/*\n1. Use the user\'s configured `mono` font-family by default.\n2. Use the user\'s configured `mono` font-feature-settings by default.\n3. Use the user\'s configured `mono` font-variation-settings by default.\n4. Correct the odd `em` font sizing in all browsers.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader code,\n.zjlab-fe-data-hub-ui-file-uploader kbd,\n.zjlab-fe-data-hub-ui-file-uploader samp,\n.zjlab-fe-data-hub-ui-file-uploader pre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */\n font-feature-settings: normal; /* 2 */\n font-variation-settings: normal; /* 3 */\n font-size: 1em; /* 4 */\n}\n\n/*\nAdd the correct font size in all browsers.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader small {\n font-size: 80%;\n}\n\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader sub,\n.zjlab-fe-data-hub-ui-file-uploader sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\n.zjlab-fe-data-hub-ui-file-uploader sub {\n bottom: -0.25em;\n}\n\n.zjlab-fe-data-hub-ui-file-uploader sup {\n top: -0.5em;\n}\n\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader table {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader button,\n.zjlab-fe-data-hub-ui-file-uploader input,\n.zjlab-fe-data-hub-ui-file-uploader optgroup,\n.zjlab-fe-data-hub-ui-file-uploader select,\n.zjlab-fe-data-hub-ui-file-uploader textarea {\n font-family: inherit; /* 1 */\n font-feature-settings: inherit; /* 1 */\n font-variation-settings: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n letter-spacing: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader button,\n.zjlab-fe-data-hub-ui-file-uploader select {\n text-transform: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader button,\n.zjlab-fe-data-hub-ui-file-uploader input:where([type=\'button\']),\n.zjlab-fe-data-hub-ui-file-uploader input:where([type=\'reset\']),\n.zjlab-fe-data-hub-ui-file-uploader input:where([type=\'submit\']) {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader :-moz-focusring {\n outline: auto;\n}\n\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader :-moz-ui-invalid {\n box-shadow: none;\n}\n\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader progress {\n vertical-align: baseline;\n}\n\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader ::-webkit-inner-spin-button,\n.zjlab-fe-data-hub-ui-file-uploader ::-webkit-outer-spin-button {\n height: auto;\n}\n\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader [type=\'search\'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader ::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader ::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader summary {\n display: list-item;\n}\n\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader blockquote,\n.zjlab-fe-data-hub-ui-file-uploader dl,\n.zjlab-fe-data-hub-ui-file-uploader dd,\n.zjlab-fe-data-hub-ui-file-uploader h1,\n.zjlab-fe-data-hub-ui-file-uploader h2,\n.zjlab-fe-data-hub-ui-file-uploader h3,\n.zjlab-fe-data-hub-ui-file-uploader h4,\n.zjlab-fe-data-hub-ui-file-uploader h5,\n.zjlab-fe-data-hub-ui-file-uploader h6,\n.zjlab-fe-data-hub-ui-file-uploader hr,\n.zjlab-fe-data-hub-ui-file-uploader figure,\n.zjlab-fe-data-hub-ui-file-uploader p,\n.zjlab-fe-data-hub-ui-file-uploader pre {\n margin: 0;\n}\n\n.zjlab-fe-data-hub-ui-file-uploader fieldset {\n margin: 0;\n padding: 0;\n}\n\n.zjlab-fe-data-hub-ui-file-uploader legend {\n padding: 0;\n}\n\n.zjlab-fe-data-hub-ui-file-uploader ol,\n.zjlab-fe-data-hub-ui-file-uploader ul,\n.zjlab-fe-data-hub-ui-file-uploader menu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/*\nReset default styling for dialogs.\n*/\n.zjlab-fe-data-hub-ui-file-uploader dialog {\n padding: 0;\n}\n\n/*\nPrevent resizing textareas horizontally by default.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader textarea {\n resize: vertical;\n}\n\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user\'s configured gray 400 color.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader input::-moz-placeholder, .zjlab-fe-data-hub-ui-file-uploader textarea::-moz-placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\n.zjlab-fe-data-hub-ui-file-uploader input::placeholder,\n.zjlab-fe-data-hub-ui-file-uploader textarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\n/*\nSet the default cursor for buttons.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader button,\n.zjlab-fe-data-hub-ui-file-uploader [role="button"] {\n cursor: pointer;\n}\n\n/*\nMake sure disabled buttons don\'t get the pointer cursor.\n*/\n.zjlab-fe-data-hub-ui-file-uploader :disabled {\n cursor: default;\n}\n\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader img,\n.zjlab-fe-data-hub-ui-file-uploader svg,\n.zjlab-fe-data-hub-ui-file-uploader video,\n.zjlab-fe-data-hub-ui-file-uploader canvas,\n.zjlab-fe-data-hub-ui-file-uploader audio,\n.zjlab-fe-data-hub-ui-file-uploader iframe,\n.zjlab-fe-data-hub-ui-file-uploader embed,\n.zjlab-fe-data-hub-ui-file-uploader object {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\n\n.zjlab-fe-data-hub-ui-file-uploader img,\n.zjlab-fe-data-hub-ui-file-uploader video {\n max-width: 100%;\n height: auto;\n}\n\n/* Make elements with the HTML hidden attribute stay hidden by default */\n.zjlab-fe-data-hub-ui-file-uploader [hidden] {\n display: none;\n}}@font-face{font-family:"AlibabaPuHuiTi-3-55-RegularL3";src:url("//geocloud.oss-cn-hangzhou-zjy-d01-a.ops.cloud.zhejianglab.com//homepageusers/alibaba_puhuiti_3/AlibabaPuHuiTi-3-55-RegularL3.ttf") format("truetype")}@font-face{font-family:"AlibabaPuHuiTi-3-65-Medium";src:url("//geocloud.oss-cn-hangzhou-zjy-d01-a.ops.cloud.zhejianglab.com//homepageusers/alibaba_puhuiti_3/AlibabaPuHuiTi-3-65-Medium.ttf") format("truetype")}.last\\:mb-0:last-child{\nmargin-bottom: 0px;}.hover\\:border-green-600:hover{\n--tw-border-opacity: 1;\nborder-color: rgb(22 163 74 / var(--tw-border-opacity));}.hover\\:bg-assist-bg-blue:hover{\n--tw-bg-opacity: 1;\nbackground-color: rgb(244 246 250 / var(--tw-bg-opacity));}.group:hover .group-hover\\:-translate-x-10{\n--tw-translate-x: -2.5rem;\ntransform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));}.group:hover .group-hover\\:-translate-x-6{\n--tw-translate-x: -1.5rem;\ntransform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));}.group:hover .group-hover\\:opacity-100{\nopacity: 1;}',""]);const l=o},915:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(245),a=n.n(r),i=n(526),o=n.n(i)()(a());o.push([e.id,".zjlab-fe-data-hub-ui-modal .ant-modal-title,.zjlab-fe-data-hub-ui-modal .ant-modal-confirm-title {\n font-family: AlibabaPuHuiTi-3-65-Medium;\n font-size: 1.125rem;\n font-weight: 400;\n line-height: 1.5rem\n}",""]);const l=o},150:(e,t,n)=>{n.d(t,{Ay:()=>c,Og:()=>u,Rp:()=>d,_b:()=>s,cQ:()=>l});var r=n(245),a=n.n(r),i=n(526),o=n.n(i)()(a());o.push([e.id,".QmFviLMZ5ad2m0mLbKkP{width:349px;height:280px;border-radius:10px 10px 10px 10px}.ZJu8EO9kRspWAqZAD0d_{background:linear-gradient(to top, #ffffff 0%, #f6f9fe 100%);border:1px solid #edf2fc;-o-border-image:linear-gradient(180deg, rgb(237, 242, 252)) 1 1;border-image:linear-gradient(180deg, rgb(237, 242, 252)) 1 1}.ZJu8EO9kRspWAqZAD0d_:hover{background:linear-gradient(to top, #ffffff 0%, #ecf4ff 100%);box-shadow:0px 8px 16px 0px rgba(7,35,76,.1);border:1px solid #afcfff;-o-border-image:linear-gradient(180deg, rgba(23, 117, 254, 0.6)) 1 1;border-image:linear-gradient(180deg, rgba(23, 117, 254, 0.6)) 1 1}.KS7Y4rDVUCfP7qjdPZap{background:linear-gradient(to top, #ffffff 0%, #f7f5ff 100%);border:1px solid #ebe6ff;-o-border-image:linear-gradient(180deg, rgb(236, 231, 255)) 1 1;border-image:linear-gradient(180deg, rgb(236, 231, 255)) 1 1}.KS7Y4rDVUCfP7qjdPZap:hover{background:linear-gradient(to top, #ffffff 0%, #e3dcff 100%);box-shadow:0px 8px 16px 0px rgba(40,23,92,.1);border:1px solid #c5b4ff;-o-border-image:linear-gradient(180deg, rgba(114, 68, 255, 0.6)) 1 1;border-image:linear-gradient(180deg, rgba(114, 68, 255, 0.6)) 1 1}.mZ5nSrfxkgv2ivcg_v21{width:472px;height:148px;border-radius:10px 10px 10px 10px;position:relative}",""]);var l="QmFviLMZ5ad2m0mLbKkP",s="ZJu8EO9kRspWAqZAD0d_",u="KS7Y4rDVUCfP7qjdPZap",d="mZ5nSrfxkgv2ivcg_v21";const c=o},100:(e,t,n)=>{n.d(t,{Ay:()=>u,DE:()=>s,wm:()=>l});var r=n(245),a=n.n(r),i=n(526),o=n.n(i)()(a());o.push([e.id,'@font-face{font-family:"AlibabaPuHuiTi-3-45-Light";src:url("//geocloud.oss-cn-hangzhou-zjy-d01-a.ops.cloud.zhejianglab.com//homepageusers/alibaba_puhuiti_3/AlibabaPuHuiTi-3-45-Light.ttf") format("truetype")}@font-face{font-family:"AlibabaPuHuiTi-3-75-SemiBold";src:url("//geocloud.oss-cn-hangzhou-zjy-d01-a.ops.cloud.zhejianglab.com//homepageusers/alibaba_puhuiti_3/AlibabaPuHuiTi-3-75-SemiBold.ttf") format("truetype")}.EybT8LL35ZAAECD9qKQX .ant-modal-content{padding:0 24px}.EybT8LL35ZAAECD9qKQX .ant-modal-title{padding-top:50px;font-family:"AlibabaPuHuiTi-3-75-SemiBold";font-weight:normal;font-size:16px;color:#222427;line-height:1.5;text-align:center;font-style:normal;text-transform:none}.EybT8LL35ZAAECD9qKQX .ant-modal-body{font-family:"AlibabaPuHuiTi-3-45-Light";font-weight:normal;font-size:12px;color:#545b64;line-height:14px;text-align:center;font-style:normal;text-transform:none}.EybT8LL35ZAAECD9qKQX .ant-modal-footer{text-align:center;padding:16px 0}.F2kZbP7G9NKG9lg8O_b1 .ant-modal-content{padding:0 24px}.F2kZbP7G9NKG9lg8O_b1 .ant-modal-body{text-align:center}.F2kZbP7G9NKG9lg8O_b1 .ant-modal-confirm-title{padding-top:50px;font-family:"AlibabaPuHuiTi-3-75-SemiBold";font-weight:normal;font-size:16px;color:#222427;line-height:1.5;text-align:center;font-style:normal;text-transform:none}.F2kZbP7G9NKG9lg8O_b1 .ant-modal-confirm-content{font-family:"AlibabaPuHuiTi-3-45-Light";font-weight:normal;font-size:12px;color:#545b64;line-height:14px;text-align:center;font-style:normal;text-transform:none}.F2kZbP7G9NKG9lg8O_b1 .ant-modal-confirm-btns{text-align:center;padding:16px 0}',""]);var l="EybT8LL35ZAAECD9qKQX",s="F2kZbP7G9NKG9lg8O_b1";const u=o},860:(e,t,n)=>{n.d(t,{A:()=>s,K:()=>l});var r=n(245),a=n.n(r),i=n(526),o=n.n(i)()(a());o.push([e.id,'.aTTl5tM6IlquA6EPUX_w{font-family:"hub-iconfont";color:#545b64;font-size:12px;cursor:pointer}.aTTl5tM6IlquA6EPUX_w:hover{color:#1775fe}',""]);var l="aTTl5tM6IlquA6EPUX_w";const s=o},685:(e,t,n)=>{n.d(t,{A:()=>s,L:()=>l});var r=n(245),a=n.n(r),i=n(526),o=n.n(i)()(a());o.push([e.id,".cJmcPSn5LN2GH9HqTvEQ{height:100%;overflow-x:hidden;overflow-y:auto}",""]);var l="cJmcPSn5LN2GH9HqTvEQ";const s=o},913:(e,t,n)=>{n.d(t,{Ay:()=>u,LV:()=>l,_8:()=>s});var r=n(245),a=n.n(r),i=n(526),o=n.n(i)()(a());o.push([e.id,".zuabV0gpCkaY8pSYtOSL{display:flex;align-items:center;justify-content:center;height:100%}.i2GFC308F3s1lGENOI5l{max-width:100%;max-height:100%}",""]);var l="zuabV0gpCkaY8pSYtOSL",s="i2GFC308F3s1lGENOI5l";const u=o},690:(e,t,n)=>{n.d(t,{Ay:()=>d,D5:()=>s,LV:()=>l,qf:()=>u});var r=n(245),a=n.n(r),i=n(526),o=n.n(i)()(a());o.push([e.id,".EVmfUlSj2zzl7igeqp6N{display:flex;align-items:center;justify-content:center;height:100%;overflow:auto;padding-top:16px;padding-bottom:16px}.Z65yBBsFLSWF70wfWwgA{display:flex;align-items:center;justify-content:center;padding-top:16px;padding-bottom:16px}.QSsGpXvLzOYpHSNncjpj .ant-modal-body{height:calc(100vh - 200px);overflow-y:auto}.QSsGpXvLzOYpHSNncjpj .ant-modal-content{padding-top:44px}",""]);var l="EVmfUlSj2zzl7igeqp6N",s="Z65yBBsFLSWF70wfWwgA",u="QSsGpXvLzOYpHSNncjpj";const d=o},482:(e,t,n)=>{n.d(t,{A:()=>s,L:()=>l});var r=n(245),a=n.n(r),i=n(526),o=n.n(i)()(a());o.push([e.id,".GmPZonLTI3KWU6TQWQSo{display:flex;flex-direction:column;align-items:center;height:100%;overflow:auto}.GmPZonLTI3KWU6TQWQSo canvas{max-width:100%}",""]);var l="GmPZonLTI3KWU6TQWQSo";const s=o},989:(e,t,n)=>{n.d(t,{Ay:()=>d,Kk:()=>s,LV:()=>l,NI:()=>u});var r=n(245),a=n.n(r),i=n(526),o=n.n(i)()(a());o.push([e.id,".s1DE3bXbSR3WMxOHGhL4{width:244px;min-height:89px;background:#fff;box-shadow:0px 12px 30px 0px rgba(32,60,48,.2);border-radius:10px 10px 10px 10px;border:1px solid #d9e0ed;z-index:100;position:fixed;bottom:180px;left:calc(50% - 122px)}.ickkjG9C47RxHTbOAWXw{width:16px;height:16px;z-index:101;display:inline-block;border-radius:50%;position:absolute;top:17px;right:17px;cursor:pointer}.dWjTN1AD2WJesHevGU09{padding:17px 10px}",""]);var l="s1DE3bXbSR3WMxOHGhL4",s="ickkjG9C47RxHTbOAWXw",u="dWjTN1AD2WJesHevGU09";const d=o},280:(e,t,n)=>{n.d(t,{Ay:()=>u,LV:()=>l,wm:()=>s});var r=n(245),a=n.n(r),i=n(526),o=n.n(i)()(a());o.push([e.id,".wkk6Lnco5rQ5DK_Bojaj{display:flex;justify-content:space-between;align-items:center;padding:0 16px;background-color:#000}.wkk6Lnco5rQ5DK_Bojaj .H3Num6yF3Ox32Pb6Occg{width:200px}",""]);var l="wkk6Lnco5rQ5DK_Bojaj",s="H3Num6yF3Ox32Pb6Occg";const u=o},588:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(245),a=n.n(r),i=n(526),o=n.n(i)()(a());o.push([e.id,".mylib-upload-drawer *, .mylib-upload-drawer ::before, .mylib-upload-drawer ::after{\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}.mylib-upload-drawer ::backdrop{\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}/*\n! tailwindcss v3.4.13 | MIT License | https://tailwindcss.com\n*//*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/.mylib-upload-drawer *,\n.mylib-upload-drawer ::before,\n.mylib-upload-drawer ::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}.mylib-upload-drawer ::before,\n.mylib-upload-drawer ::after {\n --tw-content: '';\n}/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user's configured `sans` font-family by default.\n5. Use the user's configured `sans` font-feature-settings by default.\n6. Use the user's configured `sans` font-variation-settings by default.\n7. Disable tap highlights on iOS\n*/.mylib-upload-drawer html,\n.mylib-upload-drawer :host {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n -moz-tab-size: 4; /* 3 */\n -o-tab-size: 4;\n tab-size: 4; /* 3 */\n font-family: AlibabaPuHuiTi-3-55-RegularL3, ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\"; /* 4 */\n font-feature-settings: normal; /* 5 */\n font-variation-settings: normal; /* 6 */\n -webkit-tap-highlight-color: transparent; /* 7 */\n}/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/.mylib-upload-drawer body {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/.mylib-upload-drawer hr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/.mylib-upload-drawer abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}/*\nRemove the default font size and weight for headings.\n*/.mylib-upload-drawer h1,\n.mylib-upload-drawer h2,\n.mylib-upload-drawer h3,\n.mylib-upload-drawer h4,\n.mylib-upload-drawer h5,\n.mylib-upload-drawer h6 {\n font-size: inherit;\n font-weight: inherit;\n}/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/.mylib-upload-drawer a {\n color: inherit;\n text-decoration: inherit;\n}/*\nAdd the correct font weight in Edge and Safari.\n*/.mylib-upload-drawer b,\n.mylib-upload-drawer strong {\n font-weight: bolder;\n}/*\n1. Use the user's configured `mono` font-family by default.\n2. Use the user's configured `mono` font-feature-settings by default.\n3. Use the user's configured `mono` font-variation-settings by default.\n4. Correct the odd `em` font sizing in all browsers.\n*/.mylib-upload-drawer code,\n.mylib-upload-drawer kbd,\n.mylib-upload-drawer samp,\n.mylib-upload-drawer pre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; /* 1 */\n font-feature-settings: normal; /* 2 */\n font-variation-settings: normal; /* 3 */\n font-size: 1em; /* 4 */\n}/*\nAdd the correct font size in all browsers.\n*/.mylib-upload-drawer small {\n font-size: 80%;\n}/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/.mylib-upload-drawer sub,\n.mylib-upload-drawer sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}.mylib-upload-drawer sub {\n bottom: -0.25em;\n}.mylib-upload-drawer sup {\n top: -0.5em;\n}/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/.mylib-upload-drawer table {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/.mylib-upload-drawer button,\n.mylib-upload-drawer input,\n.mylib-upload-drawer optgroup,\n.mylib-upload-drawer select,\n.mylib-upload-drawer textarea {\n font-family: inherit; /* 1 */\n font-feature-settings: inherit; /* 1 */\n font-variation-settings: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n letter-spacing: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/.mylib-upload-drawer button,\n.mylib-upload-drawer select {\n text-transform: none;\n}/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/.mylib-upload-drawer button,\n.mylib-upload-drawer input:where([type='button']),\n.mylib-upload-drawer input:where([type='reset']),\n.mylib-upload-drawer input:where([type='submit']) {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}/*\nUse the modern Firefox focus style for all focusable elements.\n*/.mylib-upload-drawer :-moz-focusring {\n outline: auto;\n}/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/.mylib-upload-drawer :-moz-ui-invalid {\n box-shadow: none;\n}/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/.mylib-upload-drawer progress {\n vertical-align: baseline;\n}/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/.mylib-upload-drawer ::-webkit-inner-spin-button,\n.mylib-upload-drawer ::-webkit-outer-spin-button {\n height: auto;\n}/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/.mylib-upload-drawer [type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/.mylib-upload-drawer ::-webkit-search-decoration {\n -webkit-appearance: none;\n}/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/.mylib-upload-drawer ::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}/*\nAdd the correct display in Chrome and Safari.\n*/.mylib-upload-drawer summary {\n display: list-item;\n}/*\nRemoves the default spacing and border for appropriate elements.\n*/.mylib-upload-drawer blockquote,\n.mylib-upload-drawer dl,\n.mylib-upload-drawer dd,\n.mylib-upload-drawer h1,\n.mylib-upload-drawer h2,\n.mylib-upload-drawer h3,\n.mylib-upload-drawer h4,\n.mylib-upload-drawer h5,\n.mylib-upload-drawer h6,\n.mylib-upload-drawer hr,\n.mylib-upload-drawer figure,\n.mylib-upload-drawer p,\n.mylib-upload-drawer pre {\n margin: 0;\n}.mylib-upload-drawer fieldset {\n margin: 0;\n padding: 0;\n}.mylib-upload-drawer legend {\n padding: 0;\n}.mylib-upload-drawer ol,\n.mylib-upload-drawer ul,\n.mylib-upload-drawer menu {\n list-style: none;\n margin: 0;\n padding: 0;\n}/*\nReset default styling for dialogs.\n*/.mylib-upload-drawer dialog {\n padding: 0;\n}/*\nPrevent resizing textareas horizontally by default.\n*/.mylib-upload-drawer textarea {\n resize: vertical;\n}/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user's configured gray 400 color.\n*/.mylib-upload-drawer input::-moz-placeholder, .mylib-upload-drawer textarea::-moz-placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}.mylib-upload-drawer input::placeholder,\n.mylib-upload-drawer textarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}/*\nSet the default cursor for buttons.\n*/.mylib-upload-drawer button,\n.mylib-upload-drawer [role=\"button\"] {\n cursor: pointer;\n}/*\nMake sure disabled buttons don't get the pointer cursor.\n*/.mylib-upload-drawer :disabled {\n cursor: default;\n}/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/.mylib-upload-drawer img,\n.mylib-upload-drawer svg,\n.mylib-upload-drawer video,\n.mylib-upload-drawer canvas,\n.mylib-upload-drawer audio,\n.mylib-upload-drawer iframe,\n.mylib-upload-drawer embed,\n.mylib-upload-drawer object {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/.mylib-upload-drawer img,\n.mylib-upload-drawer video {\n max-width: 100%;\n height: auto;\n}/* Make elements with the HTML hidden attribute stay hidden by default */.mylib-upload-drawer [hidden] {\n display: none;\n}.mylib-upload-drawer .absolute{\n position: absolute;\n}.mylib-upload-drawer .relative{\n position: relative;\n}.mylib-upload-drawer .right-0{\n right: 0px;\n}.mylib-upload-drawer .m-0{\n margin: 0px;\n}.mylib-upload-drawer .my-2{\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n}.mylib-upload-drawer .my-2\\.5{\n margin-top: 0.625rem;\n margin-bottom: 0.625rem;\n}.mylib-upload-drawer .my-4{\n margin-top: 1rem;\n margin-bottom: 1rem;\n}.mylib-upload-drawer .mb-2{\n margin-bottom: 0.5rem;\n}.mylib-upload-drawer .mb-4{\n margin-bottom: 1rem;\n}.mylib-upload-drawer .mb-5{\n margin-bottom: 1.25rem;\n}.mylib-upload-drawer .mr-1{\n margin-right: 0.25rem;\n}.mylib-upload-drawer .mt-20{\n margin-top: 5rem;\n}.mylib-upload-drawer .mt-4{\n margin-top: 1rem;\n}.mylib-upload-drawer .flex{\n display: flex;\n}.mylib-upload-drawer .flow-root{\n display: flow-root;\n}.mylib-upload-drawer .hidden{\n display: none;\n}.mylib-upload-drawer .h-4{\n height: 1rem;\n}.mylib-upload-drawer .h-5{\n height: 1.25rem;\n}.mylib-upload-drawer .h-6{\n height: 1.5rem;\n}.mylib-upload-drawer .h-8{\n height: 2rem;\n}.mylib-upload-drawer .max-h-72{\n max-height: 18rem;\n}.mylib-upload-drawer .w-4{\n width: 1rem;\n}.mylib-upload-drawer .w-40{\n width: 10rem;\n}.mylib-upload-drawer .w-5{\n width: 1.25rem;\n}.mylib-upload-drawer .w-6{\n width: 1.5rem;\n}.mylib-upload-drawer .cursor-pointer{\n cursor: pointer;\n}.mylib-upload-drawer .items-center{\n align-items: center;\n}.mylib-upload-drawer .justify-center{\n justify-content: center;\n}.mylib-upload-drawer .justify-between{\n justify-content: space-between;\n}.mylib-upload-drawer .gap-1{\n gap: 0.25rem;\n}.mylib-upload-drawer .gap-4{\n gap: 1rem;\n}.mylib-upload-drawer .overflow-y-auto{\n overflow-y: auto;\n}.mylib-upload-drawer .truncate{\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}.mylib-upload-drawer .rounded{\n border-radius: 0.25rem;\n}.mylib-upload-drawer .border{\n border-width: 1px;\n}.mylib-upload-drawer .border-solid{\n border-style: solid;\n}.mylib-upload-drawer .border-dashed{\n border-style: dashed;\n}.mylib-upload-drawer .border-\\[\\#1775FE\\]{\n --tw-border-opacity: 1;\n border-color: rgb(23 117 254 / var(--tw-border-opacity));\n}.mylib-upload-drawer .border-gray-3{\n --tw-border-opacity: 1;\n border-color: rgb(217 224 237 / var(--tw-border-opacity));\n}.mylib-upload-drawer .border-gray-300{\n --tw-border-opacity: 1;\n border-color: rgb(209 213 219 / var(--tw-border-opacity));\n}.mylib-upload-drawer .border-green-600{\n --tw-border-opacity: 1;\n border-color: rgb(22 163 74 / var(--tw-border-opacity));\n}.mylib-upload-drawer .bg-\\[\\#F5F7FA\\]{\n --tw-bg-opacity: 1;\n background-color: rgb(245 247 250 / var(--tw-bg-opacity));\n}.mylib-upload-drawer .bg-gray-50{\n --tw-bg-opacity: 1;\n background-color: rgb(249 250 251 / var(--tw-bg-opacity));\n}.mylib-upload-drawer .p-2{\n padding: 0.5rem;\n}.mylib-upload-drawer .p-4{\n padding: 1rem;\n}.mylib-upload-drawer .px-3{\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}.mylib-upload-drawer .px-4{\n padding-left: 1rem;\n padding-right: 1rem;\n}.mylib-upload-drawer .text-center{\n text-align: center;\n}.mylib-upload-drawer .text-2xl{\n font-size: 1.5rem;\n line-height: 2rem;\n}.mylib-upload-drawer .text-5xl{\n font-size: 3rem;\n line-height: 1;\n}.mylib-upload-drawer .text-base{\n font-size: 1rem;\n line-height: 1.5rem;\n}.mylib-upload-drawer .text-sm{\n font-size: 0.875rem;\n line-height: 1.25rem;\n}.mylib-upload-drawer .text-gray-5{\n --tw-text-opacity: 1;\n color: rgb(135 144 158 / var(--tw-text-opacity));\n}.mylib-upload-drawer .text-gray-7{\n --tw-text-opacity: 1;\n color: rgb(84 91 100 / var(--tw-text-opacity));\n}.mylib-upload-drawer .text-green-600{\n --tw-text-opacity: 1;\n color: rgb(22 163 74 / var(--tw-text-opacity));\n}.mylib-upload-drawer .text-green-green{\n --tw-text-opacity: 1;\n color: rgb(83 195 27 / var(--tw-text-opacity));\n}.mylib-upload-drawer .text-red-600{\n --tw-text-opacity: 1;\n color: rgb(220 38 38 / var(--tw-text-opacity));\n}.mylib-upload-drawer .text-red-red{\n --tw-text-opacity: 1;\n color: rgb(254 77 79 / var(--tw-text-opacity));\n}.mylib-upload-drawer .text-yellow-500{\n --tw-text-opacity: 1;\n color: rgb(234 179 8 / var(--tw-text-opacity));\n}.mylib-upload-drawer .opacity-0{\n opacity: 0;\n}.mylib-upload-drawer .filter{\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}.mylib-upload-drawer .transition-opacity{\n transition-property: opacity;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}.mylib-upload-drawer .transition-transform{\n transition-property: transform;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}.last\\:mb-0:last-child{\n margin-bottom: 0px;\n}.hover\\:border-green-600:hover{\n --tw-border-opacity: 1;\n border-color: rgb(22 163 74 / var(--tw-border-opacity));\n}.hover\\:bg-assist-bg-blue:hover{\n --tw-bg-opacity: 1;\n background-color: rgb(244 246 250 / var(--tw-bg-opacity));\n}.group:hover .group-hover\\:-translate-x-10{\n --tw-translate-x: -2.5rem;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}.group:hover .group-hover\\:-translate-x-6{\n --tw-translate-x: -1.5rem;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}.group:hover .group-hover\\:opacity-100{\n opacity: 1;\n}",""]);const l=o},526:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,a,i){"string"==typeof e&&(e=[[null,e,void 0]]);var o={};if(r)for(var l=0;l<this.length;l++){var s=this[l][0];null!=s&&(o[s]=!0)}for(var u=0;u<e.length;u++){var d=[].concat(e[u]);r&&o[d[0]]||(void 0!==i&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=i),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),a&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=a):d[4]="".concat(a)),t.push(d))}},t}},245:e=>{e.exports=function(e){return e[1]}},438:e=>{var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var i={},o=[],l=0;l<e.length;l++){var s=e[l],u=r.base?s[0]+r.base:s[0],d=i[u]||0,c="".concat(u," ").concat(d);i[u]=d+1;var f=n(c),p={css:s[1],media:s[2],sourceMap:s[3],supports:s[4],layer:s[5]};if(-1!==f)t[f].references++,t[f].updater(p);else{var b=a(p,r);r.byIndex=l,t.splice(l,0,{identifier:c,updater:b,references:1})}o.push(c)}return o}function a(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,a){var i=r(e=e||[],a=a||{});return function(e){e=e||[];for(var o=0;o<i.length;o++){var l=n(i[o]);t[l].references--}for(var s=r(e,a),u=0;u<i.length;u++){var d=n(i[u]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}i=s}}},413:e=>{var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},50:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},598:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},119:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var a=void 0!==n.layer;a&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,a&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},615:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},p={};function b(e){var t=p[e];if(void 0!==t)return t.exports;var n=p[e]={id:e,exports:{}};return f[e](n,n.exports,b),n.exports}b.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return b.d(t,{a:t}),t},b.d=(e,t)=>{for(var n in t)b.o(t,n)&&!b.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},b.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),b.nc=void 0;var h={};b.d(h,{NF:()=>xr,LZ:()=>fr,QR:()=>sr,dA:()=>nr,Lq:()=>qe,Bx:()=>Pn,l0:()=>Fn,Ow:()=>mr,Y9:()=>L,ly:()=>U,_2:()=>ue,WI:()=>Ct,C:()=>ur});const m=(g={Fragment:()=>e.Fragment,jsx:()=>e.jsx,jsxs:()=>e.jsxs},w={},b.d(w,g),w);var g,w;const y=(e=>{var t={};return b.d(t,e),t})({Alert:()=>t.Alert,App:()=>t.App,Button:()=>t.Button,Drawer:()=>t.Drawer,Empty:()=>t.Empty,Flex:()=>t.Flex,Input:()=>t.Input,Modal:()=>t.Modal,Progress:()=>t.Progress,Spin:()=>t.Spin,Tag:()=>t.Tag,message:()=>t.message});var v=b(438),x=b.n(v),j=b(119),S=b.n(j),C=b(413),A=b.n(C),z=b(598),N=b.n(z),O=b(50),E=b.n(O),k=b(615),P=b.n(k),F=b(280),D={};function L(e){const{showLogin:t}=e;return(0,m.jsxs)("div",{className:F.LV,children:[(0,m.jsx)("img",{src:"https://www.unpkg.com/@zjlab-fe/fe-assets/logo-white.png",className:F.wm}),t&&(0,m.jsx)(y.Button,{ghost:!0,children:"登录"})]})}D.styleTagTransform=P(),D.setAttributes=N(),D.insert=A().bind(null,"head"),D.domAPI=S(),D.insertStyleElement=E(),x()(F.Ay,D),F.Ay&&F.Ay.locals&&F.Ay.locals;const I=(e=>{var t={};return b.d(t,e),t})({createContext:()=>n.createContext,memo:()=>n.memo,useCallback:()=>n.useCallback,useContext:()=>n.useContext,useEffect:()=>n.useEffect,useMemo:()=>n.useMemo,useReducer:()=>n.useReducer,useRef:()=>n.useRef,useState:()=>n.useState});function U(e){const{value:t,onChange:n,placeholder:r="请输入关键字",valueType:a,deduplicated:i=!0,size:o,maxLength:l,disabled:s}=e,[u,d]=(0,I.useState)([]),[c,f]=(0,I.useState)(1),p=(0,I.useRef)(null);(0,I.useEffect)((()=>{Array.isArray(t)?d(t):"string"==typeof t&&d(t.split(";"))}),[t]),(0,I.useEffect)((()=>{1!==c&&(null==p?void 0:p.current)&&p.current.focus()}),[c]);const b=e=>{if(i&&(e=Array.from(new Set(e))),d(e),"array"===a)null==n||n(e.length>0?e:void 0);else{const t=e.join(";");null==n||n(t||void 0)}};let h;return(null==u?void 0:u.length)>0&&(h=u.map(((e,t)=>(0,m.jsx)(y.Tag,{closeIcon:!s,onClose:()=>(e=>{const t=u.filter(((t,n)=>n!==e));b(t),f(c+1)})(t),children:e},t)))),(0,m.jsx)(y.Input,{disabled:s,size:o,ref:p,placeholder:r,prefix:h,onPressEnter:e=>{const t=e.target.value.trim(),n=[...u,t];b(n),f(c+1)},maxLength:l},c)}const T=1024,R=1048576,_=1073741824;var H,M;(M=H||(H={}))[M.INIT=1]="INIT",M[M.UPLOADING=2]="UPLOADING",M[M.FINISHED=3]="FINISHED",M[M.FAILED=4]="FAILED",M[M.PAUSED=5]="PAUSED",M[M.CANCELED=6]="CANCELED";const G=1,B=2;var q=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function V(e,t,n){return q(this,void 0,void 0,(function*(){const{name:r,size:a}=e,i=t?`${t}${r}`:r,o=Object.assign(Object.assign({},{fileStatus:H.INIT,percentage:0,uploadId:"",expiryTime:"",uploadUrls:[],completeSeq:[],failSeq:[],cancelControllers:{},uploadStatus:[],chunkSize:0,displaySize:"",fileName:"",partCount:0,raw:void 0}),{fileName:i,raw:new File([e],i,{type:e.type}),partCount:Z(a),chunkSize:$(a),displaySize:te(a)}),l=yield n(i,o.partCount);return l.status?Object.assign(Object.assign({},o),l.uploadInfo):Object.assign(Object.assign({},o),{fileStatus:H.FAILED})}))}function $(e){return e<10*R?10*R:Math.ceil(e/10)}function Z(e){const t=$(e);return Math.floor(e/t)+1}function K(e,t,n,r){ee(e);try{e.createObjectStore(t,{}),e.onversionchange=t=>{null===t.newVersion&&e.close()},n([])}catch(e){r(Error(`升级数据库异常: ${e.message}`))}}function X(e,t,n){const r=Y.version+1;Y.close();const a=window.indexedDB.open(J,r);a.onupgradeneeded=()=>K(a.result,e,t,n)}function Q(e,t,n){(function(e){return new Promise((function(t,n){let r;try{r=Y.transaction(e,"readonly");try{const n=r.objectStore(e),a=[],i=n.openCursor();i.onsuccess=()=>{const e=i.result;e?(a.push(e.value),e.continue()):t(a)},i.onerror=()=>{console.warn(`在handleFileRetrieve()中游标操作失败 - 错误代码: ${i.error}`,i.error)}}catch(e){n(Error(`在handleFileRetrieve()中执行事务或打开游标时发生异常 - ${e.message}`))}}catch(e){n(Error(`在handleFileRetrieve()中创建数据库事务时发生异常 - ${e.message}`))}}))})(e).then(t).catch(n)}var W=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};const J="uploadStore";let Y;function ee(e){Y=e}function te(e){const t=[{value:_,label:"GB"},{value:R,label:"MB"},{value:T,label:"KB"},{value:1,label:"B"}];for(const{value:n,label:r}of t)if(e>=n||1===n)return(e/n).toFixed(1)+r;return e+"B"}var ne=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function re(e,t,n){return ne(this,arguments,void 0,(function*(e,t,n,r=""){return e.isDirectory?t?function(e,t){return ne(this,void 0,void 0,(function*(){const n=yield function(e){return new Promise(((t,n)=>{e.createReader().readEntries(t,n)}))}(e),r=n.map((e=>re(e,!0,t,e.fullPath)));return(yield Promise.allSettled(r)).filter((e=>"fulfilled"===e.status)).flatMap((e=>e.value))}))}(e,n):[]:e.isFile?e.name.includes(".DS_Store")?[]:function(e,t,n){return ne(this,void 0,void 0,(function*(){const r=yield function(e){return new Promise(((t,n)=>{e.file(t,n)}))}(e);return function(e,t){if(0===t.size)return!0;const n=e.name.split(".").pop()||"";return t.has(`.${n}`)}(r,t)?[ae(r,n)]:[]}))}(e,n,r):[]}))}function ae(e,t){const n=e.slice(0,e.size,e.type);return new File([n],t.slice(1)||e.name,{type:e.type})}function ie(e){return e.map((({completeSeq:e,uploadId:t,uploadStatus:n,uploadUrls:r,percentage:a,fileName:i,failSeq:o})=>({fileName:i,uploadId:t,completeSeq:e,uploadStatus:n,percentage:a,uploadUrls:[...r,...o]})))}const oe={},le=(0,I.createContext)(oe),se=(0,I.createContext)((()=>null));function ue({children:e}){const[t,n]=(0,I.useReducer)(de,{});return function(e){(0,I.useEffect)((()=>{return window.addEventListener("beforeunload",t),()=>{window.removeEventListener("beforeunload",t)};function t(){const t=[];for(const[n,r]of Object.entries(e)){const e=r.filter((e=>e.fileStatus!==H.FINISHED));e.length?localStorage.setItem(n,JSON.stringify(ie(e))):t.push(n)}t.length&&function(e){W(this,void 0,void 0,(function*(){const t=Y.version+1;return Y.close(),new Promise(((n,r)=>{const a=window.indexedDB.open(J,t);a.onupgradeneeded=()=>{const t=a.result;e.forEach((e=>{t.objectStoreNames.contains(e)&&t.deleteObjectStore(e)}))},a.onsuccess=()=>{a.result.close(),n()},a.onerror=()=>r(a.error)}))}))}(t)}}),[e])}(t),(0,m.jsx)(le.Provider,{value:t,children:(0,m.jsx)(se.Provider,{value:n,children:e})})}function de(e,t){switch(t.type){case"add":return Object.assign(Object.assign({},e),{[t.identifier]:[]});case"remove_file":{const n=e[t.identifier],r=n.findIndex((e=>e.fileName===t.file.fileName));return Object.assign(Object.assign({},e),{[t.identifier]:[...n.slice(0,r),...n.slice(r+1)]})}case"edit_file":{const n=e[t.identifier],r=n.findIndex((e=>e.fileName===t.file.fileName));return Object.assign(Object.assign({},e),{[t.identifier]:[...n.slice(0,r),t.file,...n.slice(r+1)]})}case"add_file":{const n=e[t.identifier],r=n.findIndex((e=>e.fileName===t.file.fileName));return-1===r?Object.assign(Object.assign({},e),{[t.identifier]:[...n,t.file]}):Object.assign(Object.assign({},e),{[t.identifier]:[...n.slice(0,r),t.file,...n.slice(r+1)]})}case"add_files":{const n=e[t.identifier];return Object.assign(Object.assign({},e),{[t.identifier]:[...n,...t.files]})}case"clear_finished":{const n=e[t.identifier];return Object.assign(Object.assign({},e),{[t.identifier]:n.filter((e=>e.fileStatus!==H.FINISHED))})}default:throw Error("Unknown action")}}const ce=(e=>{var t={};return b.d(t,e),t})({CheckOutlined:()=>r.CheckOutlined,CloseOutlined:()=>r.CloseOutlined,DeleteOutlined:()=>r.DeleteOutlined,FileTextOutlined:()=>r.FileTextOutlined,InboxOutlined:()=>r.InboxOutlined,LoadingOutlined:()=>r.LoadingOutlined,PauseOutlined:()=>r.PauseOutlined,PlayCircleFilled:()=>r.PlayCircleFilled});var fe=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};const pe="border-dashed rounded border bg-gray-50 p-4 hover:border-green-600 border-gray-300";function be({accept:e="",directory:t=!0,dragAreaDescription:n,onFileReceived:r}){const a=(0,I.useMemo)((()=>new Set(e?e.split(","):[])),[e]),i=(0,I.useRef)(null),[o,l]=(0,I.useState)(!1),s={onDragLeave:()=>l(!1),onDragEnter:e=>e.preventDefault(),onDragOver:e=>{e.preventDefault(),l(!0)},onDrop:function(e){return fe(this,void 0,void 0,(function*(){e.preventDefault(),l(!1);const n=Array.from(e.dataTransfer.items).map((e=>e.webkitGetAsEntry())).filter(Boolean).map((e=>re(e,t,a))),i=(yield Promise.allSettled(n)).filter((e=>"fulfilled"===e.status)).flatMap((e=>e.value));i.length&&r(i)}))}};return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(y.Flex,Object.assign({vertical:!0,gap:"1rem",align:"center",className:`${o?"border-green-600":""} ${pe}`},s,{onClick:()=>{var e;return null===(e=i.current)||void 0===e?void 0:e.click()},children:[(0,m.jsx)("p",{className:"text-5xl text-green-600 m-0",children:(0,m.jsx)(ce.InboxOutlined,{})}),(0,m.jsx)("div",{className:"text-base text-center",children:n?Array.isArray(n)?n.map(((e,t)=>(0,m.jsx)("p",{className:"text-base m-0",children:e},t))):(0,m.jsx)("p",{className:"text-base m-0",children:n}):(0,m.jsx)("p",{className:"text-base m-0",children:"点击或拖拽上传文件"})})]})),(0,m.jsx)("input",{ref:i,type:"file",accept:e,hidden:!0,multiple:!0,onChange:function(){var e;const t=null===(e=i.current)||void 0===e?void 0:e.files;(null==t?void 0:t.length)&&r(Array.from(t))},onClick:()=>{i.current&&(i.current.value="")}})]})}const he={size:32,strokeWidth:12,type:"circle",strokeLinecap:"butt"};function me({percent:e,status:t,onClick:n}){const{progressButtonRef:r,buttonInHover:a}=function(){const e=(0,I.useRef)(null),[t,n]=(0,I.useState)(!1);return(0,I.useEffect)((()=>{const t=e.current;if(!t)return;const r=()=>n(!0),a=()=>n(!1);return t.addEventListener("mouseenter",r),t.addEventListener("mouseleave",a),()=>{t.removeEventListener("mouseenter",r),t.removeEventListener("mouseleave",a)}}),[]),{progressButtonRef:e,buttonInHover:t}}(),[i,o]=(0,I.useState)(!1);return t===H.FINISHED?(0,m.jsx)(ce.CheckOutlined,{className:"text-green-600 text-2xl h-8"}):t===H.FAILED?(0,m.jsx)(m.Fragment,{children:i?(0,m.jsx)(ce.LoadingOutlined,{className:"text-red-600 text-2xl h-8"}):(0,m.jsx)(ce.CloseOutlined,{className:"text-red-600 text-2xl h-8",onClick:()=>{n(),o(!0)}})}):(0,m.jsx)(y.Button,{type:"text",shape:"circle",disabled:i,ref:r,title:t===H.PAUSED?"继续下载":"取消下载",onClick:()=>{n(),t===H.UPLOADING&&o(!0)},children:(0,m.jsx)(y.Progress,Object.assign({percent:e},he,{strokeColor:i?"#f0a020":"#19a1fe",format:function(){return t===H.PAUSED?(0,m.jsx)(ce.PauseOutlined,{}):i?(0,m.jsx)(ce.LoadingOutlined,{className:"text-yellow-500"}):a?(0,m.jsx)(ce.CloseOutlined,{}):void 0}}))})}var ge=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function we(){const{identifier:e,root:t,getUploadUrls:n}=(0,I.useContext)(Be),r=(0,I.useContext)(se);return(0,I.useCallback)((a=>ge(this,void 0,void 0,(function*(){const i=function(e){if(!e.expiryTime)return G;const t=new Date;return new Date(e.expiryTime)<t?G:B}(a)===G;if(i){const i=yield V(a.raw,t,n);r({type:"edit_file",identifier:e,file:i})}else{const t=Object.assign(Object.assign({},a),{fileStatus:H.INIT,uploadUrls:[...a.failSeq,...a.uploadUrls],failSeq:[],cancelControllers:{}});r({type:"edit_file",identifier:e,file:t})}}))),[e,t,n,r])}var ye=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function ve(){const{message:e}=y.App.useApp(),{identifier:t,onCancelUpload:n}=(0,I.useContext)(Be),r=(0,I.useContext)(se);return function(t){return ye(this,void 0,void 0,(function*(){const{fileName:r,uploadId:i}=t;if(!i)return void a(t);const o=yield n(r,i);o.status?a(t):e.error(o.reason||"取消失败")}))};function a(e){e.fileStatus=H.CANCELED,function(e,t){let n;try{n=Y.transaction(e,"readwrite")}catch(e){return void console.warn("db.transaction() exception in deleteFileInStore() - "+e.message)}try{const r=n.objectStore(e).delete(t);r.onsuccess=()=>!0,r.onerror=e=>{console.warn("deleteReq.onerror fired in deleteFileInStore() - error code: "+r.error)}}catch(e){return void console.warn("Transaction and/or put() exception in deleteFileInStore() - "+e.message)}}(String(t),e.fileName),Object.values(e.cancelControllers).forEach((e=>e.abort())),r({type:"remove_file",identifier:t,file:e})}}var xe=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function je({identifier:e,showFinished:t}){const n=(0,I.useContext)(le),r=ve(),a=we(),[i,o]=(0,I.useState)([]);return(0,I.useEffect)((()=>{const r=n[e].filter((e=>e.fileStatus!==H.CANCELED&&(!1!==t||e.fileStatus!==H.FINISHED)));o(r)}),[e,t,n]),(0,m.jsx)("div",{className:"my-4",children:i.map((n=>(0,m.jsx)(Se,{identifier:e,file:n,showFinished:t,onButtonClick:l},n.fileName)))});function l(e){e.fileStatus===H.PAUSED?a(e):r(e)}}function Se({identifier:e,file:t,showFinished:n,onButtonClick:r}){const a=(0,I.useContext)(se),i="object"==typeof n&&n.withDelete;return(0,m.jsx)("div",{className:"mb-2 last:mb-0",children:(0,m.jsxs)("div",{className:"px-4 my-2 relative flex justify-between items-center",children:[(0,m.jsxs)(y.Flex,{align:"center",gap:".5rem",title:t.fileName,children:[(0,m.jsx)(ce.FileTextOutlined,{}),(0,m.jsx)("span",{className:"truncate w-40",children:t.fileName})]}),(0,m.jsxs)(y.Flex,{align:"center",gap:".5rem",children:[(0,m.jsx)(me,{status:t.fileStatus,percent:Number(t.percentage.toFixed(0)),onClick:()=>r(t)}),t.fileStatus===H.FINISHED&&i&&(0,m.jsx)(y.Button,{type:"text",size:"large",className:"px-3",disabled:i.disabled,title:i.disabled?"删除-已禁用":"删除",onClick:()=>function(t,n){return xe(this,void 0,void 0,(function*(){(yield n(t.fileName))&&a({type:"remove_file",identifier:e,file:t})}))}(t,i.onDelete),children:(0,m.jsx)(ce.DeleteOutlined,{})})]})]})})}var Ce=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function Ae(e,t,n){const r=new Set(t.map((e=>e.fileName)));return e.filter((e=>{const t=n?`${n}${e.name}`:e.name;return r.has(t)})).map((e=>e.name))}function ze(e,t){return e.filter((e=>{var n;const r=e.name.includes("/"),a=e.name.split("/")[0];return r===(null===(n=t.find((e=>e.fileName===a)))||void 0===n?void 0:n.isFolder)})).map((e=>e.name))}var Ne=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function Oe(){const{message:e}=y.App.useApp(),{identifier:t,root:n,getUploadUrls:r}=(0,I.useContext)(Be),a=(0,I.useContext)(se),i=function(){const{message:e,modal:t}=y.App.useApp(),n=(0,I.useContext)(le),{identifier:r,maxSizePerFile:a=10*_,uploadHistory:i=[],root:o}=(0,I.useContext)(Be);return function(l){return Ce(this,void 0,void 0,(function*(){const s=function(t){const n=t.filter((e=>e.size>a)).map((e=>e.name));if(n.length){const t=te(a);e.warning(`以下文件大小超过${t}:${n.join(", ")}`)}return n}(l),[u,d]=yield function(e){return Ce(this,void 0,void 0,(function*(){const a=[...Ae(e,n[r],o),...ze(e,i)];return a.length?[yield t.confirm({title:"发现同名文件,是否覆盖?",okText:"覆盖",cancelText:"取消"}),a]:[!0,[]]}))}(l);return u?[new Set(s),new Set(d)]:[new Set([...s,...d]),new Set]}))}}(),o=function(){const e=(0,I.useContext)(le),{identifier:t}=(0,I.useContext)(Be),n=ve();return function(r){const a=e[t];for(const e of r){const t=a.find((t=>t.fileName===e));t&&n(t)}}}();return function(l){return Ne(this,void 0,void 0,(function*(){const s=yield function(e){return Ne(this,void 0,void 0,(function*(){const t=new Map(e.map((e=>[e.name,e]))),[n,r]=yield i(e);return n.forEach((e=>t.delete(e))),o(r),Array.from(t.values())}))}(l),u=yield function(e){return Ne(this,void 0,void 0,(function*(){const t=e.map((e=>V(e,n,r)));return(yield Promise.allSettled(t)).filter((e=>"fulfilled"===e.status)).map((e=>e.value))}))}(s);u.forEach((e=>{a({type:"add_file",identifier:t,file:e})})),function(e,t){try{const n=function(e){const t=Y.transaction(e,"readwrite");return t.onerror=()=>console.warn(`添加文件事务错误: ${t.error}`),t.onabort=()=>console.warn("添加文件事务已中止"),t.oncomplete=()=>console.warn("添加文件事务已完成"),t}(e);!function(e,t){t.map((t=>function(e,t){try{e.put(t,t.fileName),console.warn(`文件 "${t.fileName}" 添加成功`)}catch(e){console.warn(`添加文件 "${t.fileName}" 时出错: ${e.message}`)}}(e,t)))}(n.objectStore(e),t)}catch(e){console.warn(`批量添加文件时出错: ${e.message}`)}}(t,u),u.length<s.length&&e.info("部分文件获取上传地址失败")}))}}const Ee=(e=>{var t={};return b.d(t,e),t})({default:()=>a.default});var ke=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function Pe(e,t=1e3){let n=null;return function(r){n||(n=setTimeout((()=>{e(r),n=null}),t))}}function Fe(e,t,n){const r=e.uploadUrls.findIndex((e=>e===t));e.uploadUrls.splice(r,1),e["complete"===n?"completeSeq":"failSeq"].push(t)}var De=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))},Le=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function Ie(){const e=function(){const{identifier:e,onOnePartDone:t}=(0,I.useContext)(Be),n=(0,I.useContext)(se),r=(0,I.useCallback)(((t,r,a)=>{r.fileStatus===H.UPLOADING&&(r.uploadStatus[a]=Number(t.progress),r.percentage=r.uploadStatus.reduce(((e,t)=>e+t))*(100/r.partCount),n({type:"edit_file",identifier:e,file:r}))}),[e,n]),a=(0,I.useCallback)(((e,t,n)=>ke(this,void 0,void 0,(function*(){const a=Ee.default.create({});yield a.put(e.uploadUrl,t,{signal:n.cancelControllers[e.partNum].signal,withCredentials:!1,timeout:18e5,headers:{"Content-Type":"application/octet-stream"},onUploadProgress:Pe((t=>r(t,n,e.partNum)))})}))),[r]),i=(0,I.useCallback)(((e,n)=>ke(this,void 0,void 0,(function*(){const{fileName:r,uploadId:a}=e,i=yield t(r,a,n.partNum);if(!i.status)throw new Error(i.reason);Fe(e,n,"complete")}))),[t]),o=(0,I.useCallback)(((e,t,n)=>ke(this,void 0,void 0,(function*(){try{return yield a(e,t,n),yield i(n,e),n.fileStatus}catch(t){return Fe(n,e,"fail"),n.fileStatus}}))),[a,i]);return(0,I.useCallback)((t=>ke(this,void 0,void 0,(function*(){t.fileStatus=H.UPLOADING,n({type:"edit_file",identifier:e,file:t});const r=function(e){const{uploadUrls:t,chunkSize:n,raw:r}=e,a=r.size;return t.map((({partNum:e,uploadUrl:t})=>{const i=e*n,o=Math.min((e+1)*n,a);return{url:{partNum:e,uploadUrl:t},chunk:r.slice(i,o)}}))}(t);for(const{url:a,chunk:i}of r){if(t.cancelControllers[a.partNum]=new AbortController,(yield o(a,i,t))===H.CANCELED)return!1;n({type:"edit_file",identifier:e,file:t})}}))),[e,n,o])}(),t=function(){const{identifier:e,onAllPartDone:t}=(0,I.useContext)(Be),n=(0,I.useContext)(se);return(0,I.useCallback)((r=>De(this,void 0,void 0,(function*(){try{const{fileName:e,uploadId:n}=r;if(0!==r.failSeq.length)throw new Error("partial failed");{const a=yield t(e,n);if(!a.status)throw new Error(a.reason);r.fileStatus=H.FINISHED}}catch(e){r.fileStatus=H.FAILED}finally{n({type:"edit_file",identifier:e,file:r})}}))),[e,t,n])}();return(0,I.useCallback)(((n,r)=>Le(this,void 0,void 0,(function*(){yield e(n),n.fileStatus!==H.CANCELED&&(yield t(n),n.fileStatus===H.FINISHED&&r&&r(n))}))),[e,t])}var Ue=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function Te(e){const{message:t,modal:n}=y.App.useApp(),r=(0,I.useContext)(se),a=we();return(0,I.useCallback)((()=>Ue(this,void 0,void 0,(function*(){const i=yield function(e){return Ue(this,void 0,void 0,(function*(){const t=yield(r=e,new Promise(((e,t)=>{Y?function(e,t,n){Y.objectStoreNames.contains(e)?Q(e,t,n):X(e,t,n)}(r,e,t):function(e,t,n){try{const r=window.indexedDB.open(J);r.onupgradeneeded=()=>K(r.result,e,t,n),r.onsuccess=()=>function(e,t,n,r){ee(e),e.objectStoreNames.contains(t)?Q(t,n,r):X(t,n,r)}(r.result,e,t,n),r.onerror=()=>n(Error(`打开数据库失败: ${r.error}`)),r.onblocked=()=>n(Error(`数据库被阻塞: ${r.error}`))}catch(e){console.warn(`打开数据库时发生异常: ${e.message}`,e),n(e)}}(r,e,t)}))),n=JSON.parse(localStorage.getItem(e)||"[]").map((e=>{const n=t.find((t=>t.fileName===e.fileName));return Object.assign(Object.assign(Object.assign({},n),e),{fileStatus:H.PAUSED})}));var r;return localStorage.removeItem(e),n}))}(e);r({type:"add_files",identifier:e,files:i}),i.length&&n.confirm({title:"提示",content:"检测到未完成上传任务,是否继续上传?",onOk(){i.forEach(a)},onCancel(){t.info("点击上传按钮手动继续")}})}))),[e,r,a,n,t])}var Re=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function _e({open:e,identifier:t,accept:n,dragAreaDescription:r,footer:a,title:i="数据上传",showFinished:o=!1,directory:l=!1,onClose:s}){var u,d;const c=(0,I.useContext)(le),f=(0,I.useContext)(se),{onSuccess:p}=(0,I.useContext)(Be),b=Oe(),h=Ie(),g=Te(t),[w,v]=(0,I.useState)([]),x=(0,I.useRef)("");return(0,I.useEffect)((()=>{x.current!==t&&(c&&f?(x.current=t,c[t]||f({type:"add",identifier:t}),g()):console.warn("FileUploadDrawer 必须在 UploadStoreProvider 内使用"))}),[t,g,c,f]),(0,I.useEffect)((()=>{const e=c[t];if(!e)return;const n=!e.some((e=>e.fileStatus===H.UPLOADING)),r=e.find((e=>e.fileStatus===H.INIT));n&&r&&h(r,p)}),[t,p,h,c]),(0,m.jsxs)(y.Drawer,{className:"mylib-upload-drawer",open:e,title:i,width:480,onClose:s,footer:a,children:[(0,m.jsx)(be,{directory:l,accept:n,dragAreaDescription:r,onFileReceived:function(e){return Re(this,void 0,void 0,(function*(){v((t=>[...t,...e])),yield b(e),v((t=>{const n=new Set(t);for(const t of e)n.delete(t);return[...n]}))}))}}),0===w.length&&0===(null===(u=c[t])||void 0===u?void 0:u.length)&&(0,m.jsx)(y.Empty,{className:"mt-20",description:"暂无上传内容"}),w.length>0&&(0,m.jsxs)("div",{className:"flex justify-center gap-4 mt-4",children:[(0,m.jsx)(ce.LoadingOutlined,{}),"预检上传文件中(",w.length,")"]}),(null===(d=c[t])||void 0===d?void 0:d.length)>0&&(0,m.jsx)(je,{showFinished:o,identifier:t})]})}var He=b(588),Me={};Me.styleTagTransform=P(),Me.setAttributes=N(),Me.insert=A().bind(null,"head"),Me.domAPI=S(),Me.insertStyleElement=E(),x()(He.A,Me),He.A&&He.A.locals&&He.A.locals;var Ge=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};const Be=(0,I.createContext)({identifier:"",getUploadUrls:()=>Ge(void 0,void 0,void 0,(function*(){return{status:!1}})),onCancelUpload:()=>Ge(void 0,void 0,void 0,(function*(){return{status:!1}})),onOnePartDone:()=>Ge(void 0,void 0,void 0,(function*(){return{status:!1}})),onAllPartDone:()=>Ge(void 0,void 0,void 0,(function*(){return{status:!1}}))});function qe(e){if((0,I.useContext)(le)===oe)return(0,m.jsx)(y.Drawer,{open:e.open,onClose:e.onClose,title:"数据上传",children:(0,m.jsx)(y.Alert,{message:"FileUploadDrawer 必须在 UploadStoreProvider 内使用",type:"warning"})});const{identifier:t,maxSizePerFile:n=10*_,directory:r=!1,root:a="",uploadHistory:i=[],onSuccess:o,getUploadUrls:l,onCancelUpload:s,onOnePartDone:u,onAllPartDone:d,onClose:c,dragAreaDescription:f,accept:p,open:b,footer:h,title:g,showFinished:w}=e,v={identifier:t,maxSizePerFile:n,directory:r,root:a,uploadHistory:i,onSuccess:o,getUploadUrls:l,onCancelUpload:s,onOnePartDone:u,onAllPartDone:d};return(0,m.jsx)(Be.Provider,{value:v,children:(0,m.jsx)(_e,{open:b,accept:p,footer:h,title:g,showFinished:w,directory:r,identifier:t,dragAreaDescription:f,onClose:c})})}var Ve,$e=b(884),Ze={};Ze.styleTagTransform=P(),Ze.setAttributes=N(),Ze.insert=A().bind(null,"head"),Ze.domAPI=S(),Ze.insertStyleElement=E(),x()($e.A,Ze),$e.A&&$e.A.locals&&$e.A.locals,function(e){e[e.SHOULD_CREATE_NEW_FILE=0]="SHOULD_CREATE_NEW_FILE",e[e.SHOULD_USE_OLD_INFO=1]="SHOULD_USE_OLD_INFO"}(Ve||(Ve={}));const Ke=1024,Xe=1048576,Qe=1073741824;var We;!function(e){e[e.INIT=1]="INIT",e[e.UPLOADING=2]="UPLOADING",e[e.ALL_UPLOADED=3]="ALL_UPLOADED",e[e.MERGING=4]="MERGING",e[e.FINISHED=5]="FINISHED",e[e.FAILED=6]="FAILED",e[e.PAUSED=7]="PAUSED",e[e.CANCELED=8]="CANCELED"}(We||(We={}));var Je=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function Ye(e,t,n){return Je(this,void 0,void 0,(function*(){const{name:r,size:a}=e,i=t?`${t}${r}`:r,o=function(e,t,n){return{fileName:e,uploadId:"",percentage:0,expiryTime:"",failSeq:[],uploadUrls:[],completeSeq:[],uploadStatus:[],cancelControllers:[],fileStatus:We.INIT,partCount:tt(t),chunkSize:et(t),raw:new File([n],e,{type:n.type})}}(i,a,e),l=yield n(i,o.partCount);return l.status?Object.assign(Object.assign({},o),l.uploadInfo):Object.assign(Object.assign({},o),{fileStatus:We.FAILED})}))}function et(e){return e<10*Xe?10*Xe:Math.ceil(e/10)}function tt(e){const t=et(e);return Math.floor(e/t)+1}function nt(e,t){try{const n=it.transaction(e,"readwrite").objectStore(e).delete(t);n.onsuccess=()=>console.info("在 deleteFileInStore 中 deleteReq.onsuccess 触发"),n.onerror=()=>console.warn("在 deleteFileInStore 中 deleteReq.onerror 触发 - 错误代码: "+n.error)}catch(e){return void console.warn("在 deleteFileInStore 中, db.transaction/transaction.objectStore/objectStore.delete 异常 - "+e.message)}}var rt=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};const at="uploadStore";let it;function ot(e){it=e}var lt=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function st(e,t,n){return lt(this,arguments,void 0,(function*(e,t,n,r=""){return e.isDirectory?t?function(e,t){return lt(this,void 0,void 0,(function*(){const n=yield function(e){return new Promise(((t,n)=>{e.createReader().readEntries(t,n)}))}(e),r=n.map((e=>st(e,!0,t,e.fullPath)));return(yield Promise.allSettled(r)).filter((e=>"fulfilled"===e.status)).flatMap((e=>e.value))}))}(e,n):[]:e.isFile?e.name.includes(".DS_Store")?[]:function(e,t,n){return lt(this,void 0,void 0,(function*(){const r=yield function(e){return new Promise(((t,n)=>{e.file(t,n)}))}(e);return function(e,t){if(0===t.size)return!0;const n=e.name.split(".").pop()||"";return t.has(`.${n}`)}(r,t)?[ut(r,n)]:[]}))}(e,n,r):[]}))}function ut(e,t){const n=e.slice(0,e.size,e.type);return new File([n],t.slice(1)||e.name,{type:e.type})}var dt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};function ct(e){const t=e.map((e=>{var{raw:t}=e,n=dt(e,["raw"]);const{uploadUrls:r,failSeq:a}=n;return Object.assign(Object.assign({},n),{failSeq:[],cancelControllers:{},uploadUrls:[...r,...a]})}));return JSON.stringify(t)}const ft={"FileUploader 必须在 UploadStoreProvider 内使用":"FileUploader must be used within UploadStoreProvider","FileUploadModal 必须在 UploadStoreProvider 内使用":"FileUploadModal must be used within UploadStoreProvider",文件上传:"File Upload",确定:"Confirm",等待上传:"Waiting for upload",已取消:"Cancelled",上传中:"Uploading",上传失败:"Upload failed",已上传:"Uploaded",分块合并中:"Merging parts",以下文件大小超过:"The following files exceed the size",已删除:"Deleted",点击或拖拽上传文件:"Click or drag to upload files","发现同名文件,是否覆盖?":"Duplicate file found, overwrite?",覆盖:"Overwrite",取消:"Cancel",正在上传:"Uploading",取消失败:"Cancel failed",当前上传:"Current Upload",已暂停:"Paused",上传成功:"Upload successful"},pt={"FileUploader 必须在 UploadStoreProvider 内使用":"FileUploader 必须在 UploadStoreProvider 内使用","FileUploadModal 必须在 UploadStoreProvider 内使用":"FileUploadModal 必须在 UploadStoreProvider 内使用",文件上传:"文件上传",确定:"确定",等待上传:"等待上传",已取消:"已取消",上传中:"上传中",上传失败:"上传失败",已上传:"已上传",分块合并中:"分块合并中",以下文件大小超过:"以下文件大小超过",已删除:"已删除",点击或拖拽上传文件:"点击或拖拽上传文件","发现同名文件,是否覆盖?":"发现同名文件,是否覆盖?",覆盖:"覆盖",取消:"取消",正在上传:"正在上传",取消失败:"取消失败",当前上传:"当前上传",已暂停:"已暂停",上传成功:"上传成功"};var bt=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function ht(e,t){switch(t.type){case"add":return Object.assign(Object.assign({},e),{[t.identifier]:[]});case"remove_file":{const n=e[t.identifier],r=n.findIndex((e=>e.fileName===t.fileName));return Object.assign(Object.assign({},e),{[t.identifier]:[...n.slice(0,r),...n.slice(r+1)]})}case"edit_file":{const n=e[t.identifier],r=n.findIndex((e=>e.fileName===t.file.fileName));return Object.assign(Object.assign({},e),{[t.identifier]:[...n.slice(0,r),t.file,...n.slice(r+1)]})}case"add_file":{const n=e[t.identifier],r=n.findIndex((e=>e.fileName===t.file.fileName));return-1===r?Object.assign(Object.assign({},e),{[t.identifier]:[...n,t.file]}):Object.assign(Object.assign({},e),{[t.identifier]:[...n.slice(0,r),t.file,...n.slice(r+1)]})}case"add_files":{const n=e[t.identifier];return Object.assign(Object.assign({},e),{[t.identifier]:[...n,...t.files]})}case"clear_finished":{const n=e[t.identifier];return Object.assign(Object.assign({},e),{[t.identifier]:n.filter((e=>e.fileStatus!==We.FINISHED))})}case"edit_files":return Object.entries(t.files).reduce(((t,[n,r])=>{const a=e[n];return r.forEach((e=>{const t=a.findIndex((t=>t.fileName===e.fileName));-1!==t?a[t]=e:a.push(e)})),t}),Object.assign({},e));default:throw Error("Unknown action")}}const mt=(0,I.createContext)(pt),gt=(0,I.createContext)({}),wt=(0,I.createContext)((()=>null)),yt=(0,I.createContext)({}),vt=(0,I.createContext)((()=>null)),xt={},jt=(0,I.createContext)(xt),St=(0,I.createContext)((()=>null));function Ct({locale:e="zh",children:t}){const n="zh"===e?pt:ft,[r,a]=(0,I.useReducer)(ht,{}),[i,o]=(0,I.useState)({}),[l,s]=(0,I.useState)({});return function(e){(0,I.useEffect)((()=>{return window.addEventListener("beforeunload",t),()=>{window.removeEventListener("beforeunload",t)};function t(){Object.entries(e).forEach((([e,t])=>{const n=t.filter((e=>e.fileStatus!==We.FINISHED));n.length?localStorage.setItem(e,ct(n)):function(e){rt(this,void 0,void 0,(function*(){const t=it.version+1;return it.close(),new Promise(((n,r)=>{const a=window.indexedDB.open(at,t);a.onupgradeneeded=()=>{const t=a.result;t.objectStoreNames.contains(e)&&t.deleteObjectStore(e)},a.onsuccess=()=>{a.result.close(),n()},a.onerror=()=>r(a.error)}))}))}(e)}))}}),[e])}(r),function(e,t){(0,I.useEffect)((()=>{const n=Object.keys(e).reduce(((t,n)=>{const r=e[n],a=r.filter((e=>e.fileStatus===We.ALL_UPLOADED)),i=a.filter((e=>0===e.failSeq.length)),o=a.filter((e=>e.failSeq.length>0)),l=r.find((e=>e.fileStatus===We.UPLOADING)),s=r.find((e=>e.fileStatus===We.INIT)),u=l?void 0:s,d=[...o.map((e=>Object.assign(Object.assign({},e),{fileStatus:We.FAILED}))),...i.map((e=>Object.assign(Object.assign({},e),{fileStatus:We.MERGING}))),u?Object.assign(Object.assign({},u),{fileStatus:We.UPLOADING}):void 0].filter((e=>!!e));return d.length?Object.assign(Object.assign({},t),{[n]:d}):t}),{});Object.keys(n).length&&t({type:"edit_files",files:n})}),[t,e])}(r,a),function(e,t,n,r){const a=(0,I.useRef)({}),i=(0,I.useCallback)((function(e,i){return bt(this,void 0,void 0,(function*(){const{onAllPartDone:o}=t[e],l=n[e],s=yield Promise.all(i.map((t=>bt(this,void 0,void 0,(function*(){return(yield o(t.fileName,t.uploadId)).status?(null==l||l(t),a.current[e].delete(t.uploadId),Object.assign(Object.assign({},t),{percentage:100,fileStatus:We.FINISHED})):Object.assign(Object.assign({},t),{fileStatus:We.FAILED})})))));r({type:"edit_files",files:{[e]:s}})}))}),[t,n,r]);(0,I.useEffect)((()=>{Object.keys(e).forEach((t=>{const n=e[t].filter((e=>e.fileStatus===We.MERGING));if(n.length>0){const e=a.current[t]||new Set,r=n.filter((t=>!e.has(t.uploadId)));r.forEach((t=>e.add(t.uploadId))),a.current[t]=e,i(t,r)}}))}),[e,i])}(r,i,l,a),(0,m.jsx)(mt.Provider,{value:n,children:(0,m.jsx)(gt.Provider,{value:i,children:(0,m.jsx)(wt.Provider,{value:o,children:(0,m.jsx)(yt.Provider,{value:l,children:(0,m.jsx)(vt.Provider,{value:s,children:(0,m.jsx)(jt.Provider,{value:r,children:(0,m.jsx)(St.Provider,{value:a,children:t})})})})})})})}var At=b(868),zt={};function Nt(){const e=(0,I.useContext)(mt);return(0,I.useCallback)((t=>e[t]||(console.warn(`Translation key not found: ${t}`),t)),[e])}function Ot(e){return(0,m.jsx)("svg",Object.assign({width:"34",height:"31",viewBox:"0 0 34 31",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e,{children:(0,m.jsxs)("g",{id:"ä¸ä¼ æå¾",children:[(0,m.jsx)("path",{id:"Vector",d:"M26 8.66665V29.7043C26.0013 29.867 25.9705 30.0284 25.9094 30.1792C25.8483 30.33 25.7581 30.4672 25.6439 30.5831C25.5297 30.699 25.3938 30.7913 25.244 30.8547C25.0941 30.918 24.9332 30.9512 24.7705 30.9523H1.22943C0.903577 30.9523 0.591055 30.823 0.360528 30.5927C0.130002 30.3624 0.000328142 30.05 0 29.7241V1.22819C0 0.563332 0.553428 0 1.23562 0H17.3333V7.42856C17.3333 7.75692 17.4638 8.07184 17.6959 8.30402C17.9281 8.53621 18.243 8.66665 18.5714 8.66665H26ZM26 6.19047H19.8095V0.00371423L26 6.19047Z",fill:"#B9D6FF"}),(0,m.jsxs)("g",{id:"Group 1000006993",children:[(0,m.jsx)("circle",{id:"Ellipse 87",cx:"26",cy:"23",r:"8",fill:"#1775FE"}),(0,m.jsx)("path",{id:"Vector_2",d:"M26.4545 24.315V27.5714H25.5455V24.315L24.3034 25.2023L23.775 24.4625L26 22.8732L28.225 24.4625L27.6966 25.2023L26.4545 24.315ZM31 24.4545C31 25.7098 29.9825 26.7273 28.7273 26.7273H27.3636V25.8182H28.7273C29.0749 25.8184 29.4094 25.6858 29.6625 25.4476C29.9156 25.2094 30.0682 24.8835 30.0891 24.5365C30.11 24.1896 29.9976 23.8477 29.7749 23.5808C29.5522 23.314 29.236 23.1422 28.8909 23.1007L28.4568 23.0489L28.4918 22.6127C28.4973 22.5455 28.5 22.4775 28.5 22.4091C28.5 21.0284 27.3807 19.9091 26 19.9091C25.4245 19.9091 24.8666 20.1077 24.4205 20.4712C23.9744 20.8347 23.6672 21.3409 23.5509 21.9045L23.4955 22.175L23.2295 22.2507C22.8492 22.3591 22.5146 22.5885 22.2763 22.9042C22.038 23.2198 21.9091 23.6045 21.9091 24C21.9091 24.4822 22.1006 24.9447 22.4416 25.2856C22.7826 25.6266 23.2451 25.8182 23.7273 25.8182H24.6364V26.7273H23.7273C22.2211 26.7273 21 25.5061 21 24C21 22.8655 21.6989 21.8682 22.7239 21.4632C22.9292 20.753 23.3598 20.1288 23.9506 19.6846C24.5415 19.2403 25.2607 19.0001 26 19C27.8414 19 29.3416 20.4598 29.4068 22.2852C29.8687 22.4302 30.2723 22.7187 30.5588 23.1089C30.8453 23.499 30.9999 23.9705 31 24.4545Z",fill:"white"})]})]})}))}function Et({description:e}){const t=Nt();return(0,m.jsx)("div",{className:"text-gray-5 text-center",children:e?Array.isArray(e)?e.map(((e,t)=>(0,m.jsx)("p",{className:"m-0",children:e},t))):(0,m.jsx)("div",{className:"m-0",children:e}):(0,m.jsx)("p",{className:"m-0",children:t("点击或拖拽上传文件")})})}function kt({className:e,description:t,onClick:n,handleDrop:r}){const[a,i]=(0,I.useState)(!1),o={onDrop:e=>{e.preventDefault(),i(!1),r(e)},onDragLeave:()=>i(!1),onDragEnter:e=>e.preventDefault(),onDragOver:e=>{e.preventDefault(),i(!0)}};return(0,m.jsxs)("div",Object.assign({},o,{className:`zjlab-fe-data-hub-ui-default-drag-area ${a?"border-[#1775FE]":""} ${e}`,onClick:n,children:[(0,m.jsx)(Ot,{}),(0,m.jsx)(Et,{description:t})]}))}zt.styleTagTransform=P(),zt.setAttributes=N(),zt.insert=A().bind(null,"head"),zt.domAPI=S(),zt.insertStyleElement=E(),x()(At.A,zt),At.A&&At.A.locals&&At.A.locals;var Pt=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function Ft({accept:e="",className:t="",directory:n=!0,dragAreaDescription:r,maxSizePerFile:a=10*Qe,onFileReceived:i}){const o=Nt(),{message:l}=y.App.useApp(),s=(0,I.useRef)(null),u=(0,I.useMemo)((()=>new Set(e?e.split(","):[])),[e]);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(kt,{className:t,description:r,handleDrop:function(e){return Pt(this,void 0,void 0,(function*(){const t=Array.from(e.dataTransfer.items).map((e=>e.webkitGetAsEntry())).filter(Boolean).map((e=>st(e,n,u)));d((yield Promise.allSettled(t)).filter((e=>"fulfilled"===e.status)).flatMap((e=>e.value)))}))},onClick:()=>{var e;return null===(e=s.current)||void 0===e?void 0:e.click()}}),(0,m.jsx)("input",{hidden:!0,multiple:!0,type:"file",accept:e,ref:s,onChange:function(){var e;const t=null===(e=s.current)||void 0===e?void 0:e.files;d(Array.from(null!=t?t:[]))},onClick:()=>{s.current&&(s.current.value="")}})]});function d(e){const t=e.filter((e=>e.size<=a));if(t.length<e.length){const e=function(e){const t=[{value:Qe,label:"GB"},{value:Xe,label:"MB"},{value:Ke,label:"KB"},{value:1,label:"B"}];for(const{value:n,label:r}of t)if(e>=n||1===n)return(e/n).toFixed(1)+r;return e+"B"}(a);l.warning(o("以下文件大小超过")+e+","+o("已删除"))}t.length&&i(t)}}function Dt(e){return(0,m.jsx)("svg",Object.assign({width:"16",height:"17",viewBox:"0 0 16 17",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e,{children:(0,m.jsx)("g",{id:"icon/å
³éæé®",children:(0,m.jsx)("path",{id:"Subtract",fillRule:"evenodd",clipRule:"evenodd",d:"M14.6668 8.49967C14.6668 12.1816 11.6821 15.1663 8.00016 15.1663C4.31826 15.1663 1.3335 12.1816 1.3335 8.49967C1.3335 4.81777 4.31826 1.83301 8.00016 1.83301C11.6821 1.83301 14.6668 4.81777 14.6668 8.49967ZM10.239 6.26052C10.4343 6.45578 10.4343 6.77237 10.239 6.96763L8.70698 8.49969L10.239 10.0318C10.4343 10.227 10.4343 10.5436 10.239 10.7389C10.0438 10.9341 9.7272 10.9341 9.53194 10.7389L7.99987 9.2068L6.46781 10.7389C6.27255 10.9341 5.95597 10.9341 5.7607 10.7389C5.56544 10.5436 5.56544 10.227 5.7607 10.0318L7.29277 8.49969L5.7607 6.96763C5.56544 6.77237 5.56544 6.45578 5.7607 6.26052C5.95597 6.06526 6.27255 6.06526 6.46781 6.26052L7.99987 7.79258L9.53194 6.26052C9.7272 6.06526 10.0438 6.06526 10.239 6.26052Z",fill:"currentColor"})})}))}const Lt=(e=>{var t={};return b.d(t,e),t})({atom:()=>i.atom,useAtom:()=>i.useAtom,useAtomValue:()=>i.useAtomValue,useSetAtom:()=>i.useSetAtom});var It=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};const Ut=Ee.default.create();function Tt(e,t=500){let n=null;return function(r){n||(n=setTimeout((()=>{e(r),n=null}),t))}}var Rt=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))},_t=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};const Ht=(0,Lt.atom)(null),Mt=(0,Lt.atom)((e=>{var t;return null===(t=e(Ht))||void 0===t?void 0:t.fileName})),Gt=((0,Lt.atom)((e=>{var t;return null===(t=e(Ht))||void 0===t?void 0:t.expiryTime})),(0,Lt.atom)((e=>{var t;return null===(t=e(Ht))||void 0===t?void 0:t.uploadId}))),Bt=((0,Lt.atom)((e=>{var t;return null===(t=e(Ht))||void 0===t?void 0:t.raw})),(0,Lt.atom)((e=>{var t;return null===(t=e(Ht))||void 0===t?void 0:t.percentage}))),qt=(0,Lt.atom)((e=>{var t;return null===(t=e(Ht))||void 0===t?void 0:t.cancelControllers}));function Vt(){const e=(0,I.useRef)(!1),t=(0,I.useRef)([]),n=(0,I.useContext)(Kt),[r,a]=(0,Lt.useAtom)(Ht),i=(0,I.useContext)(St);!function(){const e=(0,I.useContext)(Kt),t=(0,I.useContext)(jt),n=(0,Lt.useAtomValue)(Ht),r=(0,Lt.useSetAtom)(Ht);(0,I.useEffect)((()=>{const n=t[e];if(!n||0===n.length)return;const a=n.find((e=>e.fileStatus===We.UPLOADING));a&&r(Object.assign(Object.assign({},a),{fileStatus:We.INIT}))}),[e,r,t]),(0,I.useEffect)((()=>{return window.addEventListener("beforeunload",t),()=>{window.removeEventListener("beforeunload",t)};function t(){n&&n.fileStatus===We.UPLOADING&&localStorage.setItem(e+"_uploading",ct([n]))}}),[n,e])}();const o=function(){const e=(0,I.useContext)(Kt),t=(0,Lt.useSetAtom)(Ht),n=(0,I.useContext)(St),r=function(){const e=(0,I.useContext)(Wt),t=(0,Lt.useAtomValue)(qt),n=(0,Lt.useSetAtom)(Ht),r=(0,I.useCallback)(((e,t)=>{n((n=>{if(!n||n.fileStatus!==We.UPLOADING)return n;const r=1!==n.uploadStatus[t]?n.uploadStatus.toSpliced(t,1,Number(e.progress)):n.uploadStatus,a=n.uploadStatus.reduce(((e,t)=>e+(t||0)),0)*(100/n.partCount);return Object.assign(Object.assign({},n),{percentage:a,uploadStatus:r})}))}),[n]);return(0,I.useCallback)(((n,a)=>It(this,void 0,void 0,(function*(){t&&(yield Ut.put(n.uploadUrl,a,Object.assign(Object.assign({},e),{withCredentials:(null==e?void 0:e.withCredentials)||!1,timeout:(null==e?void 0:e.timeout)||18e5,headers:Object.assign({"Content-Type":"application/octet-stream"},null==e?void 0:e.headers),signal:t[n.partNum].signal,onUploadProgress:Tt((e=>r(e,n.partNum)))})))}))),[t,e,r])}(),a=function(e){const t=(0,Lt.useAtomValue)(Mt),n=(0,Lt.useAtomValue)(Gt),r=(0,I.useContext)(gt),a=(0,Lt.useSetAtom)(Ht),i=r[e],{onOnePartDone:o}=i;return(0,I.useCallback)((e=>Rt(this,void 0,void 0,(function*(){if(!t||!n)return;const r=yield o(t,n,e.partNum);if(!r.status)throw new Error(r.reason);a((t=>{if(!t)return t;const n=[...t.uploadStatus];return n[e.partNum]=1,Object.assign(Object.assign({},t),{uploadStatus:n,uploadUrls:t.uploadUrls.filter((t=>t.partNum!==e.partNum)),completeSeq:[...t.completeSeq,e]})}))}))),[t,n,o,a])}(e),i=(0,I.useCallback)(((e,n)=>_t(this,void 0,void 0,(function*(){try{yield r(e,n),yield a(e)}catch(n){if(n instanceof Error&&"canceled"===n.message)return;t((t=>t?Object.assign(Object.assign({},t),{failSeq:[...t.failSeq,e],uploadUrls:t.uploadUrls.filter((t=>t!==e))}):t))}}))),[r,a,t]);return(0,I.useCallback)((function(r){return _t(this,void 0,void 0,(function*(){for(const{url:e,chunk:t}of r)yield i(e,t);t((t=>t?(n({type:"edit_file",identifier:e,file:Object.assign(Object.assign({},t),{fileStatus:We.ALL_UPLOADED})}),null):t))}))}),[e,i,t,n])}();(0,I.useEffect)((()=>{r?(r.fileStatus===We.INIT&&(t.current=function(e){const{uploadUrls:t,chunkSize:n,raw:r}=e,a=r.size;return t.map((({partNum:e,uploadUrl:t})=>{const i=e*n,o=Math.min((e+1)*n,a);return{url:{partNum:e,uploadUrl:t},chunk:r.slice(i,o)}}))}(r),a((e=>e?Object.assign(Object.assign({},e),{fileStatus:We.UPLOADING,cancelControllers:new Array(t.current.length).fill(new AbortController)}):e))),r.fileStatus!==We.UPLOADING||e.current||(e.current=!0,o(t.current)),r.fileStatus===We.CANCELED&&(Object.values(r.cancelControllers).forEach((e=>e.abort())),i({type:"remove_file",identifier:n,fileName:r.fileName}),a(null)),r.fileStatus===We.FAILED&&(i({type:"edit_file",identifier:n,file:r}),a(null))):e.current=!1}),[r,n,o,a,i])}const $t=(e=>{var t={};return b.d(t,e),t})({ScopeProvider:()=>o.ScopeProvider}),Zt=(0,I.createContext)(void 0),Kt=(0,I.createContext)(""),Xt=(0,I.createContext)(void 0),Qt=(0,I.createContext)(void 0),Wt=(0,I.createContext)(void 0);function Jt({children:e,root:t,identifier:n,showFinished:r,uploadRequestConfig:a,externalUploadContext:i,onUploadSuccess:o,getUploadUrls:l,onCancelUpload:s,onOnePartDone:u,onAllPartDone:d,onDeleteFile:c}){const f=(0,I.useContext)(gt),p=(0,I.useContext)(wt),b=(0,I.useContext)(vt);return(0,I.useEffect)((()=>{p((e=>Object.assign(Object.assign({},e),{[n]:{getUploadUrls:l,onCancelUpload:s,onOnePartDone:u,onAllPartDone:d,onDeleteFile:c}})))}),[l,s,u,d,c,p,n]),(0,I.useEffect)((()=>{b((e=>Object.assign(Object.assign({},e),{[n]:o})))}),[n,o,b]),f[n]?(0,m.jsx)($t.ScopeProvider,{atoms:[Ht],children:(0,m.jsx)(Zt.Provider,{value:t,children:(0,m.jsx)(Kt.Provider,{value:n,children:(0,m.jsx)(Xt.Provider,{value:r,children:(0,m.jsx)(Qt.Provider,{value:i,children:(0,m.jsx)(Wt.Provider,{value:a,children:e})})})})})}):(0,m.jsx)(m.Fragment,{})}var Yt=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function en(){const e=Nt(),{message:t}=y.App.useApp(),n=(0,I.useContext)(Kt),r=(0,I.useContext)(gt),a=(0,I.useContext)(St);return function(a){return Yt(this,void 0,void 0,(function*(){const{onCancelUpload:o}=r[n];if(!a.uploadId)return void i(a.fileName);const l=yield o(a.fileName,a.uploadId);l.status?i(a.fileName):t.error(l.reason||e("取消失败"))}))};function i(e){nt(String(n),e),a({type:"remove_file",identifier:n,fileName:e})}}function tn(e){return(0,m.jsx)("svg",Object.assign({width:"18",height:"16",viewBox:"0 0 18 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e,{children:(0,m.jsxs)("g",{id:"Component 56",children:[(0,m.jsx)("path",{id:"Subtract",d:"M10.1988 5.9923V1.50071L5.00029 1.5C4.44796 1.49992 4.00016 1.94765 4.00015 2.49999L4 13.4998C3.99999 14.0521 4.44771 14.4999 5 14.4999H13.5068C14.0591 14.4999 14.5068 14.0522 14.5068 13.4999L14.507 5.9923H10.1988Z",fill:"currentColor"}),(0,m.jsx)("path",{id:"Subtract_2",d:"M14.507 4.82148H11.3911V1.5L14.507 4.82148Z",fill:"currentColor",fillOpacity:"0.4"})]})}))}const nn={size:12,type:"circle",strokeWidth:16,showInfo:!1,strokeLinecap:"butt"},rn={[We.INIT]:"等待上传",[We.MERGING]:"合并中",[We.CANCELED]:"已取消",[We.ALL_UPLOADED]:"校验中",[We.PAUSED]:"已暂停",[We.FAILED]:"上传失败",[We.UPLOADING]:"上传中",[We.FINISHED]:"上传成功"},an=(0,I.memo)((function({file:e}){const t=Nt(),n=en();return(0,m.jsx)("div",{className:"my-2.5",children:(0,m.jsxs)(on,{children:[(0,m.jsx)(ln,{fileName:e.fileName}),(0,m.jsxs)(y.Flex,{align:"center",gap:".25rem",className:"relative",children:[(0,m.jsx)(sn,{fileStatus:t(rn[e.fileStatus]),percentage:Number(e.percentage.toFixed(0)),className:"group-hover:-translate-x-6 transition-transform"}),(0,m.jsx)(un,{onDelete:()=>n(e),className:"absolute right-0 opacity-0 group-hover:opacity-100 transition-opacity"})]})]})})}));function on({children:e,className:t}){return(0,m.jsx)("div",{className:`p-2 relative flex justify-between items-center rounded group ${t}`,children:e})}function ln({fileName:e,className:t}){return(0,m.jsxs)(y.Flex,{align:"center",gap:".25rem",children:[(0,m.jsx)("div",{className:"flex items-center justify-center h-6 w-6 rounded bg-[#F5F7FA]",children:(0,m.jsx)(tn,{className:`text-gray-5 h-5 w-5 ${t}`})}),(0,m.jsx)("span",{className:`truncate w-40 text-gray-5 ${t}`,children:e})]})}function sn({className:e="",fileStatus:t,percentage:n,strokeColor:r="#1775FE"}){return(0,m.jsxs)("div",{className:`flex items-center gap-1 h-6 text-sm mr-1 text-gray-5 ${e}`,children:[t,(0,m.jsx)(y.Progress,Object.assign({percent:n},nn,{strokeColor:r}))]})}function un({onDelete:e,extraActions:t,className:n=""}){return(0,m.jsxs)("div",{className:`flex items-center justify-center h-6 gap-1 text-gray-5 ${n}`,children:[t,(0,m.jsx)(Dt,{onClick:e,className:"h-4 w-4 cursor-pointer"})]})}const dn=(0,I.memo)((function(){const e=Nt(),t=(0,I.useContext)(Kt),n=(0,Lt.useAtomValue)(Mt),r=(0,Lt.useAtomValue)(Bt),a=(0,Lt.useAtomValue)(Gt),i=(0,I.useContext)(gt),{onCancelUpload:o}=i[t],l=(0,Lt.useSetAtom)(Ht);return(0,m.jsx)("div",{className:"my-2.5",children:(0,m.jsxs)(on,{className:"border-gray-3 border border-solid hover:bg-assist-bg-blue",children:[(0,m.jsx)(ln,{fileName:n}),(0,m.jsxs)(y.Flex,{align:"center",gap:".25rem",className:"relative",children:[(0,m.jsx)(sn,{fileStatus:e("正在上传"),percentage:Number(r.toFixed(0)),className:"group-hover:-translate-x-6 transition-transform"}),(0,m.jsx)(un,{onDelete:function(){return r=this,i=void 0,u=function*(){const r=yield o(n,a);r.status?(nt(String(t),n),l((e=>e?Object.assign(Object.assign({},e),{fileStatus:We.CANCELED}):e))):y.message.error(r.reason||e("取消失败"))},new((s=void 0)||(s=Promise))((function(e,t){function n(e){try{o(u.next(e))}catch(e){t(e)}}function a(e){try{o(u.throw(e))}catch(e){t(e)}}function o(t){var r;t.done?e(t.value):(r=t.value,r instanceof s?r:new s((function(e){e(r)}))).then(n,a)}o((u=u.apply(r,i||[])).next())}));var r,i,s,u},className:"absolute right-0 opacity-0 group-hover:opacity-100 transition-opacity"})]})]})})}));const cn=(0,I.memo)((function({file:e}){const t=Nt(),n=(0,I.useContext)(St),r=(0,I.useContext)(Kt),a=(0,I.useContext)(gt),{onDeleteFile:i}=a[r],o=en();return(0,m.jsx)("div",{className:"my-2.5",children:(0,m.jsxs)(on,{className:"border-gray-3 border border-solid hover:bg-assist-bg-blue",children:[(0,m.jsx)(ln,{fileName:e.fileName,className:"text-green-green"}),(0,m.jsxs)(y.Flex,{align:"center",gap:".25rem",className:"relative",children:[(0,m.jsx)(sn,{percentage:100,fileStatus:t("上传成功"),strokeColor:"#53C31B",className:"text-green-green group-hover:-translate-x-6 transition-transform"}),(0,m.jsx)(un,{onDelete:()=>function(e){return t=this,a=void 0,s=function*(){if(!i)return o(e);(yield i(e.fileName))&&n({type:"remove_file",identifier:r,fileName:e.fileName})},new((l=void 0)||(l=Promise))((function(e,n){function r(e){try{o(s.next(e))}catch(e){n(e)}}function i(e){try{o(s.throw(e))}catch(e){n(e)}}function o(t){var n;t.done?e(t.value):(n=t.value,n instanceof l?n:new l((function(e){e(n)}))).then(r,i)}o((s=s.apply(t,a||[])).next())}));var t,a,l,s}(e),className:"absolute right-0 opacity-0 group-hover:opacity-100 transition-opacity"})]})]})})})),fn=(0,I.memo)((function({file:e}){const t=en();return(0,m.jsx)("div",{className:"my-2.5",children:(0,m.jsxs)(on,{className:"bg-red/10",children:[(0,m.jsx)((function(){return(0,m.jsxs)(y.Flex,{align:"center",gap:".25rem",children:[(0,m.jsx)("div",{className:"flex items-center justify-center h-6 w-6 rounded bg-red/10",children:(0,m.jsx)(tn,{className:"text-red-red h-5 w-5"})}),(0,m.jsx)("span",{className:"truncate w-40 text-red-red",children:e.fileName})]})}),{}),(0,m.jsxs)(y.Flex,{align:"center",gap:".25rem",className:"relative",children:[(0,m.jsx)((function({className:e=""}){const t=Nt();return(0,m.jsx)("div",{className:`flex items-center gap-1 h-6 text-sm mr-1 text-red-red ${e}`,children:t("上传失败")})}),{className:"group-hover:-translate-x-6 transition-transform"}),(0,m.jsx)(un,{onDelete:()=>t(e),className:"text-red-red absolute right-0 opacity-0 group-hover:opacity-100 transition-opacity"})]})]})})}));var pn=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function bn(){const e=(0,I.useContext)(Kt),t=(0,I.useContext)(gt),n=(0,I.useContext)(St);return(0,I.useCallback)((r=>pn(this,void 0,void 0,(function*(){const a=t[e];if(function(e){if(!e)return Ve.SHOULD_CREATE_NEW_FILE;const t=new Date;return new Date(e)<t?Ve.SHOULD_CREATE_NEW_FILE:Ve.SHOULD_USE_OLD_INFO}(r.expiryTime)===Ve.SHOULD_CREATE_NEW_FILE){const t=yield Ye(r.raw,void 0,a.getUploadUrls);n({type:"edit_file",identifier:e,file:t})}else{const t=[...r.failSeq,...r.uploadUrls];n({type:"edit_file",identifier:e,file:Object.assign(Object.assign({},r),{uploadUrls:t,failSeq:[],cancelControllers:[],fileStatus:We.INIT})})}}))),[e,t,n])}const hn=(0,I.memo)((function({file:e}){const t=Nt(),n=en();return(0,m.jsx)("div",{className:"my-2.5",children:(0,m.jsxs)(on,{className:"border-gray-3 border border-solid hover:bg-assist-bg-blue",children:[(0,m.jsx)(ln,{fileName:e.fileName}),(0,m.jsxs)(y.Flex,{align:"center",gap:".25rem",className:"relative",children:[(0,m.jsx)(sn,{fileStatus:t("已暂停"),percentage:Number(e.percentage.toFixed(0)),className:"group-hover:-translate-x-10 transition-transform"}),(0,m.jsx)(un,{extraActions:(0,m.jsx)((function(){const t=bn();return(0,m.jsx)(ce.PlayCircleFilled,{className:"text-gray-5 h-4 w-4 cursor-pointer",onClick:()=>t(e)})}),{}),onDelete:()=>n(e),className:"absolute right-0 opacity-0 group-hover:opacity-100 transition-opacity"})]})]})})}));function mn(){const e=Nt(),t=(0,I.useContext)(Kt),n=(0,I.useContext)(jt),r=(0,I.useContext)(Xt),a=(0,Lt.useAtomValue)(Mt),i=(0,I.useMemo)((()=>{var e;return null===(e=n[t])||void 0===e?void 0:e.filter((e=>!(!r&&e.fileStatus===We.FINISHED)))}),[t,r,n]);return Vt(),i&&0!==i.length?(0,m.jsxs)("div",{className:"mb-5",children:[(0,m.jsx)("div",{className:"text-sm text-gray-7",children:e("当前上传")}),(0,m.jsx)("div",{className:"max-h-72 overflow-y-auto",children:i.map((e=>{if(e.fileName===a)return(0,m.jsx)(dn,{},e.fileName);switch(e.fileStatus){case We.FINISHED:return(0,m.jsx)(cn,{file:e},e.fileName);case We.FAILED:return(0,m.jsx)(fn,{file:e},e.fileName);case We.PAUSED:return(0,m.jsx)(hn,{file:e},e.fileName);default:return(0,m.jsx)(an,{file:e},e.fileName)}}))})]}):(0,m.jsx)(m.Fragment,{})}const gn={icon:null,centered:!0,closable:!0,styles:{mask:{backgroundColor:"rgba(0, 0, 0, 0.6)"},body:{marginTop:"24px",textAlign:"center"},content:{padding:"20px 20px 16px 20px",borderRadius:"10px"}},footer:e=>(0,m.jsx)(y.Flex,{justify:"center",align:"center",children:e}),className:"zjlab-fe-data-hub-ui-modal"},wn={width:600,centered:!0,closable:!0,styles:{body:{display:"flow-root"},footer:{textAlign:"center"},header:{marginBlockEnd:"16px"},mask:{backgroundColor:"rgba(0, 0, 0, 0.6)"},content:{padding:"20px 20px 16px 20px",borderRadius:"10px"}},className:"zjlab-fe-data-hub-ui-file-uploader zjlab-fe-data-hub-ui-modal"};var yn=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function vn(e,t,n){const r=new Set(t.map((e=>e.fileName)));return e.filter((e=>{const t=n?`${n}${e.name}`:e.name;return r.has(t)})).map((e=>e.name))}function xn(e,t){return e.filter((e=>{var n;const r=e.name.includes("/"),a=e.name.split("/")[0];return r===(null===(n=t.find((e=>e.fileName===a)))||void 0===n?void 0:n.isFolder)})).map((e=>e.name))}var jn=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};var Sn=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function Cn(e){const{message:t,modal:n}=y.App.useApp(),r=(0,I.useContext)(St),a=bn();return(0,I.useCallback)((()=>Sn(this,void 0,void 0,(function*(){const i=yield function(e){return Sn(this,void 0,void 0,(function*(){const t=yield(o=e,new Promise(((e,t)=>{function n(n){it.objectStoreNames.contains(n)?function(e){return new Promise((function(t,n){try{const n=it.transaction(e,"readonly").objectStore(e),r=[],a=n.openCursor();a.onsuccess=()=>{const e=a.result;e?(r.push(e.value),e.continue()):t(r)},a.onerror=()=>console.warn(`retrieveExistingData 中游标操作失败 - 错误代码: ${a.error}`)}catch(e){n(Error(`retrieveExistingData 中执行事务或打开游标时发生异常 - ${e.message}`))}}))}(n).then(e).catch(t):function(n){const r=it.version+1;it.close();const a=window.indexedDB.open(at,r);a.onerror=()=>t(Error(`打开数据库失败: ${a.error}`)),a.onblocked=()=>t(Error(`数据库被阻塞: ${a.error}`)),a.onsuccess=()=>console.info("openRequest.onsuccess 在 triggerDatabaseUpgrade 中被触发"),a.onupgradeneeded=()=>{ot(a.result);try{a.result.createObjectStore(n,{}),a.result.onversionchange=e=>{null===e.newVersion&&a.result.close()},e([])}catch(e){t(Error(`升级数据库异常: ${e.message}`))}}}(n)}it?n(o):function(e){try{const r=window.indexedDB.open(at);r.onsuccess=()=>{ot(r.result),n(e)},r.onerror=()=>t(Error(`打开数据库失败: ${r.error}`)),r.onblocked=()=>t(Error(`数据库被阻塞: ${r.error}`)),r.onupgradeneeded=()=>console.info("openRequest.onupgradeneeded(SHOULD NOT BE CALLED)")}catch(e){console.warn(`打开数据库时发生异常: ${e.message}`,e),t(e)}}(o)}))),n=JSON.parse(localStorage.getItem(e)||"[]"),r=JSON.parse(localStorage.getItem(e+"_uploading")||"[]"),a=function(){if(r.length){const e=n.findIndex((e=>e.fileName===r[0].fileName));-1!==e&&n.splice(e,1,r[0])}return n}(),i=t.map((e=>{const t=a.find((t=>t.fileName===e.name));return t?Object.assign(Object.assign({},t),{raw:e,fileStatus:We.PAUSED}):null})).filter((e=>null!==e));var o;return localStorage.removeItem(e),localStorage.removeItem(e+"_uploading"),i}))}(e);r({type:"add_files",identifier:e,files:i}),i.length&&n.confirm(Object.assign(Object.assign({},gn),{title:"提示",content:"检测到未完成上传任务,是否继续上传?",onOk(){i.forEach((e=>a(e)))},onCancel(){t.info("点击上传按钮手动继续")}}))}))),[e,r,a,n,t])}var An=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};function zn(e){var{extra:t,dragAreaConfig:n}=e,r=An(e,["extra","dragAreaConfig"]);return(0,m.jsx)(Jt,Object.assign({},r,{children:(0,m.jsx)(Nn,{extra:t,dragAreaConfig:n})}))}function Nn({extra:e,dragAreaConfig:t}){!function(){const e=(0,I.useContext)(Kt),t=(0,I.useContext)(jt),n=(0,I.useContext)(St),r=(0,I.useRef)(""),a=Cn(e);(0,I.useEffect)((()=>{r.current!==e&&(r.current=e,t[e]||n({type:"add",identifier:e}),a())}),[e,a,t,n])}();const{isFormatingFiles:n,formatFiles:r}=function(){const e=Nt(),{message:t}=y.App.useApp(),n=(0,I.useContext)(Zt),r=(0,I.useContext)(Kt),a=(0,I.useContext)(gt),i=(0,I.useContext)(St),{getUploadUrls:o}=a[r],[l,s]=(0,I.useState)(!1),u=function(){const{modal:e}=y.App.useApp(),t=Nt(),n=(0,I.useContext)(Zt),r=(0,I.useContext)(Kt),a=(0,I.useContext)(jt),i=(0,I.useContext)(Qt);return function(o){return yn(this,void 0,void 0,(function*(){const l=[...vn(o,a[r],n),...xn(o,null!=i?i:[])];return l.length?[yield e.confirm(Object.assign(Object.assign({},gn),{okText:t("覆盖"),cancelText:t("取消"),title:t("发现同名文件,是否覆盖?")})),new Set(l)]:[!0,new Set]}))}}(),d=function(){const e=(0,I.useContext)(Kt),t=(0,I.useContext)(jt),n=en();return function(r){const a=t[e];for(const e of r){const t=a.find((t=>t.fileName===e));t&&n(t)}}}();return{isFormatingFiles:l,formatFiles:function(a){return jn(this,void 0,void 0,(function*(){s(!0);const l=yield function(e){return jn(this,void 0,void 0,(function*(){const[t,n]=yield u(e);return t?(d(n),e):e.filter((e=>!n.has(e.name)))}))}(a),c=yield function(r){return jn(this,void 0,void 0,(function*(){const a=r.map((e=>Ye(e,n,o))),i=(yield Promise.allSettled(a)).filter((e=>"fulfilled"===e.status)).map((e=>e.value));return(i.some((e=>e.fileStatus===We.FAILED))||i.length<r.length)&&t.info(e("部分文件获取上传地址失败")),i}))}(l);i({type:"add_files",identifier:r,files:c}),function(e,t){try{const n=it.transaction(e,"readwrite").objectStore(e);t.forEach((e=>n.put(e,e.name)))}catch(e){console.warn(`在 addFilesToIndexdb 中, db.transaction/transaction.objectStore/objectStore.put 异常 - ${e.message}`)}}(r,c.map((e=>e.raw))),s(!1)}))}}}();return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(y.Spin,{spinning:n,children:(0,m.jsx)(Ft,Object.assign({},t,{onFileReceived:r}))}),e&&(0,m.jsx)("div",{className:"mb-4",children:e}),(0,m.jsx)(mn,{})]})}var On=b(915),En={};En.styleTagTransform=P(),En.setAttributes=N(),En.insert=A().bind(null,"head"),En.domAPI=S(),En.insertStyleElement=E(),x()(On.A,En),On.A&&On.A.locals&&On.A.locals;var kn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};function Pn(e){var{config:{modal:t,dragArea:n,uploadRequest:r}}=e,a=kn(e,["config"]);const i=Nt();return(0,I.useContext)(jt)===xt?(0,m.jsx)(y.Modal,Object.assign({},wn,{title:i("文件上传")},t,{children:(0,m.jsx)(y.Alert,{message:i("FileUploadModal 必须在 UploadStoreProvider 内使用"),type:"warning"})})):(0,m.jsx)(y.Modal,Object.assign({},wn,{forceRender:!0,title:i("文件上传"),footer:(0,m.jsx)(y.Button,{type:"primary",onClick:t.onCancel,children:i("确定")})},t,{children:(0,m.jsx)(zn,Object.assign({},a,{dragAreaConfig:n,uploadRequestConfig:r}))}))}const Fn=function(e){const t=Nt();return(0,I.useContext)(jt)===xt?(0,m.jsx)(y.Alert,{message:t("FileUploader 必须在 UploadStoreProvider 内使用"),type:"warning"}):(0,m.jsx)("div",{className:"zjlab-fe-data-hub-ui-file-uploader",children:(0,m.jsx)(zn,Object.assign({},e))})},Dn=(e=>{var t={};return b.d(t,e),t})({getFileExt:()=>l.getFileExt});function Ln(e){return new Promise((t=>{if(e&&e.length>0){const n=[...e];function r(){n.length>0?setTimeout(a):setTimeout((()=>{t(null)}))}function a(){const e=n.shift(),t=(0,Dn.getFileExt)(e);if("js"===t||"mjs"===t){if(!document.querySelector(`script[src="${e}"]`)){const n=document.createElement("script");return n.src=e,"mjs"===t&&(n.type="module"),document.head.appendChild(n),n.onload=r,void(n.onerror=r)}}else if("css"===t&&!document.querySelector(`link[href="${e}"]`)){const t=document.createElement("link");return t.rel="stylesheet",t.href=e,document.head.appendChild(t),t.onload=r,void(t.onerror=r)}r()}a()}else t(null)}))}var In=b(482),Un={};function Tn(e){const{filePath:t}=e,n=(0,I.useRef)(null),r=(0,I.useRef)(0),a=(0,I.useRef)(null),i=(0,I.useRef)(0),o=(0,I.useRef)(0),l=(0,I.useRef)(0),s=(0,I.useRef)(!1),u=()=>{if(s.current)return Promise.resolve();s.current=!0;const e=l.current+3>i.current?i.current:l.current+3;return new Promise((t=>{if(a.current){const r=n.current;let s=e-l.current;for(let d=l.current+1;d<=e;d++)a.current.getPage(d).then((e=>{const t=e.getViewport({scale:window.devicePixelRatio||1}),n=document.createElement("canvas");n.setAttribute("id","the-canvas"+d),n.height=t.height,n.width=t.width;const a={canvasContext:n.getContext("2d"),viewport:t};return r.appendChild(n),e.render(a).promise.then((()=>new Promise((e=>{setTimeout((()=>{o.current=o.current+n.clientHeight,e(1)}))}))))})).catch((e=>{})).finally((()=>{s--,0===s&&(o.current<n.current.clientHeight&&e<i.current&&setTimeout(u),t(1))}))}else t(0)})).then((()=>{s.current=!1,l.current=e}))};return(0,I.useEffect)((()=>{Ln(["https://fastly.jsdelivr.net/npm/pdfjs-dist@4.7.76/build/pdf.min.mjs","https://fastly.jsdelivr.net/npm/pdfjs-dist@4.7.76/build/pdf.worker.min.mjs"]).then((()=>{window.pdfjsLib.getDocument(t).promise.then((t=>{var n;a.current=t,i.current=t.numPages,u(),null===(n=null==e?void 0:e.onSuccess)||void 0===n||n.call(e)})).catch((t=>{var n;null===(n=null==e?void 0:e.onError)||void 0===n||n.call(e,t)}))}))}),[t]),(0,m.jsx)("div",{ref:n,className:In.L,onScroll:e=>{const t=e.target.scrollTop;t>r.current&&l.current<i.current&&t>o.current-200-n.current.clientHeight&&u(),r.current=t}})}Un.styleTagTransform=P(),Un.setAttributes=N(),Un.insert=A().bind(null,"head"),Un.domAPI=S(),Un.insertStyleElement=E(),x()(In.A,Un),In.A&&In.A.locals&&In.A.locals;var Rn=b(685),_n={};_n.styleTagTransform=P(),_n.setAttributes=N(),_n.insert=A().bind(null,"head"),_n.domAPI=S(),_n.insertStyleElement=E(),x()(Rn.A,_n),Rn.A&&Rn.A.locals&&Rn.A.locals;var Hn=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function Mn(e){const t=(0,I.useRef)(null);return(0,I.useEffect)((()=>{Ln(["https://fastly.jsdelivr.net/npm/x-data-spreadsheet@1.1.9/dist/xspreadsheet.js","https://fastly.jsdelivr.net/npm/x-data-spreadsheet@1.1.9/dist/xspreadsheet.css","https://fastly.jsdelivr.net/npm/xlsx@0.18.5/dist/xlsx.full.min.js"]).then((()=>Hn(this,void 0,void 0,(function*(){fetch(e.filePath).then((n=>{n.arrayBuffer().then((function(n){var r;const a=window.XLSX.read(n);window.x_spreadsheet(t.current,{mode:"read",showToolbar:!1,showContextmenu:!1,view:{height:()=>t.current.clientHeight,width:()=>t.current.clientWidth}}).loadData(function(e){const t=[];return e.SheetNames.forEach((function(n){const r={name:n,rows:{}},a=e.Sheets[n];if(!a||!a["!ref"])return;const i=XLSX.utils.decode_range(a["!ref"]);i.s={r:0,c:0};const o=XLSX.utils.sheet_to_json(a,{raw:!1,header:1,range:i});o.forEach((function(e,t){const n={};e.forEach((function(e,r){n[r]={text:e||String(e)};const i=XLSX.utils.encode_cell({r:t,c:r});null!=a[i]&&null!=a[i].f&&(n[r].text="="+a[i].f)})),r.rows[t]={cells:n}})),r.rows.len=o.length,r.merges=[],(a["!merges"]||[]).forEach((function(e,t){null==r.rows[e.s.r]&&(r.rows[e.s.r]={cells:{}}),null==r.rows[e.s.r].cells[e.s.c]&&(r.rows[e.s.r].cells[e.s.c]={}),r.rows[e.s.r].cells[e.s.c].merge=[e.e.r-e.s.r,e.e.c-e.s.c],r.merges[t]=XLSX.utils.encode_range(e)})),t.push(r)})),t}(a)),null===(r=null==e?void 0:e.onSuccess)||void 0===r||r.call(e)})).catch((e=>{throw e}))})).catch((t=>{var n;console.log(t),null===(n=null==e?void 0:e.onError)||void 0===n||n.call(e,t)}))}))))}),[]),(0,m.jsx)("div",{ref:t,className:Rn.L})}var Gn=b(913),Bn={};function qn(e){return(0,m.jsx)("div",{className:Gn.LV,children:(0,m.jsx)("img",{src:e.filePath,onError:t=>{var n;console.log("+++ img error"),null===(n=null==e?void 0:e.onError)||void 0===n||n.call(e,t)},onLoad:()=>{var t;null===(t=null==e?void 0:e.onSuccess)||void 0===t||t.call(e)},className:Gn._8})})}Bn.styleTagTransform=P(),Bn.setAttributes=N(),Bn.insert=A().bind(null,"head"),Bn.domAPI=S(),Bn.insertStyleElement=E(),x()(Gn.Ay,Bn),Gn.Ay&&Gn.Ay.locals&&Gn.Ay.locals;var Vn=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function $n(e){const t=(0,I.useRef)(null);return(0,I.useEffect)((()=>{(()=>{Vn(this,void 0,void 0,(function*(){var n,r;yield Ln(["https://fastly.jsdelivr.net/npm/vditor@3.10.6/dist/index.css","https://fastly.jsdelivr.net/npm/vditor@3.10.6/dist/method.min.js"]);try{const r=yield fetch(e.filePath).then((e=>e.text()));window.Vditor.preview(t.current,r,{}),null===(n=null==e?void 0:e.onSuccess)||void 0===n||n.call(e)}catch(t){null===(r=null==e?void 0:e.onError)||void 0===r||r.call(e,t)}}))})()}),[]),(0,m.jsx)("div",{ref:t,style:{height:"100%",overflow:"auto"}})}var Zn=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function Kn(e){const[t,n]=(0,I.useState)("");return(0,I.useEffect)((()=>{(()=>{Zn(this,void 0,void 0,(function*(){var t,r;try{const r=yield fetch(e.filePath).then((e=>e.text()));n(r),null===(t=null==e?void 0:e.onSuccess)||void 0===t||t.call(e)}catch(t){null===(r=null==e?void 0:e.onError)||void 0===r||r.call(e,t)}}))})()}),[]),(0,m.jsx)("div",{children:t})}const Xn=(e=>{var t={};return b.d(t,e),t})({default:()=>s.default}),Qn=(e=>{var t={};return b.d(t,e),t})({ErrorBoundary:()=>u.ErrorBoundary});var Wn=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))};function Jn(e){const[t,n]=(0,I.useState)(),[r,a]=(0,I.useState)(!1),[i,o]=(0,I.useState)(),[l,s]=(0,I.useState)(1);if((0,I.useEffect)((()=>{(()=>{Wn(this,void 0,void 0,(function*(){var t,r;try{yield fetch(e.filePath).then((e=>e.text().then((e=>{try{const t=JSON.parse(e);n(t)}catch(t){const n=e.split("\n");a(!0),o(n)}})))),null===(t=null==e?void 0:e.onSuccess)||void 0===t||t.call(e)}catch(t){null===(r=null==e?void 0:e.onError)||void 0===r||r.call(e,t)}}))})()}),[]),t)return(0,m.jsx)("div",{style:{height:"100%",overflow:"auto",wordBreak:"break-all"},children:(0,m.jsx)(Qn.ErrorBoundary,{fallback:JSON.stringify(t),children:(0,m.jsx)(Xn.default,{name:!1,src:t,displayObjectSize:!1,displayDataTypes:!1,enableClipboard:!1})})});if(i){const e=i.slice(0,10*l),t=[];return e.forEach(((e,n)=>{try{const r=JSON.parse(e);t.push((0,m.jsx)(Qn.ErrorBoundary,{fallback:JSON.stringify(r),children:(0,m.jsx)(Xn.default,{name:!1,src:r,displayObjectSize:!1,displayDataTypes:!1,enableClipboard:!1},n)}))}catch(r){t.push((0,m.jsx)("div",{children:e},n))}})),(0,m.jsxs)("div",{style:{height:"100%",overflow:"auto",wordBreak:"break-all"},children:[t,10*l<i.length?(0,m.jsx)("div",{children:(0,m.jsx)(y.Button,{type:"link",onClick:()=>{s((e=>e+1))},children:"show more"})}):null]})}return null}var Yn=b(690),er={};function tr(e){var t,n,r;const{filePath:a}=e,[i,o]=(0,I.useState)(!1),[l,s]=(0,I.useState)(!0),u=t=>{var n;s(!1),o(!0),null===(n=null==e?void 0:e.onError)||void 0===n||n.call(e,t)},d=()=>{var t;s(!1),null===(t=null==e?void 0:e.onSuccess)||void 0===t||t.call(e)};let c=null;if(i)c=(0,m.jsx)("div",{className:Yn.LV,children:"获取文件失败"});else if(a){const t=(0,Dn.getFileExt)(a),n=(0,m.jsx)("div",{className:Yn.D5,children:(0,m.jsx)(y.Spin,{})});let r=null,i=!0;switch(t){case"pdf":r=(0,m.jsx)(Tn,Object.assign({},e,{onError:u,onSuccess:d}));break;case"xlsx":case"csv":r=(0,m.jsx)(Mn,Object.assign({},e,{onError:u,onSuccess:d}));break;case"png":case"jpg":case"jpeg":r=(0,m.jsx)(qn,Object.assign({},e,{onError:u,onSuccess:d}));break;case"md":r=(0,m.jsx)($n,Object.assign({},e,{onError:u,onSuccess:d}));break;case"txt":r=(0,m.jsx)(Kn,Object.assign({},e,{onError:u,onSuccess:d}));break;case"jsonl":case"json":r=(0,m.jsx)(Jn,Object.assign({},e,{onError:u,onSuccess:d}));break;default:i=!1}c=i?(0,m.jsxs)(m.Fragment,{children:[l&&n,r]}):(0,m.jsxs)("div",{className:Yn.LV,children:["暂不支持",t,"文件预览"]})}return e.openInModal?(null===(t=null==e?void 0:e.modalProps)||void 0===t?void 0:t.show)?(0,m.jsx)(y.Modal,{open:!0,title:null===(n=null==e?void 0:e.modalProps)||void 0===n?void 0:n.title,className:Yn.qf,centered:!0,width:"100%",onCancel:null===(r=null==e?void 0:e.modalProps)||void 0===r?void 0:r.onCancel,footer:null,children:c}):null:c}function nr(e){const[t,n]=(0,I.useState)(0),[r,a]=(0,I.useState)(e.filePath);return(0,I.useEffect)((()=>{r!==e.filePath&&(a(e.filePath),n(t+1))}),[e.filePath]),r!==e.filePath?null:(0,m.jsx)(tr,Object.assign({},e),t)}er.styleTagTransform=P(),er.setAttributes=N(),er.insert=A().bind(null,"head"),er.domAPI=S(),er.insertStyleElement=E(),x()(Yn.Ay,er),Yn.Ay&&Yn.Ay.locals&&Yn.Ay.locals;const rr=(e=>{var t={};return b.d(t,e),t})({default:()=>d.default});var ar=b(860),ir={};ir.styleTagTransform=P(),ir.setAttributes=N(),ir.insert=A().bind(null,"head"),ir.domAPI=S(),ir.insertStyleElement=E(),x()(ar.A,ir),ar.A&&ar.A.locals&&ar.A.locals;const or=(e=>{var t={};return b.d(t,e),t})({default:()=>c.default}),lr={zh:"已复制",en:"Copied"};function sr(e){const{showFeedback:t=!0,text:n,locale:r="zh"}=e;return(0,m.jsx)("span",{className:(0,or.default)(ar.K,"data-hub-ui-copy-icon"),onClick:()=>{n&&((0,rr.default)(n),t&&y.message.success(lr[r])),(null==e?void 0:e.onClick)&&e.onClick()},children:""})}function ur(e,t={showFeedback:!0,locale:"zh"}){const{showFeedback:n="true",locale:r="zh"}=t;e&&((0,rr.default)(e),n&&y.message.success(lr[r]))}var dr=b(100),cr={};function fr(e){return(0,m.jsx)(y.Modal,Object.assign({},e,{wrapClassName:dr.wm,width:400}))}cr.styleTagTransform=P(),cr.setAttributes=N(),cr.insert=A().bind(null,"head"),cr.domAPI=S(),cr.insertStyleElement=E(),x()(dr.Ay,cr),dr.Ay&&dr.Ay.locals&&dr.Ay.locals,fr.confirm=e=>{y.Modal.confirm(Object.assign({},e)).update({icon:null,closable:!0,width:400,wrapClassName:`${dr.DE}`})};var pr=b(989),br={};br.styleTagTransform=P(),br.setAttributes=N(),br.insert=A().bind(null,"head"),br.domAPI=S(),br.insertStyleElement=E(),x()(pr.Ay,br),pr.Ay&&pr.Ay.locals&&pr.Ay.locals;const hr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAARCAYAAADUryzEAAAAAXNSR0IArs4c6QAAAf1JREFUOE+lkz9oE3EUx7/vd0nbOPing5RSKJ0q+GdVUCkOLh2qQ4lLtfVsESlpTEsql2bIUNI2htSLONleKjqUc1BxE3QQCuJSKAg6aKfqIqiQao7mfq/cNXckscGAv+l+777v897v/b4/wn8uapQfyedbj1Kos2xL+3jnka1wOGzvp/0LMJtd6hYBoRFwFcCBStJvBh4TI6PF1C/VoBpAWi/0E/MzAC0NOttmlkOJ2Ohz778PSOceniehvG1mJEIop+9MDL93tC7ANE3l89fiBwC9zQBA+Gj96DmZSl0ou4D0ojFIhKd+MvMaE70mIFmJ3QVwFsA5T2NLOZCcHH3pAuYXjQUmTFdV/yVh9wpWVEBCEhsCyicAh3wNQdei6m0XMHfPWAVwpW66P1uZepyYRbzJwOGa4zFeaDH18h5AN1bAGK4REObaJGWcWEnwNBhaHeCRFlNHKh0sTwGU9QTMMEOgmyXiDSfWxnSqBF4B4ZKvIZpKRK/nXEDmQaHD3uFvVRUc45QIaK9c1XfeM5VnLNjS6kpO3tryfTCvF/LMHGnmGpn4fiJ6Y8L3gfORy5khSxTfADjzD8g7K/jnYmp8vFgDcDap/JODLbwzS406YeiBcmAmHr+27RXZ9zWms4VjCHAfQZwgyKAE1oOK/SoeGdus767hc25mFo5mF83NrRLVZKusAAAAAElFTkSuQmCC";function mr({visiable:e,children:t,onClose:n}){const[r,a]=(0,I.useState)(!1);return(0,I.useEffect)((()=>{a(e)}),[e]),r?(0,m.jsxs)("div",{className:pr.LV,children:[(0,m.jsx)("div",{style:{backgroundImage:"url("+hr+")"},className:pr.Kk,onClick:()=>n()}),(0,m.jsx)("div",{className:pr.NI,children:t})]}):null}var gr=b(150),wr={};function yr(e){return(0,m.jsx)("div",{className:`${gr.cQ} ${"workflow"===e.type?gr._b:gr.Og}`,children:e.children})}function vr(e){return(0,m.jsx)("div",{className:`${gr.Rp} ${"workflow"===e.type?gr._b:gr.Og}`,children:e.children})}function xr(e){return(0,m.jsxs)("div",{children:["small"===(null==e?void 0:e.size)&&(0,m.jsx)(vr,Object.assign({},e)),(!(null==e?void 0:e.size)||"middle"===(null==e?void 0:e.size))&&(0,m.jsx)(yr,Object.assign({},e))]})}wr.styleTagTransform=P(),wr.setAttributes=N(),wr.insert=A().bind(null,"head"),wr.domAPI=S(),wr.insertStyleElement=E(),x()(gr.Ay,wr),gr.Ay&&gr.Ay.locals&&gr.Ay.locals;var jr=h.NF,Sr=h.LZ,Cr=h.QR,Ar=h.dA,zr=h.Lq,Nr=h.Bx,Or=h.l0,Er=h.Ow,kr=h.Y9,Pr=h.ly,Fr=h._2,Dr=h.WI,Lr=h.C;export{jr as BenchCard,Sr as ConfirmAgain,Cr as Copy,Ar as FilePreview,zr as FileUploadDrawer,Nr as FileUploadModal,Or as FileUploader,Er as FloatingLayer,kr as Header,Pr as InputTag,Fr as UploadDrawerUploadStoreProvider,Dr as UploadStoreProvider,Lr as copy};
|