@zjlab-fe/data-hub-ui 0.2.1 → 0.2.3

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 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 o from"axios";import*as i from"jotai";import*as a from"jotai-scope";import*as l from"@zjlab-fe/util";import*as s from"react-json-view";import*as c from"copy-to-clipboard";import*as u from"classnames";var d={100:(e,t,n)=>{n.d(t,{Ay:()=>c,DE:()=>s,wm:()=>l});var r=n(245),o=n.n(r),i=n(526),a=n.n(i)()(o());a.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 c=a},860:(e,t,n)=>{n.d(t,{A:()=>s,K:()=>l});var r=n(245),o=n.n(r),i=n(526),a=n.n(i)()(o());a.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=a},685:(e,t,n)=>{n.d(t,{A:()=>s,L:()=>l});var r=n(245),o=n.n(r),i=n(526),a=n.n(i)()(o());a.push([e.id,".cJmcPSn5LN2GH9HqTvEQ{height:100%;overflow-x:hidden;overflow-y:auto}",""]);var l="cJmcPSn5LN2GH9HqTvEQ";const s=a},913:(e,t,n)=>{n.d(t,{Ay:()=>c,LV:()=>l,_8:()=>s});var r=n(245),o=n.n(r),i=n(526),a=n.n(i)()(o());a.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 c=a},690:(e,t,n)=>{n.d(t,{Ay:()=>u,D5:()=>s,LV:()=>l,qf:()=>c});var r=n(245),o=n.n(r),i=n(526),a=n.n(i)()(o());a.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",c="QSsGpXvLzOYpHSNncjpj";const u=a},482:(e,t,n)=>{n.d(t,{A:()=>s,L:()=>l});var r=n(245),o=n.n(r),i=n(526),a=n.n(i)()(o());a.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=a},989:(e,t,n)=>{n.d(t,{Ay:()=>u,Kk:()=>s,LV:()=>l,NI:()=>c});var r=n(245),o=n.n(r),i=n(526),a=n.n(i)()(o());a.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",c="dWjTN1AD2WJesHevGU09";const u=a},280:(e,t,n)=>{n.d(t,{Ay:()=>c,LV:()=>l,wm:()=>s});var r=n(245),o=n.n(r),i=n(526),a=n.n(i)()(o());a.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 c=a},588:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(245),o=n.n(r),i=n(526),a=n.n(i)()(o());a.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: , Inter, sans-serif; /* 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 .flex-col{\n flex-direction: column;\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 .rounded-ml{\n border-radius: 10px;\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-\\[\\#1775FE\\]\\/40{\n border-color: rgb(23 117 254 / 0.4);\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 .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 .bg-red\\/10{\n background-color: rgb(254 77 79 / 0.1);\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 .py-4{\n padding-top: 1rem;\n padding-bottom: 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{\n --tw-text-opacity: 1;\n color: rgb(83 195 27 / var(--tw-text-opacity));\n}.mylib-upload-drawer .text-red{\n --tw-text-opacity: 1;\n color: rgb(254 77 79 / 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\\: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}.\\[\\&_\\.ant-modal-confirm-title\\]\\:text-lg .ant-modal-confirm-title{\n font-size: 1.125rem;\n line-height: 1.75rem;\n}.\\[\\&_\\.ant-modal-confirm-title\\]\\:font-normal .ant-modal-confirm-title{\n font-weight: 400;\n}.\\[\\&_\\.ant-modal-confirm-title\\]\\:leading-6 .ant-modal-confirm-title{\n line-height: 1.5rem;\n}.\\[\\&_\\.ant-modal-title\\]\\:text-lg .ant-modal-title{\n font-size: 1.125rem;\n line-height: 1.75rem;\n}.\\[\\&_\\.ant-modal-title\\]\\:font-normal .ant-modal-title{\n font-weight: 400;\n}.\\[\\&_\\.ant-modal-title\\]\\:leading-6 .ant-modal-title{\n line-height: 1.5rem;\n}",""]);const l=a},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,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var l=0;l<this.length;l++){var s=this[l][0];null!=s&&(a[s]=!0)}for(var c=0;c<e.length;c++){var u=[].concat(e[c]);r&&a[u[0]]||(void 0!==i&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),t.push(u))}},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={},a=[],l=0;l<e.length;l++){var s=e[l],c=r.base?s[0]+r.base:s[0],u=i[c]||0,d="".concat(c," ").concat(u);i[c]=u+1;var f=n(d),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 m=o(p,r);r.byIndex=l,t.splice(l,0,{identifier:d,updater:m,references:1})}a.push(d)}return a}function o(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,o){var i=r(e=e||[],o=o||{});return function(e){e=e||[];for(var a=0;a<i.length;a++){var l=n(i[a]);t[l].references--}for(var s=r(e,o),c=0;c<i.length;c++){var u=n(i[c]);0===t[u].references&&(t[u].updater(),t.splice(u,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 o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(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 d[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 m={};p.d(m,{LZ:()=>Wn,QR:()=>$n,dA:()=>Hn,Lq:()=>Be,Bx:()=>gn,l0:()=>bn,Ow:()=>er,Y9:()=>I,ly:()=>U,_2:()=>se,WI:()=>ft,C:()=>Kn});const h=(g={Fragment:()=>e.Fragment,jsx:()=>e.jsx,jsxs:()=>e.jsxs},b={},p.d(b,g),b);var g,b;const y=(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 w=p(438),v=p.n(w),x=p(119),j=p.n(x),S=p(413),A=p.n(S),C=p(598),N=p.n(C),E=p(50),O=p.n(E),D=p(615),P=p.n(D),L=p(280),k={};function I(e){const{showLogin:t}=e;return(0,h.jsxs)("div",{className:L.LV,children:[(0,h.jsx)("img",{src:"https://www.unpkg.com/@zjlab-fe/fe-assets/logo-white.png",className:L.wm}),t&&(0,h.jsx)(y.Button,{ghost:!0,children:"登录"})]})}k.styleTagTransform=P(),k.setAttributes=N(),k.insert=A().bind(null,"head"),k.domAPI=j(),k.insertStyleElement=O(),v()(L.Ay,k),L.Ay&&L.Ay.locals&&L.Ay.locals;const F=(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 U(e){const{value:t,onChange:n,placeholder:r="请输入关键字",valueType:o,deduplicated:i=!0,size:a,maxLength:l,disabled:s}=e,[c,u]=(0,F.useState)([]),[d,f]=(0,F.useState)(1),p=(0,F.useRef)(null);(0,F.useEffect)((()=>{Array.isArray(t)?u(t):"string"==typeof t&&u(t.split(";"))}),[t]),(0,F.useEffect)((()=>{1!==d&&(null==p?void 0:p.current)&&p.current.focus()}),[d]);const m=e=>{if(i&&(e=Array.from(new Set(e))),u(e),"array"===o)null==n||n(e.length>0?e:void 0);else{const t=e.join(";");null==n||n(t||void 0)}};let g;return(null==c?void 0:c.length)>0&&(g=c.map(((e,t)=>(0,h.jsx)(y.Tag,{closeIcon:!s,onClose:()=>(e=>{const t=c.filter(((t,n)=>n!==e));m(t),f(d+1)})(t),children:e},t)))),(0,h.jsx)(y.Input,{disabled:s,size:a,ref:p,placeholder:r,prefix:g,onPressEnter:e=>{const t=e.target.value.trim(),n=[...c,t];m(n),f(d+1)},maxLength:l},d)}const T=1024,z=1048576,_=1073741824;var R,H;(H=R||(R={}))[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 V=1,M=2;var B=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(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?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))};function G(e,t,n){return B(this,void 0,void 0,(function*(){const{name:r,size:o}=e,i=t?`${t}${r}`:r,a=Object.assign(Object.assign({},{fileStatus:R.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:$(o),chunkSize:q(o),displaySize:ee(o)}),l=yield n(i,a.partCount);return l.status?Object.assign(Object.assign({},a),l.uploadInfo):Object.assign(Object.assign({},a),{fileStatus:R.FAILED})}))}function q(e){return e<10*z?10*z:Math.ceil(e/10)}function $(e){const t=q(e);return Math.floor(e/t)+1}function K(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 X(e,t,n){const r=J.version+1;J.close();const o=window.indexedDB.open(Z,r);o.onupgradeneeded=()=>K(o.result,e,t,n)}function Q(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),o=[],i=n.openCursor();i.onsuccess=()=>{const e=i.result;e?(o.push(e.value),e.continue()):t(o)},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(o,i){function a(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?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))};const Z="uploadStore";let J;function Y(e){J=e}function ee(e){const t=[{value:_,label:"GB"},{value:z,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 te=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(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?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,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 oe(e){return e.map((({completeSeq:e,uploadId:t,uploadStatus:n,uploadUrls:r,percentage:o,fileName:i,failSeq:a})=>({fileName:i,uploadId:t,completeSeq:e,uploadStatus:n,percentage:o,uploadUrls:[...r,...a]})))}const ie={},ae=(0,F.createContext)(ie),le=(0,F.createContext)((()=>null));function se({children:e}){const[t,n]=(0,F.useReducer)(ce,{});return function(e){(0,F.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!==R.FINISHED));e.length?localStorage.setItem(n,JSON.stringify(oe(e))):t.push(n)}t.length&&function(e){W(this,void 0,void 0,(function*(){const t=J.version+1;return J.close(),new Promise(((n,r)=>{const o=window.indexedDB.open(Z,t);o.onupgradeneeded=()=>{const t=o.result;e.forEach((e=>{t.objectStoreNames.contains(e)&&t.deleteObjectStore(e)}))},o.onsuccess=()=>{o.result.close(),n()},o.onerror=()=>r(o.error)}))}))}(t)}}),[e])}(t),(0,h.jsx)(ae.Provider,{value:t,children:(0,h.jsx)(le.Provider,{value:n,children:e})})}function ce(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!==R.FINISHED))})}default:throw Error("Unknown action")}}const ue=(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 de=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(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?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,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 o=(0,F.useMemo)((()=>new Set(e?e.split(","):[])),[e]),i=(0,F.useRef)(null),[a,l]=(0,F.useState)(!1),s={onDragLeave:()=>l(!1),onDragEnter:e=>e.preventDefault(),onDragOver:e=>{e.preventDefault(),l(!0)},onDrop:function(e){return de(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,o))),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)(y.Flex,Object.assign({vertical:!0,gap:"1rem",align:"center",className:`${a?"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)(ue.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 me={size:32,strokeWidth:12,type:"circle",strokeLinecap:"butt"};function he({percent:e,status:t,onClick:n}){const{progressButtonRef:r,buttonInHover:o}=function(){const e=(0,F.useRef)(null),[t,n]=(0,F.useState)(!1);return(0,F.useEffect)((()=>{const t=e.current;if(!t)return;const r=()=>n(!0),o=()=>n(!1);return t.addEventListener("mouseenter",r),t.addEventListener("mouseleave",o),()=>{t.removeEventListener("mouseenter",r),t.removeEventListener("mouseleave",o)}}),[]),{progressButtonRef:e,buttonInHover:t}}(),[i,a]=(0,F.useState)(!1);return t===R.FINISHED?(0,h.jsx)(ue.CheckOutlined,{className:"text-green-600 text-2xl h-8"}):t===R.FAILED?(0,h.jsx)(h.Fragment,{children:i?(0,h.jsx)(ue.LoadingOutlined,{className:"text-red-600 text-2xl h-8"}):(0,h.jsx)(ue.CloseOutlined,{className:"text-red-600 text-2xl h-8",onClick:()=>{n(),a(!0)}})}):(0,h.jsx)(y.Button,{type:"text",shape:"circle",disabled:i,ref:r,title:t===R.PAUSED?"继续下载":"取消下载",onClick:()=>{n(),t===R.UPLOADING&&a(!0)},children:(0,h.jsx)(y.Progress,Object.assign({percent:e},me,{strokeColor:i?"#f0a020":"#19a1fe",format:function(){return t===R.PAUSED?(0,h.jsx)(ue.PauseOutlined,{}):i?(0,h.jsx)(ue.LoadingOutlined,{className:"text-yellow-500"}):o?(0,h.jsx)(ue.CloseOutlined,{}):void 0}}))})}var ge=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(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?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))};function be(){const{identifier:e,root:t,getUploadUrls:n}=(0,F.useContext)(Me),r=(0,F.useContext)(le);return(0,F.useCallback)((o=>ge(this,void 0,void 0,(function*(){const i=function(e){if(!e.expiryTime)return V;const t=new Date;return new Date(e.expiryTime)<t?V:M}(o)===V;if(i){const i=yield G(o.raw,t,n);r({type:"edit_file",identifier:e,file:i})}else{const t=Object.assign(Object.assign({},o),{fileStatus:R.INIT,uploadUrls:[...o.failSeq,...o.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(o,i){function a(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?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))};function we(){const{message:e}=y.App.useApp(),{identifier:t,onCancelUpload:n}=(0,F.useContext)(Me),r=(0,F.useContext)(le);return function(t){return ye(this,void 0,void 0,(function*(){const{fileName:r,uploadId:i}=t;if(!i)return void o(t);const a=yield n(r,i);a.status?o(t):e.error(a.reason||"取消失败")}))};function o(e){e.fileStatus=R.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(o,i){function a(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?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))};function xe({identifier:e,showFinished:t}){const n=(0,F.useContext)(ae),r=we(),o=be(),[i,a]=(0,F.useState)([]);return(0,F.useEffect)((()=>{const r=n[e].filter((e=>e.fileStatus!==R.CANCELED&&(!1!==t||e.fileStatus!==R.FINISHED)));a(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===R.PAUSED?o(e):r(e)}}function je({identifier:e,file:t,showFinished:n,onButtonClick:r}){const o=(0,F.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)(y.Flex,{align:"center",gap:".5rem",title:t.fileName,children:[(0,h.jsx)(ue.FileTextOutlined,{}),(0,h.jsx)("span",{className:"truncate w-40",children:t.fileName})]}),(0,h.jsxs)(y.Flex,{align:"center",gap:".5rem",children:[(0,h.jsx)(he,{status:t.fileStatus,percent:Number(t.percentage.toFixed(0)),onClick:()=>r(t)}),t.fileStatus===R.FINISHED&&i&&(0,h.jsx)(y.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))&&o({type:"remove_file",identifier:e,file:t})}))}(t,i.onDelete),children:(0,h.jsx)(ue.DeleteOutlined,{})})]})]})})}var Se=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(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?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,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 Ce(e,t){return e.filter((e=>{var n;const r=e.name.includes("/"),o=e.name.split("/")[0];return r===(null===(n=t.find((e=>e.fileName===o)))||void 0===n?void 0:n.isFolder)})).map((e=>e.name))}var Ne=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(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?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))};function Ee(){const{message:e}=y.App.useApp(),{identifier:t,root:n,getUploadUrls:r}=(0,F.useContext)(Me),o=(0,F.useContext)(le),i=function(){const{message:e,modal:t}=y.App.useApp(),n=(0,F.useContext)(ae),{identifier:r,maxSizePerFile:o=10*_,uploadHistory:i=[],root:a}=(0,F.useContext)(Me);return function(l){return Se(this,void 0,void 0,(function*(){const s=function(t){const n=t.filter((e=>e.size>o)).map((e=>e.name));if(n.length){const t=ee(o);e.warning(`以下文件大小超过${t}:${n.join(", ")}`)}return n}(l),[c,u]=yield function(e){return Se(this,void 0,void 0,(function*(){const o=[...Ae(e,n[r],a),...Ce(e,i)];return o.length?[yield t.confirm({title:"发现同名文件,是否覆盖?",okText:"覆盖",cancelText:"取消"}),o]:[!0,[]]}))}(l);return c?[new Set(s),new Set(u)]:[new Set([...s,...u]),new Set]}))}}(),a=function(){const e=(0,F.useContext)(ae),{identifier:t}=(0,F.useContext)(Me),n=we();return function(r){const o=e[t];for(const e of r){const t=o.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))),a(r),Array.from(t.values())}))}(l),c=yield function(e){return Ne(this,void 0,void 0,(function*(){const t=e.map((e=>G(e,n,r)));return(yield Promise.allSettled(t)).filter((e=>"fulfilled"===e.status)).map((e=>e.value))}))}(s);c.forEach((e=>{o({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,c),c.length<s.length&&e.info("部分文件获取上传地址失败")}))}}const Oe=(e=>{var t={};return p.d(t,e),t})({default:()=>o.default});var De=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(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?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,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 Le(e,t,n){const r=e.uploadUrls.findIndex((e=>e===t));e.uploadUrls.splice(r,1),e["complete"===n?"completeSeq":"failSeq"].push(t)}var ke=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(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?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))},Ie=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(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?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))};function Fe(){const e=function(){const{identifier:e,onOnePartDone:t}=(0,F.useContext)(Me),n=(0,F.useContext)(le),r=(0,F.useCallback)(((t,r,o)=>{r.fileStatus===R.UPLOADING&&(r.uploadStatus[o]=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]),o=(0,F.useCallback)(((e,t,n)=>De(this,void 0,void 0,(function*(){const o=Oe.default.create({});yield o.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,F.useCallback)(((e,n)=>De(this,void 0,void 0,(function*(){const{fileName:r,uploadId:o}=e,i=yield t(r,o,n.partNum);if(!i.status)throw new Error(i.reason);Le(e,n,"complete")}))),[t]),a=(0,F.useCallback)(((e,t,n)=>De(this,void 0,void 0,(function*(){try{return yield o(e,t,n),yield i(n,e),n.fileStatus}catch(t){return Le(n,e,"fail"),n.fileStatus}}))),[o,i]);return(0,F.useCallback)((t=>De(this,void 0,void 0,(function*(){t.fileStatus=R.UPLOADING,n({type:"edit_file",identifier:e,file:t});const r=function(e){const{uploadUrls:t,chunkSize:n,raw:r}=e,o=r.size;return t.map((({partNum:e,uploadUrl:t})=>{const i=e*n,a=Math.min((e+1)*n,o);return{url:{partNum:e,uploadUrl:t},chunk:r.slice(i,a)}}))}(t);for(const{url:o,chunk:i}of r){if(t.cancelControllers[o.partNum]=new AbortController,(yield a(o,i,t))===R.CANCELED)return!1;n({type:"edit_file",identifier:e,file:t})}}))),[e,n,a])}(),t=function(){const{identifier:e,onAllPartDone:t}=(0,F.useContext)(Me),n=(0,F.useContext)(le);return(0,F.useCallback)((r=>ke(this,void 0,void 0,(function*(){try{const{fileName:e,uploadId:n}=r;if(0!==r.failSeq.length)throw new Error("partial failed");{const o=yield t(e,n);if(!o.status)throw new Error(o.reason);r.fileStatus=R.FINISHED}}catch(e){r.fileStatus=R.FAILED}finally{n({type:"edit_file",identifier:e,file:r})}}))),[e,t,n])}();return(0,F.useCallback)(((n,r)=>Ie(this,void 0,void 0,(function*(){yield e(n),n.fileStatus!==R.CANCELED&&(yield t(n),n.fileStatus===R.FINISHED&&r&&r(n))}))),[e,t])}var Ue=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(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?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))};function Te(e){const{message:t,modal:n}=y.App.useApp(),r=(0,F.useContext)(le),o=be();return(0,F.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)=>{J?function(e,t,n){J.objectStoreNames.contains(e)?Q(e,t,n):X(e,t,n)}(r,e,t):function(e,t,n){try{const r=window.indexedDB.open(Z);r.onupgradeneeded=()=>K(r.result,e,t,n),r.onsuccess=()=>function(e,t,n,r){Y(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:R.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(o)},onCancel(){t.info("点击上传按钮手动继续")}})}))),[e,r,o,n,t])}var ze=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(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?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))};function _e({open:e,identifier:t,accept:n,dragAreaDescription:r,footer:o,title:i="数据上传",showFinished:a=!1,directory:l=!1,onClose:s}){var c,u;const d=(0,F.useContext)(ae),f=(0,F.useContext)(le),{onSuccess:p}=(0,F.useContext)(Me),m=Ee(),g=Fe(),b=Te(t),[w,v]=(0,F.useState)([]),x=(0,F.useRef)("");return(0,F.useEffect)((()=>{x.current!==t&&(d&&f?(x.current=t,d[t]||f({type:"add",identifier:t}),b()):console.warn("FileUploadDrawer 必须在 UploadStoreProvider 内使用"))}),[t,b,d,f]),(0,F.useEffect)((()=>{const e=d[t];if(!e)return;const n=!e.some((e=>e.fileStatus===R.UPLOADING)),r=e.find((e=>e.fileStatus===R.INIT));n&&r&&g(r,p)}),[t,p,g,d]),(0,h.jsxs)(y.Drawer,{className:"mylib-upload-drawer",open:e,title:i,width:480,onClose:s,footer:o,children:[(0,h.jsx)(pe,{directory:l,accept:n,dragAreaDescription:r,onFileReceived:function(e){return ze(this,void 0,void 0,(function*(){v((t=>[...t,...e])),yield m(e),v((t=>{const n=new Set(t);for(const t of e)n.delete(t);return[...n]}))}))}}),0===w.length&&0===(null===(c=d[t])||void 0===c?void 0:c.length)&&(0,h.jsx)(y.Empty,{className:"mt-20",description:"暂无上传内容"}),w.length>0&&(0,h.jsxs)("div",{className:"flex justify-center gap-4 mt-4",children:[(0,h.jsx)(ue.LoadingOutlined,{}),"预检上传文件中(",w.length,")"]}),(null===(u=d[t])||void 0===u?void 0:u.length)>0&&(0,h.jsx)(xe,{showFinished:a,identifier:t})]})}var Re=p(588),He={};He.styleTagTransform=P(),He.setAttributes=N(),He.insert=A().bind(null,"head"),He.domAPI=j(),He.insertStyleElement=O(),v()(Re.A,He),Re.A&&Re.A.locals&&Re.A.locals;var Ve=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(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?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))};const Me=(0,F.createContext)({identifier:"",getUploadUrls:()=>Ve(void 0,void 0,void 0,(function*(){return{status:!1}})),onCancelUpload:()=>Ve(void 0,void 0,void 0,(function*(){return{status:!1}})),onOnePartDone:()=>Ve(void 0,void 0,void 0,(function*(){return{status:!1}})),onAllPartDone:()=>Ve(void 0,void 0,void 0,(function*(){return{status:!1}}))});function Be(e){if((0,F.useContext)(ae)===ie)return(0,h.jsx)(y.Drawer,{open:e.open,onClose:e.onClose,title:"数据上传",children:(0,h.jsx)(y.Alert,{message:"FileUploadDrawer 必须在 UploadStoreProvider 内使用",type:"warning"})});const{identifier:t,maxSizePerFile:n=10*_,directory:r=!1,root:o="",uploadHistory:i=[],onSuccess:a,getUploadUrls:l,onCancelUpload:s,onOnePartDone:c,onAllPartDone:u,onClose:d,dragAreaDescription:f,accept:p,open:m,footer:g,title:b,showFinished:w}=e,v={identifier:t,maxSizePerFile:n,directory:r,root:o,uploadHistory:i,onSuccess:a,getUploadUrls:l,onCancelUpload:s,onOnePartDone:c,onAllPartDone:u};return(0,h.jsx)(Me.Provider,{value:v,children:(0,h.jsx)(_e,{open:m,accept:p,footer:g,title:b,showFinished:w,directory:r,identifier:t,dragAreaDescription:f,onClose:d})})}var Ge,qe;!function(e){e[e.INIT=1]="INIT",e[e.UPLOADING=2]="UPLOADING",e[e.ALL_UPLOADED=3]="ALL_UPLOADED",e[e.FINISHED=4]="FINISHED",e[e.FAILED=5]="FAILED",e[e.PAUSED=6]="PAUSED",e[e.CANCELED=7]="CANCELED"}(Ge||(Ge={})),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 $e=1024,Ke=1048576,Xe=1073741824;var Qe=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(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?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))};function We(e,t,n){return Qe(this,void 0,void 0,(function*(){const{name:r,size:o}=e,i=t?`${t}${r}`:r,a=function(e,t,n){return{fileName:e,uploadId:"",percentage:0,expiryTime:"",failSeq:[],uploadUrls:[],completeSeq:[],uploadStatus:[],cancelControllers:{},fileStatus:Ge.INIT,partCount:Je(t),chunkSize:Ze(t),raw:new File([n],e,{type:n.type})}}(i,o,e),l=yield n(i,a.partCount);return l.status?Object.assign(Object.assign({},a),l.uploadInfo):Object.assign(Object.assign({},a),{fileStatus:Ge.FAILED})}))}function Ze(e){return e<10*Ke?10*Ke:Math.ceil(e/10)}function Je(e){const t=Ze(e);return Math.floor(e/t)+1}function Ye(e,t){try{const n=nt.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 et=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(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?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))};const tt="uploadStore";let nt;function rt(e){nt=e}var ot=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(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?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))};function it(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=>it(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)?[at(r,n)]:[]}))}(e,n,r):[]}))}function at(e,t){const n=e.slice(0,e.size,e.type);return new File([n],t.slice(1)||e.name,{type:e.type})}var lt=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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function st(e){const t=e.map((e=>{var{raw:t}=e,n=lt(e,["raw"]);const{uploadUrls:r,failSeq:o}=n;return Object.assign(Object.assign({},n),{failSeq:[],cancelControllers:{},uploadUrls:[...r,...o]})}));return JSON.stringify(t)}const ct={},ut=(0,F.createContext)(ct),dt=(0,F.createContext)((()=>null));function ft({children:e}){const[t,n]=(0,F.useReducer)(pt,{});return function(e){(0,F.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!==Ge.FINISHED));n.length?localStorage.setItem(e,st(n)):function(e){et(this,void 0,void 0,(function*(){const t=nt.version+1;return nt.close(),new Promise(((n,r)=>{const o=window.indexedDB.open(tt,t);o.onupgradeneeded=()=>{const t=o.result;t.objectStoreNames.contains(e)&&t.deleteObjectStore(e)},o.onsuccess=()=>{o.result.close(),n()},o.onerror=()=>r(o.error)}))}))}(e)}))}}),[e])}(t),(0,h.jsx)(ut.Provider,{value:t,children:(0,h.jsx)(dt.Provider,{value:n,children:e})})}function pt(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!==Ge.FINISHED))})}default:throw Error("Unknown action")}}const mt=(e=>{var t={};return p.d(t,e),t})({atom:()=>i.atom,useAtomValue:()=>i.useAtomValue,useSetAtom:()=>i.useSetAtom}),ht=(e=>{var t={};return p.d(t,e),t})({ScopeProvider:()=>a.ScopeProvider}),gt=(0,mt.atom)(""),bt=(0,mt.atom)(""),yt=(0,mt.atom)(!1),wt=(0,mt.atom)(null),vt=(0,mt.atom)(null),xt=(0,mt.atom)([]);var jt=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(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?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))};const St=Oe.default.create();function At(e,t=500){let n=null;return function(r){n||(n=setTimeout((()=>{e(r),n=null}),t))}}function Ct(e){return e.reduce(((e,t)=>(e[t.url.partNum]=new AbortController,e)),{})}var Nt=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(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?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))};const Et=(0,mt.atom)(null),Ot=(0,mt.atom)((e=>{var t;return null===(t=e(Et))||void 0===t?void 0:t.fileName})),Dt=(0,mt.atom)((e=>{var t;return null===(t=e(Et))||void 0===t?void 0:t.fileStatus})),Pt=((0,mt.atom)((e=>{var t;return null===(t=e(Et))||void 0===t?void 0:t.expiryTime})),(0,mt.atom)((e=>{var t;return null===(t=e(Et))||void 0===t?void 0:t.uploadId}))),Lt=((0,mt.atom)((e=>{var t;return null===(t=e(Et))||void 0===t?void 0:t.raw})),(0,mt.atom)((e=>{var t;return null===(t=e(Et))||void 0===t?void 0:t.percentage}))),kt=(0,mt.atom)((e=>{var t;return null===(t=e(Et))||void 0===t?void 0:t.cancelControllers}));function It(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"})]})]})}))}var Ft=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(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?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))};function Ut({description:e}){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)("p",{className:"m-0",children:e}):(0,h.jsx)("p",{className:"m-0",children:"点击或拖拽上传文件"})})}function Tt({accept:e="",directory:t=!0,dragAreaDescription:n,maxSizePerFile:r=10*Xe,onFileReceived:o}){const{message:i}=y.App.useApp(),a=(0,F.useRef)(null),l=(0,F.useMemo)((()=>new Set(e?e.split(","):[])),[e]),{isDragOver:s,handleDragEvents:c}=function(e,t,n){const[r,o]=(0,F.useState)(!1);return{isDragOver:r,handleDragEvents:{onDrop:function(r){return Ft(this,void 0,void 0,(function*(){r.preventDefault(),o(!1);const i=Array.from(r.dataTransfer.items).map((e=>e.webkitGetAsEntry())).filter(Boolean).map((n=>it(n,e,t))),a=(yield Promise.allSettled(i)).filter((e=>"fulfilled"===e.status)).flatMap((e=>e.value));n(a)}))},onDragLeave:()=>o(!1),onDragEnter:e=>e.preventDefault(),onDragOver:e=>{e.preventDefault(),o(!0)}}}}(t,l,u);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)("div",Object.assign({},c,{className:"flex flex-col items-center justify-center gap-4 border-dashed rounded-ml border py-4 mb-5 "+(s?"border-[#1775FE]":"border-[#1775FE]/40"),onClick:()=>{var e;return null===(e=a.current)||void 0===e?void 0:e.click()},children:[(0,h.jsx)(It,{}),(0,h.jsx)(Ut,{description:n})]})),(0,h.jsx)("input",{hidden:!0,multiple:!0,type:"file",accept:e,ref:a,onChange:function(){var e;const t=null===(e=a.current)||void 0===e?void 0:e.files;u(Array.from(null!=t?t:[]))},onClick:()=>{a.current&&(a.current.value="")}})]});function u(e){const t=e.filter((e=>e.size<=r));if(t.length<e.length){const e=function(e){const t=[{value:Xe,label:"GB"},{value:Ke,label:"MB"},{value:$e,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"}(r);i.warning(`以下文件大小超过${e}, 已删除`)}t.length&&o(t)}}function zt(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"})})}))}var _t=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(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?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))};function Rt(){const{message:e}=y.App.useApp(),t=(0,mt.useAtomValue)(bt),n=(0,mt.useAtomValue)(wt),r=(0,F.useContext)(dt);return function(t){return _t(this,void 0,void 0,(function*(){if(!n)return;if(!t.uploadId)return void o(t.fileName);const r=yield n.onCancelUpload(t.fileName,t.uploadId);r.status?o(t.fileName):e.error(r.reason||"取消失败")}))};function o(e){Ye(String(t),e),r({type:"remove_file",identifier:t,fileName:e})}}function Ht(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 Vt={size:12,type:"circle",strokeWidth:16,showInfo:!1,strokeLinecap:"butt"},Mt={[Ge.INIT]:"等待上传",[Ge.CANCELED]:"已取消",[Ge.UPLOADING]:"上传中",[Ge.FAILED]:"上传失败",[Ge.PAUSED]:"已暂停",[Ge.FINISHED]:"已上传",[Ge.ALL_UPLOADED]:"分块合并中"},Bt=(0,F.memo)((function({file:e}){const t=Rt();return(0,h.jsx)("div",{className:"my-2.5",children:(0,h.jsxs)(Gt,{children:[(0,h.jsx)(qt,{fileName:e.fileName}),(0,h.jsxs)(y.Flex,{align:"center",gap:".25rem",className:"relative",children:[(0,h.jsx)($t,{fileStatus:Mt[e.fileStatus],percentage:Number(e.percentage.toFixed(0)),className:"group-hover:-translate-x-6 transition-transform"}),(0,h.jsx)(Kt,{onDelete:()=>t(e),className:"absolute right-0 opacity-0 group-hover:opacity-100 transition-opacity"})]})]})})}));function Gt({children:e,className:t}){return(0,h.jsx)("div",{className:`p-2 relative flex justify-between items-center rounded group ${t}`,children:e})}function qt({fileName:e,className:t}){return(0,h.jsxs)(y.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)(Ht,{className:`text-gray-5 h-5 w-5 ${t}`})}),(0,h.jsx)("span",{className:`truncate w-40 text-gray-5 ${t}`,children:e})]})}function $t({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)(y.Progress,Object.assign({percent:n},Vt,{strokeColor:r}))]})}function Kt({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)(zt,{onClick:e,className:"h-4 w-4 cursor-pointer"})]})}const Xt=(0,F.memo)((function(){const e=(0,mt.useAtomValue)(bt),t=(0,mt.useAtomValue)(Ot),n=(0,mt.useAtomValue)(Lt),r=(0,mt.useAtomValue)(Pt),{onCancelUpload:o}=(0,mt.useAtomValue)(wt),i=(0,mt.useSetAtom)(Et);return(0,h.jsx)("div",{className:"my-2.5",children:(0,h.jsxs)(Gt,{className:"border-gray-3 border border-solid hover:bg-assist-bg-blue",children:[(0,h.jsx)(qt,{fileName:t}),(0,h.jsxs)(y.Flex,{align:"center",gap:".25rem",className:"relative",children:[(0,h.jsx)($t,{fileStatus:"正在上传",percentage:Number(n.toFixed(0)),className:"group-hover:-translate-x-6 transition-transform"}),(0,h.jsx)(Kt,{onDelete:function(){return n=this,a=void 0,s=function*(){const n=yield o(t,r);n.status?(Ye(String(e),t),i((e=>e?Object.assign(Object.assign({},e),{fileStatus:Ge.CANCELED}):e))):y.message.error(n.reason||"取消失败")},new((l=void 0)||(l=Promise))((function(e,t){function r(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(t){var n;t.done?e(t.value):(n=t.value,n instanceof l?n:new l((function(e){e(n)}))).then(r,o)}i((s=s.apply(n,a||[])).next())}));var n,a,l,s},className:"absolute right-0 opacity-0 group-hover:opacity-100 transition-opacity"})]})]})})}));const Qt=(0,F.memo)((function({file:e}){const t=(0,F.useContext)(dt),n=(0,mt.useAtomValue)(bt),{onDeleteFile:r}=(0,mt.useAtomValue)(wt),o=Rt();return(0,h.jsx)("div",{className:"my-2.5",children:(0,h.jsxs)(Gt,{className:"border-gray-3 border border-solid hover:bg-assist-bg-blue",children:[(0,h.jsx)(qt,{fileName:e.fileName,className:"text-green"}),(0,h.jsxs)(y.Flex,{align:"center",gap:".25rem",className:"relative",children:[(0,h.jsx)($t,{percentage:100,fileStatus:"上传成功",strokeColor:"#53C31B",className:"text-green group-hover:-translate-x-6 transition-transform"}),(0,h.jsx)(Kt,{onDelete:()=>function(e){return i=this,a=void 0,s=function*(){if(!r)return o(e);(yield r(e.fileName))&&t({type:"remove_file",identifier:n,fileName:e.fileName})},new((l=void 0)||(l=Promise))((function(e,t){function n(e){try{o(s.next(e))}catch(e){t(e)}}function r(e){try{o(s.throw(e))}catch(e){t(e)}}function o(t){var o;t.done?e(t.value):(o=t.value,o instanceof l?o:new l((function(e){e(o)}))).then(n,r)}o((s=s.apply(i,a||[])).next())}));var i,a,l,s}(e),className:"absolute right-0 opacity-0 group-hover:opacity-100 transition-opacity"})]})]})})})),Wt=(0,F.memo)((function({file:e}){const t=Rt();return(0,h.jsx)("div",{className:"my-2.5",children:(0,h.jsxs)(Gt,{className:"bg-red/10",children:[(0,h.jsx)((function(){return(0,h.jsxs)(y.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)(Ht,{className:"text-red h-5 w-5"})}),(0,h.jsx)("span",{className:"truncate w-40 text-red",children:e.fileName})]})}),{}),(0,h.jsxs)(y.Flex,{align:"center",gap:".25rem",className:"relative",children:[(0,h.jsx)((function({className:e=""}){return(0,h.jsx)("div",{className:`flex items-center gap-1 h-6 text-sm mr-1 text-red ${e}`,children:"上传失败"})}),{className:"group-hover:-translate-x-6 transition-transform"}),(0,h.jsx)(Kt,{onDelete:()=>t(e),className:"text-red absolute right-0 opacity-0 group-hover:opacity-100 transition-opacity"})]})]})})}));var Zt=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(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?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))};function Jt(){const e=(0,mt.useAtomValue)(bt),t=(0,mt.useAtomValue)(wt),n=(0,F.useContext)(dt);return(0,F.useCallback)((r=>Zt(this,void 0,void 0,(function*(){if(t)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 o=yield We(r.raw,void 0,t.getUploadUrls);n({type:"edit_file",identifier:e,file:o})}else{const t=[...r.failSeq,...r.uploadUrls];n({type:"edit_file",identifier:e,file:Object.assign(Object.assign({},r),{uploadUrls:t,failSeq:[],cancelControllers:{},fileStatus:Ge.INIT})})}}))),[e,t,n])}const Yt=(0,F.memo)((function({file:e}){const t=Rt();return(0,h.jsx)("div",{className:"my-2.5",children:(0,h.jsxs)(Gt,{className:"border-gray-3 border border-solid hover:bg-assist-bg-blue",children:[(0,h.jsx)(qt,{fileName:e.fileName}),(0,h.jsxs)(y.Flex,{align:"center",gap:".25rem",className:"relative",children:[(0,h.jsx)($t,{fileStatus:"已暂停",percentage:Number(e.percentage.toFixed(0)),className:"group-hover:-translate-x-10 transition-transform"}),(0,h.jsx)(Kt,{extraActions:(0,h.jsx)((function(){const t=Jt();return(0,h.jsx)(ue.PlayCircleFilled,{className:"text-gray-5 h-4 w-4 cursor-pointer",onClick:()=>t(e)})}),{}),onDelete:()=>t(e),className:"absolute right-0 opacity-0 group-hover:opacity-100 transition-opacity"})]})]})})}));function en(){const e=(0,F.useContext)(ut),t=(0,mt.useAtomValue)(bt),n=(0,mt.useAtomValue)(yt),r=(0,mt.useAtomValue)(Et),o=(0,F.useMemo)((()=>{var r;return null===(r=e[t])||void 0===r?void 0:r.filter((e=>!(!n&&e.fileStatus===Ge.FINISHED))).sort(((e,t)=>e.fileStatus-t.fileStatus))}),[t,n,e]);return function(){const e=(0,F.useRef)(!1),t=(0,F.useRef)([]),n=(0,mt.useAtomValue)(bt),r=(0,mt.useAtomValue)(Et),o=function(){const e=(0,mt.useSetAtom)(Et);return(0,F.useCallback)((function(t){e((e=>e?Object.assign(Object.assign({},e),{fileStatus:Ge.UPLOADING,cancelControllers:Ct(t)}):e))}),[e])}(),i=function(){const{onOnePartDone:e}=(0,mt.useAtomValue)(wt),t=(0,mt.useAtomValue)(Ot),n=(0,mt.useAtomValue)(Pt),r=(0,mt.useAtomValue)(Dt),o=(0,mt.useAtomValue)(kt),i=(0,mt.useSetAtom)(Et),a=(0,F.useCallback)(((e,t)=>{i((n=>{if(!n||n.fileStatus!==Ge.UPLOADING)return n;const r=[...n.uploadStatus];1!==r[t]&&(r[t]=Number(e.progress));const o=r.reduce(((e,t)=>e+(t||0)),0)*(100/n.partCount);return Object.assign(Object.assign({},n),{uploadStatus:r,percentage:o})}))}),[i]),l=(0,F.useCallback)((r=>jt(this,void 0,void 0,(function*(){if(!t||!n)return;const o=yield e(t,n,r.partNum);if(!o.status)throw new Error(o.reason);i((e=>{if(!e)return e;const t=[...e.uploadStatus];return t[r.partNum]=1,Object.assign(Object.assign({},e),{uploadStatus:t,uploadUrls:e.uploadUrls.filter((e=>e.partNum!==r.partNum)),completeSeq:[...e.completeSeq,r]})}))}))),[t,n,e,i]),s=(0,F.useCallback)(((e,t)=>jt(this,void 0,void 0,(function*(){o&&(yield St.put(e.uploadUrl,t,{withCredentials:!1,timeout:18e5,headers:{"Content-Type":"application/octet-stream"},signal:o[e.partNum].signal,onUploadProgress:At((t=>a(t,e.partNum)))}))}))),[a,o]),c=(0,F.useCallback)(((e,t)=>jt(this,void 0,void 0,(function*(){try{yield s(e,t),yield l(e)}catch(t){if(t instanceof Error&&"canceled"===t.message)return;i((t=>t?Object.assign(Object.assign({},t),{failSeq:[...t.failSeq,e],uploadUrls:t.uploadUrls.filter((t=>t!==e))}):t))}}))),[s,l,i]);return(0,F.useCallback)((function(e){return jt(this,void 0,void 0,(function*(){for(const{url:t,chunk:n}of e)if(yield c(t,n),r===Ge.CANCELED)return;i((e=>e?Object.assign(Object.assign({},e),{fileStatus:Ge.ALL_UPLOADED}):e))}))}),[r,c,i])}(),a=function(){const{onAllPartDone:e}=(0,mt.useAtomValue)(wt),t=(0,mt.useAtomValue)(Ot),n=(0,mt.useAtomValue)(Pt),r=(0,mt.useSetAtom)(Et);return(0,F.useCallback)((function(o){return Nt(this,void 0,void 0,(function*(){if(t&&n)try{if(!o)throw new Error("partial failed");const i=yield e(t,n);if(!i.status)throw new Error(i.reason);r((e=>e?Object.assign(Object.assign({},e),{percentage:100,fileStatus:Ge.FINISHED}):e))}catch(e){r((e=>e?Object.assign(Object.assign({},e),{fileStatus:Ge.FAILED}):e))}}))}),[t,n,e,r])}(),l=function(){const e=(0,mt.useAtomValue)(bt),t=(0,F.useContext)(dt),n=(0,mt.useSetAtom)(Et);return(0,F.useCallback)((function(r){n(null),t({type:"edit_file",identifier:e,file:r})}),[n,t,e])}(),s=function(){const e=(0,mt.useAtomValue)(bt),t=(0,mt.useAtomValue)(vt),n=(0,F.useContext)(dt),r=(0,mt.useSetAtom)(Et);return(0,F.useCallback)((function(o){null==t||t(o),r(null),n({type:"edit_file",identifier:e,file:o})}),[r,n,e,t])}(),c=function(){const e=(0,mt.useAtomValue)(bt),t=(0,F.useContext)(dt),n=(0,mt.useSetAtom)(Et);return(0,F.useCallback)((function(r){Object.values(r.cancelControllers).forEach((e=>e.abort())),t({type:"remove_file",identifier:e,fileName:r.fileName}),n(null)}),[e,t,n])}();(0,F.useEffect)((()=>{if(r)return r.fileStatus===Ge.INIT&&(t.current=function(e){const{uploadUrls:t,chunkSize:n,raw:r}=e,o=r.size;return t.map((({partNum:e,uploadUrl:t})=>{const i=e*n,a=Math.min((e+1)*n,o);return{url:{partNum:e,uploadUrl:t},chunk:r.slice(i,a)}}))}(r),o(t.current)),r.fileStatus!==Ge.UPLOADING||e.current||(e.current=!0,i(t.current)),r.fileStatus===Ge.ALL_UPLOADED&&a(0===r.failSeq.length),r.fileStatus===Ge.CANCELED&&(e.current=!1,c(r)),r.fileStatus===Ge.FAILED&&(e.current=!1,l(r)),r.fileStatus===Ge.FINISHED&&(e.current=!1,s(r)),()=>{r.fileStatus!==Ge.UPLOADING&&r.fileStatus!==Ge.ALL_UPLOADED||localStorage.setItem(n+"_uploading",st([r]))}}),[r,n,a,c,l,s,o,i])}(),function(){const e=(0,mt.useAtomValue)(bt),t=(0,F.useContext)(ut),n=(0,mt.useSetAtom)(Et),r=(0,F.useContext)(dt);(0,F.useEffect)((()=>{const o=t[e];if(!o||0===o.length)return;const i=o.every((e=>e.fileStatus!==Ge.UPLOADING)),a=o.find((e=>e.fileStatus===Ge.INIT));i&&a&&(r({type:"edit_file",identifier:e,file:Object.assign(Object.assign({},a),{fileStatus:Ge.UPLOADING})}),n(a))}),[e,n,r,t])}(),o&&0!==o.length?(0,h.jsxs)("div",{className:"mb-5",children:[(0,h.jsx)("div",{className:"text-sm text-gray-7",children:"当前上传"}),(0,h.jsx)("div",{className:"max-h-72 overflow-y-auto",children:o.map((e=>{if(e.fileName===(null==r?void 0:r.fileName))return(0,h.jsx)(Xt,{},e.fileName);switch(e.fileStatus){case Ge.FINISHED:return(0,h.jsx)(Qt,{file:e},e.fileName);case Ge.FAILED:return(0,h.jsx)(Wt,{file:e},e.fileName);case Ge.PAUSED:return(0,h.jsx)(Yt,{file:e},e.fileName);default:return(0,h.jsx)(Bt,{file:e},e.fileName)}}))})]}):null}var tn=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(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?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))};const nn={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)(y.Flex,{justify:"center",align:"center",children:e}),className:"[&_.ant-modal-confirm-title]:text-lg [&_.ant-modal-confirm-title]:font-ali-65 [&_.ant-modal-confirm-title]:font-normal [&_.ant-modal-confirm-title]:leading-6"};function rn(e){const{message:t,modal:n}=y.App.useApp(),r=(0,F.useContext)(dt),o=Jt();return(0,F.useCallback)((()=>tn(this,void 0,void 0,(function*(){const i=yield function(e){return tn(this,void 0,void 0,(function*(){const t=yield(a=e,new Promise(((e,t)=>{function n(n){nt.objectStoreNames.contains(n)?function(e){return new Promise((function(t,n){try{const n=nt.transaction(e,"readonly").objectStore(e),r=[],o=n.openCursor();o.onsuccess=()=>{const e=o.result;e?(r.push(e.value),e.continue()):t(r)},o.onerror=()=>console.warn(`retrieveExistingData 中游标操作失败 - 错误代码: ${o.error}`)}catch(e){n(Error(`retrieveExistingData 中执行事务或打开游标时发生异常 - ${e.message}`))}}))}(n).then(e).catch(t):function(n){const r=nt.version+1;nt.close();const o=window.indexedDB.open(tt,r);o.onerror=()=>t(Error(`打开数据库失败: ${o.error}`)),o.onblocked=()=>t(Error(`数据库被阻塞: ${o.error}`)),o.onsuccess=()=>console.info("openRequest.onsuccess 在 triggerDatabaseUpgrade 中被触发"),o.onupgradeneeded=()=>{rt(o.result);try{o.result.createObjectStore(n,{}),o.result.onversionchange=e=>{null===e.newVersion&&o.result.close()},e([])}catch(e){t(Error(`升级数据库异常: ${e.message}`))}}}(n)}nt?n(a):function(e){try{const r=window.indexedDB.open(tt);r.onsuccess=()=>{rt(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)}}(a)}))),n=JSON.parse(localStorage.getItem(e)||"[]"),r=JSON.parse(localStorage.getItem(e+"_uploading")||"[]"),o=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=o.find((t=>t.fileName===e.name));return t?Object.assign(Object.assign({},t),{raw:e,fileStatus:Ge.PAUSED}):null})).filter((e=>null!==e));var a;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({},nn),{title:"提示",content:"检测到未完成上传任务,是否继续上传?",onOk(){i.forEach((e=>o(e)))},onCancel(){t.info("点击上传按钮手动继续")}}))}))),[e,r,o,n,t])}var on=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(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?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))};function an(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 ln(e,t){return e.filter((e=>{var n;const r=e.name.includes("/"),o=e.name.split("/")[0];return r===(null===(n=t.find((e=>e.fileName===o)))||void 0===n?void 0:n.isFolder)})).map((e=>e.name))}var sn=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(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?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))};var cn=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(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?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))};function un({extra:e,dragAreaConfig:t}){const[n,r]=(0,F.useState)(!1),o=function(){const{message:e}=y.App.useApp(),t=(0,mt.useAtomValue)(gt),n=(0,mt.useAtomValue)(bt),r=(0,mt.useAtomValue)(wt),o=(0,F.useContext)(dt),i=function(){const{modal:e}=y.App.useApp(),t=(0,F.useContext)(ut),n=(0,mt.useAtomValue)(gt),r=(0,mt.useAtomValue)(bt),o=(0,mt.useAtomValue)(xt);return function(i){return on(this,void 0,void 0,(function*(){const a=[...an(i,t[r],n),...ln(i,o)];return a.length?[yield e.confirm(Object.assign(Object.assign({},nn),{okText:"覆盖",cancelText:"取消",title:"发现同名文件,是否覆盖?"})),new Set(a)]:[!0,new Set]}))}}(),a=function(){const e=(0,F.useContext)(ut),t=(0,mt.useAtomValue)(bt),n=Rt();return function(r){const o=e[t];for(const e of r){const t=o.find((t=>t.fileName===e));t&&n(t)}}}();return function(l){return sn(this,void 0,void 0,(function*(){const s=yield function(e){return sn(this,void 0,void 0,(function*(){const t=new Map(e.map((e=>[e.name,e]))),[n,r]=yield i(e);return n?a(r):r.forEach((e=>t.delete(e))),Array.from(t.values())}))}(l),c=yield function(n){return sn(this,void 0,void 0,(function*(){if(!r)return[];const{getUploadUrls:o}=r,i=n.map((e=>We(e,t,o))),a=(yield Promise.allSettled(i)).filter((e=>"fulfilled"===e.status)).map((e=>e.value));return(a.some((e=>e.fileStatus===Ge.FAILED))||a.length<n.length)&&e.info("部分文件获取上传地址失败"),a}))}(s);o({type:"add_files",identifier:n,files:c}),function(e,t){try{const n=nt.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}`)}}(n,c.map((e=>e.raw)))}))}}();return function(){const e=(0,mt.useAtomValue)(bt),t=(0,F.useContext)(ut),n=(0,F.useContext)(dt),r=(0,F.useRef)(""),o=rn(e);(0,F.useEffect)((()=>{r.current!==e&&(r.current=e,t[e]||n({type:"add",identifier:e}),o())}),[e,o,t,n])}(),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(y.Spin,{spinning:n,children:(0,h.jsx)(Tt,Object.assign({},t,{onFileReceived:function(e){return cn(this,void 0,void 0,(function*(){r(!0),yield o(e),r(!1)}))}}))}),e&&(0,h.jsx)("div",{className:"mb-4",children:e}),(0,h.jsx)(en,{})]})}var dn=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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function fn(e){var{extra:t,dragAreaConfig:n}=e,r=dn(e,["extra","dragAreaConfig"]);return(0,F.useContext)(ut)===ct?(0,h.jsx)(y.Alert,{message:"FileUploader 必须在 UploadStoreProvider 内使用",type:"warning"}):(0,h.jsx)(ht.ScopeProvider,{atoms:[gt,bt,Et,yt,wt,vt,xt],children:(0,h.jsx)(pn,Object.assign({},r,{children:(0,h.jsx)(un,{extra:t,dragAreaConfig:n})}))})}function pn(e){var{children:t}=e,n=dn(e,["children"]);const r=(0,mt.useAtomValue)(wt);return function({root:e="",identifier:t,showFinished:n=!1,externalUploadContext:r=[],getUploadUrls:o,onCancelUpload:i,onOnePartDone:a,onAllPartDone:l,onUploadSuccess:s,onDeleteFile:c}){const u=(0,mt.useSetAtom)(gt),d=(0,mt.useSetAtom)(bt),f=(0,mt.useSetAtom)(yt),p=(0,mt.useSetAtom)(wt),m=(0,mt.useSetAtom)(vt),h=(0,mt.useSetAtom)(xt);(0,F.useEffect)((()=>{u(e)}),[e,u]),(0,F.useEffect)((()=>{d(t)}),[t,d]),(0,F.useEffect)((()=>{f(n)}),[n,f]),(0,F.useEffect)((()=>{p({getUploadUrls:o,onCancelUpload:i,onOnePartDone:a,onAllPartDone:l,onDeleteFile:c})}),[o,i,a,l,s,c,p]),(0,F.useEffect)((()=>{m((()=>s))}),[s,m]),(0,F.useEffect)((()=>{h(r)}),[r,h])}(n),r?(0,h.jsx)(h.Fragment,{children:t}):(0,h.jsx)(h.Fragment,{})}var mn=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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const hn={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:"mylib-file-uploader [&_.ant-modal-title]:text-lg [&_.ant-modal-title]:font-ali-65 [&_.ant-modal-title]:font-normal [&_.ant-modal-title]:leading-6"};function gn(e){var{config:{modal:t,dragArea:n}}=e,r=mn(e,["config"]);return(0,F.useContext)(ut)===ct?(0,h.jsx)(y.Modal,Object.assign({},hn,t,{children:(0,h.jsx)(y.Alert,{message:"FileUploadModal 必须在 UploadStoreProvider 内使用",type:"warning"})})):(0,h.jsx)(y.Modal,Object.assign({},hn,{forceRender:!0,footer:(0,h.jsx)(y.Button,{type:"primary",onClick:t.onCancel,children:"确定"})},t,{children:(0,h.jsx)(fn,Object.assign({},r,{dragAreaConfig:n}))}))}const bn=function(e){return(0,F.useContext)(ut)===ct?(0,h.jsx)(y.Alert,{message:"FileUploader 必须在 UploadStoreProvider 内使用",type:"warning"}):(0,h.jsx)("div",{className:"mylib-file-uploader",children:(0,h.jsx)(fn,Object.assign({},e))})},yn=(e=>{var t={};return p.d(t,e),t})({getFileExt:()=>l.getFileExt});function wn(e){return new Promise((t=>{if(e&&e.length>0){const n=[...e];function r(){n.length>0?setTimeout(o):setTimeout((()=>{t(null)}))}function o(){const e=n.shift(),t=(0,yn.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()}o()}else t(null)}))}var vn=p(482),xn={};function jn(e){const{filePath:t}=e,n=(0,F.useRef)(null),r=(0,F.useRef)(0),o=(0,F.useRef)(null),i=(0,F.useRef)(0),a=(0,F.useRef)(0),l=(0,F.useRef)(0),s=(0,F.useRef)(!1),c=()=>{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(o.current){const r=n.current;let s=e-l.current;for(let u=l.current+1;u<=e;u++)o.current.getPage(u).then((e=>{const t=e.getViewport({scale:window.devicePixelRatio||1}),n=document.createElement("canvas");n.setAttribute("id","the-canvas"+u),n.height=t.height,n.width=t.width;const o={canvasContext:n.getContext("2d"),viewport:t};return r.appendChild(n),e.render(o).promise.then((()=>new Promise((e=>{setTimeout((()=>{a.current=a.current+n.clientHeight,e(1)}))}))))})).catch((e=>{})).finally((()=>{s--,0===s&&(a.current<n.current.clientHeight&&e<i.current&&setTimeout(c),t(1))}))}else t(0)})).then((()=>{s.current=!1,l.current=e}))};return(0,F.useEffect)((()=>{wn(["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;o.current=t,i.current=t.numPages,c(),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:vn.L,onScroll:e=>{const t=e.target.scrollTop;t>r.current&&l.current<i.current&&t>a.current-200-n.current.clientHeight&&c(),r.current=t}})}xn.styleTagTransform=P(),xn.setAttributes=N(),xn.insert=A().bind(null,"head"),xn.domAPI=j(),xn.insertStyleElement=O(),v()(vn.A,xn),vn.A&&vn.A.locals&&vn.A.locals;var Sn=p(685),An={};An.styleTagTransform=P(),An.setAttributes=N(),An.insert=A().bind(null,"head"),An.domAPI=j(),An.insertStyleElement=O(),v()(Sn.A,An),Sn.A&&Sn.A.locals&&Sn.A.locals;var Cn=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(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?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))};function Nn(e){const t=(0,F.useRef)(null);return(0,F.useEffect)((()=>{wn(["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((()=>Cn(this,void 0,void 0,(function*(){fetch(e.filePath).then((n=>{n.arrayBuffer().then((function(n){var r;const o=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:{}},o=e.Sheets[n];if(!o||!o["!ref"])return;const i=XLSX.utils.decode_range(o["!ref"]);i.s={r:0,c:0};const a=XLSX.utils.sheet_to_json(o,{raw:!1,header:1,range:i});a.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!=o[i]&&null!=o[i].f&&(n[r].text="="+o[i].f)})),r.rows[t]={cells:n}})),r.rows.len=a.length,r.merges=[],(o["!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}(o)),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:Sn.L})}var En=p(913),On={};function Dn(e){return(0,h.jsx)("div",{className:En.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:En._8})})}On.styleTagTransform=P(),On.setAttributes=N(),On.insert=A().bind(null,"head"),On.domAPI=j(),On.insertStyleElement=O(),v()(En.Ay,On),En.Ay&&En.Ay.locals&&En.Ay.locals;var Pn=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(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?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))};function Ln(e){const t=(0,F.useRef)(null);return(0,F.useEffect)((()=>{(()=>{Pn(this,void 0,void 0,(function*(){var n,r;yield wn(["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 kn=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(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?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))};function In(e){const[t,n]=(0,F.useState)("");return(0,F.useEffect)((()=>{(()=>{kn(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 Fn=(e=>{var t={};return p.d(t,e),t})({default:()=>s.default});var Un=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(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?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))};function Tn(e){const[t,n]=(0,F.useState)(),[r,o]=(0,F.useState)(!1),[i,a]=(0,F.useState)(),[l,s]=(0,F.useState)(1);if((0,F.useEffect)((()=>{(()=>{Un(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");o(!0),a(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)(Fn.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)(Fn.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)(y.Button,{type:"link",onClick:()=>{s((e=>e+1))},children:"show more"})}):null]})}return null}var zn=p(690),_n={};function Rn(e){var t,n,r;const{filePath:o}=e,[i,a]=(0,F.useState)(!1),[l,s]=(0,F.useState)(!0),c=t=>{var n;s(!1),a(!0),null===(n=null==e?void 0:e.onError)||void 0===n||n.call(e,t)},u=()=>{var t;s(!1),null===(t=null==e?void 0:e.onSuccess)||void 0===t||t.call(e)};let d=null;if(i)d=(0,h.jsx)("div",{className:zn.LV,children:"获取文件失败"});else if(o){const t=(0,yn.getFileExt)(o),n=(0,h.jsx)("div",{className:zn.D5,children:(0,h.jsx)(y.Spin,{})});let r=null,i=!0;switch(t){case"pdf":r=(0,h.jsx)(jn,Object.assign({},e,{onError:c,onSuccess:u}));break;case"xlsx":case"csv":r=(0,h.jsx)(Nn,Object.assign({},e,{onError:c,onSuccess:u}));break;case"png":case"jpg":case"jpeg":r=(0,h.jsx)(Dn,Object.assign({},e,{onError:c,onSuccess:u}));break;case"md":r=(0,h.jsx)(Ln,Object.assign({},e,{onError:c,onSuccess:u}));break;case"txt":r=(0,h.jsx)(In,Object.assign({},e,{onError:c,onSuccess:u}));break;case"jsonl":case"json":r=(0,h.jsx)(Tn,Object.assign({},e,{onError:c,onSuccess:u}));break;default:i=!1}d=i?(0,h.jsxs)(h.Fragment,{children:[l&&n,r]}):(0,h.jsxs)("div",{className:zn.LV,children:["暂不支持",t,"文件预览"]})}return e.openInModal?(null===(t=null==e?void 0:e.modalProps)||void 0===t?void 0:t.show)?(0,h.jsx)(y.Modal,{open:!0,title:null===(n=null==e?void 0:e.modalProps)||void 0===n?void 0:n.title,className:zn.qf,centered:!0,width:"100%",onCancel:null===(r=null==e?void 0:e.modalProps)||void 0===r?void 0:r.onCancel,footer:null,children:d}):null:d}function Hn(e){const[t,n]=(0,F.useState)(0),[r,o]=(0,F.useState)(e.filePath);return(0,F.useEffect)((()=>{r!==e.filePath&&(o(e.filePath),n(t+1))}),[e.filePath]),r!==e.filePath?null:(0,h.jsx)(Rn,Object.assign({},e),t)}_n.styleTagTransform=P(),_n.setAttributes=N(),_n.insert=A().bind(null,"head"),_n.domAPI=j(),_n.insertStyleElement=O(),v()(zn.Ay,_n),zn.Ay&&zn.Ay.locals&&zn.Ay.locals;const Vn=(e=>{var t={};return p.d(t,e),t})({default:()=>c.default});var Mn=p(860),Bn={};Bn.styleTagTransform=P(),Bn.setAttributes=N(),Bn.insert=A().bind(null,"head"),Bn.domAPI=j(),Bn.insertStyleElement=O(),v()(Mn.A,Bn),Mn.A&&Mn.A.locals&&Mn.A.locals;const Gn=(e=>{var t={};return p.d(t,e),t})({default:()=>u.default}),qn={zh:"已复制",en:"Copied"};function $n(e){const{showFeedback:t=!0,text:n,lang:r="zh"}=e;return(0,h.jsx)("span",{className:(0,Gn.default)(Mn.K,"data-hub-ui-copy-icon"),onClick:()=>{n&&((0,Vn.default)(n),t&&y.message.success(qn[r])),(null==e?void 0:e.onClick)&&e.onClick()},children:""})}function Kn(e,t={showFeedback:!0,lang:"zh"}){const{showFeedback:n="true",lang:r="zh"}=t;e&&((0,Vn.default)(e),n&&y.message.success(qn[r]))}var Xn=p(100),Qn={};function Wn(e){return(0,h.jsx)(y.Modal,Object.assign({},e,{wrapClassName:Xn.wm,width:400}))}Qn.styleTagTransform=P(),Qn.setAttributes=N(),Qn.insert=A().bind(null,"head"),Qn.domAPI=j(),Qn.insertStyleElement=O(),v()(Xn.Ay,Qn),Xn.Ay&&Xn.Ay.locals&&Xn.Ay.locals,Wn.confirm=e=>{y.Modal.confirm(Object.assign({},e)).update({icon:null,closable:!0,width:400,wrapClassName:`${Xn.DE}`})};var Zn=p(989),Jn={};Jn.styleTagTransform=P(),Jn.setAttributes=N(),Jn.insert=A().bind(null,"head"),Jn.domAPI=j(),Jn.insertStyleElement=O(),v()(Zn.Ay,Jn),Zn.Ay&&Zn.Ay.locals&&Zn.Ay.locals;const Yn="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 er({visiable:e,children:t,onClose:n}){const[r,o]=(0,F.useState)(!1);return(0,F.useEffect)((()=>{o(e)}),[e]),r?(0,h.jsxs)("div",{className:Zn.LV,children:[(0,h.jsx)("div",{style:{backgroundImage:"url("+Yn+")"},className:Zn.Kk,onClick:()=>n()}),(0,h.jsx)("div",{className:Zn.NI,children:t})]}):null}var tr=m.LZ,nr=m.QR,rr=m.dA,or=m.Lq,ir=m.Bx,ar=m.l0,lr=m.Ow,sr=m.Y9,cr=m.ly,ur=m._2,dr=m.WI,fr=m.C;export{tr as ConfirmAgain,nr as Copy,rr as FilePreview,or as FileUploadDrawer,ir as FileUploadModal,ar as FileUploader,lr as FloatingLayer,sr as Header,cr as InputTag,ur as UploadDrawerUploadStoreProvider,dr 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"copy-to-clipboard";import*as c from"classnames";var d={842:(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 .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 .bg-red\\/10{\nbackground-color: rgb(254 77 79 / 0.1);}.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{\n--tw-text-opacity: 1;\ncolor: rgb(83 195 27 / var(--tw-text-opacity));}.zjlab-fe-data-hub-ui-file-uploader .text-red{\n--tw-text-opacity: 1;\ncolor: rgb(254 77 79 / 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: , Inter, sans-serif; /* 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}}.last\\:mb-0:last-child{\nmargin-bottom: 0px;}.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-size: 1.125rem;\n font-weight: 400;\n line-height: 1.5rem\n}",""]);const l=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:()=>c,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 c=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:()=>c,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 c=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: , Inter, sans-serif; /* 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 .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 .bg-red\\/10{\n background-color: rgb(254 77 79 / 0.1);\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{\n --tw-text-opacity: 1;\n color: rgb(83 195 27 / var(--tw-text-opacity));\n}.mylib-upload-drawer .text-red{\n --tw-text-opacity: 1;\n color: rgb(254 77 79 / 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\\: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 c=[].concat(e[u]);r&&o[c[0]]||(void 0!==i&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=i),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),a&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=a):c[4]="".concat(a)),t.push(c))}},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],c=i[u]||0,d="".concat(u," ").concat(c);i[u]=c+1;var f=n(d),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 m=a(p,r);r.byIndex=l,t.splice(l,0,{identifier:d,updater:m,references:1})}o.push(d)}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 c=n(i[u]);0===t[c].references&&(t[c].updater(),t.splice(c,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 d[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 m={};p.d(m,{LZ:()=>or,QR:()=>nr,dA:()=>Qn,Lq:()=>Be,Bx:()=>zn,l0:()=>Nn,Ow:()=>cr,Y9:()=>F,ly:()=>I,_2:()=>se,WI:()=>wt,C:()=>rr});const h=(b={Fragment:()=>e.Fragment,jsx:()=>e.jsx,jsxs:()=>e.jsxs},g={},p.d(g,b),g);var b,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),A=p.n(S),C=p(598),z=p.n(C),N=p(50),E=p.n(N),O=p(615),k=p.n(O),P=p(280),D={};function F(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:"登录"})]})}D.styleTagTransform=k(),D.setAttributes=z(),D.insert=A().bind(null,"head"),D.domAPI=j(),D.insertStyleElement=E(),v()(P.Ay,D),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,c]=(0,L.useState)([]),[d,f]=(0,L.useState)(1),p=(0,L.useRef)(null);(0,L.useEffect)((()=>{Array.isArray(t)?c(t):"string"==typeof t&&c(t.split(";"))}),[t]),(0,L.useEffect)((()=>{1!==d&&(null==p?void 0:p.current)&&p.current.focus()}),[d]);const m=e=>{if(i&&(e=Array.from(new Set(e))),c(e),"array"===a)null==n||n(e.length>0?e:void 0);else{const t=e.join(";");null==n||n(t||void 0)}};let b;return(null==u?void 0:u.length)>0&&(b=u.map(((e,t)=>(0,h.jsx)(w.Tag,{closeIcon:!s,onClose:()=>(e=>{const t=u.filter(((t,n)=>n!==e));m(t),f(d+1)})(t),children:e},t)))),(0,h.jsx)(w.Input,{disabled:s,size:o,ref:p,placeholder:r,prefix:b,onPressEnter:e=>{const t=e.target.value.trim(),n=[...u,t];m(n),f(d+1)},maxLength:l},d)}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,V=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 G(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:q(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 q(e){return e<10*T?10*T:Math.ceil(e/10)}function $(e){const t=q(e);return Math.floor(e/t)+1}function X(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(Z,r);a.onupgradeneeded=()=>X(a.result,e,t,n)}function W(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 Z="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(Z,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 ce=(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 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())}))};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 de(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)(ce.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 me={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)(ce.CheckOutlined,{className:"text-green-600 text-2xl h-8"}):t===_.FAILED?(0,h.jsx)(h.Fragment,{children:i?(0,h.jsx)(ce.LoadingOutlined,{className:"text-red-600 text-2xl h-8"}):(0,h.jsx)(ce.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},me,{strokeColor:i?"#f0a020":"#19a1fe",format:function(){return t===_.PAUSED?(0,h.jsx)(ce.PauseOutlined,{}):i?(0,h.jsx)(ce.LoadingOutlined,{className:"text-yellow-500"}):a?(0,h.jsx)(ce.CloseOutlined,{}):void 0}}))})}var be=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)(Ve),r=(0,L.useContext)(le);return(0,L.useCallback)((a=>be(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:V}(a)===M;if(i){const i=yield G(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)(Ve),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)(ce.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)(ce.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 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 Ce(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)(Ve),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)(Ve);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,c]=yield function(e){return Se(this,void 0,void 0,(function*(){const a=[...Ae(e,n[r],o),...Ce(e,i)];return a.length?[yield t.confirm({title:"发现同名文件,是否覆盖?",okText:"覆盖",cancelText:"取消"}),a]:[!0,[]]}))}(l);return u?[new Set(s),new Set(c)]:[new Set([...s,...c]),new Set]}))}}(),o=function(){const e=(0,L.useContext)(oe),{identifier:t}=(0,L.useContext)(Ve),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=>G(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 Ee=(e=>{var t={};return p.d(t,e),t})({default:()=>a.default});var Oe=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 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())}))},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())}))};function Le(){const e=function(){const{identifier:e,onOnePartDone:t}=(0,L.useContext)(Ve),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)=>Oe(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:ke((t=>r(t,n,e.partNum)))})}))),[r]),i=(0,L.useCallback)(((e,n)=>Oe(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)=>Oe(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=>Oe(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)(Ve),n=(0,L.useContext)(le);return(0,L.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=_.FINISHED}}catch(e){r.fileStatus=_.FAILED}finally{n({type:"edit_file",identifier:e,file:r})}}))),[e,t,n])}();return(0,L.useCallback)(((n,r)=>Fe(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)?W(e,t,n):K(e,t,n)}(r,e,t):function(e,t,n){try{const r=window.indexedDB.open(Z);r.onupgradeneeded=()=>X(r.result,e,t,n),r.onsuccess=()=>function(e,t,n,r){Y(e),e.objectStoreNames.contains(t)?W(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,c;const d=(0,L.useContext)(oe),f=(0,L.useContext)(le),{onSuccess:p}=(0,L.useContext)(Ve),m=Ne(),b=Le(),g=Ue(t),[y,v]=(0,L.useState)([]),x=(0,L.useRef)("");return(0,L.useEffect)((()=>{x.current!==t&&(d&&f?(x.current=t,d[t]||f({type:"add",identifier:t}),g()):console.warn("FileUploadDrawer 必须在 UploadStoreProvider 内使用"))}),[t,g,d,f]),(0,L.useEffect)((()=>{const e=d[t];if(!e)return;const n=!e.some((e=>e.fileStatus===_.UPLOADING)),r=e.find((e=>e.fileStatus===_.INIT));n&&r&&b(r,p)}),[t,p,b,d]),(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 m(e),v((t=>{const n=new Set(t);for(const t of e)n.delete(t);return[...n]}))}))}}),0===y.length&&0===(null===(u=d[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)(ce.LoadingOutlined,{}),"预检上传文件中(",y.length,")"]}),(null===(c=d[t])||void 0===c?void 0:c.length)>0&&(0,h.jsx)(xe,{showFinished:o,identifier:t})]})}var _e=p(588),He={};He.styleTagTransform=k(),He.setAttributes=z(),He.insert=A().bind(null,"head"),He.domAPI=j(),He.insertStyleElement=E(),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 Ve=(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:c,onClose:d,dragAreaDescription:f,accept:p,open:m,footer:b,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:c};return(0,h.jsx)(Ve.Provider,{value:v,children:(0,h.jsx)(Re,{open:m,accept:p,footer:b,title:g,showFinished:y,directory:r,identifier:t,dragAreaDescription:f,onClose:d})})}var Ge,qe,$e=p(884),Xe={};Xe.styleTagTransform=k(),Xe.setAttributes=z(),Xe.insert=A().bind(null,"head"),Xe.domAPI=j(),Xe.insertStyleElement=E(),v()($e.A,Xe),$e.A&&$e.A.locals&&$e.A.locals,function(e){e[e.INIT=1]="INIT",e[e.UPLOADING=2]="UPLOADING",e[e.ALL_UPLOADED=3]="ALL_UPLOADED",e[e.FINISHED=4]="FINISHED",e[e.FAILED=5]="FAILED",e[e.PAUSED=6]="PAUSED",e[e.CANCELED=7]="CANCELED"}(Ge||(Ge={})),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 Ke=1024,We=1048576,Qe=1073741824;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 Je(e,t,n){return Ze(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:Ge.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:Ge.FAILED})}))}function Ye(e){return e<10*We?10*We: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 ct(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 dt=(e=>{var t={};return p.d(t,e),t})({atom:()=>i.atom,useAtomValue:()=>i.useAtomValue,useSetAtom:()=>i.useSetAtom}),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 内使用",文件上传:"文件上传",确定:"确定",等待上传:"等待上传",已取消:"已取消",上传中:"上传中",上传失败:"上传失败",已上传:"已上传",分块合并中:"分块合并中",以下文件大小超过:"以下文件大小超过",已删除:"已删除",点击或拖拽上传文件:"点击或拖拽上传文件","发现同名文件,是否覆盖?":"发现同名文件,是否覆盖?",覆盖:"覆盖",取消:"取消",正在上传:"正在上传",取消失败:"取消失败",当前上传:"当前上传",已暂停:"已暂停",上传成功:"上传成功"},mt=(0,dt.atom)(pt),ht={},bt=(0,L.createContext)(ht),gt=(0,L.createContext)((()=>null));function wt({locale:e="zh",children:t}){const n=(0,dt.useSetAtom)(mt),[r,a]=(0,L.useReducer)(yt,{});return n("zh"===e?pt:ft),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!==Ge.FINISHED));n.length?localStorage.setItem(e,ct(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),(0,h.jsx)(bt.Provider,{value:r,children:(0,h.jsx)(gt.Provider,{value:a,children:t})})}function yt(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!==Ge.FINISHED))})}default:throw Error("Unknown action")}}const vt=(e=>{var t={};return p.d(t,e),t})({ScopeProvider:()=>o.ScopeProvider}),xt=(0,dt.atom)(""),jt=(0,dt.atom)(""),St=(0,dt.atom)(!1),At=(0,dt.atom)(null),Ct=(0,dt.atom)(null),zt=(0,dt.atom)([]);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 Et=Ee.default.create();function Ot(e,t=500){let n=null;return function(r){n||(n=setTimeout((()=>{e(r),n=null}),t))}}function kt(e){return e.reduce(((e,t)=>(e[t.url.partNum]=new AbortController,e)),{})}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())}))};const Dt=(0,dt.atom)(null),Ft=(0,dt.atom)((e=>{var t;return null===(t=e(Dt))||void 0===t?void 0:t.fileName})),Lt=(0,dt.atom)((e=>{var t;return null===(t=e(Dt))||void 0===t?void 0:t.fileStatus})),It=((0,dt.atom)((e=>{var t;return null===(t=e(Dt))||void 0===t?void 0:t.expiryTime})),(0,dt.atom)((e=>{var t;return null===(t=e(Dt))||void 0===t?void 0:t.uploadId}))),Ut=((0,dt.atom)((e=>{var t;return null===(t=e(Dt))||void 0===t?void 0:t.raw})),(0,dt.atom)((e=>{var t;return null===(t=e(Dt))||void 0===t?void 0:t.percentage}))),Tt=(0,dt.atom)((e=>{var t;return null===(t=e(Dt))||void 0===t?void 0:t.cancelControllers}));var Rt=p(842),_t={};function Ht(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"})]})]})}))}_t.styleTagTransform=k(),_t.setAttributes=z(),_t.insert=A().bind(null,"head"),_t.domAPI=j(),_t.insertStyleElement=E(),v()(Rt.A,_t),Rt.A&&Rt.A.locals&&Rt.A.locals;var Mt=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 Vt(){const e=(0,dt.useAtomValue)(mt);return(0,L.useCallback)((t=>e[t]||(console.warn(`Translation key not found: ${t}`),t)),[e])}function Bt({description:e}){const t=Vt();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 Gt({className:e,accept:t="",directory:n=!0,dragAreaDescription:r,maxSizePerFile:a=10*Qe,onFileReceived:i}){const{message:o}=w.App.useApp(),l=Vt(),s=(0,L.useRef)(null),u=(0,L.useMemo)((()=>new Set(t?t.split(","):[])),[t]),{isDragOver:c,handleDragEvents:d}=function(e,t,n){const[r,a]=(0,L.useState)(!1);return{isDragOver:r,handleDragEvents:{onDrop:function(r){return Mt(this,void 0,void 0,(function*(){r.preventDefault(),a(!1);const i=Array.from(r.dataTransfer.items).map((e=>e.webkitGetAsEntry())).filter(Boolean).map((n=>lt(n,e,t))),o=(yield Promise.allSettled(i)).filter((e=>"fulfilled"===e.status)).flatMap((e=>e.value));n(o)}))},onDragLeave:()=>a(!1),onDragEnter:e=>e.preventDefault(),onDragOver:e=>{e.preventDefault(),a(!0)}}}}(n,u,f);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)("div",Object.assign({},d,{className:`zjlab-fe-data-hub-ui-default-drag-area ${c?"border-[#1775FE]":""} ${e}`,onClick:()=>{var e;return null===(e=s.current)||void 0===e?void 0:e.click()},children:[(0,h.jsx)(Ht,{}),(0,h.jsx)(Bt,{description:r})]})),(0,h.jsx)("input",{hidden:!0,multiple:!0,type:"file",accept:t,ref:s,onChange:function(){var e;const t=null===(e=s.current)||void 0===e?void 0:e.files;f(Array.from(null!=t?t:[]))},onClick:()=>{s.current&&(s.current.value="")}})]});function f(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:We,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);o.warning(l("以下文件大小超过")+e+","+l("已删除"))}t.length&&i(t)}}function qt(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"})})}))}var $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())}))};function Xt(){const e=Vt(),{message:t}=w.App.useApp(),n=(0,dt.useAtomValue)(jt),r=(0,dt.useAtomValue)(At),a=(0,L.useContext)(gt);return function(n){return $t(this,void 0,void 0,(function*(){if(!r)return;if(!n.uploadId)return void i(n.fileName);const a=yield r.onCancelUpload(n.fileName,n.uploadId);a.status?i(n.fileName):t.error(a.reason||e("取消失败"))}))};function i(e){tt(String(n),e),a({type:"remove_file",identifier:n,fileName:e})}}function Kt(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 Wt={size:12,type:"circle",strokeWidth:16,showInfo:!1,strokeLinecap:"butt"},Qt={[Ge.INIT]:"等待上传",[Ge.CANCELED]:"已取消",[Ge.UPLOADING]:"上传中",[Ge.FAILED]:"上传失败",[Ge.PAUSED]:"已暂停",[Ge.FINISHED]:"已上传",[Ge.ALL_UPLOADED]:"分块合并中"},Zt=(0,L.memo)((function({file:e}){const t=Vt(),n=Xt();return(0,h.jsx)("div",{className:"my-2.5",children:(0,h.jsxs)(Jt,{children:[(0,h.jsx)(Yt,{fileName:e.fileName}),(0,h.jsxs)(w.Flex,{align:"center",gap:".25rem",className:"relative",children:[(0,h.jsx)(en,{fileStatus:t(Qt[e.fileStatus]),percentage:Number(e.percentage.toFixed(0)),className:"group-hover:-translate-x-6 transition-transform"}),(0,h.jsx)(tn,{onDelete:()=>n(e),className:"absolute right-0 opacity-0 group-hover:opacity-100 transition-opacity"})]})]})})}));function Jt({children:e,className:t}){return(0,h.jsx)("div",{className:`p-2 relative flex justify-between items-center rounded group ${t}`,children:e})}function Yt({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)(Kt,{className:`text-gray-5 h-5 w-5 ${t}`})}),(0,h.jsx)("span",{className:`truncate w-40 text-gray-5 ${t}`,children:e})]})}function en({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},Wt,{strokeColor:r}))]})}function tn({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)(qt,{onClick:e,className:"h-4 w-4 cursor-pointer"})]})}const nn=(0,L.memo)((function(){const e=Vt(),t=(0,dt.useAtomValue)(jt),n=(0,dt.useAtomValue)(Ft),r=(0,dt.useAtomValue)(Ut),a=(0,dt.useAtomValue)(It),{onCancelUpload:i}=(0,dt.useAtomValue)(At),o=(0,dt.useSetAtom)(Dt);return(0,h.jsx)("div",{className:"my-2.5",children:(0,h.jsxs)(Jt,{className:"border-gray-3 border border-solid hover:bg-assist-bg-blue",children:[(0,h.jsx)(Yt,{fileName:n}),(0,h.jsxs)(w.Flex,{align:"center",gap:".25rem",className:"relative",children:[(0,h.jsx)(en,{fileStatus:e("正在上传"),percentage:Number(r.toFixed(0)),className:"group-hover:-translate-x-6 transition-transform"}),(0,h.jsx)(tn,{onDelete:function(){return r=this,l=void 0,u=function*(){const r=yield i(n,a);r.status?(tt(String(t),n),o((e=>e?Object.assign(Object.assign({},e),{fileStatus:Ge.CANCELED}):e))):w.message.error(r.reason||e("取消失败"))},new((s=void 0)||(s=Promise))((function(e,t){function n(e){try{i(u.next(e))}catch(e){t(e)}}function a(e){try{i(u.throw(e))}catch(e){t(e)}}function i(t){var r;t.done?e(t.value):(r=t.value,r instanceof s?r:new s((function(e){e(r)}))).then(n,a)}i((u=u.apply(r,l||[])).next())}));var r,l,s,u},className:"absolute right-0 opacity-0 group-hover:opacity-100 transition-opacity"})]})]})})}));const rn=(0,L.memo)((function({file:e}){const t=Vt(),n=(0,L.useContext)(gt),r=(0,dt.useAtomValue)(jt),{onDeleteFile:a}=(0,dt.useAtomValue)(At),i=Xt();return(0,h.jsx)("div",{className:"my-2.5",children:(0,h.jsxs)(Jt,{className:"border-gray-3 border border-solid hover:bg-assist-bg-blue",children:[(0,h.jsx)(Yt,{fileName:e.fileName,className:"text-green"}),(0,h.jsxs)(w.Flex,{align:"center",gap:".25rem",className:"relative",children:[(0,h.jsx)(en,{percentage:100,fileStatus:t("上传成功"),strokeColor:"#53C31B",className:"text-green group-hover:-translate-x-6 transition-transform"}),(0,h.jsx)(tn,{onDelete:()=>function(e){return t=this,o=void 0,s=function*(){if(!a)return i(e);(yield a(e.fileName))&&n({type:"remove_file",identifier:r,fileName:e.fileName})},new((l=void 0)||(l=Promise))((function(e,n){function r(e){try{i(s.next(e))}catch(e){n(e)}}function a(e){try{i(s.throw(e))}catch(e){n(e)}}function i(t){var n;t.done?e(t.value):(n=t.value,n instanceof l?n:new l((function(e){e(n)}))).then(r,a)}i((s=s.apply(t,o||[])).next())}));var t,o,l,s}(e),className:"absolute right-0 opacity-0 group-hover:opacity-100 transition-opacity"})]})]})})})),an=(0,L.memo)((function({file:e}){const t=Xt();return(0,h.jsx)("div",{className:"my-2.5",children:(0,h.jsxs)(Jt,{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)(Kt,{className:"text-red h-5 w-5"})}),(0,h.jsx)("span",{className:"truncate w-40 text-red",children:e.fileName})]})}),{}),(0,h.jsxs)(w.Flex,{align:"center",gap:".25rem",className:"relative",children:[(0,h.jsx)((function({className:e=""}){const t=Vt();return(0,h.jsx)("div",{className:`flex items-center gap-1 h-6 text-sm mr-1 text-red ${e}`,children:t("上传失败")})}),{className:"group-hover:-translate-x-6 transition-transform"}),(0,h.jsx)(tn,{onDelete:()=>t(e),className:"text-red absolute right-0 opacity-0 group-hover:opacity-100 transition-opacity"})]})]})})}));var on=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 ln(){const e=(0,dt.useAtomValue)(jt),t=(0,dt.useAtomValue)(At),n=(0,L.useContext)(gt);return(0,L.useCallback)((r=>on(this,void 0,void 0,(function*(){if(t)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 a=yield Je(r.raw,void 0,t.getUploadUrls);n({type:"edit_file",identifier:e,file:a})}else{const t=[...r.failSeq,...r.uploadUrls];n({type:"edit_file",identifier:e,file:Object.assign(Object.assign({},r),{uploadUrls:t,failSeq:[],cancelControllers:{},fileStatus:Ge.INIT})})}}))),[e,t,n])}const sn=(0,L.memo)((function({file:e}){const t=Vt(),n=Xt();return(0,h.jsx)("div",{className:"my-2.5",children:(0,h.jsxs)(Jt,{className:"border-gray-3 border border-solid hover:bg-assist-bg-blue",children:[(0,h.jsx)(Yt,{fileName:e.fileName}),(0,h.jsxs)(w.Flex,{align:"center",gap:".25rem",className:"relative",children:[(0,h.jsx)(en,{fileStatus:t("已暂停"),percentage:Number(e.percentage.toFixed(0)),className:"group-hover:-translate-x-10 transition-transform"}),(0,h.jsx)(tn,{extraActions:(0,h.jsx)((function(){const t=ln();return(0,h.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 un(){const e=Vt(),t=(0,L.useContext)(bt),n=(0,dt.useAtomValue)(jt),r=(0,dt.useAtomValue)(St),a=(0,dt.useAtomValue)(Dt),i=(0,L.useMemo)((()=>{var e;return null===(e=t[n])||void 0===e?void 0:e.filter((e=>!(!r&&e.fileStatus===Ge.FINISHED))).sort(((e,t)=>e.fileStatus-t.fileStatus))}),[n,r,t]);return function(){const e=(0,L.useRef)(!1),t=(0,L.useRef)([]),n=(0,dt.useAtomValue)(jt),r=(0,dt.useAtomValue)(Dt),a=function(){const e=(0,dt.useSetAtom)(Dt);return(0,L.useCallback)((function(t){e((e=>e?Object.assign(Object.assign({},e),{fileStatus:Ge.UPLOADING,cancelControllers:kt(t)}):e))}),[e])}(),i=function(){const{onOnePartDone:e}=(0,dt.useAtomValue)(At),t=(0,dt.useAtomValue)(Ft),n=(0,dt.useAtomValue)(It),r=(0,dt.useAtomValue)(Lt),a=(0,dt.useAtomValue)(Tt),i=(0,dt.useSetAtom)(Dt),o=(0,L.useCallback)(((e,t)=>{i((n=>{if(!n||n.fileStatus!==Ge.UPLOADING)return n;const r=[...n.uploadStatus];1!==r[t]&&(r[t]=Number(e.progress));const a=r.reduce(((e,t)=>e+(t||0)),0)*(100/n.partCount);return Object.assign(Object.assign({},n),{uploadStatus:r,percentage:a})}))}),[i]),l=(0,L.useCallback)((r=>Nt(this,void 0,void 0,(function*(){if(!t||!n)return;const a=yield e(t,n,r.partNum);if(!a.status)throw new Error(a.reason);i((e=>{if(!e)return e;const t=[...e.uploadStatus];return t[r.partNum]=1,Object.assign(Object.assign({},e),{uploadStatus:t,uploadUrls:e.uploadUrls.filter((e=>e.partNum!==r.partNum)),completeSeq:[...e.completeSeq,r]})}))}))),[t,n,e,i]),s=(0,L.useCallback)(((e,t)=>Nt(this,void 0,void 0,(function*(){a&&(yield Et.put(e.uploadUrl,t,{withCredentials:!1,timeout:18e5,headers:{"Content-Type":"application/octet-stream"},signal:a[e.partNum].signal,onUploadProgress:Ot((t=>o(t,e.partNum)))}))}))),[o,a]),u=(0,L.useCallback)(((e,t)=>Nt(this,void 0,void 0,(function*(){try{yield s(e,t),yield l(e)}catch(t){if(t instanceof Error&&"canceled"===t.message)return;i((t=>t?Object.assign(Object.assign({},t),{failSeq:[...t.failSeq,e],uploadUrls:t.uploadUrls.filter((t=>t!==e))}):t))}}))),[s,l,i]);return(0,L.useCallback)((function(e){return Nt(this,void 0,void 0,(function*(){for(const{url:t,chunk:n}of e)if(yield u(t,n),r===Ge.CANCELED)return;i((e=>e?Object.assign(Object.assign({},e),{fileStatus:Ge.ALL_UPLOADED}):e))}))}),[r,u,i])}(),o=function(){const{onAllPartDone:e}=(0,dt.useAtomValue)(At),t=(0,dt.useAtomValue)(Ft),n=(0,dt.useAtomValue)(It),r=(0,dt.useSetAtom)(Dt);return(0,L.useCallback)((function(a){return Pt(this,void 0,void 0,(function*(){if(t&&n)try{if(!a)throw new Error("partial failed");const i=yield e(t,n);if(!i.status)throw new Error(i.reason);r((e=>e?Object.assign(Object.assign({},e),{percentage:100,fileStatus:Ge.FINISHED}):e))}catch(e){r((e=>e?Object.assign(Object.assign({},e),{fileStatus:Ge.FAILED}):e))}}))}),[t,n,e,r])}(),l=function(){const e=(0,dt.useAtomValue)(jt),t=(0,L.useContext)(gt),n=(0,dt.useSetAtom)(Dt);return(0,L.useCallback)((function(r){n(null),t({type:"edit_file",identifier:e,file:r})}),[n,t,e])}(),s=function(){const e=(0,dt.useAtomValue)(jt),t=(0,dt.useAtomValue)(Ct),n=(0,L.useContext)(gt),r=(0,dt.useSetAtom)(Dt);return(0,L.useCallback)((function(a){null==t||t(a),r(null),n({type:"edit_file",identifier:e,file:a})}),[r,n,e,t])}(),u=function(){const e=(0,dt.useAtomValue)(jt),t=(0,L.useContext)(gt),n=(0,dt.useSetAtom)(Dt);return(0,L.useCallback)((function(r){Object.values(r.cancelControllers).forEach((e=>e.abort())),t({type:"remove_file",identifier:e,fileName:r.fileName}),n(null)}),[e,t,n])}();(0,L.useEffect)((()=>{if(r)return r.fileStatus===Ge.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(t.current)),r.fileStatus!==Ge.UPLOADING||e.current||(e.current=!0,i(t.current)),r.fileStatus===Ge.ALL_UPLOADED&&o(0===r.failSeq.length),r.fileStatus===Ge.CANCELED&&(e.current=!1,u(r)),r.fileStatus===Ge.FAILED&&(e.current=!1,l(r)),r.fileStatus===Ge.FINISHED&&(e.current=!1,s(r)),()=>{r.fileStatus!==Ge.UPLOADING&&r.fileStatus!==Ge.ALL_UPLOADED||localStorage.setItem(n+"_uploading",ct([r]))}}),[r,n,o,u,l,s,a,i])}(),function(){const e=(0,dt.useAtomValue)(jt),t=(0,L.useContext)(bt),n=(0,dt.useSetAtom)(Dt),r=(0,L.useContext)(gt);(0,L.useEffect)((()=>{const a=t[e];if(!a||0===a.length)return;const i=a.every((e=>e.fileStatus!==Ge.UPLOADING)),o=a.find((e=>e.fileStatus===Ge.INIT));i&&o&&(r({type:"edit_file",identifier:e,file:Object.assign(Object.assign({},o),{fileStatus:Ge.UPLOADING})}),n(o))}),[e,n,r,t])}(),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===(null==a?void 0:a.fileName))return(0,h.jsx)(nn,{},e.fileName);switch(e.fileStatus){case Ge.FINISHED:return(0,h.jsx)(rn,{file:e},e.fileName);case Ge.FAILED:return(0,h.jsx)(an,{file:e},e.fileName);case Ge.PAUSED:return(0,h.jsx)(sn,{file:e},e.fileName);default:return(0,h.jsx)(Zt,{file:e},e.fileName)}}))})]}):null}const cn={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"},dn={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 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(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 mn(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 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())}))};var bn=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 gn(e){const{message:t,modal:n}=w.App.useApp(),r=(0,L.useContext)(gt),a=ln();return(0,L.useCallback)((()=>bn(this,void 0,void 0,(function*(){const i=yield function(e){return bn(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:Ge.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({},cn),{title:"提示",content:"检测到未完成上传任务,是否继续上传?",onOk(){i.forEach((e=>a(e)))},onCancel(){t.info("点击上传按钮手动继续")}}))}))),[e,r,a,n,t])}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({extra:e,dragAreaConfig:t}){const[n,r]=(0,L.useState)(!1),a=function(){const e=Vt(),{message:t}=w.App.useApp(),n=(0,dt.useAtomValue)(xt),r=(0,dt.useAtomValue)(jt),a=(0,dt.useAtomValue)(At),i=(0,L.useContext)(gt),o=function(){const{modal:e}=w.App.useApp(),t=Vt(),n=(0,L.useContext)(bt),r=(0,dt.useAtomValue)(xt),a=(0,dt.useAtomValue)(jt),i=(0,dt.useAtomValue)(zt);return function(o){return fn(this,void 0,void 0,(function*(){const l=[...pn(o,n[a],r),...mn(o,i)];return l.length?[yield e.confirm(Object.assign(Object.assign({},cn),{okText:t("覆盖"),cancelText:t("取消"),title:t("发现同名文件,是否覆盖?")})),new Set(l)]:[!0,new Set]}))}}(),l=function(){const e=(0,L.useContext)(bt),t=(0,dt.useAtomValue)(jt),n=Xt();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(s){return hn(this,void 0,void 0,(function*(){const u=yield function(e){return hn(this,void 0,void 0,(function*(){const t=new Map(e.map((e=>[e.name,e]))),[n,r]=yield o(e);return n?l(r):r.forEach((e=>t.delete(e))),Array.from(t.values())}))}(s),c=yield function(r){return hn(this,void 0,void 0,(function*(){if(!a)return[];const{getUploadUrls:i}=a,o=r.map((e=>Je(e,n,i))),l=(yield Promise.allSettled(o)).filter((e=>"fulfilled"===e.status)).map((e=>e.value));return(l.some((e=>e.fileStatus===Ge.FAILED))||l.length<r.length)&&t.info(e("部分文件获取上传地址失败")),l}))}(u);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)))}))}}();return function(){const e=(0,dt.useAtomValue)(jt),t=(0,L.useContext)(bt),n=(0,L.useContext)(gt),r=(0,L.useRef)(""),a=gn(e);(0,L.useEffect)((()=>{r.current!==e&&(r.current=e,t[e]||n({type:"add",identifier:e}),a())}),[e,a,t,n])}(),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(w.Spin,{spinning:n,children:(0,h.jsx)(Gt,Object.assign({},t,{onFileReceived:function(e){return wn(this,void 0,void 0,(function*(){r(!0),yield a(e),r(!1)}))}}))}),e&&(0,h.jsx)("div",{className:"mb-4",children:e}),(0,h.jsx)(un,{})]})}var vn=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 xn(e){var{extra:t,dragAreaConfig:n}=e,r=vn(e,["extra","dragAreaConfig"]);const a=Vt();return(0,L.useContext)(bt)===ht?(0,h.jsx)(w.Alert,{message:a("FileUploader 必须在 UploadStoreProvider 内使用"),type:"warning"}):(0,h.jsx)(vt.ScopeProvider,{atoms:[xt,jt,Dt,St,At,Ct,zt],children:(0,h.jsx)(jn,Object.assign({},r,{children:(0,h.jsx)(yn,{extra:t,dragAreaConfig:n})}))})}function jn(e){var{children:t}=e,n=vn(e,["children"]);const r=(0,dt.useAtomValue)(At);return function({root:e="",identifier:t,showFinished:n=!1,externalUploadContext:r=[],getUploadUrls:a,onCancelUpload:i,onOnePartDone:o,onAllPartDone:l,onUploadSuccess:s,onDeleteFile:u}){const c=(0,dt.useSetAtom)(xt),d=(0,dt.useSetAtom)(jt),f=(0,dt.useSetAtom)(St),p=(0,dt.useSetAtom)(At),m=(0,dt.useSetAtom)(Ct),h=(0,dt.useSetAtom)(zt);(0,L.useEffect)((()=>{c(e)}),[e,c]),(0,L.useEffect)((()=>{d(t)}),[t,d]),(0,L.useEffect)((()=>{f(n)}),[n,f]),(0,L.useEffect)((()=>{p({getUploadUrls:a,onCancelUpload:i,onOnePartDone:o,onAllPartDone:l,onDeleteFile:u})}),[a,i,o,l,s,u,p]),(0,L.useEffect)((()=>{m((()=>s))}),[s,m]),(0,L.useEffect)((()=>{h(r)}),[r,h])}(n),r?(0,h.jsx)(h.Fragment,{children:t}):(0,h.jsx)(h.Fragment,{})}var Sn=p(915),An={};An.styleTagTransform=k(),An.setAttributes=z(),An.insert=A().bind(null,"head"),An.domAPI=j(),An.insertStyleElement=E(),v()(Sn.A,An),Sn.A&&Sn.A.locals&&Sn.A.locals;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 zn(e){var{config:{modal:t,dragArea:n}}=e,r=Cn(e,["config"]);const a=Vt();return(0,L.useContext)(bt)===ht?(0,h.jsx)(w.Modal,Object.assign({},dn,{title:a("文件上传")},t,{children:(0,h.jsx)(w.Alert,{message:a("FileUploadModal 必须在 UploadStoreProvider 内使用"),type:"warning"})})):(0,h.jsx)(w.Modal,Object.assign({},dn,{forceRender:!0,title:a("文件上传"),footer:(0,h.jsx)(w.Button,{type:"primary",onClick:t.onCancel,children:a("确定")})},t,{children:(0,h.jsx)(xn,Object.assign({},r,{dragAreaConfig:n}))}))}const Nn=function(e){const t=Vt();return(0,L.useContext)(bt)===ht?(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)(xn,Object.assign({},e))})},En=(e=>{var t={};return p.d(t,e),t})({getFileExt:()=>l.getFileExt});function On(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,En.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 kn=p(482),Pn={};function Dn(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 c=l.current+1;c<=e;c++)a.current.getPage(c).then((e=>{const t=e.getViewport({scale:window.devicePixelRatio||1}),n=document.createElement("canvas");n.setAttribute("id","the-canvas"+c),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)((()=>{On(["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:kn.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}})}Pn.styleTagTransform=k(),Pn.setAttributes=z(),Pn.insert=A().bind(null,"head"),Pn.domAPI=j(),Pn.insertStyleElement=E(),v()(kn.A,Pn),kn.A&&kn.A.locals&&kn.A.locals;var Fn=p(685),Ln={};Ln.styleTagTransform=k(),Ln.setAttributes=z(),Ln.insert=A().bind(null,"head"),Ln.domAPI=j(),Ln.insertStyleElement=E(),v()(Fn.A,Ln),Fn.A&&Fn.A.locals&&Fn.A.locals;var In=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 Un(e){const t=(0,L.useRef)(null);return(0,L.useEffect)((()=>{On(["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((()=>In(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:Fn.L})}var Tn=p(913),Rn={};function _n(e){return(0,h.jsx)("div",{className:Tn.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:Tn._8})})}Rn.styleTagTransform=k(),Rn.setAttributes=z(),Rn.insert=A().bind(null,"head"),Rn.domAPI=j(),Rn.insertStyleElement=E(),v()(Tn.Ay,Rn),Tn.Ay&&Tn.Ay.locals&&Tn.Ay.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,L.useRef)(null);return(0,L.useEffect)((()=>{(()=>{Hn(this,void 0,void 0,(function*(){var n,r;yield On(["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 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 Bn(e){const[t,n]=(0,L.useState)("");return(0,L.useEffect)((()=>{(()=>{Vn(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 Gn=(e=>{var t={};return p.d(t,e),t})({default:()=>s.default});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 $n(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)((()=>{(()=>{qn(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)(Gn.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)(Gn.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 Xn=p(690),Kn={};function Wn(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)},c=()=>{var t;s(!1),null===(t=null==e?void 0:e.onSuccess)||void 0===t||t.call(e)};let d=null;if(i)d=(0,h.jsx)("div",{className:Xn.LV,children:"获取文件失败"});else if(a){const t=(0,En.getFileExt)(a),n=(0,h.jsx)("div",{className:Xn.D5,children:(0,h.jsx)(w.Spin,{})});let r=null,i=!0;switch(t){case"pdf":r=(0,h.jsx)(Dn,Object.assign({},e,{onError:u,onSuccess:c}));break;case"xlsx":case"csv":r=(0,h.jsx)(Un,Object.assign({},e,{onError:u,onSuccess:c}));break;case"png":case"jpg":case"jpeg":r=(0,h.jsx)(_n,Object.assign({},e,{onError:u,onSuccess:c}));break;case"md":r=(0,h.jsx)(Mn,Object.assign({},e,{onError:u,onSuccess:c}));break;case"txt":r=(0,h.jsx)(Bn,Object.assign({},e,{onError:u,onSuccess:c}));break;case"jsonl":case"json":r=(0,h.jsx)($n,Object.assign({},e,{onError:u,onSuccess:c}));break;default:i=!1}d=i?(0,h.jsxs)(h.Fragment,{children:[l&&n,r]}):(0,h.jsxs)("div",{className:Xn.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:Xn.qf,centered:!0,width:"100%",onCancel:null===(r=null==e?void 0:e.modalProps)||void 0===r?void 0:r.onCancel,footer:null,children:d}):null:d}function Qn(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)(Wn,Object.assign({},e),t)}Kn.styleTagTransform=k(),Kn.setAttributes=z(),Kn.insert=A().bind(null,"head"),Kn.domAPI=j(),Kn.insertStyleElement=E(),v()(Xn.Ay,Kn),Xn.Ay&&Xn.Ay.locals&&Xn.Ay.locals;const Zn=(e=>{var t={};return p.d(t,e),t})({default:()=>u.default});var Jn=p(860),Yn={};Yn.styleTagTransform=k(),Yn.setAttributes=z(),Yn.insert=A().bind(null,"head"),Yn.domAPI=j(),Yn.insertStyleElement=E(),v()(Jn.A,Yn),Jn.A&&Jn.A.locals&&Jn.A.locals;const er=(e=>{var t={};return p.d(t,e),t})({default:()=>c.default}),tr={zh:"已复制",en:"Copied"};function nr(e){const{showFeedback:t=!0,text:n,locale:r="zh"}=e;return(0,h.jsx)("span",{className:(0,er.default)(Jn.K,"data-hub-ui-copy-icon"),onClick:()=>{n&&((0,Zn.default)(n),t&&w.message.success(tr[r])),(null==e?void 0:e.onClick)&&e.onClick()},children:""})}function rr(e,t={showFeedback:!0,locale:"zh"}){const{showFeedback:n="true",locale:r="zh"}=t;e&&((0,Zn.default)(e),n&&w.message.success(tr[r]))}var ar=p(100),ir={};function or(e){return(0,h.jsx)(w.Modal,Object.assign({},e,{wrapClassName:ar.wm,width:400}))}ir.styleTagTransform=k(),ir.setAttributes=z(),ir.insert=A().bind(null,"head"),ir.domAPI=j(),ir.insertStyleElement=E(),v()(ar.Ay,ir),ar.Ay&&ar.Ay.locals&&ar.Ay.locals,or.confirm=e=>{w.Modal.confirm(Object.assign({},e)).update({icon:null,closable:!0,width:400,wrapClassName:`${ar.DE}`})};var lr=p(989),sr={};sr.styleTagTransform=k(),sr.setAttributes=z(),sr.insert=A().bind(null,"head"),sr.domAPI=j(),sr.insertStyleElement=E(),v()(lr.Ay,sr),lr.Ay&&lr.Ay.locals&&lr.Ay.locals;const ur="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 cr({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:lr.LV,children:[(0,h.jsx)("div",{style:{backgroundImage:"url("+ur+")"},className:lr.Kk,onClick:()=>n()}),(0,h.jsx)("div",{className:lr.NI,children:t})]}):null}var dr=m.LZ,fr=m.QR,pr=m.dA,mr=m.Lq,hr=m.Bx,br=m.l0,gr=m.Ow,wr=m.Y9,yr=m.ly,vr=m._2,xr=m.WI,jr=m.C;export{dr as ConfirmAgain,fr as Copy,pr as FilePreview,mr as FileUploadDrawer,hr as FileUploadModal,br as FileUploader,gr as FloatingLayer,wr as Header,yr as InputTag,vr as UploadDrawerUploadStoreProvider,xr as UploadStoreProvider,jr as copy};